Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 1.63 KB

setup_jupyter.md

File metadata and controls

27 lines (23 loc) · 1.63 KB

Jupyter Setup

Jupyter notebook autosave to python file and html file

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.

Jupyter notebook extensions

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.

Display all variables in the same cell

Permenant

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"

Temperary

In notebook, run:

from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"