Last Updated: September 30, 2021
·
1.798K
· satishgoda

Using Jupyter Notebook to learn programming interactively

I have recently setup Jupyter Notebook to work with Python3. Following are some use cases of the notebook in action.

Python

When trying out the networkx and pydotplus library, a Jupyter notebook running the ipython kernel is really handy to inspect the graphs visually. The "%%svg" magic command will render the cell as an svg literal!

networkx_1_html.png

Once can also use the code snippet below to embed an image

...
svgFile = path.Path('/home/sgoda/Desktop/nx_dg_3.svg')
from IPython.display import Image, HTML
HTML(svgFile)

As you can see from the image below, Jupyter notebooks also have interactive widgets (http://ipywidgets.readthedocs.io)! They came real handy recently when I was learning the rxpy library.

jupyter_usecase_rxpy.png

Javascript

Screenshot.png

References