Skip to content

Instantly share code, notes, and snippets.

@daz
daz / openalpr_camera.py
Created August 15, 2018 05:51 — forked from jkjung-avt/openalpr_camera.py
Real-time license plate recognition with 'openalpr' using a video file as input
# test_camera.py
#
# Open an RTSP stream and feed image frames to 'openalpr'
# for real-time license plate recognition.
import numpy as np
import cv2
from openalpr import Alpr
@daz
daz / ffmpeg-cheatsheet.md
Created August 4, 2018 11:13 — forked from nickkraakman/ffmpeg-cheatsheet.md
FFmpeg cheat sheet for 360 video

FFmpeg Cheat Sheet for 360º video

Brought to you by Headjack

 
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.

 
Let's start with some basics:

  • ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file
@daz
daz / depth_sensor.ino
Created July 27, 2018 12:40 — forked from hephaestus9/depth_sensor.ino
Depth Sensor Code - modified j.brian
/*
created August 2011
by SMStrauch and with help of robtillaart and ulrichard. Thanks!
Manufacturer: www.intersema.ch
Source: http://www.meas-spec.com/downloads/Using_SPI_Protocol_with_Pressure_Sensor_Modules.pdf
Source: http://forum.arduino.cc/index.php?topic=67188.0
Datasheet: http://media.digikey.com/pdf/Data%20Sheets/Measurement%20Specialties%20PDFs/MS5541-CM.pdf
Modified 2-10-2015 J.Brian
/*
MS5541 Pressure Sensor calwords readout
This program will read your MS5441 or compatible pressure sensor every 5 seconds and show you the calibration words, the calibration factors,
the raw values and the compensated values of temperature and pressure.
Once you read out the calibration factors you can define them in the header of any sketch you write for the sensor.
Pins:
MS5541 sensor attached to pins 10 - 13:
MOSI: pin 11
@daz
daz / merge-geotiff.py
Last active July 18, 2018 10:08 — forked from philipn/gist:1148693
GeoTIFFs -> One Big GeoTIFF
"""
Likely not useful to anyone else, but just putting it out there.
This script will take a directory of GeoTIFFs and merge them together without issues.
This script simply decompresses the files, runs nearblack to remove pseudo-black borders caused by compression, and then uses gdalwarp to stitch the files together.
The script is designed to use the minimal amount of disk space possible -- it cleans up each file after decompression and continually merges with a master image.
"""
import os
@daz
daz / fcpx-hardcode-subtitles.md
Last active August 30, 2020 05:14
Hardcode FCP X subtitles embedded as CEA-608

Hardcode FCP X subtitles embedded as CEA-608 captions

Install CCExtractor

brew install ccextractor

Install ffmpeg

Include --with-libass flag.

brew install libxml2
# If installing directly
gem install nokogiri -- --use-system-libraries \
--with-xml2-include=$(brew --prefix libxml2)/include/libxml2
# If using Bundle
bundle config build.nokogiri --use-system-libraries \
@daz
daz / DataShipper.cs
Created February 27, 2018 13:48 — forked from trishume/DataShipper.cs
Tobii EyeX UDP data shipper to VMWare VM host.
// Used to send data from a VMWare VM running the EyeX software
// with a Steelseries Sentry to a Mac OSX host over UDP.
namespace MinimalGazeDataStream
{
using EyeXFramework;
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
using Tobii.EyeX.Framework;
require 'geo/coord'
EXIFTOOL_DMS_REGEX = %r{
^(?<latd>\d+)\sdeg\s
(?<latm>\d+)'\s
(?<lats>(\d+\.\d+))"\s
(?<lath>N|S),\s
(?<lngd>\d+)\sdeg\s
(?<lngm>\d+)'\s
(?<lngs>(\d+\.\d+))"\s
@daz
daz / h100-show-previews.js
Created January 12, 2018 03:10
triplej Hottest 100 show all preview buttons bookmarklet
javascript:(function()%7B%24('.track__buttons__play').css('opacity'%2C1)%7D)()