Пример #1
0
 def remove_unreachable_projects(recommended_projects, ip_address):
     user_loc = get_user_loc(ip_address)
     return [
         project for project in recommended_projects
         if is_project_reachable_to_user(user_loc, project)
     ]
Пример #2
0
 def remove_unreachable_projects(projects_score, ip_address):
     user_loc = get_user_loc(ip_address)
     for project in projects_score.index:
         if not is_project_reachable_to_user(user_loc, project):
             projects_score = projects_score.drop(project)
     return projects_score