Skip to content

Instantly share code, notes, and snippets.

Avatar

Paul Lamere plamere

View GitHub Profile
@plamere
plamere / dedup.py
Created Jun 25, 2011
dedup.py - uses echoprint to find duplicates in a music collection
View dedup.py
#!/usr/bin/python
import sys
import os
import pprint
import subprocess
import pickle
import atexit
import simplejson as json
sys.path.insert(0, "../API")
@plamere
plamere / index.html
Created Dec 6, 2011
Demonstration of how to call the Echo Nest API from a Spotify App
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Playlister</title>
<link rel="stylesheet" href="sp://import/css/adam.css">
<link rel="stylesheet" href="styles.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
</head>
@plamere
plamere / your_chill.yaml
Last active Apr 23, 2019
Example of a YAML for a simple chill mix
View your_chill.yaml
your_favorite_chill_tracks:
title: your favorite chill tracks
description: just your most chill tracks
main: sequencer
config:
max_tracks: 30
components:
my_liked_tracks:
@plamere
plamere / virtues.txt
Created Mar 31, 2019
a list of all virtues
View virtues.txt
ability abundance acceptance accountability accuracy achievement acknowledgement acting on convictions activism adaptability administration/control adoration adventure advice affection aging gracefully allowing altruism amazement ambition anger at injustice anticipation apology appeasement appreciation appreciation of appreciation of beauty approbation appropriate conduct appropriate knowledge approval art assertiveness assumptions atonement attention attitude austerity authenticity authority authority/honesty autonomy awareness awe b balance beauty being true to oneself belief benevolence benignity bliss bravery c candor capacity to be loved capacity to love care caring caution celebration celibacy certainty chance change chaos character charity charm chastity cheerfulness chivalry choice citizenship civility clarity class cleanliness coincidence collaboration commitment communication communication/info communion community community/personalist community/supportive companionship compassion competition comple
@plamere
plamere / FetchTrackAndAnalysisData.js
Created Apr 9, 2012
Syncing Echo Nest analysis to Spotify playback
View FetchTrackAndAnalysisData.js
function fetchSongInfo(track) {
info('Getting song info for ' + track.name + ' by ' + track.artists[0].name);
var url = 'http://developer.echonest.com/api/v4/track/profile?api_key=N6E4NIOVYMTHNDM8J&callback=?';
var track_id = fromSpotify(track.uri);
$.getJSON(url, { id: track_id, format:'jsonp', bucket : 'audio_summary'}, function(data) {
if (checkResponse(data)) {
info("");
showTrackInfo(data.response.track);
fetchAnalysis(data.response.track);
@plamere
plamere / webtools.py
Last active Feb 20, 2017
a grab bag of python stuff that my sever code uses sometimes.
View webtools.py
import os
import os.path
import hashlib
from httplib import HTTP
from urlparse import urlparse
import urllib
import urllib2
import simplejson as json
def get_export_map_for_directory(path, prefix = "/"):
View goats.txt
$ python title_chain.py goats
1 Goats On A Boat by The Devil Wears Prada
2 Boat To Nowhere by Anoushka Shankar
3 Nowhere Man by Bryce Vine
4 Man Down by Rihanna
5 Down Under by Men At Work
6 Under Cover of Darkness by The Strokes
7 Darkness Between the Fireflies by Mason Jennings
8 Fireflies Made Out Of Dust by Happy Jawbone Family Band
View spotify-echo-nest-playbutton.html
<!DOCTYPE html>
<html>
<head>
<title>Echo Nest + Spotify Play Button Demo</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<link type="text/css" href="demo_styles.css" rel="stylesheet" />
</head>
<body>
@plamere
plamere / genre_playlist.py
Created Jan 16, 2014
example of using creating genre radio
View genre_playlist.py
import pyen
import sys
en = pyen.Pyen()
if len(sys.argv) < 2:
print 'Usage: python genre_playlist.py seed genre name'
else:
genre = ' '.join(sys.argv[1:])
response = en.get('playlist/static', type='genre-radio', genre_preset='core-best', genre=genre)