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
[{"id":"4bedb5dd.1b0e8c","type":"change","z":"9d5bc26c.e42c8","name":"Set Progress 0","rules":[{"t":"set","p":"payload.progress.completion","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":300,"wires":[["e7dc5b91.a12e18"]]},{"id":"cea131b0.44184","type":"ui_template","z":"9d5bc26c.e42c8","group":"e2bbaa5d.0c6bf8","name":"Video Frame","order":1,"width":"10","height":"10","format":"<img width=\"16\" height=\"16\" src=\"{{flow.payload.webcam.on}}\" />","storeOutMessages":false,"fwdInMessages":true,"templateScope":"local","x":290,"y":580,"wires":[[]]},{"id":"8f572379.1bf63","type":"http request","z":"9d5bc26c.e42c8","name":"","method":"use","ret":"txt","url":"","tls":"","x":550,"y":60,"wires":[["27be8cd7.507f94"]]},{"id":"7bfde874.9bb6d8","type":"ui_gauge","z":"9d5bc26c.e42c8","name":"","group":"146f3617.73b19a","order":4,"width":"0","height":"0","gtype":"gage","title":"Heatbed","label":"","format":"{{msg.payload.temperature.bed.actual}}°C","min":0,"max":"110", |
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
// Non Editor code | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public abstract class TrafficLightAttribute : PropertyAttribute | |
{ | |
public bool DrawLabel = true; | |
public string CustomLabel; | |
public bool AlsoDrawDefault; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#pragma once | |
#include "ofMain.h" | |
void transformToFit( ofRectangle src, ofRectangle dst, bool upscale=true ) { | |
// Scale | |
float scaleX = ( dst.width / src.width ); | |
float scaleY = ( dst.height / src.height ); | |
float sc = ( scaleX < scaleY ? scaleX : scaleY ); | |
if ( ! upscale ) | |
sc = ofClamp( sc, 0.0f, 1.0f ); | |
// Position (scaled) |
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
from bs4 import BeautifulSoup | |
import requests | |
import re | |
import urllib2 | |
import os | |
import argparse | |
import sys | |
import json | |
# adapted from http://stackoverflow.com/questions/20716842/python-download-images-from-google-image-search |
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.getElementById( 'loading' ).style.display = 'none'; | |
var speed = .001; // changes the rate of rotation | |
var distance = 4; // changes the distance the point travels | |
function _update() { | |
bAmDrawing = true; | |
lastMouseX = 0; lastMouseY = 0; | |
var a = speed * performance.now(); | |
var x = distance * Math.cos( a ); | |
var y = distance * Math.sin( a ); | |
stage.mousemove( { data: { global : { x: x, y: y } } } ) |
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
using UnityEngine; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
using UnityEditorInternal; | |
#endif |
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
using UnityEngine; | |
using UnityEditor; | |
using System.Collections; | |
using System; | |
public class MeshVisualizeWindow : EditorWindow | |
{ | |
[MenuItem("Window/Mesh visualizer")] | |
public static void OpenWindow() | |
{ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>three.js webgl - modifier - Fast Quadric Mesh Simplification</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | |
<style> | |
body { | |
font-family: Monospace; | |
background-color: #f0f0f0; |
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
# "Colorizing B/W Movies with Neural Nets", | |
# Network/Code Created by Ryan Dahl, hacked by samim.io to work with movies | |
# BACKGROUND: http://tinyclouds.org/colorize/ | |
# DEMO: https://www.youtube.com/watch?v=_MJU8VK2PI4 | |
# USAGE: | |
# 1. Download TensorFlow model from: http://tinyclouds.org/colorize/ | |
# 2. Use FFMPEG or such to extract frames from video. | |
# 3. Make sure your images are 224x224 pixels dimension. You can use imagemagicks "mogrify", here some useful commands: | |
# mogrify -resize 224x224 *.jpg | |
# mogrify -gravity center -background black -extent 224x224 *.jpg |
NewerOlder