Skip to content

Instantly share code, notes, and snippets.

View saikatbsk's full-sized avatar

Saikat Basak saikatbsk

View GitHub Profile
devices: (
{
name: "Wireless Mouse MX Master 2S";
smartshift:
{
on: true;
threshold: 20;
};
hiresscroll:
{
# Very personal checklist. Might ruin your system.
mkfs.ext4 /dev/sda1
mkdir /mnt/gentoo
mount /dev/sda1 /mnt/gentoo
cd /mnt/gentoo
wget http://distfiles.gentoo.org/releases/amd64/autobuilds/20191023T214502Z/stage3-amd64-20191023T214502Z.tar.xz
# Temporary
#>=media-libs/libwebp-1.0.2 -tiff
#>=app-arch/libarchive-3.3.3 -lz4
#>=media-libs/mesa-19.1.7 -vaapi
#>=dev-util/cmake-3.14.6 -qt5
# Required
>=sys-apps/dbus-1.12.16 user-session
>=dev-lang/python-2.7.16:2.7 sqlite
>=dev-lang/spidermonkey-60.5.2_p0-r2 -jit system-icu custom-optimization -debug
COMMON_FLAGS="-march=native -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"
PORTAGE_TMPDIR="/var/tmp"
from __future__ import print_function
import cv2
import math
import numpy as np
PI = math.pi
MAX_FEATURES = 500
GOOD_MATCH_PERCENT = 0.15
def alignImages(im1, im2, windowName):
inputfile = "data/1.bmp";
imsrc = imread(inputfile); % Load an RGB image
imresized = imresize(imsrc, [28 NaN]); % Resize image
imbw = im2bw(imresized, "moments"); % Convert to binary
% Get the positions of the black pixels
x = []; y = [];
for r = 1:28
for c = 1:size(imbw, 2)
# Convert to darknet annotation format from pascal voc
# saikatbsk@gmail.com
from __future__ import print_function
import xml.etree.ElementTree as ET
import os
import glob
"""
Change classes and annotations_dir_voc to match your setup.
"""