
Recent Posts
Recent Comments
 ubershmekel on 5 Tips for more effective logging
 __del__ magic method dangers in Python 2 and infinite loops on Python Gotchas 1: __del__ is not the opposite of __init__
 python – What is the __del__ method, How to call it?ThrowExceptions – ThrowExceptions on Python Gotchas 1: __del__ is not the opposite of __init__
 destructor  ¿Cómo puedo limpiar correctamente un objeto de Python? on Python Gotchas 1: __del__ is not the opposite of __init__
 destructor  Come faccio a pulire correttamente un oggetto Python? on Python Gotchas 1: __del__ is not the opposite of __init__
Archives
 August 2020
 July 2020
 March 2020
 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: Math
10 Awesome Theorems & Results
When I look back at various mathematical courses I took, most have at least one theorem that I really liked. Usually I like it because the proof has a surprising trick, sometimes it’s because of the unexpected conclusion, or maybe … Continue reading
The mathematics behind the solution for Challenge No. 5
If you take a look at the various solutions people proposed for the last challenge of generating a specific permutation, you’ll see that they are very similar. Most of them are based on some form of divmod usage. The reason … Continue reading
Posted in Challenges, computer science, Programming, Python
Tagged base systems, factorial, Knuth, Math, permutations
Leave a comment
Fast Peak Autocorrelation
So, I was at geekcon. It was a blast. There were many interesting projects, and I didn’t get to play with them all. I did get to work a bit on the Lunar Lander from last year, and this year … Continue reading
Posted in Algorithms, Math, Programming, Projects, Python, Utility Functions
Tagged autocorellation, automatic guitar improviser, geekcon, Math, pyimprov, signal processing
Leave a comment
Checking the ulam spiral
In the following post, the Ulam spiral is described. It’s a very simple object – write down consecutive natural numbers starting from 41 in a square spiral. Curiously, the numbers on the diagonal are primes: Reading this post, I immediately … Continue reading
Posted in Math, Programming, Python
Tagged Math, prime numbers, Programming, Python, Ulam spiral
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
Computation over Zp in Python
Lately I’ve been working a lot on my Algebric Structures homework. One of the reasons I don’t blog as much as I should. While working on my homework, I had to factor some polynomials over Z5 – the field containing … Continue reading
Reachability on arbitrary maps
The other day I had an idea. What if you took a map of some country, and from each coordinate computed the time it took to any other coordinate. The basic assumptions are that you can drive on road by … Continue reading