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 / job_scraper.py
Last active June 13, 2026 07:21
Scrape any company job board into structured JSON with one Firecrawl schema, then rank roles against a resume (firecrawl-py + OpenAI)
"""Scrape a job board into structured data, then rank roles against a resume.
Pipeline: scrape the listing, batch-extract each ATS detail page, match to a
resume with an LLM. One schema works across Ashby, Greenhouse, and any other ATS,
so there are no per-site selectors to maintain.
"""
import json
import os
import sys
@BexTuychiev
BexTuychiev / ml-exam-cheatsheet.md
Last active June 11, 2026 03:31
ML Exam Cheat Sheet — Worked Examples

ML Exam Cheat Sheet — Worked Examples

Formulas

Topic Formula Variables
Z-score z = (x - μ) / σ x=value, μ=mean, σ=std dev
Min-max x' = (x - xmin) / (xmax - xmin) xmin/xmax=dataset min/max
Accuracy (TP + TN) / N N=total samples
Precision TP / (TP + FP) "of all predicted positive, how many were right"
@BexTuychiev
BexTuychiev / dashboard.py
Created May 8, 2026 12:45
Firecrawl /interact: multi-step navigation against a Hugging Face model page
"""A multi-step navigation flow against a Hugging Face model page.
The shape: one scrape opens the live session on the model card. Two further
interact calls reuse that session to navigate to the Files tab and the Community
tab and pull data each tab renders. The browser is the same browser across all
three calls — page state and history carry over.
Target: Qwen/Qwen2.5-7B-Instruct (popular, public, no gate).
"""
@BexTuychiev
BexTuychiev / promptfooconfig.yaml
Created March 25, 2026 12:14
Promptfoo tutorial: email drafter evaluation config
description: "Email drafter evaluation"
prompts:
- |
Draft an email based on these bullet points.
Match the specified tone throughout the email.
Bullet points:
{{bullet_points}}
@BexTuychiev
BexTuychiev / transfer-context.md
Created March 9, 2026 08:29
Claude Code /transfer-context skill — structured context handoff between sessions

Transfer Context

Prepare context for a new chat session when this one is degraded or hitting limits.

File Output

Write the context transfer to a markdown file at .claude/context-transfers/<random-8-chars>.md (relative to the project root). Create the directory if it doesn't exist. Use a random alphanumeric string for the filename.

After writing the file, output ONLY this to the user (nothing else):

@BexTuychiev
BexTuychiev / auth.py
Created March 7, 2026 10:36
Flask API auth.py for Claude Code Plan Mode tutorial - refactoring example
"""
Flask API Authentication Module
================================
Monolithic auth module handling token validation, role-based access control,
and session management. This file is the starting point for a Plan Mode
refactoring tutorial: splitting it into token_validation.py, role_access.py,
and session_management.py.
Repository: https://www.datacamp.com/tutorial/claude-code-plan-mode
"""
@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