Skip to content

Instantly share code, notes, and snippets.

Ayke / OpenCV on
Last active January 1, 2024 19:02
Install OpenCV 4 on Jetson TX2
View OpenCV on

OpenCV version: 4.3.0 Python version: 3.6


Required libraries

sudo apt-get update
sudo apt-get install curl libssl-dev
sudo apt-get install ffmpeg
package frc.robot.util;
public class Deadband {
private double minValue;
private double m;
private double deadband;
public Deadband(double minValue, double deadband) {
this.minValue = minValue;
m = calcM(minValue, deadband);
mathiasvr /
Last active September 6, 2023 17:24
Convert LED brightness to PWM value based on CIE 1931 curve.
# Generate lookup table for converting between perceived LED brightness and PWM
# Adapted from:
# See also:
from sys import stdout
TABLE_SIZE = 256 # Number of steps (brightness)
RESOLUTION = 2**10 # PWM resolution (10-bit = 1024)
arastu /
Created August 11, 2018 14:44
delete all docker resource
#!/usr/bin/env bash
docker ps -a -q | xargs docker rm -f
docker images -a -q | xargs docker rmi -f
docker volume ls -q | xargs docker volume rm -f
docker network ls | xargs docker network rm
docker system prune -f
nohamelin / xseei.import.js
Last active October 28, 2022 10:45
Import search engines in only-WebExtensions Mozilla Firefox builds
View xseei.import.js
// -sp-context: browser
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at
* xseei.import.js
* ===============
* code-revision 2
hrshovon / build_opencv_ARM_cross
Last active May 21, 2022 17:10
Cross compile opencv3.3.0 for your raspberry pi and similar ARM devices with python support
View build_opencv_ARM_cross
This is a note on how to cross compile opencv for pretty much any ARM device(HardFP supported in this case) and deploy. Native
compiling in ARM devices can be painfully slow and they seem to hang often during build(mine got stuck at 43%). So if you happen
to have a desktop/laptop/server running ubuntu or similar linux distro, u can build opencv in fractionth of the time taken for
native compiling without any issues.
Building opencv3 with TBB and NEON and VFP support can boost opencv performance. Thanks to Adrian at pyimagesearch for pointing
that out.
Both my PC and target machine aka orange pi zero are running ubuntu 16.04 with python2.7 and python 3.5.
Let us use the term "build machine" for your PC where you are building opencv and "target machine" for the ARM single board computer.
1.Run the following commands in both machines(I think installing these in target machine only would do) to install the necessary libraries etc.(mine worked with them,so they should be enough
grenade /
Last active February 17, 2024 10:00
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
# generate new personal ed25519 ssh key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C
eval "$(ssh-agent -s)"