Anand's Space :: My Studio of Thoughts!

Quick Note on IPy Notebook

alt text

Lost my mind when I first learned it.

I was that lost in this (I)Python world! That much for my awe about IPython! Get a chance to learn IPython Notebook, instant excitement guaranteed!

##It’s magic.

Try these steps! For fun but motivational.

Go to this link. http://nbviewer.ipython.org/

It looks like a google search engine. In the search box, paste this link now, https://gist.github.com/asmind/8667c570b20ecae8f50d

And … Voila!

See what it is? That’s my new IPython Notebook I created while learning. It is such a magic. You know what all I needed to do?

First launch an IPython Notebook session from terminal using ipython notebook --pylab from the directory of my choice.

The --pylab imports a python library called PyLab and keeps ready for you almost all the packages sufficient for some serious scientific computing, including matplotlib. Learn what matplotlib is on this wiki page.

The command above launches a web browser where the new IPython Notebook appears, whose address bar is a local address. Click on the NEW button on the right, it creates a new notebook.

Do whatever you want to do in it including writing python code, writing markdown docs, executing normal terminal commands, etc and it is autosaved. Give a title on top (click on UNTITLED on top). Autosaved again!

Close it!

Go to the folder where it saved this file as Ex: IPy Intro.ipynb

Double click and it opens in gedit. This is actually a JSON file (I am yet to learn this part though, that doesn’t stop me from writing). Paste the entire content of this file in http://gist.github.com

Now Create a Public or Private Gist (see the options below the box where you pasted your text). This creates a Git Gist link which is what I shared above. This JSON file when you open it in the way I showed above (before Voila), opens like an IPython Notebook. This way, any number of people can collaborate on this work. Isn’t this magic?

IPython, my latest love!

This is it for now. I am losing my mind…..

##__To be Continued …. !!!