Python
-
Python: Extracting Excel spreadsheet into CSV files
I’ve been playing around with the Road Safety open data set and the download comes with several CSV files and…
Read More » -
Python: Converting WordPress posts in CSV format
Over the weekend I wanted to look into the WordPress data behind this blog (very meta!) and wanted to get…
Read More » -
The Clash of Template and Delegate Patterns
Back in my delegate decorator article, I mentioned some weaknesses of the delegate pattern as a substitute to inheritance. The…
Read More » -
Strategy Pattern Sans Objects and Functions
As many of my readers will likely know, my favorite design pattern is the Decorator Pattern, but I don’t think…
Read More » -
Python: Look ahead multiple elements in an iterator/generator
As part of the BBC live text scraping code I’ve been working on I needed to take an iterator of…
Read More » -
Python Decorator for Simplifying Delegate Pattern
Recently, I posted about how you can use composition instead of inheritance, and in that article, I mentioned the Delegate…
Read More » -
Python: Refactoring to iterator
Over the last week I’ve been building a set of scripts to scrape the events from the Bayern Munich/Barcelona game…
Read More » -
Read-Only Properties in Python
Python descriptors are a fairly powerful mechanic, especially for creating properties. The built-in property descriptor/decorator works very well for defining…
Read More » -
Python: Selecting certain indexes in an array
A couple of days ago I was scrapping the UK parliament constituencies from Wikipedia in preparation for the Graph Connect…
Read More »