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 rpm4s.data sealed trait Distribution extends Product with Serializable object Distribution { def fromString(value: String): Distribution = value match { case "openSUSE Leap 42.3" => OpenSUSELeap42_3 case x => Unknown(x) } case object OpenSUSELeap42_3 extends Distribution case...
lucidd/rpm4s
shared/src/main/scala/rpm4s/data/Distribution.scala
Scala
mit
373
// // StandardInvocationBehavior.scala -- Scala trait StandardInvocationBehavior // Project OrcScala // // Created by dkitchin on Jan 24, 2011. // // Copyright (c) 2017 The University of Texas at Austin. All rights reserved. // // Use and redistribution of this file is governed by the license terms in // the LICENSE fi...
orc-lang/orc
OrcScala/src/orc/run/StandardInvocationBehavior.scala
Scala
bsd-3-clause
815
// during development of late delambdafying there was a problem where // specialization would undo some of the work done in uncurry if the body of the // lambda had a constant type. That would result in a compiler crash as // when the delambdafy phase got a tree shape it didn't understand class X[@specialized(Int) A] {...
felixmulder/scala
test/files/specialized/constant_lambda.scala
Scala
bsd-3-clause
519
/** * Copyright (c) 2010, Stefan Langer * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list o...
emarsys/dyson
project/build/ProjectFile.scala
Scala
gpl-3.0
4,100
package mesosphere.marathon import akka.actor.{Actor, ActorRef, Props} /** * An actor which forwards all its messages * to the given destination. Useful for testing. */ class ForwardingActor(destination: ActorRef) extends Actor { override def receive: Receive = { case msg => destination.forward(msg) } }...
gsantovena/marathon
src/test/scala/mesosphere/marathon/ForwardingActor.scala
Scala
apache-2.0
448
package glasskey.play.client import glasskey.model.AuthCodeAccessTokenHelper import play.api.mvc._ import play.api.libs.concurrent.Execution.Implicits._ object AuthCodeController extends SampleController { override def env: PlayClientRuntimeEnvironment = PlayClientRuntimeEnvironment("hello-authcode-client") ove...
MonsantoCo/glass-key
samples/glass-key-play-client/app/glasskey/play/client/AuthCodeController.scala
Scala
bsd-3-clause
652
/* * The MIT License * * Copyright (c) 2016 Zhixun Tan * * 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, m...
phisiart/arrow
src/main/scala/arrow/repr/NodeUntyped.scala
Scala
mit
1,176
/* * Copyright 2013 http4s.org * * 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 i...
http4s/http4s
tests/shared/src/test/scala/org/http4s/EntityCodecSuite.scala
Scala
apache-2.0
1,551
/* * MilmSearch is a mailing list searching system. * * Copyright (C) 2013 MilmSearch Project. * * 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 any...
mzkrelx/milm-search-core
src/main/scala/org/milmsearch/core/api/SearchResultDto.scala
Scala
gpl-3.0
1,325
/* * 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...
jasonchaffee/akka-sse
akka-sse/src/main/scala/de/heikoseeberger/akkasse/MediaTypes.scala
Scala
apache-2.0
1,070
package org.scalajs.openui5.sap.ui.layout.form import org.scalajs.openui5.sap.ui.core.Control import scala.scalajs.js import scala.scalajs.js.annotation.JSName @JSName("sap.ui.layout.form.Form") @js.native class Form extends Control { }
lastsys/scalajs-openui5
src/main/scala/org/scalajs/openui5/sap/ui/layout/form/Form.scala
Scala
mit
241
package io.buoyant.linkerd.protocol.http import com.twitter.finagle.http.{Request, Response} import com.twitter.finagle.stats.InMemoryStatsReceiver import com.twitter.finagle.{Service, ServiceFactory, Stack, param} import com.twitter.util.Future import io.buoyant.test.Awaits import org.scalatest.FunSuite class Status...
linkerd/linkerd
linkerd/protocol/http/src/test/scala/io/buoyant/linkerd/protocol/http/StatusCodeStatsFilterTest.scala
Scala
apache-2.0
1,601
// Copyright 2010 Twitter, Inc. // // An easy to use thrift client interface. package com.twitter.rpcclient import scala.reflect.Manifest import org.apache.thrift.protocol.TProtocol import com.twitter.xrayspecs.TimeConversions._ import com.twitter.xrayspecs.Duration class ThriftClient[Intf <: AnyRef, Cli <: Intf] ...
kmonkeyjam/rpc-client
src/main/scala/com/twitter/rpcclient/ThriftClient.scala
Scala
apache-2.0
823
package com.scala.exercises.impatient.chapter10 /** * Created by Who on 14-7-12. */ trait LoggedException extends Logged { this: Exception => def log() { log(getMessage) } }
laonawuli/scalalearning
src/com/scala/exercises/impatient/chapter10/LoggedException.scala
Scala
mit
187
package uk.gov.gds.ier.transaction.crown.previousAddress import uk.gov.gds.ier.transaction.crown.CrownControllers import com.google.inject.{Inject, Singleton} import uk.gov.gds.ier.config.Config import uk.gov.gds.ier.model._ import uk.gov.gds.ier.security.EncryptionService import uk.gov.gds.ier.serialiser.JsonSerialis...
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/transaction/crown/previousAddress/PreviousAddressManualStep.scala
Scala
mit
1,759
package com.twitter.finagle.service import com.twitter.conversions.time._ import com.twitter.finagle._ import com.twitter.finagle.stats.StatsReceiver import com.twitter.util.{Duration, Future, Stopwatch, Time, TokenBucket} object DeadlineFilter { val role = new Stack.Role("DeadlineAdmissionControl") private[thi...
lukiano/finagle
finagle-core/src/main/scala/com/twitter/finagle/service/DeadlineFilter.scala
Scala
apache-2.0
6,802
package org.scalatra.util package io import scala.io.Source import java.io._ import org.scalatest.WordSpec import org.scalatest.matchers.ShouldMatchers class IoSpec extends WordSpec with ShouldMatchers { "copy" should { "copy an input stream smaller than the buffer size to the output stream" in { testCopy(...
louk/scalatra
core/src/test/scala/org/scalatra/util/io/IoSpec.scala
Scala
bsd-2-clause
2,438
package org.mysql.employee.utils object Companion { def companion[R, T](m: Manifest[T]) = { val classOfT = m.runtimeClass Class.forName(classOfT.getName + "$").getField("MODULE$").get(null).asInstanceOf[R] } }
matyb/spark-employee
src/test/scala/org/mysql/employee/utils/Companion.scala
Scala
mit
224
/* * 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 ...
ueshin/apache-flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/plan/optimize/program/FlinkChainedProgramTest.scala
Scala
apache-2.0
5,899
/* * 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
core/src/test/scala/org/apache/spark/deploy/history/FsHistoryProviderSuite.scala
Scala
apache-2.0
54,959
/* * Copyright (c) 2013 Scott Abernethy. * * 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 program is d...
scott-abernethy/opener-of-the-way
app/Global.scala
Scala
gpl-3.0
1,512
package com.socrata.querycoordinator import java.util.concurrent.TimeUnit import com.socrata.http.server.livenesscheck.LivenessCheckConfig import com.socrata.curator.{CuratorConfig, DiscoveryConfig} import com.socrata.querycoordinator.caching.cache.config.CacheConfig import com.socrata.thirdparty.metrics.MetricsOptio...
socrata-platform/query-coordinator
query-coordinator/src/main/scala/com/socrata/querycoordinator/QueryCoordinatorConfig.scala
Scala
apache-2.0
1,585
package peregin.gpv.model import org.specs2.mutable.Specification import MinMax._ class MinMaxSpec extends Specification { stopOnFail "an instance" should { val mm = MinMax(0, 3) "match if value is inside the range" in { mm.includes(-0.1) must beFalse mm.includes(0) must beTrue mm....
peregin/gps-overlay-on-video
src/test/scala/peregin/gpv/model/MinMaxSpec.scala
Scala
mit
1,345
package org.gentoo.jenport case class D(atom: String, groupId: String, artifactId: String, mversion: String)
gentoo/jenport
src/main/scala/org/gentoo/jenport/D.scala
Scala
bsd-3-clause
111
/* * 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 ...
spark-test/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/bucketing/CoalesceBucketsInSortMergeJoin.scala
Scala
apache-2.0
5,367
trait Contravariant[F[_]] { def contramap[A, B](f: B => A)(fa: F[A]): F[B] }
hmemcpy/milewski-ctfp-pdf
src/content/1.8/code/scala/snippet25.scala
Scala
gpl-3.0
78
/* * Copyright DataGenerator Contributors * * 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...
mibrahim/DataGenerator
dg-common/src/main/scala/org/finra/datagenerator/common/Graph/AddParentToExistingNodeDescription.scala
Scala
apache-2.0
1,148
/** * Copyright (C) 2015-2016 DANS - Data Archiving and Networked Services (info@dans.knaw.nl) * * 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/LICENS...
PaulBoon/easy-stage-dataset
src/main/scala/nl/knaw/dans/easy/stage/fileitem/EasyItemContainerMd.scala
Scala
apache-2.0
992
/* * Copyright 2012-2020 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
Netflix/edda
src/main/scala/com/netflix/edda/RequestId.scala
Scala
apache-2.0
720
package implementationVoteSimple import Gvote.SystemGeneralDecomptage import Gvote.Eligible import GUIAbstractComponent.GUIComponentCST import Gvote.Candidat import Gvote.AbstractElecteur abstract class SystemeDecomptageSimple(_election : Election , _nom : String) extends SystemGeneralDecomptage(_nom){ type ImplE...
DoumbiaAmadou/FrameworkVote
src/implementationVoteSimple/SystemeDecomptageSimple.scala
Scala
mit
1,078
package com.twitter.io import java.lang.{Double => JDouble, Float => JFloat} import java.nio.charset.StandardCharsets import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks import org.scalatest.funsuite.AnyFunSuite final class BufByteWriterTest extends AnyFunSuite with ScalaCheckDrivenPropertyChecks { i...
twitter/util
util-core/src/test/scala/com/twitter/io/BufByteWriterTest.scala
Scala
apache-2.0
10,897
package views.json.ImportJob import java.time.Instant import org.specs2.mock.Mockito import com.overviewdocs.models.ImportJob class showSpec extends views.ViewSpecification with Mockito { trait BaseScope extends JsonViewSpecificationScope { val importJob = smartMock[ImportJob] importJob.documentSetId retur...
overview/overview-server
web/test/views/ImportJob/showSpec.scala
Scala
agpl-3.0
1,436
package amora.ui import scala.scalajs.js.JSApp object Main extends JSApp { val ui = new Ui override def main(): Unit = { ui.authenticate() ui.setupUI3() } }
sschaef/scalajs-test
ui/src/main/scala/amora/ui/Main.scala
Scala
mit
176
package day2 import scala.io.Source object DayOfCode2 { def smallestSide(l: Int, w:Int, h:Int):Int = List(l, w, h).combinations(2).map(side => side.reduce(_ * _)).min def surfaceArea(l: Int, w: Int, h: Int):Int = 2 * l * w + 2 * w * h + 2 * h * l def parse(s: String): List[Int] = s.split("x").toList.map { x ...
aeffrig/adventofcode15
src/main/scala/day2/DayOfCode2.scala
Scala
apache-2.0
1,084
/* * 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
core/src/main/scala/org/apache/spark/rpc/netty/Dispatcher.scala
Scala
apache-2.0
8,169
package org.jetbrains.plugins.scala package runner import com.intellij.openapi.project.Project import com.intellij.execution.configurations.{JavaParameters, RunConfigurationModule, ModuleBasedConfiguration, ConfigurationFactory} import com.intellij.openapi.module.{ModuleUtilCore, Module} import org.jetbrains.plugins.s...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/runner/BaseRunConfiguration.scala
Scala
apache-2.0
3,945
/* * 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...
jedesah/Quasar
mimir/src/test/scala/quasar/mimir/MathLibSpecs.scala
Scala
apache-2.0
63,843
/* Copyright (C) 2008-2014 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
iesl/fuse_ttl
src/factorie-factorie_2.11-1.1/src/main/scala/cc/factorie/app/nlp/Document.scala
Scala
apache-2.0
15,970
object Solutionex3_7 extends App { val ar = Array(12, 323, 2, 2, 12, 323, 10) ar.distinct }
koenighotze/scalafortheimpatient
src/main/scala/chapter3/ex3_7.scala
Scala
apache-2.0
96
/** MACHINE-GENERATED FROM AVRO SCHEMA. DO NOT EDIT DIRECTLY */ package avro.examples.baseball final case class Player(number: Int, first_name: String, last_name: String, nicknames: Seq[Nickname])
julianpeeters/avrohugger
avrohugger-tools/src/test/compiler/output/Player.scala
Scala
apache-2.0
197
package mesosphere.mesos.scale import mesosphere.AkkaIntegrationTest import mesosphere.marathon.IntegrationTest import mesosphere.marathon.integration.facades.MarathonFacade._ import mesosphere.marathon.integration.facades.{ITDeploymentResult, MarathonFacade, MesosFacade} import mesosphere.marathon.integration.setup._...
gsantovena/marathon
mesos-simulation/src/test/scala/mesosphere/mesos/scale/SingleAppScalingTest.scala
Scala
apache-2.0
6,107
/* * Copyright (c) 2011-14 Miles Sabin * * 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...
TomasMikula/shapeless
project/Build.scala
Scala
apache-2.0
7,298
/* * Copyright (c) 2012-2022 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.apach...
snowplow/schema-ddl
modules/core/src/main/scala/com.snowplowanalytics/iglu.schemaddl/redshift/ColumnAttribute.scala
Scala
apache-2.0
2,659
package nl.soqua.lcpi.repl.lib import nl.soqua.lcpi.interpreter.Context sealed trait TraceModePosition sealed trait AsciiModeToggle case object Enabled extends TraceModePosition with AsciiModeToggle case object Disabled extends TraceModePosition with AsciiModeToggle object ReplState { val empty: ReplState = Rep...
kevinvandervlist/lcpi
repl/src/main/scala/nl/soqua/lcpi/repl/lib/ReplState.scala
Scala
mit
670
package scala.collection.mutable import scala.collection._ import scala.collection.generic.CanBuildFrom trait Bag[A] extends scala.collection.Bag[A] with mutable.BagLike[A, mutable.Bag[A]] with generic.GrowableBag[A] { def update(elem: A, count: Int): this.type = setMultiplicity(elem, count) def setMult...
nicolasstucki/multisets
src/main/scala/scala/collection/mutable/Bag.scala
Scala
bsd-3-clause
2,001
package pd // When two players, are matched against each other, they play a series of rounds. import Tournament._ import scalaz._ import scalaz.std.AllInstances._ import scalaz.syntax.foldable._ case class BattleResult(a: (Player, Score), b: (Player, Score)) trait Rules { def score(plays: (Play, Play)): (Score, S...
marioaquino/prisoners_dilemma
src/main/scala/Battle.scala
Scala
mit
2,057
/* * Copyright 2014 Michael Krolikowski * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
mkroli/dns4s
core/src/test/scala/com/github/mkroli/dns4s/section/resource/NAPTRResourceSpec.scala
Scala
apache-2.0
3,028
package com.v_standard.vsp.compiler import com.v_standard.utils.ResourceUtil.using import java.io.{ByteArrayOutputStream, File, OutputStreamWriter} import java.util.Date import javax.script.{Compilable, CompiledScript, ScriptEngine, ScriptEngineManager} import scala.io.Source /** * スクリプトデータ。 */ case class ScriptDa...
VanishStandard/vsp
src/main/scala/com/v_standard/vsp/compiler/ScriptCompiler.scala
Scala
bsd-3-clause
2,262
package com.frontier45 /** * Created by du on 4/6/16. */ package object sparktemplate { val appName = "SparkTemplate" case class RunArgs( fname: String = "", out: String = "", spark_master: Option[String] = None, n_partitions: Int = 1 ) }
lucidfrontier45/SparkTemplate
src/main/scala/com/frontier45/sparktemplate/package.scala
Scala
mit
268
/** * © 2019 Refinitiv. 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/licenses/LICENSE-2.0 * * Unless required by applicable l...
dudi3001/CM-Well
server/cmwell-data-tools/src/main/scala/cmwell/tools/data/downloader/DataPostProcessor.scala
Scala
apache-2.0
2,107
package org.flowpaint.raster.tile /** * */ object TileService { // Tilesize of 1 << 6 == 64 val tileWidthShift = 6 val tileHeightShift = 6 val tileWidth = 1 << tileWidthShift val tileHeight = 1 << tileHeightShift val tilePixels: Int = tileWidth * tileHeight def tileIdForLocation(canvasX: Int, can...
zzorn/flowpaint
src/main/scala/org/flowpaint/raster/tile/TileService.scala
Scala
gpl-2.0
913
/* * Copyright 2014 - 2015 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 a...
wemrysi/quasar
core/src/main/scala/slamdata/engine/std/library.scala
Scala
apache-2.0
3,274
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.internal.testkit import java.nio.file.Files import java.util.concurrent.TimeUnit import akka.persistence.cassandra.testkit.CassandraLauncher import com.google.common.io.MoreFiles import com.google.common.io.Recur...
rcavalcanti/lagom
testkit/core/src/main/scala/com/lightbend/lagom/internal/testkit/CassandraTestServer.scala
Scala
apache-2.0
1,879
/* * Copyright 2013 - 2020 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...
outworkers/phantom
phantom-dsl/src/main/scala/com/outworkers/phantom/builder/query/Query.scala
Scala
apache-2.0
1,196
/* * Copyright 2021 The Kythe Authors. 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/licenses/LICENSE-2.0 * * Unless required by ap...
kythe/kythe-contrib
kythe/scala/com/google/devtools/kythe/analyzers/scala/KythePlugin.scala
Scala
apache-2.0
21,870
package io.getquill.context.sql import java.util.{ Date, UUID } import scala.BigDecimal import io.getquill.Spec case class EncodingTestType(value: String) trait EncodingSpec extends Spec { val context: SqlContext[_, _] import context._ case class EncodingTestEntity( v1: String, v2: BigDecimal, ...
jcranky/quill
quill-sql/src/test/scala/io/getquill/context/sql/EncodingSpec.scala
Scala
apache-2.0
4,193
/** MACHINE-GENERATED FROM AVRO SCHEMA. DO NOT EDIT DIRECTLY */ package test import scala.annotation.switch /** * Auto-Generated Schema * @param name Auto-Generated Field */ case class Pet(var name: String) extends org.apache.avro.specific.SpecificRecordBase { def this() = this("") def get(field$: Int): AnyRef...
julianpeeters/avrohugger
avrohugger-core/src/test/expected/schemagen/test/Pet.scala
Scala
apache-2.0
1,053
/* * Copyright (C) 2014-2015 Really Inc. <http://really.io> */ package io.really.gorilla import akka.actor.Props import akka.testkit.{ EventFilter, TestProbe, TestActorRef } import com.typesafe.config.ConfigFactory import io.really._ import _root_.io.really.Request.SubscribeOnObjects import _root_.io.really.gorilla...
reallylabs/really
modules/really-core/src/test/scala/io/really/gorilla/SubscribeAggregatorSpec.scala
Scala
apache-2.0
5,252
/* * Copyright (C) 2005, The Beangle 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...
beangle/commons
core/src/main/scala/org/beangle/commons/lang/types.scala
Scala
lgpl-3.0
1,059
package edu.gemini.seqexec.server import java.util.concurrent.{ScheduledExecutorService, ScheduledThreadPoolExecutor} import java.util.concurrent.atomic.{AtomicBoolean, AtomicReference} import scalaz._ import Scalaz._ import edu.gemini.pot.sp.SPObservationID import edu.gemini.seqexec.server.Executor._ import edu.gem...
arturog8m/ocs
bundle/edu.gemini.seqexec.server/src/main/scala/edu/gemini/seqexec/server/ExecutorImpl.scala
Scala
bsd-3-clause
3,043
package io.github.binaryfoo.lagotto import org.joda.time.DateTime import scala.collection.mutable case class JstackLogEntry(private val _fields: mutable.LinkedHashMap[String, String], private val timeFormat: Option[TimeExpr] = None, lines: String, source: SourceRef = null) extends LogEntry { val timestamp: DateTi...
binaryfoo/lagotto
src/main/scala/io/github/binaryfoo/lagotto/JstackLogEntry.scala
Scala
mit
1,074
/* * 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 ...
bwsw/sj-platform
core/sj-engine-core/src/main/scala/com/bwsw/sj/engine/core/testutils/benchmark/loader/tstreams/TStreamsBenchmarkDataSenderParameters.scala
Scala
apache-2.0
1,456
/*start*/"aB".groupBy(_.isUpper)/*end*/ //Map[Boolean, String]
LPTK/intellij-scala
testdata/typeInference/bugs/SCL2123.scala
Scala
apache-2.0
62
/* sbt -- Simple Build Tool * Copyright 2010 Mark Harrah */ package xsbt.api import Predef.{implicitly => ??, _} import sbt.Using import xsbti.api._ import sbinary._ import DefaultProtocol._ import java.io.File import scala.collection.mutable trait FormatExtra { def p2[A,B,R](unapply: R => (A,B))( apply: (A...
harrah/xsbt
compile/persist/src/main/scala/xsbt/api/APIFormats.scala
Scala
bsd-3-clause
12,407
package rspactors.vocab import rdftools.rdf.Vocab import rdftools.rdf._ import rdftools.rdf.RdfTools._ object LDP extends Vocab { override val iri: Iri = "http://www.w3.org/ns/ldp#" val Page = clazz("Page") val PageSortCriterion = clazz("PageSortCriterion") val IndirectContainer = clazz("IndirectContainer")...
jpcik/ldn-streams
src/main/scala/rspactors/vocab/LDP.scala
Scala
mit
1,170
package org.sgine.ui import android.os.Bundle import com.badlogic.gdx.backends.android.{AndroidApplicationConfiguration, AndroidApplication} /** * @author Matt Hicks <mhicks@sgine.org> */ class ImageTestActivity extends AndroidApplication { override def onCreate(savedInstanceState: Bundle) { super.onCreate(sa...
Axiometry/sgine
ui/example/src/main/scala/org/sgine/ui/ImageTestActivity.scala
Scala
bsd-3-clause
488
/* * 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 ...
BryanCutler/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/EnforceGroupingReferencesInAggregates.scala
Scala
apache-2.0
1,390
package org.bitcoins.server import akka.actor.ActorSystem import com.typesafe.config.{Config, ConfigFactory} import grizzled.slf4j.Logging import org.bitcoins.chain.config.ChainAppConfig import org.bitcoins.commons.config.{AppConfig, ConfigOps} import org.bitcoins.commons.util.ServerArgParser import org.bitcoins.core....
bitcoin-s/bitcoin-s
app/server/src/main/scala/org/bitcoins/server/BitcoinSAppConfig.scala
Scala
mit
8,629
/** * Created by akorovin on 21.12.2016. * NOTE: THEY ARE NOT PRIMITIVE TYPES * NOTE: THEY ARE CLASSES! * JUST SYNTACTICAL SUGAR * NOTE: MAX 22 TUPLES AVAILABLE (max 22 PARAMETERS) * NOTE: can change values only by copying */ object TestTuples { def main(args: Array[String]): Unit = { // INSTANTIATE...
aw3s0me/scala-tuts
scala_tuts/src/TestTuples.scala
Scala
apache-2.0
730
package im.actor.server.dialog import akka.actor.ActorSystem import im.actor.server.db.DbExtension import im.actor.server.model.Peer import im.actor.server.persist.social.RelationRepo import scala.concurrent.Future trait UserAcl { protected val system: ActorSystem // TODO: clarify names of params. protected ...
EaglesoftZJ/actor-platform
actor-server/actor-core/src/main/scala/im/actor/server/dialog/UserAcl.scala
Scala
agpl-3.0
1,127
package pureconfig import org.scalatest.EitherValues import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks class BaseSuite extends AnyFlatSpec with Matchers with EitherValues with ScalaCheckDrivenPrope...
melrief/pureconfig
testkit/src/main/scala/pureconfig/BaseSuite.scala
Scala
mpl-2.0
389
package filodb.memory.format.vectors import java.nio.ByteBuffer import com.typesafe.scalalogging.StrictLogging import debox.Buffer import org.agrona.{DirectBuffer, ExpandableArrayBuffer, MutableDirectBuffer} import org.agrona.concurrent.UnsafeBuffer import scalaxy.loops._ import filodb.memory.{BinaryRegion, MemFacto...
velvia/FiloDB
memory/src/main/scala/filodb.memory/format/vectors/HistogramVector.scala
Scala
apache-2.0
23,463
// Exercise 11: An external DSL, using Scala's Parser Combinator Library. // Here's the grammar definition with productions from the slides. import scala.util.parsing.combinator._ object RepeatParser extends JavaTokenParsers { var count = 0 // set by “n” def repeat = "repeat" ~> n <~ "times" ~ block def n ...
deanwampler/SeductionsOfScalaTutorial
tutorial-exercises/ex11-external-dsl.scala
Scala
apache-2.0
665
/* * 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
tests/src/test/scala/org/apache/openwhisk/core/entity/test/ExecHelpers.scala
Scala
apache-2.0
5,039
// scalac: -deprecation -Xfatal-warnings // abstract class Foo { def bar {} def baz def boo(i: Int, l: Long) def boz(i: Int, l: Long) {} def this(i: Int) { this() } // Don't complain here! def foz: Unit // Don't complain here! }
martijnhoekstra/scala
test/files/neg/procedure-deprecation.scala
Scala
apache-2.0
255
package uk.co.mattthomson.coursera.ggp.gresley.moveselector.statistical case class MonteCarloCount(total: Int, count: Int) { lazy val value = if (count == 0) 0 else total.toDouble / count.toDouble def update(score: Int) = MonteCarloCount(total + score, count + 1) override def toString = s"$value ($total / $cou...
matt-thomson/gresley
src/main/scala/uk/co/mattthomson/coursera/ggp/gresley/moveselector/statistical/MonteCarloCount.scala
Scala
mit
410
package org.jetbrains.plugins.scala package lang package psi package api package expr /** * @author Alexander Podkhalyuzin */ trait ScTryStmt extends ScExpression { def tryBlock = findChildByClassScala(classOf[ScTryBlock]) def catchBlock = findChild(classOf[ScCatchBlock]) def finallyBlock = findChild(classOf[...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/psi/api/expr/ScTryStmt.scala
Scala
apache-2.0
426
package org.openurp.edu.eams.teach.service.wrapper import org.openurp.base.CourseUnit import org.beangle.commons.lang.time.WeekDays.WeekDay class TimeZone { var weekStates: Array[String] = _ var units: List[CourseUnit] = _ var weeks: List[WeekDay] = _ }
openurp/edu-eams-webapp
core/src/main/scala/org/openurp/edu/eams/teach/service/wrapper/TimeZone.scala
Scala
gpl-3.0
275
package edu.cmu.lti.oaqa.cse.space.scala package object test { }
oaqa/bagpipes-old
src/test/java/edu/cmu/lti/oaqa/cse/space/scala/test/package.scala
Scala
apache-2.0
72
package org.jetbrains.plugins.scala package testingSupport.test.specs2 import com.intellij.execution.configurations._ import com.intellij.openapi.project.Project import com.intellij.psi.PsiClass import org.jetbrains.plugins.scala.testingSupport.ScalaTestingConfiguration import org.jetbrains.plugins.scala.testingSuppor...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/testingSupport/test/specs2/Specs2RunConfiguration.scala
Scala
apache-2.0
1,747
package sss.ancillary import us.monoid.web.Resty object MainClient { def main(args: Array[String]): Unit = { Resty.ignoreAllCerts() val defaultHttpConfig = DynConfig[ServerConfig]("httpServerConfig") val b = new Resty().text(s"http://127.0.0.1:${defaultHttpConfig.httpPort}/testhttp/ping") printl...
mcsherrylabs/sss.ancillary
src/test/scala/sss/ancillary/MainClient.scala
Scala
gpl-3.0
474
package sangria.starWars import sangria.execution.deferred.{Deferred, DeferredResolver} import scala.concurrent.{ExecutionContext, Future} import scala.util.Try object TestData { object Episode extends Enumeration { val NEWHOPE, EMPIRE, JEDI = Value } trait Character { def id: String def name: Opt...
sangria-graphql/sangria
modules/core/src/test/scala/sangria/starWars/TestData.scala
Scala
apache-2.0
3,307
package sri.universal.navigation import scala.scalajs.js package object reducer { type ReducerFunc = js.Function1[NavigationState,NavigationState] def defaultReducerFunc(defaultValue : NavigationState): ReducerFunc = { (state: NavigationState) => if(state != null) state else defaultValue } }
chandu0101/sri
universal/src/main/scala/sri/universal/navigation/reducer/package.scala
Scala
apache-2.0
307
package edu.gemini.pit.ui.util import edu.gemini.pit.ui.ShellAdvisor import swing._ import edu.gemini.pit.model.Model import edu.gemini.pit.ui.binding.BoundView import edu.gemini.model.p1.immutable.Proposal import scalaz._ import Scalaz._ class StatusBar(shellAdvisor: ShellAdvisor) extends Label with BoundView[Boolea...
arturog8m/ocs
bundle/edu.gemini.pit/src/main/scala/edu/gemini/pit/ui/util/StatusBar.scala
Scala
bsd-3-clause
1,011
package io.github.p3trur0 import org.scalatest.Matchers import org.scalatest.FlatSpec class HelloTestSpec extends FlatSpec with Matchers { it should "flat spec test" in { true shouldBe true } }
P3trur0/hackerrank
src/test/scala/io/github/p3trur0/HelloTestSpec.scala
Scala
mit
218
package uscala.util import scala.concurrent.duration._ /** * Class that allows to query if a specific amount of time has * elapsed or not. * * As an example, it can be useful when some polling mechanism * is needed to verify if an operation is successful or not. * * It can also be used as a replacement ...
albertpastrana/uscala
timeout/src/main/scala/uscala/util/Timeout.scala
Scala
mit
1,296
package scalanlp.optimize.linear import scalala.tensor._; import collection.mutable.ArrayBuffer import dense.{DenseMatrix, DenseVector} import sparse.SparseVector /** * DSL for LinearPrograms. Not thread-safe per instance. Make multiple instances * * Basic example: * {{{ * val lp = new LP; * import lp._; * va...
MLnick/scalanlp-core
learn/src/main/scala/scalanlp/optimize/linear/LinearProgram.scala
Scala
apache-2.0
5,506
package app.models import scala.concurrent.Future import com.mohiva.play.silhouette.api.{ Identity, LoginInfo } import app.models.ldap.UserConnection import app.services.cache.{ LDAPConnectionCache, UserAuthenticationCache } import app.utils.config.LDAPConfig import app.utils.Logger import app.utils.types.UserId /** ...
YoshinoriN/Credentiam
src/app/models/User.scala
Scala
apache-2.0
2,027
/** * TABuddy-Model - a human-centric K,V framework * * Copyright (c) 2012-2014 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.apach...
digimead/digi-TABuddy-model
src/main/scala/org/digimead/tabuddy/model/graph/ElementBox.scala
Scala
apache-2.0
15,437
package com.blinkbox.books.marvin.magrathea.api import java.util.UUID import java.util.concurrent.ForkJoinPool import com.blinkbox.books.elasticsearch.client.ElasticClientApi._ import com.blinkbox.books.elasticsearch.client._ import com.blinkbox.books.json.DefaultFormats import com.blinkbox.books.logging.DiagnosticEx...
blinkboxbooks/magrathea
src/main/scala/com/blinkbox/books/marvin/magrathea/api/IndexService.scala
Scala
mit
6,133
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.util import com.typesafe.config.ConfigFactory import java.util.concurrent.TimeUnit import org.scalatest._ import org.scalatest.time._ import org.scalatest.concurrent.Event...
espinhogr/ensime-server
testutil/src/main/scala/org/ensime/util/EnsimeSpec.scala
Scala
gpl-3.0
1,658
package se.gigurra.renderer.glimpl.uniforms import java.nio.FloatBuffer import javax.media.opengl.GL3ES3 import se.gigurra.renderer.Mat4x4 import se.gigurra.renderer.glimpl.GlShaderProgram class SimpleUniform(_gl_init: GL3ES3, program: GlShaderProgram, name: String) { val location = program.getUniformLocation(_gl...
GiGurra/gigurra-scala-2drenderer
src/main/scala/se/gigurra/renderer/glimpl/uniforms/SimpleUniform.scala
Scala
mit
1,353
package org.powlab.jeye.tests import org.powlab.jeye.tests.anonymous._ import org.powlab.jeye.decompile._ package anonymous { //TODO fail @org.junit.Ignore class AnonymousInnerClassTest1Test extends DecompileTestClass(classOf[AnonymousInnerClassTest1]) {} //TODO fail @org.junit.Ignore class AnonymousInn...
powlab/jeye
src/test/scala/org/powlab/jeye/tests/AnonymousTests.scala
Scala
apache-2.0
1,502
package com.sksamuel.elastic4s.api import com.sksamuel.elastic4s.Indexes import com.sksamuel.elastic4s.requests.settings.{GetSettingsRequest, UpdateSettingsRequest} trait SettingsApi { def getSettings(index: String, indexes: String*): GetSettingsRequest = getSettings(index +: indexes) def getSettings(indexes: In...
sksamuel/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/api/SettingsApi.scala
Scala
apache-2.0
716
/* * Copyright 2011 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 t...
nkhuyu/scrooge
scrooge-generator/src/main/scala/com/twitter/scrooge/AST/Node.scala
Scala
apache-2.0
2,349
/* * Copyright 2016 rdbc contributors * * 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...
rdbc-io/rdbc
rdbc-implbase/src/main/scala/io/rdbc/implbase/ConnectionFactoryPartialImpl.scala
Scala
apache-2.0
1,569
package com.lrs.common.models import com.lrs.common.logging.Logging import com.lrs.common.utils.Testing /** * Created by vagrant on 10/16/17. */ class TestAddLane extends Testing with Logging{ val TEST_ROAD = Road("Test", 1, "E") val direction_1 = Direction("E") val RP1 = ReferencePoint("RP1", TEST_ROAD.na...
edmundgmail/HighwaySystem
highway-common/src/test/scala/com/lrs/common/models/TestAddLane.scala
Scala
apache-2.0
2,497
package de.berlin.arzt.neotrainer class DefaultCharProvider(chars: Iterable[Char]) extends CharProvider { var charSource: DiscreteDistribution[Char] = null var lastChar: Char = 0 setChars(chars) def getNextChar: Char = { var newChar = charSource.getSample while (newChar == lastChar) { newChar =...
arzt/type-neo
src/main/scala/de/berlin/arzt/neotrainer/DefaultCharProvider.scala
Scala
gpl-2.0
910
/* * 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 ...
jeremiaswerner/openwhisk
tests/src/test/scala/org/apache/openwhisk/core/containerpool/docker/test/AkkaContainerClientTests.scala
Scala
apache-2.0
8,695
package texteditor import scala.language.implicitConversions class LineIterator(it: Iterator[Char]) extends Iterator[String] { private var blank = !it.hasNext private var ch: Option[Char] = None private def nextChar = if (ch.nonEmpty) { val c = ch.get; ch = None; c } else it.next def hasNext = blank || !ch.i...
volkc/REScala
Examples/Editor/src/main/scala/texteditor/LineOffset.scala
Scala
apache-2.0
2,182