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
/** * Scala Units * Copyright (C) 2012 Bradley W. Kimmel * * 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, * cop...
bwkimmel/scala-units
src/main/scala/ca/eandb/units/PrimitiveUnits.scala
Scala
mit
1,573
package models import anorm._ abstract class FourLegTrade(underlier: String, undLast: BigDecimal, expires: Long) extends Trade(underlier, undLast, expires) { val lowerMaxProfitPrice: BigDecimal val higherMaxProfitPrice: BigDecimal val lowerMaxLossPrice: BigDecimal val higherMaxLossPrice: BigDecimal }
Exupery/optionometer
app/models/FourLegTrade.scala
Scala
mit
319
/* * Component.scala * (LucreSwing) * * Copyright (c) 2014-2021 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.lucre.swing.grap...
Sciss/LucreSwing
shared/src/main/scala/de/sciss/lucre/swing/graph/Component.scala
Scala
agpl-3.0
3,029
package org.jetbrains.plugins.scala package lang package parser import com.intellij.lang.{ASTNode, Language} import com.intellij.lexer.Lexer import com.intellij.openapi.project.Project import com.intellij.psi.PsiFile import com.intellij.psi.stubs.PsiFileStub import com.intellij.psi.tree.{ICompositeElementType, IElemen...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/parser/ScalaElementTypes.scala
Scala
apache-2.0
15,886
/* * Copyright 2009-2016 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 or ag...
ttislerdg/mrgeo
mrgeo-mapalgebra/mrgeo-mapalgebra-vector/src/main/scala/org/mrgeo/mapalgebra/InlineCsvMapOp.scala
Scala
apache-2.0
5,916
package com.devdiscoveries.mazes.algorithms import com.devdiscoveries.mazes.{Cell, Grid} import scala.util.Random /** * Created by hugovalk on 24-10-16. */ trait Wilsons extends MazeAlgorithm { this: Grid => override lazy val links: Seq[Link] = { def loop(unvisited: List[Cell], results: List[Link]): Lis...
hugovalk/mazes
src/main/scala/com/devdiscoveries/mazes/algorithms/Wilsons.scala
Scala
gpl-3.0
1,172
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/pensions-lifetime-allowance-frontend
test/forms/AmendPensionsTakenBeforeFormSpec.scala
Scala
apache-2.0
6,535
/* * 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 ...
WindCanDie/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/python/ArrowPythonRunner.scala
Scala
apache-2.0
6,867
package org.jetbrains.plugins.scala.lang.psi.implicits import com.intellij.psi.{PsiElement, PsiNamedElement, ResolveState} import org.jetbrains.plugins.scala.lang.resolve.ScalaResolveState.ResolveStateExt import org.jetbrains.plugins.scala.lang.resolve.processor.ResolveProcessor import org.jetbrains.plugins.scala.lang...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/implicits/ExtensionProcessor.scala
Scala
apache-2.0
1,177
/* * Copyright (c) 2021. StulSoft */ package com.stulsoft.poc.math import scala.util.Try /** Differentiate a function * * @author Yuriy Stul */ object Differentiator { /** * Differentiate a function * * @param func the function to differentiate * @param delta the delta for differentiate * @para...
ysden123/poc
math/math1/src/main/scala/com/stulsoft/poc/math/Differentiator.scala
Scala
mit
780
/* * 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 ...
mtunique/flink
flink-runtime/src/test/scala/org/apache/flink/runtime/testingUtils/TestingCluster.scala
Scala
apache-2.0
15,354
package gitbucket.core.util import gitbucket.core.util.SyntaxSugars._ import org.apache.commons.io.FileUtils import org.eclipse.jgit.api.Git import org.eclipse.jgit.dircache.DirCache import org.eclipse.jgit.lib._ import org.eclipse.jgit.revwalk._ import org.eclipse.jgit.treewalk._ import org.eclipse.jgit.merge._ impo...
x-way/gitbucket
src/test/scala/gitbucket/core/util/GitSpecUtil.scala
Scala
apache-2.0
4,207
// Starter Code for Exercise 6 // From "map & reduce" atom import com.atomicscala.AtomicTest._ sumIt(1, 2, 3) is 6 sumIt(45, 45, 45, 60) is 195
P7h/ScalaPlayground
Atomic Scala/atomic-scala-solutions/32_mapAndreduce/Starter-6.scala
Scala
apache-2.0
145
package homework import scala.annotation.tailrec object Recursion { // Exercise 2.1, page 21 def fib(n: Int): Int = { @tailrec def go(n1: Int, n2: Int, iterations: Int): Int = { if (iterations >= n) n1+n2 else go(n2, n1+n2, iterations+1) } n match { case _ if (n < 1) => throw n...
laser/fp-in-scala
src/main/scala/homework/week2/Recursion.scala
Scala
mit
1,045
/* * Copyright (c) 2015-2017 Lymia Alusyia <lymia@lymiahugs.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use,...
Lymia/CivV_Mod2DLC
project/NativePatchBuild.scala
Scala
mit
10,064
/* * 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/webmvc
core/src/main/scala/org/beangle/webmvc/dispatch/impl/DefaultActionUriRender.scala
Scala
lgpl-3.0
3,846
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.2 * @date Tue Apr 9 13:31:26 EDT 2013 * @see LICENSE (MIT style license file). */ package scalation.graphalytics import collection.mutable.ListBuffer import math.pow import scalation.a...
mvnural/scalation
src/main/scala/scalation/graphalytics/ColorTree.scala
Scala
mit
7,371
package mesosphere.marathon.core.appinfo import mesosphere.marathon.Protos.MarathonTask import mesosphere.marathon.health.Health import mesosphere.marathon.state.PathId case class EnrichedTask( appId: PathId, task: MarathonTask, healthCheckResults: Seq[Health], servicePorts: Seq[Int] = Nil)
sledigabel/marathon
src/main/scala/mesosphere/marathon/core/appinfo/EnrichedTask.scala
Scala
apache-2.0
302
package view import java.util.Date import java.text.SimpleDateFormat import twirl.api.Html import util.StringUtil import service.RequestCache /** * Provides helper methods for Twirl templates. */ object helpers extends AvatarImageProvider with LinkConverter with RequestCache { /** * Format java.util.Date to ...
idleyoungman/gitbucket
src/main/scala/view/helpers.scala
Scala
apache-2.0
4,071
/* */ package see import org.junit.Assert._ import org.junit.{After, Before} import see.values._ /** Superclass for all see test cases. */ class TestCase { private[see] object IntVector { def apply(vs: Int*) = new Vector(for (v <- vs) yield Lint(v)) } private[see] object BoolVector { def apply(vs...
acruise/see
src/test/scala/see/TestCase.scala
Scala
bsd-3-clause
3,984
/* * 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/expressions/codegen/javaCode.scala
Scala
apache-2.0
11,123
/* * 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 ...
zohar-mizrahi/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/GeneratedAggregations.scala
Scala
apache-2.0
4,695
/* Copyright (C) 2008-2014 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
patverga/factorie
src/main/scala/cc/factorie/app/nlp/phrase/ParseBasedMention.scala
Scala
apache-2.0
8,407
class Foo private (val value : Int) abstract class Bar(val ctor : (Int) => Foo) object Foo extends Bar(new Foo(_)) //<--- ILLEGAL ACCESS
AlexSikia/dotty
tests/pos/t2127.scala
Scala
bsd-3-clause
139
/* * 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 ...
pgandhi999/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/RowDataSourceStrategySuite.scala
Scala
apache-2.0
2,791
package scala.lms package epfl package test3 import test1._ import test2._ trait MatchProg { this: Matching with Extractors => case class Success(x: Int) implicit def successTyp: Typ[Success] implicit def intTyp: Typ[Int] implicit def stringTyp: Typ[String] implicit def listTyp[T:Typ]: Typ[List[T]] ...
TiarkRompf/virtualization-lms-core
test-src/epfl/test3-parsers/TestMatch.scala
Scala
bsd-3-clause
3,580
package views.acquire object KeeperStillOnRecord { final val BuyAnotherVehicleId = "buyAnotherVehicle" final val FinishId = "finish" }
dvla/vehicles-acquire-online
app/views/acquire/KeeperStillOnRecord.scala
Scala
mit
140
package scalaprops import scalaz._ import scalaz.std.anyVal._ import ScalapropsScalaz._ object NullArgumentTest extends Scalaprops { import FunctionEqual._ private[this] implicit def equal[A, B](implicit A: Equal[Option[A] => B]): Equal[NullArgument[A, B]] = A.contramap(_.apply) val laws = { type F[A]...
scalaprops/scalaprops
scalaz/src/test/scala/scalaprops/NullArgumentTest.scala
Scala
mit
661
/** * Copyright 2016, deepsense.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 applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
commons/src/main/scala/io/deepsense/commons/rest/client/NotebookPoller.scala
Scala
apache-2.0
2,649
package ui.math import org.scalajs.dom class Mat4[T](var x1: T, var x2: T, var x3: T, var x4: T, var x5: T, var x6: T, var x7: T, var x8: T, var x9: T, var x10: T, ...
gvatn/play-scalajs-webgl-spark
client/src/main/scala/ui/math/Mat4.scala
Scala
mit
4,258
/* * Copyright 2013-2015 Websudos, Limited. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of c...
analytically/phantom
phantom-dsl/src/test/scala/com/websudos/phantom/builder/serializers/InsertQuerySerializationTest.scala
Scala
bsd-2-clause
3,629
package tutorial import geotrellis.raster._ import geotrellis.raster.io.geotiff._ import geotrellis.raster.render._ import com.typesafe.config.ConfigFactory object MaskBandsRandGandNIR { val maskedPath = "data/r-g-nir.tif" //constants to differentiate which bands to use val R_BAND = 0 val G_BAND = 1 val NIR...
geotrellis/geotrellis-landsat-tutorial
src/main/scala/tutorial/MaskBandsRandGandNIR.scala
Scala
apache-2.0
2,245
package week02 import scala.collection.immutable.Nil class Pouring(capacity: Vector[Int]) { //States type State = Vector[Int] val initialState = capacity map (x => 0) //Moves trait Move { def change(state: State): State } case class Empty(glass: Int) extends Move { def change(state: State): St...
juliocnsouzadev/scala_datascience
functional_program_design_in_scala/functional_program_design_in_scala/src/week02/Pouring.scala
Scala
mit
1,800
package sttp.client3.armeria.scalaz import com.linecorp.armeria.client.WebClient import com.linecorp.armeria.common.HttpData import com.linecorp.armeria.common.stream.StreamMessage import org.reactivestreams.Publisher import scalaz.concurrent.Task import sttp.client3.armeria.AbstractArmeriaBackend.newClient import stt...
softwaremill/sttp
armeria-backend/scalaz/src/main/scala/sttp/client3/armeria/scalaz/ArmeriaScalazBackend.scala
Scala
apache-2.0
2,310
package models import play.api.libs.json.{Format, JsResult, JsString, JsValue} import play.api.mvc.QueryStringBindable.Parsing object ThingType extends Enumeration { type Type = Value val Primary, Secondary, Other = Value implicit val jsonFormat = new Format[Type] { override def reads(json: JsValue): JsRes...
leanovate/swagger-check
examples/play-scala/app/models/ThingType.scala
Scala
mit
688
package test_data.v23.circs import scala.xml.Elem object XMLCircsData extends utils.TestUtils { def functionalTestCase1(xml: Elem) = { claimantDetails(xml) ++ careeDetails(xml) ++ declaration(xml:Elem) } /** * Section with stopped caring and without Other changes * @param xml * @return */ d...
Department-for-Work-and-Pensions/RenderingService
test/test_data/v23/circs/XMLCircsData.scala
Scala
mit
7,643
/* * 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 ...
bowenli86/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/expressions/ScalarOperatorsTest.scala
Scala
apache-2.0
16,934
package x7c1.salad.sample.inspector import x7c1.salad.inspector.TypeDigest import x7c1.salad.inspector.macros.TypeExpander import x7c1.salad.inspector.reflect.TypeReflector import x7c1.salad.sample.inspector.x1.x2.{Nested, FooTrait, FooObject} trait SampleTypes { def sampleType: TypeDigest def sampleType2: TypeDi...
x7c1/Salad
salad-sample/src/main/scala/x7c1/salad/sample/inspector/TraitFieldsSample.scala
Scala
mit
2,329
package scala.in.programming.abstract_internal_control /** * @author loustler * @since 02/26/2017 17:27 */ object Currying { /** * Currying the function that given parameter. * * @param x To currying function 1. * @param y like x. To currying function 2. * @return returns curreid function y...
loustler/scala
src/main/scala/scala/in/programming/abstract_internal_control/Currying.scala
Scala
mit
1,072
package mimir.optimizer.operator import java.sql._ import mimir.algebra._ import mimir.ctables._ import mimir.optimizer.OperatorOptimization object PushdownSelections extends OperatorOptimization { def wrap(selectCond: Expression, child: Operator): Operator = { selectCond match { case BoolPrimitive(true) => c...
UBOdin/mimir
src/main/scala/mimir/optimizer/operator/PushdownSelections.scala
Scala
apache-2.0
5,777
/* Copyright 2013 Lance Gatlin Author: lance.gatlin@gmail.com This file is part of org.s_mach library. org.s_mach library 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...
lancegatlin/s_mach.fsm
src/main/scala/org/s_mach/Enumerable/package.scala
Scala
gpl-3.0
3,818
package io.sphere.json import cats.data.Validated.Valid import io.sphere.json.generic._ import org.json4s.JValue import org.json4s.JsonAST.JNothing import org.json4s.jackson.JsonMethods.{compact, render} import org.scalatest.matchers.must.Matchers import org.scalatest.wordspec.AnyWordSpec class DeriveSingletonJSONSpe...
sphereio/sphere-scala-libs
json/json-derivation/src/test/scala/io/sphere/json/DeriveSingletonJSONSpec.scala
Scala
apache-2.0
4,024
import ds.Stack import ds.Stack._ import org.junit.runner.RunWith import org.scalacheck.Arbitrary._ import org.scalacheck.Gen import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.scalatest.prop.Checkers import org.scalacheck.Gen.oneOf import org.scalacheck.Arbitrary @RunWith(class...
amitdev/functional-ds
src/test/scala/StackTest.scala
Scala
mit
1,533
package org.jetbrains.plugins.scala.lang.benchmarks.typeInference import org.jetbrains.plugins.scala.base.libraryLoaders._ /** * @author Nikolay.Tropin */ class AmbiguousConversion extends TypeInferenceBenchmarkBase("AmbiguousConversion") class ConstructorPatternComplex extends TypeInferenceBenchmarkBase("Constr...
triplequote/intellij-scala
scala/benchmarks/test/org/jetbrains/plugins/scala/lang/benchmarks/typeInference/TypeInferenceBenchmarks.scala
Scala
apache-2.0
1,854
package gv package isi package functional import language.higherKinds trait FunctorOps[F[_], A] extends Any { this: FunctorDecorations[F, A] ⇒ def fmap[B](f: A ⇒ B)(implicit functor: Functor[F]): F[B] = functor fmap f apply fa def map[B](f: A ⇒ B)(implicit functor: Functor[F]): F[B] = fmap(f) }
mouchtaris/jleon
src/main/scala-2.12/gv/isi/functional/FunctorOps.scala
Scala
mit
311
package com.glowingavenger.plan.model.action import org.sat4j.scala.Logic._ import com.glowingavenger.plan.util.Model import com.glowingavenger.plan.model.state.BeliefState class LogicAction(val precond: BoolExp, val effect: BoolExp, actionName: String) extends Action { require(isSat(precond)._1) private lazy va...
dreef3/glowing-avenger
src/main/scala/com/glowingavenger/plan/model/action/LogicAction.scala
Scala
mit
1,642
/******************************************************************************* * Copyright (c) 2014 Guillaume DUBUISSON DUPLESSIS <guillaume.dubuisson_duplessis@insa-rouen.fr>. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * ...
GuillaumeDD/scala99problems
src/main/scala/multiwayTree/P70C/sol02.scala
Scala
gpl-3.0
799
/* * 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 ...
tophua/spark1.52
core/src/test/scala/org/apache/spark/util/CompletionIteratorSuite.scala
Scala
apache-2.0
1,731
/** * (c) Copyright 2013 WibiData, Inc. * * See the NOTICE 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...
kijiproject/kiji-schema-shell
src/test/scala/org/kiji/schema/shell/TestMockKijiSystem.scala
Scala
apache-2.0
8,198
package suiryc.scala.settings import com.typesafe.config.{Config, ConfigUtil} import scala.concurrent.duration.{Duration, FiniteDuration} import scala.jdk.CollectionConverters._ import suiryc.scala.misc.Util /** * Base config helper. * * Get typed value (optional or not) from config using implicit functions. */ c...
suiryc/suiryc-scala
core/src/main/scala/suiryc/scala/settings/BaseConfig.scala
Scala
gpl-3.0
4,334
object Test extends App { MacroLibCompiledByScala210x.foo }
yusuke2255/dotty
tests/untried/neg/macro-incompatible-macro-engine-c.scala
Scala
bsd-3-clause
62
package org.scalajs.testsuite.utils object Platform { /** Returns `true` if and only if the code is executing on a JVM. * Note: Returns `false` when executing on any JS VM. */ final val executingInJVM = true def executingInJVMOnJDK6: Boolean = jdkVersion == 6 def executingInJVMOnJDK7OrLower: Boolean =...
scala-js/scala-js-java-logging
testSuite/jvm/src/test/scala/org/scalajs/testsuite/utils/Platform.scala
Scala
bsd-3-clause
562
/*********************************************************************** * Copyright (c) 2013-2017 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...
ronq/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/geotools/SimpleFeatureOrderingTest.scala
Scala
apache-2.0
2,288
package sangria /** GraphQL parser for Scala. * * A parser for the GraphQL language. It returns nodes from its corresponding AST library. * * The entry point of this library is the [[QueryParser]] object's methods. * * @see * The parser conforms roughly to the [[https://spec.graphql.org/June2018/ June ...
sangria-graphql/sangria
modules/parser/src/main/scala/sangria/parser/package.scala
Scala
apache-2.0
476
package io.vamp.model.serialization import io.vamp.common.json._ import org.json4s._ object CoreSerializationFormat { private val common = List( ThrowableSerializer(Some("Internal error.")), OffsetDateTimeSerializer, UnitValueSerializationFormat, SnakeCaseSerializationFormat, MapSerializer, ...
magneticio/vamp
model/src/main/scala/io/vamp/model/serialization/CoreSerializationFormat.scala
Scala
apache-2.0
1,276
/* * 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 ...
gioenn/xSpark
yarn/src/test/scala/org/apache/spark/deploy/yarn/ClientSuite.scala
Scala
apache-2.0
15,192
/* * 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/storm/src/main/scala/org/apache/gearpump/experiments/storm/main/GearpumpNimbus.scala
Scala
apache-2.0
11,202
package com.github.dakatsuka.akka.http.oauth2.client.strategy import akka.NotUsed import akka.http.scaladsl.model.headers.RawHeader import akka.http.scaladsl.model.{ FormData, HttpCharsets, HttpRequest, Uri } import akka.stream.scaladsl.Source import com.github.dakatsuka.akka.http.oauth2.client.{ ConfigLike, GrantType...
dakatsuka/akka-http-oauth2-client
src/main/scala/com/github/dakatsuka/akka/http/oauth2/client/strategy/RefreshTokenStrategy.scala
Scala
apache-2.0
1,201
class C trait TypeMember { type X type Y type Z } object Test extends TypeMember { type A = X with Y type B = Z with A type F = A with B def main(args: Array[String]) { import reflect.runtime.universe._ val t1 = typeOf[F with C] val t2 = typeOf[(A with B) with C] val t3 = typeOf[A with ...
felixmulder/scala
test/files/run/t8575c.scala
Scala
bsd-3-clause
402
/* * 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 ...
akrabat/openwhisk
common/scala/src/main/scala/org/apache/openwhisk/core/WhiskConfig.scala
Scala
apache-2.0
10,565
package org.bitcoins.wallet.internal import org.bitcoins.core.api.wallet.db.{AccountDb, AddressDb} import org.bitcoins.core.hd.HDChainType import scala.concurrent.Promise case class AddressRequest( accountDb: AccountDb, chainType: HDChainType, promise: Promise[AddressDb])
bitcoin-s/bitcoin-s
wallet/src/main/scala/org/bitcoins/wallet/internal/AddressRequest.scala
Scala
mit
288
/* * 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
simpuzzle-src/models/gugus/model/src/main/scala/fr/geocites/gugus/structure/Matrix.scala
Scala
agpl-3.0
1,446
package com.twitter.finagle.kestrel.protocol import com.twitter.io.Buf sealed abstract class Response case class NotFound() extends Response case class Stored() extends Response case class Deleted() extends Response case class Error() extends R...
travisbrown/finagle
finagle-kestrel/src/main/scala/com/twitter/finagle/kestrel/protocol/Response.scala
Scala
apache-2.0
424
package lila.relay import akka.actor._ import akka.pattern.ask import com.typesafe.config.Config import lila.common.PimpedConfig._ import makeTimeout.short final class Env( config: Config, db: lila.db.Env, system: ActorSystem, flood: lila.security.Flood, hub: lila.hub.Env, lightUser: String =...
Happy0/lila
modules/relay/src/main/Env.scala
Scala
mit
3,924
/* * Accio is a platform to launch computer science experiments. * Copyright (C) 2016-2018 Vincent Primault <v.primault@ucl.ac.uk> * * Accio 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...
privamov/accio
accio/java/fr/cnrs/liris/locapriv/domain/PoiSet.scala
Scala
gpl-3.0
3,338
package com.sksamuel.elastic4s.http.search.queries.nested import com.sksamuel.elastic4s.searches.queries.ParentIdQueryDefinition import org.elasticsearch.common.xcontent.{XContentBuilder, XContentFactory} object ParentIdQueryBodyFn { def apply(q: ParentIdQueryDefinition): XContentBuilder = { val builder = XCont...
FabienPennequin/elastic4s
elastic4s-http/src/main/scala/com/sksamuel/elastic4s/http/search/queries/nested/ParentIdQueryBodyFn.scala
Scala
apache-2.0
692
package org.scaladebugger.api.lowlevel.classes import com.sun.jdi.request.ClassUnloadRequest import org.scaladebugger.api.lowlevel.requests.JDIRequestArgument import scala.util.Try /** * Represents the manager for class unload requests. */ trait ClassUnloadManager { /** * Retrieves the list of class unload re...
ensime/scala-debugger
scala-debugger-api/src/main/scala/org/scaladebugger/api/lowlevel/classes/ClassUnloadManager.scala
Scala
apache-2.0
3,124
/** * 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...
wangcy6/storm_app
frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/test/scala/unit/kafka/security/auth/SimpleAclAuthorizerTest.scala
Scala
apache-2.0
18,822
/* * 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 ...
Dax1n/spark-core
core/src/main/scala/org/apache/spark/deploy/master/ExecutorDesc.scala
Scala
apache-2.0
1,885
package monocle.function import monocle.Prism trait SnocInstancesScalaVersionSpecific { /************************************************************************************************/ /** 2.12 std instances */ /************************...
aoiroaoino/Monocle
core/shared/src/main/scala-2.12-/monocle/function/SnocScalaVersionSpecific.scala
Scala
mit
698
/* * 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 ...
pgandhi999/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/MiscExpressionsSuite.scala
Scala
apache-2.0
3,424
/* Copyright (C) 2008-2014 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
patverga/factorie
src/main/scala/cc/factorie/app/nlp/phrase/NounPhraseGender.scala
Scala
apache-2.0
8,532
package org.scalatra import org.scalatra.test.scalatest.ScalatraFunSuite import skinny.engine.SkinnyEngineServlet object DefaultRouteTest { val existingRoute = "/existing-route" val nonExistentRoute = "/no-such-route" } class DefaultRouteTestServlet extends SkinnyEngineServlet { import org.scalatra.DefaultRout...
holycattle/skinny-framework
engine/src/test/scala/org/scalatra/DefaultRouteTest.scala
Scala
mit
2,021
package io.ruben.minecraft.avatars.models import java.util.UUID import io.ruben.minecraft.avatars.DataAccess._ import driver.api._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future /** * Created by istar on 18/09/15. */ case class Avatar(name: String, userId: UUID, locationI...
Istar-Eldritch/bukkit-avatars
src/main/scala/io/ruben/minecraft/avatars/models/Avatar.scala
Scala
gpl-3.0
939
import org.junit.runner._ import org.specs2.mutable.Specification import org.specs2.runner.JUnitRunner import play.api.test._ import play.api.test.Helpers._ /** * Add your spec here. * You can mock out a whole application including requests, plugins etc. * For more information, consult the wiki. */ @RunWith(class...
wivern/play2-module-thymeleaf
samples/scala_sample/test/ApplicationSpec.scala
Scala
apache-2.0
811
package wafna.radius.protocol import java.nio.{ByteOrder, ByteBuffer} import wafna.radius.ByteBufferEx._ object Attribute { def read(buffer: ByteBuffer): Attribute = { val code = buffer.get() val length = buffer.get() val data = buffer.getArray(length - 2) new Attribute(code, data) } def readAl...
wafna/scud
radius/src/main/scala/wafna/radius/protocol/Packet.scala
Scala
unlicense
4,448
package sbt.testing import org.scalatest._ class SuiteSelectorSpec extends UnitSpec { object `a SuiteSelector` { val aSuiteSelector = new SuiteSelector def `should have a properly behaving equals method` { aSuiteSelector shouldEqual aSuiteSelector aSuiteSelector shouldEqual new SuiteSelector ...
harrah/test-interface
src/test/scala/sbt/testing/SuiteSelectorSpec.scala
Scala
bsd-3-clause
732
package org.jetbrains.plugins.scala package lang package psi package api package base trait ScBraceOwner extends ScalaPsiElement { def isEnclosedByBraces: Boolean }
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/api/base/ScBraceOwner.scala
Scala
apache-2.0
168
package Core /** * @brief class ProximalSegment represents segment of connections, by which column * receives feed-forward input. * @param connections list of connections and their permanences. * @param threshold value of permanence after which synapse is created. * @param boost segment overlap multiplier. */ cl...
kdais/ComposingMind
HTM Research Project/src/Core/ProximalSegment.scala
Scala
mit
5,351
package edu.cmu.lti.nlp.amr.ConceptInvoke import edu.cmu.lti.nlp.amr._ import edu.cmu.lti.nlp.amr.Train._ import edu.cmu.lti.nlp.amr.BasicFeatureVector._ import java.lang.Math.abs import java.lang.Math.log import java.lang.Math.exp import java.lang.Math.random import java.lang.Math.floor import java.lang.Mat...
hopshackle/wordAlignment
src/edu/cmu/lti/nlp/amr/ConceptInvoke/Oracle.scala
Scala
bsd-2-clause
2,566
/* ************************************************************************************* * 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-core/src/main/scala/com/normation/rudder/repository/ldap/LDAPNodeConfigurationMapper.scala
Scala
agpl-3.0
15,680
package com.github.otfoo.playlivescript import sbt._ import sbt.Keys._ import Keys._ import play.PlayExceptions._ import play.{Project => PlayProject} object LivescriptPlugin extends Plugin { val lsEntryPoints = SettingKey[PathFinder]("play-livescript-entry-points") val lsOptions = SettingKey[Seq[String]]("play-...
SunPj/play-livescript
src/main/scala/com/github/otfoo/playlivescript/LivescriptPlugin.scala
Scala
mit
1,261
package core import InfixOps._ private[core] trait ModuloRingOps[A] { implicit def domain: EuclideanDomain[A] def modulus: A def zero: ResidueClass[A] = ResidueClass(domain.zero, modulus) def one: ResidueClass[A] = ResidueClass(domain.one, modulus) def plus(x: ResidueClass[A], y: ResidueClass[A]): Resi...
dkettlestrings/thunder
src/main/scala/core/ModuloRingOps.scala
Scala
gpl-3.0
718
package _99Problems.WorkingWithLists /** * Created by dan.dixey on 24/10/2016. */ object P02 { @scala.annotation.tailrec def penultimate[T](list: List[T]): T = list match { case x :: (_ :: Nil) => x case _ :: xs => penultimate(xs) case _ => throw new NoSuchElementException("li...
dandxy89/LearningScala
src/main/scala/_99Problems/WorkingWithLists/P02.scala
Scala
mit
341
/* * 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 ...
gioenn/xSpark
mllib/src/main/scala/org/apache/spark/ml/classification/Classifier.scala
Scala
apache-2.0
9,390
package net.matthaynes.juicer.service import org.scalatest.FunSuite class NamedEntityServiceTest extends FunSuite { val service = new NamedEntityService val text = """The fate of Lehman Brothers, the beleaguered investment bank, hung in the balance on Sunday as Federal Reserve officials and the leaders o...
matth/juicer
juicer-service/src/test/scala/net/matthaynes/juicer/service/NamedEntityServiceTest.scala
Scala
mit
1,462
/* * Copyright (c) 2012, TU Berlin * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions...
mzuber/simple-language
src/main/scala/impl/DTCheckerImpl.scala
Scala
bsd-3-clause
11,558
/** * Copyright (C) 2010 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-runtime/shared/src/main/scala/org/orbeon/oxf/xforms/control/ControlsDebugSupport.scala
Scala
lgpl-2.1
3,210
/* * 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 ...
sgururajshetty/carbondata
integration/spark-common/src/main/scala/org/apache/spark/sql/execution/streaming/CarbonAppendableStreamSink.scala
Scala
apache-2.0
14,442
package tul.poiis.decision_tree import java.io._ import com.github.tototoshi.csv._ object MyCsvReader { implicit object MyCsvReader extends DefaultCSVFormat { override val delimiter = ';' } def reader(filePath: String) = CSVReader.open(new File(filePath)) }
CucumisSativus/decision-tree-movie-evaluator
src/main/scala/tul/poiis/decision_tree/MyCsvReader.scala
Scala
mit
270
/* Verbatim copy from Spark to override the hashCode method */ /* * 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 un...
soundcloud/cosine-lsh-join-spark
src/main/scala/com/soundcloud/lsh/BitSet.scala
Scala
mit
7,448
package com.rklaehn.abc import algebra.{Order, Eq} // scalastyle:off return private[abc] object ArrayUtil { def eqv[A: Eq](x: Array[A], y: Array[A]): Boolean = { x.length == y.length && { var i = 0 while(i < x.length) { if(!Eq.eqv(x(i), y(i))) return false i += 1 } ...
rklaehn/abc
core/src/main/scala/com/rklaehn/abc/ArrayUtil.scala
Scala
apache-2.0
2,370
package object Quoting2 { implicit class AnyName(val s: String) extends AnyVal { def singleQuote = s"'$s'" def doubleQuote = s""""$s"""" } }
mkoltsov/AtomicScala
ExtensionWithImplicits/ExtensionMethods/Quoting2.scala
Scala
mit
163
package blended.updater.config import org.scalatest.freespec.AnyFreeSpec import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks class OverlayStateSpec extends AnyFreeSpec with ScalaCheckPropertyChecks { import TestData._ "OverlayState.fromString should work for known states" in { forAll(overlayStates...
woq-blended/blended
blended.updater.config/shared/src/test/scala/blended/updater/config/OverlayStateSpec.scala
Scala
apache-2.0
400
/* * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ package scalaguide.tests.specs2 // #scalatest-examplecontrollerspec import play.api.mvc._ import play.api.test._ import scala.concurrent.Future object ExampleControllerSpec extends PlaySpecification with Results { class TestController() exte...
jyotikamboj/container
pf-documentation/manual/working/scalaGuide/main/tests/code/specs2/ExampleControllerSpec.scala
Scala
mit
899
package com.sksamuel.scapegoat.inspections.exception import com.sksamuel.scapegoat.{Inspection, InspectionContext, Inspector, Levels} /** * @author * Marconi Lanna */ @SuppressWarnings(Array("IncorrectlyNamedExceptions")) class CatchException extends Inspection( text = "Catch exception", defaultL...
sksamuel/scapegoat
src/main/scala/com/sksamuel/scapegoat/inspections/exception/CatchException.scala
Scala
apache-2.0
1,525
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.testsuite.jsinterop impor...
scala-js/scala-js
test-suite/js/src/test/scala/org/scalajs/testsuite/jsinterop/JSNativeInPackage.scala
Scala
apache-2.0
2,495
/* 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 to in writing, software distr...
danosipov/scalding
scalding-core/src/main/scala/com/twitter/scalding/Operations.scala
Scala
apache-2.0
19,062
/* * Copyright 2017 47 Degrees, LLC. <http://www.47deg.com> * * 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 ...
pepegar/freestyle
freestyle-async/monix/shared/src/test/scala/asyncMonix/AsyncMonixTests.scala
Scala
apache-2.0
1,463
package notebook.front.widgets import scala.xml.{NodeSeq, UnprefixedAttribute, Null} import play.api.libs.json._ import notebook._ import notebook.front._ import notebook.JsonCodec._ import magic._ trait Generic { def html(html: NodeSeq): Widget = new SimpleWidget(html) def reactiveHtml(initialValue: String) = n...
antonkulaga/spark-notebook
modules/common/src/main/scala/notebook/front/widgets/Generic.scala
Scala
apache-2.0
939