Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import csv | |
def MeanAveragePrecision(valid_filename, attempt_filename, at=10): | |
at = int(at) | |
valid = dict() | |
for line in csv.DictReader(open(valid_filename,'r')): | |
valid.setdefault(line['source_node'],set()).update(line['destination_nodes'].split(" ")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
r = csv.reader(open('train.csv','r')) | |
r.next() | |
edges = set() | |
#commutative_graph = dict() | |
for edge in r: | |
edges.add((edge[0], edge[1])) | |
# commutative_graph.setdefault(edge[0], set()).add(edge[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(u'A. Flaxman', u'Matthias Ekman', u'Miroslav Batchkarov', u'Michael Eickenberg') | |
(u'Abhijeet Kolhe', u'Alexander Fabisch', u'James Mcdermott', u'F\xe9lix-Antoine Fortin') | |
(u'Adrien Gaidon', u'Justin Pati', u'Rafael Cunha De Almeida', u'Raul Garreta') | |
(u'Alemagnani', u'Roman', u'Matti Lyra', u'Lqdc') | |
(u'Alex Companioni', u'Jakemick', u'Bogdan Trach', u'Miroslav Batchkarov') | |
(u'Alexander Fabisch', u'Alexander Fabisch', u'Miroslav Batchkarov', u'Bogdan Trach') | |
(u'Alexandre Abraham', u'Jan Hendrik Metzen', u'F\xe9lix-Antoine Fortin', u'James Mcdermott') | |
(u'Alexandre Gramfort', u'Gaelvaroquaux', u'Immanuel Bayer', u'Andy') | |
(u'Alexandre Passos', u'Nzer0', u'Miroslav Batchkarov', u'Bogdan Trach') | |
(u'Alexis Mignon', u'Jamestwebber', u'Jansoe', u'Eugene Nizhibitsky') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"date":"1-May-12", | |
"close":58.13 | |
}, | |
{ | |
"date":"30-Apr-12", | |
"close":53.98 | |
}, | |
{ |
Principles of Adult Behavior
- Be patient. No matter what.
- Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
- Never assume the motives of others are, to them, less noble than yours are to you.
- Expand your sense of the possible.
- Don’t trouble yourself with matters you truly cannot change.
- Expect no more of anyone than you can deliver yourself.
- Tolerate ambiguity.
- Laugh at yourself frequently.