<s> import cPickle as pickle <EOL> import os <EOL> from skimage . io import imsave <EOL> import numpy as np <EOL> from make_hiq import filter <EOL> from bubbly . extractors import RGBExtractor <EOL> def main ( ) : <EOL> ex = RGBExtractor ( ) <EOL> ex . shp = ( <NUM_LIT:100> , <NUM_LIT:100> ) <EOL> data = filter ( hit_rate = <NUM_LIT> ) <EOL> params = { } <EOL> for i , d in enumerate ( data ) : <EOL> d1 = list ( d ) <EOL> d2 = list ( d ) <EOL> d2 [ - <NUM_LIT:1> ] *= <NUM_LIT:2> <EOL> l = int ( np . round ( d [ <NUM_LIT:0> ] ) ) <EOL> d1 = [ l ] + d1 <EOL> d2 = [ l ] + d2 <EOL> im = np . hstack ( ( ex ( * d1 ) , ex ( * d2 ) ) ) <EOL> pth = "<STR_LIT>" % i <EOL> params [ pth ] = d <EOL> pth = os . path . join ( '<STR_LIT>' , pth ) <EOL> imsave ( pth , im ) <EOL> pth = os . path . join ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> with open ( pth , '<STR_LIT:w>' ) as outfile : <EOL> pickle . dump ( params , outfile ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> main ( ) </s>
