I hereby claim:
- I am Antti on github.
- I am andrii (https://keybase.io/andrii) on keybase.
- I have a public key whose fingerprint is 8EB1 609E 94EF 1BB4 FE5A 460D 8730 4112 E818 B8EA
To claim this, I am signing this object:
// source https://build.particle.io/shared_apps/5afd6cb004e419a654000e3f | |
int CLOCK_PIN = D1; | |
int DATA_PIN = D3; | |
int STROBE_PIN = D4; | |
int Z_PIN = A2; | |
int LED_PIN = D7; | |
// Whether we have a clock/strobe pulse | |
volatile uint8_t clock_pulse = 0; |
require 'brotli' | |
module FeedRs | |
class BrotliDecompressionMiddleware < Faraday::Middleware | |
ACCEPT_ENCODING = 'Accept-Encoding'.freeze | |
CONTENT_ENCODING = 'Content-Encoding'.freeze | |
CONTENT_LENGTH = 'Content-Length'.freeze | |
SUPPORTED_ENCODINGS = 'br'.freeze | |
def call(env) |
Notes on the reverse engineering of the data for the Neewer-RGB660 PRO leveraging bluetooth low energy. | |
NEEWER-RGB660 PRO | |
02 41 00 0C 00 08 00 04 00 52 0E 00 78 81 01 01 FB | |
Preamble 02 04 00 0C 00 08 00 04 00 52 0E 00 Value 78 81 01 01 FB | |
Service UUID: 69400001b5a3f393e0a9e50e24dcca99 | |
Caracteristic: 69400002b5a3f393e0a9e50e24dcca99 | |
Properties: WRITE, WRITE NO RESPONSE |
I hereby claim:
To claim this, I am signing this object:
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
unsafe fn transmute_vec<T, U>(vec: Vec<T>) -> Vec<U> { | |
use std::mem; | |
let ratio = mem::size_of::<T>() / mem::size_of::<U>(); | |
let length = vec.len() * ratio; | |
let capacity = vec.capacity() * ratio; | |
let ptr = vec.as_ptr(); | |
mem::forget(vec); | |
Vec::from_raw_parts(ptr as *mut U, length, capacity) |
(function() { | |
'use strict'; | |
function download(filename, data) { | |
var pom = document.createElement('a'); | |
pom.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(data)); | |
pom.setAttribute('download', filename); | |
if (document.createEvent) { | |
var event = document.createEvent('MouseEvents'); | |
event.initEvent('click', true, true); |
// Fast Block Distributed CUDA Implementation of the Hungarian Algorithm | |
// | |
// Annex to the paper: | |
// Paulo A. C. Lopes, Satyendra Singh Yadav, Aleksandar Ilic, Sarat Kumar Patra , | |
// "Fast Block Distributed CUDA Implementation of the Hungarian Algorithm", | |
// Parallel Computing | |
// | |
// Hungarian algorithm: | |
// (This algorithm was modified to result in an efficient GPU implementation, see paper) | |
// |
javascript: (function() { | |
var postCode = $("meta[property='og:postal-code']").attr("content"); | |
var url = "https://www.google.com/maps/dir/?api=1&origin=" + postCode + "&destination=EC4R3TE&travelmode=transit"; | |
$('h2[itemprop="streetAddress"').append('<span style="color: red"> (' + "<a target='_blank' href='" + url + "'>" + postCode + "</a>) </span>"); | |
})() |
javascript:(function(){ | |
var targetPostCode="EC4R3TE"; | |
var postCode=$('#Features div div table tr td a')[0].href.split('=')[1].replace('%2520',' '); | |
var url="https://www.google.com/maps/dir/?api=1&origin="+postCode+"&destination="+targetPostCode+"&travelmode=transit"; | |
$('.property-title').append('<span style="color: red"> ('+"<a target='_blank' href='"+url+"'>"+postCode+"</a>) </span>"); | |
})() |