- Send Escape if you tap Caps Lock alone.
- Send Control if you press Caps Lock with another key.
For both Vim and Emacs world.
#! /usr/bin/env bash | |
first="" | |
second="" | |
third_flag="" | |
function usage() { | |
echo "$0 args" | |
echo "" | |
echo "required arguments:" | |
echo " --first first argument" |
#! /usr/bin/env python | |
import subprocess | |
import argparse | |
import httplib | |
import json | |
parser = argparse.ArgumentParser(description="print out all documents in an index to stdout") | |
parser.add_argument("--index", type=str) | |
parser.add_argument("--host", type=str) | |
parser.add_argument("--port", default=9200, type=int) |
"""Information Retrieval metrics | |
Useful Resources: | |
http://www.cs.utexas.edu/~mooney/ir-course/slides/Evaluation.ppt | |
http://www.nii.ac.jp/TechReports/05-014E.pdf | |
http://www.stanford.edu/class/cs276/handouts/EvaluationNew-handout-6-per.pdf | |
http://hal.archives-ouvertes.fr/docs/00/72/67/60/PDF/07-busa-fekete.pdf | |
Learning to Rank for Information Retrieval (Tie-Yan Liu) | |
""" | |
import numpy as np |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |