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
let querySentance = ''; | |
let wordSlots = ["WordI", "WordII", "WordIII", "WordIV", "WordV", "WordVI", "WordVII", "WordVIII", "WordIX", "WordX", "WordXI", "WordXII", "WordXIII", "WordXIV", "WordXV", "WordXVI", "WordXVII", "WordXVIII", "WordIXX", "WordXX", "WordXXI", "WordXXII", "WordXXIII", "WordXXIV", "WordXXV", "WordXXVI", "WordXXVII", "WordXXVIII", "WordIXXX", "WordXXX",]; | |
wordSlots.forEach((word)=>{ | |
let slot = this.event.request.intent.slots[word]; | |
if (slot !== undefined && slot.value !== '' && slot.value !== '?' && slot.value !== null && slot.value !== undefined){ | |
querySentance = querySentance+' '+slot.value; | |
} | |
}); |
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
{ | |
"interactionModel": { | |
"languageModel": { | |
"invocationName": "free form text", | |
"intents": [ | |
{ | |
"name": "AMAZON.CancelIntent", | |
"samples": [ | |
"cancel" | |
] |
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
const fetchquote = async ()=> { | |
const res = await fetch('https://talaikis.com/api/quotes/random/'); | |
const jsonObject = await res.json(); | |
console.log(jsonObject.quote) | |
} | |
fetchquote(); |
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
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/ audacity | |
This starts it. | |
Read this article next | |
http://xahlee.info/UnixResource_dir/_/ldpath.html |
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
cd py_environments/[project name] | |
source bin/activate | |
//Activates the virual environment | |
cd src | |
//once pip install everything you want in your virual environment save to requirments.txt | |
pip freeze > requirements.txt | |
// if you change a model | |
src$ python manage.py makemigrations | |
src$ python manage.py migrate | |
// starting your web app. |
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
// | |
// Copyright Caleb Gates 2017 | |
// | |
'use strict'; | |
const AWS = require('aws-sdk'); | |
AWS.config.region = 'us-east-1'; | |
var lambda = new AWS.Lambda(); | |
const docClient = new AWS.DynamoDB.DocumentClient({region: 'us-east-1'}); |
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
'use strict'; | |
/** | |
* This sample demonstrates a simple skill built with the Amazon Alexa Skills Kit. | |
* The Intent Schema, Custom Slots, and Sample Utterances for this skill, as well as | |
* testing instructions are located at http://amzn.to/1LzFrj6 | |
* | |
* For additional samples, visit the Alexa Skills Kit Getting Started guide at | |
* http://amzn.to/1LGWsLG | |
*/ |
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
'use strict'; | |
/** | |
* This sample demonstrates a simple skill built with the Amazon Alexa Skills Kit. | |
* The Intent Schema, Custom Slots, and Sample Utterances for this skill, as well as | |
* testing instructions are located at http://amzn.to/1LzFrj6 | |
* | |
* For additional samples, visit the Alexa Skills Kit Getting Started guide at | |
* http://amzn.to/1LGWsLG | |
*/ |
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
sudo apt-get install python-pip | |
#http://blog.rhesoft.com/2014/05/24/how-to-build-python-application-for-android-ios-and-desktop/ | |
pip install --upgrade buildozer | |
easy_install buildozer | |
pip install --upgrade cython #use pip or other tool to install cython |
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
<?php | |
//http://stackoverflow.com/questions/3080146/post-data-to-a-url-in-php | |
$url = 'http://phonebook.uconn.edu/results.php'; | |
// status => any | |
// basictext => (30 char limit) > this is a name | |
$status = 'any'; | |
$basictext = 'Caleb Gates'; | |
$myvars = 'status='.$status.'&basictext='+$basictext; //= 'myvar1=' . $myvar1 . '&myvar2=' . $myvar2; | |
$ch = curl_init( $url ); |
NewerOlder