Skip to content

Instantly share code, notes, and snippets.

Paul Lamere plamere

Block or report user

Report or block plamere

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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
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
@plamere
plamere / Playlist starting with Goats
Created Jan 2, 2017
Some examples of title_chain.py output
View Playlist starting with Goats
$ 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
9 Dust & Gold by OKBADLANDS
@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 = "/"):
@plamere
plamere / cynical_radio.py
Created Jun 20, 2015
An example of using PBL to create a cynical radio station where every 4th song is by Sia or Katy Perry
View cynical_radio.py
from pbl import *
gold = Concatenate([ArtistTopTracks('Sia'), ArtistTopTracks('Katy Perry')])
norm = PlaylistSource("Today's Top Hits")
radio = Alternate([norm, norm, norm, Shuffler(gold)])
radio = PlaylistSave(radio, 'cynical radio', 'plamere', max_size=40)
@plamere
plamere / gist:e41f5a163566dddbeba4
Created Aug 3, 2014
iterating through artists with spotipy to get the top tracks
View gist:e41f5a163566dddbeba4
for start in xrange(0, 10000, page_size):
response = en.get('catalog/read', id=tpid, start=start,
results=page_size, bucket=['id:spotify'])
if len(response['catalog']['items']) == 0:
break
spaids = []
for item in response['catalog']['items']:
if 'artist_name' in item:
spid = item['request']['item_id']
@plamere
plamere / parse.py
Last active Aug 29, 2015
parses outside lands lineup and generates a json of artists along with Spotify, Echo Nest and Rdio IDs
View parse.py
import sys
from bs4 import BeautifulSoup
import json
import pyen
en = pyen.Pyen()
def get_fid(artist, idspace):
if 'foreign_ids' in artist and len(artist['foreign_ids']) > 0:
for fids in artist['foreign_ids']:
if fids['catalog'] == idspace:
@plamere
plamere / spotify_echonest_example
Last active Aug 29, 2015
Get Spotify images for the artists that are similar to weezer
View spotify_echonest_example
import pyen
import spotipy
import sys
'''
get a set of images for artists that are similar to
the given seed artist
'''
en = pyen.Pyen()
@plamere
plamere / TrackUploadSample.m
Created Apr 14, 2014
Example of uploading a track to the Echo Nest for analysis without ENIOS
View TrackUploadSample.m
- (void) uploadTrack: (Track *) track {
NSDictionary *params = @{
@"filetype" : @"m4a",
@"api_key" : self.apiKey,
};
NSFileManager *fm = [NSFileManager defaultManager];
NSURL *audioPath = [self pathToAudio:track];
NSString *path = [audioPath path];
NSData *data = [fm contentsAtPath:path];
You can’t perform that action at this time.