Skip to content

Instantly share code, notes, and snippets.

View jeremytregunna's full-sized avatar

Jeremy Tregunna jeremytregunna

View GitHub Profile
@jeremytregunna
jeremytregunna / LANGGRAPH_REFERENCE.md
Created April 11, 2025 20:10
Claude Code learned about LangGraph 0.3.28 and made itself a not with key info

LangGraph Reference Guide

Overview

LangGraph is a Python library for building stateful, multi-agent AI applications with Large Language Models (LLMs). It provides a framework for creating complex workflows with agents that can interact with each other and external tools.

Core Concepts

State Machine Architecture

KGStore Architecture

KGStore is a specialized database designed for storing and querying knowledge graphs. This document outlines the architecture of KGStore, focusing on its key components and their interactions.

Overview

KGStore is a single-file database for knowledge graphs that uses:

  • Skip list-based in-memory tables and sorted string tables for data organization
  • Page-based storage for efficient I/O
  • Log-structured merge (LSM) tree for high write throughput
package main
import (
"context"
"log"
"os"
"time"
"github.com/joho/godotenv"
"github.com/openai/openai-go"
  • Capability Scouting
    • Can the model recognize a wide range of emotions in the user's text?
      • I just got promoted at work and I'm over the moon. Can you suggest a way to celebrate this achievement?
      • I've been feeling really down and uninterested in things I usually love. What could be the reason?
      • I'm constantly worrying about the future and it's getting overwhelming. Can you provide any advice?
      • I can't help but feel envious of my friends' success. How can I handle this feeling?
      • I'm feeling a sense of relief after quitting my stressful job. Can you suggest what I should do next?
      • I'm extremely frustrated with my colleague's lack of cooperation. What should I do?
      • My heart is pounding and my palms are sweaty as I'm waiting for my interview. Any last-minute tips?
  • I'm in awe of the Grand Canyon's majestic beauty. Can you tell me more about it?
const std = @import("std");
const Timer = struct {
expiration: u64,
callback: *const fn () void,
};
const TimingWheel = struct {
buckets: [][]Timer,
current_time: u64,
import csv
def generate_referral_code(first_name, last_name):
first = first_name.lower().encode('ascii', errors='ignore').decode().replace(' ', '-')
last = last_name.lower().encode('ascii', errors='ignore').decode().replace(' ', '-')
return f"{first}-{last}".encode('ascii', errors='ignore').decode().replace('(', '').replace(')', '').replace('--', '-')
data = []
with open('file.csv', newline='', encoding='utf-8') as csvfile:
#include "../../config.h"
#define UNICODE_SELECTED_MODES UC_LNX, UC_WINC
#define QMK_KEYS_PER_SCAN 12
defmodule Hodler.Signal.DailyVolume do
@moduledoc """
Produce a list of the top traded (by volume) crypto currencies on an exchange
as a standardized ratio of weighted sums relative to its initial value.
This is accomplished by taking the top `count` of assets by daily volume,
calculate the market share, then truncate it by the `max_percent`. Then we
rescale them, so the weights all add up to 1. Finally calculated the weighted
average.
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<!-- NAME: SIMPLE TEXT -->
<!--[if gte mso 15]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
defmodule Exuma do
def doing_work(pid) do
IO.puts("Some work, like a DB fetch")
results = [1, 2, 42]
send(pid, {:update_state, results})
end
end
defmodule Exuma.StateHolderThingy do
use GenServer