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
/* * Copyright 2001-2013 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...
scalatest/scalatest
jvm/scalactic-test/src/test/scala/org/scalactic/TolerantEquivalenceSpec.scala
Scala
apache-2.0
29,290
package mesosphere.marathon.api.v2 import mesosphere.marathon._ import mesosphere.marathon.api.TestAuthFixture import mesosphere.marathon.core.election.ElectionService import mesosphere.marathon.test.{ MarathonSpec, Mockito } import org.scalatest.{ GivenWhenThen, Matchers } class LeaderResourceTest extends MarathonSp...
timcharper/marathon
src/test/scala/mesosphere/marathon/api/v2/LeaderResourceTest.scala
Scala
apache-2.0
1,932
package dtable import com.typesafe.config.ConfigFactory import shared.model.User import scala.concurrent.{Await, Future} import slick.jdbc.SQLiteProfile.api._ import scala.concurrent.duration._ package object dblayer { def oper[T](action: Future[T]): T = { Await.result(action, 10 second) } def call[T1,T2...
SergiiPolokhalo/DTable
server/src/main/scala/dtable/dblayer/package.scala
Scala
apache-2.0
567
package uk.ac.ncl.openlab.intake24.services.systemdb.admin import java.security.SecureRandom import java.util.Base64 object URLAuthTokenUtils { private val secureRandom = new SecureRandom() private val base64Encoder = Base64.getUrlEncoder() private val allowedChars = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghjkmnpqrstu...
digitalinteraction/intake24
SystemDataServices/src/main/scala/uk/ac/ncl/openlab/intake24/services/systemdb/admin/URLAuthTokenUtils.scala
Scala
apache-2.0
713
package de.htwg.zeta.persistence.actorCache import java.util.UUID import scala.collection.mutable import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration import scala.util.Failure import scala.util.Success import akka.actor.Actor impor...
Zeta-Project/zeta
api/persistence/src/main/scala/de/htwg/zeta/persistence/actorCache/LoginInfoCacheActor.scala
Scala
bsd-2-clause
3,801
package com.ubeeko.exceptions /** * Created with IntelliJ IDEA. * User: elb * Date: 10/06/13 * Time: 15:28 */ trait NotImplementedOperation extends IllegalOperationException object NotImplementedOperation { def apply(message: String, cause: Throwable = null) = new Exception(message, cause) with NotImplementedO...
eric-leblouch/htalk
src/main/scala/com/ubeeko/exceptions/NotImplementedOperation.scala
Scala
apache-2.0
583
/* * 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
core/src/main/scala/org/apache/spark/internal/config/package.scala
Scala
apache-2.0
24,136
/* * The MIT License (MIT) * * Copyright (C) 2012 47 Degrees, LLC http://47deg.com [email protected] * * 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 with...
47deg/mvessel
core/src/main/scala/com/fortysevendeg/mvessel/util/ConnectionStringParser.scala
Scala
mit
2,019
package achauvin.mower sealed trait Command object Command { def parseOne(ch: Char): Command = ch match { case 'A' => Forward case 'G' => Left case 'D' => Right case _ => throw new NoSuchElementException } def parse(str: String): Seq[Command] = str map parseOne def apply(st...
Blackrush/mower
src/main/scala/achauvin/mower/commands.scala
Scala
mit
451
object Test extends dotty.runtime.LegacyApp { val ms = """This is a long multiline string with \\u000d\\u000a CRLF embedded.""" assert(ms.lines.size == 3, s"lines.size ${ms.lines.size}") assert(ms contains "\\r\\n CRLF", "no CRLF") }
folone/dotty
tests/run/t8015-ffc.scala
Scala
bsd-3-clause
239
package thistle.examples.webevent import thistle.core.Query import thistle.predicates.General.ofType import thistle.predicates.Indexes.first import thistle.examples.webevent._ import thistle.examples.webevent.Predicates.{clicked, referredBy, currentElementContainsListing, sameShop} object Queries { val PurchasedF...
smarden1/thistle
src/main/scala/thistle/examples/webevent/Queries.scala
Scala
mit
1,109
package model.auth import be.objectify.deadbolt.scala.models.{Permission, Role, Subject} case class Admin(identifier: String, authToken: String) extends Subject { val roles: List[Role] = List(AdminRole) val permissions: List[Permission] = List(AdminPermission) } object AdminRole extends Role { val name: Strin...
BandOf3/assignment-system-web
app/model/auth/Admin.scala
Scala
mit
411
/* * 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 ...
maropu/spark
core/src/main/scala/org/apache/spark/rpc/netty/NettyRpcEnv.scala
Scala
apache-2.0
27,722
package home.yang.dataflow.filter import home.yang.dataflow.Filter /** * Created by Administrator on 2016/5/2 0002. */ class ShortFilter(val keyName:String, isPass:(Ordered[Short])=>Boolean) extends Filter[Short](isPass){ override def createShort(short: Short): Any = { isPass(short) } }
wjingyao2008/firsttry
dataflow/src/main/scala/home/yang/dataflow/filter/ShortFilter.scala
Scala
apache-2.0
300
/* * Copyright 2001-2013 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
scalatest-test/src/test/scala/org/scalatest/jmock/SuiteExpectations.scala
Scala
apache-2.0
1,921
/* * 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 ...
actuaryzhang/spark
external/avro/src/test/scala/org/apache/spark/sql/avro/AvroSuite.scala
Scala
apache-2.0
58,092
/*** * Copyright 2015 Rackspace US, 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 applica...
wdschei/api-checker
cli/wadltest/src/main/scala/com/rackspace/com/papi/components/checker/cli/WadlTest.scala
Scala
apache-2.0
15,044
package com.thoughtworks.deeplearning.plugins import java.nio.ByteBuffer import com.dongxiguo.fastring.Fastring import com.dongxiguo.fastring.Fastring.Implicits._ import com.thoughtworks.continuation._ import com.thoughtworks.feature.Caller import com.typesafe.scalalogging.{CanLog, Logger} import org.slf4j.MDC import...
ThoughtWorksInc/DeepLearning.scala
plugins-Logging/src/main/scala/com/thoughtworks/deeplearning/plugins/Logging.scala
Scala
apache-2.0
1,958
/* * 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 ...
mdunker/usergrid
tests/performance/src/test/scala/Engine.scala
Scala
apache-2.0
1,252
package scorex.transaction import com.google.common.primitives.{Bytes, Ints} import org.h2.mvstore.MVStore import play.api.libs.json.{JsArray, JsObject, Json} import scorex.account.{Account, PrivateKeyAccount, PublicKeyAccount} import scorex.app.Application import scorex.block.{Block, BlockField} import scorex.network...
ConsensusResearch/Scorex-Lagonaki
scorex-transaction/src/main/scala/scorex/transaction/SimpleTransactionModule.scala
Scala
cc0-1.0
7,286
/* * 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
sql/core/src/test/scala/org/apache/spark/sql/execution/python/BatchEvalPythonExecSuite.scala
Scala
apache-2.0
4,818
package net.sansa_stack.inference.utils import org.apache.jena.reasoner.TriplePattern import org.apache.jena.sparql.util.NodeComparator /** * Ordering for triple patterns. * * @author Lorenz Buehmann */ class TriplePatternOrdering extends Ordering[TriplePattern]{ implicit val comp: NodeComparator = new Node...
SANSA-Stack/SANSA-RDF
sansa-inference/sansa-inference-common/src/main/scala/net/sansa_stack/inference/utils/TriplePatternOrdering.scala
Scala
apache-2.0
501
/* * 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 ...
esi-mineset/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/continuous/ContinuousExecution.scala
Scala
apache-2.0
14,230
package com.wordtrellis.projecteuler import scala.collection.mutable.ListBuffer /** * Unit Fraction is useful for determining the number of places it takes for a repeating decimal * to repeat. * see Project Euler problem 26 * @author Todd Cook * */ class UnitFraction(val num: Int, val MAX_SAMPLE_LENGTH: I...
todd-cook/Effective-Scala-with-Project-Euler
src/main/scala/com/wordtrellis/projecteuler/UnitFraction.scala
Scala
mit
1,126
package im.tox.toktok.app.main import android.content.Context import android.graphics.drawable.TransitionDrawable import android.support.v4.widget.NestedScrollView import android.support.v7.widget.CardView import android.util.AttributeSet import android.view.View.MeasureSpec import android.view.animation.{ Animation, ...
vassad/toktok
src/main/scala/im/tox/toktok/app/main/HomeSearch.scala
Scala
agpl-3.0
3,032
package monocle import monocle.syntax.{AppliedFocusSyntax, ComposedFocusSyntax} import monocle.internal.focus.FocusImpl import monocle.function.{At, Each, Index} object Focus extends AppliedFocusSyntax with ComposedFocusSyntax { sealed trait KeywordContext { extension [From](from: From) def as[CastTo <: ...
julien-truffaut/Monocle
core/shared/src/main/scala-3.x/monocle/Focus.scala
Scala
mit
1,601
package org.jetbrains.plugins.scala package lang package refactoring package introduceField import com.intellij.codeInsight.navigation.NavigationUtil import com.intellij.ide.util.PsiClassListCellRenderer import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.openapi.u...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/refactoring/introduceField/ScalaIntroduceFieldHandlerBase.scala
Scala
apache-2.0
5,116
class Test2(val valueVal: Test2) extends AnyVal // error: value class cannot wrap itself
som-snytt/dotty
tests/neg/i1642.scala
Scala
apache-2.0
89
// scalac: -Ystop-after:typer -Ymacro-expand:discard -nowarn object Test { "" match { case Unapply(a, b) => a: Int b: String case UnapplySeq(a, b1, b2) => a: Int b1: String b2: String } } // These used to fail `too many patterns` under -Ymacro-expand:discard
lrytz/scala
test/files/pos/t8934a/Test_2.scala
Scala
apache-2.0
301
package scalan import scala.language.implicitConversions import special.collection._ import special.wrappers.{WrappersSpecModule, WrappersModule} import scalan.util.{MemoizedFunc} import scalan.ExactIntegral._ trait Library extends Scalan with WrappersModule with WrappersSpecModule with CollsModule with Sizes...
ScorexFoundation/sigmastate-interpreter
library/src/main/scala/scalan/Library.scala
Scala
mit
5,966
/* * MUSIT is a museum database to archive natural and cultural history data. * Copyright (C) 2016 MUSIT Norway, part of www.uio.no (University of Oslo) * * 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 Softw...
kpmeen/musit
musit-service/src/test/scala/no/uio/musit/service/AccessLogFilterSpec.scala
Scala
gpl-2.0
1,529
package com.ing.baker.runtime.akka.actor.serialization import com.ing.baker.runtime.serialization.Encryption._ import org.scalacheck.Gen._ import org.scalacheck.Prop.forAll import org.scalacheck._ import org.scalatest.funsuite.AnyFunSuite import org.scalatestplus.scalacheck.Checkers class EncryptionPropertiesSpec ext...
ing-bank/baker
core/akka-runtime/src/test/scala/com/ing/baker/runtime/akka/actor/serialization/EncryptionPropertiesSpec.scala
Scala
mit
1,296
package controllers.forms import play.api.data.{Form,Forms} import com.overviewdocs.models.View object ViewUpdateAttributesForm { def apply() = Form( Forms.mapping("title" -> Forms.nonEmptyText) ((title) => View.UpdateAttributes(title=title)) ((attributes) => Some((attributes.title))) ) }
overview/overview-server
web/app/controllers/forms/ViewUpdateAttributesForm.scala
Scala
agpl-3.0
309
package quizleague.rest.mail import javax.servlet.http.HttpServlet import javax.servlet.http.HttpServletRequest import javax.servlet.http.HttpServletResponse import java.util.Properties import javax.mail.Session import javax.mail.internet.MimeMessage import javax.mail.internet.InternetAddress import quizleague.domain....
gumdrop/quizleague
jvm/src/main/scala/quizleague/rest/mail/MailHandler.scala
Scala
mit
3,087
package lila.common import lila.common.PimpedJson._ import play.api.libs.json.{ Json, OWrites } case class LightUser( id: String, name: String, title: Option[String], isPatron: Boolean) { def titleName = title.fold(name)(_ + " " + name) def titleNameHtml = title.fold(name)(_ + "&nbsp;" + name) } ...
clarkerubber/lila
modules/common/src/main/LightUser.scala
Scala
agpl-3.0
572
package com.sksamuel.avro4s.github import com.sksamuel.avro4s._ import org.scalatest.{FunSuite, Matchers} case class TestEntry(name: String) sealed trait TestClass // class or trait final case class Test(id: Int, entries: List[TestEntry]) extends TestClass // <-- list case class ContainsTestClass(testClass: TestClass...
51zero/avro4s
avro4s-core/src/test/scala/com/sksamuel/avro4s/github/GithubIssue234.scala
Scala
mit
551
/** * Copyright (C) ${project.inceptionYear} 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/LI...
TU-Berlin-DIMA/flink-hashagg
flink-hashagg-flink-jobs/src/main/scala/de/tu_berlin/dima/experiments/flink/hashagg/flink/WorkloadY.scala
Scala
apache-2.0
1,761
/* * 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 ...
sryza/spark
yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
Scala
apache-2.0
18,316
/* Copyright 2012 Twitter, 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 agreed to in writing, software distr...
twitter/bijection
bijection-core/src/main/scala/com/twitter/bijection/ModDivInjection.scala
Scala
apache-2.0
2,467
import cats.instances.future._ import cats.syntax.functor._ import com.bot4s.telegram.future.Polling import com.bot4s.telegram.methods._ import scala.concurrent.Future import com.bot4s.telegram.api.declarative.Commands class MarkdownBot(token: String) extends ExampleBot(token) with Polling with Commands[Future] { ...
mukel/telegrambot4s
examples/src/MarkdownBot.scala
Scala
apache-2.0
2,001
/* * 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 ...
cloud-fan/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/LiteralExpressionSuite.scala
Scala
apache-2.0
18,107
/* * Copyright 2015-2016 IBM Corporation * * 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 agree...
nwspeete-ibm/openwhisk
core/controller/src/main/scala/whisk/core/controller/Controller.scala
Scala
apache-2.0
4,462
/* * 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
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala
Scala
apache-2.0
8,478
package ml.tests import scala.collection.mutable.ArrayBuffer import ml.linalg.Matrix import ml.linalg.Ones import ml.linalg.Identity import ml.linalg.Zeros import ml.models.KMeansModel import ml.metrics.distance._ import ml.cluster.Kmeans import ml.cluster.KMedoids import ml.linalg.Table._ import ml.stats.statsOps._ ...
jccarrasco/maleta
src/ml/tests/test.scala
Scala
gpl-2.0
798
import akka.actor.Status.{Success} import akka.actor.{ActorSystem, Props} import akka.pattern.ask import akka.util.Timeout import com.dazito.scala.dakkabase.{DakkabaseDb, ScalaPongActor} import com.dazito.scala.dakkabase.messages.{ListSetRequest, SetRequest} import org.scalatest.{FunSpecLike, Matchers} import scala.co...
dazito/LearningAkkaScalaServer
akkademy-db/src/test/scala/ScalaAskExampleTest.scala
Scala
mit
3,738
/* Copyright (c) 2016 Lucas Satabin * * 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...
satabin/akka-easysync
src/main/scala/gnieh/easysync/model/package.scala
Scala
apache-2.0
3,456
/* * Copyright 2016 the original author or authors. * * 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 applica...
erenavsarogullari/spark-hazelcast-connector
examples/src/main/scala/com/onlinetechvision/spark/hazelcast/connector/rdd/implicits/WriteRDDToDistributedList.scala
Scala
apache-2.0
2,664
package com.googlecode.warikan.domain.roles import com.googlecode.warikan.domain.shared.math._ import com.googlecode.warikan.domain.models._ import com.googlecode.warikan.domain.repositories._ /** * PieMaker. * * @author yukei */ trait PieMaker { /** * Create Pie to be used in allot calculation. *...
digitalsoul0124/warikan
src/main/scala/com/googlecode/warikan/domain/roles/PieMaker.scala
Scala
mit
483
package is.hail.types.physical.stypes.interfaces import is.hail.annotations.Region import is.hail.asm4s._ import is.hail.expr.ir.EmitCodeBuilder import is.hail.linalg.{BLAS, LAPACK} import is.hail.types.physical.stypes.concrete.{SNDArraySlice, SNDArraySliceValue} import is.hail.types.physical.stypes.{EmitType, SSettab...
hail-is/hail
hail/src/main/scala/is/hail/types/physical/stypes/interfaces/SNDArray.scala
Scala
mit
28,560
package com.github.mmolimar.ksql import java.sql.ResultSet import scala.language.implicitConversions package object jdbc { object implicits { implicit class ResultSetStream(resultSet: ResultSet) { def toStream: Stream[ResultSet] = new Iterator[ResultSet] { def hasNext(): Boolean = resultSet.n...
mmolimar/ksql-jdbc-driver
src/main/scala/com/github/mmolimar/ksql/jdbc/package.scala
Scala
apache-2.0
674
package com.twitter.util import java.io.{ByteArrayInputStream, ByteArrayOutputStream, ObjectInputStream, ObjectOutputStream} import java.util.Locale import java.util.concurrent.TimeUnit import org.junit.runner.RunWith import org.scalatest.WordSpec import org.scalatest.concurrent.{Eventually, IntegrationPatience} impo...
slackhappy/util
util-core/src/test/scala/com/twitter/util/TimeTest.scala
Scala
apache-2.0
19,957
package lambdacalculus.logging import ch.qos.logback.core.LayoutBase import ch.qos.logback.classic.spi.ILoggingEvent import java.util.Date import java.text.SimpleDateFormat class LogbackDefaultLayout extends LayoutBase[ILoggingEvent] { override def doLayout(event:ILoggingEvent): String = { val elapsedTimeMs = ...
cn-uofbasel/nfn-scala
lambdacalc/src/main/scala/lambdacalculus/logging/LogbackDefaultLayout.scala
Scala
isc
943
package org.jetbrains.plugins.scala.testingSupport.scalatest.staticStringTest import org.jetbrains.plugins.scala.testingSupport.scalatest.ScalaTestTestCase /** * @author Roman.Shein * @since 26.06.2015. */ trait FreeSpecStaticStringTest extends ScalaTestTestCase { val freeSpecClassName = "FreeSpecStringTest" ...
ilinum/intellij-scala
test/org/jetbrains/plugins/scala/testingSupport/scalatest/staticStringTest/FreespecStaticStringTest.scala
Scala
apache-2.0
1,897
/** * Copyright (c) 2013, The National Archives <[email protected]> * http://www.nationalarchives.gov.uk * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozi...
valydia/csv-validator
csv-validator-core/src/main/scala/uk/gov/nationalarchives/csv/validator/schema/v1_1/SchemaValidator.scala
Scala
mpl-2.0
2,081
object ScalaStuff { // val run: Runnable = () => { /*do it*/ } val run: Runnable = new Runnable() { override def run() { //do it } } import scala.language.implicitConversions implicit def functionToRunnable(f: () => Unit): Runnable = new Runnable() { override def run() = f() } val ru...
zcox/iascala-functions-concurrency
src/main/scala/stuff.scala
Scala
mit
675
package com.github.aselab.activerecord.squeryl import com.github.aselab.activerecord._ import com.github.aselab.activerecord.dsl._ import org.squeryl.dsl._ import java.util.{Date, UUID} import java.sql.Timestamp import reflections._ class ExpressionConversion(field: FieldInfo) { import ReflectionUtil._ def toExp...
aselab/scala-activerecord
activerecord/src/main/scala/squeryl/ExpressionConversion.scala
Scala
mit
2,494
package orz.mongo.tochka.test import scala.util.Random import com.mongodb.casbah.Imports._ import orz.mongo.tochka._ import orz.mongo.tochka.test.util.Mongo class NumberFieldTest extends TestSuiteBase[Numbers] { val testee = Seq( Numbers(10, 100L, 0.01d), Numbers(20, 200L, 0.02d), Numbers(30, 300L, 0...
fkmt-disk/tochka
src/test/scala/orz/mongo/tochka/test/NumberFieldTest.scala
Scala
mit
14,446
package com.rajiv.server import java.nio.ByteBuffer object Protocol { val MAX_LENGTH = 128 } class Protocol(var length: Int, var payload: ByteBuffer) { def reset() { length = -1 payload = null } def isInitialized(): Boolean = { (length > 0 && payload != null) } def reset(length: Int, paylo...
RajivKurian/Java-NIO-example
src/main/scala/com/rajiv/server/Protocol.scala
Scala
apache-2.0
467
import java.io.File import sbt._ import sys.process._ /** * @author Emmanouil Antonios Platanios */ object BuildTool { sealed trait BuildTool { /** Name of this build tool. */ val name: String /** Detects whether or not this build tool is configured in the provided directory. * * For e...
eaplatanios/tensorflow
tensorflow/scala/project/BuildTool.scala
Scala
apache-2.0
5,229
import java.util.Properties import com.typesafe.sbt.SbtNativePackager.autoImport.{maintainer, packageDescription, packageSummary} import sbt.Keys._ import sbt._ import sbtrelease.ReleasePlugin.autoImport._ import sbtrelease.ReleasePlugin.autoImport.{ReleaseStep, ReleaseTransformations} import sbtrelease.Version.Bump.N...
ievgenen/workingstats
project/Settings.scala
Scala
mit
3,735
package io.circe.tests import algebra.Eq import cats.std.AllInstances import io.circe.{ Decoder, Encoder, Json } import org.scalacheck.{ Arbitrary, Gen } package object examples extends AllInstances with ArbitraryInstances with MissingInstances { val glossary: Json = Json.obj( "glossary" -> Json.obj( "tit...
beni55/circe
tests/shared/src/main/scala/io/circe/tests/examples/package.scala
Scala
apache-2.0
2,537
package us.feliscat.time import us.feliscat.m17n.MultiLingual /** * <pre> * Created on 2017/02/08. * </pre> * * @author K.Sakamoto */ trait MultiLingualTimeExtractorForWorldHistory extends TimeExtractor with MultiLingual
ktr-skmt/FelisCatusZero-multilingual
libraries/src/main/scala/us/feliscat/time/MultiLingualTimeExtractorForWorldHistory.scala
Scala
apache-2.0
235
package pl.iterators.kebs.scalacheck import enumeratum.ScalacheckInstances import org.scalacheck.{Arbitrary, Gen, ScalacheckShapeless} import pl.iterators.kebs.macros.CaseClass1Rep import java.net.{URI, URL} import java.time.temporal.ChronoUnit import java.time._ import java.util.concurrent.TimeUnit import scala.refl...
theiterators/kebs
scalacheck/src/main/scala/pl/iterators/kebs/scalacheck/ArbitrarySupport.scala
Scala
mit
4,414
/** * Copyright (c) 2016 Intel Corporation  * * 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 applicabl...
trustedanalytics/spark-tk
sparktk-core/src/main/scala/org/trustedanalytics/sparktk/dicom/internal/constructors/Import.scala
Scala
apache-2.0
5,997
package org.ucf.scala /** * @author */ import org.junit.Test import org.junit.Assert._ class ScalaTestAPP { @Test def testAdd() { println("Hello World From Scala") assertTrue(true) } }
bingrao/Scala-Learning
Underscore/src/test/scala/org/ucf/scala/ScalaTestApp.scala
Scala
mit
213
object line1 { trait MyTrait } object line2 { import line2._ class BugTest {def isTheBugHere(in: MyTrait.this.type#SomeData) = false} }
scala/scala
test/files/neg/t8534.scala
Scala
apache-2.0
142
package org.scalaide.debug.internal.command import java.util.concurrent.atomic.AtomicBoolean import scala.concurrent.Future import org.eclipse.debug.core.DebugEvent import org.scalaide.debug.internal.JdiEventReceiver import org.scalaide.debug.internal.model.JdiRequestFactory import org.scalaide.debug.internal.model....
dragos/scala-ide
org.scala-ide.sdt.debug/src/org/scalaide/debug/internal/command/ScalaStepReturn.scala
Scala
bsd-3-clause
2,401
/** * 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 not use ...
allenday/rice
rice-cli/src/main/scala/org/bdgenomics/rice/cli/RiceMain.scala
Scala
apache-2.0
2,298
package org.vitrivr.adampro.storage import org.vitrivr.adampro.AdamTestBase import org.vitrivr.adampro.communication.api.{EntityOp, RandomDataOp} import org.vitrivr.adampro.data.datatypes.AttributeTypes import org.vitrivr.adampro.data.entity.{AttributeDefinition, Entity} import scala.util.Random /** * ADAMpro * ...
dbisUnibas/ADAMpro
src/test/scala/org/vitrivr/adampro/storage/SolrHandlerTestSuite.scala
Scala
mit
1,840
/* sbt -- Simple Build Tool * Copyright 2010 Mark Harrah */ package sbt import Incomplete.{Error, Value => IValue} /** Describes why a task did not complete. * * @param node the task that did not complete that is described by this Incomplete instance * @param tpe whether the task was incomplete because of an error ...
kuochaoyi/xsbt
tasks/Incomplete.scala
Scala
bsd-3-clause
2,517
/*********************************************************************** * Copyright (c) 2013-2017 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
ronq/geomesa
geomesa-index-api/src/main/scala/org/locationtech/geomesa/index/index/z3/XZ3Index.scala
Scala
apache-2.0
1,554
package sharry.backend.job import sharry.common._ case class CleanupConfig(enabled: Boolean, interval: Duration, invalidAge: Duration) {}
eikek/sharry
modules/backend/src/main/scala/sharry/backend/job/CleanupConfig.scala
Scala
gpl-3.0
140
/******************************************************************************* Copyright (c) 2012-2014, KAIST, S-Core. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. *********************************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/analysis/typing/models/DOMHtml/HTMLSelectElement.scala
Scala
bsd-3-clause
10,504
import scala.reflect.runtime.universe._ import scala.tools.reflect.Eval object Test extends dotty.runtime.LegacyApp { reify { println("%s %s %s".format(List("a", "b", "c"): _*)) }.eval }
yusuke2255/dotty
tests/disabled/macro/run/t5824.scala
Scala
bsd-3-clause
196
/* * Copyright 2021 HM Revenue & Customs * * 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 a...
hmrc/ct-calculations
src/test/scala/uk/gov/hmrc/ct/accounts/frs105/boxes/AC7998Spec.scala
Scala
apache-2.0
2,072
/* * This file is part of Gwaihir * Copyright (C) 2013, 2014 Alvaro Polo * * Gwaihir 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 3 of the * License, or (at your option) any later version...
apoloval/gwaihir
src/test/scala/org/oac/gwaihir/core/ConditionEvaluatorTest.scala
Scala
gpl-2.0
2,404
package com.giyeok.jparser.nparser import com.giyeok.jparser.Inputs.Input import com.giyeok.jparser.NGrammar.{NAtomicSymbol, NExcept, NJoin, NLookaheadExcept, NLookaheadIs, NSequence, NSimpleDerive, NTerminal} import com.giyeok.jparser.nparser.AcceptCondition.AcceptCondition import com.giyeok.jparser.nparser.ParsingCo...
Joonsoo/moon-parser
naive/src/main/scala/com/giyeok/jparser/nparser/ParseTreeConstructor.scala
Scala
mit
8,240
package org.jetbrains.jps.incremental.scala.model.impl import org.jetbrains.jps.incremental.scala.model.JpsSbtExtensionService import org.jetbrains.jps.model.java.impl.JpsJavaDependenciesEnumerationHandler import org.jetbrains.jps.model.module.JpsModule import java.util import scala.jdk.CollectionConverters.IterableH...
JetBrains/intellij-scala
scala/compiler-jps/src/org/jetbrains/jps/incremental/scala/model/impl/JpsSbtDependenciesEnumerationHandler.scala
Scala
apache-2.0
1,403
package steve.client import domain.{Item, Job} import utils.JsonUtils import scalaj.http.BaseHttp case class ClientException(private val message: String = "", private val cause: Throwable = None.orNull) extends Exception(message, cause) case class ItemBatch(items: List[Map[String, Any]]...
ind9/steve
steve-client-scala/src/main/scala/steve/client/SteveClient.scala
Scala
apache-2.0
6,527
import java.io.File import testgen.TestSuiteBuilder.{fromLabeledTestFromInput, _} import testgen._ object AllergiesTestGenerator { def main(args: Array[String]): Unit = { val file = new File("src/main/resources/allergies.json") def toAlergenEnum(s: String): String = "Allergen." + s.toLowerCase.capita...
ricemery/xscala
testgen/src/main/scala/AllergiesTestGenerator.scala
Scala
mit
2,365
/* * Copyright 2001-2013 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...
travisbrown/scalatest
src/test/scala/org/scalautils/EqualitySpec.scala
Scala
apache-2.0
1,220
/** * Copyright 2011-2017 GatlingCorp (http://gatling.io) * * 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 appli...
timve/gatling
gatling-http/src/test/scala/io/gatling/http/check/body/HttpBodyRegexCheckSpec.scala
Scala
apache-2.0
3,751
object Test { opaque type T = String object T { def unwrap(t: T): String = t } opaque type U = String type W = U object U { def unwrap(w: W): String = w: U } }
lampepfl/dotty
tests/pos/i6003.scala
Scala
apache-2.0
182
/*********************************************************************** * Copyright (c) 2013-2020 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
aheyne/geomesa
geomesa-index-api/src/test/scala/org/locationtech/geomesa/index/api/ShardStrategyTest.scala
Scala
apache-2.0
1,387
package jp.co.bizreach.s3scala import org.scalatest.FunSuite import java.io.File class IOUtilsSuite extends FunSuite { test("toInputStream and toBytes"){ val file = new File("README.md") val in = IOUtils.toInputStream(file) val bytes = IOUtils.toBytes(in) assert(file.length == bytes.length) } ...
bizreach/aws-s3-scala
src/test/scala/jp/co/bizreach/s3scala/IOUtilsSuite.scala
Scala
apache-2.0
605
package org.jetbrains.plugins.scala package lang package psi package stubs import com.intellij.psi.stubs.StubElement import org.jetbrains.plugins.scala.lang.psi.api.base.ScStableCodeReferenceElement import org.jetbrains.plugins.scala.lang.psi.api.toplevel.imports.ScImportExpr /** * User: Alexander Podkhalyuzin * Da...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/stubs/ScImportExprStub.scala
Scala
apache-2.0
523
package us.feliscat.ner import java.io.File import java.nio.charset.StandardCharsets import java.nio.file.Files import us.feliscat.m17n.MultiLingual import us.feliscat.text.{StringNone, StringOption, StringSome} import us.feliscat.time.{TimeMerger, TimeTmp} import scala.collection.mutable.ListBuffer /** * <pre> ...
ktr-skmt/FelisCatusZero-multilingual
libraries/src/main/scala/us/feliscat/ner/MultiLingualNamedEntityRecognizerInEventOntology.scala
Scala
apache-2.0
2,430
package ch.bsisa.hyperbird.patman.simulations.model import java.util.Date /** * Models an hospital */ case class Hospital(code:String, schedule:Date, beds:List[Bed]) { }
bsisa/hb-api
app/ch/bsisa/hyperbird/patman/simulations/model/Hospital.scala
Scala
gpl-2.0
175
package com.basrikahveci package cardgame.messaging.request import cardgame.messaging.Request import cardgame.core.{OnlineUsers, Session} import cardgame.domain.User import cardgame.core.db.QueryEvaluatorContainer import compat.Platform import java.sql.Timestamp import org.apache.commons.codec.digest.DigestUtils obje...
metanet/cardgame-server-scala
src/main/scala/com/basrikahveci/cardgame/messaging/request/SignInRequest.scala
Scala
mit
2,005
/* * 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 ...
manuzhang/incubator-gearpump
core/src/test/scala/org/apache/gearpump/TestProbeUtil.scala
Scala
apache-2.0
1,260
/** * The MIT License * * Copyright (c) 2011 Benjamin Klum * * 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, cop...
helgoboss/commons-scala
src/main/scala/org/helgoboss/commons_scala/RichFile.scala
Scala
mit
11,712
package com.themillhousegroup.l7.xml import scala.xml._ import scala.xml.transform.{ RuleTransformer, RewriteRule } object NodeChanger { /** Generates a RewriteRule that will put newValue into anything matching the xPathExpression */ def rewrite(xPathExpression: => Seq[Node], newValue: Elem): RewriteRule = { ...
themillhousegroup/l7-merge
src/main/scala/com/themillhousegroup/l7/xml/NodeChanger.scala
Scala
mit
980
package ammonite.runtime.tools import java.io.PrintWriter import ammonite.util.Printer import coursier._ import coursier.core.{Authentication => CoursierAuthentication} import coursier.ivy.IvyRepository import coursier.maven.MavenRepository import scalaz.{-\\/, \\/-} import scalaz.concurrent.Task object DependencyC...
alexarchambault/ammonium
amm/runtime/src/main/scala/ammonite/runtime/tools/DependencyThing.scala
Scala
mit
6,969
package com.seanshubin.contract.test import java.io.{Console, InputStream, PrintStream} import java.nio.channels.Channel import java.util import java.util.Properties import com.seanshubin.contract.domain.SystemContract trait SystemNotImplemented extends SystemContract { override def in: InputStream = ??? overri...
SeanShubin/contract
test/src/main/scala/com/seanshubin/contract/test/SystemNotImplemented.scala
Scala
unlicense
2,171
package tetris.tetrominoes import tetris.tetrominoes.Color.Yellow /** * Shapes: * xx * ox */ case class O(x: Int = 0, rotation: Int = 0) extends Tetromino { val currentShape = Seq((0, 1), (1, 1), (1, 0)) def rotate: O = this def allRotations: Seq[O] = Seq(new O(x)) def copy(x: Int = 0, rotation: Int =...
PapaCharlie/TetrisBot
tetris/src/main/scala/tetris/tetrominoes/O.scala
Scala
mit
376
package it.dtk.util import java.net.NetworkInterface import scala.collection.JavaConversions._ /** * Created by fabiofumarola on 16/09/15. */ object HostIp { def findAll(): Map[String, String] = { val interfaces = NetworkInterface.getNetworkInterfaces interfaces.flatMap { inet => inet.getInetAddre...
DataToKnowledge/wheretolive-feed
feed-model/src/main/scala/it/dtk/util/HostIp.scala
Scala
apache-2.0
465
package org.randi3.method import org.junit.runner.RunWith import org.scalatest.matchers.MustMatchers import org.scalatest.FunSpec import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class CompleteRandomizationTest extends FunSpec with MustMatchers { describe("A Stack") { it("should pop value...
dschrimpf/randi3-method-complete
src/test/scala/org/randi3/method/complete/CompleteRandomizationTest.scala
Scala
gpl-3.0
454
/* * 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 ...
CodeGerm/monadic-lib
src/main/scala/org/cg/monadic/transformer/spark/DataFrameTransformationPipeline.scala
Scala
apache-2.0
1,138
package org.jetbrains.plugins.scala package lang package psi package api package statements import com.intellij.psi.PsiElement import com.intellij.psi.tree.IElementType import org.jetbrains.plugins.scala.lang.psi.api.base.ScAnnotations import org.jetbrains.plugins.scala.lang.psi.api.base.types.ScTypeElement import org...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/api/statements/ScValueOrVariable.scala
Scala
apache-2.0
1,883
package io.simao.riepete.metric_receivers.riemann import java.util.concurrent.TimeUnit import akka.actor.{Actor, ActorLogging} import io.simao.riepete.messages.Metric import scala.collection.immutable import scala.util.Try case object GetResetIntervalStats import com.codahale.metrics._ sealed trait ConnectionStat...
simao/riepete
src/main/scala/io/simao/riepete/metric_receivers/riemann/RiemannConnectionStatsKeeper.scala
Scala
mit
3,200