Skip to content

Instantly share code, notes, and snippets.

View cogmission's full-sized avatar

David Ray cogmission

View GitHub Profile
@cogmission
cogmission / AbstractAlgorithmBenchmark.java
Created March 22, 2018 01:01
AbstractAlgorithmBenchmark - Proposal
/* ---------------------------------------------------------------------
* Numenta Platform for Intelligent Computing (NuPIC)
* Copyright (C) 2014, 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.
*
@cogmission
cogmission / ExpressionBackPanel.java
Last active May 16, 2017 14:08
BackPanel Code Example
package io.cortical.iris.view.input.expression;
import io.cortical.iris.view.BackPanel;
import javafx.scene.image.ImageView;
import javafx.scene.text.Font;
import javafx.scene.text.FontPosture;
import javafx.scene.text.FontWeight;
import javafx.scene.text.Text;
import javafx.scene.text.TextAlignment;
import javafx.scene.text.TextFlow;
@cogmission
cogmission / TextExample.java
Last active July 13, 2017 10:21
Cortical.io Retina Example
import java.util.Arrays;
import java.util.stream.Collectors;
import com.fasterxml.jackson.core.JsonProcessingException;
import io.cortical.retina.client.FullClient;
import io.cortical.retina.model.ExpressionFactory;
import io.cortical.retina.model.ExpressionFactory.ExpressionModel;
import io.cortical.retina.model.Fingerprint;
import io.cortical.retina.model.Metric;
@cogmission
cogmission / HTMLocal.java
Last active May 12, 2017 14:12
HTMLocal for phil_d_cat
package test;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import org.numenta.nupic.Parameters;
import org.numenta.nupic.Parameters.KEY;
import org.numenta.nupic.algorithms.Anomaly;
@cogmission
cogmission / NetworkSetupExample.java
Created May 6, 2017 14:01
Rudimentary Network Setup Using Publisher
private void setupNetwork() {
// Call your network creation method
Network network = getExampleNetwork();
// Subscribes and receives Network Output
network.observe().subscribe(new Observer<Inference>() {
@Override public void onCompleted() { /* Any finishing touches after Network is finished */ }
@Override public void onError(Throwable e) { /* Handle your errors here */ }
@cogmission
cogmission / HTMModel.java
Last active September 29, 2016 06:58
htmjava_detector and HTMModel.java
package nab.detectors.htmjava;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.Arrays;
@cogmission
cogmission / RunLayer.java
Last active September 27, 2016 16:49
RunLayer Java & Python
/* ---------------------------------------------------------------------
* Numenta Platform for Intelligent Computing (NuPIC)
* Copyright (C) 2016, 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.
*
@cogmission
cogmission / JavaOut
Created September 8, 2016 20:29
Python & Java TM Output for TravelTime_387.csv
This file has been truncated, but you can view the full file.
===================================
--------------------------------------------
Record #: 0
Raw Input: 2015-07-10 14:24:00,564
TemporalMemory Input: [717, 737, 739, 745, 758, 782, 793, 798, 805, 812, 833, 841, 846, 857, 1482, 1515, 1536, 1577, 1578, 1600, 1608, 1612, 1642, 1644, 1645, 1646, 1647, 1648, 1649, 1655, 1661, 1663, 1667, 1669, 1677, 1683, 1688, 1706, 1710, 1720]
TemporalMemory prev. predicted: null
TemporalMemory active: [717, 737, 739, 745, 758, 782, 793, 798, 805, 812, 833, 841, 846, 857, 1482, 1515, 1536, 1577, 1578, 1600, 1608, 1612, 1642, 1644, 1645, 1646, 1647, 1648, 1649, 1655, 1661, 1663, 1667, 1669, 1677, 1683, 1688, 1706, 1710, 1720]
@cogmission
cogmission / PALayer.java
Created August 26, 2016 02:41
Prediction Assisted Experiments
/* ---------------------------------------------------------------------
* Numenta Platform for Intelligent Computing (NuPIC)
* Copyright (C) 2016, 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.
*
@cogmission
cogmission / UniversalRandom.java
Last active September 21, 2016 15:54
UniversalRandom Using George Marsaglia's elegant Xorshift (In Python and Java)
/* ---------------------------------------------------------------------
* Numenta Platform for Intelligent Computing (NuPIC)
* Copyright (C) 2016, 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.
*