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
/* * 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 ...
minixalpha/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/python/ExtractPythonUDFs.scala
Scala
apache-2.0
7,548
package ru.imho.dddmt.core.util object TemplateSupport { abstract sealed class Op case class Str(s: String) extends Op case class Var(id: String, format: Option[String]) extends Op val idStart = Character.isLetter _ val idPart = Character.isLetterOrDigit _ def parseSimpleTemplate(template: String)...
IMHOVi/dddmt
dddmt-engine/src/main/scala/ru/imho/dddmt/core/util/TemplateSupport.scala
Scala
apache-2.0
2,626
/* * 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...
srijs/zipkin
zipkin-common/src/main/scala/com/twitter/zipkin/query/Trace.scala
Scala
apache-2.0
6,586
import java.io.BufferedWriter import java.io.FileReader import java.io.FileWriter import java.io.InputStreamReader import java.io.IOException import java.io.LineNumberReader import java.io.OutputStreamWriter import org.mozilla.javascript.Context import org.mozilla.javascript.Function import org.mozilla.javascript.Scrip...
SollmoStudio/beyond
rhinoScalaBinding/src/examples/scala/File.scala
Scala
apache-2.0
7,606
/** * Copyright 2011-2013 StackMob * * 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...
matthewfarwell/stackmob-customcode-dev
src/main/scala/com/stackmob/customcode/dev/server/sdk/simulator/ThrowableFrequency.scala
Scala
apache-2.0
2,175
/* * 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-native-sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetAvroCompatibilitySuite.scala
Scala
apache-2.0
9,837
/*********************************************************************** * Copyright (c) 2013-2018 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...
ddseapy/geomesa
geomesa-index-api/src/main/scala/org/locationtech/geomesa/index/utils/AbstractBatchScan.scala
Scala
apache-2.0
2,372
class S { val j = new J() val x: Array[Dog] = ??? // Check that the java varargs for `foo` gets typed as `Array[_ <: Animal]`. // Otherwise, the call below would fail in -Ycheck:elimRepeated because arrays are invariant before erasure. // This is unsound but allowed. j.foo(x*) j.foo(new Dog, new Dog) }
dotty-staging/dotty
tests/pos/i5140/S.scala
Scala
apache-2.0
318
package com.mentatlabs.nsa package scalac package options import javac.JavacVersion /* -target:<target> * ================ * 2.0.0 - 2.1.4: Specify which backend to use (jvm,msil) * 2.1.5 - 2.5.1: Specify which backend to use (jvm-1.5,jvm-1.4,msil,cldc) * 2.6.0 - 2.7.1: Specify for which target object...
mentat-labs/sbt-nsa
nsa-core/src/main/scala/com/mentatlabs/nsa/scalac/options/ScalacTarget.scala
Scala
bsd-3-clause
1,772
package views.html import lila.api.Context import lila.app.templating.Environment._ import lila.app.ui.ScalatagsTemplate._ import controllers.routes object bookmark { def toggle(g: lila.game.Game, bookmarked: Boolean)(implicit ctx: Context) = if (ctx.isAuth) a( cls := List( "bookmark" ...
luanlv/lila
app/views/bookmark.scala
Scala
mit
751
package ore.db.impl.schema import ore.data.project.Category import ore.db.DbRef import ore.db.impl.OrePostgresDriver.api._ import ore.db.impl.table.common.{DescriptionColumn, NameColumn, VisibilityColumn} import ore.models.project._ import ore.models.user.User import io.circe.Json class ProjectTable(tag: Tag) ex...
SpongePowered/Ore
models/src/main/scala/ore/db/impl/schema/ProjectTable.scala
Scala
mit
2,080
package com.twitter.finagle import com.twitter.util.{Future, Time} /** * A Filter acts as a decorator/transformer of a service. It may apply * transformations to the input and output of that service: * * (* MyService *) * [ReqIn -> (ReqOut -> RepIn) -> RepOut] * * For example, you may have a POJO s...
travisbrown/finagle
finagle-core/src/main/scala/com/twitter/finagle/Filter.scala
Scala
apache-2.0
6,396
/** * 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 * distributed ...
ksmpartners/ernie
ernie-gatling/src/main/scala/ErnieSimulation.scala
Scala
apache-2.0
2,444
/* * 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...
willCode2Surf/zipkin
zipkin-common/src/main/scala/com/twitter/zipkin/storage/util/SpanStoreValidator.scala
Scala
apache-2.0
6,212
package aima.core.agent.basic import aima.core.agent.StatelessAgent import aima.core.agent.basic.OnlineDFSAgent.IdentifyState import aima.core.agent.basic.OnlineDFSAgentState.{RESULT, UNBACKTRACKED, UNTRIED} import aima.core.fp.Eqv import aima.core.fp.Eqv.Implicits._ import aima.core.search.api.OnlineSearchProblem /*...
aimacode/aima-scala
core/src/main/scala/aima/core/agent/basic/OnlineDFSAgent.scala
Scala
mit
6,234
package io.udash.web.guide.views.ext.demo.bootstrap import io.udash.bootstrap.button.UdashButtonOptions import io.udash.web.guide.demos.AutoDemo import io.udash.web.guide.styles.partials.GuideStyles import scalatags.JsDom.all._ object ButtonsDemo extends AutoDemo { private val (rendered, source) = { import io...
UdashFramework/udash-core
guide/guide/.js/src/main/scala/io/udash/web/guide/views/ext/demo/bootstrap/ButtonsDemo.scala
Scala
apache-2.0
2,280
package synthesis import org.scalatest._ class APASyntaxTreeTest extends FunSpec with Matchers { def O(name: String) = OutputVar(name) def I(name: String) = InputVar(name) implicit def OutputVarToPACombination(o: OutputVar):APACombination = APACombination(o) implicit def InputTermConvert(i: ConvertibleToInput...
epfl-lara/comfusy
src/test/scala/APASyntaxTreeTest.scala
Scala
bsd-2-clause
1,734
package play.modules.gjson import org.joda.time.DateTime import org.specs2.mutable._ import play.api.libs.json._ class JSONPicklerSpec extends Specification { import JSON.{toJSON, fromJSON} "pseudo-inverse" in { val p = Prod1("John", Some(5)) fromJSON[Prod1](toJSON(p)).toEither must beRight(p) } ...
kindleit/gkit
play-gjson/src/test/scala/JSONPicklerSpec.scala
Scala
apache-2.0
1,078
/* * Copyright 2019 Spotify AB. * * 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 ...
regadas/scio
scio-core/src/main/scala/com/spotify/scio/coders/instances/AlgebirdCoders.scala
Scala
apache-2.0
987
package com.gilesc package mynab package service import com.gilesc.mynab.repository.mysql._ import com.gilesc.mynab.testkit.DatabaseTestCase import org.scalacheck.Gen import doobie.util.transactor.Transactor import cats.effect.IO class MysqlCreateCategoryRepositorySpec extends DatabaseTestCase { case class Datab...
CraigGiles/mynab
service/src/it/scala/com/gilesc/mynab/service/MysqlCreateCategoryServiceSpec.scala
Scala
mit
3,202
/** * mqlight-qpid-integration-test * * Written in 2014 by Bernard Leach <leachbj@bouncycastle.org> * * To the extent possible under law, the author(s) have dedicated all copyright and related * and neighboring rights to this software to the public domain worldwide. This software is * distributed without any war...
leachbj/mqlight-qpid-integration-test
camel-amqp/src/main/scala/org/leachbj/test/qpid/engine/ConsumerEndpointActor.scala
Scala
cc0-1.0
947
package test_expect_failure.missing_direct_deps.internal_deps; object A { def foo = { B.foo C.foo } def main = foo }
smparkes/rules_scala
test_expect_failure/missing_direct_deps/internal_deps/A.scala
Scala
apache-2.0
125
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.reflect package ...
scala/scala
src/reflect/scala/reflect/runtime/Gil.scala
Scala
apache-2.0
1,042
package org.jetbrains.plugins.scala package lang package resolve import com.intellij.psi.impl.source.resolve.ResolveCache import org.jetbrains.plugins.scala.lang.psi.api.base.ScStableCodeReferenceElement import org.jetbrains.plugins.scala.lang.psi.api.base.patterns.{ScConstructorPattern, ScInfixPattern, ScInterpolatio...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/resolve/StableCodeReferenceElementResolver.scala
Scala
apache-2.0
2,403
/* * 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...
travisbrown/scalatest
src/test/scala/org/scalatest/ShouldExistLogicalAndImplicitSpec.scala
Scala
apache-2.0
10,095
package gapt.logic.fol import gapt.expr.formula.All import gapt.expr.formula.And import gapt.expr.formula.Bottom import gapt.expr.formula.Ex import gapt.expr.formula.Imp import gapt.expr.formula.Neg import gapt.expr.formula.Or import gapt.expr.formula.Top import gapt.expr.formula.fol.FOLAtom import gapt.expr.formula.f...
gapt/gapt
core/src/main/scala/gapt/logic/fol/TseitinCNF.scala
Scala
gpl-3.0
5,402
package com.gilt.opm.query import com.gilt.opm.utils.MongoHelper import com.mongodb.casbah.commons.MongoDBObject import MongoHelper.toMongo /** * Case class representing the logic to filter a property that is equal to the given value. * * @param valueTranslator: see [[com.gilt.opm.query.OpmSearcher]] */ case clas...
gilt/opm
src/main/scala/com/gilt/opm/query/OpmPropertyEquals.scala
Scala
mit
813
package supertaggedtests.tagged import org.scalatest.matchers.should.Matchers import org.scalatest.flatspec.AnyFlatSpec import shapeless.test.illTyped import supertagged.postfix._ import supertaggedtests.{userString, userStrings_1_lvl, userStrings_5_lvl} class PostfixSyntax extends AnyFlatSpec with Matchers { "...
Rudogma/scala-supertagged
tests/src/test/scala/supertaggedtests/tagged/PostfixSyntax.scala
Scala
mit
1,032
import sbt._ import Keys._ import AndroidKeys.Android import AndroidNdkKeys._ import java.io.File /** * Support for the Android NDK. * * Adding support for compilation of C/C++ sources using the NDK. * * Adapted from work by Daniel Solano Gómez * * @author Daniel Solano Gómez, Martin Kneissl. */ object Andro...
taisukeoe/sbt-android-plugin
src/main/scala/AndroidNdk.scala
Scala
bsd-3-clause
5,839
object O { def main(argv: Array[String]): Unit = { new java.awt.Color(0,0,0) } }
mdedetrich/sbt
sbt/src/sbt-test/run/awt/A.scala
Scala
bsd-3-clause
89
/* * Copyright (C) 2013 The Mango 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 agre...
feijoas/mango
src/main/scala/org/feijoas/mango/common/cache/package.scala
Scala
apache-2.0
1,354
/* * 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 ...
spark0001/spark2.1.1
mllib/src/test/scala/org/apache/spark/ml/feature/BucketizerSuite.scala
Scala
apache-2.0
7,929
/* * Copyright 2016 Miroslav Janíček * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
kroepke/luna
luna-tests/src/test/scala/org/classdump/luna/test/Fragment.scala
Scala
apache-2.0
11,752
package com.twitter.scalding.bdd import org.scalatest.{ Matchers, WordSpec } import com.twitter.scalding.{ Dsl, RichPipe } import scala.collection.mutable.Buffer import cascading.pipe.Pipe import cascading.tuple.Tuple import com.twitter.scalding.Dsl._ class SingleSourceSpecTest extends WordSpec with Matchers with Bdd...
sriramkrishnan/scalding
scalding-core/src/test/scala/com/twitter/scalding/bdd/SingleSourceSpecTest.scala
Scala
apache-2.0
2,940
/* * 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 ...
zhouyejoe/spark
core/src/main/scala/org/apache/spark/status/api/v1/api.scala
Scala
apache-2.0
12,470
package se.culvertsoft.mgen.cpppack.generator.impl.classcpp import scala.collection.JavaConversions.asScalaBuffer import se.culvertsoft.mgen.api.model.ClassType import se.culvertsoft.mgen.api.model.Module import se.culvertsoft.mgen.compiler.internal.BuiltInGeneratorUtil.endl import se.culvertsoft.mgen.compiler.intern...
culvertsoft/mgen
mgen-cppgenerator/src/main/scala/se/culvertsoft/mgen/cpppack/generator/impl/classcpp/MkMetadataFields.scala
Scala
mit
3,785
package scala.meta.tests package semanticdb import org.scalameta.logger import munit.FunSuite import scala.meta.interactive.InteractiveSemanticdb._ import scala.meta.internal.semanticdb.Print import scala.tools.nsc.interactive.Global import scala.util.Properties import scala.collection.SortedMap class Source3Suite ex...
scalameta/scalameta
tests/jvm/src/test/scala/scala/meta/tests/semanticdb/Source3Suite.scala
Scala
bsd-3-clause
3,112
import org.hamcrest.CoreMatchers._ import org.scalatest.FlatSpec import org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors._ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders._ import org.springframework.test.web.servlet.result.MockMvcResultMatchers._ imp...
giovannicandido/slush-spring-aurelia
templates/server/src/it/scala/ApplicationSpec.scala
Scala
mit
988
package services import play.api.{Logger, Play} trait ConfigSupport{ def configKey(key: String, default: String = "N/A"): String } object ConfigSupport extends ConfigSupport{ import play.api.Play.current def configKey(key: String, default: String = "N/A"): String = { Play.configuration.getString(key).getO...
tsechov/shoehorn
app/services/Config.scala
Scala
apache-2.0
431
package org.ninjatasks.taskmanagement import akka.actor.{ActorRef, Cancellable, Actor, ActorLogging} import scala.concurrent.duration._ import akka.pattern.{ask, pipe, AskTimeoutException} import scala.concurrent.ExecutionContext.Implicits.global import org.ninjatasks.utils.ManagementConsts import scala.language.pos...
giladber/ninja-tasks
src/main/scala/org/ninjatasks/taskmanagement/JobExtractor.scala
Scala
apache-2.0
1,466
package org.nedervold.grammareditor.models.views import org.scalatest.FlatSpec import org.nedervold.grammareditor.models.VarModel class TextAreaViewSpec extends FlatSpec { behavior of "a TextViewSpec" it should "require a non-null Model" in { intercept[IllegalArgumentException] { new Text...
nedervold/GrammarEditor
src/test/scala/org/nedervold/grammareditor/models/views/TextAreaViewSpec.scala
Scala
apache-2.0
550
import com.typesafe.tools.mima.core._ object MiMaFilters { val Library: Seq[ProblemFilter] = Seq( // Experimental APIs that can be added in 3.2.0 ProblemFilters.exclude[DirectMissingMethodProblem]("scala.runtime.Tuples.append"), ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#r...
dotty-staging/dotty
project/MiMaFilters.scala
Scala
apache-2.0
1,819
package com.estus.distribution object rng { private val N = 624 private val M = 397 private val MatrixA = 0x9908b0dfL private val UpperMask = 0x80000000L private val LowerMask = 0x7fffffffL private val mt = new Array[Long](N) private var mti = N + 1 private val seed = System.currentTimeMillis mt(0)...
EstusDev/Estus
estus-distribution/src/main/scala/rng.scala
Scala
apache-2.0
2,113
/* * Copyright (C) 2014 Romain Reuillon * * 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 option) any later version. * * This progra...
ISCPIF/PSEExperiments
openmole-src/openmole/plugins/org.openmole.plugin.task.netlogo4/src/main/scala/org/openmole/plugin/task/netlogo4/package.scala
Scala
agpl-3.0
791
package pl.pholda.malpompaaligxilo.dsl.parser.expr import pl.pholda.malpompaaligxilo.dsl.DslFormExpr import pl.pholda.malpompaaligxilo.dsl.expr.date._ import pl.pholda.malpompaaligxilo.dsl.parser.UtilParsers import pl.pholda.malpompaaligxilo.util.Date import scala.util.parsing.combinator.syntactical.StandardTokenPars...
pholda/MalpompaAligxilo
dsl/shared/src/main/scala/pl/pholda/malpompaaligxilo/dsl/parser/expr/DateExprParser.scala
Scala
gpl-3.0
1,464
/* * Copyright (c) 2014 Paul Bernard * * 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...
quantintel/spectrum
financial/src/main/scala/org/quantintel/ql/instruments/bonds/Bond.scala
Scala
apache-2.0
6,717
package org.apache.spark.storage.pmof import java.nio.ByteBuffer import org.apache.spark.internal.Logging import org.apache.spark.network.pmof.PmofTransferService import org.apache.spark.SparkEnv import scala.collection.JavaConverters._ import java.nio.file.{Files, Paths} import java.util.UUID import java.lang.manag...
Intel-bigdata/OAP
oap-shuffle/RPMem-shuffle/core/src/main/scala/org/apache/spark/storage/pmof/PersistentMemoryHandler.scala
Scala
apache-2.0
4,748
package com.teambytes.awsleader import akka.actor.{ActorSystem, PoisonPill} import akka.contrib.pattern.ClusterSingletonManager import com.typesafe.config.Config import org.slf4j.LoggerFactory import scala.concurrent.ExecutionContext object AwsLeaderElection { def startLeaderElection(handler: LeaderActionsHandler...
grahamar/aws-leader-election
src/main/scala/com/teambytes/awsleader/AwsLeaderElection.scala
Scala
apache-2.0
1,301
package moe.pizza.zkapi import io.circe.JsonObject /** * Created by Andi on 31/01/2016. */ object RedisQTypes { case class SolarSystem( id_str: String, href: String, id: Long, name: String ) case class Icon( href: String ) case class Href( id_str: String, href: ...
xxpizzaxx/pizza-eveapi
src/main/scala/moe/pizza/zkapi/RedisQTypes.scala
Scala
mit
2,071
/* # Copyright 2016 Georges Lipka # # 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 wri...
glipka/Easy-React-With-ScalaJS
src/main/scala/com/glipka/easyReactJS/reactBootstrap/ButtonGroupProps.scala
Scala
apache-2.0
1,022
/* * * Copyright (c) 2016 Sylvain Julmy * * 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 * (at your option) any later version. * * This program is...
SnipyJulmy/MSE_1617_PA
KlugHDL/src/main/scala/klughdl/core/backend/dot/Dot.scala
Scala
gpl-2.0
4,529
package com.campudus.tableaux.helper object DocUriParser { type SchemeHostAndPath = (String, String, String) val DEFAULT_VALUES: SchemeHostAndPath = ("http", "localhost:8181", "") def parse(absoluteUri: String): SchemeHostAndPath = { val UriMatcher = "(https?)://([^/]+)/?(.*)/docs.*".r absoluteUri mat...
campudus/tableaux
src/main/scala/com/campudus/tableaux/helper/DocUriParser.scala
Scala
apache-2.0
435
package sword.langbook import sword.langbook.db.{LinkedStorageManager, Alphabet} /** * Root point for all questions. * * This trait will be used by the UI to display in a generic way one or another question */ trait Question { def clues: Map[Alphabet, String] def possibleAnswers: Set[Map[Alphabet, String]] ...
carlos-sancho-ramirez/generic-scala-langbook
src/main/scala/sword/langbook/Question.scala
Scala
mit
1,729
/** * 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...
cran/rkafkajars
java/kafka/api/ControlledShutdownResponse.scala
Scala
apache-2.0
2,468
/* * 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
tests/src/test/scala/system/rest/GoCLINginxTests.scala
Scala
apache-2.0
3,414
package org.loudkicks.console import org.loudkicks._ import org.loudkicks.service._ import scala.util.parsing.input.CharSequenceReader class PublishParserSpec extends UnitSpec { "PublishParser" when { "parsing a valid command line" should { "return a posted response for that user name and message" in n...
timothygordon32/loudkicks
src/test/scala/org/loudkicks/console/PublishParserSpec.scala
Scala
apache-2.0
816
package io.findify.s3mock.provider.metadata import com.amazonaws.services.s3.model.ObjectMetadata import scala.collection.concurrent.TrieMap import scala.collection.mutable class InMemoryMetadataStore extends MetadataStore { private val bucketMetadata = new TrieMap[String, mutable.Map[String, ObjectMetadata]] ...
findify/s3mock
src/main/scala/io/findify/s3mock/provider/metadata/InMemoryMetadataStore.scala
Scala
mit
938
/* Copyright 2013 Tomas Tauber 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 distri...
jzmq/scalding
scalding-core/src/test/scala/com/twitter/scalding/mathematics/Matrix2OptimizationTest.scala
Scala
apache-2.0
17,844
package com.twitter.finagle.context import com.twitter.util.Local /** * A type of context that is local to the process. The type of Key is * also unique (generative) to each instance of this context, so that keys * cannot be used across different instances of this context type. */ final class LocalContext private...
twitter/finagle
finagle-core/src/main/scala/com/twitter/finagle/context/LocalContext.scala
Scala
apache-2.0
1,575
package io.iohk.ethereum.network.p2p import akka.util.ByteString import io.iohk.ethereum.{Fixtures, ObjectGenerators} import io.iohk.ethereum.domain.ChainWeight import io.iohk.ethereum.network.p2p.messages.Capability.Capabilities._ import io.iohk.ethereum.network.p2p.messages.CommonMessages.SignedTransactions import i...
input-output-hk/etc-client
src/test/scala/io/iohk/ethereum/network/p2p/MessageDecodersSpec.scala
Scala
mit
11,569
package com.wheaties.logical object And{ def apply[A](x: A, y: A)(implicit con: Conjunction[A]) = con.conjunction(x, y) } trait Conjunction[A]{ def conjunction(p: A, q: A): A }
wheaties/Predicates
predicates/src/main/scala/com/wheaties/logical/And.scala
Scala
apache-2.0
182
package org.jetbrains.plugins.scala.util import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.util.ShutDownTracker import org.jetbrains.plugins.scala.extensions.invokeOnDispose /** * Ordinary [[ShutDownTracker]] is not enough cause it leads to lambda leaks * on Scala Plugin unloadi...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/util/ScalaShutDownTracker.scala
Scala
apache-2.0
2,016
/* Copyright 2009-2021 EPFL, Lausanne */ package stainless import inox.DebugSection abstract class ReportMessage { def sbtPluginOnly: Boolean def title: String def emit(reporter: inox.Reporter): Unit } class DefaultReporter(debugSections: Set[DebugSection]) extends inox.DefaultReporter(debugSections) { var ...
epfl-lara/stainless
core/src/main/scala/stainless/Reporter.scala
Scala
apache-2.0
1,350
/* * Copyright (c) 2015 Daniel Higuero. * * 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...
dhiguero/scala-exercises
src/main/scala/org/scala/examples/basics/User.scala
Scala
apache-2.0
1,507
/* * 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 ...
maropu/spark
mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala
Scala
apache-2.0
18,061
package scalaDemo import java.io._ import java.util.Date /** * Created by liush on 17-7-14. * Scala函数按名称调用 * 通常情况下,函数的参数是传值参数;即,参数的值在它被传递给函数之前被确定。但是,如果我们需要编写一个接收参数不希望马上计算,直到调用函数内的表达式。 * 对于这种情况,Scala提供按名称参数调用函数。 * 按名称调用机制传递一个代码块给被调用者并且每次被调用方传接入参数,代码块被执行,值被计算。 */ object BaseScala { def main(args: Array[St...
tophua/spark1.52
examples/src/main/scala/scalaDemo/BaseScala.scala
Scala
apache-2.0
8,954
/* * Copyright 2007-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...
lzpfmh/framework-2
persistence/record/src/main/scala/net/liftweb/record/RecordHelpers.scala
Scala
apache-2.0
1,483
/* Copyright 2017-19, Emmanouil Antonios Platanios. 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 ...
eaplatanios/tensorflow_scala
modules/api/src/test/scala/org/platanios/tensorflow/api/core/GraphSpec.scala
Scala
apache-2.0
10,834
/* * 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 ...
jackylk/incubator-carbondata
integration/spark/src/test/scala/org/apache/carbondata/integration/spark/testsuite/dataload/TestLoadDataGeneral.scala
Scala
apache-2.0
10,495
package aerospiker package msgpack import java.nio.CharBuffer import java.nio.charset.CharsetEncoder import java.nio.charset.StandardCharsets.UTF_8 import com.aerospike.client.AerospikeException import com.aerospike.client.command.ParticleType import io.circe._ import scala.collection.mutable /** * Serialize colle...
tkrs/aerospiker
msgpack/src/main/scala/aerospiker/msgpack/JsonPacker.scala
Scala
mit
6,650
package com.github.tminglei.slickpg import java.sql.{Date, Timestamp} import java.time.{LocalDate, LocalDateTime, OffsetDateTime} import slick.jdbc.{JdbcType, PositionedResult, PostgresProfile} import scala.reflect.classTag // edge type definitions sealed trait EdgeType case object `[_,_)` extends EdgeType case obj...
tminglei/slick-pg
src/main/scala/com/github/tminglei/slickpg/PgRangeSupport.scala
Scala
bsd-2-clause
11,693
// Generated by the Scala Plugin for the Protocol Buffer Compiler. // Do not edit! // // Protofile syntax: PROTO3 package mytypes.duration @SerialVersionUID(0L) final case class Duration( seconds: _root_.scala.Int = 0, unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty ) exte...
scalapb/ScalaPB
docs/src/main/scala/generated/mytypes/duration/Duration.scala
Scala
apache-2.0
5,445
/* * 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 ...
sryza/spark
streaming/src/main/scala/org/apache/spark/streaming/DStreamGraph.scala
Scala
apache-2.0
5,539
/******************************************************************************* Copyright (c) 2012-2013, S-Core, KAIST. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. **********************************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/analysis/typing/domain/LPSet.scala
Scala
bsd-3-clause
2,521
package clasp.scripts import scala.language.postfixOps import scala.sys.process.stringToProcess class Main extends App { if ( args(1) == "deploy" ) { val command = "echo \\"Funciona\\""; var output: String = command!!; } }
hamiltont/clasp
src/clasp/scripts/main.scala
Scala
mit
237
/* * 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 ...
maropu/spark
external/kafka-0-10/src/test/scala/org/apache/spark/streaming/kafka010/KafkaTestUtils.scala
Scala
apache-2.0
12,099
package fastparsers.tools /** * Created by Eric on 10.04.14. */ import java.util import scala.collection.mutable.ArrayBuffer import scala.util.parsing.input._ /** * Create a position object for an input */ object ToPosition { trait ToPosition[T] { def get(offset: Int): Position } type IndexedCharSe...
begeric/FastParsers
FastParsers/src/main/scala/fastparsers/tools/ToPosition.scala
Scala
mit
2,187
package no.skytteren.elasticala.index import scala.concurrent.ExecutionContext import scala.concurrent.Future import scala.concurrent.Promise import org.elasticsearch.action.ActionListener import org.elasticsearch.action.admin.indices.flush.FlushRequestBuilder import org.elasticsearch.action.admin.indices.flush.FlushR...
skytteren/elasticala
src/main/scala/no/skytteren/elasticala/index/Flush.scala
Scala
apache-2.0
1,594
package org.romeo.loveletter.game import scalaz.State import Game._ object Deck { val cards: Seq[Card] = Seq.fill(5)(Guard) ++ Seq.fill(2)(Priest) ++ Seq.fill(2)(Baron) ++ Seq.fill(2)(Handmaid) ++ Seq.fill(2)(Prince) ++ Seq.fill(1)(King) ++ Seq.fill(1)(Countess) ++ Seq.fill(1)(Princess) ...
tylerjromeo/love-letter-slack-commands
src/main/scala-2.11/org/romeo/loveletter/game/Deck.scala
Scala
mit
11,519
/* * 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...
SRGOM/scalatest
scalatest/src/main/scala/org/scalatest/ConcurrentInformer.scala
Scala
apache-2.0
17,464
package qrhl.toplevel import hashedcomputation.{Hash, HashTag, Hashable} import qrhl.{State, SubgoalSelector} import java.io.PrintWriter import hashedcomputation.Implicits._ case class FocusCommand(selector: Option[SubgoalSelector], label: String) extends Command { override protected def act(state: State, output: P...
dominique-unruh/qrhl-tool
src/main/scala/qrhl/toplevel/FocusCommand.scala
Scala
mit
501
package org.genericConfig.admin.client.models import org.genericConfig.admin.client.controllers.websocket.WebSocketListner import org.genericConfig.admin.client.views.html.HtmlElementIds import org.genericConfig.admin.client.views.user.{UpdateUserPage, UserPage} import org.genericConfig.admin.shared.Actions import org...
gennadij/admin
client/src/main/scala/org/genericConfig/admin/client/models/User.scala
Scala
apache-2.0
2,146
package com.avsystem.commons package rpc import com.avsystem.commons.meta._ import com.avsystem.commons.serialization.GenCodec trait RPCFramework { type RawValue type Reader[T] type Writer[T] case class RawInvocation(@methodName rpcName: String, @multi args: List[RawValue]) object RawInvocation { impli...
AVSystem/scala-commons
commons-core/src/main/scala/com/avsystem/commons/rpc/RPCFramework.scala
Scala
mit
6,081
package visceljs import loci.registry.Registry import org.scalajs.dom import org.scalajs.dom.{Fetch, HttpMethod, RequestInit} import rescala.default._ import rescala.extra.Tags._ import rescala.extra.lattices.IdUtil import rescala.extra.lattices.IdUtil.Id import scalatags.JsDom.implicits.stringFrag import scalatags.Js...
rmgk/viscel
code/js/src/main/scala/visceljs/ViscelJS.scala
Scala
agpl-3.0
3,431
package com.twitter.finatra.http.modules import com.twitter.inject.TwitterModule object DocRootModule extends TwitterModule { // Only one of these flags should ever be set to a non-empty string as // these flags are mutually exclusive. Setting both will result in error. val localDocRoot = flag("local.doc.root"...
joecwu/finatra
http/src/main/scala/com/twitter/finatra/http/modules/DocRootModule.scala
Scala
apache-2.0
473
package com.tuzhucheng.chat4s import util.Properties import org.http4s.server.jetty.JettyBuilder object Chat extends App { val port = Properties.envOrElse("PORT", "8080").toInt println("Starting on port " + port) JettyBuilder.bindHttp(port) .mountService(ChatService.service, "/chat4s") .run .awaitSh...
tuzhucheng/chat4s
src/main/scala/com/tuzhucheng/chat4s/Chat.scala
Scala
mit
331
package com.arcusys.valamis.lesson.scorm.service.serializer import com.arcusys.valamis.lesson.scorm.model.manifest.Activity import com.arcusys.valamis.util.TreeNode object OrganizationsGenerator { import AttributeImplicits._ def toXML(organizations: Seq[TreeNode[Activity]], defaultOrganization: Option[String]) ...
ViLPy/Valamis
valamis-scorm-lesson/src/main/scala/com/arcusys/valamis/lesson/scorm/service/serializer/OrganizationsGenerator.scala
Scala
lgpl-3.0
874
/*********************************************************************** * Copyright (c) 2013-2016 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 is ...
MutahirKazmi/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/stats/HistogramTest.scala
Scala
apache-2.0
26,350
package models import java.util.{Date} import play.api.db._ import play.api.Play.current import anorm._ import anorm.SqlParser._ import scala.language.postfixOps case class Task(id: Pk[Long], folder: String, project: Long, title: String, done: Boolean, dueDate: Option[Date], assignedTo: Option[String]) object Tas...
166yuan/play2sae
samples/zentasks/app/models/Task.scala
Scala
apache-2.0
4,456
import org.specs2.mutable._ import org.specs2.runner._ import org.junit.runner._ import play.api.test._ import play.api.test.Helpers._ /** * add your integration spec here. * An integration test will fire up a whole play application in a real (or headless) browser @RunWith(classOf[JUnitRunner]) class IntegrationSpe...
hadesgames/online-pdf-cropper
play/test/IntegrationSpec.scala
Scala
mit
563
/* * 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 ...
eyalfa/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala
Scala
apache-2.0
34,598
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.3 * @date Tue Jan 5 16:14:38 EST 2010 * @see LICENSE (MIT style license file). */ package scalation.scala2d import scala.math.{atan, cos, Pi, sin} import scalation.scala2d.Colors._ i...
scalation/fda
scalation_1.3/scalation_mathstat/src/main/scala/scalation/scala2d/QArrow.scala
Scala
mit
7,521
/* * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * 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 Fou...
tesendic/Relite
src/generated/scala/FloatStreamRow.scala
Scala
agpl-3.0
1,504
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/index/BinLineStringTest.scala
Scala
apache-2.0
11,572
/** * © 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...
e-orz/CM-Well
server/cmwell-bg/src/main/scala/cmwell/bg/imp/RefsEnricher.scala
Scala
apache-2.0
3,228
package play.modules.reactivemongo; import java.io.Serializable final class NamedDatabaseImpl(val value: String) extends NamedDatabase with Serializable { assert(value != null) override def hashCode: Int = (127 * "value".hashCode()) ^ value.hashCode() override def equals(that: Any): Boolean = that ma...
ReactiveMongo/Play-ReactiveMongo
src/main/scala-2.13/play/modules/reactivemongo/NamedDatabaseImpl.scala
Scala
apache-2.0
564
package co.s4n.comision.infrastructure import co.s4n.comision.domain.{ Cliente, Nueva, Comision } import ddd.Transformer import org.scalatest.FunSuite class TransformableTest extends FunSuite { val c = new Comision( id = None, valorComision = 1l, iva = 1l, Nueva(), new Cliente("CC1234567", "Pep...
yujikiriki/functional-domain
src/test/scala/co/s4n/comision/infrastructure/TransformableTest.scala
Scala
unlicense
563
package archiver import java.io.File trait Logger { def debug(msg: String): Unit def info(msg: String): Unit } object Logger { implicit object ConsoleLogger extends Logger { def debug(msg: String) = Console.out.println("[DEBUG] %s".format(msg)) def info(msg: String) = Console.out.println("[INFO] %s".fo...
hamnis/scala-archiver
src/main/scala/archiver/Archiver.scala
Scala
apache-2.0
1,314
package almond.interpreter import almond.interpreter.api.DisplayData import almond.interpreter.util.DisplayDataOps.toDisplayDataOps import almond.protocol.RawJson final case class Inspection(data: Map[String, RawJson], metadata: Map[String, RawJson] = Map.empty) object Inspection { def fromDisplayData(data: Displa...
alexarchambault/jupyter-scala
modules/shared/interpreter/src/main/scala/almond/interpreter/Inspection.scala
Scala
apache-2.0
392
/* * Copyright 2009-2017. DigitalGlobe, 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 ...
ngageoint/mrgeo
mrgeo-mapalgebra/mrgeo-mapalgebra-rastermath/src/main/scala/org/mrgeo/mapalgebra/unarymath/TanMapOp.scala
Scala
apache-2.0
1,650