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 com.thinkaurelius.titan.core.TitanFactory; | |
import com.thinkaurelius.titan.core.TitanGraph; | |
import com.thinkaurelius.titan.core.TitanVertex; | |
import com.tinkerpop.blueprints.Vertex; | |
import com.tinkerpop.blueprints.util.io.graphml.GraphMLWriter; | |
import org.apache.commons.configuration.BaseConfiguration; | |
import org.apache.commons.configuration.Configuration; | |
import java.io.File; | |
import java.io.FileOutputStream; |
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
// Fantastic guide: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types | |
// ------------------ literals ---------------------- | |
var integer = 7; | |
var float = 7.7; | |
var str1 = "Hello world!"; | |
var str2 = 'Hello world!'; | |
var object = {}; | |
var array = ["a", "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
bgardner@bgdell:~/projects/cget-cli/bin$ cat out.txt | |
Usage | |
cmake [options] <path-to-source> | |
cmake [options] <path-to-existing-build> | |
Specify a source directory to (re-)generate a build system for it in the | |
current working directory. Specify an existing build directory to | |
re-generate its build system. |
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
Struct Header { | |
header_sz: i32, | |
item_type: i64, // Like an enum, says what data type comes after this header: ints, floats, etc | |
item_count: i32, | |
item_sz: i32 | |
// After this header, I expect to see item_count items of item_type | |
} | |
unsafe { | |
let mut vec:Vec<u64> = Vec::with_capacity(size); |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
"use strict"; | |
var ar = ["a","b","c"]; | |
for(var i = 0; i < ar.length; i++) { | |
var item = ar[i]; | |
setTimeout(function() { | |
console.log(item); |
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 org.deeplearning4j.nn.api.{OptimizationAlgorithm} | |
import org.deeplearning4j.nn.conf.layers.RBM.{HiddenUnit, VisibleUnit} | |
import org.deeplearning4j.nn.conf.{GradientNormalization, Updater, MultiLayerConfiguration, NeuralNetConfiguration} | |
import org.deeplearning4j.nn.conf.distribution.UniformDistribution | |
import org.deeplearning4j.nn.conf.layers.{RBM, OutputLayer, RnnOutputLayer} | |
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork | |
import org.deeplearning4j.nn.weights.WeightInit | |
import org.deeplearning4j.optimize.listeners.ScoreIterationListener | |
import org.nd4j.linalg.api.ndarray.INDArray | |
import org.nd4j.linalg.dataset.{SplitTestAndTrain, DataSet} |
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
package com.squarelabs.spark; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.databind.introspect.AnnotatedMember; | |
import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector; | |
import org.jooq.DSLContext; | |
import org.jooq.Record; | |
import org.jooq.Result; | |
import org.jooq.SQLDialect; | |
import org.jooq.impl.DSL; |
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
// TODO: Replace with an off-the-shelf Java HTML packer | |
val doc = Jsoup.parse(html) | |
doc.select("link") // Replace CSS | |
.filter(link => "stylesheet".equalsIgnoreCase(link.attr("rel"))) | |
.filter(link => new URI(link.attr("href")).getHost == null) | |
.foreach(link => { | |
val el = new Element(Tag.valueOf("style"), "") | |
val css = getResourceAsString(new URI(link.attr("href")).getPath) | |
val m = cssUrlPattern.matcher(css) | |
val s = new StringBuffer() |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
var url = 'https://galvanize-student-apis.herokuapp.com/gdating/members?limit=10'; | |
var method = 'GET'; | |
var xhr = new XMLHttpRequest(); | |
xhr.open(method, url, true); | |
xhr.onload = function(data) { | |
console.log(data); |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
var url = 'https://galvanize-student-apis.herokuapp.com/gdating/members?limit=10'; | |
var method = 'GET'; | |
var xhr = new XMLHttpRequest(); | |
xhr.open(method, url, true); | |
xhr.onload = function(data) { | |
console.log(data.currentTarget.response); |
OlderNewer