Skip to content

Instantly share code, notes, and snippets.


(Bill) Yuchen Lin yuchenlin

View GitHub Profile
evanwill /
Last active Jul 5, 2020
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:


start new with session name:

Tims101 / Top 50 Universities
Last active Jul 4, 2020
Top 50 Computer Science Universities
View Top 50 Universities


Massachusetts Institute of Technology (MIT)


  • MIT Graduate Admissions link
  • PhD Program - MIT Sloan School of Management link
  • MIT - Massachusetts Institute of Technology link
  • to view contact information for all departments. - MIT link
mblondel /
Last active Jul 1, 2020
Learning to rank metrics.
# (C) Mathieu Blondel, November 2013
# License: BSD 3 clause
import numpy as np
def ranking_precision_score(y_true, y_score, k=10):
"""Precision at rank k
# this script installs GCC 5.4.0
# to use it navigate to your home directory and type:
# sh
# download and install gcc 4.9.3
tar xzf gcc-5_4_0-release.tar.gz
cd gcc-5_4_0-release
# this script installs GCC 4.9.3
# to use it navigate to your home directory and type:
# sh
# download and install gcc 4.9.3
tar xzf gcc-4.9.3.tar.gz
cd gcc-4.9.3
chuanconggao /
Last active Jun 2, 2020
The original minimal 15 lines implementation of PrefixSpan. Full library at
from collections import defaultdict
def frequent_rec(patt, mdb):
results.append((len(mdb), patt))
occurs = defaultdict(list)
for (i, startpos) in mdb:
seq = db[i]
for j in range(startpos + 1, len(seq)):
l = occurs[seq[j]]
Tushar-N /
Last active May 18, 2020
How to use pad_packed_sequence in pytorch<1.1.0
import torch
import torch.nn as nn
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
seqs = ['gigantic_string','tiny_str','medium_str']
# make <pad> idx 0
vocab = ['<pad>'] + sorted(set(''.join(seqs)))
# make model
from transformers import GPT2Tokenizer, GPT2LMHeadModel
import torch
from torch.nn import CrossEntropyLoss
from tqdm import trange
max_length = 24
batch_size = 200
misberner / .gitignore-latex
Created Jan 8, 2014
.gitignore rules for LaTeX projects
View .gitignore-latex
# LaTeX temporary files
# PDF output - usually a bad idea to keep this in Git
# Latexmk
You can’t perform that action at this time.