Skip to content

Instantly share code, notes, and snippets.

View hampelm's full-sized avatar

Matt Hampel hampelm

View GitHub Profile
name geoid zip
Alameda 06001 94002
Alameda 06001 94010
Alameda 06001 94019
Alameda 06001 94025
Alameda 06001 94027
Alameda 06001 94061
Alameda 06001 94062
Alameda 06001 94063
Alameda 06001 94065
import React from 'react';
import { Text } from 'react-native';
import MapboxGL from '@mapbox/react-native-mapbox-gl';
import BaseExamplePropTypes from './common/BaseExamplePropTypes';
import Page from './common/Page';
import Bubble from './common/Bubble';
import sheet from '../styles/sheet';
import nycJSON from '../assets/nyc_geojson.json';
// MapTools Component
<View style={[styles.container, top && styles.top,]}>
<TouchableOpacity hitSlop={{ top: 8, left: 8, right: 8, bottom: 8, }} onPress={onPress}>
{children}
</TouchableOpacity>
</View>
// MapTools styles
export default StyleSheet.create({
import csv
import re
skiplines = ['RUN DATE', '36TH DISTRICT COURT', '421 MADISON AVENUE',
'DETROIT MI 48226', 'MATTHEW REPORT', 'Case Type', 'I01', 'NAME CASE NUMBER']
def skippable(line):
for phrase in skiplines:
if phrase in line:
var pg = require('pg');
var QueryStream = require('pg-query-stream');
var JSONStream = require('JSONStream');
queue = require('kue').createQueue();
pg.connect(function(err, client, done) {
if (err) throw err;
var query = new QueryStream(
'select address from voter_addr where status is null;',
);
### Keybase proof
I hereby claim:
* I am hampelm on github.
* I am matthampel (https://keybase.io/matthampel) on keybase.
* I have a public key ASCkfzLjedmSv5fbeMDd9hQZ5XU_UB2B90lIxODbfKKdaQo
To claim this, I am signing this object:
@hampelm
hampelm / boring_challenges.md
Last active July 17, 2017 15:37
Function problems

Write a function called logger that takes an argument and logs it out using console.log.

Write a function called addThree that adds 3 to any number.

Write a function called sum that takes two numbers as arguments and returns the result.

Make a new sumB function that takes three arguments: two numbers to add, and a third: a "callback" function. In your sum function, add the two

We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
"identifier"
"IRS990-2010-09"
"IRS990-2010-08"
"IRS990-2010-07"
"IRS990-2010-06"
"IRS990-2010-05"
"IRS990-2010-04"
"IRS990-2010-03"
"IRS990-2010-02"
"IRS990-2010-01"
# Create a new branch
# gb my-new-branch
alias gb='git branch'
# Create a new branch and switch to it
# gw a-different-new-branch
alias gw='git checkout -b'
# Commit changes
# gc "Fixed null-concat bug in renderer"
require 'mechanize'
require 'open-uri'
mechanize = Mechanize.new
base_url = 'http://tao.ndbc.noaa.gov/tao/data_download/'
all_buoys = 'TR8S95E.TR5S95E.TR2S90E.T0N85W.T8S95W.T5S95W.T2S95W.T0N95W.T5N95W.T2N95W.T10N95W.T8N95W.T12N95W.T8N110W.T5N110W.T2N110W.T1N110W.T8S110W.T5S110W.T2S110W.T1S110W.T0N108W.T0N111W.T0N110W.T8S125W.T2S125W.T0N125W.T5S125W.T2N125W.T5N125W.T8N125W.T7N132W.T5S140W.T2N140W.T0N140W.T2S140W.T5N140W.T9N140W.T7N147W.T8N155W.T5N155W.T2N155W.T2N157W.T0N155W.T1N153W.T0N152W.T1S153W.T8S155W.T5S155W.T2S155W.T8S170W.T2S170W.T0N170W.T5S170W.T2N170W.T5N170W.T8N170W.T0N176W.T8S180W.T5S180W.T5N180W.T2N180W.T2S180W.T0N180W.T8N180W.T0N170E.T1S167E.T8S165E.T5S165E.T2S165E.T0N165E.T2N165E.T5N165E.T8N168E.T8N167E.T8N165E.T0N161E.TR2S156E.TR5S156E.TR0N156E.TR2N156E.TR5N156E.TR8N156E.TR5N147E.TR0N147E.TR2N147E.TR0N138E.TR2N138E.TR5N137E.TR8N137E.TR2N130E.TR5N130E.TR8N130E'.split('.')
def get_file(url, file_name)