I hereby claim:
- I am bosswissam on github.
- I am bosswissam (https://keybase.io/bosswissam) on keybase.
- I have a public key ASBFsCO1ewPVUnKwET9gTU_LVnga1Gj-3eIvzPZOpd9D-go
To claim this, I am signing this object:
import json | |
import tornado.ioloop | |
import tornado.web | |
DB = dict() | |
class BaseHandler(tornado.web.RequestHandler): | |
def validate_input(self): | |
if not isinstance(self.json_args.get('key'), str): |
I hereby claim:
To claim this, I am signing this object:
import sys | |
def get_size(obj, seen=None): | |
"""Recursively finds size of objects""" | |
size = sys.getsizeof(obj) | |
if seen is None: | |
seen = set() | |
obj_id = id(obj) | |
if obj_id in seen: | |
return 0 |
import sys | |
def get_size(obj): | |
size = 0 | |
if isinstance(obj, dict): | |
size+= sum([get_size(v) for v in obj.values()]) | |
size+= sum([get_size(k) for k in obj.keys()]) | |
elif hasattr(obj, '__dict__'): | |
size+= get_size(obj.__dict__) | |
elif hasattr(obj, '__iter__'): |