Jupyter
Tips and tricks around JypyterJupyter is quite useful
Executing Python notebooks on a remote powerful server - what more? Here some tips.
Formatting #
Jupyter notebooks are edited in online web-sessions, where editor extensions are not available.
But pretty printing can be done:
First, install the following packages
|
|
After that in the jupyter notebook, add as a first line
|
|
This will load an extension into python.
In all cells, prepend the text one wants to prettify with
|
|
When the cell gets executed, the text gets replaced (without the %%black) with a pretty version.
Running Jupyter on a server #
I have a separate server to run Jupyter on. In order to keep it going, it is started in a tmux session:
|
|
This starts a jupyter instance that is accessible from other machines. For it to work, one needs to set a password.
Reuse system site packages #
|
|