redrob-ranker / features /github.py
Ritesh Routray
Add full Phase B ranking pipeline with Gradio app
e11aeff
Raw
History Blame Contribute Delete
463 Bytes
def score(candidate: dict) -> float:
signals = candidate.get("redrob_signals", {}) or {}
gh = signals.get("github_activity_score")
if gh is None or gh == -1:
return 0.25
gh = float(gh)
if gh < 0:
return 0.25
elif gh <= 69.0:
return round(gh / 100.0, 6)
else:
return round(0.80 + (gh - 70.0) / 30.0 * 0.20, 6)