tailot's picture
thinking-python: reference implementation, corpus and gates
4bc63c7 verified
Raw History Blame Contribute Delete
318 Bytes
import hashlib
import time
def memo(items=[]):
keys = []
for item in items:
keys.append(item[0])
return keys
def expiry(hours: int):
return hours * 86400
def touch(entry):
if entry.get('warm'):
return entry['key']
return ''
def mark(entry):
return 'key ' + entry['key']