今日已更新 84 条资讯 | 累计 37333 条内容
关于我们

标签:#r

找到 31808 篇相关文章

AI 资讯

Why I separated live discovery from the AI chat box

Most AI workspaces start with the same useful primitive: a chat box. I kept one in AI Workstation because it is still the fastest interface for many research and writing tasks. But while using the product for day-to-day work, I found two questions that did not belong in a general chat flow: What current topic is worth researching today? Which open-source AI project is worth evaluating now? Both questions depend on live evidence. They also have different failure modes from ordinary drafting. A model can produce a fluent answer while using stale memory, mixing project identities, overlooking a license, or treating popularity as proof of quality. That led me to split AI Workstation into three layers: a general workspace, public discovery Radars, and installable Agent Skills. Layer 1: the workspace The main AI Workstation handles everyday knowledge work: questions, links, documents, images, drafting, proofreading, reusable templates, and exports. The point is not to hide every operation behind one large prompt. It is to keep routine work accessible while letting tasks that need current data move into a more explicit flow. Layer 2: public Radars for live discovery The first Radar is Global Topic Radar . It is designed for creators and editors who need current candidates rather than generic content ideas. It keeps the topic lane, freshness, market context, evidence state, and original sources visible. The second is Open-Source AI Radar . It is designed for developers and researchers comparing active AI projects. It presents dated rankings, categories, collections, and project cards with direct links to upstream repositories. Stars, forks, licenses, languages, and practical summaries are treated as research inputs. The important design choice is what the Radars do not claim: A topic score is not a prediction that a post will go viral. Project popularity is not a security audit or a quality guarantee. A generated summary does not replace the upstream repository or license t

2026-08-29 原文 →
AI 资讯

Playwright Email Testing: A Real End-to-End Tutorial (No Mocks)

Most "email testing" advice ends at stubbing the send call. You assert that your app tried to send a message, and the test goes green. That leaves the interesting half untested: whether the message actually left your infrastructure, whether the template rendered, and whether the six-digit code inside it matches the one your backend is willing to accept. This walks through the other approach — driving a real signup flow in Playwright , letting a real email get delivered to a real inbox, then reading it back over an API and typing the code into the page. No mail server to run, no shared QA mailbox to clean up. The shape of the problem A verification-email test has four moving parts: an address that is unique to this test run, the browser flow that triggers the send, a way to read the message that arrives, code extraction and the assertion. Steps 1 and 3 are the ones people get wrong, and they get them wrong in the same way: by sharing one mailbox across the suite. The moment two tests run in parallel, one of them reads the other's email. So the rule is one inbox per test , provisioned on the fly and thrown away afterwards. The inbox helper Any disposable-inbox API with a REST interface works here. I'll use MoeMail 's because it's open source and the free tier is enough for a CI suite — the shape is the same anywhere, so swap the base URL and the auth header if you use something else. // inbox.ts const API = ' https://moemail.app/api ' const KEY = process . env . MAIL_KEY ! export type Inbox = { id : string ; email : string } export async function createInbox ( ttlMs = 3 _600_000 ): Promise < Inbox > { const res = await fetch ( ` ${ API } /emails/generate` , { method : ' POST ' , headers : { ' X-API-Key ' : KEY , ' Content-Type ' : ' application/json ' }, // Omit `name` and a random local part is generated for you — which is // exactly what you want, so parallel tests can never collide. body : JSON . stringify ({ expiryTime : ttlMs , domain : ' moemail.app ' }), }) if

2026-08-29 原文 →
开发者

Cloudflare KV for Session Caching in Multi-Tenant FastAPI: Reducing PostgreSQL Load Without Redis Complexity

Cloudflare KV for Session Caching in Multi-Tenant FastAPI: Reducing PostgreSQL Load Without Redis Complexity Every SaaS I've built hits the same wall: session validation on every request hammers PostgreSQL. You add Redis, suddenly you're managing another service, debugging cache invalidation, and paying for redundancy you don't need. Then I discovered Cloudflare KV sits between your users and origin server. It's not a replacement for PostgreSQL—it's a read cache positioned at the edge that auto-syncs on writes. For multi-tenant session and permission data, this eliminates 60–80% of auth-related database queries without the operational complexity of Redis. This is the approach I use in CitizenApp. Here's why it works, how to implement it, and where I nearly broke production. Why Cloudflare KV Beats Redis for Session Caching Redis requires: A separate service deployment (Render, AWS ElastiCache) Connection pooling logic in your app Cache invalidation strategies you'll get wrong Monitoring for memory leaks and eviction Cost that scales with your hot data size Cloudflare KV requires: A binding in your edge worker (one line of config) Simple key-value storage at 200+ edge locations Automatic TTL expiration Zero operational overhead—Cloudflare manages it Here's my honest take: I prefer KV because I don't have to think about it. My workers validate JWT tokens and fetch session data from KV before even routing to my FastAPI origin. Cache misses flow to PostgreSQL and write back to KV. No connection pools. No eviction policies. No debugging Redis memory fragmentation at 3 AM. The tradeoff? KV is slower than in-memory Redis (ms vs microseconds), but for session lookups happening 200+ times per second per user at global scale, edge-cached responses beat origin-fetched ones every time. Architecture: Edge Validation + Origin Sync Your flow looks like this: Request hits Cloudflare Worker Worker checks KV for session + permissions (hit = serve immediately) KV miss → fetch from Fas

2026-08-29 原文 →
AI 资讯

I built managed hosting for Hermes Agent so I could stop babysitting a VPS

The problem I run Hermes, an open-source agent with tools, memory, and cron built in. Before running my own managed service SaaS, I used various competitors to deploy on VPS. This method has a lot of downsides because you are often SSH'ing in and managing secrets directly in a .env file, which can leave you exposed if your box is compromised. It is also very cumbersome, especially for agencies to manage these "alway-on agents" for clients on VPS. Luckily, these are just hosting problems, so I built SEAOTTER to fix it for myself, and then realized other people probably have the same problem. * What it does * SEAOTTER is a managed control plane for Hermes Agent: Per-agent isolation - each agent runs in its own namespace with a gVisor sandbox, so one client's agent can't see or touch another's. Operate without SSH — pause, restart, restore, and read logs through an API instead of a terminal. MCP-native — talk to a hosted agent from Claude, Cursor, or Codex. Secrets handled for you — backed by Google Secret Manager instead of a .env file you have to remember exists. The rough idea POST /api/v1/agents or on "Create Agent", and it provisions a namespace, installs Hermes via Helm, brings up the sandbox, wires DNS/TLS, and gives you a reachable dashboard, typically in under five minutes. Who it's actually for Agencies running one isolated agent per client without spinning up a VPS per client Hermes power users who want lifecycle control (pause/restart/restore) without maintaining SSH access Hobbyists who want a standing assistant without becoming an ops person Try it There's a 14-day free trial on the Hobby plan. Worth being upfront: it currently asks for a card at checkout, which I know is friction — I'm working on a no-card way to try it. In the meantime, the docs walk through the API and dashboard in detail if you want to look before you sign up. What I'd love feedback on If you're currently self-hosting Hermes on a VPS: what would actually get you to switch, or keep you

2026-08-29 原文 →
产品设计

Show DEV: I built A2Z Edit — free, private, browser-based image, PDF & OCR tools (100/100 Lighthouse)

Hey DEV community, I built A2Z Edit — a free, private, and browser-based toolkit for images, PDFs, OCR, QR codes, and file management. 🔧 What it does Image Tools: Remove background, resize, crop, compress, convert between formats (JPG, PNG, WebP, AVIF, HEIC), add watermarks, blur/pixelate sensitive regions, create collages, and view/strip EXIF metadata. PDF Tools: Merge, split, arrange, compress, watermark, sign, crop, edit text, redact, and convert PDFs to/from JPG, PNG, Word, and CSV/Excel. OCR Tools: Extract text from images and PDFs with support for English, Arabic, and bilingual English+Arabic recognition. QR Tools: Generate customizable QR codes and scan them from images or your camera. File Tools: ZIP creator/extractor, Base64 encoding, and color converters (RGB, HEX, HSL, CMYK). 🔒 What makes it different Your files never leave your browser . Everything runs client-side. No uploads, no servers, no signup, no limits. I built this to be fast, private, and reliable. No ads. No freemium. Just tools that work. 🚀 Check it out Try it here: https://www.a2zedit.com Would love to hear your feedback or suggestions for new tools. Let me know what you think in the comments! Note: This was built with Next.js, runs entirely in the browser, and scores 100/100 on Lighthouse (Performance, Accessibility, Best Practices, SEO).

2026-08-29 原文 →
AI 资讯

JavaScript "Variables"

Hi all, I learned about variables in JavaScript recently. Variables are containers which used to store data. It can be declared in 4 ways. Using let e.g., let x = 2 ; let y = 3 ; let z = x + y ; Using Const e.g., const x = 3 ; const y = 4 ; const z = x * y ; Using Var e.g., var a = 1 ; var b = 1 ; var c = a - b ; Automatically a=10; b=5; c=a-b;

2026-08-29 原文 →
AI 资讯

Orquestração de Agentes de IA no Direito: Construindo Workflows de Triagem e Resumo de Casos sem Perder a Validação Humana

A inteligência artificial no setor jurídico ultrapassou a fase dos chatbots genéricos de pergunta e resposta. Quando lidamos com o Direito, o custo de uma "alucinação" de IA não é apenas um incômodo — pode significar a perda de um prazo fatal, uma tese fundamentada em jurisprudência inexistente ou a violação de sigilo. Para resolver esse problema, a engenharia de software aplicada a LegalTechs está migrando para os Agentic AI Workflows (Workflows de IA Agêntica). Em vez de depender de um único prompt gigantesco para resolver um problema complexo, orquestramos múltiplos agentes especializados. Neste artigo, vamos detalhar como arquitetar uma esteira de triagem, busca vetorial e sumarização de processos, utilizando ferramentas maduras e garantindo que o advogado permaneça como o orquestrador final no Quality Gate . 1. Dividir para Conquistar: A Arquitetura Multi-Agente A premissa da orquestração de agentes é a especialização. Cada agente no sistema possui um escopo restrito, ferramentas específicas ( tool use ) e um objetivo claro. Em um cenário de entrada de um novo processo longo (ex: um PDF de 500 páginas), o workflow se divide em três estágios: Agente 1: Classificação de Intenção e Roteamento O primeiro agente atua como o recepcionista. Ele não lê o documento para extrair teses; ele apenas analisa as primeiras páginas para responder: O que é isso? É uma Inicial Trabalhista? Uma intimação de prazo? Uma contestação? A partir dessa classificação, o workflow roteia o documento para a fila correta de processamento. Agente 2: RAG (Retrieval-Augmented Generation) e Busca Vetorial O segundo agente é o pesquisador. Ele quebra o documento em fragmentos ( chunks ) e cruza as alegações da parte contrária com o acervo interno do escritório. No ecossistema Elixir, por exemplo, podemos utilizar o PostgreSQL com pgvector e Ecto para armazenar os embeddings de casos passados e jurisprudências vencedoras do próprio escritório. O agente busca semelhanças e recupera o contexto estrit

2026-08-29 原文 →
AI 资讯

The Theragun Sense makes everyday recovery surprisingly easy

As my 20s are set to come to an end later this year, I’ve officially reached the age where sleeping in the wrong position or stretching just a little too far can cause aches and pains. I’ve always been somewhat skeptical of massage guns, mostly because I’ve tried a few off-brand ones and just assumed […]

2026-08-29 原文 →
AI 资讯

How to Set Up DuckDB (Run SQL on a CSV With No Import Step)

By Michael Nocito , data analyst · Published August 8, 2026 By the end of this page you will be running SQL directly against a CSV file on your machine, with no import step, no CREATE TABLE , and no schema written by hand. DuckDB reads the file where it lies, works out the column types itself, and gives you a normal SQL result. It takes one command to install and about a minute to prove. Here is what to actually do today. Run python -m pip install duckdb , then write a query with your CSV's filename in quotes where the table name would normally go. That is the entire idea, and everything else on this page is a consequence of it. The short version: a file is a table. It suits large files and folders of files, it does not replace SQLite for a shared database you keep, and section 6 says which to use when. The missing import step is the one idea worth the page, so it gets the picture. The original carries a diagram here. In words: Two horizontal sequences. The upper sequence runs through four stages joined by arrows: a file icon, then a box representing a schema being written, then a database cylinder, then a result grid. The lower sequence has only two stages joined by a single long arrow: the same file icon on the left and the same result grid on the right, with the middle two stages absent and the empty space where they used to be left visibly blank. Every output on this page is real. Run on 8 August 2026 with DuckDB 1.5.5 on Windows, against a 412-row CSV exported from the Chinook sample database. The numbers match the ones in the sample-database guide and the Python guide on purpose, because it is the same data through three different tools. 1. Install it Before the explanation: every database you have met so far needed you to create a table before you could put anything in it. What would have to be true for that step to be unnecessary? python -m pip install duckdb That is the whole installation. No server, no service running in the background, no configuration fi

2026-08-29 原文 →
AI 资讯

pandas read_csv: Your First DataFrame, and What It Guessed

By Michael Nocito , data analyst · Published August 8, 2026 By the end of this page you can load a CSV into pandas, find out in twenty seconds what type every column became, stop the identifier columns losing their leading zeros, get dates read the way they were written, and turn a money column that arrived as text into numbers. It is about twenty-five minutes, and every output below was produced by running the code. Here is what to do today, the moment after you first load a file. Run df.dtypes . Not df.head() , which shows you what the values look like, but dtypes , which shows you what they are. A column of identifiers that says int64 has already lost its leading zeros, and a money column that says object or str is text that will refuse to add up. The short version: read_csv reads characters and guesses a type per column. The guess is usually right, it is silent when it is wrong, and four arguments replace guessing with instruction. The same characters becoming two different values is the idea, so it gets the picture. The original carries a diagram here. In words: On the left, a strip of five small square boxes holds one character each, reading zero, eight, zero, five, three, as the characters appear in the file. Two arrows branch out from that strip. The upper arrow leads to a strip of five boxes in which the first box is empty, crossed through and outlined in amber, while the remaining four hold eight, zero, five and three; the leading character has been discarded. The lower arrow leads to a strip of five boxes holding zero, eight, zero, five and three, identical to the original, outlined in blue. Both destinations came from the same source strip, and only one of them still contains everything the file did. Every output on this page is real. Run on pandas 3.0.2 against a small CSV built to contain the four problems every real export has: an identifier with leading zeros, ambiguous dates, a text marker for missing values, and money with a thousands separator. If

2026-08-29 原文 →
AI 资讯

The Pipeline Worked. Then the Research Outgrew It.

About a year ago, I was building a terminal-based workflow manager called Glyph.Flow. It was mostly a learning project. I wanted to understand Python better, experiment with Textual, think about commands, state, configuration, logging, and all the small architectural decisions that suddenly appear when a script stops being a script. Somewhere between then and now, the workflows became a little more real. For my Master's thesis, I built a data pipeline to construct and process a cross-national research database from multiple sources. It had a clear purpose: take heterogeneous input data, transform it consistently, validate important assumptions, and produce the dataset I needed for the analysis. And it worked. But this is no longer enough. I am not rebuilding it because the original system failed. I am rebuilding it because the question changed: My Master's thesis needed a pipeline. My PhD will need research infrastructure. And I am slowly discovering that these are not the same thing. A pipeline can be finished There is something comfortable about building software for a well-defined research project. You know the research question. You know most of the variables you need. You know which datasets are involved. You can define the transformations, produce the outputs, validate them, run the analysis, and eventually say: Done. Of course, research is never really that clean. Data sources change. Weird edge cases appear. A country disappears from one dataset. Another source changes a variable name. An indicator turns out to mean something slightly different than you thought. But there is still a boundary around the problem. A PhD changes that boundary. Now I have to think about a system that may need to survive several years of research, new questions I have not formulated yet, datasets I have not discovered yet, and methodological decisions I will probably reconsider more than once. Suddenly, "Does it work?" becomes a surprisingly weak design criterion. The more useful

2026-08-29 原文 →
AI 资讯

pandas pct_change and cumsum: Percent Change and Running Totals

By Michael Nocito , data analyst · Published August 8, 2026 By the end of this page you can turn transactions into a monthly series, add period-on-period change and a cumulative total, get a share-of-total column, smooth a noisy line, and run all of it separately for every group. It is about twenty-five minutes, and every number below came out of running the code. Here is what to do today, on the series you already have. Count its rows against the number of periods in your date range. If your data covers January to May and the series has four rows, a period produced nothing, it never became a row, and every change figure after the gap is comparing the wrong pair. The short version: pct_change() divides each value by the one in the row above; cumsum() adds everything up to and including the current row. Both trust the rows you gave them to be the periods you meant. What happens when the previous period is zero is the idea, so it gets the picture. The original carries a diagram here. In words: Three bar positions stand on a baseline, labelled Mar, Apr and May. The March position holds a tall bar and the May position holds a slightly shorter tall bar. The April position holds no bar at all; there is only a short flat mark sitting on the baseline where a bar would start, drawn in amber to show a value of zero. An arc runs from the top of the March bar down to the April mark, and the figure minus one hundred percent is printed on it, which is a perfectly ordinary answer. A second arc runs from the April mark up to the top of the May bar, and the symbol printed on that one is not a percentage at all but the sideways figure eight that means infinity. The picture shows that a fall to nothing has an answer and a rise from nothing does not. Every number on this page is real. The sixteen-row orders table used across this whole set of guides, run in pandas 3.0.2. It runs from 5 January to 25 May 2026 and contains no April orders at all, which is not staged for this page; it is

2026-08-29 原文 →