Saving notebook into python files for easier version control. Save jupyter_notebook_config.py
as ~/.jupyter/jupyter_notebook_config.py
. For jupyter in docker, see here.
Reference here.
Install Jupyter notebook extensions and Jupyter Nbextensions Configurator using the conda option.
- Expand and collapse Sections: At home page, in "Nbextensions" tab select "Collapsible Headings".
- Table to contents: At home page, in "Nbextensions" tab select "Table of Contents". Note! Installing extensions will break nbconvert (for slideshow): see here; need to run conda update conda to fix.
If you want to set this behaviour for all instances of Jupyter (Notebook and Console), simply create a file ~/.ipython/profile_default/ipython_config.py
with the lines below.
c = get_config()
# Run all nodes interactively
c.InteractiveShell.ast_node_interactivity = "all"
In notebook, run:
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"