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 services.conservation
import com.google.inject.Inject
import models.conservation.events.TechnicalDescription
import repositories.conservation.dao.TechnicalDescriptionDao
import scala.concurrent.ExecutionContext
class TechnicalDescriptionService @Inject()(
implicit
override val dao: TechnicalDescripti... | MUSIT-Norway/musit | service_backend/app/services/conservation/TechnicalDescriptionService.scala | Scala | gpl-2.0 | 467 |
package views.html.user.show
import lila.app.templating.Environment._
import lila.app.ui.ScalatagsTemplate._
import lila.user.User
import controllers.routes
object newPlayer {
def apply(u: User) =
div(cls := "new-player")(
h2("Welcome to lichess.org!"),
p(
"This is your profile page.",
... | luanlv/lila | app/views/user/show/newPlayer.scala | Scala | mit | 1,617 |
/*
* Copyright 2008-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... | lift/lift | framework/lift-modules/lift-openid/src/main/scala/net/liftweb/openid/OpenIDProtoUser.scala | Scala | apache-2.0 | 8,531 |
/* Generated File */
package models.store
import com.kyleu.projectile.models.result.BaseResult
import com.kyleu.projectile.models.result.filter.Filter
import com.kyleu.projectile.models.result.orderBy.OrderBy
import com.kyleu.projectile.models.result.paging.PagingOptions
import com.kyleu.projectile.util.DateUtils
impo... | KyleU/boilerplay | app/models/store/StoreRowResult.scala | Scala | cc0-1.0 | 2,236 |
/*
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 not use this f... | transcendent-ai-labs/DynaML | dynaml-core/src/main/scala/io/github/mandar2812/dynaml/models/svm/AbstractDualLSSVM.scala | Scala | apache-2.0 | 2,674 |
/**
* Copyright 2015 Thomson Reuters
*
* Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | thomsonreuters/CM-Well | server/cmwell-bg/src/main/scala/cmwell/bg/Merger.scala | Scala | apache-2.0 | 16,677 |
/*
* Copyright (c) 2014-2018 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache... | Wogan/monix | monix-execution/shared/src/main/scala/monix/execution/Callback.scala | Scala | apache-2.0 | 10,708 |
/*
* sbt-haxe
* Copyright 2014 深圳岂凡网络有限公司 (Shenzhen QiFun Network Corp., LTD)
*
* 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
*
* ... | Atry/sbt-haxe | src/main/scala/com/qifun/sbtHaxe/HaxeNekoPlugin.scala | Scala | apache-2.0 | 2,211 |
package com.github.j5ik2o.reactive.redis.pool
import cats.data.NonEmptyList
import com.github.j5ik2o.reactive.redis.{
AbstractRedisConnectionPoolSpec,
PeerConfig,
RedisConnection,
RedisConnectionPool
}
import monix.eval.Task
class StormpotPoolSpec extends AbstractRedisConnectionPoolSpec("StormpotPoolSpec") {
... | j5ik2o/reactive-redis | pool-stormpot/src/test/scala/com/github/j5ik2o/reactive/redis/pool/StormpotPoolSpec.scala | Scala | mit | 530 |
package components
import app.AppRouter._
import japgolly.scalajs.react._
import japgolly.scalajs.react.extra.router.{ Resolution, RouterCtl }
import chandu0101.scalajs.react.components.materialui.{ MuiMuiThemeProvider, MuiRaisedButton, MuiToolbar, MuiToolbarGroup, MuiToolbarSeparator, MuiToolbarTitle }
import japgoll... | workingDog/SilverworkReact | clientAdmin/src/main/scala/components/LayoutComponent.scala | Scala | apache-2.0 | 2,209 |
package pimpathon
import org.junit.Test
import pimpathon.util._
class ClassTagTest {
@Test def className(): Unit = classTag.className[ClassTagTest] === "pimpathon.ClassTagTest"
@Test def simplecCassName(): Unit = classTag.simpleClassName[ClassTagTest] === "ClassTagTest"
@Test def klassOf(): Unit ... | raymanoz/pimpathon | src/test/scala/pimpathon/classtag.scala | Scala | apache-2.0 | 394 |
/**
* 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 not us... | MyPureCloud/kafka | core/src/test/scala/integration/kafka/api/ProducerBounceTest.scala | Scala | apache-2.0 | 7,937 |
package com.socrata.soql
import collection.OrderedSet
import com.socrata.soql.aliases._
import com.socrata.soql.parsing.Parser
import com.socrata.soql.exceptions.SoQLException
import environment.{ColumnName, TableName, UntypedDatasetContext}
import scala.io.StdIn.readLine
object AliasToy extends (Array[String] => Uni... | socrata-platform/soql-reference | soql-toy/src/main/scala/com/socrata/soql/AliasToy.scala | Scala | apache-2.0 | 1,335 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2010, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\\___/_/... | cran/rkafkajars | java/scala/testing/Show.scala | Scala | apache-2.0 | 2,897 |
package com.shorrockin.cascal.model
import org.apache.cassandra.thrift.{ColumnOrSuperColumn}
import java.nio.ByteBuffer
case class SuperKey(val value:String, val family:SuperColumnFamily) extends Key[SuperColumn, Seq[(SuperColumn, Seq[Column[SuperColumn]])]] {
def \\(value:ByteBuffer) = new SuperColumn(value, this... | Shimi/cascal | src/main/scala/com/shorrockin/cascal/model/SuperKey.scala | Scala | apache-2.0 | 1,115 |
package com.github.dronegator.nlp.main.session
import akka.actor.{Actor, Props, Terminated}
import com.github.dronegator.nlp.main.session.SessionManager.{CreateSession, SessionRef}
import com.github.dronegator.nlp.main.session.SessionStorage.SessionMessage
import com.github.dronegator.nlp.utils.typeactor._
/**
* Cre... | dronegator/nlp | web/src/main/scala/com/github/dronegator/nlp/main/session/SessionManager.scala | Scala | apache-2.0 | 1,552 |
/*
* -╥⌐⌐⌐⌐ -⌐⌐⌐⌐-
* ≡╢░░░░⌐\\░░░φ ╓╝░░░░⌐░░░░╪╕
* ╣╬░░` `░░░╢┘ φ▒╣╬╝╜ ░░╢╣Q
* ║╣╬░⌐ ` ╤▒▒▒Å` ║╢╬╣
* ╚╣╬░⌐ ╔▒▒▒▒`«╕ ╢╢╣▒
* ╫╬░░╖ .░ ╙╨╨ ╣╣╬░φ ╓φ░╢╢Å
* ╙╢░░░░⌐"░░░╜ ╙Å░░░░⌐░░░░╝`
* ``˚¬ ⌐ ˚˚⌐´
*
* ... | Flipkart/connekt | busybees/src/main/scala/com/flipkart/connekt/busybees/streams/ConnektTopology.scala | Scala | mit | 3,616 |
/*
* 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/scalatest/words/DefinedWord.scala | Scala | apache-2.0 | 996 |
/*
* 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 ... | hortonworks-spark/cloud-integration | cloud-examples/src/main/scala/com/cloudera/spark/cloud/adl/AdlTestSetup.scala | Scala | apache-2.0 | 1,407 |
package fly.play.aws
import java.util.Calendar
import java.util.Date
import java.util.TimeZone
import scala.collection.mutable
import org.specs2.mutable.Specification
import play.api.libs.ws.WSRequestHolder
import scala.concurrent.Future
import scala.concurrent.duration._
import org.specs2.time.NoTimeConversions
impor... | fooblahblah/play-s3 | src/test/scala/fly/play/aws/Aws4SignerSpec.scala | Scala | mit | 15,102 |
package com.bio4j.dynamograph.dynamodb
import com.amazonaws.services.dynamodbv2.model._
trait AnyDynamoDbExecutor {
def execute(request : GetItemRequest) : Map[String, AttributeValue]
def execute(request : BatchGetItemRequest) : List[Map[String, AttributeValue]]
def execute(request : QueryRequest) : List[Map[... | bio4j/dynamograph | src/main/scala/com/bio4j/dynamograph/dynamodb/AnyDynamoDbExecutor.scala | Scala | agpl-3.0 | 396 |
/*
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
package org.apache.spark.api.csharp
import java.io._
import java.nio.ByteBuffer
import java.nio.channels.{FileChannel, FileLock, OverlappingFileLockException}
i... | dwnichols/Mobius | scala/src/main/org/apache/spark/api/csharp/CSharpRDD.scala | Scala | mit | 10,241 |
import MyStructuredStreamingExample1.{countWords, log}
import org.apache.log4j.Level
import org.apache.spark.sql.DataFrame
import org.scalatest.FunSuite
import scala.collection.mutable.Stack
class MyStructuredStreamingExample1Spec extends FunSuite with NewSparkSession {
log.setLevel(Level.WARN)
ignore("start a ... | mleuthold/coding-examples-with-scala-spark-and-python | src/test/scala/MyStructuredStreamingExample1Spec.scala | Scala | mit | 2,457 |
/**
* © 2019 Refinitiv. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | dudi3001/CM-Well | server/cmwell-bg/src/main/scala/cmwell/bg/OffsetUtils.scala | Scala | apache-2.0 | 7,959 |
/*
* Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com>
*/
package api
import akka.NotUsed
import com.lightbend.lagom.scaladsl.api._
import com.lightbend.lagom.scaladsl.api.transport.Method
trait BazService extends Service {
def baz: ServiceCall[NotUsed, String]
override def descriptor = {
... | rcavalcanti/lagom | dev/sbt-plugin/src/sbt-test/sbt-plugin/run-all-scaladsl/c/src-c/main/scala/api/BazService.scala | Scala | apache-2.0 | 453 |
package org.jetbrains.plugins.scala.project.settings
import org.jetbrains.jps.incremental.scala.data.SbtIncrementalOptions
import org.jetbrains.plugins.scala.project.{CompileOrder, DebuggingInfoLevel}
/**
* @author Pavel Fatin
*/
class ScalaCompilerSettings(state: ScalaCompilerSettingsState) {
def this() {
th... | JetBrains/intellij-scala-historical | src/org/jetbrains/plugins/scala/project/settings/ScalaCompilerSettings.scala | Scala | apache-2.0 | 6,500 |
/*
* 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.
*/
// GENERATED CODE: DO NOT EDIT... | scala/scala | src/library/scala/Product20.scala | Scala | apache-2.0 | 4,238 |
/* __ *\\
** ________ ___ / / ___ __ ____ Scala.js API **
** / __/ __// _ | / / / _ | __ / // __/ (c) 2013-2015, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-lang.org/ **
** /____/\\___/... | mdedetrich/scala-js | library/src/main/scala/scala/scalajs/macroimpls/Compat210.scala | Scala | bsd-3-clause | 1,815 |
/*
* Copyright (c) 2018 OVO Energy
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish,... | ovotech/comms-kafka-messages | modules/core/src/main/scala/com/ovoenergy/comms/model/email/ComposedEmailV4.scala | Scala | mit | 2,911 |
/*
* Copyright 2014 Treode, 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... | Treode/store | store/test/com/treode/store/tier/BoundSpec.scala | Scala | apache-2.0 | 1,267 |
package scala.generator
import org.scalatest.funspec.AnyFunSpec
import org.scalatest.matchers.should.Matchers
class NamespacesSpec extends AnyFunSpec with Matchers {
it("quotes keywords") {
val ns = Namespaces("io.apibuilder.example.union.type.v0")
ns.base should be("io.apibuilder.example.union.`type`.v0")... | mbryzek/apidoc-generator | scala-generator/src/test/scala/models/generator/NamespacesSpec.scala | Scala | mit | 615 |
package test
import java.io.File
import org.apache.avro.generic.{ GenericDatumReader, GenericRecord}
import org.apache.avro.specific.{
SpecificDatumReader,
SpecificDatumWriter,
SpecificRecordBase
}
import org.apache.avro.Schema
import org.apache.avro.file.{ DataFileReader, DataFileWriter }
import org.specs2.mu... | julianpeeters/avro-scala-macro-annotations | tests/src/test/scala/TestUtil.scala | Scala | apache-2.0 | 2,506 |
package hu.bme.mit.ire.nodes.unary
import hu.bme.mit.ire.SingleForwarder
import hu.bme.mit.ire.datatypes._
import hu.bme.mit.ire.messages.{ChangeSet, ReteMessage}
import hu.bme.mit.ire.util.SizeCounter
import scala.collection.immutable.VectorBuilder
import scala.collection.mutable
import scala.collection.mutable.List... | FTSRG/ire | src/main/scala/hu/bme/mit/ire/nodes/unary/CollectNode.scala | Scala | epl-1.0 | 1,947 |
/*
* 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/deploy/worker/WorkerArgumentsTest.scala | Scala | apache-2.0 | 2,822 |
import com.cave.metrics.data.Role
import data.UserData
import org.joda.time.DateTime
import org.mockito.Mockito._
import org.mockito.{Matchers, Mockito}
import play.api.mvc._
import play.api.test._
import scala.concurrent.{ExecutionContext, Future}
import scala.util.{Failure, Success}
class RemoveOrganizationUserApiS... | gilt/cave | api/test/RemoveOrganizationUserApiSpec.scala | Scala | mit | 9,923 |
package org.bitcoins.core.protocol.blockchain
import org.bitcoins.core.crypto.DoubleSha256Digest
import org.bitcoins.core.gen.MerkleGenerator
import org.scalacheck.{Prop, Properties}
/**
* Created by chris on 2/13/17.
*/
class PartialMerkleTreeSpec extends Properties("PartialMerkleTreeSpec") {
property("must b... | SuredBits/bitcoin-s-sidechains | src/test/scala/org/bitcoins/core/protocol/blockchain/PartialMerkleTreeSpec.scala | Scala | mit | 1,057 |
package scala.collection.immutable
import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._
import org.openjdk.jmh.infra.Blackhole
// sbt "benchmarks/run HashMapBenchmark"
@BenchmarkMode(Array(Mode.AverageTime))
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@State(Scope.Thread)
class HashMapBenchmark {
... | rklaehn/scalamuc_20150707 | jmh211/src/main/scala/scala/collection/immutable/HashMapBenchmark.scala | Scala | apache-2.0 | 805 |
package breeze.linalg
import org.scalatest.funsuite.AnyFunSuite
class convertTest extends AnyFunSuite {
test("Int -> {Double, Short}") {
assert(convert(Array(1, 2, 3), Double).toIndexedSeq == IndexedSeq(1.0, 2.0, 3.0))
assert(convert(Array(1, 2, 3), Short).toIndexedSeq == IndexedSeq[Short](1, 2, 3))
ass... | scalanlp/breeze | math/src/test/scala/breeze/linalg/convertTest.scala | Scala | apache-2.0 | 704 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | ArvinDevel/onlineAggregationOnSparkV2 | core/src/main/scala/org/apache/spark/SparkHadoopWriter.scala | Scala | apache-2.0 | 5,343 |
package abstractions
trait AbstractEvaluation[A <: AbstractContext[_, _, _, _]] {
def Success: Long
def Failure: Long
def None: Long
def apply(context: A): Long
} | arie-benichou/go-dot | src/main/scala/abstractions/Evaluation.scala | Scala | gpl-3.0 | 171 |
package com.github.dtaniwaki.akka_pusher
import org.specs2.mutable.Specification
import org.specs2.specification.process.RandomSequentialExecution
class PusherValidatorSpec extends Specification
with SpecHelper
with RandomSequentialExecution
with PusherValidator {
"#validateChannel(String)" should {
... | dtaniwaki/akka-pusher | src/test/scala/com/github/dtaniwaki/akka_pusher/PusherValidatorSpec.scala | Scala | mit | 5,031 |
/**
* Swaggy Jenkins
* Jenkins API clients generated from Swagger / Open API specification
*
* The version of the OpenAPI document: 1.1.2-pre.0
* Contact: blah@cliffano.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*/
package... | cliffano/swaggy-jenkins | clients/scalatra/generated/src/main/scala/org/openapitools/server/model/PipelineActivity.scala | Scala | mit | 858 |
/*
* 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 ... | iiisthu/sparkSdn | repl/src/main/scala/org/apache/spark/repl/SparkRunnerSettings.scala | Scala | apache-2.0 | 1,180 |
/**
* 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... | ijuma/kafka | core/src/main/scala/kafka/tools/UpdateOffsetsInZK.scala | Scala | apache-2.0 | 4,091 |
/*
* Burglary.scala
* A Bayesian network example with visualization
*
* Created By: Glenn Takata (gtakata@cra.com)
* Creation Date: Jun 15, 2015
*
* Copyright 2015 Avrom J. Pfeffer and Charles River Analytics, Inc.
* See http://www.cra.com or email figaro@cra.com for information.
*
* See http://www.... | agarbuno/figaro | FigaroExamples/src/main/scala/com/cra/figaro/example/visualization/Burglary.scala | Scala | bsd-3-clause | 1,441 |
/*
* 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/FeatureFlags.scala | Scala | apache-2.0 | 1,249 |
package mr.merc.map.hex.view
import org.scalatest.funsuite.AnyFunSuite
import mr.merc.map.hex.TerrainHex
import mr.merc.map.hex.TerrainHexField
import mr.merc.map.view.SoldiersDrawer
class TerrainHexViewTest extends AnyFunSuite {
val field = new TerrainHexField(5, 5, TerrainHex.grassInit)
val fieldView = new Terr... | RenualdMarch/merc | src/test/scala/mr/merc/map/hex/view/TerrainHexViewTest.scala | Scala | gpl-3.0 | 1,119 |
package chapter.fifteen
object ExerciseOne extends App {
}
| deekim/impatient-scala | src/main/scala/chapter/fifteen/ExerciseOne.scala | Scala | apache-2.0 | 62 |
/*
* Copyright 2018 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/worldpay-downloader | app/controllers/ConsoleController.scala | Scala | apache-2.0 | 3,447 |
/*
* 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.nio.charset
class UnmappableChar... | scala-js/scala-js | javalib/src/main/scala/java/nio/charset/UnmappableCharacterException.scala | Scala | apache-2.0 | 512 |
package torture
package overnight
import java.net.InetAddress
import java.util.Properties._
import javax.mail._
import javax.mail.internet._
import scala.collection.JavaConversions._
import scala.sys.process._
import scalax.file.Path
import Path._
import scalax.file.PathSet
import scalax.file.FileSystem
import scopt.O... | SI-RISCV/e200_opensource | riscv-tools/riscv-torture/overnight/src/main/scala/main.scala | Scala | apache-2.0 | 8,697 |
/*
* 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/constructors/ResponseConstructorsSpec.scala | Scala | apache-2.0 | 3,725 |
/*
* Copyright 2013 Maurício Linhares
*
* Maurício Linhares 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/LICENSE-2.0
*
* Unless ... | dripower/postgresql-async | mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/decoder/PreparedStatementPrepareResponseDecoder.scala | Scala | apache-2.0 | 1,705 |
/*
* Copyright 2010-2011 WorldWide Conferencing, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | karolx/json4s | mongo/src/main/scala/org/json4s/mongo/JObjectParser.scala | Scala | apache-2.0 | 5,464 |
/* Copyright 2016-2019 UniCredit S.p.A.
*
* 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 wr... | unicredit/lethe | apps/src/main/scala/unicredit/lethe/Basic.scala | Scala | apache-2.0 | 1,555 |
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs
// License: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.indexer.lucene
import java.io.StringReader
import org.apache.lucene.analysis.core.KeywordTokenizer
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute
impo... | VlachJosef/ensime-server | core/src/test/scala/org/ensime/indexer/lucene/DynamicSynonymFilterSpec.scala | Scala | gpl-3.0 | 1,830 |
/*
* Copyright 2016 Uncharted Software 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 o... | unchartedsoftware/salt | src/main/scala/software/uncharted/salt/core/generation/request/TileLevelRequest.scala | Scala | apache-2.0 | 1,187 |
/**
* Created by anicolaspp on 7/2/16.
*/
package com.nico.persistence.storage
import cats.data.Writer
import com.nico.persistence.Account
trait JournalAccountStorage extends StorageComponent with PathProviderComponent {
import JournalAccountStorage._
private [JournalAccountStorage] var journal = Map[Strin... | anicolaspp/distributd-transaction-processor | core/src/main/scala/com/nico/persistence/storage/JournalAccountStorage.scala | Scala | mit | 1,400 |
package spark
/**
* Base class for dependencies.
*/
abstract class Dependency[T](val rdd: RDD[T]) extends Serializable
/**
* Base class for dependencies where each partition of the parent RDD is used by at most one
* partition of the child RDD. Narrow dependencies allow for pipelined execution.
*/
abstract clas... | joeywen/spark_cpp_api | core/src/main/scala/spark/Dependency.scala | Scala | bsd-3-clause | 2,002 |
package info.andreaswolf.roadhopper.simulation
import akka.actor.{ActorLogging, ActorRef}
import akka.pattern.ask
import scala.collection.mutable.ListBuffer
import scala.concurrent.{Future, ExecutionContext}
import scala.util.Success
@deprecated
class VehicleStatusMonitor(val timer: ActorRef, val interval: Int, val... | andreaswolf/roadhopper | src/main/scala/info/andreaswolf/roadhopper/simulation/VehicleStatusMonitor.scala | Scala | mit | 1,766 |
/*
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... | tglstory/scalding | scalding-core/src/main/scala/com/twitter/scalding/Dsl.scala | Scala | apache-2.0 | 1,358 |
/*
* Copyright (c) 2014-2020 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... | alexandru/monifu | monix-execution/js/src/main/scala/monix/execution/atomic/AtomicAny.scala | Scala | apache-2.0 | 3,997 |
import com.typesafe.sbt.pgp.PgpKeys
import sbt._
import sbt.Keys._
import scala.languageFeature.experimental
import scala.languageFeature.experimental.macros
object Build extends Build {
val org = "io.eels"
val AvroVersion = "1.8.1"
val DerbyVersion = "10.13.1.1"
val ExtsVersion = "1.37.0"
val H2Version =... | stheppi/eel | project/Build.scala | Scala | apache-2.0 | 7,778 |
package com.thesamet.pb
import cats.data.{NonEmptyList, NonEmptySet, NonEmptyMap}
import scala.collection.immutable.SortedSet
import scala.collection.immutable.SortedMap
import com.google.protobuf.InvalidProtocolBufferException
import scalapb.CollectionAdapter
class NonEmptyListAdapter[T] extends CollectionAdapter[T,... | scalapb/ScalaPB | e2e-withjava/src/main/scala/com/thesamet/pb/CatsAdapters.scala | Scala | apache-2.0 | 3,052 |
object Test extends dotty.runtime.LegacyApp {
import reflect.ClassTag
object SomeEnum extends Enumeration {
val one, two, three, four = Value
}
def sctor[A <: Set[Int]](f: Int => A)(implicit A: ClassTag[A])
: (String, Int => Set[Int]) =
(A.runtimeClass.getSimpleName, f)
val inits: Seq[(String... | yusuke2255/dotty | tests/run/t8346.scala | Scala | bsd-3-clause | 914 |
package scaladex.infra.sql
import doobie._
import scaladex.core.model.Project
import scaladex.core.model.ProjectDependency
import scaladex.infra.sql.DoobieUtils.Mappings._
import scaladex.infra.sql.DoobieUtils._
object ProjectDependenciesTable {
val table: String = "project_dependencies"
val sourceFields: Seq[St... | scalacenter/scaladex | modules/infra/src/main/scala/scaladex/infra/sql/ProjectDependenciesTable.scala | Scala | bsd-3-clause | 919 |
/*
* 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 ... | Leemoonsoo/incubator-zeppelin | flink/src/main/scala/org/apache/zeppelin/flink/FlinkExprTyper.scala | Scala | apache-2.0 | 2,473 |
/*
* 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/test/scala/com/waz/model/UserFieldSpec.scala | Scala | gpl-3.0 | 1,594 |
package com.twitter.finatra.http.fileupload
class FileUploadException(msg: String)
extends Exception(msg)
| tom-chan/finatra | http/src/main/scala/com/twitter/finatra/http/fileupload/FileUploadException.scala | Scala | apache-2.0 | 109 |
/*
* 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... | intel-analytics/BigDL | scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/feature/text/SequenceShaperSpec.scala | Scala | apache-2.0 | 1,766 |
package de.zalando.model
import de.zalando.apifirst.Application._
import de.zalando.apifirst.Domain._
import de.zalando.apifirst.ParameterPlace
import de.zalando.apifirst.naming._
import de.zalando.apifirst.Hypermedia._
import de.zalando.apifirst.Http._
import de.zalando.apifirst.Security
import java.net.URL
import Sec... | zalando/play-swagger | api-first-core/src/test/scala/model/resources.nested_arrays_yaml.scala | Scala | mit | 2,230 |
/*
* 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... | dotty-staging/scalatest | scalatest-test/src/test/scala/org/scalatest/AsyncInspectorsSpec.scala | Scala | apache-2.0 | 4,672 |
package com.utils
/**
* This is a utility class that keeps together all the file names of the FXML template files.
**/
object GraphicResources {
val Interface: String = "/interfaceTemplate.fxml"
val Canvas: String = "/canvasTemplate.fxml"
val Cell: String = "/cellTemplate.fxml"
val ChartWindow:... | albertogiunta/arianna | src/main/scala/com/utils/GraphicResources.scala | Scala | gpl-3.0 | 505 |
/*
* Copyright (C) 2011-2017 Interfaculty Department of Geoinformatics, University of
* Salzburg (Z_GIS) & Institute of Geological and Nuclear Sciences Limited (GNS Science)
* in the SMART Aquifer Characterisation (SAC) programme funded by the New Zealand
* Ministry of Business, Innovation and Employment (MBIE)
*
... | ZGIS/smart-portal-backend | test/HomeControllerSpec.scala | Scala | apache-2.0 | 10,434 |
package com.enkidu.lignum.parsers.ast.statement.flow
import com.enkidu.lignum.parsers.ast.expression.Expression
case class Yield(value: Expression) extends FlowStatement {
override def dispatch(visitor: Visitor): Unit = {
value.dispatch(visitor)
apply(visitor)
}
} | marek1840/java-parser | src/main/scala/com/enkidu/lignum/parsers/ast/statement/flow/Yield.scala | Scala | mit | 278 |
/*
* 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 | core/src/main/scala/org/apache/spark/input/PortableDataStream.scala | Scala | apache-2.0 | 6,038 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2010, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\\___/_/... | cran/rkafkajars | java/scala/collection/mutable/BufferProxy.scala | Scala | apache-2.0 | 5,464 |
/*
package auth
import config.Config
import converters.JsonConverters
import exceptions.HttpException
import javax.inject.Inject
import play.api.libs.json.JsValue
import play.api.libs.ws.{WSClient, WSResponse}
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
import play.api.lib... | ZDevelop94/RNG-GitHubAPI | app/auth/AuthenticationImpl.scala | Scala | apache-2.0 | 1,461 |
package io.hydrosphere.mist.worker.runners.python.wrappers
import io.hydrosphere.mist.utils.Collections
class DataWrapper {
private var data: java.util.HashMap[String, Any] = _
def set(in: java.util.HashMap[String, Any]): Unit =
data = in
def get: Map[String, Any] = Collections.asScalaRecursively(data)
... | KineticCookie/mist | src/main/scala/io/hydrosphere/mist/worker/runners/python/wrappers/DataWrapper.scala | Scala | apache-2.0 | 325 |
package models
import org.joda.time.Instant
/**
* A user in the system
* @param id Database identifier
* @param login User's login
*/
case class User(
id: Long,
login: String,
password: String,
salt: Int,
roleId: Int,
connected: Boolean,
lastActivity: Option[Instant],
cambioClave: Boolean
)
| kdoomsday/kaminalapp | app/models/User.scala | Scala | mit | 317 |
package coffeehaus
import java.net.URL
import java.nio.charset.Charset
trait Input[T] {
def src: String
}
/** Typeclass interface for compiler input */
@annotation.implicitNotFound(
msg = "Compiler InputSource[T] type class instance for type ${T} not found")
trait InputSource[T] {
def apply(t: T): Input[T]
}
... | softprops/coffeehaus | src/main/scala/input.scala | Scala | mit | 925 |
/*
* Copyright (C) 2018 Joan Goyeau.
*
* 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, Ver... | sslavic/kafka | streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/SuppressedTest.scala | Scala | apache-2.0 | 3,835 |
class UnitReturnSeveralOutput1 {
def foo(i: Int) {
/*start*/
if (true) return
var x = 0
var y = "a"
var z = 1
val zz = "1"
/*end*/
println(x + y + z + zz)
}
}
/*
class UnitReturnSeveralOutput1 {
def foo(i: Int) {
val testMethodNameResult: (Int, String, Int, String) = testMethodName ma... | JetBrains/intellij-scala | scala/scala-impl/testdata/extractMethod/output/UnitReturnSeveralOutput1.scala | Scala | apache-2.0 | 777 |
package unfiltered.request
/** Parser for json request bodies. Produces output from org.json4s.native.JsonParser. */
object JsonBody {
import org.json4s.native.JsonParser._
import scala.util.control.Exception.allCatch
/** @return Some(JsValue) if request contains a valid json body. */
def apply[T](r: HttpRequ... | hamnis/unfiltered | json4s/src/main/scala/request/request.scala | Scala | mit | 1,715 |
/**
* Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.japi.pf
import FI.{ UnitApply, Apply, Predicate }
private[pf] object CaseStatement {
def empty[F, T](): PartialFunction[F, T] = PartialFunction.empty
}
private[pf] class CaseStatement[-F, +P, T](predicate: Predicate, apply: Ap... | jmnarloch/akka.js | akka-js-actor/shared/src/main/scala/akka/japi/pf/CaseStatements.scala | Scala | bsd-3-clause | 727 |
package com.twitter.finagle.tracing
/**
* This is a tracing system similar to Dapper:
*
* “Dapper, a Large-Scale Distributed Systems Tracing Infrastructure”,
* Benjamin H. Sigelman, Luiz André Barroso, Mike Burrows, Pat
* Stephenson, Manoj Plakal, Donald Beaver, Saul Jaspan, Chandan
* Shanbhag, 2010.
*
... | firebase/finagle | finagle-core/src/main/scala/com/twitter/finagle/tracing/Trace.scala | Scala | apache-2.0 | 8,629 |
package BIDMach.networks
import BIDMat.{Mat,SBMat,CMat,CSMat,DMat,FMat,IMat,LMat,HMat,GMat,GDMat,GIMat,GLMat,GSMat,GSDMat,SMat,SDMat}
import BIDMat.MatFunctions._
import BIDMat.SciFunctions._
import BIDMach.datasources._
import BIDMach.updaters._
import BIDMach.mixins._
import BIDMach.models._
import BIDMach.... | uhjish/BIDMach | src/main/scala/BIDMach/networks/SeqToSeq.scala | Scala | bsd-3-clause | 13,347 |
package com.socrata.soda.server.highlevel
import com.rojoma.json.v3.ast.{JObject, JValue}
import com.socrata.http.server.util.{EntityTag, Precondition}
import com.socrata.http.server.util.RequestId.RequestId
import com.socrata.soda.server.highlevel.ColumnSpecUtils.CreateResult
import com.socrata.soda.server.highlevel.... | socrata-platform/soda-fountain | soda-fountain-lib/src/main/scala/com/socrata/soda/server/highlevel/ColumnDAO.scala | Scala | apache-2.0 | 3,974 |
package uk.gov.homeoffice.akka.schedule
import akka.actor.{Actor, ActorLogging}
import akka.serialization.Serialization._
trait ActorInitialisationLog {
this: Actor with ActorLogging =>
log.info(s"Actor configured for ${serializedActorPath(self)}")
} | UKHomeOffice/rtp-akka-lib | src/main/scala/uk/gov/homeoffice/akka/schedule/ActorInitialisationLog.scala | Scala | mit | 257 |
object SCL4347 {
trait Base {
type Foo
def frob(f: Foo): Foo
}
trait Derived {
self: Base =>
type Foo = Double
def frob(f: /* line: 9 */Foo): Foo = 12
}
} | ilinum/intellij-scala | testdata/resolve2/bug3/SCL4347.scala | Scala | apache-2.0 | 183 |
package pmg.tutorials
import akka.actor.{Actor, ActorLogging, Props}
import scala.io.Source
/**
* Companion object to SolvingActor in this example we put our
* factory method for creating the actor here
*/
object SolvingActor {
/**
* Its best practice to use a factory method for creating actors
* wi... | mcross1882/BruteForceAttack | src/main/scala/pmg/tutorials/SolvingActor.scala | Scala | apache-2.0 | 1,022 |
package ExpressionParser
import java.text.SimpleDateFormat
object EntityRequest {
def getKey(s: String):(String,Object) = {
val parser = new FilterParser(s)
val args = parser.normalize().parseParams
val EntityNameStr = parser.result
val indexOfParen = EntityNameStr.indexOf('(')
(if (indexOfParen>... | Mevolutrix/MevoFramework | Utils/src/main/scala/ExpressionParser/HttpFilterParser.scala | Scala | apache-2.0 | 7,102 |
/*
* 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/amls-frontend | test/connectors/PayApiConnectorSpec.scala | Scala | apache-2.0 | 3,434 |
import java.io.{ByteArrayInputStream, ObjectInputStream, ObjectOutputStream, ByteArrayOutputStream}
trait IntToString extends java.io.Serializable { def apply(i: Int): String }
object Test {
def main(args: Array[String]): Unit = {
roundTrip()
roundTripIndySam()
}
def roundTrip(): Unit = {
val c = n... | som-snytt/dotty | tests/run/lambda-serialization-security.scala | Scala | apache-2.0 | 1,814 |
package net.sansa_stack.query.spark.binding.engine
import org.apache.jena.sparql.algebra.op._
import org.apache.jena.sparql.engine.binding.Binding
import org.apache.spark.rdd.RDD
/*
* An OpExecutor for Spark analoguous to [[org.apache.jena.sparql.engine.main.OpExecutor]]
*/
trait OpExecutor {
def execute(op: OpPr... | SANSA-Stack/SANSA-RDF | sansa-query/sansa-query-spark/src/main/scala/net/sansa_stack/query/spark/binding/engine/OpExecutor.scala | Scala | apache-2.0 | 951 |
package akka.ainterface.test.arbitrary
import akka.ainterface.NodeName
import akka.ainterface.datatype._
import akka.util.ByteString
import java.nio.charset.StandardCharsets
import org.scalacheck.Arbitrary.arbitrary
import org.scalacheck.{Arbitrary, Gen}
trait ErlTermArbitrary extends ByteStringArbitrary with StringA... | ainterface/ainterface | ainterface/src/test/scala/akka/ainterface/test/arbitrary/ErlTermArbitrary.scala | Scala | apache-2.0 | 5,956 |
package com.landoop.streamreactor.connect.hive
import cats.data.NonEmptyList
import org.scalatest.{FunSuite, Matchers}
class DefaultPartitionLocationTest extends FunSuite with Matchers {
test("show should generate path using the standard metastore pattern") {
val p1 = (PartitionKey("country"), "usa")
val p2... | CodeSmell/stream-reactor | kafka-connect-hive/connector/src/test/scala/com/landoop/streamreactor/connect/hive/DefaultPartitionLocationTest.scala | Scala | apache-2.0 | 473 |
package fr.univnantes.vroom.core.persistable
import org.scalatest.{FunSpec, Matchers}
/**
* Cas de tests pour la classe Demandeur
*/
class BatimentSpec extends FunSpec with Matchers {
describe("Batiment") {
val adresse = new Adresse(18, "Avenue des champs de Mars", "22500", "Paris")
val batiment = ne... | Callidon/v-room | src/test/scala/fr/univnantes/vroom/core/persistable/BatimentSpec.scala | Scala | mit | 623 |
/*
* Copyright 2016 rdbc contributors
*
* 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... | rdbc-io/rdbc-pgsql | rdbc-pgsql-core/src/main/scala/io/rdbc/pgsql/core/internal/typeconv/IntTypeConverter.scala | Scala | apache-2.0 | 1,226 |
package se.nimsa.sbx.app.routing
import java.net.InetAddress
import java.util.UUID
import akka.http.scaladsl.model.RemoteAddress
import akka.http.scaladsl.model.StatusCodes._
import akka.http.scaladsl.model.headers.{ProductVersion, _}
import akka.http.scaladsl.server._
import org.scalatest.{FlatSpecLike, Matchers}
im... | slicebox/slicebox | src/test/scala/se/nimsa/sbx/app/routing/UserRoutesTest.scala | Scala | apache-2.0 | 7,701 |
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.