This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import faiss | |
import numpy as np | |
import os | |
import tempfile | |
def ivecs_read(fname): | |
a = np.fromfile(fname, dtype='int32') | |
d = a[0] | |
return a.reshape(-1, d + 1)[:, 1:] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.Maybe | |
import System.Environment | |
import Debug.Trace (trace) | |
main = do | |
(rawPattern : input : _) <- getArgs | |
let pattern = parsePattern $ rawPattern | |
mapM print pattern | |
putStrLn $ show $ match pattern input |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make clean && make all -j 100 | tee ~/tmp/cassini.compile 2>&1 | |
mkdir build_regress && cd build_regress && cmake -D CMAKE_CORE_BUILD=../cassini/build ../cassini-regress/ && time make regress -j 24 | tee ~/tmp/cassini.regress 2>&1 && time make fullregress -j 24 | tee ~/tmp/cassini.regress 2>&1 && time make aggbvt -j 24 | tee ~/tmp/cassini.aggbvt 2>&1 && time make javaregress -j 24 | tee ~/tmp/cassini.javaregress 2>&1 && echo && echo && echo && tail ~/tmp/cassini.* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(datasets) | |
library(ggplot2) | |
tg <- ToothGrowth | |
tg$dose <- factor(tg$dose) | |
# Define server logic | |
shinyServer(function(input, output) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires Python 2.0+, readline. Autocomplete is | |
# save to ~/.pystartup | |
# in .bashrc export PYTHONSTARTUP=/home/USERNAME/.pystartup | |
import atexit | |
import os | |
import readline | |
import rlcompleter | |
import sys |