Spaces:
Sleeping
Sleeping
Download src/darkguard_openenv/utils.py from Jyo-K/darkguard-openenv: direct link, hf CLI and curl.
- Browser
- Download file 268 Bytes
-
https://huggingface.co/spaces/Jyo-K/darkguard-openenv/resolve/main/src/darkguard_openenv/utils.py
- Command line
-
hf download hf://spaces/Jyo-K/darkguard-openenv/src/darkguard_openenv/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/Jyo-K/darkguard-openenv/resolve/main/src/darkguard_openenv/utils.py
268 Bytes
| """Utility helpers for IDs and lightweight text processing.""" | |
| from __future__ import annotations | |
| import uuid | |
| def new_episode_id() -> str: | |
| return f"dg-{uuid.uuid4().hex[:12]}" | |
| def norm_text(value: str | None) -> str: | |
| return (value or "").strip().lower() | |