code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
hengyicai/OnlineAggregationUCAS
sql/core/src/main/scala/org/apache/spark/sql/columnar/NullableColumnBuilder.scala
Scala
apache-2.0
2,791
package gg.uhc.hosts.endpoints.key import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server.Route class KeyRoute(getApiKey: GetApiKey, regenerateApiKey: RegenerateApiKey) { def apply(): Route = pathEndOrSingleSlash { concat( get(getApiKey()), post(regenerateApiKey()) ...
Eluinhost/hosts.uhc.gg
src/main/scala/gg/uhc/hosts/endpoints/key/KeyRoute.scala
Scala
mit
336
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
stealthly/kafka
core/src/main/scala/kafka/server/ReplicaFetcherThread.scala
Scala
apache-2.0
7,228
/* * Copyright 2001-2009 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
svn2github/scalatest
src/main/scala/org/scalatest/fixture/FunSuite.scala
Scala
apache-2.0
10,591
package com.wavesplatform.block.validation import cats.syntax.either._ import com.wavesplatform.block.Block.{GenerationSignatureLength, GenerationVRFSignatureLength, MaxFeaturesInBlock, ProtoBlockVersion} import com.wavesplatform.block.{Block, MicroBlock} import com.wavesplatform.crypto import com.wavesplatform.crypto...
wavesplatform/Waves
node/src/main/scala/com/wavesplatform/block/validation/Validators.scala
Scala
mit
3,497
package com.basho.riak.spark.run import org.apache.spark._ import org.apache.spark.rdd._ object LongJobApp { val USAGE = "Usage: LongJobApp.jar [--iter num] [--durtaion sec] [--master spark://host{ip}:port] [--samples] [--partitions" val NUM_SAMPLES = 2048 val PARTITIONS = 3 val APP_NAME = "Pi Darts" val SP...
basho/spark-riak-connector
test-utils/src/main/scala/com/basho/riak/spark/run/PiRunLong.scala
Scala
apache-2.0
2,978
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
bravo-zhang/spark
mllib/src/test/scala/org/apache/spark/ml/evaluation/MulticlassClassificationEvaluatorSuite.scala
Scala
apache-2.0
1,664
package com.itszuvalex.itszulib.logistics import com.itszuvalex.itszulib.api.core.Loc4 /** * Created by Christopher Harris (Itszuvalex) on 4/5/15. */ trait INetworkNode[T <: INetwork[_,T]] { def setNetwork(network: T) def getNetwork: T def getLoc: Loc4 def canConnect(loc: Loc4): Boolean def refresh(...
BlockWorker/ItszuLib
src/main/scala/com/itszuvalex/itszulib/logistics/INetworkNode.scala
Scala
gpl-2.0
538
// Copyright (C) 2011-2012 the original author or authors. // See the LICENCE.txt file distributed with this work for additional // information regarding copyright ownership. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You ...
scalastyle/scalastyle
src/main/scala/org/scalastyle/Directory.scala
Scala
apache-2.0
2,638
package scalariform.formatter import scalariform.formatter.preferences._ class ParenAndBracketSpacingTest extends AbstractExpressionFormatterTest { { implicit val formattingPreferences = FormattingPreferences.setPreference(SpaceInsideParentheses, true) "()" ==> "()" "(a: Int) => 3" ==> "( a: Int ) => 3...
yu-iskw/scalariform
scalariform/src/test/scala/scalariform/formatter/ParenAndBracketSpacingTest.scala
Scala
mit
909
package com.typesafe.slick.testkit.tests import com.typesafe.slick.testkit.util.{AsyncTest, RelationalTestDB} class ColumnDefaultTest extends AsyncTest[RelationalTestDB] { import tdb.profile.api._ class A(tag: Tag) extends Table[(Int, String, Option[Boolean])](tag, "a") { def id = column[Int]("id") def a...
jkutner/slick
slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/ColumnDefaultTest.scala
Scala
bsd-2-clause
693
package com.rasterfoundry.database import com.rasterfoundry.datamodel._ import com.rasterfoundry.common.Generators.Implicits._ import doobie.implicits._ import org.scalacheck.Prop.forAll import org.scalatest._ import org.scalatestplus.scalacheck.Checkers class UploadDaoSpec extends FunSuite with Matchers ...
aaronxsu/raster-foundry
app-backend/db/src/test/scala/com/azavea/rf/database/UploadDaoSpec.scala
Scala
apache-2.0
7,493
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
kimoonkim/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala
Scala
apache-2.0
18,695
/*============================================================================ This Chisel source file is part of a pre-release version of the HardFloat IEEE Floating-Point Arithmetic Package, by John R. Hauser (with some contributions from Yunsup Lee and Andrew Waterman, mainly concerning testing). Copyright 2010, ...
stanford-ppl/spatial-lang
spatial/core/resources/chiselgen/template-level/templates/hardfloat/common.scala
Scala
mit
3,809
package org.cloudfun.util import scala.math._ /** * A range from some value to some other. */ trait ValueRange { def min: Double def max: Double def average = (min + max) / 2 def contains(v: Double) = v >= min && v <= max def contains(other: ValueRange) = max >= other.max && min <= other.min def interse...
zzorn/cloudfun
src/main/scala/org/cloudfun/util/ValueRange.scala
Scala
lgpl-3.0
1,338
// Copyright: 2010 - 2018 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.config import org.ensime.util.file._ import org.ensime.util.{ EnsimeSpec, EscapingStringInterpolation } import org.ensime.api._ import org.ensime.config.richconfig._ imp...
yyadavalli/ensime-server
core/src/test/scala/org/ensime/config/EnsimeConfigSpec.scala
Scala
gpl-3.0
2,776
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/main/scala/org/neo4j/cypher/internal/compiler/v2_3/executionplan/builders/RelationshipByIdBuilder.scala
Scala
apache-2.0
2,692
package cn.edu.sjtu.omnilab.emcbdc import org.apache.hadoop.io.NullWritable import org.apache.hadoop.mapred.lib.MultipleTextOutputFormat /** * Output RDD into multiple files named by the key. */ class RDDMultipleTextOutputFormat extends MultipleTextOutputFormat[Any, Any] { override def generateActualKey(key: Any,...
OMNILab/sjtu-bdc-data-tools
data-prepare/src/main/scala/cn/edu/sjtu/omnilab/emcbdc/RDDMultipleTextOutputFormat.scala
Scala
gpl-2.0
483
/* * Copyright 2001-2014 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
SRGOM/scalatest
scalactic-test/src/test/scala/org/scalactic/EntrySpec.scala
Scala
apache-2.0
1,907
/* NSC -- new Scala compiler * Copyright 2005-2013 LAMP/EPFL * @author Iulian Dragos */ package scala package tools.nsc package transform import scala.tools.nsc.symtab.Flags import scala.collection.{ mutable, immutable } import scala.annotation.tailrec /** Specialize code on types. * * Make sure you've read th...
slothspot/scala
src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
Scala
bsd-3-clause
90,053
package org.gedanken.farley.parser.modules /** * * parser/module/Module.scala * * Copyright 2013, 2015 Logan O'Sullivan Bruns * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License ...
loganbruns/farley
parser/src/main/scala/org/gedanken/farley/parser/modules/Module.scala
Scala
apache-2.0
1,460
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
aosagie/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/HiveOrcSourceSuite.scala
Scala
apache-2.0
6,098
/* * Feather-Crest is a library that simplifies interaction with the EVE Online API. * Copyright (C) 2016 Calavoow * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3...
Calavoow/feather-crest
src/test/scala/feather/crest/api/MarketSpec.scala
Scala
gpl-3.0
5,088
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
darionyaphet/spark
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamTest.scala
Scala
apache-2.0
37,049
package com.twitter.finagle.tracing import com.twitter.finagle._ import com.twitter.util.{Future, Throw} object TraceInitializerFilter { val role: Stack.Role = Stack.Role("TraceInitializerFilter") /** * @param newId Set the next TraceId when the tracer is pushed, `true` for clients. */ private[finagle] d...
luciferous/finagle
finagle-core/src/main/scala/com/twitter/finagle/tracing/TraceInitializerFilter.scala
Scala
apache-2.0
9,703
package org.pico.statsd import org.pico.disposal.Auto import org.pico.disposal.std.autoCloseable._ import org.pico.event.Bus import org.pico.statsd.arb._ import org.pico.statsd.datapoint._ import org.specs2.ScalaCheck import org.specs2.mutable.Specification import org.pico.statsd.syntax.event._ class AlertSpec extend...
pico-works/pico-statsd
pico-statsd/src/test/scala/org/pico/statsd/AlertSpec.scala
Scala
mit
2,683
package au.gov.dva.sopapi.sopref.parsing import au.gov.dva.sopapi.exceptions.SopParserRuntimeException import au.gov.dva.sopapi.sopref.parsing.traits.MiscRegexes import scala.util.Properties import scala.util.matching.Regex object SoPExtractorUtilities extends MiscRegexes { private val regexForRegisterId = """F(...
govlawtech/dva-sop-api
app/src/main/scala/au/gov/dva/sopapi/sopref/parsing/SoPExtractorUtilities.scala
Scala
apache-2.0
8,141
package edu.gemini.spModel.dataset import org.scalacheck._ import org.scalacheck.Gen._ import org.scalacheck.Arbitrary._ import java.time.Instant import java.util.UUID trait Arbitraries { implicit val arbitraryDataset: Arbitrary[Dataset] = Arbitrary { for { label <- arbitrary[DatasetLabel] ...
arturog8m/ocs
bundle/edu.gemini.pot/src/test/scala/edu/gemini/spModel/dataset/Arbitraries.scala
Scala
bsd-3-clause
2,954
package de.mukis.sbt.slick import sbt._ /** * Keys for slick code generation */ trait Keys { /** * database name => url */ type MakeUrl = Option[String] => String /** * database name => package name */ type MakePackage = String => String val slickDriver = SettingKey[String]("slick-driver", ...
muuki88/sbt-slick
src/main/scala/de/mukis/sbt/slick/Keys.scala
Scala
apache-2.0
1,714
/** * (c) Copyright 2013 WibiData, Inc. * * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of...
kijiproject/kiji-modeling
kiji-modeling/src/main/scala/org/kiji/modeling/framework/TupleUtil.scala
Scala
apache-2.0
7,635
// Copyright (c) 2016 PSForever.net to present package net.psforever.packet.game import net.psforever.packet.{GamePacketOpcode, Marshallable, PacketHelpers, PlanetSideGamePacket} import net.psforever.types.Vector3 import scodec.Codec import scodec.codecs._ /** * An `Enumeration` of the kinds of bugs applicable to t...
Fate-JH/PSF-Server
common/src/main/scala/net/psforever/packet/game/BugReportMessage.scala
Scala
gpl-3.0
2,745
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
u2009cf/spark-radar
graphx/src/test/scala/org/apache/spark/graphx/lib/PageRankSuite.scala
Scala
apache-2.0
8,046
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
amirhyoussefi/spark-template
src/main/scala/org/apache/spark/examples/LogQuery.scala
Scala
apache-2.0
3,844
package lila.site import scala.concurrent.duration._ import akka.actor._ import play.api.libs.json._ import actorApi._ import lila.common.PimpedJson._ import lila.socket._ import lila.socket.actorApi.StartWatching private[site] final class SocketHandler( socket: ActorRef, hub: lila.hub.Env) { def apply( ...
danilovsergey/i-bur
modules/site/src/main/SocketHandler.scala
Scala
mit
786
package ems.storage import java.io.{FileInputStream, File} import ems.{MIMEType, StreamingAttachment, Attachment} import ems.model.Entity import org.joda.time.DateTime case class FileAttachment(id: Option[String], file: File, name: String, mediaType: Option[MIMEType]) extends Entity[Attachment] with Attachment { d...
chrissearle/ems-redux
src/main/scala/ems/storage/FileAttachment.scala
Scala
apache-2.0
493
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
chenc10/Spark-PAF
core/src/main/scala/org/apache/spark/deploy/worker/ui/WorkerWebUI.scala
Scala
apache-2.0
2,044
package scala.models import org.scalatest.funspec.AnyFunSpec import org.scalatest.matchers.should.Matchers class JsonImportsSpec extends AnyFunSpec with Matchers { it("basic service") { JsonImports(models.TestHelper.referenceApiService) should be( Seq( "import io.apibuilder.reference.api.v0.model...
gheine/apidoc-generator
scala-generator/src/test/scala/models/JsonImportsSpec.scala
Scala
mit
642
/* * Copyright (c) 2018. Fengguo Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License v2.0 * which accompanies this distribution, and is available at * https://www.apache.org/licenses/LICENSE-2.0 * * Detailed contributors ar...
arguslab/Argus-SAF
jawa/src/main/scala/org/argus/jawa/flow/pta/rfa/ReachingFactsAnalysis.scala
Scala
apache-2.0
11,643
package com.github.spirom.sparkflights.fw import java.text.SimpleDateFormat import java.util.Calendar import org.apache.log4j.Logger import org.apache.spark.sql.DataFrame abstract class Experiment(val name: String) { val logger = Logger.getLogger(getClass.getName) def runQuery(df: DataFrame, runOutputBase: Str...
spirom/SparkFlightExamples
src/main/scala/com/github/spirom/sparkflights/fw/Experiment.scala
Scala
mit
1,309
package challenge import scala.util.Random import scala.math.{abs, max, pow} object Int191 { case class Pos(row: Int, col: Int) class Terrain(N: Int, start: Pos, goal: Pos) { val AsteroidPercentage = 0.2 val GravityWellPercentage = 0.07 val size = pow(N, 2) val asteroids = (AsteroidPercentage *...
nichwn/dailyprogrammer-scala
src/main/scala/challenge/Int191.scala
Scala
mit
3,759
package fr.thomasdufour.autodiff.examples object SimpleDerivation { def main( args: Array[String] ): Unit = { case class Item( description: String ) case class Bag( items: List[Item] ) import fr.thomasdufour.autodiff.Diff import fr.thomasdufour.autodiff.Pretty import fr.thomasdufour.autodiff.de...
chwthewke/auto-diff
auto-diff-examples/src/main/scala/fr/thomasdufour/autodiff/examples/SimpleDerivation.scala
Scala
apache-2.0
655
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.sexp.util trait ThreadLocalSupport { protected def local[T](t: => T) = new ThreadLocal[T] { override def initialValue = t } }
sugakandrey/ensime-server
s-express/src/main/scala/org/ensime/sexp/util/ThreadLocalSupport.scala
Scala
gpl-3.0
283
package io.swagger.client.api import io.swagger.client.model.Inline_response_200_15 import io.swagger.client.model.Inline_response_200_16 import io.swagger.client.model.UnitCategory import io.swagger.client.model.Inline_response_200_2 import io.swagger.client.ApiInvoker import io.swagger.client.ApiException import co...
QuantiModo/QuantiModo-SDK-Scala
src/main/scala/io/swagger/client/api/UnitCategoryApi.scala
Scala
gpl-2.0
8,117
package com.example.http4s package site import cats.effect.IO import org.http4s._ import org.http4s.dsl.io._ object HelloBetterWorld { val service = HttpService[IO] { // We use http4s-dsl to match the path of the Request to the familiar URI form case GET -> Root / "hello" => // We could make a IO[Res...
reactormonk/http4s
examples/src/main/scala/com/example/http4s/site/HelloBetterWorld.scala
Scala
apache-2.0
445
package sparkExample import org.apache.spark.mllib.classification.SVMWithSGD import org.apache.spark.mllib.evaluation.BinaryClassificationMetrics import org.apache.spark.mllib.optimization.L1Updater import org.apache.spark.mllib.regression.LabeledPoint import org.apache.spark.mllib.util.MLUtils import org.apache.spark...
baokunguo/learning-spark-examples
note/process/2015-07-12/scalaTest/src/sparkExample/LinearModelTest.scala
Scala
mit
1,971
package controllers.auth import javax.inject.Inject import play.api.mvc.{ActionBuilder,AnyContent,BodyParsers,Request,Result} import scala.concurrent.{ExecutionContext,Future} class ApiAuthorizedAction @Inject() ( apiTokenFactory: ApiTokenFactory, val bodyParser: BodyParsers.Default, ec: ExecutionContext ) { ...
overview/overview-server
web/app/controllers/auth/ApiAuthorizedAction.scala
Scala
agpl-3.0
1,389
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala package xml.dtd....
scala/scala-xml
shared/src/main/scala/scala/xml/dtd/impl/NondetWordAutom.scala
Scala
apache-2.0
2,509
package agilesites.setup import java.io._ import agilesites.Utils import sbt.Keys._ import sbt._ /** * Created by msciab on 01/03/15. */ trait SetupSettings extends Utils { this: AutoPlugin with InstallerSettings with ToolsSettings with TomcatSettings => import agilesites.config.AgileSitesConfigKe...
agilesites/agilesites2-build
src/main/scala/agilesites/setup/SetupSettings.scala
Scala
mit
6,652
package mesosphere.marathon.integration import java.io.File import mesosphere.marathon.integration.setup._ import org.scalatest.{ BeforeAndAfter, GivenWhenThen, Matchers } class MarathonStartupIntegrationTest extends IntegrationFunSuite with SingleMarathonIntegrationTest with Matchers with BeforeAndAfter...
EasonYi/marathon
src/test/scala/mesosphere/marathon/integration/MarathonStartupIntegrationTest.scala
Scala
apache-2.0
992
/* * Copyright (C) 2016-2017 Lightbend Inc. <http://www.lightbend.com> */ package akka.persistence.cassandra.query import akka.annotation.InternalApi /** * INTERNAL API */ @InternalApi private[akka] trait CassandraReadStatements { def config: CassandraReadJournalConfig private def tableName = s"${config.ke...
ktoso/akka-persistence-cassandra
core/src/main/scala/akka/persistence/cassandra/query/CassandraReadStatements.scala
Scala
apache-2.0
1,188
package feh.tec.nxt import feh.tec.nxt.LegoRobotRubik.{LightSensorPosition, CubeRotationMotor, LightSensorMotor} object CubeSideAction{ def foreachCube[R](f: ((Int, Int)) => R) (implicit lsm: LightSensorMotor, crm: CubeRotationMotor): Seq[R] = motorPositions.map{ case (p, LightSensor...
fehu/int-sis--Rubik
nxt/src/main/scala/feh/tec/nxt/CubeSideAction.scala
Scala
mit
1,166
package org.jetbrains.plugins.scala.conversion package generated import org.jetbrains.plugins.scala.lang.formatting.settings.ScalaCodeStyleSettings import org.jetbrains.plugins.scala.settings.ScalaProjectSettings import org.jetbrains.plugins.scala.util.TypeAnnotationSettings class JavaToScalaConversionExamplesTest ex...
loskutov/intellij-scala
test/org/jetbrains/plugins/scala/conversion/generated/JavaToScalaConversionExamplesTest.scala
Scala
apache-2.0
2,105
package com.outr.stripe.connect import com.outr.stripe.Money case class FeeRefund(id: String, `object`: String, amount: Money, balanceTransaction: Option[String], created: Long, currency: String, ...
outr/scala-stripe
core/jvm/src/main/scala/com/outr/stripe/connect/FeeRefund.scala
Scala
mit
388
package at.fh.swengb.resifoAndroid.activities.list import android.app.Activity import android.content.Intent import android.os.Bundle import android.view.View import android.view.View.OnClickListener import android.widget.ImageView import at.fh.swengb.resifoAndroid.{MainActivity, R} /** * Created by laszlobalo on 3...
Gulasch4ever/resifo-android
app/src/main/scala/at/fh/swengb/resifoAndroid/activities/list/Credits.scala
Scala
gpl-3.0
795
package com.socrata.geoexport.util import org.geotools.feature.FeatureIterator import org.opengis.feature.simple.SimpleFeature class GeoIterator(sfi: FeatureIterator[SimpleFeature]) extends Iterator[SimpleFeature] with AutoCloseable { def hasNext: Boolean = sfi.hasNext() def next(): SimpleFeature = sfi.next() ...
socrata-platform/geo-export
src/main/scala/com.socrata.geoexport/util/GeoIterator.scala
Scala
apache-2.0
373
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
fusepoolP3/p3-silk
silk-learning/src/main/scala/de/fuberlin/wiwiss/silk/learning/reproduction/TransformationCrossover.scala
Scala
apache-2.0
1,749
package com.twitter.finatra.kafkastreams.integration.finatratransformer import com.twitter.conversions.DurationOps._ import com.twitter.finatra.kafkastreams.test.{FinatraTopologyTester, TopologyFeatureTest} import org.apache.kafka.common.serialization.Serdes import org.joda.time.DateTime class WordLengthServerTopolog...
twitter/finatra
kafka-streams/kafka-streams/src/test/scala/com/twitter/finatra/kafkastreams/integration/finatratransformer/WordLengthServerTopologyFeatureTest.scala
Scala
apache-2.0
1,494
/* Copyright (c) 2013-2016 Karol M. Stasiak Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distr...
KarolS/units
units/src/main/scala/io/github/karols/units/internal/Integers.scala
Scala
mit
5,231
import sbt._ import Keys._ import com.typesafe.sbt.SbtMultiJvm import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys.MultiJvm import org.scalastyle.sbt.ScalastylePlugin import pl.project13.scala.sbt.JmhPlugin import sbtassembly.AssemblyPlugin.autoImport._ /** * FiloDB modules and dependencies */ object FiloBuild extends...
velvia/FiloDB
project/FiloBuild.scala
Scala
apache-2.0
13,983
import stainless.lang._ import stainless.proof._ import stainless.annotation._ object Laws1 { abstract class A { def value: BigInt @law def lawNotZero: Boolean = { value != 0 } } abstract class B extends A { override def lawNotZero: Boolean = { value == 0 } } case cla...
epfl-lara/stainless
frontends/benchmarks/verification/invalid/Laws1.scala
Scala
apache-2.0
363
package org.jetbrains.plugins.scala package annotator import org.intellij.lang.annotations.Language import org.jetbrains.plugins.scala.base.SimpleTestCase import org.jetbrains.plugins.scala.extensions._ import org.jetbrains.plugins.scala.lang.psi.api.base.ScReferenceElement import org.jetbrains.plugins.scala.lang.psi...
loskutov/intellij-scala
test/org/jetbrains/plugins/scala/annotator/ApplicationAnnotatorTestBase.scala
Scala
apache-2.0
1,414
/* * Applied Processing * Copyright 2014 yueh * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This progra...
Mazdallier/AppliedProcessing
src/main/scala/de/orod/minecraft/appliedprocessing/utility/LogHelper.scala
Scala
gpl-2.0
1,340
package io.hydrosphere.mist.master.interfaces import org.scalatest.{FunSpec, Matchers} import org.scalatest.prop.TableDrivenPropertyChecks._ import spray.json._ import scala.language.postfixOps class AnyJsonTest extends FunSpec with DefaultJsonProtocol with AnyJsonFormat with Matchers { val expected = Table[JsVal...
Hydrospheredata/mist
mist/master/src/test/scala/io/hydrosphere/mist/master/interfaces/AnyJsonTest.scala
Scala
apache-2.0
865
package proofpeer.proofscript.automation import proofpeer.proofscript.logic._ import scala.language.implicitConversions import scalaz.{ Name => _, _} import Scalaz._ object KernelInstances { implicit object TermIsEqual extends Equal[Term] { override def equal(l: Term, r: Term) = l == r } implicit object Nam...
proofpeer/proofpeer-proofscript
shared/src/main/scala/proofpeer/proofscript/automation/Instances.scala
Scala
mit
4,400
package ru.tmtool.commons.priority import junit.framework.TestCase import org.junit.Test import org.scalatest._ /** * User: Sergey Kozlov [email protected] * Date: 12.08.2014 * Time: 16:49 */ class PrioritiesSeqTest extends TestCase with MustMatchers{ @Test def testEmptySeq(){ val priorities = new Priorities...
tmtool/commons
src/test/scala/ru/tmtool/commons/priority/PrioritiesSeqTest.scala
Scala
mit
1,346
package cromwell.api.model import spray.json.{DefaultJsonProtocol, JsNumber, JsValue, RootJsonFormat} case class ShardIndex(index: Option[Int]) extends AnyVal { override def toString: String = index.getOrElse(-1).toString } object ShardIndexFormatter extends DefaultJsonProtocol { implicit object ShardIndexJsonFo...
ohsu-comp-bio/cromwell
cromwellApiClient/src/main/scala/cromwell/api/model/ShardIndex.scala
Scala
bsd-3-clause
744
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
pgandhi999/spark
core/src/main/scala/org/apache/spark/executor/ExecutorSource.scala
Scala
apache-2.0
6,138
import leon.annotation._ import leon.lang._ object DaysToYears { val base : Int = 1980 def isLeapYear(y : Int): Boolean = y % 4 == 0 def daysToYears(days : Int): Int = { require(days > 0) daysToYears1(base, days)._1 } def daysToYears1(year : Int, days : Int): (Int, Int) = { require(year >= bas...
epfl-lara/leon
testcases/repair/DaysToYears/DaysToYears1.scala
Scala
gpl-3.0
956
/** * Copyright (C) 2014 TU Berlin ([email protected]) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
akunft/peel
peel-core/src/main/scala/org/peelframework/core/results/model/ExperimentRun.scala
Scala
apache-2.0
2,973
package com.twitter.finagle.stats /** * A RollupStatsReceiver reports stats on multiple Counter/Stat/Gauge based on the sequence of * names you pass. * e.g. * counter("errors", "clientErrors", "java_net_ConnectException").incr() * will actually increment those three counters: * - "/errors" * - "/errors/clientEr...
BuoyantIO/twitter-util
util-stats/src/main/scala/com/twitter/finagle/stats/RollupStatsReceiver.scala
Scala
apache-2.0
1,453
package org.crudible.lift.binding.util import org.crudible.core.table.Table import org.crudible.core.table.TableRepository import org.crudible.core.table.TableRowModel import org.crudible.core.table.action.OnEntity import org.crudible.core.table.action.OnInstance import org.crudible.lift.ui.ConfirmDialog import net.li...
rehei/crudible
crudible-lift/src/main/scala/org/crudible/lift/binding/util/ActionFactory.scala
Scala
apache-2.0
1,719
package com.goticks import scala.concurrent.Future import scala.util.{Failure, Success} import akka.actor.{ ActorSystem , Actor, Props } import akka.event.Logging import akka.util.Timeout import akka.http.scaladsl.Http import akka.http.scaladsl.Http.ServerBinding import akka.http.scaladsl.server.Directives._ import ...
gilbutITbook/006877
chapter-up-and-running/src/main/scala/com/goticks/Main.scala
Scala
mit
1,670
package net.caoticode.synergy class AbstractWorker { }
mdread/synergy
src/main/scala/net/caoticode/synergy/AbstractWorker.scala
Scala
mit
60
package jp.co.cyberagent.aeromock.template.jade4j import jp.co.cyberagent.aeromock.AeromockConfigurationException import jp.co.cyberagent.aeromock.config.Project import jp.co.cyberagent.aeromock.core.script.GroovyScriptRunner import de.neuland.jade4j.JadeConfiguration import de.neuland.jade4j.template.FileTemplateLoad...
CyberAgent/aeromock
aeromock-jade4j/src/main/scala/jp/co/cyberagent/aeromock/template/jade4j/JadeConfigurationFactory.scala
Scala
mit
2,156
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may no...
xubo245/CloudSW
src/main/scala/org/dsa/mediator/smithwaterman/adam/SmithWatermanGapScoringFromFn.scala
Scala
gpl-2.0
2,460
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
milliman/spark
mllib/src/test/scala/org/apache/spark/ml/recommendation/ALSSuite.scala
Scala
apache-2.0
37,092
/* * Copyright (c) 2015. * CenturyLink Cloud. All rights reserved. */ package net.xtof.time trait PeriodWriter { def write(p: Period): String } object PeriodWriter { val basic = new PeriodWriter { override def write(p: Period): String = s"P${p.years}Y${p.months}MT${p.preciseMilliseconds * 1000.0}S" ...
xtofs/tiny-time
src/main/scala/net/xtof/time/PeriodWriter.scala
Scala
apache-2.0
1,290
package mesosphere.marathon.state import com.google.protobuf.Message /** * @author Tobi Knaup */ trait MarathonState[M <: Message, T <: MarathonState[M, _]] { def mergeFromProto(message: M): T def mergeFromProto(bytes: Array[Byte]): T def toProto: M def toProtoByteArray: Array[Byte] = toProto.toByteArr...
MiLk/marathon
src/main/scala/mesosphere/marathon/state/MarathonState.scala
Scala
apache-2.0
325
package reactivemongo.api sealed trait Compressor { /** The compressor [[https://github.com/mongodb/specifications/blob/master/source/compression/OP_COMPRESSED.rst#mongodb-handshake-amendment name]] (e.g `snappy`) */ def name: String /** The compressor [[https://github.com/mongodb/specifications/blob/master/sou...
ReactiveMongo/ReactiveMongo
core/src/main/scala/api/Compressor.scala
Scala
apache-2.0
2,025
package suiryc.scala.javafx.concurrent import akka.actor.{Actor, ActorRef, Props, Terminated} import com.typesafe.config.Config import com.typesafe.scalalogging.StrictLogging import javafx.application.Platform import monix.execution.{Cancelable, Scheduler} import suiryc.scala.Configuration import suiryc.scala.akka.Cor...
suiryc/suiryc-scala
javafx/src/main/scala/suiryc/scala/javafx/concurrent/JFXSystem.scala
Scala
gpl-3.0
8,178
package org.monkeynuthead.monkeybarrel.web import akka.actor.ActorSystem import akka.stream.scaladsl.Source import akka.testkit.{TestActorRef, TestKit} import org.scalatest.{BeforeAndAfterAll, MustMatchers, WordSpec} import scala.language.{implicitConversions, postfixOps} /** * Testing for the BroadcastMe...
georgenicoll/monkey-barrel
web/src/test/scala/org/monkeynuthead/monkeybarrel/web/BroadcastMessagesActorSpec.scala
Scala
gpl-2.0
3,002
package pl.bitgrind.messages import Messages._ object MessageValidation { import scalaz._ import scalaz.Scalaz._ type StringValidation[T] = ValidationNel[String, T] private def validUserId(userId: Int): StringValidation[Int] = if (userId <= 0) "INVALID_USER_ID".failureNel else userId.successNel p...
oegnus/scalaMicroservice
src/main/scala/pl/bitgrind/messages/MessageValidation.scala
Scala
mit
713
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
lxsmnv/spark
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamTest.scala
Scala
apache-2.0
36,666
package com.typesafe.training.scalatrain /** * Created by admin on 7/28/14. */ import scala.collection.immutable.Seq case class Train(info: TrainInfo, schedule: Seq[(Time, Station)]) { require(schedule.size >= 2, "Schedule must contain at least 2 Station type values") //TODO Verify that schedule is strictly inc...
praneetloke/FastTrackToScala
src/main/scala/com/typesafe/training/scalatrain/Train.scala
Scala
mit
712
package mesosphere.marathon.core.launcher.impl import akka.pattern.AskTimeoutException import mesosphere.marathon.core.base.Clock import mesosphere.marathon.core.launcher.{ TaskOp, OfferProcessor, OfferProcessorConfig, TaskLauncher } import mesosphere.marathon.core.matcher.base.OfferMatcher import mesosphere.marathon....
vivekjuneja/marathon
src/main/scala/mesosphere/marathon/core/launcher/impl/OfferProcessorImpl.scala
Scala
apache-2.0
6,906
package util.uima import org.apache.uima.jcas.cas.FloatArray /** * @author K.Sakamoto * Created on 2016/09/25 */ object FloatArrayUtils { implicit def floatArrayToFloatArrayUtils(repr: FloatArray): FloatArrayUtils = { new FloatArrayUtils(repr) } } /** * @author K.Sakamoto * @param repr floa...
ktr-skmt/FelisCatusZero
src/main/scala/util/uima/FloatArrayUtils.scala
Scala
apache-2.0
432
package lila.coordinate import com.typesafe.config.Config import lila.common.PimpedConfig._ final class Env( config: Config, db: lila.db.Env) { private val CollectionScore = config getString "collection.score" lazy val api = new CoordinateApi(scoreColl = scoreColl) lazy val forms = DataForm priva...
r0k3/lila
modules/coordinate/src/main/Env.scala
Scala
mit
536
/* * This file is part of the changelogit project. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
gnieh/changelogit
src/main/scala/gnieh/changelogit/ChangeloGit.scala
Scala
apache-2.0
3,933
package akka.http.extensions.stubs import akka.http.extensions.security._ import akka.http.extensions.utils.BiMap import com.github.t3hnar.bcrypt._ import scala.concurrent.Future /** * Inmemory login and registration controller, recommended mostly for testing */ class InMemoryLoginController extends FutureLoginCon...
denigma/akka-http-extensions
extensions/src/main/scala/akka/http/extensions/stubs/InMemoryLoginController.scala
Scala
mpl-2.0
2,555
package lightning.evaluator.json import io.shaka.http.Http.http import io.shaka.http.Request.GET import io.shaka.http.Status import lightning.model.SystemName import lightning.model.Node case class HttpGraphStatusEvaluator(url: String, targetNode: Node) extends JsonStatusEvaluator { def apply() = { val response...
lancewalton/lightning
evaluator/src/main/scala/lightning/evaluator/json/HttpGraphStatusEvaluator.scala
Scala
mit
514
/** * Copyright 2009 Jorge Ortiz * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
jorgeortiz85/scala-time
src/main/scala/org/scala_tools/time/RichReadableInterval.scala
Scala
apache-2.0
1,123
/* * Copyright (C) 2013 Tactix4 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is dis...
NeovaHealth/t4openerp-connector
src/main/scala/com/tactix4/t4openerp.connector/OEContext.scala
Scala
agpl-3.0
1,399
package objektwerks import org.scalatest.funsuite.AnyFunSuite import org.scalatest.matchers.should.Matchers import scala.collection.JavaConverters._ class AccumulatorTest extends AnyFunSuite with Matchers { import SparkInstance._ test("long accumulator") { val longAcc = sparkContext.longAccumulator("longA...
objektwerks/spark
src/test/scala/objektwerks/AccumulatorTest.scala
Scala
apache-2.0
868
package vggames.shared.view import vggames.shared.GamesConfiguration import vggames.shared.Game import scala.collection.concurrent.Map import scalatags.Text.all._ import vggames.shared.vraptor.GameFactoryCache import scala.util.Try import vggames.shared.GameView import scala.util.Success import scala.util.Failure impo...
rustaeja/rustaeja-project-8273
web/src/main/scala/vggames/shared/view/TaskView.scala
Scala
gpl-3.0
1,453
/** * Copyright (C) 2010 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This program i...
evlist/orbeon-forms
src/main/scala/org/orbeon/oxf/xforms/event/events/SubmitResponseEvent.scala
Scala
lgpl-2.1
8,663
package com.nabijaczleweli.fancymagicks.element.caster import com.nabijaczleweli.fancymagicks.util.NBTReloadable trait ElementCaster extends NBTReloadable { def start(): Unit def continue(): Unit def end(): Unit }
nabijaczleweli/Magicks
src/main/scala/com/nabijaczleweli/fancymagicks/element/caster/ElementCaster.scala
Scala
mit
221
package sledtr.section.filter import net.htmlparser.jericho._ import scala.collection.JavaConversions._ import sledtr.MyPreDef._ // 調査用にHTMLの構造を書き出す object HtmlInfo { def check(src: Source, target: Element): String = { val sb = new StringBuffer for(elm <- src.getChildElements) r(elm, target, sb, 0) sb.to...
K2Da/sledtr
src/main/scala/sledtr/section/filter/HtmlInfo.scala
Scala
gpl-3.0
1,125
/* ______________ ___ __ ___ _____ _____ ____ __ ____________ *\\ ** / __/_ __/ __ \\/ _ \\/ |/ / / __/ |/ / _ \\/ __ \\/ / / /_ __/ __/ ** ** _\\ \\ / / / /_/ / , _/ /|_/ / / _// / , _/ /_/ / /_/ / / / / _/ ** ** /___/ /_/ \\____/_/|_/_/ /_/ /___/_/|_/_/|_|\\____/\\____/ /_/ /___/ ** **...
axel22/scala-2d-game-editor
tmp/scala/org/brijest/storm/engine/impl/local/Database.scala
Scala
bsd-3-clause
3,539
package org.splink.pagelets object RequestId { private val rnd = new scala.util.Random() def create = RequestId("[" + (0 to 5).map { _ => (rnd.nextInt(90 - 65) + 65).toChar }.mkString + "]") } case class RequestId(id: String) { override def toString = id }
splink/pagelets
src/main/scala/org/splink/pagelets/RequestId.scala
Scala
apache-2.0
271
package example object Hello extends Greeting with App { println(greeting) } trait Greeting { lazy val greeting: String = "hello world!" }
crajyaguru/bigdata
spark/Hello/src/main/scala/example/Hello.scala
Scala
gpl-3.0
154