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

今日精选

HOT

最新资讯

共 29089 篇
第 181/1455 页
AI 资讯 Dev.to

From Burnout to Balance: Building an AI Overtraining Detector with HRV and Isolation Forest

Are you a data nerd who loves fitness? If you wear an Oura Ring or an Apple Watch , you’re sitting on a goldmine of biometric data. Specifically, Heart Rate Variability (HRV) —the secret sauce for understanding your nervous system's recovery status. But how do you know if a low HRV score is just a fluke or a serious sign of overtraining? In this tutorial, we are going to build a personalized HRV Anomaly Detector . Using Machine Learning , specifically the Isolation Forest algorithm from Scikit-learn , we will transform raw time-series data from the Oura Cloud API into an early-warning system for stress and burnout. This type of anomaly detection is essential for anyone looking to optimize their performance without hitting a wall. The Architecture 🏗️ Before we dive into the code, let's visualize how the data flows from your finger to our machine learning model. graph TD A[Oura Ring / Apple Watch] -->|Syncs| B(Cloud API / HealthKit) B -->|Fetch JSON| C[Python Script] C -->|Pandas Clean| D{Feature Engineering} D -->|HRV & Sleep Duration| E[Isolation Forest Model] E -->|Predict| F[Anomaly Flag: Overtrained?] F -->|Plot| G[Matplotlib Visualization] G -->|Insight| H[Rest or Push?] Prerequisites 🛠️ To follow along, you'll need the following stack: Python 3.9+ Scikit-learn : For our machine learning heavy lifting. Matplotlib : To visualize our "danger zones." Pandas : For time-series manipulation. Oura Cloud API : You'll need a personal access token (available at the Oura Cloud portal ). Step 1: Fetching Your HRV Data 🛰️ First, let's grab our data. If you don't have an Oura ring, you can export your Apple Watch data as a CSV, but the Oura API is much more convenient for automation. import requests import pandas as pd # Replace with your actual Personal Access Token TOKEN = ' YOUR_OURA_TOKEN ' url = ' https://api.ouraring.com/v2/usercollection/daily_readiness ' headers = { ' Authorization ' : f ' Bearer { TOKEN } ' } params = { ' start_date ' : ' 2023-01-01 ' , ' end_date '

Beck_Moulton 2026-07-29 08:09 5 原文
AI 资讯 Dev.to

How OAuth Works — hand out a token, never the password

"Log in with Google" — without Google ever seeing the other site's password. OAuth lets one app act on your behalf at another service without ever handling your password. Instead of credentials, apps get a scoped, revocable token. The authorization-code flow Redirect. The app sends you to the provider with the scopes it wants. Consent. You authenticate with the provider and approve (or deny) those scopes. Code. The provider redirects back to the app with a short-lived authorization code. Token exchange. The app's server swaps the code (plus its secret) for an access token. Use & refresh. The app calls APIs with the token, refreshing it as needed. Why it's safer than sharing a password Scoped. A token grants only the permissions you approved, not full account access. Revocable. You can revoke one app without changing your password. PKCE. Public clients add a proof step so an intercepted code alone is useless. The one-line mental model Hand out a narrow, revocable token — never the password itself. This is part of LearningTechBasics — one tech idea a day, each with an animated diagram and a 60-second narrated video. 📊 Animated version with the live diagram Follow @amtocbot · #LearningTechBasics

Toc am 2026-07-29 08:08 5 原文
AI 资讯 HackerNews

Show HN: Manim (3Blue1Brown's animation engine) in the browser via WebGPU

Grant Sanderson (3Blue1Brown) created Manim, the Python library he uses to make the math animations in his videos. We reimplemented Manim with the same Python API, but the implementation underneath is Rust, connected to Python through PyO3. The Rust code uses wgpu, so rendering happens on the GPU. To run it in the browser, we compiled the Rust parts to WebAssembly so the PyO3 extension loads in Pyodide. In the browser, wgpu targets the WebGPU API, so animations render in real time on your GPU th

sinaatalay 2026-07-29 08:07 1 原文
AI 资讯 Dev.to

How to make contract engineers actually work: lessons from the other side

We place contract engineers into teams across North America and Europe, which means we've watched the same engagement succeed at one company and stall at another — with the same engineer. The difference is almost never the engineer. It's a handful of structural choices the client makes in the first two weeks. Treat week one as an investment, not a cost The engagements that compound all look the same at the start: the contract engineer gets a working dev environment on day one, a real (small) ticket in the first week, and a named person to ask questions of. The ones that stall spend three weeks "getting access sorted" while the engineer bills hours reading a wiki. If your security process takes two weeks to provision access, start it before the start date. This sounds obvious. It is skipped constantly. Give outcomes, not tickets A contract engineer who receives pre-chewed tickets performs like a junior no matter how senior they are, because all the judgment was spent by whoever wrote the ticket. The teams that get senior output hand over problems: "our nightly pipeline overruns into business hours — own it." Then the engineer's experience actually gets used, and the interesting decisions surface in review where your team can see the reasoning. Timezone offset is a feature if you design for it With a team in India and a client in New York, there are roughly four hours of overlap and twenty hours of relay. Teams that fight this — insisting on full-day synchronous presence — burn out the engineer and get the worst of both worlds. Teams that design for it get a genuine advantage: work specced in the client's afternoon is running by their next morning. The design is simple: overlap hours are for decisions (standups, reviews, pairing on anything ambiguous), non-overlap hours are for execution, and everything decided in a call gets written down because someone will act on it eight hours later. Measure integration, not utilization The metric that predicts a successful engage

Zephico Technologies 2026-07-29 08:01 4 原文
AI 资讯 Dev.to

A Simple Git Workflow for Small Teams

Introduction Small teams don't need GitFlow or other complex branching models. They need a workflow that's easy to understand, quick to execute, and minimizes merge headaches. Here's a practical workflow I've used with teams of 2-8 developers. The Core Idea: Main and Short-Lived Feature Branches We keep it simple with one long-lived branch ( main ) and short-lived feature branches. Every change starts from main and is merged back as soon as it's ready. git checkout main git pull git checkout -b feature/my-feature Branch Naming Convention Use a consistent prefix to keep branches organized: feature/ for new features fix/ for bug fixes chore/ for maintenance tasks Example: feature/user-authentication , fix/login-error The Workflow Step by Step 1. Start from an Up-to-Date Main Before creating a branch, make sure your local main is up to date: git checkout main git pull --rebase 2. Create a Feature Branch git checkout -b feature/awesome-feature 3. Make Small, Frequent Commits Commit early and often. Each commit should represent a logical unit of work. git add . git commit -m "Add user model with email validation" 4. Push and Open a Pull Request Even if the branch isn't finished, pushing early allows others to see your progress. git push -u origin feature/awesome-feature Then open a PR against main . Keep PRs small (under 400 lines if possible). 5. Keep Your Branch Updated If main moves forward, rebase your branch to avoid conflicts later: git checkout feature/awesome-feature git rebase main # resolve conflicts if any git push --force-with-lease --force-with-lease is safer than --force because it prevents overwriting others' work. 6. Code Review At least one other team member reviews the PR. Look for logic errors, readability, and test coverage. 7. Merge via Squash Merge When the PR is approved, use squash merge to keep main history clean: git checkout main git pull git merge --squash feature/awesome-feature git commit -m "Add awesome feature" Or use the GitHub/GitLab squ

Code Atlas 2026-07-29 08:01 3 原文
AI 资讯 Dev.to

Auto-Generating an Index of Your Claude Code Custom Agents from Their Frontmatter

This is a continuation of my "Claude Code environment" series. In the previous post, Automatically thinning conversation logs to prevent bloat , I introduced the basic pattern for scheduled launchd jobs. This time I'm using that same mechanism to automatically maintain a list of the custom agents in ~/.claude/agents/ . Dropping a single .md file into ~/.claude/agents/ adds a custom agent, but before long you lose track of how many you have, what model each one uses, and which tools each is allowed to touch. That's exactly what happened to me with the 27 agents I now have. I tried writing an INDEX.md by hand to manage them, and of course within a few days it had drifted from reality. The problem: the index rots Manually updating INDEX.md every time you add a custom agent is not sustainable. You forget you added one and leave it out You change a model later and never reflect it in INDEX.md You typo a name or description and never notice I concluded there was no sustainable way to manage this other than "generate it automatically," so I wrote agents-index.sh . The output: a real INDEX.md Here's how the top of my current ~/.claude/agents/INDEX.md looks. <!-- AUTO-GENERATED by ~/.claude/scripts/agents-index.sh — DO NOT EDIT MANUALLY --> # Agents Index (27 agents · 2026-07-28 02:02) | Name | Model | Description | Tools | |------|-------|-------------|-------| | `architect` ( [ architect.md ]( ./architect.md ) ) | opus | Software architecture specialist ... | ["Read", "Grep", "Glob"] | | `build-error-resolver` ( [ build-error-resolver.md ]( ./build-error-resolver.md ) ) | sonnet | Build and TypeScript error resolution specialist ... | ["Read", "Write", "Edit", "Bash", "Grep", "Glob"] | | `doc-updater` ( [ doc-updater.md ]( ./doc-updater.md ) ) | haiku | Documentation and codemap specialist ... | ["Read", "Edit", "Bash", "Grep", "Glob"] | Four columns: Name, Model, Description, and Tools. You can see at a glance how the models break down across opus / sonnet / haiku , and i

Lily 2026-07-29 08:00 5 原文