File size: 1,080 Bytes
d313aab
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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)

# Little Fig key files
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)