migrate some code from the IPython notebook "Runner"
update README