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 provingground.library import provingground._ import HoTT._, scalahott._ import NatRing.{NatTyp => Nt, _} import spire.implicits._ object SimpleEvensSym { val n = Nt.sym val isEven = "isEven" :: Nt ->: Type val zeroEven = "0even" :: isEven(Literal(0)) val plusTwoEven = "_+2even" :: (n ~>:...
siddhartha-gadgil/ProvingGround
core/src/main/scala/provingground/library/ExampleTheoremsSymbolic.scala
Scala
mit
3,369
object B { import ATest.* def foo: A = new A(1) }
dotty-staging/dotty
tests/pos/i1137-2/B_2.scala
Scala
apache-2.0
54
package de.kasoki.swtrealtime import scala.collection.immutable.SortedSet object BusStop extends Enumeration { type BusStop = BusStopType case class BusStopType(val code:String, val name:String) extends Val(code) def getBusStopByCode(code:String):BusStopType = { return BusStop.withName(code).asI...
kasoki/swt-realtime
src/main/scala/de/kasoki/swtrealtime/BusStop.scala
Scala
mit
24,940
package infra.piece.core import scala.concurrent.{Future, ExecutionContext} import java.io.InputStream import play.api.mvc.{SimpleResult, Result} /** * @author alari (name.alari@gmail.com) * @since 07.05.14 13:47 */ trait FileStorage { def store(file: Pieces.File, userId: String)(implicit ec: ExecutionContext): ...
alari/play-content
module-code/app/infra/piece/core/FileStorage.scala
Scala
mit
597
/* * Copyright 2001-2012 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...
hubertp/scalatest
src/main/scala/org/scalatest/Args.scala
Scala
apache-2.0
4,786
package libjoe.roshi import com.redis.RedisClient case class RedisServerAddress(host: String, port: Int) object RedisServerAddress { implicit def redisServerToClient(rs: RedisServerAddress): RedisClient = new RedisClient(rs.host, rs.port) }
joekearney/roshi-scala
src/main/scala/libjoe/roshi/RedisServerAddress.scala
Scala
apache-2.0
245
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2010, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
cran/rkafkajars
java/scala/concurrent/pilib.scala
Scala
apache-2.0
5,955
/* * Copyright 2015 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 agreed t...
jasimmk/atlas
atlas-core/src/main/scala/com/netflix/atlas/core/db/AggregateCollector.scala
Scala
apache-2.0
8,271
package firesoft.util object Timer extends App{ def timePrint[R](f: => R): Unit = { println(timeString(f)) } def time[R](f: => R): Long = { val t0 = System.nanoTime() val r = f val t1 = System.nanoTime() val time = (t1-t0) /1000 time } def timeString[R](f: => R): String = { v...
firephil/scala-math-problems
src/firesoft/util/Timer.scala
Scala
mit
968
import scala.collection.mutable.PriorityQueue import org.scalacheck._ import Prop._ import Arbitrary._ object Test extends Properties("PriorityQueue") { type E = Int // the element type used for most/all of the tests def checkInvariant[A](pq: PriorityQueue[A])(implicit ord: Ordering[A]): Boolean = { // The or...
felixmulder/scala
test/files/scalacheck/MutablePriorityQueue.scala
Scala
bsd-3-clause
3,196
package s99 import org.scalatest.{FunSpec, Matchers} class P07Spec extends FunSpec with Matchers { describe("flatten(List)") { it("(**) Flatten a nested list structure.") { P07.flatten(List(List(1, 1), 2, List(3, List(5, 8)))) should equal (List(1, 1, 2, 3, 5, 8)) P07.flatten(List.empty) should equ...
qilab-/algorithm-problems
s-99/src/test/scala/s99/P07Spec.scala
Scala
unlicense
597
/*********************************************************************** * Copyright (c) 2013-2015 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 is ...
vpipkt/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/index/StrategyHints.scala
Scala
apache-2.0
1,736
package coursier.test import utest.runner.Framework class CustomFramework extends Framework { override def setup(): Unit = coursier.cache.CacheUrl.setupProxyAuth(Map( ("http", "localhost", "9083") -> ("jack", "insecure"), ("http", "localhost", "9084") -> ("wrong", "nope") )) }
alexarchambault/coursier
modules/proxy-tests/src/it/scala/coursier/test/CustomFramework.scala
Scala
apache-2.0
304
package org.backuity.clist.parse import org.backuity.clist._ import org.junit.Test class ArgumentTest extends ClistTestBase { import ArgumentTest._ @Test def parseNamedArg(): Unit = { Cli.parse(Array("--the-target=stuff")).throwExceptionOnError().withCommand(new Run) { run => run.target must_== "stu...
backuity/clist
tests/src/test/scala/org/backuity/clist/parse/ArgumentTest.scala
Scala
apache-2.0
1,491
package com.twitter.searchbird import com.twitter.finagle.Service import com.twitter.finagle.http.path._ import com.twitter.finagle.http.service.RoutingService import com.twitter.finagle.http.{Request, Response} import com.twitter.searchbird.thrift.{SearchbirdException, SearchbirdService} import com.twitter.server.uti...
maufee/Searchbird
src/main/scala/com/twitter/searchbird/RestfulService.scala
Scala
apache-2.0
3,115
package drawables.objects import drawables.Drawable import java.awt.Graphics2D class Cursor extends Drawable { def draw(g: Graphics2D): Unit = { //TODO } }
jamesmuerle/Bones
src/drawables/objects/Cursor.scala
Scala
mit
165
package com.twitter.gizzard.thrift.conversions import scala.collection.{JavaConversions => JC} import java.nio.{BufferUnderflowException, ByteBuffer, ByteOrder} import java.util.{AbstractList => JAbstractList, List => JList} import com.twitter.gizzard.util.{Future, ParallelSeq} object Sequences { class RichSeq[A <...
kangkot/gizzard
src/main/scala/com/twitter/gizzard/thrift/conversions/Sequences.scala
Scala
apache-2.0
3,066
package pt.tecnico.dsi.akkastrator import scala.concurrent.duration.{Duration, DurationInt} import scala.util.Random import akka.actor.{Actor, ActorRef, Props} import akka.testkit.TestActor.AutoPilot import akka.testkit.TestProbe import pt.tecnico.dsi.akkastrator.ActorSysSpec._ import pt.tecnico.dsi.akkastrator.DSL.{F...
ist-dsi/akkastrator
src/test/scala/pt/tecnico/dsi/akkastrator/Step6_TaskBundleSpec.scala
Scala
mit
17,374
/* * The MIT License (MIT) * * Copyright (c) 2016 Algolia * http://www.algolia.com/ * * 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...
algolia/algoliasearch-client-scala
src/main/scala/algolia/definitions/MCMDefinition.scala
Scala
mit
7,868
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
travisbrown/scalatest
src/test/scala/org/scalatest/fixture/TestDataFixtureSpec.scala
Scala
apache-2.0
1,357
package com.bdir.back.app.routes import com.bdir.back.app.{BdirServlet, Readiness} import org.scalatra.ScalatraServlet trait RouteServlets { def routes: List[(String, ScalatraServlet)] = { List( "/" -> new BdirServlet, "/_health/liveness" -> new Readiness ) } }
ervitis/bdir-back
src/main/scala/com/bdir/back/app/routes/RouteServlets.scala
Scala
mit
288
package com.sksamuel.avro4s.json import java.util import org.apache.avro.Schema import org.codehaus.jackson.node.TextNode /** * Accepts a json string, and returns an Avro Schema that best matches the json string. * * Converts: * * - json arrays to avro arrays * - objects to records * - doubles to doubl...
YuvalItzchakov/avro4s
avro4s-json/src/main/scala/com/sksamuel/avro4s/json/JsonToAvroConverter.scala
Scala
mit
2,696
/* * Copyright (C) 2005, The OpenURP Software. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
openurp/api
std/src/main/scala/org/openurp/std/register/model/mapping.scala
Scala
lgpl-3.0
1,016
package com.sjsu.bikeshare.web; import com.sjsu.bikeshare.domain._ import com.sjsu.bikeshare.service._ import org.springframework.web.bind.annotation.PathVariable import org.springframework.web.bind.annotation.RequestMapping import org.springframework.stereotype.Controller import org.springframework.http.{ ResponseEn...
komaldedhia/cmpe-273-project
src/main/scala/com/sjsu/bikeshare/web/UserController.scala
Scala
mit
5,491
/** * 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"); yo...
TiVo/kafka
core/src/test/scala/integration/kafka/api/DelegationTokenEndToEndAuthorizationTest.scala
Scala
apache-2.0
6,161
package org.jetbrains.sbt package codeInspection import com.intellij.codeInspection.{ProblemHighlightType, ProblemsHolder} import com.intellij.openapi.project.Project import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.codeInspection.{AbstractFixOnPsiElement, AbstractInspection} import org.jetbrains....
triggerNZ/intellij-scala
src/org/jetbrains/sbt/codeInspection/SbtReplaceProjectWithProjectInInspection.scala
Scala
apache-2.0
2,609
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v3/B150.scala
Scala
apache-2.0
1,065
package example trait Show[-A]: extension (a: A) def show: String given (using rec: Show[String]): Show[String] = ??? // must be Show[String] as the argument given (using rec: => Show[String]): Show[Option[String]] = ??? // must be byname argument def test = Option("").show
dotty-staging/dotty
tests/pos/i8182.scala
Scala
apache-2.0
281
/* * 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 ...
JerryLead/spark
core/src/test/scala/org/apache/spark/SparkContextSuite.scala
Scala
apache-2.0
23,277
// Copyright (c) 2017 Philipp Meyerhoefer // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, pu...
barkhorn/mrmocks
src/test/scala/uk/co/faydark/mrmocks/ReduceDriverTest.scala
Scala
mit
2,305
package com.ubeeko.htalk.criteria import com.ubeeko.htalk.bytesconv._ import com.ubeeko.htalk.hbase.{HTalkContext, TestHBaseManager} import com.ubeeko.htalk.tests.TestCommons import org.apache.hadoop.hbase.filter.ColumnPrefixFilter import org.specs2.mutable.Specification class ResultSpec extends Specification { val...
eric-leblouch/htalk
src/test/scala/com/ubeeko/htalk/criteria/ResultSpec.scala
Scala
apache-2.0
1,618
package com.sksamuel.scapegoat.inspections.unneccesary import scala.reflect.internal.Flags import com.sksamuel.scapegoat._ /** * @author * Stephen Samuel */ class UnusedMethodParameter extends Inspection( text = "Unused parameter", defaultLevel = Levels.Warning, description = "Checks for u...
sksamuel/scapegoat
src/main/scala/com/sksamuel/scapegoat/inspections/unneccesary/UnusedMethodParameter.scala
Scala
apache-2.0
5,339
package io.youi.style object HTMLBorderStyle extends Stringify[HTMLBorderStyle] { case object None extends HTMLBorderStyle("none") case object Hidden extends HTMLBorderStyle("hidden") case object Dotted extends HTMLBorderStyle("dotted") case object Dashed extends HTMLBorderStyle("dashed") case object Solid e...
outr/youi
ui/js/src/main/scala/io/youi/style/HTMLBorderStyle.scala
Scala
mit
996
package cromwell.engine.db.slick import java.sql.Clob import cromwell.engine.ExecutionIndex import cromwell.engine.ExecutionIndex._ case class Symbol ( workflowExecutionId: Int, scope: String, name: String, index: Int, // https://bugs.mysql.com/bug.php?id=8173 io: String, reportableResult: Boolean, wdl...
dgtester/cromwell
src/main/scala/cromwell/engine/db/slick/SymbolComponent.scala
Scala
bsd-3-clause
4,305
/* * 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...
lresende/incubator-toree
kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/handler/ShutdownHandler.scala
Scala
apache-2.0
2,584
/* * Copyright 2014–2018 SlamData 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...
slamdata/slamengine
core/src/test/scala/quasar/compile/VariableSubstitutionSpec.scala
Scala
apache-2.0
1,805
/* * 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 ...
houshengbo/openwhisk
common/scala/src/main/scala/org/apache/openwhisk/core/yarn/YARNContainerFactory.scala
Scala
apache-2.0
9,263
object Test { abstract class Number case class MyInt(n: Int) extends Number case class MyDouble(d: Double) extends Number trait Term[a] case class Cell[a](var x: a) extends Term[a] final case class NumTerm(val n: Number) extends Term[Number] def f[a](t: Term[a], c: Cell[a]) { t match { case N...
loskutov/intellij-scala
testdata/scalacTests/failed/gadts2.scala
Scala
apache-2.0
580
package a4.shard.routing import java.lang.Exception class RoutingException extends Exception class RequestParsingException extends RoutingException class UnknownMethodException(val method: String) extends RequestParsingException class UnknownRouteException extends RoutingException
aggregat4/shard
src/main/scala/a4/shard/routing/RoutingException.scala
Scala
apache-2.0
296
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
maropu/spark
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingJoinSuite.scala
Scala
apache-2.0
60,323
package io.getquill import com.github.mauricio.async.db.{ QueryResult => DBQueryResult } import com.github.mauricio.async.db.pool.PartitionedConnectionPool import com.github.mauricio.async.db.postgresql.PostgreSQLConnection import com.typesafe.config.Config import io.getquill.context.async.{ ArrayDecoders, ArrayEncode...
mentegy/quill
quill-async-postgres/src/main/scala/io/getquill/PostgresAsyncContext.scala
Scala
apache-2.0
1,382
import org.scalatest.{FunSuite, Matchers} class ChangeTest extends FunSuite with Matchers { test("single coin change") { Change.findFewestCoins(25, List(1, 5, 10, 25, 100)) should be (Some(List(25))) } test("multiple coin change") { Change.findFewestCoins(15, List(1, 5, 10, 25, 100)) should be (Some(Lis...
daewon/til
exercism/scala/change/src/test/scala/ChangeTest.scala
Scala
mpl-2.0
1,178
package com.sksamuel.elastic4s trait HitReader[T] { def read(hit: Hit): Either[Throwable, T] } trait AggReader[T] { def read(json: String): Either[Throwable, T] }
Tecsisa/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/HitReader.scala
Scala
apache-2.0
169
def go(x: Int): Unit = go // error go // error go // error def foo: Unit = (x: Int) => go(x) // warning
dotty-staging/dotty
tests/neg/i11761.scala
Scala
apache-2.0
117
package app.utils import slick.driver.PostgresDriver.simple._ import scala.slick.jdbc.meta.MTable import app.models.TaskDAO import app.{ Configs => C } trait PostgresSupport { def db = Database.forURL( url = s"jdbc:postgresql://${C.pgHost}:${C.pgPort}/${C.pgDBName}", driver = C.pgDriver ) implicit ...
cfmcgrady/spray-akka-slick-postgres
src/main/scala/app/utils/PostgresSupport.scala
Scala
mit
476
/* * Copyright 2014-2020 Rik van der Kleij * * 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...
rikvdkleij/intellij-haskell
src/main/scala/intellij/haskell/editor/HaskellExtendWordSelectionHandler.scala
Scala
apache-2.0
3,875
package com.campudus.vertx.database import com.campudus.vertx.Verticle import com.github.mauricio.async.db.postgresql.util.URLParser import com.github.mauricio.async.db.Configuration import com.github.mauricio.async.db.postgresql.pool.PostgreSQLConnectionFactory import com.github.mauricio.async.db.pool.ConnectionPool ...
campudus/vertx-mysql-postgresql
src/main/scala/com/campudus/vertx/database/Starter.scala
Scala
apache-2.0
3,026
/* * Copyright 2011 Typesafe Inc. * * This work is based on the original contribution of WeigleWilczek. * * 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/l...
typesafehub/sbteclipse
src/main/scala/com/typesafe/sbteclipse/core/EclipseOpts.scala
Scala
apache-2.0
1,005
package com.twitter.zipkin.common.mustache import com.github.mustachejava.DefaultMustacheFactory import com.twitter.mustache.ScalaObjectHandler import java.io._ import collection.JavaConversions.mapAsJavaMap class ZipkinMustache(templateRoot: String, cache: Boolean) { import java.io.Reader class ZipkinMustacheFac...
wyzssw/zipkin
zipkin-web/src/main/scala/com/twitter/zipkin/common/mustache/ZipkinMustache.scala
Scala
apache-2.0
1,262
package com.github.scalaz_examples.equal import scalaz._ import Scalaz._ object WhyShouldICare extends App { // In normal java, == is only reference compair, so you must always use an 'equals' method // In normal scala, == is a function that will mostly just call equals // what is the issue with equals? def equ...
dcapwell/scalaz-examples
src/main/scala/com/github/scalaz_examples/equal/Example.scala
Scala
mit
2,110
import sbt._ import Keys._ import play.Project._ import com.github.play2war.plugin._ object ApplicationBuild extends Build { val appName = "hed-editor-services" val appVersion = "1.0" val appDependencies = Seq( // Add your project dependencies here, "org.avaje.ebeanorm" % "avaje-ebeanorm-api" % "3.1.1"...
sotty/sharp-editor
hed-services/project/Build.scala
Scala
apache-2.0
3,760
/* * 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 ...
bavardage/spark
core/src/main/scala/spark/io/CompressionCodec.scala
Scala
apache-2.0
2,767
package com.shekhargulati.sentiment_analyzer import org.scalatest.{FunSpec, Matchers} class SentimentAnalyzerSpec extends FunSpec with Matchers { describe("sentiment analyzer") { it("should return POSITIVE when input has positive emotion") { val input = "Scala is a great general purpose language." ...
shekhargulati/52-technologies-in-2016
03-stanford-corenlp/sentiment-analyzer/src/test/scala/com/shekhargulati/sentiment_analyzer/SentimentAnalyzerSpec.scala
Scala
mit
902
package bootstrap.liftweb import net.liftweb._ import util._ import common._ import http._ import sitemap._ import Loc._ import mapper.{DB, StandardDBVendor, Schemifier} import code.model._ import net.liftmodules.{fobo, fobojqres} import scravatar.{Gravatar, DefaultImage} /** * A class that's instantiated early and...
karma4u101/FoBo-Demo
pimping-lift-advanced-md/src/main/scala/bootstrap/liftweb/Boot.scala
Scala
apache-2.0
5,402
package org.sgine.ui.render /** * TextureCoordinates is a convenience class for generating common scenarios of texture coordinates. * * @author Matt Hicks <mhicks@sgine.org> */ object TextureCoordinates { /** * Creates texture coordinates for the section specified of a texture based on the dimensions of * ...
Axiometry/sgine
ui/src/main/scala/org/sgine/ui/render/TextureCoordinates.scala
Scala
bsd-3-clause
2,534
/* * Copyright (c) 2016 JLCM * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distr...
beikern/quilltests
src/main/scala/de/beikern/quilltests/schemas/Schema.scala
Scala
mit
1,543
/* * 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...
wangyixiaohuihui/spark2-annotation
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/UnsupportedOperationChecker.scala
Scala
apache-2.0
13,190
import java.net._ import scala.collection.JavaConverters._ import scala.io.Source case class Response( status: Int, headers: Map[String, String], body: String ) object Request { def apply( method: String, url: String, headers: Map[String, String], body: Option[String] ): Respo...
earldouglas/xsbt-web-plugin
src/sbt-test/tomcat-plugin/default/src/test/scala/Http.scala
Scala
bsd-3-clause
1,265
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.scaladsl.persistence import akka.Done import akka.event.Logging import akka.stream.scaladsl.Flow import scala.concurrent.Future import akka.NotUsed import akka.persistence.query.NoOffset import akka.persistence.query.Offse...
lagom/lagom
persistence/scaladsl/src/main/scala/com/lightbend/lagom/scaladsl/persistence/ReadSideProcessor.scala
Scala
apache-2.0
4,775
package scala.idx.Genesys import java.io.File import java.util import com.beust.jcommander.{JCommander,Parameter} import collection.JavaConversions._ object Args { // Declared as var because JCommander assigns a new collection declared // as java.util.List because that's what JCommander will replace ...
serdna27/Genesys
src/main/scala/scala/idx/Genesys/Args.scala
Scala
mit
1,558
/* * Copyright 2015 Nicolas Rinaudo * * 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...
nrinaudo/scala-csv
scalaz/shared/src/test/scala/kantan/csv/scalaz/MaybeCodecTests.scala
Scala
mit
1,308
package free.validation import cats.arrow.{NaturalTransformation => ~>} import cats.data.{Coproduct, Const, Kleisli} import cats.free.Inject import cats.syntax.cartesian._ import free.validation.Algebra.{DefaultMarks, JsonLikeAlgebra} import free.validation.Dsl.JsonLikeDsl import play.api.libs.json._ import scala.Func...
OlivierBlanvillain/free-validation
src/main/scala/CustomUsage.scala
Scala
mit
3,974
package com.avsystem.scex.compiler.annotation import scala.annotation.StaticAnnotation /** * Created: 04-11-2014 * Author: ghik */ class Input extends StaticAnnotation
AVSystem/scex
scex-core/src/main/scala/com/avsystem/scex/compiler/annotation/Input.scala
Scala
mit
175
package works.weave.socks.aws.orders.domain.repository import java.net.URI import works.weave.socks.aws.orders.domain.repository.CartRepository.OrderItem trait CartRepository { def findItemsByURI(items : URI) : List[OrderItem] } object CartRepository { case class OrderItem(id : String, itemId : String, qu...
Compositional/orders-aws
src/main/scala/works.weave.socks.aws.orders/domain/repository/CartRepository.scala
Scala
apache-2.0
364
/* * Copyright 2016 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...
ahudspith-equalexperts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/computations/calculations/AdjustedTradingProfitOrLossCalculator.scala
Scala
apache-2.0
2,503
import stainless.lang._ object InnerClassLocalFun { abstract class Test { def something: BigInt } def foo(x: Boolean, l: BigInt): Test = { def bar(y: Boolean, m: BigInt): Test = { case class Bar() extends Test { def something = if (x && y) l else m } Bar() } bar(true, ...
epfl-lara/stainless
frontends/benchmarks/extraction/valid/InnerClassLocalFun.scala
Scala
apache-2.0
381
package at.ait.dme.forcelayout /** * A node in the force layout simulation. The node has an immutable component, representing the actual * graph node, and a mutable 'state' field, containing the force simulation state. * @author Rainer Simon <rainer.simon@ait.ac.at> */ case class Node private[forcelayout] (id: S...
rsimon/scala-force-layout
src/main/scala/at/ait/dme/forcelayout/Node.scala
Scala
mit
1,119
package org.monarchinitiative.dosdp import org.apache.jena.sys.JenaSystem import org.monarchinitiative.dosdp.cli.Config import zio._ import zio.test.Assertion._ import zio.test._ import zio.logging._ object QueryGeneratorRegexTest extends DefaultRunnableSpec { JenaSystem.init() def spec = suite("Test query labe...
INCATools/dosdp-tools
src/test/scala/org/monarchinitiative/dosdp/QueryGeneratorRegexTest.scala
Scala
mit
819
/******************************************************************************* Copyright (c) 2012-2014, S-Core, KAIST. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. ***************************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/analysis/typing/domain/DomainPrinter.scala
Scala
bsd-3-clause
7,158
trait T { override def clone(): String = "hi" } trait U extends T class C1 extends U with Cloneable { def f1 = (this: T).clone() def f2 = (this: U).clone() def f3 = (this: C1).clone() } class C2 { def f1(t: T) = t.clone() def f2(t: U) = t.clone() def f3(t: C1) = t.clone() } object Test { def main(arg:...
som-snytt/dotty
tests/run/invocationReceivers2.scala
Scala
apache-2.0
684
package org.apache.predictionio.workflow import org.apache.predictionio.controller._ import org.scalatest.FunSuite import org.scalatest.Matchers._ class EvaluationWorkflowSuite extends FunSuite with SharedSparkContext { test("Evaluation return best engine params, simple result type: Double") { val engine = ne...
alex9311/PredictionIO
core/src/test/scala/org/apache/predictionio/workflow/EvaluationWorkflowTest.scala
Scala
apache-2.0
1,893
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.api.db.evolutions import java.io.File import org.specs2.mutable.Specification import play.api.{ Environment, Mode } class EvolutionsReaderSpec extends Specification { "EnvironmentEvolutionsReader" should { "read evolutio...
wsargent/playframework
framework/src/play-jdbc-evolutions/src/test/scala/play/api/db/evolutions/EvolutionsReaderSpec.scala
Scala
apache-2.0
982
/* * 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/CachedTableSuite.scala
Scala
apache-2.0
28,450
package sparse abstract class Terminal[Token](token: Token) extends Symbol[Token]
gnieh/sparse
core/src/main/scala/sparse/Terminal.scala
Scala
apache-2.0
83
/* * Copyright (C) 2015 Stratio (http://stratio.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 required by app...
fjsc/sparta
serving-core/src/main/scala/com/stratio/sparta/serving/core/utils/FragmentUtils.scala
Scala
apache-2.0
9,825
/* * 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 ...
pronix/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GeneratePredicate.scala
Scala
apache-2.0
2,474
/* * Copyright 2013 Stephan Rehfeld * * 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 ...
stephan-rehfeld/scaladelray
src/test/scala/test/scaladelray/math/Normal3Spec.scala
Scala
apache-2.0
4,780
package org.jetbrains.plugins.scala package lang.navigation import org.jetbrains.plugins.scala.base.ScalaLightPlatformCodeInsightTestCaseAdapter import com.intellij.ide.util.gotoByName.GotoClassModel2 /** * @author Alefas * @since 23.12.13 */ class GoToClassTest extends ScalaLightPlatformCodeInsightTestCaseAdapter...
consulo/consulo-scala
test/org/jetbrains/plugins/scala/lang/navigation/GoToClassTest.scala
Scala
apache-2.0
1,110
package edu.gemini.model.p1.immutable /** * Identifies whether adaptive optics are used and if so whether * natural or laser guide stars are used. */ sealed trait AoPerspective { def toBoolean: Boolean = true } case object AoNone extends AoPerspective { override def toBoolean: Boolean = false } case object Ao...
arturog8m/ocs
bundle/edu.gemini.model.p1/src/main/scala/edu/gemini/model/p1/immutable/AoPerspective.scala
Scala
bsd-3-clause
388
/* * 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/autograd/Lambda.scala
Scala
apache-2.0
3,489
package org.broadinstitute.dsde.firecloud.page import org.broadinstitute.dsde.firecloud.component.{Link, TestId} import org.broadinstitute.dsde.firecloud.page.library.DataLibraryPage import org.broadinstitute.dsde.firecloud.page.methodrepo.MethodRepoPage import org.broadinstitute.dsde.firecloud.page.workspaces.Workspa...
broadinstitute/firecloud-ui
automation/src/test/scala/org/broadinstitute/dsde/firecloud/page/BaseFireCloudPage.scala
Scala
bsd-3-clause
876
package com.waywardcode.math import java.math.BigInteger object FastFib { private val TWO = BigInteger.valueOf(2L) private def recFib(n: Int) : Tuple2[BigInteger,BigInteger] = { if(n == 0) { return (BigInteger.ZERO, BigInteger.ONE) } val (a,b) = recFib(n/2) val c = ((b multiply TWO) subtract a) mu...
waywardcoder/small_programs
fast_fibo/scala_version/fibs.scala
Scala
gpl-2.0
536
/* * Copyright (c) 2014, Cloudera, Inc. All Rights Reserved. * * Cloudera, Inc. licenses this file to you 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/LICE...
jordancheah/oryx
framework/oryx-api/src/main/scala/com/cloudera/oryx/api/speed/ScalaSpeedModelManager.scala
Scala
apache-2.0
1,671
package ca.uwo.eng.sel.cepsim.query import ca.uwo.eng.sel.cepsim.gen.Generator import org.junit.runner.RunWith import org.mockito.Mockito._ import org.scalatest.{FlatSpec, Matchers} import org.scalatest.junit.JUnitRunner import org.scalatest.mock.MockitoSugar @RunWith(classOf[JUnitRunner]) class QueryTest extends Fl...
virsox/cepsim
cepsim-core/src/test/scala/ca/uwo/eng/sel/cepsim/query/QueryTest.scala
Scala
mit
2,391
package dsorting.states import dsorting.future.Subscription import dsorting.messaging.{ChannelTable, MessageListener} import dsorting.primitive.PartitionTable import scala.concurrent.Future trait State[T] { val listener: MessageListener val listenerSubscription: Subscription def run(): Future[T] } trait Conn...
Qwaz/scala-distributed-sorting
src/main/scala/dsorting/states/State.scala
Scala
apache-2.0
406
package lv.addresses.indexer trait SpatialIndexer { this: AddressFinder => import scala.collection.mutable.SortedSet case class Node(code: Int, left: Node, right: Node) protected var _spatialIndex: Node = null class Search(val limit: Int) { private val nearest = SortedSet[(AddrObj, BigDecimal)]()(new O...
mrumkovskis/addresses
indexer/src/main/scala/SpatialIndexer.scala
Scala
mit
3,876
package org.scalaide.core.lexical import org.eclipse.jface.text.rules.Token import org.eclipse.jface.text.rules.ITokenScanner import org.scalaide.ui.syntax.ScalaSyntaxClass import org.eclipse.jface.util.PropertyChangeEvent import org.eclipse.jface.preference.IPreferenceStore /** Base class for Scala specific token sc...
Kwestor/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/core/lexical/AbstractScalaScanner.scala
Scala
bsd-3-clause
1,423
package com.stovokor.editor.state import com.simsilica.lemur.input.StateFunctionListener import com.stovokor.util.EditorEventListener import com.stovokor.util.EditorEvent import com.jme3.app.state.AppStateManager import com.stovokor.editor.input.InputFunction import com.stovokor.util.ExportMap import com.stovokor.util...
jcfandino/leveleditor
src/main/scala/com/stovokor/editor/state/SettingsLoaderState.scala
Scala
bsd-3-clause
3,068
package water.sparkling.itest.local import hex.deeplearning.DeepLearning import hex.deeplearning.DeepLearningParameters import org.apache.spark.SparkContext import org.apache.spark.examples.h2o.Airlines import org.apache.spark.h2o.H2OContext import org.apache.spark.rdd.RDD import org.apache.spark.sql.SQLContext import...
tromika/sparkling-water
examples/src/integTest/scala/water/sparkling/itest/local/PubDev928TestSuite.scala
Scala
apache-2.0
2,586
package com.nidkil.kvk.model import com.nidkil.util.Util import play.api.libs.json._ import play.api.libs.functional.syntax._ case class Organisatie( var handelsnaam: String, var statutaireNaam: String, var bestaandeHandelsnamen: Option[Array[String]] = None, var vervallenHandelsnamen: Option[Array[String]] ...
nidkil/scala-kvk-web-scraper
src/main/scala/com/nidkil/kvk/model/Organisatie.scala
Scala
apache-2.0
3,053
package org.jetbrains.plugins.scala package lang package psi package impl package base package types import com.intellij.lang.ASTNode import com.intellij.psi._ import com.intellij.psi.scope.PsiScopeProcessor import org.jetbrains.plugins.scala.lang.psi.api.ScalaElementVisitor import org.jetbrains.plugins.scala.lang.psi...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/base/types/ScParameterizedTypeElementImpl.scala
Scala
apache-2.0
11,042
package com.quantifind.charts import org.scalatest.Matchers import org.scalatest.FunSuite import com.quantifind.charts.highcharts._ import Highchart._ /** * User: austin * Date: 10/4/13 */ class HighchartTest extends FunSuite with Matchers { test("Single point Highchart to json") { val hc = Highchart(Seq(Se...
quantifind/wisp
core/src/test/scala/com/qf/charts/HighchartTest.scala
Scala
apache-2.0
881
/* Copyright 2009-2016 EPFL, Lausanne */ package leon.regression.testcases import leon._ import leon.test._ import java.io.File abstract class TestCasesCompile(testDir: String) extends LeonRegressionSuite { val pipeline = frontends.scalac.ExtractionPhase andThen new utils.PreprocessingPhase private def filesIn...
regb/leon
src/test/scala/leon/regression/testcases/TestCasesCompile.scala
Scala
gpl-3.0
1,226
/* * Copyright (C) 2015 Red Bull Media House GmbH <http://www.redbullmediahouse.com> - 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/li...
linearregression/eventuate
src/test/scala/com/rbmhtechnology/example/Order.scala
Scala
apache-2.0
1,125
import java.awt.Desktop import java.awt.image.BufferedImage import java.io.{FileOutputStream, File} import java.text.DecimalFormat import javafx.application.{Platform, Application} import javafx.concurrent.Task import javafx.event.{ActionEvent, EventHandler} import javafx.geometry.{Insets, Pos} import javafx.scene.Scen...
kfang/PDFtoJPEG
src/main/scala/Main.scala
Scala
apache-2.0
6,711
package com.lucidchart.relate.macros import com.lucidchart.relate._ import macrocompat.bundle import scala.reflect.macros.blackbox.Context @bundle class RowParserImpl(val c: Context) { import c.universe._ def generateSnakeImpl[A: c.WeakTypeTag]: Tree = generate[A](AnnotOpts(true, Map.empty)) def generateImpl[A...
pauldraper/relate
macros/src/main/scala/com/lucidchart/open/relate/macros/RowParserImpl.scala
Scala
apache-2.0
10,517
package debop4s.data import java.util.concurrent.{LinkedBlockingQueue, ThreadPoolExecutor, TimeUnit} import debop4s.core._ import debop4s.core.concurrent._ import debop4s.data.slick3.SlickContext._ import debop4s.data.slick3.SlickContext.driver.api._ import org.reactivestreams.{Publisher, Subscriber, Subscription} im...
debop/debop4s
debop4s-data-slick3/src/main/scala/debop4s/data/slick3/package.scala
Scala
apache-2.0
4,255
package com.azavea.opentransit import com.azavea.opentransit.service.OpenTransitServiceActor import com.azavea.opentransit.database._ import akka.actor.{ActorSystem, Props} import akka.io.IO import com.typesafe.config.{ConfigFactory,Config} import spray.can.Http import scala.slick.jdbc.JdbcBackend._ import scala.sli...
flibbertigibbet/open-transit-indicators
scala/opentransit/src/main/scala/com/azavea/opentransit/Main.scala
Scala
gpl-3.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 may ...
h2oai/sparkling-water
ml/src/test/scala/ai/h2o/sparkling/ml/algos/H2OIsolationForestTestSuite.scala
Scala
apache-2.0
2,324
package com.rouesnel.typedsql.hive import java.util.Date import com.rouesnel.typedsql.core._ import com.rouesnel.typedsql.udf.{PlaceholderUDF, UdfDescription} import com.rouesnel.typedsql.util import org.apache.hadoop.hive.conf.HiveConf import org.apache.hadoop.hive.metastore.api._ import org.apache.hadoop.hive.ql.Dr...
laurencer/typedsql
macro/src/main/scala/com/rouesnel/typedsql/hive/HiveQuery.scala
Scala
apache-2.0
6,502