I Ching hexagram generator
The traditional three-coin method: throw three coins six times to build a six-line hexagram from the bottom up, then read which of the 64 classic hexagrams it is. Two versions to compare:
-
Claude version
Six empty lines; each throw shows its three coins and draws its line straight away.
Changing lines turn red, and the result shows the hexagram it changes to, with read-aloud.
/claude-iching -
Copilot version
The original: one throw per page load, then the resulting hexagram.
/pyching
Show the prompt used to build the Claude version
Built by Claude Code (Opus 5.5) from this prompt, reusing the existing Python I Ching functions and 64-hexagram data:
see in this folder : C:\DEV\Repositories\GitHub\phython-server-rhys I have a basic python flask app i have it hosted on google cloud run serverless. All is in main.py. its has a basic couple of pages (endpoints) plus it embeds a python iching page and functions. 1. remove the existing iching to its own page to seaprate code form te simple endpoints 2. the iching i know you can do better (I want it to show the 6 empty lines, and a button, as you clickc the button six times it show the coins thrown next to each line (3 coins heads or tails) and when all are thrown its show the iching patter with red lines indicating chnge, its showe the chaning iching to and reads the text for the correct symbol. Reuse the existing functions (def: whatever) and iching 64 description data, etc then link to coth ichings for mthe home page, old one cvalled copilot, new one called Claude embed this prompt message into a collapsed div under the new claudes homepage link stating what it is
Follow-up prompt:
that is good, show each line as soon as we generate it, do not wait untl the end
Try the weather endpoint
Calls this server's /weather?lat=53.41&lon=-2.15,
which asks Open-Meteo for the current weather and adds a plain-English description.
Pick a place or enter coordinates, then press Get weather.
Endpoints
/This page (HTML)/statusJSON status: checking…/weatherJSON weather forlatandlon/claude-iching/throwJSON: one throw of three coins
How it's built and run
- Flask:
main.pyholds the home page, status and weather; the I Ching pages are a separate blueprint iniching.py. - Built from source with Google's buildpacks (no Dockerfile) and deployed to Cloud Run in
europe-west1. - Cloud Run starts copies of the server only when requests arrive, capped at 2.
- Cloud Run console (owner sign-in)