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