Link List :: 2025-07-12

https://samwho.dev/reservoir-sampling/

- Reservoir sampling is a technique for selecting a fair random sample when you don't know the size of the set you're sampling from.
- It's used when you can only hold one item at a time and want every item to have an equal chance of being selected.
- The problem is that when you show n items, 1/n is the chance of each new item being chosen and then it also becomes 1/(n-1) for each previous item that gets replaced, but we only care about the probability of a new card being chosen.
- When k cards are chosen from n, there's a formula where 1/n is the chance of each new card being selected and k/(n-1) is the chance of any held card getting replaced, both probabilities staying equal.
- Reservoir sampling works by generating an array of size k for holding cards. For each new item, it generates a random number between 0 and n. If that's less than k, replace the card at that index with the new one; otherwise discard the new one.
- The reservoir sampling algorithm can be used in various scenarios like log collection where you want to receive at most k logs per second but never more.
- A weighted variant of reservoir sampling exists for cases where some items are more valuable than others.

https://github.com/arjunprabhulal?tab=repositories

- AI Wanderize: intelligent travel companion that transforms trip planning from overwhelming to effortless

https://simonwillison.net/2025/May/15/building-on-llms/#atom-everything

* 15th May 2025: Presented a three hour workshop at PyCon US titled "Building software on top of Large Language Models" with interactive exercises and a comprehensive handout.
* The workshop covered topics such as setup, prompting with LLM, building a text to SQL tool, structured data extraction, semantic search, and tool usage.
* A detailed handout is available for participants to follow along, including:
    * Setup—getting LLM and related tools installed and configured
    * Prompting with LLM—basic prompting in the terminal and accessing logs
    * Prompting from Python—using LLM's Python API
    * Building a text to SQL tool—the first building exercise
    * Structured data extraction—possibly the most economically valuable application of LLMs today
    * Semantic search and RAG—working with embeddings and building a semantic search engine
    * Tool usage—the most important technique for building interesting applications on top of LLMs

https://github.com/rukaya-dev/easely-pyqt?tab=readme-ov-file

Easely empowers clinics to boost operational efficiency and patient care. With PyQt6 for cross-platform desktop functionality and Supabase for a secure Postgres-based backend, it offers an intuitive interface for managing critical workflows. Compatible with Linux, macOS, and Windows, Easely ensures accessibility across devices.

https://github.com/parsaghaffari/browserbee

- BrowserBee is a privacy-first open source Chrome extension that lets you control your browser using natural language.
- It combines the power of an LLM for instruction parsing & planning, and Playwright for robust browser automation to accomplish tasks.

- BrowserBee is built using Cline, playwright-crx, playwright-mcp, daisyUI, and Running Playwright in the browser.

https://github.com/icholy/sloppy

* A sloppy CLI agent which supports MCP servers,
* Supports delegation of subtasks through child agents for better context management,
* Main agent executes its assigned portion of a task and returns summary results,
* Delegates subtasks using `run_agent` tool,
* Includes 5 built-in tools:
    * `run_command` executes shell commands,
    * `run_agent` delegates subtasks to child agents,
    * `apply_diff` applies search/replace changes to text files,
    * `read_file` reads content from a file,
    * `write_file` creates or replaces a file with specified content,
* Additional MCP servers can be configured using a `sloppy.json` file in the same format as Cursor's MCP configs,
* Configuration options include --builtin flag and --config flag for loading configuration files.

https://libertystreeteconomics.newyorkfed.org/2025/05/why-does-the-u-s-always-run-a-trade-deficit/

* The United States' trade deficit is primarily driven by a persistent shortfall in domestic saving that requires foreign funding to finance domestic investment spending.
* In a closed economy, spending equals income, and therefore investment spending equals domestic saving.
* When an economy opens up to external borrowing or lending, domestic saving and investment spending can diverge.
* The saving gap framework shows that the difference between domestic saving and investment spending is equivalent to the trade deficit in terms of its overall magnitude.
* The trade deficit reflects a macroeconomic phenomenon, rather than just differences in exports and imports.
* Imports and exports are equal when revenue from exports matches spending on imports; otherwise, foreign funds buy domestic assets instead of U.S. exports.
* The trade deficit is not tied to specific items, but rather a result of the saving gap between domestic and investment spending.
* Reducing the trade deficit requires both more exports relative to imports and a narrowing of the gap between saving and investment spending.
* Focusing solely on imports and exports can be misleading, as policy changes may affect the size and composition of cross-border trade without necessarily reducing the overall deficit.
* The goal of achieving a smaller trade deficit may require painful recalibration of domestic savings and investment.
* Research has shown that episodes of substantial reductions in trade deficits are often facilitated by lower investment spending followed by higher saving.

https://github.com/theopenco/llmgateway

- LLM Gateway is an open-source API gateway for Large Language Models (LLMs).
- Acts as a middleware between your applications and various LLM providers.
- Allows you to route requests to multiple LLM providers, manage API keys, track token usage, analyze performance metrics, and compare different models' performance and cost-effectiveness.
- Unified API Interface compatible with OpenAI API format for seamless migration.
- Usage Analytics tracks requests, tokens used, response times, and costs.
- Multi-provider Support connects to various LLM providers through a single gateway.
- Performance Monitoring compares different models' performance and cost-effectiveness.
- Can be used in two ways: Hosted Version or Self-Hosted.
- Uses the following commands:
    - `pnpm install` to install dependencies.
    - `pnpm dev` to start development servers.
    - `pnpm build` to build for production.
- Project is licensed under the MIT License, see LICENSE file for details.

https://www.crackingmarkets.com/comparing-affordable-intraday-data-sources-tradestation-vs-polygon-vs-alpaca/

+ We compared the quality and pricing of historical intraday data from TradeStation, Polygon.io, and Alpaca for US stocks/ETFs.
+ All three providers offer 1-minute bar data, but with different pricing models: free or low-cost options (Alpaca, TradeStation) vs. a subscription-based service (Polygon.io).
+ Key findings:
  - Near-perfect price correlation among all three providers for 1-minute data (1.0).
  - Significant volume discrepancies between TradeStation and Polygon.io/Alpaca.
  - Small but notable differences in specific price points.
* # Conclusion
+ Alpaca emerges as the standout winner for algorithmic traders seeking reliable and affordable historical intraday data due to its exceptional value proposition, including free access to 10 years of high-quality data.

https://www.reddit.com/r/Python/comments/1kt9s05/pykomodo_built_a_web_ui_for_code_chunking_no_more/

* A project called Pykomodo built a web UI for code chunking, addressing common issues with CLI-only tools such as remembering command syntax and typing long file paths.
* Pykomodo provides a visual file browser, selective file processing, multiple input methods, and chunking strategies.

https://github.com/lambda-science/modern-python-boilerplate

- Uses UV and Make for tooling, structure, and good practices
- Global Makefile available with `make help` to see all commands
- Continuous Integration
    - `make allci` for Ruff linting
    - `make check` for Ruff formatting
    - `make type` for Ty type checking
    - `make test` for Pytest testing
    - `make cov` for Pytest-cov testing coverage

https://github.com/habedi/cogitator

* Cogitator is a Python toolkit for experimenting and working with chain-of-thought (CoT) prompting methods in large language models (LLMs).
* CoT prompting improves LLM performance on complex tasks by guiding the models to generate intermediate reasoning steps before arriving at the final answer.
* It can also improve the interpretability of LLMs by providing insight into the model's reasoning process.
* The toolkit aims to make it easier to use popular CoT strategies and frameworks for research or integrating them into AI applications.

* Provides unified sync/async API for CoT strategies
* Supports using OpenAI and Ollama as LLM providers
* Supports structured model output with Pydantic validation
* Includes a customizable benchmarking framework (see benches)
* Includes implementations of popular CoT strategies and frameworks like

https://github.com/ajac-zero/react-fastapi-template

* A modern full-stack template featuring React for the frontend and FastAPI for the backend, bundled together in a single container using NGINX Unit.
* React Frontend:
    * TypeScript support
    * TailwindCSS + shadcn/ui components
    * Fast refresh during development
    * Optimized production build
* FastAPI Backend:
    * Python type hints
    * OpenAPI/Swagger documentation
    * Async support
    * Built-in state management example
* Production Ready:
    * Single container deployment with NGINX Unit
    * Multi-stage Docker builds
    * Efficient caching for dependencies
    * Static file serving
* Setup for local development with hot-reload capabilities for both frontend and backend.

https://mkosir.github.io/typescript-style-guide/

This is a style guide for React development, covering various aspects of coding conventions, testing, and best practices. Here are the main sections:

**Components**

* Use functions as the default component type (`React.FC`).
* Prefer container components with postfix "Container" or "Page".
* Feature components should be representedational, nested inside container components.
* Design system components (e.g., Button) should be reusable and global.

**Props**

* Avoid using props to state. If necessary, prefix the prop with `initial`.
* Use props argument with type instead of `React.FC` type.
* Pass only necessary props to child components.
* Utilize storing state in the URL for filtering, sorting, etc.

**Testing**

* Implement tests that are short, explicit, and pleasant to work with.
* Strive for AAA pattern (Arrange-Act-Assert) in unit tests.
* Keep functions pure and impure small and focused.
* Write tests as isolated as possible and resilient to changes.
* Black box testing is encouraged, testing implementation details is not.

**Best Practices**

* Avoid using React.FC type directly; instead, use the function type with props argument.
* Consider refactoring render method, local states in parent components, and using composition when prop drilling becomes an issue.
* Use server-state library for data fetching (e.g., react-query) and client-state library for global state is discouraged.

**Code Style**

* Follow the naming convention "it('should ... when ...')" for test descriptions.
* Avoid snapshot tests unless there's a strong rationale behind them.
* Keep the codebase stable by avoiding unnecessary changes to tests.

Overall, this style guide emphasizes best practices, conventions, and testing principles for React development.

https://github.com/doddpronter/cc_optimizer

* It analyzes covered call options across all tickers listed in stocks.txt.
* It calculates key features to help identify the most attractive contracts based on reward vs. risk.
* Features include:
  * Stock Return Cap
  * Premium Return
  * Annualized Premium Return
  * Cost for 100 Shares
  * Breakeven Point
  * Downside Protection
  * Dollar Return on Premium
* The tool can sort and filter results in real time to identify the highest yielding covered call setups based on return, downside protection, or breakeven price.

https://github.com/arosov/lazyaider

- Seamless Tmux Integration: LazyAider automatically manages tmux sessions, providing a dedicated and organized workspace with a main shell pane and a sidebar for the LazyAider application.

https://github.com/KrisRehfuss/GPTNav?tab=readme-ov-file

- A browser extension that adds a floating overlay to ChatGPT conversations, allowing users to quickly navigate through their questions and responses.

https://github.com/carlrobertoh/ProxyAI

*Connect to any model in any environment and customize your coding experience.*
*Access top-tier language models from OpenAI, Anthropic, Azure, Mistral, and others.*
*Opt for a self-hosted model for a full offline experience.*

*Features:*
*- Auto Apply*: Stream AI-suggested code changes into your editor.
*- Use images*: Chat with images in your chat session.
*- Reference files and folders*: Access project files and folders for context-aware coding assistance.
*- Reference web docs*: Quickly reference web docs in your chat session.
*- Reference git history*: Quickly reference commit logs and changes in your chat session.
*- Search the web*: Connect to a favourite LLM and search for relevant information.
*- Customize your assistant*: Choose between multiple personas for specific needs.
*- Next edits*: Get multi-line edits based on recent activity as you type.
*- Autocomplete code*: Receive single-line or whole-function autocomplete suggestions as you type.
*- Edit code in natural language*: Highlight code, describe changes, and watch ProxyAI work its magic.
*- Get name suggestions*: Get context-aware naming suggestions for methods, variables, and more.
*- Generate commit messages*: Generate concise and descriptive commit messages based on changes made.

https://addyo.substack.com/p/the-prompt-engineering-playbook-for

This article provides an in-depth guide on prompt engineering, a crucial skill for developers working with AI code assistants. The author covers various aspects of effective prompting, including:

1. Crafting clear and context-rich prompts: Providing the necessary information about the code, problem, or feature being asked to solve.
2. Iterating with the AI: Refining solutions through multiple prompts, refining assumptions, and breaking down complex requests into smaller, manageable pieces.
3. Role-playing and personas: Treating the AI as a code reviewer, mentor, or expert in a specific stack to elicit more rigorous and explanation-rich outputs.
4. Refactoring and optimization: Defining what "good" looks like (e.g., faster, cleaner, more idiomatic) and leveraging the AI's knowledge of best practices to improve code quality.
5. Pitfalls to avoid: Keeping prompts neither too vague nor too overloaded, specifying intent and constraints, and being prepared to adjust when the AI's output is off-target.

The author also highlights the importance of patience, iteration, and iterative dialogue in prompting, emphasizing that it's essential to approach prompting with the same clarity, patience, and thoroughness as communicating with another engineer.

Key takeaways from this article include:

* Prompt engineering empowers developers to get more out of AI assistants.
* It's a skill that requires practice, patience, and iteration.
* Effective prompting involves providing context-rich information, refining assumptions, and breaking down complex requests into smaller pieces.
* The author provides practical tips and strategies for refining prompts, including using role-playing and personas, defining what "good" looks like, and avoiding common pitfalls.

https://github.com/dagger/container-use

* 📦 Isolated Environments: Each agent gets a fresh container in its own git branch - run multiple agents without conflicts, experiment safely, discard failures instantly
* 👀 Real-time Visibility: See complete command history and logs of what agents actually did, not just what they claim
* 🚁 Direct Intervention: Drop into any agent's terminal to see their state and take control when they get stuck
* 🎮 Environment Control: Standard git workflow - just `git checkout <branch_name>` to review any agent's work
* 🌎 Universal Compatibility: Works with any agent, model, or infrastructure - no vendor lock-in

https://github.com/nibzard/llm-loop

* An autonomous task execution plugin for the LLM CLI tool
* llm loop is a powerful plugin for the LLM CLI tool that enables autonomous, goal-oriented task execution
* Goal-Oriented Execution: Define a task and let the AI work autonomously to complete it
* Tool Integration: Seamlessly use LLM tools and functions to interact with your environment
* Iterative Problem Solving: The AI can chain multiple tool calls and adapt based on results
* Interactive Control: Configure turn limits, approve tool calls, and guide the process

https://github.com/ozanunal0/gemini-engineer

* An interactive, AI-driven terminal application that acts as a software engineering assistant.
* Uses Google's Gemini Pro model for intelligent code analysis and suggestions.
* Provides file system operations through AI function calls.
* Features an interactive terminal interface with Rich and prompt_toolkit.
* Supports seamless integration between AI reasoning and local file operations.
* Includes context management, streaming responses, safety features, and Python 3.11 or higher.

https://github.com/khaledh/pagemagic

* Page Magic is a Chrome extension that uses AI to customize the appearance of any web page.
* Just tell Page Magic what you want to change and it will do it for you.

https://github.com/g1ibby/dcd

Deploy Docker Compose apps to remote servers with just one command. Analyzes configs, syncs files, and manages services over SSH so you don't have to

https://github.com/collidingScopes/3d-model-playground

* Control 3D models using hand gestures and voice commands in real-time with an interactive web app built on threejs, mediapipe computer vision, web speech API, and rosebud AI.

https://github.com/dineshgowda24/alfred-gcp-workflow

* An Alfred workflow that lets you instantly open Google Cloud services or search GCP resources.

https://github.com/jatinkrmalik/LLMFeeder

- Browser Extension for Converting Web Content to Markdown and Copying it to Clipboard

https://github.com/coffeegrind123/gemini-code

- Directly use Claude Code with Google Gemini models via a bridge server
- Seamless model mapping and integration between Claude Code and Gemini models

https://github.com/Zentar-Ai/zentara-code/

Zentara Code is an interactive debugging tool for various programming languages, including Python, JavaScript, and TypeScript. It provides a step-by-step, guided debugging process that helps users identify and fix bugs in their code.

https://github.com/msveshnikov/autocode-ai

* AutoCode is an innovative automatic coding tool designed to bootstrap any software project incrementally, transforming README.md instructions into a fully functional software project using various APIs.
* NodeJS-based console application with automatic code generation based on README.md instructions and incremental project building.

https://github.com/sdi2200262/agentic-project-management

* Manage complex projects with a team of AI assistants using Agentic Project Management (APM) framework.
* APM tackles context window limitations by mimicking real teams, smart agent management, efficient budgeting, and user-centric control.

https://github.com/corenzan/provision

Provision is a POSIX-compliant shell script that helps with the initial configuration required for a production-grade Debian-based server to host websites and applications. It's tailor-made for my needs, but it just might suit yours.

Here's an overview of what it'll do:

Update the server's hostname.
Upgrade existing packages.
Install Docker, fail2ban, and several other software.
Harden SSH configuration and switch to an alternative port (822).
Configure the firewall to block any incoming traffic except on selected ports (822, 443, 80) on both IPv4 and IPv6.
Change the root password.
Create a dedicated user and directory for project deployment, with proper ACL and permissions so other users can manage it.
Allow passwordless sudo.
Create swap space equivalent to the available memory, up to 16GB.
Register a new system administrator user with a strong random password and SSH access.
Install opinionated administrative tools.

https://github.com/open-nudge/opentemplate

All-in-one Python template. One click. Everything included.

https://github.com/kbwo/ccmanager

- CCManager is a TUI application for managing multiple AI coding assistant sessions (Claude Code, Gemini CLI) across Git worktrees.
- Run multiple AI assistant sessions in parallel across different Git worktrees
- Support for multiple AI coding assistants (Claude Code, Gemini CLI)
- Switch between sessions seamlessly
- Visual status indicators for session states (busy, waiting, idle)
- Create, merge, and delete worktrees from within the app
- Configurable keyboard shortcuts
- Command presets with automatic fallback support
- Configurable state detection strategies for different CLI tools
- Status change hooks for automation and notifications

https://github.com/richstokes/InfiniChat

- InfiniChat is a command-line application that simulates conversations between two LLMs running locally using Ollama.

https://github.com/Muvon/octomind

* Octomind is an AI-powered development assistant that helps understand, analyze, and interact with codebases through natural language conversations.

https://github.com/vitali87/code-graph-rag

# Retrieval-Augmented Generation (RAG) System
## Overview
- Multi-Language Support: Supports Python, JavaScript, TypeScript, Rust, Go, Scala, Java, and C++ codebases
- Tree-sitter Parsing: Uses Tree-sitter for robust, language-agnostic AST parsing
- Knowledge Graph Storage: Uses Memgraph to store codebase structure as an interconnected graph
- Natural Language Querying: Ask questions about your codebase in plain English
- AI-Powered Cypher Generation: Supports both cloud models (Google Gemini) and local models (Ollama)
- Code Snippet Retrieval: Retrieves actual source code snippets for found functions/methods
- Advanced File Editing: Surgical code replacement with AST-based function targeting, visual diff previews, and exact code block modifications
- Shell Command Execution: Can execute terminal commands for tasks like running tests or using CLI tools.
- Interactive Code Optimization: AI-powered codebase optimization with language-specific best practices and interactive approval workflow
- Reference-Guided Optimization: Use your own coding standards and architectural documents to guide optimization suggestions
- Dependency Analysis: Parses pyproject.toml to understand external dependencies
- Nested Function Support: Handles complex nested functions and class hierarchies
- Language-Agnostic Design: Unified graph schema across all supported languages

## System Components
- Multi-language Parser (Tree-sitter based): Analyzes codebases and ingests data into Memgraph
- RAG System (codebase_rag/): Interactive CLI for querying the stored knowledge graph

https://github.com/Explosion-Scratch/to-userscript

* A powerful CLI for converting browser extensions into standalone userscripts.
* Converts browser extensions into portable userscripts that can be run in any userscript manager.
* Allows use or modification of extensions on browsers or platforms that might not natively support them.
* Converts from Chrome Web Store, Firefox Add-ons site, direct URLs, local directories, or archive files.
* Replaces WebExtension APIs with userscript-compatible equivalents.
* Asset inlining: Embeds CSS, images, fonts, and other resources into the userscript.
* Renders extension popup and options pages within an embedded modal.
* Emulates background script environment.
* Respects locales directories and uses specified or default locale for manifest, text, etc.

* Convert from:
    * Chrome Web Store with minification.
    * Local directory with French localization.
    * Downloaded XPI to vanilla JS.
    * Using pnpm dlx to download Material Design File Icons.

https://github.com/Traverser25/Stewie_it_v1

* Stewie_it v1 is an experimental automation project inspired by a viral Instagram trend where Stewie and Peter Griffin humorously explain coding topics over gameplay footage (recent trend)
* This project automates assembling these videos by combining user-provided scripts, AI-scraped voices, character images, and gameplay background, then sending them to user.

https://github.com/yahorbarkouski/semantic-mail

- Lightweight CLI agent to semantically search and ask your emails
- Downloads inbox, generates embeddings using local (or external) LLMs, and stores everything in a vector database on your machine

https://github.com/continuedev/rules/

* npm i -g rules-cli
* To download rules, use `rules add` followed by a repository path (e.g. `starter/nextjs-rules`)
* Rules can be published using `rules publish`, making them available for others to download
* Rules supports multiple formats: cursor, continue, windsurf, claude, copilot, codex, cline, cody, and amp

https://github.com/mebaadwaheed/winup

- A modern UI framework for building beautiful desktop applications
- Supports building fully interactive, stateful web applications using FastAPI and WebSockets

https://github.com/ggozad/haiku.rag

* Retriever-Augmented Generation (RAG) library on SQLite: haiku.rag
* Built to work on SQLite alone without external vector databases
* Uses sqlite-vec for storing embeddings and performs semantic and full-text search combined through Reciprocal Rank Fusion
* Open-source (Ollama), commercial (OpenAI, VoyageAI) embedding providers supported
* Multiple QA providers: Ollama, OpenAI, Anthropic
* Hybrid search: Vector + full-text search with Reciprocal Rank Fusion
* Built-in QA agents on documents
* File monitoring: Auto-index files when run as server
* 40+ file formats: PDF, DOCX, HTML, Markdown, audio, URLs
* MCP server: Expose as tools for AI assistants
* CLI & Python API: Use from command line or Python

https://github.com/psyb0t/docker-claude-code

-claude but dockerized, goth-approved, and dangerously executable

https://github.com/stravu/crystal

- Create sessions from prompts, each in an isolated git worktree
- Iterate with Claude Code inside your sessions. Each iteration will make a commit so you can always go back

https://github.com/nocode-js/sequential-workflow-designer

- Sequential workflow designer for web applications, written in pure TypeScript and using SVG for rendering.

https://github.com/cairn-dev/cairn

* Github-integrated background agents for automating end-to-end software engineering
* Fully open source, built in the style of a product management tool

https://github.com/The-Pocket/PocketFlow-Tutorial-Website-Chatbot

* Want an AI chatbot for your website? The chatbot itself is easy—the real headache is keeping its knowledge up-to-date every time you change your content. This tutorial shows you how to build a truly "set and forget" AI chatbot that learns directly from your live website, so its knowledge stays current automatically. No manual updates. Ever.

https://github.com/neg4n/typescript-library-template

Production ready minimal template for developing and releasing TypeScript libraries, including automated GitHub repository setup.

https://github.com/stan-smith/FossFLOW

* FossFLOW is a powerful, open-source Progressive Web App (PWA) for creating beautiful isometric diagrams built with React and the Isoflow library, running entirely in your browser with offline support.

https://github.com/kingdomseed/structured-workflow-mcp

* # MCP Server
    * Disciplined programming practices enforced by requiring AI assistants to audit their work and produce verified outputs at each phase of development.

* # Workflow Phases
    * Enforced workflow phases:
        + Setup
        + Audit
        + Analysis
        + Planning
        + Implementation
        + Testing
        + Iterate

https://github.com/NativeMindBrowser/NativeMindExtension

* Contextual Awareness Across Tabs: Seamlessly continue AI conversations with memory that spans across tabs
* AI-Powered Local Search: Ask questions and search the web directly from your browser—no third-party APIs required
* Smart Page Understanding: Instantly summarize and interpret any webpage content
* Bilingual Translation: Translate full pages or selected text with side-by-side view (supports multiple languages)
* Quick Prompts: Save and trigger your frequently used prompts with a single click
* Writing Enhancement: Rewrite, proofread, and creatively rephrase content with intelligent suggestions
* Custom Prompts for Any Task: Adapt system prompts to match your workflow and local model capabilities
* Chat with PDFs (coming soon): Ask questions directly about local PDF files
* Chat with Images (coming soon): Understand and interact with visual content, including screenshots and uploaded images
* Offline-First: Use all features without an internet connection after downloading a model—your data stays on your device
* Model Switching: Easily switch between models based on performance, speed, or privacy needs