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 dawn.flow trait Batch[A, R] extends Source1[A] with Source[R] with Accumulate[A] with CloseListener { def schedulerClose = source1.scheduler override def closePriority = -1 //defined by Accumulate def listen1(x: Timestamped[A]) = () private var schedulerL: Scheduler = Scheduler.ne...
rubenfiszel/scala-flow
core/src/main/scala/Batch.scala
Scala
mit
2,548
package scala.pickling.inheritance import org.scalatest.FunSuite import scala.pickling._, scala.pickling.Defaults._, json._ abstract class Creature { val species: String } abstract class Person extends Creature { val species = "human" val name: String val age: Int } case class Firefighter(val name: String, ...
scala/pickling
core/src/test/scala/scala/pickling/generation/InheritanceTest.scala
Scala
bsd-3-clause
1,376
package pimpathon.scalaz import org.junit.Test import pimpathon.util.on import scalaz.NonEmptyList import pimpathon.multiMap._ import pimpathon.scalaz.nel._ import pimpathon.util._ import scalaz.syntax.either._ class NelTest { @Test def unique(): Unit = NonEmptyList(1, 2, 1).unique === NonEmptyList(1, 2) @Test...
raymanoz/pimpathon
src/test/scala/pimpathon/scalaz/nel.scala
Scala
apache-2.0
2,394
/* * 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...
CodeSmell/stream-reactor
kafka-connect-druid/src/test/scala/com/datamountaineer/streamreactor/connect/druid/writer/DruidDbWriterTest.scala
Scala
apache-2.0
2,363
/*********************************************************************** * Copyright (c) 2013-2019 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...
elahrvivaz/geomesa
geomesa-features/geomesa-feature-avro/src/main/scala/org/locationtech/geomesa/features/avro/AvroDataFileWriter.scala
Scala
apache-2.0
2,161
package types trait Lambda { class HKT1[A[_]] class HKT2[A[_ >: Int <: AnyVal]] class HKT3[A[_, _]] class TC[A, B] type T1 = HKT1[[X] =>> TC[X, Int]] type T2 = HKT2[[X >: Int <: AnyVal] =>> TC[X, Int]] type T3 = HKT3[[X, Y] =>> TC[X, Y]] }
JetBrains/intellij-scala
tasty/runtime/data/types/Lambda.scala
Scala
apache-2.0
260
package keemun import scala.concurrent.Future import keemun.clients.github.RepositoriesFetcher import keemun.models.Repo /** * Copyright (c) Nikita Kovaliov, maizy.ru, 2014 * See LICENSE.txt for details. */ package object controllers { def fetchRepositories(): Future[Seq[Repo]] = { val fetcher = Repositori...
maizy/keemun
app/keemun/controllers/package.scala
Scala
mit
453
package intellij.haskell.psi.impl import com.intellij.openapi.util.TextRange import com.intellij.psi.{AbstractElementManipulator, PsiFileFactory} import com.intellij.util.IncorrectOperationException import intellij.haskell.HaskellLanguage import org.jetbrains.annotations.Nullable /** * @author ice1000 */ class Ha...
rikvdkleij/intellij-haskell
src/main/scala/intellij/haskell/psi/impl/HaskellStringLiteralManipulator.scala
Scala
apache-2.0
1,251
package gv package isi package std.conversions import scala.util.{ Try } import scala.concurrent.{ Future } import convertible.{ ~=> } /** * Provide conversions from standard types to [[scala.concurrent.Future]]. */ trait ToFutureConversions extends Any { @inline final implicit def `Try[T] ~=> Future[T]`[T]: ...
mouchtaris/jleon
src/main/scala-2.12/gv/isi/std/conversions/ToFutureConversions.scala
Scala
mit
363
/* * Copyright 2015 Heiko Seeberger * * 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...
hseeberger/akka-http-json
akka-http-json4s/src/test/scala/de/heikoseeberger/akkahttpjson4s/Json4sSupportSpec.scala
Scala
apache-2.0
4,618
/* * Copyright (c) 2014-2018 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the * Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at * http://www.apache...
snowplow/iglu
2-repositories/iglu-server/project/BuildSettings.scala
Scala
apache-2.0
4,153
package com.iflytek.rocket.spark.sql import com.iflytek.rocket.uitl.ConstValue import org.apache.spark._ import org.apache.spark.SparkContext._ import org.apache.spark.sql.{SaveMode, SQLContext} case class Record(key: Int, value: String) case class Person(name: String, age: Int) /** * Created by seawalker on 2015/4...
seawalkermiaoer/rocket
streaming/project/src/main/scala/com/iflytek/rocket/spark/sql/ApiTest.scala
Scala
mit
1,234
package poly.algebra import poly.algebra.factory._ /** * Represents a concatenative semigroup (i.e. semigroups operating on sequences, etc. that bears the operation `++`) * @author Tongfei Chen * @since 0.2.1 */ trait ConcatenativeSemigroup[X] { self => /** The concatenation (`++`) operation of this semigroup....
ctongfei/poly-algebra
src/main/scala/poly/algebra/ConcatenativeSemigroup.scala
Scala
mit
1,005
/* * Copyright (C) 2009-2013 Mathias Doenitz, Alexander Myltsev * * 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 ...
danielwegener/akka-rtcweb
src/main/scala/akka/rtcweb/protocol/sdp/parser/Base64Parsing.scala
Scala
apache-2.0
2,865
package org.mrgeo.spark.job.yarn import java.io.File import java.net.URL import org.apache.spark.SparkConf import org.mrgeo.spark.job.JobArguments import org.mrgeo.utils.SparkUtils import scala.collection.mutable.ArrayBuffer import scala.tools.nsc.util.ScalaClassLoader.URLClassLoader object MrGeoYarnDriver { fina...
tjkrell/MrGEO
mrgeo-core/src/main/scala/org/mrgeo/spark/job/yarn/MrGeoYarnDriver.scala
Scala
apache-2.0
4,705
package mr.merc.ui.common import mr.merc.unit.Soldier import scalafx.beans.property.StringProperty import scalafx.beans.property.ObjectProperty import mr.merc.unit.view.SoldierView import mr.merc.unit.view.StandState import mr.merc.image.MImage import mr.merc.local.Localization class SoldierWrapper(private var _soldi...
RenualdMarch/merc
src/main/scala/mr/merc/ui/common/SoldierWrapper.scala
Scala
gpl-3.0
2,078
package models import fixture.NameGenerator import org.joda.time.DateTime import com.github.nscala_time.time.Imports._ import play.api.db.DB import play.api.test.WithApplication import org.scalatest.Tag import org.slf4j.LoggerFactory /** * Use SBT command "test-only *ContainerSpec" to run all tests. * * Use SB...
cbsrbiobank/tempmonServer
test/models/ContainerSpec.scala
Scala
bsd-2-clause
2,433
/* * Copyright 2013 Twitter Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
twitter/storehaus
storehaus-algebra/src/main/scala/com/twitter/storehaus/algebra/BufferingStore.scala
Scala
apache-2.0
3,384
trait Ent(name: String) case class MyContent(key: String, value: String) case class MyInsert(key: String) object Dsl { inline def ent: Ent = new Ent("something") {} extension (ent: Ent) inline def content(inline ins: MyInsert) = MyContent(ins.key, "blah") }
dotty-staging/dotty
tests/run-macros/i10880/Dsl_1.scala
Scala
apache-2.0
267
/* * Copyright 2016 The BigDL 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 agr...
122689305/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/Dropout.scala
Scala
apache-2.0
6,403
package poly.collection.mut import poly.collection._ import poly.collection.impl._ import poly.macroutil._ /** * Represents a mutable indexed sequence. * Fast random access and update should be guaranteed. * @since 0.1.0 * @author Tongfei Chen */ trait ValueMutableIndexedSeq[T] extends ValueMutableSeq[T] with In...
ctongfei/poly-collection
core/src/main/scala/poly/collection/mut/ValueMutableIndexedSeq.scala
Scala
mit
1,388
/* * Copyright (c) 2015 Robert Conrad - All Rights Reserved. * Unauthorized copying of this file, via any medium is strictly prohibited. * This file is proprietary and confidential. * Last modified by rconrad, 1/4/15 1:55 PM */ package base.common.service import akka.actor.ActorSystem import akka.util.Timeout i...
robconrad/base-api
project-common/src/main/scala/base/common/service/CommonService.scala
Scala
mit
863
package build import java.io.{File => JFile} import collection.JavaConverters._ import play.api.Logger import models._ import org.eclipse.jgit.api.Git import org.eclipse.jgit.internal.storage.file.FileRepository import scala.util.Try import org.apache.commons.io.FileUtils import org.eclipse.jgit.transport._ import ...
grahamar/Giles
app/build/RepositoryService.scala
Scala
apache-2.0
5,021
/* Deduction Tactics Copyright (C) 2012-2015 Raymond Dodge 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 (at your option) any later version. This progra...
rayrobdod/boardGame
Model/src/test/scala/RectangularSpaceTest.scala
Scala
gpl-3.0
3,937
package thangiee.riotapi.matches case class Participant( championId: Int = 0, highestAchievedSeasonTier: String = "", masteries: List[Mastery] = Nil, participantId: Int = 0, runes: List[Rune] = Nil, spell1Id: Int = 0, spell2Id: Int = 0, stats: ParticipantStats = ParticipantStats(), teamId: Int = 0, ...
Thangiee/Riot-API-Scala
src/main/scala/thangiee/riotapi/matches/Participant.scala
Scala
mit
379
package net.categoricaldata.universalalgebra import net.categoricaldata.category._ trait Diagrams { category: Category => trait Diagram { trait Cone { def coneObject: O def coneMap(o: O): M } case class ConeMap(source: Cone, target: Cone, mapBetweenConeObjects: M) trait Cones extends Category { ov...
JasonGross/categoricaldata
src/main/scala/net/categoricaldata/universalalgebra/Limits.scala
Scala
mit
2,028
/* Copyright 2012-2015, University of Geneva. This file is part of Great Balls of Fire (GBF). Great Balls of Fire (GBF) 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 (...
unigeSPC/gbf
simulator/src/package.scala
Scala
gpl-3.0
1,009
package chandu0101.scalajs.react.components.textfields import japgolly.scalajs.react._ import scala.scalajs.js import scala.scalajs.js.{Array => JArray} /** * key: PropTypes.string, ref: PropTypes.String, value: React.PropTypes.JArray[String], valueLink: React.PropTypes.object, defaultValue: React.PropTypes.JArray[...
coreyauger/scalajs-react-components
core/src/main/scala/chandu0101/scalajs/react/components/textfields/ReactTagsInput.scala
Scala
apache-2.0
3,903
package rxgpio.akka import akka.actor.Actor import gpio4s.gpiocfg.CfgIO.PinCfg import rx.lang.scala.Subscription import rxgpio.DefaultDigitalIO._ import rxgpio.Gpio.Implicits._ import rxgpio.pigpio.PigpioLibrary import rxgpio.{Level, PinModes, RxGpio} import wiii.inject._ class RxGpioPin(num: Int) extends Actor { ...
jw3/rxgpio
akka/src/main/scala/rxgpio/akka/RxGpioPin.scala
Scala
apache-2.0
1,346
package scala.util.concurrent sealed abstract class Duration { def toJavaNanos: Long } object Duration { import DurationHelpers._ case class Nanoseconds(length: Long) extends Duration { def toJavaNanos = length } case class Microseconds(length: Long) extends Duration { def toJavaNanos = x(length,...
joshcough/Sweet
src/main/scala/scala/util/concurrent/Duration.scala
Scala
lgpl-2.1
1,601
package test001 import scalikejdbc._ import scalikejdbc.scalatest.AutoRollback import org.scalatest.{ fixture, Matchers } /** * This spec demonstrates that using hasManyThrough.byDefault each other is impossible. */ class Spec extends fixture.FunSpec with Matchers with Connection with CreateTables with AutoRollb...
seratch/skinny-framework
orm/src/test/scala/test001/Spec.scala
Scala
mit
2,005
/** * Copyright 2013 Gianluca Amato * * This file is part of JANDOM: JVM-based Analyzer for Numerical DOMains * JANDOM 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 ...
rubino22/JDBeta
core/src/main/scala/it/unich/jandom/ppfactories/MemoizingFactory.scala
Scala
lgpl-3.0
2,591
package org.sarrufat.sudoku.latinsqr import org.sarrufat.sudoku.latinsqr.LatinSquare object LSWS {;import org.scalaide.worksheet.runtime.library.WorksheetSupport._; def main(args: Array[String])=$execute{;$skip(129); val ls = new LatinSquare(9);System.out.println("""ls : org.sarrufat.sudoku.latinsqr.LatinSquare = ...
sarrufat/ScalaSudoku
.worksheet/src/org.sarrufat.sudoku.latinsqr.LSWS.scala
Scala
gpl-3.0
343
package unfiltered.request import org.specs._ object AcceptsSpecJetty extends unfiltered.spec.jetty.Served with AcceptsSpec { def setup = { _.filter(unfiltered.filter.Planify(intent)) } } object AcceptsSpecNetty extends unfiltered.spec.netty.Served with AcceptsSpec { def setup = { p => unfiltered.netty.Http(...
softprops/Unfiltered
library/src/test/scala/AcceptsSpec.scala
Scala
mit
3,620
package sharry.common.syntax object all extends StringSyntax with LoggerSyntax with StreamSyntax
eikek/sharry
modules/common/src/main/scala/sharry/common/syntax/all.scala
Scala
gpl-3.0
98
package sylvestris.service.common import spray.json._, DefaultJsonProtocol._ case class Relationship(label: Option[String], nodePath: String) object Relationship { implicit val jsonFormat = jsonFormat2(apply) }
janrain/sylvestris
service-common/src/main/scala/sylvestris/service/common/Relationship.scala
Scala
mit
216
package mesosphere.marathon package raml import java.time.OffsetDateTime import mesosphere.marathon.core.base.Clock import mesosphere.marathon.core.launcher.OfferMatchResult import mesosphere.marathon.core.launchqueue.LaunchQueue.QueuedInstanceInfoWithStatistics import mesosphere.marathon.core.pod.PodDefinition impor...
natemurthy/marathon
src/main/scala/mesosphere/marathon/raml/QueueInfoConversion.scala
Scala
apache-2.0
3,677
package org.http4s package server package blaze import cats.data.Kleisli import cats.effect._ import cats.effect.concurrent.Deferred import cats.implicits._ import java.nio.ByteBuffer import java.nio.charset.StandardCharsets import org.http4s.{headers => H} import org.http4s.blaze._ import org.http4s.blaze.pipeline.Co...
aeons/http4s
blaze-server/src/test/scala/org/http4s/server/blaze/Http1ServerStageSpec.scala
Scala
apache-2.0
17,003
/******************************************************************************* * (C) Copyright 2015 ADP, LLC. * * 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....
adplabs/unicorn
json/src/main/scala/unicorn/json/package.scala
Scala
apache-2.0
8,310
/****************************************************************************** * Copyright (c) 2014, Equal Experts Ltd * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of ...
EqualExperts/Midas
src/test/scala/com/ee/midas/utils/FileWatcherSpecs.scala
Scala
bsd-2-clause
5,173
// These are meant to be typed into the REPL. You can also run // scala -Xnojline < repl-session.scala to run them all at once. // An invariant Pair class class Pair[T](var first: T, var second: T) { override def toString = "(" + first + "," + second + ")" } class Person(val name: String) { override def toString...
yeahnoob/scala-impatient-2e-code
src/ch18/sec12/repl-session.scala
Scala
gpl-3.0
1,809
/* * 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 ...
caneGuy/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsTestUtils.scala
Scala
apache-2.0
12,493
package ch.ninecode.cim.tool trait ProgramaticName { def name: String def prefix (s: String): String = if (s.charAt(0).isDigit) "_" else "" def substitute (s: String): String = s.replace(" ", "_").replace("-", "_").replace("/", "_").replace(".", "_").replace(",", "_") lazy val valid_class_name: Stri...
derrickoswald/CIMScala
CIMTool/src/main/scala/ch/ninecode/cim/tool/ProgramaticName.scala
Scala
mit
1,893
package com.codahale.jerkson.util import com.codahale.jerkson.util.scalax.rules.scalasig._ import com.fasterxml.jackson.databind.JavaType import com.fasterxml.jackson.databind.`type`.TypeFactory import scala.reflect.ScalaSignature import scala.reflect.internal.pickling.ByteCodecs class MissingPickledSig(clazz: Class[...
gilt/jerkson
src/main/scala/com/codahale/jerkson/util/CaseClassSigParser.scala
Scala
mit
6,178
/** * 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 appli...
lshift/diffa
kernel/src/main/scala/net/lshift/diffa/kernel/notifications/NotificationProvider.scala
Scala
apache-2.0
981
// // Game Gardens - a platform for hosting simple multiplayer Java games // Copyright (c) 2005-2013, Three Rings Design, Inc. - All rights reserved. // https://github.com/threerings/game-gardens/blob/master/LICENSE package com.threerings.gardens.web.logic import java.io.File import java.security.MessageDigest import...
threerings/game-gardens
server/src/main/scala/com/threerings/gardens/web/logic/upload_jar.scala
Scala
bsd-3-clause
3,948
package sangria.parser /** Lexical analysis tools described in the GraphQL specification. */ private[parser] object Lexical { /** Regex that matches line termination sequences. */ private[this] val newlineRegex = """\\r\\n|[\\n\\r]""".r /** Produces the value of a block string from its parsed raw value, simila...
sangria-graphql/sangria
modules/parser/src/main/scala/sangria/parser/Lexical.scala
Scala
apache-2.0
1,416
package polyite.fitness.classifier import polyite.ScopInfo import polyite.schedule.Dependence import polyite.schedule.DomainCoeffInfo import polyite.schedule.schedule_tree.util.SchedTreeUtil import polyite.schedule.schedule_tree.ScheduleNode import polyite.schedule.ScheduleSpaceUtils import isl.Isl import org.junit.As...
stganser/polyite
test/polyite/fitness/classifier/TestParallelLoops.scala
Scala
mit
8,939
package forcomp import common._ object Anagrams { /** A word is simply a `String`. */ type Word = String /** A sentence is a `List` of words. */ type Sentence = List[Word] /** `Occurrences` is a `List` of pairs of characters and positive integers saying * how often the character appears. * This l...
au9ustine/org.coursera.progfun-005
assignments/forcomp/src/main/scala/forcomp/Anagrams.scala
Scala
mit
6,964
package bio4j.data.uniprot.flat import bio4j.data.uniprot._ case class CC(val lines: Seq[String]) { def comments: Seq[Comment] = commentBlocks(lines) flatMap commentFromBlock private def commentFromBlock(blockLines: Seq[String]): Seq[Comment] = { val (topic, _headContent) = blockLines.head.span(_!=':'...
bio4j/data.uniprot
src/main/scala/flat/CC.scala
Scala
agpl-3.0
5,268
import shapeless._ import shapeless.poly._ import shapeless.ops.hlist._ import scala.util.{Success, Try} object Day1 extends App { { val xs = 32 :: "test" :: 66 :: HNil object m extends Poly1 { implicit def caseString = at[String](_ + "mapped") implicit def caseInt = at[Int](_ + 100) } ...
KadekM/Ndays-of-shapless
src/main/scala/Day1.scala
Scala
apache-2.0
5,284
/* * 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 ...
tillrohrmann/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/stream/table/validation/OverWindowValidationTest.scala
Scala
apache-2.0
5,718
/* * 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/features/H2OPCATestSuite.scala
Scala
apache-2.0
7,239
package ee.cone.c4actor import ee.cone.c4actor.Types.NextOffset trait Consuming { def process[R](from: NextOffset, body: Consumer⇒R): R } trait Consumer { def poll(): List[RawEvent] def endOffset: NextOffset }
wregs/c4proto
c4actor-base/src/main/scala/ee/cone/c4actor/ConsumerApi.scala
Scala
apache-2.0
219
package com.productfoundry.akka.cqrs import java.util.UUID import play.api.libs.json.{Reads, Writes, Format} import scala.reflect.ClassTag import scala.util.Try /** * Identifier backed by uuid. */ trait Identifier { def uuid: Uuid override def toString: String = uuid.toString } /** * Identifier Companion. ...
odd/akka-cqrs
core/src/main/scala/com/productfoundry/akka/cqrs/Identifier.scala
Scala
apache-2.0
1,098
package Server.Actors import Objects._ import Objects.ObjectTypes._ import ObjectJsonSupport._ import Server.Messages._ import Utils.{Constants, Crypto, DebugInfo} import spray.json._ import spray.routing.RequestContext class PageActor(var page: SecureObject, debugInfo: DebugInfo) extends ProfileActor(page.baseObj....
Nirespire/SecureFacebookAPI
src/main/scala/Server/Actors/PageActor.scala
Scala
mit
2,503
package tree import org.scalatest._ import java.io.File import java.nio.file.Path // TODO: This test doesnt cover a symlink to a file class CRUDSpec extends FunSpec with Fixture { describe("A DemonstrationBPlusTree"){ val t = bPlusTree it("should load 12 elements, then be size 12") { data.s...
rcrowther/DemonstrationBPlusTree
test/CRUDSpec.scala
Scala
gpl-3.0
1,154
package com.joescii.sbtjs import sbt._ import Keys._ sealed trait Framework // Mostly placeholder for now sealed trait Browser object SbtJsTestPlugin extends AutoPlugin with SbtJsTestKeys { import SbtJsTestTasks._ object autoImport extends SbtJsTestKeys { object JsTestBrowsers { case object Firefox38...
joescii/sbt-js-test
src/main/scala/com/joescii/sbtjs/SbtJsTestPlugin.scala
Scala
apache-2.0
1,640
/* * Copyright (C) 2014 HMPerson1 <hmperson1@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 published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Th...
HMPerson1/superdoughnuts
src/hmperson1/apps/superdoughnuts/SuperDoughnuts.scala
Scala
gpl-3.0
1,846
/* * 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/adaptive/CoalesceShufflePartitions.scala
Scala
apache-2.0
8,388
package org.jetbrains.plugins.scala package lang package psi package stubs package elements import com.intellij.lang.ASTNode import com.intellij.psi.PsiElement import com.intellij.psi.stubs._ import org.jetbrains.plugins.scala.lang.psi.api.base.ScFieldId import org.jetbrains.plugins.scala.lang.psi.impl.base.ScFieldIdI...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/ScFieldIdElementType.scala
Scala
apache-2.0
1,213
package net.iakovlev.dynamo.generic.test import com.amazonaws.services.dynamodbv2.{model => aws} import net.iakovlev.dynamo.generic.AwsAttributeValueDecoder import org.specs2.mutable.Specification class DecodeCaseObjectsTest extends Specification with AwsAttributeValueDecoder { "Decode case objects as stri...
RomanIakovlev/easycodecs
aws-dynamodb-bindings/src/test/scala/net/iakovlev/dynamo/generic/test/DecodeCaseObjectsTest.scala
Scala
apache-2.0
610
package lila.coach import org.joda.time.DateTime import chess.Status import lila.game.Pov import lila.rating.PerfType case class PerfResults( base: Results, bestRating: Option[PerfResults.BestRating], winStreak: PerfResults.Streak, // nb games won in a row awakeMinutesStreak: PerfResults.Streak, // m...
abougouffa/lila
modules/coach/src/main/PerfResults.scala
Scala
mit
3,259
package mesosphere.marathon import scala.util.{ Failure, Try } class MarathonConfTest extends MarathonSpec { private[this] val principal = "foo" private[this] val secretFile = "/bar/baz" test("MesosAuthenticationIsOptional") { val conf = makeConfig( "--master", "127.0.0.1:5050" ) assert(conf...
sledigabel/marathon
src/test/scala/mesosphere/marathon/MarathonConfTest.scala
Scala
apache-2.0
3,664
// Generated by the Scala Plugin for the Protocol Buffer Compiler. // Do not edit! // // Protofile syntax: PROTO3 package mytypes.duration object DurationProto extends _root_.scalapb.GeneratedFileObject { lazy val dependencies: Seq[_root_.scalapb.GeneratedFileObject] = Seq( scalapb.options.ScalapbProto ) la...
trueaccord/ScalaPB
docs/src/main/scala/mytypes/duration/DurationProto.scala
Scala
apache-2.0
1,707
/* * 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 ...
narahari92/spark
sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala
Scala
apache-2.0
49,374
package com.jeff.megaupload.client import java.io.FileInputStream import java.net.{DatagramPacket, DatagramSocket, InetAddress, SocketTimeoutException} import com.jeff.megaupload.constant.Constants.{PACKET_SIZE, PAYLOAD_SIZE} import com.jeff.megaupload.constant.{Constants, Flags, PacketMan} import scala.collection.m...
jregistr/Academia
CSC445-Computer-Networks/MegaUpload/client/src/main/com/jeff/megaupload/client/Client.scala
Scala
mit
3,568
/* * Copyright 2014 – 2018 Paul Horn * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
knutwalker/transducers-scala
contrib/reactive-streams/src/main/scala/scalax/transducers/contrib/PublisherState.scala
Scala
apache-2.0
3,743
package se.gigurra.renderer.glimpl.drawstrategy.multi import com.jogamp.common.nio.Buffers import javax.media.opengl.GL3 import se.gigurra.renderer.Color import se.gigurra.renderer.Transform import se.gigurra.renderer.glimpl.megavbo.MegaVboModelDescriptor import se.gigurra.renderer.glimpl.uniforms.SimpleUniform clas...
GiGurra/gigurra-scala-2drenderer
src/main/scala/se/gigurra/renderer/glimpl/drawstrategy/multi/SimpleDrawBatch.scala
Scala
mit
1,748
/* * 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/amls-frontend
test/controllers/responsiblepeople/PersonUKPassportControllerSpec.scala
Scala
apache-2.0
15,264
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
WindCanDie/spark
sql/core/src/test/scala/org/apache/spark/sql/SerializationSuite.scala
Scala
apache-2.0
1,456
/** * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com> */ package akka.actor import akka.testkit.{AkkaSpec => MyFavoriteTestFrameWorkPlusAkkaTestKit} import language.postfixOps //#test-code import scala.collection.immutable class FSMDocSpec extends MyFavoriteTestFrameWorkPlusAkkaTestKit { //#fsm...
ktoso/asciidoctor-sbt-plugin
src/sbt-test/sbt-asciidoctor/simple-doc/src/test/scala/akka/actor/FSMDocSpec.scala
Scala
apache-2.0
5,755
package models.gitolite import org.joda.time.DateTime import org.specs2.mutable._ import scalikejdbc._ import scalikejdbc.specs2.mutable.AutoRollback class WikisSpec extends Specification { "Wikis" should { val w = Wikis.syntax("w") "find by primary keys" in new AutoRollback { val maybeFound = Wik...
thomaschoo/gitolite-to-gitbucket
src/test/scala/models/gitolite/WikisSpec.scala
Scala
mit
1,671
package ru.tmtool.math import ru.tmtool.math.arithmetic.ClosedInterval import ru.tmtool.math.arithmetic.ClosedInterval.SpecialDecimal import ru.tmtool.math.probability.distributions.{Distribution, UniformDistribution} import ru.tmtool.math.probability.generators.Generator import ru.tmtool.math.probability.generators.l...
tmtool/math
src/main/scala/ru/tmtool/math/probability/package.scala
Scala
mit
929
package merkelonrails.ast import org.objectweb.asm.MethodVisitor import merkelonrails.SymbolTable import org.objectweb.asm.Opcodes._ import org.objectweb.asm.Label case class ConditionNode(condition: OperandNode, ifBranch: List[AstNode], elseBranch: List[AstNode]) extends StatementNode { def generate(mv: MethodVisi...
ubertroll/MerkelOnRails
src/main/scala/merkelonrails/ast/ConditionNode.scala
Scala
apache-2.0
863
/* * 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 ...
1haodian/spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/package.scala
Scala
apache-2.0
3,322
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
bravo-zhang/spark
core/src/test/scala/org/apache/spark/DebugFilesystem.scala
Scala
apache-2.0
4,312
package org.scalameta.annotations import scala.language.experimental.macros import scala.annotation.StaticAnnotation import scala.reflect.macros.whitebox.Context class contextful[T] extends StaticAnnotation { def macroTransform(annottees: Any*): Any = macro ContextfulMacros.impl } class ContextfulMacros(val c: Con...
beni55/scalameta
foundation/src/main/scala/org/scalameta/annotations/contextful.scala
Scala
bsd-3-clause
2,039
package org.deepdive.test.unit import akka.actor._ import akka.testkit._ import org.deepdive.calibration._ import org.deepdive.inference._ import org.scalatest._ import org.deepdive.settings.{BooleanType, VariableDataType} import scala.util.Success class Forwarder(target: ActorRef) extends Actor { def receive = { c...
dennybritz/deepdive
src/test/scala/unit/inference/InferenceManagerSpec.scala
Scala
apache-2.0
2,298
package org.jetbrains.plugins.dotty.lang.parser.parsing.expressions /** * @author adkozlov */ object Expr extends org.jetbrains.plugins.scala.lang.parser.parsing.expressions.Expr { override protected def expr1 = Expr1 override protected def bindings = Bindings }
ilinum/intellij-scala
src/org/jetbrains/plugins/dotty/lang/parser/parsing/expressions/Expr.scala
Scala
apache-2.0
272
package com.hooboy.etjo.game import org.newdawn.slick._ import com.hooboy.etjo.render._ import scala.io.Source import com.hooboy.etjo.editor.main.Editor import com.hooboy.etjo.editor.main.Editor import com.hooboy.etjo.editor.main.Editor import com.hooboy.etjo.editor.main.Editor import com.hooboy.etjo.editor.main.Edito...
Z6fans/etjo
src/com/hooboy/etjo/game/ETJO.scala
Scala
mit
2,078
package scalariform.gui object Utils { def onSwingThread(proc: β‡’ Unit) = javax.swing.SwingUtilities.invokeLater(new Runnable() { def run() = proc }) import javax.swing.JTree import javax.swing.tree._ def expandAll(tree: JTree) { val root = tree.getModel().getRoot() expandAll(tree, new TreePath(root)...
gawkermedia/scalariform
misc/src/main/scala/scalariform/gui/Utils.scala
Scala
mit
695
/* * Copyright 2013 - 2017 Outworkers 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 or...
websudos/morpheus
morpheus-mysql/src/test/scala/com/outworkers/morpheus/mysql/db/specialized/EnumerationColumnTest.scala
Scala
bsd-2-clause
1,937
package redstone.solver.util import redstone._ object Utility { def printSolution(initialBoard: Board, solutionBoard: Option[Board]) = { println("\\nThis is how the initial board looks like") println(initialBoard) if(!solutionBoard.isDefined) { println("Failed to find a solution!") } else...
skumargithub/redstone-solver
src/test/scala/redstone/solver/util/Utility.scala
Scala
gpl-2.0
910
package im.actor.server.group import java.time.ZoneOffset import im.actor.server.migrations.Migration import slick.driver.PostgresDriver import scala.concurrent.duration._ import scala.concurrent.{ Await, ExecutionContext, Future, Promise } import akka.actor.{ ActorLogging, ActorSystem, Props } import akka.pattern.p...
berserkertdl/actor-platform
actor-server/actor-core/src/main/scala/im/actor/server/group/GroupMigrator.scala
Scala
mit
5,122
package lila.user import io.lemonlabs.uri.Url import scala.util.Try object Links { def make(text: String): List[Link] = text.linesIterator.to(List).map(_.trim).flatMap(toLink) private val UrlRegex = """^(?:https?://)?+([^/]+)""".r.unanchored private def toLink(line: String): Option[Link] = line match { ...
luanlv/lila
modules/user/src/main/Links.scala
Scala
mit
2,057
package strd.util import java.net.{InetAddress, InetSocketAddress, NetworkInterface} import com.eaio.util.lang.Hex import scala.collection.mutable.ArrayBuffer /** * * User: lembrd * Date: 02/05/15 * Time: 16:11 */ object InterfaceUtils { val interfaces : Seq[IfaceInfo] = { val ab = new ArrayBuffer[Ifac...
onerinvestments/strd
strd-commons/src/main/scala/strd/util/InterfaceUtils.scala
Scala
apache-2.0
1,887
/* * 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 n...
Chasego/kafka
core/src/test/scala/unit/kafka/server/metadata/BrokerMetadataListenerTest.scala
Scala
apache-2.0
6,443
package cs4r.labs.learningscala.ninetynineproblems /** * Find the Kth element of a list. */ object Problem3 { def nth[T](n: Int, list: List[T]): T = (n, list) match { case (0, x :: _) => x case (n, _ :: tail) => nth(n - 1, tail) case _ => throw new NoSuchElementException } }
Cs4r/LearningScala
src/main/scala/cs4r/labs/learningscala/ninetynineproblems/Problem3.scala
Scala
gpl-3.0
298
/* * Copyright 2011-2018 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
wiacekm/gatling
gatling-http/src/main/scala/io/gatling/http/action/async/sse/SseAction.scala
Scala
apache-2.0
819
package dotty.partest import dotty.tools.dotc.reporting.ConsoleReporter import scala.tools.partest.{ TestState, nest } import java.io.{ File, PrintWriter, FileWriter } /* NOTE: Adapted from partest.DirectCompiler */ class DPDirectCompiler(runner: DPTestRunner) extends nest.DirectCompiler(runner) { override def co...
densh/dotty
test/dotty/partest/DPDirectCompiler.scala
Scala
bsd-3-clause
1,290
package vultura.calibration import org.specs2.mutable.Specification import org.specs2.specification.core.Fragment import vultura.factor.inference.calibration.LBP import vultura.factor.{Factor, FactorMatchers, NormalD, Problem} import vultura.factor.generation._ import vultura.factor.inference.{ConvergenceStats, Region...
ziggystar/vultura-factor
src/test/scala/vultura/calibration/TwoLayerOCPropagationTest.scala
Scala
mit
3,735
package org.bjean.sample.wordcount.aws import com.amazonaws.services.elasticmapreduce.model.HadoopJarStepConfig import com.typesafe.config.Config object SparkCommandStepBuilder { val AWS_CLUSTER_SPARK_STEP_COMMAND: String = "aws.cluster.spark.stepCommand" val AWS_CLUSTER_SPARK_DEPLOY_MODE: String = "aws.cluster.s...
bjet007/word-count-spark-aws
aws-launcher/src/main/scala/org/bjean/sample/wordcount/aws/SparkCommandStepBuilder.scala
Scala
apache-2.0
2,128
package tastytest object BigFunctions { val bigfun: (x1: Int,x2: Int,x3: Int,x4: Int,x5: Int,x6: Int,x7: Int,x8: Int,x9: Int,x10: Int,x11: Int,x12: Int,x13: Int,x14: Int,x15: Int,x16: Int,x17: Int,x18: Int,x19: Int,x20: Int,x21: Int,x22: Int,x23: Int) => String = bigdef def bigdef(x1: Int,x2: Int,x3: Int,x4: Int,...
scala/scala
test/tasty/neg/src-3/BigFunctions.scala
Scala
apache-2.0
737
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.api import java.io._ import java.net.MalformedURLException import java.net.URI import java.net.URISyntaxException import java.net.URL import java.net.URLConnection import java.nio.charset.StandardCharsets import java.time.Period import ja...
benmccann/playframework
core/play/src/test/scala/play/api/ConfigurationSpec.scala
Scala
apache-2.0
17,321
/* * Copyright (c) 2019. Yuriy Stul */ package com.stulsoft.kafka.commit import java.io.File import com.typesafe.config.ConfigFactory /** Application configuration * * @author Yuriy Stul */ object AppConfig { // private lazy val config = ConfigFactory.parseFile(new File("app.conf")) // .withFallback...
ysden123/poc
pkafka/kafka-commit/src/main/scala/com/stulsoft/kafka/commit/AppConfig.scala
Scala
mit
714
package im.mange.common import sys.process._ class ProcessRunner(name: String, command: String, workingDirectory: String = "") { private val processBuilder = workingDirectory match { case "" => Process(command) case _ => Process(command, new java.io.File(workingDirectory)) } //TODO: replace null with O...
alltonp/driveby
src/main/scala/im/mange/common/ProcessRunner.scala
Scala
apache-2.0
788
/* * 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 ...
AnSavvides/zipkin
zipkin-collector-core/src/main/scala/com/twitter/zipkin/collector/processor/OstrichService.scala
Scala
apache-2.0
1,349
package eventstore package operations import eventstore.ReadEventError._ import eventstore.operations.Inspection.Decision.{ Stop, Fail } import org.specs2.mock.Mockito import org.specs2.mutable.Specification import scala.util.{ Failure, Success } class ReadEventInspectionSpec extends Specification with Mockito { va...
pawelkaczor/EventStore.JVM
src/test/scala/eventstore/operations/ReadEventInspectionSpec.scala
Scala
bsd-3-clause
1,304
package org.jetbrains.plugins.scala.codeInsight.template.macros import com.intellij.codeInsight.CodeInsightBundle import com.intellij.codeInsight.template._ import org.jetbrains.plugins.scala.codeInsight.template.impl.ScalaCodeContextType import org.jetbrains.plugins.scala.codeInsight.template.util.MacroUtil /** * @...
double-y/translation-idea-plugin
src/org/jetbrains/plugins/scala/codeInsight/template/macros/ScalaExpressionTypeMacro.scala
Scala
apache-2.0
1,055