A list of meta-algorithms
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 ops = require('ndarray-ops') | |
function toRGBA (glyph) { | |
var output = ndarray( | |
new Uint8ClampedArray(glyph.size*4), | |
[glyph.shape[0], glyph.shape[1], 4]) | |
for(var i=0; i<3; ++i) { | |
ops.assign(output.pick(-1,-1,i), glyph) | |
} | |
ops.assigns(output.pick(-1,-1,3), 0xff) |
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 ops = require('ndarray-ops') | |
function toRGBA (glyph) { | |
var output = ndarray( | |
new Uint8ClampedArray(glyph.size*4), | |
[glyph.shape[0], glyph.shape[1], 4]) | |
var glyphPad = ndarray( | |
glyph.data, |
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
//Sets all components equal, works in place | |
function toRGBA (glyph) { | |
return ndarray( | |
glyph.data, | |
[glyph.shape[0], glyph.shape[1], 4], | |
[glyph.stride[0], glyph.stride[1], 0], | |
glyph.offset) | |
} |
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
'use strict' | |
var gauss = require('gauss-random') | |
var uniq = require('uniq') | |
var alphaShape = require('alpha-shape') | |
var graphToPolygons = require('planar-graph-to-polyline') | |
var delaunay = require('delaunay-triangulate') | |
var circumradius = require('circumradius') | |
function coalphaComplex(alpha, points) { |
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) |
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
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
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: |
- 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.