Download code_repair/codecontests/src/seed.py from Gen-Verse/RSI-Anything: direct link, hf CLI and curl.
- Browser
- Download file 178 Bytes
-
https://huggingface.co/datasets/Gen-Verse/RSI-Anything/resolve/main/code_repair/codecontests/src/seed.py
- Command line
-
hf download hf://datasets/Gen-Verse/RSI-Anything/code_repair/codecontests/src/seed.py
-
curl -L -o seed.py https://huggingface.co/datasets/Gen-Verse/RSI-Anything/resolve/main/code_repair/codecontests/src/seed.py
178 Bytes
| import hashlib | |
| def stable_seed(*parts): | |
| payload = ':'.join((str(part) for part in parts)) | |
| return int.from_bytes(hashlib.sha256(payload.encode()).digest()[:4], 'little') | |