Skip to content

Instantly share code, notes, and snippets.

@hrishikeshvganu
hrishikeshvganu / wsgi.py
Last active October 11, 2020 19:09 — forked from ywolff/wsgi.py
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
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))
@hrishikeshvganu
hrishikeshvganu / install-tmux
Created November 4, 2018 17:33 — forked from philipsd6/install-tmux
Install tmux 2.3 on rhel/centos 7
# 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
@hrishikeshvganu
hrishikeshvganu / README.md
Created January 24, 2017 15:38 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


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:

@hrishikeshvganu
hrishikeshvganu / prefs.js
Created July 22, 2016 16:03
about_config firefox solarized
# Mozilla User Preferences
/* Do not edit this file.
*
* If you make changes to this file while the application is running,
* the changes will be overwritten when the application exits.
*
* To make a manual change to preferences, you can visit the URL about:config
*/
@hrishikeshvganu
hrishikeshvganu / tmux.conf
Created July 22, 2016 09:38 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 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
@hrishikeshvganu
hrishikeshvganu / tf_beam_decoder.py
Created June 23, 2016 10:41 — forked from nikitakit/tf_beam_decoder.py
Tensorflow Beam Search
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].
@hrishikeshvganu
hrishikeshvganu / tf8_aws.sh
Created May 15, 2016 10:15 — forked from dennybritz/tf8_aws.sh
Tensorflow 0.8 on AWS GPU instance installati
# 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
@hrishikeshvganu
hrishikeshvganu / gist:d14f3d5fa85d43958dec9ebdaf64b4ef
Created April 6, 2016 15:24 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

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