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
def keep_fn(self): | |
def keep(item): | |
return (not item._spam or | |
(c.user_is_loggedin and | |
(item.author_id == c.user._id or | |
c.user_is_admin or | |
item.subreddit.is_moderator(c.user)))) | |
return keep |
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
from boto.emr.connection import EmrConnection | |
from boto.emr.step import InstallPigStep, PigStep | |
AWS_ACCESS_KEY = '' # REQUIRED | |
AWS_SECRET_KEY = '' # REQUIRED | |
conn = EmrConnection(AWS_ACCESS_KEY, AWS_SECRET_KEY) | |
pig_file = 's3://elasticmapreduce/samples/pig-apache/do-reports2.pig' | |
INPUT = 's3://elasticmapreduce/samples/pig-apache/input/access_log_1' | |
OUTPUT = '' # REQUIRED, S3 bucket for job output |