helpful python functions and scripts