Services
Find Stuff
Pages
Buy My Apps
Other Stuff I’ve Built
Book Club
Archives
- May 2018
- February 2014
- December 2013
- November 2013
- August 2012
- July 2012
- April 2012
- March 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
Categories
- Boxing (23)
- Energy (5)
- iPhone (142)
- Jack Handy (283)
- NaNoWriMo (3)
- People (11)
- Planet Microsoft (5)
- Projects (88)
- Python (43)
- Reelviews (13)
- Reverse Engineering (18)
- Six Word Stories (111)
- The Hard Way (3)
- Uncategorized (6)
- UNIX (8)
- Vacation Slides (30)
- Web stuff (51)
Blogroll
Category Archives: Python
Heaps
Heaps are slightly obscure data structures that underlie some common higher-level programming constructs, and that may come in handy if you find yourself solving certain classes of problems. (They also come up in certain types of programming interviews, which, to … Continue reading
Posted in Python
Comments Off
Turbo OAuth for Django
Presented for your consideration: an implementation of an OAuth server for Django. Aside from one application-specific piece it is production-ready, and you’re free to use it (and/or modify it) without restriction. I think it’s also worth a look if you’re … Continue reading
Posted in Python
Comments Off
Amateur Geometry
Editorial Note: This one is mostly for me. I want to record my solution to a puzzle so that I can throw out my notes. A few days ago I began to play with the Platonic solids. (I was fooling … Continue reading
NSURL, Trailing Slashes, and OAuth
Here’s a surprisingly important note from the documentation for the NSURL class’ path method: Return Value The path of the URL, unescaped with the stringByReplacingPercentEscapesUsingEncoding: method. If the receiver does not conform to RFC 1808, returns nil. If this URL … Continue reading
Django Project Layout
As a sort-of-followup to my brief remarks of last week, today I’m going to say a few words about how I lay out my Django projects, and how I configure the Apache server to present them. There’s nothing too surprising … Continue reading
OAuth and mod_wsgi
Just a quick tip: If you’re building an (e.g., Django) application that: Relies on mod_wsgi, and Acts as an OAuth server, and Relies on the HTTP Authorization header to pass OAuth parameters, then you need to ensure that you set … Continue reading
Posted in Python
Comments Off
Synchronization Efficiency Proof
Last Friday I described an algorithm that would generate lists of insert and delete operations which would transform a subject list s.t. it would match a target list. I wanted the algorithm to be efficient, both in terms of its … Continue reading
Posted in Python
Comments Off
Synchronizing Ordered Lists
How can two ordered lists be synchronized with the minimum of insert and delete operations, given that only those operations are allowed? Let’s take a cut at this problem, using Python lists for illustration. (Editorial note: There’s probably an elegant, … Continue reading
Posted in Python
Comments Off
District Scraping
Today, just a quick little project: Let’s use Python to extract Congressional Districts from web pages. This is mostly a regex demo.
Tuesday’s Child
John Derbyshire has posted an interesting problem/puzzle, discussed in some detail here. Briefly, the problem is this: A man says: “I have two children. One is a boy born on a Tuesday. What is the probability I have two boys?” … Continue reading
Posted in Python, The Hard Way
Comments Off