mirror of
https://github.com/wilsonfreitas/awesome-quant.git
synced 2026-07-27 20:07:50 +00:00
Organized indentation
This commit is contained in:
@@ -60,6 +60,7 @@ urls = [
|
||||
'https://cran.r-project.org/web/packages/bizdays/index.html',
|
||||
]
|
||||
|
||||
|
||||
def get_data(url):
|
||||
res = requests.get(url)
|
||||
m = reu.search(res.text)
|
||||
@@ -68,6 +69,7 @@ def get_data(url):
|
||||
else:
|
||||
return dict(cran=url, github='', repo='')
|
||||
|
||||
|
||||
all_data = [get_data(url) for url in urls]
|
||||
df = pd.DataFrame(all_data)
|
||||
df.to_csv('cran.csv', index=False)
|
||||
|
||||
@@ -10,6 +10,7 @@ from github import Github
|
||||
# using an access token
|
||||
g = Github(os.environ['GITHUB_ACCESS_TOKEN'])
|
||||
|
||||
|
||||
def extract_repo(url):
|
||||
reu = re.compile('^https://github.com/([\w-]+/[-\w\.]+)$')
|
||||
m = reu.match(url)
|
||||
|
||||
@@ -21,4 +21,5 @@ repos = g.search_repositories(query=f'topic:{topic}')
|
||||
for repo in repos:
|
||||
if repo.stargazers_count < 1000:
|
||||
break
|
||||
print(repo.name, repo.stargazers_count, repo.language, repo.html_url, repo.description, repo.updated_at, repo.archived)
|
||||
print(repo.name, repo.stargazers_count, repo.language, repo.html_url,
|
||||
repo.description, repo.updated_at, repo.archived)
|
||||
|
||||
Reference in New Issue
Block a user