from pathlib import Path
import os
from concurrent.futures import ThreadPoolExecutor
import matplotlib
matplotlib.use("Agg")  

BASE_DIR = Path(__file__).resolve().parents[1]
STORE_DIR = BASE_DIR / "store"
STORE_DIR.mkdir(parents=True, exist_ok=True)

EXECUTOR = ThreadPoolExecutor(max_workers=os.cpu_count() or 4)
