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
import nexmo | |
from flask import jsonify | |
def send_sms(request): | |
data = request.get_json() | |
# NEXMO_API_KEY and NEXMO_API_SECRET are in env vars | |
# which are set in the Google Cloud function | |
client = nemxo.Client() | |
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
import scala.util.matching.Regex | |
import scala.io.Source | |
val matcher: Regex = "[gkmqvwxzio]".r | |
def displayableOn7SegmentDisp(str: String) = matcher.findAllIn(str).isEmpty | |
val filename = "/Users/tom/Desktop/words_alpha.txt" | |
val words = Source.fromFile(filename).getLines.toStream | |
val longestWord = words.filter(displayableOn7SegmentDisp).sortWith(_.length > _.length).head | |
println(longestWord) |
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 $(op signin <yoursubdomain>) # this will prompt you to log in | |
export NEXMO_API_KEY=$(op get item Nexmo | jq '.details.sections[]? | select(.fields) | .fields[] | select(.t == "key").v') | |
export NEXMO_API_SECRET=$(op get item Nexmo | jq '.details.sections[]? | select(.fields) | .fields[] | select(.t == "secret").v') |
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
SGFwcHkgYmlydGhkYXksIGNVUkwuIFlvdSBhcmUgYW4gZXNzZW50aWFsIHRvb2wuIFdlIGxvdmUgeW91IHRvIGJpdHMuIEtlZXAgYmVpbmcgYW1hemluZy4K |
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/perl | |
# desc{ a friendly program for making symbolic links } | |
$VERSION = '2.01'; # Time-stamp: "2008-08-19 19:26:35 AKDT [email protected]" | |
=head1 NAME | |
lns -- a friendly program for making symbolic links | |
=head1 SYNOPSIS |
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
SELECT ?original ?originalLabel ?translation ?translationLabel ?originalLang ?originalLangLabel ?translationLang ?translationLangLabel | |
WHERE { | |
?translation wdt:P629 ?original . | |
?translation wdt:P364 ?translationLang . | |
?original wdt:P364 ?originalLang . | |
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr,it,es,pt,de,dk,nl,pl,ru,he,ar,zh,jp". } | |
FILTER (?translationLang != ?originalLang) | |
} |
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
{ | |
"uid": "urn:uuid:4a1c45a3-5cd5-46e2-a4e0-938cb6d060c4", | |
"updateDate": "2017-08-04T00:00:00.0Z", | |
"titleText": "Has Trump Been Impeached?", | |
"mainText": "Donald Trump has not been impeached." | |
} |
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
from flask import Flask, jsonify | |
app = Flask(__name__) | |
@app.route("/incoming-call") | |
def incoming_tts_call(): | |
ncco = [ | |
{ | |
"action": "talk", |
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
wget -c http://www.opentech.org.uk/2017/audio/opentech-2017-{A..C}-{1..6}.mp3 |
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 osascript -l JavaScript | |
ObjC.import('AppKit') | |
function run(argv) { | |
if (!(Application('FoldingText').running())) { | |
$.NSWorkspace.sharedWorkspace.launchApplication('/Applications/FoldingText.app') | |
} | |
var ft = Application("FoldingText"); | |
argv.forEach(function (item) { |