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 (c) 2014 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, 12/24/14 6:58 PM */ package base.entity.perm import base.entity.test.EntityBaseSuite /** * Essentiall...
robconrad/base-api
project-entity/src/test/scala/base/entity/perm/PermSetGroupsTest.scala
Scala
mit
6,909
package com.temportalist.chalked.client import java.util import com.temportalist.chalked.client.gui.GuiChalkDust import com.temportalist.chalked.client.render.BlockChalkDustRenderer import com.temportalist.chalked.common.tile.TEChalkDust import com.temportalist.chalked.common.{Chalked, CommonProxy} import cpw.mods.fm...
TheTemportalist/Chalked
src/main/scala/com/temportalist/chalked/client/ClientProxy.scala
Scala
apache-2.0
1,554
package javaee6.web.cache import javax.enterprise.context.ApplicationScoped import javax.enterprise.inject.{Disposes, Produces} import org.infinispan.manager.{DefaultCacheManager, EmbeddedCacheManager} class EmbeddedCacheManagerProvider { @Produces @ApplicationScoped def getDefaultEmbeddedCacheManager: Embedde...
kazuhira-r/infinispan-examples
infinispan-cdi/src/main/scala/javaee6/web/cache/EmbeddedCacheManagerProvider.scala
Scala
mit
502
package ch.fhnw.ima.saav package model import ch.fhnw.ima.saav.model.domain.{CriteriaId, IndicatorId} import ch.fhnw.ima.saav.model.weight.{Weight, Weights} import io.circe.Error import io.circe.generic.auto._ import io.circe.parser._ object config { /** Application defaults and potential mismatches between config...
fhnw-saav/saav
src/main/scala/ch/fhnw/ima/saav/model/config.scala
Scala
mit
1,517
package fabricator import java.awt.font.{FontRenderContext, TextLayout} import java.awt.image.BufferedImage import java.awt.{Color, Font, Graphics2D, Rectangle} import fabricator.entities.CsvFileBuilder import fabricator.enums.{FileType, MimeType} import scala.util.Random object FileGenerator { def apply(): Fil...
edombowsky/fabricator
src/main/scala/fabricator/FileGenerator.scala
Scala
apache-2.0
4,191
/* * 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 ...
mike0sv/spark
mllib/src/main/scala/org/apache/spark/ml/feature/StringIndexer.scala
Scala
apache-2.0
15,471
/* * Copyright 2016 Dennis Vriend * * 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...
dnvriend/akka-template-project
src/main/scala/com/github/dnvriend/MessagePrinter.scala
Scala
apache-2.0
896
package io.taig.android.app.activity import android.app import android.app.TaskStackBuilder import android.content.Intent import android.content.res.Configuration import android.graphics.{Bitmap, Canvas} import android.os.Bundle import android.view.ActionMode.Callback import android.view.ContextMenu.ContextMenuInfo im...
Taig/Toolbelt
app/src/main/scala/io/taig/android/app/activity/Lifecycle.scala
Scala
mit
8,839
package de.christofreichardt.scala.ellipticcurve import de.christofreichardt.diagnosis.AbstractTracer import de.christofreichardt.diagnosis.TracerFactory import de.christofreichardt.scala.diagnosis.Tracing import java.io.BufferedInputStream import java.io.File import java.io.FileInputStream import java.util.Scanner ...
chr78rm/jca-provider
elliptic-curve-arithmetic/src/main/scala/de/christofreichardt/scala/ellipticcurve/PrimeBase.scala
Scala
gpl-3.0
1,494
package org.http4s package headers import cats.data.NonEmptyList import cats.syntax.foldable._ import org.http4s.parser.HttpHeaderParser import CharsetRange.Atom object `Accept-Charset` extends HeaderKey.Internal[`Accept-Charset`] with HeaderKey.Recurring { override def parse(s: String): ParseResult[`Accept-Charset...
aeons/http4s
core/src/main/scala/org/http4s/headers/Accept-Charset.scala
Scala
apache-2.0
1,146
/* * Copyright (c) 2015 Lucas Satabin * * 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 writ...
satabin/toolxit-ng
core/src/main/scala/toolxit/dimen/package.scala
Scala
apache-2.0
1,515
/* * 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/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQueryFileTest.scala
Scala
apache-2.0
3,394
package blended.security.scep.internal import blended.domino.TypesafeConfigWatching import blended.security.ssl.{CertificateProvider, CommonNameProvider} import blended.util.config.Implicits._ import domino.DominoActivator import blended.util.logging.Logger class ScepActivator extends DominoActivator with TypesafeCon...
lefou/blended
blended.security.scep/src/main/scala/blended/security/scep/internal/ScepActivator.scala
Scala
apache-2.0
1,124
/* * Copyright 2015 Nicolas Rinaudo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed...
nrinaudo/scala-csv
core/shared/src/test/scala/kantan/csv/ByteCodecTests.scala
Scala
mit
854
package test_data.v20 import scala.xml.Elem object XMLData extends utils.TestUtils { def madeUpField(xml: Elem) = { Seq( "I am an invalid field that should never appear in the pdf" ) } def functionalTestCase1(xml: Elem) = { val fields = XMLDataFields(xml) functionalTestCaseMandatoryFields...
Department-for-Work-and-Pensions/RenderingService
test/test_data/v20/XMLData.scala
Scala
mit
17,832
import scala.concurrent.duration.FiniteDuration import reactivemongo.bson.{ BSONDocument, BSONString } import reactivemongo.api.MongoConnection import reactivemongo.api.commands.CollStatsResult import reactivemongo.api.collections.bson.BSONCollection import org.specs2.concurrent.{ ExecutionEnv => EE } class Collecti...
maxime-gautre/ReactiveMongo
driver/src/test/scala/CollectionSpec.scala
Scala
apache-2.0
3,381
/* * Copyright 2011 Hui Wen Han, 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...
huiwenhan/PrefStore
src/main/scala/me/huiwen/prefz/conversions/Preference.scala
Scala
apache-2.0
1,620
import scala.concurrent._ import java.util.concurrent.atomic.AtomicInteger object Test { def main(args: Array[String]): Unit = { test() } def test() = { def await(f: Future[Any]) = Await.result(f, duration.Duration.Inf) val ec = new TestExecutionContext(ExecutionContext.Implicits.global) ...
yusuke2255/dotty
tests/run/future-flatmap-exec-count.scala
Scala
bsd-3-clause
1,427
/** * Copyright (C) 2012 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 or a...
0x6e6562/diffa
agent/src/test/scala/net/lshift/diffa/agent/itest/support/DifferencesHelper.scala
Scala
apache-2.0
3,364
/* * 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...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/nn/FPN.scala
Scala
apache-2.0
5,482
package org.zouzias.spark.lucenerdd.examples.linkage import org.apache.spark.sql.DataFrame object LinkageUtils { def matches(linkageResults: DataFrame, truthDF: DataFrame, leftId: String, rightId: String) : Long = { linkageResults .join(truthDF, truthDF.col(leftId).equalTo(linkageResults(...
zouzias/spark-lucenerdd-examples
src/main/scala/org/zouzias/spark/lucenerdd/examples/linkage/LinkageUtils.scala
Scala
apache-2.0
840
/* * 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 ...
mayunSaicmotor/incubator-carbondata
integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonHiveMetadataUtil.scala
Scala
apache-2.0
1,727
package collections object Pack { // Hint : takeWhile/dropWhile or span def pack[T](list: List[T]): List[List[T]] = list match { case Nil => Nil case h :: t => val list1 = list.takeWhile(e => e == h) val rest = list.dropWhile(e => e == h) val listRest = pack(rest) list1 :: listRest ...
PiSurQuatre/fp-scala-public
exercises/src/main/scala/collections/Pack.scala
Scala
mit
418
package io.youi import io.youi.net.{Path, Protocol, URL} import org.scalajs.dom._ import reactify.{Channel, Val, Var} import scala.scalajs.js /** * Convenience functionality for working with browser history. */ object History { /** * If set to true calling push and replace will always result in the same fu...
outr/youi
dom/src/main/scala/io/youi/History.scala
Scala
mit
3,988
package unfiltered import unfiltered.request.HttpRequest import unfiltered.response.{ResponseFunction,HttpResponse,Pass} object Cycle { /** A rountrip intent is a set of instructions for producting * a complete response to a request. Plans that contain intents * of this type can be run against a general set o...
softprops/Unfiltered
library/src/main/scala/intents.scala
Scala
mit
408
package com.twitter.zipkin.web import com.twitter.zipkin.common.{Annotation, BinaryAnnotation, Span} import org.specs.Specification import com.twitter.zipkin.common.json.ZipkinJson class JsonSerializationSpec extends Specification { "Jerkson" should { "serialize" in { "span with no annotations" in { ...
tangyang/zipkin
zipkin-web/src/test/scala/com/twitter/zipkin/web/JsonSerializationSpec.scala
Scala
apache-2.0
498
package class_instance_extractor import com.hp.hpl.jena.rdf.model.ResourceFactory import com.hp.hpl.jena.util.FileManager import java.io._ import scala.collection.JavaConversions._ import scala.collection.mutable.Map import com.hp.hpl.jena.vocabulary.OWL /** * 1. Extracting class-instance relationships *...
t-morita/JWO_Refinement_Tools
src/main/scala/class_instance_extractor/ClassInstanceExtractor.scala
Scala
apache-2.0
2,288
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.fixture import org.ensime.vfs._ import org.scalatest.{ BeforeAndAfterAll, Suite } trait EnsimeVFSFixture { def withVFS[T](testCode: EnsimeVFS => T): T } trait Isolate...
ensime/ensime-server
testutil/src/main/scala/org/ensime/fixture/EnsimeVFSFixture.scala
Scala
gpl-3.0
1,069
/* * 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 ...
ioana-delaney/spark
core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala
Scala
apache-2.0
25,735
package frdomain.ch8 package cqrs.lib import collection.concurrent.TrieMap import scalaz._ import Scalaz._ import Common._ import spray.json._ trait EventStore[K] { /** * gets the list of events for an aggregate key `key` */ def get(key: K): List[Event[_]] /** * puts a `key` and its associated `event...
debasishg/frdomain
src/main/scala/frdomain/ch8/cqrs/lib/EventStore.scala
Scala
apache-2.0
2,286
/* * 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-jackson/src/test/scala/de/heikoseeberger/akkahttpjackson/ExampleApp.scala
Scala
apache-2.0
2,476
implicit val identityFunctor = new Functor[Id] { def fmap[A, B](f: A => B)(x: Id[A]): Id[B] = f(x) }
hmemcpy/milewski-ctfp-pdf
src/content/1.8/code/scala/snippet06.scala
Scala
gpl-3.0
106
/* * Copyright 2009-2011 WorldWide Conferencing, 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.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
lift/framework
core/json/src/test/scala/net/liftweb/json/ParserBugs.scala
Scala
apache-2.0
1,943
package com.airbnb.scheduler.api import java.util.logging.{Level, Logger} import javax.ws.rs._ import javax.ws.rs.core.{MediaType, Response} import javax.ws.rs.core.Response.Status import scala.Array import com.airbnb.scheduler.config.SchedulerConfiguration import scala.collection.mutable.ListBuffer import com.airbnb...
snegi/chronos
src/main/scala/com/airbnb/scheduler/api/StatsResource.scala
Scala
apache-2.0
2,403
package com.xantoria.flippy.serialization import org.scalatest.Suites class SerializationSuite extends Suites( new SerializerSpec, new StringSerializerSpec, new NetworkingSerializerSpec, new NumberSerializerSpec )
giftig/flippy
core/src/test/scala/com/xantoria/flippy/serialization/SerializationSuite.scala
Scala
mit
224
package inloopio.indicator.function import inloopio.math.timeseries.Null import inloopio.math.timeseries.TBaseSer /** * * @author Caoyuan Deng */ class DMFunction(_baseSer: TBaseSer) extends Function(_baseSer) { val _dmPlus = TVar[Double]() val _dmMinus = TVar[Double]() override def set(args: Any*): Unit =...
dcaoyuan/inloopio-libs
inloopio-indicator/src/main/scala/inloopio/indicator/function/DMFunction.scala
Scala
bsd-3-clause
1,661
package cromwell.engine.db import cromwell.engine._ import cromwell.engine.backend._ import cromwell.engine.db.slick.{Execution, ExecutionInfo} import wdl4s.values.WdlFile case class ExecutionInfosByExecution(execution: Execution, executionInfos: Seq[ExecutionInfo]) { import ExecutionInfosByExecution._ lazy val c...
cowmoo/cromwell
engine/src/main/scala/cromwell/engine/db/ExecutionInfosByExecution.scala
Scala
bsd-3-clause
4,422
/** * Copyright (C) 2016 Verizon. 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 law o...
Verizon/trapezium
framework/src/test/scala/com/verizon/bda/trapezium/framework/server/AkkaRouteHandlerTest.scala
Scala
apache-2.0
2,481
package main.java.piratebot.pirates import main.java.piratebot._ class SpanishGovernor(game: Game, player: Player) extends Pirate(game, player) { val rank = 30 val name = "Spanish Governor" override def dayAction(round : Round): RetriableMethodResponse.Value = { for (p <- player.pirates) { ...
ItCouldHaveBeenGreat/Eyepatch
src/main/java/piratebot/pirates/SpanishGovernor.scala
Scala
gpl-3.0
670
/* * The MIT License (MIT) * * Copyright (c) 2016 Algolia * http://www.algolia.com/ * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation...
algolia/algoliasearch-client-scala
src/test/scala/algolia/dsl/GetObjectTest.scala
Scala
mit
2,786
package rocks.muki.graphql.codegen import cats.kernel.laws.discipline.SemigroupTests import cats.tests.CatsSuite import org.scalacheck.Arbitrary class FailureInstancesSpec extends CatsSuite { implicit private val failureArb: Arbitrary[Failure] = Arbitrary(Arbitrary.arbString.arbitrary.map(Failure(_))) checkAll("...
muuki88/sbt-graphql
src/test/scala/rocks/muki/graphql/codegen/FailureInstancesSpec.scala
Scala
apache-2.0
378
package com.avsystem.commons package serialization /** * Wrapper over [[ObjectInput]] that lets you peek next field name without advancing the input. */ final class PeekingObjectInput(original: ObjectInput) extends ObjectInput { private[this] var peekedField: FieldInput = _ override def knownSize: Int = origi...
AVSystem/scala-commons
commons-core/src/main/scala/com/avsystem/commons/serialization/PeekingObjectInput.scala
Scala
mit
885
/** * Copyright (C) 2012 Inria, University Lille 1. * * This file is part of PowerAPI. * * PowerAPI 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 * License, or (at your...
abourdon/powerapi-akka
sensors/sensor-mem-sigar/src/main/scala/fr/inria/powerapi/sensor/mem/sigar/MemSensor.scala
Scala
agpl-3.0
1,908
package org.jetbrains.plugins.scala package lang package parameterInfo import java.awt.Color import _root_.org.jetbrains.plugins.scala.editor.documentationProvider.ScalaDocumentationProvider import _root_.org.jetbrains.plugins.scala.lang.psi.types._ import _root_.org.jetbrains.plugins.scala.lang.resolve.{ResolveUtils...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/parameterInfo/ScalaFunctionParameterInfoHandler.scala
Scala
apache-2.0
30,158
package com.twitter.finagle.netty4 import com.twitter.finagle.FinagleInit import com.twitter.finagle.stats.FinagleStatsReceiver import io.netty.util.ResourceLeakDetector import io.netty.util.ResourceLeakDetectorFactory /** * Runs prior initialization of any client/server in order to set Netty 4 system properties * ...
twitter/finagle
finagle-netty4/src/main/scala/com/twitter/finagle/netty4/Netty4Init.scala
Scala
apache-2.0
4,367
package com.linterpreteur.taja import org.scalatest.{FlatSpec, Matchers} class TajaSpec extends FlatSpec with Matchers { it should "compose individual letters into a block" in { val letters = Array('ㅁ', 'ㅏ', 'ㅅ') val block = "맛" val composed = Taja.compose(letters(0), letters(1), letters(2)) compo...
linterpreteur/taja
jvm/src/test/scala/com/wooseopkim/taja/TajaSpec.scala
Scala
mit
3,251
package com.wavesplatform.consensus.nxt import com.wavesplatform.account.{Address, KeyPair} import com.wavesplatform.common.state.ByteStr import com.wavesplatform.common.utils.EitherExt2 import com.wavesplatform.consensus.TransactionsOrdering import com.wavesplatform.test.PropSpec import com.wavesplatform.transaction....
wavesplatform/Waves
node/src/test/scala/com/wavesplatform/consensus/nxt/TransactionsOrderingSpecification.scala
Scala
mit
6,017
import org.scalatest._ class AdWordsToGraphiteTests extends FlatSpec with Matchers { "AdWrodsToGraphiteTests" should "have tests" in { true should === (true) } }
stevesie/adwords-to-graphite
src/test/scala/AdWordsToGraphiteTests.scala
Scala
gpl-2.0
172
package com.atomist.rug.kind.java import com.atomist.graph.GraphNode import com.atomist.rug.kind.core.ProjectMutableView import com.atomist.rug.kind.java.support._ import com.atomist.rug.spi._ class JavaProjectType extends Type with ReflectivelyTypedType { override def description = "Java project" overrid...
atomist/rug
src/main/scala/com/atomist/rug/kind/java/JavaProjectType.scala
Scala
gpl-3.0
646
package org.mauritania.photosync.starter import java.io.{File, PrintWriter} import org.mauritania.photosync.Constants import org.mauritania.photosync.olympus.client.CameraClient import org.mauritania.photosync.olympus.sync.FilesManager import org.mauritania.photosync.starter.Os.Windows import org.mauritania.photosync...
mauriciojost/olympus-photosync
src/main/scala/org/mauritania/photosync/starter/Starter.scala
Scala
apache-2.0
3,697
package play.core.server import scala.language.postfixOps import play.api._ import play.core._ import play.api.mvc._ import play.api.libs.iteratee._ import play.api.libs.iteratee._ import play.api.libs.iteratee.Input._ import play.api.libs.concurrent._ import akka.actor._ import akka.actor.Actor._ import akka.routin...
noel-yap/setter-for-catan
play-2.1.1/framework/src/play/src/main/scala/play/core/server/Server.scala
Scala
apache-2.0
2,512
/* * Part of NDLA learningpath-api. * Copyright (C) 2016 NDLA * * See LICENSE * */ package no.ndla.learningpathapi import org.scalatra.ScalatraServlet import org.scalatra.swagger._ class ResourcesApp(implicit val swagger: Swagger) extends ScalatraServlet with NativeSwaggerBase { get("/") { renderSwagger2...
NDLANO/learningpath-api
src/main/scala/no/ndla/learningpathapi/LearningpathSwagger.scala
Scala
gpl-3.0
1,083
package rexstream.rex.vector import rexstream.{DependencyProvider, RexInfo, RexTypeNames, RexVector} /** * Created by GregRos on 09/04/2016. */ private[rexstream] class RexVectorLink[T](inner : RexVector[T]) extends RexMap[T, T](inner, _.link_>) { override val info = new RexInfo { val isLazy = true ...
GregRos/Rexstream
ScalaFBL/src/rexstream/rex/vector/RexVectorLink.scala
Scala
mit
467
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.docs import java.io.InputStream import play.doc.{ FileHandle, FileRepository } /** * A file repository that aggregates multiple file repositories * * @param repos The repositories to aggregate */ class AggregateFileReposito...
wsargent/playframework
framework/src/play-docs/src/main/scala/play/docs/AggregateFileRepository.scala
Scala
apache-2.0
842
import java.net.InetSocketAddress import akka.actor.ActorSystem import akka.util.ByteString import colossus.core.{BackoffMultiplier, BackoffPolicy, IOSystem} import colossus.metrics.MetricAddress import colossus.protocols.http.HttpMethod.Get import colossus.protocols.http.Http import colossus.protocols.http.UrlParsing...
tumblr/colossus
colossus-docs/src/main/scala/RedisRetryClient.scala
Scala
apache-2.0
1,652
package org.akka.essentials.zeromq.example1 import akka.actor.Actor import akka.actor.ActorLogging import akka.util.duration._ import akka.zeromq.Bind import akka.zeromq.SocketType import akka.zeromq.ZeroMQExtension import akka.zeromq._ import akka.actor.Cancellable case class Tick class PublisherActor extends Actor ...
rokumar7/trial
AkkaWithZeroMQ/src/main/scala/org/akka/essentials/zeromq/example1/PublisherActor.scala
Scala
unlicense
863
package net.nomadicalien.ch5.free.repository import java.util.Date import net.nomadicalien.ch5.free.free.AccountRepo import net.nomadicalien.ch5.free.model.common.Amount import net.nomadicalien.ch5.free.model.{Account, Balance} import scalaz.Free // Listing 5.6 The building blocks of account repository DSL sealed t...
BusyByte/functional-n-reactive-domain-modeling
chapter5/src/main/scala/free/repository/repositories.scala
Scala
apache-2.0
1,294
package com.esri import com.esri.core.geometry.{Envelope2D, Geometry, MultiPath, OperatorClip} import spire.implicits.cfor import scala.collection.mutable.ArrayBuffer case class FeatureMulti(val geom: Geometry, val attr: Array[String]) extends Serializable { def asMultiPath() = geom.asInstanceOf[MultiPath] def...
mraad/spark-snap-points
src/main/scala/com/esri/FeatureMulti.scala
Scala
apache-2.0
1,439
package edu.gemini.p1monitor import config.P1MonitorConfig import javax.mail.internet.{MimeMessage, InternetAddress} import java.util.logging.{Level, Logger} import java.util.Properties import javax.mail.{Transport, Message, Session} import edu.gemini.model.p1.immutable._ import edu.gemini.p1monitor.P1Monitor._ impor...
arturog8m/ocs
bundle/edu.gemini.p1monitor/src/main/scala/edu/gemini/p1monitor/P1MonitorMailer.scala
Scala
bsd-3-clause
5,522
package net.devkat.ocm case class Path(val names:List[String], val absolute:Boolean) { def /(name:String) = Path(names ::: name :: Nil, absolute) override def toString = (absolute match { case true => "" :: names case false => names }) mkString "/" } object Path { val root = Path(Nil, true) ...
devkat/scala-ocm
core/src/main/scala/net/devkat/ocm/Path.scala
Scala
apache-2.0
430
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
akopich/spark
resource-managers/yarn/src/main/scala/org/apache/spark/launcher/YarnCommandBuilderUtils.scala
Scala
apache-2.0
1,418
package report.donut.transformers.cucumber case class Tag(name: String) case class Result(duration: Long = 0L, status: String = "", error_message: String = "") case class Argument(offset: Int, `val`: String = "") case class Match(location: String = "", arguments: Option[List[Argument]]) case class BeforeHook(resul...
MagenTys/donut
src/main/scala/report/donut/transformers/cucumber/CucumberModel.scala
Scala
mit
1,958
/* * Copyright 2013 Maurício Linhares * * Maurício Linhares licenses this file to you under the Apache License, * version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
ImLiar/postgresql-async
postgresql-async/src/main/scala/com/github/mauricio/async/db/postgresql/exceptions/ColumnDecoderNotFoundException.scala
Scala
apache-2.0
839
package com.twitter.finagle.loadbalancer import com.twitter.finagle._ import com.twitter.finagle.client.Transporter import com.twitter.finagle.stats._ import com.twitter.finagle.util.DefaultMonitor import com.twitter.util.{Activity, Var} import java.util.logging.{Level, Logger} import scala.util.control.NonFatal /** ...
mkhq/finagle
finagle-core/src/main/scala/com/twitter/finagle/loadbalancer/LoadBalancerFactory.scala
Scala
apache-2.0
14,826
package config import uk.gov.hmrc.http._ import uk.gov.hmrc.http.hooks.HttpHooks import uk.gov.hmrc.play.audit.http.HttpAuditing import uk.gov.hmrc.play.audit.http.connector.AuditConnector import uk.gov.hmrc.play.auth.microservice.connectors.AuthConnector import uk.gov.hmrc.play.config.{AppName, RunMode, ServicesConfi...
andywhardy/address-reputation-ingester
app/config/microserviceWiring.scala
Scala
apache-2.0
991
/** * Copyright (C) 2007 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This prog...
brunobuzzi/orbeon-forms
xforms/jvm/src/main/scala/org/orbeon/oxf/xforms/action/XFormsAction.scala
Scala
lgpl-2.1
6,592
package com.lightreporter.registration import java.util.Date import java.util.concurrent.TimeUnit import java.util.concurrent.locks.{Condition, Lock, ReentrantLock} import akka.actor.ActorRef /** * Created by y28yang on 5/4/2016. */ class SlowReceiver(testRef: ActorRef,val lock:Lock=new ReentrantLock) extends St...
wjingyao2008/firsttry
lightreporter/src/test/scala/com/lightreporter/Registration/SlowReceiver.scala
Scala
apache-2.0
483
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package docs.scaladsl.cluster.pubsub package example { import akka.NotUsed import akka.stream.scaladsl.Source import com.lightbend.lagom.scaladsl.api.Service import com.lightbend.lagom.scaladsl.api.ServiceCall import play.api.libs....
ignasi35/lagom
docs/manual/scala/guide/cluster/code/PubSub.scala
Scala
apache-2.0
6,603
/* Copyright (c) 2017, Robby, Kansas State University 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 source code must retain the above copyright notice, this list of cond...
sireum/v3-runtime
macros/shared/src/main/scala/org/sireum/$internal/Macro.scala
Scala
bsd-2-clause
10,153
/* * 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
scalactic/src/main/scala/org/scalactic/SetEqualityConstraints.scala
Scala
apache-2.0
5,407
/* * Copyright 2016 Carlo Micieli * * 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...
CarloMicieli/hascalator
core/src/main/scala/io/hascalator/data/Rational.scala
Scala
apache-2.0
1,209
// Copyright 2016 Foursquare Labs Inc. All Rights Reserved. package io.fsq.hfile.reader.concrete.mmap // hbase-0.94.6-cdh4.4.0-sources/org/apache/hadoop/hbase/util/ClassSize.java object ClassSize { val REFERENCE = 8 val ARRAY = align(3 * REFERENCE) val OBJECT = 2 * REFERENCE def align(num: Int): Int = { ...
foursquare/fsqio
src/jvm/io/fsq/hfile/reader/concrete/mmap/ClassSize.scala
Scala
apache-2.0
513
/* * 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 * distribute...
wvlet/airframe
airframe-codec/src/main/scala/wvlet/airframe/codec/TimeCodec.scala
Scala
apache-2.0
2,452
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
starpit/openwhisk
common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/DockerToActivationLogStore.scala
Scala
apache-2.0
3,938
package com.octobeat import com.mpatric.mp3agic.Mp3File /** * Created by sam on 23/10/14. */ object Mp3Manager { def loadFile(path:String):Mp3File = { new Mp3File(path) } val passBy: PartialFunction[Mp3File, Mp3File] = { case mp3file: Mp3File => mp3file } val removeId3v1Tag: PartialFunction[M...
sammyrulez/flaming-octo-beat
src/main/scala/com/octobeat/Mp3Manager.scala
Scala
mit
1,573
/* * 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 t...
davidbernick/zipkin
zipkin-hadoop/src/main/scala/com/twitter/zipkin/hadoop/WorstRuntimesPerTrace.scala
Scala
apache-2.0
2,121
package scala.build import org.pantsbuild.jarjar import org.pantsbuild.jarjar._ import org.pantsbuild.jarjar.util._ import scala.collection.JavaConverters._ import java.util.jar._ import java.io._ import sbt._ object JarJar { sealed abstract class JarJarConfig { def toPatternElement: PatternElement } object...
shimib/scala
project/JarJar.scala
Scala
bsd-3-clause
3,159
package com.matianl.explore import org.junit.runner.RunWith import org.specs2.mutable._ import org.specs2.runner._ /** * Sample specification. * * This specification can be executed with: scala -cp <your classpath=""> ${package}.SpecsTest * Or using maven: mvn test * * For more information on how to write o...
matinalhope/explore
scala-base/src/test/scala/com/matianl/explore/specs.scala
Scala
apache-2.0
792
/** * Copyright 2015 Frank Austin Nothaft * * 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 ...
fnothaft/gnocchi
gnocchi-cli/src/main/scala/net/fnothaft/gnocchi/cli/ReduceDimensions.scala
Scala
apache-2.0
3,041
import sbt._ import sbt.Keys._ object QuickfixsBuild extends Build { lazy val quickfixs = Project( id = "quickfixs", base = file("."), settings = Project.defaultSettings ++ Seq( name := "quickfixs", organization := "com.bostontechnologies", version := "1.0.0", scalaVersion := "2....
Forexware/quickfixs
project/QuickfixsBuild.scala
Scala
apache-2.0
733
package examples object HelloScala { def main(args: Array[String]): Unit = { println("Hello, world!") } }
mattmoor/bazel-glibc
java/examples/HelloScala.scala
Scala
apache-2.0
114
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600j/v2/J4.scala
Scala
apache-2.0
768
/* * Copyright 2014-2016 the original author or 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 ap...
amuramatsu/Laika
core/src/main/scala/laika/render/FOProperties.scala
Scala
apache-2.0
11,458
// DisplayVector.scala def show(n:Int):Unit = { println("> "+ n) } val v = Vector(1, 2, 3, 4) v.foreach(show)
P7h/ScalaPlayground
Atomic Scala/atomic-scala-examples/examples/27_FunctionsasObjects/DisplayVector.scala
Scala
apache-2.0
111
package peregin.gpv.gui.gauge import java.awt._ import java.awt.geom.Arc2D import peregin.gpv.model.{Sonda, MinMax, InputValue} import peregin.gpv.util.Trigo._ import peregin.gpv.util.UnitConverter trait RadialSpeedGauge extends GaugePainter { lazy val dummy: InputValue = InputValue(27.81, MinMax.max(62)) overr...
peregin/gps-overlay-on-video
src/main/scala/peregin/gpv/gui/gauge/RadialSpeedGauge.scala
Scala
mit
4,503
package models.daos.slickdaos import models.User import play.api.db.slick._ import slick.driver.PostgresDriver.simple._ import DBTableDefinitions._ import com.mohiva.play.silhouette.api.LoginInfo import scala.concurrent.Future import java.util.UUID import play.Logger import models.daos.UserDAO import play.api.db.DB im...
joaoraf/tripspace
app/models/daos/slickdaos/UserDAOSlick.scala
Scala
apache-2.0
1,515
package uk.gov.hmrc.smartstub import org.scalatest.prop.Checkers import org.scalacheck.Arbitrary._ import org.scalacheck.Prop._ import org.scalatest.FlatSpec class EnumerableSpec extends FlatSpec with Checkers { "A Nino" should "convert back and from a Long unchanged" in { import Enumerable.instances.ninoEnum ...
hmrclt/stub-data-generator
src/test/scala/EnumerableSpec.scala
Scala
apache-2.0
424
/* * Copyright 2014-2021 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...
copperlight/atlas
atlas-chart/src/main/scala/com/netflix/atlas/chart/graphics/Legend.scala
Scala
apache-2.0
2,352
package carryx.amazon.api.stackable /** * @author alari (name.alari@gmail.com) * @since 31.10.13 18:54 * * @see http://docs.aws.amazon.com/AWSECommerceService/latest/DG/RG_Images.html */ trait ImagesRG extends RG{ self: AmazonItem => abstract override def rgName = buildName(super.rgName, "Images") lazy va...
alari/amazon-scala-ecommerce
src/main/scala/carryx/amazon/api/stackable/ImagesRG.scala
Scala
apache-2.0
1,069
package org.jetbrains.plugins.scala.testingSupport.scalatest.scala2_11.scalatest3_0_1 import org.jetbrains.plugins.scala.DependencyManagerBase._ import org.jetbrains.plugins.scala.base.libraryLoaders.{IvyManagedLoader, LibraryLoader} import org.jetbrains.plugins.scala.testingSupport.scalatest.ScalaTestTestCase /** *...
jastice/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/testingSupport/scalatest/scala2_11/scalatest3_0_1/Scalatest2_11_3_0_1_Base.scala
Scala
apache-2.0
688
import sbt._ import Keys._ import play.Project._ object ApplicationBuild extends Build { val buildOrganization = "io.github.chaosky" val appName = "loom" val appVersion = "1.0-SNAPSHOT" val appDependencies = Seq( // Add your project dependencies here, // "org.seleniumhq.selenium" % "selenium-firefox-...
chaosky/loom
project/Build.scala
Scala
mit
989
package mesosphere.marathon package state import com.wix.accord._ import mesosphere.UnitTest import mesosphere.marathon.api.serialization.VolumeSerializer import mesosphere.marathon.api.v2.ValidationHelper import org.apache.mesos.Protos.Resource.DiskInfo.Source import org.apache.mesos.Protos.Volume.Mode class VolumeT...
Caerostris/marathon
src/test/scala/mesosphere/marathon/state/VolumeTest.scala
Scala
apache-2.0
5,950
/* * Copyright (C) 2012 Lalit Pant <pant.lalit@gmail.com> * * The contents of this file are subject to the GNU General Public License * Version 3 (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.gnu.org/copyleft/gpl.html * *...
vnkmr7620/kojo
KojoEnv/src/net/kogics/kojo/xscala/Help.scala
Scala
gpl-3.0
34,357
package dundertext.editor.cmd object MoveCursor { object Left extends CommandDescription { def apply() = new Left } class Left extends SubtitlingCommand { override def applies: Boolean = !cursor.isAtBeginningOfRow override def execute(): Unit = { cursor.moveLeft(1) } } object ...
dundertext/dundertext
editor/src/main/scala/dundertext/editor/cmd/MoveCursor.scala
Scala
gpl-3.0
1,609
/* * Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com> */ package scalaguide.upload.fileupload { import scala.concurrent.ExecutionContext import play.api.inject.guice.GuiceApplicationBuilder import play.api.test._ import org.junit.runner.RunWith import org.specs2.runner.JUnitRunner imp...
Shenker93/playframework
documentation/manual/working/scalaGuide/main/upload/code/ScalaFileUpload.scala
Scala
apache-2.0
5,278
package vanadis.modules.examples.scalacalc.calculator class Expression(expr: String) { def split:Array[String] = expr.toLowerCase.substring(0, expr.length - 1).split("\\s+") val op = split(0).toLowerCase val args = new Array[Int](split.length - 1) for (i:Int <- 1.to(args.length)) { args(i - 1) = Integer....
kjetilv/vanadis
modules/examples/scalacalc/calculator/src/main/scala/vanadis/modules/examples/scalacalc/calculator/Expression.scala
Scala
apache-2.0
344
package cn.edu.suda.ada.spatialspark.core import scala.math._ /** * The class Trajectory is an abstract representation of a trajectory, which basically contains a list * of GPS points and an ID that uniquely identifies it. This class provides some basic operations that * can be performed to answer queries on a part...
LiYangsuda/SpatialSpark
src/main/scala/cn/edu/suda/ada/spatialspark/core/Trajectory.scala
Scala
apache-2.0
3,866
import java.io.{FileOutputStream, FileInputStream} import scala.tools.asm.{ClassWriter, Opcodes, ClassReader} import scala.tools.asm.tree.{InsnNode, ClassNode} import scala.tools.nsc.backend.jvm.AsmUtils import scala.tools.partest.DirectTest import scala.jdk.CollectionConverters._ /** * Test that ClassReader does no...
scala/scala
test/files/run/icode-reader-dead-code.scala
Scala
apache-2.0
2,160
/** * 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...
eljefe6a/kafka
core/src/main/scala/kafka/coordinator/GroupMetadataManager.scala
Scala
apache-2.0
44,419
package services.free import cats.free.{Free, Inject} import cats.~> import monix.eval.Task object DataOps { sealed trait DSL[A] final case class Add(value: String) extends DSL[Option[String]] final case class FindAll() extends DSL[List[String]] } final class DataOpService[F[_]](implicit I: Inject[DataOps.DSL,...
radusw/tagless-free-monix-sample
src/main/scala/services/free/DataOpService.scala
Scala
apache-2.0
964