<s> import sys <EOL> sys . path . append ( '<STR_LIT>' ) <EOL> import json <EOL> import arbitrage <EOL> import time <EOL> from observers import observer <EOL> class TestObserver ( observer . Observer ) : <EOL> def opportunity ( self , profit , volume , buyprice , kask , sellprice , kbid , <EOL> perc , weighted_buyprice , weighted_sellprice ) : <EOL> print ( "<STR_LIT>" % profit ) <EOL> def main ( ) : <EOL> arbitrer = arbitrage . Arbitrer ( ) <EOL> depths = arbitrer . depths = json . load ( open ( "<STR_LIT>" ) ) <EOL> start_time = time . time ( ) <EOL> testobs = TestObserver ( ) <EOL> arbitrer . observers = [ testobs ] <EOL> arbitrer . arbitrage_opportunity ( "<STR_LIT>" , depths [ "<STR_LIT>" ] [ "<STR_LIT>" ] [ <NUM_LIT:0> ] , <EOL> "<STR_LIT>" , depths [ "<STR_LIT>" ] [ "<STR_LIT>" ] [ <NUM_LIT:0> ] ) <EOL> elapsed = time . time ( ) - start_time <EOL> print ( "<STR_LIT>" % elapsed ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
