Skip to content

Instantly share code, notes, and snippets.

@vasanthk
vasanthk / System Design.md
Last active May 24, 2024 06:19
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@teamaton
teamaton / disable-fusion-log.ps1
Last active November 6, 2023 12:53
FusionLog - enable and disable
Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name ForceLog
Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogFailures
Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogResourceBinds
Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogPath
@jonhoo
jonhoo / README.md
Last active July 19, 2021 10:49
Distributed RWMutex in Go
@pluskid
pluskid / sample-resume.tex
Last active January 7, 2022 01:08
Sample resume template
% Some people asked the LaTeX template for http://pluskid.org/assets/chiyuan-resume.pdf
% So I put a sample here. Feel free to use / modify it. Note you need to use xelatex to
% compile it and change the fonts to the ones you prefer and have on your system.
\documentclass[11pt]{article}
\usepackage{color}
\definecolor{ColorURL}{rgb}{0.1,0.12,0.45}
\usepackage[colorlinks=true,urlcolor=ColorURL]{hyperref}
\usepackage{fontspec,xunicode,xltxtra}
\usepackage[left=.8in,right=.8in,top=.9in,bottom=.7in]{geometry}
\usepackage{setspace}
@neubig
neubig / lstm-lm.py
Last active August 23, 2017 09:18
This is a minimal implementation of training for a language model using long short-term memory (LSTM) neural networks
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This is a simplified implementation of the LSTM language model (by Graham Neubig)
#
# LSTM Neural Networks for Language Modeling
# Martin Sundermeyer, Ralf Schlüter, Hermann Ney
# InterSpeech 2012
#
# The structure of the model is extremely simple. At every time step we
sudo yum install jdk-7u65-linux-x64.rpm
sudo yum install gcc
sudo yum install gcc-gfortran
sudo yum install blas lapack arpack
unzip netlib-java-1.1.2.zip
cd ~/netlib-java-1.1.2
sed -i "s/1.2-SNAPSHOT/1.1.2/g" `grep -rl 1.2-SNAPSHOT .`
mvn install
cd native_system/
@freeman-lab
freeman-lab / bisecting.scala
Last active December 29, 2015 07:45
Bisecting k-means for hierarchical clustering in Spark
/**
* bisecting <master> <input> <nNodes> <subIterations>
*
* divisive hierarchical clustering using bisecting k-means
* assumes input is a text file, each row is a data point
* given as numbers separated by spaces
*
*/
import org.apache.spark.SparkContext
@neubig
neubig / crf.py
Created November 7, 2013 10:59
This is a script to train conditional random fields. It is written to minimize the number of lines of code, with no regard for efficiency.
#!/usr/bin/python
# crf.py (by Graham Neubig)
# This script trains conditional random fields (CRFs)
# stdin: A corpus of WORD_POS WORD_POS WORD_POS sentences
# stdout: Feature vectors for emission and transition properties
from collections import defaultdict
from math import log, exp
import sys