Skip to content

Instantly share code, notes, and snippets.

View cftang0827's full-sized avatar
🏠
Playing~

Paul Tang cftang0827

🏠
Playing~
View GitHub Profile
@cftang0827
cftang0827 / gist:35b12be7133a36a3cc7d5dabbdc52762
Created July 9, 2018 07:00 — forked from thinkphp/gist:1450738
Binary Search Tree implementation in Python
'''
by Adrian Statescu <[email protected]>
Twitter: @thinkphp
G+ : http://gplus.to/thinkphp
MIT Style License
'''
'''
Binary Search Tree
------------------
@cftang0827
cftang0827 / function_time.py
Last active July 3, 2018 06:31
The simple code that help you to estimate the computing time of the target function and get the same return value compare with origin function
def function_time(func, arg=()):
'''
The simple code that can estimate the computing time of the function and
return the same output of original one
:param func: The reference of the function you may want to estimate time
:param arg: The arguments of function, the default is ()
:return: Return original output of the function
'''
t1 = timeit.default_timer()