摘要: ip定位数据大约12M,采用-chacheFile 分发 文件来源https://pan.baidu.com/s/1J0pwTafHgt4T0k3vV_gC-A 格式大致格式如下: 0.0.0.0 0.255.255.255 NULL IANA保留地址 NULL 1.0.0.0 1.0.0.255 阅读全文
posted @ 2018-04-16 20:23 bioamin 阅读(687) 评论(0) 推荐(0) 编辑
摘要: # 数字 ==> ip # 数字范围[0, 255^4] >>> num2ip = lambda x: '.'.join([str(x/(256**i)%256) for i in range(3,-1,-1)]) >>> num2ip(3232235521) '192.168.0.1' # ip ==> 数字 >>> ip2num = lambda x:sum([256**j*int(i)... 阅读全文
posted @ 2018-04-16 19:10 bioamin 阅读(618) 评论(0) 推荐(0) 编辑
摘要: 最近开发学习Pyton,当加入中文注释时,运行程序报错: File "red.py", line 10 SyntaxError: Non-ASCII character '\xe5' in file red.py on line 10, but no encoding declared; see h 阅读全文
posted @ 2018-04-16 15:53 bioamin 阅读(15571) 评论(0) 推荐(0) 编辑