Commit 56a6e149 authored by Eliss-good's avatar Eliss-good
Browse files

Merge remote-tracking branch 'origin/main' into main

parents ac6c4217 76072570
......@@ -90,6 +90,9 @@ def calc_recomendation_by_location(user_data, all_data, tags_recomendation):
for x in result_id:
if result_id.count(x) > 1:
result_id.remove(x)
for index in list(all_data.keys()):
if index not in result_id:
result_id.insert(x, index)
return result_id
......@@ -115,10 +118,6 @@ def get_recomendation_by_tags(user_id: int, all_adv=all_advertisments()):
result_id = calc_recomendation_by_tags(user_data, all_data)
return result_id
input_distance_user = {1: [10, 200]} # key - user_id, [x, y]
input_distance_data = {1: [20, 120], 2: [25, -100], 3: [10, 133], 4: [400, 300], 5: [144, 1322], 6: [122, -10],
7: [-120, 1432]} # key - id_adv
def get_recomendation_by_location(user_id: int, location_str: str):
location = location_str.split(', ')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment