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/gmp-frontend
app/models/BulkReference.scala
Scala
apache-2.0
794
package xbar.playground import xbar.projection._ /** * A space to play around with compilation of sentences. */ object Playground { // "tree" private val tree: N = N("tree") // "tree" private val treeNP = NP(N_(tree)) // "the tree" private val theTree = DP(D_(D("the"), treeNP)) // "of life" pri...
hannahlindsley/xbar-dsl
xbar/src/main/scala/xbar/playground/Playground.scala
Scala
gpl-3.0
612
package lila package object bot extends PackageObject { private[bot] def logger = lila.log("bot") }
luanlv/lila
modules/bot/src/main/package.scala
Scala
mit
104
package scala.tools package reflect import scala.tools.nsc.Global /** A helper trait to initialize things that need to be set before JavaMirrors and other * reflect specific traits are initialized */ private[reflect] trait ReflectSetup { this: Global => phase = new Run().typerPhase }
felixmulder/scala
src/compiler/scala/tools/reflect/ReflectSetup.scala
Scala
bsd-3-clause
290
package bulu import akka.actor.{ Actor, Props, ActorLogging, ActorSystem } import akka.cluster.Cluster import akka.actor.Terminated import akka.actor.ActorRef import akka.util.Timeout import bulu.util._ import bulu.actor.{ Builder, Executer } import org.slf4j.LoggerFactory import org.apache.hadoop.hbase.client...
hwzhao/bulu
src/main/scala/bulu/CubeMaster.scala
Scala
apache-2.0
6,169
import cats._ import cats.data._ import cats.free._ import monix.cats._ import monix.eval.Task import services.free._ class FreeMonixApp { protected type RecordedActionsApp[A] = Coproduct[DataOps.DSL, Interactions.DSL, A] protected type AuditedRecordedActionsApp[A] = Coproduct[Logs.DSL, RecordedActionsApp, A] p...
radusw/tagless-free-monix-sample
src/main/scala/FreeMonixApp.scala
Scala
apache-2.0
1,327
package com.bnctech.etcd import java.util import com.bnctech.etcd.exceptions.EtcdErrorException import com.bnctech.etcd.protocol._ import io.vertx.core.buffer.Buffer import io.vertx.core.http._ import io.vertx.core.json.{DecodeException, Json} import io.vertx.core.{AsyncResult, Handler, Vertx} import org.mockito.Matc...
BnC-Technologies/vertx-etcd
vertx-etcd/src/test/scala/com/bnctech/etcd/EtcdClientSpec.scala
Scala
mit
10,539
package de.unifreiburg.cs.proglang.jgs.examples import de.unifreiburg.cs.proglang.jgs.typing.ExampleTypes.{Dynamic, Public, lub} import de.unifreiburg.cs.proglang.jgs.instrumentation._ import soot.{Local, SootMethod} import soot.jimple.Stmt /** * Artifical results for ExampleTests2 * @tparam Level Level may be st...
luminousfennell/jgs
GradualConstraints/InstrumentationSupport/src/test/java/de/unifreiburg/cs/proglang/jgs/examples/AnalysisResults2.scala
Scala
bsd-3-clause
5,240
/* * 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 ...
map222/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/subquery.scala
Scala
apache-2.0
6,007
package pl.touk.nussknacker.engine.process.runner import org.apache.flink.core.fs.FileSystem import org.apache.flink.configuration.{Configuration, CoreOptions, RestOptions, TaskManagerOptions} import org.apache.flink.runtime.jobgraph.SavepointRestoreSettings import org.apache.flink.runtime.minicluster.{MiniCluster, Mi...
TouK/nussknacker
engine/flink/executor/src/main/scala/pl/touk/nussknacker/engine/process/runner/FlinkStubbedRunner.scala
Scala
apache-2.0
2,429
package org.github.aalbul.jenkins import akka.actor.ActorSystem import org.github.aalbul.jenkins.http.{HttpClientConf, Auth, HttpClient} import org.github.aalbul.jenkins.json.JsonSupport /** * Created by nuru on 3/30/14. * * Main entry point to communicate with Jenkins. * Extensible. Additional functionality can ...
aalbul/reactive-jenkins
src/main/scala/org/github/aalbul/jenkins/JenkinsClient.scala
Scala
gpl-2.0
905
/* * 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 ...
bOOm-X/spark
sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
Scala
apache-2.0
89,805
abstract class A( val someAs: A* ) { override def toString = someAs.length.toString + " As" } object B extends A(null, null, null) object Test { def main(args: Array[String]): Unit = { println(B) } }
scala/scala
test/files/run/t6928-run.scala
Scala
apache-2.0
211
package com.fhuertas.monkey.models import akka.actor.{Actor, ActorRef, Props} import com.fhuertas.monkey.messages.{CrossedCanyon, _} import com.fhuertas.monkey.models.Directions._ import com.fhuertas.monkey.utils.Utils import com.typesafe.scalalogging.LazyLogging import me.atrox.haikunator.{Haikunator, HaikunatorBuild...
fhuertas/monkey
src/main/scala/com/fhuertas/monkey/models/Monkey.scala
Scala
apache-2.0
2,268
/* * 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 ...
databricks/spark-tfocs
src/main/scala/org/apache/spark/mllib/optimization/tfocs/SmoothFunction.scala
Scala
apache-2.0
1,926
package net.ruippeixotog.scalascraper.browser import java.io.File import akka.http.scaladsl.server.Directives._ import com.gargoylesoftware.htmlunit.{BrowserVersion, ProxyConfig} import org.specs2.mutable.Specification import net.ruippeixotog.scalascraper.SocksTestHelper class HtmlUnitBrowserSpec extends Specificat...
ruippeixotog/scala-scraper
core/src/test/scala/net/ruippeixotog/scalascraper/browser/HtmlUnitBrowserSpec.scala
Scala
mit
3,818
/* * 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 ...
yanboliang/spark
core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
Scala
apache-2.0
56,694
package service import models.{Guest, Event} import models.shared.{PageGuestView, Page} /** * @author adelfiri, " .. " * @since 07 February 2016 */ trait GuestServiceComponent { trait GuestService { def findGuestList(eventId: Long, pageNumber: Int, pageSize: Int, direction: String, column: String): PageGue...
Nectarius/taffeit
app/service/GuestServiceComponent.scala
Scala
mit
503
package fr.laas.fape.constraints.experimental import java.io.{File, PrintWriter} import java.util.Locale import fr.laas.fape.constraints.stnu.morris.{PartialObservability, TemporalNetwork} import scala.collection.mutable object Benchmark extends App { val keys = List("file", "contingents", "cont-chain", "focus",...
athy/fape
constraints/src/test/scala/fr/laas/fape/constraints/experimental/Benchmark.scala
Scala
bsd-2-clause
2,955
import sbt._ import Keys._ import scala.language.implicitConversions import scala.language.postfixOps object Common { def newProject(projectName: String, base: File): Project = Project(projectName, base).settings( name := projectName, organization := "JetBrains", scalaVersion := Versions.scalaV...
whorbowicz/intellij-scala
project/Common.scala
Scala
apache-2.0
2,187
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/library/scala/collection/LinearSeq.scala
Scala
bsd-3-clause
1,645
/* * 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/src/main/scala/org/scalatest/matchers/dsl/ResultOfAnWordToSymbolApplication.scala
Scala
apache-2.0
1,030
/* * 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 ...
bOOm-X/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala
Scala
apache-2.0
37,948
package org.jetbrains.plugins.scala package codeInsight.generation import com.intellij.lang.LanguageCodeInsightActionHandler import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.psi.PsiFile import org.jetbrains.plugins.scala.lang.psi.{TypeAdjuster, ScalaPsiUtil} imp...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/codeInsight/generation/ScalaGeneratePropertyHandler.scala
Scala
apache-2.0
2,597
/** * For copyright information see the LICENSE document. */ package entice.server.test import java.io._ import scala.language.reflectiveCalls case class File(path: String) { import File._ def write(data: String): Unit = writeToFile(path, data) def delete() = (new java.io.File(path)).delete() } objec...
entice/old-server
src/main/scala/entice/server/test/FileUtils.scala
Scala
bsd-3-clause
715
/* * Copyright 2019 Erlend Hamnaberg * * 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...
hamnis/bandaid
src/main/scala/bandaid/Pointer.scala
Scala
apache-2.0
3,804
package edu.rice.habanero.benchmarks.radixsort import java.util.Random import edu.rice.habanero.actors.{GparsActor, GparsActorState, GparsPool} import edu.rice.habanero.benchmarks.{Benchmark, BenchmarkRunner} /** * @author <a href="http://shams.web.rice.edu/">Shams Imam</a> (shams@rice.edu) */ object RadixSortGpar...
smarr/savina
src/main/scala/edu/rice/habanero/benchmarks/radixsort/RadixSortGparsActorBenchmark.scala
Scala
gpl-2.0
3,723
package sbt package ivyint import java.util.Date import java.net.URL import java.io.File import collection.concurrent import collection.mutable import collection.immutable.ListMap import org.apache.ivy.Ivy import org.apache.ivy.core import core.resolve._ import core.module.id.{ ModuleRevisionId, ModuleId => IvyModuleI...
dyx/sbt
ivy/src/main/scala/sbt/ivyint/CachedResolutionResolveEngine.scala
Scala
bsd-3-clause
30,090
/* * ____ ____ _____ ____ ___ ____ * | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R) * | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data * | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In...
precog/platform
quirrel/src/main/scala/com/precog/quirrel/emitter/Solutions.scala
Scala
agpl-3.0
1,387
/*********************************************************************** * 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-index-api/src/main/scala/org/locationtech/geomesa/index/filters/Z2Filter.scala
Scala
apache-2.0
2,777
package nars.logic.language import java.util._ import nars.io.Symbols import nars.storage.Memory import Product._ //remove if not needed import scala.collection.JavaConversions._ import CompoundTerm._ object Product { /** * Try to make a new compound. Called by StringParser. * @return the Term generated from...
printedheart/opennars
nars_lab_x/nars_scala/src/main/scala/nars/language/Product.scala
Scala
agpl-3.0
2,237
package rta import rta.model.Rule package object storage { } package storage { final case class RegistrationInfo(addedRequirements: Set[Int], removedRequirements: Set[Int], addedRules: Set[Rule]) }
kjanosz/RuleThemAll
app/src/main/scala/rta/storage/package.scala
Scala
apache-2.0
204
package dotty.tools.dotc package transform import MegaPhase._ import core.DenotTransformers._ import core.Symbols._ import core.Contexts._ import core.Types._ import core.Flags._ import core.Decorators._ import core.StdNames.nme import core.Names._ import core.NameOps._ import core.NameKinds.ExpandPrefixName import as...
som-snytt/dotty
compiler/src/dotty/tools/dotc/transform/LambdaLift.scala
Scala
apache-2.0
23,784
/* * sbt * Copyright 2011 - 2018, Lightbend, Inc. * Copyright 2008 - 2010, Mark Harrah * Licensed under Apache License 2.0 (see LICENSE) */ package sbt import java.io.File import java.lang.ProcessBuilder.Redirect import scala.sys.process.Process import OutputStrategy._ import sbt.internal.util.Util import Util....
xuwei-k/xsbt
run/src/main/scala/sbt/Fork.scala
Scala
apache-2.0
4,954
/* Copyright 2009-2016 EPFL, Lausanne */ object Sequencing1 { def test(): Int = { var x = 0 x += 1 x *= 2 x } ensuring(x => x == 2) }
epfl-lara/leon
src/test/resources/regression/verification/xlang/valid/Sequencing1.scala
Scala
gpl-3.0
157
package org.jetbrains.plugins.scala.lang.psi.api.expr import org.jetbrains.annotations.Nullable import org.jetbrains.plugins.scala.lang.psi.api.ScalaElementVisitor import org.jetbrains.plugins.scala.lang.psi.api.base.patterns.{ScCaseClause, ScCaseClauses} /** * @author Alexander Podkhalyuzin, ilyas */ trait ScMat...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/api/expr/ScMatch.scala
Scala
apache-2.0
921
package pw.ian.sysadmincraft.commands import org.bukkit.command.{Command, CommandExecutor, CommandSender} import org.bukkit.entity.Player import org.bukkit.{ChatColor, Location} import pw.ian.sysadmincraft.SysAdmincraft import pw.ian.sysadmincraft.system.SystemOverview import pw.ian.sysadmincraft.world.WorldConstants....
simplyianm/sysadmincraft
src/main/scala/pw/ian/sysadmincraft/commands/PsCommand.scala
Scala
isc
734
package com.abien.xray.business.statistics.boundary import com.abien.xray.business.store.boundary.Hits import org.junit._ import Assert._ import org.scalatest.junit.JUnitSuite import org.scalatest.junit.ShouldMatchersForJUnit import org.scalatest.mock.MockitoSugar import org.mockito.Mockito._ import javax.persistence....
abhijitsarkar/legacy
adam-bien/x-ray/x-ray-services/src/test/java/com/abien/xray/business/statistics/boundary/DailyStatisticsCalculatorTest.scala
Scala
gpl-3.0
2,064
/* * 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 ...
pronix/spark
streaming/src/main/scala/org/apache/spark/streaming/api/java/JavaDStreamLike.scala
Scala
apache-2.0
18,555
package org.jetbrains.plugins.scala package lang package psi package stubs package index import java.{util => ju} import com.intellij.openapi.project.Project import com.intellij.psi.PsiElement import com.intellij.psi.search.GlobalSearchScope import com.intellij.psi.stubs.StringStubIndexExtension import org.jetbrains....
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/stubs/index/ScStringStubIndexExtension.scala
Scala
apache-2.0
653
package com.ereisman.esurient.etl.format import java.util.Properties import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.FileSystem /** * The basis for pluggable modules that handle the specifics when loading and parsing * your database config file. Subclasses should inject the values into a Jav...
initialcontext/esurient
src/main/scala/com/ereisman/esurient/etl/format/DatabaseConfigExtractor.scala
Scala
apache-2.0
1,496
/** * 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...
pkuwm/incubator-eagle
eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/scala/org/apache/eagle/stream/pipeline/DataFlowSpec.scala
Scala
apache-2.0
4,167
package scavenger.backend import akka.actor.{Actor, ActorLogging} import scala.concurrent.{Future, Promise, ExecutionContext} import scavenger._ /** Layer of `Master` and `Worker` nodes that prevents empty `Promise`s from * a `ReactiveContext` from spreading across the rest of the actor system. * * This is the...
tyukiand/scavenger_2_x
src/main/scala/scavenger/backend/DemilitarizedZone.scala
Scala
gpl-3.0
1,990
package chrome.audio.bindings import scala.scalajs.js @js.native trait InputInfo extends js.Object { def id: Audio.DeviceID = js.native def name: String = js.native def isActive: Boolean = js.native def isMuted: Boolean = js.native def gain: Double = js.native }
lucidd/scala-js-chrome
bindings/src/main/scala/chrome/audio/bindings/InputInfo.scala
Scala
mit
281
/* * 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 ...
shaneknapp/spark
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryExecutionErrorsSuite.scala
Scala
apache-2.0
6,244
package org.jetbrains.plugins.scala package lang package psi package api package statements import com.intellij.psi.util.PsiModificationTracker import com.intellij.psi.{PsiClass, PsiElement} import org.jetbrains.plugins.scala.caches.CachesUtil import org.jetbrains.plugins.scala.lang.psi.api.base.types.ScTypeElement im...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/api/statements/ScTypeAliasDefinition.scala
Scala
apache-2.0
4,001
package mesosphere.marathon.util import java.util.concurrent.atomic.AtomicInteger import akka.actor.{ Cancellable, Scheduler } import mesosphere.AkkaUnitTest import mesosphere.marathon.util import mesosphere.marathon.util.Retry.RetryOnFn import scala.collection.mutable import scala.concurrent.duration._ import scala...
yp-engineering/marathon
src/test/scala/mesosphere/marathon/util/RetryTest.scala
Scala
apache-2.0
4,907
/* * Copyright 2014 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 applicabl...
kevinwheeler/geomesa
geomesa-core/src/test/scala/org/locationtech/geomesa/core/iterators/TestData.scala
Scala
apache-2.0
10,173
package scala.meta.tests package contrib import munit.FunSuite import scala.meta._ import scala.meta.contrib._ class StatSubtypeExtractionTest extends FunSuite { test("Test extract when none exist") { val stats = q"class Foo".extract[Defn.Def] assert(stats == Nil) } test("Test extract Defs") { val...
scalameta/scalameta
tests/shared/src/test/scala/scala/meta/tests/contrib/StatSubtypeExtractionTest.scala
Scala
bsd-3-clause
2,842
/* * 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/main/scala/com/intel/analytics/bigdl/dllib/feature/transform/vision/image/augmentation/Crop.scala
Scala
apache-2.0
6,412
/* * 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 ...
jasonpet/openwhisk
core/controller/src/main/scala/org/apache/openwhisk/core/controller/Actions.scala
Scala
apache-2.0
32,950
package edu.gemini.dataman.app import edu.gemini.dataman.app.ModelActions._ import edu.gemini.dataman.core._ import edu.gemini.gsa.query.{QaRequest, GsaRecord} import edu.gemini.pot.sp.SPObservationID import edu.gemini.pot.spdb.IDBDatabaseService import edu.gemini.spModel.dataset.{DatasetQaState, Dataset, DatasetQaRec...
arturog8m/ocs
bundle/edu.gemini.dataman.app/src/main/scala/edu/gemini/dataman/app/ObsLogActions.scala
Scala
bsd-3-clause
10,882
package jobs import akka.actor.Actor import play.api.Play import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer import akka.actor.ActorRef import org.apache.http.client.methods.HttpGet import org.apache.http.client.methods.HttpPost import models._ import akka.actor.Cancellable import akka.actor.ActorSystem import...
TweetAggregator/CrossTalk
app/jobs/TweetManager.scala
Scala
gpl-2.0
7,006
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
WindCanDie/spark
external/kafka-0-10-token-provider/src/test/scala/org/apache/spark/kafka010/KafkaTokenUtilSuite.scala
Scala
apache-2.0
10,148
/* * 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/vat-registration-frontend
test/fixtures/ApplicantDetailsFixtures.scala
Scala
apache-2.0
6,237
/* * Copyright 2015 Webtrends (http://www.webtrends.com) * * See the LICENCE.txt file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
Webtrends/wookiee-metrics
src/main/scala/com/webtrends/harness/component/metrics/metrictype/Metrics.scala
Scala
apache-2.0
3,366
/* * 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 ...
actuaryzhang/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/DateExpressionsSuite.scala
Scala
apache-2.0
40,966
package monocle import org.scalacheck.Arbitrary._ import org.scalacheck.{Arbitrary, Gen} import org.scalactic.Equality import scalaz.\\&/.{Both, That, This} import scalaz._ import scalaz.std.list._ import scalaz.syntax.traverse._ trait TestInstances { implicit def equality[A](implicit A: Equal[A]): Equality[A] = ...
NightRa/Monocle
test/src/test/scala/monocle/TestInstances.scala
Scala
mit
5,812
/* * * * Copyright 2015 Skymind,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 * * * * U...
Mageswaran1989/aja
src/main/scala/org/aja/dhira/src/main/scala/org/dhira/core/optimize/terminations/EpsTermination.scala
Scala
apache-2.0
1,673
/* Copyright 2009-2016 EPFL, Lausanne */ import leon.lang._ object Numeric { def f1(x: BigInt): BigInt = f2(x - 2) def f2(x: BigInt): BigInt = if (x < 0) 0 else f1(x + 1) }
regb/leon
src/test/resources/regression/termination/valid/Numeric1.scala
Scala
gpl-3.0
181
package com.seanshubin.builder.prototype object PartialSampleApp2 extends App { trait Foo { def handle(x: Int, y: Int, z: Int): String = handleToOverride(x, y).orElse(handleDefault(x, y))(z) def handleDefault(x: Int, y: Int): PartialFunction[Int, String] = { case z => s"value = $x $y $z" } d...
SeanShubin/builder
prototype/src/main/scala/com/seanshubin/builder/prototype/PartialSampleApp2.scala
Scala
unlicense
681
package enumeratum.values /** Created by Lloyd on 9/24/16. * * Copyright 2016 */ sealed abstract class Bites(val value: Byte) extends ByteEnumEntry object Bites extends ByteEnum[Bites] { val values = findValues case object OneByte extends Bites(1) case object TwoByte extends Bites(2) case object Th...
lloydmeta/enumeratum
enumeratum-test/src/main/scala/enumeratum/values/Bites.scala
Scala
mit
388
/******************************************************************************* * (C) Copyright 2015 Haifeng Li * * 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.apac...
arehart13/smile
shell/src/main/scala/smile/shell/Main.scala
Scala
apache-2.0
3,449
/* sbt -- Simple Build Tool * Copyright 2011 Mark Harrah */ package sbt import java.io.File import java.net.URI import Types.some final case class Scope(project: ScopeAxis[Reference], config: ScopeAxis[ConfigKey], task: ScopeAxis[AttributeKey[_]], extra: ScopeAxis[AttributeMap]) { def in(project: Reference, con...
jamesward/xsbt
main/Scope.scala
Scala
bsd-3-clause
13,011
package filodb.core.legacy.binaryrecord import spire.syntax.cfor._ import filodb.memory.format.UnsafeUtils /** * WARNING: THIS CLASS IS DEPRECATED!! ADDED TO SUPPORT BACKWARD COMPATIBILITY FOR MULTI-SCHEMA. * * A fast, no-heap-allocation comparator and copier specifically designed for two tasks: * 1) Compare an ...
tuplejump/FiloDB
core/src/main/scala/filodb.core/legacy/binaryrecord/RecordComparator.scala
Scala
apache-2.0
7,286
/* * 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...
alessandrolulli/reforest
src/main/scala/reforest/rf/RFStrategy.scala
Scala
apache-2.0
18,215
package com.wix.fax.phaxio.model /** * @see <a href="http://www.phaxio.com/docs/objects/">Fax Object</a> */ case class Fax(id: Long, direction: String, num_pages: Int, cost: Int, status: String, is_test: Boolean, req...
wix/libfax
libfax-phaxio-core/src/main/scala/com/wix/fax/phaxio/model/Fax.scala
Scala
apache-2.0
694
/* * 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 package xml pack...
scala/scala-xml
shared/src/main/scala/scala/xml/transform/NestingTransformer.scala
Scala
apache-2.0
529
package com.velorin.wordnet import edu.cmu.lti.ws4j.RelatednessCalculator import edu.cmu.lti.ws4j.impl._ import edu.cmu.lti.lexical_db.NictWordNet import edu.cmu.lti.lexical_db.ILexicalDatabase; /** * Created by amir on 12/9/14. */ object WsFactory { def calculationFunction(methodName: String): ((String, String...
AmirHooshangi/ACMG-S
src/main/scala/com/velorin/wordnet/WsFactory.scala
Scala
gpl-3.0
1,536
class C { def +(n: Int): Int = n } var v = new C v /* line: 2, name: + */ += 1
ilinum/intellij-scala
testdata/resolve2/function/assignment/IncompatibleReturnType.scala
Scala
apache-2.0
84
package com.mesosphere.cosmos import com.mesosphere.http.OriginHostScheme import io.lemonlabs.uri.Uri import scala.util.Failure import scala.util.Success import scala.util.Try package object repository { def rewriteUrlWithProxyInfo( origin: OriginHostScheme )( value: String ): String = { Try(Uri.par...
dcos/cosmos
cosmos-server/src/main/scala/com/mesosphere/cosmos/repository/package.scala
Scala
apache-2.0
568
object Test { var name = "foo" + 1 var s1 = Symbol(name) s1 = null System.gc val s2 = Symbol("foo1") name = null System.gc val s3 = Symbol("foo1") def main(args: Array[String]): Unit = { assert(s2 eq s3, ((s2, System.identityHashCode(s2), s3, System.identityHashCode(s3)))) } }
yusuke2255/dotty
tests/run/t6706.scala
Scala
bsd-3-clause
303
/* * 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 ...
chenc10/Spark-PAF
streaming/src/test/scala/org/apache/spark/streaming/util/WriteAheadLogSuite.scala
Scala
apache-2.0
29,447
package hubcat import dispatch._ trait Hosts { def apiHost: Req } trait DefaultHosts extends Hosts { def apiHost = :/("api.github.com").secure <:< Map("Content-Type" -> Accept.GithubJson) }
softprops/hubcat
src/main/scala/hosts.scala
Scala
mit
197
package tryp package state package core trait CState extends TransResultElem case object Pristine extends CState case object Initialized extends CState case object Initializing extends CState
tek/pulsar
state-core/src/internal.scala
Scala
mit
193
package nasa.nccs.edas.kernels import nasa.nccs.edas.utilities.appParameters import nasa.nccs.edas.workers.python.PythonWorkerPortal import scala.xml import scala.collection.JavaConversions._ import scala.collection.JavaConverters._ import nasa.nccs.utilities.{Loggable, cdsutils} import scala.collection.immutable.Map ...
nasa-nccs-cds/EDAS
src/main/scala/nasa/nccs/edas/kernels/manager.scala
Scala
gpl-2.0
3,017
/* * 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/http-verbs
http-verbs-common/src/test/scala/uk/gov/hmrc/http/HttpPostSpec.scala
Scala
apache-2.0
15,314
package com { package aboutcoder { private[com] class BlockAnalysis { protected[aboutcoder] def useStarChart() {} class LegOfJourney { private[BlockAnalysis] val distance = 100 } private[this] var speed = 200 } } package launch { import com.aboutcoder._ obje...
jeromechan/exercise
scala/src/main/scala/com/aboutcoder/BlockAnalysis.scala
Scala
mit
398
// AORTA is copyright (C) 2012 Dustin Carlino, Mike Depinet, and Piyush // Khandelwal of UT Austin // License: GNU GPL v2 package utexas.aorta.common import java.io.{ObjectOutputStream, FileOutputStream, ObjectInputStream, FileInputStream, PrintWriter, BufferedReader, FileReader, File} trait Serializ...
dabreegster/aorta
utexas/aorta/common/Serialization.scala
Scala
gpl-2.0
2,681
package trello import org.specs2.mutable._ import play.api.test._ import play.api.test.Helpers._ import play.api.libs.json.Json import parser.json.providers.TrelloWallParser import parser.json.providers.TrelloWallMessage object TrelloParserTest extends Specification { "TrelloParser" should { "Read json from tr...
Froggies/Skimbo
test/parser/trello/TrelloParserTest.scala
Scala
agpl-3.0
1,119
import org.apache.spark.sql.{SparkSession} import org.json4s.JsonDSL._ /** * 数据治理项目-表数据质量统计 */ object DataManagement_TableRule { case class StatInfo(colType: String, min: String, max: String, nullCount: Long, notNullCount: Long, maxLength: Int) case class TableStatInfo(tableName: String, count: Long, statInfo...
chocolateBlack/LearningSpark
src/test/scala-2.11/DataManagement_TableRule.scala
Scala
mit
2,833
/* * Copyright (c) 2016. Fengguo Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Detailed contribut...
arguslab/jawa-compiler
src/main/scala/org/argus/jawa/compiler/parser/JawaParser.scala
Scala
epl-1.0
30,771
package cmdreader.gfx import cmdreader._ import types._ import util._ class Iter extends Command { def getName() = "iter" def isValidArg0(n: Int) = n == 1 || n == 2 || n == 6 def apply(args: Array[Type]): Type = { val f = args(0) match { case f: FuncLike => (x: Int, y: Int) => GFX.getIntOrChoke(f(Arra...
bluebear94/bag
src/main/scala/cmdreader/gfx/Iter.scala
Scala
gpl-3.0
666
package de.htwg.zeta.common.models.entity import java.util.UUID import de.htwg.zeta.common.models.document.JobSettings case class Settings( id: UUID, owner: UUID, jobSettings: JobSettings ) extends Entity
Zeta-Project/zeta
api/common/src/main/scala/de/htwg/zeta/common/models/entity/Settings.scala
Scala
bsd-2-clause
221
package x7c1.chaff.reader import org.scalatest.{FlatSpecLike, Matchers} import scala.collection.mutable.ArrayBuffer class ReaderTest extends FlatSpecLike with Matchers { val getLength: Reader[String, Int] = Reader(_.length) "Reader" can "behave like function" in { val length = getLength run "hello" len...
x7c1/Chaff
chaff-reader/src/test/scala/x7c1/chaff/reader/ReaderTest.scala
Scala
mit
1,314
package frameless import org.scalacheck.{Arbitrary, Gen, Prop} import org.scalacheck.Prop._ class CastTests extends TypedDatasetSuite { def prop[A: TypedEncoder, B: TypedEncoder](f: A => B)(a: A)( implicit cast: CatalystCast[A, B] ): Prop = { val df = TypedDataset.create(X1(a) :: Nil) val got = d...
adelbertc/frameless
dataset/src/test/scala/frameless/CastTests.scala
Scala
apache-2.0
3,740
package latis.dm import latis.data.Data import latis.data.EmptyData import latis.metadata.Metadata import latis.metadata.EmptyMetadata import scala.Option.option2Iterable import scala.collection.Seq import latis.util.DataUtils import scala.collection.mutable.ArrayBuilder import scala.collection.mutable.ArrayBuffer /*...
dlindhol/LaTiS
src/main/scala/latis/dm/AbstractVariable.scala
Scala
epl-1.0
6,470
package models import java.util.Date case class User(age: Int, firstName: String, lastName: String, active: Boolean) case class Book(source: String, title: String, language: String, isbn10: String, isbn13: String, summary: String, contents: String, publ...
bodiam/play-epub
app/models/user.scala
Scala
apache-2.0
873
package com.aktaion.ml.algorithms // ////logic bororowed from Spark Mllib // object EntropyUtils { // // def log2(x: Double) = scala.math.log(x) / scala.math.log(2) // // /** // * :: DeveloperApi :: // * information calculation for multiclass classification // * @param counts Array[Double] with counts for ea...
jzadeh/Aktaion
src/main/scala/com.aktaion/ml/algorithms/Entropy.scala
Scala
apache-2.0
1,674
/* * Copyright (c) 2014 Georgi Krastev (@joroKr21) * * 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 applicabl...
lambdista/shapeless
examples/src/main/scala/shapeless/examples/recursionschemes.scala
Scala
apache-2.0
15,623
import org.scalajs.sbtplugin.ScalaJSPlugin import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._ import sbt.Keys._ import sbt._ object NextUIBuild extends Build { import Dependencies._ lazy val root = project.in(file(".")) .aggregate(coreJs, coreJvm, desktop, browser, examplesJs, examplesJvm) .settings(...
outr/nextui
project/NextUIBuild.scala
Scala
mit
6,478
/* * Copyright (c) 2012-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.apach...
snowplow/iglu
0-common/igluctl/src/test/scala/com/snowplowanalytics/iglu/ctl/commands/PushSpec.scala
Scala
apache-2.0
3,581
package com.citypay.pan.search.util import org.scalatest.FlatSpec /** * Created by gary on 30/05/2017. */ class LuhnCheckSpec extends FlatSpec { "A luhn check" should "check validity" in { assert(LuhnCheck("4000000000000001") === false) assert(LuhnCheck("4000000000000002") === true) assert(LuhnChe...
citypay/citypay-pan-search
src/test/scala/com/citypay/pan/search/util/LuhnCheckSpec.scala
Scala
mit
1,016
/* * Copyright 2012-2020 the original author or 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 ap...
planet42/Laika
io/src/main/scala/laika/theme/ThemeProvider.scala
Scala
apache-2.0
1,474
/* * 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 ...
Intel-bigdata/OAP
oap-native-sql/core/src/test/scala/org/apache/spark/sql/UDFSuite.scala
Scala
apache-2.0
23,590
/* * Copyright 2012-2013 Stephane Godbillon (@sgodbillon) * * 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 appl...
Rhinofly/Play-ReactiveMongo
src/main/scala/play/modules/reactivemongo/json.scala
Scala
apache-2.0
10,958
package org.scalatra import javax.servlet.http.HttpServletRequest import socketio._ class SocketIOExample extends ScalatraServlet with SocketIOSupport { def socketio(req: HttpServletRequest) = new SocketIOClient { // during the construction of the object is the last time the request is guaranteed to be there...
kuochaoyi/scalatra
example/src/main/scala/org/scalatra/SocketIOExample.scala
Scala
bsd-2-clause
871
package org.bitcoins.bench.eclair import org.bitcoins.bench.eclair.PaymentLog.PaymentLogEntry import scala.collection.JavaConverters._ object EclairBenchUtil { def paymentLogValues(): Vector[PaymentLogEntry] = { PaymentLog.paymentLog .values() .asScala .toVector } def convertStrings(str...
bitcoin-s/bitcoin-s
bench/src/main/scala-2.12/org/bitcoins/bench/eclair/EclairBenchUtil.scala
Scala
mit
395
package scalaprops import scalaz._ import scalaz.std.anyVal._ import scalaz.std.tuple._ import ScalapropsScalaz._ object CokleisliTest extends Scalaprops { override val param: Param = Param.withCurrentTimeSeed().copy(maxSize = 30) private[this] val e = new FunctionEqual(3) implicit def cokleisliEqual[F[_], A,...
scalaprops/scalaprops
scalaz/src/test/scala/scalaprops/CokleisliTest.scala
Scala
mit
1,479
import java.util.Comparator; import java.util.Random; import java.lang.Integer; import java.io.FileWriter; object Main { var ARRAY_SIZE = 10; val STRING_SIZE = 20; def printTable( sortedStringA: Array[String], sortedIntegerA: Array[Integer], sortedFloatA: Array[Float], sortedStringD:...
ObjectiveTruth/ScalaJavaSortComparison
scala/Main.scala
Scala
mit
5,801