Skip to content

Instantly share code, notes, and snippets.

@rdhyee
rdhyee / packer_example.sh
Created June 15, 2014 19:26
A configuration files for creating a lightly modified AMI for ubuntu 12.04LTS
# to get my credentials in place --> to create env vars with my key/secret
source ~/ry_aws.sh
packer build \
-var aws_access_key=$AWS_ACCESS_KEY \
-var aws_secret_key=$AWS_SECRET_KEY \
packer_example_aws.json
<feed xmlns:dcterms="http://purl.org/dc/terms/" xmlns:opds="http://opds-spec.org/"
xmlns="http://www.w3.org/2005/Atom"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.kbcafe.com/rss/atom.xsd.xml"
xsi:schemaLocation="http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/2008/02/11/dc.xsd http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/2008/02/11/dcterms.xsd">
<title>Unglue.it Catalog -- 1 to 1 of 2000 -- crawlable feed</title>
<id>https://unglue.it/opds/crawlable</id>
<updated>2014-06-16T00:00:00Z</updated>
<link rel="start" href="https://unglue.it/opds" type="application/atom+xml;profile=opds-catalog;kind=navigation" />
<link rel="self" type="application/atom+xml;profile=opds-catalog;kind=acquisition" href="https://unglue.it/opds/crawlable"/>
@rdhyee
rdhyee / bart_calc.py
Last active August 29, 2015 14:02
bart calculation
import requests
import urllib
from datetime import timedelta
from lxml.etree import fromstring
from dateutil.parser import parse
from dateutil.tz import tzlocal
from pandas import DataFrame
@rdhyee
rdhyee / census_tracts.ipynb
Created April 23, 2014 22:35
ipython notebook for reading in shapefiles for 2010 and 2000 Census tracts for Alameda County
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdhyee
rdhyee / Vagrantfile
Last active August 29, 2015 13:59
a template Vagrantfile that adds ansible provisioning, along with accompanying ansible playbook. To run the ansible playbook: ansible-playbook -i .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory --private-key=~/.vagrant.d/insecure_private_key -u vagrant hello.yml
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@rdhyee
rdhyee / qis.yml
Created April 12, 2014 01:26
ansible playbook for installing QGIS on Ubuntu 12.04LTS
- hosts: vagrant_local
sudo: true
pre_tasks:
- name: check apt last update
stat: path=/var/cache/apt
register: apt_cache_stat
- name: update apt if needed
@rdhyee
rdhyee / tl_2010_06001_tract10_4ps.topo.json
Created April 7, 2014 23:04
topojson for Alameda County census tracts for 2010 (simplified)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdhyee
rdhyee / tl_2010_06001_tract10_4ps.geo.json
Created April 7, 2014 23:01
Alameda County census tracts for 2010 (simplified to 4% of original file)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdhyee
rdhyee / tl06001_bg.geo_30ps.topo.json
Created April 7, 2014 17:36
simplified topjson Census block groups for Alameda County
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdhyee
rdhyee / tl06001_bg.geo_30ps.json
Created April 7, 2014 17:02
Alameda County Block groups geojson (reduced to 30.8% by http://www.mapshaper.org/)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.