Skip to content

Instantly share code, notes, and snippets.

View kelvinAI's full-sized avatar
👋
Got a business idea? Let's talk!

Kelvin Kong kelvinAI

👋
Got a business idea? Let's talk!
View GitHub Profile
@kelvinAI
kelvinAI / tmux_local_install.sh
Created August 18, 2020 13:00 — forked from ryin/tmux_local_install.sh
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
@kelvinAI
kelvinAI / timeseries_cnn.py
Created December 15, 2017 15:39 — forked from jkleint/timeseries_cnn.py
Example of using Keras to implement a 1D convolutional neural network (CNN) for timeseries prediction.
#!/usr/bin/env python
"""
Example of using Keras to implement a 1D convolutional neural network (CNN) for timeseries prediction.
"""
from __future__ import print_function, division
import numpy as np
from keras.layers import Convolution1D, Dense, MaxPooling1D, Flatten
from keras.models import Sequential
@kelvinAI
kelvinAI / min-char-rnn-tensorflow.py
Created October 3, 2017 05:18 — forked from vinhkhuc/min-char-rnn-tensorflow.py
Vanilla Char-RNN using TensorFlow
"""
Vanilla Char-RNN using TensorFlow by Vinh Khuc (@knvinh).
Adapted from Karpathy's min-char-rnn.py
https://gist.github.com/karpathy/d4dee566867f8291f086
Requires tensorflow>=1.0
BSD License
"""
import random
import numpy as np
import tensorflow as tf
@kelvinAI
kelvinAI / min-char-rnn.py
Created September 25, 2017 10:58 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@kelvinAI
kelvinAI / install-tmux
Last active November 19, 2015 08:22 — forked from rothgar/install-tmux
Installing tmux 2.1 on CentOS 6.7 Final
# Install tmux on Centos release 6.7 Final
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
wget https://sourceforge.net/projects/levent/files/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz
tar -xzvf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
./configure --prefix=/usr/local