!pip install nbimporter
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 have
sinin 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:
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
Links
Links are useful to jump between sections and files. Here are few examples:
To jump to upper section help.
To jump to some section in another file, for example shutil.
nbimporter
To import methods from another jupyter notebook:
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:
-U notebook-as-pdf pip install
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
.