Skip to content

Instantly share code, notes, and snippets.

TonyXia 0xtonyxia

Block or report user

Report or block 0xtonyxia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View MidpointLruCache.py
class MidpointLruCache:
def __init__(self, size, oldpercentage):
self.size = size
self.oldsize = size * oldpercentage / 100
self.youngsize = size * (100 - oldpercentage) / 100
self.youngitems = collections.OrderedDict()
self.olditems = collections.OrderedDict()
def __call__(self, func):
You can’t perform that action at this time.