<s> available_c = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> row_size = <NUM_LIT> <EOL> table_size = row_size * row_size <EOL> from array import array as pyarray <EOL> import os <EOL> class InvalidCError ( Exception ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , c ) : <EOL> self . c = str ( c ) <EOL> def __str__ ( self ) : <EOL> return repr ( "<STR_LIT>" % ( self . strand , "<STR_LIT>" . join ( available_c ) ) ) <EOL> class PreCompiledGFold : <EOL> def __init__ ( self , c ) : <EOL> path = os . path . dirname ( __file__ ) <EOL> c = str ( c ) <EOL> if c in available_c : <EOL> self . gfolds = pyarray ( '<STR_LIT:f>' , [ ] ) <EOL> self . gfolds . fromfile ( file ( os . path . join ( path , '<STR_LIT:g>' + str ( c ) + '<STR_LIT>' ) , '<STR_LIT:rb>' ) , table_size ) <EOL> else : <EOL> raise InvalidCError ( c ) <EOL> def get ( self , v1 , v2 ) : <EOL> i = int ( round ( v1 ) * row_size + round ( v2 ) ) <EOL> return self . gfolds [ i ] <EOL> class FakePreCompiledGFold : <EOL> def __init__ ( self , c ) : <EOL> self . gfolds = None <EOL> def get ( self , v1 , v2 ) : <EOL> raise IndexError </s>
