code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
/* * Copyright 2017 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...
liquidarmour/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC213B.scala
Scala
apache-2.0
1,139
/* * This file is part of eCobertura. * * Copyright (c) 2009, 2010 Joachim Hofer * All rights reserved. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/le...
jmhofer/eCobertura
ecobertura.ui/src/main/scala/ecobertura/ui/annotation/AbstractAnnotationModel.scala
Scala
epl-1.0
1,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 ...
mylog00/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/scala/TableConversions.scala
Scala
apache-2.0
6,887
/* Copyright 2015 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...
aposwolsky/scalding
scalding-core/src/main/scala/com/twitter/scalding/serialization/CascadingBinaryComparator.scala
Scala
apache-2.0
2,880
package mesosphere.mesos import mesosphere.UnitTest import mesosphere.marathon.core.pod.{BridgeNetwork, ContainerNetwork, HostNetwork} import mesosphere.marathon.raml.Endpoint import mesosphere.marathon.state.Container.{Mesos, PortMapping} import mesosphere.marathon.state.{AppDefinition, PathId, PortDefinition} impor...
gsantovena/marathon
src/test/scala/mesosphere/mesos/PortDiscoveryTest.scala
Scala
apache-2.0
8,510
/* * 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 ...
ueshin/apache-spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/sources/RateStreamProvider.scala
Scala
apache-2.0
5,934
package com.github.tminglei.slickpg import org.postgresql.util.PGobject package object utils { def mkPGobject(typeName: String, value: String) = { val obj = new PGobject obj.setType(typeName) obj.setValue(value) obj } }
timcharper/slick-pg
core/src/main/scala/com/github/tminglei/slickpg/utils/package.scala
Scala
bsd-2-clause
242
package pl.com.bms.fileSynchronizer import org.scalatest.{FlatSpec, Matchers} import pl.com.bms.fileSynchronizer.config.Action._ import pl.com.bms.fileSynchronizer.config.ArgumentsParser class ArgumentsParserTest extends FlatSpec with Matchers{ "Application" should "be in watch mode when -w arg is provided" in { ...
bms-devs/FileSynchronizer
src/test/scala/pl/com/bms/fileSynchronizer/ArgumentsParserTest.scala
Scala
mit
1,220
package looty package views import org.scalajs.jquery.JQuery ////////////////////////////////////////////////////////////// // Created by bjackman @ 1/1/14 2:46 PM ////////////////////////////////////////////////////////////// class HomeView(val banner: String, val version: String) extends View { def versionHis...
mihailim/looty
looty/src/main/scala/looty/views/HomeView.scala
Scala
gpl-2.0
13,252
package com.sksamuel.avro4s import com.sksamuel.avro4s.decoders.{ByteDecoders, CollectionDecoders, EitherDecoders, MagnoliaDerivedDecoder, OptionDecoders, PrimitiveDecoders, StringDecoders, TemporalDecoders} import org.apache.avro.Schema /** * A [[Decoder]] is used to convert an Avro value, such as a GenericRecord,...
sksamuel/avro4s
avro4s-core/src/main/scala/com/sksamuel/avro4s/Decoder.scala
Scala
apache-2.0
1,244
/* * Copyright 2017 Datamountaineer. * * 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...
datamountaineer/stream-reactor
kafka-connect-mqtt/src/main/scala/com/datamountaineer/streamreactor/connect/mqtt/connection/MqttClientConnectionFn.scala
Scala
apache-2.0
3,255
import sio.core._ import sio.teletype._ import sio.regions._ import sio.regions.Dup._ import cats.syntax.all._ import sio.core.syntax.st._ import sio.core.instances.all._ object regions { def putStrLn_[F[_]](s: String)(implicit F: LiftIO[F]): F[Unit] = F.liftIO(putStrLn(s)) def openResource[S, F[_]](path: String...
alexknvl/sio
example/src/main/scala/regions.scala
Scala
mit
1,308
package com.gu.automation.support import com.typesafe.scalalogging.slf4j.Logger import org.slf4j.{LoggerFactory, MDC} trait TestLogging { protected implicit lazy val logger: TestLogger = new TestLogger(Logger(LoggerFactory getLogger getClass.getName)) } class TestLogger(val logger: Logger) extends com.typesafe.sca...
guardian/scala-automation
src/main/scala/com/gu/automation/support/TestLogger.scala
Scala
apache-2.0
1,738
import sbt._ object Builds extends sbt.Build { import Keys._ /** Aggregates tasks for all projects */ lazy val root = Project( "dispatch-all", file("."), settings = Defaults.defaultSettings ++ Common.settings ++ Seq( ls.Plugin.LsKeys.skipWrite := true, publish := { } ) ).aggreg...
cb372/reboot
project/build.scala
Scala
lgpl-3.0
1,807
/** MACHINE-GENERATED FROM AVRO SCHEMA. DO NOT EDIT DIRECTLY */ package example.idl.array final case class ArrayIdl(data: List[Int])
julianpeeters/avrohugger
avrohugger-core/src/test/expected/standard/example/idl/array/ArrayAsScalaList.scala
Scala
apache-2.0
134
package fpinscala.errorhandling import scala.{Option => _, Either => _, _} // hide std library `Option` and `Either`, since we are writing our own in this chapter sealed trait Option[+A] { def map[B](f: A => B): Option[B] = this match { case Some(a) => Some(f(a)) case None => None } def getOrElse[B>:A...
mkowaliszyn/fpinscala
exercises/src/main/scala/fpinscala/errorhandling/Option.scala
Scala
mit
2,338
package chandu0101.scalajs.facades.examples.pages.components.pouchdb import chandu0101.scalajs.facades.examples.pages.common.CodeExample import chandu0101.scalajs.facades.pouchdb.{PouchDB, PouchDBOptions} import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.all._ /** * Created by chandrasekharkode . ...
chandu0101/scalajs-facades
examples/src/main/scala/chandu0101/scalajs/facades/examples/pages/components/pouchdb/PCreateDB.scala
Scala
mit
1,124
/* * MOIS: Examples Test * Copyright (C) 2014 University of Edinburgh School of Informatics * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (...
edinburgh-rbm/mois-examples
src/test/scala/uk/ac/ed/inf/mois/test/SampleTest.scala
Scala
gpl-3.0
1,065
/** * Copyright (C) 2010-2011 LShift Ltd. * * 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...
aprescott/diffa
kernel/src/main/scala/net/lshift/diffa/kernel/differencing/VersionPolicyManager.scala
Scala
apache-2.0
1,273
package com.twitter.algebird import org.scalacheck.{ Arbitrary, Prop } class FunctionMonoidTests extends CheckProperties { import com.twitter.algebird.BaseProperties._ // Generates an arbitrary linear function of the form f(x) = a * x + b, // where a and b are arbitrary integers. // TODO: add more types of f...
erikerlandson/algebird
algebird-test/src/test/scala/com/twitter/algebird/FunctionMonoidTests.scala
Scala
apache-2.0
1,149
package org.bitcoins.core.gen import org.bitcoins.core.channels._ import org.bitcoins.core.crypto.ECPrivateKey import org.bitcoins.core.currency.CurrencyUnit import org.bitcoins.core.policy.Policy import org.bitcoins.core.protocol.script._ import org.bitcoins.core.protocol.transaction._ import org.bitcoins.core.util.B...
Christewart/bitcoin-s-core
src/main/scala/org/bitcoins/core/gen/ChannelGenerators.scala
Scala
mit
4,715
/* * Copyright 2017 Datamountaineer. * * 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...
datamountaineer/stream-reactor
kafka-connect-influxdb/src/test/scala/com/datamountaineer/streamreactor/connect/influx/ValuesExtractorJsonTest.scala
Scala
apache-2.0
9,771
package reductions import scala.annotation._ import org.scalameter._ import common._ object ParallelParenthesesBalancingRunner { @volatile var seqResult = false @volatile var parResult = false val standardConfig = config( Key.exec.minWarmupRuns -> 40, Key.exec.maxWarmupRuns -> 80, Key.exec.benchR...
masipauskas/coursera-scala
parprog1/reductions/src/main/scala/reductions/ParallelParenthesesBalancing.scala
Scala
unlicense
2,711
/* * Copyright (c) 2014 Contributor. All rights reserved. */ package org.scalaide.debug.internal.expression package proxies.phases import scala.annotation.tailrec import scala.reflect.runtime.universe import org.scalaide.debug.internal.expression.Names.Debugger import org.scalaide.debug.internal.expression.Names.Sc...
Kwestor/scala-ide
org.scala-ide.sdt.debug.expression/src/org/scalaide/debug/internal/expression/proxies/phases/MockObjectsAndStaticCalls.scala
Scala
bsd-3-clause
2,737
/* * (C) Copyright 2015 Atomic BITS (http://atomicbits.io). * * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Affero General Public License * (AGPL) version 3.0 which accompanies this distribution, and is available in * the LICENSE file or at http...
rcavalcanti/scraml
modules/scraml-jsonschema-parser/src/main/scala/io/atomicbits/scraml/jsonschemaparser/model/SchemaReference.scala
Scala
agpl-3.0
1,423
// Copyright 2015-2016 Ricardo Gladwell. // Licensed under the GNU Affero General Public License. // See the LICENSE file for more information. package com.is_hosted_by.api sealed class InvalidInput(val id: String, val message: String) case object NoSuchDomainName extends InvalidInput( id = "dns-does-not-ex...
rgladwell/is-aws-api
src/main/scala/com/is_hosted_by/api/InvalidInput.scala
Scala
agpl-3.0
390
package chandu0101.scalajs.react.components.materialui import chandu0101.macros.tojs.JSMacro import japgolly.scalajs.react._ import materialui.Mui import scala.scalajs.js case class MuiPaper(circle: js.UndefOr[Boolean] = js.undefined, style: js.UndefOr[js.Any] = js.undefined, ...
mproch/scalajs-react-components
core/src/main/scala/chandu0101/scalajs/react/components/materialui/MuiPaper.scala
Scala
apache-2.0
840
package com.abdulradi.redikka.test.clients trait Client { def set(key: String, value: String): Unit def get(key: String): Option[String] }
tabdulradi/redikka
redikka-tests/src/test/scala/clients/Client.scala
Scala
mit
144
/* * 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 ...
darionyaphet/spark
sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriterV2.scala
Scala
apache-2.0
12,984
package com.nthportal.shell package async import com.nthportal.shell.async.AsyncShell.CancellableInputProvider import com.nthportal.shell.impl.NoOpOutputProvider import com.nthportal.shell.parsers.WhitespaceDelineatingParser import scala.concurrent.Await import scala.concurrent.duration.Duration class AsyncShellTest...
NthPortal/app-shell
src/test/scala/com/nthportal/shell/async/AsyncShellTest.scala
Scala
apache-2.0
1,738
package common object RDF { val Comment = "http://www.w3.org/2000/01/rdf-schema#comment" val Label = "http://www.w3.org/2000/01/rdf-schema#label" val Type = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" val Property = "http://www.w3.org/1999/02/22-rdf-syntax-ns#Property" val ObjectProperty = "http://www....
ubenzer/tezapp
app/common/RDF.scala
Scala
agpl-3.0
1,997
package com.ing.baker.runtime.akka.actor.recipe_manager import com.ing.baker.il.CompiledRecipe import com.ing.baker.runtime.akka.actor.serialization.BakerSerializable sealed trait RecipeManagerProtocol extends BakerSerializable object RecipeManagerProtocol { //Add a recipe case class AddRecipe(compiledRecipe: C...
ing-bank/baker
core/akka-runtime/src/main/scala/com/ing/baker/runtime/akka/actor/recipe_manager/RecipeManagerProtocol.scala
Scala
mit
975
package com.seanshubin.server import scala.annotation.tailrec case class SimplifiedRequest(path: String, method: String, headers: Seq[(String, String)], parameters: Seq[(String, Seq[String])], body: String) { def toMultipleLineString: Seq[String] = { val multipleLineString = Seq(s"path = $path") ++ Seq(s...
SeanShubin/schulze
server/src/main/scala/com/seanshubin/server/SimplifiedRequest.scala
Scala
unlicense
2,375
package br.com.juliocnsouza.graphwithspark class Metro extends PlaceNode { override val name: String; }
juliocnsouzadev/BuildingAGraphWithSpark
src/main/scala/br/com/juliocnsouza/graphwithspark/Country.scala
Scala
mit
109
package com.arcusys.valamis.lesson.scorm.storage.tracking import com.arcusys.valamis.lesson.scorm.model.tracking.GlobalObjectiveState trait GlobalObjectiveStorage { def create(treeId: Long, key: String, state: GlobalObjectiveState) def getAllObjectives(treeId: Long): scala.collection.mutable.Map[String, GlobalOb...
igor-borisov/valamis
valamis-scorm-lesson/src/main/scala/com/arcusys/valamis/lesson/scorm/storage/tracking/GlobalObjectiveStorage.scala
Scala
gpl-3.0
409
package com.ruimo.scoins import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should class ScopingSpec extends AnyFlatSpec with should.Matchers { it should "Unit func" in { import Scoping.doWith doWith(10) { i => i === 10 } } it should "Func returns value" in { import S...
ruimo/scoins
src/test/scala/com/ruimo/scoins/ScopingSpec.scala
Scala
apache-2.0
406
/** * Created on: Feb 22, 2013 */ package com.tubros.constraints.core.internal package tree import scalaz.{ Ordering => _, _ } import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import com.tubros.constraints.api._ import com.tubros.constraints.api.solver._ import com.tubros.constraints.core....
osxhacker/smocs
smocs-core/src/test/scala/com/tubros/constraints/core/internal/tree/SolutionTreeSpec.scala
Scala
bsd-3-clause
5,530
/* * Copyright 2014–2020 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/quasar
qsu/src/test/scala/quasar/qsu/mra/IdentitiesSpec.scala
Scala
apache-2.0
11,461
package play.api.i18n import org.specs2.mutable._ object MessagesSpec extends Specification { val testMessages = Map( "default" -> Map( "title" -> "English Title", "foo" -> "English foo", "bar" -> "English pub"), "fr" -> Map( "title" -> "Titre francais", ...
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/play/src/test/scala/play/api/i18n/MessagesSpec.scala
Scala
mit
1,857
/* * Copyright (c) 2015, BoDao, Inc. All Rights Reserved. * * Author@ dgl * * This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. * * * you can operate file Conveniently by this software. * * apend data to file * get file name at dir ...
bash-horatio/ESJ
app/common/FileHelper/FileHelper.scala
Scala
apache-2.0
4,478
/* * 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 ...
ashokblend/incubator-carbondata
integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonPreInsertionCasts.scala
Scala
apache-2.0
2,603
import synthesis.Definitions._ object PrimeHeuristic { def maybePrime(n: Int): Boolean = n match { case 2 * k => false case 3 * k => false case 6 * k - 1 => true case 6 * k + 1 => true } def main(args : Array[String]) : Unit = { println("Number !") val x = Console.readInt pr...
epfl-lara/comfusy
src/examples/paperexamples/PrimeHeuristic.scala
Scala
bsd-2-clause
389
package org.moe.parser import org.scalatest.FunSuite import org.scalatest.BeforeAndAfter import org.scalatest.matchers.ShouldMatchers import org.moe.runtime._ import org.moe.interpreter._ import org.moe.ast._ import org.moe.parser._ import org.moe.runtime.nativeobjects._ class ArrayMethodTestSuite extends FunSuite w...
MoeOrganization/moe
src/test/scala/org/moe/parser/ArrayMethodTestSuite.scala
Scala
mit
8,175
/** * @author Petri Kivikangas * @date 11.4.2012 * */ package cdl.parser import java.io.File import scala.io.Source import scala.util.parsing.combinator.RegexParsers import scala.xml.Node import org.slf4j.LoggerFactory object OntologyParser extends RegexParsers { private val logger = LoggerFactory.getLogger(t...
Valafar/cdl-parser
src/main/scala/cdl/parser/OntologyParser.scala
Scala
gpl-3.0
1,767
package com.nulabinc.backlog.migration.common.persistence.store import doobie.util.update.Update0 trait WriteQuery[A] { def write(entity: A): Update0 }
nulab/backlog-migration-common
core/src/main/scala/com/nulabinc/backlog/migration/common/persistence/store/WriteQuery.scala
Scala
mit
156
/* * 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 ...
goldmedal/spark
core/src/main/scala/org/apache/spark/resource/ResourceUtils.scala
Scala
apache-2.0
20,844
package edu.mit.csail.sdg.hsqldb.data.access.table.primary import edu.mit.csail.sdg.hsqldb.syntax.value.BoolValueExpr /** * Created by IntelliJ IDEA. * User: Dwayne * Date: 7/8/11 * Time: 11:33 PM * To change this template use File | Settings | File Templates. */ object joined { case class Paren...
dlreeves/ormolu
src/edu/mit/csail/sdg/hsqldb/data/access/table/primary/joined.scala
Scala
mit
901
package com.seanshubin.scala.training.core.file_system trait FileSystem { def linesFromFileNamed(fileDirectory: String, fileName: String): Iterable[String] def writeLines(fileDirectory: String, fileName: String, lines: Iterable[String]) }
SeanShubin/scala-training
core/src/main/scala/com/seanshubin/scala/training/core/file_system/FileSystem.scala
Scala
unlicense
245
package joint.dia import scala.scalajs.js import scala.scalajs.js.annotation.ScalaJSDefined @js.native trait Element extends Cell[Options, Element] { override def attributes: Options = js.native def translate(x: Int, y: Int): js.native = js.native def getAttribute(name: String): String = js.native } @ScalaJS...
abdheshkumar/scalajs-practices
client/src/main/scala/joint/dia/Element.scala
Scala
apache-2.0
1,091
package blended.akka.http.jmsqueue.internal import com.typesafe.config.ConfigFactory import org.scalatest.freespec.AnyFreeSpec class HttpQueueConfigSpec extends AnyFreeSpec { "The HttpQueueConfig should" - { "read the config correctly" in { val cfg = ConfigFactory.load("httpqueue.conf").resolve() ...
woq-blended/blended
blended.akka.http.jmsqueue/src/test/scala/blended/akka/http/jmsqueue/internal/HttpQueueConfigSpec.scala
Scala
apache-2.0
990
/** * Copyright (c) 2012 Alexey Aksenov ezh@ezh.msk.ru * * 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...
ezh/android-DigiLib
src/test/scala/org/digimead/digi/ctrl/lib/dialog/InstallControlTest.scala
Scala
apache-2.0
1,849
/* * 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 ...
trueyao/spark-lever
streaming/src/test/scala/org/apache/spark/streaming/StreamingListenerSuite.scala
Scala
apache-2.0
5,284
import sbt.Keys._ import sbt._ //import play.Keys._ import bintray.Opts import bintray.Plugin.bintraySettings import bintray.Keys._ import com.typesafe.sbt.packager.universal.UniversalKeys import play._ import play.Play._ import play.Play.autoImport._ object Build extends sbt.Build with UniversalKeys { lazy val ...
denigma/variants
project/Build.scala
Scala
mpl-2.0
456
package reactivemongo.bson import reactivemongo.bson.Macros.Annotations.{ Ignore, Key } import reactivemongo.bson.Macros.Options.SaveSimpleName import scala.collection.immutable.Set import scala.reflect.macros.whitebox.Context private object MacroImpl { def reader[A: c.WeakTypeTag, Opts: c.WeakTypeTag](c: Context)...
maxime-gautre/ReactiveMongo
macros/src/main/scala-2.12/MacroImpl.scala
Scala
apache-2.0
23,548
/* Copyright 2009-2016 EPFL, Lausanne */ package leon package evaluators import leon.solvers.Model import purescala.Expressions.Expr import EvaluationResults._ class AngelicEvaluator(underlying: NDEvaluator) extends Evaluator(underlying.context, underlying.program) with DeterministicEvaluator { val descrip...
regb/leon
src/main/scala/leon/evaluators/AngelicEvaluator.scala
Scala
gpl-3.0
1,496
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
witgo/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalogSuite.scala
Scala
apache-2.0
73,013
package org.jetbrains.sbt import com.intellij.testFramework.UsefulTestCase import com.intellij.testFramework.exceptionCases.AbstractExceptionCase /** * @author Nikolay Obedin * @since 6/9/15. */ trait UsefulTestCaseHelper { self: UsefulTestCase => def assertException[T <: Throwable](expectedMessage: Option[Strin...
triggerNZ/intellij-scala
test/org/jetbrains/sbt/UsefulTestCaseHelper.scala
Scala
apache-2.0
600
package com.compal.drama.draft /** * Created by Winston on 2015/4/6. * * (1) Basic code with * -- Scala Config, Spark Log, Spark Config * (2) Specialized code for SparkStreaming * -- Driver HA, Shutdown, Sliding Window Compute * -- Kafka Direct Stream, Cassandra Connector */ import com.typesafe.conf...
winston-li/DRAFT
StreamAnalyzer/src/main/scala/com/compal/drama/draft/StreamAnalyzer.scala
Scala
apache-2.0
8,713
import com.typesafe.tools.mima.core._ import sys.process._ object Mima { private def stable(ver: String): Boolean = ver.exists(c => c != '0' && c != '.') && ver .replace("-RC", "-") .forall(c => c == '.' || c == '-' || c.isDigit) def binaryCompatibilityVersions(): Set[String] = Seq("git"...
alexarchambault/jupyter-scala
project/Mima.scala
Scala
apache-2.0
1,239
package io.avici.truffle.parser import io.avici.truffle.ast.Ast import fastparse.noApi._ import White.WsApi._ /** * Created by Baqiao (Charles) Liu on 1/13/2016. */ /** * Copyright 2016 Baqiao (Charles) Liu * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file exce...
BakaBBQ/truffle-lang
src/main/scala/io/avici/truffle/parser/Expressions.scala
Scala
apache-2.0
4,133
package controllers import play.api.mvc.Action import lila.app._ import lila.common.HTTPRequest import lila.game.{ Game => GameModel, GameRepo } import play.api.http.ContentTypes import views._ object Game extends LilaController { private def paginator = Env.game.paginator private def analysePaginator = Env.ana...
systemovich/lila
app/controllers/Game.scala
Scala
mit
2,661
package is.hail.services.batch_client import is.hail.expr.ir.ByteArrayBuilder import java.nio.charset.StandardCharsets import is.hail.utils._ import is.hail.services._ import is.hail.services.{DeployConfig, Tokens} import org.apache.commons.io.IOUtils import org.apache.http.{HttpEntity, HttpEntityEnclosingRequest} im...
hail-is/hail
hail/src/main/scala/is/hail/services/batch_client/BatchClient.scala
Scala
mit
5,395
/** * This file is part of agora-mixnet. * Copyright (C) 2015-2016 Agora Voting SL <agora@agoravoting.com> * agora-mixnet is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the L...
agoravoting/agora-mixnet
src/main/scala/utils/HttpEntityToString.scala
Scala
agpl-3.0
1,304
package com.datastax.spark.connector.datasource import com.datastax.oss.driver.api.core.CqlIdentifier.fromInternal import com.datastax.oss.driver.api.core.metadata.schema.TableMetadata import com.datastax.spark.connector.SparkCassandraITFlatSpecBase import com.datastax.spark.connector.cluster.DefaultCluster import com...
datastax/spark-cassandra-connector
connector/src/it/scala/com/datastax/spark/connector/datasource/CassandraCatalogSpecBase.scala
Scala
apache-2.0
2,029
package org.jetbrains.plugins.scala package lang package completion package filters.modifiers import com.intellij.psi.{PsiElement, _} import com.intellij.psi.filters.ElementFilter import org.jetbrains.annotations.NonNls import org.jetbrains.plugins.scala.lang.completion.ScalaCompletionUtil._ import org.jetbrains.plugi...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/completion/filters/modifiers/ModifiersFilter.scala
Scala
apache-2.0
1,182
package me.benetis object Problems { /** If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. */ def problem1(): String = { (1 until 1000).filter(p => p % 3 == 0 || p % 5 =...
benetis/didactic-computing-machine
software-and-math-exercises/euler/src/main/scala/me/benetis/Problems.scala
Scala
agpl-3.0
1,048
package com.outr.arango.api.model import io.circe.Json case class PostAPIAqlfunctionRc201(error: Boolean, code: Option[Long] = None, isNewlyCreated: Option[Boolean] = None)
outr/arangodb-scala
api/src/main/scala/com/outr/arango/api/model/PostAPIAqlfunctionRc201.scala
Scala
mit
245
package Impl import akka.actor.Actor import akka.io.Udp import java.net.InetSocketAddress import akka.io.IO import akka.actor.ActorRef import java.util.logging.Logger import java.io.Serializable import scala.concurrent.duration.Duration import java.util.concurrent.TimeUnit import scala.io.Source import java.io.FileWri...
allenfromu/Single-Decree-Paxos
src/main/scala/Impl/Paxos_Actor.scala
Scala
mit
8,978
package scwebapp.header import scutil.core.implicits.* import scwebapp.HeaderType import scwebapp.data.* import scwebapp.format.* import scparse.ng.text.* import scwebapp.util.AcceptanceUtil object AcceptEncoding extends HeaderType[AcceptEncoding] { val key = "Accept-Encoding" def parse(it:String):Option[AcceptEn...
ritschwumm/scwebapp
modules/core/src/main/scala/scwebapp/header/AcceptEncoding.scala
Scala
bsd-2-clause
1,066
/* * 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...
danielcsant/sparta
sdk/src/test/scala/com/stratio/sparta/sdk/OutputTest.scala
Scala
apache-2.0
4,363
package io.youi.activate import io.youi.net.Path import io.youi.{History, dom} import org.scalajs.dom.{Event, document, html, window} import scala.scalajs.js sealed trait ActivateInstruction { def debug: Boolean = ActivationSupport.debug def activate(): Unit def deactivate(): Unit } abstract class Condition...
outr/youi
dom/src/main/scala/io/youi/activate/ActivateInstruction.scala
Scala
mit
6,124
/* * 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/ShouldBeATypeSpec.scala
Scala
apache-2.0
35,990
package com.twitter.algebird import com.twitter.algebird.BaseProperties._ import com.twitter.algebird.scalacheck.arbitrary._ import com.twitter.algebird.scalacheck.NonEmptyVector import org.scalacheck.Arbitrary import org.scalacheck.Prop.forAll class MinLaws extends CheckProperties { def minTest[T: Arbitrary: Order...
nevillelyh/algebird
algebird-test/src/test/scala/com/twitter/algebird/MinLaws.scala
Scala
apache-2.0
1,540
package cwl import cwl.CommandLineTool._ import shapeless.{:+:, CNil} import cwl.CwlType.CwlType import wom.types.WomType trait TypeAliases { type CwlAny = String type WorkflowStepInputId = String type Requirement = InlineJavascriptRequirement :+: SchemaDefRequirement :+: DockerRequirement :+...
ohsu-comp-bio/cromwell
cwl/src/main/scala/cwl/TypeAliases.scala
Scala
bsd-3-clause
2,504
package com.vikram.core import java.util.UUID import java.util.concurrent.TimeUnit import akka.stream.Materializer import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.http.scaladsl.client.RequestBuilding._ import akka.http.scaladsl.model.headers.{BasicHttpCredentials, OAuth2BearerToken} import ak...
vikram-r/subreddit-suggester
engine/src/main/scala/com/vikram/core/RedditApiWrapper.scala
Scala
mit
4,704
package org.ai4fm.graph.isomorphism import org.junit.Assert._ import org.junit.Test import scalax.collection.GraphEdge.DiEdge import scalax.collection.GraphPredef._ import scalax.collection.immutable.Graph import scala.util.Random /** * @author Andrius Velykis */ class VF2IsomorphismTest { @Test def grap...
andriusvelykis/proofprocess
lib/graph-isomorphism/src/test/scala/org/ai4fm/graph/isomorphism/VF2IsomorphismTest.scala
Scala
epl-1.0
4,173
/* * Copyright (c) 2017 Magomed Abdurakhmanov, Hypertino * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * */ package com.hypertino.hyperbus.model object DefLink...
hypertino/hyperbus
hyperbus/src/main/scala/com/hypertino/hyperbus/model/DefLink.scala
Scala
mpl-2.0
385
package com.typesafe.scalalogging.log4j import com.typesafe.scalalogging.slf4j.StrictLogging trait Logging extends StrictLogging
dhgarrette/2015-ccg-parsing
src/main/scala/com/typesafe/scalalogging/log4j/Logging.scala
Scala
apache-2.0
130
object Test { val xs: List[Any] = ??? for (x <- xs) do () // OK for (x: Any <- xs) do () // OK for (x: String <- xs) do () // error for ((x: String) <- xs) do () // error for (y@ (x: String) <- xs) do () // error for ((x, y) <- xs) do () // error for ((x: String) <- xs if x.isEmpty...
som-snytt/dotty
tests/neg-strict/filtering-fors.scala
Scala
apache-2.0
1,101
package org.apache.spark.hbase.examples.simple import java.util.UUID import org.apache.spark.SparkContext import org.apache.spark.hbase.helpers.TLong import org.apache.spark.hbase.misc.HBaseAdminUtils import org.apache.spark.rdd.RDD import scala.util.Random /** * Created by mharis on 28/07/15. * */ class DemoSim...
michal-harish/spark-on-hbase
src/main/scala/org/apache/spark/hbase/examples/simple/DemoSimpleApp.scala
Scala
apache-2.0
4,591
package com.thetvdb.api import com.thetvdb.api.service.ApiService class TVDBApi(apiKey: String, username: String, userKey: String) extends ApiService(apiKey, username, userKey) { def this(apiKey: String) = this(apiKey, "", "") } object TVDBApi { /** * * @param apiKey API Key * @return An API for TV...
burakkose/api-thetvdb
src/main/scala/com/thetvdb/api/TVDBApi.scala
Scala
mit
707
package Tutorial import Chisel._ import Node._ import Literal._ import scala.collection.mutable.HashMap import scala.collection.mutable.ArrayBuffer class KDistribute extends gComponentLeaf (() => new KEngineIO_t)(() => new KEngineIO_t) (ArrayBuffer()) with include { val numOfThreads = 1 val NONE_SELECTED = ...
seyedmaysamlavasani/GorillaPP
chisel/Gorilla++/emulator/src/KDistribute.scala
Scala
bsd-3-clause
4,537
package org.bitcoins.util import org.bitcoins.script.arithmetic.OP_ADD import org.bitcoins.script.bitwise.OP_EQUAL import org.bitcoins.script.constant.{OP_2, ScriptToken, OP_0, OP_1} import org.bitcoins.script.control.{OP_RETURN, OP_ENDIF, OP_ELSE, OP_IF} import org.scalatest.{FlatSpec, MustMatchers} /** * Created b...
Christewart/scalacoin
src/test/scala/org/bitcoins/util/BinaryTreeTest.scala
Scala
mit
5,094
/** * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ package actorbintree import akka.actor.{ Props, ActorRef, ActorSystem } import org.scalatest.{ BeforeAndAfterAll, FlatSpec } import akka.testkit.{ TestProbe, ImplicitSender, TestKit } import org.scalatest.matchers.ShouldMatchers import scala.ut...
4DD8A19D69F5324F9D49D17EF78BBBCC/Princip_les_of_Rea_ctive_Progra_mming
actorbintree/src/test/scala/actorbintree/BinaryTreeSuite.scala
Scala
mit
4,455
import scala.annotation.tailrec // putting @tailrec through the paces object Winners { @tailrec def facsucc(n: Int, acc: Int): Int = if (n == 0) acc else facsucc(n - 1, n * acc) @tailrec def loopsucc1(x: Int): Int = loopsucc1(x - 1) @tailrec def loopsucc2[T](x: Int): Int = loopsucc2[T](x - 1) def d...
felixmulder/scala
test/files/neg/tailrec.scala
Scala
bsd-3-clause
1,470
/* * 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
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
Scala
apache-2.0
43,886
/* * This file is part of EasyForger which is released under GPLv3 License. * See file LICENSE.txt or go to http://www.gnu.org/licenses/gpl-3.0.en.html for full license details. */ package com.easyforger.recipes.test import net.minecraft.init.Items import net.minecraft.item.ItemStack import net.minecraft.item.craft...
easyforger/easyforger
tester/src/main/scala/com/easyforger/recipes/test/SmeltingRecipesTest.scala
Scala
gpl-3.0
806
package io.atal.butterfly import io.atal.butterfly.action._ import scala.io.StdIn.readLine object butterfly extends View { val editorManager = new EditorManager(Some(this)) var _macro: Map[String, Action] = Map() def main(args: Array[String]) { editorManager.openEditor println("Hey! This is butterfly ...
Matthieu-Riou/Butterfly
src/main/scala/io/atal/butterfly/Butterfly.scala
Scala
mit
8,512
package slick.test.jdbc import org.junit.Test import org.junit.Assert._ import scala.concurrent.Await import scala.concurrent.duration.Duration import scala.concurrent.ExecutionContext.Implicits.global import slick.backend.{DatabaseConfig, StaticDatabaseConfig} import slick.collection.heterogeneous.HNil import slick.c...
dotta/slick
slick-testkit/src/test/scala/slick/test/jdbc/TypedStaticQueryTest.scala
Scala
bsd-2-clause
7,360
package ordered // trait Preorder[A] { // // must be reflexive and transitive // def lt(a: A, b: A): Boolean // } // trait WeakOrder
julianmichael/sorted-streams
ordered/shared/src/main/scala/ordered/Preorder.scala
Scala
mit
139
/* Copyright (c) 2009, 2010 Hanno Braun <mail@hannobraun.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 applicable law or...
hannobraun/ScalableDynamics
src/test/scala/com/hannobraun/sd/collision/phase/SimpleNarrowPhaseSpec.scala
Scala
apache-2.0
6,978
package org.jetbrains.plugins.scala package lang package psi package impl package expr import com.intellij.lang.ASTNode import com.intellij.psi.util.PsiTreeUtil import com.intellij.psi.{PsiElement, PsiElementVisitor} import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang....
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScIfStmtImpl.scala
Scala
apache-2.0
2,811
/* NSC -- new Scala compiler * Copyright 2005-2016 LAMP/EPFL and Lightbend, Inc * * @author Martin Odersky */ package scala.tools.nsc package transform import symtab._ import Flags._ import scala.annotation.tailrec import scala.collection.mutable abstract class Mixin extends InfoTransform with ast.TreeDSL with ...
felixmulder/scala
src/compiler/scala/tools/nsc/transform/Mixin.scala
Scala
bsd-3-clause
28,700
package org.jetbrains.plugins.scala package lang package psi package impl package base package types import com.intellij.lang.ASTNode import com.intellij.psi.PsiElementVisitor import org.jetbrains.plugins.scala.lang.psi.api.ScalaElementVisitor import org.jetbrains.plugins.scala.lang.psi.api.base.types._ import org.jet...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/base/types/ScCompoundTypeElementImpl.scala
Scala
apache-2.0
1,288
/* * 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/SerializedKeyValueStoreMetrics.scala
Scala
apache-2.0
2,474
package kr.ac.kaist.ir.deep.layer import kr.ac.kaist.ir.deep.fn._ import play.api.libs.json.{JsArray, JsObject, Json} /** * __Layer__: Basic, Fully-connected Rank 3 Tensor Layer. * * @note <pre> * v0 = a column vector concatenate v2 after v1 (v11, v12, ... v1in1, v21, ...) * Q = Rank 3 Tensor with si...
nearbydelta/ScalaNetwork
src/main/scala/kr/ac/kaist/ir/deep/layer/SplitTensorLayer.scala
Scala
gpl-2.0
2,406
package com.harpribot.corenlp_scala /** * Created by harshal on 1/12/17. */ import java.io.File import java.nio.charset.Charset import java.util.Properties import com.google.common.io.Files import edu.stanford.nlp.ie.machinereading.structure.MachineReadingAnnotations import edu.stanford.nlp.ling.CoreAnnotations.S...
harpribot/corenlp-scala-examples
src/main/scala/com/harpribot/corenlp_scala/RelationExtractionExample.scala
Scala
mit
2,650
/* * ****************************************************************************** * * 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/core/tiles/TileEntityBase.scala
Scala
gpl-2.0
5,272
/* * Copyright (c) 2016. Fengguo (Hugo) Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Detailed co...
arguslab/argus-cit-intellij
src/main/scala/org/argus/cit/intellij/jawa/debugger/breakpoints/JawaBreakpointHandler.scala
Scala
epl-1.0
928
package org.qirx.browserTests.server import org.qirx.browserTests.runner.EventProxy import sbt.testing import spray.http.StatusCodes import spray.httpx.SprayJsonSupport._ import spray.httpx.unmarshalling.Unmarshaller import spray.json._ import spray.routing.Directives class EventProxyRoutes(eventProxy: EventProxy) e...
EECOLOR/browser-tests
library/src/main/scala/org/qirx/browserTests/server/EventProxyRoutes.scala
Scala
mit
3,319