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 |
|---|---|---|---|---|---|
/*
* 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/ct600/v3/B160.scala | Scala | apache-2.0 | 1,025 |
package org.jetbrains.plugins.scala.lang.typeConformance.generated
import org.jetbrains.plugins.scala.DependencyManagerBase._
import org.jetbrains.plugins.scala.ScalaVersion
import org.jetbrains.plugins.scala.base.libraryLoaders.{IvyManagedLoader, LibraryLoader}
import org.jetbrains.plugins.scala.lang.typeConformance.... | JetBrains/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/lang/typeConformance/generated/TypeConformanceZioTest.scala | Scala | apache-2.0 | 1,874 |
import java.util.TimeZone.getAvailableIDs
var sortedIDs: Array[String] = getAvailableIDs.map(_.split('/').last).sorted
for (city <- sortedIDs) println(city)
| demiazz/scala-impatient | chapter-03/exercise-09/main.scala | Scala | unlicense | 159 |
/*
* Copyright 2019 Google 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 applicable law or agreed to i... | CloudVLab/professional-services | tools/bigquery-hive-external-table-loader/src/main/scala/com/google/cloud/bqhiveloader/NativeTableManager.scala | Scala | apache-2.0 | 7,931 |
/*
* Copyright 2022 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/iht-frontend | app/iht/controllers/application/status/ApplicationInReviewController.scala | Scala | apache-2.0 | 1,833 |
/* Copyright 2009-2016 EPFL, Lausanne */
import leon.lang._
import leon.collection._
import leon._
object LambdaCalculus {
abstract class Term
case class Var(x: BigInt) extends Term
case class Abs(x: BigInt, body: Term) extends Term
case class App(func: Term, arg: Term) extends Term
def fv(t: Term): Set[... | regb/leon | src/test/resources/regression/termination/looping/LambdaCalculus.scala | Scala | gpl-3.0 | 1,572 |
/**
* Copyright (C) 2010-2011 LShift 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
*
* Unless required by applicable law... | 0x6e6562/diffa | kernel/src/test/scala/net/lshift/diffa/kernel/util/EasyMockScalaUtils.scala | Scala | apache-2.0 | 2,988 |
package vep.app.common.page
import vep.Configuration
import vep.app.common.verifications.CommonVerifications
import vep.app.user.UserService
import scala.concurrent.ExecutionContext
trait PageIntegrationModule {
def userService: UserService
def commonVerifications: CommonVerifications
def executionContext: Exe... | kneelnrise/vep | src/main/scala/vep/app/common/page/PageIntegrationModule.scala | Scala | mit | 658 |
package com.zobot.ai.spark.helpers
import org.apache.spark.ml.classification.{LogisticRegression, LogisticRegressionModel}
import org.apache.spark.ml.linalg.Vector
import org.apache.spark.sql.{DataFrame, Row}
object LogisticRegressionHelpers {
case class ModelTestResults (
features: Vector,
label: Double,
... | BecauseNoReason/zobot | src/main/scala/com/zobot/ai/spark/helpers/LogisticRegressionHelpers.scala | Scala | mit | 889 |
/*
* 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 | disk/src/com/treode/disk/DiskController.scala | Scala | apache-2.0 | 2,867 |
package org.cloudio.morpheus.mail.traditional
import org.cloudio.morpheus.mail.MailOwner
/**
* Created by zslajchrt on 24/08/15.
*/
trait RegisteredUserAdapter extends MailOwner {
this: RegisteredUser =>
override def isMale: Boolean = male
}
| zslajchrt/morpheus-tutor | src/main/scala/org/cloudio/morpheus/mail/traditional/RegisteredUserAdapter.scala | Scala | apache-2.0 | 251 |
package com.michalrus.nofatty.ui.utils
import java.awt.event._
import javax.swing.table.TableModel
import javax.swing._
class BetterTable(model: TableModel, isInstantlyEditable: (Int, Int) ⇒ Boolean, cellPopup: ⇒ JPopupMenu) extends JTable(model) {
setCellSelectionEnabled(true)
setSurrendersFocusOnKeystroke(true... | michalrus/nofatty | src/main/scala/com/michalrus/nofatty/ui/utils/BetterTable.scala | Scala | apache-2.0 | 2,870 |
package drt.shared
import uk.gov.homeoffice.drt.auth.Roles.LHR
import drt.shared.Terminals.{T1, Terminal}
import org.specs2.mutable.Specification
import scala.collection.immutable.SortedMap
class AirportConfigsSpec extends Specification {
"AirportConfigs" should {
"have a list size of 24 of min and max desks... | UKHomeOffice/drt-scalajs-spa-exploration | server/src/test/scala/drt/shared/AirportConfigsSpec.scala | Scala | apache-2.0 | 2,766 |
object Test {
class A {
val foo: String => String = null
def foo(x: Int) = 1
}
(new A)./* line: 3 */foo("")
(new A)./* line: 4 */foo(4)
} | ilinum/intellij-scala | testdata/resolve2/overloading/hardOverloadings/ValueFunction1.scala | Scala | apache-2.0 | 154 |
package com.datastax.spark.connector.rdd.typeTests
import java.time.LocalTime
import com.datastax.spark.connector._
import com.datastax.oss.driver.api.core.DefaultProtocolVersion
import com.datastax.oss.driver.api.core.cql.Row
import com.datastax.spark.connector.cluster.DefaultCluster
class TimeTypeTest extends Abs... | datastax/spark-cassandra-connector | connector/src/it/scala/com/datastax/spark/connector/rdd/typeTests/TimeTypeTest.scala | Scala | apache-2.0 | 1,177 |
package org.shade.common.types
import org.scalatest.{Matchers, WordSpec}
class PositiveIntSpec extends WordSpec with Matchers {
"Construction" should {
"succeed for positive ints" in {
(1 to 100).foreach { i =>
PositiveInt(i).value shouldBe i
}
(Int.MaxValue - 100 to Int.MaxValue)... | jamesshade/common | src/test/scala/org/shade/common/types/PositiveIntSpec.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 ... | shaoxuan-wang/flink | flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/calcite/FlinkTypeFactoryTest.scala | Scala | apache-2.0 | 3,176 |
package net.scalax.cpoi.style
import org.apache.poi.ss.usermodel.Workbook
case class StyleKeyWrap(workbook: Workbook, styleTrans: List[StyleTransform])
| scalax/poi-collection | src/main/scala/net/scalax/cpoi/style/StyleKeyWrap.scala | Scala | mit | 154 |
package HackerRank.Training.DataStructures.Stacks
import java.io.{ByteArrayInputStream, IOException, InputStream, PrintWriter}
import java.util.InputMismatchException
import scala.collection.generic.CanBuildFrom
import scala.collection.mutable
import scala.language.higherKinds
/**
* Copyright (c) 2017 A. Roberto F... | robertoFischer/hackerrank | src/main/scala/HackerRank/Training/DataStructures/Stacks/BalancedBrackets.scala | Scala | mit | 9,236 |
package com.dwolla.cloudflare.domain.dto.logpush
import io.circe.Codec
import io.circe.generic.semiauto.deriveCodec
case class LogpushOwnershipDTO(
filename: String,
message: String,
valid: Boolean
)
object LogpushOwnershipDTO {
implicit val logpushOwnershipDTOCodec: Codec[LogpushOwnershipDTO] = deriveCodec
... | Dwolla/scala-cloudflare | dto/src/main/scala/com/dwolla/cloudflare/domain/dto/logpush/LogpushOwnershipDTO.scala | Scala | mit | 490 |
package com.scalegray
import io.jvm.uuid._
import scalaz._
import Scalaz._
import scalaz.Validation
import scalaz.Validation.FlatMap._
/*
* A seperate UID class just to extend the UID later to integrate twitter snowflake for other usecases.
*/
object UID {
def getUID: ValidationNel[Throwable, Long] = {
(Va... | scalegray/concorde | src/main/scala/com/scalegray/Uid.scala | Scala | mit | 612 |
/*
* Copyright 2014–2017 SlamData Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | drostron/quasar | yggdrasil/src/main/scala/quasar/yggdrasil/IdSource.scala | Scala | apache-2.0 | 1,035 |
class B {
bar() // error
}
| lampepfl/dotty | tests/neg/multi-file-error/B.scala | Scala | apache-2.0 | 29 |
/*
* 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 ... | saltstar/spark | resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesClientApplication.scala | Scala | apache-2.0 | 9,470 |
package info.armado.ausleihe.admin.transport.responses
import javax.xml.bind.annotation.{XmlAccessType, XmlAccessorType, XmlRootElement}
object AddEnvelopesResponseDTO {
def apply(success: Boolean): AddEnvelopesResponseDTO = new AddEnvelopesResponseDTO(success)
def apply(alreadyExistingBarcodes: Array[String], d... | Spielekreis-Darmstadt/lending | lending-admin-interfaces/src/main/scala/info/armado/ausleihe/admin/transport/responses/AddEnvelopesResponseDTO.scala | Scala | apache-2.0 | 893 |
/*
* Copyright (c) 2013 original 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 a... | eigengo/monitor | output-statsd/src/main/scala/org/eigengo/monitor/output/statsd/statsd.scala | Scala | apache-2.0 | 4,409 |
/*
* 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... | Myllyenko/incubator-toree | kernel/src/test/scala/org/apache/toree/kernel/protocol/v5/handler/CommOpenHandlerSpec.scala | Scala | apache-2.0 | 6,199 |
/*
* 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 ... | pferrel/PredictionIO | e2/src/test/scala/org/apache/predictionio/e2/fixture/MarkovChainFixture.scala | Scala | apache-2.0 | 1,714 |
import sbt._
import Keys._
trait BaseModule {
def moduleName: String
def location: String
lazy val moduleSettings = baseSettings ++ settings
def settings: Seq[Project.Setting[_]]
lazy val baseSettings =
MyDefaults.settings ++
Seq (
name := moduleName
) ++ Seq (
libraryDependencies ... | jeffmay/angular-play-multimodule-seed | project/BaseModule.scala | Scala | apache-2.0 | 511 |
/*
Copyright 2013 Twitter, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | avibryant/algebird | algebird-core/src/main/scala/com/twitter/algebird/Interval.scala | Scala | apache-2.0 | 11,611 |
/*
* Copyright 2015 TouchType 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
*
* Unless required by applicable law or agreed t... | methodmill/spark-redshift | src/test/scala/com/databricks/spark/redshift/TestUtils.scala | Scala | apache-2.0 | 2,258 |
/***********************************************************************
* Copyright (c) 2013-2022 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | locationtech/geomesa | geomesa-metrics/geomesa-metrics-core/src/main/scala/org/locationtech/geomesa/metrics/core/ConsoleReporterFactory.scala | Scala | apache-2.0 | 1,174 |
/*
* Copyright 2015 ligaDATA
*
* 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 ... | traytonwhite/Kamanja | trunk/MetadataAPIService/src/main/scala/com/ligadata/metadataapiservice/GetHeartbeatService.scala | Scala | apache-2.0 | 2,219 |
/*
* 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/accounts/frs105/boxes/AC415.scala | Scala | apache-2.0 | 1,078 |
package slick.test.jdbc
import org.junit.Test
import org.junit.Assert._
import slick.testutil._
import com.typesafe.slick.testkit.util.{DBTest, DBTestObject, JdbcTestDB}
import com.typesafe.slick.testkit.util.StandardTestDBs._
object EmbeddingTest extends DBTestObject(H2Mem)
@deprecated("Using deprecated API", "3.0"... | easel/slick | slick-testkit/src/test/scala/slick/test/jdbc/EmbeddingTest.scala | Scala | bsd-2-clause | 1,939 |
/*
* Copyright 2010-2020 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/framework | persistence/mongodb-record/src/main/scala/net/liftweb/mongodb/record/field/MongoListField.scala | Scala | apache-2.0 | 7,100 |
import sbt._
import Keys._
object Build {
val specs2_core = "org.specs2" %% "specs2-core" % "4.8.3"
val specs2_scalacheck = "org.specs2" %% "specs2-scalacheck" % "4.8.3"
val scalacheck = "org.scalacheck" %% "scalacheck" % "1.14.3"
implicit class ProjectOps(self: P... | pico-works/pico-hashids | project/Build.scala | Scala | mit | 1,021 |
package org.bitcoins.core.serializers.p2p.messages
import org.bitcoins.core.crypto.DoubleSha256Digest
import org.bitcoins.core.serializers.RawBitcoinSerializer
import org.bitcoins.core.p2p.TypeIdentifier
import org.bitcoins.core.p2p.Inventory
import scodec.bits.ByteVector
/**
* Serializes/deserializes a inventory
... | bitcoin-s/bitcoin-s-core | core/src/main/scala/org/bitcoins/core/serializers/p2p/messages/RawInventorySerializer.scala | Scala | mit | 861 |
package com.wallace.spark.sparkstreaming.kafkademo
import java.nio.charset.Charset
import java.util
import java.util.{Timer, TimerTask}
import com.wallace.common.LogSupport
import com.wallace.common.timeformat.TimePara
import org.apache.kafka.clients.producer.{KafkaProducer, ProducerConfig, ProducerRecord}
import sc... | BiyuHuang/CodePrototypesDemo | demo/SparkDemo/src/main/scala/com/wallace/spark/sparkstreaming/kafkademo/KafkaProducerDemo.scala | Scala | apache-2.0 | 2,931 |
package dhg.ccg.tagdict
import dhg.util._
import scalaz._
import scalaz.Scalaz._
import dhg.ccg.cat.Cat
import dhg.ccg.cat.StartCat
import dhg.ccg.cat.EndCat
trait TagDictionary[Tag] extends (String => Set[Tag]) {
type Word = String
def allWords: Set[Word]; def allTags: Set[Tag]
def startWord: Word; def startTa... | dhgarrette/2015-ccg-parsing | src/main/scala/dhg/ccg/tagdict/TagDictionary.scala | Scala | apache-2.0 | 6,303 |
package com.indix.petstore.api
import akka.http.scaladsl.testkit.ScalatestRouteTest
import org.scalatest.{ Matchers, FlatSpec }
class RoutesSpec extends FlatSpec with Matchers with ScalatestRouteTest {
"Routes" should "respond to a single user query" in {
}
}
| codingnirvana/scala-microservices-template | src/test/scala/com/indix/petstore/api/RoutesSpec.scala | Scala | apache-2.0 | 269 |
package org.jetbrains.plugins.scala
package codeInsight
package hints
import com.intellij.codeInsight.hints.settings.InlayHintsConfigurable
import com.intellij.openapi.actionSystem.{AnAction, AnActionEvent, ToggleAction}
import com.intellij.openapi.project.ProjectManager
import com.intellij.openapi.util.{Getter, Sette... | JetBrains/intellij-scala | scala/codeInsight/src/org/jetbrains/plugins/scala/codeInsight/hints/ScalaTypeHintsConfigurable.scala | Scala | apache-2.0 | 4,128 |
/*
lm-tests.scala
Test code for regression modelling
*/
package scalaglm
import breeze.linalg._
import breeze.numerics._
import org.scalatest._
import flatspec._
import matchers._
class LmSpec extends AnyFlatSpec {
import Utils._
"Lm" should "handle 2 points on a horizontal line (manual intercept)" in {
... | darrenjw/scala-glm | src/test/scala/lm-tests.scala | Scala | apache-2.0 | 3,462 |
package spatial.interpreter
import spatial.dsl._
import virtualized._
import spatial.SpatialCompiler
import argon.interpreter.{Interpreter => AInterpreter}
import argon.core.Const
import scala.collection.JavaConverters._
import argon.lang.typeclasses.Bits
trait SpatialStream extends SpatialCompiler {
abstract class... | stanford-ppl/spatial-lang | spatial/core/src/spatial/interpreter/StreamInterpreter.scala | Scala | mit | 1,744 |
package gg.uhc.hosts.endpoints
import com.github.blemale.scaffeine.{AsyncLoadingCache, Scaffeine}
import doobie._
import gg.uhc.hosts.CustomJsonCodec
import gg.uhc.hosts.database.Database
import io.circe.syntax._
import io.circe.{Json, JsonObject}
import scala.concurrent.{ExecutionContext, Future}
import scala.concur... | Eluinhost/hosts.uhc.gg | src/main/scala/gg/uhc/hosts/endpoints/BasicCache.scala | Scala | mit | 1,693 |
package list
/**
* P15 (**) Duplicate the elements of a list a given number of times.
*/
object P15 {
def duplicateN[A](duplications: Int, list: List[A]): List[A] = list flatMap {
List.fill(duplications)(_)
}
}
| zjt1114/scala99 | src/main/scala/list/P15.scala | Scala | apache-2.0 | 224 |
package com.meteorcode.pathway.script
import jdk.nashorn.api.scripting._
/**
* Class filter for Pathway embedded JavaScript.
*
* This class filter controls what Java classes may be accessed by JavaScript
* running within Nashorn, primarily to ensure that script execution is secure.
*
* Currently, access to the ... | MeteorCode/Pathway | src/main/scala/com/meteorcode/pathway/script/PathwayClassFilter.scala | Scala | mit | 1,201 |
package org.lolhens.minechanics.common.block.material
import net.minecraft.block.material.{MapColor, Material}
import org.lolhens.minechanics.common.block.material.MaterialCustom._
/**
* Created by LolHens on 21.09.2014.
*/
class MaterialCustom() extends Material(MapColor.airColor) {
var block: ICustomMaterial = ... | LolHens/Minechanics | src/main/scala/org/lolhens/minechanics/common/block/material/MaterialCustom.scala | Scala | gpl-2.0 | 1,997 |
/***********************************************************************
* Copyright (c) 2013-2020 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | aheyne/geomesa | geomesa-arrow/geomesa-arrow-gt/src/main/scala/org/locationtech/geomesa/arrow/io/DeltaWriter.scala | Scala | apache-2.0 | 38,126 |
/**
* 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... | akosiaris/kafka | core/src/main/scala/kafka/controller/ControllerChannelManager.scala | Scala | apache-2.0 | 9,761 |
package lambdacart.util.typealigned
import lambdacart.util.~~>
import scalaz.{Compose, Semigroup}
/**
* Binary counter-like accumulator for type-aligned binary type constructors,
* with the most significant bit on the right and addition of new elements (i.e. "increment") from the left.
*/
final class PreComposeBal... | TomasMikula/LambdaCart | src/main/scala/lambdacart/util/typealigned/balanced.scala | Scala | apache-2.0 | 4,437 |
/**
* Copyright 2015, 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/exception/DeepSenseFailure.scala | Scala | apache-2.0 | 746 |
/*
* 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/feats/GreaterSingleWeaponFighting.scala | Scala | apache-2.0 | 1,735 |
package usbinstall.settings
import java.nio.file.{Files, Path}
import javafx.beans.property.{ObjectProperty, SimpleObjectProperty}
import suiryc.scala.sys.linux.Device
object InstallSettings {
val profile: ObjectProperty[Option[ProfileSettings]] =
new SimpleObjectProperty(None)
val device: ObjectProperty[O... | suiryc/usbinstall | src/main/scala/usbinstall/settings/InstallSettings.scala | Scala | gpl-3.0 | 1,063 |
/*
* 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 | sql/hive/src/test/scala/org/apache/spark/sql/hive/client/VersionsSuite.scala | Scala | apache-2.0 | 7,597 |
package org.jetbrains.plugins.scala
package lang.refactoring.rename
import java.util
import com.intellij.psi.{PsiElement, PsiPackage}
import com.intellij.refactoring.rename.RenamePsiPackageProcessor
import org.jetbrains.plugins.scala.caches.ScalaShortNamesCacheManager
/**
* @author Alefas
* @since 06.11.12
*/
cla... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/lang/refactoring/rename/RenameScalaPackageProcessor.scala | Scala | apache-2.0 | 847 |
/*
* # Trove
*
* This file is part of Trove - A FREE desktop budgeting application that
* helps you track your finances, FREES you from complex budgeting, and
* enables you to build your TROVE of savings!
*
* Copyright © 2016-2019 Eric John Fredericks.
*
* Trove is free software: you can redistribute it ... | emanchgo/budgetfree | src/main/scala/trove/models/AccountTypes.scala | Scala | gpl-3.0 | 1,285 |
/*
* Copyright (c) 2013 David Soergel <dev@davidsoergel.com>
* Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*/
package worldmake
import java.util.UUID
import worldmake.storage.{ExternalPathArtifact, ManagedPathArtifact, Identifier}
import scala.collection.{GenSeq,... | davidsoergel/worldmake | src/main/scala/worldmake/Recipe.scala | Scala | apache-2.0 | 25,280 |
/*
* 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 ... | szhem/spark | core/src/main/scala/org/apache/spark/scheduler/AsyncEventQueue.scala | Scala | apache-2.0 | 6,929 |
/*
* Copyright (c) 2015 Andreas Wolf
*
* See te LICENSE file in the project root for further copyright information.
*/
package info.andreaswolf.roadhopper.server
import javax.servlet.http.{HttpServletRequest, HttpServletResponse}
import com.google.inject.Inject
import com.graphhopper.GraphHopper
import com.graph... | andreaswolf/roadhopper | src/main/scala/info/andreaswolf/roadhopper/server/MeasurementsServlet.scala | Scala | mit | 5,859 |
/* Copyright 2009-2018 EPFL, Lausanne */
package inox
package tip
import org.scalatest.funspec.AnyFunSpec
class TipSerializationSuite extends AnyFunSpec with ResourceUtils {
import inox.trees._
val ctx = TestContext.empty
val filesWithCat = resourceFiles("regression/tip", filter = _ endsWith ".tip", recursiv... | epfl-lara/inox | src/it/scala/inox/tip/TipSerializationSuite.scala | Scala | apache-2.0 | 2,135 |
package org.jetbrains.plugins.scala.lang.refactoring.extractMethod
import _root_.org.jetbrains.plugins.scala.lang.psi.types.ScType
import org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil
import org.jetbrains.plugins.scala.lang.psi.api.statements.{ScFunction, ScValue}
import org.jetbrains.plugins.scala.lang.psi.api.to... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/lang/refactoring/extractMethod/ExtractMethodOutput.scala | Scala | apache-2.0 | 915 |
package org.jetbrains.plugins.scala
package lang
package psi
package api
package base
package patterns
import com.intellij.openapi.project.ProjectManager
import com.intellij.psi._
import com.intellij.psi.search.GlobalSearchScope
import com.intellij.psi.util.PsiModificationTracker
import com.intellij.psi.util.PsiModifi... | advancedxy/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/api/base/patterns/ScPattern.scala | Scala | apache-2.0 | 19,445 |
/** soar
*
* Copyright (c) 2017 Hugo Firth
* Email: <me@hugofirth.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
*
... | NewcastleComputingScience/student-outcome-accelerator | db/src/main/scala/uk/ac/ncl/la/soar/db/ModuleRepository.scala | Scala | apache-2.0 | 3,136 |
package example
import org.scalatra.test.scalatest.ScalatraFlatSpec
import skinny.micro.{ AsyncSkinnyMicroServlet, ServletConcurrencyException }
import scala.concurrent.Future
import scala.concurrent.duration._
class FutureSpec extends ScalatraFlatSpec {
addServlet(new AsyncSkinnyMicroServlet {
before() { im... | xerial/skinny-micro | micro/src/test/scala/example/FutureSpec.scala | Scala | bsd-2-clause | 2,040 |
/*
* 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 ... | foryou2030/incubator-carbondata | integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/DataCompactionNoDictionaryTest.scala | Scala | apache-2.0 | 6,108 |
package test.types.inference
import org.scalatest.FlatSpec
import org.scalatest.matchers.ShouldMatchers._
import tap.types._
import tap.types.Type._
import tap.types.Natives._
import tap.types.kinds._
import tap.types.inference.Substitutions._
import tap.ModuleId
import tap.types.classes.{Qual, IsIn}
import language.r... | garyb/tap | src/test/scala/test/types/inference/SubstitutionsTests.scala | Scala | mit | 4,226 |
package twitter4s.request
import http.client.method.HttpMethod
import http.client.request.{CompletionEvaluation, OrElseCompletionEvaluation, HttpRequest, TrueCompletionEvaluation}
import http.client.response.{HttpHeader, HttpResponse}
import twitter4s.response.TwitterEmptyNextCursorCompletionEvaluation
case class Twi... | SocialOrra/social4s | twitter4s/src/main/scala/twitter4s/request/TwitterCursoredRequest.scala | Scala | apache-2.0 | 1,553 |
/*
* Copyright 2013 Commonwealth Computer Research, 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 applica... | jwkessi/geomesa | geomesa-core/src/main/scala/org/locationtech/geomesa/core/util/BoundingBoxUtil.scala | Scala | apache-2.0 | 3,340 |
package com.github.j5ik2o.dddbase.skinny
import cats.data.ReaderT
import com.github.j5ik2o.dddbase.{ AggregateMultiSoftDeletable, AggregateMultiWriter }
import monix.eval.Task
import scalikejdbc.DBSession
trait AggregateMultiSoftDeleteFeature
extends AggregateMultiSoftDeletable[ReaderT[Task, DBSession, ?]]
wi... | j5ik2o/scala-ddd-base-functional | jdbc/skinny/src/main/scala/com/github/j5ik2o/dddbase/skinny/AggregateMultiSoftDeleteFeature.scala | Scala | mit | 667 |
/* Copyright (c) 2008 Google 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... | mjanson/gdata-scala-client | src/com/google/xml/combinators/Picklers.scala | Scala | apache-2.0 | 21,920 |
import sbt._
import sbt.Keys._
object UnfilteredMMailSettings extends WithResolvers {
val nameM = "unfilteredM-mail"
val versionM = "0.2-SNAPSHOT"
val scalaVersionM = "2.10.2"
val organizationM = "com.logikujo"
val dependenciesBuild = Seq(
"org.clapper" % "avsl_2.10" % "1.0.1",
"com.github.kxbmap" %%... | AitorATuin/UnfilteredM | project/unfilteredMMailBuild.scala | Scala | mit | 908 |
/*
* 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... | liquidarmour/ct-calculations | src/test/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC31Spec.scala | Scala | apache-2.0 | 1,161 |
/*
* Copyright 2014 IBM Corp.
*
* 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... | malcolmgreaves/spark-kernel | kernel/src/test/scala/com/ibm/spark/comm/KernelCommWriterSpec.scala | Scala | apache-2.0 | 7,825 |
package com.cloudray.scalapress.security
import org.scalatest.{FlatSpec, OneInstancePerTest}
import org.scalatest.mock.MockitoSugar
import org.mockito.Mockito
import javax.servlet.http.HttpServletRequest
import com.cloudray.scalapress.theme.ThemeService
import com.cloudray.scalapress.account.{AccountPluginDao, Account... | vidyacraghav/scalapress | src/test/scala/com/cloudray/scalapress/security/LoginControllerTest.scala | Scala | apache-2.0 | 1,763 |
package microtools.patch
import play.api.libs.json._
import scala.util.parsing.combinator.Parsers
import scala.util.parsing.input.CharSequenceReader
/**
* RFC 6901 json pointer to JsPath
*/
object JsonPointer {
private object PathParser extends Parsers {
type Elem = Char
private val digit: Parser[Cha... | 21re/play-micro-tools | src/main/scala/microtools/patch/JsonPointer.scala | Scala | mit | 2,065 |
/*
* 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 ... | daewon/incubator-s2graph | s2rest_play/app/org/apache/s2graph/rest/play/controllers/ExperimentController.scala | Scala | apache-2.0 | 1,619 |
/**
* Copyright (C) 2010-2011 LShift 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
*
* Unless required by applicable law... | aprescott/diffa | kernel/src/main/scala/net/lshift/diffa/kernel/config/HibernateDomainConfigStore.scala | Scala | apache-2.0 | 11,435 |
package com.kakashi.simpleservices
import akka.actor.ActorDSL._
import akka.actor.{ActorLogging, ActorSystem, Props}
import akka.io.IO
import akka.io.Tcp._
import spray.can.Http
object SampleApp extends App {
implicit val system = ActorSystem("simpleServices")
/* Spray Service */
val service= system.actorOf(Pr... | freeservices/simpleservices | src/main/scala/com/kakashi/simpleservices/SampleApp.scala | Scala | mit | 681 |
/**
* Copyright (C) 2014 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... | joansmith/orbeon-forms | src/main/scala/org/orbeon/oxf/fr/DataMigration.scala | Scala | lgpl-2.1 | 6,603 |
package org.vitrivr.adampro.data.index.structures.va.signature
import org.vitrivr.adampro.data.datatypes.bitstring.BitString
/**
* adamtwo
*
* Ivan Giangreco
* August 2015
*/
@SerialVersionUID(100L)
private[va] trait SignatureGenerator extends Serializable {
/**
*
* @param cells cell ids to translate ... | dbisUnibas/ADAMpro | src/main/scala/org/vitrivr/adampro/data/index/structures/va/signature/SignatureGenerator.scala | Scala | mit | 553 |
// #Sireum
/*
Copyright (c) 2017-2021, Robby, Kansas State University
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | sireum/v3-logika-runtime | library/shared/src/main/scala/org/sireum/extension/Time.scala | Scala | bsd-2-clause | 1,457 |
package test
import io.circe._
import io.circe.parser._
import io.circe.syntax._
import scoutagent._
import scoutagent.State._
import scoutagent.controller._
import environment._
import environment.anomaly._
import environment.element._
import environment.element.seed._
import environment.terrainmodification._
import... | KeithCissell/SCOUt | app/src/main/scala/testing/Test.scala | Scala | mit | 6,357 |
package intellij.haskell.editor
import java.util
import java.util.UUID
import com.intellij.compiler.ProblemsView
import com.intellij.compiler.impl.ProblemsViewPanel
import com.intellij.compiler.progress.CompilerTask
import com.intellij.icons.AllIcons
import com.intellij.ide.errorTreeView.{ErrorTreeElement, ErrorTreeE... | rikvdkleij/intellij-haskell | src/main/scala/intellij/haskell/editor/HaskellProblemsView.scala | Scala | apache-2.0 | 5,769 |
/*
* Copyright 2001-2012 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... | hubertp/scalatest | src/main/scala/org/scalatest/Rep.scala | Scala | apache-2.0 | 1,582 |
package V2
/**
* A major difficulty of substitution is the number of times we traverse
* the source program. Substitution traverses everything - e.g unvisited
* branches of conditionals. We come over this problem by introducing the
* environment concept that enables fast identifier lookups. Note, we still
* have ... | Tooa/interpreters | src/V2/F1WAEDynamicInterp.scala | Scala | apache-2.0 | 2,865 |
package sbt
import sbt.internal.util.{ AttributeKey, complete, Relation, Settings, Show, Types, Util }
import sbt.librarymanagement.Configuration
import java.io.File
import java.net.URI
import Project._
import Def.{ ScopedKey, Setting }
import Scope.{ GlobalScope, ThisScope }
import Types.{ const, idFun, Id }
import... | dansanduleac/sbt | main/src/main/scala/sbt/SettingCompletions.scala | Scala | bsd-3-clause | 18,277 |
/*
* 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 ... | mahak/spark | sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/SymmetricHashJoinStateManagerSuite.scala | Scala | apache-2.0 | 8,053 |
/*
* 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 ... | jatin9896/incubator-carbondata | integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/management/RefreshCarbonTableCommand.scala | Scala | apache-2.0 | 11,469 |
/**
* Copyright (C) 2015, Jaguar Land Rover
*/
import java.io.File
import com.twitter.bijection.Injection
import com.twitter.bijection.avro.{SpecificAvroCodecs, GenericAvroCodecs}
import kafka.TraceEntryRecord
import org.apache.avro.Schema
import org.apache.avro.generic.GenericRecord
import org.joda.time.DateTime
i... | PDXostc/rvi_big-data_api | test/IntegrationSpec.scala | Scala | mpl-2.0 | 1,535 |
/*
* Copyright (C) 2015 morinb
* https://github.com/morinb
*
* This library 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 yo... | morinb/scala-compute | src/main/scala/org/bm/scalacompute/exception/IllegalTokenException.scala | Scala | lgpl-3.0 | 1,015 |
package com.owlike.genson.ext.scala
import java.lang.reflect.{Type => JType, Modifier, ParameterizedType}
import java.io.{OutputStream, Writer, InputStream, StringReader, Reader => JReader}
import java.net.URL
import java.util.{List => JList, Map => JMap}
import scala.collection.JavaConversions._
import com.owlike.g... | keithdmoore/genson | src/main/scala/com/owlike/genson/ext/scala/ScalaBundle.scala | Scala | apache-2.0 | 7,349 |
package p1 {
object InlineHolder {
@inline def inlinable = (p1.PackageProtectedJava_1.protectedMethod(): @noinline) + 1
}
}
object O {
@noinline
def x = p1.InlineHolder.inlinable
}
object Test {
def main(args: Array[String]): Unit = {
println(O.x)
}
}
| martijnhoekstra/scala | test/files/run/t7582b/InlineHolder_2.scala | Scala | apache-2.0 | 274 |
package models.organization
import com.artclod.slick.JodaUTC
import models.support._
import org.joda.time.{DateTimeZone, DateTime}
object TestCourse {
def apply(name: String = "course",
organizationId: OrganizationId,
owner: UserId,
editCode: String = "editCode",
viewCode: Option[String] = Some("viewCode... | kristiankime/web-education-games | test/models/organization/TestCourse.scala | Scala | mit | 435 |
//
// Copyright 2014-2020 Paytronix Systems, 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 ... | paytronix/utils-open | interchange/json/src/test/scala/com/paytronix/utils/interchange/format/json/utils.scala | Scala | apache-2.0 | 5,395 |
/* Copyright 2009-2016 EPFL, Lausanne */
object IfExpr1 {
def foo(): Int = {
var a = 1
var b = 2
if({a = a + 1; a != b})
a = a + 3
else
b = a + b
a
} ensuring(_ == 3)
}
| epfl-lara/leon | src/test/resources/regression/verification/xlang/invalid/IfExpr1.scala | Scala | gpl-3.0 | 208 |
package com.twitter.util.tunable
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.databind.module.SimpleModule
import com.fasterxml.jackson.databind.{JsonDeserializer, ObjectMapper}
import com.fasterxml.jackson.module.scala.DefaultScalaModule
import com.twitter.util.{Return, Throw, Try... | twitter/util | util-tunable/src/main/scala/com/twitter/util/tunable/JsonTunableMapper.scala | Scala | apache-2.0 | 6,355 |
package com.arcusys.valamis.persistence.impl.scorm.storage
import java.sql.Connection
import com.arcusys.valamis.lesson.scorm.model.manifest.{ExitConditionRule, PostConditionRule, PreConditionRule, Sequencing}
import com.arcusys.valamis.lesson.scorm.storage.sequencing.{ChildrenSelectionStorage, SequencingPermissionsS... | igor-borisov/valamis | valamis-slick-persistence/src/test/scala/com/arcusys/valamis/persistence/impl/scorm/storage/SequencingPermissionsStorageTest.scala | Scala | gpl-3.0 | 2,885 |
package com.excilys.computerdatabase.gatling.process
import com.typesafe.config.ConfigFactory
import io.gatling.core.Predef._
import io.gatling.http.Predef._
/**
* Created by Cédric Cousseran on 29/03/16.
* Delete the computer which was edited before.
*/
object Delete {
val config = ConfigFactory.load()
va... | ublanquet/training-java | gatling-test/src/test/scala/com/excilys/computerdatabase/gatling/process/Delete.scala | Scala | apache-2.0 | 878 |
package org.scalatest.tools
import scala.collection.mutable.ListBuffer
import org.apache.tools.ant.BuildException
import org.apache.tools.ant.Task
import org.apache.tools.ant.types.Path
import org.apache.tools.ant.AntClassLoader
import org.apache.tools.ant.taskdefs.Java
/**
* <p>
* An ant task to run ScalaTest. In... | epishkin/scalatest-google-code | src/main/scala/org/scalatest/tools/ScalaTestAntTask.scala | Scala | apache-2.0 | 25,695 |
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.