Skip to content

Instantly share code, notes, and snippets.

View aaronj1335's full-sized avatar
🤠

Aaron Stacy aaronj1335

🤠
View GitHub Profile
@aaronj1335
aaronj1335 / prune.py
Last active December 19, 2015 15:39
remove elements that aren't ours
from xml.etree.ElementTree import Element, fromstring, tostring
from xml.dom import minidom
OUR_IDS = ['BMBOMB', 'FUKUSH', 'SYCLWR', 'HURSAN', 'COLSSD',
'PIRATE', 'EXXVAL', 'BFACTO', 'HAIEAR', 'AIDSHI',
'BOMBER', 'ABDALA', 'JOSHAZ', 'RENPRE', 'SYRIDE',
'BROBMA', 'POPEFR',
'THIOKL', 'GENELE', 'MARORG', 'NATOAA', 'TEPCOM',
@aaronj1335
aaronj1335 / settings.py
Created July 15, 2013 02:10
the settings.py file we used for phase 1 of our cs373 project.
# Django settings for crisis project.
import sys
import os
from django.core.urlresolvers import reverse
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
DEBUG = True
@aaronj1335
aaronj1335 / .gitignore
Last active December 20, 2015 21:59
read the README.md
*.html
.jshintrc
shared:
messageBody:
tagABSegment: "Tag this A/B Split as"
removeButtonTitle: "Remove"
addSegment: "Add A/B Split"
metadata:
select: "Select metadata field ..."
enterTagValue: "Enter Tag Value"
geoZipcode: "ZIP Code"
geoRadius: "Radius in Miles"
mixin sel(value, options)
select(data-bind='value: ' + value + ', options: ' + options)
.foo
+sel('data().query.type', 'queryTypeOptions')
App.ApplicationAdapter = DS.RESTAdapter.extend({
host: 'https://api.github.com',
headers: {
authorization: 'basic ' + btoa(username + ':' + password)
},
serializer: DS.RESTSerializer.extend({
extractArray: function (store, primaryType, payload) {
var o = {};
o[this.pluralize(primaryType.typeKey)] = payload;
return this._super(store, primaryType, o);
2,4c2
< "campaign": {
< "id": null
< },
---
> "campaign": null,
26c24
< "startDateTime": "Mon Sep 23 9:00:51 -0500 2013",
---
> "startDateTime": "Mon Sep 23 09:00:51 CDT 2013",
@aaronj1335
aaronj1335 / README.md
Last active December 23, 2015 22:29 — forked from mbostock/.block
u fill in the rest

org chartz!

var byline = require('byline');
var stream = require('stream');
function MyTransform1() {
stream.Transform.apply(this, arguments);
}
MyTransform1.prototype = stream.Transform.prototype;
MyTransform1.prototype._transform = function(chunk, encoding, done) {
this.push(chunk.toString().toUpperCase());
done();
define([
'msgme/user-preferences'
], function(userPreferences) {
describe('user preferences', function () {
afterEach(function () {
userPreferences.clear();
});
describe('module', function () {
it('is a function that returns a promise', function () {