test/
-- test_add.py
src/
-- add.py
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
| import boto3 | |
| import os | |
| ### source aws config parameter | |
| source_aws_region='eu-west-1' | |
| source_aws_access_key_id='####' | |
| source_aws_secret_acess_key='####' | |
| source_dynamodb_table='table_name' | |
| ### target aws config parameter | |
| target_aws_region='eu-west-1' | |
| target_aws_access_key_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
| Resources: | |
| LambdaExecutionAnomalyDetector: | |
| Type: AWS::CloudWatch::AnomalyDetector | |
| Properties: | |
| MetricName: Duration | |
| Namespace: AWS/Lambda | |
| Stat: Sum | |
| LambdaExecutionAlarm: | |
| Type: AWS::CloudWatch::Alarm |
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
| var copy = require('copy-dynamodb-table').copy | |
| var globalAWSConfig = { // AWS Configuration object http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#constructor-property | |
| accessKeyId: 'AKID', | |
| secretAccessKey: 'SECRET', | |
| region: 'eu-west-1' | |
| } | |
| var sourceAWSConfig = { | |
| accessKeyId: 'AKID', |
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
| import numpy as np | |
| from sklearn.model_selection import KFold | |
| # data sample | |
| data = np.array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6]) | |
| # prepare cross validation | |
| kfold = KFold(n_splits=3, shuffle=True, random_state=1) | |
| # enumerate splits | |
| for train, test in kfold.split(data): | |
| print('train: %s, test: %s' % (data[train], data[test])) |
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 simpletransformers.classification import ClassificationModel | |
| from sklearn.model_selection import KFold | |
| from sklearn.metrics import accuracy_score | |
| import pandas as pd | |
| # Dataset | |
| dataset = [["Example sentence belonging to class 1", 1], | |
| ["Example sentence belonging to class 0", 0], | |
| ["Example eval sentence belonging to class 1", 1], |
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 autogluon import TabularPrediction as task | |
| predictor = task.fit(train_data=task.Dataset(file_path="TRAIN_DATA.csv"), label="PREDICT_COLUMN") | |
| predictions = predictor.predict(task.Dataset(file_path="TEST_DATA.csv")) |
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
| # Here we assume CUDA 10.0 is installed. You should change the number | |
| # according to your own CUDA version (e.g. mxnet-cu101 for CUDA 10.1). | |
| !pip install --upgrade mxnet-cu100 | |
| !pip install autogluon |
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
| !pip install -U ipykernel |
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
| import autogluon as ag | |
| from autogluon import ObjectDetection as task | |
| print(ag.__version__) | |
| # >>>> '0.0.6' |