Posts tagged ‘Python’

Alive and Well (Just Busy)!

It has been ages since I last posted, and for that I am sorry, but I have kept up with my twitter and identica accounts. Things have been moving really fast for me of late and as a result my blogging has slipped. So whats new in the world of earobinson?

  1. I am now working for CAE, more precisely CAE PS out of Toronto, and I am loving every moment of it. They have a very open culture and encourage the use of open source tools when appropriate. I have been able to use Ubuntu to host some of the websites I have developed in Django. This has kept me very happy. I can honestly say that I think that my Ubuntu, and Open Source knowledge set me apart.
  2. I have been getting more and more into photography with my new Canon EOS Rebel T1i, you can follow me on flickr.
  3. I have been ramping up my fitness (and Brazilian Jiu-Jitsu skills) at Toronto BJJ.

This brings me to my goals for the future, I am falling in love with Django and as a result I want to play with it more and more, now my current hosting provider 1and1 has served me very well up to now. But now that I want to start playing with Django more I need to get a hosting provider that can support Django (because I want to show off my work of course). I would hope that any new hosting provider I use could support both Django, and ruby on rails (as I may want to play with it in the future). So dear lazy web what do you recommend? And I know I could use Google app engein but I like the idea of pure Django, not some hack, I have also looked at djangohosting.org but would love some recommendations from actual users of hosting plans.

Any advise lazyweb?

Mapping Wikipedia

I was reading reddit the other day and stumbled upon the fact that wikipedia has an API. Neat I thought, and having some free time since my exams are now over I figured I would play around a bit with it. When I browse wikipedia I often click from link to link, and have come to the conclusion that all articles are 6 degrees of separation. For example I can go from Ubuntu to Tesco to Japan to G8 to United States to George W. Bush bet you never knew Ubuntu was connected to George W. Bush. I once wrote a map of the internet program that people seemed to like to download and modify so in that spirit I wrote wikimap.py to map wikipedia. wikimap.py Requires pygraphviz (Install using sudo aptitude install python-pygraphviz). To use the program simply run the program and give it the wiki page name for example “python wikimap.py Norman_Graham” Note that Ubuntu is Ubuntu_(Linux_distribution) and you can find the full name in the address bar of your browser. For more complicated maps use wikimap.py –help for full usage info.

Here are a few examples that I created with wikimap.py


And a really large one being viewed in inkscape.

More examples including the dot files can be found at http://www.files.earobinson.org/wiki/. But there are a few features I would like to add:

  1. Generating the graph using python-pygraphviz currently takes a really long time and I would like to be able to do it faster
  2. Page links currently include templates, I would like to only use links in the body of the text
  3. It would be nice if the software cached previously seen connections. (But then I need to detect updates to that page)

If anyone has a nice simple soultion to any of those problems leave a comment. Also if you are able to generate any neat images I would love to see them.

OLPC Spy Cam

So now that I have my XO OLPC computer I wanted to find something to do with it. As I said before its the web cam that really impressed me and so I decided to start playing with that. After jumping onto the #OLPC freenode irc room and asking them a few questions I was quickly able to write this python program.

Set it up as a cron job and upload pictures from outside my apartment window every hour. I’m not sure how long ill be keeping it running and if I play with the laptop and dont turn off the script I guess it will upload pictures of me.

Well for anyone interested the important code to take a picture is: [sourcecode language="python"]os.system(‘gst-launch-0.10 v4l2src ! ffmpegcolorspace ! pngenc ! filesink location=’ + filename)[/sourcecode] and I would love to hear what you have been doing with your XO.

Map of The Internet

The other day I stumbled upon Chris Harrison’s internet map, the only problem I found with his map is that I wanted to know exactly which country each network connection was in. So using the DIMES public data repository, and 1site1moment’s country boarders I have mapped the internet for myself.

From Public

Feel free to download the source code and come up with your own internet map, I would love to see what other people can come up with.

UPDATE 01: Image is back up, If the source code link wont work for you email me and I will send you a copy. Feel free to host this anywhere you like just post a link back to this site.

UPDATE 02: Source code can now also be found here.

UPDATE 03: Would love to see what other people can do with this.