CoolFace
Apppublic

Quadratic-Labs/PrivateNearestNeighbors-FHE

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes
network.py19 linesDownload Raw Back to root
1import geopandas as gpd2import config3import numpy4 5 6def get():7    all_restaurants = gpd.read_file(config.restaurants_filepath)8    all_restaurants = all_restaurants.dropna(subset=["name", "cuisine"])9    sub_restaurants = all_restaurants.sample(10        config.total_restaurants_number, random_state=4211    )12    point_coordinates = [13        list([int(point.coords[0][0]) % 10000, int(point.coords[0][1]) % 10000])14        for point in sub_restaurants["geometry"].to_crs("epsg:2154")15    ]16    point_coordinates = numpy.array(point_coordinates)17 18    return sub_restaurants, point_coordinates19