{"id":16516956,"url":"https://github.com/alkasm/timingdiagram","last_synced_at":"2026-05-23T16:46:21.066Z","repository":{"id":57475663,"uuid":"202973919","full_name":"alkasm/timingdiagram","owner":"alkasm","description":"Temporal boolean algebra","archived":false,"fork":false,"pushed_at":"2020-03-30T01:34:27.000Z","size":39,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-04T03:35:56.198Z","etag":null,"topics":["data-structures"],"latest_commit_sha":null,"homepage":"","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/alkasm.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}},"created_at":"2019-08-18T07:34:40.000Z","updated_at":"2020-03-30T01:34:29.000Z","dependencies_parsed_at":"2022-09-07T13:51:24.622Z","dependency_job_id":null,"html_url":"https://github.com/alkasm/timingdiagram","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alkasm/timingdiagram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alkasm%2Ftimingdiagram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alkasm%2Ftimingdiagram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alkasm%2Ftimingdiagram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alkasm%2Ftimingdiagram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alkasm","download_url":"https://codeload.github.com/alkasm/timingdiagram/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alkasm%2Ftimingdiagram/sbom","scorecard":{"id":184906,"data":{"date":"2025-08-11","repo":{"name":"github.com/alkasm/timingdiagram","commit":"7aa02ce76343659f123414b38c17e974dde9b0e7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T19:37:21.030Z","repository_id":57475663,"created_at":"2025-08-16T19:37:21.030Z","updated_at":"2025-08-16T19:37:21.030Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33404268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["data-structures"],"created_at":"2024-10-11T16:27:50.613Z","updated_at":"2026-05-23T16:46:21.034Z","avatar_url":"https://github.com/alkasm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# timingdiagram\n\n\u003cimg src=\"https://raw.githubusercontent.com/alkasm/timingdiagram/master/timingdiagram.svg?sanitize=true\" alt=\"Visual timing diagram example\" width=\"100%\"\u003e\n\nWork with discrete state changes over time.\n\n* Reduce data to state changes\n* Compare diagrams over time\n* Query state by time\n* Use any ordered index\n\n## Install\n\nFrom PyPI with `pip`:\n\n```sh\npip install timingdiagram-alkasm\n```\n\nFrom source:\n\n```sh\ngit clone https://github.com/alkasm/timingdiagram\ncd timingdiagram\npip install .\n```\n\nNote that you must have `pip \u003e= 19.0` installed in your environment to install from source, since this project uses the `pyproject.toml` file defined in [PEP-0517](https://www.python.org/dev/peps/pep-0517/) instead of `setup.py`. More from PyPA [here](https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support).\n\n\n## Try it out\n\n```python\n\u003e\u003e\u003e from timingdiagram import TimingDiagram\n\u003e\u003e\u003e d1 = TimingDiagram(enumerate([False, False, False, True, True, False, True]))\n\u003e\u003e\u003e d2 = TimingDiagram(enumerate([False, True, False, False, True, False, False]))\n\u003e\u003e\u003e d1 | d2\nTimingDiagram([(0, False), (1, True), (2, False), (3, True), (5, False), (6, True)])\n```\n\n## Example\n\nSuppose you had a log of users signing in and out of a service, and the log included the time, user id, and action the user took. We can view each user's login/logout history as a timing diagram, and simply `\u0026` them all together to see when all users were logged in at the same time:\n\n```python\nlog = \"\"\"\\\n2019-08-27T19:38:50 001768bf-af44-46a6-890d-048f2c50aa29 login\n2019-08-27T19:51:11 084c07f0-dd0d-46a3-8eb5-1d4cb13756a4 logout\n2019-08-27T19:55:25 001768bf-af44-46a6-890d-048f2c50aa29 logout\n2019-08-27T19:58:37 001768bf-af44-46a6-890d-048f2c50aa29 login\n2019-08-27T20:17:21 a8118353-eb81-4ce0-8d10-6f3f9de6d7ca login\n2019-08-27T20:45:19 001768bf-af44-46a6-890d-048f2c50aa29 logout\n2019-08-27T21:01:45 001768bf-af44-46a6-890d-048f2c50aa29 login\n2019-08-27T21:18:09 001768bf-af44-46a6-890d-048f2c50aa29 logout\n2019-08-27T22:02:37 084c07f0-dd0d-46a3-8eb5-1d4cb13756a4 login\n2019-08-27T22:55:54 001768bf-af44-46a6-890d-048f2c50aa29 login\n2019-08-27T23:08:07 001768bf-af44-46a6-890d-048f2c50aa29 logout\n2019-08-27T23:23:04 a8118353-eb81-4ce0-8d10-6f3f9de6d7ca logout\n2019-08-27T23:47:50 001768bf-af44-46a6-890d-048f2c50aa29 login\n2019-08-27T23:55:10 084c07f0-dd0d-46a3-8eb5-1d4cb13756a4 logout\n2019-08-27T23:56:33 001768bf-af44-46a6-890d-048f2c50aa29 logout\\\n\"\"\".split(\"\\n\")\n\n\nfrom collections import defaultdict\nfrom functools import reduce\nfrom timingdiagram import TimingDiagram\n\n\nsessions = defaultdict(list)\nfor row in log:\n    ts, userid, action = row.split()\n    sessions[userid].append((ts, action == \"login\"))\n\nall_logged_in = reduce(lambda d1, d2: d1 \u0026 d2, map(TimingDiagram, sessions.values()))\n```\n\nFrom just a few lines of code, we get a timing diagram corresponding to when all the users were logged in:\n\n```python\nTimingDiagram([\n  ('2019-08-27T19:38:50', False), \n  ('2019-08-27T22:55:54', True), \n  ('2019-08-27T23:08:07', False), \n  ('2019-08-27T23:56:33', False)\n ])\n ```\n \nSo all users were logged in between `22:55:54` and `23:08:07` on `2019-08-27`. The additional states at the beginning and end signify the start and end times of the logs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falkasm%2Ftimingdiagram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falkasm%2Ftimingdiagram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falkasm%2Ftimingdiagram/lists"}