Intro to Jupyter

And its friends

J. Horacsek

What is Jupyter?

Have you used Maple or Mathematica?

  • Jupyter is a notebook front end for multiple different environments
  • Started as IPython, but evolved into something much bigger and much more general
  • Julia, Python and R
  • But many more languages are supported (see the list)
  • Today, we'll only focus on Python

What is Jupyter?

Jupyter is a notebook web front end for multiple different environments

[source]

How do I use it?

There are multiple ways of accessing Jupyter

  • http://ucalgary.syzygy.ca/: A remote Jupyter server with Python 2,3, Julia, and R kernels installed, you have access to this via your uCalgary account
  • Anaconda: A distribution of Python that focuses on scientific computing. 'conda install jupyter' at the command line
  • pip install jupyter (not recommended) 

 

See the install guide for local setups

We'll be using syzygy

Included Worksheets

I sent out a small set of worksheets that will form the basis for the rest of this presentation, the first five can run on Syzygy

 

  • 01_intro: a short intro to how Jupyter notebooks work, and a brief primer on Python
  • 02_plots: plotting with matplotlib in notebooks
  • 03_interactive_widgets: creating interactive notebooks
  • 04_cell_display: creating rich output
  • 05_an_esoteric_example: a more sophisticated example of what can be done in a notebook

Included Worksheets

The last two run on my local machine (they require libraries not available on Syzygy)

  • 06_vtk_bindings: A simple example showing how to render images from VTK in a notebook
  • 07_neural_nets: An example using Keras showing how create and train neural networks

If you want to follow along with those, you'll need a few libraries. At the terminal, install 

conda install -c conda-forge keras=2.0.2
conda install theano vtk pydot graphviz

Included Worksheets

The goal is not to give you a deep understanding of any one topic, but rather to show you what can be done, then provide resources for further exploration.

Intro to Jupyter/Python

  • 01_intro: a short intro to how Jupyter notebooks work, and a brief primer on Python
  • 02_plots: plotting with matplotlib in notebooks
  • 03_interactive_widgets: creating interactive notebooks
  • 04_cell_display: creating rich output
  • 05_an_esoteric_example: a more sophisticated example of what can be done in a notebook
  • 06_vtk_bindings: A simple example showing how to render images from VTK in a notebook
  • 07_neural_nets: An example using Keras showing how create and train neural networks

Resources

There are a couple of key core libraries in the Python scientific computing scene

  • NumPy: ​NumPy is the fundamental package for scientific computing with Python. It's the basis for numerical computing in Python
  • SciPy: Numerical routines, solving ODEs, etc... Higher level functions (documentation)
  • matplotlib: Plotting in Python
  • pandas: an open source library providing high-performance, easy-to-use data structures and data analysis tools
  • Jupyter

Resources

There are also many more interesting libraries/environments available for Python

  • scikit-learn: Classification, clustering, regression, etc...
  • keras: a high-level neural networks API
  • tensorflow/Theano: Support libraries for deep learning
  • SageMath: An open source alternative to Mathematica, Maple, etc... More of an environment than a single library

Thanks!

Questions, comments, concerns, suggestions?

Intro to Jupyter

By Joshua Horacsek

Intro to Jupyter

  • 1,063