Taken from Akshit Khurana in http://www.quora.com/Python-programming-language-1/What-are-the-best-Python-scripts-youve-ever-written