Write and execute Jupyter Notebook Extension (GitHub - minrk/ipython_extensions)

PHOTO EMBED

Sun Aug 25 2024 19:50:05 GMT+0000 (Coordinated Universal Time)

Saved by @jrb9000 #ipython #jupyter-notebook

# This IPython Notebook magic writes the content of the cell to a specified .py 
# file before executing it. An identifier can be used when writing to the file,
# thus making it possible to overwrite previous iterations of the same code block.
# The use case for this extension is to export selected code from a Notebook for 
# reuse through a .py file.

%install_ext https://raw.githubusercontent.com/minrk/ipython_extensions/master/extensions/writeandexecute.py


# Then load it with

%load_ext writeandexecute
content_copyCOPY

https://github.com/minrk/ipython_extensions