Skip to content

Instantly share code, notes, and snippets.

@tonis2
tonis2 / index.html
Created March 5, 2017 12:50 — forked from tmichel/index.html
simple websocket example with golang
<html>
<head>
<title>WebSocket demo</title>
</head>
<body>
<div>
<form>
<label for="numberfield">Number</label>
<input type="text" id="numberfield" placeholder="12"/><br />
@tonis2
tonis2 / convert_features_opencv_traincascade.py
Created December 26, 2016 19:47 — forked from mtschirs/convert_features_opencv_traincascade.py
Converting the new OpenCV haar cascades into the js-objectdetect format.
import xml.etree.ElementTree
'''
Classifier - array layout:
[width, height, threshold, num_simple_classifiers, tilted, num_features, f1, f2, f3, f4, f_weight, simple_threshold, left_val, right, val, ...]
'''
wrapper = "(function(module) {\n" + \
" \"use strict\";\n" + \
" \n" + \