See numenta/nupic-legacy#2115 for context
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo.split("").reverse().join("").split(/:(?!([\\]))/).map(function(_){if (_) {return _.split("").reverse().join("")} else {return _ }}).reverse().filter(function(_) {return (_)}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================= test session starts ============================== | |
platform linux2 -- Python 2.7.6 -- pytest-2.4.2 | |
plugins: cov, xdist | |
collected 788 items / 1 errors / 2 skipped | |
../usr/local/lib/python2.7/dist-packages/tests/unit/nupic/utils_test.py ... | |
../usr/local/lib/python2.7/dist-packages/tests/unit/nupic/algorithms/anomaly_likelihood_jeff_test.py ...ss.. | |
../usr/local/lib/python2.7/dist-packages/tests/unit/nupic/algorithms/anomaly_likelihood_test.py ............. | |
../usr/local/lib/python2.7/dist-packages/tests/unit/nupic/algorithms/anomaly_test.py ............ | |
../usr/local/lib/python2.7/dist-packages/tests/unit/nupic/algorithms/cells4_test.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pip install --upgrade pip --user | |
You are using pip version 6.1.1, however version 7.0.1 is available. | |
You should consider upgrading via the 'pip install --upgrade pip' command. | |
/Users/amarshall/Library/Python/2.7/lib/python/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. | |
InsecurePlatformWarning | |
Collecting pip | |
Downloading pip-7.0.1-py2.py3-none-any.whl (1.1MB) | |
100% |████████████████████████████████| 1.1MB 160kB/s | |
Installing collected packages: pip | |
Found existing installation: pip 6.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
core@core-01 ~ $ docker run \ | |
> --name nupic-mysql \ | |
> -e MYSQL_ROOT_PASSWORD=nupic \ | |
> -p 3306:3306 \ | |
> -d \ | |
> mysql:5.6 | |
Unable to find image 'mysql:5.6' locally | |
5.6: Pulling from mysql | |
9d3ceacde91b: Pull complete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> (lambda s: ['a', s, 'c'])('b') | |
['a', 'b', 'c'] | |
>>> 'a %s c' % 'b' | |
'a b c' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> from operator import itemgetter | |
>>> iterable=[('foo', 'bar', 'baz'), ('apple', 'banana', 'orange')] | |
>>> [i[1] for i in foo] | |
['bar', 'banana'] | |
>>> map(itemgetter(1),foo) | |
['bar', 'banana'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> dictify = lambda t:dict(zip(*[iter(t)]*2)) | |
>>> dictify(('a', 'A', 'c', 'C', 'b', 'B')) | |
{'a': 'A', 'c': 'C', 'b': 'B'} | |
>>> | |
>>> tuplify = lambda d:tuple(chain(*d.iteritems())) | |
>>> tuplify({'a': 'A', 'c': 'C', 'b': 'B'}) | |
('a', 'A', 'c', 'C', 'b', 'B') | |
>>> | |
>>> assert (lambda d:dictify(tuplify(d))==d)({'a': 'A', 'c': 'C', 'b': 'B'}) | |
>>> assert (lambda t:tuplify(dictify(t))==t)(('a', 'A', 'c', 'C', 'b', 'B')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import types | |
import web | |
urls = [] | |
def GET(route): | |
def decorate(fn): | |
clsName = '%s_%s' % (fn.__name__, 'GET') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nupic.frameworks.opf.clamodel import CLAModel | |
params = \ | |
{'clParams': {'alpha': 0.0001, | |
'clVerbosity': 0, | |
'regionName': 'CLAClassifierRegion', | |
'steps': '1,5'}, | |
'inferenceType': 'TemporalMultiStep', | |
'sensorParams': {'encoders': {'consumption': {'clipInput': True, | |
'fieldname': u'consumption', | |
'n': 100, |
OlderNewer