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
from sub import * | |
import sys | |
import os | |
import types | |
import traceback | |
import gc | |
import signal | |
import errno |
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 log() | |
{ | |
local msg=$1 | |
now=`date "+%Y-%m-%d %H:%M:%S"` | |
i=${#FUNCNAME[@]} | |
lineno=${BASH_LINENO[$i-2]} | |
file=${BASH_SOURCE[$i-1]} | |
echo "${now} ${file}:${lineno} ${msg}" |
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
import time, functools | |
def timeit(func): | |
@functools.wraps(func) | |
def __do__(*args,**kwargs): | |
start = time.time() | |
result= func(*args,**kwargs) | |
print '%s used time %ss'%(func.__name__,time.time()-start) | |
return result | |
return __do__ |
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
javascript: (function n(e){e.eq(0).fadeIn(99,function(){n(e.slice(1))})})($(":visible").hide()) |
NewerOlder