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
package collins.controllers.actions.assettype import scala.concurrent.Future import play.api.libs.concurrent.Execution.Implicits.defaultContext import play.api.libs.json.JsNumber import play.api.libs.json.JsObject import collins.controllers.Api import collins.controllers.ResponseData import collins.controllers.Secur...
byxorna/collins
app/collins/controllers/actions/assettype/DeleteAction.scala
Scala
apache-2.0
2,972
/* * Copyright (c) 2017 Georgios Andreadakis * * 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...
GeorgiosAndreadakis/TextAnalyserPlatform
domain/src/main/scala/org/tap/domain/docimport/DocumentImportContext.scala
Scala
apache-2.0
944
package pureconfig.module import scala.reflect.ClassTag import _root_.enumeratum._ import _root_.enumeratum.values._ import pureconfig.ConfigConvert import pureconfig.ConfigConvert.{ viaNonEmptyString, viaNonEmptyStringOpt, viaStringOpt } import pureconfig.error.CannotConvert package object enumeratum { implicit ...
derekmorr/pureconfig
modules/enumeratum/src/main/scala/pureconfig/module/enumeratum.scala
Scala
mpl-2.0
2,079
/* * Copyright 2011-2018 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 applic...
wiacekm/gatling
gatling-core/src/main/scala/io/gatling/core/structure/StructureBuilder.scala
Scala
apache-2.0
1,131
/* * Copyright 2001-2015 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/DeferredAbortedSuite.scala
Scala
apache-2.0
948
/* * 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
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala
Scala
apache-2.0
60,490
object Test extends App { // expr.isInstanceOf[Singleton] is true iff the expression has a singleton type // However, expr.asInstanceOf[Singleton] is erased to expr.asInstanceOf[Any] so it never throws // as discussed in http://docs.scala-lang.org/sips/minutes/2017-12-06-sip-minutes.html val foo: String = "fo...
martijnhoekstra/scala
test/files/run/sip23-singleton-isas.scala
Scala
apache-2.0
1,268
abstract class Payable class CreditCard extends Payable { val cardNumber: String val holderName: String // as printed on the card val expireDate: Date // e.g. 2012-12-31 val securityCode: String // usually the 3 digits on the back of the card val issuer: String // the bank that issued the car...
jwachter/travel-service
docs/reference/payment.scala
Scala
apache-2.0
3,065
// Copyright (c) 2011-2015 ScalaMock Contributors (https://github.com/paulbutcher/ScalaMock/graphs/contributors) // // 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, inc...
paulbutcher/ScalaMock
shared/src/test/scala/org/scalamock/test/scalatest/SuiteScopePresetMockParallelTest.scala
Scala
mit
2,607
/* * Copyright [2013] [Antoine comte] * * 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 applic...
antoinecomte/JUGL-Challenge-2013
src/test/scala/DietSpec.scala
Scala
apache-2.0
1,077
/* Copyright 2009-2013 EPFL, Lausanne * * Author: Ravi * Date: 20.11.2013 **/ import leon.lang._ import leon.collection._ object Heaps { sealed abstract class Heap { val rank : BigInt = this match { case Leaf() => 0 case Node(_, l, r) => 1 + max(l.rank, r.rank) } def content :...
ericpony/scala-examples
testcases/repair/Heap/Heap10.scala
Scala
mit
2,989
package co.theasi.plotly.writer import org.json4s._ import co.theasi.plotly._ object SeriesReader { def fromJson(json: JObject): Series = { val seriesType = json \\ "type" seriesType match { case JString("bar") => barFromJson(json) case JString("box") => boxFromJson(json) case JNothing =>...
ASIDataScience/scala-plotly-client
src/main/scala/co/theasi/plotly/writer/SeriesReader.scala
Scala
mit
1,507
package org.globalnames package parser package runner.web.models import spray.json.JsValue case class NamesRequest(names: Seq[String]) case class NamesResponse(namesJson: Seq[formatters.Summarizer.Summary])
GlobalNamesArchitecture/gnparser
runner/src/main/scala/org/globalnames/parser/runner/web/models/NamesRequest.scala
Scala
mit
210
package im.actor.server.group import java.time.{ LocalDateTime, ZoneOffset } import akka.actor.Status import akka.pattern.pipe import com.google.protobuf.ByteString import im.actor.api.rpc.Update import im.actor.api.rpc.groups._ import im.actor.api.rpc.messaging.ApiServiceMessage import im.actor.api.rpc.misc.ApiExten...
liruqi/actor-platform
actor-server/actor-core/src/main/scala/im/actor/server/group/GroupCommandHandlers.scala
Scala
mit
18,821
package org.danielnixon.progressive.play import java.net.URI import org.danielnixon.progressive.play.extensions.RequestHeaderWrapper import play.api.mvc.{ Call, RequestHeader, Result } import play.api.mvc.Results.Redirect import scala.util.Try import scalaz.Scalaz._ object Results { def redirectToRefererOrElse(ca...
danielnixon/progressive
server-play/src/main/scala/org/danielnixon/progressive/play/Results.scala
Scala
gpl-3.0
584
/* * 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 * distribute...
wvlet/airframe
airframe-di/src/test/scala-2/wvlet/airframe/legacy/DesignBuildTest.scala
Scala
apache-2.0
896
/* * 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/test/scala/org/apache/spark/launcher/LauncherBackendSuite.scala
Scala
apache-2.0
2,747
import annotation.alpha class Gamma { def foo: Int = 1 } class Delta extends Gamma { // error: name clash @alpha("foo") def bar: Int = 1 }
som-snytt/dotty
tests/neg/alpha-late.scala
Scala
apache-2.0
152
package scutil.log import scutil.lang._ import scutil.lang.tc.Show object LogValue { implicit def StringAsLogValue(it:String):LogValue = LogValue string it implicit def ThrowableAsLogValue(it:Throwable):LogValue = LogValue throwable it implicit def MultipleAsLogValue(it:Seq[LogValue]):LogValue = LogValue mu...
ritschwumm/scutil
modules/jdk/src/main/scala/scutil/log/LogValue.scala
Scala
bsd-2-clause
1,611
/* * 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 ...
nareshgundla/HiBench
sparkbench/ml/src/main/scala/com/intel/sparkbench/ml/DenseKMeans.scala
Scala
apache-2.0
3,874
package models import java.util.UUID import play.api.libs.functional.syntax._ import play.api.libs.json._ sealed trait LabworkLike extends UniqueEntity { def label: String } case class Labwork(label: String, description: String, semester: UUID, course: UUID, degree: UUID, subscribable: Boolean = false, published:...
THK-ADV/lwm-reloaded
app/models/Labwork.scala
Scala
mit
1,642
object Test { def f() = { val ar = Array.ofDim[Int](5) var x = 0 while (x<=5) { println(x) @annotation.unused val a = ar(x) x+=1 } } def main(args: Array[String]): Unit = { try { f() ; assert(false, "should have thrown exception") } catch { case _: ArrayIndexOutOfBound...
scala/scala
test/files/run/optimizer-array-load.scala
Scala
apache-2.0
345
/** * Copyright (C) 2014 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
xforms/jvm/src/main/scala/org/orbeon/oxf/xforms/processor/LoggingCacheTracer.scala
Scala
lgpl-2.1
1,482
package org.jetbrains.plugins.scala package editor package enterHandler import com.intellij.codeInsight.CodeInsightSettings import com.intellij.codeInsight.editorActions.enter.EnterHandlerDelegate.Result import com.intellij.codeInsight.editorActions.enter.EnterHandlerDelegateAdapter import com.intellij.openapi.actionS...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/editor/enterHandler/MultilineStringEnterHandler.scala
Scala
apache-2.0
13,509
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * 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 * * https://www.apache.org/licenses/LICENSE...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/enumeration/EnumExtensions.scala
Scala
apache-2.0
3,457
/* * Copyright 2012 The SIRIS 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 applica...
simulator-x/jvr-rendering
src/simx/components/renderer/jvr/CameraUpdater.scala
Scala
apache-2.0
2,872
/** * FILE: ResponderActor.scala * PERCORSO /Codice/sgad/servertier/src/main/scala/sgad/servertier/presentation/httpresponder * DATA CREAZIONE: 23 Febbraio 2014 * AUTORE: ProTech * EMAIL: protech.unipd@gmail.com * * Questo file è proprietà del gruppo ProTech, viene rilasciato sotto licenza Apache v2. * * DIARI...
protechunipd/SGAD
Codice/sgad/servertier/src/main/scala/sgad/servertier/presentation/httpresponder/ResponderActor.scala
Scala
apache-2.0
5,480
/** * Copyright 2015 Mohiva Organisation (license at mohiva dot com) * * 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 req...
mohiva/play-silhouette
silhouette/app/com/mohiva/play/silhouette/impl/authenticators/package.scala
Scala
apache-2.0
763
/* * 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 ...
starpit/openwhisk
common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskActivation.scala
Scala
apache-2.0
8,468
package com.eevolution.context.dictionary.infrastructure.repository import java.util.UUID import com.eevolution.context.dictionary.domain._ import com.eevolution.context.dictionary.domain.model.WorkflowNextCondition import com.eevolution.context.dictionary.infrastructure.db.DbContext._ import com.eevolution.utils.Pag...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/repository/WorkflowNextConditionRepository.scala
Scala
gpl-3.0
2,991
package edu.holycross.shot.ohco2 import edu.holycross.shot.cite._ /** Association of a CtsUrn with labelling information * from a text catalog. * * @param urn The CtsUrn. * @param label A label for it. */ case class LabelledCtsUrn(urn: CtsUrn, label: String) {}
cite-architecture/ohco2
shared/src/main/scala/edu/holycross/shot/ohco2/LabelledCtsUrn.scala
Scala
gpl-3.0
263
/* * The MIT License (MIT) * * Copyright (c) 2016 by Lloyd Chan * * 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 u...
frugalmechanic/fm-common
shared/src/main/scala/fm/common/ValueEnum.scala
Scala
apache-2.0
9,003
/* * Copyright (C)2014 D. Plaindoux. * * 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, or (at your option) any * later version. * * This program is distributed i...
d-plaindoux/rapido
src/main/scala/smallibs/rapido/page/provider.scala
Scala
lgpl-2.1
10,846
/** * Copyright 2015 Mohiva Organisation (license at mohiva dot com) * * 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 req...
mohiva/play-silhouette
silhouette/test/com/mohiva/play/silhouette/impl/providers/openid/YahooProviderSpec.scala
Scala
apache-2.0
3,211
def sequence[A](fas: List[F[A]]): F[List[A]] = traverse(fas)(fa => fa) def replicateM[A](n: Int, fa: F[A]): F[List[A]] = sequence(List.fill(n)(fa)) def product[A,B](fa: F[A], fb: F[B]): F[(A,B)] = map2(fa, fb)((_,_))
lucaviolanti/scala-redbook
answerkey/applicative/01.answer.scala
Scala
mit
231
/* * 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 ...
ksattler/piglet
src/main/scala/dbis/pig/op/PigOperator.scala
Scala
apache-2.0
9,634
/* * 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 ...
WindCanDie/spark
sql/core/src/test/scala/org/apache/spark/sql/JoinHintSuite.scala
Scala
apache-2.0
6,834
package hlt import java.io.{FileWriter, IOException} import hlt.Move.{Dock, Noop, Thrust, Undock} import scala.io.StdIn object Networking { private val UNDOCK_KEY = 'u' private val DOCK_KEY = 'd' private val THRUST_KEY = 't' def sendMoves(moves: Iterable[Move]): Unit = { val moveString = new StringBuil...
HaliteChallenge/Halite-II
airesources/Scala/src/main/scala/hlt/Networking.scala
Scala
mit
1,841
/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md 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. * Yo...
dnatic09/scalate
scalate-core/src/main/scala/org/fusesource/scalate/servlet/ServletTemplateEngine.scala
Scala
apache-2.0
5,269
package com.timgroup.matchless import org.specs2.matcher.{ Matcher, Expectable } import org.specs2.matcher.MustMatchers._ import scala.collection.GenTraversableOnce import com.timgroup.matchless.utils.Bag trait CollectionMatchers { def haveThePairs[K, V](pairs: (K, V)*) = PairsLikeMatcher(pairs.map(p => (p._1, beEq...
tim-group/matchless
src/main/scala/com/timgroup/matchless/CollectionMatchers.scala
Scala
mit
4,879
package ca.hyperreal.scalgorithms import collection.mutable._ //import math._ import scala.reflect.ClassTag /** <code>Matrix</code> is the base class for all matrix types. This abstract class provides a virtually complete mathematical matrix implementation. Concrete subclasses need on provide an <code>apply( Int, In...
edadma/scalgorithms
src/main/scala/Matrix.scala
Scala
mit
13,986
package com.arcusys.valamis.storyTree.service.impl import java.net.URI import com.arcusys.learn.liferay.LiferayClasses.LUser import com.arcusys.learn.liferay.services.{CompanyHelper, UserLocalServiceHelper} import com.arcusys.valamis.exception.EntityNotFoundException import com.arcusys.valamis.lesson.model.{Lesson, L...
arcusys/Valamis
valamis-storyTree/src/main/scala/com/arcusys/valamis/storyTree/service/impl/StoryTreeStatusServiceImpl.scala
Scala
gpl-3.0
6,936
package com.ubirch.auth.model.db /** * author: cvandrei * since: 2017-03-13 */ case class OidcProviderEndpoints(authorization: String, token: String, jwks: String )
ubirch/ubirch-auth-service
model-db/src/main/scala/com/ubirch/auth/model/db/OidcProviderEndpoints.scala
Scala
apache-2.0
270
/** * License * ======= * * The MIT License (MIT) * * * Copyright (c) 2017 Antoine DOERAENE @sherpal * * 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 restrictio...
sherpal/scalajs-ui
src/main/scala/gui/AnchorPoint.scala
Scala
mit
1,631
package akka.persistence.hbase.journal import akka.actor.{ Actor, ActorLogging } import akka.persistence.hbase.common._ import akka.persistence.hbase.common.Const._ import akka.persistence.journal.AsyncWriteJournal import akka.persistence.{ PersistenceSettings, PersistentConfirmation, PersistentId, PersistentRepr } im...
hossx/akka-persistence-hbase
src/main/scala/akka/persistence/hbase/journal/HBaseAsyncWriteJournal.scala
Scala
apache-2.0
6,108
package com.github.gdefacci.bdd package testkit import com.github.gdefacci.bdd.Feature class TestInfos(val results: Seq[FeatureRun]) { lazy val resultEvents: Seq[RunEvent] = results.flatMap { fr => fr.scenarioGroups.flatMap { sg => sg.scenarios.flatMap { sc => sc.events } } } lazy ...
gdefacci/bdd
testkit/src/main/scala/com/github/gdefacci/bdd/testkit/TestInfos.scala
Scala
mit
1,025
package com.tngtech.jgiven.scala.example import org.scalatest.Assertion import org.scalatest.matchers.should.Matchers._ class Steps { var someInt = 0 def some_another_state(): Unit = { someInt = 5 } def some_action(): Unit = { someInt *= 2 } def some_outcome: Assertion = { someInt should b...
TNG/JGiven
example-projects/scala/src/test/scala/com/tngtech/jgiven/scala/example/Steps.scala
Scala
apache-2.0
333
package ml.combust.mleap.runtime.transformer.regression import ml.combust.mleap.core.regression.LinearRegressionModel import ml.combust.mleap.core.types._ import ml.combust.mleap.runtime.frame.{DefaultLeapFrame, Row} import ml.combust.mleap.tensor.Tensor import org.apache.spark.ml.linalg.Vectors import org.scalatest.F...
combust-ml/mleap
mleap-runtime/src/test/scala/ml/combust/mleap/runtime/transformer/regression/LinearRegressionSpec.scala
Scala
apache-2.0
1,654
package edu.berkeley.nlp.coref.bp import edu.berkeley.nlp.coref.config.CorefSystemConfiguration import scala.collection.mutable.ArrayBuffer import edu.berkeley.nlp.futile.util.Logger import edu.berkeley.nlp.coref._ import scala.util.Random class DocumentFactorGraph(val docGraph: DocumentGraph, ...
timfeu/berkeleycoref-thesaurus
src/main/java/edu/berkeley/nlp/coref/bp/DocumentFactorGraph.scala
Scala
gpl-3.0
22,432
package gapt package object utils { def unorderedPairsOf[T]( elements: Iterable[T] ): Iterable[( T, T )] = { val elementsWithIndex = elements.zipWithIndex for { ( e1, i1 ) <- elementsWithIndex ( e2, i2 ) <- elementsWithIndex if i1 < i2 } yield ( e1, e2 ) } def crossProduct[T]( xs:...
gapt/gapt
core/src/main/scala/gapt/utils/package.scala
Scala
gpl-3.0
518
package com.autodesk.tct.utilities import java.io._ /** * Helper object that reads dist file */ object DistProvider { /** * Reads the dist file. Note: this function does not automatically close the InputStream * * @param pathFileName the dist file path * @return the InputStream and its size. */ d...
adsk-cp-tct/challenger-backend
app/com/autodesk/tct/utilities/DistProvider.scala
Scala
gpl-3.0
500
/* * Copyright 2011-2022 GatlingCorp (https://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...
gatling/gatling
gatling-charts/src/main/scala/io/gatling/charts/stats/buffers/ResponseTimeRangeBuffers.scala
Scala
apache-2.0
2,286
package tastytest object TestProd extends Suite("TestProd") { val Some(one) = Prod(1) test("product * empty === empty") { val Some(product) = Prod(getRandomPos) assert(product * Prod.empty === Prod.empty) } test("product * one === product") { val Some(product) = Prod(getRandomPos) assert(pro...
scala/scala
test/tasty/run/src-2/tastytest/TestProd.scala
Scala
apache-2.0
657
/* * 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
common/scala/src/main/scala/whisk/core/database/CloudantRestClient.scala
Scala
apache-2.0
1,424
package us.bleibinha.scalaredisexample import org.scalatest.FunSpec class HelloWorldSpec extends FunSpec { describe("Adding 1 to 1") { it("should equals 2"){ assert(1+1 == 2) } } }
ExNexu/scala-redis-example
src/test/scala/us/bleibinha/scalaredisexample/HelloWorldSpec.scala
Scala
bsd-3-clause
202
package ch.ninecode.model import com.esotericsoftware.kryo.Kryo import com.esotericsoftware.kryo.Serializer import com.esotericsoftware.kryo.io.Input import com.esotericsoftware.kryo.io.Output import org.apache.spark.sql.Row import ch.ninecode.cim.CIMClassInfo import ch.ninecode.cim.CIMContext import ch.ninecode.cim....
derrickoswald/CIMScala
CIMReader/src/main/scala/ch/ninecode/model/LoadDynamics.scala
Scala
mit
48,074
package org.vitrivr.adampro.data.index.structures.lsh.hashfunction import org.vitrivr.adampro.data.datatypes.vector.Vector.{MathVector} import scala.util.Random /** * ADAMpro * * Ivan Giangreco * April 2017 */ @SerialVersionUID(100L) class HammingHashFunction(j: Int) extends LSHashFunction with Serializabl...
dbisUnibas/ADAMpro
src/main/scala/org/vitrivr/adampro/data/index/structures/lsh/hashfunction/HammingHashFunction.scala
Scala
mit
528
package org.monarchinitiative.dosdp import org.semanticweb.owlapi.apibinding.OWLManager import org.semanticweb.owlapi.manchestersyntax.parser.ManchesterOWLSyntaxClassExpressionParser import zio._ import zio.test.Assertion._ import zio.test._ object ExpressionParsingTest extends DefaultRunnableSpec { val factory = ...
INCATools/dosdp-tools
src/test/scala/org/monarchinitiative/dosdp/ExpressionParsingTest.scala
Scala
mit
2,104
package lila.simul import play.api.libs.json._ import lila.common.LightUser import lila.common.PimpedJson._ import lila.game.{ Game, GameRepo } import lila.user.{ User, UserRepo } final class JsonView( getLightUser: String => Option[LightUser]) { private def fetchGames(simul: Simul) = if (simul.isFinished...
clarkerubber/lila
modules/simul/src/main/JsonView.scala
Scala
agpl-3.0
2,833
package com.twitter.finagle.serverset2 import collection.immutable import com.twitter.conversions.time._ import com.twitter.finagle.MockTimer import com.twitter.finagle.serverset2.client._ import com.twitter.io.Buf import com.twitter.util._ import java.util.concurrent.atomic.AtomicReference import org.junit.runner.Run...
travisbrown/finagle
finagle-serversets/src/test/scala/com/twitter/finagle/serverset2/ZkSessionTest.scala
Scala
apache-2.0
6,780
/* * Copyright (c) 2014, Brook 'redattack34' Heisler * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, t...
Redattack34/ModularRayguns
src/main/scala/com/castlebravostudios/rayguns/utils/MidpointDisplacement.scala
Scala
bsd-3-clause
2,905
/** * © 2019 Refinitiv. All Rights Reserved. * * 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 l...
e-orz/CM-Well
server/cmwell-bg/src/main/scala/cmwell/crawler/OffsetThrottler.scala
Scala
apache-2.0
5,834
package com.github.bruneli.scalaopt.core.discrete import com.github.bruneli.scalaopt.core.linalg.DenseVectorLike import com.github.bruneli.scalaopt.core.variable.{DiscreteVariable, Variable, Variables} class MostExtremeBranching extends BranchingStrategy { import MostExtremeBranching._ def findCutVariable(progr...
bruneli/scalaopt
core/src/main/scala/com/github/bruneli/scalaopt/core/discrete/MostExtremeBranching.scala
Scala
apache-2.0
1,400
package test object A { val b = new B() println(b.a) }
dragos/scala-ide
org.scala-ide.sdt.core.tests/test-workspace/builder-deprecation-warnings/src/test/A.scala
Scala
bsd-3-clause
59
package org.workcraft.gui.modeleditor.tools import org.workcraft.scala.Expressions._ import java.awt.BasicStroke import java.awt.Color import java.awt.Graphics2D import java.awt.Toolkit import java.awt.event.KeyEvent import java.awt.event.MouseEvent import java.awt.geom.Line2D import java.awt.geom.Point2D import javax...
mechkg/workcraft
ScalaGraphEditorUtil/src/main/scala/org/workcraft/gui/modeleditor/tools/GenericConnectionToolImpl.scala
Scala
gpl-3.0
5,299
/** * Author: Alexander Slesarenko * Date: 7/25/12 */ package scalan.primitives import scalan.common.OverloadHack._ import scalan.staged.BaseExp import scalan.{ScalanExp, Scalan, ScalanStd} trait Tuples { self: Scalan => object Pair { def apply[A, B](a: Rep[A], b: Rep[B]) = zipPair[A, B]((a, b)) def unap...
scalan/scalan
core/src/main/scala/scalan/primitives/Tuples.scala
Scala
apache-2.0
13,400
package com.github.jlprat.gameserver.fsm.model import akka.actor.ActorRef import Card._ /** * Helper class that holds an actor and its internal business ID * @param actorRef the actorRef * @param id the business Id of the Player * TODO: refactor this id to its own object */ case class PlayerInfo(actorRef: ActorR...
jlprat/akka-gameserver
src/main/scala/com/github/jlprat/gameserver/fsm/model/TableData.scala
Scala
apache-2.0
1,375
/* * 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 ...
CodingCat/spark-eventhubs
core/src/main/scala/org/apache/spark/eventhubscommon/client/RestfulEventHubClient.scala
Scala
apache-2.0
9,677
package at.ac.tuwien.ifs.ir.evaluation import java.io.File import java.nio.file.{Files, Paths} import at.ac.tuwien.ifs.io.TXTFile import at.ac.tuwien.ifs.ir.model._ import scala.sys.process._ import scala.util.Random /** * Created by aldo on 10/19/14. */ class TRECEval(tempDir: String = ".", rounding: Boolean = t...
aldolipani/PoolBiasEstimators
src/main/scala/at/ac/tuwien/ifs/ir/evaluation/TRECEval.scala
Scala
apache-2.0
10,814
/* * Author: Manish Gupta */ package com.guptam.spark.dba.hdfsutil import java.io.BufferedInputStream import java.io.FileInputStream import java.io.InputStream import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.{ Path, FileSystem, FileStatus } import scala.collection.mutable.ListBuff...
guptam/spark-dba
src/com/guptam/spark/dba/hdfsutil/HadoopFileSystemOperation.scala
Scala
apache-2.0
5,791
package scalaxy.compilets; package test import org.junit._ import Assert._ import scalaxy.compilets.fail import scala.reflect.runtime.universe._ import scala.reflect.ClassTag class TestMacros { /* @Test def testReplaceTypeVar { def rep[T](v: T) = replace(v.toString, "?") println("rep(12) = " + rep(12)...
nativelibs4java/Scalaxy
Obsolete/Compilets/API/src/test/scala/scalaxy/TestMacros.scala
Scala
bsd-3-clause
1,408
/* * Copyright 2001-2008 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...
epishkin/scalatest-google-code
src/test/scala/org/scalatest/junit/JUnit3SuiteSpec.scala
Scala
apache-2.0
6,275
package com.github.golem.command.administrative import com.github.golem.command.CommandResponse object GetVersion extends AdministrativeCommand { case class Response(version: String) extends CommandResponse }
pjarosik/golem
src/main/scala/com/github/golem/command/administrative/GetVersion.scala
Scala
gpl-2.0
214
package fpinscala.parallelism import java.util.concurrent._ import language.implicitConversions object Par { type Par[A] = ExecutorService => Future[A] def run[A](s: ExecutorService)(a: Par[A]): Future[A] = a(s) def unit[A](a: A): Par[A] = (es: ExecutorService) => UnitFuture(a) // `unit` is represented as a...
RheinMainScala/fpinscala
exercises/src/main/scala/fpinscala/parallelism/Par.scala
Scala
mit
4,855
package models.db import java.sql.Timestamp import models.OAuthClient import services.DatabaseService trait OAuthClientsTable extends AccountsTable { protected val databaseService: DatabaseService import databaseService.driver.api._ class OauthClients(tag: Tag) extends Table[OAuthClient](tag, "oauth_clients"...
ziyasal/Reserveon
src/main/scala/models/db/OAuthClientsTable.scala
Scala
mit
993
object Test { type OrAlias = Int | Float def m(s: OrAlias | String) = s match { case _: Int => ; case _: Float => ; case _: String => ; } }
som-snytt/dotty
tests/patmat/i2254.scala
Scala
apache-2.0
148
/* * 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
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/ScriptTransformationSuite.scala
Scala
apache-2.0
8,874
package com.eevolution.context.dictionary.infrastructure.service import java.util.UUID import akka.NotUsed import com.eevolution.context.dictionary.domain._ import com.eevolution.context.dictionary.domain.model.MenuTrl import com.eevolution.utils.PaginatedSequence import com.lightbend.lagom.scaladsl.api.{Service, Ser...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/service/MenuTrlService.scala
Scala
gpl-3.0
2,009
/** * Copyright 2016, deepsense.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 applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
workflowexecutor/src/main/scala/io/deepsense/workflowexecutor/pyspark/PythonPathGenerator.scala
Scala
apache-2.0
1,478
/* * Copyright 2013 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...
joychugh/storehaus
storehaus-core/src/main/scala/com/twitter/storehaus/PivotOps.scala
Scala
apache-2.0
3,895
import akka.actor._ object TickTock { object Tick object Tock val random = new scala.util.Random class Counter extends Actor { var counter = 0 def receive = { case Tick => Thread.sleep(random.nextInt(500)) counter += 1 println(self.path.name + " after Tick: " + counter) ca...
jasonbaldridge/akka-tutorial
TickTock.scala
Scala
apache-2.0
950
/* * Copyright 2015 org.NLP4L * * 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...
fubuki/nlp4l
app/org/nlp4l/ltr/support/procs/Trainers.scala
Scala
apache-2.0
3,452
/******************************************************************************* * Copyright (c) 2019. Carl Minden * * 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 3 of the ...
carlminden/anathema-roguelike
src/com/anathema_roguelike/entities/characters/player/classes/Druid.scala
Scala
gpl-3.0
4,274
package com.twitter.finagle.builder import com.twitter.conversions.time._ import com.twitter.finagle._ import com.twitter.finagle.client.Transporter.Credentials import com.twitter.finagle.client.{DefaultPool, StackClient, StdStackClient} import com.twitter.finagle.client.{StackBasedClient, Transporter} import com.twit...
rojanu/finagle
finagle-core/src/main/scala/com/twitter/finagle/builder/ClientBuilder.scala
Scala
apache-2.0
41,279
/* * 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
sql/core/src/test/scala/org/apache/spark/sql/FilterPushdownBenchmark.scala
Scala
apache-2.0
12,569
package autolift.scalaz import autolift.{LiftTraverse, LiftTraverseSyntax} import scalaz.{Functor, Applicative, Traverse} trait ScalazLiftTraverse[Obj, Fn] extends LiftTraverse[Obj, Fn] object ScalazLiftTraverse extends LowPriorityScalazLiftTraverse{ def apply[Obj, Fn](implicit lift: ScalazLiftTraverse[Obj, Fn]): ...
wheaties/AutoLifts
autolift-scalaz/src/main/scala/autolift/scalaz/LiftTraverse.scala
Scala
apache-2.0
1,856
package com.twitter.finagle.socks import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.junit.runner.RunWith import org.scalatest.mock.MockitoSugar import org.mockito.ArgumentCaptor import org.mockito.Matchers._ import org.mockito.Mockito.{times, verify, when, atLeastOnce} import org.jboss.ne...
cogitate/twitter-finagle-uuid
finagle-core/src/test/scala/com/twitter/finagle/socks/SocksConnectHandlerTest.scala
Scala
apache-2.0
9,572
package com.orendainx.trucking.enrichment import com.orendainx.trucking.commons.models.TruckEventTypes import com.typesafe.config.{Config, ConfigFactory} import scala.util.Random /** * @author Edgar Orendain <edgar@orendainx.com> */ object WeatherAPI { lazy val default = new WeatherAPI() } class WeatherAPI(co...
orendain/trucking-iot
enrichment/src/main/scala/com/orendainx/trucking/enrichment/WeatherAPI.scala
Scala
apache-2.0
1,980
package dotty.tools package backend package jvm import scala.annotation.switch import scala.tools.asm import scala.tools.asm.{Handle, Label, Opcodes} import BCodeHelpers.InvokeStyle /* * * @author Miguel Garcia, http://lamp.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/ * @version 1.0 * */ trait BCodeBodyBui...
som-snytt/dotty
compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala
Scala
apache-2.0
60,722
package scjson.codec import minitest.* import scjson.ast.* object JsonDecoderTest extends SimpleTestSuite { test("JsonDecoder should decode null") { assertEquals( JsonCodec decode "null", Right(JsonValue.Null) ) } test("JsonDecoder should decode true") { assertEquals( JsonCodec decode "true", Ri...
ritschwumm/scjson
modules/codec/src/test/scala/JsonDecoderTest.scala
Scala
bsd-2-clause
5,079
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.ir import java.security.M...
scala-js/scala-js
ir/jvm/src/main/scala/org/scalajs/ir/SHA1.scala
Scala
apache-2.0
865
package org.sisioh.aws4s.cfn.model import com.amazonaws.services.cloudformation.model.DescribeStackResourcesRequest import org.sisioh.aws4s.PimpedType object DescribeStackResourcesRequestFactory { def create(): DescribeStackResourcesRequest = new DescribeStackResourcesRequest() } class RichDescribeStackResources...
everpeace/aws4s
aws4s-cfn/src/main/scala/org/sisioh/aws4s/cfn/model/RichDescribeStackResourcesRequest.scala
Scala
mit
1,432
/* * 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 ...
aray/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2ScanExec.scala
Scala
apache-2.0
3,105
package net.kogics.jiva.evolution import net.kogics.jiva.Predef._ import junit.framework._ import net.kogics.jiva.population._ class TestApgaReplacer extends TestCase { def testReplacement = { val currPop = Population(Chromosome("10110"), Chromosome("10001"), Chromosome("00100"), Chromoso...
milliondreams/jiva-ng
src/test/scala/net/kogics/jiva/evolution/TestApgaReplacer.scala
Scala
gpl-3.0
1,078
package com.ibm.spark.kernel.api import com.ibm.spark.kernel.protocol.v5 import com.ibm.spark.kernel.protocol.v5.KernelMessage import com.ibm.spark.kernel.protocol.v5.kernel.ActorLoader /** * Represents the methods available to stream data from the kernel to the * client. */ class StreamMethods(actorLoader: ActorL...
codeaudit/spark-kernel
kernel/src/main/scala/com/ibm/spark/kernel/api/StreamMethods.scala
Scala
apache-2.0
990
/* * Copyright 2010 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 t...
twitter/grabby-hands
src/main/scala/com/twitter/grabbyhands/QueueCounters.scala
Scala
apache-2.0
1,539
/* * Copyright 2018 Analytics Zoo 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 applicable law or...
intel-analytics/analytics-zoo
zoo/src/main/scala/com/intel/analytics/zoo/pipeline/api/keras/layers/Recurrent.scala
Scala
apache-2.0
2,425
/* * 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 ...
ahnqirage/spark
core/src/main/scala/org/apache/spark/deploy/security/HadoopDelegationTokenManager.scala
Scala
apache-2.0
11,578
package com.alanjz.microstrike import java.awt.Color import scala.util.Random package object team { trait TeamGroup { val group : TeamGroup } trait GroupA extends TeamGroup { override val group = this } trait GroupB extends TeamGroup { override val group = this } sealed abstract class Te...
spacenut/microstrike
src/com/alanjz/microstrike/team/package.scala
Scala
gpl-2.0
1,351
package spark.debugger import scala.collection.immutable import scala.collection.mutable import spark.Logging /** * Verifies a stream of checksum events and detects mismatches, which occur when the same entity has * multiple checksums. */ class ChecksumVerifier extends Logging { /** Map from entities to the che...
ankurdave/arthur
core/src/main/scala/spark/debugger/ChecksumVerifier.scala
Scala
bsd-3-clause
1,029