This commit is contained in:
Aleksandr Dubchak 2026-04-23 00:04:11 +03:00
parent 2b5d923f63
commit 98d5e90894
754 changed files with 1175740 additions and 142424 deletions

16
Mind2Web/loader.py Normal file
View file

@ -0,0 +1,16 @@
import json
from typing import List, Dict, Any
def load_tasks(path: str, limit: int | None = None, offset: int = 0) -> List[Dict[str, Any]]:
with open(path, "r", encoding="utf-8") as f:
data = json.load(f)
if not isinstance(data, list):
raise ValueError("Ожидался список задач в JSON")
sliced = data[offset:]
if limit is not None:
sliced = sliced[:limit]
return sliced