Added *.py for the code in ipython notebook