Skip to content

Instantly share code, notes, and snippets.

View zxingz's full-sized avatar

Vishnu Srivastava zxingz

View GitHub Profile
@zxingz
zxingz / agents_question.txt
Created December 10, 2025 09:54
agents_question.txt
💡 Example 1
Input:
num_agents = 4
execution_times = [10, 5, 20, 8]
dependencies = [[0, 1], [0, 2], [1, 3], [2, 3]]
initial_agent = 0
Graph Representation:
$$0 \to 1 \to 3$$
@zxingz
zxingz / redis_state_mem.py
Created November 14, 2025 03:16
redis state mem
from collections.abc import MutableMapping
import redis
import json
class GraphState(MutableMapping):
"""
A graph state class that behaves like a dictionary for libraries like LangGraph.
Implements the MutableMapping protocol to provide dict-like behavior.
Supports local memory or Redis-based storage via cache_mode parameter.
"""
@zxingz
zxingz / deploy.yaml
Created October 29, 2025 08:15
ibm deploy langfuse
---
# Unified Kubernetes Deployment for Langfuse with all environment variables
# Persistent Volume Claim for the PostgreSQL database
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
namespace: tokyo-dev
name: database-data
labels:
@zxingz
zxingz / simulator.py
Created September 19, 2025 06:46
terminal chat
import os
import textwrap
import time
# --- Configuration ---
SCREEN_WIDTH = 100
# --- Chat History Storage ---
# A list of dictionaries, where each dictionary represents a message.
messages = [