docker pull gcr.io/google_containers/kube-apiserver-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-controller-manager-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-proxy-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-scheduler-amd64:v1.5.0
docker pull weaveworks/weave-npc:1.8.2
docker pull weaveworks/weave-kube:1.8.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
############################# Support Vector Machine ############################ | |
library(kernlab, quietly=TRUE) | |
# Build a Support Vector Machine model. | |
set.seed(crv$seed) | |
crs$ksvm <- ksvm(C=0.5, as.factor(bResult) ~ ., | |
data=crs$dataset[crs$train,c(crs$input, crs$target)], | |
kernel="rbfdot", kpar=list(sigma = 0.01), | |
prob.model=TRUE) |
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
################ Alternative hyper-parameter tuning method using Caret ################################## | |
library(caret) | |
library(dplyr) | |
# load the dataset | |
matches = crs$dataset # the following code uses "matches" as the data frame, just assign the value | |
# set default seed value to 42 (Rattle default seed value) | |
seed_value = 42 | |
set.seed(seed_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
from __future__ import (absolute_import, division, print_function, | |
unicode_literals) | |
from surprise import KNNWithMeans | |
from surprise import Dataset | |
from surprise import accuracy | |
from surprise.model_selection import train_test_split | |
# Load the movielens-100k dataset UserID::MovieID::Rating::Timestamp | |
data = Dataset.load_builtin('ml-100k') |
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 __future__ import (absolute_import, division, print_function, | |
unicode_literals) | |
from surprise import KNNWithMeans | |
from surprise import Dataset | |
from surprise import accuracy | |
from surprise.model_selection import train_test_split | |
# Load the movielens-100k dataset UserID::MovieID::Rating::Timestamp | |
data = Dataset.load_builtin('ml-100k') |
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
state_size = 10 | |
num_layers = 3 | |
X = tf.placeholder(tf.float32, [None, 100, 10]) | |
# the second dimension is size 2 and represents | |
# c, m ( the cell and hidden state ) | |
# set the batch_size to None | |
state_placeholder = tf.placeholder(tf.float32, [num_layers, 2, | |
None, state_size]) |
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 __future__ import print_function | |
import boto3 | |
import os | |
import sys | |
import uuid | |
from PIL import Image | |
import PIL.Image | |
s3_client = boto3.client('s3') | |
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 __future__ import print_function | |
def lambda_handler(event, context): | |
for record in event['Records']: | |
print(record['eventID']) | |
print(record['eventName']) | |
print('Successfully processed %s records.' % str(len(event['Records']))) |
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
source ~/shrink_venv/bin/activate | |
cd $VIRTUAL_ENV/lib/python3.6/site-packages | |
zip -r9 ~/CreateThumbnail.zip * | |
cd ~ | |
zip -g CreateThumbnail.zip CreateThumbnail.py | |
aws lambda update-function-code --function-name CreateThumbnail --zip-file fileb:///home/ec2-user/CreateThumbnail.zip |
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 __future__ import (absolute_import, division, print_function, | |
unicode_literals) | |
from surprise import SVDpp | |
from surprise import SVD | |
from surprise import Dataset | |
from surprise import accuracy | |
from surprise.model_selection import train_test_split | |
from surprise.model_selection import GridSearchCV |
OlderNewer