Tum 2 years ago
parent
commit
1618600ce9

+ 1 - 0
.python-version

@@ -0,0 +1 @@
1
+3.10.8

BIN
Sample.xlsx


BIN
app/Output/excel_out_test_excel_formatter_update.xlsx


+ 56 - 0
app/backend/templates/backend/gen_report.html

@@ -0,0 +1,56 @@
1
+{% extends "base_raw.html" %}
2
+{% load backend_tags %}
3
+{% block content %}
4
+<h2>Gen Report</h2>
5
+<a href="#test_result" class='btn btn-link'>Test Result</a>
6
+<a href="#mikrotik" class='btn btn-link'>Mikrotik</a>
7
+<form class='my-2'>
8
+
9
+{% for sla in  slas %}
10
+<label class='me-3'>
11
+  <input type='checkbox' name='sla_name' value='{{ sla }}' {% if sla in request.GET.sla_name %}checked{% endif %}/>{{ sla }}
12
+</label>
13
+{% endfor %}
14
+<input type='submit' name='filter' Value='Filter' class='btn btn-primary ms-3' />
15
+<a class='btn btn-danger ms-3' href="{% url 'backend:dump_fixed_results' %}?redir={{ request.path_info }}">Dump API</a>
16
+<input type='submit' name='genReport' value='Gen Report' class='btn btn-info' />
17
+{% if report_link %}
18
+  <a href="{{ report_link }}" class='btn btn-link'>Download</a>
19
+{% endif %}
20
+</form>
21
+<h1 id='test_result'>Test Result</h1>
22
+<div class='table-responsive'>
23
+  {{ tbl|safe }} 
24
+</div>
25
+<h1 id='mikrotik'>Mikrotik</h1>
26
+<h5 class='text-primary'>IP/ROUTE</h5>
27
+{% for ip in mk_ips %}
28
+<h4>{{ ip.gateway }}</h4>
29
+  <div class='d-flex flex-row justify-content-start  flex-wrap align-content-stretch mb-5'>
30
+    {% for k,v in ip.items %}
31
+      <div class='border p-3 fw-bolder'>{{ k }}</div><div class='border p-3'>{{ v }}</div>
32
+    {% endfor %}
33
+  </div>
34
+  
35
+{% endfor %}
36
+
37
+<h5 class='text-primary'>IP/Address</h5>
38
+<!-- 
39
+<pre>
40
+{{ mk_address | pprint }}
41
+</pre> -->
42
+{% for ip in mk_address %}
43
+<h4>{{ ip.interface }}</h4>
44
+  <div class='d-flex flex-row justify-content-start  flex-wrap align-content-stretch mb-5'>
45
+    {% for k,v in ip.items %}
46
+      <div class='border p-3 fw-bolder'>{{ k }}</div><div class='border p-3'>{{ v }}</div>
47
+    {% endfor %}
48
+  </div>
49
+  
50
+{% endfor %}
51
+<style>
52
+th {
53
+  text-align:center;
54
+}
55
+</style>
56
+{% endblock %}

+ 2 - 0
app/backend/urls.py

@@ -10,5 +10,7 @@ urlpatterns = [
10 10
     path('reports/', views.reports, name='reports'),
11 11
     path('service_status/', views.service_status, name='service_status'),
12 12
     path('dump_api/', views.dump_api, name='dump_api'),
13
+    path('dump_fixed_results/', views.dump_fixed_results, name='dump_fixed_results'),
13 14
     path('print_table/', views.print_table, name='print_table'),
15
+    path('gen_report/', views.gen_report, name='gen_report'), 
14 16
 ]

+ 108 - 1
app/backend/views.py

@@ -1,4 +1,4 @@
1
-from django.shortcuts import render
1
+from django.shortcuts import render, redirect
2 2
 from backend.mongodb import db
3 3
 from exfo.lib import Exfo, Mikrotik
4 4
 from pprint import pprint
@@ -7,6 +7,7 @@ from ttp import ttp
7 7
 from django.http import JsonResponse, HttpResponse
8 8
 from datetime import datetime
9 9
 from celery import shared_task
10
+from django.contrib import messages
10 11
 
11 12
 exfo = Exfo("administrator", "exf0w0rxC@t4dm!n")
12 13
 exfo.login()
@@ -249,3 +250,109 @@ def print_table(request):
249 250
 
250 251
 
251 252
     
253
+def dump_fixed_results(request):
254
+    from bson.json_util import dumps
255
+    from bson.json_util import loads
256
+    col  = db['fixed_results']
257
+    col.delete_many({})
258
+    tt = exfo.call_remote_api("/API/REST/Test/v1/TypeByName?list_all=false&size=0")
259
+    pprint(tt)
260
+    tt_json = tt.json()
261
+    temp = tt_json['result']
262
+    for t in temp:
263
+        tn = t['ids']['test_type_name']
264
+        r = exfo.call_remote_api('/API/REST/Test/v1/FixedResults/'+tn+'?sections=all&size=20&sort=verifier_id asc,time_stamp desc&time_range={"start":"1 weeks  ago","end":"now"}').json()
265
+        #pprint(r)
266
+        try:
267
+            r0 = r['result']
268
+            if len(r0) > 0:
269
+                col.insert_many(r0)
270
+        except Exception as e:
271
+            pprint(e)
272
+
273
+    # pprint(temp)
274
+    #col.insert_many(temp)
275
+    results = col.find({})
276
+    data = dumps(list(results), indent=4)
277
+    data = {'msg': 'done'}
278
+    redir = request.GET.get('redir', None)
279
+    if redir:
280
+        messages.success(request, 'Dump Fixed Results')
281
+        return redirect(redir)
282
+    # return HttpResponse(data, content_type='application/json')
283
+    return JsonResponse(data)
284
+
285
+import humanize
286
+
287
+def con_human(r):
288
+    try:
289
+        '''
290
+        if 'time' in r['header'].lower():
291
+            return r['results']
292
+        '''
293
+        x = r['results']
294
+        n = int(x)
295
+        if n > 1000:
296
+            return humanize.naturalsize(n,gnu=True)
297
+        else:
298
+            return n
299
+    except:
300
+        return r['results']
301
+def gen_report_notebook():
302
+    from datetime import datetime
303
+    import pandas as pd
304
+
305
+    c = db['fixed_results'].find()
306
+    data = []
307
+    for i in c:
308
+        #pprint(i['header'])
309
+        res = dict(zip(i['header'], i['results']))
310
+        d = {'header': i['header'], 'results': i['results'], 'output': res, 'params': i['parameters'], 'ts': i['ids']['time_stamp'], 
311
+             'dt': datetime.fromtimestamp(int(i['ids']['time_stamp'])/1000000000), 'test_type_name': i['ids']['fixed_results_url']}
312
+        d.update(i['names'])
313
+        #res.update(i['ids'])
314
+        #res.update(i[])
315
+        #pprint(d)
316
+        data.append(d)
317
+    df0 = pd.DataFrame(data)
318
+    df0 = df0.explode(["header", "results"])
319
+    df1 = df0[["header", "results", "dt", "sla_name", "test_display_name"]]
320
+    df1 = df1.query('sla_name == sla_name')
321
+    #pprint(df1['sla_name'].unique())
322
+    
323
+    #df1['results_text'] = df1['results'].apply(con_human)
324
+    df1['results_text'] = df1.apply(con_human, axis=1)
325
+    table = df1.pivot(index=['sla_name', 'dt'],columns=['test_display_name','header'], values='results_text').sort_values(by=['sla_name', 'dt'], ascending=[True, False])
326
+    table = table.dropna(how='all', axis=0)
327
+    return (table,df1)
328
+
329
+def gen_report(request):
330
+    pprint("report notebook ...")
331
+    table,df = gen_report_notebook()
332
+    slas = list(df['sla_name'].unique())
333
+    sla_name = request.GET.getlist('sla_name')
334
+    
335
+    pprint("--- sla_name ---")
336
+    pprint(sla_name)
337
+    if len(sla_name) > 0:
338
+        sla_filter = ", ".join(f"'{w}'" for w in sla_name)
339
+        table = table.query(f"sla_name in ({sla_filter})")
340
+    gen_report = request.GET.get('genReport', None)
341
+    
342
+    report_link = None
343
+    if gen_report:
344
+        import time
345
+        ts = int(time.time())
346
+        fn = f"report_{ts}.xlsx"
347
+        table.to_excel(f'/code/media/{fn}')
348
+        report_link = f'/media/{fn}'
349
+
350
+    try:
351
+        mk_ips = mkt.call_remote("ip/route") 
352
+        mk_address = mkt.call_remote("ip/address") 
353
+    except:
354
+        mk_ips = []
355
+        mk_address = []
356
+    return render(request, 'backend/gen_report.html', {'tbl': table.to_html(\
357
+        classes=["table", "table-striped", "table-bordered", "align-middle"],\
358
+        table_id="report_tbl"), 'slas': slas, 'report_link': report_link, 'mk_ips': mk_ips, 'mk_address': mk_address})

+ 4 - 4
app/exfo/lib.py

@@ -22,9 +22,9 @@ class Exfo:
22 22
         url = self.BASE_URL + "/Login"
23 23
         response = self.session.post(url, headers=headers, data=payload, verify=False)
24 24
        
25
-        pprint(self.session.cookies.get_dict())
26
-        pprint(response.text)
27
-        pprint(response.cookies)
25
+        # pprint(self.session.cookies.get_dict())
26
+        # pprint(response.text)
27
+        # pprint(response.cookies)
28 28
         #self.cookies = response.cookies
29 29
     def list_api(self):
30 30
         pprint("---- list_api ---")
@@ -34,7 +34,7 @@ class Exfo:
34 34
         }
35 35
         url = self.BASE_URL + "/"
36 36
         response = self.session.get(url, headers=headers, data=payload, verify=False)
37
-        pprint(response.json())
37
+        # pprint(response.json())
38 38
         return response
39 39
 
40 40
     def call_api(self, service, payload={}):

+ 7 - 7
app/network_report/settings.py

@@ -195,11 +195,11 @@ YARN_INSTALLED_APPS = (
195 195
 
196 196
 
197 197
 CELERY_BEAT_SCHEDULE = {
198
-    "dumpapi": {
199
-        "task": "backend.views.dump_api_task",
200
-        #"schedule": crontab(minute="*/1"),
201
-        # "schedule": crontab(minute="*/30"),
202
-        # "schedule": crontab(hour="17", minute="15"),
203
-        "schedule": crontab(minute="*/3", hour="17-21"),
204
-    },
198
+    # "dumpapi": {
199
+        # "task": "backend.views.dump_api_task",
200
+        # #"schedule": crontab(minute="*/1"),
201
+        # # "schedule": crontab(minute="*/30"),
202
+        # # "schedule": crontab(hour="17", minute="15"),
203
+        # "schedule": crontab(minute="*/3", hour="17-21"),
204
+    # },
205 205
 }

+ 6 - 0
app/templates/_messages.html

@@ -0,0 +1,6 @@
1
+{% if messages %}
2
+    {% for message in messages %}
3
+    <div{% if message.tags %} style='z-index:2000' class="alert alert-{{ message.tags }}  text-center h5 position-absolute top-50 start-50 translate-middle fs-6" {% endif %}>{{ message }}</div>
4
+    {% endfor %}
5
+{% endif %}
6
+

+ 78 - 0
app/templates/base_raw.html

@@ -0,0 +1,78 @@
1
+{% load static %}
2
+<!doctype html>
3
+<html lang="en">
4
+  <head>
5
+    <meta charset="utf-8">
6
+    <meta name="viewport" content="width=device-width, initial-scale=1">
7
+    <meta name="description" content="">
8
+    <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
9
+    <meta name="generator" content="Hugo 0.84.0">
10
+    <title>Dashboard Template · Bootstrap v5.0</title>
11
+
12
+    <link rel="canonical" href="https://getbootstrap.com/docs/5.0/examples/dashboard/">
13
+
14
+    
15
+
16
+    <!-- Bootstrap core CSS -->
17
+    <link href="{% static "bootstrap/dist/css/bootstrap.css" %}" rel="stylesheet">
18
+
19
+    <!-- Favicons -->
20
+<meta name="theme-color" content="#7952b3">
21
+
22
+
23
+    <style>
24
+      .bd-placeholder-img {
25
+        font-size: 1.125rem;
26
+        text-anchor: middle;
27
+        -webkit-user-select: none;
28
+        -moz-user-select: none;
29
+        user-select: none;
30
+      }
31
+
32
+      @media (min-width: 768px) {
33
+        .bd-placeholder-img-lg {
34
+          font-size: 3.5rem;
35
+        }
36
+      }
37
+    </style>
38
+
39
+    
40
+    <!-- Custom styles for this template -->
41
+    <link href="{% static "css/dashboard.css" %}" rel="stylesheet">
42
+  </head>
43
+  <body>
44
+    
45
+<header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
46
+  <a class="navbar-brand col-md-3 col-lg-2 me-0 px-3" href="#">Company name</a>
47
+  <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
48
+    <span class="navbar-toggler-icon"></span>
49
+  </button>
50
+  <input class="form-control form-control-dark w-100" type="text" placeholder="Search" aria-label="Search">
51
+  <div class="navbar-nav">
52
+    <div class="nav-item text-nowrap">
53
+      <a class="nav-link px-3" href="#">Sign out</a>
54
+    </div>
55
+  </div>
56
+</header>
57
+
58
+<div class="container-fluid">
59
+  <div class="row">
60
+
61
+    <main class="col-md-12 ms-sm-auto col-lg-12 px-md-4 py-3">
62
+      {% include "_messages.html" %}
63
+      {% block content %}
64
+        <h1>Content is Here</h1>
65
+      {% endblock %}
66
+    </main>
67
+  </div>
68
+</div>
69
+
70
+
71
+    <script src="{% static "bootstrap/dist/js/bootstrap.bundle.min.js" %}"></script>
72
+
73
+      <script src="https://cdn.jsdelivr.net/npm/feather-icons@4.28.0/dist/feather.min.js" integrity="sha384-uO3SXW5IuS1ZpFPKugNNWqTZRRglnUJK6UAZ/gxOX80nxEkN9NcGZTftn6RzhGWE" crossorigin="anonymous"></script>
74
+      <script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js" integrity="sha384-zNy6FEbO50N+Cg5wap8IKA4M/ZnLJgzc6w2NqACZaK0u0FXfOWRRJOnQtpZun8ha" crossorigin="anonymous"></script>
75
+      <script src="{% static "alpinejs/dist/cdn.js" %}"></script>
76
+      <script src="{% static "js/dashboard.js" %}"></script>
77
+  </body>
78
+</html>

File diff suppressed because it is too large
+ 2386 - 0
network-result.ipynb


+ 68 - 2
network.ipynb

@@ -3,6 +3,7 @@
3 3
   {
4 4
    "cell_type": "code",
5 5
    "execution_count": 37,
6
+   "id": "93bbfffb",
6 7
    "metadata": {
7 8
     "scrolled": true
8 9
    },
@@ -27,6 +28,7 @@
27 28
   {
28 29
    "cell_type": "code",
29 30
    "execution_count": 38,
31
+   "id": "96e5adc4",
30 32
    "metadata": {
31 33
     "scrolled": false
32 34
    },
@@ -61,6 +63,7 @@
61 63
   {
62 64
    "cell_type": "code",
63 65
    "execution_count": 39,
66
+   "id": "ff046a48",
64 67
    "metadata": {},
65 68
    "outputs": [],
66 69
    "source": [
@@ -71,6 +74,7 @@
71 74
   {
72 75
    "cell_type": "code",
73 76
    "execution_count": 40,
77
+   "id": "220562c3",
74 78
    "metadata": {
75 79
     "scrolled": true
76 80
    },
@@ -94,6 +98,7 @@
94 98
   {
95 99
    "cell_type": "code",
96 100
    "execution_count": 41,
101
+   "id": "46daba6c",
97 102
    "metadata": {},
98 103
    "outputs": [
99 104
     {
@@ -114,6 +119,7 @@
114 119
   {
115 120
    "cell_type": "code",
116 121
    "execution_count": 42,
122
+   "id": "ed775449",
117 123
    "metadata": {},
118 124
    "outputs": [],
119 125
    "source": [
@@ -123,6 +129,7 @@
123 129
   {
124 130
    "cell_type": "code",
125 131
    "execution_count": 43,
132
+   "id": "1996a9ee",
126 133
    "metadata": {
127 134
     "scrolled": true
128 135
    },
@@ -145,6 +152,7 @@
145 152
   {
146 153
    "cell_type": "code",
147 154
    "execution_count": 44,
155
+   "id": "7cbc7ee0",
148 156
    "metadata": {},
149 157
    "outputs": [
150 158
     {
@@ -166,6 +174,7 @@
166 174
   {
167 175
    "cell_type": "code",
168 176
    "execution_count": null,
177
+   "id": "dc0d07cb",
169 178
    "metadata": {
170 179
     "scrolled": false
171 180
    },
@@ -179,6 +188,7 @@
179 188
   {
180 189
    "cell_type": "code",
181 190
    "execution_count": 20,
191
+   "id": "a783f2b2",
182 192
    "metadata": {},
183 193
    "outputs": [
184 194
     {
@@ -225,6 +235,7 @@
225 235
   {
226 236
    "cell_type": "code",
227 237
    "execution_count": 18,
238
+   "id": "82c17e4b",
228 239
    "metadata": {},
229 240
    "outputs": [
230 241
     {
@@ -246,6 +257,7 @@
246 257
   {
247 258
    "cell_type": "code",
248 259
    "execution_count": null,
260
+   "id": "b9bf03e8",
249 261
    "metadata": {},
250 262
    "outputs": [],
251 263
    "source": [
@@ -256,6 +268,7 @@
256 268
   {
257 269
    "cell_type": "code",
258 270
    "execution_count": 13,
271
+   "id": "c55c2608",
259 272
    "metadata": {},
260 273
    "outputs": [
261 274
     {
@@ -284,6 +297,7 @@
284 297
   {
285 298
    "cell_type": "code",
286 299
    "execution_count": 14,
300
+   "id": "954f3de0",
287 301
    "metadata": {
288 302
     "scrolled": true
289 303
    },
@@ -305,6 +319,7 @@
305 319
   {
306 320
    "cell_type": "code",
307 321
    "execution_count": 15,
322
+   "id": "addc4b16",
308 323
    "metadata": {},
309 324
    "outputs": [
310 325
     {
@@ -327,6 +342,7 @@
327 342
   {
328 343
    "cell_type": "code",
329 344
    "execution_count": null,
345
+   "id": "5fdc4a48",
330 346
    "metadata": {
331 347
     "scrolled": true
332 348
    },
@@ -338,6 +354,7 @@
338 354
   {
339 355
    "cell_type": "code",
340 356
    "execution_count": null,
357
+   "id": "b606622f",
341 358
    "metadata": {
342 359
     "scrolled": true
343 360
    },
@@ -349,6 +366,7 @@
349 366
   {
350 367
    "cell_type": "code",
351 368
    "execution_count": null,
369
+   "id": "e123b1d7",
352 370
    "metadata": {},
353 371
    "outputs": [],
354 372
    "source": [
@@ -359,6 +377,7 @@
359 377
   {
360 378
    "cell_type": "code",
361 379
    "execution_count": null,
380
+   "id": "fae5c564",
362 381
    "metadata": {
363 382
     "scrolled": true
364 383
    },
@@ -372,6 +391,7 @@
372 391
   {
373 392
    "cell_type": "code",
374 393
    "execution_count": null,
394
+   "id": "54799082",
375 395
    "metadata": {
376 396
     "scrolled": true
377 397
    },
@@ -384,6 +404,7 @@
384 404
   {
385 405
    "cell_type": "code",
386 406
    "execution_count": null,
407
+   "id": "06fbb196",
387 408
    "metadata": {
388 409
     "scrolled": true
389 410
    },
@@ -395,6 +416,7 @@
395 416
   {
396 417
    "cell_type": "code",
397 418
    "execution_count": null,
419
+   "id": "566e5a39",
398 420
    "metadata": {
399 421
     "scrolled": true
400 422
    },
@@ -406,6 +428,7 @@
406 428
   {
407 429
    "cell_type": "code",
408 430
    "execution_count": null,
431
+   "id": "fd175745",
409 432
    "metadata": {
410 433
     "scrolled": true
411 434
    },
@@ -418,6 +441,7 @@
418 441
   {
419 442
    "cell_type": "code",
420 443
    "execution_count": null,
444
+   "id": "d04bf31b",
421 445
    "metadata": {},
422 446
    "outputs": [],
423 447
    "source": [
@@ -427,6 +451,7 @@
427 451
   {
428 452
    "cell_type": "code",
429 453
    "execution_count": null,
454
+   "id": "4211ee77",
430 455
    "metadata": {
431 456
     "scrolled": true
432 457
    },
@@ -439,6 +464,7 @@
439 464
   {
440 465
    "cell_type": "code",
441 466
    "execution_count": null,
467
+   "id": "189ed063",
442 468
    "metadata": {},
443 469
    "outputs": [],
444 470
    "source": [
@@ -448,6 +474,7 @@
448 474
   {
449 475
    "cell_type": "code",
450 476
    "execution_count": null,
477
+   "id": "ba901e35",
451 478
    "metadata": {},
452 479
    "outputs": [],
453 480
    "source": [
@@ -457,6 +484,7 @@
457 484
   {
458 485
    "cell_type": "code",
459 486
    "execution_count": null,
487
+   "id": "2276d112",
460 488
    "metadata": {},
461 489
    "outputs": [],
462 490
    "source": [
@@ -466,6 +494,7 @@
466 494
   {
467 495
    "cell_type": "code",
468 496
    "execution_count": null,
497
+   "id": "aa384bc1",
469 498
    "metadata": {
470 499
     "scrolled": true
471 500
    },
@@ -477,6 +506,7 @@
477 506
   {
478 507
    "cell_type": "code",
479 508
    "execution_count": null,
509
+   "id": "986c64ca",
480 510
    "metadata": {},
481 511
    "outputs": [],
482 512
    "source": [
@@ -487,6 +517,7 @@
487 517
   {
488 518
    "cell_type": "code",
489 519
    "execution_count": null,
520
+   "id": "7c605acc",
490 521
    "metadata": {
491 522
     "scrolled": true
492 523
    },
@@ -498,6 +529,7 @@
498 529
   {
499 530
    "cell_type": "code",
500 531
    "execution_count": null,
532
+   "id": "690bc8ad",
501 533
    "metadata": {
502 534
     "scrolled": true
503 535
    },
@@ -510,6 +542,7 @@
510 542
   {
511 543
    "cell_type": "code",
512 544
    "execution_count": null,
545
+   "id": "018d4db4",
513 546
    "metadata": {
514 547
     "scrolled": true
515 548
    },
@@ -522,6 +555,7 @@
522 555
   {
523 556
    "cell_type": "code",
524 557
    "execution_count": null,
558
+   "id": "bf21ade3",
525 559
    "metadata": {
526 560
     "scrolled": true
527 561
    },
@@ -533,6 +567,7 @@
533 567
   {
534 568
    "cell_type": "code",
535 569
    "execution_count": null,
570
+   "id": "bc3d51f6",
536 571
    "metadata": {
537 572
     "scrolled": true
538 573
    },
@@ -546,6 +581,7 @@
546 581
   {
547 582
    "cell_type": "code",
548 583
    "execution_count": null,
584
+   "id": "10da50d4",
549 585
    "metadata": {},
550 586
    "outputs": [],
551 587
    "source": [
@@ -559,6 +595,7 @@
559 595
   {
560 596
    "cell_type": "code",
561 597
    "execution_count": null,
598
+   "id": "cc80c5e1",
562 599
    "metadata": {},
563 600
    "outputs": [],
564 601
    "source": [
@@ -568,6 +605,7 @@
568 605
   {
569 606
    "cell_type": "code",
570 607
    "execution_count": null,
608
+   "id": "d2ef3fd1",
571 609
    "metadata": {
572 610
     "scrolled": false
573 611
    },
@@ -580,6 +618,7 @@
580 618
   {
581 619
    "cell_type": "code",
582 620
    "execution_count": null,
621
+   "id": "9721b6d1",
583 622
    "metadata": {},
584 623
    "outputs": [],
585 624
    "source": [
@@ -589,6 +628,7 @@
589 628
   {
590 629
    "cell_type": "code",
591 630
    "execution_count": null,
631
+   "id": "a5fbfb1e",
592 632
    "metadata": {},
593 633
    "outputs": [],
594 634
    "source": [
@@ -612,6 +652,7 @@
612 652
   {
613 653
    "cell_type": "code",
614 654
    "execution_count": null,
655
+   "id": "b60cca21",
615 656
    "metadata": {},
616 657
    "outputs": [],
617 658
    "source": [
@@ -622,6 +663,7 @@
622 663
   {
623 664
    "cell_type": "code",
624 665
    "execution_count": null,
666
+   "id": "acaed425",
625 667
    "metadata": {},
626 668
    "outputs": [],
627 669
    "source": [
@@ -632,6 +674,7 @@
632 674
   {
633 675
    "cell_type": "code",
634 676
    "execution_count": null,
677
+   "id": "c7c363e7",
635 678
    "metadata": {
636 679
     "scrolled": true
637 680
    },
@@ -643,6 +686,7 @@
643 686
   {
644 687
    "cell_type": "code",
645 688
    "execution_count": null,
689
+   "id": "a87ab1b7",
646 690
    "metadata": {},
647 691
    "outputs": [],
648 692
    "source": [
@@ -653,6 +697,7 @@
653 697
   {
654 698
    "cell_type": "code",
655 699
    "execution_count": null,
700
+   "id": "49d2d652",
656 701
    "metadata": {},
657 702
    "outputs": [],
658 703
    "source": [
@@ -663,6 +708,7 @@
663 708
   {
664 709
    "cell_type": "code",
665 710
    "execution_count": null,
711
+   "id": "41c258c7",
666 712
    "metadata": {},
667 713
    "outputs": [],
668 714
    "source": [
@@ -686,6 +732,7 @@
686 732
   {
687 733
    "cell_type": "code",
688 734
    "execution_count": null,
735
+   "id": "2112d785",
689 736
    "metadata": {},
690 737
    "outputs": [],
691 738
    "source": [
@@ -696,6 +743,7 @@
696 743
   {
697 744
    "cell_type": "code",
698 745
    "execution_count": null,
746
+   "id": "9a21694d",
699 747
    "metadata": {},
700 748
    "outputs": [],
701 749
    "source": []
@@ -703,6 +751,7 @@
703 751
   {
704 752
    "cell_type": "code",
705 753
    "execution_count": null,
754
+   "id": "55d3ccb7",
706 755
    "metadata": {},
707 756
    "outputs": [],
708 757
    "source": [
@@ -712,6 +761,7 @@
712 761
   {
713 762
    "cell_type": "code",
714 763
    "execution_count": null,
764
+   "id": "072d4638",
715 765
    "metadata": {},
716 766
    "outputs": [],
717 767
    "source": [
@@ -722,6 +772,7 @@
722 772
   {
723 773
    "cell_type": "code",
724 774
    "execution_count": null,
775
+   "id": "c984e701",
725 776
    "metadata": {
726 777
     "scrolled": false
727 778
    },
@@ -734,6 +785,7 @@
734 785
   {
735 786
    "cell_type": "code",
736 787
    "execution_count": null,
788
+   "id": "c9081831",
737 789
    "metadata": {},
738 790
    "outputs": [],
739 791
    "source": [
@@ -743,6 +795,7 @@
743 795
   {
744 796
    "cell_type": "code",
745 797
    "execution_count": null,
798
+   "id": "5aa598fa",
746 799
    "metadata": {},
747 800
    "outputs": [],
748 801
    "source": [
@@ -753,6 +806,7 @@
753 806
   {
754 807
    "cell_type": "code",
755 808
    "execution_count": null,
809
+   "id": "c16df369",
756 810
    "metadata": {
757 811
     "scrolled": true
758 812
    },
@@ -764,6 +818,7 @@
764 818
   {
765 819
    "cell_type": "code",
766 820
    "execution_count": null,
821
+   "id": "dde802e6",
767 822
    "metadata": {
768 823
     "scrolled": false
769 824
    },
@@ -780,6 +835,7 @@
780 835
   {
781 836
    "cell_type": "code",
782 837
    "execution_count": null,
838
+   "id": "4b36a671",
783 839
    "metadata": {},
784 840
    "outputs": [],
785 841
    "source": [
@@ -789,6 +845,7 @@
789 845
   {
790 846
    "cell_type": "code",
791 847
    "execution_count": null,
848
+   "id": "9916d649",
792 849
    "metadata": {
793 850
     "scrolled": false
794 851
    },
@@ -804,6 +861,7 @@
804 861
   {
805 862
    "cell_type": "code",
806 863
    "execution_count": null,
864
+   "id": "024c43da",
807 865
    "metadata": {},
808 866
    "outputs": [],
809 867
    "source": [
@@ -814,6 +872,7 @@
814 872
   {
815 873
    "cell_type": "code",
816 874
    "execution_count": null,
875
+   "id": "58ad756c",
817 876
    "metadata": {
818 877
     "scrolled": true
819 878
    },
@@ -826,6 +885,7 @@
826 885
   {
827 886
    "cell_type": "code",
828 887
    "execution_count": null,
888
+   "id": "5ac35907",
829 889
    "metadata": {},
830 890
    "outputs": [],
831 891
    "source": [
@@ -836,6 +896,7 @@
836 896
   {
837 897
    "cell_type": "code",
838 898
    "execution_count": null,
899
+   "id": "1f9a585d",
839 900
    "metadata": {
840 901
     "scrolled": false
841 902
    },
@@ -857,6 +918,7 @@
857 918
   {
858 919
    "cell_type": "code",
859 920
    "execution_count": null,
921
+   "id": "7c0d9839",
860 922
    "metadata": {},
861 923
    "outputs": [],
862 924
    "source": [
@@ -867,6 +929,7 @@
867 929
   {
868 930
    "cell_type": "code",
869 931
    "execution_count": null,
932
+   "id": "956c1225",
870 933
    "metadata": {},
871 934
    "outputs": [],
872 935
    "source": [
@@ -891,6 +954,7 @@
891 954
   {
892 955
    "cell_type": "code",
893 956
    "execution_count": null,
957
+   "id": "d6efa7a5",
894 958
    "metadata": {},
895 959
    "outputs": [],
896 960
    "source": [
@@ -902,6 +966,7 @@
902 966
   {
903 967
    "cell_type": "code",
904 968
    "execution_count": null,
969
+   "id": "80181787",
905 970
    "metadata": {},
906 971
    "outputs": [],
907 972
    "source": []
@@ -909,6 +974,7 @@
909 974
   {
910 975
    "cell_type": "code",
911 976
    "execution_count": null,
977
+   "id": "0e1394e6",
912 978
    "metadata": {},
913 979
    "outputs": [],
914 980
    "source": []
@@ -916,7 +982,7 @@
916 982
  ],
917 983
  "metadata": {
918 984
   "kernelspec": {
919
-   "display_name": "Python 3",
985
+   "display_name": "Python 3 (ipykernel)",
920 986
    "language": "python",
921 987
    "name": "python3"
922 988
   },
@@ -930,7 +996,7 @@
930 996
    "name": "python",
931 997
    "nbconvert_exporter": "python",
932 998
    "pygments_lexer": "ipython3",
933
-   "version": "3.7.3"
999
+   "version": "3.10.4"
934 1000
   }
935 1001
  },
936 1002
  "nbformat": 4,

+ 1 - 0
requirements.txt

@@ -91,3 +91,4 @@ django-autotranslate
91 91
 pymongo
92 92
 dnspython
93 93
 ttp
94
+humanize

BIN
sample_1704434185.xlsx


BIN
sample_1704441131.xlsx


BIN
sample_1704441416.xlsx


BIN
sample_1704442111.xlsx


BIN
sample_1704442400.xlsx


BIN
sample_1704442540.xlsx


BIN
sample_1704442778.xlsx


BIN
sample_1704443129.xlsx


BIN
sample_1704443305.xlsx


BIN
sample_1704443666.xlsx


BIN
sample_1704516342.xlsx


BIN
sample_1704884988.xlsx


BIN
sample_1704885017.xlsx


BIN
sample_1704897082.xlsx


BIN
sample_1704897260.xlsx


BIN
sample_1705327996.xlsx


BIN
sample_atp.xlsx


BIN
~$table1703516489.xlsx


BIN
~$table3.xlsx