Skip to content

Instantly share code, notes, and snippets.

@hlacikd
hlacikd / enable-disable-gpu.bat
Created December 23, 2023 21:12
vfio reset bug fix
# enable gpu
devcon64.exe enable "PCI\VEN_1002&DEV_747E*"
devcon64.exe enable "HDAUDIO\FUNC_01&VEN_1002&DEV_AA01*"
# disable gpu
devcon64.exe disable "PCI\VEN_1002&DEV_747E*"
devcon64.exe disable "HDAUDIO\FUNC_01&VEN_1002&DEV_AA01*"
@hlacikd
hlacikd / yolov4.py
Created July 15, 2020 22:21 — forked from YashasSamaga/yolov4.py
YOLOv4 Inference on OpenCV's CUDA DNN backend
import cv2
import time
CONFIDENCE_THRESHOLD = 0.2
NMS_THRESHOLD = 0.4
COLORS = [(0, 255, 255), (255, 255, 0), (0, 255, 0), (255, 0, 0)]
class_names = []
with open("classes.txt", "r") as f:
class_names = [cname.strip() for cname in f.readlines()]
@hlacikd
hlacikd / asynchronous_caching_video_stream.py
Created December 10, 2019 17:47 — forked from CasiaFan/asynchronous_caching_video_stream.py
Asynchronous caching and analysis of video stream with opencv and multithreading
import cv2
from redis import ConnectionPool, Redis
import numpy as np
import json, time
from multithreading import Thread, Event
redis_config = {"server": "localhost",
"passwd": '',
"port": '6379',
"db": 0}