2016-10-29 Jupyter Notebook ExtensionsΒΆ

The notebook extensions seemed to have achieved stability in jupyter_contrib_nbextensions. To install it, just do:

pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user

The list of extensions is growing and the documentation is available at jupyter-contrib-nbextensions.readthedocs.io. Here is a short list:

  • code_prettify: shorten long lines, use yapf

  • execute_time: displays execution time below each cell

  • exercise2: hide / show solution to exercise

  • highlighter: highligh text which comes with magic cells

  • move_selected_cells: to move several cells in one move

  • scratchpad: Open a separate Windows where you can try some code without modifying the original notebook (type CTRL + B)

  • toc2: add a table of contents as a side bar, could be difficult to make it work

  • skip-traceback: skip the trace back, only show the last error

  • tree-filter: if you have many notebook, helps filtering them out

Some tricks with notebooks: Shift-J and Shift-K selects cells. To enable / disable an extension:

jupyter nbextension enable <nbextension>

Example:

jupyter nbextension enable codefolding/main

So for the proposed short list:

jupyter nbextension enable code_prettify/code_prettify
jupyter nbextension enable execute_time/ExecuteTime
jupyter nbextension enable exercise2/main
jupyter nbextension enable highlighter/highlighter
jupyter nbextension enable move_selected_cells/main
jupyter nbextension enable scratchpad/main
jupyter nbextension enable toc2/toc2
jupyter nbextension enable tree-filter/index
jupyter nbextension enable skip-traceback/main
jupyter nbextension enable codefolding/main