Skip to content

Instantly share code, notes, and snippets.

View masip85's full-sized avatar

Vicente Masip masip85

View GitHub Profile
@jasongill
jasongill / nvidia-jetson-libnvdla_compiler-fix-instructions.md
Last active June 16, 2025 15:12
Fixing the "libnvdla_compiler.so" on Jetson devices

If you, like me, just got a new Nvidia Jetson Orin Nano Super Developer Kit and are struggling to get the examples provided by Nvidia to run due to the following error:

ImportError: libnvdla_compiler.so: cannot open shared object file: No such file or directory

then you probably don't want to have to deal with downgrading the flashed version of things just to see if it will work. The issue is that the libnvdla_compiler.so file is not included in the latest (36.4.2 as of this writing) version of the Jetpack software which you're instructed to install to upgrade the firmware on the device.

The fix is to grab the file from the .deb file from the previous version. Running the following command will fix the issue:

#!/bin/bash
set -e
##### CHECK PARAMETERS #####
PRODUCTION=0
while [[ "$#" -gt 0 ]]; do
case $1 in
-p|--production) PRODUCTION=1 ;;
*) echo "Unknown parameter passed: $1"; exit 1 ;;
esac
shift
@discrimy
discrimy / preinstall-vscode-extensions.sh
Created August 1, 2023 21:26
Script to preinstall vscode extensions inside devcontainer image
#!/bin/env bash
set -e
# USAGE:
# COPY .devcontainer/ /app/.devcontainer/
# ARG VSCODE_VERSION=2ccd690cbff1569e4a83d7c43d45101f817401dc
# RUN bash .devcontainer/preinstall-vscode-extensions.sh $VSCODE_VERSION /app/.devcontainer/devcontainer.json
#
# Preinstall vscode server extensions.
# Uses vscode of provided version (git commit hash) to download extensions inside container
@unitycoder
unitycoder / NeRF.md
Last active June 6, 2024 10:21
How to compile Nvidia NeRF (NVlabs / instant-ngp) on Windows 10 and VS 2019

NeRF

Repo: https://github.com/NVlabs/instant-ngp

Steps (see their readme also)

@utkonos
utkonos / edit_ubuntu_autoinstall.py
Last active May 21, 2024 13:18
Simple Python Script to Edit an Ubuntu ISO to Add Automated Server Install Capability
import io
import pathlib
import pycdlib
ubuntu = pathlib.Path('ubuntu-22.04.1-live-server-amd64.iso')
new_iso_path = pathlib.Path('ubuntu-22.04.1-live-server-amd64-auto.iso')
iso = pycdlib.PyCdlib()
iso.open(ubuntu)
@faisalthaheem
faisalthaheem / gist:3f90811d94813cc555b08ba4d5013adf
Last active April 11, 2022 22:33
GST RTSP pipelines collection
#from rtsp server android app
'rtspsrc location=rtsp://192.168.1.193:5554/camera latency=0 ! rtph264depay ! avdec_h264 ! videorate max-rate=1 ! decodebin ! videoconvert ! video/x-raw, format=BGR ! queue max-size-buffers=10 ! jpegenc quality=25 ! jpegparse ! appsink name=sink'
#big buck bunny
'rtspsrc location=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov latency=0 ! rtph264depay ! avdec_h264 ! videorate max-rate=15 ! decodebin ! queue max-size-buffers=10 ! jpegenc quality=25 ! jpegparse ! appsink name=sink'
# example of mjpeg stream from a typical axis camera or esp32
# souphttpsrc location=http://x.y.z.a:8090/mjpg/video.mjpg?timestamp=1564650227443 ! multipartdemux single-stream=true ! image/jpeg,width=320,height=240,framerate=3/1 ! appsink name=sink
#Example of an RTSP source
@martin-niklasson
martin-niklasson / How-To.md
Last active December 25, 2023 19:20
How to make an up-to-date OpenWRT image for loading onto a Raspberry Pi Compute Module 4 with a DFRobot Router Carrier Board.

The background is that the default OpenWRT image for Raspberry Pi lacks drivers for the LAN port (RTL8111) on the DFRobot board. DFRobot provide an image, but that one is made from a quite old daily snapshot of OpenWRT which is not entirely stable. Also, it is better to know how to fish than be given a fish.

DFRobot's page about the router board:
https://wiki.dfrobot.com/Compute_Module_4_IoT_Router_Board_Mini_SKU_DFR0767

OpenWRT main page:
https://openwrt.org/

You are expected to have some general knowledge on Linux and OpenWRT. The instructions for flashing the resulting firmware image are presented on DFRobot's page.

@nilesh0109
nilesh0109 / get_inverse_pespective
Last active December 13, 2022 11:54
Homography Matrix
import cv2
import numpy as np
def get_inverse_pespective(perspective_matrix: np.array)-> np.array:
"""
This method calculates the inverse of prespective matrix by homography.
- Takes 4 random points on the floor plane(destination_plane) and calculates the corresponding points
on the camera image plane(src_plane) using perspective matrix.
- Calculates the Homography matrix to map any point in image plane to floor plane.
Parameters
#!/bin/bash
RECDIR=/mnt/record/minisio/$(date +%Y-%m-%d)
RECTIME=$(date +-%H:%M:%S)
if [ ! -d "$RECDIR" ]; then
mkdir -p $RECDIR
fi
cd $RECDIR
for i in {0..6}; do
@gumdropsteve
gumdropsteve / draw_boxes_and_save.py
Last active April 6, 2022 11:09
Convert attribute columns from VGG Image Annotator CSV to lists, then to pandas DataFrame. Draw the bounding boxes on og images and save the new image.
# folder where the image is already saved (without bounding boxes)
data_dir = 'media/stable_numbers/number_crops/'
# folder where the new image with bounding boxes should be saved
out_dir = 'media/copy_labeled_number_crops/'
# go through the unique file names (because files can have more than 1 bounding box)
for file in new_df.filename.unique():
# load in the image and .loc[] the rows where it's referenced (each row represents 1 bounding box)