python script to generate runs