Skip to content

Instantly share code, notes, and snippets.



  • Vietnam
View GitHub Profile
View triple-birthday-problem.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Purge existign CUDA first
sudo apt --purge remove "cublas*" "cuda*"
sudo apt --purge remove "nvidia*"
# Install CUDA Toolkit 10
sudo apt-key adv --fetch-keys && sudo apt update
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
import numpy as np
import faiss
def search_knn(xq, xb, k, distance_type=faiss.METRIC_L2):
""" wrapper around the faiss knn functions without index """
nq, d = xq.shape
nb, d2 = xb.shape
assert d == d2
LiberiFatali /
Created Feb 7, 2018 — forked from pebbie/
Implementation of document binarization algorithm by (Bolan Su et al, 2010)
author: Peb Ruswono Aryan
Binarization Algorithm by Su et al.
author = {Su, Bolan and Lu, Shijian and Tan, Chew Lim},
title = {Binarization of Historical Document Images Using the Local Maximum and Minimum},
booktitle = {Proceedings of the 9th IAPR International Workshop on Document Analysis Systems},
series = {DAS '10},