Skip to content

Instantly share code, notes, and snippets.

var WORKERS = process.env.WEB_CONCURRENCY || 1;
var throng = require('throng');
throng(start, {
workers: WORKERS,
lifetime: Infinity
});
function start() {
var dotenv = require('dotenv');
package org.deeplearning4j.examples.nlp.word2vec;
/**
* Created by dottig2 on 1/13/2017.
*/
import java.util.*;
public class Test {
public static String nGramToCheck = "Testing";
public static HashMap<String, Integer> nGramFrequency;
package com.upwork.garrett;
import org.deeplearning4j.models.word2vec.Word2Vec;
import org.deeplearning4j.text.sentenceiterator.BasicLineIterator;
import org.deeplearning4j.text.sentenceiterator.SentenceIterator;
import org.deeplearning4j.text.tokenization.tokenizer.preprocessor.CommonPreprocessor;
import org.deeplearning4j.text.tokenization.tokenizerfactory.DefaultTokenizerFactory;
import org.deeplearning4j.text.tokenization.tokenizerfactory.TokenizerFactory;
import org.deeplearning4j.ui.UiServer;
import java.io.IOException;
function BinarySearchTree() {
/**
* Pointer to root node in the tree.
* @property _root
* @type Object
* @private
*/
this._root = null;
}
@garrethdev
garrethdev / Angular Form Validation
Last active August 29, 2015 14:19
Angular Form Validation
<form name="form" ng-app>
<div class="control-group" ng-class="{true: 'error'}[submitted && form.email.$invalid]">
<label class="control-label" for="email">Your email address</label>
<div class="controls">
<input type="email" name="email" ng-model="email" required />
<span class="help-inline" ng-show="submitted && form.email.$error.required">Required</span>
<span class="help-inline" ng-show="submitted && form.email.$error.email">Invalid</span>
<span class="help-inline" ng-show="submitted && form.email.$valid"> Nice
Job</span>
</div>
@garrethdev
garrethdev / index.html
Created November 2, 2013 04:46 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>