Python code used in various lectures