Skip to content

Instantly share code, notes, and snippets.

View lqhl's full-sized avatar
🎃
working on vector databases

Qin Liu 刘勤 lqhl

🎃
working on vector databases
View GitHub Profile
@lqhl
lqhl / extract_red.py
Created February 6, 2021 15:20
提取图片中的红色面积
import cv2
import numpy as np
import sys
import os
def extract_red(infile, outfile):
print(infile)
img = cv2.imread(infile)
img_hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
@lqhl
lqhl / alacritty.yml
Created July 1, 2019 05:10
Qin's Alacritty Configuration on macOS
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
@lqhl
lqhl / arXiv-package.sh
Created August 12, 2016 03:30
Make arXiv compatible submission
#!/bin/bash
# arXiv uses an outdated TexLive distribution. This script is used to package
# all neccesary files so my paper can be compiled on arXiv...
# path to the texlive distribution
TEXLIVE=/usr/local/texlive/2016
# prepare the diretory for my submission
rm arXiv-package.zip
@lqhl
lqhl / dtree.py
Last active December 10, 2015 04:38 — forked from anonymous/dtree.py
Decision Tree: A CART Implementation
import sys
from math import sqrt
import pydot
INFINITY = 100000000
MIN_SUPPORT = 5
MAX_DEPTH = 10
ALPHA = 20