Skip to content

Instantly share code, notes, and snippets.

<script>
export let name;
let input = {
row : { start: 0, end: 0 },
column : { start: 1, end: 100 }
}
let id = 0
let columnCount = 480
let classPeriods = []
function addClassPeriod() {
//..FileHandler Verticle
router.post("/fileUpload").handler(BodyHandler.create().setMergeFormAttributes(true)).handler {
println(it.fileUploads().size)
it.fileUploads().forEach({
println(it.fileName())
})
it.response().end(
@MikeDepies
MikeDepies / data.tsv
Last active February 10, 2016 21:47
barchart2.html
name value
Locke 4
Reyes 8
Ford 15
Jarrah 16
Shephard 23
Kwon 42
@MikeDepies
MikeDepies / KNN Test Class
Created September 3, 2015 14:40
Simple class utilizing the KNN implementation
import java.util.Random;
import org.deeplearning4j.datasets.iterator.DataSetIterator;
import org.deeplearning4j.datasets.iterator.impl.IrisDataSetIterator;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.api.ops.impl.accum.distances.EuclideanDistance;
import org.nd4j.linalg.dataset.DataSet;
import org.nd4j.linalg.dataset.SplitTestAndTrain;
import org.nd4j.linalg.factory.Nd4j;
import org.slf4j.Logger;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.api.ops.BaseAccumulation;
import org.nd4j.linalg.api.ops.impl.accum.distances.EuclideanDistance;
import org.nd4j.linalg.dataset.api.DataSet;
import org.nd4j.linalg.factory.Nd4j;
/**
* Requires RC1<br/>
* This is a sample implementation of K-Nearest Neighbor. KNN doesn't create a latent/hidden model, nor does it train. It simply uses it's dataset as a look up table.
* Then grabs the closest k data point/records. From there it is able to look at the labels for the K nearest neighbors and make a decision on what label to predict the incoming
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mygroup</groupId>
<artifactId>deeplearning-bt</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>deeplearning-bt</name>