lyhapple's python code snippets