Skip to content

Instantly share code, notes, and snippets.

View BexTuychiev's full-sized avatar
🏠
Working from home

bexgboost BexTuychiev

🏠
Working from home
View GitHub Profile
@BexTuychiev
BexTuychiev / generate_invoice.py
Last active March 3, 2026 05:42
Invoice generator script for OpenClaw skill tutorial
"""Generate a PDF invoice from client details and line items."""
import argparse, json, os
from datetime import date
from reportlab.lib.pagesizes import letter
from reportlab.lib.colors import HexColor
from reportlab.lib.units import inch
from reportlab.platypus import (
SimpleDocTemplate, Table, TableStyle,
Spacer, Paragraph, HRFlowable,
@BexTuychiev
BexTuychiev / detective-system-prompt.md
Created February 27, 2026 08:43
Full system prompt for the Mastra + Mem0 noir detective agent tutorial

Noir Detective RPG - System Prompt

Full system prompt for the Mastra + Mem0 detective agent. Used in the tutorial: How to Build an AI Agent with Mastra and Mem0.

You are the game master for a noir detective text RPG set in 1947 Los Angeles. You narrate scenes, voice NPCs, and track the investigation. Keep the noir tone but write at an accessible reading level. Short sentences. Plain words. A bit of atmosphere goes a long way but don't overdo it. Keep responses to 1-3 short paragraphs. Never more than 150 words per response.

== THE CASE ==
Vincent Moreau, owner of The Blue Note jazz club on Central Avenue, was found dead in his locked office on a Tuesday morning. Cause of death: poisoned whiskey (cyanide in his personal bottle of rye). The office door was locked from the inside. A window opens onto the fire escape. The player is a private detective hired by Claire Moreau, Vincent's sister, who doesn't trust the police to investigate properly.
@BexTuychiev
BexTuychiev / audit.py
Created February 26, 2026 12:41
Dependency auditor agent built with the Claude Agent SDK and Firecrawl
import asyncio
import json
import os
import sys
from pathlib import Path
from dotenv import load_dotenv
load_dotenv()
@BexTuychiev
BexTuychiev / put-endpoint-bug.md
Created February 19, 2026 23:31
PUT /memories/{id} bug report for mem0 self-hosted server

PUT /memories/{id} Bug Report

Setup

The bug shows up on the self-hosted Docker deployment described in the article. The stack uses three containers:

  • mem0/mem0-api-server:latest (mem0ai v0.1.117 at time of testing)
  • ankane/pgvector:v0.5.1
  • neo4j:5.26.4
@BexTuychiev
BexTuychiev / section6_output.txt
Created February 19, 2026 21:12
Gemini 3 Flash agentic vision - Section 6: Multi-Step Extraction and Plotting (full output)
============================================================
AGENTIC VISION - MULTI-STEP EXTRACTION
============================================================
[THINK] **My Approach to Data Extraction and Analysis from the Image**
Okay, so I'm looking at this image, and the goal is to pull some data from a table, specifically the first 10 rows. There are several tables in this image, so let's start by clarifying what we're dealing with. The image contains tax tables, and it looks like there are a few options. I see a "Single or Married Filing Separately" table, and a "Head of Household" table. I'll focus on one, for simplicity and clarity. The one at the top
[CODE]
import PIL.Image
import PIL.ImageDraw
@BexTuychiev
BexTuychiev / section5_output.txt
Created February 19, 2026 20:58
Gemini 3 Flash agentic vision - Section 5: Counting and Annotation (full output)
============================================================
AGENTIC VISION - IMPLICIT PROMPT
============================================================
[THINK] **Coin Counting Analysis**
Alright, let's break this down systematically. The objective is clear: count the coins in this image. My initial thought is to go visually, then refine with automated methods. First, I’m identifying all the potential coin candidates – round, metallic objects on the desk and folder.
I see several areas to examine: the folder (top left), the main group on the desk (center and slightly right), and some scattered coins towards the bottom. I initially did a rough count by
[CODE]
import PIL.Image
@BexTuychiev
BexTuychiev / section4_output.txt
Created February 19, 2026 20:06
Gemini 3 Flash agentic vision output: standard vs agentic on grocery shelf image
============================================================
STANDARD VISION (no code execution)
============================================================
[ANSWER] Based on the image provided, here is the information requested:
### The 'Liebe Kunden' Sign
The sign translates from German to English as follows:
> "Dear Customers,
> unfortunately, we must inform you that due to increased demand, we cannot currently offer all products. We are of course striving to be able to offer you all items again as soon as possible.
> We hope for your understanding!"
@BexTuychiev
BexTuychiev / notebook_to_docx.py
Created February 18, 2026 12:33
Notebook to DOCX converter - converts Jupyter notebooks to Word documents with proper formatting
#!/usr/bin/env python3
"""
Notebook to DOCX Converter
Converts Jupyter notebooks to Word documents with proper formatting:
- Markdown formatting preserved as Word styles
- Backticks preserved around inline code
- Code blocks with triple backticks visible, Courier New font
- Non-code text in Poppins font
- Images with alt text built-in
@BexTuychiev
BexTuychiev / agent.py
Created February 16, 2026 12:24
Complete voice assistant with Gemini Live API, Firecrawl web search, and Gmail - companion code for the tutorial
"""
Voice assistant with Gemini Live API, Firecrawl web search, and Gmail integration
"""
import asyncio
import os
import smtplib
from email.mime.text import MIMEText
from livekit.agents import (
@BexTuychiev
BexTuychiev / docker-compose.yaml
Created February 14, 2026 19:47
Mem0 self-hosted Docker Compose stack
name: mem0-selfhost
services:
mem0:
build: .
image: mem0-selfhost:latest
ports:
- "8888:8000"
env_file:
- .env