I was looking for Python "sequence generator" code earlier today. By that, I'm thinking of a method to increment an arbitrary string of letters and numbers in an orderly way.
I figured there should be code samples out there to make quick work of it, but it was more challenging to find something than expected. Part [...]
by Scott Carpenter on 20 November 2009 at 10:31 pm
permalink |
comments (none) | filed under tech
tagged: code, python
This isn't really specific to WordPress, but it preserves the first comment for WordPress theme management, WordPress is awesome, and I'm specifically using this for WordPress style sheets, so I'm making the connection.
I wrote this script to condense my style sheets into smaller files for faster download times. I'm all about customer service here.
And [...]
by Scott Carpenter on 15 November 2009 at 10:58 am
permalink |
comments (none) | filed under tech
tagged: code, css, python
I was reading slashdot yesterday and some (inane) comments about people's user ID numbers made me curious about the overall distribution of IDs in slashdot discussions. It didn't take long to take what I'd learned about the Beautiful Soup screen-scraping library from writing my Twitter status backup script to get some simple information.
Here's a quick [...]
by Scott Carpenter on 27 June 2009 at 12:57 pm
permalink |
comments (none) | filed under tech
tagged: code, python
More fun with Python and regular expressions. Following up on a previous post, I wanted to share a little test regex function I wrote in Python to help me as I work through the regular expression book.
I'm mostly working at the interactive prompt and had been running commands from Python re (the regex module) [...]
by Scott Carpenter on 29 March 2008 at 10:34 am
permalink |
comments (2) | filed under tech
tagged: code, python, regex
An objection I've had to many programming books and web sites is that they don't make sample code available under a free software license. This is within the rights of the author, of course, but it seems counter to the spirit of teaching and sharing knowledge to restrict the use of example code.
A writer [...]
by Scott Carpenter on 14 September 2007 at 3:15 pm
permalink |
comments (none) | filed under free software
tagged: artificial intelligence, books, code, gpl, java
To celebrate this great day, here's a little bit of free software, released under the terms of the GNU General Public License, version 3: a Java class I wrote to find all permutations for a given string. I may later post some more in the way of documentation, but for now, por ejemplo:
PermutationIterator p [...]
by Scott Carpenter on 29 June 2007 at 11:23 pm
permalink |
comments (4) | filed under free software
tagged: code, java
Or maybe you just want to tar up only directories and subdirectories, excluding files...
I've mentioned a few times lately that I'm working on my backup plan for GNU/Linux. I started by looking at great free software tools like Samba's rsync and GNU Tar, and I don't think I need to look much further than [...]
by Scott Carpenter on 15 April 2007 at 10:00 pm
permalink |
comments (24) | filed under tech
tagged: bash, code