Organized indentation

This commit is contained in:
wilsonfreitas
2022-03-30 06:11:03 -03:00
parent 49441d3d7f
commit 4b209b82c1
3 changed files with 71 additions and 67 deletions
+2
View File
@@ -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)
+1
View File
@@ -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)
+2 -1
View File
@@ -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)