Skip to content

Instantly share code, notes, and snippets.

Evan Muehlhausen evan2m

Block or report user

Report or block evan2m

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 gist:7434573
from resources import MyResource
res = MyResource()
res.get_resource_uri()
# returns ''
res.get_resource_uri()
# returns '/api/v1/myresource/'
@evan2m
evan2m / benchmark.py
Last active Jul 17, 2019
Benchmark counters in python
View benchmark.py
import timeit
from shakespeare import LETTERS, WORDS
if __name__ == '__main__':
# defaultdict
t = timeit.Timer(stmt="""
counter = defaultdict(int)
for k in LETTERS:
You can’t perform that action at this time.