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.
Wednesday, June 22, 2011
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.
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:
Tutorials
- Learn python the hard way by Zed Shaw - (mostly recommended) http://learnpythonthehardway.org/
- How to think like a computer scientist by Allen B. Downey - (mostly recommended) http://greenteapress.com/thinkpython/
- Dive into Python - (this is recommended by many sources, but the previous two are preferred) http://www.diveintopython.net/
- Python intro class at Google - (this may be too advanced for absolute beginners) http://code.google.com/edu/languages/google-python-class/index.html
Ask for help
- Stackoverflow http://stackoverflow.com/questions/tagged/python
- Reddit, the Python subreddits http://www.reddit.com/r/python, http://www.reddit.com/r/learnpython
Official tutorials
- Getting started http://www.python.org/about/gettingstarted/
- Begginers guide http://wiki.python.org/moin/BeginnersGuide
- Official tutorial - (this may be too advanced for absolute beginners) http://docs.python.org/tutorial/
- Official list of introductory books http://wiki.python.org/moin/IntroductoryBooks
Read some code
Students need to read real code but it is hard to find production code that is readable for novices.
- Various problems solved: http://en.literateprograms.org/Category:Programming_language:Python
- Peter Norvig's Python codes e.g.: spelling corrector, sudoku
- Chris Meyers, intermediate examples http://openbookproject.net/py4fun/index.html
Practice, write code
Subscribe to:
Posts (Atom)