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 de.frosner.broccoli.test.contexts import akka.actor.ActorSystem import akka.stream.ActorMaterializer import org.specs2.execute.{AsResult, Result} import org.specs2.specification.ForEach import org.specs2.specification.mutable.ExecutionEnvironment import play.api.libs.ws.WSClient import play.api.libs.ws.ahc.Ahc...
FRosner/cluster-broccoli
server/src/it/scala/de/frosner/broccoli/test/contexts/WSClientContext.scala
Scala
apache-2.0
889
class MyInt(val x: Int) { def eq(that: MyInt): Boolean = this.x == that.x } class Test { def foo(x: MyInt, y: MyInt): Boolean = x.eq(y) val a = MyInt(2) val b = MyInt(3) foo(a, b) }
dotty-staging/dotty
tests/bench/FindRef.scala
Scala
apache-2.0
193
/* * Copyright 2012 Tumblr 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...
cordoval/zipkin
zipkin-redis/src/main/scala/com/twitter/zipkin/config/RedisStorageConfig.scala
Scala
apache-2.0
1,285
package java.io import java.net.URI import java.nio.file.Path import scala.meta.internal.io._ // obtained implementation by experimentation on the JDK. class File(path: String) { def this(parent: String, child: String) = this(parent + File.separator + child) def this(parent: File, child: String) = this(pa...
scalameta/scalameta
scalameta/io/js/src/main/scala/java/io/File.scala
Scala
bsd-3-clause
1,746
/* * Copyright (C) 2015 Stratio (http://stratio.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
danielcsant/sparta
serving-api/src/main/scala/com/stratio/sparta/serving/api/utils/PolicyUtils.scala
Scala
apache-2.0
6,481
package com.omis.client.RootModels import com.omis.EmpDetails case class EmployeesRootModel(emp: Seq[EmpDetails])
iriddhi/mis
client/src/main/scala/com/omis/client/RootModels/EmployeesRootModel.scala
Scala
apache-2.0
116
/** * 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...
dchenbecker/kafka-sbt
core/src/main/scala/kafka/controller/KafkaController.scala
Scala
apache-2.0
51,420
/* * 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 ...
sergeymazin/zeppelin
flink/src/main/scala/org/apache/zeppelin/flink/FlinkSQLScalaInterpreter.scala
Scala
apache-2.0
1,714
package io.iohk.ethereum.consensus.validators import akka.util.ByteString import io.iohk.ethereum.blockchain.sync.EphemBlockchainTestSetup import io.iohk.ethereum.consensus.difficulty.DifficultyCalculator import io.iohk.ethereum.consensus.ethash.difficulty.EthashDifficultyCalculator import io.iohk.ethereum.consensus.e...
input-output-hk/etc-client
src/test/scala/io/iohk/ethereum/consensus/validators/BlockHeaderValidatorSpec.scala
Scala
mit
28,309
/* * 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 ...
shuangshuangwang/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/command/createDataSourceTables.scala
Scala
apache-2.0
9,800
/* * Copyright ActionML, LLC under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * ActionML licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except...
actionml/harness
rest-server/common/src/main/scala/com/actionml/circe/CirceSupport.scala
Scala
apache-2.0
1,000
package io.policarp.logback import ch.qos.logback.classic.Level import ch.qos.logback.classic.spi.StackTraceElementProxy import org.scalatest.{ Matchers, WordSpec } class SplunkHecJsonLayoutTest extends WordSpec with Matchers { "SplunkHecJsonLayout.parseStackTrace" should { import SplunkHecJsonLayout.parseSta...
kdrakon/splunk-logback-hec-appender
src/test/scala/io/policarp/logback/SplunkHecJsonLayoutTest.scala
Scala
apache-2.0
4,095
package org.bitcoins.db import slick.jdbc.SQLiteProfile.api._ import scala.concurrent.{ExecutionContext, Future} import java.sql.SQLException import org.bitcoins.core.config.MainNet /** * Created by chris on 9/8/16. * This is an abstract actor that can be used to implement any sort of * actor that accesses a P...
bitcoin-s/bitcoin-s-core
db-commons/src/main/scala/org/bitcoins/db/CRUD.scala
Scala
mit
5,713
package sexamples.simulation.pingpong import se.sics.kompics.sl._ import se.sics.kompics.network.Network import se.sics.kompics.timer.{CancelPeriodicTimeout, SchedulePeriodicTimeout, Timeout, Timer} import java.util.UUID object Pinger { class PingTimeout(_spt: SchedulePeriodicTimeout) extends Timeout(_spt); } clas...
kompics/kompics-scala
docs/src/main/scala/sexamples/simulation/pingpong/Pinger.scala
Scala
gpl-2.0
1,441
package justin.db.replica import java.util.UUID import justin.db.consistenthashing.{NodeId, Ring} import justin.db.storage.PluggableStorageProtocol.DataOriginality import org.scalatest.{FlatSpec, Matchers} class IsPrimaryOrReplicaTest extends FlatSpec with Matchers { behavior of "Data Originality Resolver" it ...
speedcom/JustinDB
justin-core/src/test/scala/justin/db/replica/IsPrimaryOrReplicaTest.scala
Scala
apache-2.0
1,160
/* * Copyright 2018 Analytics Zoo 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...
intel-analytics/analytics-zoo
zoo/src/test/scala/com/intel/analytics/zoo/pipeline/api/keras/layers/LocallyConnected1DSpec.scala
Scala
apache-2.0
3,298
package usbinstall.controllers import java.net.URL import java.util.ResourceBundle import javafx.event.ActionEvent import javafx.fxml.{FXML, Initializable} import javafx.scene.control.CheckBox import javafx.stage.Stage import scala.annotation.unused import usbinstall.settings.ErrorAction class InstallFailureControll...
suiryc/usbinstall
src/main/scala/usbinstall/controllers/InstallFailureController.scala
Scala
gpl-3.0
947
package ohnosequences.tabula.action import ohnosequences.tabula._, states._, actions._, tables._ trait AnyCreateTable extends AnyTableAction { type InputState = InitialState[Table] type OutputState = Creating[Table] type Output = None.type } case class CreateTable[T <: AnyTable](val table: T) extends AnyC...
ohnosequences/tabula
src/main/scala/tabula/actions/CreateTable.scala
Scala
agpl-3.0
350
package chat.tox.antox.activities import android.content.{Context, Intent} import android.os.Bundle import android.view.View import chat.tox.antox.R import chat.tox.antox.data.State import chat.tox.antox.tox.MessageHelper import chat.tox.antox.utils.Location import chat.tox.antox.wrapper._ import im.tox.tox4j.core.enu...
subliun/Antox
app/src/main/scala/chat/tox/antox/activities/GroupChatActivity.scala
Scala
gpl-3.0
2,279
package ch.jodersky.sbt.jni package plugins import build._ import sbt._ import sbt.Keys._ import sys.process._ /** Wraps a native build system in sbt tasks. */ object JniNative extends AutoPlugin { object autoImport { //Main task, inspect this first val nativeCompile = taskKey[File]( "Builds a nativ...
jodersky/sbt-jni
plugin/src/main/scala/ch/jodersky/sbt/jni/plugins/JniNative.scala
Scala
bsd-3-clause
4,732
import scala.collection.parallel.immutable.ParMap import scala.util.Random package object conway { protected[conway] def randomize(width: Int, height: Int): ParMap[(Int, Int), Boolean] = { var random_state = scala.collection.mutable.Map[(Int, Int), Boolean]() for (x <- 1 to width) { fo...
mkrogemann/sgol
src/main/scala/conway/package.scala
Scala
mit
470
// Databricks notebook source exported at Sun, 28 Aug 2016 13:52:09 UTC // MAGIC %md // MAGIC // MAGIC # [Big Data Analysis for Humanities and Social Sciences](https://www.eventbrite.co.uk/e/big-data-analysis-for-the-humanities-and-social-sciences-tickets-26708754604) // MAGIC // MAGIC ### August 26, 2016, King's Dig...
lamastex/scalable-data-science
db/20160826_KDL_Intro2BDA_HumSocSci/06_OldBaileyOnline/OBO_LoadExtract.scala
Scala
unlicense
12,338
object T { Tuppel_1.get }
yusuke2255/dotty
tests/untried/pos/t3642/t3642_2.scala
Scala
bsd-3-clause
28
package eagerEval import leon._ import lang._ import collection._ object MergeSort { def merge[T](less: (T, T) => Boolean)(xs: List[T], ys: List[T]): List[T] = { (xs, ys) match { case (Nil(), _) => ys case (_, Nil()) => xs case (Cons(x, xtail), Cons(y, ytail)) => if (less(x, y)) ...
epfl-lara/leon
testcases/lazy-datastructures/eager/BasicMergeSort.scala
Scala
gpl-3.0
1,174
/** * Copyright 2012-2013 StackMob * * 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...
megamsys/newman
src/main/scala/com/stackmob/newman/ApacheHttpClient.scala
Scala
apache-2.0
5,361
package com.sksamuel.scapegoat.inspections.empty import com.sksamuel.scapegoat.PluginRunner import org.scalatest.{ FreeSpec, Matchers, OneInstancePerTest } /** @author Stephen Samuel */ class EmptyWhileBlockTest extends FreeSpec with Matchers with PluginRunner with OneInstancePerTest { override val inspections = S...
pwwpche/scalac-scapegoat-plugin
src/test/scala/com/sksamuel/scapegoat/inspections/empty/EmptyWhileBlockTest.scala
Scala
apache-2.0
893
package com.mlh import akka.actor.ActorSystem package object clustering { import com.mlh.clustering.ClusteringConfig._ implicit val system = ActorSystem(clusterName) }
eikon-paku-ca/akka-cluster-docker-sample
src/main/scala/package.scala
Scala
mit
178
package org.usagram.clarify.generation.generator class Fragment(start: Int, end: Option[Int] = None, enclosed: Boolean = false)(builder: Int => String) { def to(n: Int): Fragment = new Fragment(start, Some(n), enclosed)(builder) def enclose: Fragment = new Fragment(start, end, true)(builder) def decora...
takkkun/clarify
generation/src/main/scala/org/usagram/clarify/generation/generator/Fragment.scala
Scala
mit
959
/** * Orders * Service for processing orders * * OpenAPI spec version: * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. * * Licensed under the Apache License, Version 2.0 (the "Lic...
Compositional/orders-aws
src/main/scala/works.weave.socks.aws.orders/presentation/value/Order.scala
Scala
apache-2.0
2,076
package smartupedit package io import language.reflectiveCalls trait FileHandlingClient extends Client with FileHandling with Exporting with Opening with Saving { }
wookietreiber/smartupedit
core/main/scala/io/FileHandlingClient.scala
Scala
gpl-3.0
167
package org.apache.spot.utilities object TimeUtilities { // convert HH:MM:SS string to seconds def getTimeAsDouble(timeStr: String) : Double = { val s = timeStr.split(":") val hours = s(0).toInt val minutes = s(1).toInt val seconds = s(2).toInt (3600*hours + 60*minutes + seconds).toDouble ...
kpeiruza/incubator-spot
spot-ml/src/main/scala/org/apache/spot/utilities/TimeUtilities.scala
Scala
apache-2.0
325
package lib import org.scalatest.{FunSpec, Matchers} class UrlKeySpec extends FunSpec with Matchers { describe("generate") { it("allows apidoc keys") { Seq("apidoc-spec", "apidoc-generator", "apidoc-api").foreach { key => UrlKey.generate(key) should be(key) UrlKey.validate(key) should be...
Seanstoppable/apidoc
lib/src/test/scala/UrlKeySpec.scala
Scala
mit
1,542
package sk.scalagine.resource /** * Created with IntelliJ IDEA. * User: zladovan * Date: 13.09.14 * Time: 22:52 */ class ResourceNotFoundException(resource: ResourceLoader, cause: Throwable = null) extends RuntimeException(resource.toString, cause)
zladovan/scalagine
engine/resource/src/main/scala/sk/scalagine/resource/ResourceNotFoundException.scala
Scala
mit
257
import sbt._ import Keys._ object Build extends Build with Common { // Project lazy val blue = Project("blue", file(".")) aggregate ( core, view, mustache, json, xml, finagle ) // Core lazy val core = Project("core", file("blue-core")) settings (common:_*) // Views lazy val view = P...
cstivers78/blue
project/Build.scala
Scala
apache-2.0
1,109
//: ---------------------------------------------------------------------------- //: Copyright (C) 2015 Verizon. 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 Licen...
neigor/funnel
elastic/src/test/scala/ExplodedTest.scala
Scala
apache-2.0
2,205
/*********************************************************************** * 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-tools/src/main/scala/org/locationtech/geomesa/tools/stats/StatsCountCommand.scala
Scala
apache-2.0
2,312
package controllers import commons.Commons._ import datadefinitions.BusDefinitions import datadefinitions.BusDefinitions.BusRoute import play.api.libs.json.{Json} import play.api.mvc.{Action, Controller} import prediction.{KNNPredictionImpl, PredictionRequest} object CommonFunctions extends Controller { def getR...
chrischivers/London-Bus-Tracker-Play-Framework
app/controllers/CommonFunctions.scala
Scala
mit
2,195
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
tillrohrmann/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/batch/sql/LegacyTableSourceTest.scala
Scala
apache-2.0
8,425
package com.fpis.ch02 import scala.annotation.tailrec /** * EXERCISE 1 (optional): Write a function to get the nth Fibonacci number. * The first two Fibonacci numbers are 0 and 1, and the next number is always the sum of the previous two. * Your definition should use a local tail-recursive function. */ object...
avinash-anand/FuncProgInScalaExAns
src/main/scala/com/fpis/ch02/Ex1_Fibonacci.scala
Scala
gpl-2.0
667
package nicol.math /* Copied from Tom Streller's (scan) Nicol-0.1.2 project (https://github.com/scan/Nicol) due to a lack of scala 2.10 compatible version */ /// @todo Turn these into traits to support other kind of matrices /** * A 2x2 Matrix, stored in Row-Major order: * * ( a b ) * ( c d ) */ sealed cla...
fehu/agent-tareas
lwjgl/src/main/scala/nicol/math/Matrix.scala
Scala
mit
1,619
package com.twitter.finagle.partitioning import com.twitter.conversions.DurationOps._ import com.twitter.finagle.client.StackClient import com.twitter.finagle.client.utils.StringClient import com.twitter.finagle.liveness.FailureAccrualFactory import com.twitter.finagle.naming.BindingFactory import com.twitter.finagle....
twitter/finagle
finagle-partitioning/src/test/scala/com/twitter/finagle/partitioning/PartitioningServiceTestBase.scala
Scala
apache-2.0
5,728
package org.bitcoins.wallet import java.nio.file.Files import com.typesafe.config.ConfigFactory import org.bitcoins.core.config.{MainNet, RegTest, TestNet3} import org.bitcoins.core.hd.HDPurposes import org.bitcoins.testkit.util.BitcoinSAsyncTest import org.bitcoins.wallet.config.WalletAppConfig import scala.util.Pr...
bitcoin-s/bitcoin-s
wallet-test/src/test/scala/org/bitcoins/wallet/WalletAppConfigTest.scala
Scala
mit
4,150
package net.scalax.cpoi.test import java.util.{Calendar, Date} import net.scalax.cpoi.api._ import net.scalax.cpoi.exception.{ExpectBooleanCellException, ExpectStringCellException} import org.apache.poi.hssf.usermodel.HSSFWorkbook import org.apache.poi.ss.usermodel.CellType import org.scalatest._ class HSSFWorkbookN...
scalax/poi-collection
src/test/scala/net/scalax/cpoi/read/HSSFWorkbookNumbericCellTest1.scala
Scala
mit
4,348
/* * 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 ...
WangTaoTheTonic/flink
flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/async/JavaAsyncCollectorWrapper.scala
Scala
apache-2.0
1,619
/* * 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 * distrib...
fusepoolP3/p3-silk
silk-core/src/main/scala/de/fuberlin/wiwiss/silk/plugins/transformer/numeric/LogarithmTransformer.scala
Scala
apache-2.0
1,241
/* * Copyright 2017-2018 Iaroslav Zeigerman * * 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 ...
akkeeper-project/akkeeper
akkeeper/src/main/scala/akkeeper/master/route/ContainerController.scala
Scala
apache-2.0
1,844
/* * 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 u...
ZxlAaron/mypros
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/HDFSMetadataLog.scala
Scala
apache-2.0
17,062
package memnets.ui import memnets.model._ import memnets.utils.{BeanSupport, DirtySupport} import scala.beans.BeanProperty import scala.collection.mutable.ListBuffer class PhasePlot( var scale: Double = 1.0, var w: Double = 450, var h: Double = 450, var zoom: Double = 1.0, var showFrame: Boolean ...
MemoryNetworks/memnets
api/src/main/scala/memnets/ui/Phase.scala
Scala
apache-2.0
3,087
/** * Copyright (C) 2012 Typesafe, Inc. <http://www.typesafe.com> */ package org.pantsbuild.zinc.compiler import java.io.File import java.net.URLClassLoader import sbt.internal.inc.{ AnalyzingCompiler, CompileOutput, IncrementalCompilerImpl, RawCompiler, ScalaInstance, javac, ZincUtil } import sbt.int...
twitter/pants
src/scala/org/pantsbuild/zinc/compiler/CompilerUtils.scala
Scala
apache-2.0
2,515
package es.weso.wiFetcher.dao.poi import java.io.InputStream import scala.collection.mutable.ListBuffer import org.apache.poi.hssf.util.CellReference import org.apache.poi.ss.usermodel.FormulaEvaluator import org.apache.poi.ss.usermodel.Sheet import org.apache.poi.ss.usermodel.Workbook import org.apache.poi.ss.usermod...
weso/wiFetcher
app/es/weso/wiFetcher/dao/poi/ProviderDAOImpl.scala
Scala
apache-2.0
3,150
package com.dimafeng.testcontainers import org.testcontainers.containers.wait.WaitStrategy import org.testcontainers.containers.{BindMode, FixedHostPortGenericContainer => OTCGenericContainer} class GenericContainer(imageName: String, fixedPorts: Map[Int, Int] = Map.empty, exposedPorts: Seq[Int] = Seq(), env: M...
KineticCookie/mist
src/it/scala/com/dimafeng/testcontainers/GenericContainer.scala
Scala
apache-2.0
1,659
// src/main/scala/progscala2/implicits/phantom-types.scala // A workflow for payroll calculations. package progscala.implicits.payroll sealed trait PreTaxDeductions sealed trait PostTaxDeductions sealed trait Final // For simplicity, use Float for money. Not recommended... case class Employee( name: String, an...
sunilrebel/programming-scala
examples/src/main/scala/progscala2/implicits/phantom-types.scala
Scala
mpl-2.0
2,239
package com.twitter.util.logging abstract class AbstractTraitWithLogging extends TraitWithLogging trait TraitWithLogging extends Logging { def myMethod1: String = { info("In myMethod1") "Hello, World" } }
twitter/util
util-slf4j-api/src/test/scala/com/twitter/util/logging/TraitWithLogging.scala
Scala
apache-2.0
220
/* * 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 ...
StephanEwen/incubator-flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/batch/BatchPhysicalLocalSortWindowAggregate.scala
Scala
apache-2.0
3,315
/* * 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/hive/src/test/scala/org/apache/spark/sql/hive/execution/UDAQuerySuite.scala
Scala
apache-2.0
14,195
/* * Copyright 2015 Alex Garella * * 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...
agarella/RxKinesis
src/test/scala/com/alexgarella/RxKinesis/RxKinesisTest.scala
Scala
apache-2.0
6,903
package scala.slick.driver import java.sql.Types._ import scala.slick.ql.TypeMapperDelegate trait BasicSQLUtilsComponent { def quoteIdentifier(id: String): String = { val s = new StringBuilder(id.length + 4) append '"' for(c <- id) if(c == '"') s append "\\"\\"" else s append c s append '"' toString ...
szeiger/scala-query
src/main/scala/scala/slick/driver/BasicSQLUtilsComponent.scala
Scala
bsd-2-clause
468
package pamflet import java.io.{File,FileOutputStream,InputStream, OutputStream,ByteArrayInputStream} import scala.annotation.tailrec object Produce { def apply(globalized: Globalized, target: File) { globalized.languages foreach { lang => if (lang == globalized.defaultLanguage) apply(glo...
n8han/pamflet
library/src/main/scala/produce.scala
Scala
lgpl-3.0
4,128
/* * 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/TaskContext.scala
Scala
apache-2.0
6,493
/* * Copyright 2017-2020 Aleksey Fomkin * * 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...
fomkin/korolev
modules/korolev/src/main/scala/korolev/internal/RemoteDomChangesPerformer.scala
Scala
apache-2.0
2,516
package nest.sparkle.time.transform import spray.json._ /** Convert a MinMax to/from a two element json array */ object MinMaxJson extends DefaultJsonProtocol { implicit def MinMaxFormat[T: JsonFormat]: JsonFormat[MinMax[T]] = { new JsonFormat[MinMax[T]] { def write(minMax: MinMax[T]): JsValue = { ...
mighdoll/sparkle
protocol/src/main/scala/nest/sparkle/time/transform/KeyValueRangesJson.scala
Scala
apache-2.0
2,122
package com.divisiblebyzero.hakea.processor import akka.actor.{ Actor, Props } import com.divisiblebyzero.hakea.config.Configuration import com.divisiblebyzero.hakea.model.Project import com.divisiblebyzero.hakea.solr.{ CommitInputDocuments, InputDocumentDispatcher } import com.divisiblebyzero.hakea.util.Logging impo...
eczarny/hakea
hakea-indexing-core/src/main/scala/com/divisiblebyzero/hakea/processor/IndexProcessor.scala
Scala
mit
1,923
package controllers import lila.app._ import views._ final class Event(env: Env) extends LilaController(env) { private def api = env.event.api def show(id: String) = Open { implicit ctx => OptionOk(api oneEnabled id) { event => html.event.show(event) } } def manager = Secure(_...
luanlv/lila
app/controllers/Event.scala
Scala
mit
1,801
package io.coding.me.m2p2.core.actor import akka.actor.ActorLogging import akka.actor.Actor import akka.actor.Props import org.joda.time.DateTime import io.coding.me.m2p2.core.actor.artifact.ArtifactCollector /** * Companion object */ object RepositoryReceptionist { /** * Factory method for the actor system ...
tssp/maven-p2-view
core/src/main/scala/io/coding/me/m2p2/core/actor/RepositoryReceptionist.scala
Scala
mit
922
/* * 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/ui/scope/RDDOperationGraph.scala
Scala
apache-2.0
8,634
package org.yotchang4s.pixiv.user import org.yotchang4s.pixiv.Identity import org.yotchang4s.pixiv.Entity case class UserId(value: String) extends Identity[String] class User( val identity: UserId, val name: String, val profileImageUrl: String) extends Entity[UserId] { }
yotchang4s/yapix
src/org/yotchang4s/pixiv/user/User.scala
Scala
bsd-3-clause
281
package controllers import javax.inject.Inject import play.api.i18n.{I18nSupport, MessagesApi} import play.api.libs.json.Json import play.api.mvc._ import play.api.routing.JavaScriptReverseRouter import scala.concurrent.Future class Application @Inject()(val messagesApi: MessagesApi) extends Controller with I18nSup...
carlosFattor/DoceTentacaoSlick
app/controllers/Application.scala
Scala
apache-2.0
2,302
/* * Copyright 2018 Analytics Zoo 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...
intel-analytics/analytics-zoo
zoo/src/test/scala/com/intel/analytics/zoo/common/UtilsSpec.scala
Scala
apache-2.0
1,773
package com.itszuvalex.itszulib.api.multiblock import net.minecraft.world.World /** * @author Itszuvalex * Interface for MultiBlock components for easy implementation. */ trait IMultiBlockComponent { /** * @return True if this is in valid MultiBlock */ def isValidMultiBlock: Boolean /** * @...
BlockWorker/ItszuLib
src/main/scala/com/itszuvalex/itszulib/api/multiblock/IMultiBlockComponent.scala
Scala
gpl-2.0
816
// Copyright 2014 Commonwealth Bank of Australia // // 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...
CommBank/ebenezer
core/src/main/scala/au/com/cba/omnia/ebenezer/scrooge/ScroogeWriteSupport.scala
Scala
apache-2.0
2,677
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
Kegeruneku/rudder
rudder-core/src/main/scala/com/normation/rudder/services/licenses/NovaLicenseService.scala
Scala
agpl-3.0
2,489
package uk.gov.dvla.vehicles.acquire.gatling import io.gatling.core.Predef._ import io.gatling.core.feeder._ object Scenarios { def verifyAssetsAreAccessible = { val noData = RecordSeqFeederBuilder[String](records = IndexedSeq.empty[Record[String]]) val chain = new Chains(noData) scenario("Verify asset...
dvla/vehicles-acquire-online
gatling-tests/src/test/scala/uk/gov/dvla/vehicles/acquire/gatling/Scenarios.scala
Scala
mit
4,021
/** This file is part of TextCompose, a program for producing PDF from text files. * Copyright 2014 Jesper S Villadsen <jeschvi@gmail.com> * License: GNU Affero General Public License version 3 or later. * For full license text see LICENSE.txt or <http://www.gnu.org/licenses/>. */ package textcompose.core ob...
jvilladsen/TextCompose
src/main/scala/core/NumberFunctions.scala
Scala
agpl-3.0
1,825
package eu.dnetlib.iis.common.spark.avro import org.apache.avro.Schema import org.apache.spark.sql.avro.SchemaConverters import org.apache.spark.sql.types.StructType import org.apache.spark.sql.{DataFrame, SparkSession} /** * Support for reading avro datastores as dataframes. * * @param spark SparkSession instance...
openaire/iis
iis-common/src/main/scala/eu/dnetlib/iis/common/spark/avro/AvroDataFrameReader.scala
Scala
apache-2.0
1,262
package scalaprops import scala.concurrent.duration.Duration import sbt.testing.Logger object TestExecutorImpl { private[this] val instance = new TestExecutor { override def execute[A](timeout: Duration)(f: => A): A = f override def shutdown(): Unit = {} } def withExecutor[A](logger: Logger)(f: TestExec...
scalaprops/scalaprops
scalaprops/js/src/main/scala/scalaprops/TestExecutorImpl.scala
Scala
mit
354
package fs2 import scala.concurrent.ExecutionContext import scala.concurrent.duration._ import org.typelevel.discipline.Laws import org.scalatest.{ Args, AsyncFreeSpec, FreeSpec, Matchers, Status, Suite } import org.scalatest.concurrent.{ AsyncTimeLimitedTests, TimeLimitedTests } import org.scalatest.prop.{ Checkers,...
zaneli/fs2
core/shared/src/test/scala/fs2/Fs2Spec.scala
Scala
mit
1,460
package no.skytteren.elasticala.index import scala.concurrent.ExecutionContext import scala.concurrent.Future import scala.concurrent.Promise import org.elasticsearch.action.ActionListener import org.elasticsearch.action.admin.indices.refresh.RefreshRequestBuilder import org.elasticsearch.action.admin.indices.refresh....
skytteren/elasticala
src/main/scala/no/skytteren/elasticala/index/Refresh.scala
Scala
apache-2.0
1,539
package com.arcusys.learn.liferay.util import java.security.Key /** * User: Yulia.Glushonkova * Date: 18.08.14 */ object EncryptorUtilHelper { def encrypt(key: Key, plainText: String) = com.liferay.util.Encryptor.encrypt(key, plainText) }
ViLPy/Valamis
learn-liferay620-services/src/main/scala/com/arcusys/learn/liferay/util/EncryptorUtilHelper.scala
Scala
lgpl-3.0
246
/* * Copyright 2011-2019 Asakusa Framework Team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
ashigeru/asakusafw-spark
compiler/src/main/scala/com/asakusafw/spark/compiler/graph/DirectOutputPrepareClassBuilder.scala
Scala
apache-2.0
16,162
/* * 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 ...
apache/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/InputFormatCodeGenerator.scala
Scala
apache-2.0
3,397
/* * Copyright (c) 2013 University of Massachusetts Amherst * Licensed under the Apache License, Version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 */ package edu.umass.cs.iesl.bibmogrify class BibMogrifyException(message: String) extends Exception(message)
iesl/bibmogrify
src/main/scala/edu/umass/cs/iesl/bibmogrify/BibMogrifyException.scala
Scala
apache-2.0
276
object Main extends App { com.abajar.crrcsimeditor.CRRCsimEditor.main(args) }
monkeypants/avl-crrcsim-editor
src/main/scala/Main.scala
Scala
gpl-2.0
80
package org.jetbrains.plugins.scala package lang package scaladoc package psi package impl import _root_.org.jetbrains.plugins.scala.lang.psi.ScalaPsiElementImpl import api.ScDocParamRef import com.intellij.lang.ASTNode /** * User: Alexander Podkhalyuzin * Date: 22.07.2008 */ class ScDocParamRefImpl(node: ASTNo...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/scaladoc/psi/impl/ScDocParamRefImpl.scala
Scala
apache-2.0
429
/** * Copyright (C) 2009-2017 Lightbend Inc. <http://www.lightbend.com> */ package akka.actor object NonPublicClass { def createProps(): Props = Props(new MyNonPublicActorClass()) } class MyNonPublicActorClass extends Actor { def receive = { case msg => sender() ! msg } }
unicredit/akka.js
akka-js-actor-tests/js/src/test/scala/akka/actor/NonPublicClass.scala
Scala
bsd-3-clause
292
package stocks import akka.NotUsed import akka.stream.ThrottleMode import akka.stream.scaladsl.Source import scala.concurrent.duration._ /** * A stock is a source of stock quotes and a symbol. */ class Stock(val symbol: StockSymbol) { private val stockQuoteGenerator: StockQuoteGenerator = new FakeStockQuoteGener...
play2-maven-plugin/play2-maven-test-projects
play27/scala/websocket-example-using-webjars-assets/app/stocks/Stock.scala
Scala
apache-2.0
3,521
package com.github.mdr.graphospasm.grapheditor.part import com.github.mdr.graphospasm.grapheditor.utils.Utils._ import com.github.mdr.graphospasm.grapheditor.figure._ import com.github.mdr.graphospasm.grapheditor.model.commands._ import org.eclipse.gef.editpolicies.DirectEditPolicy import org.eclipse.gef.commands.Comm...
mdr/graphospasm
com.github.mdr.graphospasm.grapheditor/src/main/scala/com/github/mdr/graphospasm/grapheditor/part/AttributeValueDirectEditPolicy.scala
Scala
mit
1,122
/** * Copyright (c) 2013-2016 Extended Mind Technologies Oy * * This file is part of Extended Mind. * * Extended Mind is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * Li...
ttiurani/extendedmind
backend/src/test/scala/org/extendedmind/test/SpecBase.scala
Scala
agpl-3.0
1,423
import scala.quoted.* import math.Numeric.Implicits.infixNumericOps inline def power[Num](x: Num, inline n: Int)(using num: Numeric[Num]) = ${powerCode('x, 'n)(using 'num)} private def powerCode[Num: Type](x: Expr[Num], n: Expr[Int])(using Expr[Numeric[Num]])(using Quotes): Expr[Num] = powerCode(x, n.valueOrAbort...
dotty-staging/dotty
tests/pos-macros/power-macro-2/Macro_1.scala
Scala
apache-2.0
651
package mesosphere.marathon.core.launchqueue.impl import mesosphere.marathon.Protos.MarathonTask import mesosphere.marathon.core.base.{ Clock, ShutdownHooks } import mesosphere.marathon.core.launchqueue.{ LaunchQueueConfig, LaunchQueueModule } import mesosphere.marathon.core.leadership.AlwaysElectedLeadershipModule im...
MrMarvin/marathon
src/test/scala/mesosphere/marathon/core/launchqueue/impl/LaunchQueueModuleTest.scala
Scala
apache-2.0
9,326
import sbt._ import uk.gov.hmrc.SbtAutoBuildPlugin import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin import uk.gov.hmrc.versioning.SbtGitVersioning object MicroServiceBuild extends Build with MicroService { override val appName = "mdtp-api-microservice" override lazy val plugins: Seq[Plugins] = Seq( ...
trasahin/mdtp-api-microservice
project/MicroServiceBuild.scala
Scala
apache-2.0
1,728
/* * 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 ...
xieguobin/Spark_2.0.0_cn1
ml/classification/Classifier.scala
Scala
apache-2.0
9,405
/* * 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
app/controllers/tcsp/TcspTypesController.scala
Scala
apache-2.0
3,571
import com.myltsev.raw.{ CountingSort, Bulk, BulkType } import java.util.{ List ⇒ JList } import org.apache.hadoop.io.{ NullWritable, LongWritable, Text } import org.apache.hadoop.mapred.Mapper import org.apache.hadoop.mrunit.MapDriver import org.apache.hadoop.mrunit.types.{ Pair ⇒ MRPair } package object ops { impl...
alexander-myltsev/scala-hadoop-sandbox
src/test/scala/com/myltsev/raw/ops.scala
Scala
unlicense
1,159
import scala.quoted.* class Foo { inline def foo: Unit = ${Foo.impl} object Bar { inline def foo: Unit = ${Foo.impl} } } object Foo { class Baz { inline def foo: Unit = ${impl} } object Quox { inline def foo: Unit = ${Foo.impl} } def impl(using Quotes): Expr[Unit] = '{} }
dotty-staging/dotty
tests/pos-macros/quote-non-static-macro.scala
Scala
apache-2.0
303
class BCPBooleanEqTest { def m(): Unit = { val a = true val b = a == true val c = a == false val d = false val e = d == true val f = d == false val g = d == 10 val h = d == 10.0 val i = d == "test" } }
jean-andre-gauthier/scalasca
src/test/scala/lara/epfl/scalasca/tests/unit/executables/blockconstantpropagation/BlockConstantPropagationBooleanEqTest.scala
Scala
bsd-3-clause
221
/* * Copyright 2016 Nicolas Rinaudo * * 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...
nrinaudo/kantan.codecs
laws/shared/src/main/scala/kantan/codecs/laws/discipline/DisciplinePackage.scala
Scala
apache-2.0
1,881
/* * Copyright 2014 Claude Mamo * * 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 w...
stealthly/kafka-web-console
app/controllers/Group.scala
Scala
apache-2.0
850
package com.nashsoftware.Controller /** * Created with IntelliJ IDEA. * User: jlong * Date: 8/18/13 * Time: 5:20 PM * To change this template use File | Settings | File Templates. */ class StdOutController extends BaseController { var controlStatus: ControlStatus = new ControlStatus(0,0,0,0) def land() = ...
longjos/Leap-ARDrone
src/com/nashsoftware/Controller/StdOutController.scala
Scala
mit
1,075
/* * La Trobe University - Distributed Deep Learning System * Copyright 2016 Matthias Langer (t3l@threelights.de) * * 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.apa...
bashimao/ltudl
base/src/main/scala/edu/latrobe/io/vega/ScatterPlot2D.scala
Scala
apache-2.0
14,339
package services import play.api.libs.json.{Format, Json} import scala.concurrent.Future /** * This is the interface of the GitHub service which returns the list of repositories that a user can * access in Github. */ trait GitHubService { /** * Get a list of projects for a certain Github account * @p...
dcharoulis/teahub
app/services/GitHubService.scala
Scala
apache-2.0
3,704