Painel de Notícias

Tecnologia

7045 posts · 26 feeds · tópicos e interesse por Jev

Filtros
dev.to

Cohort Retention in pandas: Three Mistakes That Make Your Curve Lie

Cohort retention tables look simple: group customers by the month they started, count how many are still around each month after, divide. Then the curve on the slide says retention falls off a cliff at month three, and it's not true. Most retention charts that lie do it in one of three ways. Here is a small pandas version that avoids all three, with the numbers each mistake would have produced instead. One row per customer per month in which they paid. Synthetic, small enough to check by hand: import pandas as pd payments = pd.DataFrame({ "customer_id": ["a", "a", "a", "a", "b", "b", "c", "c", "c", "d", "e", "e", "e", "f", "f", "g"], "paid_month": pd.to_datetime([ "2025-01-01", "2025-02-01", "2025-03-01", "2025-04-01", "2025-01-01", "2025-03-01", "2025-01-01", "2025-02-01", "2025-04-01", "2025-02-01", "2025-02-01", "2025-03-01", "2025-04-01", "2025-03-01", "2025-04-01", "2025-04-01", ]), }) last_complete_month = pd.Timestamp("2025-04-01") last_complete_month matters more than it looks. It's the last month you have full data for, and it decides which cells in the table are real. def months_between(later, earlier): return (later.year - earlier.year) * 12 + (later.month - earlier.month) # 1. Cohort = first paid month. payments["cohort"] = payments.groupby("customer_id")["paid_month"].transform("min") # 2. Period 0 is the cohort month itself. payments["period"] = months_between(payments["paid_month"].dt, payments["cohort"].dt) # 3. Distinct paying customers per cohort and period. counts = ( payments.drop_duplicates(["customer_id", "paid_month"]) .pivot_table(index="cohort", columns="period", values="customer_id", aggfunc="nunique") .fillna(0) ) # 4. Divide by cohort size. cohort_size = counts[0] retention = counts.div(cohort_size, axis=0) # 5. A cohort that hasn't reached a period yet is unknown, not zero. months_observed = months_between(last_complete_month, retention.index) observable = pd.DataFrame( {p: months_observed >= p for p in retention.columns}, index=retentio

Dev
Interesse
dev.to

Lichess Introduces Chess Board Image Upload Feature with ChessQueries Lite v4 ML Model for Automatic Position Detection

Lichess, a leading online chess platform, has just rolled out a game-changing feature: chess position image recognition. This innovation allows users to upload a photo of a physical chess board, and the system automatically detects and digitizes the position using the ChessQueries Lite v4 ML model. To access this feature, users simply navigate to the Board Editor and click “From image.” This advancement is not just a technical feat but a paradigm shift in how chess players interact with digital platforms. By bridging the gap between physical and digital chess, Lichess addresses a long-standing pain point: the cumbersome process of manually inputting board positions. The feature’s underlying mechanism relies on machine learning algorithms that analyze pixel patterns, piece shapes, and spatial relationships within the uploaded image. The ChessQueries Lite v4 model, developed by Joel Seytre, processes these visual inputs to reconstruct the board state with remarkable accuracy. The significance of this feature extends beyond convenience. It democratizes access to advanced chess analysis tools, particularly for players who prefer physical boards or lack familiarity with traditional input methods. However, its success hinges on the model’s ability to handle edge cases, such as poor lighting, skewed angles, or non-standard piece designs. Failure to account for these scenarios could lead to misdetection, undermining user trust. For instance, a tilted image might cause the model to misinterpret piece positions due to distorted spatial relationships, triggering a cascade of errors in the detection pipeline. In a competitive digital landscape, such innovations are critical. Without tools like this, chess platforms risk stagnation, failing to meet the evolving demands of a diverse user base. Lichess’s move underscores its commitment to staying ahead, leveraging technology to enhance both accessibility and engagement. As chess continues its global resurgence, driven by online pl

IA
Interesse
dev.to

AI Nature Explorer: Bringing People Closer to Nature

Hi everyone! For the Week 1 Hacktoberfest DEV Challenge "Touch Grass", I am sharing an idea about using open-weight AI models to connect people with the environment. My project idea is an "AI Nature Explorer" app. It uses a lightweight, open-weight language model (like Google's Gemma) that can run offline on a mobile device without requiring internet access. How it works: Hikers or students can take a photo of an unknown plant, leaf, or bird while exploring a forest or park. The local offline AI model analyzes the visual features and identifies the species instantly. It provides eco-friendly tips on how to care for that local plant or avoid invasive species, helping people engage deeply with nature instead of being glued to social media. By utilizing open-weight AI models that operate locally, we can safely navigate remote areas where there is no internet, truly enabling tech enthusiasts to "touch grass" and enjoy the physical world!

IAMobile
Interesse
dev.to

Building a Real-Time Notification System at Scale: The Gandalf Approach

The Quest Begins (The "Why") I still remember the first time our notification service started to feel like a dragon hoarding gold. We were pushing out real‑time alerts for a fledgling social app—likes, comments, follow requests—everything had to arrive within a second or users would think the app was broken. At first we just fired off a database write for every event, assuming our modest PostgreSQL could keep up. Spoiler: it couldn’t. During a peak hour, the write queue grew longer than a line at Comic‑Con, latency spiked to 12 seconds, and our monitoring lit up like a Christmas tree. Users started complaining that they missed important updates, and the support team was drowning in tickets. We needed a way to throttle the flood without losing the real‑time feel that made our product special. The quest was clear: design a system that could smooth out bursts, protect our backend, and still deliver notifications as fast as possible. After a few sleepless nights (and way too much coffee), the breakthrough hit me while I was re‑watching The Lord of the Rings: Gandalf doesn’t try to stop the flood; he guides the water. In other words, instead of trying to block every notification outright, we let a controlled amount through, store the excess for later, and release it smoothly when the system can handle it. The concrete shape of that idea is a token bucket rate limiter combined with a sliding‑window counter backed by Redis, with a tiny in‑memory fallback for sub‑millisecond bursts. Here’s why this beats the usual alternatives: Approach Pros Cons Global DB write per event Simple, strong consistency Overwhelms DB, high latency Fixed‑window counter (e.g., INCR + EXPIRE) Easy to implement Allows burst at window edge → thundering herd Pure token bucket (local) Low latency, smooth No shared state → limits per instance, not per service Token bucket + Redis + local fallback ✅ Shared, smooth rate ✅ Burst absorption ✅ Fast path via local cache ✅ Graceful degradation if Redis hiccups

Dev
Interesse
dev.to

I built a tarot site with Claude, and the biggest thing I learned in these 40 days is…

[]( )After I figured out my direction, I used Claude to build a tarot site. In 40 days I opened 287 tasks and finished 222 PRs. I tried to rely on AI completely and drop the traditional way of doing engineering, so I only did two things: tell it what I want, and look at the page (nod or shake my head). The biggest thing I learned in the whole process is that for building websites or apps today, AI is really good at imitating. You only need to give it a good example, a good thing from first principles, and it breaks it down faster than I do and copies it in more detail than I do. So what's left for the human brain is just two things: knowing clearly what a good result is, and judging where a good result will lead. I feel using AI now is like being a boss. You can ask it for results directly, but only if you know yourself what a good result looks like. Here's one suggestion for everyone, especially if you're building for a global market: go through the startups listed on TrustMRR. Their revenue is read directly from the Stripe payment backend. So it's a library of answers the market has already verified, which means correct, good results. From first principles, a good result means it got something right. Whatever category you want to build in, I think it's worth going there and looking around. TrustMRR's homepage. The revenue on it is read from payment backends For my category, for example, I could look for fortune-telling, divination and other related apps, and study their site shape, homepage title, page structure, sitemap, llms.txt and structured data, and figure out how each step is written, so the model can learn from it and do the same. At the same time I let it analyze the business model behind them. Browsing by category, the top earner in Entertainment is an AI fortune-telling and astrology app You can also look at the sites that are already verified: how their homepage and small tools are built how they pass information to AI, and whether they even have MCP h

IA
Interesse
dev.to

Cross-Chain Bridge Risk Assessment: Portal

Cross-Chain Bridge Risk Assessment: Portal Target Protocol: Portal (TVL: $1879.5M) Portal – Cross‑Chain Bridge – Technical Security & Audit Report Prepared by: Senior DeFi Security Researcher Date: 7 Oct 2026 Portal is a high‑value cross‑chain bridge that currently locks ≈ $1.88 B of assets across Ethereum and multiple L2 roll‑ups (Optimism, Arbitrum, zkSync, StarkNet). The bridge’s core architecture consists of: Component Description Lock‑&‑Mint Smart‑Contracts (Ethereum Mainnet) Custodial contracts that lock native assets and emit events for off‑chain relayers. Mint‑&‑Release Contracts (L2s) Minimal proxy contracts that mint wrapped tokens (e.g., wETH‑L2) upon validated proofs. Relayer Network A set of permissioned/permissionless relayers that aggregate signatures from a Validator Committee (≈ 30 members) and submit Merkle proofs to L2 contracts. Validator Committee Off‑chain entities that observe lock events, generate state roots, and sign proofs. Committee members are selected via a staking‑based voting system. Governance Module On‑chain DAO that can add/remove validators, upgrade contracts (via a Timelock), and adjust fee parameters. The bridge’s attack surface is typical of any multi‑chain asset transfer system: smart‑contract logic, cross‑chain message verification, validator consensus, and governance. While Portal’s codebase follows modern Solidity patterns (≥ 0.8.19) and uses OpenZeppelin libraries for access control, several systemic and implementation‑level weaknesses have been identified that could enable asset loss, censorship, or a total bridge freeze. Overall Risk Score: 7.4 / 10 (High). The score reflects the large TVL, the reliance on a relatively small validator set, and the presence of multiple medium‑severity vulnerabilities that are exploitable under realistic threat models. # Vector Description Impact Likelihood CVSS‑3.1 (Base) 1 Validator Collusion / Sybil Attack The validator committee (30 members) is selected via a staking‑based voting syste

SegurançaDev
Interesse
dev.to

Why I made my WordPress backup app self-hosted, not SaaS

Most backup tools for agencies are SaaS. When I built SiteVault, the app I use to back up client WordPress sites, I went the other way. Here's the reasoning, and what it changed technically. The credential problem A backup service needs access to the site: FTP/SFTP for files, database credentials for the dump. In a SaaS model, the provider stores those for every client of every agency using it. That's a high-value target, and as a solo developer I didn't want to be responsible for it. Self-hosted flips that. Each agency runs its own instance, so the credentials never leave their infrastructure. How the backups actually run Instead of pulling everything over FTP from the outside, SiteVault installs a small MU plugin connector on the WordPress site. The connector runs the backup server-side and the app orchestrates it. That makes it faster and more reliable on large sites. Each run is logged step by step (size, status, duration), and after it completes, the client gets an email report. Email goes through Resend. Packages instead of manual cron Backups are scheduled by maintenance package instead of per site: Basic (monthly), Pro (weekly), Agency (daily + monitoring). Each package defines its frequency and how many backups to keep, so retention is handled automatically. The trade-offs Self-hosted means the buyer handles hosting and updates. In return, they own the code, can customize it, and pay once instead of monthly. I'm selling SiteVault with full source code on https://market.designzonic.com/product/sitevault. If you've built something similar, I'd like to hear how you handled backup storage and retention.

InfraDev
Interesse
dev.to

Your Push Request Succeeded. The Device Key Is Dead.

Your server sends a push request and gets a successful response. Somewhere in the target list is a device key that stopped working weeks ago. The response can't identify it because the provider hasn't answered yet. What is Codename One? Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase. Learn more at codenameone.com. BuildCloud now sends delivery feedback to your backend. It closes the gap between admitting the request and learning what happened during provider delivery, so your own device database can stop retaining keys that the provider has rejected. The feedback is a signed daily digest, configured per organization on Pro and above. It isn't an immediate webhook for every notification, and provider acceptance isn't proof that a device displayed or a person read the message. In the Console, open Push > Settings > Delivery feedback. Set an HTTPS endpoint, enable the daily digest, and use Send test event to exercise the receiver. The card supplies the signing secret and reports what the endpoint returned. The setting belongs to the organization, so a digest can contain outcomes for several applications. Store the deliveryId returned by a v3 send alongside the application and target you sent to. Classic sends don't return that ID, so their correlation uses the device key. A successful send response is an admission result. The later digest describes provider outcomes. Keeping those two stages separate prevents a successful HTTP request from becoming a misleading “delivered” label in your own administration UI. The digest itemizes failures and summarizes accepted deliveries. This shortened example shows the part a cleanup handler needs: { "deliveryId": "6f0f6f1e-9a1e-4f2a-9a7a-6d5f5f6a1b02", "provider": "fcm", "token": "example-device-token", "status": "FAILED", "reason": "INVALID_TARGET", "attempts": 1 } Reason What your device store should do INVALID_TARGET Remove the rejected key P

DevInfraMobile
Interesse
dev.to

Don't blame AI before you check your architecture

Give an AI coding agent a small task: add voucher activation to an existing subscription system. The generated code might look reasonable. The endpoint works, the response is correct, and the happy-path test passes. But the voucher rules now live in a controller, next to a database query and a call to a payment provider. Was the model bad? Maybe. I would also look at the examples the repository gave it. If similar rules already live in controllers, services and persistence callbacks, “follow the existing architecture” leaves quite a lot open to interpretation. A human joining that project would have questions too. This is where I think architecture deserves more attention in AI-assisted development. The structure of a project supplies context for the next change. Clear responsibilities make that change easier to describe and its mistakes easier to detect. PHP and Symfony make a useful example here. PHP sometimes gets dismissed before the discussion even starts, but typed interfaces, dependency injection and static analysis give us plenty to work with. Consider an illustrative subscription application. Customers can already buy a subscription through a payment provider. Now we want this feature: Allow a customer to activate a subscription with a voucher. That sentence leaves business decisions open. Does the voucher cover a particular plan? Can it be redeemed more than once? What happens if the customer already has an active subscription? For this example, let's choose explicit rules: a voucher activates one eligible subscription, expires at a defined time, and can be redeemed once. An already-active subscription must be rejected. Voucher activation must not charge the customer. These are invented requirements for the example, not a report from a production system. Suppose the relevant code looks like this: src/ Controller/SubscriptionController.php Service/SubscriptionManager.php Service/PaymentHelper.php Entity/Subscription.php Repository/SubscriptionRepository.php

Dev
Interesse
dev.to

🌱 TerraPulse — Touch Grass with Open-Source AI

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass TerraPulse is an open-source AI-powered experience designed to help people step away from their screens and reconnect with the real world. Instead of giving users another endless stream of digital content, TerraPulse turns the idea of “touch grass” into an actionable experience. It encourages users to get outside, explore their surroundings, take a break from the screen, and complete simple real-world activities. The idea is simple: Less scrolling. More exploring. More living. 🌱 TerraPulse is built for students, developers, and anyone who spends too much time behind a screen and needs a small push to go outside. 🌐 Live Demo: https://ankitkumar810.github.io/Touch-Grass-AI/ 💻 GitHub Repository: https://github.com/ankitkumar810/Touch-Grass-AI The project is open source and available for anyone to explore, modify, and contribute to. TerraPulse was built around open-source AI, rather than relying entirely on a closed AI API. The project combines a lightweight web experience with AI-driven interactions designed around one goal: turning AI from something that keeps you on a screen into something that encourages you to leave it. The core experience focuses on generating or guiding users toward real-world activities and challenges that can be completed away from their devices. Frontend: HTML, CSS, JavaScript AI: Open-source AI models / tooling Deployment: GitHub Pages Source: GitHub The project was intentionally kept lightweight so that the experience remains accessible and easy for others to understand, fork, and build upon. The whole idea behind TerraPulse is that technology doesn't always have to compete for our attention. Open-source AI makes it possible to experiment, customize, and build experiences around AI without being completely locked into a single proprietary ecosystem. For a project like TerraPulse, that means I can explore a different question: What if we used AI to help

IA
Interesse
Wired

Meet the Vendors Selling ‘Cornell Seven’ Merch

Brands, influencers, and Etsy sellers claim they're hawking T-shirts, mugs, and buttons out of solidarity with the woman who accused seven male classmates of sexual assault. Some say it’s shameless.

Geral
Interesse
The Verge

ChatGPT’s ‘Intelligent UI’ update fills its responses with pictures, charts, and buttons

OpenAI is launching a new Intelligent UI feature in ChatGPT that allows the chatbot to answer your questions with interactive visuals. The update, which is rolling out to all users alongside GPT-6, gives ChatGPT the ability to combine a text response with diagrams, charts, forms, tappable buttons, and more. In a blog post explaining the change, OpenAI says it trained GPT-6 when to generate interactive visuals over text, as well as how to format them in its response. An example shared by OpenAI shows how ChatGPT might show a diagram of a seven-speed bicycle if you ask about its design, complete with interactive buttons that highlight differe … Read the full story at The Verge.

IA
Interesse
The Verge

The first Nvidia RTX Spark laptops cost up to $7,000

The 15-inch Surface Laptop Ultra starts at $2,599. | Photo by Tom Warren / The Verge The first array of laptops powered by Nvidia's new RTX Spark chip are designed to compete with high-end MacBook Pros - and they've got some high-end prices to match. The flagship Surface Laptop Ultra and RTX Spark laptops from Dell, Lenovo, MSI, HP, and Asus start as low as $2,599 for configurations with an 18-core CPU, 24GB of unified memory, and 512GB of storage. That's close in price to a similarly specced 14-inch MacBook Pro with M5 Pro chip, though Apple includes 1TB of storage. But the prices for both RTX Spark and Apple laptops of course go much, much higher. Of the pricing we've seen so far, a kitted-out Asus ProArt P16 RTX Spark … Read the full story at The Verge.

Geral
Interesse
dev.to

How to use the OpenAI Decisions API with Strands Agents

OpenAI shipped a Decisions API. It isn't a chat model you coax into choosing: it answers a bounded question directly. You give it a request and a fixed list of options, it returns one of them with a confidence. No generated text, no option it invents, nothing to parse. The returned choice is always one you supplied. An agent is full of bounded questions, so I wired it into a Strands Agents agent two ways. Both are in the repo and both run. Here they are side by side. Both uses share one request shape, through the official async client: from openai import AsyncOpenAI oai = AsyncOpenAI() # reads OPENAI_API_KEY resp = await oai.decisions.create( model="gpt-6-luna", input="How much is a room at the Cliffside Resort?", questions=[{ "type": "choice", "name": "pick", "instructions": "Which option best answers this request?", "choices": [ # one {value, description} per option {"value": "get_hotel_room_rates", "description": "Nightly room rates for a hotel"}, {"value": "get_weather", "description": "Current weather for a city"}, ], }], ) answer = next(a for a in resp.answers if a.name == "pick") answer.choice # -> "get_hotel_room_rates" answer.confidence # -> 0.97 What changes between the two uses is only what the choices are: tools in one, models in the other. Both are below. One narrows the toolbox a model sees; the other picks which model runs. Pick the one your agent needs, or use both. Give a small model forty overlapping tools and it picks the wrong one or invents one. Every tool is also tokens it pays for on every turn: name, description, schema. Choosing the relevant tool before the model runs fixes both, and in Strands that choice lives in a hook (BeforeModelCallEvent), because it changes what the agent sees: the hook swaps the agent's tool registry down to the pick. The selector is one function; everything else is the hook. oai_choices = [{"value": t.tool_name, "description": t.tool_spec["description"]} for t in ALL_TOOLS] async def openai_select(query): resp = awa

IADev
Interesse
Hacker News

Meta and Microsoft Limit Employee Use of Claude AI Tools

Article URL: https://www.rswebsols.com/news/meta-and-microsoft-take-steps-to-reduce-employee-usage-of-claude-ai/ Comments URL: https://news.ycombinator.com/item?id=49997161 Points: 22 # Comments: 12

IA
Interesse
dev.to

How to submit handwritten homework as one readable PDF from your phone

Plenty of courses still run on paper. You solve the problem set by hand, and then the learning platform (Google Classroom, Canvas, Moodle, a college portal) asks for "a single PDF". The same few problems tend to come up: pages out of order, sideways photos, pencil that vanished in compression, and a huge file that's slow to open on a laptop. Here's a short workflow that avoids all of them, using nothing but the phone you already have. A few small choices make the photo far easier to read later: Use a dark pen or a soft pencil (2B or darker). Light HB pencil looks fine on paper and almost disappears once the file is compressed. Leave a margin. Writing right up to the edge means the edge is what gets cropped. Number every page at the top, like "Q3 – page 2 of 4". If anything ends up out of order, the reader can still follow it. Write your name on page one. File names get renamed by portals; the page doesn't. Consistency matters more than an expensive camera. Put the sheet on a plain, darker surface so the page edge stands out. Stand so the light comes from the side. Overhead light puts your phone's shadow right across the middle of the page. Hold the phone flat and parallel to the paper. Tilted shots turn the page into a trapezoid, and the bottom lines get smaller and blurrier. Fill the frame with the page but keep all four corners visible. Skip the flash. On glossy worksheets it creates a white patch exactly where your working is. Take a second shot of any page you're unsure about. Re-shooting now takes five seconds; re-shooting after the deadline isn't possible. Phones store rotation as a flag in the photo's metadata, and not every app respects it. A page that looks upright in your gallery can come out sideways in a PDF. Open each photo once, and if it's rotated, use the gallery's rotate button and save. That bakes the rotation into the image itself. Most portals accept one file per assignment, so merge everything into a single document. I use JPG to PDF Mobile, a f

Mobile
Interesse
dev.to

What Is Open-Source AI? Why It's Reshaping the Industry in 2026

A year ago, "open-source AI" mostly meant a hobbyist project you could run on a decent gaming PC, several steps behind whatever OpenAI or Anthropic had just shipped. That gap has closed faster than almost anyone predicted. By 2026, open-weight models are turning up in enterprise procurement conversations next to the big proprietary names, not as a cheaper fallback but as a genuine contender. A model is genuinely open source, in the strict sense, when it carries an OSI-approved license like Apache 2.0 or MIT, with no meaningful restrictions on commercial use. Mistral Large 3, Gemma 4, and the open Qwen line fall into this category. A lot of what gets called "open source AI" is more accurately open weight: the weights download freely, but the license attaches real conditions. Meta's Llama caps free commercial use at 700 million monthly active users and adds EU-specific restrictions in Llama 4. Qwen's actual flagship model, Qwen3.7-Max, is proprietary and API-only, only the smaller models in the line are genuinely open. Meta's Llama leads cumulative downloads at roughly 476 million, reflecting its early head start. But DeepSeek passed Mistral in downloads in January 2026, and on OpenRouter's token-processing data, DeepSeek served roughly 14.4 trillion tokens between late 2024 and late 2025, ahead of Qwen and Llama. Four of the five leading open-model families by adoption right now, Qwen, DeepSeek, GLM, and Kimi, come out of Chinese labs. A 2026 study tracking over 2,200 enterprise buyer discussions found cost and data sovereignty came up repeatedly as deciding factors, more than raw benchmark scores. A separate claim that 89% of enterprises use open-source AI traces back to a single vendor blog and deserves skepticism. Hugging Face's own developer data is more carefully sourced: 79% of developers report using open models, against 71% using closed ones, numbers that overlap since most developers use both. In 2026, the US government restricted DeepSeek's hosted chatbot a

IA
Interesse
The Verge

It appears .agent and .agi are about to be the hot new domains

What’s in a URL anymore, really. For the first time in years, the Internet Corporation for Assigned Names and Numbers - better known as ICANN - is accepting applications for new top-level domains. These are the suffixes at the end of all URLs, and you may know them as things like .com, .org, and .pizza. ICANN just announced the 1,615 applications that have been submitted so far, from 481 different applicants. The trend will not surprise you: AI is everywhere. Ten different companies, including both Meta and OpenAI, applied for the .agent domain. Seven, including OpenAI, applied for .agi. Six, including OpenAI, applied for .asi, clearly attempting to get in on President Tru … Read the full story at The Verge.

IA
Interesse