Simple Ising model in python.