Wednesday, June 22, 2011

Ngrams with coroutines in Python

This is how I define ngrams with coroutines

I need to filter text before generating ngrams and also, I want to process ngrams (in this case count bigrams)

I combine my coroutines together

Full source can be found in my fork of rrenaud's gibberish detector.

Thursday, June 9, 2011

stackverflow: the most upvoted Q/A tagged as Perl vs as Python

The most upvoted question tagged as Perl
The most upvoted question tagged as Python

Currently, for Python, it is the hidden gems in the language.
You just cannot upvote some of them enough.

On the other side, the most upvoted Perl question at this moment is about Unicode oddities. And the most upvoted answer will scare the shit out of you.

Wednesday, June 8, 2011

Start programming, learn Python

Recently I've been asked to send a few links to absolute beginners who want to start programming. As a language choice, I always recommend to start with Python. So I ended up to collect a list useful links for Python beginners:


Ask for help

Official tutorials 

Read some code
Students need to read real code but it is hard to find production code that is readable for novices.

Practice, write code