# Monthly Archives: February 2008

## The Art and Science of Pulling Numbers Out of Your Sleeve

About a year or so ago, I was reading R. V. Jones’ excellent book ‘Most Secret War’. One of the stories I remembered and told my colleagues about, was how Jones estimated the rocket production capabilities of the Germans. He … Continue reading

## Solution for the Random Selection Challenge

A few days ago, I wrote up two small Python Challenges. Several people have presented solutions for the first challenge, and I also posted my solution in the comments there. However, the second challenge remained unsolved, and I will present … Continue reading

From time to time, I need to harvest a website, or many websites. For example, to collect the data from IMDB to run the Pagerank algorithm. Other times I need to query some non-web servers. Usually in such cases, I … Continue reading

Posted in Programming, Python, Utility Functions | | 4 Comments

## Fun with Matrices

I’ll let the code speak for itself: In [81]: m = Matrix(array([[1.0,1.0],[0.0,1.0]]))   In [82]: def my_sqrt(x, num_iters): ….: r = 0.5*x ….: for i in xrange(num_iters): ….: r = 0.5*(r+x/r) ….: return r ….:   In [83]: m*m Out[83]: … Continue reading

## LStrings and ASCII-Plotter at UtilityMill.com

It seems Gregory is fond of ascii-art, as he took my scripts, and put them online at utilitymill.com. UtilityMill.com is a cool new website, which allows you to run scripts as small web applications. What Gregory actually did, with just … Continue reading

## Origami Pig Instructions

I took some time to create the instructions for this one: Read on for the full instructions.

## Small Python Challenge No. 3 – Random Selection

This time I’ll give two related problems, both not too hard. Lets warm up with the first: You have a mapping between items and probabilities. You need to choose each item with its probability. For example, consider the items [‘good’, … Continue reading

Posted in Challenges, Math, Programming, Python | | 12 Comments

## Rhyme and Reason with Python

After reading xkcd’s blog, I went to LimerickDB.com. It looks and works just like bash.org, but for limericks. Quite amused with some of the limericks available, I wanted to try and compose my own. The first one came out fine, … Continue reading

Posted in Algorithms, Humour, Programming, Python | | 1 Comment

## Troubles with Wild Themes

Some time ago, I wrote that I was planning on using a new theme for this blog. To do this, I first looked for possible candidates on themes.wordpress.net, and then started to adapt the one I liked. However, while working … Continue reading

Posted in Security, web-design | Tagged , , , , | 2 Comments