Added the python script for those not using ipython notebook