Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

(Bill) Yuchen Lin yuchenlin

🎯
Focusing
Block or report user

Report or block yuchenlin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@yuchenlin
yuchenlin / label_data.py
Last active May 23, 2017
Lable the price changes in a csv file
View label_data.py
import os
import pandas as pd
STEP = 20
filenames = []
DBExport = '/home/bill/dm_proj/DBExport'
for filename in os.listdir(DBExport):
if filename.endswith(".csv"):
filenames.append(os.path.join(DBExport, filename))
filenames.sort()
@Tims101
Tims101 / Top 50 Universities List.md
Last active Jun 11, 2018
Top 50 Computer Science Universities
View Top 50 Universities List.md

Universities

Massachusetts Institute of Technology (MIT)

###phd###

  • 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
@chuanconggao
chuanconggao / prefixspan.py
Last active Nov 5, 2018
The original minimal 15 lines implementation of PrefixSpan. Full library at https://github.com/chuanconggao/PrefixSpan-py.
View prefixspan.py
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]]
@peterjc123
peterjc123 / build.ps1
Last active Nov 12, 2018
Setup script for Windows PyTorch
View build.ps1
# Prerequisites
# 1. MSVC 2017 C++ Build Tools
# 2. CMAKE 3.0 or up
# 3. 64 bits of Windows
# 4. Anaconda / MiniConda 64 bits
# Prerequisites for CUDA
# 1. CUDA 8.0 or up
# 2. NVTX( in CUDA as Visual Studio Integration. if fail to install, you can extract
# the CUDA installer exe and found the NVTX installer under the CUDAVisualStudioIntegration)
@tmdavid
tmdavid / word_embedding_vis.py
Last active Jan 30, 2019
Visualize word embeddings, using tsne.
View word_embedding_vis.py
"""
Visualize word embeddings, using tsne.
First computes cosine distance of the 100 closests words, and then shows a clustering graph
of the first 11 closest words (the first one is always the word)
IT REQUIRES GLOVE MODEL.txt
line 31: glove_file = '../TBIR/glove.840B.300d.txt' MODIFY with the appropiate path
To Use it, you can just type: python word_embedding_vis.py <list of words space separated>
e.g: python word_embedding_vis.py cake word embedding music
"""
@lucaswiman
lucaswiman / foo.dot
Created May 31, 2016
networkx / graphviz example
View foo.dot
digraph {
0 -> "*" [key=0,
label="[b]"];
1 -> "*" [key=0,
label="[d]"];
enter -> "*" [key=0,
label=ε];
"*" -> 0 [key=0,
label="[a]"];
"*" -> 1 [key=0,
@misberner
misberner / .gitignore-latex
Created Jan 8, 2014
.gitignore rules for LaTeX projects
View .gitignore-latex
# LaTeX temporary files
*.aux
*.log
*.toc
# PDF output - usually a bad idea to keep this in Git
*.pdf
# Latexmk
*.fdb_latexmk
@bbengfort
bbengfort / jsonexplorer.py
Last active Jul 25, 2019
Interactive JSON explorer using Python's cmd module
View jsonexplorer.py
#!/usr/bin/env python
# jsonexplorer
# An interactive interface to explore JSON documents
#
# Author: Benjamin Bengfort <benjamin@bengfort.com>
# Created: Wed Jun 17 12:15:23 2015 -0400
#
# Copyright (C) 2015 Bengfort.com
# Licensed under the OSI Approved MIT License
#
@Tushar-N
Tushar-N / pad_packed_demo.py
Last active Aug 20, 2019
How to use pad_packed_sequence in pytorch
View pad_packed_demo.py
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
View install-gcc-5.4.0.sh
#!/bin/bash
# this script installs GCC 5.4.0
# to use it navigate to your home directory and type:
# sh install-gcc-5.4.0.sh
# download and install gcc 4.9.3
wget https://github.com/gcc-mirror/gcc/archive/gcc-5_4_0-release.tar.gz
tar xzf gcc-5_4_0-release.tar.gz
cd gcc-5_4_0-release
You can’t perform that action at this time.