code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
massie/adam
adam-core/src/test/scala/org/bdgenomics/adam/util/TwoBitFileSuite.scala
Scala
apache-2.0
2,600
/* * Copyright Β© 2015 Reactific Software LLC. All Rights Reserved. * * 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 us...
reactific/RxMongo
driver/src/test/scala/rxmongo/driver/DriverSpec.scala
Scala
mit
5,165
package org.allenai.pnp import scala.collection.JavaConverters._ import org.scalatest._ import org.scalatest.Matchers import com.jayantkrish.jklol.ccg.lambda.ExpressionParser class PnpUtilSpec extends FlatSpec with Matchers { val TOLERANCE = 0.0001 val parser = ExpressionParser.expression2 def flip(p: Doubl...
jayantk/pnp
src/test/scala/org/allenai/pnp/PnpUtilSpec.scala
Scala
apache-2.0
2,111
package scala.models import com.bryzek.apidoc.generator.v0.models.{File, InvocationForm} import com.bryzek.apidoc.spec.v0.models.Attribute import lib.Text._ import lib.generator.CodeGenerator import scala.generator.{ScalaEnums, ScalaCaseClasses, ScalaService} import scala.util.matching.Regex import generator.ServiceFi...
movio/movio-apidoc-generator
scala-generator/src/main/scala/models/Kafka10Consumer.scala
Scala
mit
8,248
package org.scalaide.core.quickassist.createmethod import org.junit.Test import org.junit.Assert._ import org.scalaide.core.internal.quickassist.createmethod.ParameterList import org.scalaide.core.internal.quickassist.createmethod.ParameterListUniquifier class ParameterListUniquifierTest { @Test def makeNamesUnique...
Kwestor/scala-ide
org.scala-ide.sdt.core.tests/src/org/scalaide/core/quickassist/createmethod/ParameterListUniquifierTest.scala
Scala
bsd-3-clause
622
package io.iteratee.testing import cats.Monad import cats.kernel.Eq import io.iteratee.{ Enumeratee, Enumerator, Iteratee } import org.scalacheck.Arbitrary import scala.Predef._ trait EqInstances { implicit def eqThrowable: Eq[Throwable] = Eq.fromUniversalEquals implicit def eqEnumerator[F[_]: Monad, A: Eq](impl...
flyingwalrusllc/iteratee
testing/shared/src/main/scala/io/iteratee/testing/EqInstances.scala
Scala
apache-2.0
1,797
/* 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...
vidyar/twitterscalding
scalding-core/src/test/scala/com/twitter/scalding/CoreTest.scala
Scala
apache-2.0
51,773
package geotrellis.vector.op.data import geotrellis.process._ import geotrellis.geometry._ import geotrellis._ import geotrellis._ /** * Split multipolygon into polygons. */ case class SplitMultiPolygon(m:Op[MultiPolygon]) extends Op1(m)({ mp => Result(mp.polygons) })
Tjoene/thesis
Case_Programs/geotrellis-0.7.0/src/main/scala/geotrellis/vector/op/data/SplitMultiPolygon.scala
Scala
gpl-2.0
275
/* * Copyright (c) 2013-2014 TelefΓ³nica InvestigaciΓ³n y Desarrollo S.A.U. * * 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 * * Unles...
telefonicaid/fiware-cosmos-platform
infinity/driver/src/test/scala/es/tid/cosmos/infinity/UserPathMapperTest.scala
Scala
apache-2.0
1,463
/* * Copyright 2009-2017. DigitalGlobe, 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 ...
ngageoint/mrgeo
mrgeo-core/src/main/scala/org/mrgeo/utils/GDALUtils.scala
Scala
apache-2.0
26,637
package org.jetbrains.plugins.scala.config.ui import com.intellij.openapi.project.Project import org.jetbrains.plugins.scala.config._ /** * Pavel.Fatin, 04.08.2010 */ object LibraryDescriptor { def compilersFor(project: Project): Array[LibraryDescriptor] = { def list(level: LibraryLevel) = Libraries.findBy(l...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/config/ui/LibraryDescriptor.scala
Scala
apache-2.0
854
package net.itsky.sortsearch.fsort object StandardMetrics { val utf16 = (x : String) => { x.length match { case 0 => 0L case 1 => (x.charAt(0) + 1L) * 65537 * 65537 * 16385 case 2 => ((x.charAt(0) + 1L) * 65537 + x.charAt(1) + 1) * 65537 * 16385 case 3 => (((x.charAt(0) + 1L) * 65537 + x...
bk1/fsort-scala
src/main/scala/net/itsky/sortsearch/fsort/StandardMetrics.scala
Scala
lgpl-2.1
2,238
package wandou.math.random import java.util.Random import java.util.concurrent.locks.ReentrantLock /** * <p>Random number generator based on the * <a href="http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html" target="_top">Mersenne * Twister</a> algorithm developed by Makoto Matsumoto and Takuji Nishimura.</p...
wandoulabs/wandou-math
wandou-math/src/main/scala/wandou/math/random/MersenneTwisterRNG.scala
Scala
apache-2.0
4,972
package xyz.hyperreal.mos6502 abstract class Know[+A] { def isEmpty: Boolean def get: A def isDefined = !isEmpty def getOrElse[B >: A]( default: => B ) = if (isEmpty) default else get def map[B]( f: A => B ) = if (isEmpty) this.asInstanceOf[Know[Nothing]] else Known( f(get) ) } case class Known[+A]( x: A ) ex...
edadma/mos6502
src/main/scala/Know.scala
Scala
isc
629
package com.typesafe.slick.testkit.tests import org.junit.Assert._ import com.typesafe.slick.testkit.util.{TestkitTest, TestDB} class PagingTest(val tdb: TestDB) extends TestkitTest { import tdb.profile.simple._ object IDs extends Table[Int]("ids") { def id = column[Int]("id", O.PrimaryKey) def * = id ...
boldradius/slick
slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/PagingTest.scala
Scala
bsd-2-clause
1,279
package org.jetbrains.plugins.scala package codeInspection package typeChecking import com.intellij.codeInsight.PsiEquivalenceUtil import com.intellij.codeInspection.{ProblemHighlightType, ProblemsHolder} import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.project.Project import com....
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/codeInspection/typeChecking/TypeCheckCanBeMatchInspection.scala
Scala
apache-2.0
15,225
/* * 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 ...
prateekm/samza
samza-kv/src/main/scala/org/apache/samza/storage/kv/KeyValueStoreMetrics.scala
Scala
apache-2.0
1,546
package com.arcusys.valamis.lesson.scorm.service.sequencing import com.arcusys.valamis.lesson.scorm.model.sequencing.{ NavigationRequestType, NavigationResponseInvalid, NavigationResponseWithoutTermination } @org.junit.runner.RunWith(classOf[org.scalatest.junit.JUnitRunner]) class StartNavigationRequestTest extends N...
ViLPy/Valamis
valamis-scorm-lesson/src/test/scala/com/arcusys/valamis/lesson/scorm/service/sequencing/StartNavigationRequestTest.scala
Scala
lgpl-3.0
685
package com.yannick_cw.elastic_indexer4s import akka.NotUsed import akka.actor.ActorSystem import akka.stream.Supervision.Decider import akka.stream.scaladsl.Source import akka.stream.{ActorMaterializer, ActorMaterializerSettings} import com.yannick_cw.elastic_indexer4s.elasticsearch.elasic_config.ElasticWriteConfig i...
yannick-cw/elastic-indexer4s
src/main/scala/com/yannick_cw/elastic_indexer4s/ElasticIndexer4s.scala
Scala
mit
2,888
/* * 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/KafkaJsonConsumerSpec.scala
Scala
apache-2.0
2,457
/* * Copyright 2008-present MongoDB, 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 ag...
rozza/mongo-scala-driver
driver/src/test/scala/org/mongodb/scala/MongoClientSpec.scala
Scala
apache-2.0
6,214
// See LICENSE for license details. package sifive.blocks.devices.gpio import freechips.rocketchip.config.Field import freechips.rocketchip.diplomacy._ import freechips.rocketchip.subsystem.BaseSubsystem case object PeripheryGPIOKey extends Field[Seq[GPIOParams]](Nil) trait HasPeripheryGPIO { this: BaseSubsystem => ...
sifive/sifive-blocks
src/main/scala/devices/gpio/GPIOPeriphery.scala
Scala
apache-2.0
924
package com.gu.mobile.notifications.football.lib import okhttp3._ import scala.concurrent.{ExecutionContext, Future} class NotificationHttpProvider(implicit ec: ExecutionContext) extends HttpProvider { val httpClient = new OkHttpClient override def post(uri: String, apiKey: String, contentType: ContentType, bo...
guardian/mobile-n10n
football/src/main/scala/com/gu/mobile/notifications/football/lib/NotificationHttpProvider.scala
Scala
apache-2.0
1,261
package skadi.container.processing import org.junit.Assert._ import org.junit.Test import skadi.beans.Bean import skadi.container.Container class EagerLoaderTest { @Test def testProcess { val beans = List( new Bean named 'abstract implementedWith classOf[AbstractBean], new Bean named 'si...
nmilinkovic/Skadi
src/test/scala/skadi/container/processing/EagerLoaderTest.scala
Scala
bsd-3-clause
1,354
package rml.args.run import java.io.File import scala.reflect.io.Path.string2path import com.typesafe.scalalogging.LazyLogging import rml.args.arg.{/ => /} import rml.args.arg.Func import rml.args.config.reader.ConfReader import rml.args.help.DefaultHelpSetup import rml.args.help.HelpFunctions import rml.args.jline....
rml/scala_args
src/main/scala/rml/args/run/DefaultSetup.scala
Scala
gpl-3.0
1,557
/******************************************************************************* Copyright (c) 2013, KAIST, S-Core. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. ***************************************************************...
daejunpark/jsaf
src/kr/ac/kaist/jsaf/analysis/typing/models/DOMHtml5/History.scala
Scala
bsd-3-clause
3,669
// filter: (\\s*)at(.*) import scala.tools.partest._ object Test extends DirectTest { override def extraSettings: String = "-usejavacp -Vdebug-type-error" def code: String = "" def noSuchType: String = """ object Example { val a: org.dummy.Dummy = ??? } """ def show(): Unit = { val global = newComp...
scala/scala
test/files/run/debug-type-error.scala
Scala
apache-2.0
427
package provingground.fol /** Logical terms */ trait Term extends Expression { /** Formula giving equality */ def eqls(that: Term) = Eq(this, that) /** TermListitutes variables by terms*/ def subs(xt: Var => Term): Term /** Single variable substituted by a term */ def subs(x: Var, t: Term): Term = { ...
siddhartha-gadgil/ProvingGround
fol/src/main/scala/provingground/fol/Term.scala
Scala
mit
3,220
package colossus.testkit import java.awt.datatransfer.UnsupportedFlavorException import colossus.service.{UnmappedCallback, Callback} import scala.concurrent.duration._ import scala.util.Try class CallbackMatchersSpec extends ColossusSpec { import CallbackMatchers._ val duration = 1.second implicit val cbe...
tumblr/colossus
colossus-testkit/src/test/scala/colossus.testkit/CallbackMatchersSpec.scala
Scala
apache-2.0
3,876
/* * The MIT License (MIT) * * Copyright (c) 2017 Ángel Cervera Claudio * * 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 ...
angelcervera/pbf4scala
core/src/test/scala/com/acervera/osm4scala/BlobTupleIteratorSpec.scala
Scala
mit
2,240
/* * 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/main/scala/org/apache/flink/table/plan/rules/datastream/DataStreamGroupAggregateRule.scala
Scala
apache-2.0
2,799
import java.time.LocalDateTime import java.time.format.DateTimeFormatter import com.spotify.docker.client.DefaultDockerClient import sbt.Keys._ import sbt.Tests.Group import sbt._ import scala.util.control.NonFatal // Separate projects for integration tests because of IDEA: https://youtrack.jetbrains.com/issue/SCL-1...
wavesplatform/Waves
project/IntegrationTestsPlugin.scala
Scala
mit
3,775
package com.twitter.finagle.redis import com.twitter.finagle.{Service, ClientConnection, ServiceFactory, ServiceProxy} import com.twitter.finagle.redis.exp.{RedisPool, SubscribeCommands} import com.twitter.finagle.redis.protocol._ import com.twitter.finagle.util.DefaultTimer import com.twitter.io.Buf import com.twitte...
koshelev/finagle
finagle-redis/src/main/scala/com/twitter/finagle/redis/Client.scala
Scala
apache-2.0
6,338
package com.wordtrellis.scala import scala.collection.immutable.List import scala.collection.mutable import scala.collection.mutable.ListBuffer import scala.math.Ordered /** * * * @author Todd Cook * */ class KeyCount[T](val key: T, val count: Int) extends Ordered[KeyCount[T]] { // Note: compare, equals a...
todd-cook/Frequency-Analyzer
src/main/scala/com/wordtrellis/scala/FrequencyMap.scala
Scala
mit
3,945
package com.mwronski.pathdependenttypes /** * Movie * @param name name of the movie */ class Movie(name: String) { /** * Character that belongs to chosen movie * @param name character name */ case class Character(name: String) /** * Create team from characters * @param character1 some...
m-wrona/scala-samples
src/main/scala/com/mwronski/pathdependenttypes/Movie.scala
Scala
mit
515
import collection.mutable.HashMap trait CoderTrait { val words: List[String] (2 -> "ABC", new ArrowAssoc('3') -> "DEF") private val mnemonics = Map( '2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL", '6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ") ('1', "1") match { case (d...
yusuke2255/dotty
tests/pos/CoderTrait.scala
Scala
bsd-3-clause
1,867
package chee import chee.conf.CheeConf class LoggingProperty extends ch.qos.logback.core.PropertyDefinerBase { private val config = CheeConf.defaultConfig @scala.beans.BeanProperty var name: String = "" def getPropertyValue(): String = name match { case "logfile" => config.getString("chee.logFile") ...
eikek/chee
src/main/scala/chee/LoggingProperty.scala
Scala
gpl-3.0
397
/** * Copyright 2015 Thomson Reuters * * 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 ag...
hochgi/CM-Well
server/cmwell-controller/src/main/scala/cmwell/ctrl/service/ClusterServiceActor.scala
Scala
apache-2.0
1,145
/* * 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 ...
jackylk/incubator-carbondata
integration/spark/src/main/scala/org/apache/spark/sql/optimizer/CarbonIUDRule.scala
Scala
apache-2.0
3,063
/* * 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
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/DriverCommandFeatureStep.scala
Scala
apache-2.0
5,353
/* * 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 ...
Xpray/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/calls/ScalarOperators.scala
Scala
apache-2.0
38,397
package com.softwaremill.codebrag.auth import org.scalatra.ScalatraBase import org.scalatra.auth.ScentryStrategy import com.softwaremill.codebrag.service.user.Authenticator import javax.servlet.http.{HttpServletResponse, HttpServletRequest} import com.softwaremill.codebrag.domain.User class UserPasswordStrategy(prote...
softwaremill/codebrag
codebrag-rest/src/main/scala/com/softwaremill/codebrag/auth/UserPasswordStrategy.scala
Scala
agpl-3.0
820
/* * 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 ...
joroKr21/incubator-zeppelin
flink/interpreter/src/test/scala/org/apache/zeppelin/flink/FlinkScalaInterpreterTest.scala
Scala
apache-2.0
1,688
package chat.client.gui import java.awt._ import java.awt.event.{ActionEvent, ActionListener} import javax.swing._ import javax.swing.border.LineBorder import library.services.LibraryException class LoginDialog(var ctrl: TerminalController) extends JDialog { private var tfUsername: JTextField = null private...
leyyin/university
systems-for-design-and-implementation/labs/lab3/LibraryClient/src/chat/client/gui/LoginDialog.scala
Scala
mit
2,723
package org.aja.dhira.nnql /** * Created by mageswaran on 29/5/16. */ class PrettyPrinter { def apply(expr: Expression): String = expr match { case CREATE(arg, body) => p"CREATE $arg $body" case Number(i) => i.toString case FunctionApply(fun, arg) => p"$fun $arg" case Variable(name, scope)...
Mageswaran1989/aja
src/main/scala/org/aja/dhira/src/main/scala/org/dhira/core/nnql/PrettyPrinter.scala
Scala
apache-2.0
605
/* * 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 not u...
tromika/sparkling-water
core/src/main/scala/org/apache/spark/repl/InterpreterUtils.scala
Scala
apache-2.0
3,244
import controllers.WebpackController import org.scalatestplus.play._ import org.scalatestplus.play.guice.GuiceOneAppPerTest import play.api.test.Helpers._ import play.api.test._ class ControllerSpec extends PlaySpec with GuiceOneAppPerTest { "WebpackController GET" should { "render a javascript method" in { ...
BowlingX/play-webpack
src/play-module/src/test/scala/ControllerSpec.scala
Scala
mit
844
/* * Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com> */ package play.libs import java.io.File import org.specs2.mutable.Specification import org.xml.sax.SAXException class XMLSpec extends Specification { "The Java XML support" should { def parse(xml: String) = { XML.fromString(xml...
Shenker93/playframework
framework/src/play/src/test/scala/play/libs/XMLSpec.scala
Scala
apache-2.0
3,353
package io.skysail.server.website.html import play.twirl.api.Html import html.main import io.skysail.server.RepresentationModel object PostBookmarkResource_Get extends _root_.play.twirl.api.BaseScalaTemplate[play.twirl.api.HtmlFormat.Appendable,_root_.play.twirl.api.Format[play.twirl.api.HtmlFormat.Appendable]](play...
evandor/skysail-server
skysail.server.website/src/io/skysail/server/website/html/PostBookmarkResource_Get.template.scala
Scala
apache-2.0
2,655
package scodec package codecs import scalaz.\/ import scalaz.syntax.std.option._ import org.scalacheck.Gen import scodec.bits.BitVector class ShortCodecTest extends CodecSuite { def check(low: Short, high: Short)(f: (Short) => Unit) { forAll(Gen.choose(low, high)) { n => whenever(n >= low) { f(n) } } ...
danielwegener/scodec
src/test/scala/scodec/codecs/ShortCodecTest.scala
Scala
bsd-3-clause
2,054
package rwsscala.ichiba import rwsscala.util._ import scalaz._, Scalaz._ sealed trait MaxPrice extends Parameter object MaxPrice { private case class On(value: Long) extends MaxPrice { def param = Seq("maxPrice" -> value.toString) } case object Off extends MaxPrice { def param = Seq() } def ap...
nisshiee/rws-scala
core/src/main/scala/core/ichiba/request/MaxPrice.scala
Scala
mit
889
/* __ *\ ** ________ ___ / / ___ __ ____ Scala.js API ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013-2015, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ |/_// /_\ \ http://scala-lang.org/ ** ** /____/\___/_/ |_/...
CapeSepias/scala-js
library/src/main/scala/scala/scalajs/js/typedarray/TypedArrayBufferOps.scala
Scala
bsd-3-clause
4,328
package com.stomp import java.net.Socket /** * Created by vmp on 8/8/14. */ object STOMPServer { val serverSocket = new Socket() }
vitormp/stomps
src/main/scala/com/stomp/STOMPServer.scala
Scala
lgpl-3.0
139
/* * 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 ...
mrchristine/spark-examples-dbc
src/main/scala/org/apache/spark/examples/SparkTC.scala
Scala
apache-2.0
2,550
import org.scalatra.LifeCycle import javax.servlet.ServletContext import com.quinsoft.northwind._ class ScalatraBootstrap extends LifeCycle { override def init(context: ServletContext) { context mount (new NorthwindScalatra, "/*") } }
DeegC/Zeidon-Northwind
scalatra/src/main/scala/ScalatraBootstrap.scala
Scala
apache-2.0
246
package chat.tox.antox.tox import java.io._ import java.util import java.util.Collections import android.content.{Context, SharedPreferences} import android.net.ConnectivityManager import android.preference.PreferenceManager import chat.tox.antox.data.{AntoxDB, State} import chat.tox.antox.utils._ import chat.tox.ant...
subliun/Antox
app/src/main/scala/chat/tox/antox/tox/ToxSingleton.scala
Scala
gpl-3.0
7,363
package one.lockstep.vault import one.lockstep.lock.MultilockIntegrationFixtures class MultilockVaultSpec extends AbstractVaultSpec with MultilockIntegrationFixtures { override lazy val lockManagerFixtureProvider = MultilockManagerIntegFixture.provider }
lockstep-one/vault
vault-test/src/test/scala/one/lockstep/vault/MultilockVaultSpec.scala
Scala
agpl-3.0
259
package logs opaque type Logarithm = Double object Logarithm { // These are the ways to lift to the logarithm type def apply(d: Double): Logarithm = math.log(d) def safe(d: Double): Option[Logarithm] = if (d > 0.0) Some(math.log(d)) else None // This is the first way to unlift the logarithm type def ...
dotty-staging/dotty
tests/pos/toplevel-opaque-xm/Logarithm_1.scala
Scala
apache-2.0
677
package web import akka.io.IO import api.Api import spray.can.Http //trait RestWebServer extends CoreActors with Core with Api { // this: Api with CoreActors with Core => trait RestWebServer { this: Api => IO(Http)(system) ! Http.Bind(rootService, "0.0.0.0", port = 8080) }
mmilewski/14-marbles-game-scala
src/main/scala/web/RestWebServer.scala
Scala
apache-2.0
283
package pl.newicom.dddd.messaging.event import org.joda.time.DateTime case class EventMessageEntry(msg: OfficeEventMessage, position: Long, created: Option[DateTime])
pawelkaczor/akka-ddd
akka-ddd-messaging/src/main/scala/pl/newicom/dddd/messaging/event/EventMessageEntry.scala
Scala
mit
169
import org.scalatest._ /** * Contains tests the graph-based functionality of the engine behind the * language. */ class GraphTest {//extends FlatSpec with Matchers { /** * Tests the blocking a lane belonging to a street with a given name. */ // def blockLane(): Unit = { // } }
dannydes/FYP
src/test/GraphTest.scala
Scala
gpl-2.0
295
val a: (1, 2, 3) = (1, 2, 3) val b: (4, 5, 6) = (4, 5, 6) val c: (7, 8) = (7, 8) val d: Unit = () // Zip val r1: ((1, 4), (2, 5), (3, 6)) = a.zip(b) val r2: ((1, 7), (2, 8)) = a.zip(c) val r3: ((7, 1), (8, 2)) = c.zip(a) val r4: Unit = d.zip(a) val r5: Unit = a.zip(d) // Map case class Foo[X](x: X) val r6: (Int, Int...
som-snytt/dotty
tests/run/tuple-ops.scala
Scala
apache-2.0
799
/* * 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 ...
shaoxuan-wang/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/plan/batch/sql/agg/SortAggregateTest.scala
Scala
apache-2.0
1,912
/* * * 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 * distri...
flaminem/flamy
src/main/scala/com/flaminem/flamy/parsing/hive/PopulateParser.scala
Scala
apache-2.0
951
// Databricks notebook source // MAGIC %md // MAGIC ScaDaMaLe Course [site](https://lamastex.github.io/scalable-data-science/sds/3/x/) and [book](https://lamastex.github.io/ScaDaMaLe/index.html) // COMMAND ---------- // MAGIC %md // MAGIC #Signed Triads in Social Media // COMMAND ---------- // MAGIC %md // MAGIC By...
lamastex/scalable-data-science
dbcArchives/2021/000_0-sds-3-x-projects/student-project-03_group-GuangyiZhang/01_triads.scala
Scala
unlicense
7,811
package unfiltered.spec import dispatch.classic._ import org.apache.http.client.HttpClient import java.security.KeyStore import java.io.FileInputStream import org.apache.http.conn.ssl.SSLSocketFactory import org.apache.http.conn.scheme.Scheme /** Provides an Http client configured to handle ssl certs */ trait Secure...
beni55/unfiltered
specs2/src/main/scala/SecureClient.scala
Scala
mit
1,500
package io.vamp.common.notification import akka.actor.{AbstractLoggingActor, Actor, Props} object LoggingNotificationActor { def props: Props = Props[LoggingNotificationActor] } case class Error(notification: Notification, message: String) case class Info(notification: Notification, message: String) trait Notifi...
BanzaiMan/vamp-common
src/main/scala/io/vamp/common/notification/NotificationActor.scala
Scala
apache-2.0
939
/* ************************************************************************************* * 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/bootstrap/liftweb/checks/CheckInitUserTemplateLibrary.scala
Scala
agpl-3.0
7,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 ...
Panos-Bletsos/spark-cost-model-optimizer
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQueryFileTest.scala
Scala
apache-2.0
2,974
package geotrellis.transit import com.vividsolutions.jts.index.strtree.{STRtree, ItemDistance, ItemBoundable} import com.vividsolutions.jts.index.strtree.ItemDistance import com.vividsolutions.jts.geom.Coordinate import com.vividsolutions.jts.geom.Envelope import scala.collection.mutable import scala.collection.JavaC...
WorldBank-Transport/open-transit-indicators
scala/geotrellis-transit/src/main/scala/geotrellis/transit/SpatialIndex.scala
Scala
gpl-3.0
3,251
package threesbrain.game.core object Move extends Enumeration { type Move = Value val Up, Down, Left, Right = Value }
zommerfelds/threes-brain
src/main/scala/threesbrain/game/core/Move.scala
Scala
mit
127
package org.jetbrains.plugins.scala package codeInsight package intention package types import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction import com.intellij.openapi.command.undo.UndoUtil import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.psi...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/codeInsight/intention/types/ConvertFromInfixIntention.scala
Scala
apache-2.0
1,700
/* * 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 ...
GJL/flink
flink-scala-shell/src/test/scala/org/apache/flink/api/scala/jar/package.scala
Scala
apache-2.0
961
package scala.meta package ui import org.scalameta.adt._ import org.scalameta.show._ import org.scalameta.invariants._ import org.scalameta.unreachable import Show.{ sequence => s, repeat => r, indent => i, newline => n } import scala.{Seq => _} import scala.collection.immutable.Seq import scala.meta.internal.ast._ im...
mdemarne/scalameta
scalameta/src/main/scala/scala/meta/ui/ShowSemantics.scala
Scala
bsd-3-clause
7,165
package sangria.schema import language.existentials import sangria.ast.Document import sangria.schema.SchemaChange._ import sangria.macros._ import scala.reflect.ClassTag import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec class SchemaComparatorSpec extends AnyWordSpec with Match...
sangria-graphql/sangria
modules/core/src/test/scala/sangria/schema/SchemaComparatorSpec.scala
Scala
apache-2.0
22,465
package stormlantern.consul.client import akka.actor.{ ActorRef, ActorSystem } import akka.actor.Status.Failure import akka.testkit.{ ImplicitSender, TestKit } import org.scalamock.scalatest.MockFactory import org.scalatest.concurrent.ScalaFutures import org.scalatest.{ BeforeAndAfterAll, FlatSpecLike, Matchers } impo...
dlouwers/reactive-consul
client/src/test/scala/stormlantern/consul/client/ServiceBrokerSpec.scala
Scala
mit
3,056
/*********************************************************************** * Copyright (c) 2013-2018 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...
boundlessgeo/geomesa
geomesa-index-api/src/test/scala/org/locationtech/geomesa/index/TestGeoMesaDataStore.scala
Scala
apache-2.0
11,835
/* * 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-http/src/main/scala/io/gatling/http/check/body/HttpBodyJsonPathCheckMaterializer.scala
Scala
apache-2.0
1,385
/* * 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 ...
akopich/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryRelation.scala
Scala
apache-2.0
5,874
package play.modules.rediscala import play.api._ import java.net.URI import scala.Some import redis.RedisClient import akka.actor.ActorSystem class RedisPlugin(app: Application) extends Plugin { lazy val confs:Map[String, (String, Int, Option[(String, String)])] = app.configuration.getConfig("redis").fold(Map(...
njin-fr/play2-rediscala
src/main/scala/play/modules/rediscala/RedisPlugin.scala
Scala
apache-2.0
2,666
/** * 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...
brunobuzzi/orbeon-forms
xforms/jvm/src/test/scala/org/orbeon/oxf/test/XFormsSupport.scala
Scala
lgpl-2.1
7,742
package uk.gov.gds.ier.test import uk.gov.gds.ier.guice.WithRemoteAssets import uk.gov.gds.ier.assets.RemoteAssets import org.scalatest.mock.MockitoSugar trait WithMockRemoteAssets extends WithRemoteAssets { private val mockito = new MockitoSugar {} val remoteAssets = mockito.mock[RemoteAssets] }
michaeldfallen/ier-frontend
test/uk/gov/gds/ier/test/WithMockRemoteAssets.scala
Scala
mit
311
package dotty.tools.scripting import scala.language.unsafeNulls import java.nio.file.{ Files, Paths, Path } import dotty.tools.dotc.Driver import dotty.tools.dotc.core.Contexts, Contexts.{ Context, ctx } import dotty.tools.io.{ PlainDirectory, Directory, ClassPath } import Util.* class StringDriver(compilerArgs: Ar...
lampepfl/dotty
compiler/src/dotty/tools/scripting/StringDriver.scala
Scala
apache-2.0
1,829
/* * ****************************************************************************** * * Copyright (C) 2013 Christopher Harris (Itszuvalex) * * Itszuvalex@gmail.com * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * * as p...
Itszuvalex/Femtocraft-alpha-1
src/main/java/com/itszuvalex/femtocraft/power/fluids/FluidCooledMoltenSalt.scala
Scala
gpl-2.0
1,797
// /scala/trac/5452/a.scala // Mon Feb 13 22:52:36 PST 2012 // import scala.reflect.runtime.universe._ trait Tree object Bip { def ??? = sys.error("") } import Bip._ case class Queryable[T]() { def treeFilter( t:Tree ) : Queryable[T] = ??? } object Queryable { def apply[T:Manifest] = ??? def apply[T:Manife...
yusuke2255/dotty
tests/untried/neg/t5452-old.scala
Scala
bsd-3-clause
499
package com.workshop // Let's do a recursive solution // Use match on the `n` // You can use `|` to match on multiple constants // you can use guard `case x if ... =>` class Fibonacci { def nth(n: Int): Int = ??? }
maximn/scala-workshop
src/main/scala/com/workshop/Fibonacci.scala
Scala
mit
218
/** * Licensed to the Minutemen Group under one or more contributor license * agreements. See the COPYRIGHT 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 complian...
datalek/silhouette
silhouette/src/main/scala/silhouette/exceptions/ConfigurationException.scala
Scala
apache-2.0
1,059
package com.learning.akka.actors import akka.actor.{Props, ActorSystem, Actor} /** * Created by lgrcyanny on 15/12/22. */ class BecomeActor extends Actor { def happy: Receive = { case "foo" => println("I am happy with foo") case "bar" => println("I am happy with bar") } def receive: Receive = { ca...
lgrcyanny/LearningAkka
src/main/scala/com/learning/akka/actors/BecomeActor.scala
Scala
gpl-2.0
641
/* * Copyright 2015 LG CNS. * * 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...
jhshin9/scouter
scouter.server/src/scouter/server/netio/service/net/TcpAgentManager.scala
Scala
apache-2.0
2,783
package org.faker /** * Generates Names of fake football [baseball, hockey, ...] teams. * * {{{ * scala> Faker.Team.name * res38: String = Nevada Warlocks * }}} */ object Team extends Base { def name(implicit locale: FakerLocale = FakerLocale.default): String = parse("team.name").titlelize }
ralli/faker_scala
src/main/scala/org/faker/Team.scala
Scala
bsd-3-clause
303
/* * Copyright 2015 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
benaveryee/play-ui
src/main/twirl/uk/gov/hmrc/play/views/formatting/Dates.scala
Scala
apache-2.0
2,153
package geotrellis.network.graph import geotrellis.network._ import geotrellis.network.graph._ import scala.collection.mutable import spire.syntax.cfor._ object EdgeSet { def apply(vertex:Vertex) = new EdgeSet(vertex) } class EdgeSet(val vertex:Vertex) extends Iterable[Edge] { val edgesToTargets = mutable.Map[...
flibbertigibbet/open-transit-indicators
scala/geotrellis-transit/src/main/scala/geotrellis/network/graph/EdgeSet.scala
Scala
gpl-3.0
931
/* If a function body consists solely of a match expression, we'll often put the match on the same line as the function signature, rather than introducing another level of nesting. */ def setHead[A](l: List[A], h: A): List[A] = l match { case Nil => sys.error("setHead on empty list") case Cons(_,t) => Cons(h,t) }
mebubo/fpinscala
answerkey/datastructures/03.answer.scala
Scala
mit
319
/* * Copyright (c) 2013 Bridgewater Associates, LP * * Distributed under the terms of the Modified BSD License. The full license is in * the file COPYING, distributed as part of this software. */ package notebook.kernel //import org.clapper.util.classutil.ClassUtil import notebook.util.StringCompletor object ...
bigdatagenomics/mango-notebook
modules/kernel/src/main/scala/notebook/kernel/StringCompletorResolver.scala
Scala
apache-2.0
601
/* * SPDX-License-Identifier: Apache-2.0 * Copyright 2016-2020 Daniel Urban and contributors listed in NOTICE.txt * * 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.ap...
durban/exp-reagents
stress/src/test/scala/dev/tauri/choam/kcas/IBRStackFastTest.scala
Scala
apache-2.0
1,756
/* * 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
tests/src/test/scala/org/apache/openwhisk/core/entity/test/SchemaTests.scala
Scala
apache-2.0
34,438
package org.codeswarm /** @see [[PolyMap]] * @see [[PolyMap.Index]] */ package object polymap
chris-martin/polymap
src/main/scala/package.scala
Scala
apache-2.0
98
/* * 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 ...
lincoln-lil/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamPhysicalLookupJoin.scala
Scala
apache-2.0
3,270
/* * Copyright 2014-2022 Netflix, 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 agr...
Netflix/atlas
atlas-core/src/main/scala/com/netflix/atlas/core/model/StyleVocabulary.scala
Scala
apache-2.0
18,115
package net.koofr.driveby.resources case class DirRename(name: String) object DirRename { import spray.json.DefaultJsonProtocol._ implicit val format = jsonFormat1(DirRename.apply) }
koofr/driveby
src/main/scala/net/koofr/driveby/resources/DirRename.scala
Scala
mit
192