Skip to content

Instantly share code, notes, and snippets.

View randhawp's full-sized avatar

randhawp

  • Toronto, Canada
View GitHub Profile
@TomerFi
TomerFi / git-smudge-clean-filter.sh
Last active June 15, 2024 12:45
Git smudge-clean script for using as filter for mutiple reducted values for various file types in various repositories.
#!/bin/bash
#####################################################################################################
# This script is meant to be used as a global smudge-clean filter for removing sensitive data #
# from your commits. #
# #
# 1. Place this script in an acceisble path, i.e. ~/scripts/git-smudge-clean-filter.sh. #
# #
# 2. Populate the 'mapArr' using what you need hidden as the key, and the replacment as the value. #
# DO NOT use same values for multiple keys (this will work only in one direction). #
@apivovarov
apivovarov / run-tflite.cpp
Last active July 8, 2021 03:56
Run Mobilenet TFLtie models using C++ API
/* To compile:
g++ --std=c++11 -O3 \
-I /opt/flatbuffers/include \
-I /opt/tensorflow \
run-tflite.cpp -o run-tflite \
libtensorflow-lite.a -lstdc++ -lpthread -lm -lz -ldl
*/
#include <iostream>
#include <fstream>
#include <chrono>
@kbingham
kbingham / uvc-gadget.sh
Created May 15, 2018 08:18
UVC ConfigFS Gadget configuration tool
#!/bin/sh
set -e
#set -x
CONFIGFS="/sys/kernel/config"
GADGET="$CONFIGFS/usb_gadget"
VID="0x0525"
PID="0xa4a2"
SERIAL="0123456789"
@loleg
loleg / iotcam.py
Created November 7, 2015 01:26
Detects barcodes from a webcam stream using Python, zbar and CV2
from picamera.array import PiRGBArray
from picamera import PiCamera
import time
import sys
import cv2
import zbar
import Image
# Debug mode
DEBUG = False