the reality tunnelhttp://blogs.terrorware.com/geoff
confluenceWed, 20 Sep 2017 13:33:19 +0000en-UShourly1https://wordpress.org/?v=4.7.666823015Setting environment variables in a Python virtualenv from a .env filehttp://blogs.terrorware.com/geoff/2017/02/28/setting-environment-variables-in-a-python-virtualenv-from-a-env-file/
http://blogs.terrorware.com/geoff/2017/02/28/setting-environment-variables-in-a-python-virtualenv-from-a-env-file/#respondTue, 28 Feb 2017 20:14:56 +0000http://blogs.terrorware.com/geoff/?p=2978Lately, I’ve gotten into the practice of storing configuration in environment variables and keeping those in a .env file in the root of my project directory.

This file contains simple environment variable assignment and is used by Heroku and Docker.

However making sure these environment variables get set for any command being run in the development environment.

I often work in Python virtual environments, so putting the shell commands in the postactivate and postdeactivate scripts makes sense to me.

To set environment variables in postactivate:

#!/bin/bash
# This hook is sourced after this virtualenv is activated.
cd ~/workspace/scrape-represent-statements
set -a
source .env
set +a

Muncie Girls – From Captain to Belsize

]]>http://blogs.terrorware.com/geoff/2016/03/01/music-for-early-march/feed/02962Upgrading Homebrew-installed Postgres 9.3 to 9.5http://blogs.terrorware.com/geoff/2016/02/08/upgrading-homebrew-installed-postgres-9-3-to-9-5/
http://blogs.terrorware.com/geoff/2016/02/08/upgrading-homebrew-installed-postgres-9-3-to-9-5/#respondMon, 08 Feb 2016 20:14:53 +0000http://blogs.terrorware.com/geoff/?p=2954I didn’t read the instructions when I let PostgreSQL get upgraded from 9.3 to 9.5 with brew upgrade. This is what I had to do to migrate my data after I had already upgraded:

]]>http://blogs.terrorware.com/geoff/2016/02/08/upgrading-homebrew-installed-postgres-9-3-to-9-5/feed/02954Shows!http://blogs.terrorware.com/geoff/2015/11/07/shows/
http://blogs.terrorware.com/geoff/2015/11/07/shows/#respondSat, 07 Nov 2015 19:54:26 +0000http://blogs.terrorware.com/geoff/?p=2931I played three different shows, with three different bands in 48 hours. So different playing for a handful of folks below the Loyola Red Line, in a crowded basement and on a giant stage. It was a hectic weekend, but ultimately, after the dust settled, I feel lucky to get to do all this.

Defiance, Ohio playing at the Fest, 2015. Photo by @jimmyvague (https://instagram.com/p/9mUK8Ast-n/)

“Rabbit Bucket” playing next to the Loyola Red Line. Photo by Roberta.

Defiance, Ohio playing at the Fest, 2015. Photo by @waxwingsmusic (https://instagram.com/p/9lpvX3C-yj/)

]]>http://blogs.terrorware.com/geoff/2015/11/07/shows/feed/02931Property tax increases and rentershttp://blogs.terrorware.com/geoff/2015/11/07/property-tax-increases-and-renters/
http://blogs.terrorware.com/geoff/2015/11/07/property-tax-increases-and-renters/#respondSat, 07 Nov 2015 18:56:57 +0000http://blogs.terrorware.com/geoff/?p=2928There’s been a lot of coverage of the mayor’s property tax increase, and some provisions to reduce the burden on low-to-moderate income homeowners. My first thought went to renters, though:

Mick Jenkins – Wave[s]

Mother Cyborg – Tough Femme Mix

Aye Nako – White Noise

Dixon elaborated on the song, saying it’s about how “whiteness is centered in everything, how it taught me to hate myself for being black, how when I was a kid I used to pray to God that I could be white… how it scares me that white supremacy doesn’t even need white people to perpetuate it.”

Tunde Olaniran – Transgressor

Blurb – MUSHGUSH

Gold Paint Boy – little engine

]]>http://blogs.terrorware.com/geoff/2015/08/14/new-music-for-early-august-2/feed/02862Programmatically reshaping datahttp://blogs.terrorware.com/geoff/2015/07/15/programmatically-reshaping-data/
http://blogs.terrorware.com/geoff/2015/07/15/programmatically-reshaping-data/#respondWed, 15 Jul 2015 16:09:24 +0000http://blogs.terrorware.com/geoff/?p=2852Yesterday at work, my coworker needed to reshape a data table, from CSV. The data was a time series, with one row per date. He wanted to reshape the data so there was one row per day of the year with a column for the desired variable for each year. He observed that there were 93 distinct days of the year for each year and used some clever Excel functions and auto-fills to do this in about 5 minutes. I spend considerably more time figuring out how to do this in PostgreSQL, Python and R.

On Monday, July 13, 2015, Chicago Public Schools (CPS) released preliminary spending plans for the 2015-2016 school year. Many schools face significant budget cups. We made a simple [news app to let users explore how different school budgets changed](http://apps.chicagotribune.com/news/local/cps_school_budgets/).