Skip to content

Instantly share code, notes, and snippets.

@coderplay
coderplay / 0-state-types.md
Last active July 10, 2025 22:02
Flink State Research

Flink State Types

Flink supports 8 main state types organized in a hierarchy. Here's the complete list with detailed explanations:

1. Keyed State Types (for KeyedStream)

Core State Types:

1. ValueState<T>

  • Stores a single value per key

WrenAI Architecture Documentation

Overview

WrenAI is a comprehensive AI-powered data modeling and query generation platform that transforms natural language questions into SQL queries. The system consists of multiple interconnected services that work together to provide intelligent data analysis capabilities.

High-Level Architecture

graph TB

How AutoGPT Implements Observe → Reasoning → Action → Observe Feedback Loops

AutoGPT implements a sophisticated feedback loop system through its interaction loop architecture that closely follows the observe-reasoning-action pattern. Here's a detailed breakdown:

1. OBSERVE Phase - Information Gathering

Previous Action Results

AutoGPT observes the results of previous actions through the ActionResult system:

@coderplay
coderplay / config.json
Created April 18, 2020 20:16
OCI bundle for docker run --runtime kata-runtime --device=/var/run/kata-containers/vhost-user/block/devices/vhostblk0:/dev/vda -it ubuntu /bin/bash
{
"ociVersion": "1.0.1-dev",
"process": {
"terminal": true,
"user": {
"uid": 0,
"gid": 0
},
"args": [
"/bin/bash"
@coderplay
coderplay / FaultInjectionRunner.java
Created October 26, 2019 07:32
Fault Injection based on RandomizedRunner
import com.carrotsearch.randomizedtesting.RandomizedRunner;
import org.jboss.byteman.contrib.bmunit.BMRule;
import org.jboss.byteman.contrib.bmunit.BMRules;
import org.jboss.byteman.contrib.bmunit.BMRunnerUtil;
import org.jboss.byteman.contrib.bmunit.BMScript;
import org.jboss.byteman.contrib.bmunit.BMScripts;
import org.jboss.byteman.contrib.bmunit.BMUnit;
import org.jboss.byteman.contrib.bmunit.BMUnitConfig;
import org.jboss.byteman.contrib.bmunit.BMUnitConfigState;
@coderplay
coderplay / bpf
Created June 2, 2018 17:14
bpf playground
$ sudo /usr/local/sbin/ply -D -c 'kprobe:vfs_read{ printf("%v: %v\n", comm(), arg(0)); }'
symtable:
ast:
`-> <script> (type:script/none size:0x0 loc:nowhere)
`-> kprobe:vfs_read (type:probe/none size:0x0 loc:nowhere)
`-> <auto>.printf (type:call/none size:0x0 loc:reg/0)
|-> "%v: %v\n"(type:str/str size:0x8 loc:virtual)
`-> <rec> (type:rec/none size:0x20 loc:stack/-0x20)
|-> 0 (type:int/int size:0x8 loc:stack/-0x20)