Just some useful python reusable code