<s> import time <EOL> import logging <EOL> import ufora . config . Setup as Setup <EOL> import ufora . native . FORA as ForaNative <EOL> import ufora . native . Cumulus as CumulusNative <EOL> import ufora . FORA . python . FORA as FORA <EOL> import cPickle as pickle <EOL> import ufora . config . Mainline as Mainline <EOL> import sys <EOL> def main ( parsedArguments ) : <EOL> try : <EOL> eventSets = pickle . load ( open ( parsedArguments . file , "<STR_LIT:r>" ) ) <EOL> except : <EOL> eventSets = None <EOL> if eventSets is not None : <EOL> for events in eventSets : <EOL> logging . warn ( "<STR_LIT>" ) <EOL> if len ( events ) : <EOL> logging . warn ( "<STR_LIT>" , events [ <NUM_LIT:0> ] ) <EOL> logging . warn ( "<STR_LIT>" ) <EOL> CumulusNative . replayCumulusWorkerEventStream ( events , parsedArguments . validation ) <EOL> else : <EOL> CumulusNative . replayCumulusWorkerEventStreamFromFile ( <EOL> parsedArguments . file , <EOL> parsedArguments . validation <EOL> ) <EOL> return <NUM_LIT:0> <EOL> def createParser ( ) : <EOL> desc = """<STR_LIT>""" <EOL> parser = Setup . defaultParser ( <EOL> description = desc <EOL> ) <EOL> parser . add_argument ( <EOL> '<STR_LIT:file>' , <EOL> help = '<STR_LIT>' <EOL> ) <EOL> parser . add_argument ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> dest = '<STR_LIT>' , <EOL> action = '<STR_LIT>' , <EOL> default = True , <EOL> required = False , <EOL> help = "<STR_LIT>" <EOL> ) <EOL> return parser <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> Mainline . UserFacingMainline ( <EOL> main , <EOL> sys . argv , <EOL> modulesToInitialize = [ ] , <EOL> parser = createParser ( ) <EOL> ) </s>
