keep some useful code snippet of python