<s> from . observer import Observer <EOL> import json <EOL> import time <EOL> import os <EOL> class HistoryDumper ( Observer ) : <EOL> out_dir = '<STR_LIT>' <EOL> def __init__ ( self ) : <EOL> try : <EOL> os . mkdir ( self . out_dir ) <EOL> except : <EOL> pass <EOL> def begin_opportunity_finder ( self , depths ) : <EOL> filename = self . out_dir + '<STR_LIT>' + str ( int ( time . time ( ) ) ) + '<STR_LIT>' <EOL> fp = open ( filename , '<STR_LIT:w>' ) <EOL> json . dump ( depths , fp ) <EOL> def end_opportunity_finder ( self ) : <EOL> pass <EOL> def opportunity ( self , profit , volume , buyprice , kask , sellprice , kbid , perc , weighted_buyprice , weighted_sellprice ) : <EOL> pass </s>
