Download third_party/voice/bazel_copy.py from SaylorTwift/codex: direct link, hf CLI and curl.
- Browser
- Download file 603 Bytes
-
https://huggingface.co/SaylorTwift/codex/resolve/main/third_party/voice/bazel_copy.py
- Command line
-
hf download hf://SaylorTwift/codex/third_party/voice/bazel_copy.py
-
curl -L -o bazel_copy.py https://huggingface.co/SaylorTwift/codex/resolve/main/third_party/voice/bazel_copy.py
603 Bytes
| """Copy declared library payloads while keeping a real native-search directory.""" | |
| from pathlib import Path | |
| import shutil | |
| import sys | |
| def copy_payloads(locator, pairs): | |
| if len(pairs) % 2: | |
| raise ValueError("library copies require source/destination pairs") | |
| Path(locator).mkdir(parents=True, exist_ok=True) | |
| for source, destination in zip(pairs[::2], pairs[1::2], strict=True): | |
| output = Path(destination) | |
| output.parent.mkdir(parents=True, exist_ok=True) | |
| shutil.copyfile(source, output) | |
| if __name__ == "__main__": | |
| copy_payloads(sys.argv[1], sys.argv[2:]) | |