Skip to content

Instantly share code, notes, and snippets.

View automata's full-sized avatar

Vilson Vieira automata

View GitHub Profile
{
"properties": {
"name": "main",
"id": "vertical-one/main",
"project": "vertical-one",
"environment": {
"type": "noflo-browser",
"content": "<canvas id=\"c\" width=\"400\" height=\"400\"></canvas>"
},
"changed": true,
{
"properties": {
"name": "main",
"id": "7d0957ba3dfb740c45ba",
"project": "molly-demo-2",
"environment": {
"type": "noflo-browser",
"content": "<style>\n #molly {\n \tcolor: #fff;\n }\n .hide {\n \tdisplay: none;\n }\n .show {\n \tdisplay: block;\n }\n .box {\n \twidth: 200px;\n \theight: 200px;\n }\n</style>\n<div id=\"molly\">Hi, do you want to see the AI in action?</div>\n<div id=\"action\">Yes, let me see it!</div>\n<div id=\"restart\">No, take me back</div>\n<section>\n<video id=\"vid\" width=\"640\" height=\"480\" autoplay></video>\n<canvas id=\"can\" width=\"640\" height=\"480\"></canvas>\n<canvas id=\"canorig\" width=\"640\" height=\"480\"></canvas>\n</section>"
},
"icon": "",
@automata
automata / noflo.json
Last active August 29, 2015 14:07
AI Demo
{
"properties": {
"name": "main",
"id": "9fcd4e59bc16685eab13",
"project": "molly-demo-2",
"environment": {
"type": "noflo-browser",
"content": "<style>\n #molly {\n \tcolor: #fff;\n }\n .hide {\n \tdisplay: none;\n }\n .show {\n \tdisplay: block;\n }\n .box {\n \twidth: 200px;\n \theight: 200px;\n }\n</style>\n<div id=\"molly\">Hi, do you want to see the AI in action?</div>\n<div id=\"action\">Yes, let me see it!</div>\n<div id=\"source\">Yes, show me the source graph</div>\n<div id=\"restart\">No, take me back</div>\n<section>\n<video id=\"vid\" width=\"640\" height=\"480\" autoplay></video>\n<canvas id=\"can\" width=\"640\" height=\"480\"></canvas>\n<canvas id=\"canorig\" width=\"640\" height=\"480\"></canvas>\n</section>"
},
"icon": "",
{
"properties": {
"name": "main",
"id": "triangulate-image/main",
"project": "triangulate-image",
"environment": {
"type": "noflo-browser"
},
"changed": true
},
{
"properties": {
"name": "main",
"id": "molly-demo-2/main",
"project": "molly-demo-2",
"environment": {
"type": "noflo-browser",
"content": "<style>\n #molly {\n \tcolor: #fff;\n }\n .hide {\n \tdisplay: none;\n }\n .show {\n \tdisplay: block;\n }\n .box {\n \twidth: 200px;\n \theight: 200px;\n }\n</style>\n<div id=\"molly\"></div>\n<section>\n<video id=\"vid\" width=\"640\" height=\"480\" autoplay></video>\n<canvas id=\"can\" width=\"640\" height=\"480\"></canvas>\n<canvas id=\"canorig\" width=\"640\" height=\"480\"></canvas>\n</section>"
},
"icon": "",
@automata
automata / noflo.json
Last active August 29, 2015 14:07
Molly demo
{
"properties": {
"name": "main",
"id": "molly-demo-2/main",
"project": "molly-demo-2",
"environment": {
"type": "noflo-browser",
"content": "<style>\n #molly {\n color: #fff;\n }\n .hide {\n display: none;\n }\n .show {\n display: block;\n }\n .box {\n width: 200px;\n height: 200px;\n }\n</style>\n<div id=\"molly\"></div>\n<video id=\"vid\" width=\"640\" height=\"480\" autoplay></video>\n<canvas id=\"can\" width=\"640\" height=\"480\"></canvas>"
},
"icon": "",
@automata
automata / foo.py
Last active August 29, 2015 14:07
import numpy as np
aa = np.array([[1,2],[1,2],[3,4],[3,2]])
[np.mean([np.nan_to_num(b[1]) for b in aa if b[0] == i]) for i in np.unique(aa[:,:1])]
# Out: [2.0, 3.0]
[[int(i), np.mean([np.nan_to_num(b[1]) for b in aa if b[0] == i])] for i in np.unique(aa[:,:1])]
@automata
automata / noflo.json
Created October 1, 2014 19:02
Photobooth + CCV
{
"properties": {
"name": "photobooth_ccv",
"environment": {
"runtime": "html",
"src": "preview/iframe.html",
"width": 300,
"height": 300,
"content": " <button id=\"start\">start camera</button>\n <button id=\"save\">save</button> \n <video id=\"vid\" autoplay loop width=\"640\" height=\"480\" ></video>\n <canvas id=\"out\" width=\"640\" height=\"480\" style=\"max-width:100%; display:none;\"></canvas>\n\n \n<style>\n #saved img { width: 160px; height: 120px;}\n</style>\n<div id=\"saved\"></div>",
"type": "noflo-browser"
@automata
automata / noflo.json
Created September 30, 2014 14:43
Instagram Lord Kelvin (new, better color curve)
{
"properties": {
"name": "main",
"id": "newkelvin",
"environment": {
"type": "noflo-browser",
"content": ""
},
"changed": true,
"icon": ""
@automata
automata / kelvin.scm
Created September 30, 2014 13:46
Color curve to Lord Kelvin filter
# GIMP curves tool settings
(time 0)
(channel value)
(curve
(curve-type smooth)
(n-points 17)
(points 34 0.000000 0.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 1.000000 1.000000)
(n-samples 256)
(samples 256 0.000000 0.003922 0.007843 0.011765 0.015686 0.019608 0.023529 0.027451 0.031373 0.035294 0.039216 0.043137 0.047059 0.050980 0.054902 0.058824 0.062745 0.066667 0.070588 0.074510 0.078431 0.082353 0.086275 0.090196 0.094118 0.098039 0.101961 0.105882 0.109804 0.113725 0.117647 0.121569 0.125490 0.129412 0.133333 0.137255 0.141176 0.145098 0.149020 0.152941 0.156863 0.160784 0.164706 0.168627 0.172549 0.176471 0.180392 0.184314 0.188235 0.192157 0.196078 0.200000 0.203922 0.207843 0.211765 0.215686 0.219608 0.223529 0.227451 0