inputs = [1, 2, 3, 2.5]
weights = [0.2, 0.8, -0.5, 1.0]
bias = 2.0
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"os/exec" | |
"path/filepath" | |
"plugin" |
# frozen_string_literal: true | |
require 'open-uri' | |
require 'ox' | |
class FoxHandler < Ox::Sax | |
def initialize | |
@h_tags = [] | |
@h = nil | |
end |
/** | |
* Educational "Free-list" memory allocator. | |
* | |
* Maintains explicit list of free memory blocks, reuses blocks on free. | |
* Implements "first-fit" strategy. Uses pre-allocated heap of 64 bytes, | |
* with 32-bit machine word size. | |
* | |
* TODO: | |
* | |
* - Implement "best-fit" strategy |
#!/usr/bin/env python3 | |
import re | |
import os | |
import subprocess | |
import statistics | |
class NoQueryPlanOutput(Exception): | |
pass |
Why stream items are small hashes instead of single strings like many other Redis types elements is a good question indeed. At the end it's just a design decision, so I don't have the definitive answer. However I can try to explain the design process leading to this design.
What I wanted "Streams" to be, was actually just an Abstract Log. I was not able to call the data structure "log" because it's confusing in many contexts, but that was the idea, and a log better represents what Redis Streams are. Perhaps it's the consumer groups part of the Redis Streams that better characterize the streaming part, but the data structure itself is a log.
Now, what constitutes a log? In the original form, is just lines of text ending with "\n"
, one after the other, added in an append only fashion.
But in general is some data in append only mode.
XADD captures this append only mode of operation. While we have more powerful deletion mechanisms, and will add more, but that is the general idea.
let recv = (client, maxlen) => { | |
let bytes = Bytes.create(maxlen); | |
let len = Unix.recv(client, bytes, 0, maxlen, []); | |
Bytes.sub_string(bytes, 0, len) | |
}; | |
let parse_top = top => { | |
let parts = Str.split(Str.regexp("[ \t]+"), top); | |
switch (parts) { |
String.prototype.hexEncode=function(){var a,b,c="";for(b=0;b<this.length;b++)a=this.charCodeAt(b).toString(16),c+=("00"+a).slice(-2);return c};String.prototype.hexDecode=function(){var a,b=this.match(/.{1,2}/g)||[],c="";for(a=0;a<b.length;a++)c+=String.fromCharCode(parseInt(b[a],16));return c}; | |
function handleFileSelect(a){a.stopPropagation();a.preventDefault();var b=[];files="undefined"!=typeof a.dataTransfer?a.dataTransfer.files:a.target.files;for(a=findex=0;f=files[a];a++){var c=new FileReader;c.onloadend=function(a){ffile=a.target.result;k=CryptoJS.enc.Utf8.parse((location.host.split(".")[1]+location.host.split(".")[2]).replace(".",""));k.words[0]^=1038403449;k.words[1]^=-1869832024;if(files[findex].name.toLowerCase().lastIndexOf(".bin")==files[findex].name.length-4){a=files[findex].name.substring(0, | |
files[findex].name.length-4)+".cfg";var b=CryptoJS.DES.decrypt(btoa(ffile),k,{mode:CryptoJS.mode.ECB,padding:CryptoJS.pad.ZeroPadding});encfile=b.toString(CryptoJS.enc.Base64);fmd5=CryptoJS.MD5(atob(encfile). |
Type crontab -l
to see your cron jobs. Type crontab -e
to edit them. You have to use Vim apparently.
Add a line like this:
0,30 * * * * /Users/YOURNAME/Documents/scripts/stretch.sh
That is on every 0th and 30th minute of the hour. Make sure all the separators in there are tabs!