Skip to content

Instantly share code, notes, and snippets.

View laughingturtle's full-sized avatar
💭
Turtling Around

laughingturtle

💭
Turtling Around
View GitHub Profile
import requests
def translate(source, target, input):
url = "https://systran-systran-platform-for-language-processing-v1.p.rapidapi.com/translation/text/translate"
querystring = {"source":source,"target":target,"input":input}
headers = {
'x-rapidapi-host': "systran-systran-platform-for-language-processing-v1.p.rapidapi.com",
'x-rapidapi-key': "a03ee70f38msh668bb7cac193421p14c8a6jsncb658a19b591"
}
response_json = requests.request("GET", url, headers=headers, params=querystring).json()
@laughingturtle
laughingturtle / index.js
Created January 5, 2019 06:49
API call options / rough
/*
Had crazy challenges setting up earlier version of mysql on older machine (2 days faffing around), while laptop is fixed, oy vey.
Anyhow, so I have not been able to actually test these, they're kind of roughed out options right now...
*/
var playSong = (id) => {
request('/* Jared/s Audio Player link*/' + id, function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log('success');