<s> import os <EOL> import urllib . request <EOL> import random <EOL> AUS_URL = '<STR_LIT>' <EOL> AUS_SIZE = <NUM_LIT> <EOL> DB_URL = '<STR_LIT>' <EOL> DB_SIZE = <NUM_LIT> <EOL> HT_URL = '<STR_LIT>' <EOL> HT_SIZE = <NUM_LIT> <EOL> TARGET_PATH = os . path . dirname ( os . path . realpath ( __file__ ) ) <EOL> def main ( ) : <EOL> print ( '<STR_LIT>' ) <EOL> rows = list ( urllib . request . urlopen ( AUS_URL ) ) <EOL> selected = random . sample ( rows , AUS_SIZE ) <EOL> with open ( os . path . join ( TARGET_PATH , '<STR_LIT>' ) , '<STR_LIT:wb>' ) as f : <EOL> for row in selected : <EOL> f . write ( row ) <EOL> print ( '<STR_LIT>' ) <EOL> print ( '<STR_LIT>' ) <EOL> rows = list ( urllib . request . urlopen ( DB_URL ) ) <EOL> selected = random . sample ( rows , DB_SIZE ) <EOL> with open ( os . path . join ( TARGET_PATH , '<STR_LIT>' ) , '<STR_LIT:wb>' ) as f : <EOL> for row in selected : <EOL> f . write ( row ) <EOL> print ( '<STR_LIT>' ) <EOL> print ( '<STR_LIT>' ) <EOL> rows = list ( urllib . request . urlopen ( HT_URL ) ) <EOL> selected = random . sample ( rows , HT_SIZE ) <EOL> with open ( os . path . join ( TARGET_PATH , '<STR_LIT>' ) , '<STR_LIT:wb>' ) as f : <EOL> for row in selected : <EOL> f . write ( row ) <EOL> print ( '<STR_LIT>' ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
