Skip to content

Instantly share code, notes, and snippets.

View heekyungyoon's full-sized avatar

hellohee heekyungyoon

View GitHub Profile
@romainl
romainl / gist:9970697
Last active March 21, 2024 09:00
How to use Tim Pope's Pathogen

How to use Tim Pope’s Pathogen

I’ll assume you are on Linux or Mac OSX. For Windows, replace ~/.vim/ with $HOME\vimfiles\ and forward slashes with backward slashes.

The idea

Vim plugins can be single scripts or collections of specialized scripts that you are supposed to put in “standard” locations under your ~/.vim/ directory. Syntax scripts go into ~/.vim/syntax/, plugin scripts go into ~/.vim/plugin, documentation goes into ~/.vim/doc/ and so on. That design can lead to a messy config where it quickly becomes hard to manage your plugins.

This is not the place to explain the technicalities behind Pathogen but the basic concept is quite straightforward: each plugin lives in its own directory under ~/.vim/bundle/, where each directory simulates the standard structure of your ~/.vim/ directory.

@mrdwab
mrdwab / stratified.R
Last active April 27, 2024 19:57
Stratified random sampling from a `data.frame` in R
stratified <- function(df, group, size, select = NULL,
replace = FALSE, bothSets = FALSE) {
if (is.null(select)) {
df <- df
} else {
if (is.null(names(select))) stop("'select' must be a named list")
if (!all(names(select) %in% names(df)))
stop("Please verify your 'select' argument")
temp <- sapply(names(select),
function(x) df[[x]] %in% select[[x]])
@AlexanderFabisch
AlexanderFabisch / JuliaOctaveNumpy.md
Last active July 28, 2023 16:26
Comparison of Julia, NumPy and Octave

Comparison of Julia, Python and Octave

Overview

Julia is a new languange for technical computing. It is a mix of R, Matlab, Python and other similar languages. Its main advantage is its speed: it is just in time (JIT) compiled and almost as fast as C. Another advantage is its type inference, i.e. you do not have to specify types (although you can), but all variables are statically typed. It is a high level language that is fast as well. Here I compare the behavior to similar

@entaroadun
entaroadun / gist:1653794
Created January 21, 2012 20:10
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation: