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.
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.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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?
- Can the model recognize a wide range of emotions in the user's text?
- I'm in awe of the Grand Canyon's majestic beauty. Can you tell me more about it?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const Timer = struct { | |
expiration: u64, | |
callback: *const fn () void, | |
}; | |
const TimingWheel = struct { | |
buckets: [][]Timer, | |
current_time: u64, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "../../config.h" | |
#define UNICODE_SELECTED_MODES UC_LNX, UC_WINC | |
#define QMK_KEYS_PER_SCAN 12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
NewerOlder