python codes for Hangzhou Demo