Created
April 13, 2022 18:46
-
-
Save Geremie/be9568e3043ea34db6fc80ec8630130a to your computer and use it in GitHub Desktop.
Manage your Private Python Packages with Artifact Registry (Part 1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| from mypythonlib import myfunctions | |
| def main(request): | |
| decoded_request = json.loads(request.get_data().decode('utf-8')) | |
| x1 = decoded_request.get('x1') | |
| y1 = decoded_request.get('y1') | |
| x2 = decoded_request.get('x2') | |
| y2 = decoded_request.get('y2') | |
| haversine_distance = myfunctions.haversine(x1, y1, x2, y2) | |
| print(f'The haversine distance between ({x1}, {y1}) and ({x2}, {y2}) est {haversine_distance}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment