Skip to content

Instantly share code, notes, and snippets.

View RochaC's full-sized avatar

Rochachan RochaC

  • Wifi
  • Shanghai,China
View GitHub Profile
@RochaC
RochaC / Q-Table Learning-Clean.ipynb
Created August 27, 2017 11:18 — forked from awjuliani/Q-Table Learning-Clean.ipynb
Q-Table learning in OpenAI grid world.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RochaC
RochaC / gpu-add.sh
Last active September 11, 2017 06:47 — forked from mjdietzx/waya-dl-setup.sh
Install CUDA Toolkit v8.0 and cuDNN v6.0 on Ubuntu 16.04
#!/bin/bash
# install CUDA Toolkit v8.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb"
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-get update
sudo apt-get -y install cuda
@RochaC
RochaC / featureHash.py
Last active September 11, 2017 06:52
Common used feature tricks
from sklearn.feature_extraction import FeatureHasher
from scipy.sparse import csr_matrix,hstack
from sklearn.base import BaseEstimator, TransformerMixin
# # hasher class
class Hasher(BaseEstimator, TransformerMixin):
def __init__(self,hashMap=None):
self.hashMap = hashMap
def fit(self,X):
@RochaC
RochaC / 0_reuse_code.js
Last active September 11, 2017 06:44
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console