small python codes (maybe less than 500 lines)