Esempio n. 1
0
from cluster_module import ClusterModule
from database_wrapper import DatabaseWrapper
from random import shuffle

cm = ClusterModule()
db = DatabaseWrapper()

stations_output_file = "stations.pickle"
artists_output_file = "artistsandstations.pickle"
stationslist = []
stationstoartist = {}  # dict where stations are mapped to predicted and seed artists
artistsforstation = []
artistsforotherstations = []

# define a list of artists, select 100 from db
allartists = db.get100ArtistFromTop500()

# select 100 artists randomly
# shuffle(allartists)

artist_list = allartists[:100]

# reverse artist list
artist_list.reverse()

counter = 0

for seedartist in artist_list:
    counter = counter + 1

    print "artist number " + str(counter)