Skip to content

Instantly share code, notes, and snippets.

git log --oneline HEAD..abs |sed '$d' | awk '{print $1}' | xargs git cherry-pick
ps ux | fold -s -w $(tput cols)
learning.algorithm=LambdaMART-RegressionTree
learning.evaluation-metric=NDCG
# tree options
trees.num-leaves=50
trees.min-instance-percentage-per-leaf=0.25
trees.min-instance-per-leaf=-1
trees.feature-sampling=1.0
trees.randomized-splits=false
# comma separated list of feature id's zero-indexed
@lgrz
lgrz / f.vim
Created September 19, 2017 07:17
autocmd FileType r setlocal keywordprg=Rscript\ -e\ \'?<cword>\'
#!/usr/bin/env gawk -f
{
split($0, arr)
for (i in arr) {
if (arr[i] ~ "@") {
gsub(/[<>]/, "", arr[i])
print arr[i]
}
}
// Original Jing program for reference
prolog some: 2;
prolog op_unify: 2;
prolog below_floor: 1;
prolog above_floor: 1;
prolog next_floor_to_serve: 1;
action down: 0;
#!/usr/bin/env swipl -f -q -s
:- ['indigolog/Interpreters/indigolog-vanilla_swi'].
:- initialization main.
execute(A, Sr) :- ask_execute(A, Sr).
exog_occurs(_) :- fail.
rm(N) :- N = 1; N = 2.
find src -name *.h -type f -exec echo {} \; -exec grep -nE "( +$|\t+)" {} \;
/* gcc -g -o readlex readlex.c -Isrc */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "index.h"
int
main(void)
@lgrz
lgrz / foo.c
Last active August 29, 2015 14:27
struct lexicon_entry {
/* the term (t) */
char *term;
/* term length */
uint16_t len;
/* the document frequency (ft) */
uint32_t doc_freq;
/* start of inverted list for this term */
uint64_t offset;
};