Jupyter Notebooks

Jupyter

I am using Jupyter notebooks, an open source web application to manage and share my machine learning code.  Its great because it allows you to have live executable code in the document along with explanatory text, images and more.  It is a live interactive notebook so you can run, rerun and edit parts of the notebook at any time.  Although I am using Python for in all of my notebooks, Jupyter handles many other languages as well e.g. R, Haskell.  This is just the tip of the iceberg with Jupyter.

The official Jupyter documentation is a great startpoint for learning.

There is also a Jupyter conference (Jupytercon) that has videos available online.

Start

Jupyter notebooks are made up of cells.  Jupyter has 4 types of cells.

  • Code
  • Heading
  • Raw NBConvert
  • Markdown

Code

Code is executed when run.

Heading

No longer supported.  Now use Markdown headings.

Raw NBConvert

Content that is to be unmodified.  This content is not rendered and it often used by other programs when converting the notebook into a different format notebook.

Markdown

Markdown language allows for pretty formatting in Jupyter markdown cells and it is also used in other programs like github for ducmentation.  Markdown is a superset of HTML so you can embed HTML into a markdown cell and it will convert it.

There are slight differences in markdown in different implementations.  e.g. Github supports the following emojis but Jupyter doesn’t.

If you want to expand your knowledge of all things markdown including extensions to markdown and other uses see this excellent resource

Online Markdown editors

Here are some online markdown editors to tryout:

Markdown learning references

Example

So what can you end up producing?  Documents like this that have inbuilt code, graphs, LaTex equation and great formatting.