Archive for the 'work' Category
Thursday, May 21st, 2009
So we have some older Python code at work that uses old-style classes. We usually try and bring those up to date when we encounter them.
The other day one of the developers did that and one of our tests started failing. A simple change from:
class Foo:
# stuff here
to:
class Foo(object):
[...]
Posted in General, Python, Software, computing, work | 4 Comments »
Thursday, September 18th, 2008
I’ve been working from Starbucks for the past few days while we’ve been without power from the remnants of Ike. Sounds like I’m not alone:
http://www.cnn.com/2008/US/09/17/ike.recovery.starbucks/index.html
UPDATE: My sister saved me from another afternoon at Starbucks and put me up in a temporary office at KSU*. Hooray!
* My sister designed their website, btw.
Posted in General, work | 2 Comments »
Thursday, July 31st, 2008
So I’ve been programming with Python since 2001 and I’ve never had the need to do anything that the standard import system didn’t provide - until this week. We are planning on a little code reorganization for a project at work in preparation for collaboration from more developers. I wrote a simple custom [...]
Posted in General, Python, Software, computing, work | 2 Comments »
Wednesday, April 16th, 2008
I’m working on an OOXML implementation in Python and found this handy utility for converting docx files to rtf.
Docx2Rtf
It seems to open docx files that Word complains about, but at least it let’s me know that I am on the right track. Also, it runs under Wine on Linux, so there is no need [...]
Posted in General, Python, Software, computing, work | No Comments »
Saturday, April 12th, 2008
Since all the cool kids are doing it …
Work laptop
christian@yga-dowski:~$ history|awk ‘{a[$2]++ } END{for(i in a){print a[i] ” ” i}}’ |sort -rn|head
82 sudo
68 vim
51 ls
49 cd
48 exit
20 hg
16 rm
16 ipython
14 py.test
10 ping
Apparently I do a lot of exiting. I just started using Mercurial for local revision control, hence the presence of hg.
Dev server
(where [...]
Posted in General, Python, computing, work | 2 Comments »
Wednesday, April 2nd, 2008
For work today I wanted a way to iterate over an HTTP response with chunked transfer-coding on a chunk-for-chunk basis. I didn’t see a builtin way to do that with httplib. It supports chunked reads but you have to specify the amount that you want to read if you don’t want it to [...]
Posted in General, Python, cherrypy, computing, work | No Comments »
Wednesday, December 19th, 2007
I’ve been doing more parsing stuff at work lately. For my latest project I’ve been using the SimpleParse library. It has quickly overtaken PLY as my Python parsing library of choice.
Here’s a simple calculator example using SimpleParse. It does basic arithmetic and allows you to store values in single letter variable names. [...]
Posted in General, Python, work | No Comments »
Thursday, November 29th, 2007
Here’s an article from the Economist on foreign policy and the race for the White House.
Foreign policy and the presidential race.
It’s an interesting article, but even more interesting is that the data in the poll came from the organization that I work for. Ok, maybe more interesting is a bit of a stretch. [...]
Posted in General, work | 2 Comments »
Tuesday, November 27th, 2007
I’ve really been enjoying working with Python iterators lately. They make working with iterative tasks so flexible. Lately I’ve been working on adding progress tracking to an application so that we can give our users some feedback on where the application is at in various long-running tasks.
Since the long-running tasks in question are [...]
Posted in General, Python, work | No Comments »
Thursday, August 16th, 2007
In the spirit of sharing knowledge that will save someone from the sort of tedious pain I went through the past couple days, here are a few Safari (2.0.4) bugs that I had to work around:
1. No Global Javascript eval()
That’s right. You can’t eval() in the global (window) context. Safari doesn’t allow it. [...]
Posted in General, Software, computing, work | 5 Comments »