Jupyter General

Help

To see parameters: SHIFT + TAB For help use ? before or after the command. For autocompletion: TAB + TAB Merge cells, select cells then: Shift + M `To see all available functions in numpy that havesinin their name:np.sin?`

Markdown

For raw text use:

```text

and close with

<```> but without the <> (that's the only one text that can't be displayed I guess!)

To add some empty vertical space one can use:

&nbsp;

or add a new line use \_ where _ denotes space.

Magic commands

To autoreload edited python files (doesn’t include class signatures changes, these you have to re-import):

%load_ext autoreload
%autoreload 2

nbimporter

To import methods from another jupyter notebook:

!pip install nbimporter

For more see here.

nbconvert

To convert jupyter notebook to PDF use notebook-as-pdf package, this will install bunch of packages like nbconvert, etc. From here:

pip install -U notebook-as-pdf

wait to finish installation. Then:

pyppeteer-install
pip uninstall pypdf2
pip install "pypdf2<3.0"

Then run the following command line: jupyter-nbconvert --to PDFviaHTML <jupyter_notebook_file.ipynb> this will create PDF file with the same name jupyter_notebook_file.pdf (ignore the warning on IPython3 lexer unavailable). To rename a file: mv old_name new_name

Unfortunately only command line works, Download as option in a browser doesn’t.

Extensions

conda install -c conda-forge jupyter_contrib_nbextensions

After installation and restart, you will see nbextensions tab, most notable extensions are collapsable headings, table of context 2 (toc2), spellcheck.