Skip to content

Instantly share code, notes, and snippets.

View zentetsukenz's full-sized avatar
📷

Wiwatta Mongkhonchit zentetsukenz

📷
  • Opn
  • Bangkok, Thailand
View GitHub Profile
@zentetsukenz
zentetsukenz / tmux.conf
Last active April 26, 2017 18:08 — forked from spicycode/tmux.conf
tmux.conf
# 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
@zentetsukenz
zentetsukenz / cart_pole_v0.py
Created July 23, 2017 17:13
OpenAI Gym - Cart Pole v0 - Q learning
import pandas as pd
import numpy as np
import gym
from gym import wrappers
def build_state(observation, feature_bins):
return_val = ""
for i in range(len(feature_bins)):
return_val = return_val + str(np.digitize([observation[i]], feature_bins[i])[0])
return int(return_val)