axionx-demo / shared /utils.py
deepsodha's picture
Upload 25 files
beb5479 verified
raw
history blame contribute delete
440 Bytes
import yaml
import os
from pathlib import Path
def load_yaml_config(path: str):
"""Load YAML config file safely."""
with open(path, "r") as f:
return yaml.safe_load(f)
def ensure_dir(path: str):
"""Create directory if it doesn't exist."""
Path(path).mkdir(parents=True, exist_ok=True)
def print_banner(title: str):
print("=" * (len(title) + 8))
print(f"=== {title} ===")
print("=" * (len(title) + 8))