INNER CODE UNIT · Python
stars_score
LiuMengxuan04/shushu-internship-tool · skills/shushu-internship-tool/scripts/shushu_internship_tool/candidate_score.py:125
def stars_score(raw: Any) -> tuple[int, str]:
stars = safe_int(raw)
if stars >= 1000:
return 10, "strong community signal"
if stars >= 200:
return 8, "good community signal"
if stars >= 50:
return 6, "some community signal"
if stars > 0:
return 3, "small community signal"
return 0, "no star signal"
def keyword_score(candidate: dict[str, Any]) -> tuple[int, list[str], str]:
agent_matches = normalize_list(candidate.get("matched_jd_terms"))
matched = list(dict.fromkeys(agent_matches))
explicit_score, source = _clamped_explicit_score(
candidate,