Skip to content

Instantly share code, notes, and snippets.

View eaa3's full-sized avatar
🤖
Focusing

Ermano Arruda eaa3

🤖
Focusing
View GitHub Profile
@adujardin
adujardin / setup_zed_udev-rules.sh
Last active September 1, 2025 07:37
Setup the udev rules for the ZED cameras
# This script will setup USB rules to open the ZED cameras without root access
# This can also be useful to access the cameras from a docker container without root (this script needs to be run on the host)
# NB: Running the ZED SDK installer will already setup those
# Print the commands
set -x
# Download the lightest installer
wget -q https://download.stereolabs.com/zedsdk/3.5/jp44/jetsons -O zed_installer.run
# Extracting only the file we're interested in
bash ./zed_installer.run --tar -x './99-slabs.rules' > /dev/null 2>&1
@zzhou387
zzhou387 / Eigen Cheat sheet
Created May 9, 2020 17:54 — forked from gocarlos/Eigen Cheat sheet
Cheat sheet for the linear algebra library Eigen: http://eigen.tuxfamily.org/
// A simple quickref for Eigen. Add anything that's missing.
// Main author: Keir Mierle
#include <Eigen/Dense>
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d.
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols.
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd.
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major.
Matrix3f P, Q, R; // 3x3 float matrix.
import pybullet as p
import time
usePhysX = True
if usePhysX:
p.connect(p.PhysX)
p.loadPlugin("eglRendererPlugin")
else:
p.connect(p.GUI)
@kervel
kervel / CMakeLists.txt
Last active November 6, 2023 09:50
Small ros2 python using pybind11
# will need to be tweaked for your project
make_minimum_required(VERSION 3.5)
project(test_ros_pb11)
# Default to C99
if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
endif()
# Default to C++14
@ShreyasSkandan
ShreyasSkandan / ros_py35_setup.bash
Last active March 4, 2020 17:57
ROS Python3.5 Set Up
#!/usr/bin/env bash
# Create isolated ROS Workspace
cd ~
mkdir ros_py35
cd ros_py35
# Unset sourced workspace
# Go to ~/.bashrc and comment out lines from previous installation of ROS (Lunar)
@peteflorence
peteflorence / pixelwise_contrastive_loss.py
Last active August 11, 2022 09:15
Pixelwise Contrastive Loss in PyTorch
import torch
class PixelwiseContrastiveLoss(torch.nn.Module):
def __init__(self):
super(PixelwiseContrastiveLoss, self).__init__()
self.num_non_matches_per_match = 150
def forward(self, image_a_pred, image_b_pred, matches_a, matches_b, non_matches_a, non_matches_b):
loss = 0
<!DOCTYPE html>
<html>
<head><title>SOUND</title></head>
<body>
<div>Frequence: <span id="frequency"></span></div>
<script type="text/javascript">
var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
var oscillatorNode = audioCtx.createOscillator();
var gainNode = audioCtx.createGain();
@cryptolok
cryptolok / dbm2m.py
Last active February 13, 2025 09:33
convert WiFi signal strength (dBm) to distance (meters)
#!/usr/bin/env python2
# a simple script for one of my articles - https://cryptolok.blogspot.com/2017/08/practical-wifi-hosts-triangulation-with.html
from math import log10
MHz=raw_input('MHz FREQUENCY (2417, 5200, ...) : ')
MHz=int(MHz)
dBm=raw_input('dBm TRANSMITTER POWER (23, 63, ...) : ')
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.