So I was tinkering with python while watching this movie, Burn After Reading. I was amazed at the amount of profanity that was stuffed into a movie of this length. And you know what happens when we get curious about statistics in such movies while in a coding. mind frame Used the following piece of code to get an idea of how potty mouthed this movie really was.
m@windows:~$ python -c "import re; import urllib; print '\tDuration: %s\n\t%s' % (''.join(re.findall('<div[^>]*?>[\s\S]*?Runtime\:[\s\S]*?[\s]+?(.*?)[\s]+?<\/div>', urllib.urlopen('http://www.imdb.com/title/tt0887883/').read(), re.IGNORECASE)), ', '.join(['%s: %d' % (p, len(re.findall(p, ''.join(re.findall('<pre>([\s\S]*?)<\/pre>', urllib.urlopen('http://www.imsdb.com/scripts/Burn-After-Reading.html').read(), re.IGNORECASE)), re.IGNORECASE))) for p in ('fuck', 'shit')]))"
Duration: 96 min
fuck: 68, shit: 23
That’s like being bombarded with profanity at the rate of a four letter word per minute on average - and that’s just considering only 2 such words!
Never-the-less, loved the stupid smile on Pitt’s face right before he gets shot point blank in the forehead by Clooney.
Never-the-less, loved the stupid smile on Pitt’s face right before he gets shot point blank in the forehead by Clooney.

3 comments:
http://www.imsdb.com .. cool site.
hilarious indeed
fuckin A man!!!
;)
Post a Comment