Skip to content

Instantly share code, notes, and snippets.

View dvillega's full-sized avatar

Devin Villegas dvillega

View GitHub Profile
dvillega /
Created August 25, 2017 16:48 — forked from lucindo/
import time
# Simple Timer
class Timer:
def __init__(self):
def reset(self):
self._start = time.time()
def elapsed(self): # elapsed time in seconds (float)
dvillega /
Created August 25, 2017 16:47 — forked from lucindo/
# Helper class for statistics
# see:
class Stats:
""" Uses Welford's method to calculate stats.
Assumes positive values.
It's not thread safe
stats = Stats("ConnectionTimeStats")
dvillega / 0_reuse_code.js
Created March 2, 2016 16:49
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Keybase proof

I hereby claim:

  • I am dvillega on github.
  • I am dvillega ( on keybase.
  • I have a public key whose fingerprint is 813C C62F 8B0F 9FCE C15C C555 110E 9C81 595C 23D6

To claim this, I am signing this object: