interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / tools / dx / recount.sh

26 lines · 1422 bytes Raw Blame History
1#!/bin/sh
2# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3# Re-run the GitHub issue search counts behind docs/PAIN_POINTS.md and print then and now.
4# usage: tools/dx/recount.sh [evidence/dx/pain-points/counts.json]
5# Uses GitHub's public search API (unauthenticated: about 10 searches a minute, so it waits 7 s between
6# them). Entries that were not GitHub searches (Stack Overflow, Hacker News) are listed, not rerun.
7F=${1:-evidence/dx/pain-points/counts.json}
8python3 - "$F" <<'PY'
9import json, sys, time, urllib.request, urllib.parse
10for r in json.load(open(sys.argv[1])):
11 api = r.get('api') or ''
12 if 'api.github.com' not in api and not api.startswith('search/issues'):
13 if r['query'].startswith('GitHub search/issues q='):
14 q = r['query'].split('q=', 1)[1]
15 api = 'https://api.github.com/search/issues?per_page=1&q=' + urllib.parse.quote(q)
16 else:
17 print(f"{r.get('total')!s:>8} (not rerun) {r['query']}"); continue
18 if api.startswith('search/'): api = 'https://api.github.com/' + api
19 try:
20 with urllib.request.urlopen(urllib.request.Request(api, headers={'Accept': 'application/vnd.github+json'}), timeout=30) as h:
21 now = json.load(h).get('total_count')
22 except Exception as e:
23 now = f'error {e}'
24 print(f"{r.get('total')!s:>8} -> {now!s:<8} {r['query']} (then: {r.get('run_at')})")
25 time.sleep(7)
26PY