code stringlengths 114 1.05M | path stringlengths 3 312 | quality_prob float64 0.5 0.99 | learning_prob float64 0.2 1 | filename stringlengths 3 168 | kind stringclasses 1
value |
|---|---|---|---|---|---|
package org.openni;
/**
* Represents the orientation of a skeleton joint as two vectors with a common origin. <BR><BR>
*
* One point is given as the origin. Two more points each define a vector when joined with the first point.
* A confidence value is also stored enabling skeleton middleware to quantify uncert... | Wrappers/OpenNI.java/src/org/openni/SkeletonJointOrientation.java | 0.91029 | 0.723725 | SkeletonJointOrientation.java | starcoder |
package com.perunlabs.jsolid.d2;
import static com.perunlabs.jsolid.JSolid.v;
import static java.lang.Math.PI;
import static java.lang.Math.cos;
import static java.lang.Math.min;
import static java.lang.Math.sin;
import static java.util.Arrays.asList;
import static java.util.Objects.requireNonNull;
import java.util.A... | src/java/com/perunlabs/jsolid/d2/Rectangle.java | 0.913544 | 0.653859 | Rectangle.java | starcoder |
package com.google.auto.value.extension;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.TypeElement;
/**
* An AutoValueExtension allows for extra fun... | value/src/main/java/com/google/auto/value/extension/AutoValueExtension.java | 0.937498 | 0.415432 | AutoValueExtension.java | starcoder |
package org.tego.android.dkvdua.ui;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Rectangle;
/**
* Kelas yang digunakan untuk membuat tombol pada menu
*
* @author blackshadow
*
*/
public class Tombol {
private float x;
private float y;... | src/org/tego/android/dkvdua/ui/Tombol.java | 0.608361 | 0.400808 | Tombol.java | starcoder |
package com.elastisys.autoscaler.core.utils.stats.timeseries.impl;
import static com.elastisys.autoscaler.core.utils.stats.timeseries.TimeSeriesPredicates.isOutlier;
import java.util.Collection;
import java.util.List;
import java.util.function.Predicate;
import org.apache.commons.math3.stat.descriptive.SummaryStatis... | core/src/main/java/com/elastisys/autoscaler/core/utils/stats/timeseries/impl/OutlierFilteredTimeSeries.java | 0.962656 | 0.598019 | OutlierFilteredTimeSeries.java | starcoder |
package io.github.vampirestudios.raa_dimension.generation.dimensions.data;
public class DimensionTreeData {
private DimensionFoliagePlacers foliagePlacerType;
private DimensionTreeTypes treeType;
private boolean plainsTrees; //This option overrides everything and only makes the trees found in the plains biom... | src/main/java/io/github/vampirestudios/raa_dimension/generation/dimensions/data/DimensionTreeData.java | 0.723895 | 0.557785 | DimensionTreeData.java | starcoder |
package seedu.expensela.logic.parser;
import static java.util.Objects.requireNonNull;
import seedu.expensela.commons.core.index.Index;
import seedu.expensela.commons.util.StringUtil;
import seedu.expensela.logic.parser.exceptions.ParseException;
import seedu.expensela.model.monthlydata.Budget;
import seedu.expensela.... | src/main/java/seedu/expensela/logic/parser/ParserUtil.java | 0.845624 | 0.40751 | ParserUtil.java | starcoder |
package com.nnys.bikeable;
import com.google.maps.model.ElevationResult;
import static java.lang.Math.atan;
/**
* This is a class that calculates a score for a path.
* The score is calculated by the function "get path score"
* Usage example:
*
PathElevationScoreCalculator pathElevationScoreCalculator = new Path... | app/src/main/java/com/nnys/bikeable/PathElevationScoreCalculator.java | 0.746046 | 0.470189 | PathElevationScoreCalculator.java | starcoder |
package mondrian.olap.type;
import mondrian.olap.*;
/**
* Base class for types which represent scalar values.
*
* <p>An instance of this class means a scalar value of unknown type.
* Usually one of the derived classes {@link NumericType},
* {@link StringType}, {@link BooleanType} is used instead.
*
* @author j... | semantic-mdx/mdx-mondrian/src/main/java/mondrian/olap/type/ScalarType.java | 0.962418 | 0.520192 | ScalarType.java | starcoder |
package jsky.coords;
import java.awt.geom.*;
public class wcscon {
/* Constant vector and matrix (by columns)
These values were obtained by inverting C.Hohenkerk's forward matrix
(private communication), which agrees with the one given in reference
2 but which has one additional decimal ... | bundle/jsky.coords/src/main/java/jsky/coords/wcscon.java | 0.688783 | 0.526951 | wcscon.java | starcoder |
package rockpaperscissors.logic;
import java.util.EnumMap;
import java.util.Map;
import java.util.Objects;
import static rockpaperscissors.logic.RoundResult.*;
/**
* A round of rock-paper-scissors, as identified by the shapes played by each player.
*/
public final class Round {
private static final Map<Shape,... | src/main/java/rockpaperscissors/logic/Round.java | 0.928858 | 0.41834 | Round.java | starcoder |
package com.SkMaury;
import java.util.Random;
public class GeneticAlgorithm {
private Random randomGenerator;
public GeneticAlgorithm() {
this.randomGenerator = new Random();
}
public Population evolvePopulation(Population population){
Population newPopulation = new Population(popul... | src/com/SkMaury/GeneticAlgorithm.java | 0.58818 | 0.421314 | GeneticAlgorithm.java | starcoder |
package smile.clustering;
import java.util.Arrays;
import smile.math.Math;
/**
* Neural Gas soft competitive learning algorithm. The Neural Gas is inspired
* by the Self-Organizing Map for finding optimal data representations based on
* feature vectors. The algorithm was coined "Neural Gas" because of the
* dynam... | Smile/src/smile/clustering/NeuralGas.java | 0.967998 | 0.847463 | NeuralGas.java | starcoder |
package graphics;
import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL12;
import java.awt.*;
import java.awt.geom.AffineTransform;
import java.awt.image.AffineTransformOp;
import java.awt.image.BufferedImage;
import java.nio.ByteBuffer;
import static org.lwjgl.opengl.GL11.*;
public abstract class OpenglUtils {
p... | src/main/java/graphics/OpenglUtils.java | 0.609989 | 0.410579 | OpenglUtils.java | starcoder |
package org.bpmscript.correlation;
import java.io.Serializable;
import java.util.List;
/**
* A correlation service. A correlation associates a number of rules (correlations)
* that are run against incoming messages (received through the "send" method).
* If the message matches the correlation rules, it is passed... | bpmscript-core/src/main/java/org/bpmscript/correlation/ICorrelationService.java | 0.911729 | 0.417984 | ICorrelationService.java | starcoder |
package com.tradeshift.reaktive.assertj;
import com.tradeshift.reaktive.actors.CommandHandler.Results;
import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.AbstractIterableAssert;
import org.assertj.core.api.AbstractObjectAssert;
import org.assertj.core.api.Assertions;
import org.assertj.core.error... | ts-reaktive-testkit-assertj/src/main/java/com/tradeshift/reaktive/assertj/AbstractCommandResultsAssert.java | 0.782247 | 0.428532 | AbstractCommandResultsAssert.java | starcoder |
package me.oskarmendel.util.geometry;
import java.awt.Graphics2D;
import javafx.scene.canvas.GraphicsContext;
/**
* Rectangle represents the geometric shape of a Rectangle.
*
* @author <NAME>
* @version 0.00.00
* @name Rectangle.java
*/
public class Rectangle implements Shape {
private double x;
private do... | src/me/oskarmendel/util/geometry/Rectangle.java | 0.942823 | 0.546617 | Rectangle.java | starcoder |
package org.apache.spark.ml.recommendation;
/**
* :: DeveloperApi ::
* An implementation of ALS that supports generic ID types, specialized for Int and Long. This is
* exposed as a developer API for users who do need other ID types. But it is not recommended
* because it increases the shuffle size and memory requir... | mllib/target/java/org/apache/spark/ml/recommendation/ALS$.java | 0.872836 | 0.532911 | ALS$.java | starcoder |
package com.badlogic.gdx.physics.bullet.linearmath;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.math.Quaternion;
import com.badlogic.gdx.math.Matrix3;
import com.badlogic.gdx.math.Matrix4;
public class btVector3Array extends BulletBase {
private lo... | extensions/gdx-bullet/jni/swig-src/linearmath/com/badlogic/gdx/physics/bullet/linearmath/btVector3Array.java | 0.787114 | 0.496582 | btVector3Array.java | starcoder |
package com.turtywurty.tutorialmod.container;
import java.util.Objects;
import com.turtywurty.tutorialmod.init.BlockInit;
import com.turtywurty.tutorialmod.init.ModContainerTypes;
import com.turtywurty.tutorialmod.tileentity.ItemPedestalTileEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraf... | src/main/java/com/turtywurty/tutorialmod/container/ItemPedestalContainer.java | 0.680666 | 0.49762 | ItemPedestalContainer.java | starcoder |
package lemon.elastic.query4j.util;
import java.text.DecimalFormat;
import java.util.Random;
/**
* 经纬度工具类
*
* @author WangYazhou
* @date 2016年3月22日 上午11:40:26
* @see
*/
public class LngLatUtil {
private static final double EARTH_RADIUS = 6378137; //赤道半径 M
public static final double P... | src/main/java/lemon/elastic/query4j/util/LngLatUtil.java | 0.547222 | 0.418043 | LngLatUtil.java | starcoder |
package com.opengamma.engine.exec;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.... | projects/OG-Engine/src/main/java/com/opengamma/engine/exec/BatchExecutor.java | 0.792464 | 0.544317 | BatchExecutor.java | starcoder |
package sirius.kernel.commons;
import sirius.kernel.nls.NLS;
import javax.annotation.CheckReturnValue;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.math.Math... | src/main/java/sirius/kernel/commons/Amount.java | 0.914908 | 0.430088 | Amount.java | starcoder |
package com.readtracker.android.db;
import com.j256.ormlite.field.DataType;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
import com.readtracker.android.support.Utils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* Represents a book in t... | app/src/main/java/com/readtracker/android/db/Book.java | 0.863118 | 0.419945 | Book.java | starcoder |
package greycat.ml.neuralnet.loss;
import greycat.ml.neuralnet.process.ExMatrix;
import greycat.struct.DMatrix;
import greycat.struct.matrix.MatrixOps;
import greycat.struct.matrix.VolatileDMatrix;
class SumOfSquares implements Loss {
private static SumOfSquares static_unit = null;
private double[] weights;
... | plugins/ml/src/main/java/greycat/ml/neuralnet/loss/SumOfSquares.java | 0.859782 | 0.412057 | SumOfSquares.java | starcoder |
package boofcv.gui.d3;
import boofcv.gui.BoofSwingUtil;
import georegression.metric.UtilAngle;
import georegression.struct.point.Vector3D_F64;
import javax.swing.*;
import java.awt.*;
import java.awt.geom.Line2D;
/**
* Graphically displays the orientation
*
* @author <NAME>
*/
public class Orientation3D extends ... | integration/boofcv-swing/src/main/java/boofcv/gui/d3/Orientation3D.java | 0.729038 | 0.495972 | Orientation3D.java | starcoder |
package com.avalara.avatax.services.tax;
public class ConfirmationType implements java.io.Serializable {
private String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected ConfirmationType(String value) {
_value_ = value;
_table_.put(_v... | avatax4j/src/com/avalara/avatax/services/tax/ConfirmationType.java | 0.816918 | 0.463809 | ConfirmationType.java | starcoder |
package org.springframework.geode.core.env.support;
import java.util.Arrays;
import java.util.Optional;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
/**
* The {@link User} class is an Abstract Data Type (ADT) modeling a user in Piv... | spring-geode-project/spring-geode/src/main/java/org/springframework/geode/core/env/support/User.java | 0.92866 | 0.457682 | User.java | starcoder |
package ch.epfl.bbp;
import static ch.epfl.bbp.MissingUtils.getOrElse;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeSet;
/**
* Utility to create a Histogram
*
* @author <EMAIL>
*
* @param <T>
* the type of the histogram... | utils/blue_commons/src/main/java/ch/epfl/bbp/Histogram.java | 0.872944 | 0.434101 | Histogram.java | starcoder |
package gov.sandia.cognition.framework.lite;
import gov.sandia.cognition.framework.CognitiveModuleState;
import gov.sandia.cognition.framework.SemanticLabel;
import gov.sandia.cognition.math.matrix.VectorFactory;
import gov.sandia.cognition.math.matrix.Vector;
import gov.sandia.cognition.util.AbstractCloneableSerializ... | Components/FrameworkCore/Source/gov/sandia/cognition/framework/lite/SimplePatternRecognizerState.java | 0.931221 | 0.675849 | SimplePatternRecognizerState.java | starcoder |
package eu.qualimaster.monitoring.profiling.approximation;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.TreeMap;
import org.apache.commons.math3.fitting.WeightedObservedPoint;
/**
* Container for weighted observed points used ... | MonitoringLayer/src/eu/qualimaster/monitoring/profiling/approximation/LastRecentWeightedObservedPoints.java | 0.958722 | 0.564158 | LastRecentWeightedObservedPoints.java | starcoder |
package org.cryptimeleon.math.hash;
import org.cryptimeleon.math.hash.impl.ByteArrayAccumulator;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
/**
* A {@code ByteAccumulator} takes a (large) byte-string x as input and outputs a byte array
* representing f(x) for some function f.
* The func... | src/main/java/org/cryptimeleon/math/hash/ByteAccumulator.java | 0.928409 | 0.575827 | ByteAccumulator.java | starcoder |
package befaster.solutions;
import befaster.runner.SolutionNotImplementedException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class Checkout {
private static final Map<String, Integer> prices = new HashMap<>();
static {
prices.put("A", 50... | src/main/java/befaster/solutions/Checkout.java | 0.854475 | 0.520009 | Checkout.java | starcoder |
package xyz.cofe.win.activex;
public interface SWbemObjectPath {
/**
* The Authority property of the SWbemObjectPath object contains a string that defines the Authority component of the object path. For more information, see the strAuthority parameter of the SWbemLocator.ConnectServer method and Setting the S... | wmi-base/src/main/java/xyz/cofe/win/activex/SWbemObjectPath.java | 0.815012 | 0.418459 | SWbemObjectPath.java | starcoder |
package com.bluegosling.reflect;
import static java.util.Objects.requireNonNull;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/**
* Represents a generic method signature, composed of a method... | src/com/bluegosling/reflect/GenericMethodSignature.java | 0.949506 | 0.403978 | GenericMethodSignature.java | starcoder |
package org.tribuo.interop.tensorflow;
import com.oracle.labs.mlrg.olcut.config.Config;
import com.oracle.labs.mlrg.olcut.config.PropertyException;
import com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance;
import com.oracle.labs.mlrg.olcut.provenance.impl.ConfiguredObjectProvenanceImpl;
import org.tribu... | Interop/Tensorflow/src/main/java/org/tribuo/interop/tensorflow/ImageTransformer.java | 0.927265 | 0.439507 | ImageTransformer.java | starcoder |
package javafx.scene.shape;
/**
* Defines the format of the vertices in a mesh. A vertex consists of an array
* of points, normals (optional), and texture coordinates.
*
* @since JavaFX 8u40
*/
public final class VertexFormat {
/**
* Specifies the format of a vertex that consists of a point and texture ... | javafx-sdk-11.0.2/lib/src/javafx.graphics/javafx/scene/shape/VertexFormat.java | 0.932661 | 0.696597 | VertexFormat.java | starcoder |
package org.algorithmx.rulii.validation.types;
import org.algorithmx.rulii.annotation.Extract;
import org.algorithmx.rulii.lib.spring.core.annotation.MergedAnnotation;
import org.algorithmx.rulii.lib.spring.core.annotation.MergedAnnotations;
import org.algorithmx.rulii.lib.spring.util.Assert;
import java.lang.annotat... | src/main/java/org/algorithmx/rulii/validation/types/AnnotatedTypeDefinitionBuilder.java | 0.890889 | 0.468669 | AnnotatedTypeDefinitionBuilder.java | starcoder |
package org.springframework.data.relational.core.query;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringJoiner;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import or... | spring-data-relational/src/main/java/org/springframework/data/relational/core/query/Criteria.java | 0.917062 | 0.412412 | Criteria.java | starcoder |
package com.bipinet.pointsdistance.service;
import com.bipinet.pointsdistance.domain.PointXY;
import java.util.ArrayList;
import java.util.List;
import java.util.StringJoiner;
public enum DistanceType {
CLOSEST(new PointXY((short) -200, (short) 300)) {
@Override
public short[] findPoints(int nu... | src/main/java/com/bipinet/pointsdistance/service/DistanceType.java | 0.891333 | 0.46223 | DistanceType.java | starcoder |
package frl.driesprong.decoding;
import frl.driesprong.decoding.packages.InvalidCRCException;
import frl.driesprong.decoding.packages.InvalidDataException;
import frl.driesprong.decoding.packages.InvalidLengthException;
import frl.driesprong.decoding.packages.MeterReading;
import frl.driesprong.processing.MedtronicPro... | app/src/androidTest/java/frl/driesprong/decoding/MeterReadingTest.java | 0.742235 | 0.493592 | MeterReadingTest.java | starcoder |
package net.yoojia.imagemap.core;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Path;
import android.graphics.PointF;
import net.yoojia.imagemap.support.ScaleUtility;
import net.yoojia.imagemap.util.MatrixConverHelper;
import java.util.ArrayList;
/**
* author : 桥下一粒砂 (<EMAI... | ACTIVITY_ENTRY_NAME/src/net/yoojia/imagemap/core/PolyShape.java | 0.680029 | 0.422743 | PolyShape.java | starcoder |
package org.glencross.raytrace;
import java.util.Collections;
import java.util.List;
/**
* Created by chris on 04/12/16.
*/
public class ChequeredPlane implements Shape {
private final Vector surfaceNormal;
private final Surface surfaceProperties1;
private final Surface surfaceProperties2;
private... | src/main/java/org/glencross/raytrace/ChequeredPlane.java | 0.902012 | 0.553445 | ChequeredPlane.java | starcoder |
package dev.slimevr.vr.processor.skeleton;
import java.util.HashMap;
import java.util.Map;
public enum SkeletonConfigValue {
HEAD(
1,
"Head",
"headShift",
"Head shift",
0.1f,
new BoneType[] { BoneType.HEAD }
),
NECK(
2,
"Neck",
"neckLength",
"Neck length",
0.1f,
new BoneType[] { BoneType.N... | src/main/java/dev/slimevr/vr/processor/skeleton/SkeletonConfigValue.java | 0.580471 | 0.400105 | SkeletonConfigValue.java | starcoder |
package com.objectfabric.misc;
public final class Utils {
public static final String NEW_LINE = PlatformAdapter.getLineSeparator();
private Utils() {
}
public static int nextPowerOf2(int value) {
value--;
value |= value >> 1;
value |= value >> 2;
value |=... | objectfabric/stm/com/objectfabric/misc/Utils.java | 0.749729 | 0.467453 | Utils.java | starcoder |
package datastructures.array;
import java.util.HashMap;
import java.util.Map;
/**
* You are playing the following Bulls and Cows game with your friend: You write down a number and
* ask your friend to guess what the number is. Each time your friend makes a guess, you provide a
* hint that indicates how many digits... | src/main/java/datastructures/array/BullsAndCows.java | 0.812161 | 0.631793 | BullsAndCows.java | starcoder |
import java.util.Random;
public class Run {
public static void main(String[] args) {
/* Phases of a genetic algorithm
* Phase 1: Initial population
* Individual contains a chromosome which is a string of genes
* Population contains a collection of individuals
* Populatio... | src/main/java/Run.java | 0.695545 | 0.672149 | Run.java | starcoder |
package cascading.flow.planner.iso.expression;
import cascading.flow.planner.PlannerContext;
import cascading.flow.planner.Scope;
import cascading.flow.planner.graph.ElementGraph;
/**
* All is a special case allowing allowing a node-node match with any number of edges
*/
public class PathScopeExpression extends Sco... | cascading-core/src/main/java/cascading/flow/planner/iso/expression/PathScopeExpression.java | 0.865579 | 0.442335 | PathScopeExpression.java | starcoder |
package fr.alchemy.utilities.file.json;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
import fr.alchemy.utilities.Validator;
import fr.alchemy.utilities.file.json.JSONObject.JSONPair;
/**
* <code>JSO... | alchemy-utilities/src/main/java/fr/alchemy/utilities/file/json/JSONObject.java | 0.920834 | 0.425784 | JSONObject.java | starcoder |
package li260.geometry;
public class VTools {
public static Vecteur addition(Vecteur a, Vecteur b) {
return new Vecteur(a.getX() + b.getX(), a.getY() + b.getY());
}
public static Vecteur soustraction(Vecteur a, Vecteur b) {
return new Vecteur(b.getX() - a.getX(), b.getY() - a.getY());
}
public static doubl... | src/li260/geometry/VTools.java | 0.715921 | 0.588564 | VTools.java | starcoder |
package position;
import position.exceptions.PointNotOnLineException;
public class MathematicalLine extends Line {
private double gradient;
private double intercept;
public MathematicalLine(ScaledPosition firstPosition, ScaledPosition secondPosition) {
if (firstPosition.x == secondPosition.x) {
... | src/position/MathematicalLine.java | 0.906419 | 0.60743 | MathematicalLine.java | starcoder |
package javaGOAP.graph;
import java.util.HashMap;
import java.util.HashSet;
import java.util.function.BiConsumer;
/**
* DirectedGraph.java --- Superclass for all DirectedGraphs.
*
* @author <NAME> - 14.03.2017
*
*/
public class DirectedGraph<VertexType, EdgeType extends Edge> implements IGraph<VertexType, EdgeT... | runelite-client/src/main/java/javaGOAP/graph/DirectedGraph.java | 0.918206 | 0.569374 | DirectedGraph.java | starcoder |
package com.twosigma.webtau.expectation.equality.handlers;
import com.twosigma.webtau.expectation.ActualPath;
import com.twosigma.webtau.expectation.equality.CompareToComparator;
import com.twosigma.webtau.expectation.equality.CompareToHandler;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
pu... | webtau-core/src/main/java/com/twosigma/webtau/expectation/equality/handlers/MapsCompareToHandler.java | 0.870996 | 0.413536 | MapsCompareToHandler.java | starcoder |
package darwin;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Random;
import darwin.Global;
import network.NeuralNetwork;
import util.utils;
/**
*
* @author <NAME>.
*
*/
public class NaturalSelection {
public boolean existPerfectIndi... | src/darwin/NaturalSelection.java | 0.59796 | 0.451447 | NaturalSelection.java | starcoder |
package org.droidplanner.services.android.impl.core.helpers.geoTools;
import org.droidplanner.services.android.impl.core.helpers.coordinates.CoordBounds;
import com.o3dr.services.android.lib.coordinate.LatLong;
import java.util.ArrayList;
import java.util.List;
public class LineTools {
public static LineLatLong fi... | ClientLib/src/main/java/org/droidplanner/services/android/impl/core/helpers/geoTools/LineTools.java | 0.792745 | 0.417984 | LineTools.java | starcoder |
package daa.project.cvrp.problem;
/**
* Class which represents a node of Capacity Routing Vehicle Problem.
*
* @author <NAME> (<EMAIL>)
* @version 1.0
* @since 16 abr. 2018
*/
public class CVRPClient {
/** X axis coordinate of the node. */
private int xCoordinate;
/** Y axis coordinate of the node. */
priva... | src/daa/project/cvrp/problem/CVRPClient.java | 0.917136 | 0.413655 | CVRPClient.java | starcoder |
package org.apache.mahout.clustering.canopy;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.mahout.clustering.AbstractCluster;
import org.apache.mahout.common.ClassUtils;
import org.apache.mahout.common.distance.DistanceMea... | core/src/main/java/org/apache/mahout/clustering/canopy/CanopyClusterer.java | 0.918722 | 0.531027 | CanopyClusterer.java | starcoder |
package fr.insee.vtl.model;
import java.util.*;
import java.util.function.BiConsumer;
import java.util.function.BinaryOperator;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collector;
import java.util.stream.Collectors;
/**
* The <code>AggregationExpression</code> c... | vtl-model/src/main/java/fr/insee/vtl/model/AggregationExpression.java | 0.949798 | 0.722839 | AggregationExpression.java | starcoder |
package me.newyith.fortress.util;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.configuration.serialization.ConfigurationSerializable;
import org.bukkit.util.Vector;
import java.util.*;
import java.util.stream.Collectors;
public class ... | src/main/java/me/newyith/fortress/util/Cuboid.java | 0.775009 | 0.473353 | Cuboid.java | starcoder |
package algorithmx;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.Stack;
/**
An implementation of the "DancingLinks" algorithm:
http://en.wikipedia.org/wiki/Dancing_Links
*/
public final class DancingLinks {
public static final class M... | DancingLinks/src/algorithmx/DancingLinks.java | 0.863233 | 0.508056 | DancingLinks.java | starcoder |
package com.google.zigva.collect;
import com.google.common.testing.junit3.TearDownTestCase;
import com.google.zigva.collections.CircularBuffer;
import java.lang.Thread.State;
public class CircularBufferTest extends TearDownTestCase {
private static void enq(CircularBuffer<Character> buffer, String string) {
f... | test/com/google/zigva/collect/CircularBufferTest.java | 0.869867 | 0.422028 | CircularBufferTest.java | starcoder |
package com.ticka.application.widgets.particles.model;
import android.support.annotation.ColorInt;
import android.support.annotation.FloatRange;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import com.ticka.application.widgets.particles.Defaults;
import com.ticka.application.... | app/src/main/java/com/ticka/application/widgets/particles/model/Scene.java | 0.912616 | 0.431225 | Scene.java | starcoder |
package com.acadiasoft.simm.model.param.interestrate;
import com.acadiasoft.simm.model.object.Sensitivity;
import com.acadiasoft.simm.model.object.imtree.identifiers.BucketClass;
import com.acadiasoft.simm.model.object.imtree.identifiers.RiskClass;
import com.acadiasoft.simm.model.object.imtree.identifiers.WeightingC... | simm-model/src/main/java/com/acadiasoft/simm/model/param/interestrate/InterestRateCorrelationV2_0.java | 0.752195 | 0.404478 | InterestRateCorrelationV2_0.java | starcoder |
package com.scanlibrary;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapFactory.Options;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
public class ScalingUtilities {
/**
* Sca... | scanlibrary/src/main/java/com/scanlibrary/ScalingUtilities.java | 0.912268 | 0.603961 | ScalingUtilities.java | starcoder |
package pairings;
import java.util.*;
public class Questions implements Iterable<Question> {
private final List<Question> questions;
private final Map<Integer, Question> idToQuestion = new HashMap<>();
private final Map<Integer, List<Question>> categoryToQuestions = new HashMap<>();
public Questions... | src/main/java/pairings/Questions.java | 0.89317 | 0.458167 | Questions.java | starcoder |
package utils;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import models.PropositionalConnective;
public class CollectionUtils {
public static<T> List<Li... | src/utils/CollectionUtils.java | 0.675551 | 0.504028 | CollectionUtils.java | starcoder |
package coyote.mbus.message;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.UnknownHostException;
import coyote.commons.ByteUtil;
/**
* MessageAddress models an exact endpoint in the message network.
*
* <p>MessageAddresses signify the exact source or destination within the mBus
* n... | src/main/java/coyote/mbus/message/MessageAddress.java | 0.795142 | 0.435541 | MessageAddress.java | starcoder |
package jToolkit4ProgPipeline.file.model;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL20;
import static org.lwjgl.opengl.GL15.*;
import static org.lwjgl.opengl.GL15.glBufferData;
import static org.lwjgl.opengl.GL30.*;
/**
* Created by virus on 17/12/13.
*/
public class Model {
// vertices, normals,... | src/jToolkit4ProgPipeline/file/model/Model.java | 0.760028 | 0.506836 | Model.java | starcoder |
package com.github.thiagonego.alfred.numeros.digitos;
/**
* Implemention of Verhoeff's Dihedral Check Digit
*
* @author nickg
* @version 1
*
*/
public class DigitoDihedral implements Digito {
/**
* dihedral addition matrix A + B = a[A][B]
*/
private static final int a[][] = { { 0, 1, 2, 3, 4, 5, 6, 7, 8... | src/main/java/com/github/thiagonego/alfred/numeros/digitos/DigitoDihedral.java | 0.833426 | 0.553566 | DigitoDihedral.java | starcoder |
int val;
TreeNode left;
TreeNode right;
TreeNode(int x) { val = x; }
}
class Solution {
public TreeNode deleteNode(final TreeNode root, final int key) {
final TreeNode meta = new TreeNode(Integer.MIN_VALUE);
meta.right = root;
final TreeLinkHandle pos = new TreeLinkHandle(m... | main/delete-node-in-a-bst/delete-node-in-a-bst-2-scratch.java | 0.88467 | 0.488466 | delete-node-in-a-bst-2-scratch.java | starcoder |
package basicObjects.shapes;
/**
* @author <NAME> <<EMAIL>>
* @version Version 1
* @since 1.6
*/
import constants.Constants;
import junit.framework.Assert;
import org.junit.Test;
public class FieldTest
{
@Test
public void testCopy()
{
Field field = new Field(11);
Field random = new Field(11);
Field neig... | Testing/BasicObjects/Shapes/FieldTest.java | 0.797754 | 0.566828 | FieldTest.java | starcoder |
package tarehart.rlbot.planning;
import tarehart.rlbot.AgentOutput;
import tarehart.rlbot.math.TimeUtil;
import tarehart.rlbot.steps.BlindStep;
import tarehart.rlbot.steps.TapStep;
import tarehart.rlbot.steps.landing.LandGracefullyStep;
import tarehart.rlbot.steps.landing.LandMindlesslyStep;
import tarehart.rlbot.step... | java/src/tarehart/rlbot/planning/SetPieces.java | 0.610453 | 0.435301 | SetPieces.java | starcoder |
package frc.robot;
/**
* The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean
* constants. This class should not be used for any other purpose. All constants should be declared
* globally (i.e. public static). Do not put anything functional in this class.
*
* <p>It is... | src/main/java/frc/robot/Constants.java | 0.722527 | 0.487795 | Constants.java | starcoder |
package ingsw.group1.findmyphone;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.eis.smslibrary.SMSMessage;
import com.eis.smslibrary.SMSPeer;
import java.util.regex.Pattern;
import ingsw.group1.findmyphone.location.GeoPosition;
/**
* Class aimed to read and write the messages... | app/src/main/java/ingsw/group1/findmyphone/MessageParser.java | 0.877306 | 0.432842 | MessageParser.java | starcoder |
package bloomfilter.engine;
/**
* Abstract implementation of {@link IBloomFilter}.
*
* @author ThanhNB
* @since 0.1.0
*/
public abstract class BaseBloomFilter implements IBloomFilter {
private String name;
private long expectedNumItems = 0;
private double expectedFpp = 0.001;
private int numHash... | app/bloomfilter/engine/BaseBloomFilter.java | 0.94419 | 0.417212 | BaseBloomFilter.java | starcoder |
package lib.turbok.graph;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Polygon;
import java.awt.Rectangle;
import java.awt.Stroke;
import java.awt.geom.Rectangle2D;
im... | src/main/java/lib/turbok/graph/DrawingTool.java | 0.521715 | 0.409486 | DrawingTool.java | starcoder |
package filter;
import javafx.embed.swing.SwingFXUtils;
import javafx.scene.image.Image;
import java.awt.image.BufferedImage;
import java.awt.image.BufferedImageOp;
import java.awt.image.ConvolveOp;
import java.awt.image.Kernel;
public class GaussianFilter {
private float sigma;
private BufferedImage buffered... | src/filter/GaussianFilter.java | 0.923243 | 0.412589 | GaussianFilter.java | starcoder |
package com.linkedin.cubert.operator.cube;
import java.io.IOException;
import org.apache.pig.backend.executionengine.ExecException;
import org.apache.pig.data.Tuple;
import org.codehaus.jackson.JsonNode;
import com.linkedin.cubert.block.Block;
import com.linkedin.cubert.block.BlockSchema;
import com.linkedin.cubert.... | src/main/java/com/linkedin/cubert/operator/cube/CubeAggregator.java | 0.907064 | 0.407893 | CubeAggregator.java | starcoder |
package varun_algorithm_region;
import net.imglib2.Cursor;
import net.imglib2.Localizable;
import net.imglib2.RandomAccessible;
import net.imglib2.type.Type;
import net.imglib2.type.numeric.RealType;
import net.imglib2.type.operators.Add;
/**
* Write ellipses in an image using the midpoint algorithm.
*
* @author ... | src/main/java/varun_algorithm_region/Ellipses.java | 0.859074 | 0.539044 | Ellipses.java | starcoder |
package de.uni.bamberg.wiai.minf.forflow.datagenerator.controller.datageneration.distribution;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.uncommons.maths.number.NumberGenerator;
import org.... | java/de/uni/bamberg/wiai/minf/forflow/datagenerator/controller/datageneration/distribution/NormalDistribution.java | 0.882517 | 0.517388 | NormalDistribution.java | starcoder |
package com.opengamma.engine.view.execution;
import java.util.List;
import java.util.Map;
import org.springframework.util.ObjectUtils;
import org.threeten.bp.Instant;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.opengamma.engine.function.FunctionParameters... | projects/OG-Engine/src/main/java/com/opengamma/engine/view/execution/ViewCycleExecutionOptions.java | 0.894407 | 0.436562 | ViewCycleExecutionOptions.java | starcoder |
package frc.robot.constants;
import edu.wpi.first.math.geometry.Pose2d;
import edu.wpi.first.math.geometry.Rotation2d;
import edu.wpi.first.math.geometry.Transform2d;
import edu.wpi.first.math.geometry.Translation2d;
import edu.wpi.first.math.util.Units;
public class FieldConstants {
// Field Dimensions
publ... | src/main/java/frc/robot/constants/FieldConstants.java | 0.617974 | 0.654011 | FieldConstants.java | starcoder |
import java.util.Arrays;
import java.util.Collections;
import java.util.Random;
public class ExtraTask2 {
//Insertion sort section plus time test
public static void main(String a[]) {
// TEST OF THE SORTING WORKS - START
int[] testArra1 = {1, 2, 4, 3, 5, 0};
int[] testArra2 = {1, 2, 4... | LAB2/ExtraTask2.java | 0.576423 | 0.504272 | ExtraTask2.java | starcoder |
package calofit.model.util;
import static java.util.Objects.requireNonNull;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map.Entry;
import java.util.SortedMap;
import java.util.logging.Logger;
import javafx.collections.ObservableList;
impor... | src/main/java/calofit/model/util/Statistics.java | 0.945588 | 0.587914 | Statistics.java | starcoder |
package org.lcsim.recon.tracking.digitization.sisim;
import hep.physics.matrix.SymmetricMatrix;
import hep.physics.vec.BasicHep3Vector;
import hep.physics.vec.Hep3Vector;
import java.util.List;
import org.lcsim.detector.ITransform3D;
import org.lcsim.detector.Transform3D;
import org.lcsim.event.RawTrackerHit;
import o... | tracking/src/main/java/org/lcsim/recon/tracking/digitization/sisim/TransformableTrackerHit.java | 0.761184 | 0.434821 | TransformableTrackerHit.java | starcoder |
package it.uniroma2.sag.kelp.examples.main;
import it.uniroma2.sag.kelp.data.dataset.SimpleDataset;
import it.uniroma2.sag.kelp.data.example.Example;
import it.uniroma2.sag.kelp.data.label.StringLabel;
import it.uniroma2.sag.kelp.kernel.Kernel;
import it.uniroma2.sag.kelp.kernel.standard.LinearKernelCombination;
impor... | src/main/java/it/uniroma2/sag/kelp/examples/main/MultipleRepresentationExample.java | 0.639061 | 0.466663 | MultipleRepresentationExample.java | starcoder |
package io.github.gaming32.sdl4j.math;
import java.util.Arrays;
public class Vector2 extends Vector {
public static final Vector2 IDENTITY = new Vector2();
public final double x, y;
protected Vector2() {
this.x = 0;
this.y = 0;
}
public Vector2(double xy) {
this.x = this... | src/main/java/io/github/gaming32/sdl4j/math/Vector2.java | 0.940694 | 0.786131 | Vector2.java | starcoder |
package com.github.thesench.solr.dsl.stream.expr.evaluators;
import com.github.thesench.solr.dsl.stream.expr.params.FieldOrNumberEvaluator;
import org.apache.solr.client.solrj.io.stream.expr.StreamExpression;
public class Mult {
private Mult() {}
/**
* @see <a href="https://solr.apache.org/guide/8_10/s... | src/main/java/com/github/thesench/solr/dsl/stream/expr/evaluators/Mult.java | 0.912082 | 0.42662 | Mult.java | starcoder |
package server;
import java.util.Random;
import commun.Matrix;
import commun.Matrix2048;
public class Model {
private Matrix2048 board;
private Random rand;
/**
* Creates a size x size model.
* @param size
*/
public Model(Integer size) {
board = new Matrix2048(size);
... | src/server/Model.java | 0.85067 | 0.461563 | Model.java | starcoder |
package gov.faa.ang.swac.common.flightmodeling;
import gov.faa.ang.swac.common.flightmodeling.fileio.BadaRecord.FlightStage;
import java.io.Serializable;
/**
* Primarily a wrapper for the FuelUsagePoint class.<BR><BR>
*
* Used to track planned, nominal and delay fuel burn. The trajectory modeled from the origin... | swac-common/src/main/java/gov/faa/ang/swac/common/flightmodeling/FuelUsageRecord.java | 0.813238 | 0.542197 | FuelUsageRecord.java | starcoder |
package com.smart.colorview.normal;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.util.AttributeSet;
import andro... | smartcolorview/src/main/java/com/smart/colorview/normal/RectangleColorView.java | 0.834373 | 0.453141 | RectangleColorView.java | starcoder |
package edu.iu.dsc.tws.task.taskgraphbuilder;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
/**
* It is an abstract implementation of the task graph class which is mainly re... | twister2/task/src/main/java/edu/iu/dsc/tws/task/taskgraphbuilder/DataflowTaskGraphAbstraction.java | 0.727007 | 0.557002 | DataflowTaskGraphAbstraction.java | starcoder |
package com.esri.runtime.android.localgeofence;
import android.util.Log;
import com.esri.core.geometry.Geometry;
import com.esri.core.geometry.GeometryEngine;
import com.esri.core.geometry.LinearUnit;
import com.esri.core.geometry.Point;
import com.esri.core.geometry.Polygon;
import com.esri.core.geometry.Proximity2D... | 2015-DS/LocalGeofence/app/src/main/java/com/esri/runtime/android/localgeofence/LocalGeofence.java | 0.79649 | 0.439146 | LocalGeofence.java | starcoder |
package us.ihmc.robotics.math.trajectories.waypoints.interfaces;
import us.ihmc.euclid.interfaces.Clearable;
import us.ihmc.euclid.interfaces.Transformable;
import us.ihmc.euclid.tuple3D.Point3D;
import us.ihmc.euclid.tuple3D.Vector3D;
import us.ihmc.euclid.tuple3D.interfaces.Point3DBasics;
import us.ihmc.euclid.tuple... | ihmc-robotics-toolkit/src/main/java/us/ihmc/robotics/math/trajectories/waypoints/interfaces/EuclideanWaypointBasics.java | 0.915329 | 0.641113 | EuclideanWaypointBasics.java | starcoder |
package com.machinezoo.hookless;
/**
* Default exception to throw when reactive code needs to <a href="https://hookless.machinezoo.com/blocking">reactively block</a>.
* <p>
* Merely creating or throwing this exception is not sufficient to indicate blocking.
* Current reactive computation must be explicitly marked ... | src/main/java/com/machinezoo/hookless/ReactiveBlockingException.java | 0.950995 | 0.420183 | ReactiveBlockingException.java | starcoder |
package com.baozijuan.timegallery.bean;
import java.io.Serializable;
public class Response<T> implements Serializable {
private Status status;
private T data;
public Response() {
}
public Response(Status status, T data) {
this.status = status;
this.data = data;
}
public... | TimeGallery/server/src/main/java/com/baozijuan/timegallery/bean/Response.java | 0.751283 | 0.441974 | Response.java | starcoder |
package org.hildan.fxlog.data;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.hildan.fxlog.columns.ColumnDefinition;
/**
* Represents a columnized log entry.
*/
public class LogEntry {
private final Map<String, String> columnValues;
private final String initia... | src/main/java/org/hildan/fxlog/data/LogEntry.java | 0.92622 | 0.449393 | LogEntry.java | starcoder |
package org.apache.pdfbox.util;
import java.awt.geom.AffineTransform;
/**
* This class will be used for matrix manipulation.
*
* @author <a href="mailto:<EMAIL>"><NAME></a>
* @version $Revision: 1.14 $
*/
public class Matrix implements Cloneable
{
static final float[] DEFAULT_SINGLE =
{
1,0,0,
... | pdfbox/src/main/java/org/apache/pdfbox/util/Matrix.java | 0.904777 | 0.62309 | Matrix.java | starcoder |
package com.todoist.markup;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
public class MarkupParser {
public static final int HEADER = 1;
public static final int CODE_BLOCK = 2;
public static final int CODE_INLINE = 4;
public static final int GMAIL = 8;
public ... | src/main/java/com/todoist/markup/MarkupParser.java | 0.845209 | 0.450359 | MarkupParser.java | starcoder |
package mri.v3ds;
/**
* Face definition for a single triangle.
* <br>
* <br>
* The face definition contains three parameters (<code>P0, P1, P2</code>) which
* identify the three corners of a triangle. <code>P0, P1</code> and <code>P2</code>
* are simply indexes into the vertex and texture mapping arrays (acce... | processing_libraries/mri3ds/src/mri/v3ds/Face3ds.java | 0.828488 | 0.551393 | Face3ds.java | starcoder |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.