Datasets:
Download accentdesign--gcss.3b5aa22/solution/solve.sh from ProgramGym/programgym-1648: direct link, hf CLI and curl.
- Browser
- Download file 851 Bytes
-
https://huggingface.co/datasets/ProgramGym/programgym-1648/resolve/main/accentdesign--gcss.3b5aa22/solution/solve.sh
- Command line
-
hf download hf://datasets/ProgramGym/programgym-1648/accentdesign--gcss.3b5aa22/solution/solve.sh
-
curl -L -o solve.sh https://huggingface.co/datasets/ProgramGym/programgym-1648/resolve/main/accentdesign--gcss.3b5aa22/solution/solve.sh
851 Bytes
| # Oracle-only ceiling check. The reference is execute-only for normal agents; | |
| # because the oracle runs as the owning `agent` user it can temporarily add read | |
| # permission and encode the binary for Harbor's normal artifact handoff. | |
| set -euo pipefail | |
| test -f ./executable | |
| chmod u+r ./executable | |
| python3 - <<'PY' | |
| import base64 | |
| from pathlib import Path | |
| Path(".programgym_oracle_reference").write_bytes( | |
| base64.b64encode(Path("executable").read_bytes()) | |
| ) | |
| PY | |
| chmod u-r ./executable | |
| cat > compile.sh <<'EOF' | |
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| if [ -f ./.programgym_oracle_reference ]; then | |
| python3 - <<'PY' | |
| import base64 | |
| from pathlib import Path | |
| Path("executable").write_bytes( | |
| base64.b64decode(Path(".programgym_oracle_reference").read_bytes()) | |
| ) | |
| PY | |
| fi | |
| test -f ./executable | |
| chmod +x ./executable | |
| EOF | |
| chmod +x compile.sh | |