Skip to content

Instantly share code, notes, and snippets.

View jdoig's full-sized avatar

James Doig jdoig

  • Addepar
  • Edinburgh
View GitHub Profile
@jdoig
jdoig / gist:37b6f1fcf9840a8949d6
Last active August 29, 2015 14:06
WIP Tamigochi (about 50-60 mins in)
import sys
import time
from datetime import datetime, timedelta
from random import randint
STATES = {
'happy': lambda a: ('happy','prrrr') if not a else (
'sad', 'pffft'),
'hungry': lambda a: ('happy', 'nom') if a == 'feed' else (
'sad', "no I'm hungry!"),

Keybase proof

I hereby claim:

  • I am jdoig on github.
  • I am jamesdoig (https://keybase.io/jamesdoig) on keybase.
  • I have a public key whose fingerprint is 3969 9C8A C169 BB2D 80C1 C892 4DEB 3CFD B920 BBE0

To claim this, I am signing this object:

@jdoig
jdoig / 0_reuse_code.js
Created January 11, 2017 20:29
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