SShortSingh.
Back to feed

Developer Breaks Down Aspect and Orb Calculations in Open-Source Python Astrology Engine

0
·2 views

A developer has shared how they model astrological aspects and orbs in a Python-based astrology engine called GetBirthChart, available on GitHub. At its core, the system calculates how closely two planetary positions on a 360-degree circle approach a target angle, using a normalization function to handle wrap-around cases such as the short arc between 358° and 2°. Orbs — the tolerance thresholds that allow near-exact angles to still qualify as aspects — are computed as the absolute difference between the actual separation and the target angle. The engine covers major aspects including conjunction, sextile, square, trine, and opposition, keeping calculation logic strictly geometric and separate from any interpretive meaning. The developer emphasizes unit-testing individual functions over visual checks, describing the goal as making the calculation layer predictable and free of domain interpretation.

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 ·

ACH Return Codes R01–R85: What They Mean and How Developers Should Handle Them

When an ACH transaction fails, Nacha issues a specific return code explaining the exact reason for rejection, unlike generic card-payment declines. Codes R01 through R85 exist in the Nacha rulebook, with R01, R03, R04, and R10 accounting for roughly 70% of returns in most production systems. Because ACH operates on a delayed settlement model, a debit entry can be returned up to five business days after origination, requiring systems to decode the code and decide whether to retry or halt. Some codes, such as R01 for insufficient funds, are retryable after a few days, while others like R03 or R10 signal permanent issues such as invalid accounts or fraud claims that warrant immediate escalation. Developers managing payouts or recurring payments are advised to build webhook or batch-reconciliation logic that matches returns to originals via trace numbers and updates payout status atomically within Nacha's required response windows.

0
ProgrammingDEV Community ·

DSPy compiled programs silently resend up to 20 few-shot demos on every API call

DSPy, a framework that automates prompt optimization, attaches up to 20 few-shot demonstration examples per predictor module by default during its compilation step. These demos — including full reasoning traces — are converted into chat message pairs and prepended to every single inference call, not just the first. In a multi-module pipeline, this can mean 60 to 80 extra messages sent with each end-user request, adding significant and invisible token overhead. Developers are unaware of this cost because the demos are injected by the optimizer, not written in source code. The article advises explicitly setting lower demo budgets at compile time and auditing attached demos before deploying a compiled program to production.

0
ProgrammingDEV Community ·

Hacker Runs 31M Tests to Build Clothing That Defeats Facial Recognition

Former software engineer and security researcher Bill Swearingen launched noRecognition in 2022 to develop clothing capable of evading AI-powered facial-recognition cameras. After running 31 million pattern-performance tests, he identified geometric arrangements and color combinations that can reduce a camera system's detection confidence to below 10%. Swearingen partnered with a North Carolina textile mill to produce the designs as real garments, with the first collection — including hoodies, caps, and face masks — released in early 2024. A privacy-score calculator on the noRecognition website lets customers test how well a design would fool common facial-recognition APIs before purchasing. Beyond personal privacy, Swearingen hopes the visibility of anti-surveillance fashion will push governments to impose stricter regulations on facial-recognition deployments in public spaces.

0
ProgrammingDEV Community ·

Proxy test of 90 MCP agent trials finds client-side failures masked as model errors

A developer ran 90 structured trials across three MCP servers and two AI clients — Claude Code and Gemini CLI — using a proxy on the stdio pipe to log every frame. The suite covered filesystem, Playwright, and GitHub servers across 15 scripted tasks, yielding 87 successes and 3 failures, all from Gemini CLI. A key pre-run discovery found one client was silently failing tool calls internally before any data reached the server, making the issue appear as poor model reasoning rather than a client bug. Token costs varied sharply between clients on the same server: GitHub tasks cost Claude Code a median 1,698 call tokens versus 223 for Gemini CLI, largely because Claude Code received verbose metadata blocks with each response that Gemini CLI did not. The divergence was traced to the two clients negotiating different MCP protocol revisions, illustrating that per-call token costs depend on client behavior, not just the server.