Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
""" | |
Usage: | |
morphagene_onset.py -w <inputwavfile> -o <outputfile> | |
Use the Superflux onset detection algorithm with backtracking to generate | |
splice locations. | |
Use these splice locations with a converted WAV (to 32-bit float / 48000Hz) | |
to make Morphagene reels. |
A quick guide to write a very very simple "ECHO" style module to redis and load it. It's not really useful of course, but the idea is to illustrate how little boilerplate it takes.
Step 1: open your favorite editor and write/paste the following code in a file called module.c
#include "redismodule.h"
/* ECHO <string> - Echo back a string sent from the client */
int EchoCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
The CLR ThreadPool has two types of threads - "Worker" and "I/O Completion Port" (aka IOCP) threads.
- Worker threads are used when for things like processing
Task.Run(…)
orThreadPool.QueueUserWorkItem(…)
methods. These threads are also used by various components in the CLR when work needs to happen on a background thread. - IOCP threads are used when asynchronous IO happens (e.g. reading from the network).
The thread pool provides new worker threads or I/O completion threads on demand (without any throttling) until it reaches the "Minimum" setting for each type of thread. By default, the minimum number of threads is set to the number of processors on a system.
Once the number of existing (busy) threads hits the "minimum" number of threads, the ThreadPool will throttle the rate at which is injects new threads to one thread per 500 milliseconds. This means that if your system gets a burst of work needing an IOCP thread, it will proces
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using System.Xml; | |
using System.Xml.Linq; | |
namespace GithubWikiDoc | |
{ |
#! /usr/bin/env ocamlscript | |
Ocaml.ocamlflags := ["-thread"]; | |
Ocaml.packs := [ "core" ] | |
-- | |
open Core.Std | |
type term = | |
| Ident of string | |
| Lambda of string * term | |
| Apply of term * term |
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 |