Skip to content

Instantly share code, notes, and snippets.

View jiayuzhou's full-sized avatar
🎯
Focusing

Jiayu Zhou jiayuzhou

🎯
Focusing
View GitHub Profile
@jiayuzhou
jiayuzhou / uninstall-GHfM.sh
Created May 27, 2017 22:16
Completely uninstall GitHub for Mac
#!/bin/bash
function remove_dir () {
rm -rf "$1_"
if [ -d "$1" ]
then
mv "$1" "$1_"
fi
}
@jiayuzhou
jiayuzhou / pg-pong.py
Created June 24, 2016 17:58 — forked from karpathy/pg-pong.py
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
@jiayuzhou
jiayuzhou / caffe_proto_.cc
Last active August 29, 2015 14:24 — forked from kyamagu/caffe_proto_.cc
Caffe Protobuf converter
// Caffe proto converter.
//
// Build
//
// mex -I/path/to/mexplus ...
// -I/path/to/build/src/caffe/proto/ ...
// caffe_proto_.cc ...
// /path/to/build/src/caffe/proto/caffe.pb.o ...
// -lprotobuf
//
// Caffe proto converter.
//
// Build
//
// mex -I/path/to/mexplus ...
// -I/path/to/build/src/caffe/proto/ ...
// caffe_proto_.cc ...
// /path/to/build/src/caffe/proto/caffe.pb.o ...
// -lprotobuf ...
// -L/usr/local/lib

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
/*
* ====================================================================
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*