主要是看到了别人的算法:http://blog.jobbole.com/111556/我自己写了个python的代码实现,感谢大侠去研究这样的算法点击(此处)折叠或打开def transIDCard15To18(IdCardNo): ll=[] if IdCardNo is not None and l...【阅读全文】
以前有句话说,要了解RSA,首先你应该理解两个很大的质数. Generating Public and Private KeysA key in the RSA scheme is made of two numbers. There are three steps to creating thekeys:1. Create two random, very large prime numbers. These numbers will be called p and q.Multiply these numbers to...【阅读全文】
{'ip':'192.168.1.1','xxx':'app1'},{'ip':'192.168.1.2','xxx':'app3'},{'ip':'192.168.1.3','xxx':'app5'},]def getResult_1(values): ips = set([ values[i]['ip'] for i in range(0,len(values))]) ...【阅读全文】
python的map,reduce,filter,lambda,和排序lambdalambda用来编写简单的函数lambda的使用方法如下:lambda arg1 ,arg2,arg3,...,argn : expressionfs = [(lambda n, i=i : i + n) for i in range(10)]>>> fs[3](4)7>>> fs[4](4)8>>> fs[5](4)9...【阅读全文】