Entries Categorized as 'Programming'

Online Tool for Testing Regular Expressions

Date December 29, 2008 by Isaac

Today, while trying to get a particular regular expression to work I found an online tool to help me out.  What is particularly nice about this tool is that you can try multiple strings at a time against your regular expression.  Go check it out: http://www.fileformat.info/tool/regex.htm.
Link Summary

http://www.fileformat.info/tool/regex.htm

Using Mercurial on SourceForge

Date May 20, 2008 by Isaac

Lately I’ve been working on resurrecting a project, called Kollektor, that I have on SourceForge. Kollektor is a personal book collection manager that can fetch information from Amazon. It’s been a few years since I worked on it and in the mean time the Amazon interface has changed significantly. A couple days [...]

Cloning a List in Python

Date April 14, 2008 by Isaac

As far as I know there is no official way to clone a list in Python. This is desirable at times because normal variable assignment of lists is just a reference copy. For example:
 
>>> listA = [’A', ‘B’, ‘C’, ‘D’]
>>> listB = listA
>>> listA
[’A', ‘B’, ‘C’, ‘D’]
>>> listB
[’A', ‘B’, ‘C’, ‘D’]
>>> listA.remove(’C')
>>> listA
[’A', [...]

Turning a Multi-Line File Into a CSV File

Date April 10, 2008 by Isaac

Linux has many amazing programs that can be chained together to produce amazing results. Today I needed to turn a multi-line file into a CSV (comma separated) file. In Linux this is super easy:
cat file | tr ‘\n’ ‘,’
Basically, this will turn a file like this:
Line1
Line2
Line3
Line4
Into this:
Line1,Line2,Line3,Line4