Tum пре 2 година
родитељ
комит
1618600ce9

+ 1 - 0
.python-version

1
+3.10.8


BIN
app/Output/excel_out_test_excel_formatter_update.xlsx


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

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
     path('reports/', views.reports, name='reports'),
10
     path('reports/', views.reports, name='reports'),
11
     path('service_status/', views.service_status, name='service_status'),
11
     path('service_status/', views.service_status, name='service_status'),
12
     path('dump_api/', views.dump_api, name='dump_api'),
12
     path('dump_api/', views.dump_api, name='dump_api'),
13
+    path('dump_fixed_results/', views.dump_fixed_results, name='dump_fixed_results'),
13
     path('print_table/', views.print_table, name='print_table'),
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
-from django.shortcuts import render
1
+from django.shortcuts import render, redirect
2
 from backend.mongodb import db
2
 from backend.mongodb import db
3
 from exfo.lib import Exfo, Mikrotik
3
 from exfo.lib import Exfo, Mikrotik
4
 from pprint import pprint
4
 from pprint import pprint
7
 from django.http import JsonResponse, HttpResponse
7
 from django.http import JsonResponse, HttpResponse
8
 from datetime import datetime
8
 from datetime import datetime
9
 from celery import shared_task
9
 from celery import shared_task
10
+from django.contrib import messages
10
 
11
 
11
 exfo = Exfo("administrator", "exf0w0rxC@t4dm!n")
12
 exfo = Exfo("administrator", "exf0w0rxC@t4dm!n")
12
 exfo.login()
13
 exfo.login()
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
         url = self.BASE_URL + "/Login"
22
         url = self.BASE_URL + "/Login"
23
         response = self.session.post(url, headers=headers, data=payload, verify=False)
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
         #self.cookies = response.cookies
28
         #self.cookies = response.cookies
29
     def list_api(self):
29
     def list_api(self):
30
         pprint("---- list_api ---")
30
         pprint("---- list_api ---")
34
         }
34
         }
35
         url = self.BASE_URL + "/"
35
         url = self.BASE_URL + "/"
36
         response = self.session.get(url, headers=headers, data=payload, verify=False)
36
         response = self.session.get(url, headers=headers, data=payload, verify=False)
37
-        pprint(response.json())
37
+        # pprint(response.json())
38
         return response
38
         return response
39
 
39
 
40
     def call_api(self, service, payload={}):
40
     def call_api(self, service, payload={}):

+ 7 - 7
app/network_report/settings.py

195
 
195
 
196
 
196
 
197
 CELERY_BEAT_SCHEDULE = {
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

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

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>

Разлика између датотеке није приказан због своје велике величине
+ 2386 - 0
network-result.ipynb


+ 68 - 2
network.ipynb

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

+ 1 - 0
requirements.txt

91
 pymongo
91
 pymongo
92
 dnspython
92
 dnspython
93
 ttp
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
~$table1703516489.xlsx