View sleepsort.py
from __future__ import print_function | |
from threading import Timer | |
l = [8, 2, 4, 6, 7, 1] | |
for n in l: | |
Timer(n, lambda x: print(x), [n]).start() |
View gist:1318308
#-*-coding:utf-8-*- | |
from cmd import Cmd | |
import os | |
import atexit | |
from user import User | |
import getpwd | |
import sys | |
# ls |
View wong2.js
/** | |
* Copyright 2011 wong2 <wonderfuly@gmail.com> | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
View rrv6.js
object.use("net",function(net){ | |
function f(){ | |
new net.Request({ | |
url:"http://www.renren.com/bulletin/lottery",method:"post", | |
onSuccess:function(r){ | |
if (parseInt(r.responseText)==1){alert("终于抢到了。。")} | |
else{console.log("还没...");setTimeout(f,1000)} | |
}, | |
onError:function(){alert("网络错误,请稍后再试")} | |
}).send() |
View rr_video_comments.js
function getComments(shareId, ownerId, startCommentId){ | |
var count = 0; | |
function getComment(commentId){ | |
var data = { shareId: shareId, owner: ownerId, commentId: commentId } | |
data.md5 = XN.app.share.CommentManger.getOptions("shareUrlMd5"); | |
var xhr = new XN.net.xmlhttp({ | |
url: "http://share.renren.com/share/comment/moreurlcomment", | |
data: XN.array.toQueryString(data), |
View scanner.c
#include <stdio.h> | |
#include <string.h> | |
#include <ctype.h> | |
#include <stdlib.h> | |
#define NUM_OF_KEYWORDS 7 | |
#define BUFFER_SIZE 1000 | |
#define TOKEN_VALUE_SIZE 20 | |
typedef struct Token{ |
View pinyin_seg.py
#-*-coding:utf-8-*- | |
def seg(pinyin): | |
sm = ['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'w', 'x', 'y', 'z', 'sh', 'zh', 'ch'] | |
ymd = {'a': {'i':None, 'o':None, 'n': {'g': None}}, | |
'e': {'i':None, 'r':None, 'n': {'g': None}}, | |
'i': {'e':None, 'a':{'n':{'g':None}, 'o':None}, 'u':None, 'o':{'n':{'g':None}}, 'n':{'g':None}}, | |
'o': {'u':None, 'n':{'g':None}}, | |
'u': {'a':{'i':None, 'n':{'g':None}}, 'e':None, 'i':None, 'o':None} | |
} |
View weibo_token.py
from config import APP_SECRET, APP_KEY | |
from weibopy.auth import OAuthHandler | |
CALLBACK = "" | |
auth = OAuthHandler(APP_KEY, APP_SECRET, CALLBACK) | |
url = auth.get_authorization_url() | |
print "open this in the browser: " + url | |
code = raw_input("input the code: ") |
View google_black_list.js
var a = [[1492], [6656], [8759], [63166], [9287], [4369], [8811], [7556], [6262], [14399], [64357], [64353], [10546], [6450], [63794], [61408], [60467, 60463, 30321, 30325, 5103, 9471, 8510, 30243, 5103, 9471, 8510, 30321, 30325, 60467, 60463], [63413, 878, 10006, 64901], [57367, 10006, 64901, 14548, 14505], [10006, 64901, 30321, 30325, 6877, 9480, 30243, 6877, 9480, 30321, 30325, 10006, 64901], [57367, 10006, 64901, 30321, 30325, 14624, 61401, 30243, 14624, 61401, 30321, 30325, 57367, 10006, 64901], [62995, 4015, 62638, 64946, 30321, 30325, 3339, 7703, | |
30243, 3339, 7703, 30321, 30325, 62995, 4015, 62638, 64946], [10035, 9470, 8711, 30321, 30325, 3339, 7703, 30243, 3339, 7703, 30321, 30325, 10035, 9470, 8711], [62427, 643, 643], [6952, 14674, 10728], [10851, 10827, 14674, 10728], [30263, 30266, 30246, 30248, 30256, 30256, 30267], [30257, 30266, 30262, 30259, 30321, 30325, 30248, 30256, 30256, 30267, 30243, 30248, 30256, 30256, 30267, 30321, 30325, 30257, 30266, 30262, 30259], [12150, 2272, 11 |
View pinyin.txt
bɑ bo bɑi bei bɑo bɑn ben bɑnɡ benɡ bi bie biao biɑn bin binɡ bu | |
pɑ po pɑi pei pɑo pou pɑn pen pɑnɡ penɡ pi pie piao piɑn pin pinɡ pu | |
mɑ mo mɑi mei mɑo mou mɑn men mɑnɡ menɡ mi mie miao miu miɑn min minɡ mu | |
fɑ fo me fei fou fɑn fen fɑnɡ fenɡ fu | |
dɑ de dɑi dei dɑo dou dɑn den dɑnɡ denɡ donɡ di dia die diao diu diɑn dinɡ du duo dui duɑn dun | |
tɑ te tɑi tei tɑo tou tɑn tɑnɡ tenɡ tonɡ ti tie tiao tiɑn tinɡ tu tuo tui tuɑn tun | |
nɑ ne nɑi nei nɑo nou nɑn nen nɑnɡ nenɡ nonɡ ni nie niao niu niɑn nin niɑnɡ ninɡ nu nuo nuɑn nü nüe | |
lɑ le lɑi lei lɑo lou lɑn lɑnɡ lenɡ lonɡ li lia lie liao liu liɑn lin liɑnɡ linɡ lu luo luɑn lun lü lüe | |
ɡɑ ɡe ɡɑi ɡei ɡɑo ɡou ɡɑn ɡen ɡɑnɡ ɡenɡ ɡonɡ ɡu ɡuɑ guo ɡuɑi ɡui ɡuɑn ɡun ɡuɑnɡ | |
kɑ ke kɑi kɑo kou kɑn ken kɑnɡ kenɡ konɡ ku kuɑ kuo kuɑi kui kuɑn kun kuɑnɡ |
OlderNewer