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.rouesnel.typedsql.core import com.twitter.scrooge.ThriftStruct import scala.reflect.macros._ /** From a Scala Type - produces a Hive StructType */ object GenerateHiveStruct { def apply[T <: ThriftStruct] = macro impl[T] def impl[T](c: Context)(implicit typ: c.WeakTypeTag[T]): c.Expr[StructType] = { ...
laurencer/typedsql
core-macros/src/main/scala/com/rouesnel/typedsql/core/GenerateHiveStruct.scala
Scala
apache-2.0
641
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
jooooooon/rudder
rudder-web/src/main/scala/com/normation/rudder/web/services/NodeGrid.scala
Scala
agpl-3.0
9,821
package sorm.core object Util { def toLong ( a : Any ) : Long = a match { case id : Long => id case id : Int => id.toLong case id : Short => id.toLong case id : Byte => id.toLong case id : Number => id.longValue } }
sorm/sorm
src/main/scala/sorm/core/Util.scala
Scala
mit
269
/* ,i::, :;;;;;;; ;:,,::;. 1ft1;::;1tL t1;::;1, :;::; _____ __ ___ __ fCLff ;:: tfLLC / ___/ / |/ /____ _ _____ / /_ CLft11 :,, i1tffLi \__ \ ____ / /|_/ //...
S-Mach/s_mach.sbt_libdefaults
src/main/scala/s_mach/sbtdefaults/PublishSettings.scala
Scala
mit
2,194
/* * Copyright 2019 ACINQ SAS * * 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...
ACINQ/eclair
eclair-core/src/main/scala/fr/acinq/eclair/channel/Helpers.scala
Scala
apache-2.0
94,495
package tastytest object TestBase extends Suite("TestBase") { final class Subclass extends Base with Base2 { override def foo = s"[foo from Subclass,${super[Base].foo}]" } test(assert((new Subclass).foo === "[foo from Subclass,foo from Base]")) }
scala/scala
test/tasty/run/src-2/tastytest/TestBase.scala
Scala
apache-2.0
261
/* package doodle.examples import doodle.core._ import doodle.syntax._ object ExampleName { def draw: Image = ??? } */
Angeldude/doodle
shared/src/main/scala/doodle/examples/_template.scala
Scala
apache-2.0
123
package org.scalafmt.rewrite import scala.annotation.tailrec import scala.meta._ import scala.meta.tokens.Token import org.scalafmt.config.{RedundantBracesSettings, ScalafmtConfig} import org.scalafmt.internal._ import org.scalafmt.util.InfixApp import org.scalafmt.util.TreeOps._ object RedundantBraces extends Rewri...
scalameta/scalafmt
scalafmt-core/shared/src/main/scala/org/scalafmt/rewrite/RedundantBraces.scala
Scala
apache-2.0
17,748
/* * 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...
jenniew/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/nn/ExpSpec.scala
Scala
apache-2.0
1,886
package mesosphere.marathon package core.instance import com.typesafe.scalalogging.StrictLogging import mesosphere.marathon.core.condition.Condition import mesosphere.marathon.core.pod.MesosContainer import mesosphere.marathon.core.task.bus.MesosTaskStatusTestHelper import mesosphere.marathon.core.task.state.{NetworkI...
mesosphere/marathon
src/test/scala/mesosphere/marathon/core/instance/TestTaskBuilder.scala
Scala
apache-2.0
19,733
package doodle package java2d package algebra import doodle.core.Point import doodle.java2d.effect.Canvas import monix.reactive.Observable trait MouseMove extends doodle.interact.algebra.MouseMove[Canvas] { def mouseMove(canvas: Canvas): Observable[Point] = { canvas.mouseMove } }
underscoreio/doodle
java2d/src/main/scala/doodle/java2d/algebra/MouseMove.scala
Scala
apache-2.0
291
/* * Copyright 2021 ABSA Group Limited * * 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...
AbsaOSS/spline
producer-services/src/main/scala/za/co/absa/spline/producer/service/InconsistentEntityException.scala
Scala
apache-2.0
751
/** * 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-wikitext/src/test/scala/org/fusesource/scalate/wikitext/SwizzleLinkFilterTest.scala
Scala
apache-2.0
3,058
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 Foundatio...
HuangLS/neo4j
community/cypher/cypher/src/test/scala/org/neo4j/cypher/performance/DataImportTest.scala
Scala
apache-2.0
5,084
package edu.rice.habanero.benchmarks.fjthrput import edu.rice.habanero.actors.{JumiActor, JumiActorState, JumiPool} import edu.rice.habanero.benchmarks.{Benchmark, BenchmarkRunner} /** * * @author <a href="http://shams.web.rice.edu/">Shams Imam</a> (shams@rice.edu) */ object ThroughputJumiActorBenchmark { def m...
shamsmahmood/savina
src/main/scala/edu/rice/habanero/benchmarks/fjthrput/ThroughputJumiActorBenchmark.scala
Scala
gpl-2.0
1,590
/** * Copyright (C) 2012 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...
ajw625/orbeon-forms
src/main/scala/org/orbeon/oxf/xforms/function/FunctionSupport.scala
Scala
lgpl-2.1
5,834
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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 b...
hpe-cct/cct-core
src/main/scala/cogx/compiler/gpu_operator/expression/NulleryIntExpression.scala
Scala
apache-2.0
1,321
package org.jetbrains.plugins.scala package lang package psi package impl package expr import com.intellij.lang.ASTNode import com.intellij.openapi.progress.ProgressManager import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.lang.psi.api.base.ScReference import org.jetbrains.plugins.scala.lang.resolv...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScReferenceImpl.scala
Scala
apache-2.0
1,466
/* * Copyright © 2016 Cask Data, 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...
caskdata/cdap
cdap-unit-test/src/test/scala/co/cask/cdap/spark/app/Person.scala
Scala
apache-2.0
755
/* * saxophone - a markup processing program * Copyright (C) 2015 Haak Saxberg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) a...
haaksmash/saxophone
src/test/scala/com/haaksmash/saxophone/translators/HTMLTranslatorSpec.scala
Scala
gpl-3.0
13,379
package org.jetbrains.plugins.scala package lang package psi package api package base package types /** * @author Alexander Podkhalyuzin * Date: 22.02.2008 */ trait ScCompoundTypeElement extends ScTypeElement { override protected val typeName = "CompoundType" def components : Seq[ScTypeElement] = findChildren[S...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/api/base/types/ScCompoundTypeElement.scala
Scala
apache-2.0
637
import scala.tools.partest.SessionTest object Test extends SessionTest { def session = """ scala> val x: Any = 42 x: Any = 42 scala> x + " works" res0: String = 42 works scala> import Predef.{ any2stringadd => _, _ } import Predef.{any2stringadd=>_, _} scala> x + " works" <console>:14: error: value + is not a m...
felixmulder/scala
test/files/run/t1931.scala
Scala
bsd-3-clause
667
package org.jetbrains.plugins.scala package lang package psi package api package expr import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.ScTemplateDefinition /** * @author Alexander Podkhalyuzin * Date: 06.03.2008 */ trait ScNewTemplateDefinition extends ScExpression with ScTemplateDefinition { overr...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/api/expr/ScNewTemplateDefinition.scala
Scala
apache-2.0
377
package simulations import org.scalatest.FunSuite import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class CircuitSuite extends CircuitSimulator with FunSuite { val InverterDelay = 1 val AndGateDelay = 3 val OrGateDelay = 5 test("andGate example") { val...
leafduo/reactive-001
simulations/src/test/scala/simulations/CircuitSuite.scala
Scala
mit
1,262
/* * Copyright 2010-2011 Christos KK Loverdos * * 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...
loverdos/restie
src/main/scala/com/ckkloverdos/restie/RestPathPattern.scala
Scala
apache-2.0
5,128
package scala.pickling.non.public.separate import org.scalatest.FunSuite import scala.pickling._, scala.pickling.Defaults._, json._ class Person(private val name: String, age: Int, val hobby: Hobby) { // NOTE: be careful not to reference age anywhere, so that it's elided by the "constructors" phase override def t...
eed3si9n/pickling-historical
core/src/test/scala/pickling/run/non-public-separate.scala
Scala
bsd-3-clause
1,134
package bootstrap.liftweb import com.normation.syweno.syncrepl._ import apacheds._ import unboundid._ import net.liftweb.util.Props import net.liftweb.common._ /** * Syncrepl configuration. * * Of course, in a real application, that should go in some * sort of configuration file, like a properties one. */ /...
fanf/syweno
src/main/scala/bootstrap/liftweb/InitSyncrepl.scala
Scala
apache-2.0
2,126
package util package config import models.{Asset, User} import play.api.{Logger, Mode, Play} object AppConfig { var globalConfig: Option[PlayConfiguration] = None private val UserSession = new ThreadLocal[Option[User]] { override def initialValue(): Option[User] = None } // Ignore asset for dangerous com...
Shopify/collins
app/util/config/AppConfig.scala
Scala
apache-2.0
1,448
/*********************************************************************** * Copyright (c) 2013-2015 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 ...
drackaer/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/util/GeoMesaBatchWriterConfigTest.scala
Scala
apache-2.0
10,049
package de.sciss.fscape import de.sciss.fscape.Ops._ import de.sciss.kollflitz.Vec import scala.concurrent.Promise class Issue59 extends UGenSpec { "Multiplication by zero" should "not be replaced by constant" in { val p = Promise[Vec[Double]]() val n = 123 val g = Graph { import graph._ va...
Sciss/FScape-next
core/jvm/src/test/scala/de/sciss/fscape/Issue59.scala
Scala
agpl-3.0
570
/** * 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/avocado
avocado-core/src/test/scala/org/bdgenomics/avocado/postprocessing/FilterDepthSuite.scala
Scala
apache-2.0
4,206
/** * Copyright (c) 2015, Cloudera, Inc. All Rights Reserved. * * Cloudera, Inc. 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/LIC...
helio9cn/spark-finance
src/main/scala/com/cloudera/finance/examples/MonteCarloValueAtRiskExample.scala
Scala
apache-2.0
3,137
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
jedesah/Quasar
ejson/src/main/scala/quasar/ejson/Type.scala
Scala
apache-2.0
1,280
package com.taig.tmpltr.engine.html import com.taig.tmpltr._ import play.api.mvc.Content class u( val attributes: Attributes, val content: Content ) extends markup.u with Tag.Body[u, Content] object u extends Tag.Body.Appliable[u, Content]
Taig/Play-Tmpltr
app/com/taig/tmpltr/engine/html/u.scala
Scala
mit
243
/* * 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/iht-frontend
app/iht/controllers/application/assets/properties/PropertyTenureController.scala
Scala
apache-2.0
8,942
package org.scaladebugger.api.profiles.java.info import org.scaladebugger.api.lowlevel.events.misc.NoResume import org.scaladebugger.api.profiles.java.JavaDebugProfile import org.scaladebugger.api.profiles.traits.info.ThreadInfo import org.scaladebugger.api.utils.JDITools import org.scaladebugger.api.virtualmachines.D...
ensime/scala-debugger
scala-debugger-api/src/it/scala-2.11/org/scaladebugger/api/profiles/java/info/JavaFieldInfoScala211IntegrationSpec.scala
Scala
apache-2.0
2,875
package com.arcusys.valamis.lesson.scorm.model import com.arcusys.valamis.lesson.scorm.model.manifest.{ Metadata, ResourceFile, ScoResource } import org.scalatest.FlatSpec import org.scalatest.matchers.ShouldMatchers class ScoResourceTest extends FlatSpec with ShouldMatchers { val someFiles = Seq(new ResourceFile("...
ViLPy/Valamis
valamis-scorm-lesson/src/test/scala/com/arcusys/valamis/lesson/scorm/model/ScoResourceTest.scala
Scala
lgpl-3.0
5,069
/* * Licensed to Cloudera, Inc. under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Cloudera, Inc. licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use thi...
Peddle/hue
apps/spark/java/livy-spark/src/main/scala/com/cloudera/hue/livy/spark/interactive/InteractiveSessionYarn.scala
Scala
apache-2.0
2,506
/* * 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 ...
hvanhovell/spark
sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCV2Suite.scala
Scala
apache-2.0
18,377
package blended.jmx import javax.management.DynamicMBean /** * Maps ordinary Scala classes to Open (Dynamic) MBeans. */ trait OpenMBeanMapper { /** * Maps a product (case class) to a Open MBean. * @param cc The case class. * @return The Open MBean. */ def mapProduct(cc: Product): DynamicMBean }
woq-blended/blended
blended.jmx/jvm/src/main/scala/blended/jmx/OpenMBeanMapper.scala
Scala
apache-2.0
318
/* * 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 ...
michalsenkyr/spark
core/src/main/scala/org/apache/spark/deploy/SparkHadoopUtil.scala
Scala
apache-2.0
18,100
package play.api.libs { /** * The Iteratee monad provides strict, safe, and functional I/O. */ package object iteratee { type K[E, A] = Input[E] => Iteratee[E, A] } } package play.api.libs.iteratee { import com.google.appengine.api.ThreadManager private[iteratee] object internal { import scala.concurrent.E...
siderakis/playframework-appengine
samples/realtime-clock/src/main/scala/controllers/package.scala
Scala
apache-2.0
17,789
package TurboRav import Chisel._ class FetchTest(c: Fetch) extends JUnitTester(c) { val INSTRUCTION = 2 val RO_DATA = 3 def reset_all() = { println("Reset in between tests") step(1) clear_all_pokes() reset(1) step(1) println("End of reset") } def clear_all_pokes() = { // NB: Mu...
SebastianBoe/turborav
hw/src/test/scala/tb/Fetchtest.scala
Scala
bsd-2-clause
2,007
package monocle.std import monocle.function._ import monocle.{Iso, Lens, PTraversal} object tuple6 extends Tuple6Instances trait Tuple6Instances { implicit def tuple6Each[A]: Each[(A, A, A, A, A, A), A] = new Each[(A, A, A, A, A, A), A] { def each = PTraversal.apply6[(A, A, A, A, A, A), (A, A, A, A, A, ...
CapeSepias/Monocle
core/src/main/scala/monocle/std/Tuple6.scala
Scala
mit
2,740
package com.twitter.scalding.beam_backend import com.twitter.algebird.{Semigroup, SummingCache} import org.apache.beam.sdk.transforms.DoFn.{FinishBundle, ProcessElement, StartBundle} import org.apache.beam.sdk.transforms.windowing.{BoundedWindow, GlobalWindow} import org.apache.beam.sdk.transforms.{DoFn, ProcessFuncti...
twitter/scalding
scalding-beam/src/main/scala/com/twitter/scalding/beam_backend/BeamFunctions.scala
Scala
apache-2.0
3,117
/* * Copyright 2006-2010 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...
jeppenejsum/liftweb
framework/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/MappedDecimal.scala
Scala
apache-2.0
6,326
package org.jetbrains.plugins.scala package lang package psi package impl package expr import com.intellij.lang.ASTNode import com.intellij.psi.PsiElementVisitor import org.jetbrains.plugins.scala.extensions._ import org.jetbrains.plugins.scala.lang.psi.api.ScalaElementVisitor import org.jetbrains.plugins.scala.lang.p...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScInfixExprImpl.scala
Scala
apache-2.0
1,931
package scala.models import com.bryzek.apidoc.generator.v0.models.InvocationForm import ning.Ning18ClientGenerator import org.scalatest.{ShouldMatchers, FunSpec} class ExampleUnionTypesWithDiscriminatorSpec extends FunSpec with ShouldMatchers { private lazy val service = models.TestHelper.parseFile(s"/examples/api...
Seanstoppable/apidoc-generator
scala-generator/src/test/scala/models/ExampleUnionTypesWithDiscriminatorSpec.scala
Scala
mit
763
package com.dslplatform.sbt import com.dslplatform.compiler.client.parameters._ import com.dslplatform.compiler.client.{CompileParameter, Main, Utils} import org.clapper.classutil.ClassFinder import sbt.Def.Classpath import sbt.{IO, Logger} import java.io.File import java.lang.management.ManagementFactory i...
melezov/dsl-compiler-client
SbtPlugin/src/main/scala/com/dslplatform/sbt/Actions.scala
Scala
bsd-3-clause
20,496
package org.au9ustine.puzzles.s99 import org.scalatest.{FlatSpec, Matchers} /** * Problem 23 Unit Testing * * Created by au9ustine on 10/31/2015. */ class P23$Test extends FlatSpec with Matchers { "P23.randomSelect" should "extract a given number of randomly selected elements from a list." in { val (n, ls...
au9ustine/org.au9ustine.puzzles.s99
src/test/scala/org/au9ustine/puzzles/s99/P23$Test.scala
Scala
apache-2.0
465
import scala.tools.partest.nest.FileManager._ object Test extends App { val cm = reflect.runtime.currentMirror val u = cm.universe import u._ val JavaUniverseTpe = typeOf[reflect.runtime.JavaUniverse] val DefinitionsModule = JavaUniverseTpe.member(TermName("definitions")) def forceCode(prefix: String, tp...
som-snytt/dotty
tests/disabled/partest/run/t6240-universe-code-gen.scala
Scala
apache-2.0
2,996
package com.transport.domain.otp import java.io.File import com.transport.util.Configuration import org.opentripplanner.routing.impl.{GraphScanner, InputStreamGraphSource} import org.opentripplanner.routing.services.GraphService import scala.collection.JavaConverters._ class OTPGraphService extends Configuration { ...
ksarath/transport-using-opentripplanner
src/main/scala/com/transport/domain/otp/OTPGraphService.scala
Scala
apache-2.0
1,881
package collatz object sequence { def main(args: Array[String]) = { val max_a0 = Integer.parseInt(args(0)) def getSequence(a: Int, len: Int): Int = a match { case 1 => len case x => if (x % 2 == 0) getSequence(x/2, len+1) else getSequence((3*x+1)/2, len+1) } var (max_len, longest) = (0, ...
alienfluid/scala-collatz
src/collatz/sequence.scala
Scala
mit
523
object Enclosing1 { println("must not be executed") object InnerObject { val foo: Int = 42 println("InnerObject constructor") } class InnerClass(val foo: Int) { println("InnerClass constructor") } } object Enclosing2 { println("Enclosing2 constructor") object InnerObject { val foo: Int...
dotty-staging/dotty
tests/run/no-init-enclosing-static-objects.scala
Scala
apache-2.0
947
/* * Copyright 2017 Datamountaineer. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
datamountaineer/stream-reactor
kafka-connect-common/src/test/scala/com/datamountaineer/streamreactor/connect/converters/source/AvroConverterTest.scala
Scala
apache-2.0
5,565
package models import play.api.db.slick._ import models.dao.CategoryRecord case class Category(parent: Option[MaybeLoaded[Category]], title: String, isHidden: Boolean, sortPriority: Long) object CategoryImplicits { implicit object CategoryHierarchyElementLike extends HierarchyElementLike[Loaded[Category]] { de...
vokhotnikov/sevstone-play
app/models/CategoryService.scala
Scala
mit
2,194
/* * 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/org/apache/openwhisk/core/controller/test/KindRestrictorTests.scala
Scala
apache-2.0
3,588
package com.scrumwall.helper import org.openqa.selenium.{WebElement, By} import org.junit.Assert._ trait ColumnUtil extends BaseUtil { def getColumns() : List[WebElement] = { val columnContainer = driver.findElement(By.id("columnContainer")) columnContainer.findElements(By.className("column")).toA...
johnnyyen/scrumwall
src/test/java/com/scrumwall/helper/ColumnUtil.scala
Scala
gpl-3.0
2,136
package collins.callbacks import java.beans.PropertyChangeEvent import collins.models.Asset import collins.models.AssetMetaValue import collins.models.IpAddresses import collins.models.State /** * Given a matchMethod, apply it to the PCE. * * @param matchMethod a string containing a method to apply * @param fn a...
discordianfish/collins
app/collins/callbacks/CallbackMatcher.scala
Scala
apache-2.0
2,916
package edu.gemini.dbTools.ephemeris import edu.gemini.pot.sp.{ISPObservation, ISPNode} import edu.gemini.pot.spdb.{IDBDatabaseService, DBAbstractQueryFunctor} import edu.gemini.spModel.rich.pot.sp.obsWrapper import edu.gemini.spModel.target.EphemerisPurge import java.security.Principal import java.util.logging.{Leve...
spakzad/ocs
bundle/edu.gemini.spdb.reports.collection/src/main/scala/edu/gemini/dbTools/ephemeris/EphemerisPurgeFunctor.scala
Scala
bsd-3-clause
1,291
package com.glowingavenger.plan.importexport import scala.util.parsing.combinator.syntactical.StandardTokenParsers import scala.util.parsing.combinator.lexical.StdLexical import org.sat4j.scala.Logic.BoolExp import org.sat4j.scala.Logic.identFromSymbol import com.glowingavenger.plan.model.{Problem, UnboundProblem, Dom...
dreef3/glowing-avenger
src/main/scala/com/glowingavenger/plan/importexport/PDDLParser.scala
Scala
mit
3,915
/* Copyright 2013 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
nvoron23/summingbird
summingbird-client/src/main/scala/com/twitter/summingbird/store/ClientStore.scala
Scala
apache-2.0
5,904
/* * 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 ...
jkbradley/spark
core/src/main/scala/org/apache/spark/deploy/StandaloneResourceUtils.scala
Scala
apache-2.0
17,249
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package docs.home.scaladsl.serialization.v1 //#add-optional case class ItemAdded(shoppingCartId: String, productId: String, quantity: Int) //#add-optional
lagom/lagom
docs/manual/scala/guide/cluster/code/docs/home/scaladsl/serialization/v1/ItemAdded.scala
Scala
apache-2.0
224
package models.services import models.{ Goal, Gathering } import javax.inject._ import models.daos.{ GatheringDAO, GoalDAO } import scala.concurrent._ import play.api.libs.concurrent.Execution.Implicits.defaultContext /** * Service implementation for handling Accumulation objects. Delegates to AccumulationDAO for a...
leannenorthrop/play-mantra-accumulations
app/models/services/GatheringServiceImpl.scala
Scala
apache-2.0
2,828
package support /** * Created by vayne on 15. 2. 17.. */ case class Person(name: String, sex: String, age: Int = 0)
MinCha/elascala
src/test/scala/support/Person.scala
Scala
apache-2.0
118
/* @meta { "processorId": "org.helgoboss.scala_bundle:1.0.0", "projectId": "org.helgoboss:one-filer-commandlet:1.0-SNAPSHOT", "dependencies": [ "com.weiglewilczek.scala-lang-osgi:scala-library:2.9.1", "org.helgoboss:meta-snippet:1.0-SNAPSHOT", "org.helgoboss:meta-snippet-transformer:1.0-...
helgoboss/one-filer-commandlet
org.helgoboss.one-filer-commandlet.scala
Scala
mit
6,214
package org.jetbrains.plugins.scala package lang.psi.api.expr import com.intellij.openapi.util.Key import com.intellij.psi.{PsiElement, PsiNamedElement} import org.jetbrains.plugins.scala.extensions._ import org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil._ import org.jetbrains.plugins.scala.lang.psi.api.InferUtil i...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/api/expr/MethodInvocation.scala
Scala
apache-2.0
15,033
/* * EditAddRemoveFScapeOutput.scala * (Mellite) * * Copyright (c) 2012-2022 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Affero General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * contact@sciss.de */ package de.sciss....
Sciss/Mellite
app/src/main/scala/de/sciss/mellite/edit/EditAddRemoveFScapeOutput.scala
Scala
agpl-3.0
2,266
package models import play.api.Play.current import play.api.cache._ import play.modules.reactivemongo.ReactiveMongoPlugin import play.api.libs.json._ import reactivemongo.bson._ import scala.concurrent.{Await, Future} import play.modules.reactivemongo.json.BSONFormats._ import scala.concurrent.duration._ import play....
soapower/soapower
app/models/MockGroup.scala
Scala
gpl-3.0
4,475
package strd.dht import scala.concurrent.Future import lmbrd.zn.util.{ByteBuf, PrimitiveBits, MD5Util, BytesHash} import strd.CByte import java.io.{DataOutputStream, OutputStream} /** * * User: light * Date: 9/30/13 * Time: 12:59 AM */ object DHTEntities { } trait ConflictResolver { def merge( d1 : DHTRow,...
onerinvestments/strd
strd-commons/src/main/scala/strd/dht/DHTEntities.scala
Scala
apache-2.0
5,680
package com.github.eyce9000.spark.bes.client /** * Created by grlucche on 2/21/16. */ import com.github.eyce9000.spark.bes.DefaultSource import org.junit.Test class TestSchemaExtractor { @Test def testExtractor: Unit ={ val query = {""" ( id of it | 0 //@Column id , name of it | "" //@Column...
eyce9000/bigfix-relevance-spark
src/test/scala/com/github/eyce9000/spark/bes/client/TestSchemaExtractor.scala
Scala
apache-2.0
1,891
package com.ecfront.ez.framework.service.jdbc import java.util.Date import com.ecfront.common.Resp import com.ecfront.ez.framework.core.EZ import com.ecfront.ez.framework.core.helper.TimeHelper import scala.beans.BeanProperty /** * 带操作信息的实体基类 * 默认情况下操作信息会根据上下文自动注入 */ trait SecureModel extends BaseModel { @...
gudaoxuri/ez-framework
services/jdbc/src/main/scala/com/ecfront/ez/framework/service/jdbc/SecureModel.scala
Scala
apache-2.0
2,251
package de.aderenbach.gatlingdsl import de.aderenbach.gatlingdsl.parser.DslParser import de.aderenbach.gatlingdsl.parser.simpledsl.{SourceLoader, SimpleDslParser, SimpleDslSimlationBuilder} import scala.io.Source /** * Created by Alexander Derenbach <alexander.derenbach@gmail.com> on 09.10.15. */ object LoadTestRu...
aderenbach/gatlingDslDriver
src/main/scala/de/aderenbach/gatlingdsl/LoadTestRunner.scala
Scala
mit
752
package com.twitter.finagle.filter import com.twitter.finagle._ import com.twitter.util.{Monitor, Future, Try, Throw} import scala.util.control.NonFatal private[finagle] object MonitorFilter { val role = Stack.Role("Monitoring") /** * Creates a [[com.twitter.finagle.Stackable]] [[com.twitter.finagle.filter.Mo...
sveinnfannar/finagle
finagle-core/src/main/scala/com/twitter/finagle/filter/MonitorFilter.scala
Scala
apache-2.0
1,494
package com.kifi.lda sealed trait LDAMessage case object StartTraining extends LDAMessage case class NextMiniBatchRequest extends LDAMessage case class MiniBatchDocs(docs: Seq[Doc], wholeBatchEnded: Boolean) extends LDAMessage case class UniformSampling(doc: Doc) extends LDAMessage case class Sampling(doc: Doc, theta:...
kifi/ReactiveLDA
src/main/scala/com/kifi/lda/LDAMessage.scala
Scala
mit
468
/* * Copyright 2014–2020 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
slamdata/quasar
frontend/src/test/scala/quasar/frontend/data/DataCodecSpec.scala
Scala
apache-2.0
12,043
package com.criteo.dev.cluster.config import com.typesafe.config.Config import configs.Result import configs.syntax._ object TargetConfigParser { def apply(config: Config): Result[TargetConfig] = ( common(config) ~ local(config) ~ aws(config) )(TargetConfig) def common(config: Config): ...
criteo/berilia
src/main/scala/com/criteo/dev/cluster/config/TargetConfigParser.scala
Scala
apache-2.0
1,886
package com.twitter.finagle.loadbalancer import com.twitter.conversions.time._ import com.twitter.finagle.stats.{StatsReceiver, NullStatsReceiver} import com.twitter.finagle.util.{Rng, DefaultTimer} import com.twitter.finagle.{ServiceFactory, NoBrokersAvailableException} import com.twitter.util.{Activity, Duration, Ti...
suls/finagle
finagle-core/src/main/scala/com/twitter/finagle/loadbalancer/Balancers.scala
Scala
apache-2.0
5,197
package common import akka.actor.{Actor, ActorRef} case class MAP(title: String, url: String) case class REDUCE(name: String, title: String) case class AddRemoteMap(actors: List[ActorRef]) case class AddRemoteReduce(actors: List[ActorRef], client:ActorRef) case object START case object SHUTDOWN case object Flush case...
highlanderkev/MapReduce
remote_mapreduce/common/src/main/scala/messages.scala
Scala
mit
334
/*******************************************************************************/ /* */ /* Copyright (C) 2016 by Max Lv <max.c.lv@gmail.com> */ /* Copyright (C) 2016 by Mygod Studio <contact-shadowsocks-android@mygod....
anyforever/shadowsocks-android
src/main/scala/com/github/shadowsocks/widget/UndoSnackbarManager.scala
Scala
gpl-3.0
3,097
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
bravo-zhang/spark
sql/core/src/test/scala/org/apache/spark/sql/api/r/SQLUtilsSuite.scala
Scala
apache-2.0
1,202
/* Title: Pure/Tools/update_header.scala Author: Makarius Replace theory header command. */ package isabelle object Update_Header { def update_header(section: String, path: Path) { val text0 = File.read(path) val text1 = (for (tok <- Token.explode(Keyword.Keywords.empty, text0).itera...
larsrh/libisabelle
modules/pide/2018/src/main/scala/Tools/update_header.scala
Scala
apache-2.0
1,631
/* * Wire * Copyright (C) 2016 Wire Swiss GmbH * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This progr...
wireapp/wire-android-sync-engine
zmessaging/src/main/scala/com/waz/service/Timeouts.scala
Scala
gpl-3.0
2,686
package net.nomadicalien.ch6 case class State[S, +A](run: S => (A, S)) { import State._ def map[B](f: A => B): State[S, B] = flatMap(a => unit(f(a))) def map2[B, C](sb: State[S, B])(f: (A, B) => C): State[S, C] = flatMap(a => sb.map(b => f(a, b))) def flatMap[B](f: A => State[S, B]): State[S, B] = ...
BusyByte/func-prog-scala
exercises-and-notes/src/main/scala/net/nomadicalien/ch6/State.scala
Scala
apache-2.0
964
package articles import articles.config.{ArticlePopulator, Articles} import articles.controllers.ArticlePage import articles.controllers.ArticlePageJsonMappings._ import play.api.libs.json.{JsValue, Json} import play.api.libs.ws.{WSClient, WSResponse} import testhelpers.RealWorldWithServerBaseTest import articles.cont...
Dasiu/play-framework-test-project
test/articles/ArticleControllerTest.scala
Scala
mit
2,498
package model.sensor.impl import java.time.{Clock, Instant} import com.paulgoldbaum.influxdbclient.{Database, Point, Series} import dao._ import loader.{ForeverRetentionPolicy, FourDaysRetentionPolicy, OneHourRetentionPolicy, RetentionPolicy} import model.sensor._ import play.api.Logger import play.api.libs.concurren...
vavravl1/home_center
app/model/sensor/impl/DoubleValuesMeasuredPhenomenonInflux.scala
Scala
mit
3,165
package com.programmaticallyspeaking.ncd.nashorn import java.util.concurrent.TimeUnit import com.programmaticallyspeaking.ncd.host._ import scala.concurrent.Await import scala.concurrent.duration._ import scala.util.{Failure, Success} // Manual perf tests class PerformanceTest extends PerformanceTestFixture { "e...
provegard/ncdbg
src/test/scala/com/programmaticallyspeaking/ncd/nashorn/PerformanceTest.scala
Scala
bsd-3-clause
4,526
/** * 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 ...
fnothaft/qc-metrics
qc-metrics-core/src/main/scala/org/bdgenomics/adam/rdd/read/comparisons/ComparisonTraversalEngine.scala
Scala
apache-2.0
3,693
package is.hail.types.virtual import is.hail.annotations._ import is.hail.check.Gen import is.hail.types.physical.PBaseStruct import is.hail.utils._ import org.apache.spark.sql.Row import org.json4s.jackson.JsonMethods import scala.reflect.{ClassTag, classTag} object TBaseStruct { /** * Define an ordering on R...
hail-is/hail
hail/src/main/scala/is/hail/types/virtual/TBaseStruct.scala
Scala
mit
3,126
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2018, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
ashawley/scala-xml
shared/src/main/scala/scala/xml/Text.scala
Scala
bsd-3-clause
1,364
package mesosphere.marathon.api import javax.inject.Named import javax.net.ssl.SSLContext import com.fasterxml.jackson.module.scala.DefaultScalaModule import com.google.inject.servlet.ServletModule import com.google.inject.{ Singleton, Provides, Scopes } import mesosphere.chaos.http.{ HttpConf, RestModule } import me...
cherrydocker/marathon-1
src/main/scala/mesosphere/marathon/api/MarathonRestModule.scala
Scala
apache-2.0
3,280
import stainless.lang._ import stainless.annotation._ object LambdaEquality2 { sealed abstract class Nat case class Zero() extends Nat case class Succ(n: Nat) extends Nat def plus(a: Nat, b: Nat): Nat = a match { case Zero() => b case Succ(a2) => Succ(plus(a2,b)) } @induct def plusZero(a: Nat) ...
epfl-lara/stainless
frontends/benchmarks/verification/invalid/LambdaEquality2.scala
Scala
apache-2.0
763
/*********************************************************************** * 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...
aheyne/geomesa
geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/concurrent/CachedThreadPool.scala
Scala
apache-2.0
5,303
/* * 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...
pmularien/spectrum-old
financial/src/main/scala/org/quantintel/ql/model/Parameter.scala
Scala
apache-2.0
877
/* * 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/main/scala/org/apache/flink/table/planner/codegen/CodeGenUtils.scala
Scala
apache-2.0
32,956
/* * Copyright 2012-2013 Eligotech BV. * * 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 ...
CoderPaulK/eventsourced
es-examples/src/main/scala/org/eligosource/eventsourced/guide/StackableTraits.scala
Scala
apache-2.0
2,582
package org.w3.banana package ldpatch import org.w3.banana._ import scala.util.Try import org.w3.banana.ldpatch.{ model => m } trait Semantics[Rdf <: RDF] { implicit val ops: RDFOps[Rdf] import ops._ object semantics { case class State( graph: Rdf#Graph, varmap: Map[m.Var, Rdf#Node] ) { ...
betehess/banana-ldpatch
ldpatch/src/main/scala/org/w3/ldpatch/Semantics.scala
Scala
mit
10,504
/* * Copyright (C) 2005, The Beangle Software. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
beangle/commons
core/src/main/scala/org/beangle/commons/lang/SystemInfo.scala
Scala
lgpl-3.0
4,524
/* * Copyright (c) 2014-2021 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...
monix/monix
monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip2Suite.scala
Scala
apache-2.0
6,107