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/env bash | |
set -euo pipefail | |
set -o xtrace | |
if [ ! -f "dialogflow_key.json" ] && [ "${DIALOGFLOW_KEY:-}" ]; then | |
echo "$DIALOGFLOW_KEY" >dialogflow_key.json | |
fi | |
if [ -f "dialogflow_key.json" ]; then | |
gcloud auth activate-service-account --key-file=dialogflow_key.json |
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/env bash | |
set -euo pipefail | |
# set -o xtrace | |
if [ ! -d "$HOME/.ask" ]; then | |
# Create the .ask directory | |
mkdir ~/.ask | |
# Create ASK config | |
sed -e s/ASK_ACCESS_TOKEN/"${ASK_ACCESS_TOKEN}"/g -e \ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
{ | |
"intents": [ | |
{ | |
"intent": "LaunchIntent" | |
}, | |
{ | |
"intent": "AMAZON.NoIntent" | |
}, | |
{ | |
"intent": "SumIntent", |
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
# | |
# ~/.bashrc | |
# | |
# If not running interactively, don't do anything | |
[[ $- != *i* ]] && return | |
# open new tabs in same directory | |
source /etc/profile.d/vte.sh |
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
A = 3200 | |
B = 1800 | |
C = 1920 | |
D = 1080 | |
E = 2 | |
F = 2 | |
values = { |
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.http import StreamingHttpResponse | |
from django.conf import settings | |
import subprocess | |
def _backup(): | |
db_config = settings.DATABASES['default'] | |
db_config['HOST'] = db_config.get('HOST') or 'localhost' | |
db_config['PORT'] = db_config.get('PORT') or 3306 |
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 functools | |
import random | |
import math | |
from concurrent import futures | |
def map_d(c): | |
return math.hypot(random.random(), random.random()) | |
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 requests | |
from concurrent import futures | |
from faker import Factory | |
import functools | |
from collections import namedtuple | |
fake = Factory.create() | |
url = 'http://www.solucionescamelot.com/index.php/contactenos' | |
DataTuple = namedtuple('DataTuple', ['email', 'name']) |
NewerOlder