def score_to_hundred(self, project: scoring_base.ScoringProject) -> float: market_stress = project.market_stress() if not market_stress: raise scoring_base.NotEnoughDataException() if market_stress == 1000: return 0 return 1 / market_stress * 100
def _num_interviews_increase(self, project: scoring_base.ScoringProject) -> float: """Compute the increase (in ratio) of # of interviews that one could hope for.""" if project.details.total_interviews_estimate >= project_pb2.A_LOT or \ project.details.total_interview_count > 20: return 0 job_search_length_weeks = project.get_search_length_at_creation() * 52 / 12 num_applicants_per_offer = project.market_stress() or 2.85 weekly_applications = _APPLICATION_PER_WEEK.get( project.details.weekly_applications_estimate, 0) num_applications = job_search_length_weeks * weekly_applications num_potential_interviews = num_applications / num_applicants_per_offer return num_potential_interviews / (self._num_interviews(project) or 1)