I hereby claim:
- I am samuelclay on github.
- I am samuelclay (https://keybase.io/samuelclay) on keybase.
- I have a public key whose fingerprint is 067A A5F2 BCFA A27D 952B 61E7 B83A 60E5 4AFB F343
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#include <Adafruit_NeoPixel.h> | |
#include "WS2812_Definitions.h" | |
#define PIN_A 9 | |
#define PIN_B 3 | |
#define PIN_C 2 | |
#define PIN_D 12 | |
#define PIN_E 10 | |
#define PIN_F 6 | |
#define LED_COUNT 43 |
class ImageOps: | |
"""Module that holds all image operations. Since there's no state, | |
everything is a classmethod.""" | |
@classmethod | |
def adjust_image_orientation(cls, image): | |
"""Since the iPhone will store an image on its side but with EXIF | |
data stating that it should be rotated, we need to find that | |
EXIF data and correctly rotate the image before storage.""" | |
var RadixTrie = function(words) { | |
this.T = {}; | |
this.initialize(words); | |
}; | |
RadixTrie.prototype = { | |
initialize: function(words) { | |
var self = this; | |
words = words || []; |
(ns radix | |
(:require [clojure.string :as string])) | |
(use 'clojure.java.io) | |
(use 'clojure.pprint) | |
(println "Loading names... ") | |
(time (def names | |
(with-open | |
[rdr (reader | |
"/usr/share/dict/ProperNames")] |
>>> import feedfinder | |
>>> feedfinder.feed('http://theverge.com') | |
'http://theverge.com/rss/index.xml' | |
>>> import feedparser | |
>>> fp = feedparser.parse('http://theverge.com/rss/index.xml') | |
>>> fp | |
{'feed': {}, 'status': 200, 'bozo': 1, 'headers': {'status': '200 OK', 'content-length': '19383', 'via': '1.1 sbnation.com', 'content-encoding': 'deflate', 'vary': 'Accept-Encoding', 'x-runtime': '578', 'connection': 'Keep-Alive', 'etag': '"fd2f3a5b33a1a706fea1dec62ad25df3"', 'cache-control': 'private, max-age=0, must-revalidate, private, max-age=0, must-revalidate', 'date': 'Fri, 04 Nov 2011 00:06:59 GMT', 'p3p': 'CP="CAO DSP COR CURa ADMa DEVa PSAa PSDa CONi OUR IND PHY ONL UNI COM NAV INT CNT STA"', 'content-type': 'application/xml; charset=utf-8'}, 'etag': u'"fd2f3a5b33a1a706fea1dec62ad25df3"', 'href': u'http://www.theverge.com/rss/index.xml', 'entries': [], 'bozo_exception': error('Error -3 while decompressing data: incorrect header check',)} | |
>>> fp.entries | |
[] |
There's nothing to do so you just stay in bed / (oh / poor thing) / Why live in the world when you can live in your head? / Oh / And you can go out late from Monday / till Saturday turns into Sunday / and now you're back here at Monday / so you can do it all over again / And we go ah/ah/ah... / I want a refund / I want a light / I want a reason / to make it through the night / All right / And so you finally left school / so now what are you going to do? / Now you're so grown up / yeah / O h / ah / ah / Oh / so mature / Going out late from Monday / chuck up in the street on Sunday / you don't want to live till Monday / and have to do it all over again / And you go ah/ah/ah... / I want a refund / I want a light / I want a reason / for all this night after night after night after night / Oh / I know that it's stupid but I just can't seem to spend a night at home / 'cause my friends left town / and I'm here all alone / Oh oh / Yeah / They say the past must die / for the futur e to be born / In that case / die / l |
Day job: Engineer at Tasty Labs, on a Python/Tornado stack
Favorite Python project: NewsBlur, my visual RSS feed reader written entirely in Python on the backend. Uses a 100% python distributed feed fetcher that makes use of celery, mongoengine, pymongo, and Django. Entirely on GitHub: http://github.com/samuelclay/NewsBlur
Favorite Conference: Djangocon, where everybody knows they might the right decision to go Python.
Python Experience Level: Somewhere between expert and way out of my element.
var someSet = Backbone.Collection.extend({ | |
model : someModel, | |
constructor : function() { | |
this.bind('change', _.bind(function() { | |
onModelChange(); | |
}, this); | |
} | |
}); | |
someModelInstance.set('key', 'value'); // Triggers a `change` that `someSet` will see. |