Skip to content

Instantly share code, notes, and snippets.

{
"responses": [
{
"faceAnnotations": [
{
"boundingPoly": {
"vertices": [
{
"x": 920,
"y": 852
------ NO USB, POWER FROM 5V RAIL OF AC UNIT -----
event: BUFFER_READ
data: {"data":"FD 7F 80 C0 3F 7F 7F 80 3 7F 7F 7F 80 3 7F 7F 7F 1 3F FD 7F 7F 1 6F ","ttl":"60","published_at":"2015-07-28T06:52:03.347Z","coreid":"xxxxx"}
event: BUFFER_READ
data: {"data":"DD 7F FF 7F 80 C0 DD 7F 7F 7F 80 C0 39 FD FF FF 80 C0 DD FD FF 7F 80 C0 ","ttl":"60","published_at":"2015-07-28T06:52:33.346Z","coreid":"xxxxx"}
event: TEMP_CHANGED
data: {"data":"null","ttl":"60","published_at":"2015-07-28T06:52:33.427Z","coreid":"xxxxx"}
import java.util.concurrent.CyclicBarrier;
import java.util.ArrayList;
import java.util.List;
/**
* Little demo that creates 16 threads and each thread increments a shared
* counter 1000 times without any of the extra work required to do it in a
* thread safe manner. But for some reason adding a System.out.print in the
* increment loop makes it work!?!?!?
*/
@edalquist
edalquist / full-ffmpeg.sh
Last active July 27, 2016 21:06
Install on ReadyNAS OS6
# Add multimedia source
echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
echo "deb-src http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
apt-get update
apt-get install deb-multimedia-keyring # if this aborts, try again
apt-get update
# Go to local source directory
cd /usr/local/src
Sunk1 = False
Sunk2 = False
if guess_row == ship_row1 and guess_col == ship_col1:
Sunk1 = True
board[guess_row][guess_col] = "S"
print "Congratulations! You sunk my battleship!"
elif guess_row == ship_row2 and
guess_col == ship_col2:
Sunk2 = True
board[guess_row][guess_col] = "S"
@edalquist
edalquist / ConvertForVan.py
Last active January 1, 2016 22:58
Script for converting DVD rips to play on the RES of a 2011 Honda Odyssey. It only has a 480px wide display so we resize the video to that as a max width to save a TON of space. Also only include stereo AAC audio to save even more space.
from subprocess import call
import os
MOVIE_PATH="/Volumes/media/BatchDVD/FullDVD/"
MOVIES=[
"A Bug's Life (1998).mkv",
"Chicken Run (2000).mkv",
"Dr. Seuss' Horton Hears a Who (1999)/Dr. Seuss' Horton Hears a Who (1999).mkv"
"Dr. Seuss' How the Grinch Stole Christmas(1999)/Dr. Seuss' How the Grinch Stole Christmas(1999).mkv",
"Finding Nemo (2003).mkv",
There was an error upgrading your campaign! Please try again by reloading the page. If you continue to receive this error message, please contact the Dev Team at [email protected]. Error message: Status Code 400: {
"error" : "Invalid data; couldn't parse JSON object, array, or value. Perhaps you're using invalid characters in your key names."
}
deleteImages = function() {
$("html, body").animate({ scrollTop: 0 }, "slow");
var ids = [];
$("div.library_result").each(function(idx, library_result) {
if (ids.length < 6) {
ids.push($(library_result).attr("data-imageid"));
}
});
if (ids.length > 0) {
/**
* Set various token markers based on bar cur/max ratios
*
* The CONFIG array can have any number of configuration objects. These objects
* are processed in order.
*
* barId - The ID of the bar to look at the values for [1, 2, 3]
* barRatio - The ratio of bar value to max value that triggers setting the status marker [0 - 1]
* status - The name of the status marker to toggle [redmarker, bluemarker, greenmarker, brownmarker, purplemarker, dead]
* whenLow - The state of the marker when the bar value is <= the ratio [true, false]
/**
* Base settings object, just has a name and a value
*/
up.analytics.config.Setting = Backbone.Model.extend({
defaults: {
name: "",
value: ""
}
});