Collection of useful Python codes