Added iPython notebook version of the scipt