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
var sgs = sgs || {}; | |
(function(sgs){ | |
var srd = Math.random, | |
slice = Array.prototype.slice, | |
copy = function(ary){ return slice.apply(ary); }; | |
sgs.func = sgs.func || {}; | |
sgs.func.rint = function(max) { | |
max = max || 100; |
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
(function(g) { | |
var cur = 0, | |
p = 0, | |
mem = [0], | |
ret = [], | |
slen = -1, | |
pos = [], | |
unlimit_loop = 5000, | |
tmp = "", | |
ptype = Object.prototype.toString, |
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
This file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by pkg-config configure 0.27, which was | |
generated by GNU Autoconf 2.68. Invocation command line was | |
$ ./configure --disable-debug --prefix=/Users/dreampuf/opt/homebrew/Cellar/pkg-config/0.27 --with-pc-path=/Users/dreampuf/opt/homebrew/lib/pkgconfig:/Users/dreampuf/opt/homebrew/share/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig --with-internal-glib | |
## --------- ## | |
## Platform. ## |
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
This file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by pkg-config configure 0.27, which was | |
generated by GNU Autoconf 2.68. Invocation command line was | |
$ ./configure --disable-debug --prefix=/Users/dreampuf/opt/homebrew/Cellar/pkg-config/0.27 --with-pc-path=/Users/dreampuf/opt/homebrew/lib/pkgconfig:/Users/dreampuf/opt/homebrew/share/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig --with-internal-glib | |
## --------- ## | |
## Platform. ## |
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/env python | |
# vim: fileencoding=utf-8 | |
__author__ = "dreampuf<[email protected]>" | |
import os | |
import sys | |
from functools import wraps | |
try: | |
from line_profiler import LineProfiler |
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/env python | |
#vim: encoding=utf-8 | |
__author__ = "Dreampuf<[email protected]>" | |
import subprocess | |
import itertools | |
dc = "a,ai,an,ang,ao,ba,bai,ban,bang,bao,bei,ben,beng,bi,bian,biao,bie,bin,bing,bo,bu,ca,cai,can,cang,cao,ce,cei,cen,ceng,cha,chai,chan,chang,chao,che,chen,cheng,chi,chong,chou,chu,chua,chuai,chuan,chuang,chui,chun,chuo,ci,cong,cou,cu,cuan,cui,cun,cuo,da,dai,dan,dang,dao,de,dei,den,deng,di,dia,dian,diao,die,din,ding,diu,dong,dou,du,duan,dui,dun,duo,e,ei,en,eng,er,fa,fan,fang,fei,fen,feng,fiao,fo,fou,fu,ga,gai,gan,gang,gao,ge,gei,gen,geng,gong,gou,gu,gua,guai,guan,guang,gui,gun,guo,ha,hai,han,hang,hao,he,hei,hen,heng,hm,hng,hong,hou,hu,hua,huai,huan,huang,hui,hun,huo,ji,jia,jian,jiang,jiao,jie,jin,jing,jiong,jiu,ju,juan,jue,jun,ka,kai,kan,kang,kao,ke,kei,ken,keng,kong,kou,ku,kua,kuai,kuan,kuang,kui,kun,kuo,la,lai,lan,lang,lao,le,lei,leng,li,lia,lian,liang,liao,lie,lin,ling,liu,lo,long,lou,lu,luan,lun,luo,lüe,lǘ,lǚ,lǜ,ma,mai,man,mang,mao,me,mei,men,meng,mi,mian,miao,mie,min,ming,miu,mo,mo |
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/env python | |
#vim: encoding=utf-8 | |
""" | |
拼音分词 | |
""" | |
__author__ = "dreampuf<[email protected]>" | |
import unittest |
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/env python | |
#vi: encoding=utf-8 | |
__author__ = "dreampuf <[email protected]>" | |
""" | |
Reference : http://docs.python.org/2/library/stdtypes.html#truth-value-testing | |
""" | |
class S(object): |
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
$ for i in {1..20}; do echo `echo s$i.vpnst.com;ping -c1 s$i.vpnst.com|grep -o '(.\+)'`; done | |
s1.vpnst.com (106.187.39.125) | |
s2.vpnst.com (96.44.186.158) | |
s3.vpnst.com (106.187.39.125) | |
s4.vpnst.com (109.169.68.137) | |
s5.vpnst.com (173.231.12.99) | |
s6.vpnst.com (76.164.225.211) | |
s7.vpnst.com (74.82.183.119) | |
s8.vpnst.com (106.187.39.125) | |
s9.vpnst.com (76.74.172.234) |
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
# output as png image | |
set terminal png | |
# save file to "benchmark.png" | |
set output "benchmark.png" | |
# graph title | |
set title "Benchmark for gunicorn(default) vs. gunicorn(gevent) vs. gunicorn(eventlet) vs. Flask default" | |
# aspect ratio for image size |
OlderNewer