Skip to content

Instantly share code, notes, and snippets.

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

Trim Bresilla bresilla

💣
:(){ :|:& };:
View GitHub Profile
@bresilla
bresilla / bbox_tensorrt_engine.py
Created March 6, 2024 13:57
bbox_tensorrt_engine
import os
from collections import namedtuple
from pathlib import Path
from typing import List, Optional, Tuple, Union
import argparse
from pathlib import Path
from numpy import ndarray
from torch import Tensor
import numpy as np
import random
@bresilla
bresilla / create_cloud_xyzrgb.py
Created December 11, 2023 19:27 — forked from lucasw/create_cloud_xyzrgb.py
Create PointCloud2 with python with rgb
#!/usr/bin/env python
# PointCloud2 color cube
# https://answers.ros.org/question/289576/understanding-the-bytes-in-a-pcl2-message/
import rospy
import struct
from sensor_msgs import point_cloud2
from sensor_msgs.msg import PointCloud2, PointField
from std_msgs.msg import Header
@bresilla
bresilla / geo.py
Created November 19, 2023 18:21 — forked from sbarratt/geo.py
This script provides coordinate transformations between geodetic, ecef and enu in python. Based on https://gist.github.com/govert/1b373696c9a27ff4c72a.
"""
This script provides coordinate transformations from Geodetic -> ECEF, ECEF -> ENU
and Geodetic -> ENU (the composition of the two previous functions). Running the script
by itself runs tests.
based on https://gist.github.com/govert/1b373696c9a27ff4c72a.
"""
import math
a = 6378137
b = 6356752.3142
@bresilla
bresilla / GpsUtils.cs
Created November 19, 2023 18:20 — forked from govert/GpsUtils.cs
Convert WGS-84 geodetic locations (GPS readings) to Cartesian coordinates in a local tangent plane (Geodetic to ECEF to ENU)
using System;
using System.Diagnostics;
using static System.Math;
// Some helpers for converting GPS readings from the WGS84 geodetic system to a local North-East-Up cartesian axis.
// The implementation here is according to the paper:
// "Conversion of Geodetic coordinates to the Local Tangent Plane" Version 2.01.
// "The basic reference for this paper is J.Farrell & M.Barth 'The Global Positioning System & Inertial Navigation'"
// Also helpful is Wikipedia: http://en.wikipedia.org/wiki/Geodetic_datum
@bresilla
bresilla / pair-dual-boot-bluetooth.md
Created October 17, 2023 09:22 — forked from madkoding/pair-dual-boot-bluetooth.md
Pairing bluetooth devices (keyboard or mouse) in dual boot with Linux Ubuntu and Windows 10

1) Pair ALL bluetooth devices in linux (it is to have the files you will need to edit later)

2) Pair ALL bluetooth devices in Windows 10. If you know how, get the MAC address id from your bluethooth keyboard, we will need it later

3) Reboot and go back to Linux

4) Install chntpw package, this is needed to read the registry keys from Wintendo

sudo apt-get install chntpw
@bresilla
bresilla / PVE-host-backup.md
Created August 23, 2022 13:59 — forked from mrpeardotnet/PVE-host-backup.md
Proxmox PVE Host Config Backup Script

Proxmox PVE Host Config Backup Script

This script can be used to backup essential configuration files from the Proxmox Virtual Enivronment (PVE) host.

The script will create backups using tar with specified backup prefix and date and time stamp in the file name. Script will also delete backups that are older then number of days specified.

Create backup script file

To create backup script that will be executed every day we can create backup script in /etc/cron.daily/ folder. We need to make it writeable by root (creator) only, but readable and executable by everyone:

touch /etc/cron.daily/pvehost-backup
@bresilla
bresilla / Host
Created August 12, 2022 20:12 — forked from lucndm/Host
Proxmox GPU passthrough to LXC Container
Note : Proxmox 6.1
VI : /etc/apt/sources.list
# security updates
deb http://security.debian.org jessie/updates main contrib
# PVE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian jessie pve-no-subscription
@bresilla
bresilla / How to setup VirtualGL and TurboVNC on Ubuntu.md
Created May 28, 2022 22:49 — forked from asepawal/How to setup VirtualGL and TurboVNC on Ubuntu.md
Setup VirtualGL and TurboVNC on Ubuntu for OpenGL forwarding
@bresilla
bresilla / How to setup VirtualGL and TurboVNC on Ubuntu.md
Created November 2, 2021 10:51 — forked from cyberang3l/How to setup VirtualGL and TurboVNC on Ubuntu.md
Setup VirtualGL and TurboVNC on Ubuntu for OpenGL forwarding

Keybase proof

I hereby claim:

  • I am bresilla on github.
  • I am bresilla (https://keybase.io/bresilla) on keybase.
  • I have a public key whose fingerprint is F337 B174 7050 659C ABAA E714 1772 2396 6B79 4B54

To claim this, I am signing this object: