
Recent Posts
Recent Comments
 ubershmekel on Two bugs don’t make a right
 Ram Rachum on Optimizing Django ORM / Postgres queries using left join
 Dimensions in Mathematics on Beautiful Code
 Tomer Filiba on Collision: the story of the random bug
 Brendan DolanGavitt on Collision: the story of the random bug
Archives
 August 2012
 July 2012
 June 2012
 June 2011
 February 2011
 January 2011
 December 2010
 April 2010
 March 2010
 February 2010
 November 2009
 October 2009
 September 2009
 August 2009
 July 2009
 June 2009
 April 2009
 March 2009
 February 2009
 January 2009
 December 2008
 November 2008
 July 2008
 June 2008
 May 2008
 April 2008
 March 2008
 February 2008
 January 2008
 December 2007
 November 2007
 October 2007
 September 2007
 August 2007
 July 2007
 June 2007
 May 2007
 February 2007
Categories
 Algorithms
 Assembly
 C
 Challenges
 Compilation
 computer science
 Cryptography
 CSS
 Databases
 decompilation
 Design
 Fractals
 Game Development
 Geometry
 gotchas
 Graphics
 Group Theory
 Humour
 Javascript
 Linux
 Math
 Miscellaneous
 Optimization
 Optimization
 Optimization
 Optimization
 Origami
 Personal
 Programming
 Programming Philosophy
 Projects
 Protocols
 Python
 rants
 Research
 Security
 Sound
 startup
 Statistics
 Teaching Programming
 Testing
 Uncategorized
 Utility Functions
 webdesign
Category Archives: Math
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
Tagged challenge, probability distribution, Programming, Python, random selection, Statistics
12 Comments
Interesting links – 4
http://ivory.idyll.org/articles/advancedswc/ “Intermediate and Advanced Software Carpentry in Python” is an excellent reading by Titus Brown. If you feel you’re good with Python but want to improve it, or if you are an experienced programmer that wants to get better, this … Continue reading
Posted in Compilation, Math, Programming, Python
Tagged Big numbers, Compilation, design patterns, Python, yacc in yacc
Leave a comment
Fractals in 10 minutes no. 3 – The Dragon
When first I looked through the pages of the book “Hacker’s Delight”, I found myself looking at the chapter about bases. There I learned a very curious fact – with the digits of 0,1 and the base of 2, you … Continue reading
Posted in Fractals, Math, Programming, Python
Tagged base systems, dragon fractal, fractal, Knuth, Python
3 Comments
Using zpint in Cryptography Homework
Originally, I wrote zpint to help me with my algebric structures homework. For those not familiar with it, it allows you to do computations modulo p the same way you do for ints. Not surprisingly, I found myself using it … Continue reading
Fibonacci meals
Lately I’ve been reminded of the existence of Fibonacci meals. For a long time, I despised those, but now that I’m preparing my own food most of the time, I’m aiming for them, to save time cooking. A Fibonacci meal … Continue reading
Posted in Humour, Math, Personal
Leave a comment
Elegant Line Clipping Algorithm
I actually wrote about that a long time ago, in the wiki that once was algorithm.co.il. Since the wiki is long gone, and I figured this is a very elegant algorithm, I decided I should write about it. First, some … Continue reading
Posted in Algorithms, Geometry, Graphics, Math, Programming, Python
Tagged Algorithm, Graphics, LineClipping, Python
Leave a comment
Python module usage statistics – Cont.
Well, very embarrassingly for me, turns out I had a bug in my original post and code. As per Doug’s suggestion, I tried running the script I wrote on the standard library, and got results I didn’t quite believe. So … Continue reading
Posted in Math, Programming, Python
Tagged module usage, Python, Python packages, Statistics
3 Comments
Python module usage statistics
IMPORTANT UPDATE: The code I used to create these statistics had some bugs. The fixed statistics are available here. After reading Doug Hellman’s post about python stdlib modules he needs the documentation to, I commented there that I need the … Continue reading
Posted in Math, Programming, Python
Tagged module usage, Python, Python packages, Statistics
5 Comments
Pagerank recommends movies
So how was your Yom Kippur? After Yom Kippur ended, I sat down to write something that was nagging me for quite some time. I wanted to see what pagerank had to say about movies. I’ve always liked to picture … Continue reading
Posted in Algorithms, computer science, Math, Programming, Python
Tagged Algorithm, Graph, IMDBPy, Pagerank
1 Comment
A new fold on the origami page: Qua Qua Egg
In Israel, we have a fold we call ‘quaquadelaoma” or for short, “quaqua”. I believe in english it is called a ‘color changer’, but I’m not sure of that. In any case, this fold yields a 3D shape similar to … Continue reading