Skip to content

Instantly share code, notes, and snippets.

View robinvanemden's full-sized avatar
🌳
⏩ ⏩

Robin van Emden robinvanemden

🌳
⏩ ⏩
View GitHub Profile
# 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 && \
@robinvanemden
robinvanemden / httpsnodered.txt
Created August 23, 2023 09:21 — forked from gbrault/httpsnodered.txt
https setting node-red
from http://industrialinternet.co.uk/node-red/adding-https-ssl-to-node-red/
- go to .node-red directory
- create a public directory: mkdir public
- go to public: cd public
- Create a certificate
openssl genrsa -out privatekey.pem 1024
openssl req -new -key privatekey.pem -out private-csr.pem
openssl x509 -req -days 365 -in private-csr.pem -signkey privatekey.pem -out certificate.pem
- cd ..
@robinvanemden
robinvanemden / gist:ddcd99e1484b0350e332e570ac050818
Created August 22, 2023 19:10 — forked from seddonm1/gist:5927db05cb7ad38d98a22674fa82a4c6
How to build onnxruntime on an aarch64 NVIDIA device (like Jetson Orin AGX)
docker run \
--rm \
-it \
-e ONNXRUNTIME_REPO=https://github.com/microsoft/onnxruntime \
-e ONNXRUNTIME_COMMIT=v1.15.1 \
-e BUILD_CONFIG=Release \
-e CMAKE_VERSION=3.26.4 \
-e CPU_ARCHITECTURE=$(uname -m) \
-e CUDA_ARCHITECTURES="70;75;80;86" \
-v /usr/lib/aarch64-linux-gnu/tegra:/usr/lib/aarch64-linux-gnu/tegra:ro \
@robinvanemden
robinvanemden / QualtricsQuestionJs.js
Created November 3, 2014 18:07
Adding jsPsych to Qualtrics
Qualtrics.SurveyEngine.addOnload(function() {
//Retrieve the Response ID from the hidden Qualtrics Session ID value
var responseIdFromSessionID = jq('#SessionID').val().replace("SS_", "R_");
//Retrieve Qualtrics object and save in qthis
var qthis = this;
//Hide buttons - can also (even better) be hidden in the CSS
jq('#Buttons').css("display", "none");
@robinvanemden
robinvanemden / UartService.java
Created September 1, 2015 13:41
Android BLE UART Service
package io.pavlov.bleuart;
import android.app.Service;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;
import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattDescriptor;
import android.bluetooth.BluetoothGattService;
#!/bin/bash
# run as:
#
# sudo bash -c "$(wget -q -O - https://get.sclbl.net)"
if ! type "killall" >/dev/null 2>&1; then
echo 'Error: The POSIX "killall" command cannot be found. Please install and try again.' >&2
exit 1
fi
@robinvanemden
robinvanemden / basic_peak_detection.py
Last active November 28, 2022 04:26
Imports data from the Totem Bobbi into a Pandas dataframe
import heart_beat as hb
fs = 500 # sampling frequency 500hz
#import data sample
dataset = hb.get_data("data/8-sdataHR_sample.df")
hb.process_basic_peak(dataset, 0.75, fs)
#We have imported our Python module as an object called 'hb'
#This object contains the dictionary 'measures' with all values in it
#!/bin/bash
# run as:
#
# sudo bash -c "$(wget -q -O - https://bit.ly/3SqXxxA)"
if [ "$(id -u)" -ne 0 ]; then
echo 'Please run as root.' >&2
exit 1
fi
#!/bin/bash
# run as:
#
# sudo bash -c "$(wget -q -O - https://bit.ly/3UYetgs)"
if [ "$(id -u)" -ne 0 ]; then
echo 'Please run as root.' >&2
exit 1
fi
@robinvanemden
robinvanemden / gige_gst_v4l.md
Created September 23, 2022 15:22 — forked from nitheeshkl/gige_gst_v4l.md
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