DoCP python codes