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
const onetwothree = Machine({ | |
id: 'modulo three', | |
initial: 'one', | |
states: { | |
one: { | |
on: { | |
inc: 'two', | |
dec: 'three' | |
} |
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
msg.headers = { | |
"Content-Type": "multipart/form-data" | |
}; | |
msg.payload = { | |
'image' : { | |
'value': msg.payload, | |
'options': { | |
'filename': 'image.jpg' | |
} |
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
let FormData = require('form-data'); | |
let fs = require('fs'); | |
let form = new FormData(); | |
form.append('image', fs.createReadStream('/tmp/image.jpg')); | |
form.submit('http://max-image-resolution-enhancer.codait-prod-41208c73af8fca213512856c7a09db52-0000.us-east.containers.appdomain.cloud/model/predict', function(err, res) { | |
if (err) throw err; | |
res.pipe(fs.createWriteStream('/tmp/scaled.png')); | |
}); |
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
<!DOCTYPE html> | |
<!-- | |
resizable div // simulating a resizable window // bitcraftlab 2017 | |
--> | |
<html> |
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
// @bitcraftlab 2016 | |
boolean animate = true; | |
int dir = 1; | |
int iter = 5; | |
int n = 0; | |
int steps; | |
void 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
// @bitcraftlab 2016 | |
boolean animate = true; | |
int dir = 1; | |
int iter = 5; | |
int n = 0; | |
int steps; | |
void 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
// @bitcraftlab 2016 | |
boolean animate = true; | |
int dir = 1; | |
float a = PI/3; | |
int iter = 5; | |
int n = 0; | |
int steps; |
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
// @bitcraftlab 2016 | |
import processing.pdf.*; | |
int iter = 6; | |
int steps = 1 << (2 * iter); | |
float d = 2048.0 / steps; | |
float a = PI/2; |
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
// a litte script to download and view the images | |
// of the fantastic Vera Molnar without flash... | |
String domain = "http://www.veramolnar.com"; | |
String output = "images"; | |
for (int year = 1939; year <= 2012; year++) { | |
// download xml file | |
String[] lines = loadStrings(domain + "/xml/" + year + ".xml"); |
NewerOlder