
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
Tag Archives: random selection
Two Mathematical Bugs
A few days ago, I discovered I had at least one, maybe two mathematical bugs. The first bug is in the line clipping algorithm. Here’s a quick reminder of what’s going on there: There are six points of interest: the … Continue reading
Posted in Algorithms, Geometry, Math, Programming, Python
Tagged Bugs, LineClipping, Programming, Python, random selection
2 Comments
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
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