Skip to content

Instantly share code, notes, and snippets.

View adamshostack's full-sized avatar

Adam Shostack adamshostack

View GitHub Profile
@adamshostack
adamshostack / Claude 3 Opus prompt
Last active March 13, 2024 22:01
Spotify playlists from csv files. Useful for music festivals.
# Claude Opus 3 wrote most of the code below (I edited it as I went). After I was happy, I prompted
# "write me a prompt that will make you emit that code with all the relevant decisions we've made along the way."
# Claude produced the following:
I have a Spotify account and I want to create a Python script that does the following:
Reads a list of artist names from a file named after the artist. For example, if the file is named "artists.txt", the script should create a playlist named "artists".
For each artist in the list, the script should:
Search for an exact match of the artist name on Spotify.
If an exact match is found and the artist has albums, add the tracks from their latest album to the playlist.