#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.
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 |
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} |
=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 |
# 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, |
require 'open-uri' | |
require 'nokogiri' | |
require 'pp' | |
require 'json' | |
# currently hardcoded for the MWRC event | |
def pull_players(team_code) | |
doc = Nokogiri::HTML(open("http://www.quidditch-reference.com/tournament/160/#{team_code}")) | |
rows = doc.xpath("//table//tr[position() > 1]") | |
team_name = doc.css("h2")[0].children[3].to_s |
# Given an appshopper url, find the most recent price drop | |
# author: David Brownman | |
# www: davidbrownman.com | |
# NOTE: the clipboard module is unique to pythonista. | |
import clipboard | |
import feedparser | |
import re | |
import webbrowser |
class Fixnum | |
def dance | |
puts "I'M THE BEST DANCER" | |
end | |
end |
class InvalidIdError < RuntimeError | |
end | |
def convert_to_18(id) | |
if id.nil? | |
return nil | |
elsif id.size != 15 | |
puts "INVALID ID: #{id}" | |
raise InvalidIdError | |
end |
require 'sinatra' | |
require 'json' | |
get '/' do | |
'Hello, World!' | |
end | |
get '/data' do | |
{name: 'Sean', age: 24}.to_json | |
end |