import urllib.request, json, os, sys def fetch_raw(owner, repo, path): url = f'https://raw.githubusercontent.com/{owner}/{repo}/main/{path}' try: with urllib.request.urlopen(url) as resp: return resp.read().decode('utf-8') except Exception as e: return f'ERROR: {e}' files = [ ('ticketguy', 'littlefig', 'benchmark/benchmark_gpu.py'), ('ticketguy', 'littlefig', 'cogmembench/runner.py'), ('ticketguy', 'littlefig', 'cogmembench/scorer.py'), ('ticketguy', 'littlefig', 'src/little_fig/engine/memory_fabric.py'), ('ticketguy', 'littlefig', 'src/little_fig/engine/model.py'), ('ticketguy', 'littlefig', 'pyproject.toml'), ('ticketguy', 'Lila', 'src/main.py'), ('ticketguy', 'Lila', 'README.md'), ('ticketguy', 'embers-diaries', 'pyproject.toml'), ] for owner, repo, path in files: content = fetch_raw(owner, repo, path) out_path = f'/tmp/{repo}_{path.replace("/", "_")}' with open(out_path, 'w') as f: f.write(content) print(f'Wrote {out_path} ({len(content)} chars)')