I hereby claim:
- I am liorsbg on github.
- I am liorsbg (https://keybase.io/liorsbg) on keybase.
- I have a public key ASAGUEDhGUMnyFH_rl8HEbx9slDGdr5uFjPIl_3SWD0s6Ao
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
//WIP | |
init(); | |
detect(); | |
function init(){ | |
//ROI | |
const [x1, x2, y1, y2] = [440,640, 80, 280]; | |
let img = document.querySelector("img"); | |
const API_URL = `http://13.82.136.127:8082/hls?x1=${x1}&y1=${y1}&x2=${x2}&y2=${y2}&imageUrl=${img.src}`; | |
let container = document.createElement("DIV"); |
#!/bin/bash | |
# An set of disks to ignore from partitioning and formatting | |
BLACKLIST="/dev/sda|/dev/sdb" | |
# Base directory to hold the data* files | |
DATA_BASE="" | |
usage() { | |
echo "Usage: $(basename $0) <new disk>" | |
} |
#! /bin/bash | |
# echo "Hello" | |
# echo "I am $(whoami)" | |
# pip uninstall -y streamparse | |
# sleep 1 | |
# pip install --user --ignore-installed streamparse | |
# echo "Done!" | |
export PATH=$PATH:/home/storm/.local/bin |
#!/bin/bash | |
curl -sSO https://bootstrap.pypa.io/get-pip.py | |
python get-pip.py |
#!/bin/bash | |
curl -sSO https://dl.google.com/cloudagents/install-logging-agent.sh | |
SHA=$(sha256sum install-logging-agent.sh) | |
EXP="07ca6e522885b9696013aaddde48bf2675429e57081c70080a9a1364a411b395 install-logging-agent.sh" | |
if [ "$SHA"="$EXP" ]; then | |
sudo bash install-logging-agent.sh | |
fi | |
sudo rm install-logging-agent.sh |
import numpy as np | |
# Somehow this is half as fast | |
def np_batch_generator(iterable, batch_size=100): | |
# Initialize empty array of numpy arrays | |
batch = np.empty((batch_size), np.ndarray) | |
for index, item in enumerate(iterable): | |
batch[index % batch_size] = item | |
if index % batch_size == batch_size - 1: | |
yield batch |
function delay(ms) { | |
console.log("Will wait..."); | |
return new Promise(function(resolve, reject) { | |
setTimeout(resolve, ms); | |
}); | |
} | |
function poll(func, interval, max_intervals) { | |
let retry = (func, tryNum, _resolve) => |
function evalUrl(url){ | |
fetch(url).then((res)=>res.text()).then((text)=>eval(text)) | |
} |