Datasets:
Download files/label_cipher.py from bacool/gaia-agent-practice-set: direct link, hf CLI and curl.
- Browser
- Download file 310 Bytes
-
https://huggingface.co/datasets/bacool/gaia-agent-practice-set/resolve/main/files/label_cipher.py
- Command line
-
hf download hf://datasets/bacool/gaia-agent-practice-set/files/label_cipher.py
-
curl -L -o label_cipher.py https://huggingface.co/datasets/bacool/gaia-agent-practice-set/resolve/main/files/label_cipher.py
310 Bytes
| """Toy obfuscation used to tag warehouse labels. Not cryptography.""" | |
| KEY = "orbit" | |
| def encode(word): | |
| out = [] | |
| for i, ch in enumerate(word): | |
| shift = ord(KEY[i % len(KEY)]) - ord("a") | |
| out.append(chr((ord(ch) - ord("a") + shift + i) % 26 + ord("a"))) | |
| return "".join(reversed(out)) | |