-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelper.py
71 lines (63 loc) · 1.53 KB
/
helper.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import random
import requests
import json
def random_countries(n):
countries = []
for x in range (0, n):
countries.append(countries_arr[random.randint(1,5)][1])
return countries
def random_coords(n):
coords = []
for x in range (0, n):
coords.append((random.random()*2.0, random.random()*2.0))
return coords
def get_random_coords_db():
api_url = "http://127.0.0.1:5001/random_loc"
response = requests.get(api_url)
coords = response.json()
return coords
mobile_os = [ "Android", "iOS"]
countries_arr = [
('US', 'United States'),
('AR', 'Argentina'),
('AM', 'Armenia'),
('AW', 'Aruba'),
('AU', 'Australia'),
('DE', 'Germany'),
('GH', 'Ghana'),
('GI', 'Gibraltar'),
('GR', 'Greece'),
('HU', 'Hungary'),
('IS', 'Iceland'),
('IN', 'India'),
('ID', 'Indonesia'),
('IR', 'Iran'),
('IQ', 'Iraq'),
('IE', 'Ireland'),
('IL', 'Israel'),
('IT', 'Italy'),
('JM', 'Jamaica'),
('JP', 'Japan'),
('JO', 'Jordan'),
('KZ', 'Kazakhstan'),
('LY', 'Libya'),
('LI', 'Liechtenstein'),
('LT', 'Lithuania'),
('MY', 'Malaysia'),
('MV', 'Maldives'),
('ML', 'Mali'),
('MT', 'Malta'),
('MX', 'Mexico'),
('FM', 'Micronesia'),
('MD', 'Moldova'),
('NG', 'Nigeria'),
('QA', 'Qatar'),
('RO', 'Romania'),
('RU', 'Russian Federation'),
('SG', 'Singapore'),
('SK', 'Slovakia'),
('SI', 'Slovenia'),
('UA', 'Ukraine'),
('AE', 'United Arab Emirates'),
('UK', 'United Kingdom')
]