<s> '''<STR_LIT>''' <EOL> import argparse <EOL> import sys <EOL> import random <EOL> parser = argparse . ArgumentParser ( description = "<STR_LIT>" ) <EOL> parser . add_argument ( "<STR_LIT>" , help = "<STR_LIT>" ) <EOL> parser . add_argument ( "<STR_LIT>" , help = "<STR_LIT>" ) <EOL> parser . add_argument ( "<STR_LIT>" , help = "<STR_LIT>" ) <EOL> parser . add_argument ( "<STR_LIT>" , "<STR_LIT>" , help = "<STR_LIT>" , <EOL> default = <NUM_LIT> , type = float ) <EOL> parser . add_argument ( "<STR_LIT>" , "<STR_LIT>" , help = "<STR_LIT>" , default = False ) <EOL> parser . add_argument ( "<STR_LIT>" , "<STR_LIT>" , help = "<STR_LIT>" , <EOL> default = False , action = '<STR_LIT:store_true>' ) <EOL> parser . add_argument ( "<STR_LIT:-c>" , "<STR_LIT>" , help = "<STR_LIT>" , <EOL> default = False , action = '<STR_LIT:store_true>' ) <EOL> args = parser . parse_args ( ) <EOL> if args . random_seed : <EOL> random . seed ( args . random_seed ) <EOL> i = open ( args . input_file ) <EOL> o1 = open ( args . output_file1 , '<STR_LIT:wb>' ) <EOL> o2 = open ( args . output_file2 , '<STR_LIT:wb>' ) <EOL> if args . skip_headers and args . copy_headers : <EOL> print "<STR_LIT>" <EOL> quit ( ) <EOL> elif args . skip_headers : <EOL> i . readline ( ) <EOL> elif args . copy_headers : <EOL> headers = i . readline ( ) <EOL> o1 . write ( headers ) <EOL> o2 . write ( headers ) <EOL> counter = <NUM_LIT:0> <EOL> for line in i : <EOL> r = random . random ( ) <EOL> if r > args . probability : <EOL> o2 . write ( line ) <EOL> else : <EOL> o1 . write ( line ) <EOL> counter += <NUM_LIT:1> <EOL> if counter % <NUM_LIT> == <NUM_LIT:0> : <EOL> print counter </s>
