0. Create kafka user
sudo adduser kafka
sudo adduser kafka sudo
su -l kafka
1. Download and Install kafka archive
| // interpolate between colors { r, g, b } where 0 < t < 1 | |
| // when assigning a color for a number in a range larger than 0-1, scale the number to the 0-1 range first | |
| function lerpRGB(color1, color2, t) { | |
| let color = {}; | |
| color.r = color1.r + ((color2.r - color1.r) * t); | |
| color.g = color1.g + ((color2.g - color1.g) * t); | |
| color.b = color1.b + ((color2.b - color1.b) * t); | |
| return color; | |
| } |
| package main | |
| import ( | |
| agwd "github.com/sclevine/agouti" | |
| tbwd "github.com/tebeka/selenium" | |
| "log" | |
| sgwd "sourcegraph.com/sourcegraph/go-selenium" | |
| ) | |
| // Helper for sourcegraph/go-selenium |
| var Types = new Map(); | |
| Types.set(Array, function(v) { | |
| var l = v.length; i = 0, a = Array(l); | |
| for (i; i<l; i++) { | |
| a[i] = v[i]; | |
| } | |
| return a; | |
| }); | |
| Types.set(Number, function(v) { | |
| return v * 1; |
| def dice(im1, im2, empty_score=1.0): | |
| """ | |
| Computes the Dice coefficient, a measure of set similarity. | |
| Parameters | |
| ---------- | |
| im1 : array-like, bool | |
| Any array of arbitrary size. If not boolean, will be converted. | |
| im2 : array-like, bool | |
| Any other array of identical size. If not boolean, will be converted. | |
| Returns |
| ; The input is a decimal number, | |
| ; Result is a hexadecimal number | |
| section .text | |
| ; to make the printf out work the main 'method' is needed | |
| global main | |
| ; for printing numbers out | |
| extern printf |