Here are the python programs related to Week 8:

And here are some sections of the SMAC book (Krauth W., "Statistical mechanics: algorithms and computations". OUP Oxford, 2006) related to the topics treated in Week 8:

5.1 (Ising model), 5.1.1 (enumeration of states), 5.1.2 (thermodynamics of small systems), 5.2 (Monte Carlo sampling), 5.2.1 (local algorithm), 5.2.2 (heat-bath algorithm and perfect sampling), 5.2.3 (cluster algorithm)