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 docker -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock -d & |
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
apt-get update | |
apt-get install -y python-setuptools | |
apt-get install -y python-pip | |
apt-get install -y python-dev | |
apt-get install -y libffi-dev | |
apt-get install -y libssl-dev | |
apt-get install -y build-essential | |
pip install requests[security] | |
mkdir aws-cfn-bootstrap-latest | |
curl https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz | tar xz -C aws-cfn-bootstrap-latest --strip-components 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
lazy val slickGenerate = taskKey[Seq[File]]("slick code generation from an existing database") | |
slickGenerate := { | |
import java.io.File | |
val dbName = "" | |
val userName = "" | |
val password = "" | |
val url = s"jdbc:mysql://localhost:3306/$dbName" // adapt as necessary to your system | |
val jdbcDriver = "com.mysql.jdbc.Driver" // replace if not MySQL | |
val slickDriver = "slick.driver.MySQLDriver" // replace if not MySQL |
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
if [ $# -ne 4 ]; then | |
echo "usage: circle-build.sh <repository> <branch> <commit> <config-yml>" | |
exit 1; | |
fi | |
ORG=VATBox | |
API_TOKEN="42d8a7e3cd1ba3a4ae45eb38ec2e59bce74fb278" | |
REPO="$1" | |
BRANCH="$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
import argparse | |
import os | |
import numpy as np | |
import pandas as pd | |
import boto3 | |
from io import StringIO | |
from sklearn.model_selection import train_test_split | |
from sklearn.linear_model import LogisticRegression | |
from sklearn.metrics import accuracy_score |
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
import os | |
import sagemaker | |
import boto3 | |
iam_client = boto3.client('iam') | |
role = iam_client.get_role(RoleName='AmazonSageMaker-ExecutionRole-xyz')['Role']['Arn'] | |
sm_client = boto3.client('sagemaker', region_name="us-east-1") | |
model_package_group_name = "Titanic-survival" | |
model_package_group_input_dict = { |
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 boto3 | |
sm_client = boto3.client('sagemaker', region_name='us-east-1') | |
model_url = "s3://sagemaker-us-east-1-.../sagemaker-scikit-learn-.../output/model.tar.gz" | |
modelpackage_inference_specification = { | |
"InferenceSpecification": { | |
"Containers": [ |
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 boto3 | |
from datetime import datetime | |
sm_client = boto3.client('sagemaker', region_name='us-east-1') | |
model_name = 'titanic-survival-v1' | |
print("Model name : {}".format(model_name)) | |
container_list = [{'ModelPackageName': 'arn:aws:sagemaker:us-east-1:...:model-package/titanic-survival/3'}] |
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 boto3 | |
sm_client = boto3.client('sagemaker', region_name='us-east-1') | |
endpoint_config_name = 'titanic-survival-endpoint-config' | |
print(endpoint_config_name) | |
create_endpoint_config_response = sm_client.create_endpoint_config( | |
EndpointConfigName = endpoint_config_name, | |
ProductionVariants=[{ | |
'InstanceType':'ml.m4.xlarge', | |
'InitialVariantWeight':1, |
OlderNewer