Tips for Jupyter

Pretty print all outputs

Put in notebook:

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

If you want to set this behavior for all instances of Jupyter, simply create a file ~/.ipython/profile_default/ with the lines:

c = get_config()
c.InteractiveShell.ast_node_interactivity = "all"

Toggle Code-Cells

Solution without the need of an extension that also works in HTML exports. Just put the following code in a cell and execute it:

from IPython.display import HTML
function code_toggle() {
  if (code_show){
  } else {
  code_show = !code_show
$( document ).ready(code_toggle);
The raw code for this Notebook is by default hidden for easier reading.
To toggle on/off the raw code, click 
<a href="javascript:code_toggle()">here</a>.''')