diff --git a/src/tasks/ranks.py b/src/tasks/ranks.py index 8d89642c306759f91030bc78ab680fa5a817a2a6..ee02bcdbb4fc7edd9de5f99ff60c9b42bc63e6ec 100644 --- a/src/tasks/ranks.py +++ b/src/tasks/ranks.py @@ -43,16 +43,6 @@ def load_repo_github_popular_trends(config, ctx): def load_repo_github_user_info(config, ctx): - - # bar = None - - # def show_pd_read_excel_progress(cur, tt): - # global bar - # if bar is None: - # bar = IncrementalBar("@开始加载用户仓库贡献表:", max=tt) - # else: - # bar.next(1) - schema = config["schema"] df = pd.read_excel( schema["repo_github_user_info"]["file"], @@ -221,15 +211,14 @@ def rank_personal_top_n(config, ctx): location = person['location'] if location is not None and type(location) == type(""): - # results = process.extract( - # location, district_pinyin_list, limit=1, scorer=fuzz.token_sort_ratio) - # print(results, location) parts = location.split(",") for part in parts: if district_pinyin_dict.get(part.strip().lower()) is not None: person["country"] = "china" - if person.get("country") is None: - person["country"] = "international" + if person.get("country") is None: + person["country"] = "international" + else: + person["country"] = "Null" # 用户统计数据 person['all_repo_contribute_total'] = int(row['sum_total'])