Skip to content

Instantly share code, notes, and snippets.

View rhyolight's full-sized avatar

Matthew Taylor rhyolight

View GitHub Profile
@rhyolight
rhyolight / siraj-message.md
Last active June 17, 2019 09:44
Your video on HTM coming this week

Siraj,

First of all, I love what you're doing with YouTube. I commend you for your educational work. I'm also passionate about education, and I've learned a lot from watching your videos.

Second of all, you mentioned on twitter today that you were doing a video on HTM this week. Well I've been making videos about HTM for a couple years now, and I just wanted to ask you a favor. If you don't mind, I would love it if you added a Card to your video that linked to my HTM School playlist.

I've spent so much time putting these together, and our channel is still really small. A link from you would be a huge deal to me and my community!

Thanks so much for everything you do to education people about he future of AI!

# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Public License version 3 as
# published by the Free Software Foundation.
#
@rhyolight
rhyolight / format-bits.py
Created May 3, 2017 15:29
example usage
def formatBits(width, desc, inarray, outarray, scale=1, blank=255, leftpad=0):
"""
Copy one array to another, inserting blanks between fields (for display).
If ``leftpad`` is one, then there is a dummy value at element 0
of the arrays, and we should start our counting from 1 rather than 0.
:param inarray: TODO: document
:param outarray: TODO: document
:param scale: TODO: document
:param blank: TODO: document
cd $NUPIC
python setup.py install --user
running install
running bdist_egg
running egg_info
writing requirements to src/nupic.egg-info/requires.txt
writing src/nupic.egg-info/PKG-INFO
writing namespace_packages to src/nupic.egg-info/namespace_packages.txt
writing top-level names to src/nupic.egg-info/top_level.txt
# git rid of any test artifacts
if [ -d "test_results" ]; then
git checkout test_results
fi
{
"connectedSynapses": [
[0, 3, 6, 7, 8, 10, 13, 17, 18, 19, 22, 24, 30, 35, 39, 40, 43, 44, 45, 47, 51, 53, 54, 56, 57, 58, 59, 60, 61, 63, 65, 70, 77, 78, 83, 87, 89, 91, 97, 98],
[1, 2, 4, 6, 7, 9, 10, 13, 15, 19, 22, 25, 27, 32, 36, 40, 44, 45, 46, 47, 50, 52, 53, 58, 61, 63, 65, 72, 73, 76, 78, 79, 80, 85, 87, 89, 90, 91, 93, 94, 95, 97, 99],
[0, 2, 12, 14, 15, 16, 23, 28, 31, 32, 37, 38, 39, 41, 42, 43, 53, 55, 56, 57, 58, 62, 65, 68, 70, 73, 74, 76, 79, 86, 88, 89, 92, 95, 98, 99],
[0, 1, 4, 6, 8, 9, 11, 12, 13, 14, 17, 23, 25, 28, 30, 31, 32, 34, 35, 42, 43, 46, 48, 53, 54, 55, 61, 62, 64, 66, 69, 71, 72, 76, 77, 80, 81, 84, 88, 89, 98, 99],
[2, 3, 4, 5, 8, 11, 18, 19, 21, 22, 23, 24, 25, 27, 28, 34, 35, 40, 48, 51, 54, 55, 56, 57, 58, 60, 62, 63, 65, 67, 71, 73, 74, 77, 79, 81, 82, 84, 85, 86, 87, 89, 90, 93, 98],
[1, 3, 5, 6, 11, 18, 23, 25, 26, 28, 29, 30, 31, 34, 39, 40, 44, 47, 48, 54, 56, 59, 60, 62, 63, 64, 66, 69, 72, 73, 74, 75, 76, 77, 78, 88, 89, 90, 92, 93, 97],
[2, 4, 5, 7,
def saveSpatialPooler(sp, key):
proto = SpatialPoolerProto_capnp.SpatialPoolerProto.new_message()
sp.write(proto)
bytes = proto.to_bytes_packed()
redis.set(key, bytes)
def loadSpatialPooler(key):
bytes = redis.get(key)
proto = SpatialPoolerProto_capnp.SpatialPoolerProto.from_bytes_packed(bytes)
∙ npm run dev
> numenta-web-site-org@0.2.12 predev /Users/mtaylor/nta/numenta-web/packages/numenta.org
> npm run lint
> numenta-web-site-org@0.2.12 lint /Users/mtaylor/nta/numenta-web/packages/numenta.org
> npm run lint:css && npm run lint:html && npm run lint:js
∙ npm run dev
> numenta-web-site-org@0.2.12 predev /Users/mtaylor/nta/numenta-web/packages/numenta.org
> npm run lint
> numenta-web-site-org@0.2.12 lint /Users/mtaylor/nta/numenta-web/packages/numenta.org
> npm run lint:css && npm run lint:html && npm run lint:js
pip install nupic
Collecting nupic
Using cached nupic-0.5.5-py2-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): numpy==1.9.2 in /anaconda/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): pytest-xdist==1.8 in /anaconda/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): pytest==2.5.1 in /anaconda/lib/python2.7/site-packages (from nupic)
Requirement already satisfied (use --upgrade to upgrade): DBUtils==1.1 in /anaconda/lib/python2.7/site-packages (from nupic)
Collecting pycapnp==0.5.8; platform_system == "Linux" or platform_system == "Darwin" (from nupic)
Using cached pycapnp-0.5.8.tar.gz
Collecting asteval==0.9.1 (from nupic)