Skip to content

Instantly share code, notes, and snippets.

Avatar
🌳

Robin van Emden robinvanemden

🌳
View GitHub Profile
@robinvanemden
robinvanemden / gstreamer-tips.md
Created Sep 1, 2022 — forked from flufy3d/gstreamer-tips.md
gstreamer remote streaming
View gstreamer-tips.md

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

View get.sclbl.sh
#!/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
@nitheeshkl
nitheeshkl / gige_gst_v4l.md
Last active Dec 1, 2022
Gstreamer pipelines to use GigE cams as webcam for Zoom/Teams/Skype
View gige_gst_v4l.md

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 Jan 27, 2023
Installing the NVIDIA driver, CUDA and cuDNN on Linux
View installing_nvidia_driver_cuda_cudnn_linux.md

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.

View install-linux-perf-on-wsl2.sh
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 Jul 30, 2020
WebAssembly Summit 2020 Notes
View wasm-summit-2020-notes.md

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
base database server setup
View postgres_ubuntu.sh
#!/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 Aug 12, 2019
[Test] Simple program to POST a HTTP request to postman-echo.com
View postman-echo.c
/**
* 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 Aug 15, 2021
Sample code to compute convolution output
View test.cpp
#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"
View epsilon_greedy_animation.R
library(contextual)
library(data.table)
library(animation)
## 1. Bandit Simulation ---------------------------------------------------------------------------
# Run a simulation that saves the policy's theta values
policy <- EpsilonGreedyPolicy$new(epsilon = 0.1)
bandit <- BasicBernoulliBandit$new(weights = c(0.4, 0.5, 0.3))