SShortSingh.
Back to feed

Developer's Upload Pipeline Uses Ledger Script to Prevent Duplicate Stock Asset Posts

0
·4 views

After accidentally re-posting 14 vectors to a marketplace, which drew a complaint email, a developer built a small upload pipeline to stop duplicate submissions. The kit includes four scripts: a metadata builder that outputs the exact CSV header each platform requires, a standard-library ledger that tracks completed uploads, a Markdown-to-PDF converter, and a packager that creates zips with cover images and thumbnails. The developer reports the workflow handled 39 products totaling 856 MB on a single-core server with 2 GB of RAM and no GPU. The project relies on only two third-party packages, Pillow and reportlab, while the metadata and tracker scripts use the standard library alone.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Low Chilled Water Delta-T Halved Chiller Capacity in One Building

A chilled water system's delta-T, the gap between warm return water and cold supply water, determines how much cooling a chiller delivers, and a drop in that gap can sharply reduce output even at full compressor speed. In one example, a 300-ton chiller running at 600 GPM fell from a 12°F design delta-T to 5°F, cutting its capacity to about 125 tons. Causes included three-way bypass valves on air handling coils, fouled coil surfaces, and pump speeds set too high, which forced a second chiller to run on peak days. Converting to two-way valves and chemically cleaning the coils restored the delta-T to 10°F, letting one chiller handle the load and saving an estimated $47,000 a year. The article advises measuring supply and return temperatures and comparing the result to design values to diagnose similar problems.

0
ProgrammingDEV Community ·

Analyst's '5% for chatbots' compute figure may obscure how workloads are classified

A Nomura estimate suggesting chatbots consume about 5% of global AI compute has circulated among Chinese AI developers as a humbling corrective. The author argues the figure is rough and lacks a public methodology, so its bucket boundaries, especially where tool-using agent sessions fall, are unclear. Because agentic workloads are largely chatbot-style sessions with tool calls added, assigning them to a separate category could understate conversational inference. The piece also contends that chatbot inference is synchronous and latency-sensitive, making it costlier per unit than batched recommendation workloads. Therefore, a small percentage of total compute may not imply that chatbot infrastructure is unimportant to future planning.

0
ProgrammingDEV Community ·

Four Python scripts that packaged 39 stock products and cut out tedious upload errors

A developer describes an evening of repeated CSV rejections from stock platforms, which pushed them to write small tools instead of relying on manual spreadsheet fixes. The package includes a metadata generator that builds platform-specific upload files, an upload tracker that prevents duplicate submissions, and utilities for converting Markdown to PDF and bundling products with covers and thumbnails. The author recommends running one process at a time on limited hardware and measuring peak memory usage. Only two of the four scripts need third-party libraries, so some users can skip installing them entirely.

0
ProgrammingDEV Community ·

How an MCP payment gateway prevents AI agents from paying twice on retried API calls

When an AI agent's paid API call succeeds on payment but the response is lost, a naive retry can charge the agent again for the same work. The gateway's first layer relies on x402 on Base, where each signed USDC authorization carries a nonce the token contract accepts only once, so a resent payment fails on chain. For order payments, agents can attach a payment identifier that returns the stored result for repeated requests for 24 hours, while mismatched details trigger a conflict error. Payments whose settlement status is unclear are treated as unknown rather than failed, and a background job checks the chain to resolve them without ever re-settling. Tool calls are charged only when a response is delivered, so provider failures are not billed.