Skip to content

Instantly share code, notes, and snippets.

View treinberger's full-sized avatar

Thomas Reinberger treinberger

View GitHub Profile
@treinberger
treinberger / Object_detection_picamera.py
Created January 16, 2019 08:45
Tensorflow + PiCamera object detection
######## Picamera Object Detection Using Tensorflow Classifier #########
#
# Author: Evan Juras
# Date: 4/15/18
# Description:
# This program uses a TensorFlow classifier to perform object detection.
# It loads the classifier uses it to perform object detection on a Picamera feed.
# It draws boxes and scores around the objects of interest in each frame from
# the Picamera. It also can be used with a webcam by adding "--usbcam"
# when executing this script from the terminal.
import sys
import numpy as np
import cv2
from os import system
import io, time
from os.path import isfile, join
import re
import picamera
from imutils.video.pivideostream import PiVideoStream
from imutils.video import FPS
/**
* This file was auto-generated by the Titanium Module SDK helper for Android
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
*/
package com.certtest;
package com.certtest;
import java.net.Socket;
import java.security.KeyStore;
import java.security.Principal;
import java.security.PrivateKey;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Arrays;
@treinberger
treinberger / alloy_databinding_sample.js
Created October 26, 2012 07:11
Alloy view databinding sample
function MapModelToView(model, view) {
var databoundViews = getChildren(view).filter(function(subview) {
return !_.isUndefined(subview.dataField);
});
for (var prop in model) {
if (model[prop] != null && !_.isFunction(model[prop]) && !_.isArray(model[prop])) {
//try to find view with attribute dataField = prop
var matchingSubview = _.find(databoundViews, function(subview) {
return subview.dataField === prop;