Skip to content

Instantly share code, notes, and snippets.

View neptunius's full-sized avatar
🌈

Alan Davis // Rainbow neptunius

🌈
View GitHub Profile
@neptunius
neptunius / The-Four-Frames-of-Leap.loop
Last active October 4, 2015 02:05
The Four Frames of Leap.loop
Peter and I started prototyping what multiple device support would look like in LeapJS with skeleton tracking and ended up at this wild callback with quadruply-nested for-loops:
Leap.loop ->
for frame in arguments
for hand in frame
for finger in hand
for joint in finger
drawSphere joint.position
@neptunius
neptunius / EggBalancing.py
Created May 5, 2011 20:21
Python solution to the Egg-Balancing Puzzle I invented.
#!python
## Egg-Balancing Puzzle
## Alan Davis - 5/4/2011
from __future__ import division # to ensure true division
import sys # to read input from standard input
import json # to decode input in JSON format
## Attempt to balance the given egg carton
def balance_carton(width, height, eggs):