- Distributed systems = Computers + relativity
- Different machines have different clocks, perception of time, and views of the state of the system
- Challenges: Communication failures, hardware failures, latency, bandwidth
- All computer systems today are distributed at some level (nature obeys relativity after all), the extent to which this nature is exposed depends on the loads put upon the system.
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 polytope = require('conway-hart')('tI') | |
const vec3 = require('gl-vec3') | |
const HEIGHT = 6 | |
const bounds = require('bound-points')(polytope.positions) | |
const radius = Math.max( | |
bounds[1][0] - bounds[0][0], | |
bounds[1][1] - bounds[0][1], | |
bounds[1][2] - bounds[0][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
{ | |
"lowp": [ | |
[ | |
-1.0932616591453552, | |
-0.6557616889476776 | |
], | |
[ | |
-0.8432616889476776, | |
-0.405761674977839 | |
], |
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
var ndarray = require('ndarray') | |
//Context is a canvas 2d context | |
var imageData = context.createImageData(WIDTH, HEIGHT) | |
//Wrap pixels in an ndarray with shape [width x height x 4 (rgba)] | |
var ndpixels = ndarray(imageData.data, [WIDTH, HEIGHT, 4], [4, 4 * WIDTH, 1], 0) | |
//Now you can edit pixels as an ndarray! | |
// ... |
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
//node.js logo hexagonal cellular automata thing | |
// | |
// author: Mikola Lysenko | |
// (c) 2015 MIT License | |
// | |
//Configuration parameters | |
var ON_STYLE = '#80bd01' | |
var OFF_STYLE = '#333' | |
var GRID_DIM = 20 |
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
name of display: :0 | |
display: :0 screen: 0 | |
direct rendering: Yes | |
server glx vendor string: Parallels Inc | |
server glx version string: 1.4 | |
server glx extensions: | |
GLX_EXT_texture_from_pixmap, GLX_SGIX_fbconfig | |
client glx vendor string: Parallels Inc | |
client glx version string: 1.4 | |
client glx extensions: |
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
import plotly.plotly as py | |
import numpy as np | |
import random | |
#Generate 3 random Gaussian clusters with 40 points each | |
clusters = [40, 40, 40] | |
x = [] | |
y = [] | |
z = [] | |
for n in clusters: |
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
var boxIntersect = require('box-intersect') | |
var segIntersect = require('robust-segment-intersect') | |
function getBoxes(positions, cells) { | |
return cells.map(function(e) { | |
var a = positions[e[0]] | |
var b = positions[e[1]] | |
return [ Math.min(a[0], b[0]), Math.min(a[1], b[1]), Math.max(a[0], b[0]), Math.max(a[1], b[1]) ] | |
}) | |
} |
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
var baboon = require("baboon-image") | |
var ndarray = require('ndarray') | |
var imshow = require('ndarray-imshow') | |
var translate = require('ndarray-translate-fft') | |
var baboon64 = ndarray(new Float64Array(baboon.data), baboon.shape, baboon.stride, 0) | |
translate.wrap(baboon64, [100, 100, 0]) | |
imshow(baboon64) |