Skip to content

Instantly share code, notes, and snippets.

View robinvanemden's full-sized avatar
🌳
⏩ ⏩

Robin van Emden robinvanemden

🌳
⏩ ⏩
View GitHub Profile
@robinvanemden
robinvanemden / gstreamer-tips.md
Created September 1, 2022 11:58 — forked from flufy3d/gstreamer-tips.md
gstreamer remote streaming

simple test

gst-launch-1.0 -v videotestsrc ! video/x-raw,width=1280,height=640 ! glimagesink

streaming mpegts

gst-launch-1.0 -v videotestsrc ! video/x-raw,width=1280,height=640 ! videoconvert ! x264enc key-int-max=12 byte-stream=true ! mpegtsmux ! tcpserversink port=8888 host=0.0.0.0

vlc using tcp://192.168.1.192:8888

@seddonm1
seddonm1 / gist:5927db05cb7ad38d98a22674fa82a4c6
Last active March 27, 2024 14:10
How to build onnxruntime on an aarch64 NVIDIA device (like Jetson Orin AGX)
On an Orin NX 16G the memory was too low to compile and the SWAP file had to be increased.
/etc/systemd/nvzramconfig.sh
change:
```
# Calculate memory to use for zram (1/2 of ram)
totalmem=`LC_ALL=C free | grep -e "^Mem:" | sed -e 's/^Mem: *//' -e 's/ *.*//'`
mem=$((("${totalmem}" / 2 / "${NRDEVICES}") * 1024))
```
# Install aarch64 cross depedencies based on Jetpack 4.4
# Dependencies require cuda-toolkit-10.2 which isn't installed in nvidia docker container
# It contains cuda-compat instead. However deb files currently depend on cuda-toolkit alone.
# Hence force dpkg configure
RUN wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cross-aarch64_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cudart-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cufft-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cupti-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-curand-cross-aarch64-10-2_10.2.89-1_all.deb && \
@nitheeshkl
nitheeshkl / gige_gst_v4l.md
Last active April 12, 2024 02:44
Gstreamer pipelines to use GigE cams as webcam for Zoom/Teams/Skype

Using GigE cam as webcam for Zoom/Skype/Teams

TL;DR: Creates a Gstreamer pipeline to read camera frames from a GigE camera, using Aravis library, and publish them as V4l2 camera source, using V4l2loopback, that can be read by video conferencing programs like Zoom/Skype/Teams.

gst-launch-1.0 aravissrc blocksize=5013504 h-binning=1 v-binning=1 ! video/x-bayer,format=rggb,framerate=100/5,width=2448,height=2048 ! bayer2rgb ! video/x-raw,format=RGBx ! videoconvert ! video/x-raw,format=YUY2 !  aspectratiocrop aspect-ratio=16/9 ! videoscale ! video/x-raw,width=1280,height=720 ! queue ! v4l2sink device=/dev/video0

The Basics

@kmhofmann
kmhofmann / installing_nvidia_driver_cuda_cudnn_linux.md
Last active March 8, 2024 19:42
Installing the NVIDIA driver, CUDA and cuDNN on Linux

Installing the NVIDIA driver, CUDA and cuDNN on Linux (Ubuntu 20.04)

This is a companion piece to my instructions on building TensorFlow from source. In particular, the aim is to install the following pieces of software

on an Ubuntu Linux system, in particular Ubuntu 20.04.

@abel0b
abel0b / install-linux-perf-on-wsl2.sh
Last active March 24, 2024 17:54
Install perf on WSL 2
apt install flex bison
git clone https://github.com/microsoft/WSL2-Linux-Kernel --depth 1
cd WSL2-Linux-Kernel/tools/perf
make -j8
sudo cp perf /usr/local/bin
@bushidocodes
bushidocodes / wasm-summit-2020-notes.md
Last active July 30, 2020 23:47
WebAssembly Summit 2020 Notes

WebAssembly Summit 2020

https://webassembly-summit.org/

Lin Clark's Talk - "WebAssembly Nanoprocess"

https://www.youtube.com/watch?v=IBZFJzGnBoU

  • the missing functionality alongside WASI and Interface Types is something that provides "capability-based security".
  • Delegation of permissions to propagate down transitive dependencies
  • plan to use fine-grain form of per-module virtualization
  • A "WebAssembly nanoprocess" is just wasm, but follows a particular pattern.
@david-hammond
david-hammond / postgres_ubuntu.sh
Last active May 20, 2021 03:47
base database server setup
#!/bin/bash
sudo apt update
sudo apt upgrade -y
sudo apt install postgresql postgresql-contrib -y
#To allow database to be accessed remotely follow this https://linuxize.com/post/how-to-install-postgresql-on-ubuntu-18-04/
#you need to edit the follwoing 2 files using vim - the most difficult part, vim instructions here https://vim.rtorr.com/
#sudo vim /etc/postgresql/10/main/postgresql.conf
sudo sed -i s/"#listen_addresses = 'localhost'"/"listen_addresses = '*' "/g /etc/postgresql/12/main/postgresql.conf
#sudo vim /etc/postgresql/10/main/pg_hba.conf
sudo sed -i '96s@127.0.0.1/32@0.0.0.0/0@' /etc/postgresql/12/main/pg_hba.conf
@leiless
leiless / postman-echo.c
Created August 12, 2019 14:22
[Test] Simple program to POST a HTTP request to postman-echo.com
/**
* Simple program to POST a HTTP request
*
* see:
* https://docs.postman-echo.com/?version=latest
* https://aticleworld.com/http-get-and-post-methods-example-in-c/
* https://stackoverflow.com/questions/11208299/how-to-make-an-http-get-request-in-c-without-libcurl
* https://stackoverflow.com/questions/22077802/simple-c-example-of-doing-an-http-post-and-consuming-the-response
*/
@szihs
szihs / test.cpp
Last active August 15, 2021 11:33
Sample code to compute convolution output
#include <iostream>
#include "include/libnpy/npy.hpp"
#include "arm_compute/runtime/NEON/NEFunctions.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/runtime/Allocator.h"
#include "arm_compute/runtime/BlobLifetimeManager.h"
#include "arm_compute/runtime/MemoryManagerOnDemand.h"
#include "arm_compute/runtime/PoolManager.h"
#include "utils/Utils.h"