This file contains 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
Set-PSReadLineKeyHandler -Chord 'Ctrl+d' -ScriptBlock { [System.Environment]::Exit(0) } | |
Import-Module -Name Terminal-Icons | |
Import-Module PSFzf | |
# replace 'Ctrl+t' and 'Ctrl+r' with your preferred bindings: | |
Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r' | |
Set-Alias vim nvim |
This file contains 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 os | |
from typing import Tuple | |
import cv2 | |
import numpy as np | |
def image_binarization(image: np.ndarray) -> np.ndarray: | |
if len(image.shape) > 2: # convert to gray scale if not in gray scale | |
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) |
This file contains 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
# -*- coding: utf-8 -*- | |
from xml.dom import minidom | |
import os | |
import glob | |
lut={} | |
f = open('classes.txt', 'r') | |
count = 0 | |
for k in f: |