python codes, mainly