{"id":13831396,"url":"https://github.com/htm-community/sanity","last_synced_at":"2026-02-19T21:58:19.565Z","repository":{"id":18056246,"uuid":"21111432","full_name":"htm-community/sanity","owner":"htm-community","description":"See your HTM run.","archived":false,"fork":false,"pushed_at":"2017-03-13T20:26:39.000Z","size":5883,"stargazers_count":54,"open_issues_count":3,"forks_count":15,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-07-05T03:00:58.976Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/htm-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-23T02:22:28.000Z","updated_at":"2023-03-06T10:49:11.000Z","dependencies_parsed_at":"2022-08-04T22:15:39.936Z","dependency_job_id":null,"html_url":"https://github.com/htm-community/sanity","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/htm-community/sanity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htm-community%2Fsanity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htm-community%2Fsanity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htm-community%2Fsanity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htm-community%2Fsanity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/htm-community","download_url":"https://codeload.github.com/htm-community/sanity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htm-community%2Fsanity/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264468274,"owners_count":23613072,"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":[],"created_at":"2024-08-04T10:01:27.070Z","updated_at":"2026-02-19T21:58:19.518Z","avatar_url":"https://github.com/htm-community.png","language":"Clojure","funding_links":[],"categories":["Clojure"],"sub_categories":[],"readme":"# Sanity\n\nA web-based visualization layer for HTMs.\n\nIt works with:\n\n- [Comportex](http://github.com/htm-community/comportex/)\n- [NuPIC](https://github.com/numenta/nupic) via [sanity-nupic](https://github.com/htm-community/sanity-nupic)\n\nFor original motivation see [this blog\npost](http://floybix.github.io/2014/07/11/visualization-driven-development-of-the-cortical-learning-algorithm/).\n\n## The Runner\n\nSee it in action in [the online demos](https://htm-community.github.io/sanity/).\n\n\u003ca href=\"https://htm-community.github.io/sanity/\"\u003e\u003cimg src=\"runner.png\" style=\"width:100%;max-width:800px;\" /\u003e\u003c/a\u003e\n\nSanity runs HTM models from the browser with interactive\ncontrols. The model state from recent timesteps is kept, so you can step\nback in time. You can inspect input values, encoded input bits, and the\ncolumns that make up cortical layers. Within a column you can inspect\ncells and their distal dendrite segments. Feed-forward and distal synapses\ncan be shown.\n\nKept timesteps are shown in a row at the top of the display.\nBelow that, the blocks represent input fields (squares) and\nlayers of cortical columns (circles). Depending on the display mode,\nthese may be shown in 2D grids from a single time step, or as one\nvertical line per timestep, allowing several time steps to be shown\nin series. Also, summarised time series are shown in the 'plots' tab.\n\nSanity can run HTM models:\n\n- Inside the browser\n- On a remote / localhost server\n\n## The Notebook\n\nSanity interactive visualizations are also available in notebook\nform, similar to IPython Notebook or Mathematica. It builds on\n[Gorilla REPL](https://github.com/JonyEpsilon/gorilla-repl).\n\n\u003ca href=\"http://viewer.gorilla-repl.org/view.html?source=gist\u0026id=95da4401dc7293e02df3\u0026filename=seq-replay.clj\"\u003e\u003cimg src=\"notebook.png\" style=\"width:100%;max-width:800px;\" /\u003e\u003c/a\u003e\n\nThe notebook:\n\n- Is a fun-filled way to drive and present HTM models\n- Is a launchpad for Sanity runners\n- Is [built for blogging](https://github.com/htm-community/sanity/wiki/Putting-notebooks-on-the-web).\n  Interactive graphics are saved as images in the state that you left them.\n\nSome cool examples:\n\n- [Predicting power consumptions with HTM](http://mrcslws.com/gorilla/?path=hotgym.clj)\n  by Marcus Lewis\n- [Sequence replay in HTM](http://viewer.gorilla-repl.org/view.html?source=github\u0026user=htm-community\u0026repo=sanity\u0026path=examples/worksheets/seq-replay.clj)\n  by Felix Andrews\n\n## Usage\n\nGet [Leiningen](http://leiningen.org/) first.\n\nClone [Comportex](http://github.com/htm-community/comportex/), and\ninstall (this command installs to your local Maven repository,\n`~/.m2`. Once we make a release this step will not be needed.):\n\n```\ncd comportex\nlein install\n```\n\nClone Sanity, and then build it:\n\n```\ncd sanity\nlein do clean, cljsbuild once demos\n```\n\nStart a REPL:\n\n```\nlein repl\n```\n\nFrom the REPL, start a notebook:\n\n```clojure\n(start-notebook)\n```\n\nYou can now launch it in a web browser. The notebook will show you how\nto launch your own Sanity runner.\n\n## Online demos\n\nTo host [the online demos](https://htm-community.github.io/sanity/) locally,\ndo a `cljsbuild`, as above.\n\nNow open `public/demos/*.html` in a web browser.\nEach HTML page loads the corresponding model defined\nin `examples/demos/sanity/demos/`.\n\n\n## Hello\n\n* [Gitter chat](https://gitter.im/htm-community/sanity)\n* or email or github issues.\n\n\n## License\n\nCopyright © 2015-2016 Marcus Lewis and Felix Andrews\n\nCopyright © 2014 Felix Andrews\n\nDistributed under your choice of\n* the Eclipse Public License, the same as Clojure.\n* the [GNU Affero General Public Licence, Version 3](http://www.gnu.org/licenses/agpl-3.0.en.html), the same as NuPIC.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhtm-community%2Fsanity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhtm-community%2Fsanity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhtm-community%2Fsanity/lists"}