Skip to content

Instantly share code, notes, and snippets.

View confusedrobot's full-sized avatar

Confused Robot confusedrobot

  • USA
View GitHub Profile
@cedricbonhomme
cedricbonhomme / python-environment-2019.sh
Last active December 15, 2019 20:11
My Python environment for 2019
# Installation of a decent editor, emacs
$ sudo apt install emacs
# Prerequisites to build Python
$ sudo apt install make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl
# Installation of pyenv
$ curl https://pyenv.run | bash
@benmarwick
benmarwick / object-outline-and-dimensions-opencv.py
Last active January 18, 2025 20:39
Python 3 script to take live video, detect the largest object, trace an outline (contour) and measure linear dimensions, using OpenCV
# in a terminal
# python -m pip install --user opencv-contrib-python numpy scipy matplotlib ipython jupyter pandas sympy nose
import cv2
import pandas as pd
import numpy as np
import imutils
from scipy.spatial import distance as dist
from imutils import perspective
@yinguobing
yinguobing / perf_grab_decode.py
Created November 15, 2018 11:35
Performance benchmark for read() and grab() in OpenCV VideoCapture.
"""
read() and grab() in OpenCV VideoCapture takes different time as there is no
decoding for grab() operation. Let's try to find out how much these two methods
differs.
"""
import cv2
def main():
tm = cv2.TickMeter()
@enzanki-ars
enzanki-ars / update-ffmpeg-rpi.sh
Last active December 4, 2023 21:36
Install/Update FFmpeg with hardware acceleration on the Raspberry Pi
#!/bin/bash
# #########################################################
#
# WW WW AAA RRRRRR NN NN IIIII NN NN GGGG
# WW WW AAAAA RR RR NNN NN III NNN NN GG GG
# WW W WW AA AA RRRRRR NN N NN III NN N NN GG
# WW WWW WW AAAAAAA RR RR NN NNN III NN NNN GG GG
# WW WW AA AA RR RR NN NN IIIII NN NN GGGGGG
#
@hrshovon
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
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
@max-mapper
max-mapper / readme.md
Created February 4, 2017 06:09
my book duo (16tb) linux format
  1. install WD Drive Utilities on Mac OS
  2. convert to JBOD/EXFAT and turn off Drive Sleep
  3. plug into linux
sudo parted /dev/sd<num>
print
rm 1 (and others)
mklabel gpt
unit TB
@joseph-zhong
joseph-zhong / BUILD_AWS_LAMBDA.md
Last active March 21, 2025 19:21 — forked from mmitou/how-to-build-opencv3.0.0-for-aws-lambda.md
Building OpenCV for AWS Lambda Python

To build OpenCV3.0 for AWS Lambda Python

Summary

Because AWS Lambda runs in a Amazon Linux environment, to run external modules you must

Create the OpenCV build environment

sudo yum update -y
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 11, 2025 17:09
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@rwinscot
rwinscot / Robo_Eyes.ino
Created September 3, 2013 03:57
Adafruit 8x8 LED Matrix eye animation based on milis slice rather than using delay.
// Based on the 'roboface' example sketch for Adafruit I2C 8x8 LED
// backpacks:
//
// www.adafruit.com/products/870 www.adafruit.com/products/1049
// www.adafruit.com/products/871 www.adafruit.com/products/1050
// www.adafruit.com/products/872 www.adafruit.com/products/1051
// www.adafruit.com/products/959 www.adafruit.com/products/1052
//
// Requires Adafruit_LEDBackpack and Adafruit_GFX libraries.
// For a simpler introduction, see the 'matrix8x8' example.
@eskriett
eskriett / GoogleMapDownloader.py
Last active February 25, 2025 17:00
A python script to download high resolution Google map images given a longitude, latitude and zoom level.
#!/usr/bin/python
# GoogleMapDownloader.py
# Created by Hayden Eskriett [http://eskriett.com]
#
# A script which when given a longitude, latitude and zoom level downloads a
# high resolution google map
# Find the associated blog post at: http://blog.eskriett.com/2013/07/19/downloading-google-maps/
import urllib
import Image