I hereby claim:
- I am nickrobson on github.
- I am nickrobson (https://keybase.io/nickrobson) on keybase.
- I have a public key whose fingerprint is 3569 207D 80BC 0CE5 34C0 606D 7387 E46A FFBD A4CE
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import json | |
import requests | |
import xml.etree.cElementTree as XML | |
SOAP_TEMPLATE = '<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body>{0}</s:Body></s:Envelope>' | |
GET_QUEUE_BODY_TEMPLATE = '<u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"><ObjectID>Q:0</ObjectID><BrowseFlag>BrowseDirectChildren</BrowseFlag><Filter>dc:title,res,dc:creator,upnp:artist,upnp:album,upnp:albumArtURI</Filter><StartingIndex>{0}</StartingIndex><RequestedCount>{1}</RequestedCount><SortCriteria></SortCriteria></u:Browse>' | |
def cmd(sonos_ip, endpoint, soap_action, body): | |
headers = { |
public class Permute { | |
public static void main(String[] args) { | |
for (String res : permute(args.length > 0 ? args[0] : "AABC")) { | |
System.out.println(res); | |
} | |
} | |
public String[] permute(String str) { | |
if (str.length() <= 1) |
import com.jtelegram.api.TelegramBotRegistry; | |
import com.jtelegram.api.chat.id.ChatId; | |
import com.jtelegram.api.commands.filters.MentionFilter; | |
import com.jtelegram.api.commands.filters.TextFilter; | |
import com.jtelegram.api.menu.Menu; | |
import com.jtelegram.api.menu.MenuHandler; | |
import com.jtelegram.api.menu.viewer.RegularMenuViewer; | |
import com.jtelegram.api.requests.message.send.SendText; | |
import com.jtelegram.api.update.PollingUpdateProvider; | |
import com.jtelegram.api.util.TextBuilder; |