class Counters: def __init__(self, total): self.a1hits = 0 self.a2hits = 0 self.count = 0 self.eta = Eta(total) def format(self): self.eta.set_current(self.count) return 'progress={} alg1hits={} alg2hits={}'.format(self.eta.format(), progress_format(current=self.a1hits, total=self.count), progress_format(current=self.a2hits, total=self.count))
class Counters: def __init__(self, total): self.a1hits = 0 self.a2hits = 0 self.count = 0 self.eta = Eta(total) def format(self): self.eta.set_current(self.count) return 'progress={} alg1hits={} alg2hits={}'.format( self.eta.format(), progress_format(current=self.a1hits, total=self.count), progress_format(current=self.a2hits, total=self.count))
def __init__(self, total): self.a1hits = 0 self.a2hits = 0 self.count = 0 self.eta = Eta(total)