Tuesday, May 14, 2013
Nothing fancy here, but I’m forgetful. More a checklist than a recipe, but it’s also my only meal in regular rotation that feels pretty fail-safe:
- Get a ~4lb whole chicken
- Put a lot of pepper and garlic powder on it, also some salt and lemon zest
- Cook on stovetop briefly, just until color starts to change
- Set the chicken on a cooking sheet, put a head of garlic inside, surround with maybe brussels sprouts, sweet potatoes, chopped onions, and more garlic
- Cook at 375 for 1hr and 15mins
Thursday, April 25, 2013
pip is a package manager for Python modules; virtualenv turns a given directory tree into an isolated Python environment so you can use different module versions for different projects on the same machine. They really go hand-in-hand, and I realized pretty quickly that they’re more or less mandatory if you’re working on multiple projects in Python. This guide explains both modules and the setup process super well — below is a quick-and-dirty reference for feeling out your Python environment and then getting up and running.
While not strictly necessary, I’d like to see which modules I have installed by default. So in terminal:
pydoc modules
Okay, no pip (which is itself just a Python module). To install it, we can use the older, creakier, and not-particularly-recommended package manager, easy_install. This is fine for grabbing pip, but you don’t really want to use it for anything else. (This may require sudo.)
[sudo] easy_install pip
We could use this installation of pip to install modules globally (which may require sudo too)
[sudo] pip install [module]
but we’re probably not looking to do that too often. Instead, just as we used the not-quite-recommended easy_install to grab a better tool, we’re going to use this global pip to grab virtualenv:
sudo pip install virtualenv
Now we can head to the directory where we want to work on our first project. I made a directory called pyground for fooling around, so I cd to that and enter
virtualenv env
This creates a new Python virtual environment inside the current directory, storing everything at your_directory_name/env/. Now (automatically packed in with your virtual environment!) you have a version of pip local to this environment, and this is what you’ll want to use to install a module to your working directory. To use this version of pip:
env/bin/pip install [module]
Note that you won’t have to use sudo here, because you’re not installing globally. You can check to see which modules you’ve installed via pip in this environment with
env/bin/pip freeze
And to run virtualenv’s local version of Python, you’ll use
env/bin/python
And that’s it. You can repeat this process for as many environments as you like. The walkthrough linked above offers a way to cut down on typing and temporarily make your shell recognize a given environment’s pips and pythons as the default, but I kind of prefer to type out the env/bins.
Tuesday, April 23, 2013
From Ezra Klein:
People talk a lot about media bias. Some say there’s a bias towards liberals or conservatives. Others say it’s towards
ostentatious even-handedness, or sensationalism. But one of the most dangerous media biases is simply the bias towards events,
sources and narratives that are easy for those of us in the media to cover.
Friday, April 19, 2013
First new plants of the season:

Don’t let me obliderate them.