Source codes for statistical thermodynamics and stochastic kinetics