Spaces:
Runtime error
Runtime error
Download scripts/leetcode_fetch.py from ascend-web/fetch-data: direct link, hf CLI and curl.
- Browser
- Download file 348 Bytes
-
https://huggingface.co/spaces/ascend-web/fetch-data/resolve/main/scripts/leetcode_fetch.py
- Command line
-
hf download hf://spaces/ascend-web/fetch-data/scripts/leetcode_fetch.py
-
curl -L -o leetcode_fetch.py https://huggingface.co/spaces/ascend-web/fetch-data/resolve/main/scripts/leetcode_fetch.py
348 Bytes
| import json | |
| import os | |
| def run_lc_sync(mode): | |
| # Your LeetCode logic here... | |
| output_filename = f"lc_{mode}_data.json" | |
| # Dummy data for example | |
| data = {"status": "success", "mode": mode, "problems": []} | |
| with open(output_filename, "w") as f: | |
| json.dump(data, f) | |
| return os.path.abspath(output_filename) |