| import urllib.request, json, textwrap |
|
|
| 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}' |
|
|
| def show(owner, repo, path, limit=300): |
| content = fetch_raw(owner, repo, path) |
| print(f'\n{"="*70}') |
| print(f'{owner}/{repo}/{path}') |
| print('='*70) |
| lines = content.split('\n') |
| if len(lines) > limit: |
| print('\n'.join(lines[:limit])) |
| print(f'\n... [{len(lines) - limit} more lines] ...') |
| else: |
| print(content) |
|
|
| |
| show('ticketguy', 'littlefig', 'benchmark/benchmark_gpu.py', 400) |
| show('ticketguy', 'littlefig', 'cogmembench/runner.py', 300) |
| show('ticketguy', 'littlefig', 'cogmembench/scorer.py', 300) |
| show('ticketguy', 'littlefig', 'src/little_fig/engine/memory_fabric.py', 300) |
| show('ticketguy', 'littlefig', 'src/little_fig/engine/model.py', 300) |
| show('ticketguy', 'littlefig', 'pyproject.toml', 100) |
|
|