MCPcopy Create free account
hub / github.com/MLSysU/TD-Pipe / Counter

Class Counter

TD_Pipe/utils.py:19–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17
18
19class Counter:
20
21 def __init__(self, start: int = 0) -> None:
22 self.counter = start
23
24 def __next__(self) -> int:
25 i = self.counter
26 self.counter += 1
27 return i
28
29 def reset(self) -> None:
30 self.counter = 0
31
32
33def is_hip() -> bool:

Callers 2

__init__Method · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected