MCPcopy Index your code
hub / github.com/aymericdamien/TopDeepLearning / get_topic

Function get_topic

scripts/generate_stats.py:55–66  ·  view source on GitHub ↗
(keywords, n_pages=10)

Source from the content-addressed store, hash-verified

53 return info
54
55def get_topic(keywords, n_pages=10):
56 res = []
57 next_token = None
58 for k in keywords:
59 for i in range(1, n_pages+1):
60 time.sleep(20)
61 url = "https://github.com/topics/%s?page=%i" % (k, i)
62 r = requests.get(url)
63 info = extract_topic_info(r.content)
64 for r in info:
65 res.append(r)
66 return res
67
68def extract_topic_info(html):
69 info = []

Callers 1

generate_stats.pyFile · 0.85

Calls 1

extract_topic_infoFunction · 0.85

Tested by

no test coverage detected