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
| { | |
| "id": "/minio-dcos", | |
| "instances": 4, | |
| "cpus": 0.5, | |
| "mem": 512, | |
| "container": { | |
| "type": "DOCKER", | |
| "volumes": [ | |
| { | |
| "containerPath": "miniodata", |
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/bash | |
| # wait 5 seconds for dns to | |
| echo "Waiting 30 seconds for dns" | |
| sleep 30 | |
| # print environment | |
| env | |
| # get instance count |
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/sh | |
| # | |
| # Minio Cloud Storage, (C) 2017 Minio, Inc. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # |
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
| ights = { | |
| 'wc1': tf.Variable(tf.random_normal([5, 5, 1, 32])), | |
| 'wc2': tf.Variable(tf.random_normal([5, 5, 32, 64])), | |
| 'wd1': tf.Variable(tf.random_normal([7*7*64, 1024])), | |
| 'out': tf.Variable(tf.random_normal([1024, n_classes]))} | |
| biases = { | |
| 'bc1': tf.Variable(tf.random_normal([32])), | |
| 'bc2': tf.Variable(tf.random_normal([64])), | |
| 'bd1': tf.Variable(tf.random_normal([1024])), |
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/bash | |
| wget http://central.maven.org/maven2/com/amazonaws/aws-java-sdk/1.11.43/aws-java-sdk-1.11.43.jar | |
| wget http://central.maven.org/maven2/com/amazonaws/aws-java-sdk-core/1.11.43/aws-java-sdk-core-1.11.43.jar | |
| wget http://central.maven.org/maven2/com/amazonaws/aws-java-sdk-kms/1.11.43/aws-java-sdk-kms-1.11.43.jar | |
| wget http://central.maven.org/maven2/com/amazonaws/aws-java-sdk-s3/1.11.43/aws-java-sdk-s3-1.11.43.jar | |
| wget http://central.maven.org/maven2/org/apache/hadoop/hadoop-aws/2.7.1/hadoop-aws-2.7.1.jar | |
| wget http://central.maven.org/maven2/org/apache/hadoop/hadoop-aws/3.0.0-alpha1/hadoop-aws-3.0.0-alpha1.jar | |
| wget http://central.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.8.4/jackson-annotations-2.8.4.jar | |
| wget http://central.maven.org/maven2/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.jar |
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
| car = imread(car.png); | |
| beach = imread(beach.png); | |
| merge = car / 2 + beach / 2 ; | |
| imshow(merge); | |
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
| car = imread(car.png); | |
| beach = imread(beach.png); | |
| merge = car + beach ; | |
| imshow(merge); | |
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
| # read the image. | |
| img = imread('bicycle.png'); | |
| # display the image | |
| imshow(img); | |
| # check size of the image. | |
| disp(size(img)); % check size | |
| # separate out the red channel. | |
| img_red = img(: ,:, 1); | |
| # display the image with the red channel. | |
| imshow(img_red); |
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
| # read the image. | |
| img = imread('bicycle.png'); | |
| # display the image | |
| imshow(img); | |
| # check size of the image. | |
| disp(size(img)); % check size | |
| # select the region to crop | |
| cropped = img(110:310, 10:160); | |
| # display cropped image. | |
| imshow(cropped); |
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
| # Do all the relevant imports | |
| import matplotlib.pyplot as plt | |
| import matplotlib.image as mpimg | |
| import numpy as np | |
| import cv2 | |
| # Read in the image and convert to grayscale | |
| # Note: in the previous example we were reading a .jpg | |
| # Here we read a .png and convert to 0,255 bytescale | |
| image = mpimg.imread('exit-ramp.jpg') |