Skip to content

Instantly share code, notes, and snippets.

@fomightez
Last active January 24, 2018 17:56
Show Gist options
  • Save fomightez/35c444750fb00583bda81758fb112737 to your computer and use it in GitHub Desktop.
Save fomightez/35c444750fb00583bda81758fb112737 to your computer and use it in GitHub Desktop.
Introduction to Jupyter Notebooks (as of early 2018)

Introduction to Jupyter Notebooks

Small sampling of example notebooks

Active versions linked in this section, via Binder service.
These are in no particular order and I tried to cover the gamut from ones that are targeted at newcomers to advanced notebooks.


Jupyter notebooks not limited to Python

Jupyter notebooks are not limited to Python, here is one that runs in the current other darling language of bioinformatics, R. (Source: here)

Importantly, the notbeooks I am discussing run the code that is input specically in the native language like Python or R or Juila or Go or Ruby, etc,, underneath. There are some systems out there that replicate many languages, i.e., Skulpt, CodeSkulptor, RubyJS, etc, but actually run in javascript. The Jupyter notebooks have the native language in a browser-based framework with HTML and javascript proving the UI, as far as I know.


History

As I understand it...

  • IPython is an interactive shell running with Python.
  • IPython notebooks started as an advancement of the interactive IPython REPL interface, where REPL stands for "Read–eval–print loop".
  • Project Jupyter/Jupyter notebooks was the next advancement as they realized the paradigm went beyond Python and they could offer other languages, like Julia and even Bash terminals, in the notebook format.
  • JupyterLab is the direction they are heading as it is the next generation user interface for Project Jupyter.

Static notebooks

Static notebooks are great for communicating & documenting.

Static versions notebooks offer a way to display & share analyses already done or demonstrate code for others, build blogs, etc.. The notebooks themselves are JSON code, but they can be rendered beautifully using nbviewer, and by default even Github renders Jupyter notebooks fairly nicely now. For example, here is the Ligo notebook beautifully rendered, but in static form where you cannot interact with it or directly change it and re-run the code.

Binder service

Binder service -great for empowering data analyses of yours and other notebooks

Some bright people at MyBinder.org realized they could take static code of notebooks and make a service that spins them up as running active notebooks. That is what I have been using as examples because active versions are much more empowering.

Cool things on the horizon...

JupyterLab will integrate notebook components with a more full-featured browser-based application. Test it here

The Phosphor library is used as the underlying architecture of JupyterLab and provides many of the low level primitives and widget structure used in the application. The JupyterLab community allows integrating with other software and tools by enabling development of extensions that can be thought of as plug-ins.

Full, early account of the new version here.


Beyond intro: Macromolecular Structural Examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment