xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
sudo npm install -g n
sudo n 0.10.36```
import glob | |
import json | |
import os | |
output_path = './outputs/img-samples/' | |
log_file_name = 'dream_web_log.txt' | |
full_log_path = output_path + log_file_name | |
image_list = glob.glob(output_path + '*.png') | |
def convert_log_to_json(log_file_path): |
public class Palette | |
{ | |
public int[] colors; | |
public int colorCount; | |
public String title; | |
public Palette(int[] colors, String title) | |
{ | |
this.colors = colors; | |
this.colorCount = colors.length; |
#include <ESP8266WiFi.h> | |
#include <PubSubClient.h> | |
const char* ssid = "..."; | |
const char* password = "..."; | |
const char* mqtt_server = "..."; | |
WiFiClient espClient; | |
PubSubClient client(espClient); |
#include <SoftwareSerial.h> | |
SoftwareSerial BTSerial(10, 11); // RX | TX | |
/** | |
* TX -> 10 | |
* RX -> 11 | |
* KEY -> 6 | |
* | |
* Set baudrate in Serial monitor to 38400!!! | |
* Connect Module after arduino is started! |
// zoomkat 12-25-13 serial servo test | |
// type servo position 0 to 180 in serial monitor | |
// or for writeMicroseconds, use a value like 1500 | |
// Send an a to attach servo or d to detach servo | |
// for IDE 1.0.5 and later | |
// Powering a servo from the arduino usually *DOES NOT WORK*. | |
#include <Servo.h> | |
String readString; //String captured from serial port |
#include "ofApp.h" | |
//-------------------------------------------------------------- | |
void ofApp::setup(){ | |
ofSetVerticalSync(true); | |
ofBackground(255); | |
ofSetSmoothLighting(true); | |
// Box size | |
box.set(100); |
// Bounce.pde | |
// -*- mode: C++ -*- | |
// | |
// Make a single stepper bounce from one limit to another | |
// | |
// Copyright (C) 2012 Mike McCauley | |
// $Id: Random.pde,v 1.1 2011/01/05 01:51:01 mikem Exp mikem $ | |
#include <AccelStepper.h> |
<html> | |
<head> | |
<title>Slider test</title> | |
<style> | |
* { | |
margin: 0; | |
padding: 0; | |
list-style: none; | |
box-sizing: border-box; | |
font-family: 'Roboto'; |
import java.awt.event.*; | |
import java.awt.Robot; | |
Robot bot = null; | |
int nextClick = (int)random(15, 50); | |
void setup() { | |
try { | |
bot = new Robot(); | |
} |