Skip to content

Commit

Permalink
Merge pull request #9 from ATawzer/storm_mongo_rebuild
Browse files Browse the repository at this point in the history
Storm mongo rebuild
  • Loading branch information
ATawzer committed Apr 13, 2021
2 parents 624c145 + 8a09269 commit afef5f4
Show file tree
Hide file tree
Showing 16 changed files with 30,537 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .cache-1241528689
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"access_token": "BQApu6yYsP4CRrqU6NnN_FxTCUHhvs5ZGyKISGuMSYhtkW4JNmbPA6c1Y9yYmyf7glgyi39fmj9Zd5wBh7tvBBuLjIMeKv2JuDF76I_cvt8kTOEN0T2RtGWJ0MUSGEcPJTv0Jd3Viy4kfeywE57Yq2EOJ3L24RGb_IAGpppC9U7ZYR7souCFZRAtT37_Shq11XH3PNyvnhcv8PEa2twgBQc", "token_type": "Bearer", "expires_in": 3600, "scope": "playlist-modify-private playlist-modify-public user-follow-modify user-follow-read", "expires_at": 1617128924, "refresh_token": "AQAsxkWjXR0Iw8q65vbKmXUR0cOGEM8liRshm9vhsJbDenCcjijwBgyKF91oCqQ8NjdD8fwk3uO-NKGUVWYtWRF0E2f5ydGSyFlJRi29TR1Zyw71OKdaIs89XzUBfCOOO0M"}
{"access_token": "BQCXOeVx3tqRXMnJYZvyArG-IeXrr2w9JYbTNffOmHY0n1Sw2xsAse8KUJH193GwRDJnpAlylbrNwJzqfBQMvFOqHF1dgOBrovrPe2Udp3wWHCvs6k55gplLE4BlTjDH7IQdfpM-DSeHqfCnhndyqfIH80uTNWseiFgRsfjTMjUV9vysotl3np0uefImINLMLdhDrebuiOrjO_OvRxWl9lQ", "token_type": "Bearer", "expires_in": 3600, "scope": "playlist-modify-private playlist-modify-public user-follow-modify user-follow-read", "expires_at": 1618268185, "refresh_token": "AQAsxkWjXR0Iw8q65vbKmXUR0cOGEM8liRshm9vhsJbDenCcjijwBgyKF91oCqQ8NjdD8fwk3uO-NKGUVWYtWRF0E2f5ydGSyFlJRi29TR1Zyw71OKdaIs89XzUBfCOOO0M"}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@

storm/Storm.sln
storm/Storm/Storm.mdproj
storm/config/config_secret.json

*.env

.idea
.vscode
.ipynb_checkpoints

token.json
19 changes: 19 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
spotipy = "*"
jupyter = "*"
pandas = "*"
dnspython = "*"
pymongo = "*"
pyssl = "*"
python-dotenv = "*"
tqdm = "*"

[dev-packages]

[requires]
python_version = "3.9"
822 changes: 822 additions & 0 deletions Pipfile.lock

Large diffs are not rendered by default.

74 changes: 67 additions & 7 deletions Storm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2020-05-06T17:45:33.961856Z",
Expand All @@ -13,10 +13,10 @@
"outputs": [],
"source": [
"# Imports\n",
"from storm.utils import Storm\n",
"from src.utils import Storm\n",
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"#import matplotlib.pyplot as plt\n",
"import datetime as dt\n",
"import time"
]
Expand Down Expand Up @@ -60,6 +60,67 @@
" 'Video Game Music Unofficial':'3aI7ztMmDhMHhYe1KOPFLG'}"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Generating Token and Authenticating. . .\n",
"Authentication Complete.\n",
"\n",
"Reading in existing Data.\n",
"Storm Arists Found! Reading in now.\n",
"Done! 346 Unique Artists found.\n",
"\n",
"\n",
"Previously Discovered Albums Found! Reading in now.\n",
"Done! 29198 Albums found.\n",
"\n",
"Augmenting new Artists from playlist input dictionary.\n",
"Obtaining a list of Tracks from Playlist . . .TIAPTP Archive\n",
"100%|██████████| 346/346 [00:00<00:00, 696367.17it/s]\n",
" 0%| | 0/346 [00:00<?, ?it/s]Finding Artists . . .\n",
"Done! All Input Playlists Scanned.\n",
"Removing Blacklist Artists.\n",
"Saving Artist Ids.\n",
"Obtaining all albums from the list of artists. (Albums)\n",
"100%|██████████| 346/346 [01:04<00:00, 5.36it/s]\n",
" 0%| | 0/346 [00:00<?, ?it/s]Albums being tracked: 4827\n",
"Obtaining all albums from the list of artists. (Singles)\n",
"100%|██████████| 346/346 [01:23<00:00, 4.15it/s]\n",
" 2%|▏ | 3/146 [00:00<00:07, 19.88it/s]Albums being tracked: 29198\n",
"Filtering Album list for new content.\n",
"Using Filtered albums to obtain a track list.\n",
"100%|██████████| 146/146 [00:10<00:00, 14.21it/s]\n",
" 1%|▏ | 3/204 [00:00<00:08, 23.46it/s]Checking Tracks for bad features.\n",
"Starting track amount: 204\n",
"100%|██████████| 204/204 [00:19<00:00, 10.35it/s]\n",
"Ending Track Amount: 200\n",
"Archiving Current Storm Listening.\n",
"No Tracks to Archive.\n",
"Preparing Tracks for Writing\n",
"Writing Tracks\n",
"100%|██████████| 3/3 [00:00<00:00, 8.52it/s]Writing metadata from run.\n",
"Saving Albums from run.\n",
"\n"
]
}
],
"source": [
"storm_name = 'TIAPTP'\n",
"user = '1241528689'\n",
"inputs = {'TIAPTP Archive':'3Rr0eHGWeCO2uOuVld6RpD'}\n",
"output_playlist = {'daily':'5vUGxhke6R5xfdKufQkbds', 'archive':'22rucwoZOgIhC6eWNv5EUZ'}\n",
"\n",
"storm = Storm(user, inputs, output_playlist['daily'], output_playlist['archive'], storm_name, \n",
" start_date='2021-04-02', filter_unseen=True, instrumental=False)\n",
"storm.Run()"
]
},
{
"cell_type": "code",
"execution_count": 4,
Expand Down Expand Up @@ -328,9 +389,8 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
"name": "python394jvsc74a57bd0c0c0f186f792db3a37ba7c51f0ce49c4b45c8511f10270060f342a8364fd0546",
"display_name": "Python 3.9.4 64-bit ('Storm': pipenv)"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -342,7 +402,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8-final"
"version": "3.9.4-final"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit afef5f4

Please sign in to comment.