Skip to content

Instantly share code, notes, and snippets.

View tclh123's full-sized avatar
💭
Be an artist

Harry Lee tclh123

💭
Be an artist
View GitHub Profile
@tclh123
tclh123 / frange2
Created November 22, 2012 15:50
"A faster range-like function that does accept float increments" from http://wiki.woodpecker.org.cn/moin/PyCkBk-1-16
def frange2(start, end=None, inc=1.0):
"A faster range-like function that does accept float increments..."
if end == None:
end = start + 0.0
start = 0.0
else: start += 0.0 # force it to be a float
count = int((end - start) / inc)
if start + count * inc != end:
# Need to adjust the count. AFAICT, it always comes up one short.
@tclh123
tclh123 / gist:2854092
Created June 1, 2012 18:08 — forked from zythum/gist:2848881
google收录的敏感词
@tclh123
tclh123 / 12306.user.js
Created January 7, 2012 07:03 — forked from quietlynn/12306.user.js
12306 Auto Query => A javascript snippet to help you book ticket
/*
12306 Auto Query => A javascript snippet to help you book tickets online.
Copyright (C) 2011 Jingqin Lynn
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes Sizzle.js