-
Notifications
You must be signed in to change notification settings - Fork 10
/
latlong.py
370 lines (365 loc) · 14.9 KB
/
latlong.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
import re
def egal(password, dbpass):
if hashh.verify(password, dbpass) == True :
return True
else:
return False
def validatorE(email, pseudo, password, tel, telf, pass1, pass2):
if (None in [re.match('[\w.-]+@[\w.-]+', email), re.match("(\w{3,}$)+", pseudo), re.match(".{6,}", password), re.match("0[5-7][5-9][0-9]{7}$", tel), re.match("0[2-4][0-9]{7}$", telf) ]) or (pass1 != pass2):
return True
else:
return False
def validatorP(email, pseudo, password, tel, pass1, pass2, nom, prenom, daten, sexe):
if (None in [re.match('[\w\-]+@[\w]', email), re.match("(\w{3,}$)+", pseudo), re.match(".{6,}", password), re.match("0[5-7][5-9][0-9]{7}$", tel)]) or (pass1 != pass2) or ("" in (nom, prenom, daten, sexe)):
return True
else:
return False
# please add you city here using google earth/maps or open street maps
def villes(ville):
villes = {"Adrar": (27.875251, -0.283310),
"Charouine": (29.005776, -0.250343),
"Reggane": (26.722861, 0.172734),
"Tit": (26.992504, 1.480426),
"Timimoun": (29.264922, 0.238668),
"Tamantit": (27.758613, -0.272321),
"Akabli": (26.713043, 1.337569),
"Aougrout": (28.760422, 0.255151),
"Bordj Badji Mokhtar": (21.323433, 0.963942),
"Ain Benian": (36.802124, 2.921772),
"Ain Defla": (36.264055, 1.964528),
"El Abadia": (36.267380, 1.689217),
"El Attaf": (36.223105, 1.677492),
"Khemis Miliana": (36.258527, 2.222184),
"Miliana": (36.311632, 2.233173),
"Ain Temouchent": (35.305392, -1.140453),
"Beni Saf": (35.300911, -1.387706),
"El Amria": (35.529118, -1.019574),
"Alger": (36.761548, 3.035371),
"Dar El Beida": (36.705374, 3.208808),
"Reghaia": (36.742769, 3.332412),
"Staoueli": (36.743869, 2.914905),
"Annaba": (36.906544, 7.749657),
"El Hadjar": (36.805516, 7.738668),
"Ain Berda": (36.651519, 7.584821),
"Batna": (35.551456, 6.189217),
"NGaous": (35.552687, 5.606725),
"Ain Yagout": (35.778947, 6.414492),
"Seggana": (35.364886, 5.606725),
"Barika": (35.386148, 5.374624),
"Ain Touta": (35.378315, 5.892388),
"Timgad": (35.488894, 6.480426),
"Bechar": (31.623186, -2.217376),
"Meridja": (31.548320, -2.942651),
"Beni Abbes": (30.133446, -2.167926),
"Mechraa Houari Boumedienne": (30.777465, -2.871223),
"Kenadsa": (31.557682, -2.420673),
"Igli": (30.446522, -2.288805),
"Tabelbala": (29.394247, -3.261332),
"Taghit": (30.918948, -2.025069),
"El Ouata": (29.847958, -1.843750),
"Kerzaz": (29.456456, -1.442651),
"Tamtert": (29.914646, -1.893201),
"Beni Ounif": (32.038513, -1.244849),
"Bejaia": (36.757150, 5.073832),
"Souk El Tenine": (36.614009, 5.344410),
"Tichy": (36.669134, 5.156250),
"Akbou": (36.466312, 4.535371),
"Tazmalt": (36.381251, 4.402273),
"SidiAich": (36.611870, 4.689217),
"El Kseur": (36.686746, 4.859547),
"Kherrata": (36.492798, 5.277129),
"Ain Naga": (28.422712, -7.519574),
"Biskra": (34.865074, 5.733173),
"Ouled Djellal": (34.431423, 5.084821),
"Ourlal": (34.648535, 5.524382),
"Sidi Khaled": (34.395183, 4.996909),
"Sidi Okba": (34.752365, 5.908997),
"Tolga": (34.729804, 5.376030),
"Blida": (36.475142, 2.832074),
"Chrea": (36.434263, 2.881944),
"El Affroun": (36.466273, 2.618256),
"Boufarik": (36.572200, 2.914492),
"Larbaa": (36.563381, 3.139766),
"Ain Taghrout": (36.131165, 5.066988),
"Ain Tesra": (36.030239, 5.083468),
"Bordj Bou Arreridj": (36.072373, 4.766140),
"El Achir": (36.065745, 4.623387),
"El Anasser": (36.031349, 4.826647),
"El Hamadia": (35.974687, 4.749657),
"El Mhir": (36.122298, 4.388539),
"Mansoura": (36.079055, 4.469569),
"Ras El Oued": (35.964734, 5.039520),
"Sidi Embarek": (36.104560, 4.902183),
"Tixter": (36.046884, 5.082095),
"Ain Bessem": (36.298359, 3.661745),
"Bir Ghbalou": (36.259629, 3.570006),
"Bouira": (36.377962, 3.881525),
"Dirrah": (35.995828, 3.754039),
"El Asnam": (36.322675, 4.010861),
"Lakhdaria": (36.569938, 3.574126),
"MChedallah": (36.354732, 4.273176),
"Sour El Ghouzlane": (36.152208, 3.683723),
"Bordj Menaiel": (36.746068, 3.725198),
"Boudouaou": (36.725174, 3.414815),
"Boumerdes": (36.765857, 3.480737),
"Dellys": (36.915322, 3.908997),
"Issers": (36.721956, 3.672734),
"Naciria": (36.747167, 3.835068),
"Thenia": (36.717556, 3.557349),
"Zemmouri": (36.799926, 3.568633),
"Boukadir": (36.067936, 1.123283),
"Bouzeghaia": (36.342593, 1.244162),
"Chlef": (36.165506, 1.332074),
"Oued Fodda": (36.187664, 1.540865),
"Ouled Fares": (36.227532, 1.233173),
"Tenes": (36.514862, 1.310096),
"Ain Abid": (36.231961, 6.947459),
"Constantine": (36.360279, 6.606799),
"El Khroub": (36.271807, 6.694712),
"Ibn Ziad": (36.385670, 6.465086),
"Zighoud Youcef": (36.530253, 6.712294),
"Ain Oussara": (35.448649, 2.908997),
"Benhar": (35.488894, 3.051854),
"Birine": (35.622896, 3.233173),
"Djelfa": (34.680149, 3.249657),
"Hassi Bahbah": (35.076546, 3.024382),
"Messad": (34.159232, 3.513393),
"Berriane": (32.858860, 3.744162),
"El Guerrara": (32.794249, 4.507898),
"El Golea": (30.597952, 2.914492),
"Ghardaia": (32.493648, 3.678228),
"Sebseb": (32.164137, 3.606799),
"Zelfana": (32.410225, 4.233173),
"Guelma": (36.466312, 7.430975),
"Heliopolis": (36.503785, 7.447051),
"Nechmaya": (36.614009, 7.517093),
"Oued Zenati": (36.320479, 7.161745),
"Ras El Agba": (36.372412, 7.221817),
"Tamlouka": (36.155545, 7.140788),
"Jijel": (36.823095, 5.766140),
"El Aouana": (36.779138, 5.606799),
"Ziama Mansouriah": (36.666860, 5.479001),
"Taher": (36.774741, 5.903503),
"El Milia": (36.757150, 6.277129),
"El Ancer": (36.809911, 6.161745),
"Babar": (35.157390, 7.112294),
"Baghai": (35.514716, 7.132548),
"Djellal": (34.914839, 6.897700),
"Fais": (35.510247, 6.811177),
"Kais": (35.496840, 6.927914),
"Khenchela": (35.439703, 7.150755),
"Tamza": (35.312268, 6.823538),
"Laghouat": (33.813181, 2.870536),
"Ksar El Hirane": (33.804055, 3.139766),
"Hassi Delaa": (33.419886, 3.381525),
"Hassi RMel": (32.946471, 3.178228),
"Ain Madhi": (33.790364, 2.271635),
"Tadjemout": (33.895269, 2.518887),
"Brida": (33.968169, 1.733173),
"Taouila": (33.867915, 1.837569),
"Tadjrouna": (33.438219, 1.996909),
"Aflou": (34.118326, 2.101305),
"Mascara": (35.399433, 0.134272),
"Mohammadia": (35.591649, 0.068338),
"Oued El Abtal": (35.457594, 0.683723),
"Oued Taria": (35.121469, 0.090316),
"Sig": (35.533586, -0.195398),
"Tighennif": (35.417333, 0.321085),
"Ain Boucif": (35.890222, 3.161745),
"Berrouaghia": (36.138908, 2.914492),
"Boughezoul": (35.698731, 2.854052),
"Bouskene": (36.165506, 3.211195),
"Chahbounia": (35.538054, 2.606799),
"El Azizia": (36.285084, 3.485920),
"El Omaria": (36.249673, 3.018887),
"Ksar Boukhari": (35.881326, 2.755151),
"Medea": (36.262954, 2.755151),
"Tablat": (36.413314, 3.304602),
"Chelghoum Laid": (36.157761, 6.162943),
"Grarem": (36.519274, 6.326580),
"Mila": (36.453066, 6.266140),
"Oued Athmania": (36.249673, 6.288118),
"Tadjenanet": (36.120081, 5.988524),
"Chelghoum Laid": (36.157761, 6.162943),
"Ain Boudinar": (36.005820, 0.186004),
"Bouguirat": (35.754525, 0.254673),
"Fornaka": (35.742273, -0.025496),
"Mostaganem": (35.936960, 0.096735),
"Oued El Kheir": (35.951404, 0.379650),
"Sidi Ali": (36.098994, 0.414492),
"Sidi Lakhdar": (36.165506, 0.441964),
"Ain El Hadjel": (35.663148, 3.896870),
"Ain El Melh": (34.847051, 4.172734),
"BouSaada": (35.220212, 4.183723),
"Magra": (35.634153, 5.095829),
"MSila": (35.712106, 4.551854),
"Ouled Derradj": (35.691018, 4.768965),
"Sidi Aissa": (35.890222, 3.777129),
"Slim": (34.896605, 3.733173),
"Tarmount": (35.819024, 4.299107),
"Ain Ben Khelil": (33.296037, -0.766827),
"Ain Sefra": (32.766544, -0.574519),
"Kasdir": (33.712743, -1.387706),
"Mecheria": (33.561864, -0.277816),
"Naama": (33.268491, -0.305288),
"Sfissifa": (34.150143, 0.540865),
"Tiout": (32.775780, -0.404190),
"Hassi Ben Abdellah": (32.057135, 5.529876),
"Hassi Messaoud": (31.716682, 6.057349),
"NGoussa": (32.140887, 5.321085),
"Ouargla": (31.950006, 5.326580),
"Touggourt": (33.116830, 6.073832),
"Ammi Moussa": (35.863531, 1.106799),
"Mendes": (35.648652, 0.874066),
"Oued Rhiou": (35.970243, 0.919986),
"Relizane": (35.747761, 0.557349),
"Sidi Khettab": (35.903620, 0.527975),
"Sidi MHamed Ben Ali": (36.147775, 0.843063),
"Yellel": (35.725478, 0.348558),
"Ain El Hadjar": (34.761387, 0.150755),
"Ain Soltane": (34.998079, 0.309608),
"Moulay Larbi": (34.646544, 0.015705),
"Saida": (34.833531, 0.156250),
"Sidi Amar": (35.020562, 0.118709),
"Sidi Boubekeur": (35.010445, -0.076311),
"Ain Arnat": (36.182133, 5.311449),
"Ain Azel": (35.819024, 5.518887),
"Ain Lahdjar": (35.939134, 5.540865),
"Ain Oulmene": (35.924737, 5.297715),
"Belaa": (36.209816, 5.859547),
"Djemila": (36.307195, 5.739943),
"El Eulma": (36.152208, 5.700206),
"Hammam Soukhna": (35.984724, 5.789384),
"Mezloug": (36.108995, 5.340290),
"Salah Bey": (35.845796, 5.286728),
"Setif": (36.187664, 5.408997),
"Tizi NBechar": (36.433159, 5.348530),
"Marhoum": (34.445010, -0.195398),
"Ras El Ma": (34.503857, -0.816277),
"Sfisef": (35.238152, -0.250343),
"Sidi Ali Boussidi": (35.103503, -0.827266),
"Sidi Bel Abbes": (35.193294, -0.634959),
"Ain Bouziane": (36.591977, 6.750749),
"Ain Charchar": (36.735072, 7.231431),
"Ain Kechra": (36.748353, 6.436470),
"Azzaba": (36.741669, 7.113320),
"Collo": (37.003053, 6.562843),
"El Harrouch": (36.651519, 6.843063),
"Salah Bouchaour": (36.719674, 6.901820),
"Sidi Mezghiche": (36.675665, 6.717788),
"Skikda": (36.880201, 6.908997),
"Tamalous": (36.833980, 6.635385),
"Souk Ahras": (36.289509, 7.958448),
"Sedrata": (36.125606, 7.535371),
"Tiffech": (36.196531, 7.812370),
"Zaarouria": (36.226426, 7.959321),
"Taoura": (36.168840, 8.051337),
"Mdaourouch": (36.069072, 7.821983),
"Sidi Fredj": (36.766956, 2.872331),
"Tamanrasset": (22.775631, 5.529876),
"Abalessa": (22.876967, 4.843063),
"In Ghar": (27.100179, 1.903503),
"In Guezzam": (19.540762, 5.771635),
"In Salah": (27.193087, 2.513393),
"In Amguel": (23.684889, 5.156250),
"Tebessa": (35.408384, 8.123283),
"Bir elAter": (34.738829, 8.062843),
"Cheria": (35.274020, 7.755151),
"El Aouinet": (35.867980, 7.892514),
"Negrine": (34.481229, 7.601305),
"Morsott": (35.667513, 8.013393),
"El Ogla": (35.193294, 7.463942),
"Bekkaria": (35.363621, 8.249657),
"Ouenza": (35.965800, 8.123283),
"Ferkane": (34.558141, 7.414492),
"Ain Deheb": (34.851557, 1.546360),
"Ain Kermes": (34.910114, 1.106799),
"Dahmouni": (35.426282, 1.474931),
"Frenda": (35.067559, 1.046360),
"Ksar Chellala": (35.220212, 2.321085),
"Mahdia": (35.430756, 1.749657),
"Rahouia": (35.533586, 1.018887),
"Sougueur": (35.184319, 1.491415),
"Tiaret": (35.372576, 1.315591),
"Tindouf": (27.690516, -8.162431),
"Tipaza": (36.594241, 2.452953),
"Hadjout": (36.514862, 2.414492),
"Gouraya": (36.572200, 1.903503),
"Cherchell": (36.603056, 2.189217),
"Bou Ismail": (36.641540, 2.686925),
"Kolea": (36.638305, 2.766140),
"Boucaid": (35.893615, 1.621184),
"Bordj Bou Naama": (35.850245, 1.615690),
"Khemisti": (35.667608, 1.961781),
"Lardjem": (35.723335, 1.562128),
"Layoune": (35.696591, 2.000236),
"Sidi Abed": (35.742273, 1.742041),
"Theniet El Had": (35.865816, 2.030450),
"Tissemsilt": (35.605042, 1.815591),
"Tizi Ouzou": (36.713155, 4.051854),
"Ain El Hammam": (36.569938, 4.308883),
"Freha": (36.746068, 4.315750),
"Mechtras": (36.546791, 4.009487),
"Draa El Mizan": (36.535766, 3.818588),
"Iferhounene": (36.525843, 4.351458),
"Azazga": (36.743954, 4.365041),
"Yakouren": (36.730756, 4.441964),
"Beni Douala": (36.616212, 4.079529),
"Bouzguen": (36.591977, 4.513517),
"Ouadhia": (36.554508, 4.085023),
"Azeffoun": (36.893374, 4.414492),
"Tigzirt": (36.888983, 4.117788),
"Boghni": (36.545742, 3.936470),
"Ifigha": (36.672363, 4.398153),
"Tirmitine": (36.655852, 3.980646),
"Beni Ziki": (36.519226, 4.502530),
"Draa Ben Khedda": (36.727373, 4.019101),
"Idjeur": (36.681167, 4.562958),
"Mekla": (36.683368, 4.270429),
"Beni Yenni": (36.564428, 4.211374),
"Tadmait": (36.750466, 3.903737),
"Tlemcen": (34.878589, -1.316277),
"Remchi": (35.058570, -1.426168),
"Sabra": (34.824517, -1.525069),
"Ghazaouet": (35.099011, -1.854739),
"Ouled Mimoun": (34.905611, -1.030563),
"Bab El Assa": (34.968629, -2.041552),
"Bensekrane" :(35.072053,-1.228365),
"Maghnia": (34.847051,-1.722871),
"Hammam Boughrara": (34.892327,-1.652948),
"Sebdou": (34.644018,-1.321772),
"El Bayadh": (33.685330,1.007898),
"Brezina": (33.103029,1.249657),
"Ghassoul": (33.378623,1.161745),
"El Abiodh Sidi Cheikh": (32.895760,0.546360),
"Chellala": (33.038598,0.068338),
"Kraakda": (33.337340,0.947459),
"Tousmouline": (33.616760,0.167239),
"El Oued": (33.369451,6.865041),
"Guemar": (33.497774,6.793613),
"Hassi Khalifa": (33.612187,7.040865),
"Djamaa": (33.548134,5.991415),
"Ain Kerma": (36.638305,8.205701),
"Ben Mehidi": (36.770344,7.903503),
"Besbes": (36.699952,7.854052),
"Drean": (36.686746,7.755151),
"El Kala": (36.902154,8.441964),
"El Tarf": (36.765946,8.310096),
"Djanet": (24.562798,9.485920),
"Illizi": (26.487007,8.474931),
"In Amenas": (28.049970,9.551854),
"Oran": (35.703189,-0.634959),
"Gdyel": (35.792308,-0.420673),
"Es Senia": (35.649670,-0.623970),
"Arzew": (35.867980,-0.310783),
"Tafraoui": (35.490136,-0.515792),
"BouSfer": (35.705507,-0.815188),
"Misserghin": (35.618433,-0.739354),
"Boutlelis": (35.575015,-0.900338),
"Oum el Bouaghi": (35.872429,7.112294),
"Ain Beida": (35.801214,7.398008),
"Ain Mlila": (36.041304,6.573832),
"Ksar Sbahi": (36.081248, 7.260646),
"Ain Fakroun": (35.974687, 6.876030),
}
return villes[ville]