This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
1. Load legend json from the service | |
--> | |
<script> | |
var myService = 'http://fake.com/arcgis/rest/services/Timor/IlliteracyRate/MapServer'; | |
$.ajax({ | |
url: myService + '/legend', | |
data:{f: 'pjson'}, | |
dataType: 'jsonp' | |
}).then(function(esriLegend){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Patrick the drink pourer | |
This code is for an Arduino hooked up to a servo | |
that will sweep when it sees a sudden delta in its | |
photoresistor. | |
Photoresistor wires: A4, 10~ | |
Resistor A4 to Grnd | |
Servo: 9~, 5V and Grnd | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This code is intended to run on a device with up to date Bluez. | |
# Works on Raspberry Pi or Mac. | |
# Currently configured to stream heart rate. | |
# https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.heart_rate.xml | |
# Bluepy Docs | |
# @see http://ianharvey.github.io/bluepy-doc/ | |
# Notifciations doc: | |
# @see http://ianharvey.github.io/bluepy-doc/notifications.html | |
# Code assumes adapter is already enabled, and scan was already done. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I found some snippets around the web that didn't work, this is what did workf or me. | |
# This assumes a linux based Docker image, in my case an Ubunut one. | |
# I was trying to add conda to leyden5iwx/caffe-cpu-master | |
# Base Docker image | |
FROM tleyden5iwx/caffe-cpu-master | |
# misc apt-get installs.... | |
# Install miniconda to /miniconda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Track your face and replace it with a mask image. | |
Based on very helpful, but somewhat buggy code in this tutorial: | |
https://analyticsindiamag.com/how-to-build-your-own-face-filter-with-opencv/ | |
Setup: | |
0) pip install dlib and opencv | |
1) Download shape_predictor_68_face_landmarks.dat from https://github.com/AKSHAYUBHAT/TensorFace/raw/master/openface/models/dlib/shape_predictor_68_face_landmarks.dat | |
2) Make a mask.png image for your face. |