Skip to content

Instantly share code, notes, and snippets.

# -*- coding: UTF-8 -*-
"""
Python script to read SIFT1B dataset files, including .bvecs, .ivecs, .fvecs
Dataset source: http://corpus-texmex.irisa.fr/
"""
import numpy as np
def bvecs_read(fname):
a = np.fromfile(fname, dtype=np.int32, count=1)
b = np.fromfile(fname, dtype=np.uint8)
@fatihbaltaci
fatihbaltaci / install_latex_with_editor_gummi.sh
Last active November 17, 2019 16:46
Install LaTeX with Gummi Editor on Ubuntu
#!/bin/bash
sudo apt install -y texlive-latex-extra texlive-science gummi
@nitely
nitely / rpn.py
Last active December 18, 2020 23:03
Python shunting-yard algorithm
# LICENSE: MIT
import collections
RIGHT, LEFT = range(2)
Op = collections.namedtuple('Op', [
'precedence',
'associativity'])