MCPcopy Create free account
hub / github.com/AlphaGPU/leetgpu-challenges / extract_id

Function extract_id

scripts/update_challenges.py:31–35  ·  view source on GitHub ↗
(name: str)

Source from the content-addressed store, hash-verified

29
30
31def extract_id(name: str) -> int:
32 match = re.match(r"^(\d+)_", name)
33 if not match:
34 raise ValueError(f"Directory name must start with number: {name}")
35 return int(match.group(1))
36
37
38def get_difficulty(path: Path) -> str:

Callers 1

load_challengeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected