Skip to content

Instantly share code, notes, and snippets.

package vahy.collectors;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Set;
import java.util.SplittableRandom;
import java.util.function.BiConsumer;
import java.util.function.BinaryOperator;
public class RandomizedMaxCollector<elementType> implements Collector<elementType, List<elementType>, elementType> {
private final Comparator<elementType> comparator;
private final SplittableRandom random;
public RandomizedMaxCollector(Comparator<elementType> comparator, SplittableRandom random) {
this.comparator = comparator;
this.random = random;
}
@snurkabill
snurkabill / .gitconfig
Created February 21, 2016 14:02 — forked from fprochazka/.gitconfig
.gitconfig
[user]
name = Filip Procházka
email = [email protected]
[github]
token = 123
user = fprochazka
[core]
whitespace = fix,-indent-with-non-tab,space-before-tab,trailing-space,cr-at-eol
@snurkabill
snurkabill / gist:1e1eb4a8db0733df1c5b
Last active November 23, 2015 00:54
zajimave predmety FI
IV029 Úvod do transparentní intenzionální logiky
PV211 Introduction to Information Retrieval
IA158 Real Time Systems
@snurkabill
snurkabill / crbm.py
Created November 21, 2015 20:32 — forked from gwtaylor/crbm.py
Theano CRBM demonstration
""" Theano CRBM implementation.
For details, see:
http://www.uoguelph.ca/~gwtaylor/publications/nips2006mhmublv
Sample data:
http://www.uoguelph.ca/~gwtaylor/publications/nips2006mhmublv/motion.mat
@author Graham Taylor"""
import numpy
@snurkabill
snurkabill / gist:754809bb9ae90cd1569f
Created July 20, 2015 08:35
default move selector from code
java.lang.NullPointerException
at org.optaplanner.core.config.localsearch.LocalSearchPhaseConfig.buildMoveSelector(LocalSearchPhaseConfig.java:230)
at org.optaplanner.core.config.localsearch.LocalSearchPhaseConfig.buildDecider(LocalSearchPhaseConfig.java:129)
at org.optaplanner.core.config.localsearch.LocalSearchPhaseConfig.buildPhase(LocalSearchPhaseConfig.java:114)
at org.optaplanner.core.config.localsearch.LocalSearchPhaseConfig.buildPhase(LocalSearchPhaseConfig.java:57)
at org.optaplanner.core.config.solver.SolverConfig.buildPhaseList(SolverConfig.java:251)
at org.optaplanner.core.config.solver.SolverConfig.buildSolver(SolverConfig.java:184)
at org.optaplanner.examples.common.integration.SolverConfigCombinationsTest.defaultMoveSelectorWithMultipleVariables(SolverConfigCombinationsTest.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)