Code to share for the class at Jena summer school