Skip to content

Instantly share code, notes, and snippets.

View xavdid's full-sized avatar
🏠
Working from home

David Brownman xavdid

🏠
Working from home
View GitHub Profile
@xavdid
xavdid / tttc.py
Last active August 29, 2015 13:56
Neat tic tac toe variant!
# A of tic-tac-toe-ception written on an airplane
class TTT:
def __init__(self, n):
#stuff
# 0,1,2,
# 3,4,5,
# 6,7,8
self.board = [
0,0,0,
@xavdid
xavdid / README.md
Last active August 29, 2015 13:56
Shirt Bouncer

#Shirt Bounce

A simple Sinatra app that acts as a step for an IFTTT recipe that parses Paypal emails about shirt orders and puts them into a database.

Read more about it here.

The live version is here.

@xavdid
xavdid / rover.rb
Last active January 4, 2016 08:09
Mars Rover
=begin
### PROMPT ###
A squad of robotic rovers are to be landed by NASA on a plateau on Mars.
This plateau, which is curiously rectangular, must be navigated by
the rovers so that their on-board cameras can get a complete view of the
surrounding terrain to send back to Earth.
A rover's position and location is represented by a combination
@xavdid
xavdid / grader.py
Last active December 22, 2015 08:18
Quidditch test grader script
import csv
cr = csv.reader(open("Quidditch Rules Quiz (Responses) - Form Responses.csv","rb"))
cr.next()
answers = cr.next()
# print answers
results = {}
totals = {'C':18,'B':18,'S':23,'R':25}
@xavdid
xavdid / Pasta
Last active December 22, 2015 04:18
The amount of time it takes to cook pasta is dependent on the altitude of the cooking environment. In mountainous areas, for example, the amount of boiling time should be increased to compensate for the lower boiling point achieved by the water. In other circumstances, boiling time can be decreased if cooking at altitudes below sea level. While this is true, in theory, very few locations habitable by humans exist at such low altitudes that they make a significant impact on the boiling temperature of the water. Hypothetically, if one were to boil water in the Marianas trench, one would only need to cook pasta for a mere fraction of the time that one would at sea level. 
How does this phenomenon affect one's lifestyle? In the case of frequent pasta-boilers, such as David Brownman, cooks (term used loosely) should keep track of their altitude at every possible moment to ensure the most accurately cooked al dente pasta. It is for this reason, the board strongly recommends the mandatory installation of altimeters