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
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 |
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
#!/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 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 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 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 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
pipeline { | |
agent any | |
stages { | |
stage('Build') { | |
steps { | |
echo 'Building..' | |
} | |
} | |
stage('Test') { | |
steps { |
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 boto.ec2 | |
from collections import defaultdict | |
regions = {region.name: region.name for region in boto.ec2.regions()} | |
class RegionPricingContext(object): | |
def __init__(self, region): | |
self.region = region | |
self.context = None |
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
<script> | |
Notification.requestPermission().then(function(result) { | |
console.log(result); | |
}); | |
var notify = function(message) { | |
// Let's check if the browser supports notifications | |
if (!("Notification" in window)) { | |
alert("This browser does not support system notifications"); | |
} |
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
call plug#begin() | |
Plug 'scrooloose/nerdtree' | |
Plug 'vim-scripts/Solarized' | |
Plug 'ervandew/supertab' | |
Plug 'scrooloose/nerdcommenter' | |
Plug 'tomasr/molokai' | |
Plug 'jiangmiao/auto-pairs' | |
Plug 'nathanaelkane/vim-indent-guides' | |
Plug 'fatih/vim-go', | |
Plug 'nvie/vim-flake8' |
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
### INSTALLATION NOTES ### | |
# 1. Install Homebrew (https://github.com/mxcl/homebrew) | |
# 2. brew install zsh | |
# 3. Install OhMyZsh (https://github.com/robbyrussell/oh-my-zsh) | |
# 4. brew install reattach-to-user-namespace --wrap-pbcopy-pbpaste && brew link reattach-to-user-namespace | |
# 5. Install iTerm2 | |
# 6. In iTerm2 preferences for your profile set: | |
# Character Encoding: Unicode (UTF-8) | |
# Report Terminal Type: xterm-256color | |
# 7. Put itunesartist and itunestrack into PATH |
NewerOlder