This file contains hidden or 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
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - | |
sudo apt-get install apt-transport-https | |
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list | |
sudo apt-get update && sudo apt-get install elasticsearch | |
sudo -i service elasticsearch start | |
sudo /bin/systemctl daemon-reload | |
sudo /bin/systemctl enable elasticsearch.service | |
sudo systemctl start elasticsearch.service | |
curl -X GET 'http://localhost:9200' |
This file contains hidden or 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/env/bash | |
: ' | |
dependencies: | |
aws-cli | |
' | |
set -eux | |
ROLE_NAME='ec2-jenkins-role' | |
ROLE_POLICY_DOC=' |
This file contains hidden or 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/env bash | |
set -eux | |
sudo yum install docker -y | |
sudo systemctl start docker.service | |
sudo systemctl enable docker.service | |
sudo usermod -a -G docker "$(whoami)" |
This file contains hidden or 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/env/bash | |
set -eux | |
sudo wget -O /etc/yum.repos.d/jenksin.repo \ | |
http://pkg.jenkins-ci.org/redhat/jenkins.repo | |
sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key | |
sudo yum install java-1.8.0 -y | |
sudo yum install jenkins -y | |
sudo systemctl start jenkins.service | |
sudo systemctl enable jenkins.service |
This file contains hidden or 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
-- Finds all salespeople with an order with Samsonic | |
SELECT DISTINCT sp.name | |
FROM salesperson sp | |
JOIN orders o | |
ON sp.id = o.salesperson_id | |
JOIN customer c | |
ON c.id = o.cust_id AND c.name = 'Samsonic'; | |
-- Find all salespeople with no orders with Samsonic | |
SELECT sp.name |
This file contains hidden or 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
gsutil mb gs://your-awesome-bucket/ | |
gsutil list #should have your-awesome-bucket | |
# Clean up | |
gsutil rm -r gs://your-awesome-bucket |
This file contains hidden or 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 | |
: ' | |
Sets up gcloud service account | |
Dependencies: | |
- gcloud | |
' | |
set -eux | |
GCLOUD_CRED_DIR=<your-credentials-dir> | |
PROJECT_ID=<your-project-id> |
This file contains hidden or 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 google.cloud import storage | |
import logging | |
from pprint import pformat | |
logger = logging.getLogger(__name__) | |
logger.setLevel(logging.INFO) | |
sh = logging.StreamHandler() | |
sh.setLevel(logging.INFO) | |
logger.addHandler(sh) |
This file contains hidden or 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 scipy.misc import imread, imresize | |
from keras.layers import Input, Dense, Convolution2D, MaxPooling2D, AveragePooling2D, ZeroPadding2D, Dropout, Flatten, merge, Reshape, Activation | |
from keras.models import Model | |
from keras.regularizers import l2 | |
from keras.optimizers import SGD | |
from googlenet_custom_layers import PoolHelper,LRN | |
def create_googlenet(weights_path=None): |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<module type="PYTHON_MODULE" version="4"> | |
<component name="NewModuleRootManager"> | |
<content url="file://$MODULE_DIR$" /> | |
<orderEntry type="inheritedJdk" /> | |
<orderEntry type="sourceFolder" forTests="false" /> | |
</component> | |
<component name="TestRunnerService"> | |
<option name="projectConfiguration" value="Nosetests" /> | |
<option name="PROJECT_TEST_RUNNER" value="Nosetests" /> |