Random collection of python utility functions