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 controllers import play.api.data.Form import play.api.libs.json.Json import lila.api.Context import lila.app._ import lila.common.{ Captcha, LilaCookie, HTTPRequest } import lila.i18n.{ Translation, TransInfo } import views._ object I18n extends LilaController { private def env = Env.i18n def select = ...
JimmyMow/lila
app/controllers/I18n.scala
Scala
mit
3,523
package net.ruippeixotog.scalafbp.component.ppl.distrib import spray.json._ import thinkbayes.Pmf import net.ruippeixotog.scalafbp.component._ import net.ruippeixotog.scalafbp.thinkbayes.Implicits._ class UniformSpec extends ComponentSpec with AutoTerminateSpec { val component = Uniform "A Uniform component" sh...
ruippeixotog/scalafbp
components/ppl/src/test/scala/net/ruippeixotog/scalafbp/component/ppl/distrib/UniformSpec.scala
Scala
mit
943
package net.cucumbersome.rpgRoller.warhammer.combat.domain import cats.data._ import net.cucumbersome.rpgRoller.warhammer.combat.domain.initiative.Initiative import net.cucumbersome.rpgRoller.warhammer.player.CombatActor private[combat] case class Combat(combatActors: List[InCombatActor]) private[domain] object Comb...
CucumisSativus/rpgRollerBackend
src/main/scala/net/cucumbersome/rpgRoller/warhammer/combat/domain/Combat.scala
Scala
mit
1,476
package com.xhachi.gae4s.datastore import com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig import com.xhachi.gae4s.tests.AppEngineTestSuite import org.scalatest.{FunSuite, Matchers} class UserTest extends FunSuite with AppEngineTestSuite with Matchers { override def getConfig = new L...
thachi/gae4s
store-extension/src/test/scala/com/xhachi/gae4s/datastore/UserTest.scala
Scala
apache-2.0
16,156
/* * 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...
dotty-staging/scalatest
scalatest-test/src/test/scala/org/scalatest/tools/SuiteDiscoveryHelperSuite.scala
Scala
apache-2.0
15,014
import sbt._ import Keys._ import com.jsuereth.sbtpgp.SbtPgp import com.typesafe.sbt.packager.universal.{ UniversalPlugin, UniversalDeployPlugin } import com.typesafe.sbt.packager.debian.{ DebianPlugin, DebianDeployPlugin } import com.typesafe.sbt.packager.rpm.{ RpmPlugin, RpmDeployPlugin } import com.jsuereth.sbtpgp.g...
xuwei-k/xsbt
launcher-package/project/PackageSignerPlugin.scala
Scala
apache-2.0
2,216
package org.etl.process.onethread class ZipAction { }
jpvelsamy/sparrow
sparrow-server/src/main/scala/org/etl/process/onethread/ZipAction.scala
Scala
apache-2.0
57
/* * Copyright 2009-2010 LinkedIn, 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 ...
rhavyn/norbert
network/src/test/scala/com/linkedin/norbert/network/common/MessageRegistrySpec.scala
Scala
apache-2.0
2,599
package com.twitter.app import com.twitter.util._ import scala.collection.mutable.{ArrayBuffer, HashMap} import scala.collection.immutable.TreeSet import java.net.InetSocketAddress /** * A typeclass providing evidence for parsing type `T` * as a flag. */ trait Flaggable[T] { def parse(s: String): T def show(t:...
mosesn/util
util-app/src/main/scala/com/twitter/app/Flag.scala
Scala
apache-2.0
15,649
package org.jetbrains.plugins.scala package lang package refactoring package namesSuggester import com.intellij.openapi.util.text.StringUtil import org.jetbrains.plugins.scala.extensions._ import org.jetbrains.plugins.scala.lang.psi.api.base.{ScLiteral, ScReferenceElement} import org.jetbrains.plugins.scala.lang.psi.a...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/refactoring/namesSuggester/NameSuggester.scala
Scala
apache-2.0
6,471
package com.twitter.finagle.httpx.filter import com.twitter.finagle.{Service, SimpleFilter} import com.twitter.finagle.stats.StatsReceiver import com.twitter.finagle.httpx.{Request, Response, Status} import com.twitter.util.{Duration, Future, Return, Stopwatch, Throw} /** * Statistic filter. * * Add counters: * ...
nkhuyu/finagle
finagle-httpx/src/main/scala/com/twitter/finagle/httpx/filter/StatsFilter.scala
Scala
apache-2.0
1,681
package willrogers package controllers import java.text.SimpleDateFormat import scala.collection.Seq import org.joda.time.DateTime import play.api.data.Form import play.api.data.Forms.text import play.api.data.Forms.tuple import play.api.mvc.Action import play.api.mvc.Results.Ok import play.mvc.Controller import sa...
jeromebanks/satisfaction
apps/willrogers/app/controllers/TrackHistoryPage.scala
Scala
apache-2.0
3,527
/* * 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 ...
javalovelinux/SparkGroovyScript
sql/core/src/test/scala/org/apache/spark/sql/execution/GroupedIteratorSuite.scala
Scala
apache-2.0
2,928
package systems.adaptix.bling.data import org.specs2.mutable.Specification import scalikejdbc.SQLSyntax /** * Created by nkashyap on 6/4/15. */ class FieldInfoSpecification extends Specification { "The FieldInfo trait enables the generation of chunks of SQL, as strings, pertaining to the field being represented....
nkashy1/bling
src/test/scala/systems/adaptix/bling/data/FieldInfoSpecification.scala
Scala
mit
1,526
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
bravo-zhang/spark
mllib/src/main/scala/org/apache/spark/mllib/tree/impurity/Impurity.scala
Scala
apache-2.0
6,777
package com.monovore.coast.samza.safe import java.io.File import java.util import com.monovore.coast.wire.{Protocol, Serializer} import org.apache.samza.container.SamzaContainerContext import org.apache.samza.metrics.MetricsRegistry import org.apache.samza.serializers.Serde import org.apache.samza.storage.kv.{BaseKey...
bkirwi/coast
samza/src/main/scala/com/monovore/coast/samza/safe/CoastStorageEngine.scala
Scala
apache-2.0
4,174
package com.twitter.finagle import com.twitter.finagle.util.LoadService import com.twitter.util.{Closable, Future, Time} import java.net.InetSocketAddress import java.util.logging.Logger import scala.collection.mutable import scala.util.control.NoStackTrace /** * Indicates that an [[com.twitter.finagle.Announcer]] w...
koshelev/finagle
finagle-core/src/main/scala/com/twitter/finagle/Announcer.scala
Scala
apache-2.0
3,739
/* * 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 ...
liutang123/spark
core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
Scala
apache-2.0
76,630
package circuitsimulator.core import java.io.{File, FileNotFoundException} import org.json4s.JsonAST.JValue import org.json4s.native.JsonMethods import scala.io.Source object util { def parseJSON(json: String, application: String): JValue = JsonMethods.parse(json)/* match { //if(false) only so intellij does not...
colonlc/CircuitSimulator
core/src/main/scala/circuitsimulator/core/util.scala
Scala
mit
980
package spatial.lang import argon.core._ import argon.nodes._ import spatial.nodes._ import forge._ object BitOps { /** Constructors **/ @internal def data_as_bits[A:Type:Bits](a: Exp[A])(implicit mV: Type[BitVector]): Exp[BitVector] = stage(DataAsBits[A](a))(ctx) @internal def bits_as_data[A:Type:Bits](a: Exp[...
stanford-ppl/spatial-lang
spatial/core/src/spatial/lang/BitOps.scala
Scala
mit
5,179
package org.atnos.eff.syntax import org.atnos.eff._ import org.atnos.eff.concurrent.Scheduler import scala.concurrent.{ExecutionContext, Future} trait future { implicit final def toFutureOps[R, A](e: Eff[R, A]): FutureOps[R, A] = new FutureOps[R, A](e) } object future extends future final class FutureOps[R, A...
etorreborre/eff
shared/src/main/scala/org/atnos/eff/syntax/future.scala
Scala
mit
1,306
/* * 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 ...
shaneknapp/spark
core/src/test/scala/org/apache/spark/deploy/history/EventLogFileCompactorSuite.scala
Scala
apache-2.0
14,356
/* * Stratio Meta * * Copyright (c) 2014, Stratio, All rights reserved. * * This library 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.0 of the License, or (at your option) ...
dhiguero/stratio-meta
meta-server/src/main/scala/com/stratio/meta/server/actors/ValidatorActor.scala
Scala
gpl-3.0
1,790
package breeze.math import breeze.generic.UFunc import breeze.generic.UFunc.UImpl2 import breeze.linalg._ import breeze.linalg.operators._ import breeze.linalg.support.CanTraverseValues.ValuesVisitor import breeze.linalg.support._ import breeze.util.Isomorphism import breeze.compat._ import breeze.compat.Scala3Compat....
scalanlp/breeze
math/src/main/scala/breeze/math/MutablizingAdaptor.scala
Scala
apache-2.0
30,254
package test.kofre import org.scalatest.freespec.AnyFreeSpec import kofre.protocol.RaftState.Vote import kofre.Lattice import kofre.protocol.RaftState class RaftLatticeTest extends AnyFreeSpec { "basic interaction" in { val initial = RaftState[String](Set("a", "b", "c"), Set(Vote(0, "a", "a"), Vote(0, "a", "b...
guidosalva/REScala
Code/Extensions/Kofre/src/test/scala/test/kofre/RaftLatticeTest.scala
Scala
apache-2.0
2,315
package org.broadinstitute.dsde.vault import java.util.concurrent.TimeUnit import akka.actor.{Actor, ActorRef, Props} import akka.event.Logging import akka.util.Timeout import org.broadinstitute.dsde.vault.GenericDmClientService._ import org.broadinstitute.dsde.vault.model.{GenericRelEnt, GenericIngest, GenericEntity...
broadinstitute/vault-api
src/main/scala/org/broadinstitute/dsde/vault/GenericDmClientService.scala
Scala
bsd-3-clause
4,965
/* * Copyright 2011 Goldman Sachs. * * 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 ...
jlz27/gs-collections
scala-unit-tests/src/test/scala/com/gs/collections/impl/InternalIterableTestTrait.scala
Scala
apache-2.0
2,244
package com.codacy.client.bitbucket.v1 import java.time.LocalDateTime import play.api.libs.functional.syntax._ import play.api.libs.json._ case class PullRequest(id: Long, title: String, description: String, authorUsername: Option[String], authorAvatar: Option[String], s...
rtfpessoa/bitbucket-scala-client
src/main/scala/com/codacy/client/bitbucket/v1/PullRequest.scala
Scala
apache-2.0
2,982
/* ____ __ ____ ____ ____,,___ ____ __ __ ____ * ( _ \ /__\ (_ )(_ _)( ___)/ __) ( _ \( )( )( _ \ Read * ) / /(__)\ / /_ _)(_ )__) \__ \ )___/ )(__)( ) _ < README.txt * (_)\_)(__)(__)(____)(____)(____)(___/ (__) (______)(____/ LICENSE.txt */ package razi...
razie/diesel-hydra
diesel/src/main/scala/razie/diesel/expr/SimpleExprParser.scala
Scala
apache-2.0
1,346
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-index-api/src/main/scala/org/locationtech/geomesa/index/index/z3/XZ3IndexKeySpace.scala
Scala
apache-2.0
11,893
package Chapter13 import org.scalameter object Collections { // topics: // the main collections traits // mutable and immutable collections // sequences // lists // sets // operators for adding or removing elements // common methods // mapping a function // reducing, folding and sc...
vasnake/scala-for-the-impatient
src/main/scala/Chapter13/Collections.scala
Scala
gpl-3.0
31,245
package keemun.models import play.api.libs.json._ /** * Copyright (c) Nikita Kovaliov, maizy.ru, 2013-2014 * See LICENSE.txt for details. */ case class Repo( name: String, owner: Account, description: Option[String] = None, isPrivate: Option[Boolean] = None, primaryLang: Option[ProgrammingLang] ...
maizy/keemun
app/keemun/models/Repo.scala
Scala
mit
993
package skabele.screenshare.controllers import org.scalatestplus.play._ import play.api.mvc.AnyContentAsEmpty import play.api.test.Helpers._ import play.api.test._ class HomeControllerSpec extends PlaySpec with OneAppPerTest { "HomeController GET" should { "render the index page for Provider when requesting f...
skabele/simple-screen-share
test/skabele/screenshare/controllers/HomeControllerSpec.scala
Scala
mit
904
package io.buoyant.linkerd.admin import com.twitter.finagle.http.{Request, Status} import io.buoyant.admin.ConfigHandler import io.buoyant.linkerd._ import io.buoyant.linkerd.protocol.ThriftInitializer import io.buoyant.namer.TestNamerInitializer import io.buoyant.test.Awaits import org.scalatest.FunSuite class Confi...
hhtpcd/linkerd
linkerd/admin/src/test/scala/io/buoyant/linkerd/admin/ConfigHandlerTest.scala
Scala
apache-2.0
1,466
package objsets import org.scalatest.FunSuite import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class TweetSetSuite extends FunSuite { trait TestSets { val set1 = new Empty val set2 = set1.incl(new Tweet("a", "a body", 20)) val set3 = set2.incl(new T...
marlanbar/scala-coursera
objsets/src/test/scala/objsets/TweetSetSuite.scala
Scala
unlicense
1,758
/* * 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 ...
vincentpoon/hbase
hbase-spark/src/main/scala/org/apache/hadoop/hbase/spark/datasources/SerDes.scala
Scala
apache-2.0
1,811
/* * Copyright 2015 PayPal * * 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 ...
tutufool/squbs
squbs-actormonitor/src/test/scala/org/squbs/actormonitor/ActorMonitorSpec.scala
Scala
apache-2.0
12,991
package org.jetbrains.plugins.scala.autoImport.quickFix import com.intellij.psi._ import org.jetbrains.annotations.Nls import org.jetbrains.plugins.scala.extensions.{PsiClassExt, PsiNamedElementExt} import org.jetbrains.plugins.scala.lang.psi.api.ScPackage import org.jetbrains.plugins.scala.lang.psi.api.statements.ScF...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/autoImport/quickFix/ElementToImport.scala
Scala
apache-2.0
3,364
package edu.uchicago.cs.encsel.dataset.feature import org.junit.Assert._ import org.junit.Test /** * Created by harper on 4/27/17. */ class FilterTest { @Test def testFirstNFilter: Unit = { val input = (0 to 1000).map(_.toString).toIterator val filtered = Filter.firstNFilter(50)(input).toArray as...
harperjiang/enc-selector
src/test/scala/edu/uchicago/cs/encsel/dataset/feature/FilterTest.scala
Scala
apache-2.0
1,621
/** * This file is part of mycollab-web. * * mycollab-web 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. * * mycollab-web is d...
uniteddiversity/mycollab
mycollab-web/src/main/scala/com.esofthead.mycollab.module.project.view.parameters/ProjectScreenData.scala
Scala
agpl-3.0
1,239
package downstream import japgolly.microlibs.testutil.TestUtil._ import japgolly.microlibs.testutil.TestUtilInternals._ import scala.Console._ import sourcecode.Line import utest._ object JsOutputTest extends TestSuite { import Props._ private def assertLegalValue(str: String)(legal: String*)(implicit l: Line): ...
japgolly/scalajs-react
downstream-tests/jvm/src/test/scala/downstream/JsOutputTest.scala
Scala
apache-2.0
3,031
package jp.ijufumi.openreports.vo import scala.beans.BeanProperty case class GroupInfo(@BeanProperty groupId: Long, @BeanProperty groupName: String, @BeanProperty versions: Long, @BeanProperty isBelong: Boolean) { def this(groupId: Long, groupName: Str...
ijufumi/openreports_scala
src/main/scala/jp/ijufumi/openreports/vo/GroupInfo.scala
Scala
mit
551
package Adventure.o1.adventure /** The class `Action` represents actions that a player may take in a text adventure game. * `Action` objects are constructed on the basis of textual commands and are, in effect, * parsers for such commands. An action object is immutable after creation. * * @param input a textu...
Ronin748/MOOC_s15
src/Adventure/o1/adventure/Action.scala
Scala
gpl-2.0
1,763
package system.cell.processor.route.actors import com.actors.CustomActor import system.ontologies.messages._ import scala.collection.mutable /** * This actor manages a cache of the Routes. Routes are valid for a time of X seconds * */ class CacheManager(val cacheKeepAlive: Long) extends CustomActor { ...
albertogiunta/arianna
src/main/scala/system/cell/processor/route/actors/CacheManager.scala
Scala
gpl-3.0
1,758
/* * Copyright (c) 2016. StulSoft, Yuriy Stul */ package com.stulsoft.ysps.pimplicit import com.stulsoft.ysps.pimplicit.StringUtils._ import com.typesafe.scalalogging.LazyLogging /** * Created by Yuriy Stul on 11/8/2016. */ object ImplicitClassTest extends App with LazyLogging { logger.info("Start") logger...
ysden123/ysps
src/main/scala/com/stulsoft/ysps/pimplicit/ImplicitClassTest.scala
Scala
mit
518
/* * 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 ...
sgururajshetty/carbondata
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/directdictionary/DateDataTypeNullDataTest.scala
Scala
apache-2.0
2,984
/** * 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/api/util/Credentials.scala
Scala
apache-2.0
905
package ee.cone.c4gate import java.time.Instant import java.util.UUID import ee.cone.c4actor.QProtocol.S_Firstborn import ee.cone.c4actor.Types.SrcId import ee.cone.c4actor._ import ee.cone.c4assemble.Types.{Each, Values} import ee.cone.c4assemble._ import ee.cone.c4di.{c4, c4multi} import ee.cone.c4gate.ActorAccessP...
conecenter/c4proto
base_lib/src/main/scala/ee/cone/c4gate/MonitoringImpl.scala
Scala
apache-2.0
3,898
// These are meant to be typed into the REPL. You can also run // scala -Xnojline < repl-session.scala to run them all at once. val f: PartialFunction[Char, Int] = { case '+' => 1 ; case '-' => -1 } f('-') f.isDefinedAt('0') f('0') // Throws MatchError "-3+4".collect { case '+' => 1 ; case '-' => -1 }
P7h/ScalaPlayground
Scala for the Impatient/examples/ch14/sec17/repl-session.scala
Scala
apache-2.0
307
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
lxsmnv/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvalHelper.scala
Scala
apache-2.0
16,545
object Problem { def isPentagonal(num: Int): Boolean = { val foo = (Math.sqrt(1 + 24 * num) + 1.0) / 6.0 foo == foo.toInt } def pentagonal(n: Int): Int = n * (3 * n - 1) / 2 def main(args: Array[String]) { val start = System.currentTimeMillis val pentagonalNumbers = (1 to 2500).map(pentagonal)...
Jiri-Kremser/euler
044/Problem.scala
Scala
gpl-2.0
834
package workflow /** * A PipelineResult is a lazy wrapper around the result of applying a [[Pipeline]] to data. * Internally it contains the Pipeline's execution plan with data sources inserted, * and the sink that the Pipeline's output is expected to be produced by. * * @param executor The Pipeline's underlying ...
tomerk/keystone
src/main/scala/workflow/PipelineResult.scala
Scala
apache-2.0
744
package org.jetbrains.plugins.scala package decompiler import java.io.IOException import com.intellij.openapi.vfs.VirtualFile import scala.annotation.tailrec /** * @author ilyas */ object ScClsStubBuilderFactory { def canBeProcessed(file: VirtualFile): Boolean = { try { canBeProcessed(file, file.cont...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/decompiler/ScClsStubBuilderFactory.scala
Scala
apache-2.0
1,323
package ghpages.secret.tests import cats.instances.either._ import cats.instances.list._ import cats.instances.option._ import cats.instances.string._ import cats.instances.tuple._ import cats.instances.vector._ import cats.kernel.Eq import cats.syntax.eq._ import japgolly.scalajs.react._ import japgolly.scalajs.react...
japgolly/scalajs-react
ghpages/src/main/scala/ghpages/secret/tests/AsyncTest.scala
Scala
apache-2.0
6,288
package com.ntsdev.run import org.eclipse.jetty.server.Server import org.eclipse.jetty.servlet.DefaultServlet import org.eclipse.jetty.webapp.WebAppContext import org.scalatra.servlet.ScalatraListener object JettyLauncher { def main(args: Array[String]): Unit = { val port = getServerPort val context = buil...
neilshannon/devnexus-microservices
scala/src/main/scala/com/ntsdev/run/JettyLauncher.scala
Scala
mit
808
/* * 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 ...
sven-lange-last/openwhisk
tests/src/test/scala/common/rest/SwaggerValidator.scala
Scala
apache-2.0
4,799
package com.codingkapoor.codingbat import org.scalatest.FlatSpec import org.scalatest.Matchers class StringISpec extends FlatSpec with Matchers { """Given a string name, e.g. "Bob", method "helloName"""" should """return a greeting of the form "Hello Bob!".""" in { StringI.helloName("Bob") should equal("Hell...
codingkapoor/scala-coding-bat
src/test/scala/com/codingkapoor/codingbat/StringISpec.scala
Scala
mit
12,228
/* * 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 ...
jkbradley/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/csv/CSVPartitionReaderFactory.scala
Scala
apache-2.0
3,204
package polyite.util import java.util.logging.Logger import org.junit.Assert.assertTrue import org.junit.Test class EchelonFormTest { @Test def test { val matrix : Array[Array[Rat]] = Array( Array(Rat(1), Rat(1), Rat(1)), Array(Rat(1), Rat(0), Rat(1)), Array(Rat(0), Rat(1), Rat(1)), ...
stganser/polyite
test/polyite/util/EchelonFormTest.scala
Scala
mit
555
package t1000976.c class C(key: String = "", componentStates: String = "")
Kwestor/scala-ide
org.scala-ide.sdt.core.tests/test-workspace/pc/src/t1000976/c/C.scala
Scala
bsd-3-clause
75
/* * 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 ...
hhbyyh/SparseML
LogisticRegression/sparseLR_2.0/SparseLBFGS.scala
Scala
apache-2.0
8,230
/* * 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
examples/src/main/scala/org/apache/spark/examples/ml/SQLTransformerExample.scala
Scala
apache-2.0
1,582
package tuner.gui.util import tuner.Config import scala.util.Try import org.sittingbull.gt.util.XWilkinson import org.sittingbull.gt.util.NiceStepSizeGenerator import scala.collection.JavaConverters._ import com.typesafe.scalalogging.slf4j.LazyLogging object AxisTicks extends LazyLogging { // Set up the labeli...
gabysbrain/tuner
src/main/scala/tuner/gui/util/AxisTicks.scala
Scala
mit
1,640
/* * This file is part of the sohva project. * 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 requi...
gnieh/sohva
src/main/scala/gnieh/sohva/DocumentOps.scala
Scala
apache-2.0
5,790
package edu.cmu.cs.oak.exceptions class NotFoundException extends OakException { }
smba/oak
edu.cmu.cs.oak/src/main/scala/edu/cmu/cs/oak/exceptions/NotFoundException.scala
Scala
lgpl-3.0
86
package models import java.util.UUID import com.mohiva.play.silhouette.api.{ Identity, LoginInfo } import play.api.libs.json._ import play.api.libs.functional.syntax._ trait Identifiable { def loginInfo: LoginInfo } /** * The user object. * * @param loginInfo The linked login info. Uniquely identifies a user. ...
antonini/gitrank-web
app/models/User.scala
Scala
apache-2.0
1,406
package actors.supervised import akka.actor.{ActorRef, ActorSystem, Props} import akka.pattern.BackoffOpts import scala.concurrent.duration.FiniteDuration case class RestartOnStop(minBackoff: FiniteDuration, maxBackoff: FiniteDuration) { def actorOf(props: Props, name: String)(implicit system: ActorSystem): Actor...
UKHomeOffice/drt-scalajs-spa-exploration
server/src/main/scala/actors/supervised/RestartOnStop.scala
Scala
apache-2.0
610
/** * Copyright 2013 Brian Porter (poornerd at gmail dot com) - twitter: @poornerd * * 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 *...
matthewchartier/securesocial
module-code/app/securesocial/core/providers/XingProvider.scala
Scala
apache-2.0
2,373
package akka.guice.annotation.test.examples import akka.actor.{Actor, ActorLogging} import akka.guice.annotation.injectableActor /** * Example Actor that can be injected via Guice. */ @injectableActor class ActorWithReply extends Actor with ActorLogging { override def receive: Receive = { case x : String ...
Equiem/akka-guice
macros/src/test/scala/akka/guice/annotation/test/examples/ActorWithReply.scala
Scala
mit
370
package mesosphere.mesos import mesosphere.marathon.MarathonTestHelper import mesosphere.marathon.tasks.{ PortsMatcher, PortsMatch } import org.scalatest.{ Matchers, GivenWhenThen, FunSuite } import scala.collection.immutable.Seq class ResourceMatchTest extends FunSuite with GivenWhenThen with Matchers { test("...
pgkelley4/marathon
src/test/scala/mesosphere/mesos/ResourceMatchTest.scala
Scala
apache-2.0
1,489
fmap(g compose f) == fmap(g) compose fmap(f)
hmemcpy/milewski-ctfp-pdf
src/content/1.7/code/scala/snippet09.scala
Scala
gpl-3.0
44
package views.html.tournament import controllers.routes import play.api.libs.json.Json import lila.api.Context import lila.app.templating.Environment._ import lila.app.ui.ScalatagsTemplate._ import lila.common.String.html.safeJsonValue import lila.tournament.Schedule.Freq import lila.tournament.Tournament object hom...
luanlv/lila
app/views/tournament/home.scala
Scala
mit
3,544
// Copyright 2015,2016,2017,2018,2019,2020 Commonwealth Bank of Australia // // 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...
CommBank/grimlock
grimlock-core/src/test/scala/commbank/grimlock/TestExtract.scala
Scala
apache-2.0
8,455
package com.github.etacassiopeia.s99.list /** * <h1>P02</h1> * Find the last but one element of a list * * @author Mohsen Zainalpour * @version 1.0 * @since 28/04/16 */ object P02 { def main(args: Array[String]): Unit = { val result = penultimate(List(1, 1, 2, 3, 5, 8)) //val result2 = penult...
EtaCassiopeia/S-99
src/main/scala/com/github/etacassiopeia/s99/list/P02.scala
Scala
apache-2.0
587
/** * ____ __ ____ ____ ____,,___ ____ __ __ ____ * ( _ \ /__\ (_ )(_ _)( ___)/ __) ( _ \( )( )( _ \ Read * ) / /(__)\ / /_ _)(_ )__) \__ \ )___/ )(__)( ) _ < README.txt * (_)\_)(__)(__)(____)(____)(____)(___/ (__) (______)(____/ LICENSE.txt */ package ...
razie/diesel-rx
diesel/src/main/scala/razie/wiki/model/WikiSearch.scala
Scala
apache-2.0
6,521
package varys.util /** * Created by franklab on 15-5-27. */ import java.util import akka.actor.{ActorRef, Props, ActorSystem, Actor} import org.jnetpcap.Pcap import org.jnetpcap.PcapBpfProgram import org.jnetpcap.PcapIf import org.jnetpcap.packet.PcapPacket import org.jnetpcap.packet.PcapPacketHandler import org.j...
frankfzw/varys
core/src/main/scala/varys/util/ECN.scala
Scala
apache-2.0
3,317
package com.socrata.soql.parsing import scala.util.parsing.input.NoPosition import org.scalatest._ import org.scalatest.MustMatchers import com.socrata.soql.ast._ import com.socrata.soql.parsing.standalone_exceptions.BadParse import com.socrata.soql.environment.{FunctionName, ColumnName} class ParserTest extends Wo...
socrata-platform/soql-reference
soql-standalone-parser/src/test/scala/com/socrata/soql/parsing/ParserTest.scala
Scala
apache-2.0
15,815
/* * Copyright 2016 Coral realtime streaming analytics (http://coral-streaming.github.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...
coral-streaming/coral
src/test/scala/io/coral/lib/NotSoRandom.scala
Scala
apache-2.0
1,077
package org.deepdive.inference import org.deepdive.Logging import org.deepdive.serialization.InferenceResultProtos import java.io.FileInputStream class ProtobufInferenceResultDeserializier extends Logging { def getWeights(fileName: String) : Iterator[WeightInferenceResult] = { val stream = new FileInputStream(...
feiranwang/deepdive
src/main/scala/org/deepdive/inference/serialization/ProtobufInferenceResultDeserializier.scala
Scala
apache-2.0
884
/* * 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 ...
hequn8128/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/stream/sql/validation/MatchRecognizeValidationTest.scala
Scala
apache-2.0
2,586
package meritserver.http.routes import akka.http.scaladsl.model.StatusCodes._ import meritserver.models.{CreateTransaction, Transaction} import org.scalatest.Assertion import org.scalatest.exceptions.TestFailedException import spray.json.JsArray class TransactionServiceRouteTest extends ServiceTest { "The service ...
tafli/MeritServer
src/test/scala/meritserver/http/routes/TransactionServiceRouteTest.scala
Scala
mit
3,620
/* * 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-http/src/main/scala/io/gatling/http/fetch/HtmlParser.scala
Scala
apache-2.0
9,107
package org.openapitools.server.model /** * @param self for example: ''null'' * @param `class` for example: ''null'' */ final case class GithubRepositorieslinks ( self: Option[Link], `class`: Option[String] )
cliffano/swaggy-jenkins
clients/scala-akka-http-server/generated/src/main/scala/org/openapitools/server/model/GithubRepositorieslinks.scala
Scala
mit
220
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/bin/BinaryOutputEncoder.scala
Scala
apache-2.0
16,755
/* 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...
zirpins/scalding
scalding-core/src/test/scala/com/twitter/scalding/BlockJoinTest.scala
Scala
apache-2.0
3,487
package com.calclavia.graph.matrix import com.calclavia.graph.matrix.GaloisField.GF2 /** * @author Calclavia */ class AdjacencyMatrix[K](rows: Set[K], columns: Set[K]) extends SparseMatrix[K, Boolean](rows, columns)(new GF2(false)) { def this(rows: Set[K]) = this(rows, rows) def isConnected(from: K, to: K): Boo...
halvors/Graph-Plugin
src/main/scala/com/calclavia/graph/matrix/AdjacencyMatrix.scala
Scala
lgpl-3.0
1,350
/** Copyright 2014 TappingStone, 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 ...
TheDataShed/PredictionIO
data/src/main/scala/storage/BiMap.scala
Scala
apache-2.0
4,187
/* * Copyright 2019 ABSA Group Limited * * 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 agr...
AbsaOSS/spline
producer-rest-core/src/main/scala/za/co/absa/spline/producer/rest/controller/StatusController.scala
Scala
apache-2.0
2,259
package org.coursera.naptime.courier import org.junit.Test import org.scalatest.junit.AssertionsForJUnit class CourierSerializerTest extends AssertionsForJUnit { import CourierTestFixtures._ @Test def testRecordTemplates(): Unit = { val mock = CourierSerializer.read[TypedDefinitionRecord](typedDefinitionJs...
vkuo-coursera/naptime
naptime-models/src/test/scala/org/coursera/naptime/courier/CourierSerializerTest.scala
Scala
apache-2.0
891
package me.yingrui.segment.core import me.yingrui.segment.conf.SegmentConfiguration import me.yingrui.segment.dict.{DictionaryService, IWord} import me.yingrui.segment.graph._ import me.yingrui.segment.pinyin.WordToPinyinClassfierFactory class MPSegment(config: SegmentConfiguration, dictionaryService: Dictiona...
yingrui/mahjong
lib-segment/src/main/scala/me/yingrui/segment/core/MPSegment.scala
Scala
gpl-3.0
5,606
package net.tyler.sopwith object Configuration { val LOG = "Sopwith" val NO_SPLASH = false val SPLASH_SCREEN_MS = 2000 val GAME_WIDTH = 480 val GAME_HEIGHT = 320 val PLANE_WIDTH = 99 val PLANE_HEIGHT = 51 val MAX_PLANE_VELOCITY = 20f val BOMB_ACCELERATION = -9.8f val BOMB_RADIU...
DaveTCode/SopwithLibgdx
SopwithCoreProject/src/net/tyler/sopwith/Configuration.scala
Scala
mit
352
package antonkulaga.projects.switch import rx.core.{Rx, Var} trait ToggleSwitchInit { lazy val lacI_mRNA_start = Var(0.0) lazy val tetR_mRNA_start = Var(0.0) lazy val lacI_start = Var(0.0) lazy val tetR_start = Var(0.0) lazy val initialConditions = Rx{ Array(lacI_mRNA_start(), tetR_mRNA_start(), lacI_start...
antonkulaga/personal
app/shared/src/main/scala/antonkulaga/projects/switch/ToggleSwitchInit.scala
Scala
mpl-2.0
342
package app.services.cache object LDAPConnectionCache { val cache = new EhCacheProvider("ldap-connection") }
YoshinoriN/Credentiam
src/app/services/cache/LDAPConnectionCache.scala
Scala
apache-2.0
114
package org.jetbrains.plugins.scala package codeInspection package collections import com.intellij.testFramework.EditorTestUtil /** * mattfowler * 4/28/16 */ class FindAndMapToApplyTest extends OperationsOnCollectionInspectionTest { import EditorTestUtil.{SELECTION_END_TAG => END, SELECTION_START_TAG => STAR...
ilinum/intellij-scala
test/org/jetbrains/plugins/scala/codeInspection/collections/FindAndMapToApplyTest.scala
Scala
apache-2.0
1,203
/* * 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...
asorianostratio/incubator-toree
client/src/main/scala/org/apache/toree/kernel/protocol/v5/client/Utilities.scala
Scala
apache-2.0
4,563
package epic package preprocess import java.io.InputStream import java.net.URL import de.l3s.boilerpipe.extractors.ArticleExtractor import epic.slab.Slab import epic.trees.Span import org.apache.tika.Tika import org.apache.tika.io.TikaInputStream import org.apache.tika.metadata.Metadata import org.apache.tika.parser....
bitemyapp/epic
src/main/scala/epic/preprocess/TextExtractor.scala
Scala
apache-2.0
7,389
package io.bst.index import akka.actor.ActorSystem import akka.testkit.{ImplicitSender, TestKit} import com.sksamuel.elastic4s.ElasticClient import com.sksamuel.elastic4s.ElasticDsl._ import io.bst.content.ContentFixture import io.bst.ext.ElasticSearch import io.bst.model.Protocol.IndexedContent.Operation import io.bs...
bst-cave/core
src/test/scala/io/bst/index/IndexerSpec.scala
Scala
apache-2.0
2,941
package cbt import java.time._ /** * This represents a logger with namespaces that can be enabled or disabled as needed. The * namespaces are defined using {{enabledLoggers}}. Possible values are defined in the subobject * "names". * * We can replace this with something more sophisticated eventually. */ case c...
tobias-johansson/cbt
stage1/logger.scala
Scala
bsd-2-clause
1,769
package coursier.bootstrap.launcher.credentials import utest._ import scala.jdk.CollectionConverters._ import scala.compat.java8.OptionConverters._ import java.io.File object FileCredentialsParseTests extends TestSuite { val tests = Tests { test { val credFilePath = Option(getClass.getResource("/boots...
alexarchambault/coursier
modules/bootstrap-launcher/src/test/scala/coursier/bootstrap/launcher/credentials/FileCredentialsParseTests.scala
Scala
apache-2.0
1,102
/* Copyright 2012 Georgia Tech Research Institute Author: [email protected] This file is part of org.gtri.util.iteratee library. org.gtri.util.iteratee library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as publis...
gtri-iead/org.gtri.util.iteratee
impl/src/main/scala/org/gtri/util/iteratee/impl/test/TestIntBuilder.scala
Scala
gpl-3.0
1,522