Mercurial > hg > camir-aes2014
annotate core/magnatagatune/fm_retrieve_artist_similarity.py @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
rev | line source |
---|---|
wolffd@0 | 1 # gets data from the last.fm webservice and |
wolffd@0 | 2 |
wolffd@0 | 3 import pylast |
wolffd@0 | 4 import sys |
wolffd@0 | 5 import fm_network |
wolffd@0 | 6 |
wolffd@0 | 7 network = fm_network.get_network() |
wolffd@0 | 8 |
wolffd@0 | 9 # now you can use that object every where |
wolffd@0 | 10 artist = network.get_artist(sys.argv[1]) |
wolffd@0 | 11 |
wolffd@0 | 12 (score, sharedas) = artist.compare_with_artist(sys.argv[2]) |
wolffd@0 | 13 |
wolffd@0 | 14 print(score) |
wolffd@0 | 15 |
wolffd@0 | 16 |