Spaces:
Runtime error
Runtime error
Update scripts/leetcode_fetch.py
Browse files
scripts/leetcode_fetch.py
CHANGED
|
@@ -2,12 +2,13 @@ import json
|
|
| 2 |
import os
|
| 3 |
|
| 4 |
def run_lc_sync(mode):
|
| 5 |
-
#
|
| 6 |
-
|
| 7 |
-
daily_data = {"id": 1, "title": "Example Problem", "difficulty": "Medium"}
|
| 8 |
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
return
|
|
|
|
| 2 |
import os
|
| 3 |
|
| 4 |
def run_lc_sync(mode):
|
| 5 |
+
# Your LeetCode logic here...
|
| 6 |
+
output_filename = f"lc_{mode}_data.json"
|
|
|
|
| 7 |
|
| 8 |
+
# Dummy data for example
|
| 9 |
+
data = {"status": "success", "mode": mode, "problems": []}
|
| 10 |
+
|
| 11 |
+
with open(output_filename, "w") as f:
|
| 12 |
+
json.dump(data, f)
|
| 13 |
|
| 14 |
+
return os.path.abspath(output_filename)
|