imported ipython notebook to python scripts