Skip to content

Instantly share code, notes, and snippets.

View gdshen's full-sized avatar

Guodong Shen gdshen

View GitHub Profile
@gdshen
gdshen / gist:482c6d0a767901a2137112b7e7498375
Created November 6, 2017 08:46
IMDB-WIKI caffe model
name: "VGG_ILSVRC_16_layers"
layer {
top: "data"
type: "ImageData"
top: "label"
name: "data"
transform_param {
mirror: true
crop_size: 224
mean_file: "imagenet_mean.binaryproto"
@gdshen
gdshen / mgrid.py
Created September 4, 2017 07:28
numpy mgrid
# generate (0,0), (0,1), ... , (0,4), (1,0), (1,1), ... (1, 4), ..., (4,4) pair
np.mgrid[0:5, 0:5].T.reshape(-1, 2)
import torch
import torch.nn as nn
from torch.autograd import Variable
import torch.optim as optim
a = torch.ones(1,2)
b = torch.nn.Linear(2,1)
b.zero_grad()
c = b(Variable(a))
@gdshen
gdshen / .sh
Created October 17, 2016 01:38
Host key verification failed
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
@gdshen
gdshen / potatso_tiny.conf
Created July 10, 2016 02:03 — forked from s7lx/potatso_tiny.conf
A list of potatso for keywords need bypass
ruleSets:
- name: tiny_gfwlist
rules:
- instagram, PROXY
- blogspot, PROXY
- google, PROXY
- facebook, PROXY
- youtube, PROXY
- twitter, PROXY
- gmail, PROXY
@gdshen
gdshen / potatso.conf
Created July 10, 2016 01:51
2016.7.10.potatso.conf
ruleSets:
- name: gfwlist_official
rules:
- IP-CIDR,192.168.0.0/16,DIRECT
- IP-CIDR,10.0.0.0/8,DIRECT
- IP-CIDR,172.16.0.0/12,DIRECT
- IP-CIDR,127.0.0.0/8,DIRECT
- IP-CIDR,91.108.56.0/22,Proxy
- IP-CIDR,91.108.4.0/22,Proxy
- IP-CIDR,109.239.140.0/24,Proxy
@gdshen
gdshen / gist:9aec97c55f1547d15a2c1d8ffd7af708
Created April 10, 2016 15:15 — forked from entaroadun/gist:1653794
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation:

@gdshen
gdshen / test.py
Created January 20, 2016 13:37
test
def new_count(n):
def f():
nonlocal n
n += 1
return n
return f