Last Updated: September 30, 2021
·
2.377K
· 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

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.

Security insights from Cside