Thursday, February 12, 2009

Portfolio Assignment 3

I worked with Renee Carignan and Elizabeth Ramsey on this assignment.

I am glad Dr. Zacharski posted what we had to add to the pylast library, it saved us a lot of time and we really appreciate that. I don't think I could have figured that one out by myself.

Installing pylast was easy, unlike putting in some of the assignment 2 ones.

We discovered that the last.fm api is not very well documented. Various function names are typed differently than shown on their website. The function getSimilar on the website was really get_similar. We spend a very long time staring at compiler errors about this. I'm glad the autocomplete feature was there to help us.

We sucessfully made a band recommendation program on the command line. The user inputs a band and it outputs a list of similar bands the user might also enjoy. We used python to do this, since its what we were used to working with for this class.

Here's the band recommendation code:
def recommend():
name = raw_input("Enter a band that you like: ")
print(name)
a = pylast.Artist(name, key, secret, sk)
similar = pylast.Artist.get_similar(a, key)
for item in similar:
print(item)

No comments:

Post a Comment