Skip to content

Instantly share code, notes, and snippets.

@ieb
ieb / BME280.js
Last active January 22, 2022 09:22
Test Code for eBay BME280 order number 21-08080-91109 item 353751582230 from seller fiee-ki
var i2c = require('i2c-bus');
// Also works with BMP280 but returns 0 for humidity since that chip doesnt have humidity
// http://www.adafruit.com/datasheets/BST-BME280-DS001-11.pdf
var BME280 = function(options) {
options = options || {};
this.bus = (options.bus===undefined)?1:options.bus;
this.debug = options.debug || false;
@ieb
ieb / testUsingTensorFlow.html
Last active April 17, 2023 14:57
Is in browser cosine similarity using a tensor flow model viable ?
<html>
<head>
</head>
<body>
<div>
This tests creating a sentence simularity index using tensorflow and then searching it.
It takes about 10s to generate the index using content from www.hlx.live containing 77 pages, and 5s to query that data with
1 sentence "Tell me about everything", indicating that a page in that site knows about everything.