Here are the python programs related to Week 6:

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 6:

3.3.2 (Levy construction in free space and in the harmonic trap), 4.1.1 (density of states), 4.1.2 (bosonic statistics, energy of N trapped bosons, condensed fraction)