<s> """<STR_LIT>""" <EOL> import os <EOL> import urllib <EOL> import zipfile <EOL> from decimal import Decimal <EOL> from retriever . lib . templates import Script <EOL> from retriever . lib . models import Table , Cleanup , no_cleanup , correct_invalid_value <EOL> VERSION = '<STR_LIT>' <EOL> class main ( Script ) : <EOL> def __init__ ( self , ** kwargs ) : <EOL> Script . __init__ ( self , ** kwargs ) <EOL> self . name = "<STR_LIT>" <EOL> self . shortname = "<STR_LIT>" <EOL> self . ref = "<STR_LIT>" <EOL> self . tags = [ "<STR_LIT>" , "<STR_LIT>" ] <EOL> self . description = "<STR_LIT>" <EOL> self . citation = "<STR_LIT>" <EOL> def download ( self , engine = None , debug = False ) : <EOL> Script . download ( self , engine , debug ) <EOL> engine = self . engine <EOL> taxa = ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> for tax in taxa : <EOL> table = Table ( tax . lower ( ) + '<STR_LIT:s>' , delimiter = '<STR_LIT:U+002C>' , header_rows = <NUM_LIT:3> , pk = '<STR_LIT>' , contains_pk = True ) <EOL> columns = [ ( "<STR_LIT>" , ( "<STR_LIT>" , ) ) , <EOL> ( "<STR_LIT>" , ( "<STR_LIT:int>" , ) ) , <EOL> ( "<STR_LIT>" , ( "<STR_LIT>" , ) ) , <EOL> ( "<STR_LIT>" , ( "<STR_LIT:int>" , ) ) , <EOL> ( "<STR_LIT>" , ( "<STR_LIT>" , ) ) , <EOL> ( "<STR_LIT>" , ( "<STR_LIT>" , ) ) , <EOL> ( "<STR_LIT>" , ( "<STR_LIT>" , ) ) , <EOL> ( "<STR_LIT>" , ( "<STR_LIT>" , ) ) , <EOL> ( "<STR_LIT>" , ( "<STR_LIT>" , ) ) , <EOL> ( "<STR_LIT>" , ( "<STR_LIT>" , ) ) , <EOL> ( "<STR_LIT>" , ( "<STR_LIT>" , ) ) , <EOL> ( "<STR_LIT>" , ( "<STR_LIT>" , ) ) , <EOL> ( "<STR_LIT>" , ( "<STR_LIT:int>" , ) ) , <EOL> ( "<STR_LIT>" , ( "<STR_LIT>" , ) ) ] <EOL> table . columns = columns <EOL> engine . table = table <EOL> engine . create_table ( ) <EOL> base_url = '<STR_LIT>' <EOL> years = range ( <NUM_LIT> , <NUM_LIT> ) <EOL> for year in years : <EOL> if year == <NUM_LIT> and tax == '<STR_LIT>' : continue <EOL> url = base_url + '<STR_LIT>' % ( year , tax ) <EOL> filename = '<STR_LIT>' % ( tax , year ) <EOL> engine . download_file ( url , filename ) <EOL> engine . insert_data_from_file ( engine . find_file ( filename ) ) <EOL> return engine <EOL> SCRIPT = main ( ) </s>
