<s> import os <EOL> import shutil <EOL> import sys <EOL> inputdir = '<STR_LIT>' <EOL> outputdir = '<STR_LIT>' <EOL> highres = <NUM_LIT:5> <EOL> xtiles = <NUM_LIT> <EOL> ytiles = <NUM_LIT> <EOL> slices = [ <NUM_LIT:0> , <NUM_LIT> ] <EOL> for res in range ( highres , - <NUM_LIT:1> , - <NUM_LIT:1> ) : <EOL> dirname = "<STR_LIT>" % ( outputdir , res ) <EOL> if not os . path . exists ( dirname ) : <EOL> os . mkdir ( dirname ) <EOL> for slice in range ( slices [ <NUM_LIT:0> ] , slices [ <NUM_LIT:1> ] + <NUM_LIT:1> ) : <EOL> dirname = "<STR_LIT>" % ( outputdir , res , slice ) <EOL> if not os . path . exists ( dirname ) : <EOL> os . mkdir ( dirname ) <EOL> for res in range ( highres , - <NUM_LIT:1> , - <NUM_LIT:1> ) : <EOL> for slice in range ( slices [ <NUM_LIT:0> ] , slices [ <NUM_LIT:1> ] + <NUM_LIT:1> ) : <EOL> xrestiles = ( xtiles - ( <NUM_LIT:2> ** res ) ) / ( <NUM_LIT:2> ** res ) + <NUM_LIT:1> <EOL> yrestiles = ( ytiles - ( <NUM_LIT:2> ** res ) ) / ( <NUM_LIT:2> ** res ) + <NUM_LIT:1> <EOL> for ytile in range ( yrestiles ) : <EOL> for xtile in range ( xrestiles ) : <EOL> infile = "<STR_LIT>" % ( inputdir , slice , ytile , xtile , res ) <EOL> outfile = "<STR_LIT>" % ( outputdir , res , slice , ytile , xtile ) <EOL> try : <EOL> if not os . path . exists ( outfile ) : <EOL> print "<STR_LIT>" % ( infile , outfile ) <EOL> shutil . copy ( infile , outfile ) <EOL> except : <EOL> print "<STR_LIT>" % ( infile ) </s>
