My useful Python codes