parameters: (self, new_games)
docstring: new_games is a list of .tfrecord.zz new game records.
docstring_summary: new_games is a list of .tfrecord.zz new game records.
docstring_tokens: new_games is a list of . tfrecord . zz new game records .
function: def update(self, new_games):
          """ new_games is a list of .tfrecord.zz new game records. """
          new_games.sort(key=os.path.basename)
          first_new_game = None
          for idx, game in enumerate(new_games):
              timestamp = file_timestamp(game)
              if timestamp <= self.examples[-1][0]:
                  continue
              elif first_new_game is None:
                  first_new_game = idx
                  num_new_games = len(new_games) - idx
                  print("Found {}/{} new games".format(
                      num_new_games, len(new_games)))
                  self.total_updates += num_new_games
              self.examples.extend(self.func(game))
          if first_new_game is None:
              print("No new games", file_timestamp(
                  new_games[-1]), self.examples[-1][0])
function_tokens: def update ( self , new_games ) : new_games . sort ( key = os . path . basename ) first_new_game = None for idx , game in enumerate ( new_games ) : timestamp = file_timestamp ( game ) if timestamp <= self . examples [ - 1 ] [ 0 ] : continue elif first_new_game is None : first_new_game = idx num_new_games = len ( new_games ) - idx print ( "Found {}/{} new games" . format ( num_new_games , len ( new_games ) ) ) self . total_updates += num_new_games self . examples . extend ( self . func ( game ) ) if first_new_game is None : print ( "No new games" , file_timestamp ( new_games [ - 1 ] ) , self . examples [ - 1 ] [ 0 ] )