Skip to content

Instantly share code, notes, and snippets.

@jaredharley
jaredharley / Monoprice Mini Delta V2 printer API notes.md
Last active September 2, 2023 14:28
My working notes on figuring out the Monoprice Mini Delta V2 (MPMDv2) web API

Monoprice Mini Delta V2 printer API

My in-progress documentation of the Monoprice Mini Delta V2 printer api. This is traffic captured between the included Wiibuilder application and the printer when you connect to the printer through Wiibuilder and send a gcode file to print.

api/printer

api/printer during print job

{
@ryanfeeley
ryanfeeley / tesseractops.sh
Created January 22, 2018 17:45
Shell Script for macOS Automator Workflow to OCR Images to Set Finder Comments
for f in "$@"
do
/usr/local/bin/tesseract "$f" stdout | xargs -0 osascript -e 'on run {f, c}' -e 'tell app "Finder" to set comment of (POSIX file f as alias) to c' -e end "$f"
done
@moritzmhmk
moritzmhmk / rpi_camera_v4l2_ffmpeg.md
Last active April 16, 2024 19:20
using raspberry pi camera with ffmpeg (hardware accelerated)

Using Raspberry Pi Camera with ffmpeg

Capturing video from the rpi camera with ffmpeg can vary from less than 5% to 100% of the CPU (rpi zero) depending on ffmpeg using the hardware acceleration or not.

On many github issues one finds the suggestion of using h264_omx codec to use the gpu - but it does not ship with the default ffmpeg on Raspbian.

Instead I found that one can use the v4l2 driver provided by raspbian to get hardware accelerated h264 output. Also setting the video size will save one from using a (cpu) scale filter.

ffmpeg

capture h264 video from rpi camera

@dwcoates
dwcoates / python-send-code-dwim.el
Last active December 15, 2017 01:01
Convenient function for sending python code to shell
(defvar python-shell-send-code-step-on-function nil
"If non-nil, step sending a function to the python interpreter.")
(defun python-shell-step-after-defun ()
(forward-paragraph)
;; when at last paragraph, don't step to beginning of "next" paragraph
(unless (equal (line-number-at-pos (point))
(progn (forward-paragraph) (line-number-at-pos (point))))
(backward-paragraph)
(forward-line 1)))
@jaywilliams
jaywilliams / install-mosh.sh
Last active January 3, 2024 17:16 — forked from palexander/gist:2975305
Compiling and running mosh on Dreamhost (Updated - 2024)
#!/usr/bin/env bash
set -e
# Dreamhost Mosh Install Script
# Jay Williams (https://gist.github.com/jaywilliams/c9ffab789b3f622abc932dd4cfaaeef5)
# Based on the gracious work of:
# Paul R Alexander (https://gist.github.com/palexander/2975305)
# Sami Samhuri https://gist.github.com/samsonjs/4076746
@ayman
ayman / keras-example.py
Last active April 24, 2017 13:06
This is an extra annotated, commented illustration example from a Keras tutorial.
# Tutorial from: http://bit.ly/2olREnv
import numpy
from keras.datasets import cifar10
from matplotlib import pyplot
from scipy.misc import toimage
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import Dropout
from keras.layers import Flatten
from keras.constraints import maxnorm
@bhautikj
bhautikj / vrembed_how_weird.xml
Created February 20, 2016 08:55
vrembed example
<story>
<scene name="intro">
<photo src="https://c2.staticflickr.com/6/5688/23494440049_547ec58c23_k.jpg" isStereo="false" sphereParams="100,66,0,0"/>
<!-- 2015 -->
<photo src="https://c1.staticflickr.com/9/8728/17098966780_4f1ba46dbf_k.jpg" isStereo="false" sphereParams="50,33,90,-25">
<jump jumpTo="2015-a" sphereParams="25,33,90,-45">2015</jump>
<!-- 2013 -->
<photo src="https://c1.staticflickr.com/9/8546/8692786582_6793dab31e_k.jpg" isStereo="false" sphereParams="50,33,90,25">
<jump jumpTo="2013-a" sphereParams="25,33,90,5">2013</jump>
<!-- 2012 -->
# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
HOMEBRIDGE_OPTS=-U /var/lib/homebridge
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*
@tommycarpi
tommycarpi / ipython_notebook+spark.md
Last active September 3, 2021 10:14
Link Apache Spark with IPython Notebook

How to link Apache Spark 1.6.0 with IPython notebook (Mac OS X)

Tested with

Python 2.7, OS X 10.11.3 El Capitan, Apache Spark 1.6.0 & Hadoop 2.6

Download Apache Spark & Build it

Download Apache Spark and build it or download the pre-built version.

@baraldilorenzo
baraldilorenzo / readme.md
Last active November 21, 2023 22:41
VGG-16 pre-trained model for Keras

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman