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 | |
### | |
### Concurrent pymongo inserts | |
### | |
import eventlet | |
pymongo = eventlet.import_patched('pymongo') | |
### Setup database connection |
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 inspect | |
import copy | |
### | |
### Options Classes | |
### | |
class DocOptions(object): |
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 | |
# Example for reading from the Twitter streaming API using pycurl | |
# | |
# PyCurl is not installed by default so install it like this: | |
# | |
# pip install pycurl | |
# | |
# The streaming api methods are documented here: |
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 xcrun swift | |
class Board { | |
let b = -1 // a blank, written as b so the board below looks nice | |
let hborder = "-------------\n" | |
let vborder = "|" | |
let width = 9 | |
let height = 9 | |
var board: [[Int]] | |
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 | |
### Requires latest boto (cuz I checked in code to boto a moment ago) | |
import uuid | |
from boto.mturk.connection import MTurkConnection | |
from boto.mturk.question import Question, QuestionForm, QuestionContent | |
from boto.mturk.question import AnswerSpecification, FreeTextAnswer | |
from boto.mturk.question import Overview | |
#from boto.mturk.qualification import Qualifications # these exist! |
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
from tobin.querysets import RedisQuerySet | |
from schematics.models import Model | |
from schematics.types import StringType, IntType | |
class SomeModel(Model): | |
s = StringType() | |
i = IntType() |
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 | |
from brubeck.servers.web import WebServer | |
from brubeck.handlers.web import WebMessageHandler | |
from brubeck.connections import WSGIConnection | |
from brubeck_templates.plugins import Jinja2Plugin | |
import sys | |
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
# Subject: Round 26, Wait, really? | |
Tonight was great. The hacks were awesome. The crowd was awesome. | |
But I wanna talk about something serious for a moment. | |
There has been a surge of interest in Hack And Tell and we're not great about handling it yet. The reality is that this community has turned into something bigger and better than we expected and we're learning how to organize it as we go. It was initially a group of 20 of us just hanging out at meetup's offices, where gWoz (Andrew, or GNU Woz which is also Andrew) worked at the time. I'd present twice, he'd present twice, and maybe a couple other folks would show something. | |
Andrew and I both grew up in punk rock communities, where people did whatever they wanted and everyone just accepted it. If you wanted anyone to care about what you were doing, you had to earn their eyes and their ears by doing something cool. Not too different from how our presenter list is made. We have ten slots to fill so we just pick the stuff we like best. If it's nea |
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
# Subject: Round 25, by Tom Clancy (RIP) | |
So, uh... I guess this email would've been easier to write last month. Especially since Mr. Clancy was alive then. | |
Initially, the name was to joke around with how dramatic things sound if you say they're by Tom Clancy. "The Snow Was Falling, By Tom Clancy", and now you're thinking about snow landing on top of a crashed fighter jet on Christmas. | |
I guess we'd have a fallen drone and some sad operator. "This is where I lost J2D2 2. The first one was in Dumbo, on a dark and stormy night." | |
What am I even talking about? |
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 csv | |
import json | |
# Get graffiti_locations.csv from: | |
# https://nycopendata.socrata.com/Social-Services/Graffiti-Locations/2j99-6h29? | |
filename = 'graffiti_locations.csv' |
NewerOlder