Monthly Archives: July 2010

(URL)Encoding in python

Well, encodings are a never ending story and whenever you don’t want to waste time on them, it’s for sure that you’ll stumble over yet another tripwire. This time it is the encoding of URLs (note: even though related I’m … Continue reading

Posted in Coding | Tagged , , , , , , , , | Leave a comment

xkcd: University Website

So true

Posted in Uncategorized | Tagged , , , | Leave a comment

Itertools

Just recently came across the python itertools “tools for efficient looping” again. Generators have the advantage of not creating the whole list on definition, but on demand (in contrast to e.g., list comprehensions). Really worth a look: import itertools as … Continue reading

Posted in Coding | Tagged , , , , , | 2 Comments

Precision-Recall diagrams including the F-Measure

Today I was asked how to generate Recall-Precision diagrams including the f-measure values as height-lines from within python. Actually Gunnar was the one who had this idea quite a while ago, but constantly writing things into files, then loading them … Continue reading

Posted in Coding | Tagged , , , , , , , , | Leave a comment

Sort python dictionaries by values

Perhaps you already encountered a problem like the following one yourself: You have a large list of items (let’s say URIs for this example) and want to sum up how often they were viewed (or edited or… whatever). A small … Continue reading

Posted in Coding | Tagged , , , , , , , , | 2 Comments

Min-Heap in Python

I recently wanted to implement a small event system where events can have different priorities. So for example the event with highest priority (lowest value) should be handled first. Python comes with a heapq module which can transform a list … Continue reading

Posted in Coding | Tagged , , , , , , | 4 Comments

Linkdump

Did you know: Visone a nice tool to visualize graphs (kind of graphviz interactive) userfly a usability testing tool for websites (provides videos of user interaction)

Posted in Uncategorized | Tagged , , , , , , , , | 2 Comments