<s> import json <EOL> import numpy <EOL> import numpy . random <EOL> from datetime import datetime <EOL> from datetime import timedelta <EOL> from next . utils import utils <EOL> from next . dashboard . AppDashboard import AppDashboard <EOL> class TupleBanditsPureExplorationDashboard ( AppDashboard ) : <EOL> def __init__ ( self , db , ell ) : <EOL> AppDashboard . __init__ ( self , db , ell ) <EOL> def get_app_supported_stats ( self ) : <EOL> """<STR_LIT>""" <EOL> stat_list = self . get_supported_stats ( ) <EOL> stat = { } <EOL> stat [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> stat [ '<STR_LIT:description>' ] = self . most_current_ranking . __doc__ <EOL> stat [ '<STR_LIT>' ] = [ '<STR_LIT>' ] <EOL> stat_list . append ( stat ) <EOL> return stat_list <EOL> def most_current_ranking ( self , app_id , exp_uid , alg_label ) : <EOL> """<STR_LIT>""" <EOL> predict_id = '<STR_LIT>' <EOL> params = { '<STR_LIT>' : alg_label } <EOL> predict_args_dict = { '<STR_LIT>' : predict_id , '<STR_LIT>' : params } <EOL> predict_args_json = json . dumps ( predict_args_dict ) <EOL> next_app = utils . get_app ( app_id ) <EOL> args_out_json , didSucceed , message = next_app . predict ( exp_uid , predict_args_json , self . db , self . ell ) <EOL> predict_args_dict = json . loads ( args_out_json ) <EOL> item = predict_args_dict [ '<STR_LIT:args>' ] <EOL> return_dict = { } <EOL> return_dict [ '<STR_LIT>' ] = [ { '<STR_LIT:label>' : '<STR_LIT>' , '<STR_LIT>' : '<STR_LIT>' } , { '<STR_LIT:label>' : '<STR_LIT>' , '<STR_LIT>' : '<STR_LIT:index>' } , { '<STR_LIT:label>' : '<STR_LIT>' , '<STR_LIT>' : '<STR_LIT>' } , { '<STR_LIT:label>' : '<STR_LIT>' , '<STR_LIT>' : '<STR_LIT>' } ] <EOL> return_dict [ '<STR_LIT:data>' ] = item [ '<STR_LIT>' ] <EOL> return_dict [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> return return_dict </s>
