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
extern crate avro_rs; | |
use avro_rs::*; | |
use std::io::prelude::*; | |
use std::net::TcpListener; | |
use std::net::TcpStream; | |
use std::thread; | |
#[derive(Debug, Deserialize, Serialize)] | |
pub struct Test { |
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 processing.segmentation; | |
import java.util.ArrayList; | |
/** | |
* Compute the Dynamic Time Warping Distance | |
* | |
* @author Daniel Kohlsdorf | |
*/ | |
public class DynamicTimeWarping { |
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 processing.inference; | |
import java.util.ArrayList; | |
import processing.model.HiddenMarkovModel; | |
import processing.utils.ProbabilityUtils; | |
/** | |
* Inference algorithms used for training and decoding hidden markov models. |
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 processing.inference; | |
import java.util.ArrayList; | |
import java.util.Vector; | |
import processing.model.Gaussian; | |
import processing.model.GaussianMixture; | |
import processing.model.HiddenMarkovModel; | |
import processing.model.ProbabilityDistibution; | |
import processing.utils.ProbabilityUtils; |
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 processing.signals; | |
import java.util.ArrayList; | |
import processing.utils.ProbabilityUtils; | |
/** | |
* Viterbi Style Whistle Tracing | |
* | |
* @author Daniel Kohlsdorf |
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 processing.utils; | |
/** | |
* Utilities to compute log probabilities | |
* | |
* @author Daniel Kohlsdorf | |
*/ | |
public class ProbabilityUtils { | |
public static final double ZERO = Double.NEGATIVE_INFINITY; |
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 analysis.preprocessing; | |
import java.util.HashMap; | |
import java.util.Vector; | |
import database.OhuraDB; | |
import database.indexing.LocalFeature; | |
/** | |
* Topic Modeling using the Latent Dirichlet |
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 prediction; | |
import org.apache.commons.math3.linear.Array2DRowRealMatrix; | |
import org.apache.commons.math3.linear.ArrayRealVector; | |
/** | |
* Item based interpolation | |
* | |
* @author Daniel Kohlsdorf | |
*/ |
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
public class BinarySearch { | |
public static int search(int[] sorted, int element) { | |
int min = 0; | |
int max = sorted.length; | |
while(max > min) { | |
int mid = min + (max - min) / 2; | |
if(sorted[mid] == element) { | |
return element; |
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
public class RecerseAString { | |
public static String reverse(String string) { | |
char str[] = string.toCharArray(); | |
for(int i = 0; i < str.length / 2; i++) { | |
char tmp = str[i]; | |
str[i] = str[str.length - 1 - i]; | |
str[str.length - 1 - i] = tmp; | |
} |