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 uk.gov.digital.ho.proving.financialstatus.api.validation
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.i18n.LocaleContextHolder
import org.springframework.context.support.ResourceBundleMessageSource
import org.springframework.stereotype.Component
@Component
c... | UKHomeOffice/pttg-fs-api | src/main/scala/uk/gov/digital/ho/proving/financialstatus/api/validation/ServiceMessages.scala | Scala | mit | 4,903 |
package org.abhijitsarkar.moviedb
import java.net.URL
import akka.http.scaladsl.marshalling.{Marshal, Marshaller, ToEntityMarshaller}
import akka.http.scaladsl.model.ContentTypes.`application/json`
import akka.http.scaladsl.model.StatusCodes._
import akka.http.scaladsl.model.{HttpEntity, HttpResponse, StatusCode}
imp... | asarkar/akka | movie-db/src/main/scala/org/abhijitsarkar/moviedb/MovieController.scala | Scala | gpl-3.0 | 4,250 |
/*
* This software is licensed under the GNU Affero General Public License, quoted below.
*
* This file is a part of PowerAPI.
*
* Copyright (C) 2011-2016 Inria, University of Lille 1.
*
* PowerAPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public Lice... | Spirals-Team/powerapi | powerapi-core/src/main/scala/org/powerapi/module/extpowermeter/rapl/RAPLSensor.scala | Scala | agpl-3.0 | 1,679 |
package temportalist.origin.api.common.tile
import net.minecraft.nbt.NBTTagCompound
import net.minecraft.tileentity.TileEntity
import net.minecraft.util.EnumFacing
import net.minecraftforge.common.capabilities.Capability
import net.minecraftforge.items.{CapabilityItemHandler, ItemStackHandler}
/**
*
* Created by ... | TheTemportalist/Origin | src/api/scala/temportalist/origin/api/common/tile/ITileInventory.scala | Scala | apache-2.0 | 1,246 |
/*
* 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 t... | travisbrown/zipkin | zipkin-anormdb/src/test/scala/com/twitter/zipkin/storage/anormdb/AnormAggregatesTest.scala | Scala | apache-2.0 | 2,645 |
package com.mesosphere.cosmos.model.thirdparty.marathon
import com.mesosphere.cosmos.model.AppId
import com.mesosphere.universe.{ReleaseVersion, PackageDetailsVersion}
case class MarathonApp(
id: AppId,
labels: Map[String, String],
uris: List[String], /*TODO: uri type*/
cpus: Double,
mem: Double,
instance... | movicha/cosmos | cosmos-model/src/main/scala/com/mesosphere/cosmos/model/thirdparty/marathon/MarathonApp.scala | Scala | apache-2.0 | 1,240 |
package io.fintrospect.renderers
import java.net.URL
import com.twitter.finagle.http.Method.Get
import com.twitter.finagle.http.path.Path
import com.twitter.finagle.http.{Request, Response, Status}
import io.fintrospect.formats.Xml.ResponseBuilder._
import io.fintrospect.util.ExtractionError
import io.fintrospect.{Se... | daviddenton/fintrospect | core/src/main/scala/io/fintrospect/renderers/SiteMapModuleRenderer.scala | Scala | apache-2.0 | 1,017 |
import com.amazonaws.services.{ dynamodbv2 => aws }
object ProjectionType {
val All = aws.model.ProjectionType.ALL
val Include = aws.model.ProjectionType.INCLUDE
val KeysOnly = aws.model.ProjectionType.KEYS_ONLY
}
| hirokikonishi/awscala | aws/dynamo/src/main/scala/ProjectionType.scala | Scala | apache-2.0 | 224 |
package common
import composition.TestHarness
import org.scalatest.concurrent.Eventually.PatienceConfig
import org.scalatest.selenium.WebBrowser.{click, cookie, cookies, delete, go}
import pages.BeforeYouStartPageSteps
import pages.CaptureCertificateDetailsPageSteps
import pages.ConfirmBusinessPageSteps
import pages.S... | dvla/vrm-assign-online | acceptance-tests/src/test/scala/common/CommonStepDefs.scala | Scala | mit | 2,875 |
package extensions
import play.api.mvc._
import play.api.mvc.Results._
import jp.t2v.lab.play2.auth._
import models.Role
import models.Role._
import models.Account
import scala.concurrent._
import scala.reflect._
import controllers.MovieSearchController
trait AuthConfigImpl extends AuthConfig {
/**
* A type tha... | tech4242/scala-backchannel-app | app/extensions/AuthConfigImpl.scala | Scala | bsd-3-clause | 3,232 |
@xrefCyclist class A
@xrefCyclist class B
class C {
@introspectCyclist def x = 2
} | scalamacros/paradise | tests/src/test/scala/annotations/neg/macro-annotation-cyclic-a/Test_2.scala | Scala | bsd-3-clause | 86 |
package leo.modules.external
import leo.LeoTestSuite
import leo.datastructures.Term.mkAtom
import leo.datastructures._
import leo.modules.HOLSignature._
import leo.modules.output.{SZS_CounterSatisfiable, SZS_Theorem}
/**
* Created by mwisnie on 1/17/17.
*/
class ExternalProverTest extends LeoTestSuite {
def cr... | lex-lex/Leo-III | src/test/scala/leo/modules/external/ExternalProverTest.scala | Scala | bsd-3-clause | 3,431 |
package jigg.nlp.ccg.parser
/*
Copyright 2013-2015 Hiroshi Noji
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 ... | mynlp/jigg | src/main/scala/jigg/nlp/ccg/parser/ShiftReduceFeatureExtractors.scala | Scala | apache-2.0 | 9,433 |
/*
* 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 java.util
import scala.math.Ordering
... | nicolasstucki/scala-js | javalib/src/main/scala/java/util/NavigableView.scala | Scala | apache-2.0 | 5,390 |
/*
* 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 ... | tillrohrmann/flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamPhysicalSink.scala | Scala | apache-2.0 | 5,446 |
package definiti.core.end2end
import definiti.common.ast._
import definiti.common.program.Ok
import definiti.core.ProgramResultMatchers._
import definiti.common.utils.ASTUtils._
class AliasTypeSpec extends EndToEndSpec {
import AliasTypeSpec._
"Project.generatePublicAST" should "generate the AST with an alias co... | definiti/definiti-core | src/test/scala/definiti/core/end2end/AliasTypeSpec.scala | Scala | mit | 2,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 may ... | aosagie/spark | core/src/main/scala/org/apache/spark/storage/BlockManager.scala | Scala | apache-2.0 | 72,368 |
/*
* Copyright 2017 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/vat-registration-frontend | it/support/StubUtils.scala | Scala | apache-2.0 | 24,336 |
/*
* Copyright 2021 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/ct-calculations | src/main/scala/uk/gov/hmrc/ct/box/formats/OptionalDateFormat.scala | Scala | apache-2.0 | 1,116 |
/**
* Copyright 2014 Gianluca Amato <gamato@unich.it>
*
* This file is part of JANDOM: JVM-based Analyzer for Numerical DOMains
* JANDOM 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 o... | francescaScozzari/Jandom | core/src/main/scala/it/unich/jandom/targets/NumericExpression.scala | Scala | lgpl-3.0 | 10,926 |
package com.carmanconsulting.akka.scala
import akka.actor.Actor
class ParameterizedHelloAkka(format: String) extends Actor {
def this() = {
this("Hello, %s!")
}
override def receive: Receive = {
case name: String =>
val message: String = String.format(format, name)
sender ! message
}
}
| jwcarman/akka-introduction | scala/src/main/scala/com/carmanconsulting/akka/scala/ParameterizedHelloAkka.scala | Scala | apache-2.0 | 319 |
import sbt._
import Keys._
import com.typesafe.sbt.SbtSite.site
import com.typesafe.sbt.SbtSite.SiteKeys._
import com.typesafe.sbt.site.JekyllSupport.Jekyll
import com.typesafe.sbt.SbtGhPages.ghpages
import com.typesafe.sbt.SbtGit.git
object SprinterBuild extends Build {
val sprinter = Project("sprinter", file(".")... | VladimirNik/sprinter | project/build.scala | Scala | bsd-3-clause | 1,636 |
package at.forsyte.apalache.tla.bmcmt.rewriter
import at.forsyte.apalache.tla.bmcmt.analyses.ExprGrade
import at.forsyte.apalache.tla.bmcmt.caches.{AbstractCacheSnapshot, SimpleCacheSnapshot}
import at.forsyte.apalache.tla.bmcmt.types.eager.TrivialTypeSnapshot
import at.forsyte.apalache.tla.bmcmt.{Arena, ArenaCell}
im... | konnov/dach | tla-bmcmt/src/main/scala/at/forsyte/apalache/tla/bmcmt/rewriter/SymbStateRewriterSnapshot.scala | Scala | apache-2.0 | 1,056 |
package com.twitter.finatra.httpclient
import com.google.inject.Provides
import com.twitter.finagle.Http
import com.twitter.finagle.stats.StatsReceiver
import com.twitter.finatra.httpclient.modules.HttpClientModuleTrait
import com.twitter.finatra.jackson.modules.ScalaObjectMapperModule
import com.twitter.inject.app.Te... | twitter/finatra | http-client/src/test/scala/com/twitter/finatra/httpclient/HttpClientStartupIntegrationTest.scala | Scala | apache-2.0 | 2,048 |
package de.fosd.typechef.crefactor.backend
import de.fosd.typechef.parser.c._
import java.util.Collections
import org.kiama.rewriting.Rewriter._
import de.fosd.typechef.crefactor.Morpheus
import de.fosd.typechef.conditional.Opt
/**
* Trait containing all used kiama rewrite rules that apply the actual transformations... | joliebig/Morpheus | src/main/scala/de/fosd/typechef/crefactor/backend/TUnitRewriteRules.scala | Scala | lgpl-3.0 | 7,710 |
package org.igye.commonutils
import org.junit.{Assert, Test}
class GeneralCaseInsensitiveStringFilterTest {
@Test
def testMatcher(): Unit = {
Assert.assertTrue(GeneralCaseInsensitiveStringFilter("bd").matches("abcde"))
Assert.assertTrue(GeneralCaseInsensitiveStringFilter("bd").matches("ABCDE")... | Igorocky/commonutils | src/test/scala/org/igye/commonutils/GeneralCaseInsensitiveStringFilterTest.scala | Scala | mit | 586 |
package org.isa.rdd
import scala.reflect.ClassTag
import org.apache.spark.InterruptibleIterator
import org.apache.spark.{SparkContext, Partition, TaskContext}
import org.apache.spark.rdd.RDD
import org.apache.hadoop.mapred.JobConf
import org.apache.hadoop.fs.{FileSystem, FileStatus, Path}
private[rdd] class FilenameC... | sadikovi/sbt-multi-project-example | foo/src/main/scala/org/isa/rdd/FilenameCollectionRDD.scala | Scala | mit | 2,102 |
/*
* 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
import scala.an... | martijnhoekstra/scala | src/library/scala/deprecated.scala | Scala | apache-2.0 | 2,513 |
package com.teambytes.inflatable.raft.model
import org.scalatest._
import com.teambytes.inflatable.raft.model.Entry
import com.teambytes.inflatable.raft.example.protocol.WordConcatProtocol
import com.teambytes.inflatable.raft.ClusterConfiguration
class ReplicatedLogTest extends FlatSpec with Matchers
with WordConca... | grahamar/inflatable | src/test/scala/com/teambytes/inflatable/raft/model/ReplicatedLogTest.scala | Scala | apache-2.0 | 10,421 |
package com.eevolution.context.dictionary.infrastructure.repository
import java.util.UUID
import com.eevolution.context.dictionary.domain._
import com.eevolution.context.dictionary.domain.model.WindowAccess
import com.eevolution.context.dictionary.infrastructure.db.DbContext._
import com.eevolution.utils.PaginatedSeq... | adempiere/ADReactiveSystem | dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/repository/WindowAccessRepository.scala | Scala | gpl-3.0 | 2,929 |
/**
* Copyright 2011-2016 GatlingCorp (http://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | ryez/gatling | gatling-core/src/test/scala/io/gatling/core/util/cache/SessionCacheHandlerSpec.scala | Scala | apache-2.0 | 3,450 |
package com.twitter.streaming
import com.twitter.finatra.http.test.{EmbeddedHttpServer, HttpTest}
import com.twitter.finatra.httpclient.RequestBuilder
import com.twitter.inject.server.FeatureTest
import com.twitter.util.Await
class StreamingServerFeatureTest extends FeatureTest with HttpTest {
override val server ... | nkhuyu/finatra | examples/streaming-example/src/test/scala/com/twitter/streaming/StreamingServerFeatureTest.scala | Scala | apache-2.0 | 790 |
/*
* 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 ... | RSulzmann/openwhisk | core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/NamespaceBlacklist.scala | Scala | apache-2.0 | 3,257 |
package jgo.tools.compiler
package interm
import codeseq._
import instr._
import symbol._
import types._
/**
* The intermediate representation of a certain package.
*/
case class PkgInterm(
target: PackageSymbol,
definedTypes: List[WrappedType],
functions: Map[Function, FunctionInterm],
globals: ... | thomasmodeneis/jgo | src/src/main/scala/jgo/tools/compiler/interm/PkgInterm.scala | Scala | gpl-3.0 | 362 |
package ttfi
import scalaz._
import scalaz.syntax.either._
import scalaz.syntax.apply._
import Intro2._
trait Serialize {
sealed trait Tree
case class Leaf(s: String) extends Tree
case class Node(s: String, children: List[Tree]) extends Tree
implicit object treeExprSYM extends ExpSYM[Tree] {
def lit = n... | mjhopkins/ttfi | src/scala/ttfi/Serialize.scala | Scala | apache-2.0 | 5,673 |
package russoul.lib.common.math.algebra
import russoul.lib.common.TypeClasses.Addable
import russoul.lib.common._
import shapeless.{Nat, _0}
import shapeless.ops.nat.{Diff, ToInt}
import shapeless.ops.nat._
import shapeless.ops.nat.Diff._
import Implicits._
import scala.collection.TraversableLike
import scala.reflect... | Russoul/UniScalaLib | src/main/scala/russoul/lib/common/math/algebra/Vec.scala | Scala | mit | 1,959 |
package pureconfig
import scala.collection.JavaConverters._
import scala.collection.generic.CanBuildFrom
import scala.collection.mutable.Builder
import scala.language.higherKinds
import com.typesafe.config._
import pureconfig.ConvertHelpers._
import pureconfig.error._
import shapeless._
import shapeless.labelled._
/... | derekmorr/pureconfig | core/src/main/scala/pureconfig/DerivedReaders.scala | Scala | mpl-2.0 | 8,881 |
package com.ajjpj.adiagram_.ui.accordion
import com.ajjpj.adiagram_.ui.{TextStyleListCell, ADiagramController}
import com.ajjpj.adiagram_.ui.fw.{Command, Digest}
import com.ajjpj.adiagram_.model.style.TextStyleSpec
/**
* @author arno
*/
class TextStylePane(ctrl: ADiagramController)(implicit digest: Digest) exten... | arnohaase/a-diagram | src/main/scala-old/com/ajjpj/adiagram_/ui/accordion/TextStylePane.scala | Scala | apache-2.0 | 1,414 |
import Macros.*
object Test {
def main(args: Array[String]): Unit = {
assert2 {
def bar(): Boolean = {
println("bar")
false
}
bar()
}
}
}
| dotty-staging/dotty | tests/run-macros/quote-change-owner/Test_2.scala | Scala | apache-2.0 | 184 |
/*
* 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 ... | dmlc/mxnet | scala-package/macros/src/main/scala/org/apache/mxnet/NDArrayMacro.scala | Scala | apache-2.0 | 7,965 |
/**
* See <a href="https://www.codeeval.com/open_challenges/164/">Mars Networks</a>
*/
object MarsNetworks extends Challenge {
val lines = scala.io.Source.fromFile(args(0)).getLines().filter(_.length > 0)
lines.collect {
case Input(coordinates) => eval(coordinates, Map())
} foreach (result => println(re... | zelca/codeeval | src/MarsNetworks.scala | Scala | mit | 1,108 |
/*
* Copyright (C) 2016 Vincibean <Andre Bessi>
*
* 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... | Vincibean/ScalaForTheImpatient-Solutions | src/main/scala/org/vincibean/scala/impatient/chapter7/exercise2/package.scala | Scala | gpl-3.0 | 1,277 |
package com.orendainx.trucking.nifi.processors
import java.io.OutputStream
import java.nio.charset.StandardCharsets
import com.orendainx.trucking.simulator.simulators.ManualTickAndFetchSimulator
import org.apache.nifi.annotation.behavior._
import org.apache.nifi.annotation.documentation.{CapabilityDescription, Tags}
... | orendain/trucking-iot | nifi-bundle/trucking-nifi-processors/src/main/scala/com/orendainx/trucking/nifi/processors/GetTruckingData.scala | Scala | apache-2.0 | 3,370 |
package com.twitter.util.events
import com.twitter.util.events.Event.Type
/**
* Where runtime events such as logging, stats and tracing can be
* sent to allow for analysis.
*
* '''Note:''' while the API is public it should be considered as experimental
* and subject to changes.
*
* ===Design notes===
* - Imp... | travisbrown/util | util-events/src/main/scala/com/twitter/util/events/Sink.scala | Scala | apache-2.0 | 2,441 |
/*
* 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 agree... | jerryli9876/zipkin | zipkin-server/src/test/scala/com/twitter/zipkin/storage/cassandra/BucketedColumnFamilySpec.scala | Scala | apache-2.0 | 4,671 |
package org.finra.datagenerator.scaffolding.transformer.service
import java.lang.reflect.Method
import org.finra.datagenerator.scaffolding.context.ContextProvider
import org.finra.datagenerator.scaffolding.transformer.service.{InputTransformationContainer, TransformationContext}
import scala.collection.JavaConverter... | yukaReal/DataGenerator | rubber-scaffolding/rubber-transformer/src/main/scala/org/finra/datagenerator/scaffolding/transformer/service/TransformationContextProvider.scala | Scala | apache-2.0 | 1,230 |
/*
* 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.
*/
// Copyright 2005-2017 LAMP/EP... | scala/scala | src/compiler/scala/tools/nsc/transform/AccessorSynthesis.scala | Scala | apache-2.0 | 16,059 |
package com.exandas.tms.identity
/**
* Created by kostas on 09/07/2015.
*/
trait IdentityProvider {
this : Memory =>
def storeUser(username:String, password: String): Unit ={
val salt = generateSalt
val salted = password.bcrypt(salt)
store(UserLoginInfo(username,salted,salt))
}
def auth... | exandas/tms-identity-micro | src/main/scala/com/exandas/tms/identity/IdentityProvider.scala | Scala | mit | 1,040 |
// scalac: -Yrangepos
object Test extends App {
42 match {
case Extractor(a) => println(a)
case x => throw new MatchError(x)
}
}
| scala/scala | test/files/run/macro-rangepos-subpatterns/Test_2.scala | Scala | apache-2.0 | 141 |
def f(p: String) {
var p: String = ""
println(/* offset: 25 */ p.getClass)
println(classOf[/* resolved: false */ p])
} | ilinum/intellij-scala | testdata/resolve2/element/mix/FunctionParameterAndVariable.scala | Scala | apache-2.0 | 125 |
package edu.gemini.ags.client.impl
import edu.gemini.model.p1.immutable.Observation
import edu.gemini.ags.client.api._
import edu.gemini.util.ssl.GemSslSocketFactory
import java.net.{URLConnection, HttpURLConnection, URL}
import HttpURLConnection.HTTP_OK
import io.Source
import java.io.{InputStream, IOException}
impo... | arturog8m/ocs | bundle/edu.gemini.ags.client.impl/src/main/scala/edu/gemini/ags/client/impl/AgsHttpClient.scala | Scala | bsd-3-clause | 3,034 |
package com.databricks.spark.sql.perf.mllib.feature
import scala.util.Random
import org.apache.spark.ml
import org.apache.spark.ml.linalg.Vector
import org.apache.spark.ml.PipelineStage
import org.apache.spark.sql._
import com.databricks.spark.sql.perf.mllib.OptionImplicits._
import com.databricks.spark.sql.perf.mll... | databricks/spark-sql-perf | src/main/scala/com/databricks/spark/sql/perf/mllib/feature/Bucketizer.scala | Scala | apache-2.0 | 1,660 |
object assignments {
var a = Array(1, 2, 3)
var i = 0
a(i) = a(i) * 2
a(i + 1) += 1
class C {
var myX = 0
def x = myX
def x_=(x: Int) = myX = x
x = x + 1
x *= 2
x_= = 2 // error should give missing arguments
}
var c = new C
import c._ // error should give: prefix is not sta... | som-snytt/dotty | tests/neg/assignments.scala | Scala | apache-2.0 | 347 |
/*
* -╥⌐⌐⌐⌐ -⌐⌐⌐⌐-
* ≡╢░░░░⌐\\░░░φ ╓╝░░░░⌐░░░░╪╕
* ╣╬░░` `░░░╢┘ φ▒╣╬╝╜ ░░╢╣Q
* ║╣╬░⌐ ` ╤▒▒▒Å` ║╢╬╣
* ╚╣╬░⌐ ╔▒▒▒▒`«╕ ╢╢╣▒
* ╫╬░░╖ .░ ╙╨╨ ╣╣╬░φ ╓φ░╢╢Å
* ╙╢░░░░⌐"░░░╜ ╙Å░░░░⌐░░░░╝`
* ``˚¬ ⌐ ˚˚⌐´
*
* ... | Flipkart/connekt | commons/src/main/scala/com/flipkart/connekt/commons/dao/AeroSpikeDao.scala | Scala | mit | 4,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 ... | bwsw/sj-platform | core/sj-common/src/main/scala/com/bwsw/sj/common/si/model/FileMetadata.scala | Scala | apache-2.0 | 4,239 |
package net.sansa_stack.rdf.common.partition.core
import net.sansa_stack.rdf.common.partition.core.RdfPartitionerDefault._
import net.sansa_stack.rdf.common.partition.schema.{ SchemaStringString, SchemaStringStringLang }
import org.apache.jena.graph.{ Node, NodeFactory, Triple }
import org.scalatest.FunSuite
/**
* ... | SANSA-Stack/Spark-RDF | sansa-rdf-common/src/test/scala/net/sansa_stack/rdf/common/partition/core/RdfPartitionerDefaultTests.scala | Scala | gpl-3.0 | 2,026 |
package qq
package macros
import cats.Eval
import cats.implicits._
import fastparse.core.Parsed
import qq.Platform.Rec._
import qq.cc.{LocalOptimizer, Parser}
import qq.data._
import qq.data.ast._
import qq.util.Recursion.RecursiveFunction
import scala.language.experimental.macros
import scala.reflect.macros.whitebox... | edmundnoble/slate | qqmacros/shared/src/main/scala/qq/macros/QQStager.scala | Scala | mit | 5,981 |
/*
* 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/utils/events/EventContext.scala | Scala | gpl-3.0 | 4,258 |
package nexus.diff.ops
import nexus.diff._
/**
* @author Tongfei Chen
*/
object Sinh extends PolyOp1
object Cosh extends PolyOp1
object Tanh extends PolyOp1
object ArSinh extends PolyOp1
object ArCosh extends PolyOp1
object ArTanh extends PolyOp1
| ctongfei/nexus | diff/src/main/scala/nexus/diff/ops/hyperbolic.scala | Scala | mit | 256 |
package com.novocode.erased.test
import org.junit.Test
import com.novocode.erased._
import com.novocode.erased.KList._
class KListTest {
@Test
def testKList {
val l1 = 42 |: "foo" |: Some(1.0) |: "bar" |: KNil[KList.Identity]
val l1a = l1.head
val l1b = l1.tail.head
val l1c = l1.tail.tail.head
... | szeiger/ErasedTypes | src/test/scala/com/novocode/erased/test/KListTest.scala | Scala | bsd-2-clause | 2,407 |
/**
* Copyright (c) 2013-2016 Extended Mind Technologies Oy
*
* This file is part of Extended Mind.
*
* Extended Mind 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
* Li... | ttiurani/extendedmind | backend/src/main/scala/org/extendedmind/db/PropertyEvaluator.scala | Scala | agpl-3.0 | 1,698 |
package fpscala.chapter8
import fpscala.BaseSpec
class StateSpec extends BaseSpec{
val simpleRng = RNG.Simple(10l)
it should "map a state " in {
//convert a string to a state[string]
val s1:State[RNG,String] = State.unit("hello")
val s2: State[RNG,Int] = s1.map { x => x.length() }
val (result,... | sajit/learnyou | scala/minimal-scala/src/test/scala/fpscala/chapter8/StateSpec.scala | Scala | mit | 1,042 |
package skinny.controller
import skinny._
import skinny.controller.assets._
import skinny.util.LoanPattern._
import scala.io.Source
import java.io.File
import org.joda.time.DateTimeZone
import org.joda.time.format.DateTimeFormat
/**
* Assets controller.
*/
class AssetsController extends SkinnyController {
// see... | holycattle/skinny-framework | assets/src/main/scala/skinny/controller/AssetsController.scala | Scala | mit | 10,108 |
package sink
import akka.stream.scaladsl.Sink
import logic._
import logic.game._
import org.fusesource.jansi.{Ansi, AnsiConsole}
object GameStateSink {
private lazy val ansiState = Ansi.ansi()
private def handleGameState(gameState: GameState): Unit = gameState match {
case Running(foodPosition, snake, _, _,... | margorczynski/stateless-snake | src/main/scala/sink/GameStateSink.scala | Scala | apache-2.0 | 988 |
/***********************************************************************
* 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... | jahhulbert-ccri/geomesa | geomesa-cassandra/geomesa-cassandra-tools/src/main/scala/org/locationtech/geomesa/cassandra/tools/CassandraRunner.scala | Scala | apache-2.0 | 1,765 |
package sparcass
import java.util.Date
import com.datastax.spark.connector._
import com.datastax.spark.connector.cql.{ClusteringColumn, ColumnDef, PartitionKeyColumn, TableDef, _}
import com.datastax.spark.connector.types.{TimestampParser, _}
import org.apache.log4j.Logger
import org.apache.spark.rdd.RDD
import org.a... | tupol/spark-learning | src/main/scala/sparcass/GitHubLogsImporter.scala | Scala | apache-2.0 | 9,282 |
package spire.random
package rng
import java.io._
class Device(f: File) extends Generator { self =>
if (!f.canRead)
throw new IllegalArgumentException("can't read %s" format f)
private var dis = new DataInputStream(new FileInputStream(f))
def copyInit: Generator = new Device(f)
def getSeedBytes(): Arra... | AlecZorab/spire | core/src/main/scala/spire/random/rng/DevPrng.scala | Scala | mit | 1,855 |
package freetransformer
import scala.util.{Failure, Try}
trait Core {
def read(data: String): Try[List[String]]
def calculateA(el: Entity): (Entity, Either[String, EntityWithA])
def calculateB(el: Entity): (Entity, Either[String, EntityWithB])
def join(a: List[(Entity, EntityWithA)], b: List[(Entity, Entit... | mateuszjancy/intro-to-scala | workshop07/FreeTransformer/src/main/scala/freetransformer/Core.scala | Scala | apache-2.0 | 1,790 |
package org.singingwizard.screeps.ai
import org.singingwizard.screeps.api._
import org.singingwizard.screeps.api.ScreepsContext._
import prickle.CompositePickler
import prickle.PicklerPair
import org.singingwizard.screeps.ai.tasks._
trait Task {
/** Execute the task.
*/
def run()(implicit ctx: AIContext): Uni... | arthurp/amps-screeps | src/main/scala/org/singingwizard/screeps/ai/Task.scala | Scala | gpl-3.0 | 982 |
/*
* 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 | sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StatefulAggregate.scala | Scala | apache-2.0 | 6,704 |
package notification.models
import java.util.UUID
import models.NotificationReport
import notification.services.SenderError
import play.api.libs.json._
import tracking.RepositoryError
case class PushResult(
id: UUID,
reportingError: Option[String] = None,
rejectedNotifications: Option[List[String]] = None
) {
... | guardian/mobile-n10n | notification/app/notification/models/PushResult.scala | Scala | apache-2.0 | 693 |
/*
* 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 ... | fhueske/flink | flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/utils/UpdatingPlanChecker.scala | Scala | apache-2.0 | 2,665 |
package com.twitter.finagle.http
import com.twitter.finagle.builder.ClientBuilder
import com.twitter.finagle.builder.ClientConfig
import com.twitter.finagle.client.StackClient
import com.twitter.finagle.http.service.HttpResponseClassifier
import com.twitter.finagle.param.{Tracer => TracerParam}
import com.twitter.fina... | twitter/finagle | finagle-http/src/main/scala/com/twitter/finagle/http/MethodBuilder.scala | Scala | apache-2.0 | 12,161 |
/*
* 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.tools.nsc.tasty
... | lrytz/scala | src/compiler/scala/tools/nsc/tasty/TastyModes.scala | Scala | apache-2.0 | 2,519 |
/*
* Copyright (C) 2012 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... | openmole/openmole | openmole/plugins/org.openmole.plugin.domain.range/src/main/scala/org/openmole/plugin/domain/range/package.scala | Scala | agpl-3.0 | 4,766 |
package com.datawizards.dqm.validator
import java.sql.Date
import com.datawizards.dqm.configuration.{GroupByConfiguration, TableConfiguration, ValidationContext}
import com.datawizards.dqm.configuration.location.StaticTableLocation
import com.datawizards.dqm.filter.FilterByYearMonthDayColumns
import com.datawizards.d... | piotr-kalanski/data-quality-monitoring | src/test/scala/com/datawizards/dqm/validator/DataValidatorTest.scala | Scala | apache-2.0 | 11,790 |
import _root_.io.gatling.core.scenario.Simulation
import ch.qos.logback.classic.{Level, LoggerContext}
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import org.slf4j.LoggerFactory
import scala.concurrent.duration._
/**
* Performance test for the Project entity.
*/
class ProjectGatlingTest extends ... | Lukle/hipTimeTracker | src/test/gatling/simulations/ProjectGatlingTest.scala | Scala | apache-2.0 | 3,331 |
/*
* 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/OneOfContainMatcherDeciderSpec.scala | Scala | apache-2.0 | 21,035 |
package com.bwsw.tstreamstransactionserver.netty.server.transactionMetadataService
import java.util.concurrent.TimeUnit
import com.bwsw.tstreamstransactionserver.netty.server.RocksStorage
import com.bwsw.tstreamstransactionserver.netty.server.consumerService.{ConsumerServiceImpl, ConsumerTransactionRecord}
import com... | bwsw/tstreams-transaction-server | src/main/scala/com/bwsw/tstreamstransactionserver/netty/server/transactionMetadataService/TransactionMetaServiceImpl.scala | Scala | apache-2.0 | 20,005 |
package szmq
import org.zeromq.ZMQ.Socket
/**
* Author: Yuri Buyanov
* Date: 7/29/11 7:02 PM
*/
abstract sealed class Endpoint(addresses: String*) {
def plug(s: Socket) {
addresses foreach (_plug(s, _))
}
def _plug(s: Socket, address: String)
}
case class BindTo(addresses: String*) extends Endpoint(ad... | elegion/Scala-ZMQ-RPC | src/main/scala/szmq/Endpoint.scala | Scala | mit | 536 |
package nl.soqua.lcpi.repl.parser
import nl.soqua.lcpi.repl.monad.ReplMonad.Repl
import org.scalatest.Matchers
trait StdInParserTester {
protected implicit class StdinParserTester(val line: String) extends Matchers {
def >>(expected: Repl[_]): Unit =
StdInParser(line).fold(ex => {
fail(s"Parsing ... | kevinvandervlist/lcpi | repl/src/test/scala/nl/soqua/lcpi/repl/parser/StdInParserTester.scala | Scala | mit | 427 |
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2015-2021 Andre White.
*
* 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
*
* https://www.apache.org/licenses/LICENSE... | adarro/ddo-calc | subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/stats/Category.scala | Scala | apache-2.0 | 3,659 |
package com.github.mdr.graphospasm.grapheditor.model
import com.github.mdr.graphospasm.core.graph.mutable._
import com.github.mdr.graphospasm.grapheditor.utils.Utils
import com.github.mdr.graphospasm.core.graph._
import org.eclipse.draw2d.FigureUtilities
import org.eclipse.swt.graphics.GC
import org.eclipse.draw2d.geo... | mdr/graphospasm | com.github.mdr.graphospasm.grapheditor/src/main/scala/com/github/mdr/graphospasm/grapheditor/model/GraphDiagram.scala | Scala | mit | 2,037 |
package spinoco.protocol.mgcp
object BearerAttribute {
case class BearerEncoding(tpe: BearerEncodingType.Value) extends BearerAttribute
case class BearerExtensionName(nameAndValue: String) extends BearerAttribute
}
sealed trait BearerAttribute
object BearerEncodingType extends Enumeration {
val ALaw = Val... | Spinoco/protocol | mgcp/src/main/scala/spinoco/protocol/mgcp/BearerAttribute.scala | Scala | mit | 354 |
package org.maproulette.models.dal.mixin
import java.sql.Connection
import anorm._
import org.maproulette.data.ItemType
import org.maproulette.exception.LockedException
import org.maproulette.models.BaseObject
import org.maproulette.models.utils.{DALHelper, TransactionManager}
import org.maproulette.session.User
/**... | Crashfreak/maproulette2 | app/org/maproulette/models/dal/mixin/Locking.scala | Scala | apache-2.0 | 8,494 |
import angular.AngularScala.Angular
import scala.scalajs.js
/**
* Created by pwootage on 8/2/14.
*/
package object angular extends js.GlobalScope {
val angular: Angular = ???
val bridge: js.Dynamic = ???
}
| Pwootage/angular-scala | src/main/scala/angular/package.scala | Scala | mit | 213 |
package org.mitre.mandolin.util
/**
* @author wellner
*/
object Sampling {
def sampleWithoutReplacement(ftable: Array[Int], n: Int, initialResults: List[Int]) : List[Int] = {
val ll = ftable.length
var na = initialResults.length
var results = initialResults
while (na < n) {
var ri =... | project-mandolin/mandolin | mandolin-core/src/main/scala/org/mitre/mandolin/util/Sampling.scala | Scala | apache-2.0 | 1,750 |
/*
* 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 ... | h2oai/sparkling-water | api-generation/src/main/scala/ai/h2o/sparkling/api/generation/common/ConfigurationsBase.scala | Scala | apache-2.0 | 1,591 |
package bynull.functional.functional.idiom
import scala.language.higherKinds
/**
* Created by null on 7/9/16.
*/
object Idioms {
trait Monoid[T] {
/**
* Identity value
*/
def zero: T
/**
* Associative operation
* @param a parameter
* @param b parameter
* @return... | xnull/insight | scala/src/main/scala/bynull/functional/functional/idiom/Idioms.scala | Scala | apache-2.0 | 470 |
/**
* Copyright (c) 2014-2016 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at http://www... | TimothyKlim/snowplow | 4-storage/kafka-elasticsearch-sink/src/test/scala/com.snowplowanalytics.snowplow.storage.kinesis.elasticsearch/BadEventTransformerSpec.scala | Scala | apache-2.0 | 1,789 |
trait Foo[F[_]]
trait Bar[F[_], A]
trait Or[A, B]
class Test {
implicit def orFoo[A]: Foo[({type L[X] = Or[A, X]})#L] = ???
implicit def barFoo[F[_]](implicit f: Foo[F]): Foo[({type L[X] = Bar[F, X]})#L] = ???
// Now we can define a couple of type aliases:
type StringOr[X] = Or[String, X]
type BarStringOr[... | loskutov/intellij-scala | testdata/scalacTests/pos/t6895b.scala | Scala | apache-2.0 | 1,202 |
/*
* 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/main/scala/org/scalactic/TraversableEqualityConstraints.scala | Scala | apache-2.0 | 6,059 |
package spinoco.protocol.websocket
import org.scalacheck.{Gen, Prop, Properties}
import org.scalacheck.Prop._
import scodec.{Attempt, DecodeResult, Err}
import scodec.bits.{BitVector, ByteVector}
import spinoco.protocol.websocket.codec.WebSocketFrameCodec
object WebSocketFrameSpec extends Properties("WebSocketFrame"... | Spinoco/protocol | websocket/src/test/scala/spinoco/protocol/websocket/WebSocketFrameSpec.scala | Scala | mit | 4,488 |
package ru.org.codingteam.horta.plugins.pet.commands
import akka.actor.ActorRef
import ru.org.codingteam.horta.plugins.pet.{PtcUtils, PetData}
import ru.org.codingteam.horta.security.Credential
class RatingCommand extends AbstractCommand {
override def apply(pet: PetData, coins: ActorRef, credential: Credential, ar... | codingteam/horta-hell | src/main/scala/ru/org/codingteam/horta/plugins/pet/commands/RatingCommand.scala | Scala | mit | 657 |
package beam.agentsim.agents
import akka.actor.{Actor, ActorRef, ActorSystem, PoisonPill, Props}
import akka.testkit.TestActors.ForwardActor
import akka.testkit.{ImplicitSender, TestActorRef, TestFSMRef, TestKitBase, TestProbe}
import beam.agentsim.agents.PersonTestUtil._
import beam.agentsim.agents.choice.mode.ModeCh... | colinsheppard/beam | src/test/scala/beam/agentsim/agents/PersonAgentSpec.scala | Scala | gpl-3.0 | 32,112 |
package com.sksamuel.elastic4s.search
import com.sksamuel.elastic4s.testkit.ElasticSugar
import org.scalatest.{Matchers, WordSpec}
class SearchShowTest extends WordSpec with Matchers with ElasticSugar {
"Search" should {
"have a show typeclass implementation" in {
val request = {
search in "game... | ulric260/elastic4s | elastic4s-core-tests/src/test/scala/com/sksamuel/elastic4s/search/SearchShowTest.scala | Scala | apache-2.0 | 1,743 |
import sbt._
import Keys._
object Dependencies {
val seleniumVersion = "2.21.0"
val selenium = Seq(
"org.seleniumhq.selenium" % "selenium-firefox-driver" % seleniumVersion,
"org.seleniumhq.selenium" % "selenium-server" % seleniumVersion
)
val jodaTime = Seq(
"org.joda" % "joda-convert" %... | mlegac/selenate | code/scala/project/Dependencies.scala | Scala | bsd-3-clause | 555 |
package io.iohk.ethereum
import java.math.BigInteger
import java.security.SecureRandom
import akka.util.ByteString
import io.iohk.ethereum.blockchain.sync.StateSyncUtils.MptNodeData
import io.iohk.ethereum.crypto.ECDSASignature
import io.iohk.ethereum.domain.BlockHeader.HeaderExtraFields
import io.iohk.ethereum.domai... | input-output-hk/etc-client | src/test/scala/io/iohk/ethereum/ObjectGenerators.scala | Scala | mit | 8,929 |
/*
* 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 | mv/core/src/test/scala/org/apache/carbondata/mv/rewrite/MVCountAndCaseTestCase.scala | Scala | apache-2.0 | 3,770 |
/*
* Copyright 2011-2021 Asakusa Framework Team.
*
* 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 ... | asakusafw/asakusafw-spark | tools/asm/src/main/scala/com/asakusafw/spark/tools/asm/SignatureBuilder.scala | Scala | apache-2.0 | 7,606 |
Subsets and Splits
Filtered Scala Code Snippets
The query filters and retrieves a sample of code snippets that meet specific criteria, providing a basic overview of the dataset's content without revealing deeper insights.