Skip to content

Instantly share code, notes, and snippets.

View TachikakaMin's full-sized avatar
🎯
Focusing

Yimin Tang TachikakaMin

🎯
Focusing
View GitHub Profile
@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
@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'
@XueshiQiao
XueshiQiao / ExportNetEaseMusicSongList.js
Last active October 25, 2024 19:29
导出网易云音乐歌单到 AppleMusic / Spotify 等平台
/**
* 使用方法:
* 1. 用 Chrome 打开歌单的 web 页面(可以通过分享拿到链接,链接类似这样:http://music.163.com/playlist?id=xxx&userid=yyy)
* 2. 然后右键“检查”(如果有左上角有 device 选项,需要选择 Laptop 开头的,可以在 Edit/编辑 里添加,添加的时候注意 “User Agent string” 里选择 Desktop)
* 3. 在 console 里输入下面脚本,即可输出 “歌曲名 - 歌手名” 格式的内容:
Springsteen - Eric Church
Chattahoochee - Alan Jackson
Baby Now That I Found You - Alison Krauss
Check Yes or No - George Strait