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