AI 资讯
OpenAI Usage API api_key_id: Reconcile Tokens and Costs by Key
OpenAI Usage API api_key_id grouping solves a practical reporting gap: I can see which API key produced completion-token activity and which key accumulated cost. The tricky part is not making the two requests. It is joining their daily buckets without dropping unattributed or unmatched data. I want a reconciliation report to expose gaps, not smooth them over. A missing cost row, a cost-only row, or a null key ID can each be useful evidence. This pattern keeps those cases visible with a deterministic .NET sample that needs no credentials or paid calls. Why OpenAI Usage API api_key_id needs a full-outer join OpenAI's August 4, 2026 API changelog added API-key filtering and grouping to the usage and cost APIs. That gives both responses a shared operational dimension, but it does not make them identical datasets. The completions usage endpoint reports measures such as input tokens, output tokens, and model requests. Its api_key_id can be null. The costs endpoint returns monetary amounts and currency, also with a nullable API-key dimension. An inner join would retain only rows present in both responses. That is attractive for a tidy chart, but unsafe for reconciliation. It can hide a key that has token usage but no matching cost row, a key with cost but no completion row, or an unattributed bucket. I use a full-outer join keyed by (start_time, end_time, api_key_id) instead. Null or blank IDs become an explicit display value such as <unattributed> ; they do not disappear. Query both APIs at the same daily grain The Costs API supports daily buckets, so I request bucket_width=1d from both endpoints. I also group by the same single dimension: GET /v1/organization/usage/completions ?start_time=... &end_time=... &bucket_width=1d &group_by=api_key_id GET /v1/organization/costs ?start_time=... &end_time=... &bucket_width=1d &group_by=api_key_id Both resources paginate with has_more and next_page . I keep requesting pages until has_more is false. If a response says more data exis
AI 资讯
How to Write a 5,000-Word Masterpiece That Hits DR 20, 1K Daily Views, and Secures Google AI Position 0
We've all heard the modern blogging advice: "Keep it short, write for humans, don't write novels." While short-form content has its place, long-form technical guides—when executed correctly—are absolute powerhouses. Writing a comprehensive, 5,000-word deep dive isn't about padding your word count with fluff; it's about building an irresistible, authoritative resource that search engines and developers simply cannot ignore. If done right, a single 5,000-word post can push your brand-new domain to a Domain Rating (DR) of 20 , pull in 1,000+ daily organic views , and land your site directly inside Google's AI Overviews (Position 0) . Here is the exact framework to pull this off. 1. Why 5,000 Words Still Works (When Done Right) Long-form content isn't dead— shallow long-form content is . When you cover a complex technical topic thoroughly, three things happen: High Information Gain: You answer questions that 500-word summaries skip over. Natural Keyword Spreading: You rank for hundreds of long-tail queries without keyword stuffing. Passive Backlink Generation: Developers, bloggers, and tech curators link to comprehensive references instead of surface-level posts. 2. Targeting the Right Topic You can't write 5,000 words on "How to install Node.js." You'll run out of meaningful things to say by page two. To sustain this length and quality, choose topics that have depth, high friction points, and multiple moving parts . Ideal Candidates: The Ultimate Architectural Guide: e.g., "Building a Multi-Tenant Microservices Architecture with Go and PostgreSQL" End-to-End Production Blueprints: e.g., "From Zero to Production: Deploying Next.js, Redis, and Prisma on AWS EKS" Comprehensive Comparative Deep Dives: e.g., "State Management in 2026: An In-Depth Benchmark of Redux, Zustand, Jotai, and Signal" 3. How to Structure for Readability & Google AI (Position 0) Google’s AI Overviews look for clean, structured answers to extract directly into Position 0. If your post is an unorganiz
开发者
George Santos Just Got Hit With Kalshi’s First-Ever Lifetime Ban
The former US representative was also fined more than $71,000 for allegedly attempting to manipulate the prediction market.
开发者
Let’s Use the Emergent CSS random() Function in all the Browsers
The journey to create a polyfill for the upcoming CSS random() function that works in all browsers. Let’s Use the Emergent CSS random() Function in all the Browsers originally handwritten and published with love on CSS-Tricks . You should really get the newsletter as well.
科技前沿
Honor Robot Phone hands-on: A gimbal phone experiment with promising results
Honor crammed a gimbal camera into a phone in a promising hardware experiment.
开发者
How to disable absolute Bluetooth volume on Android (and why you might want to)
Sometimes the volume control on a Bluetooth device behaves unpredictably. This quick fix in your Android phone's settings is a good troubleshooting step.
开发者
DoorDash’s Flux Runs 130,000 Engineering Tasks Through Cloud-Based Agents
DoorDash has moved engineering agent workloads from developer laptops to its Flux cloud platform. The platform automated 130,000 engineering tasks in one month and supports more than 25,000 automated code reviews weekly. Flux uses isolated Firecracker microVMs, an MCP gateway, reusable playbooks, and multiple invocation surfaces to run agent workflows with scoped access and centralized auditing. By Leela Kumili
开发者
What’s !important #18: , Syntax ::highlight()ing, named-feature(), and More
Well, that’s a wrap. No, not a flex-wrap, but rather today marks a new day, week, month, season, aaaand new edition of What’s important (#18), bringing you the best content that developers have produced over the last couple of weeks or so. What’s !important #18: <geolocation>, Syntax ::highlight()ing, named-feature(), and More originally handwritten and published with love on CSS-Tricks . You should really get the newsletter as well.
AI 资讯
Garmin Cirqa review: A fine but utterly inessential smart band
Garmin's Cirqa band lacks the software and AI insights to make it a true Whoop rival.
AI 资讯
Grok 4.6 Is Now in Foundry — Here’s What It Means If You Write C#
Grok 4.6 — SpaceXAI's latest frontier model — just landed in public preview in Microsoft Foundry as an Azure Direct Model. The headline isn't "another big model dropped." It's that Grok 4.6 is built specifically for long-horizon, agentic work: planning across many steps, calling tools reliably, recovering when something goes wrong, and handing you a finished work product instead of a half-baked fragment you have to stitch together yourself. That's a meaningfully different design target than "answer this one prompt well." And it's exactly the kind of thing that matters once you move past demos and start building agents that actually have to survive contact with real workloads. As always: no Python required, no notebook required. Just Microsoft.Extensions.AI and dotnet run . What Grok 4.6 Actually Is A few things worth knowing before you touch any code: Frontier reasoning at value pricing. Grok 4.6 is positioned as the value-tier frontier option — frontier-class reasoning at a materially lower cost per task than comparable models. That matters the moment "reasoning agent" stops being a one-off demo and becomes something running continuously in production. Selectable reasoning effort. You choose reasoning depth per call — low , medium , high , or xhigh (default high ) — instead of paying maximum-reasoning cost on every single request regardless of whether the task needs it. Long-horizon agentic execution. It's designed to sustain complex, multi-step work — planning, tool calls, error recovery, and self-verification — with limited human babysitting. Multimodal input. Text and images, so document-heavy, diagram-heavy, and screenshot-heavy workflows don't need a bolted-on separate vision pipeline. 200K token context window at launch. Solid for most agentic and document-analysis workloads — just set expectations up front if your scenario needs more. Still preview. Validate against your own prompts, tools, and safety thresholds before anything production-sensitive touches i
AI 资讯
Running Local LLMs with RamaLama and Docker on a Mac: A Hands-On Guide
RamaLama runs large language models as OCI containers, so a single command ( ramalama run smollm:135m ) pulls a model and starts talking to it, with no Python environment to babysit. I spent an afternoon putting it through its paces on an Apple Silicon Mac (Apple M4 Pro, 48 GB RAM, macOS 26.6) with Docker 29.4 provided by OrbStack. This guide is what I actually saw: the install, the first model, an OpenAI-compatible server, and the one macOS-specific catch that isn't obvious from the docs. Every command and number below is from that run, on RamaLama 0.24.0. What is RamaLama? RamaLama is an open-source CLI from the container-tooling community that treats models like container images. Instead of assembling an inference stack yourself, it pulls a hardened OCI image containing llama.cpp (or vLLM/MLX) plus your chosen model and runs it with Podman or Docker. If you've used Ollama the ergonomics feel familiar ( run , serve , list , pull ), but the runtime and model live inside containers you can inspect and sign, and weights come straight from Hugging Face, Ollama, or any OCI registry. Installing RamaLama on macOS With Homebrew it's one command: brew install ramalama That pulled RamaLama 0.24.0 and, notably, its own copy of llama.cpp , ggml , and libomp as dependencies. Hold onto that detail; it matters for GPU acceleration later. Confirm the install: ramalama version # ramalama version 0.24.0 You also need a container engine running. I used Docker through OrbStack; Podman works too and is RamaLama's default on Linux. Running your first model The headline command: ramalama run smollm:135m "In one sentence, what is a Linux container?" Passing a prompt as an argument gives you one-shot output instead of dropping into a chat REPL. On first run this pulled the RamaLama container image, downloaded the model, and answered. smollm:135m resolves to hf://HuggingFaceTB/smollm-135M-instruct-v0.2-Q8_0-GGUF , a 138 MB, 8-bit quantized GGUF from Hugging Face. First-run wall-clock was 2
AI 资讯
95% of My PySpark Job Finished in 4 Minutes. The Last Task Took 40. Here's Why.
I had a PySpark job joining a large transactions table with a customer dimension table. Nothing exotic — a standard join, then an aggregation. On paper, it looked like it should scale fine across the cluster. In practice, the job would race through most of its tasks and then stall. The Spark UI told the real story: almost every task finished in a few minutes, but one or two tasks ran for over 40 minutes while their executors sat at 80–90% CPU, and the rest of the cluster sat mostly idle waiting for them to finish. This post walks through what data skew actually is, how I confirmed it was the cause, and the fix that brought the job back under control. What data skew actually is Data skew happens when one or a few keys hold a disproportionate share of the data. When Spark distributes work across partitions — usually via hash partitioning on a join or group-by key — all the rows for a given key land in the same partition. If one key has millions of rows and most others have a few thousand, that one partition (and the single task processing it) ends up doing far more work than every other partition combined. The result is a job where 95% of tasks look completely healthy, and the remaining 5% become the actual bottleneck. Total job time is dictated by the slowest task, not the average one — so a single skewed key can dominate your entire runtime even if it represents a tiny fraction of your total row count. How I confirmed it The Spark UI's stage view was the first clue: a chart of task durations with almost every bar clustered together, and one or two bars stretching far beyond the rest. That pattern — uniform short tasks plus one long outlier — is close to a signature for skew. To confirm which key was responsible, I ran a simple aggregation on the join key before doing anything else: from pyspark.sql import functions as F df . groupBy ( " customer_id " ) \ . count () \ . orderBy ( F . desc ( " count " )) \ . show ( 20 ) The output made it obvious: a small number of cu
AI 资讯
Cold emailing profs about PhD positions? Read this [D]
This is the time of year when the number of cold emails I receive about PhD positions tends to ramp up quite a bit. In many countries, this cold emailing is essentially part of the normal recruitment process, so there is nothing inherently wrong with doing this. However, there are a few things you definitely shouldn't be doing: Massive emails. The probability of me reading your email is inversely proportional to its length. Emailing everyone. Find supervisors that work in areas you are actually interested in. I do relatively foundational ML research (i.e., not associated with a specific application domain), but the majority of emails I get from prospective students are essentially "I want to apply ML to domain X". In many cases this does not constitute an ML research direction; you'd be better off finding a supervisor with expertise in domain X, which is where most of the impact will be. Generic research interests. If the most specific research interests you can give are "Machine Learning, LLMs, and AI" then I assume you only have a surface-level familiarity with the field, and are not ready for a PhD. Passing off workshop papers as conference papers. This has become a much more common thing in the last couple of years. It's a big red flag; I am not going to take on someone who is dishonest. Excessive AI use. Using them for fixing up grammar is fine, but if you outsource your thinking to LLMs then your research direction will be the same as everyone else who outsources their thinking to LLMs. This tends to result in something that would be an okay bachelor's thesis project, but nothing more than that. I get a lot of LLM emails, so determining if you are in this cluster is very easy. Summarise my paper. I already know what's in it, I don't need a summary. I care more about how you think you could build on it, or do something related. Don't use LLMs for this; see above point. Ignoring instructions on my website. Check prospective supervisors' websites for how you shou
AI 资讯
How to assess if there is a strong signal in your dirty data [Project]
I'm sharing this new tabular data diagnostic tool (Entropic Scree). It can be used to estimate these properties of your high-d, real-world, dirty dataset: The informational volume of the signal (i.e., helps you assess whether the signal is strong enough to survive the dataset's idiosyncratic volume). The overall signal-to-idiosyncratic volume ratio (SNR). The intrinsic rank. Provides an exploratory map that allows for the identification of decoupled sub-networks of variables. The linear sufficiency (i.e., does the dataset align with the linear assumptions of standard PCA?). Instead of evaluating linear variance, rank order, or Euclidean distance like traditional PCA variants, this new method evaluates a transformed mutual information metric. Relative to these baselines, it is less reliant on strong parametric or distance assumptions, making it appropriate to apply more broadly. It also serves as a practical diagnostic of the theory explored in the From Garbage to Gold framework, which describes when and why uncurated, error-prone data can be used directly to create accurate prediction models. There is a preprint that presents the full technical details, and Python and R packages will be released soon. Right now though, the original function is already available in R (see Quick Start R Function Code below). Entropic Scree Preprint: https://doi.org/10.5281/zenodo.22028087 Entropic Scree GitHub: https://github.com/tjleestjohn/entropic-scree From Garbage to Gold Preprint: https://arxiv.org/abs/2603.12288 Let me know how it goes if you give it a try... or if you have any questions or comments of course. ############ # Quick Start R Function Code. # To load the function, copy and paste the following into your R console, then hit enter. ############ # 1. Define the direct URL to the raw function script on GitHub url <- "https://raw.githubusercontent.com/tjleestjohn/entropic-scree/main/Entropic.Scree.v1.0.0%20-%20ENLI.R" # 2. Define what you want to name the file on your co
AI 资讯
Java News Roundup: GraalVM, Jakarta Data, JNoSQL, Azul Payara, WildFly, Quarkus, Atmosphere
This week's Java roundup for August 24th, 2026, features news highlighting: the GA release of Atmosphere 4.0; point releases of GraalVM, Azul Payara and Quarkus; a maintenance release of WildFly 41; milestone releases of Jakarta Data and Eclipse JNoSQL; a beta release of the September 2026 edition of Open Liberty; and the release of Docker images for GlassFish 8.0.4. By Michael Redlich
开发者
Fixing Delicate Cache Mismatches in a Brownfield SPA: A Pragmatic Solution
How we eliminated subtle stylesheet caching glitches during deployments on DEV without a massive rewrite.
AI 资讯
Why Food Keeps Making Everybody Sick This Summer
While Trump administration cuts have contributed to the epidemic of foodborne illnesses this summer, there are also deeper issues that make the American food supply chain susceptible to parasites and bacteria outbreaks.
AI 资讯
Podcast: Scott Jenson on Evolving Desktop OS, Local-First, & Agentic UX
In this episode, Scott Jenson, a veteran UX designer known for his work on the Macintosh, Google Maps, and Chrome examines the long-term stagnation of desktop operating systems and the limitations of current mobile and cloud-centric models. By Scott Jenson
AI 资讯
You Know Who Really Hates AI? Insurance Claims Adjusters
Of the Glassdoor reviews from claims adjusters that mentioned AI, a staggering 98 percent were negative. “AI is just a tool,” one person tells WIRED. “It should never be given the keys.”
AI 资讯
Foundry Model Router Expands from Two Regions to 28, Refreshing Its Model Pool
Microsoft expanded Foundry's model router from two regions to 28 for global standard and 21 for data zone deployments, while adding Claude Opus 4.8 and GPT-5.6 and removing four deprecated models. Default deployments receive pool changes automatically; configured subsets exclude new models until added. The effective context window equals the smallest model in the pool. By Steef-Jan Wiggers