Skip to content

Instantly share code, notes, and snippets.

@Geremie
Created April 13, 2022 18:46
Show Gist options
  • Save Geremie/be9568e3043ea34db6fc80ec8630130a to your computer and use it in GitHub Desktop.
Save Geremie/be9568e3043ea34db6fc80ec8630130a to your computer and use it in GitHub Desktop.
Manage your Private Python Packages with Artifact Registry (Part 1)
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