Skip to content

Instantly share code, notes, and snippets.

View AhmetHamzaEmra's full-sized avatar
🐴
Horse!

Ahmet Hamza Emra AhmetHamzaEmra

🐴
Horse!
View GitHub Profile
import numpy as np
import gym
import itertools
import tensorflow as tf
def discount_rewards(r, gamma = 0.8):
discounted_r = np.zeros_like(r)
running_add = 0
import numpy as np
import gym
import itertools
import tensorflow as tf
def discount_rewards(r, gamma = 0.8):
discounted_r = np.zeros_like(r)
running_add = 0
@AhmetHamzaEmra
AhmetHamzaEmra / min-char-rnn.py
Created February 2, 2018 17:56 — 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)
import gym
import random
import numpy as np
import tflearn
from tflearn.layers.core import input_data, dropout, fully_connected
from tflearn.layers.estimator import regression
from statistics import median, mean
from collections import Counter
LR = 1e-3
@AhmetHamzaEmra
AhmetHamzaEmra / country.html
Created March 20, 2017 19:59
visualization with d3
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v3.min.js"></script>
<style>
body : {background-color: LightBlue};
</style>
<script type="text/javascript">
function draw(geo_data) {