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
#include <Wire.h> | |
#include <Adafruit_MotorShield.h> | |
#include "utility/Adafruit_MS_PWMServoDriver.h" | |
#include <Adafruit_NeoPixel.h> | |
Adafruit_MotorShield AFMS = Adafruit_MotorShield(); | |
Adafruit_DCMotor *myMotor = AFMS.getMotor(1); | |
bool forward = true; | |
#define PIN 8 |
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
var half = duration/2.0; | |
var s = options.size; | |
var filters = [ // setpts=2.0*PTS, | |
util.format("[0:v]setsar=sar=1[open]"), | |
util.format("[1:v]trim=start=%s:end=%s,crop=in_h:in_h:(in_w/2)-(in_h/2):0,scale=%s:%s,setpts=PTS-STARTPTS,setsar=sar=1[player1]", 1, 3, s, s), | |
util.format("[1:v]trim=start=%s:end=%s,crop=in_h:in_h:(in_w/2)-(in_h/2):0,scale=%s:%s,setpts=PTS-STARTPTS,setsar=sar=1[player2]", duration-2, duration, s, s), | |
util.format("[2:v]setpts=PTS-STARTPTS,setsar=sar=1[horse1]"), | |
util.format("[3:v]setpts=PTS-STARTPTS,setsar=sar=1[horse2]"), | |
util.format("[4:v]setpts=PTS-STARTPTS,setsar=sar=1[close]"), |
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
import subprocess | |
import time | |
# Written to run on a Raspberry Pi with an Adafruit PiTFT or similar | |
# https://www.instagram.com/p/BIavjvSBYE6/ | |
# Be sure to `sudo apt-get install speedtest-cli` before running this | |
# Save this script to your home directory and add "sudo python /home/pi/speedtest.py &" | |
# to /etc/rc.local so that it starts automatically on boot | |
time.sleep(60) # Wait for everything to start up. |
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
{ | |
"document_tone": { | |
"tone_categories": [ | |
{ | |
"tones": [ | |
{ | |
"score": 0.272084, | |
"tone_id": "anger", | |
"tone_name": "Anger" | |
}, |
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
#include "ofApp.h" | |
ofPoint velocity; | |
ofPoint position; | |
ofColor color; | |
float radius = 20; | |
//-------------------------------------------------------------- | |
void ofApp::setup(){ |
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
#include "ofApp.h" | |
#define NUM_PARTICLES 100 | |
float radius = 10; | |
ofPoint pos[NUM_PARTICLES]; | |
ofPoint vel[NUM_PARTICLES]; | |
//-------------------------------------------------------------- |
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
#include "ofApp.h" | |
#define NUM_PARTICLES 100 | |
float radius = 5; | |
vector<ofPoint> pos; | |
vector<ofPoint> vel; | |
vector<float> alpha; | |
ofPoint lastMousePos; |
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
#include "ofApp.h" | |
#define NUM_PARTICLES 100 | |
class Particle { | |
public: | |
void setup(ofPoint _pos, ofPoint _vel) { | |
pos = _pos; | |
vel = _vel; | |
} |
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
#include "ofApp.h" | |
string input; | |
string valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ()"; | |
//-------------------------------------------------------------- | |
void ofApp::setup(){ | |
ofBackground(0); | |
} |
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
var Crawler = require("crawler").Crawler; // https://github.com/sylvinus/node-crawler | |
var S = require('string'); | |
var fs = require('fs'); | |
// A list of some patterns that will show up in webcam URLs | |
var patterns = ["jpg/image.jpg\?r=" | |
, "mjpg/video.mjpg" | |
, "record/current.jpg" | |
, "cgi-bin/faststream.jpg" | |
, "oneshotimage.jpg" |