Some simple code recipes in Python