Let's say you know the equation of a circle (r2 = x2 + y2), but want to calculate the area of a circle. And, uh, you forgot how to do that. Happens to all of us, honest. Fortunately, we've got a little python program that uses the monte-carlo method to estimate the value of pi! Let's get going!
Coding
Stupid Math Tricks with Python
Submitted by garnold on Sat, 01/17/2009 - 3:31pm
Drupal random Amazon wishlist item
Submitted by garnold on Fri, 08/29/2008 - 6:50pm
I got this wild hair up my nose about "wouldn't it be cool to show a random item from my Amazon wishlist on my site?" the other day. I looked around, found plenty of wishlist scripts, but none of them did what I wanted. They all showed the first X items on your list sorted by Y, for various Xs and Ys. Nothing random out there. Read more
Published in