This file contains 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
pip install nexmo |
This file contains 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
pip install ‘flask>=1.0’ |
This file contains 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
var handlers = { | |
'LaunchRequest': function () { | |
this.emit('SayHello'); | |
}, | |
'SayHello': function(){ | |
if (this.event.user.hasOwnProperty('accessToken')) { | |
this.response.speak('Hello User'); | |
this.emit(':responseReady'); | |
} | |
else { |
This file contains 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
var handlers = { | |
'LaunchRequest': function () { | |
this.emit('SayHello'); | |
}, | |
'SayHello': function(){ | |
if (this.event.user.hasOwnProperty('accessToken')) { | |
this.response.speak('Hello User'); | |
this.emit(':responseReady'); | |
} | |
else { |
This file contains 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
// Downsample frames from 16Khz to 8Khz | |
function convert(message){ | |
var arr = [] | |
var x = 0; | |
var y; | |
var i; | |
for (i = 0; i < 160; i++) { | |
y = x+2 | |
arr.push(message.slice(x,y)) | |
x += 4; |
This file contains 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
Sams-iMac:~ smachin$ openssl s_client -connect raw.githubusercontent.com:443 | |
CONNECTED(00000003) | |
depth=1 /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA | |
verify error:num=20:unable to get local issuer certificate | |
verify return:0 | |
--- | |
Certificate chain | |
0 s:/C=US/ST=California/L=San Francisco/O=GitHub, Inc./CN=www.github.com | |
i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA | |
1 s:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA |
This file contains 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
ptt_btn.onmousedown = function(e){ | |
ptt=true; | |
document.getElementById("tx").innerHTML=status_tx; | |
if(ws.readyState == ws.OPEN) { | |
var evt = '{"event": "ptt_on"}'; | |
ws.send(JSON.stringify(evt)); | |
} | |
} |
This file contains 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 django import template | |
register = template.Library() | |
OFFSET = ord('🇦') - ord('A') | |
@register.filter | |
def flag(code): | |
return chr(ord(code[0]) + OFFSET) + chr(ord(code[1]) + OFFSET) | |
# Example: | |
# flag("US") = "🇺🇸" |
This file contains 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/python | |
import sys | |
import json | |
import requests | |
from datetime import datetime | |
from base64 import urlsafe_b64encode | |
import os | |
import calendar | |
from jose import jwt | |
This file contains 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 | |
#Add Your Nemxo Details and Mobile Number here | |
nexmo_key='XXX' | |
nexmo_secret='XXX' | |
to = 'XXX' | |
client = nexmo.Client(key=nexmo_key, secret=nexmo_secret) | |
#First test shows the result of not setting Unicode |