Skip to content

Instantly share code, notes, and snippets.

View Scinawa's full-sized avatar
🎯
Focusing

Alessandro Luongo Scinawa

🎯
Focusing
View GitHub Profile
sync && echo 3 > /proc/sys/vm/drop_caches
sysctl -w vm.drop_caches=3
from datetime import datetime
def with_list(iterable):
t0 = datetime.now()
first, rest = iterable[0], iterable[1:]
t1 = datetime.now()
return (t1-t0).total_seconds()
def with_extended(iterable):