Skip to content

Instantly share code, notes, and snippets.

@mdekstrand
mdekstrand / AlgoMetrics.ipynb
Created June 18, 2021 16:48
LK perf status
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mdekstrand
mdekstrand / ir-simulation.bib
Created March 22, 2021 18:06
Fernando Diaz' list of IR simulation papers.
% Generated by Paperpile. Check out https://paperpile.com for more information.
% BibTeX export options can be customized via Settings -> BibTeX.
@ARTICLE{Cooper1973-ix,
title = "A simulation model of an information retrieval system",
author = "Cooper, Michael D",
journal = "Information Storage and Retrieval",
publisher = "Elsevier",
volume = 9,
number = 1,
@mdekstrand
mdekstrand / MakePDF.java
Created February 20, 2021 21:09
Generate PDF with iText
package net.ekstrandom.htmlpdf;
import java.util.Optional;
import java.io.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import picocli.CommandLine;
// import com.itextpdf.kernel.io.*;
import com.itextpdf.kernel.pdf.*;
import com.itextpdf.html2pdf.*;
make_polt = function(plot, file=NA, width=5, height=3, ...) {
if (!is.na(file)) {
png(paste(file, "png", sep="."), width=width, height=height, units='in', res=600, ...)
print(plot)
dev.off()
cairo_pdf(paste(file, "pdf", sep="."), width=width, height=height, ...)
print(plot)
dev.off()
}
plot
@mdekstrand
mdekstrand / LKDemo.ipynb
Created August 28, 2019 18:42
LensKit demo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mdekstrand
mdekstrand / keybase.md
Created August 13, 2019 00:46
Keybase verification

Keybase proof

I hereby claim:

  • I am mdekstrand on github.
  • I am mdekstrand (https://keybase.io/mdekstrand) on keybase.
  • I have a public key ASCMp-KFf_h2tKxrC9Xt-PvSwbcdAGJmPuIoi6uQUf8dhwo

To claim this, I am signing this object:

@mdekstrand
mdekstrand / OddHoroscope.ipynb
Last active November 14, 2018 21:52
Replication of odd response IDs predicting horoscopes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am mdekstrand on github.
  • I am mdekstrand (https://keybase.io/mdekstrand) on keybase.
  • I have a public key ASCwyXEHjdWdTTOcTj0-JWS-H4yRgVZkEOTByiQB2eBFJAo

To claim this, I am signing this object:

@mdekstrand
mdekstrand / provision-flask.sh
Last active January 20, 2016 21:25
Provisioning task
#!/bin/sh
set +e
# This script just uses Ansible to bootstrap things
apt-get -y install ansible wget
wget -O /tmp/provision.yaml https://gist.githubusercontent.com/mdekstrand/af112b6b12c68949554f/raw/provision.yaml
echo 127.0.0.1 >/tmp/inventory
ansible-playbook -i /tmp/inventory --connection=local /tmp/provision.yaml
@mdekstrand
mdekstrand / publication.rb
Created October 9, 2015 00:18
publication Liquid tag
# Copyright 2015 Michael D. Ekstrand.
# Licensed under the MIT License http://md.ekstrandom.net/copyright
require 'nokogiri'
module Jekyll
class PubCiteTag < Liquid::Tag
def initialize(tag_name, text, tokens)
super
@key = text.strip
@kpath = "research/pubs/#{@key}/index.md"