{"id":17204421,"url":"https://github.com/urschrei/hexagrams","last_synced_at":"2025-04-13T22:10:21.976Z","repository":{"id":137743731,"uuid":"51716570","full_name":"urschrei/hexagrams","owner":"urschrei","description":"Procedural generation of I Ching hexagrams and trigrams using PIL and NumPy","archived":false,"fork":false,"pushed_at":"2020-07-01T15:27:41.000Z","size":52,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T12:23:41.442Z","etag":null,"topics":["cleromancy","hexagram","i-ching","pil","trigrams"],"latest_commit_sha":null,"homepage":"http://cleromancer.herokuapp.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/urschrei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-14T22:08:40.000Z","updated_at":"2022-08-26T14:19:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"a38700ff-4815-49c9-9819-67c03ff98ea6","html_url":"https://github.com/urschrei/hexagrams","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urschrei%2Fhexagrams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urschrei%2Fhexagrams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urschrei%2Fhexagrams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urschrei%2Fhexagrams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/urschrei","download_url":"https://codeload.github.com/urschrei/hexagrams/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248788927,"owners_count":21161727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cleromancy","hexagram","i-ching","pil","trigrams"],"created_at":"2024-10-15T02:21:50.371Z","updated_at":"2025-04-13T22:10:21.946Z","avatar_url":"https://github.com/urschrei.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![b](http://cleromancer.herokuapp.com/hexagram/100010.png)](http://cleromancer.herokuapp.com/hexagram/100010.png)\n[![d](http://cleromancer.herokuapp.com/trigram/100.png)](http://cleromancer.herokuapp.com/trigram/100.png)\n[![e](http://cleromancer.herokuapp.com/trigram/010.png)](http://cleromancer.herokuapp.com/trigram/010.png)\n[![r](http://cleromancer.herokuapp.com/hexagram/random)](http://cleromancer.herokuapp.com/hexagram/random)\n\n# Description\nProcedural generation of I Ching hexagrams using PIL and NumPy.\n\n# Hexagrams as a Service (HaaS)\n[Trigrams, too](http://cleromancer.herokuapp.com).\n\n# Usage\nFirst, install [`requirements`](requirements.txt) (PIL and NumPy).  \n\nA Hexagram is composed from two of the eight trigrams. Its bars are encoded as binary numbers, **from bottom to top**, using the digits from left to right.  \n`1` encodes a solid bar, `0` encodes a broken bar.  \nPass a 6-digit iterable of `1`/`0` or `True`/`False` to generate the hexagram.  \n\nCall `dump()` to dump it to `hexagram_output/hexagram.png`. Pass an optional string to `dump()` to control the output filename.  \nCall `dump_json()` to dump it to `hexagram.json`. Pass an optional string to `dump_json()` to control the output filename. \n\nTrigrams can be constructed and dumped in the same way; pass a 3-digit iterable.\n\n``` python\nfrom hexagram import Hexagram, Trigram\nfrom hexagrams import hexagrams, trigrams\n\nfor k, v in hexagrams.items():\n    h = Hexagram(v)\n    h.dump(k)\n\nfor k, v in trigrams.items():\n    t = Trigram(v)\n    t.dump(k)\n```\n\n# The Trigrams and Hexagrams\nCan be found [here](hexagrams.py).\n\n# License\n[MIT](LICENSE)\n\n# Why\n[The Lottery in Babylon](https://en.wikipedia.org/wiki/The_Lottery_in_Babylon) is a very good story. You should [read](http://web.itu.edu.tr/~inceogl4/modernism/lotteryofbabylon.pdf) it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furschrei%2Fhexagrams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furschrei%2Fhexagrams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furschrei%2Fhexagrams/lists"}