This site is not intended as a reference for best coding practices or universally useful scripts, but rather, a collection of examples of the kinds of small, mundane tasks that we can try to program for, and the (often sloppy) design decisions and compromises that go into such one-off work.
The source code of the scripts is included – because, why not? – but they aren’t guaranteed to work as-is, so you copy-paste-execute at your own risk.
Working with data that comes from an Excel spreadsheet.
In many real world situations, data is not only dirty, it's not even put together in a single file.
Get latitude and longitude, and other Google geodata, for any given location.
Get HTTP status code for any given link
Find the text pattern that indicates a Twitter handle and feed it to the API.
Not quite as good as git, but better than hand-naming files yourself.
A workflow for writers who use Microsoft Word but want to post to the Web.
Take a basic snapshot of a webpage and the stylesheets and images used in its visual presentation.
Control what happens to an image file after a screenshot is taken
The problem with non-browser tools is that, well, they don't act like browsers. "Headless" programs provide some of the functionality of a full-fledged web browser for automated systems (such as testing, or mass screenshot grabbing)
Get the most important information about a Socrata dataset.
Another example of doing something you've already done -- finding the information about a photo -- but doing it via API
You remember documenting a website by taking screenshots. But how do you search by text?
Do a last-second sweep of embarrassing words and phrases
An exercise in scraping and parsing HTML about criminal justice events.
Find the text pattern that indicates a Twitter handle and feed it to the API.
A command-line tool for getting the URL and metadata given a Flickr URL.
Put some markers on a map and customize it
Just how do they make those Flipboard/Twitter/Facebook previews anyway
Use Python's Pillow library to calculate the proper dimensions for a resized image.
Gather up and filter your emails programmatically.
Make it easy to use information about Chicago and its geographies. Because sometimes you just need to loop through a list of Chicago neighborhoods.
Archive tweets with a certain hashtag to a database
Mostly a lot of combining text files together
A canonical single-page web-scraping example, focused on wrangling not-quite-ideal HTML into tidy data.
A mini-project to collect California school data, using a variety of mundane programming scripts and libraries.
A demonstration of working with multiple CSV files programatically
A demonstration of working with multiple CSV files programatically