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 flask import Flask | |
app = Flask(__name__) | |
@app.route("/") | |
def hello_flask(): | |
return "Hello world" | |
app.run(host="0.0.0.0", port=8090) |
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
# Start with node environment. | |
# * Download packages | |
# * Build application | |
FROM node:6 as builder | |
COPY . /build | |
WORKDIR /build | |
RUN npm install && npm run build | |
FROM nginx |
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
# Uncomment to print commands being executed | |
# set -x | |
pid=0 | |
# SIGTERM-handler | |
term_handler() { | |
echo "Handler INT"; | |
if [ $pid -ne 0 ]; then | |
kill -SIGTERM "$pid" | |
wait "$pid" |
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
#!/usr/bin/perl | |
use Socket; | |
die("usage: gethostby-lookup name hostname\ngetbhostby-lookup addr ip\n") unless(defined($ARGV[0]) and defined($ARGV[1])); | |
if($ARGV[0] eq "host") { | |
$packed_ip = gethostbyname("$ARGV[1]"); | |
if (defined $packed_ip) { | |
$ip_address = inet_ntoa($packed_ip); | |
print "$ip_address\n"; |
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 keras.models import Model, Sequential | |
from keras.layers import Input, Convolution2D, ZeroPadding2D, MaxPooling2D, Flatten, Dense, Dropout, Activation | |
from PIL import Image,UnidentifiedImageError | |
import numpy as np | |
from keras.preprocessing.image import load_img, save_img, img_to_array | |
from keras.applications.imagenet_utils import preprocess_input | |
from keras.preprocessing import image | |
from keras.models import model_from_json |
OlderNewer