Enterprise social listening platforms like Brandwatch or Sprout charge upwards of $800 to $2,000/month per seat. Under the hood, many still rely on brittle dictionary lookup tables (VADER-style positive/negative lexical scoring) or generic regex filters. When a developer tweets "Oh fantastic, another breaking API change deployed straight to prod on a Friday!", classical sentiment classifiers mark it as overwhelmingly positive due to "fantastic". Meanwhile, writing your own real-time monitoring service often degrades into a distributed systems mess: rate limits across Reddit and Hacker News, unstructured LLM hallucinations, deduplication bottlenecks, and ballooning database costs. Here is how to build an asynchronous, production-ready brand intelligence engine using Python, Google's Gemini 1.5 Flash structured outputs, and DuckDB—running for less than $1/month in API costs. The engine is designed around a decoupled, non-blocking ingestion and evaluation pattern: graph TD A[Reddit API / HN Firebase / Bluesky Firehose / RSS] -->|Async Polling| B[Ingestion Layer: Asyncio + HTTPX] B -->|Content Hash SHA-256| C[(DuckDB Local Store - Deduplication)] C -->|New Items| D[Gemini 1.5 Flash Engine] D -->|Pydantic Structured JSON| E[Alert Dispatcher] E -->|Urgency >= High or Polarity |Daily Rollup & Trend Metrics| G[Parquet / Analytical Store] Async Multi-Source Ingestion: Pulls from Reddit (asyncpraw), Hacker News (Firebase REST API), Bluesky (AT Protocol firehose), and custom RSS feeds asynchronously. Deduplication Engine: Generates an identity fingerprint (sha256(platform + post_id)) checked against local embedded DuckDB before hitting LLM inference. Structured Gemini 1.5 Flash Parsing: Uses schema-constrained JSON outputs to extract polarity (-1.0 to 1.0), urgency classification (low, medium, critical), entity references, and sarcasm detection. Downstream Alert Dispatcher: Routes critical events directly to Slack/Discord webhooks while appending all metadata into DuckDB for f
If you've ever been pulled into a company's expansion project as the "technical person who's good with process", you know the drill. Legal and finance own the strategy, but somehow a developer ends up managing the spreadsheet of documents, deadlines, and translation vendors because nobody else wants to track versioning across twelve PDFs in three languages. A recent M21Global article covers the legal side well: which documents the Portuguese Commercial Registry (Conservatória do Registo Comercial) requires translated, and when you need an apostille versus consular legalisation. That's the compliance layer. This article covers the layer underneath it: how to actually manage that document pipeline so it doesn't blow up your registration timeline. Because here's the thing nobody tells you upfront: this isn't a translation problem, it's a state management problem. You have N documents, each with a lifecycle (draft → apostilled/legalised → translated → certified → submitted), dependencies between them, and hard expiry dates on at least one certificate. That's a workflow, and workflows are things we know how to build. Before touching any tooling, write down the state machine. For a Portuguese branch registration, it looks roughly like this: ORIGINAL_ISSUED -> AUTHENTICATED (apostille or consular legalisation) -> TRANSLATION_IN_PROGRESS -> TRANSLATION_CERTIFIED -> SUBMITTED -> ACCEPTED | REJECTED The key detail the source article flags, and that's easy to miss if you're not paying attention: authentication happens before translation, and the translation must cover the apostille/legalisation stamps too. If you model this as a flat checklist instead of an ordered pipeline, you'll end up translating a document before it's authenticated, and redoing the whole thing. A simple way to enforce this in a tracking tool (Airtable, Notion, or a custom script) is to make AUTHENTICATED a hard precondition field that blocks the TRANSLATION_IN_PROGRESS status from being set. Even a basic
This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend I built StudySpark for my college roommate. He always ends up with massive, chaotic walls of text for his lecture notes and spends way too much time trying to manually organize them before exams rather than actually studying them. StudySpark solves this by instantly turning raw study materials into working study tools. You just paste your messy notes in, and it automatically generates a deck of spaced-repetition flashcards, adaptive quizzes, and clean summaries. If you get stuck on a specific concept, it even breaks it down for you using simple analogies. Try it out live here: https://studyspark-njsw.onrender.com/ / studyspark ⚡ StudySpark Transform your chaotic lecture notes into working study materials instantly. StudySpark is a sleek, AI-powered study assistant built for students who struggle to organize their textbook excerpts and lecture notes. By leveraging Google's Gemma open-weight models (via the Gemini API), it processes your notes to ensure private, secure, and fast learning. ✨ Features Smart Flashcards: Automatically extracts key concepts from your notes and converts them into an interactive flashcard deck with spaced repetition marking. Adaptive Quizzes: Generates multiple-choice quizzes to test your comprehension on the fly. Key Summaries: Condenses walls of text into bulleted highlights and extracts key terms for quick review. Concept Explainer: Stuck on a specific topic? Type it in, and StudySpark will break it down with analogies, real-world examples, and study tips. 🚀 Built With Backend: Python, Flask, Gunicorn Frontend: Vanilla JS, Custom CSS (Minimalist Design System) AI… View on GitHub I wanted to keep the application lightweight and snappy, so I built a Python Flask backend with a completely custom Vanilla JS frontend (no heavy frameworks). The heavy lifting is powered by Google's Gemma open-weight models (accessed via the Gemini API). I actually had to build a cu
Modern developer teams lose hours each week sifting through scattered documentation, message histories, and project trackers just to get on the same page. When building under tight deadlines, teammates often spend more time answering "Where is that API schema?" or "What did we decide on the schema last week?" than actually writing code. To solve this, we created AURA AI—a context-aware workspace assistant built to keep project teams aligned, productive, and focused. AURA AI is an intelligent workspace collaborator that bridges project context with active development. Instead of acting as an isolated chatbot, it ingests your team's project notes, architecture decisions, and codebase details to provide contextual assistance, summarize meetings, and generate implementation blueprints in real time. We designed AURA AI for low-latency streaming and modularity: Frontend: Next.js (App Router) paired with Tailwind CSS for a responsive, modern UI. Backend & Real-time State: Supabase for relational data storage, user authentication, and real-time updates. LLM Engine: Powered by the Gemini API for fast, high-context retrieval and response synthesis. Deployment: Continuous integration and deployment via cloud-native pipelines for high availability. +-----------------------------------------------------------+ | Next.js Frontend | | (Interactive Workspace & Chat UI) | +-----------------------------+-----------------------------+ | REST / WebSocket API | +-----------------------------v-----------------------------+ | Backend Services | | +-----------------------------------------+ | | | Supabase | | | | (Auth, PostgreSQL, Real-time Channels) | | | +--------------------+--------------------+ | | | | | v | | +-----------------------------------------+ | | | Gemini API | | | | (Workspace Context & Reasoning) | | | +-----------------------------------------+ | +-----------------------------------------------------------+ Context-Driven Answers: Ask questions directly about your repos
I built a browser-based JSON toolkit because I wanted something simple: paste JSON, work with it, and not have to send the data to a server. The project is called Instant JSON Formatter. https://instantjsonformatter.com/ The main idea is privacy + speed. The JSON processing happens directly in the browser rather than sending the JSON to an API. While building it, I realized that formatting valid JSON is actually the easy part. The difficult part is everything around it. I spent a surprising amount of time testing things like: Missing commas and brackets Deeply nested objects Nested arrays Mixed objects and arrays Large JSON payloads Malformed strings Unexpected primitive values JSON that is almost valid but isn't Copying values and JSON paths from nested structures Comparing two JSON documents I also worked on auto-fix behavior. This was probably the most frustrating part. It is easy to make an "auto-fix" button that changes something and produces valid JSON. It is much harder to make sure the fix doesn't accidentally change what the user actually meant. So I've been deliberately throwing broken and weird JSON at the tools and testing how they behave. The current toolkit includes: JSON Formatter JSON Validator JSON Minifier JSON Viewer / Tree Explorer JSON Diff JSON conversion tools I'm still improving it, so I'd genuinely like feedback from developers who work with JSON regularly. What is something that annoys you about existing JSON tools? And if you have a particularly nasty JSON example that you think would break a formatter, feel free to throw it at me. I'm looking for difficult test cases. I'd especially appreciate criticism about bugs, edge cases, performance, or UX rather than just "looks good."
Research & education only — not betting advice. 18+. Most "prediction" content in horse racing is storytelling. We wanted a system that answers a narrow, testable question instead: When our statistical model disagrees with the market about a horse, and the market then moves toward our model's view before the race — can we detect that in near real time? That detection layer is what we call the cold-horse radar (冷門雷達). This post is the engineering breakdown. A steam move is a significant odds drop in a short window — e.g. a horse opening at 29.0 and steaming to 19.0 (a -34.5% move). The implied probability moves from ~3.4% to ~5.3%. Implementation notes: Poll the public odds board at fixed intervals; snapshot everything Compute delta = (odds_now - odds_open) / odds_open Threshold: flag at |delta| >= 20% — below that is noise in the pools we watch Direction matters: a drop (落飛) means money arrived; a drift (升飛) means the market is cooling Our model (gradient boosting over ratings, speed figures, going, draw, weight, jockey/trainer features) outputs a calibrated win probability. The market's implied probability comes from overround-removed odds. divergence = model_probability - market_implied_probability We flag when divergence >= 6 percentage points and implied probability <= 22% (roughly 7/1 or longer). The 6pp threshold was tuned down from 8pp after backtesting showed the stricter filter starved the radar of signals on ordinary race days. A divergence signal is only meaningful if your model's "22%" actually means 22%. We verify with: Brier score per meeting and per season (public on our blog) Calibration curves — predicted probability buckets vs realized frequency Time-series split validation — always train on the past, validate on the future If calibration drifts, we widen the divergence threshold automatically. A miscalibrated radar is worse than no radar — it manufactures false confidence. Every signal, hit or miss, goes into an open scorecard on the site. Last pu
What I Built ✅ Task completion tracking 📊 Progress tracking ⏱️ Focus timer 💾 Local persistence 🤖 AI-powered prioritization 🔄 Fallback prioritization when AI is unavailable The goal is simple: spend less time planning and more time studying. Demo https://study-sprint-26.lovable.app/ Code https://github.com/Megh-Shah-08/study-sprint-26 How I Built It Why Does Open Innovation Matter? My Agent Session Prize Categories Open Innovation AI / Open-Weight AI Built for a friend. Made to solve a real problem. 🚀
This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend My close friend is a 3rd-year Computer Science undergraduate at NIT Karnataka, Surathkal in India. Like thousands of ambitious students around the world, their dream is to pursue a Master's degree abroad in AI and Distributed Systems. A few weeks ago, I watched them spend an entire weekend buried under a mountain of open browser tabs: DAAD in Germany, EduCanada, Fulbright in the US, and Chevening and Commonwealth in the UK. Each scholarship program had 40- to 80-page PDF guidelines filled with dense institutional jargon: "Does a 4-year Indian B.Tech degree count as final-year standing right now?" "Does an 8.4 / 10 CGPA meet the 'first-class honours or 2:1 equivalent' threshold?" "Does a national hackathon finalist certificate satisfy 'demonstrated community leadership'?" Existing scholarship portals were useless: they either acted as clickbait lead-generation farms or slapped an opaque "87% Match" badge on a card without explaining why they qualified. The alternative—spending 20 hours drafting an essay only to be rejected over a technical disqualifier buried on page 52—was heartbreaking. I built Deadline Buddy for my friend. Deadline Buddy turns scholarship discovery into a transparent, stress-free 5-step loop: 📄 Zero-Friction Document Intake: Drop in unofficial transcripts, resumes, or certificates (PDF, DOCX, TXT) or click the 1-click sample button. 👤 Structured Profile Extraction: The system extracts key attributes (GPA, current year of study, degree, graduation year, skills, achievements) into an editable profile with supporting document quotes. 🌍 Destination Personalization: Pick a target country (USA, Canada, UK, Germany, Australia, Netherlands, Singapore, Japan), immediately contextualizing currencies, deadlines, and official guides. ⚖️ Deterministic Eligibility Matching: Instead of letting an LLM guess eligibility, pure deterministic code evaluates published requirements agai
Dadur Ranna (দাদুর রান্না) — Preserving Grandma's Handwritten Recipes with Open-Weight Gemma This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend. Targeting the **Best Use of Gemma* and Best Use of Render featured prize categories. Every family has a keeper of culinary memory. For my friend Farzana, that person is her grandmother (দাদু / Dadu). For over fifty years, her signature dishes only existed as brittle, yellowing diary pages filled with hurried Bengali cursive, faded ink, and colloquial shorthand like "অন্দাজমতো এক বাটি" ("an approximate small bowl") or "এক চিমটি" ("a pinch"). Because paper deteriorates and handwriting fades, I built Dadur Ranna (দাদুর রান্না): an intimate, bilingual family cookbook maker designed to preserve heirloom handwritten recipes before they are lost to time. 📸 Handwritten Photo & Messy Note Transcription: Snap phone photos of handwritten pages or paste rambling mixed Bangla/English notes. Images are compressed and resized client-side via HTML5 Canvas before uploading. ⚠️ Human-in-the-Loop "Uncertainty" Flags: Cooking is chemistry and heritage. If ink is smudged, torn, or colloquial (e.g., "রাধুনি নাকি কালো জিরে স্পষ্ট নয়"), Gemma never silently guesses. Ambiguous quantities and terms are flagged in warning yellow so family cooks can confirm them. ⚖️ Fraction-Aware Serving Scaler: Real recipes use fractions, not awkward decimals. Dadur Ranna dynamically scales quantities up or down with culinary fractions (½, ¼, ¾, 1½). 🌐 Bilingual Toggle: Instant toggle between উভয় (Both / Bilingual), বাংলা (Bangla), and English for titles, ingredients, and steps. 📖 Keepsake Print-to-PDF Book: Formats a printable family book with @media print, complete with traditional Alpana (আলপনা) decorative frames, an editable family dedication ("For Dadu, with love"), a Table of Contents, and one recipe per printed page. 🔒 100% Client-Side Privacy: Zero database required. Recipes live safely in browser localStorage, with full J
This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend I built LifeLens, a privacy-first AI assistant designed for my mom and other family members who sometimes receive digital messages they don’t fully understand. Bank notifications. Payment alerts. Delivery updates. Bills. Government messages. Important-looking links. Complicated English. For me, they are easy to understand. For someone who isn't deeply comfortable with digital technology, they can create a very simple question: “What does this mean, and what am I supposed to do?” Usually, the solution is to send me a screenshot. That’s the problem I wanted to solve. LifeLens lets someone upload a screenshot and get a simple explanation in the language they are comfortable with. Instead of showing a wall of technical text, it breaks the message down into: What is this? What does it mean in simple words? Do I need to do anything? Are there any warning signs I should know about? The goal isn't to replace a bank, a support representative, or a security tool. The goal is much smaller and much more human: Make everyday digital information easier for the people we care about to understand. The core idea behind LifeLens is local AI. Instead of treating an AI API as a black box that receives someone's private screenshot, LifeLens is designed around locally running open/open-weight AI models. The intended flow is: Screenshot → Local vision model → Understanding → Simple explanation For voice-based input, the same idea can be extended with local speech recognition: Voice → Speech-to-text → Local AI → Simple explanation The product is designed around a lightweight stack such as React, FastAPI, Ollama, local vision models, Whisper for speech recognition, and SQLite for local storage. The important part isn't the framework choice. It's where the AI runs. A screenshot from a family member's phone can contain information about their finances, phone number, address, transactions, or other personal detail
Most teams migrate CRM data by mapping every old field into the new system. Then they spend months fixing duplicate records and broken workflows. We audit what history actually matters before touching a single field. Three checks prevent data bloat and preserve the workflows that drive your business. Most teams start by mapping every old field to a new one. Every contact property gets a matching column in the new CRM. Every deal attribute. Every custom tag. All of it before any data moves. You preserve everything. You avoid the guilt of deleting customer history. But you carry over fields nobody actually uses anymore. Data structures that didn't work in the first place get replicated. You end up deciding which custom fields matter after migration, when changing them means touching live data. The sequence matters. Map first and you build the new system around the shape of the old one. That locks in every workaround and abandoned experiment from the past three years. The real work: figuring out which history matters to your business before you decide where it lives in the new system. When we migrated data for the Custom CRM Platform, the client had forty-two custom fields in their spreadsheet. Twelve were actively used. The rest were duplicates, abandoned experiments, or data that belonged in notes rather than structured fields. Map every old field to a new one and you carry over columns that stopped mattering years ago. The CRM ends up cluttered. Nobody uses the data. The mechanism: most teams migrate by matching field names. Old system tracked "Lead Source Channel Sub-Category"? New one gets that column too. But that field might have been abandoned after one campaign in 2019. Bloat compounds when you import historical records that reference those dead fields. A customer from 2018 might have tags, notes, and metadata that no longer align with how your business works today. Carry over spreadsheet structures without questioning them and you inherit the mess of the old
This is not row level security. The database role your app uses (anon or authenticated) has no privilege on the table at all, so Postgres refuses before any policy is read. A correct policy cannot fix it; a grant can. Supabase is also changing a default that makes this error easier to hit. different error from the app: 42501 permission denied for table notes not this one: 42501 new row violates row-level security policy for table "notes" What is permission denied for table? It is Postgres refusing a statement because the role running it holds no privilege (select, insert, update or delete) on that table. Supabase's API surfaces it as error 42501. Both errors carry the code 42501, which is why they get mixed up. The text tells them apart. Supabase: "If you see an error like permission denied for table your_table, the querying role may not have the required privilege for the operation." A row level security violation names a policy. This one names only the table. Proven on a real PostgreSQL: with a correct select policy in place, a role that had its privileges revoked got permission denied for table on a select and on an insert; the policy never ran. A row that fails the insert policy of a role that does have the privilege got the other message, new row violates row-level security policy. stop being granted for you Until now a table you created in the public schema was usable by the API roles straight away. Supabase's changelog (April 28, 2026): "New tables in the public schema will no longer be exposed to the Data API automatically." The dates it gives: from May 30, 2026 the setting starts to become the default for new projects (a gradual rollout), and on October 30, 2026 it is applied to existing projects. Existing tables are not affected; only tables created after the change reaches your project need the grant. And the advice: "For new tables you want to expose via the Data API, make explicit grants part of your table-creation flow." A table created by a migration
Comparing two JSON documents with an ordinary text diff often produces a wall of red and green for changes that don't matter. Reordered keys, different indentation, or a minified file on one side are all differences in text but not in meaning. A JSON-aware diff compares the data itself. Whitespace and formatting: the same data can be pretty-printed or minified. Key order: JSON objects are unordered, so {"a":1,"b":2} and {"b":2,"a":1} are equal. Number formatting: 1.0 and 1 may be the same value. Line-based tools report a whole line as changed even when a single value changed. Added: a key or array item present only in the new document. Removed: something present only in the old document. Changed: the same path holds a different value. Unchanged data is not shown, or is dimmed. old: { "name": "Ada", "role": "user", "tags": ["a"] } new: { "name": "Ada", "role": "admin", "tags": ["a", "b"], "active": true } changed: role "user" -> "admin" added: tags[1] "b" added: active true Objects are compared by key, but arrays are ordered, so most tools compare them by index. Inserting an item at the start can make every following item look changed. If your arrays hold records with IDs, match items by ID rather than position. Sort keys and format both files the same way first if you need a text diff. Compare against the same environment or version; timestamps and IDs often differ legitimately. Strip fields that always change, such as generated timestamps, before comparing. For machine-readable changes, JSON Patch (RFC 6902) describes differences as a list of operations. Private data API responses and configs often include secrets or personal data. Use a diff tool that runs in your browser so neither document is uploaded. Paste both into a JSON diff tool, which compares the data structure and highlights added, removed, and changed values. No. JSON objects are unordered, so a semantic diff ignores key order. Array order does matter. A standard (RFC 6902) format that describes change
[Image 1: cover] Shipping-containers theme (chaos → standard), no text in the image. Ask a data team how they calculate their on-time delivery rate, and the answer rarely comes from the database. The columns are all there: promised dates, delivery dates, order status. The rule that turns them into one number lives somewhere else, in a wiki page, a dashboard, or a senior analyst's head. SQL agents run into this wall all the time. Here's a real example from LiveSQLBench, a public benchmark for agents that turn questions into SQL. One of its databases tracks disaster relief, and one of its questions asks: I need to analyze all distribution hubs based on their Resource Utilization Ratio. Please show the hub registry ID, the calculated RUR value, and their Resource Utilization Classification. Sort the results by RUR from highest to lowest. The database has a distributionhubs table, and three of its columns are clearly involved (only the relevant columns are shown): distributionhubs (hubregistry, hubutilpct, storecapm3, storeavailm3, ...) But no column is called "Resource Utilization Ratio", and nothing in the schema says how to combine these three. Nothing says where "High Utilization" starts, either. Both answers live in a separate file of business rules: RUR = (hubutilpct / 100) × (storecapm3 / (storeavailm3 + 1)) High Utilization RUR > 5 Moderate Utilization 2 ≤ RUR ≤ 5 Low Utilization RUR str: return secret("POSTGRES_USER") @property def admin_password(self) -> str: return secret("POSTGRES_PASSWORD") @property def agent_password(self) -> str: return secret("AGENT_DB_PASSWORD") @dataclass class Config: model: ModelConfig agent: AgentConfig database: DatabaseConfig def secret(name: str) -> str: value = os.environ.get(name) if not value: raise SystemExit(f"{name} is not set. Add it to your .env file (see .env.example).") return value def load_config(path: str | Path = "config.yaml") -> Config: load_dotenv() # read .env into the environment raw = yaml.safe_load(Path(path
This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend ChatTodo is a chat-first todo app for my friend Fatik, who meets a lot of people and keeps making appointments — client meetings, workouts, catch-ups. His problem is simple: he forgets. And when he forgets, his appointments collide — a gym session he just promised lands on top of a meeting he already made. He's also not going to adopt a heavyweight task manager. He'd rather type a message than fight a due-date picker. So I didn't build him another app with forms. I built him a chat box. He types the way he talks: "besok jam 9 rapat Budi, jam setengah 10 olahraga di gym" ChatTodo turns that into two dated todos, checks them against everything already on his plate, and warns him on the spot: Bentrok jadwal: "Rapat sama Budi" (Sen, 5 Okt, 09.00) vs "Olahraga di gym" (Sen, 5 Okt, 09.30) Under the chat there's a simple dashboard: how many are pending, which are overdue, what's coming in the next seven days — enough for Fatik to glance at in the morning and close the tab. The problem it solves for Fatik: he's the person who promises a friend a workout session and then realizes it clashes with a meeting he already agreed to. He told me he needs something to watch his appointments for him, but it has to be effortless — one box, one send button, no app to "keep up with". Live: [DEPLOY URL] Video demo: [RECORDING LINK] Repo: gitlab.com/iqbal_taufiqurrochman/chat-todo Setup is three commands: npm install, cp .env.example .env (plus your Neon connection string), npm run db:push. The README walks through every environment variable. Stack: SvelteKit 3 + Svelte 5 (runes), Tailwind CSS 4, Neon Postgres via Drizzle ORM, deployed on Vercel. The open-source AI at its core: Open-weight model via OpenRouter — the default is google/gemma-3-27b-it (Gemma is Google's open-weight family). Every chat message goes through it. OpenAI-compatible client layer — a thin abstraction (src/lib/ai/client.ts) where baseURL
Day 4 of 30 Days of Search. You find a paper that looks useful, open the abstract, and realize the detail you need is somewhere else. Which dataset did the authors use? What did they compare against? Can you combine papers from different sources in one place for easy access and bookmark? Quick Summary: Your agent needs access to the paper, not just a promising title. The integration in this guide starts with Valyu Search API and two simple methods: valyu.search() to find papers and valyu.contents() to read a selected paper. We will add those calls to a TypeScript agent, starting with arXiv and then extending the same search to PubMed, bioRxiv, ChemRxiv, and medRxiv. An academic research agent searches scholarly sources, reads relevant papers, compares their evidence, and answers with source links. Search APIs like Valyu supplies the search and paper-reading calls. Your existing model decides what to search, which papers to read, and how to explain the findings. Question → Search papers → Read selected papers → Return evidence to the model → Cited answer. In your existing TypeScript backend, install the Valyu SDK: npm install valyu-js@2.10.1 Get a key from platform.valyu.ai and set VALYU_API_KEY in your server environment. The SDK reads it automatically. Add this function to your agent's tool layer: import { Valyu } from "valyu-js"; export const valyu = new Valyu(); export async function searchPapers(query: string) { const response = await valyu.search(query, { includedSources: ["valyu/valyu-arxiv"], maxNumResults: 5, }); if (!response.success) throw new Error(response.error ?? "Search failed"); return response.results; } Call searchPapers("Protein-ligand binding affinity prediction benchmarks"). You get paper records containing a title, original URL, source, and retrieved content. Authors, DOI, and publication date are included when available. For a different collection, change includedSources. For example, use ["valyu/valyu-pubmed"] for PubMed or ["valyu/valyu-chem
An SSH client keeps every live session in a shared map behind a lock. Holding it through a slow handshake froze every other session — here's the Rust fix. Here's a shape you'll recognise if you've ever put "a bunch of live things" behind one lock. An SSH client keeps its open sessions in a single map: struct SessionManager { sessions: HashMap , // ... } static SESSION_MANAGER: OnceLock >> = OnceLock::new(); One Arc >>, shared by every tab. Reads are cheap — grab the lock, find the session, write some bytes, drop the lock. It worked fine until someone opened a tenth tab and connected to a new host, and every other tab froze for three seconds. Through a jump host, longer. .await too many The connect path looked like the obvious thing: async fn connect_session(id: &str, creds: Creds) -> Result { let mgr = get_session_manager(); let mut mgr = mgr.lock().await; let session = mgr.sessions.get_mut(id).ok_or("not found")?; session.connect(creds).await // Result { let mut mgr = get_session_manager().lock().await; if mgr.in_flight.contains_key(id) { return Err("an operation is already in progress for this session".into()); } match mgr.sessions.remove(id) { Some(session) => { mgr.in_flight.insert(id.to_string(), false); // false = not cancelled Ok(session) } None => Err("session not found".into()), } } Now the lock is held only long enough to remove the entry and record that an operation is running. The connect becomes: async fn connect_session(id: String, creds: Creds) -> Result { let mut session = take_session_for_op(&id).await?; // brief lock let result = session.connect(creds).await; // NO lock held finish_session_op(&id, session).await; // brief lock result.map_err(|e| e.to_string()) } Between the first and third line the manager lock is free. The ten other tabs keep echoing keystrokes and drawing output while the new connection does its handshake in the background, holding nothing but its own owned SshSession. The slow work is exactly as slow as before — it just stops be
This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend My mom is my first friend. She is also a Class 8 maths teacher, and for as long as I can remember, test week at our house has looked the same. The dining table disappears under the NCERT textbook, a stack of old question papers, a folder of worksheets and one notebook with a pencil tucked in it. She picks a question from one source, changes the numbers so the class can't copy last year's answers, works it out, writes the answer key, and moves on to the next one. A 40-mark paper is an evening. If she spots one bad question at the end, the whole thing gets retyped. When I asked how I could help, her answer was simple: "I don't need new questions from the internet. I need questions from my books, in my style, and the answers have to be right." So I built her a test paper generator that runs on her laptop. She fills in a short form: total marks, how many MCQs, short answers, case studies and so on, the chapters, and a line like "more word problems, keep numbers simple". She presses one button. About twenty minutes later she has two Word files: the question paper and a separate answer key with a step-by-step marking scheme. What it does for her: Writes new questions from her own material. It reads her textbook chapters, 9 past papers and 15 worksheets, then writes fresh questions in the same style. Different numbers, new contexts, same chapter. Checks every numeric answer key with code before it reaches her. If a key doesn't match the working, the question is rewritten. Balances difficulty. By default a paper is 20% easy, 60% medium and 20% hard, the split most school papers follow, and she can change it. Lets her replace one question without touching the rest. "Too hard", "too easy", "out of syllabus", or a note of her own, and only that question is rewritten. Hands her real Word files, with proper fractions, powers and roots as Word equations, ready for her school's header. Never loses wor
This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend I built KubeSense, a high-density, terminal-based Kubernetes monitoring dashboard. The project is publicly available at: https://github.com/Joydeep2005Banik/KubeSense KubeSense is built entirely in Python, utilizing a decoupled architecture driven by a central PodMonitor engine. Here is a high-level look at the architecture: graph TD subgraph UI Layer A[Terminal UI] end subgraph Core Logic B[Monitor Engine] end subgraph Data Sources C[K8s API] D[SSH Fallback] end subgraph AI Processing E[Log Optimizer] F[LLM Providers] end B |State Updates| A B -->|Fetch Metrics| C B -->|Fallback| D B -->|Raw Logs| E E -->|Clean Context| F F -->|Alerts| A Here is a breakdown of the core systems: I used the Textual framework to build the dashboard. Instead of relying on heavy "while-true" redraw loops, the UI uses Textual's event-driven reactive properties. When the Monitor Engine pushes new metrics, only the changed widgets redraw, ensuring a lightning-fast, zero-overhead experience without screen tearing. flowchart LR A[Monitor Engine] -->|Sends updated Metrics Object| B(Reactive Variable) B -->|Triggers Auto-Update| C[UI Node / Widget] C -->|Only redraws changed region| D[Terminal Display] The tool primarily connects to the cluster using the official kubernetes Python client to fetch live status and log streams. However, if the cluster's K8s Metrics Server goes down, KubeSense intelligently engages a graceful fallback mechanism to connect directly to the underlying cluster nodes via asyncssh. sequenceDiagram participant M as Monitor participant K as K8s Metrics API participant S as SSH Fallback participant N as Node Shell M->>K: Fetch Pod CPU/Mem alt Metrics Server Unavailable K-->>M: HTTP 404 / Error M->>S: Engage Fallback (asyncssh) S->>N: Connect to Node via SSH N-->>S: Execute `top` & parse usage S-->>M: Return hardware metrics else Success K-->>M: Standard API Metrics end Logs can be incredibly n
La differenza fra una risposta inutile e una risposta che usi sta in due righe della richiesta. Non serve un prompt lungo, non serve una formula magica, e non serve imparare un linguaggio nuovo: servono quattro elementi e l'ordine giusto in cui metterli. Qui trovi le regole che i fornitori stessi documentano, con i loro esempi prima e dopo, più i modelli di richiesta divisi per compito — scrivere, riassumere, tradurre, chiedere un'immagine — e la spiegazione di perché i «mega-prompt» che girano online funzionano peggio di una richiesta di quattro righe. Alla fine saprai scrivere un prompt tuo, e saprai quando quello che hai scritto non funziona. In una frase: un prompt che funziona dice chi parla, cosa deve fare, con quali informazioni e in che formato — e mette le istruzioni prima del testo su cui lavorare. Le due regole che fanno la differenza più spesso: le istruzioni in cima e la specificità su lunghezza, formato e destinatario. Tutto il resto è contorno. La guida ufficiale di Google — «Prompting Guide 101», un PDF di 71 pagine pensato per chi usa Gemini — riduce tutto a quattro aree: Persona, Task, Context, Format. Cioè: chi deve essere l'assistente, cosa deve fare, con quali informazioni, e in che forma deve restituire il risultato. L'esempio che danno è completo e vale la pena copiarlo come modello: Sei un program manager in [settore]. Scrivi un'email di sintesi esecutiva per [destinatario] basandoti su [dettagli sui documenti rilevanti]. Limita a punti elenco. Prompting Guide 101, Google — esempio ufficiale Da notare due cose. La prima: non serve usare tutti e quattro gli elementi ogni volta — la guida lo dice esplicitamente. La seconda, ed è quella che conta di più: il verbo deve esserci sempre. «Riassumi», «scrivi», «cambia il tono», «traduci»: senza un comando, quello che hai scritto è un contesto, non una richiesta. OpenAI documenta le sue regole con esempi contrapposti, ed è il modo più chiaro di vederle — nelle sue «Best practices for prompt engineerin
Dale Caldwell, former lieutenant governor for New Jersey. | Bloomberg via Getty Images New Jersey's lieutenant governor Dale Caldwell was forced to resign on September 25th after an investigation found he had sexually harassed a staffer and repeatedly violated ethics rules. The now-former Lt. governor has been making the media rounds trying to clear his name. But he took a particularly odd tactic during an interview on NJ PBS. Caldwell claims he's being unfairly targeted, and multiple AI agents back that up. He told host Rob Nelson that he "AIed" the report on the investigation "from multiple AI platforms." "I put it through AI," he said, "and it said 59 times, it [sic] said, 'What would your findings be?' There was no insta … Read the full story at The Verge.