Skip to content

Instantly share code, notes, and snippets.

View TachikakaMin's full-sized avatar
🎯
Focusing

Yimin Tang TachikakaMin

🎯
Focusing
View GitHub Profile
@qytang326
qytang326 / Update-host.bat
Last active July 21, 2021 16:14
Update GFW hosts and Blacklist hosts on Windows
cd C:\Windows\System32\drivers\etc
cp hosts hosts-bak
wget https://raw.githubusercontent.com/lennylxx/ipv6-hosts/master/hosts -O hosts-ipv6
#wget https://raw.githubusercontent.com/racaljk/hosts/master/hosts -O hosts-ipv4
wget https://raw.githubusercontent.com/googlehosts/hosts/master/hosts-files/hosts -O hosts-ipv4
wget https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts -O hosts-blacklist
cat hosts-other hosts-ipv4 hosts-ipv6 hosts-blacklist > hosts
#sed -i '/vidia/d' hosts
ipconfig/flushdns
echo 'end'
@karpathy
karpathy / pg-pong.py
Created May 30, 2016 22:50
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward