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
#!/bin/bash -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
dbname=$1 | |
dbuser=$2 | |
dbpass=$3 | |
installationPath=$4 | |
echo "============================================" |
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
web: | |
image: eduardoleoni/python3.6-django1.10 | |
container_name: <container-name> | |
restart: unless-stopped | |
ports: | |
- "8000:8000" | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
- ../project:/app/:rw #Overwrite "project" for your project folder | |
command: python /app/manage.py runserver 0.0.0.0:8000 |
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
proxy: | |
image: eduardoleoni/nginx-proxy:latest | |
container_name: <container_name_here> | |
restart: unless-stopped | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
- ./nginx-proxy/nginx.tmpl/:/app/nginx.tmpl:rw |
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 base64, cv2, sys, os | |
from datetime import datetime | |
from elasticsearch import Elasticsearch | |
# Elastic | |
es = Elasticsearch() | |
# Get user supplied values | |
imagePath = sys.argv[1] | |
cascPath = "haarcascade_frontalface_default.xml" |
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 speech_recognition as sr | |
import subprocess | |
import time | |
import pyowm | |
import json | |
owm = pyowm.OWM('api_key') | |
subprocess.run(["spd-say", "hello, I am Matilda", "-t", "female2"]) | |
time.sleep(2) |
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
int ledPin1 = 0; | |
int ledPin2 = 3; | |
int ledPin3 = 5; | |
void setup() { | |
pinMode(ledPin1, OUTPUT); | |
pinMode(ledPin2, OUTPUT); | |
pinMode(ledPin3, OUTPUT); | |
} |
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 sys, boto3 | |
aws_access_key_id=sys.argv[1] | |
aws_secret_access_key=sys.argv[2] | |
lex = boto3.client('lex-runtime', region_name="us-east-1", aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key) | |
while True: | |
var = input("") |
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 keras.models import Sequential | |
from keras.layers import Dense | |
import numpy | |
# load dataset | |
dataset = numpy.loadtxt("diabetes.csv", delimiter=",") | |
# split into input and ouput | |
input = dataset[:,0:8] | |
output = dataset[:,8] |
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 keras.models import load_model | |
import numpy | |
model = load_model('diabetes.h5') | |
predict_me = numpy.array([[1, 126, 60, 0, 0, 30.1, 0.349, 47]]) | |
predictions = model.predict(predict_me) | |
rounded = [round(output[0]) for output in predictions] |
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 keras.models import load_model | |
import numpy | |
dataset = numpy.loadtxt("diabetes.csv", delimiter=",") | |
input = dataset[:,0:8] | |
output = dataset[:,8] | |
model = load_model('diabetes.h5') |
OlderNewer