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 io.sease.ra | |
import org.scalatest.FlatSpec | |
class IntervalsTableSpecs extends FlatSpec { | |
"The Intervals Table" should "return zero (min value) when start and end note are the same" in { | |
val pipeline = new IntervalsTable() | |
0 to 11 by 1 foreach (idx => | |
assert(pipeline.distanceBetween(idx, idx) == 0)) |
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 spt; | |
import java.io.File; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.util.Map; | |
import java.util.Queue; | |
import java.util.concurrent.ConcurrentLinkedQueue; | |
import org.apache.storm.spout.SpoutOutputCollector; |
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
<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>org.gx.labs</groupId> | |
<artifactId>invisible-queries</artifactId> | |
<version>1.0</version> | |
<properties> | |
<jdk.version>1.8</jdk.version> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
<maven.compiler.source>1.8</maven.compiler.source> |
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
> $ZK_HOME/bin/zkCli.sh | |
Connecting to localhost:2181 | |
Welcome to ZooKeeper! | |
JLine support is enabled | |
> [zk: localhost:2181(CONNECTED) 1] rmr /storm |
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
{ | |
"responseHeader":{ | |
"status":0, | |
"QTime":1}, | |
"response":{ | |
"numFound":9369, | |
"start":0, | |
"docs":[ | |
{ | |
"idtipocorso":"43", |
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 java.io.IOException; | |
import java.util.Map; | |
import java.util.Random; | |
import org.apache.lucene.index.AtomicReaderContext; | |
import org.apache.lucene.queries.function.FunctionValues; | |
import org.apache.lucene.queries.function.ValueSource; | |
import org.apache.lucene.queries.function.docvalues.DoubleDocValues; | |
public class RandomValueSource extends ValueSource { |
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
result.union( | |
new LeafPatternDocSet( | |
query.clauses().isEmpty() | |
? second | |
: searcher.getDocSet(query, second), | |
wrap(second.getTriplePattern()), | |
binding.isTopLevel() | |
? binding | |
: binding.getParent(), | |
query)); |
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
(ns clojene.core | |
(:import | |
(org.apache.lucene.store FSDirectory) | |
(org.apache.lucene.index IndexReader) | |
(org.apache.lucene.search IndexSearcher) | |
(org.apache.lucene.queryparser.classic.QueryParser) | |
(org.apache.lucene.analysis.core.SimpleAnalyzer) | |
(java.io File))) | |
(defn searcher [path] |