diff --git a/.cache b/.cache index 6759e3e..e374a03 100644 --- a/.cache +++ b/.cache @@ -1 +1 @@ -{"access_token": "BQBkKxVUB0Jdq1CsVXQAs_YIKMuL5E3g5rRA0HDS5LUfLFr65M6TGwRbuFs_XNnYSaL_lNDCyAx3vaT6Zq4", "token_type": "Bearer", "expires_in": 3600, "expires_at": 1619799116} \ No newline at end of file +{"access_token": "BQB1Zxtasy3gJzX9GjnvyMQHsyo-uwhQPULmIPWX0HjICey6XKFMnRuu6YEq6iQxsRyoMHUieT-ZD2hd3tA", "token_type": "Bearer", "expires_in": 3600, "expires_at": 1619802657} \ No newline at end of file diff --git a/.cache-1241528689 b/.cache-1241528689 index 94b6843..87c07db 100644 --- a/.cache-1241528689 +++ b/.cache-1241528689 @@ -1 +1 @@ -{"access_token": "BQALtI4LPVoeULK1ejkF-NXl1oi1chGN3E99kz1q05gOwvvUK2_DgeIzMR5Hu9YYAd34If-s8Cea0yvwRSEqH1USBCjYRrtwz0TjdeIFeajWpZWgBZnURzOEhCH9oGCGi7pFRGYZM8vSHpg9r4Qb-9wZF8kN5cMnhddS2_MXC3wN6U5p8hSyzbg3DzSmSFZpvO54bUOXKFeRXoI", "token_type": "Bearer", "expires_in": 3600, "refresh_token": "AQCkRsNDn6OT8xCrrtN9NHlFNBNGGO9WNygnCq-5vr_mM9FuG5ILStdkAPw3mYy3vec2GgoKC7PMn9WKLSA9G1qXBglacLx72YoUU4_Bt05CDFEj6hRIcEKBwp3e39ZViYE", "scope": "playlist-modify-private playlist-modify-public", "expires_at": 1619799315} \ No newline at end of file +{"access_token": "BQDDwmOADNHL28ksoPakx1obP6sk0NIFUoJb-o8KPT7B9W9sZs7d0yariOcUuKSYZyCh1KiKqWqxSOy34qfEpIanXiE1TxpCY91wOUOGX0J6iQm9Bhl7yfudEAVbdycwSqOq2vup2hKonzCF2HC47HAVhzbcxprVVoXXxuBMOvy-dtyZd4WiEMyinXtuDPgT6YDRJNrxf2nmNQGruXITk-E", "token_type": "Bearer", "expires_in": 3600, "scope": "playlist-modify-private playlist-modify-public", "expires_at": 1619804182, "refresh_token": "AQCkRsNDn6OT8xCrrtN9NHlFNBNGGO9WNygnCq-5vr_mM9FuG5ILStdkAPw3mYy3vec2GgoKC7PMn9WKLSA9G1qXBglacLx72YoUU4_Bt05CDFEj6hRIcEKBwp3e39ZViYE"} \ No newline at end of file diff --git a/Pipfile b/Pipfile index 6734613..5baa07f 100644 --- a/Pipfile +++ b/Pipfile @@ -16,6 +16,7 @@ pyodbc = "*" mysql-connector-python = "*" sqlalchemy = "*" pymysql = "*" +cryptography = "*" [dev-packages] diff --git a/Pipfile.lock b/Pipfile.lock index a34ddec..d76782b 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "10f8be7c44b5d6f8b25a3180a4344eeda1eba9d7614a85339b46a03826d5de8c" + "sha256": "32b638ce1f4f5390dbea9013e33c6ff9b615f4f9dff067b26489cb96192606b6" }, "pipfile-spec": 6, "requires": { @@ -16,14 +16,6 @@ ] }, "default": { - "appnope": { - "hashes": [ - "sha256:93aa393e9d6c54c5cd570ccadd8edad61ea0c4b9ea7a01409020c9aa019eb442", - "sha256:dd83cd4b5b460958838f6eb3000c660b1f9caf2a5b1de4264e941512f603258a" - ], - "markers": "sys_platform == 'darwin' and platform_system == 'Darwin'", - "version": "==0.1.2" - }, "argon2-cffi": { "hashes": [ "sha256:05a8ac07c7026542377e38389638a8a1e9b78f1cd8439cd7493b39f08dd75fbf", @@ -135,6 +127,32 @@ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==4.0.0" }, + "colorama": { + "hashes": [ + "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b", + "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2" + ], + "markers": "sys_platform == 'win32'", + "version": "==0.4.4" + }, + "cryptography": { + "hashes": [ + "sha256:0f1212a66329c80d68aeeb39b8a16d54ef57071bf22ff4e521657b27372e327d", + "sha256:1e056c28420c072c5e3cb36e2b23ee55e260cb04eee08f702e0edfec3fb51959", + "sha256:240f5c21aef0b73f40bb9f78d2caff73186700bf1bc6b94285699aff98cc16c6", + "sha256:26965837447f9c82f1855e0bc8bc4fb910240b6e0d16a664bb722df3b5b06873", + "sha256:37340614f8a5d2fb9aeea67fd159bfe4f5f4ed535b1090ce8ec428b2f15a11f2", + "sha256:3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713", + "sha256:3d8427734c781ea5f1b41d6589c293089704d4759e34597dce91014ac125aad1", + "sha256:7ec5d3b029f5fa2b179325908b9cd93db28ab7b85bb6c1db56b10e0b54235177", + "sha256:8e56e16617872b0957d1c9742a3f94b43533447fd78321514abbe7db216aa250", + "sha256:de4e5f7f68220d92b7637fc99847475b59154b7a1b3868fb7385337af54ac9ca", + "sha256:eb8cc2afe8b05acbd84a43905832ec78e7b3873fb124ca190f574dca7389a87d", + "sha256:ee77aa129f481be46f8d92a1a7db57269a2f23052d5f2433b4621bb457081cc9" + ], + "index": "pypi", + "version": "==3.4.7" + }, "decorator": { "hashes": [ "sha256:6f201a6c4dac3d187352661f508b9364ec8091217442c9478f1f83c003a0f060", @@ -527,14 +545,6 @@ "markers": "python_version >= '3.6'", "version": "==0.8.2" }, - "pexpect": { - "hashes": [ - "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937", - "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c" - ], - "markers": "sys_platform != 'win32'", - "version": "==4.8.0" - }, "pickleshare": { "hashes": [ "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca", @@ -583,14 +593,6 @@ ], "version": "==3.15.8" }, - "ptyprocess": { - "hashes": [ - "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", - "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" - ], - "markers": "os_name != 'nt'", - "version": "==0.7.0" - }, "pycparser": { "hashes": [ "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0", @@ -739,11 +741,11 @@ }, "python-dotenv": { "hashes": [ - "sha256:471b782da0af10da1a80341e8438fca5fadeba2881c54360d5fd8d03d03a4f4a", - "sha256:49782a97c9d641e8a09ae1d9af0856cc587c8d2474919342d5104d85be9890b2" + "sha256:00aa34e92d992e9f8383730816359647f358f4a3be1ba45e5a5cefd27ee91544", + "sha256:b1ae5e9643d5ed987fc57cc2583021e38db531946518130777734f9589b3141f" ], "index": "pypi", - "version": "==0.17.0" + "version": "==0.17.1" }, "pytz": { "hashes": [ @@ -752,6 +754,33 @@ ], "version": "==2021.1" }, + "pywin32": { + "hashes": [ + "sha256:1c204a81daed2089e55d11eefa4826c05e604d27fe2be40b6bf8db7b6a39da63", + "sha256:27a30b887afbf05a9cbb05e3ffd43104a9b71ce292f64a635389dbad0ed1cd85", + "sha256:350c5644775736351b77ba68da09a39c760d75d2467ecec37bd3c36a94fbed64", + "sha256:60a8fa361091b2eea27f15718f8eb7f9297e8d51b54dbc4f55f3d238093d5190", + "sha256:638b68eea5cfc8def537e43e9554747f8dee786b090e47ead94bfdafdb0f2f50", + "sha256:8151e4d7a19262d6694162d6da85d99a16f8b908949797fd99c83a0bfaf5807d", + "sha256:a3b4c48c852d4107e8a8ec980b76c94ce596ea66d60f7a697582ea9dce7e0db7", + "sha256:b1609ce9bd5c411b81f941b246d683d6508992093203d4eb7f278f4ed1085c3f", + "sha256:d7e8c7efc221f10d6400c19c32a031add1c4a58733298c09216f57b4fde110dc", + "sha256:fbb3b1b0fbd0b4fc2a3d1d81fe0783e30062c1abed1d17c32b7879d55858cfae" + ], + "markers": "sys_platform == 'win32'", + "version": "==300" + }, + "pywinpty": { + "hashes": [ + "sha256:5447b8c158e5807237f80ea4e14262f0c05ff7c4d39f1c4b697ea6e8920786b2", + "sha256:58e23d59891e624d478ec7bcc42ced0ecfbf0a4e7cb0217de714f785f71c2461", + "sha256:739094e8d0d685a64c92ff91424cf43da9296110349036161ab294268e444d05", + "sha256:aa3e4178503ff6be3e8a1d9ae4ce77de9058308562dbf26b505a51583be9f02d", + "sha256:b3512d4a964a0abae1b77b6908917c62ea0ad7d8178696e4e973877fe9e820f9" + ], + "markers": "os_name == 'nt'", + "version": "==1.0.1" + }, "pyzmq": { "hashes": [ "sha256:13465c1ff969cab328bc92f7015ce3843f6e35f8871ad79d236e4fbc85dbe4cb", @@ -838,43 +867,43 @@ }, "sqlalchemy": { "hashes": [ - "sha256:0140f6dac2659fa6783e7029085ab0447d8eb23cf4d831fb907588d27ba158f7", - "sha256:034b42a6a59bf4ddc57e5a38a9dbac83ccd94c0b565ba91dba4ff58149706028", - "sha256:03a503ecff0cc2be3ad4dafd220eaff13721edb11c191670b7662932fb0a5c3a", - "sha256:069de3a701d33709236efe0d06f38846b738b19c63d45cc47f54590982ba7802", - "sha256:1735e06a3d5b0793d5ee2d952df8a5c63edaff6383c2210c9b5c93dc2ea4c315", - "sha256:19633df6be629200ff3c026f2837e1dd17908fb1bcea860290a5a45e6fa5148e", - "sha256:1e14fa32969badef9c309f55352e5c46f321bd29f7c600556caacdaa3eddfcf6", - "sha256:31e941d6db8b026bc63e46ef71e877913f128bd44260b90c645432626b7f9a47", - "sha256:452c4e002be727cb6f929dbd32bbc666a0921b86555b8af09709060ed3954bd3", - "sha256:45a720029756800628359192630fffdc9660ab6f27f0409bd24d9e09d75d6c18", - "sha256:4a2e7f037d3ca818d6d0490e3323fd451545f580df30d62b698da2f247015a34", - "sha256:4a7d4da2acf6d5d068fb41c48950827c49c3c68bfb46a1da45ea8fbf7ed4b471", - "sha256:4ad4044eb86fbcbdff2106e44f479fbdac703d77860b3e19988c8a8786e73061", - "sha256:4f631edf45a943738fa77612e85fc5c5d3fb637c4f5a530f7eedd1a7cd7a70a7", - "sha256:6389b10e23329dc8b5600c1a84e3da2628d0f437d8a5cd05aefd1470ec571dd1", - "sha256:6ebd58e73b7bd902688c0bb8dbabb0c36b756f02cc7b27ad5efa2f380c611f95", - "sha256:7180830ea1082b96b94884bc352b274e29b45151b6ee911bf1fd79cba2de659b", - "sha256:789be639501445d85fd4ca41d04f0f5c6cbb6deb0c6826aaa6f22774fe84ef94", - "sha256:7d89add44938ea4f52c7641d5805c9e154fed4381e874ef3221483eeb191a96d", - "sha256:842b0d4698381aac047f8ae57409c90b7e63ebabf5bc02814ddc8eaefd13499e", - "sha256:8f96d4b6a49d3f0f109365bb6303ae5d266d3f90280ca68cf8b2c46032491038", - "sha256:961b089e64c2ad29ad367487dd3ba1aa3eeba56bc82037ce91732baaa0f6ca90", - "sha256:96de1d4a2e05d4a017087cb29cd6a8ebfeecfd0e9f872880b1a589f011c1c02e", - "sha256:98214f04802a3fc740038744d8981a8f2fdca710f791ca125fc4792737d9f3a7", - "sha256:9cf94161cb55507cee147bf8abcfd3c076b353ad18743296764dd81108ea74f8", - "sha256:9fdf0713166f33e5e6ea98cf59deb305cb323131277f6880de6c509f468076f8", - "sha256:a41ab83ecfadf38a47bdfaf4e488f71579df47a711e1ab1dce30d34c7c25bd00", - "sha256:ac14fee167653ec6dee32d6aa4d501d90ae1bfbbc3eb5816940bccf227f0d617", - "sha256:b8b7d66ee8b8ac272adce0af1342a60854f0d89686e6d3318127a6a82a2f765c", - "sha256:bb1072fdf48ba870c0fe81bee8babe4ba2f096fb56bb4f3e0c2386a7626e405c", - "sha256:cd823071b97c1a6ac3af9e43b5d861126a1304033dcd18dfe354a02ec45642fe", - "sha256:d08173144aebdf30c21a331b532db16535cfa83deed12e8703fa6c67c0894ffc", - "sha256:e7d76312e904aa4ea221a92c0bc2e299ad46e4580e2d72ca1f7e6d31dce5bfab", - "sha256:f772e4428d413c0affe2a34836278fbe9df9a9c0940705860c2d3a4b50af1a66" + "sha256:01b610951c83452ee5e7d912c4ed9db4538b15d66e96ca6696ec38f0c5ce2908", + "sha256:0646a4caab207279532ffd3f173b4756ae3863f3a94e369b7d1b82831a7ad433", + "sha256:0c839000817201310a51af390545d7b316fafd6969ef250dad0a6d28c025214d", + "sha256:1bc9ea9e54bbaf65fece8b719f56472748f75777806f4f5fadd8112a165eab19", + "sha256:1bdf65dc5263be4651aa34ebe07aa035c61421f145b0d43f4c0b1f3c33bec673", + "sha256:1e8a884d766fcc918199576bf37f1870327582640fa3302489d7415d815be8a9", + "sha256:2b35206c11c415448caf5b7abddbfac6acbe37f79832ae2d1be013f0dfe252ea", + "sha256:4b749cdedf1afb613c3d31235258110e1f36231c15df9b8b63b3f13c712e4790", + "sha256:4c8c335b072967da27fef54fb53e74fadadd7d2167c5eb98f0bfb4bfeb3a6948", + "sha256:5ffbd23ac4324e64a100310cd2cab6534f972ecf26bf3652e6847187c2e9e72d", + "sha256:691568d8238c756011d97a655a76820715cbc0295b7d294aa2f1d62fb0be4361", + "sha256:6b77880e23d3758db7ad65732304ab1c3a42f0cd20505f4a211750862563a161", + "sha256:89e755688476b7a925554a1e8a756e0dd6124dfb8fac80470a90cd8424326bee", + "sha256:8c71a80a5474e6e9c9bbf1957ab1c73cdece9d33cfb26d9ea6e7aed41f535cd6", + "sha256:968e8cf7f269eaeed1b753cb5df4112be998c933df39421229fc7726c413672c", + "sha256:a21f41c4cdb76d7f68a6986b9f5c56bdc8eafbc366893d1031df0c367e832388", + "sha256:a4c9c947fc08d2ac48116c64b7dfbac22b9896619cb74923ba59876504ff6256", + "sha256:ac4a48e49e863a4d00d8a5ec94ff5540de1f5bcf96d8d54273a75c3278d8b4af", + "sha256:ac7db7276c0807db73b58984d630404ab294c4ca59cf16157fdc15894dec4507", + "sha256:aeb389136f3a39399ebb8e8ee17beba18d361cde9638059cfbf7e896354412b7", + "sha256:aec20f0ec5788bee91ecf667e9e30e5ed0add9233b63b0e34e916b21eb5bc850", + "sha256:b1d513ebb16a204c87296d774c2317950191583b34032540948f20096b63efe4", + "sha256:b4bf83b05056349265b40de37c836517649ea9edd174301072f5a58c7b374f94", + "sha256:b58f09f4ea42a92e0a8923f4598001f8935bd2ed0c4c6abb9903c5b4cd0d4015", + "sha256:b7ed6ce2e32a68a3b417a848a409ed5b7e4c8e5fa8911b06c77a6be1cc767658", + "sha256:c9047989b8645d8830067dddb2bda544c625419b22b0f546660fd0bfe73341f6", + "sha256:c94fe5ec27dec6a994293d1f194a97fcb904252526bbe72698229ec62c0f7281", + "sha256:ce5fc1099d194fbecc8d7c038c927d9daf75cbb83b3b314df3e43e308d67c33e", + "sha256:d5da8fff36593ac96dd3d60a4eb9495a142fb6d3f0ed23baf5567c0ef7aa9b47", + "sha256:deef50c730ddfb4169417a3a3b6393f1e90b0d5c1e62e1d090c1eb1132529f3f", + "sha256:e11ccaa08975e414df6a16466377bb11af692b2a62255c3a70c0993cb2d7f2d7", + "sha256:e815a729b427bd997d681711dc0b22330e445a0a0c47e16b05d2038e814bd29f", + "sha256:f04acd3840bcf33f941b049e24aeef0be5145b2cd5489a89559c11be2d25e262", + "sha256:f90a42db44427bf98128d823502e0af3f4b83f208e09a3d51df5c2cd7f2a76cf" ], "index": "pypi", - "version": "==1.4.11" + "version": "==1.4.12" }, "terminado": { "hashes": [ diff --git a/src/analytics.py b/src/analytics.py index d7c80ac..4d46140 100644 --- a/src/analytics.py +++ b/src/analytics.py @@ -139,6 +139,7 @@ def gen_v_run_history(self, storm_names=[]): run_df.loc[run["_id"], 'storm_name'] = storm run_df.loc[run['_id'], 'run_date'] = run['run_date'] run_df.loc[run['_id'], 'start_date'] = run['start_date'] + run_df.loc[run['_id'], 'storm_name'] = storm # Direct Aggregations agg_keys = ['playlists', 'input_tracks', 'input_artists', 'eligible_tracks', diff --git a/src/db.py b/src/db.py index 103afac..477ad80 100644 --- a/src/db.py +++ b/src/db.py @@ -3,7 +3,7 @@ import json from pymongo import MongoClient import pandas as pd -import tqdm as tqdm +from tqdm import tqdm import numpy as np import datetime as dt from timeit import default_timer as timer