文本中保存的内容为:{ 'QQQ': [0.067, 0.167, 0.2, 0.033, 0.233, 0.267, 0.1, 0.133], 'TTT': [0.5, 0.375, 0.25, 0.3, 0.6, 0.333, 0.857, 0.636, 0.667, 0.55...
分类:
编程语言 时间:
2014-08-28 16:05:49
阅读次数:
1084
场景:在使用linux过程中,我们常用telnet来测试对方服务器某个端口是否开通,但linux默认没有安装telnet客户端,很多时候临时安装telnet会比较麻烦,这时候就可以使用python来做简单测试了。python
importsocket
s=socket.socket()
s.connect(("IP",port))
s.close注:其实就..
分类:
编程语言 时间:
2014-08-28 15:02:00
阅读次数:
305
下载SqlAlchemyhttp://www.sqlalchemy.org/
安装SqlAlchemy
假设下载后的SqlAlchemy保存路径为:E:\Python\SQLAlchemy-0.9.7
执行cmd如下:
>>>C:\Users\xxx> cd /d E:\SQLAlchemy-0.9.7
>>> E:\SQLAlchemy-0.9.7>python se...
分类:
数据库 时间:
2014-08-28 14:56:29
阅读次数:
1274
Given a 2D board containing 'X' and 'O',
capture all regions surrounded by 'X'.
A region is captured by flipping all 'O's into 'X's
in that surrounded region.
For example,
X X X X
X O O X...
分类:
其他好文 时间:
2014-08-28 14:55:59
阅读次数:
209
Python
数据结构算法:
http://interactivepython.org/courselib/static/pythonds/index.html...
分类:
其他好文 时间:
2014-08-28 14:55:49
阅读次数:
141
Given a collection of numbers, return all possible permutations.
For example,
[1,2,3] have the following permutations:
[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2],
and [3,2,1].
思...
分类:
其他好文 时间:
2014-08-28 14:52:49
阅读次数:
158
Given a collection of numbers that might contain duplicates, return all possible unique permutations.
For example,
[1,1,2] have the following unique permutations:
[1,1,2], [1,2,1],
and [2,1,1].
...
分类:
其他好文 时间:
2014-08-28 14:51:19
阅读次数:
148
Python中*args 和**kwargs的用法...
分类:
编程语言 时间:
2014-08-28 14:50:09
阅读次数:
197
Python的正则表达式的模块名字是‘re'>>> import re>>> rawString = r'This is a\nnormal string.'>>> rawString'This is a\nnormal string.'>>> string = 'This is a\nnormal...
分类:
编程语言 时间:
2014-08-28 14:45:00
阅读次数:
219
import urllibrawurl=xxxurl=urllib.unquote(rawurl)所用模块:urllib所用函数:urllib.unquote()案例import urllibrawurl = "%E6%B2%B3%E6%BA%90"url = urllib.unquote(rawu...
分类:
编程语言 时间:
2014-08-28 14:34:09
阅读次数:
210