<s> '''<STR_LIT>''' <EOL> def timeit ( func ) : <EOL> import time <EOL> def _timeit ( * arg ) : <EOL> t1 = time . time ( ) <EOL> res = func ( * arg ) <EOL> t2 = time . time ( ) <EOL> print '<STR_LIT>' % ( func . func_name , ( t2 - t1 ) * <NUM_LIT> ) <EOL> import sys ; sys . stdout . flush ( ) <EOL> return res <EOL> return _timeit <EOL> def cached_property ( func ) : <EOL> '''<STR_LIT>''' <EOL> attr_name = '<STR_LIT>' + func . __name__ <EOL> @ property <EOL> def _cached_property ( self ) : <EOL> try : <EOL> return getattr ( self , attr_name ) <EOL> except AttributeError : <EOL> setattr ( self , attr_name , func ( self ) ) <EOL> return getattr ( self , attr_name ) <EOL> return _cached_property </s>
