This file contains 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 | |
# -*- coding: gb2312 -*- | |
# $Id$ | |
import os, sys, cProfile | |
from wsgi_handler import application | |
def wsgi(): | |
environ = dict(os.environ.items()) | |
environ.update({ |
This file contains 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 | |
import sys, hashlib | |
m = hashlib.md5() | |
with open(sys.argv[1], "rb") as fp: | |
for chunk in iter(lambda :fp.read(128 * m.block_size), ""): | |
m.update(chunk) |
This file contains 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 | |
# -*- coding: utf8 -*- | |
import web | |
import gevent | |
from gevent import queue | |
from gevent.timeout import Timeout | |
from gevent.hub import Waiter | |
from gevent.pywsgi import WSGIServer | |
from gevent import monkey |
This file contains 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 absolutizeURL(url){ | |
var img = document.createElement("img"); | |
img.src = url; // set string url | |
url = img.src; // get qualified url | |
img.src = null; // no server request | |
return url; | |
} |
This file contains 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 | |
# -*- coding: utf8 -*- | |
import os | |
import sys | |
import subprocess | |
environ = { | |
"QUERY_STRING": "name=juven", | |
"REQUEST_METHOD": "GET", |