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 com.nekogata.backlogger.domain.setting case class Setting(val apiKey:String, val spaceName: String) { def setApiKey(k: String) = copy(apiKey = k) def setSpaceName(s: String) = copy(spaceName = s) }
Shinpeim/BackLogger
scala/src/main/scala/com/nekogata/backlogger/domain/setting/Setting.scala
Scala
mit
211
package models import play.api.Play import play.api.Play.current import play.api.Logger import scala.collection.JavaConverters._ import com.typesafe.config.Config object Environment { type ConnectionName = String val connectionNames: List[ConnectionName] = { Play.configuration.getStringList("databases.connecti...
flurdy/sortingoffice
app/models/environment.scala
Scala
mit
2,574
/*********************************************************************** * Copyright (c) 2013-2020 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...
ccri/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/iterators/AttributeIndexFilteringIteratorTest.scala
Scala
apache-2.0
5,110
package signal import org.scalatest.FunSuite import org.scalatest.Matchers import breeze.math._ class FFTTest extends FunSuite with Matchers { import Comparisons._ test("apply an FFT to a sequence of Doubles") { val x = List[Double](3, 5, 2, 8, 7, 9, 3, 1) val hExpected = List[Complex]( // from Octav...
lancelet/scalasignal
src/test/scala/signal/FFTTest.scala
Scala
lgpl-2.1
1,728
package com.twitter.finagle.oauth2 case class ProtectedResourceRequest(headers: Map[String, Seq[String]], params: Map[String, Seq[String]]) extends RequestBase(headers, params) { def oauthToken: Option[String] = param("oauth_token") def accessToken: Option[String] = param("access_token") def requireAccessTo...
yonglehou/finagle-oauth2
src/main/scala/com/twitter/finagle/oauth2/ProtectedResourceRequest.scala
Scala
apache-2.0
365
/* * This file was copied almost verbatim from [1] to support cross version support for * sbt 0.11.x. * * Changes: * - removed `private[...]` modifiers * * [1] https://raw.github.com/sbt/sbt/c0b1bb51e63841be63c810a961031529b7be0072/util/cross/src/main/input_sources/CrossVersionUtil.scala */ package net.virtu...
jrudolph/sbt-cross-building
src/main/scala-sbt-0.11/net/virtualvoid/sbt/cross/CrossVersionUtil.scala
Scala
bsd-2-clause
3,321
/* * 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 ...
ahnqirage/spark
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/BasicExecutorFeatureStepSuite.scala
Scala
apache-2.0
7,961
/* * 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 ...
Intel-bigdata/OAP
oap-cache/oap/src/test/scala/org/apache/spark/sql/parquet/hadoop/utils/Collections3Suite.scala
Scala
apache-2.0
1,392
/** * Copyright 2015 Thomson Reuters * * 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...
hochgi/CM-Well
server/cmwell-bg/src/test/scala/cmwell/bg/test/CmwellBGSpec.scala
Scala
apache-2.0
36,547
package org.hammerlab.bam.spark.compare import org.hammerlab.bam.test.resources.TestBams import org.hammerlab.cli.app.MainSuite import org.hammerlab.test.matchers.lines.Line._ class TimeLoadTest extends MainSuite(TimeLoad) with TestBams { test("1.bam 230k") { checkFirstLines( "-m", "230k", ba...
ryan-williams/spark-bam
cli/src/test/scala/org/hammerlab/bam/spark/compare/TimeLoadTest.scala
Scala
apache-2.0
1,083
/* * Copyright (c) 2014-2018 by The Monix Project Developers. * See the project homepage at: https://monix.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...
Wogan/monix
monix-tail/shared/src/test/scala/monix/tail/BaseLawsSuite.scala
Scala
apache-2.0
2,592
package com.mycompany.scalcium.names import java.io.File import java.io.FileInputStream import org.apache.commons.io.IOUtils import opennlp.tools.namefind.NameFinderME import opennlp.tools.namefind.TokenNameFinderModel import scala.Array.canBuildFrom import com.mycompany.scalcium.tokenizers.Tokenizer class OpenNLPNam...
sujitpal/scalcium
src/main/scala/com/mycompany/scalcium/names/OpenNLPNameFinder.scala
Scala
apache-2.0
2,030
import sbt._ class MathMLParserFooProject(info: ProjectInfo) extends DefaultProject(info) { val mavenLocal = "Local Maven Repository" at "file://"+Path.userHome+"/.m2/repository" val bryanjswift = "Bryan J Swift Repository" at "http://repos.bryanjswift.com/maven2/" val junitInterface = "com.novocode" % "junit-...
alexmsmartins/WikiModels
wm_math_parser/project/build/Maven.scala
Scala
mit
465
package slamdata.engine.physical.mongodb import slamdata.engine.fp._ import scala.collection.immutable.ListMap import scalaz._ import Scalaz._ import Liskov._ package object optimize { object pipeline { import ExprOp._ import PipelineOp._ def get0(leaves: List[BsonField.Leaf], rs: List[Reshape]): Opti...
mossprescott/quasar
src/main/scala/slamdata/engine/physical/mongodb/optimize/optimize.scala
Scala
agpl-3.0
2,903
/* * Potigol * Copyright (C) 2005 Leonardo Lucena * * 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 2 of the License, or * * This program is distributed in the hope...
loiane/Potigol
src/br/edu/ifrn/potigol/Compilador.scala
Scala
gpl-2.0
2,731
package leo.modules.agent.rules.control_rules import leo.datastructures.AnnotatedClause import leo.datastructures.blackboard.{DataStore, DataType, Delta, Result} import leo.modules.SZSException import leo.modules.output.SZS_Error import scala.collection.mutable case object Unify extends DataType[AnnotatedClause]{ ...
lex-lex/Leo-III
oldsrc/main/scala/leo/modules/agent/rules/control_rules/UnificationSet.scala
Scala
bsd-3-clause
2,338
package de.sciss.mutagentx case class FeatureExtractionFailed(cause: Throwable) extends Exception(cause)
Sciss/MutagenTx
src/main/scala/de/sciss/mutagentx/FeatureExtractionFailed.scala
Scala
gpl-3.0
105
import sbt._ object Dependencies { val resolutionRepos = Seq( "Sonatype Releases" at "https://oss.sonatype.org/content/repositories/releases", "Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots" ) def compile(deps: ModuleID*): Seq[ModuleID] = deps map (_ % "compile") def...
antidata/htm-moclu
moclu-http/project/Dependencies.scala
Scala
agpl-3.0
1,646
package com.gilt.thehand.rules.comparison import com.gilt.thehand.rules.conversions.ConvertsTo import com.gilt.thehand.rules.SingleValueRule /** * A rule that tests greater-than-or-equal. */ trait GreaterThanEqual extends SingleValueRule { self: ConvertsTo => /** * Simple greater-than-or-equal test for this ru...
gilt/the-hand
src/main/scala/com/gilt/thehand/rules/comparison/GreaterThanEqual.scala
Scala
apache-2.0
440
import ru.finagram._ import ru.finagram.api._ import com.twitter.util._ object LongPollingExample extends App { val token = "" val handler = (update: Update) => Future(println(update)) val server = new PollingServer(token, handler) server.run() .onSuccess { case lastOffset => println(s"Last r...
finagram/finagram
src/examples/LongPolingExample.scala
Scala
mit
594
package scutil.lang object implicits extends implicits trait implicits extends extensions with syntax with instances with literals
ritschwumm/scutil
modules/core/src/main/scala/scutil/lang/implicits.scala
Scala
bsd-2-clause
137
// Copyright (C) 2011 Dmitri Nikulin // // This file is part of Vijil. // // Vijil 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 option) any later ve...
dnikulin/vijil
src/test/scala/com/dnikulin/vijil/text/TestTextFile.scala
Scala
agpl-3.0
2,649
package com.warningrc.test.scalatest /** * Created by warning on 2016/1/27. */ object PartialAppliedFunction { def main(args: Array[String]) { val array = Array(1, 2, 3, 4, 5, 6) array.foreach(println _) def sum(x: Int, y: Int, z: Int): Int = x + y + z println(sum(1, 2, 3)) val sum_a = sum...
warningrc/learn-java
scala-test/src/test/scala/com/warningrc/test/scalatest/PartialAppliedFunction.scala
Scala
apache-2.0
330
package org.jetbrains.plugins.scala.lang.psi.stubs.elements import com.intellij.lang.ASTNode import com.intellij.psi.PsiElement import com.intellij.psi.stubs.{StubElement, StubInputStream, StubOutputStream} import com.intellij.util.io.StringRef.fromString import org.jetbrains.plugins.scala.lang.psi.api.toplevel.import...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/ScImportStmtElementType.scala
Scala
apache-2.0
1,479
class TestArray (inputs: Array[Int]){ def printArray = for(input <- inputs) println(input) }
matt-bentley/SubsetSumProcessor
SubsetSumProcessor/Scala/src/main/scala/Test.scala
Scala
gpl-3.0
102
package org.jetbrains.plugins.scala.lang.psi.api import org.jetbrains.plugins.scala.lang.psi.ScalaPsiElement import org.jetbrains.plugins.scala.lang.psi.controlFlow.{ScControlFlowPolicy, Instruction} import org.jetbrains.plugins.scala.lang.psi.controlFlow.impl.{ScalaControlFlowBuilder, AllVariablesControlFlowPolicy} i...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/psi/api/ScControlFlowOwner.scala
Scala
apache-2.0
1,286
/* * Copyright (c) 2017 sadikovi * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, d...
sadikovi/riff
format/src/test/scala/com/github/sadikovi/riff/TypeSpecSuite.scala
Scala
mit
4,807
/* * Copyright 2010-2014 Benjamin Lings * Author: Thomas Suckow * * 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 requi...
codingwell/scala-guice
src/main/scala/net/codingwell/scalaguice/ScalaMultibinder.scala
Scala
apache-2.0
8,404
package ecommerce.sales.app import akka.kernel.Bootable import com.typesafe.config.Config import ecommerce.sales.{HttpService, SalesReadFrontConfiguration} class SalesReadFrontApp extends Bootable { override def systemName = "sales-read-front" def startup() = { new SalesReadFrontConfiguration { over...
pawelkaczor/ddd-leaven-akka-v2
sales/read-front/src/main/scala/ecommerce/sales/app/SalesReadFrontApp.scala
Scala
mit
504
/* * 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 ...
xccui/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/stream/ExplainTest.scala
Scala
apache-2.0
6,612
package net.spals.appbuilder.message.kinesis.consumer import net.spals.appbuilder.annotations.service.AutoBindFactory import net.spals.appbuilder.config.message.MessageConsumerConfig import net.spals.appbuilder.message.core.MessageConsumerCallback import net.spals.appbuilder.model.core.ModelSerializer /** * @author...
timkral/appbuilder
message-kinesis/src/main/scala/net/spals/appbuilder/message/kinesis/consumer/KinesisConsumerRecordProcessorFactory.scala
Scala
bsd-3-clause
649
package cromwell import cromwell.core.{JobKey, WorkflowId} package object jobstore { implicit class EnhancedJobKey(val jobKey: JobKey) extends AnyVal { def toJobStoreKey(workflowId: WorkflowId): JobStoreKey = JobStoreKey(workflowId, jobKey.node.fullyQualifiedName, jobKey.index, jobKey.attempt) } }
ohsu-comp-bio/cromwell
engine/src/main/scala/cromwell/jobstore/package.scala
Scala
bsd-3-clause
309
/* * * This file is part of BlueScale. * * BlueScale 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 option) any later version. * * BlueScale is distrib...
BlueScale/BlueScale
src/main/scala/org/bluescale/server/WebServer.scala
Scala
agpl-3.0
4,765
package cortex.db import java.sql.{SQLException, DriverManager} import cortex.util.log import scalikejdbc._ /** */ object SqlDB { // initialize JDBC driver & connection pool Class.forName("org.h2.Driver") implicit val session = AutoSession var isInitialized = false def initialize(dbAddressUsernameAndPa...
jsflax/cortex
src/main/scala/cortex/db/SqlDB.scala
Scala
mit
1,481
/* * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ package play.api.data /** * Contains the validation API used by `Form`. * * For example, to define a custom constraint: * {{{ * val negative = Constraint[Int] { * case i if i < 0 => Valid * case _ => Invalid("Must be a negative ...
jyotikamboj/container
pf-framework/src/play-datacommons/src/main/scala/play/api/data/validation/package.scala
Scala
mit
373
package latis.dm import latis.dm.implicits._ import org.junit._ import Assert._ import com.typesafe.scalalogging.LazyLogging import latis.dm._ import latis.metadata.Metadata import latis.time.Time import latis.writer.AsciiWriter import latis.writer.Writer import latis.data.Data import latis.data.SampledData import lat...
dlindhol/LaTiS
src/test/scala/latis/dm/TestOrdering.scala
Scala
epl-1.0
1,923
package api import asobu.distributed.{CustomRequestExtractorDefinition, PredefinedDefs, RequestExtractorDefinition} import asobu.dsl.RequestExtractor import play.api.mvc.RequestHeader import shapeless.HNil import asobu.dsl.extractors.AuthInfoExtractorBuilder import scala.concurrent.{ExecutionContext, Future} object ...
kailuowang/asobu
example/api/src/main/scala/api/authentication.scala
Scala
apache-2.0
418
/* * Copyright (c) 2011, Owen Stephens * 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 lis...
owst/Scala-Patience-Diff
OwenDiff/Diff.scala
Scala
bsd-3-clause
12,329
package com.softwaremill.codebrag.dao.heartbeat import org.bson.types.ObjectId import org.joda.time.DateTime trait HeartbeatDAO { def update(userId: ObjectId) def get(userId: ObjectId): Option[DateTime] def loadAll(): List[(ObjectId, DateTime)] }
frodejohansen/codebrag
codebrag-dao/src/main/scala/com/softwaremill/codebrag/dao/heartbeat/HeartbeatDAO.scala
Scala
agpl-3.0
261
package ecdc.crypto import java.security.Security import org.bouncycastle.cms.CMSEnvelopedDataParser import org.bouncycastle.cms.jcajce.JceKeyTransEnvelopedRecipient import org.bouncycastle.jce.provider.BouncyCastleProvider import org.bouncycastle.util.encoders.Base64 import scala.collection.JavaConverters._ class Cm...
benfrasersimpson/ecdc
src/crypto/src/main/scala/ecdc/crypto/CmsDecryptor.scala
Scala
isc
719
package dotty.tools package dotc package core import Types._, Contexts._, Symbols._ import Decorators._ import config.Config import config.Printers._ /** Methods for adding constraints and solving them. * * What goes into a Constraint as opposed to a ConstrainHandler? * * Constraint code is purely functional: Ope...
yusuke2255/dotty
src/dotty/tools/dotc/core/ConstraintHandling.scala
Scala
bsd-3-clause
9,568
/* * 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 ...
manuzhang/incubator-gearpump
experiments/yarn/src/main/scala/org/apache/gearpump/experiments/yarn/Constants.scala
Scala
apache-2.0
2,187
package com.harborx.api.device import com.harborx.api.modules.DeviceModule import org.scalamock.scalatest.MockFactory import org.scalatest.GivenWhenThen import org.scalatestplus.play.PlaySpec /** * We shall use our custom Spec instead of PlaySpec in real life * Test for service layer logic here, so we stub Device...
harborx/play-di-example
play-macwire/test/com/harborx/api/device/DeviceServiceSpec.scala
Scala
mit
733
package typeclass.data import typeclass.Prelude._ import typeclass.{MonadLaws, SemigroupLaws} import scalaprops.{Param, Scalaprops} object NonEmptyListTest extends Scalaprops { val monad = MonadLaws[NonEmptyList].all.andThenParam(Param.maxSize(10)) val semigroup = SemigroupLaws[NonEmptyList[Int]].all }
julien-truffaut/Typeclass
answer/src/test/scala/typeclass/data/NonEmptyListTest.scala
Scala
mit
312
/* * Copyright 2011-2022 GatlingCorp (https://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 appli...
gatling/gatling
gatling-core-java/src/main/scala/io/gatling/javaapi/core/internal/errors/ScalaExitHereIf.scala
Scala
apache-2.0
1,415
package org.positronicnet.sample.contacts.test import org.positronicnet.sample.contacts._ import org.positronicnet.content.PositronicContentResolver import org.scalatest._ import org.positronicnet.test.RobolectricTests import com.xtremelabs.robolectric.Robolectric import org.scalatest.matchers.ShouldMatchers import...
rst/positronic_net
sample/contacts_app/src/test/scala/ModelSpecs.scala
Scala
bsd-3-clause
9,540
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
lrytz/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/io/ThrowablesTest.scala
Scala
bsd-3-clause
891
package pack class R { class attr // Will have the bytecode name `R$attr`, not to be confused with `R@tr`! class `@` } class `@`
yusuke2255/dotty
tests/untried/pos/t7532b/A_1.scala
Scala
bsd-3-clause
138
package blended.container.context.impl.internal import java.io.File import java.util.Properties import scala.beans.BeanProperty import scala.jdk.CollectionConverters._ import scala.util.{Success, Try} import blended.updater.config.Profile import blended.util.RichTry._ import blended.util.logging.Logger import com.ty...
woq-blended/blended
blended.container.context.impl/src/main/scala/blended/container/context/impl/internal/ContainerContextImpl.scala
Scala
apache-2.0
4,766
/* * 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...
scalatest/scalatest
jvm/propspec-test/src/test/scala/org/scalatest/propspec/FixtureAsyncPropSpecSpec.scala
Scala
apache-2.0
14,568
/* * 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...
yiheng/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/torch/CMinTableSpec.scala
Scala
apache-2.0
2,291
package extraction.parser import ch.weisenburger.uima.FinancialDataPipelineFactory import ch.weisenburger.uima.types.distantsupervision.skala.Timex import org.dbpedia.extraction.wikiparser.Node import org.dbpedia.extraction.dataparser.DataParser import org.slf4j.LoggerFactory case class UnexpectedNumberOfTimexesExce...
normalerweise/mte
app/extraction/parser/AdvancedTimexParser.scala
Scala
gpl-2.0
6,197
import scala.reflect.macros.whitebox._ import scala.language.experimental.macros object Macros { def impl(c: Context) = { var messages = List[String]() def println(msg: String) = messages :+= msg import c.universe._ def test(sym: Symbol): Unit = { println(s"uninitialized ${sym.name}: ${showDec...
felixmulder/scala
test/files/run/showdecl/Macros_1.scala
Scala
bsd-3-clause
1,075
/** * 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...
akosiaris/kafka
core/src/test/scala/unit/kafka/api/RequestResponseSerializationTest.scala
Scala
apache-2.0
15,381
package org.kirhgoff.lastobot import java.util.Random import com.typesafe.scalalogging.LazyLogging /** * Created by kirilllastovirya on 5/05/2016. */ trait BotLocale case object Russian extends BotLocale { override def toString = "Russian" } case object English extends BotLocale { override def toString = "E...
kirhgoff/lastobot
src/main/scala/org/kirhgoff/lastobot/Phrase.scala
Scala
gpl-3.0
9,160
package com.twitter.finatra.http /** * Enumeration which determines which * server a given test request should be * sent to (ExternalServer or AdminServer). */ sealed trait RouteHint object RouteHint { /** No hint is provided. Determination should be based on the route path */ case object None extends RouteH...
twitter/finatra
http-server/src/test/scala/com/twitter/finatra/http/RouteHint.scala
Scala
apache-2.0
527
// Solution-5.scala // Solution to Exercise 5 in "Pattern Matching" def forecast(temp:Int):String = { temp match { case 100 => "Sunny" case 80 => "Mostly Sunny" case 50 => "Partly Sunny" case 20 => "Mostly Cloudy" case 0 => "Cloudy" case _ => "Unknown" } } def forecastLoop(data:Vector[Int]...
P7h/ScalaPlayground
Atomic Scala/atomic-scala-solutions/21_PatternMatching/Solution-5.scala
Scala
apache-2.0
685
/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
dnatic09/scalate
scalate-core/src/main/scala/org/fusesource/scalate/support/CompileError.scala
Scala
apache-2.0
956
/* * 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/PushDownLeftSemiAntiJoin.scala
Scala
apache-2.0
11,948
/** * Copyright (C) 2011 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 program i...
orbeon/orbeon-forms
xforms-compiler/jvm/src/main/scala/org/orbeon/oxf/xforms/analysis/PartAnalysisDebugSupport.scala
Scala
lgpl-2.1
7,220
package org.fs.utility.web.http import java.nio.charset.Charset import org.apache.http.entity.ContentType /** * @author FS */ case class SimpleHttpResponse(code: Int, headers: Seq[(String, String)], body: Array[Byte]) { /** @return content charset if specified */ lazy val charsetOption: Option[Charset] = co...
frozenspider/fs-web-utils
src/main/scala/org/fs/utility/web/http/SimpleHttpResponse.scala
Scala
mit
1,538
package com.arcusys.learn.scorm.manifest.storage.impl.liferay import com.arcusys.learn.persistence.liferay.service.LFResourceLocalService import com.arcusys.learn.persistence.liferay.model.LFResource import com.arcusys.learn.storage.impl.liferay.MockEntityContainer import scala.collection.JavaConverters._ object Res...
ViLPy/Valamis
learn-persistence-liferay-wrapper/src/test/scala/com/arcusys/learn/scorm/manifest/storage/impl/liferay/ResourceEntityContainer.scala
Scala
lgpl-3.0
2,191
package consumer import kafka.consumer.{Consumer => KafkaConsumer, ConsumerIterator, Whitelist} /** * Created by mike on 22/06/15. */ case class SingleTopicConsumer(topic: String) extends Consumer(List(topic)) { private lazy val consumer = KafkaConsumer.create(config) val threadNum = 1 private lazy val consu...
mikehancock/kafka-sample
app/consumer/SingleTopicConsumer.scala
Scala
mit
551
/* * 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 ...
zzcclp/carbondata
integration/hive/src/main/scala/org/apache/carbondata/hive/CarbonHiveMetastoreListener.scala
Scala
apache-2.0
4,716
package redis.commands import redis._ import scala.concurrent.Await import akka.util.ByteString import redis.actors.ReplyErrorException import redis.protocol.{Bulk, Status, MultiBulk} class TransactionsSpec extends RedisStandaloneServer { "Transactions commands" should { "basic" in { val redisTransaction...
etaty/rediscala
src/test/scala/redis/commands/TransactionsSpec.scala
Scala
apache-2.0
2,086
package com.rocketfuel.sdbc.base.jdbc import java.sql.{DriverPropertyInfo, Driver} import java.util.Properties import java.util.logging.Logger class TestDriver extends Driver { override def acceptsURL(url: String): Boolean = ??? override def jdbcCompliant(): Boolean = ??? override def getPropertyInfo(url: Str...
rocketfuel/sdbc
jdbc/src/test/scala/com/rocketfuel/sdbc/base/jdbc/TestDriver.scala
Scala
bsd-3-clause
592
package com.arcusys.valamis.web.portlet import javax.portlet._ import javax.servlet.http.HttpServletRequest import com.arcusys.learn.liferay.util.{PortalUtilHelper, PortletName, PortletPreferencesFactoryUtilHelper} import com.arcusys.valamis.social.service.ValamisActivitiesSettings.{COUNT_DEFAULT_VALUE, COUNT_PROPERT...
igor-borisov/JSCORM
valamis-portlets/src/main/scala/com/arcusys/valamis/web/portlet/ValamisActivitiesView.scala
Scala
gpl-3.0
5,476
/* Copyright 2009-2021 EPFL, Lausanne */ object Nested4 { def foo(a: BigInt, a2: BigInt): BigInt = { require(a >= 0 && a <= 50) val b = a + 2 val c = a + b if(a2 > a) { def rec1(d: BigInt): BigInt = { require(d >= 0 && d <= 50) val e = d + b + c + a2 e } ensuring(...
epfl-lara/stainless
frontends/benchmarks/verification/valid/MicroTests/Nested4.scala
Scala
apache-2.0
404
object partialApplications { type Histogram[X] = Map[X, Int] type StringlyHistogram[X >: String] = Histogram[X] val xs: Histogram[String] = Map[String, Int]() val ys: StringlyHistogram[String] = xs def e = xs val zs: StringlyHistogram[_] = e type IntMap[Y] = Map[Int, Y] val is = Map[Int, Boolean...
densh/dotty
tests/pickling/partialApplications.scala
Scala
bsd-3-clause
479
import org.specs2.mutable.BeforeAfter import play.api.Play import play.api.test.{FakeApplication, PlaySpecification} /** * User: Björn Reimer * Date: 14.01.15 * Time: 11:52 */ trait SpecWithStartedApp extends PlaySpecification with BeforeAfter { override def before = { val app = FakeApplication() // che...
indarium/hbbTVPlugin
test/SpecWithStartedApp.scala
Scala
agpl-3.0
497
package model import model.db.DeviceDb import play.api.libs.json.{Json, OWrites} case class Device(id: Long, name: String, position: Position, sensors: List[Sensor]) object Device { def apply(deviceDb: DeviceDb, sensors: List[Sensor]): Device = Device(deviceDb.id, deviceDb.name, deviceDb.position, sensors) ...
openada/adaweather
app/model/Device.scala
Scala
mit
387
/* IrisPca.scala */ import breeze.linalg.* import breeze.stats.covmat import scalaglm.* @main def irisPca() = val url = "http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data" val fileName = "iris.csv" val imap = Map( "Iris-setosa" -> 0, "Iris-versicolor" -> 1, "Iris...
darrenjw/scala-glm
examples/src/main/scala/IrisPca.scala
Scala
apache-2.0
2,216
/* * 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/core/src/test/scala/org/apache/spark/sql/execution/PlannerSuite.scala
Scala
apache-2.0
52,806
/*********************************************************************** * 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-tools/src/main/scala/org/locationtech/geomesa/tools/ingest/LocalConverterIngest.scala
Scala
apache-2.0
8,628
package io.reactors.common.concurrent import sun.misc.Unsafe import scala.annotation.switch import scala.annotation.tailrec class CacheTrie[K <: AnyRef, V <: AnyRef]( val useCounters: Boolean = true, val doCompression: Boolean = true ) { import CacheTrie._ private val unsafe: Unsafe = Platform.unsafe @...
storm-enroute/reactors
reactors-common/jvm/src/main/scala/io/reactors/common/concurrent/CacheTrie.scala
Scala
bsd-3-clause
63,188
/* * 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 ...
ArvinDevel/onlineAggregationOnSparkV2
core/src/test/scala/org/apache/spark/executor/TaskMetricsSuite.scala
Scala
apache-2.0
1,164
package no.nextgentel.oss.akkatools.example import java.util.UUID import java.util.concurrent.TimeUnit import akka.actor.{Actor, ActorLogging, ActorSystem, Props} import akka.util.Timeout import akka.pattern.ask import no.nextgentel.oss.akkatools.example.booking._ import no.nextgentel.oss.akkatools.persistence.jdbcjo...
NextGenTel/akka-tools
examples/aggregates/src/main/scala/no/nextgentel/oss/akkatools/example/Example.scala
Scala
mit
5,546
package com.shocktrade.models.profile import akka.actor.{ActorRef, Props} import akka.pattern.ask import akka.routing.RoundRobinPool import akka.util.Timeout import com.shocktrade.actors.UserProfileActor import com.shocktrade.actors.UserProfileActor._ import com.shocktrade.controllers.Application._ import com.shocktra...
ldaniels528/shocktrade-server
app-server/app/com/shocktrade/models/profile/UserProfiles.scala
Scala
apache-2.0
3,908
// See the LICENCE.txt file distributed with this work for additional // information regarding copyright ownership. // // 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...
scray/scray
scray-service/src/main/scala/scray/core/service/ScrayCombinedStatefulTServer.scala
Scala
apache-2.0
5,456
/** * Mapping Selector * Mapping Selector * Copyright (C) 01/04/16 echinopsii * * This program 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 opti...
echinopsii/net.echinopsii.ariane.community.core.mapping
ds/dsl/src/main/scala/net/echinopsii/ariane/community/core/mapping/ds/sdsl/parser/UtilsTP.scala
Scala
agpl-3.0
1,311
/* * 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 ...
zcan/samza
samza-core/src/main/scala/org/apache/samza/job/JobRunner.scala
Scala
apache-2.0
5,010
package com.github.pedrovgs.haveaniceday.smiles.storage import javax.inject.Inject import com.github.pedrovgs.haveaniceday.extensions.sqldate._ import com.github.pedrovgs.haveaniceday.smiles.model.{SmilesGeneration, SmilesGenerationResult} import com.github.pedrovgs.haveaniceday.smiles.storage.codec._ import com.gith...
pedrovgs/HaveANiceDay
src/main/scala/com/github/pedrovgs/haveaniceday/smiles/storage/SmilesGenerationsRepository.scala
Scala
gpl-3.0
1,288
/* * Copyright 2022 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/pbik-frontend
test/services/RegistrationServiceSpec.scala
Scala
apache-2.0
4,623
/* * Copyright (c) 1995, 2008, Oracle and/or its affiliates. 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 * no...
benhutchison/scala-swing
examples/src/main/scala/scala/swing/examples/tutorials/layout/DiagonalLayout.scala
Scala
bsd-3-clause
5,832
package com.scalaAsm.x86 package Instructions package System // Description: Read from Model Specific Register // Category: general trait RDMSR extends InstructionDefinition { val mnemonic = "RDMSR" } object RDMSR extends ZeroOperands[RDMSR] with RDMSRImpl trait RDMSRImpl extends RDMSR { implicit object _0 exte...
bdwashbu/scala-x86-inst
src/main/scala/com/scalaAsm/x86/Instructions/System/RDMSR.scala
Scala
apache-2.0
425
package org.nlogo.extensions.dnl import org.scalatest.{ BeforeAndAfterAll, FunSuite, OneInstancePerTest } import org.scalatest.concurrent.Timeouts import org.scalatest.time.SpanSugar._ import org.zeromq.ZMQ, ZMQ.Context class ServerThreadTest extends FunSuite with Timeouts with BeforeAndAfterAll { val context = ...
mrerrormessage/dnl
src/test/scala/ServerThreadTest.scala
Scala
cc0-1.0
742
package org.codersunit.tn.output.limiter trait Limiter { def allowed(assoc: List[String], prob: Double, count: Int): Boolean }
rnijveld/twitnetter
src/main/scala/output/limiter/Limiter.scala
Scala
bsd-3-clause
132
package piecewise import scala.collection.mutable.ListBuffer import scala.math._ /** Monotonic piecewise cubic curve for the spline interpolation * * A Сurve, that serve for the approximation physical reality definitions, where monotonic property required * * @see Fritsch, F. N. Monotone piecewise cubic interp...
daniil-timofeev/gridsplines
piecewise/src/main/scala/piecewise/M1Hermite3.scala
Scala
apache-2.0
4,503
/* * Copyright (c) 2014, Brook 'redattack34' Heisler * 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, t...
Redattack34/ModularRayguns
src/main/scala/com/castlebravostudios/rayguns/items/chambers/LightningChamber.scala
Scala
bsd-3-clause
3,153
package org.scaladebugger.api.lowlevel.breakpoints import com.sun.jdi.request.BreakpointRequest import org.scaladebugger.api.lowlevel.requests.JDIRequestArgument import scala.util.Try /** * Represents the manager for breakpoint requests. */ trait BreakpointManager { /** * Retrieves the list of breakpoints con...
ensime/scala-debugger
scala-debugger-api/src/main/scala/org/scaladebugger/api/lowlevel/breakpoints/BreakpointManager.scala
Scala
apache-2.0
4,986
package ahlers.michael.basic import java.util.UUID.randomUUID import ahlers.michael.basic.BasicActor._ import akka.actor.ActorSystem import akka.testkit.{ImplicitSender, TestKit} import org.scalatest.{BeforeAndAfterAll, FlatSpecLike, Matchers} /** * @author <a href="mailto:michael@ahlers.consulting">Michael Ahlers<...
michaelahlers/sandbox-akka-serialization
src/test/scala/ahlers/michael/basic/BasicActorSpec.scala
Scala
mit
973
package sangria.marshalling import scala.annotation.implicitNotFound import scala.language.higherKinds @implicitNotFound( "Type ${Val} cannot be used as an input. Please consider defining an implicit instance of `FromInput` for it.") trait FromInput[Val] { val marshaller: ResultMarshaller def fromResult(node: m...
sangria-graphql/sangria-marshalling-api
src/main/scala/sangria/marshalling/FromInput.scala
Scala
apache-2.0
1,845
/* * 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 ...
hequn8128/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/stream/table/GroupWindowTableAggregateTest.scala
Scala
apache-2.0
2,317
package almhirt.aggregates /** Represents the states that an aggregate can advance through in its 'lifetime' */ sealed trait AggregateRootLifecycle[+T <: AggregateRoot] { def version: AggregateRootVersion def idOption: Option[AggregateRootId] } /** The aggregate root is either [[Vacat]] or [[Vivus]] */ sealed tra...
chridou/almhirt
almhirt-common/src/main/scala/almhirt/aggregates/AggregateRootLifecycle.scala
Scala
apache-2.0
2,219
package com.argcv.valhalla /** * * @author Yu Jing <yu@argcv.com> on 10/9/16 */ package object ml { }
yuikns/valhalla
src/main/scala/com/argcv/valhalla/ml/package.scala
Scala
mit
107
package dhg.ccg.parse.pcfg import org.junit.Test import org.junit.Assert._ import dhg.ccg.parse._ import dhg.ccg.prob._ import dhg.ccg.cat._ import dhg.ccg.tagdict.SimpleTagDictionary import dhg.util._ import dhg.ccg.parse.pcfg.mcmc.PcfgProductionCounter class SupPcfgTrainerTests { val A: Cat = cat"A" val B: Cat...
dhgarrette/2015-ccg-parsing
src/test/scala/dhg/ccg/parse/pcfg/SupPcfgTrainerTests.scala
Scala
apache-2.0
12,953
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
tdanford/adam
adam-core/src/main/scala/org/bdgenomics/adam/rdd/read/MDTagging.scala
Scala
apache-2.0
3,972
/* * 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 ...
clarkyzl/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/harness/TableAggregateHarnessTest.scala
Scala
apache-2.0
7,003
package offGridOrcs final case class Tile( position: Vec2, structure: Tile.Structure, orc: Option[Reference.Orc], demon: Option[Reference.Demon], building: Option[Reference.Building], goal: Option[Reference.Goal], stock: Stock ) object Tile { sealed trait Structure final case class Trees(shade: Tree...
dcecile/off-grid-orcs
src/Tile.scala
Scala
mit
1,065
package com.dedup import com.dedup.PartitionEstimator import com.dedup.{DeDupPairRDD, SerializableHelpers} import com.dedup.SimpleModuloPartitioner import org.apache.hadoop.fs.Path import org.apache.spark.rdd.RDD import org.apache.spark.sql.catalyst.expressions.GenericRowWithSchema import org.apache.spark.sql.{DataFra...
sum-coderepo/spark-scala
src/main/scala/com/dedup/DeDuplicateMergeData.scala
Scala
apache-2.0
11,151