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 python2.7 | |
#-*- coding: utf-8 -*- | |
# | |
# Authors: | |
# Pablo Enfedaque <pev@tid.es> - 2014 | |
# | |
""" | |
Performance comparison of MongoDB operations | |
""" |
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 | |
def memoize(fn): | |
""" Memoization decorator for a function taking one or more arguments. | |
NOTE: Only hashable values can be given as arguments to the function. | |
http://code.activestate.com/recipes/578231-probably-the-fastest-memoization-decorator-in-the-/#c4 | |
""" | |
class memodict(dict): |
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: utf-8 -*- | |
u""" | |
Created on May 15, 2013 | |
@author: pablito56 | |
@license: MIT | |
@contact: pablito56@gmail.com |