Created
August 13, 2012 14:44
-
-
Save heynemann/3341367 to your computer and use it in GitHub Desktop.
r3 sample stream
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
from os.path import abspath, dirname, join | |
class CountWordsStream: | |
job_type = 'count-words' | |
group_size = 1000 | |
def process(self, app, arguments): | |
with open(abspath(join(dirname(__file__), 'chekhov.txt'))) as f: | |
contents = f.readlines() | |
return [line.lower() for line in contents] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment