Get Weather using JSON web service and Python

Get the current weather for Copenhagen: import urllib2 import json # hent vejret for Koebenhavn url = ‘,dk’ response = urllib2.urlopen(url) # parse JSON resultatet data = json.load(response) print ‘Weather in Copenhagen:’, data[‘weather’][0][‘description’]

Linked Data: First Blood

Knowing a lot about something, makes me more prone to appraising its value. I unfortunately know very little about Linked data. For this reason, I’ve had a very biased and shamefully low opinion about the concept of linked data. I’ve…

Finding the haystack

Indtil denne sommer troede mange, at de kendte til sandheden om, at det er svært at finde nålen i høstakken. Kun de færreste vidste, at man har vendt ordsproget på hovedet i efterretningsverdenen. Her siger man, at »for at finde…

Live piracy map

This map shows all the piracy and armed robbery incidents reported to the IMB Piracy Reporting Centre during 2014. I learned about it after reading a story (how to negotiate like a pirate) in Nautilus, which a very new and…

Writing a parser in Python

This is my base pattern for writing a parser in Python by using the pyparsing library. It is slightly more complicated than a hello world in pyparsing, but I think it is more useful as a small example of writing…

How long is a year?

How to find out how long a year is on Earth by only analyzing text? This approach is lifted straight from an excellent and very inspiring talk by Peter Norvig. 1) Go to www.google.com/trends/ 2) Type in the word “Icecream”…