MCMC code in python