Skip to content

Instantly share code, notes, and snippets.

View eevmanu's full-sized avatar
🎯
focused

Manuel Solorzano eevmanu

🎯
focused
View GitHub Profile
@eevmanu
eevmanu / retry-strategies.md
Last active June 25, 2025 15:47
retry strategies - distributed systems - from simplest one to most sophisticated one
  • no retries (the baseline)
    • The caller makes one attempt and propagates any error.
  • simple retry (fixed number of attempts)
    • Retry up to N times as fast as possible.
    • The most basic form of control flow is added: a loop. It introduces the concept of "more than one try" without any timing logic.
  • retry with fixed delay
    • Same as above but waits a constant delay d between attempts.
    • Adds a single, simple parameter—a static wait time. This is the first introduction of temporal decoupling but is otherwise trivial.
  • linear / incremental backoff
  • Delay grows by a fixed increment Δ: t = base + i·Δ.
@eevmanu
eevmanu / 1-code.js
Created June 22, 2025 20:42
simple javascript code to retrieve whole tweet replies from a tweet (working on 20250622)
/**
* This script automates the process of scrolling down a page,
* scraping tweet text, and logging the unique results.
* It's designed to be pasted directly into the browser console.
*/
(async () => {
// --- 1. SETUP ---
// A Set is used to automatically store only unique tweet texts.
const scrapedText = new Set();
const maxScrolls = 100; // Safety limit to prevent an infinite loop.
@eevmanu
eevmanu / 1-prompt.md
Created June 19, 2025 23:09
explanation on how the iterative refinement process works on https://arxiv.org/abs/2505.23060 using gemini-2.5-pro on 20250619

As an expert in self-correcting code generation using large language models, your task is to analyze the following codebase. Your goal is to help me understand its iterative refinement process.

Please follow these steps:

  1. IDENTIFY THE REFINEMENT MECHANISM Explore the codebase and pinpoint the exact functions, classes, or code blocks responsible for self-correction, iterative refinement, or any refinement loop. I need to see where this is explicitly implemented. Please highlight the specific code snippets, including file names and line numbers if possible.

  2. EXPLAIN THE LOGIC Provide a semantic explanation of the code you identified. Infer what the developers are trying to do. Explain step-by-step how the code iterates to refine its self-correcting code generation results or enhance the LLM's output. How does the loop work? What triggers a new iteration? What is the goal of each cycle?

@eevmanu
eevmanu / 1-prompt.md
Created June 19, 2025 22:56
explanation on how the iterative refinement process works on https://arxiv.org/abs/2505.18105 using gemini-2.5-pro on 20250619

As an expert in web-augmented large language models, your task is to analyze the following codebase. Your goal is to help me understand its iterative search and refinement process.

Please follow these steps:

  1. IDENTIFY THE REFINEMENT MECHANISM Explore the codebase and pinpoint the exact functions, classes, or code blocks responsible for self-correction, iterative search, or any refinement loop. I need to see where this is explicitly implemented. Please highlight the specific code snippets, including file names and line numbers if possible.

  2. EXPLAIN THE LOGIC Provide a semantic explanation of the code you identified. Infer what the developers are trying to do. Explain step-by-step how the code iterates to refine its web search results or enhance the LLM's output. How does the loop work? What triggers a new iteration? What is the goal of each cycle?

@eevmanu
eevmanu / python314-t-strings-slides.md
Last active June 17, 2025 02:43
presentation about t-strings, slides content to generate slides using marp (Markdown Presentation Ecosystem) format
theme paginate marp
default
true
true

PEP 750: Template Strings

  • Overview of new t-strings feature in Python 3.14+
@eevmanu
eevmanu / prompt.md
Created June 8, 2025 23:16
keyword generator - prompt to generate a list of keywords topics phrases tags that could be related to a topic that i'm describing - useful to organize my knowledge garden (notes)

You are tasked with generating an extensive list of keywords, phrases, and topics related to a given subject. This list should be comprehensive and sorted based on relevance to the main topic. Here's how to approach this task:

  1. Carefully read and analyze the following topic description:

<topic_description> {{TOPIC_DESCRIPTION}} </topic_description>

  1. Identify the main topic or themes from the description. Look for frequently mentioned concepts, explicit statements about the topic, or ideas that seem central to the description.
@eevmanu
eevmanu / a1-generate-code.prompt.md
Last active June 5, 2025 20:43
analysis between o3 (via chatgpt), gemini-2.5-pro-preview-05-06 (via aistudio) and claude-opus-4-20250514 (via console.anthropic.com) , 4.1 (via chatgpt) to generate the most robust js script to delete prompt on ai studio google via userscript

You are an advanced AI assistant, acting as an expert Senior Software Engineer or Architect, specialized in code review, design patterns, software security, and algorithmic analysis. Your primary functions are to construct "steel man" versions of provided code (or code descriptions) and perform "red teaming" analyses on it. While the input might be a specific code snippet, your analysis should strive to be language-agnostic where possible, focusing on underlying principles, though you may infer and comment on language-specific idioms if they are apparent and relevant.

Here is the user's input, which will be a code snippet or a description of a software component:

<user_code>

document.querySelector('button[aria-label="View more actions"]').click()

await new Promise(resolve => setTimeout(resolve, 1000));

@eevmanu
eevmanu / decompose_number.py
Created June 4, 2025 15:17
2 scripts to decompose a number that is greater than 501, split into numbers between 501 to 999, close to hundreds first, later close to tenth, later close to digit, in blocks which sum is lower than 5000 in case the number to decompose is greater than 5000 , little algorithm for yape cambiar dolares since yape te da un tasa de cambio preferenci…
#!/usr/bin/env python3
"""
Number Decomposition Module
This module decomposes a given number into sub-numbers within a specified range,
optimizing for "roundness" (preference for multiples of 100, then 10).
Usage Examples:
python decompose_number.py 1234
<root>
<role>
You are an expert prompt engineer with the ability to give large language models the right context to be highly effective. You analyze and improve prompts for AI models while preserving the user's intent and voice.
</role>
<task>
This is the specific prompt you need to analyze and improve:
<prompt>
</prompt>
@eevmanu
eevmanu / uuid7.sh
Created May 23, 2025 04:11
re-implement the uuid v7 uuid7 uuidv7 from uuidgen (part of https://github.com/util-linux/util-linux ) as version 2.41 using source code as context into bash shell script using gemini-2.5-pro-preview-05-06 in one shot
#!/bin/bash
# Function to generate a UUID v7 string
# Implements the logic similar to libuuid's uuid_generate_time_v7
uuid_generate_time_v7() {
local ms
local ts_hex
local rand_hex
local byte6_val byte8_val
local ver_char rand_a_part1 rand_a_part2