- system update
$ sudo yum -y update
$ sudo yum -y install epel-release
$ sudo yum -y install gcc gcc-c++ python-pip python-devel atlas atlas-devel gcc-gfortran openssl-devel libffi-devel| version: 0.2 | |
| env: | |
| variables: | |
| # | |
| # NOTE: You need to replace these values! | |
| # | |
| ACCOUNT_NUMBER: "REPLACE_ME" | |
| ECR_REGION: "REPLACE_ME" | |
| ECR_REPOSITORY_NAME: "REPLACE_ME" | |
| ECS_CONTAINER_NAME: "REPLACE_ME" |
| from flask import Flask | |
| from flask import request | |
| import json | |
| import requests | |
| import hashlib as hasher | |
| import datetime as date | |
| node = Flask(__name__) | |
| # Define what a Snakecoin block is | |
| class Block: |
| import hashlib as hasher | |
| import datetime as date | |
| # Define what a Snakecoin block is | |
| class Block: | |
| def __init__(self, index, timestamp, data, previous_hash): | |
| self.index = index | |
| self.timestamp = timestamp | |
| self.data = data | |
| self.previous_hash = previous_hash |
| from keras.layers.core import Layer | |
| import keras.backend as K | |
| if K.backend() == 'tensorflow': | |
| import tensorflow as tf | |
| def K_arange(start, stop=None, step=1, dtype='int32'): | |
| result = tf.range(start, limit=stop, delta=step, name='arange') | |
| if dtype != 'int32': | |
| result = K.cast(result, dtype) | |
| return result |
| from keras import applications | |
| from keras.preprocessing.image import ImageDataGenerator | |
| from keras import optimizers | |
| from keras.models import Sequential, Model | |
| from keras.layers import Dropout, Flatten, Dense, GlobalAveragePooling2D | |
| from keras import backend as k | |
| from keras.callbacks import ModelCheckpoint, LearningRateScheduler, TensorBoard, EarlyStopping | |
| img_width, img_height = 256, 256 |
| import pandas as pd | |
| import numpy as np | |
| import logging | |
| import time | |
| import datetime | |
| from sklearn.ensemble import RandomForestClassifier | |
| from sklearn import cross_validation | |
| from sklearn.svm import SVC | |
| from sklearn.metrics import accuracy_score | |
| from sklearn.feature_selection import VarianceThreshold |
| # (C) Kyle Kastner, June 2014 | |
| # License: BSD 3 clause | |
| import scipy.stats as st | |
| import numpy as np | |
| class gmmhmm: | |
| #This class converted with modifications from https://code.google.com/p/hmm-speech-recognition/source/browse/Word.m | |
| def __init__(self, n_states): | |
| self.n_states = n_states |