This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/.bashrc | |
alias gcc='/usr/local/bin/gcc' | |
export CC=/usr/local/bin/gcc | |
export CXX=/usr/local/bin/g++ | |
CFLAGS="-O3 -g -fno-exceptions -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing" | |
CXXFLAGS="-O3 -g -fno-exceptions -fno-rtti -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing" | |
export CFLAGS CXXFLAGS | |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/scws/lib/:/home/arthas/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/sbin | |
export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu | |
export PATH=$PATH:/usr/local/tokutek/mysql/bin/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
index_text用法 replace | |
[2013-03-21 22:44:49] folder[_hehe_2011-08-21] num indexed: 350000 | |
[2013-03-21 22:44:57] folder[_hehe_2010-12-14] num indexed: 360000 | |
[2013-03-21 22:45:05] folder[_hehe_2010-12-14] num indexed: 370000 | |
[2013-03-21 22:45:11] folder[_hehe_2010-04-08] num indexed: 380000 | |
[2013-03-21 22:45:17] folder[_hehe_2010-10-25] num indexed: 390000 | |
[2013-03-21 22:45:25] folder[_hehe_2011-07-02] num indexed: 400000 | |
[2013-03-21 22:45:34] folder[_hehe_2011-10-10] num indexed: 410000 | |
[2013-03-21 22:45:43] folder[_hehe_2011-02-02] num indexed: 420000 | |
[2013-03-21 22:45:51] folder[_hehe_2011-02-02] num indexed: 430000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3, | |
def timeit(method): | |
def timed(*args, **kw): | |
ts = time() | |
result = method(*args, **kw) | |
te = time() | |
logging.info('%r %2.2f sec' % (method.__name__, te-ts)) | |
return result | |
return timed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
__doc__ = """Tiny HTTP Proxy. | |
This module implements GET, HEAD, POST, PUT and DELETE methods | |
on BaseHTTPServer, and behaves as an HTTP proxy. The CONNECT | |
method is also implemented experimentally, but has not been | |
tested yet. | |
Any help will be greatly appreciated. SUZUKI Hisao |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
在macbook pro 4核上的测试结果,python自带的map表现比起ipython 的map,list comprehensions都要好。但是有优化的multi_mcpi还是不错。 | |
$ ipcluster start --n=4 | |
print mcpi(100000000) | |
#print multi_mcpi_by_map(dview, 100000000) # 传递太耗时 | |
#print multi_mcpi_by_list_comp(dview, 100000000) | |
#print multi_mcpi(dview, 100000000) | |
$ time py multi_mcpi.py | |
importing random from random on engine(s) |
NewerOlder