We need to create a virtual env for our app to run in: More Here Run this command in whatever folder you want to create your venv folder
python -m venv ./venv
license: mit |
license: mit |
/** | |
* Created by user on 18/05/17. | |
*/ | |
// Super useful for debug in web console | |
function print_filter(filter){ | |
var f=eval(filter); | |
if (typeof(f.length) != "undefined") {}else{} | |
if (typeof(f.top) != "undefined") {f=f.top(Infinity);}else{} | |
if (typeof(f.dimension) != "undefined") {f=f.dimension(function(d) { return "";}).top(Infinity);}else{} | |
console.log("DC DEBUG: "+filter+"("+f.length+") = "+JSON.stringify(f).replace("[","[\n\t").replace(/}\,/g,"},\n\t").replace("]","\n]")); |
function print_filter(filter) { | |
var f=eval(filter); | |
if (typeof(f.length) != "undefined") {}else{} | |
if (typeof(f.top) != "undefined") {f=f.top(Infinity);}else{} | |
if (typeof(f.dimension) != "undefined") {f=f.dimension(function(d) { return "";}).top(Infinity);}else{} | |
console.log(filter+"("+f.length+") = "+JSON.stringify(f).replace("[","[\n\t").replace(/}\,/g,"},\n\t").replace("]","\n]")); | |
} |
function isLeap(x) { | |
let leap = (x % 4 == 0 && x % 100 != 0) || x % 400 == 0; | |
console.log(leap ? "yes" : "no"); | |
} | |
isLeap(['2016']); |
data.forEach(function(d) { | |
var tempDate = new Date(d.date); // turn string to date | |
d.date = tempDate; // pop it back to overwrite the string. | |
}); |
WEBGL // p5 WEBGL rendering mode. | |
createCanvas(w, h, renderer) // Creates a 3D canvas (if renderer is WEBGL). | |
// Primitives | |
plane(width, height) // Creates a plane in 3D space. Equivalent to rect() in the default rendering mode. | |
plane(width, height, detailX, detailY) // Creates a plane in 3D space with the number of triangle subdivisions specified. | |
box(width) // Creates a cube in 3D space. | |
box(width, height, depth) // Creates a cuboid in 3D space. | |
box(width, height, depth, detailX, detailY) // Creates a cuboid in 3D space with triangle subdivisions. | |
sphere(radius) // Creates a sphere in 3D space. |
We need to create a virtual env for our app to run in: More Here Run this command in whatever folder you want to create your venv folder
python -m venv ./venv
We need to create a virtual env for our app to run in: More Here Run this command in whatever folder you want to create your venv folder
python -m venv ./venv