This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get the number of listens for a user ``user_name``. | |
The returned listen count has an element 'payload' with only key: 'count' | |
which unsurprisingly contains the listen count for the user. | |
:statuscode 200: Yay, you have listen counts! | |
:resheader Content-Type: *application/json* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2020-07-13 16:58:30,367 INFO 504736 listens dumped for 2006-01-01 at 14450.90 listens/s | |
2020-07-13 16:59:21,301 INFO 1047451 listens dumped for 2006-02-01 at 12199.20 listens/s | |
2020-07-13 17:00:16,063 INFO 1680627 listens dumped for 2006-03-01 at 11951.19 listens/s | |
2020-07-13 17:00:58,926 INFO 2312589 listens dumped for 2006-04-01 at 12603.54 listens/s | |
2020-07-13 17:01:56,055 INFO 3037620 listens dumped for 2006-05-01 at 12624.33 listens/s | |
2020-07-13 17:02:52,213 INFO 3730575 listens dumped for 2006-06-01 at 12570.45 listens/s | |
2020-07-13 17:03:50,421 INFO 4468454 listens dumped for 2006-07-01 at 12587.83 listens/s | |
2020-07-13 17:05:00,957 INFO 5229385 listens dumped for 2006-08-01 at 12289.45 listens/s | |
2020-07-13 17:06:00,213 INFO 5997067 listens dumped for 2006-09-01 at 12370.85 listens/s | |
2020-07-13 17:07:01,938 INFO 6841583 listens dumped for 2006-10-01 at 12518.94 listens/s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import json | |
with open(sys.argv[1], "r") as f: | |
data = f.read() | |
for listen in json.loads(data): | |
print("%d,%s,%s" % (listen['listened_at'], listen['track_metadata']['track_name'], listen['track_metadata']['artist_name'])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ab_similarity_test(): | |
sim = troi.acousticbrainz.annoy.AnnoyLookupElement("mfccsw", "145f5c43-0ac2-4886-8b09-63d0e92ded5d") | |
r_lookup = troi.musicbrainz.recording_lookup.RecordingLookupElement(config.DB_CONNECT) | |
dump = troi.utils.DumpElement() | |
sim.connect(r_lookup) | |
r_lookup.connect(dump) | |
sim.push([]) | |
recording list | |
acb23 Computer Hack David Buckley |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"msb_recording_msid": "00000c24-6ba6-4a58-88d7-b7fcc1c9c841", | |
"mb_recording_mbid": "d6a45305-3035-4fe7-9cb2-160a325102f1", | |
"msb_artist_msid": "9e6a8399-a625-4151-9bba-3994b033957e", | |
"mb_artist_credit_mbids": ["5182c1d9-c7d2-4dad-afa0-ccfeada921a8"], | |
"mb_artist_credit_id": 1419, | |
"msb_release_msid": "c449dba9-675b-44d6-8c76-a294b3de0cf9", | |
"mb_release_mbid": "97e09b38-0ad0-440c-9531-66473ca81ab9", | |
"mb_recording_name": "The Thrill of It All", | |
"mb_artist_credit_name": "Black Sabbath", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mayhem:~/metabrainz/listenbrainz-server->docker exec -it listenbrainz_web_1 python manage.py dump create_full | |
Running on git commit: v-2019-05-13.0-652-g571f920a-dirty | |
/usr/local/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py:835: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True or False to suppress this warning. | |
'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and ' | |
2020-06-25 16:14:16,515 INFO Beginning dump of PostgreSQL database... | |
2020-06-25 16:14:16,515 INFO dump path: /code/listenbrainz/listenbrainz-export/listenbrainz-dump-4-20200625-161416-full | |
2020-06-25 16:14:16,516 INFO Creating dump of private data... | |
2020-06-25 16:14:16,563 INFO Dump of private data created at /code/listenbrainz/listenbrainz-export/listenbrainz-dump-4-20200625-161416-full/listenbrainz-private-dump-20200625-161416.tar.xz! | |
2020-06-25 16:14:16,563 INFO Creating dump of public data... | |
2020-06-25 16:14:16,609 INFO Dump o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mayhem:~/metabrainz/listenbrainz-server/admin/timescale->find out | |
out | |
out/2008 | |
out/2008/7.listens | |
out/2008/5.listens | |
out/2008/4.listens | |
out/2008/1.listens | |
out/2008/12.listens | |
out/2008/9.listens | |
out/2008/2.listens |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
'recording_mbid' : ... | |
'recording_name' : 'never going to let you down...', | |
'artist_name' : 'Rick Astley', | |
}, | |
. . . | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2020-06-07 12:18:28,274 INFO 484276 listens dumped at 40433.25 listens / sec | |
2020-06-07 12:18:28,274 INFO Dump listens for range 2006-02-01 00:00:00 => 2006-02-28 23:59:59 | |
2020-06-07 12:18:41,155 INFO 1007287 listens dumped at 40520.61 listens / sec | |
2020-06-07 12:18:41,155 INFO Dump listens for range 2006-03-01 00:00:00 => 2006-03-31 23:59:59 | |
2020-06-07 12:18:56,170 INFO 1620403 listens dumped at 40638.98 listens / sec | |
2020-06-07 12:18:56,170 INFO Dump listens for range 2006-04-01 00:00:00 => 2006-04-30 23:59:59 | |
2020-06-07 12:19:11,109 INFO 2232908 listens dumped at 40736.97 listens / sec | |
2020-06-07 12:19:11,110 INFO Dump listens for range 2006-05-01 00:00:00 => 2006-05-31 23:59:59 | |
2020-06-07 12:19:28,028 INFO 2935915 listens dumped at 40929.30 listens / sec | |
2020-06-07 12:19:28,028 INFO Dump listens for range 2006-06-01 00:00:00 => 2006-06-30 23:59:59 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================================================================================================== FAILURES =============================================================================================================== | |
______________________________________________________________________________________ TestTimescaleListenStore.test_aaa_get_total_listen_count _______________________________________________________________________________________ | |
self = <listenbrainz.listenstore.tests.test_timescalelistenstore.TestTimescaleListenStore testMethod=test_aaa_get_total_listen_count> | |
def test_aaa_get_total_listen_count(self): | |
listen_count = self.logstore.get_total_listen_count(False) | |
self.assertEqual(0, listen_count) | |
count = self._create_test_data(self.testuser_name) |