For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
"Plot a PNG using matplotlib in a web request, using Flask." | |
# Install dependencies, preferably in a virtualenv: | |
# | |
# pip install flask matplotlib | |
# | |
# Run the development server: | |
# | |
# python app.py | |
# |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
# Install build tools | |
sudo apt-get update | |
sudo apt-get install -y build-essential git python-pip libfreetype6-dev libxft-dev libncurses-dev libopenblas-dev gfortran python3-matplotlib libblas-dev liblapack-dev libatlas-base-dev python3-dev python3-pydot linux-headers-generic linux-image-extra-virtual unzip python3-numpy swig python3-pandas python-sklearn unzip python3-pip | |
sudo pip3 install -U pip | |
sudo pip3 install -U ipython jupyter scikit-learn | |
# Install CUDA 7 | |
# wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1410/x86_64/cuda-repo-ubuntu1410_7.0-28_amd64.deb | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1504/x86_64/cuda-repo-ubuntu1504_7.5-18_amd64.deb | |
sudo dpkg -i cuda-repo-ubuntu1504_7.5-18_amd64.deb && rm cuda-repo-ubuntu1504_7.5-18_amd64.deb |
import tensorflow as tf | |
def beam_decoder(decoder_inputs, initial_state, cell, loop_function, scope=None, | |
beam_size=7, done_token=0 | |
): | |
""" | |
Beam search decoder | |
Args: | |
decoder_inputs: A list of 2D Tensors [batch_size x input_size]. |
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
Index:
# Install tmux on rhel/centos 7 | |
# install deps | |
yum install gcc kernel-devel make ncurses-devel | |
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
curl -OL https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz | |
tar -xvzf libevent-2.0.22-stable.tar.gz | |
cd libevent-2.0.22-stable | |
./configure --prefix=/usr/local |
from pathlib import Path | |
import tensorflow as tf | |
from build_big_model import build_big_model | |
MODEL_NAME = 'big_model' | |
MODEL_VERSION = '1' | |
model = build_big_model() | |
tf.saved_model.save(model, str(Path('models') / MODEL_NAME / MODEL_VERSION)) |
import threading | |
import time | |
from queue import Empty, Queue | |
import numpy as np | |
from flask import Flask, request as flask_request | |
from build_big_model import build_big_model | |
BATCH_SIZE = 20 |