This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import requests | |
import time | |
import sys | |
import csv | |
from itertools import permutations | |
from flatten_dict import flatten | |
api_key = 'API-KEY' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(eval r=$(urlfetch json https://keepthescore.com/api/xckjgssgfkzlr/board/); s = ''; c = 0; for (p of r.players) {if (c >= 5) break; c++; s += `${p.name} (${p.score}) — `}; s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(eval r=$(urlfetch json https://keepthescore.com/api/xckjgssgfkzlr/board/); s = r.players.filter(p => p.name.toLowerCase().includes(`$(1)`.toLowerCase()))[0]; `${s.name} currently have ${s.score} points.`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void AddSongToQueue(string trackUri) | |
{ | |
if (string.IsNullOrEmpty(accessToken)) | |
{ | |
GD.Print("Access token not available. Authenticate."); | |
return; | |
} | |
var queueUrl = $"https://api.spotify.com/v1/me/player/queue?uri={Uri.EscapeDataString(trackUri)}"; | |
var headers = new[] |
OlderNewer