I hereby claim:
- I am andrewpurcell on github.
- I am drubi (https://keybase.io/drubi) on keybase.
- I have a public key ASDBDtd2nT2kuQTyyl3hnyNczz13PlKlUUQM7Xi74kO_Hgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
require 'test/unit' | |
class Node | |
attr_accessor :val, :left, :right | |
def initialize val | |
@val = val | |
end | |
def >(other) | |
@val > other.val |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
SELECT * FROM | |
( | |
SELECT DISTINCT comfortfeedback.PersonID, | |
COUNT(comfortfeedback.PersonID) as c, | |
people.name, | |
people.email | |
FROM comfortfeedback, people | |
WHERE comfortfeedback.TimeStamp >= DATE('2012-3-26') | |
AND people.PersonID = comfortfeedback.PersonID GROUP BY PersonID | |
) as t1 |
#!/usr/bin/env ruby | |
require_relative 'mips' | |
def debug | |
return false unless ARGV[1].eql? "debug" | |
true | |
end | |
mips = Assembler.new(ARGV[0]) |
#!/usr/bin/env ruby | |
# | |
# mips.rb - a class for working with MIPS assembly code | |
# in ruby. Provides an assembler to translate | |
# non floating point operations to machine code. | |
# | |
# Andrew Purcell, Tufts University | |
# EE126: Computer Engineering, Fall 2011 | |