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 (C) 2016-2017 Lightbend Inc. <https://www.lightbend.com> * * based on https://github.com/lagom/lagom/blob/1.3.3/dev/service-registry/service-locator/src/main/java/com/lightbend/lagom/discovery/impl/ServiceRegistryImpl.java * */ package me.alexray.lagom.kube.discovery.impl import java.net.URI impor...
AlexanderRay/lagom-on-kube
lagomKubeServiceRegister/src/main/scala/me/alexray/lagom/kube/discovery/impl/KubeServiceRegistryImpl.scala
Scala
apache-2.0
2,675
package org.jetbrains.plugins.scala.failed.resolve import org.jetbrains.plugins.scala.PerfCycleTests import org.junit.experimental.categories.Category /** * Created by kate on 3/25/16. */ @Category(Array(classOf[PerfCycleTests])) class OverloadedResolutionTest extends FailedResolveTest("overloadedResolution") { ...
whorbowicz/intellij-scala
test/org/jetbrains/plugins/scala/failed/resolve/OverloadedResolutionTest.scala
Scala
apache-2.0
399
/** * Copyright (C) 2013 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...
orbeon/orbeon-forms
form-runner/shared/src/main/scala/org/orbeon/oxf/fr/FormRunnerLang.scala
Scala
lgpl-2.1
8,804
/* * 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 ...
bowenli86/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/batch/sql/agg/AggregateTestBase.scala
Scala
apache-2.0
6,417
/* * 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 ...
guoxiaolongzte/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala
Scala
apache-2.0
36,370
/** * 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/main/scala/io/gatling/http/request/builder/ws2/Ws2.scala
Scala
apache-2.0
1,811
package object editors { type ??? = Nothing // For mocking purpose only case class User(name: String, age: Int) }
julienrf/editors
library/src/main/scala/editors/package.scala
Scala
mit
123
/* * Copyright 2001-2019 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...
dotty-staging/scalatest
scalatest/src/main/scala/org/scalatest/wordspec/FixtureAsyncWordSpec.scala
Scala
apache-2.0
12,020
/* * This file is part of Kiama. * * Copyright (C) 2008-2015 Anthony M Sloane, Macquarie University. * * Kiama 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 of the License, or ...
joaoraf/kiama
library/src/org/kiama/util/REPL.scala
Scala
gpl-3.0
7,630
/* * 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 ...
witgo/spark
core/src/main/scala/org/apache/spark/scheduler/ExecutorLossReason.scala
Scala
apache-2.0
3,041
package gh3.events import gh3._ import gh3.models.{GH3Sender, GH3Repository, GH3Organization} import net.liftweb.json.JsonAST.JValue case class RepositoryEvent( action: String, repository: GH3Repository, organization: GH3Organizati...
mgoeminne/github_etl
src/main/scala/gh3/events/RepositoryEvent.scala
Scala
mit
961
package net.liftmodules import _root_.net.liftweb._ import http._ /** * ==FoBo / FoBo API Module== * * This FoBo / FoBo API module provides FoBo/Lift API components for the FoBo Module, * but can also be used as-is. * * If you are using this module via the FoBo/FoBo module see also [[net.liftmodules.fobo]...
karma4u101/FoBo
FoBo/FoBo-API/src/main/scala/net/liftmodules/fobo/foboapi.scala
Scala
apache-2.0
1,776
package pb.frontend import org.scalajs.dom import org.scalajs.dom._ import org.scalajs.dom.ext._ import org.scalajs.dom.raw.HTMLFormElement import scala.scalajs.concurrent.JSExecutionContext.Implicits.queue import scala.scalajs.js import scala.scalajs.js.Dynamic.global import scala.scalajs.js.annotation.JSExport impo...
cakper/pairing-buddy
frontend/src/main/scala/pb/frontend/PairingBuddyApp.scala
Scala
mit
742
package autolift.test.scalaz import scalaz._ import Scalaz._ import autolift.Scalaz._ class LiftMaximumByTest extends BaseSpec{ "liftMaximumBy on a List with identity" should "work" in{ val in = List(1, 2, 3) val out = in.liftMaxBy(identity[Int]) same[Option[Int]](out, Option(3)) } "liftMaximumBy ...
wheaties/AutoLifts
autolift-scalaz/src/test/scala/autolift/scalaz/LiftMaximumByTest.scala
Scala
apache-2.0
1,264
package memnets.fx.app import java.io.File import javafx.fxml.FXMLLoader import memnets.core.BuiltModel import memnets.fx._ import memnets.fx.utils._ import memnets.model._ import memnets.utils._ import org.fxmisc.flowless.VirtualizedScrollPane import scalafx.Includes._ import scalafx.beans.property._ import scalafx....
MemoryNetworks/memnets
fx/src/main/scala/memnets/fx/app/CodeEditorFX.scala
Scala
apache-2.0
7,001
/* * Copyright 2018 CJWW Development * * 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...
cjww-development/auth-microservice
test/helpers/services/MockLoginService.scala
Scala
apache-2.0
1,775
package io.github.ptitjes.scott.api /** * @author Didier Villevalois */ trait IterationCallback[X, Y <: X] { def iterationDone(iteration: Int, hmm: HiddenMarkovModel[X, Y], elapsedTime: Long): Unit }
ptitjes/scott
scott-core/src/main/scala/io/github/ptitjes/scott/api/IterationCallback.scala
Scala
gpl-3.0
205
package com.thangiee.lolhangouts.data.usecases.entities import com.thangiee.lolchat.region.Region case class User( loginName: String, inGameName: String, region: Region, statusMsg: String, currentFriendChat: Option[String] = None, groupNames: Seq[String] )
Thangiee/LoL-Hangouts
src/com/thangiee/lolhangouts/data/usecases/entities/User.scala
Scala
apache-2.0
273
package sample.model.account import scala.util.{ Failure, Success, Try } import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import sample._ import sample.model.DataFixtures @RunWith(classOf[JUnitRunner]) class AccountSpec extends UnitSpecSupport { behavior of "口座管理" it should "通常口座が取得できる...
jkazama/sample-boot-scala
src/test/scala/sample/model/account/AccountSpec.scala
Scala
mit
1,897
/* * La Trobe University - Distributed Deep Learning System * Copyright 2016 Matthias Langer ([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.apa...
bashimao/ltudl
blaze/src/main/scala/edu/latrobe/blaze/modules/jvm/MultiplyValues_JVM_Baseline.scala
Scala
apache-2.0
7,498
package com.datastax.spark.connector.writer import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.{Callable, Executors} import com.google.common.util.concurrent.MoreExecutors import org.junit.Assert._ import org.junit.Test class AsyncExecutorTest { @Test def test() { val taskCount = 2...
clakech/spark-cassandra-connector
spark-cassandra-connector/src/test/scala/com/datastax/spark/connector/writer/AsyncExecutorTest.scala
Scala
apache-2.0
1,486
/* * Copyright (c) 2015-2017 EpiData, Inc. */ package models import java.util import cassandra.DB import com.datastax.driver.core.querybuilder.{ Clause, QueryBuilder } import com.epidata.lib.models.{ Measurement => Model, MeasurementsKeys, MeasurementSummary } import com.epidata.lib.models.util.{ JsonHelpers, Binar...
epidataio/epidata-community
play/app/models/MeasurementService.scala
Scala
apache-2.0
21,642
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.2 * @date Sun Nov 1 13:59:40 EST 2015 * @see LICENSE (MIT style license file). * * @see vlsicad.eecs.umich.edu/BK/Slots/cache/www.cise.ufl.edu/~davis/Morgan/ * @see www.optimization-...
NBKlepp/fda
scalation_1.2/src/main/scala/scalation/minima/SimplexFT.scala
Scala
mit
20,667
package slick /** The `dbio` package contains the Database I/O Action implementation. * See [[DBIOAction]] for details. */ package object dbio { /** Simplified type for a streaming [[DBIOAction]] without effect tracking */ type StreamingDBIO[+R, +T] = DBIOAction[R, Streaming[T], Effect.All] /** Simplified typ...
jkutner/slick
slick/src/main/scala/slick/dbio/package.scala
Scala
bsd-2-clause
463
/** * 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...
akosiaris/kafka
core/src/test/scala/unit/kafka/network/SocketServerTest.scala
Scala
apache-2.0
5,396
package repositories import scala.concurrent.Future import models.Task trait TaskRepository { def deleteByUser(userId: String): Future[Boolean] def insert(userId: String, task: Task): Future[Task] def getTasksByUser(userId: String): Future[Traversable[Task]] } class InMemoryTaskRepositoryImpl extends TaskRep...
toggm/akka-cake-pattern-testing
src/main/scala/repositories/TaskRepository.scala
Scala
apache-2.0
821
/************************************************************************\\ ** Project ** ** ______ ______ __ ______ ____ ** ** / ____/ / __ / / / / __ / / __/ (c) 2011-2014 ** ** / /__ / /_...
lrytz/spire
core/src/main/scala/spire/random/rng/Utils.scala
Scala
mit
4,958
package mesosphere.marathon package core.task.tracker.impl import akka.actor.Status import akka.testkit.TestProbe import mesosphere.AkkaUnitTest import mesosphere.marathon.test.SettableClock import mesosphere.marathon.core.instance.TestInstanceBuilder import mesosphere.marathon.core.instance.TestInstanceBuilder._ impo...
guenter/marathon
src/test/scala/mesosphere/marathon/core/task/tracker/impl/InstanceStateOpProcessorDelegateTest.scala
Scala
apache-2.0
7,173
package controllers import play.api.mvc._ import models.Environment object Home extends Controller { def index = Action { implicit request => Ok(views.html.home(Environment.apply)) } }
tanacasino/shanshan
app/controllers/Home.scala
Scala
mit
198
/* * 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 ...
zuotingbing/spark
core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala
Scala
apache-2.0
26,156
class MyActivity extends Activity with TypedActivity { lazy val title = findView( TR.my_title ) override def onCreate( savedInstanceState: Bundle ) = { super.onCreate( savedInstanceState ) setContentView( R.layout.main ) title.setText( "Hello Scala!" ) } override def onResume...
Taig/Scala-on-Android
src/main/page/typed-resources/activity3.scala
Scala
mit
408
package au.com.onegeek.nginxperf import io.gatling.core.Predef._ import io.gatling.http.Predef._ import scala.concurrent.duration._ class Nginx extends Simulation { val httpConf = http .baseURL("http://api.foo.com") .acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8") ...
mefellows/nginx-docker-setup
test/gatling/user-files/simulations/nginx/Nginx.scala
Scala
mit
755
package com.yiguang.mcdb import java.io.File import org.iq80.leveldb._ import org.fusesource.leveldbjni.JniDBFactory._ import com.yiguang.util.StringUtils._ import org.scalatest.{Matchers, FlatSpec} import scala.reflect.io.Path import scala.util.Random /** * Created by yigli on 14-12-4. */ class LeveldbSpec exten...
liyiguang/memcachedb
src/test/scala/com/yiguang/mcdb/LeveldbSpec.scala
Scala
apache-2.0
1,027
package org.scalatra import collection.JavaConversions._ import collection.mutable.ConcurrentMap import java.util.concurrent.ConcurrentHashMap import org.scalatra.util.RicherString._ import java.util.Locale.ENGLISH import collection.{SortedMap, mutable} object ApiFormats { /** * The request attribute key in whic...
louk/scalatra
core/src/main/scala/org/scalatra/ApiFormats.scala
Scala
bsd-2-clause
5,866
package jitd.spec; import jitd.JITDRuntime import jitd.typecheck._ import jitd.codegen.policy._ case class Definition( nodes:Seq[Node], accessors:Seq[Accessor], mutators:Seq[Mutator], transforms:Seq[Transform], policies:Seq[Policy], policyImplementations: PolicyImplementation, functions:Seq[FunctionSigna...
UBOdin/jitd-synthesis
src/main/scala/jitd/spec/Definition.scala
Scala
apache-2.0
5,673
/* * Copyright (c) 2017. Yuriy Stul */ package com.stulsoft.ysps.pforcomprehansion import scala.util.{Success, Try} /** * @see [[https://wordpress.com/read/blogs/14365184/posts/892 Scala – conversion from for-comprehension to map, flatMap]] * @author Yuriy Stul. */ object FromForToMap extends App { testWit...
ysden123/ysps
src/main/scala/com/stulsoft/ysps/pforcomprehansion/FromForToMap.scala
Scala
mit
3,473
package org.jetbrains.plugins.scala.lang.resolve2 /** * Pavel.Fatin, 02.02.2010 */ class FunctionTypeTest extends ResolveTestBase { override def folderPath: String = { super.folderPath + "function/type/" } def testChoiceOne = doTest def testChoiceTwo = doTest def testIncompatible = doTest def test...
LPTK/intellij-scala
test/org/jetbrains/plugins/scala/lang/resolve2/FunctionTypeTest.scala
Scala
apache-2.0
531
import sbt._ import java.io.File object JDatPackerDef extends Build { val readmePath = TaskKey[File]("readme-path", "path to readme file") val licensePath = TaskKey[File]("license-path", "path to license file") val zipPath = TaskKey[File]("zip-path", "path to dist zip file") val dist = TaskKey[File]("dist", "...
memo33/JDatPacker
project/build.scala
Scala
mit
357
package org.wartremover package contrib.test import org.wartremover.contrib.warts.ExposedTuples import org.wartremover.test.WartTestTraverser import org.scalatest.funsuite.AnyFunSuite class ExposedTuplesTest extends AnyFunSuite with ResultAssertions { test("can't expose a tuple from a public method") { val res...
wartremover/wartremover-contrib
core/src/test/scala/wartremover/contrib/warts/ExposedTuplesTest.scala
Scala
apache-2.0
26,303
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.sbt import play.dev.filewatch.LoggerProxy import sbt.Logger class SbtLoggerProxy(logger: Logger) extends LoggerProxy { override def debug(message: => String): Unit = logger.debug(message) override def info(m...
rstento/lagom
dev/sbt-plugin/src/main/scala/com/lightbend/lagom/sbt/SbtLoggerProxy.scala
Scala
apache-2.0
727
/* * Copyright (c) 2014 Robert Conrad - All Rights Reserved. * Unauthorized copying of this file, via any medium is strictly prohibited. * This file is proprietary and confidential. * Last modified by rconrad, 12/24/14 6:32 PM */ package base.entity /** * Container for strings used in API Documentation, specifi...
robconrad/base-api
project-entity/src/main/scala/base/entity/ApiStrings.scala
Scala
mit
8,702
package com.twitter.scalding.examples import com.twitter.scalding._ import com.twitter.scalding.mathematics.Matrix /* * MatrixTutorial6.scala * * Loads a document to word matrix where a[i,j] = freq of the word j in the document i * computes the Tf-Idf score of each word w.r.t. to each document and keeps the top nrWo...
rjhall/etsy.scalding
tutorial/MatrixTutorial6.scala
Scala
apache-2.0
1,399
/* * 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 ...
bOOm-X/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ExpressionParserSuite.scala
Scala
apache-2.0
24,679
import stainless.lang._ import stainless.annotation._ import stainless.io.State object GhostEffect2 { import stainless.util.Random def bar(implicit state: State) = { @ghost val test = Random.nextBigInt () } }
epfl-lara/stainless
frontends/benchmarks/extraction/invalid/GhostEffect2.scala
Scala
apache-2.0
227
/* * 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 ...
brad-kaiser/spark
core/src/test/scala/org/apache/spark/storage/BlockIdSuite.scala
Scala
apache-2.0
5,144
package org.hammerlab.bam.check.full.error /** * Bag of fields with information related to various inconsistencies in BAM-record-candidates. * @tparam T field type: [[Boolean]] for individual positions [[Flags]], [[Long]] for aggregate [[Counts]]. */ trait Error[T] { def tooFewFixedBlockBytes: T def negativeRea...
ryan-williams/spark-bam
check/src/main/scala/org/hammerlab/bam/check/full/error/Error.scala
Scala
apache-2.0
800
/** * 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...
wesley1001/orbeon-forms
src/main/scala/org/orbeon/oxf/externalcontext/LocalRequest.scala
Scala
lgpl-2.1
9,720
package org.jetbrains.plugins.scala package codeInsight.template import com.intellij.application.options.CodeStyle import com.intellij.lang.ASTNode import com.intellij.openapi.project.Project import com.intellij.psi.codeStyle.{CodeStyleSettingsManager, JavaCodeStyleSettings, ReferenceAdjuster} import org.jetbrains.plu...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/codeInsight/template/ScalaReferenceAdjuster.scala
Scala
apache-2.0
2,906
/* * Copyright (C) 2005, The Beangle Software. * * 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 of the License, or * (at your option) any later version. * * This...
beangle/ems
core/src/main/scala/org/beangle/ems/core/user/model/Todo.scala
Scala
lgpl-3.0
1,037
package io.zophie.connection import io.zophie.api.event._ import org.json4s._ import org.json4s.native.JsonMethods._ case class JSONConversionException(msg : String) extends Exception(msg) // Implementation of JSON, to be passed to JSON converter trait EventDataJSONConverter[T <: EventData] { def toJSON (dat...
torstein-vik/zophie
src/main/scala/connection/JSONConverter.scala
Scala
gpl-3.0
4,093
package org.sofi.deadman.test.view import org.sofi.deadman.component.view._ import org.sofi.deadman.messages.command._ import org.sofi.deadman.messages.query._ import org.sofi.deadman.test.TestSystem import scala.concurrent.duration._ final class KeyViewTest extends TestSystem { // View private val viewActor = s...
SocialFinance/deadman-switch
core/src/test/scala/org/sofi/deadman/test/view/KeyViewTest.scala
Scala
bsd-3-clause
1,624
package com.machinomy.bergae.crypto import java.security.SecureRandom import org.bouncycastle.asn1.x9.X9IntegerConverter import org.bouncycastle.crypto.digests.SHA256Digest import org.bouncycastle.crypto.ec.CustomNamedCurves import org.bouncycastle.crypto.params.{ECDomainParameters, ECPrivateKeyParameters, ECPublicKe...
machinomy/bergae
src/main/scala/com/machinomy/bergae/crypto/EllipticCurve.scala
Scala
apache-2.0
3,362
/* * 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
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/decimalExpressions.scala
Scala
apache-2.0
7,289
/* * 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 ...
gioenn/xSpark
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkOptimizer.scala
Scala
apache-2.0
1,519
package org.jetbrains.plugins.scala package scalai18n package codeInspection package i18n package internal import com.intellij.codeInspection.LocalInspectionTool import org.jetbrains.plugins.scala.codeInspection.{ScalaInspectionBundle, ScalaInspectionTestBase} class ScalaExtractStringToBundleInspectionTest extends Sc...
JetBrains/intellij-scala
scala/integration/properties/test/org/jetbrains/plugins/scala/scalai18n/codeInspection/i18n/internal/ScalaExtractStringToBundleInspectionTest.scala
Scala
apache-2.0
5,304
package toplev /* * This trait is for representations that can be generically * printed. */ trait GenericPrintable { def prettyPrint: String }
j-c-w/mlc
src/main/scala/GenericPrintable.scala
Scala
gpl-3.0
150
package org.opensplice.mobile.dev.dadds import org.omg.dds.core.event.DataAvailableEvent import org.omg.dds.core.event.LivelinessChangedEvent import org.omg.dds.core.event.RequestedDeadlineMissedEvent import org.omg.dds.core.event.RequestedIncompatibleQosEvent import org.omg.dds.core.event.SampleLostEvent import org.om...
levitha/levitha
src/main/scala/org/opensplice/mobile/dev/dadds/prelude.scala
Scala
apache-2.0
1,411
import main.scala.Global import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.{FileUtil, Path, FileSystem} object FsUtils { def copyFromLocal (source: String, dest: String) = { val conf = new Configuration() conf.set("fs.default.name", "hdfs://" + Global.host + ":" + Global.fsPort) co...
pomadchin/hadoop-dg-decomp
src/main/scala/scalding/FsUtils.scala
Scala
apache-2.0
3,058
object Test { class A class B class C class F[X] def f(implicit aa: F[A]) = println(aa) implicit def a : F[A] = new F[A]() // generalised from t2421b to verify we check enough class G[X] implicit def g[X] = new G[X]() implicit def b[X <: B](implicit mx: G[X]) = new F[X]() f }
scala/scala
test/files/pos/t2421c.scala
Scala
apache-2.0
303
/* * 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 ...
tillrohrmann/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/rules/logical/FlinkCalcMergeRuleTest.scala
Scala
apache-2.0
4,635
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
jooooooon/rudder
rudder-web/src/main/scala/com/normation/rudder/web/comet/AsyncDeployment.scala
Scala
agpl-3.0
9,661
/* * 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 ...
pperalta/ignite
modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/ping/VisorPingCommandSpec.scala
Scala
apache-2.0
1,332
package com.arcusys.valamis.content.storage.impl import com.arcusys.valamis.content.model.PlainText import com.arcusys.valamis.persistence.common.{OptionFilterSupport3, SlickProfile} import com.arcusys.valamis.content.storage.PlainTextStorage import com.arcusys.valamis.content.storage.impl.schema.ContentTableComponent...
arcusys/Valamis
valamis-questionbank/src/main/scala/com/arcusys/valamis/content/storage/impl/PlainTextStorageImpl.scala
Scala
gpl-3.0
2,413
package dsmoq.maintenance.services import java.util.UUID import java.nio.file.Paths import scala.util.Failure import scala.util.Success import scala.util.Try import org.joda.time.DateTime import org.slf4j.MarkerFactory import com.typesafe.scalalogging.LazyLogging import dsmoq.maintenance.AppConfig import dsmoq.mai...
nkawa/dsmoq
server/maintenance/src/main/scala/dsmoq/maintenance/services/DatasetService.scala
Scala
apache-2.0
54,457
package dhgarrette.typesupervisedtagging.util import java.io.BufferedWriter import java.io.File import java.io.FileWriter import scala.collection.mutable.ListBuffer import scala.util.Random object FileUtils { private val random = new Random(System.currentTimeMillis()) def pathjoin(parts: String*): String = { ...
dhgarrette/type-supervised-tagging-2012emnlp
src/main/scala/dhgarrette/typesupervisedtagging/util/FileUtils.scala
Scala
apache-2.0
3,459
package specs import org.specs2.mutable._ import com.plasmaconduit.json._ import com.plasmaconduit.json.JsWriter._ class JsWriterSpec extends Specification { "The boolean json writer" should { "convert a boolean true to a JsBoolean(true)" in { JsValue.from(true) must beEqualTo(JsBoolean(true)) } ...
plasmaconduit/json
src/test/scala/specs/JsWriterSpec.scala
Scala
mit
1,692
package edu.neu.coe.scala.numerics import org.scalatest.{ FlatSpec, Matchers } /** * @author scalaprof */ class LazyNumberFuzzySpec extends FlatSpec with Matchers { import Fuzzy._ val fuzz1 = LazyFuzzy(1) val fuzz2 = LazyFuzzy(1,Product(2)) // XXX why can't we say x*x here? def squ(x: Fuzzy): Fuzzy = x...
rchillyard/Scalaprof
Numerics/src/test/scala/edu/neu/coe/scala/numerics/LazyNumberFuzzySpec.scala
Scala
gpl-2.0
2,081
package scikoro import utest._ import scikoro.dice._ object ScikoroTests extends TestSuite { val pool = 4.d6 def tests = this { "A six sided die would never score 7" - { for (i <- 0 to 1000) { val result = pool.roll assert(result.values.forall(_ < pool.face + 1)) assert(result....
lettenj61/scikoro
scikoro/shared/src/test/scala/ScikoroTests.scala
Scala
mit
691
package com.lkroll.ep.mapviewer.facades import org.denigma.threejs._ import scalajs.js import scalajs.js.annotation._ import scalajs.js.typedarray._ import org.scalajs.dom.Node @js.native @JSGlobal("THREE.CSS3DRenderer") class CSS3DRenderer extends js.Any {} @js.native @JSGlobal("THREE.CSS3DObject") class CSS3DObje...
Bathtor/ep-explorer
src/main/scala/com/lkroll/ep/mapviewer/facades/CSS3DRenderer.scala
Scala
mit
525
package smartchess import board._ import move._ import square._ import piece._ import shared._ // game is responsible for representing, reporting and manipulating a chess game object DataUtils { def BeginsWith(str: String, what: Character): Boolean = { if (str == null) return false if (str.length ...
serversideapps/silhmojs
shared/src/main/scala/shared/smartchess/game.scala
Scala
apache-2.0
23,066
package com.github.mdr.mash.functions import com.github.mdr.mash.evaluator.Suggestor sealed trait GeneralArgument[+T] { val isPositionArg: Boolean val value: T } object GeneralArgument { case class PositionArg[T](value: T) extends GeneralArgument[T] { val isPositionArg = true } case class LongFlag...
mdr/mash
src/main/scala/com/github/mdr/mash/functions/GeneralArgBinder.scala
Scala
mit
8,881
package pl.gosub.akka.online import akka.actor.ActorSystem import akka.stream.scaladsl.{Sink, Source} import akka.stream._ import akka.stream.stage.{GraphStage, GraphStageLogic, InHandler, OutHandler} import scala.concurrent.Await import scala.concurrent.duration.Duration import scala.util.Random /* def max_subarray...
gosubpl/akka-online
src/main/scala/pl/gosub/akka/online/KadaneFlowStage.scala
Scala
apache-2.0
2,603
package io.netflow.storage.cassandra import java.net.{ InetAddress, InetSocketAddress } import java.util.UUID import com.datastax.driver.core.Row import com.datastax.driver.core.utils.UUIDs import com.websudos.phantom.CassandraTable import com.websudos.phantom.Implicits._ import com.websudos.phantom.column.{ DateTime...
ayscb/netflow
netflow1/netflow-master/src/main/scala/io/netflow/storage/cassandra/NetFlowV7Record.scala
Scala
apache-2.0
8,260
package pl.umk.bugclassification.scmparser.gerrit import akka.actor.{Actor, ActorLogging} import pl.umk.bugclassification.scmparser.invokers.InvokerOnDirectory import pl.umk.bugclassification.scmparser.messages.{Classify, Learn} trait ProjectInvoker extends Actor with ActorLogging with InvokerOnDirectory { protecte...
mfejzer/CommitClassification
src/main/scala/pl/umk/bugclassification/scmparser/gerrit/ProjectInvoker.scala
Scala
bsd-3-clause
1,020
package com.varwise.btc.forwarding import java.math.BigInteger import org.bitcoinj.core.{Base58, DumpedPrivateKey, ECKey, NetworkParameters} object Utils { def addressToKey(params: NetworkParameters, sourceAddress: String): ECKey = { sourceAddress match { case _ if sourceAddress.length == 51 || sourceAdd...
wlk/forwarding-service
src/main/scala/com/varwise/btc/forwarding/Utils.scala
Scala
apache-2.0
620
package cromwell.engine import cromwell.CromwellTestKitWordSpec class WorkflowAbortSpec extends CromwellTestKitWordSpec { // TODO: When re-enabled, this test also needs to check that child processes have actually been stopped. "A WorkflowManagerActor" should { "abort the triple-wait workflow" ignore { // ...
ohsu-comp-bio/cromwell
engine/src/test/scala/cromwell/engine/WorkflowAbortSpec.scala
Scala
bsd-3-clause
2,191
package aecor.runtime import cats.Applicative import cats.implicits._ final class NoopKeyValueStore[F[_]: Applicative, K, V] extends KeyValueStore[F, K, V] { override def setValue(key: K, value: V): F[Unit] = ().pure[F] override def getValue(key: K): F[Option[V]] = none[V].pure[F] override def deleteValue(key: ...
notxcain/aecor
modules/core/src/main/scala/aecor/runtime/NoopKeyValueStore.scala
Scala
mit
475
package demo.helloworld.snippet class HelloWorld { def howdy = <span>Welcome to helloworld at {new _root_.java.util.Date}</span> }
scalatest/scalatest-maven-plugin
src/it/lift/src/main/scala/demo/helloworld/snippet/HelloWorld.scala
Scala
apache-2.0
135
package isabelle.eclipse.ui.text import org.eclipse.jface.text.IDocument import org.eclipse.jface.text.IRegion import org.eclipse.jface.text.Region import org.eclipse.jface.text.rules.IToken import org.eclipse.jface.text.rules.ITokenScanner import org.eclipse.jface.text.rules.Token /** A token scanner that returns a...
andriusvelykis/isabelle-eclipse
isabelle.eclipse.ui/src/isabelle/eclipse/ui/text/SingleTokenScanner.scala
Scala
epl-1.0
1,084
/** * 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...
orbeon/orbeon-forms
src/main/scala/org/orbeon/oxf/externalcontext/LocalRequest.scala
Scala
lgpl-2.1
8,587
package org.apache.streams.examples.flink.twitter.collection import java.io.Serializable import java.util.Objects import java.util.concurrent.TimeUnit import com.fasterxml.jackson.databind.ObjectMapper import com.google.common.util.concurrent.Uninterruptibles import org.apache.flink.configuration.Configuration import...
jfrazee/incubator-streams
streams-examples/streams-examples-flink/flink-twitter-collection/src/main/scala/org/apache/streams/examples/flink/twitter/collection/SpritzerSource.scala
Scala
apache-2.0
2,534
/* * 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 ...
StephanEwen/incubator-flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/rules/FlinkStreamRuleSets.scala
Scala
apache-2.0
19,148
package net.sansa_stack.query.spark.graph.jena.expression import net.sansa_stack.query.spark.graph.jena.util.Result import org.apache.jena.graph.Node class LogicalOr(left: Expression, right: Expression) extends FilterTwo(left, right) { private val tag = "Logical Or" private val leftFilter = left match { case...
SANSA-Stack/SANSA-RDF
sansa-query/sansa-query-spark/src/main/scala/net/sansa_stack/query/spark/graph/jena/expression/LogicalOr.scala
Scala
apache-2.0
991
package com.avsystem.commons package redis import com.avsystem.commons.redis.config.{ConnectionConfig, NodeConfig} import org.scalatest.Suite /** * Author: ghik * Created: 14/04/16. */ trait UsesRedisNodeClient extends UsesRedisServer with UsesActorSystem with UsesSslContext { this: Suite => def useTls: Boole...
AVSystem/scala-commons
commons-redis/src/test/scala/com/avsystem/commons/redis/UsesRedisNodeClient.scala
Scala
mit
937
package toysph import scala.collection.breakOut import scala.collection.immutable._ import scala.collection.mutable.{ArrayBuilder, Map => MMap} import scala.math._ trait Vec2D { def x: Double def y: Double def len2: Double = x * x + y * y def -(v: Vec2D): Vec2D = Vec2D(x - v.x, y - v.y) def distance2To(v: ...
lancelet/toysph
src/main/scala/toysph/particles.scala
Scala
apache-2.0
3,119
/* * Copyright 2014 Commonwealth Computer Research, 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...
mmatz-ccri/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/geotools/SimpleFeatureTypesTest.scala
Scala
apache-2.0
12,170
/* * Copyright (c) 2012-2015 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
mdavid/lessig-bigdata
lib/snowplow/3-enrich/scala-hadoop-enrich/src/test/scala/com.snowplowanalytics.snowplow.enrich.hadoop/bad/NullNumericFieldsSpec.scala
Scala
mit
3,000
package spire package algebra import spire.math.{ Rational, NumberTag } import spire.std.int._ import spire.std.long._ import spire.std.float._ import spire.std.double._ import spire.syntax.euclideanRing._ import spire.syntax.isReal.{ eqOps => _, _ } import org.scalatest.FunSuite import org.scalatest.prop.Checkers ...
tixxit/spire
tests/src/test/scala/spire/algebra/GCDTest.scala
Scala
mit
2,105
package org.joda.time.chrono import org.joda.time.Chronology import org.joda.time.DateTime import org.joda.time.DateTimeConstants import org.joda.time.DateTimeFieldType import org.joda.time.DateTimeZone import org.joda.time.DurationFieldType import org.joda.time.chrono.AssembledChronology.Fields import org.joda.time.f...
mdedetrich/soda-time
js/src/main/scala/org/joda/time/chrono/BuddhistChronology.scala
Scala
bsd-2-clause
4,434
/* * Copyright 2014 nidkil * * 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 ...
nidkil/scala-downloader
src/main/scala/com/nidkil/downloader/merger/DefaultMerger.scala
Scala
apache-2.0
2,525
/* * Copyright 2014 http4s.org * * 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...
rossabaker/http4s
server/shared/src/main/scala/org/http4s/server/middleware/Caching.scala
Scala
apache-2.0
6,987
package lensimpl package object data { type Id[A] = A def Id[A](a: A): Id[A] = a }
julien-truffaut/LensImpl
core/src/main/scala/lensimpl/data/package.scala
Scala
mit
90
object ch8_13 { import ch8.Prop._ def listOf1[A](g: ch8.Gen[A]): ch8.SGen[List[A]] = ch8.SGen(n => g.listOfN(n max 1)) val smallInt = ch8.Gen.choose(-10, 10) val maxProp1 = forAll(listOf1(smallInt)) { l => val max = l.max !l.exists(_ > max) // No value greater than `max` should exist in `l` } } import...
rucka/fpinscala
src/main/scala/fpinscala/ch8/Exercise13.scala
Scala
gpl-2.0
564
package org.velvia.filo import com.google.flatbuffers.Table import java.nio.ByteBuffer import java.sql.Timestamp import org.joda.time.DateTime import org.velvia.filo.codecs._ import org.velvia.filo.vector._ import org.velvia.filo.{vectors => bv} case class UnsupportedFiloType(vectType: Int, subType: Int) extends E...
velvia/filo
filo-scala/src/main/scala/org.velvia.filo/VectorReader.scala
Scala
apache-2.0
8,367
package example.herding.cats import cats._ import cats.data._ import cats.implicits._ object Cartesian extends App { // the type of hs will be // hs: List[Int ⇒ Int] = List(<function1>, <function1>, <function1>, <function1>) val hs = Functor[List].map(List(1, 2, 3, 4))({ (_: Int) * (_: Int) }.curried) val xs ...
stevenchen3/feed-cats
src/main/scala/herding-cats/Cartesian.scala
Scala
mit
1,816
package io.udash package rest import com.avsystem.commons._ import com.avsystem.commons.rpc.AsRawReal import com.avsystem.commons.serialization.json.JsonStringOutput import com.avsystem.commons.serialization.{GenCodec, HasPolyGenCodec, flatten, whenAbsent} import io.udash.rest.openapi.adjusters._ import io.udash.rest....
UdashFramework/udash-core
rest/src/test/scala/io/udash/rest/RestTestApi.scala
Scala
apache-2.0
7,896
package rere.driver.pool.impl import rere.driver.pool.PoolShutdownResult case class StreamPoolShutdownResult( queriesStarted: Long, connectionsTurnedOff: Long ) extends PoolShutdownResult
pbaun/rere
modules/driver/src/main/scala/rere/driver/pool/impl/StreamPoolShutdownResult.scala
Scala
apache-2.0
200
/** * Copyright 2017 Interel * * 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 t...
Interel-Group/core3
src/main/scala/core3/core/ComponentManagerActor.scala
Scala
apache-2.0
7,916
/* __ *\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ |/_// /_\ \ http://scala-js.org/ ** ** /____/\___/_/ |_/...
japgolly/scala-js
test-suite/js/src/test/scala/org/scalajs/testsuite/jsinterop/RuntimeLongTest.scala
Scala
bsd-3-clause
148,504
package org.apache.mesos.chronos.scheduler.jobs import org.apache.mesos.{Protos => mesos} /** * Represents an environment variable definition for the job */ case class Label( key: String, value: String) { def toProto(): mesos.Label = mesos.Label.newBuilder ...
vixns/chronos
src/main/scala/org/apache/mesos/chronos/scheduler/jobs/Label.scala
Scala
apache-2.0
488