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 / 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
@BexTuychiev
BexTuychiev / lstm_builtin.py
Created February 4, 2026 10:34
LSTM Sentiment Classifier for IMDB Reviews - PyTorch Implementation
"""
PyTorch Built-in LSTM for IMDB Sentiment Classification
Demonstrates nn.LSTM with a real NLP task.
"""
import torch
import torch.nn as nn
from torch.utils.data import DataLoader, TensorDataset
from datasets import load_dataset
from collections import Counter
import asyncio
from pyppeteer import launch
import json
async def scrape_quotes():
browser = await launch(headless=True)
page = await browser.newPage()
await page.setViewport({"width": 1920, "height": 1080})
from playwright.sync_api import sync_playwright
import json
with sync_playwright() as p:
browser = p.chromium.launch(headless=True)
page = browser.new_page(viewport={"width": 1920, "height": 1080})
base_url = "https://quotes.toscrape.com/js/page/{}/"
all_quotes = []
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from webdriver_manager.chrome import ChromeDriverManager
import json
# Configure headless Chrome