08 2012 档案

python代码小实践之data_structure_and_algorithm
摘要:二分查找def bin_sort(l_head,l_index): length = len(l_head) for i in range(length-1): if i == 0: continue else: head = 0 tail = i - 1 temp_h = l_head[i] temp_i = l_index[i] while head <= tail: mid = (head+tail)/2 if(l_head[mid]<temp_h): head = ... 阅读全文

posted @ 2012-08-09 11:31 mainred 阅读(260) 评论(0) 推荐(0)

python代码小实践之split_csv
摘要:'''This python script is used to split the .arff file got from marsyas to .csv files, which is easier to be read into the matlab for further processs.Create on 2012-7-13@auther: mainred'''import xlrd, xlwtimport timeimport reimport osfile_name = raw_input('please input na 阅读全文

posted @ 2012-08-09 11:29 mainred 阅读(515) 评论(0) 推荐(0)

python代码小实践之dorm_lab_changeIP
摘要:为了方便能在寝室和实验室之间往返后更改电脑ip,参考了blogjava中qunjunlong123的文章,并添加了测试网络连接小功能。用py2exe打包为exe文件。创建快捷方式,然后以管理员身份运行(这个很重要,要不然ip改不了)。# -*- coding: cp936 -*-import wmiimport urllib2IPV4_25 = {'arrIPAddresses':['10.110.87.19'], 'arrSubnetMasks':['255.255.255.0'], 'arrDefaultGateway 阅读全文

posted @ 2012-08-09 11:27 mainred 阅读(398) 评论(0) 推荐(0)