Skip to content

Instantly share code, notes, and snippets.

View bresilla's full-sized avatar
💣
:(){ :|:& };:

Trim Bresilla bresilla

💣
:(){ :|:& };:
View GitHub Profile
@bresilla
bresilla / betterrdp.reg
Last active April 5, 2025 10:23
gaming_rdp_settings
Windows Registry Editor Version 5.00
; +----------------------------------------------------------------------+
; | Upinel/BetterRDP |
; +----------------------------------------------------------------------+
; | This source file is subject to version 2.0 of the Apache license, |
; | that is bundled with this package in the file LICENSE, and is |
; | available through the world-wide-web at the following url: |
; | http://www.apache.org/licenses/LICENSE-2.0.html |
; | If you did not receive a copy of the Apache2.0 license and are unable|
@bresilla
bresilla / .clang-format
Created March 5, 2025 22:39
clang-format
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
@bresilla
bresilla / turbovnc_install.md
Created February 14, 2025 12:38 — forked from Ryther/turbovnc_install.md
TurboVNC installation [Ubuntu 22.04]
#include <iostream>
#include <cstring>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <linux/can.h>
#include <linux/can/raw.h>
namespace scan{
# Compile OPENCV with CUDDN
sudo apt install cuda-toolkit-12-1 tensorrt*
install:
sudo apt-get install build-essential cmake unzip pkg-config
sudo apt-get install libjpeg-dev libpng-dev libtiff-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install libv4l-dev libxvidcore-dev libx264-dev
sudo apt-get install libgtk-3-dev
sudo apt-get install libblas-dev liblapack-dev gfortran
@bresilla
bresilla / opencv-cuda.md
Created March 26, 2024 11:29 — forked from Birch-san/opencv-cuda.md
Building OpenCV with CUDA acceleration

For CUDA 12, see Installing CUDA 12.1.1 + PyTorch nightly + Python 3.10 on Ubuntu 22.10 for how to install Nvidia driver 530, gcc 12 and CUDA 12.1.1 libraries.
If you want CUDA 11.8, then you can use latest Nvidia driver from Production branch, 525, with gcc 11.

Activate your conda environment, if you haven't done so already.

CUDA 11:
Make sure gcc 11 is the default gcc for your OS, or select gcc 11 explicitly.
CUDA 12:
Make sure gcc 12 is the default gcc for your OS, or select gcc 12 explicitly.
Check CUDA_DIR below points to the CUDA installation you wish to use.

@bresilla
bresilla / darwin_to_yolo.py
Created March 19, 2024 13:47
darwin_to_yolo
import os
import json
import argparse
import shutil
from PIL import Image
import cv2
import numpy as np
classes = {"rkn": 0, "fln": 1}
@bresilla
bresilla / complex_tracker.py
Created March 18, 2024 15:38
complex_tracker
from typing import List
import numpy as np
import torch
import torchvision.ops.boxes as bops
import norfair
from norfair import Detection, Tracker, Paths
import rclpy
from rclpy.node import Node
@bresilla
bresilla / simple_tracker.py
Created March 18, 2024 15:16
simple_tracker
#!/usr/bin/env python3
import numpy as np
import rclpy
from rclpy.node import Node
from sensor_msgs.msg import Image
from cv_bridge import CvBridge
from detection_msgs import BoundingBoxes
import cv2
from message_filters import Subscriber, ApproximateTimeSynchronizer
@bresilla
bresilla / bbox_opencv_onnx.py
Created March 6, 2024 13:58
bbox_opencv_onnx
import argparse
import cv2
import numpy as np
CLASSES = {0: "big", 1: "small"}
colors = np.random.uniform(0, 255, size=(len(CLASSES), 3))
def draw_bounding_box(img, class_id, confidence, x, y, x_plus_w, y_plus_h):
label = f'{CLASSES[class_id]} ({confidence:.2f})'