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 2015 Thomson Reuters * * Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
bryaakov/CM-Well
server/cmwell-bg/src/test/scala/cmwell/bg/test/BGResilienceSpec.scala
Scala
apache-2.0
6,231
package bot.line.model.event case class Events(events: List[Event])
xoyo24/akka-http-line-bot
src/main/scala/bot/line/model/event/Events.scala
Scala
mit
69
package org.scalarules.dsl.nl.grammar import org.scalarules.derivations.{DefaultDerivation, Derivation, SubRunData, SubRunDerivation} import org.scalarules.dsl.nl.grammar.DslCondition.{andCombineConditions, factFilledCondition} import org.scalarules.dsl.nl.grammar.meta.DslMacros import org.scalarules.engine import org...
scala-rules/rule-engine
engine/src/main/scala/org/scalarules/dsl/nl/grammar/BerekeningFlow.scala
Scala
mit
5,564
package de.unihamburg.vsis.sddf.pipe.optimize import org.apache.spark.rdd.RDD import org.apache.spark.storage.StorageLevel import de.unihamburg.vsis.sddf.pipe.PipeElementPassthrough import de.unihamburg.vsis.sddf.pipe.context.AbstractPipeContext import de.unihamburg.vsis.sddf.pipe.context.SddfPipeContext class PipeO...
numbnut/sddf
src/main/scala/de/unihamburg/vsis/sddf/pipe/optimize/PipeOptimizePersistAndName.scala
Scala
gpl-3.0
1,114
import sbt._ object Dependencies { object V { val macroParadise = "2.0.1" val datomic = "0.9.5130" val specs2 = "2.3.12" val scalaTest = "2.2.4" } object Compile { val datomic = "com.datomic" % "datomic-free" % V.datomic % "provided" exclude("org.slf4j",...
Enalmada/datomisca
project/Dependencies.scala
Scala
apache-2.0
546
package metronome import metronome.temporal.{TemporalAdjuster, TemporalAccessor} /** * A day-of-week, such as 'Tuesday'. * <p> * {@code DayOfWeek} is an enum representing the 7 days of the week - * Monday, Tuesday, Wednesday, Thursday, Friday, Saturday and Sunday. * <p> * In addition to the textual enum name, e...
javierg1975/metronome
src/main/scala/metronome/CalendarElements.scala
Scala
gpl-2.0
141,021
package controllers import _root_.play.api.libs.json.Json import _root_.play.api.mvc._ class Application extends Controller { def index = Action { Ok(Json.obj()) } }
Xanho/xanho-api
app/controllers/Application.scala
Scala
apache-2.0
186
package hercules.config.notification import com.typesafe.config.{ ConfigFactory, Config } import hercules.protocols.NotificationChannelProtocol._ import scala.collection.JavaConversions._ /** * Utility functions associated with creating a SlackNotificationConfig. * Created by johda411 on 2015-03-18. */ object Sla...
johandahlberg/hercules
src/main/scala/hercules/config/notification/SlackNotificationConfig.scala
Scala
mit
1,810
package com.faacets.consolidate import cats.{Eq, ApplicativeError} import cats.data.{Validated, ValidatedNel, NonEmptyList => NEL} import cats.syntax.eq._ import cats.syntax.semigroup._ sealed trait Result[+A] { self => import Result.{Same, Updated, Failed} def in(element: String): Result[A] def in(elements...
denisrosset/consolidate
src/main/scala/com.faacets/consolidate/Result.scala
Scala
mit
5,193
package services import play.api.libs.json.JsValue import scala.concurrent.Future trait ProxyService { def get(cmd: String, params: Option[JsValue]): Future[JsValue] }
joakim-ribier/proxy-foscam
app/services/ProxyService.scala
Scala
mit
174
/** * * @author Richard Li */ import collection.mutable.Buffer object puzzle6 extends App { val buf1 = Buffer.empty[() => Int] val buf2 = Buffer.empty[() => Int] val buf3 = Buffer.empty[() => Int] val data = Seq(10, 20, 30) var j = 0 for (i <- 0 until data.length) { buf1 += (() => data(i)) ...
precompiler/scala-101
puzzles/src/main/scala/puzzle6.scala
Scala
apache-2.0
685
package fpinscala.datastructures sealed trait List[+A] // `List` data type case object Nil extends List[Nothing] // data constructor for `List` case class Cons[+A](head: A, tail: List[A]) extends List[A] object List { // `List` companion object def sum(ints: List[Int]): Int = ints match { // Pattern matching exampl...
galarragas/FpInScala
chaptercode/src/main/scala/fpinscala/datastructures/List.scala
Scala
mit
1,440
package com.blogspot.yetanothercoders.hfile import org.apache.hadoop.conf.Configuration import org.apache.hadoop.hbase.client.{HTable, Put} import org.apache.hadoop.hbase.io.ImmutableBytesWritable import org.apache.hadoop.hbase.mapreduce.{HFileOutputFormat2, TableMapReduceUtil} import org.apache.hadoop.hbase.{HBaseCon...
dawidwys/phoenix-on-spark
src/main/scala/com/blogspot/yetanothercoders/hfile/BulkPhoenixLoader.scala
Scala
apache-2.0
1,672
/** * 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...
YMCoding/kafka-0.11.0.0-src-with-comment
core/src/main/scala/kafka/coordinator/group/MemberMetadata.scala
Scala
apache-2.0
5,289
package actors.serializers import akka.serialization.SerializerWithStringManifest import org.slf4j.{Logger, LoggerFactory} import scalapb.GeneratedMessage import server.protobuf.messages.Alert.{Alert, AlertSnapshotMessage} import server.protobuf.messages.CrunchState.{CrunchRequestMessage, _} import server.protobuf.mes...
UKHomeOffice/drt-scalajs-spa-exploration
server/src/main/scala/actors/serializers/ProtoBufSerializer.scala
Scala
apache-2.0
10,912
package com.twitter.finagle.service import com.twitter.finagle.Filter.TypeAgnostic import com.twitter.finagle._ import com.twitter.finagle.context.Contexts import com.twitter.finagle.client.LatencyCompensation import com.twitter.finagle.stats.{NullStatsReceiver, StatsReceiver} import com.twitter.finagle.tracing.Trace ...
sveinnfannar/finagle
finagle-core/src/main/scala/com/twitter/finagle/service/TimeoutFilter.scala
Scala
apache-2.0
5,248
package org.juanitodread.pitayafinch import org.scalatest._ import flatspec._ import matchers._ abstract class UnitSpec extends AnyFlatSpec with should.Matchers with OptionValues with Inside with Inspectors
juanitodread/pitaya-finch
src/test/scala/org/juanitodread/pitayafinch/UnitSpec.scala
Scala
apache-2.0
217
package com.twitter.gizzard.shards case class LinkInfo(upId: ShardId, downId: ShardId, weight: Int)
kangkot/gizzard
src/main/scala/com/twitter/gizzard/shards/LinkInfo.scala
Scala
apache-2.0
102
/* * 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 ...
maropu/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/command/AnalyzeTablesCommand.scala
Scala
apache-2.0
1,637
/*********************************************************************** * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
jahhulbert-ccri/geomesa
geomesa-fs/geomesa-fs-storage/geomesa-fs-storage-orc/src/main/scala/org/locationtech/geomesa/fs/storage/orc/utils/OrcAttributeReader.scala
Scala
apache-2.0
23,025
package hr.element.beepo package processor trait IEmailSender { def send(email: Model.EmailSmtpRequest): EmailStatus def send(email: IndexedSeq[Model.EmailSmtpRequest]): IndexedSeq[EmailStatus] }
element-doo/beepo
code/scala/model-interfaces-plus/src/main/scala/hr/element/beepo/processor/IEmailSender.scala
Scala
bsd-3-clause
204
/* * 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 ...
aokolnychyi/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
Scala
apache-2.0
75,663
package spark import scala.math.random import java.net.InetAddress import scala.util.Random import scala.util.Random._ import scala.collection.mutable._ import scala.io.Source import scala.io.Source._ /* Todo: This needs to be made threadsafe to work for multiple tasks running on one machine */ object LocalRandom { ...
jperla/spark-advancers
core/src/main/scala/spark/LocalStorage.scala
Scala
bsd-3-clause
1,153
/* * 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/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/OptimizeWindowFunctionsSuite.scala
Scala
apache-2.0
3,116
/* * GraphemeFrameImpl.scala * (Mellite) * * Copyright (c) 2012-2022 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Affero General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * [email protected] */ package de.sciss.mellite....
Sciss/Mellite
app/src/main/scala/de/sciss/mellite/impl/grapheme/GraphemeFrameImpl.scala
Scala
agpl-3.0
3,242
package shapeless3.data import scala.compiletime._ trait Monoidal { type to[_] <: Tuple type length[m] = Monoidal.length[to[m]] } object Monoidal { import Tuple._ type length[m <: Tuple] = Size[m] } trait UnboundedMonoidal[T0[_, _], U0] extends Monoidal { type to[t] <: Tuple = t match { case T0[hd, t...
dotty-staging/dotty
tests/pos/i11250/1.scala
Scala
apache-2.0
549
/* * 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 ...
goldmedal/spark
sql/core/src/test/scala/org/apache/spark/sql/connector/TableCapabilityCheckSuite.scala
Scala
apache-2.0
9,147
/* * 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 ...
Huyuwei/tvm
vta/hardware/chisel/src/main/scala/core/Configs.scala
Scala
apache-2.0
1,564
package org.scalaide.refactoring.internal import org.scalaide.core.internal.jdt.model.ScalaSourceFile import scala.tools.refactoring.analysis.GlobalIndexes import scala.tools.refactoring.implementations import org.scalaide.core.internal.statistics.Features.NotSpecified /** * The Inline Local -- also known as Inline ...
stephenh/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/refactoring/internal/InlineLocal.scala
Scala
bsd-3-clause
1,578
package jinesra.vkMessageHistory import com.typesafe.scalalogging._ import com.typesafe.scalalogging.slf4j._ import scala.xml._ import scala.util.{ Success, Failure } import java.io.InputStreamReader import net.liftweb.json._ import scalaj.http._ import scalax.file.Path import scalaj.http.Http.Request class VkRestCli...
arsenij-solovjev/vkMessageHistory
src/main/scala/jinesra/vkMessageHistory/VkRestClient.scala
Scala
apache-2.0
1,631
package cs.ucla.edu.bwaspark.datatype import scala.collection.mutable.MutableList class MemSeedType(rbeg_i: Long, qbeg_i: Int, len_i: Int) { var rBeg: Long = rbeg_i var qBeg: Int = qbeg_i var len: Int = len_i } class MemChainType(pos_i: Long, seeds_i: MutableList[MemSeedType]) { var pos: Long = pos_i var s...
peterpengwei/bwa-spark-fpga
src/main/scala/cs/ucla/edu/bwaspark/datatype/MemChainType.scala
Scala
gpl-2.0
601
package uscala.result object MapViewShim { implicit class MapViewImplicitShim[K, V](map: Map[K, V]) { def mapValuesShim[W](f: (V) => W): Map[K, W] = map.view.mapValues(f).toMap } }
albertpastrana/uscala
result/src/test/scala-2.13+/uscala/result/MapViewShim.scala
Scala
mit
190
/* * _ _ * _ __ ___ | |__ | | ___ * | '_ \\ / _ \\| '_ \\| |/ _ \\ noble :: norcane blog engine * | | | | (_) | |_) | | __/ Copyright (c) 2016-2018 norcane * |_| |_|\\___/|_.__/|_|\\___| * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file...
norcane/noble
app/com/norcane/noble/atom/AtomUtils.scala
Scala
apache-2.0
1,259
def makeFunction[T](param: => T) = param _
grzegorzbalcerek/scala-book-examples
examples/MakeFunction.scala
Scala
mit
43
/* * 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 ...
goldmedal/spark
core/src/test/scala/org/apache/spark/deploy/history/HistoryServerDiskManagerSuite.scala
Scala
apache-2.0
5,290
package com.gravity.gdk.placement import com.fasterxml.jackson.core.JsonParseException /* ___...---'' ___...---'\\'___ '' _.-'' _`'.______\\\\. /_.) )..- __..--'\\\\ ( __..--'' '-''\\@ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ */ /** An exception thrown during [[com.gravity.gdk.plac...
GravityLabs/gdk-scala
src/main/scala/com/gravity/gdk/placement/PlacementGetRecosException.scala
Scala
apache-2.0
1,335
package shopScala.async_reactive import com.mongodb.casbah.Imports._ import com.mongodb.casbah.MongoClient import shopScala.util.Constants._ import shopScala.util.User object SyncCasbah extends App { val client: MongoClient = MongoClient(new MongoClientURI(MONGODB_URI)) val db: MongoDB = client(SHOP_DB_NAME) v...
hermannhueck/reactive-mongo-access
src/main/scala/shopScala/async_reactive/SyncCasbah.scala
Scala
apache-2.0
609
/******************************************************************************* * Copyright (c) 2019. Carl Minden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the ...
carlminden/anathema-roguelike
src/com/anathema_roguelike/entities/characters/foes/roles/Tracker.scala
Scala
gpl-3.0
947
// Copyright 2015,2016,2017,2018,2019,2020 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 req...
CommBank/grimlock
grimlock-core/src/test/scala/commbank/grimlock/matrix/TestMatrixExtract.scala
Scala
apache-2.0
7,666
/* Copyright 2011 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 applicable law or...
markusgumbel/scalabioalg
core/src/main/scala/net/gumbix/bioinf/hmm/Viterbi.scala
Scala
apache-2.0
2,547
package com.aristocrat.mandrill.requests.Whitelists import com.aristocrat.mandrill.requests.MandrillRequest case class Add(key: String, email: String, comment: String) extends MandrillRequest
aristocratic/mandrill
src/main/scala/com/aristocrat/mandrill/requests/Whitelists/Add.scala
Scala
mit
194
/* * Copyright 2006-2008 Workingmouse * * 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...
tomjadams/furnace
src/spec/scala/com/googlecode/furnace/parse/AFastaParser.scala
Scala
apache-2.0
3,432
package ohnosequences.awstools.ec2 /* ## Instance Types & AMI compatibility implicits Here we provide implicits for (hopefully) all valid combinations of - instance type & storage type - instance type & virtualization type - instance type & AMI (as a combination of storage and virtualization types) */ /* An instanc...
ohnosequences/aws-scala-tools
src/main/scala/ohnosequences/awstools/ec2/InstanceType-AMI.scala
Scala
agpl-3.0
6,399
/* * Copyright (C) 2013 Alcatel-Lucent. * * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * Licensed to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a cop...
molecule-labs/molecule
molecule-core-examples/src/main/scala/molecule/examples/core/Clock.scala
Scala
apache-2.0
1,856
package chat.tox.antox.activities import java.util.Locale import android.app.{AlertDialog, NotificationManager} import android.content.res.Configuration import android.content.{Context, DialogInterface, Intent, SharedPreferences} import android.media.AudioManager import android.net.ConnectivityManager import android....
biaji/Antox
app/src/main/scala/chat/tox/antox/activities/MainActivity.scala
Scala
gpl-3.0
5,629
/*********************************************************************** * Copyright (c) 2013-2017 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...
ronq/geomesa
geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/ingest/ConverterIngest.scala
Scala
apache-2.0
5,192
package org.jetbrains.plugins.scala package worksheet.actions import com.intellij.execution._ import com.intellij.execution.configurations.JavaParameters import com.intellij.execution.process.{OSProcessHandler, ProcessAdapter, ProcessEvent} import com.intellij.execution.ui.ConsoleViewContentType import com.intellij.ic...
double-y/translation-idea-plugin
src/org/jetbrains/plugins/scala/worksheet/actions/RunWorksheetAction.scala
Scala
apache-2.0
8,638
package com.sksamuel.elastic4s.searches.queries.funcscorer trait ScoreFunctionDefinition
FabienPennequin/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/searches/queries/funcscorer/ScoreFunctionDefinition.scala
Scala
apache-2.0
90
/* * Copyright 2017 helloscala.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 applicable law or agreed ...
helloscala/helloscala
hs-core/src/main/scala/helloscala/algorithm/Sorts.scala
Scala
apache-2.0
1,275
package pimpathon import pimpathon.filterMonadic._ class FilterMonadicSpec extends PSpec { "toMultiMap" in { Set.empty[(Int, Int)].toMultiMap[List] ≡ Map() List.empty[(Int, Int)].toMultiMap[List] ≡ Map() Set((1, 10), (1, 11), (2, 20), (2, 21)).toMultiMap[List] ≡ Map(1 → List(10, 11), 2 → List(20, 21...
stacycurl/pimpathon
src/test/scala/pimpathon/FilterMonadic.scala
Scala
apache-2.0
663
/* sbt -- Simple Build Tool * Copyright 2008, 2009, 2010, 2011 Mark Harrah */ package sbt import complete.{ DefaultParsers, Parser } import compiler.{ CompilerCache, EvalImports } import Types.{ const, idFun } import Aggregation.AnyKeys import Project.LoadAction import scala.annotation.tailrec import Path._ import...
dyx/sbt
main/src/main/scala/sbt/Main.scala
Scala
bsd-3-clause
23,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 ...
SparklineData/spark-druid-olap
src/main/scala/org/sparklinedata/druid/metadata/DruidRelationColumn.scala
Scala
apache-2.0
7,813
package features import org.apache.spark.mllib.feature.{IDF, HashingTF} import org.apache.spark.mllib.linalg.Vector import org.apache.spark.rdd.RDD import twitter.Tweet import features.Transformers.default._ case class TfIdf(corpus: RDD[Tweet]) extends Serializable { import Features._ val tf = new HashingTF(coe...
openforce/spark-mllib-scala-play
app/features/TfIdf.scala
Scala
apache-2.0
530
package org.scalatra import scala.collection.Map trait HttpMessage { /** * A map of headers. Multiple header values are separated by a ',' * character. The keys of this map are case-insensitive. */ def headers: Map[String, String] /** * The content of the Content-Type header, or None if absent. ...
louk/scalatra
core/src/main/scala/org/scalatra/HttpMessage.scala
Scala
bsd-2-clause
527
package org.scalafmt.util import scala.meta.parsers.ParseException import org.scalafmt.internal.State sealed abstract class ExperimentResult(scalaFile: ScalaFile) { def key: String override def toString: String = s"""${this.getClass.getSimpleName}($scalaFile)""".stripMargin } object ExperimentResult { c...
Daxten/scalafmt
core/src/test/scala/org/scalafmt/util/ExperimentResult.scala
Scala
apache-2.0
1,621
package com.twitter.algebird import com.twitter.algebird.BaseProperties._ import com.twitter.algebird.scalacheck.arbitrary._ import com.twitter.algebird.scalacheck.NonEmptyVector import org.scalacheck.Arbitrary import org.scalacheck.Prop.forAll import org.scalacheck.Prop class MaxLaws extends CheckProperties { def ...
twitter/algebird
algebird-test/src/test/scala/com/twitter/algebird/MaxLaws.scala
Scala
apache-2.0
2,059
/* * Copyright 2016 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...
ahudspith-equalexperts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/computations/CP90.scala
Scala
apache-2.0
1,478
package dk.gp.cogp.svi import breeze.linalg.DenseMatrix import dk.gp.cov.CovFunc import breeze.linalg.DenseVector import dk.gp.cov.utils.covDiag import dk.gp.cogp.lb.LowerBound import dk.gp.cogp.model.CogpModel import dk.gp.cogp.model.Task import dk.bayes.math.gaussian.MultivariateGaussian object stochasticUpdateCogp...
danielkorzekwa/bayes-scala-gp
src/main/scala/dk/gp/cogp/svi/stochasticUpdateCogpModel.scala
Scala
bsd-2-clause
2,973
package com.criteo.dev.cluster import java.io.{File, FileNotFoundException} import java.net.URL import com.criteo.dev.cluster.config.{ConfigLoader, GlobalConfig} /** * Main entry point to various actions on the AWS-hosted development clusters for the current user. * * See application.properties for example of ...
criteo/berilia
src/main/scala/com/criteo/dev/cluster/DevClusterLauncher.scala
Scala
apache-2.0
2,757
/* * Copyright 2011-2022 GatlingCorp (https://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
gatling/gatling
gatling-core/src/main/scala/io/gatling/core/check/css/Lagarto.scala
Scala
apache-2.0
1,544
package nl.soqua.lcpi.interpreter.show import org.scalatest.{Matchers, WordSpec} class ShowSpec extends WordSpec with Matchers { import Show._ "Show" should { "render an empty string" in { val str: String = Show.empty str shouldBe "" } "composing values should be ok" in { val str: S...
kevinvandervlist/lcpi
interpreter/src/test/scala/nl/soqua/lcpi/interpreter/show/ShowSpec.scala
Scala
mit
945
package justin.db import akka.remote.testkit.{MultiNodeConfig, MultiNodeSpec} import com.typesafe.config.ConfigFactory final class ConvergeJustinDBClusterConfig extends MultiNodeConfig { val first = role("first") val second = role("second") val third = role("third") private[this] val allRoles = List(first...
speedcom/JustinDB
src/multi-jvm/scala/justin/db/ConvergeJustinDBClusterSpec.scala
Scala
apache-2.0
2,010
package io.tabmo.aerospike import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import com.aerospike.client.query.IndexType import com.aerospike.client.{Value, Bin => AEBin} import io.tabmo.aerospike.data.{AerospikeKey, AerospikeKeyConverter, AerospikeRecord, Bin} import io.tabmo.a...
tabmo/ReactiveAerospike
src/test/scala/QueryUsage.scala
Scala
apache-2.0
6,315
package com.twitter.finatra.http.tests.integration.messagebody.test import com.twitter.finagle.http.MediaType import com.twitter.finagle.http.Status import com.twitter.finatra.http.EmbeddedHttpServer import com.twitter.finatra.http.tests.integration.messagebody.main.GreetingServer import com.twitter.inject.server.Feat...
twitter/finatra
http-server/src/test/scala/com/twitter/finatra/http/tests/integration/messagebody/test/GreetingControllerIntegrationTest.scala
Scala
apache-2.0
1,296
/* * Copyright 2015 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...
keithhall/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v3/B80A.scala
Scala
apache-2.0
807
package scalaz.stream.mongodb.index import com.mongodb.{BasicDBObjectBuilder, DBObject} import scalaz.stream.mongodb.collectionSyntax._ import collection._ import scala.collection.JavaConverters._ /** * Configuration of the index. * Please see [[http://docs.mongodb.org/manual/reference/method/db.collection.ens...
Spinoco/scalaz-stream-mongodb
core/src/main/scala/scalaz/stream/mongodb/index/CollectionIndex.scala
Scala
mit
2,984
package org.openurp.edu.eams.teach.lesson.task.dao.hibernate import org.beangle.data.jpa.hibernate.HibernateEntityDao import org.hibernate.SQLQuery import org.hibernate.`type`.StandardBasicTypes import org.openurp.edu.eams.teach.lesson.task.dao.LessonStatDao class LessonStatDaoHibernate extends HibernateEntityDao ...
openurp/edu-eams-webapp
schedule/src/main/scala/org/openurp/edu/eams/teach/lesson/task/dao/hibernate/LessonStatDaoHibernate.scala
Scala
gpl-3.0
1,185
package nl.codecentric.assumption.dsl import nl.codecentric.assumption.dsl.core.definition.BaseDefinition import org.json4s.native.JsonMethods._ import scala.concurrent.duration._ import scalaj.http.{Http, HttpResponse} /** * Created by hylke on 20/07/15. */ class RegistrationDefinition extends BaseDefinition { ...
craftsmenlabs/gareth-poc
dsl/examples/src/main/scala/nl/codecentric/assumption/dsl/RegistrationDefinition.scala
Scala
gpl-2.0
1,226
package net.ceedubs.ficus package readers import java.time.temporal.ChronoUnit import com.typesafe.config.ConfigFactory import Ficus.{chronoUnitReader, toFicusConfig} class ChronoUnitReaderSpec extends Spec { def is = s2""" The ChronoUnitReader should read a ChronoUnit $readChronoUnit read a lower case C...
mdedetrich/ficus
src/test/scala/net/ceedubs/ficus/readers/ChronoUnitReaderSpec.scala
Scala
mit
1,217
(A => A) => F[A]
hmemcpy/milewski-ctfp-pdf
src/content/1.10/code/scala/snippet27.scala
Scala
gpl-3.0
16
package 练习30 case class Item(name: String) { override def toString: String = name } trait Result case class ResultP(tail: Result, head: Item) extends Result { println("result: " + head) override def toString: String = s"($tail, $head)" } case object ResultO extends Result { println("result: " + this) overri...
djx314/ubw
a28-练习/src/main/scala/练习30/加法.scala
Scala
bsd-3-clause
1,115
package chat.tox.antox.utils import java.lang.Iterable import android.content.ContentValues import chat.tox.antox.data.ClosedCursor import com.squareup.sqlbrite.BriteDatabase import rx.lang.scala.JavaConversions._ import rx.lang.scala.Observable //wrapper to make sqlbrite expose scala observables class BriteScalaDat...
wiiam/Antox
app/src/main/scala/chat/tox/antox/utils/BriteScalaDatabase.scala
Scala
gpl-3.0
1,843
package debop4s.core.collections import scala.reflect.ClassTag /** * [[BoundedStack]] 의 companion object */ object BoundedStack { def apply[A: ClassTag](maxSize: Option[Int] = None): BoundedStack[A] = new BoundedStack[A](maxSize.getOrElse(16)) } /** * 제한된 크기를 가지는 `stack` 입니다. 제한된 크기보다 더 많은 요소를 추가 시, 가장 아래에 있...
debop/debop4s
debop4s-core/src/main/scala/debop4s/core/collections/BoundedStack.scala
Scala
apache-2.0
2,273
package io.youi.server.dsl import io.youi.http.HttpConnection import scribe.Execution.global import scala.concurrent.Future case class ListConnectionFilter(filters: List[ConnectionFilter]) extends ConnectionFilter { override def filter(connection: HttpConnection): Future[FilterResponse] = firstPath(connection, fil...
outr/youi
server/src/main/scala/io/youi/server/dsl/ListConnectionFilter.scala
Scala
mit
769
package com.ubeeko.htalk.tests import org.scalatest._ import com.ubeeko.htalk.criteria._ import org.apache.hadoop.hbase.filter.FilterList import com.ubeeko.htalk.hbase.HTalkContext import com.ubeeko.htalk.hbase.TestHBaseManager class ScanSpec extends FlatSpec with Matchers { val userTable: Table = "user"...
eric-leblouch/htalk
src/test/scala/com/ubeeko/htalk/tests/ScanSpec.scala
Scala
apache-2.0
2,731
package fi.onesto.sbt.mobilizer import sbt.File object SbtCompat { val isArchive = sbt.classpath.ClasspathUtilities.isArchive(_: File) }
onesto/sbt-mobilizer
src/main/scala-sbt-0.13/fi/onesto/sbt/mobilizer/SbtCompat.scala
Scala
mit
142
/* * 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 ...
Dax1n/spark-core
core/src/main/scala/org/apache/spark/deploy/ExecutorState.scala
Scala
apache-2.0
1,365
package Scala.localSim trait Client { }
JulienBe/CodinGame
src/Scala/localSim/Client.scala
Scala
gpl-2.0
43
package enumeratum import scala.collection.immutable._ import scala.language.experimental.macros /** All the cool kids have their own Enumeration implementation, most of which try to do so in the * name of implementing exhaustive pattern matching. * * This is yet another one. * * Example: * * {{{ * sc...
lloydmeta/enumeratum
enumeratum-core/src/main/scala/enumeratum/Enum.scala
Scala
mit
7,555
package controllers import model.json.LoginJson import model.{Computer, Role, User} import org.mockito.Matchers._ import org.mockito.Mockito._ import play.api.Environment import play.api.i18n.MessagesApi import services.state.ActionState import services.{UserService, state} import test.ControllerTest import scala.con...
ProjectAton/AtonLab
test/controllers/LoginControllerSpec.scala
Scala
gpl-3.0
2,120
package scoverage import sbt.Keys._ import sbt._ import scoverage.ScoverageKeys._ import scoverage.report.{CoverageAggregator, CoberturaXmlWriter, ScoverageHtmlWriter, ScoverageXmlWriter} object ScoverageSbtPlugin extends AutoPlugin { val OrgScoverage = "org.scoverage" val ScalacRuntimeArtifact = "scalac-scovera...
jasonchaffee/sbt-scoverage
src/main/scala/scoverage/ScoverageSbtPlugin.scala
Scala
apache-2.0
9,905
package test import org.scalatest._ import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import keemun.models.{GithubUser, AccountSettings} /** * Copyright (c) Nikita Kovaliov, maizy.ru, 2014 * See LICENSE.txt for details. */ @RunWith(classOf[JUnitRunner]) class AccountSettingsSuite extends Fun...
maizy/keemun
test/models/AccountSettingsSuite.scala
Scala
mit
827
package chana import akka.actor.Actor import chana.timeseries.TFreq import chana.timeseries.TSer import chana.timeseries.descriptor.Content import chana.reactor.Publisher /** * * @author Caoyuan Deng */ trait Thing extends Actor with Publisher { def identifier: String def name: String def description: Str...
matthewtt/chana
src/main/scala/chana/Thing.scala
Scala
apache-2.0
801
package cc.mewa.api import play.api.mvc.WebSocket.FrameFormatter import play.api.libs.json.{__, Format, Writes, Reads, Json, JsError} import play.api.libs.json._ import cc.mewa.api.Protocol._ object ProtocolJson { /** * Formats WebSocket frames to be MewaMessages */ implicit def jsonFrameFormatter: Fram...
AnthillTech/mewa
app/cc/mewa/api/ProtocolJson.scala
Scala
bsd-2-clause
5,991
/* * Copyright 2013 - 2015, Daniel Krzywicki <[email protected]> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights ...
ros3n/IntOb
core/src/main/scala/pl/edu/agh/scalamas/app/ConcurrentStack.scala
Scala
mit
2,207
/* * * ____ __ ____________ ______ * / __/______ _/ /__ /_ __/ _/ //_/_ / * _\\ \\/ __/ _ `/ / _ `// / _/ // ,< / /_ * /___/\\__/\\_,_/_/\\_,_//_/ /___/_/|_| /___/ * * A PGF/TIKZ plot library for Scala. * */ package scalatikz.pgf.charts import scalatikz.pgf.charts.enums.TextLocation imp...
vagmcs/ScalaTIKZ
src/main/scala/scalatikz/pgf/charts/ChartConf.scala
Scala
lgpl-3.0
1,536
package com.twitter.parrot.launcher import com.twitter.parrot.config.ParrotLauncherConfig import org.junit.runner.RunWith import org.scalatest.OneInstancePerTest import org.scalatest.WordSpec import org.scalatest.junit.JUnitRunner import org.scalatest.matchers.MustMatchers @RunWith(classOf[JUnitRunner]) class Parrot...
twitter/iago
src/test/scala/com/twitter/parrot/launcher/ParrotLauncherSpec.scala
Scala
apache-2.0
1,254
package com.sksamuel.elastic4s.searches.suggestion import com.sksamuel.exts.OptionImplicits._ import org.elasticsearch.common.unit.Fuzziness import org.elasticsearch.search.suggest.SuggestBuilders import org.elasticsearch.search.suggest.completion.{CompletionSuggestionBuilder, FuzzyOptions, RegexOptions} case class C...
FabienPennequin/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/searches/suggestion/CompletionSuggestionDefinition.scala
Scala
apache-2.0
3,913
package akka.rtcweb.protocol.dtls.record import akka.rtcweb.protocol.dtls.ProtocolVersion import scodec._ import scodec.bits._ import scodec.codecs._ /** * * Implementations MUST NOT send zero-length fragments of Handshake, * Alert, or ChangeCipherSpec content types. Zero-length fragments of * Application dat...
danielwegener/akka-rtcweb
src/main/scala/akka/rtcweb/protocol/dtls/record/DtlsRecord.scala
Scala
apache-2.0
3,332
package com.twitter.scalding.estimation.memory import cascading.flow.{Flow, FlowStep, FlowStepStrategy} import com.twitter.algebird.Monoid import com.twitter.scalding.estimation.{Estimator, FallbackEstimatorMonoid, FlowStrategyInfo} import com.twitter.scalding.{Config, StringUtility} import java.util.{List => JList} i...
twitter/scalding
scalding-core/src/main/scala/com/twitter/scalding/estimation/memory/MemoryEstimatorStepStrategy.scala
Scala
apache-2.0
3,697
/* * 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-mllib/mllib-dal/src/test/scala/org/apache/spark/ml/clustering/IntelKMeansSuite.scala
Scala
apache-2.0
19,125
package nest.sparkle.store import scala.concurrent.{Future, ExecutionContext} import scala.reflect.runtime.universe._ import rx.lang.scala.Observable import nest.sparkle.core.OngoingData import nest.sparkle.measure.{Span, DummySpan} case class OngoingEvents[T, U](initial: Observable[Event[T, U]], ongoing: Observable...
mighdoll/sparkle
store/src/main/scala/nest/sparkle/store/Column.scala
Scala
apache-2.0
2,489
package com.lambtors.poker_api.module.shared.infrastructure.provider import java.util.UUID import scala.concurrent.Future import com.lambtors.poker_api.module.shared.domain.UUIDProvider class RandomUUIDProvider extends UUIDProvider[Future] { override def provide(): Future[UUID] = Future.successful(UUID.randomUUID...
lambtors/poker-api
src/main/scala/com/lambtors/poker_api/module/shared/infrastructure/provider/RandomUUIDProvider.scala
Scala
mit
326
package slick.basic import slick.util.AsyncExecutor.{Priority, Continuation, Fresh, WithConnection} import java.io.Closeable import java.util.concurrent.atomic.{AtomicReferenceArray, AtomicLong} import com.typesafe.config.Config import scala.concurrent.{Promise, ExecutionContext, Future} import scala.util.{Success...
Radsaggi/slick
slick/src/main/scala/slick/basic/BasicBackend.scala
Scala
bsd-2-clause
24,573
package dotty.tools.dotc package transform import TreeTransforms._ import core.Denotations._ import core.SymDenotations._ import core.Contexts._ import core.Symbols._ import core.Types._ import core.Constants._ import core.StdNames._ import core.TypeErasure.isUnboundedGeneric import typer.ErrorReporting._ import ast.T...
AlexSikia/dotty
src/dotty/tools/dotc/transform/TypeTestsCasts.scala
Scala
bsd-3-clause
4,092
/*********************************************************************** * Copyright (c) 2017-2018 IBM * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which ac...
boundlessgeo/geomesa
geomesa-cassandra/geomesa-cassandra-datastore/src/main/scala/org/locationtech/geomesa/cassandra/index/CassandraZ3Layout.scala
Scala
apache-2.0
2,910
class test { case class C(a: Int) { def a(i: Int): Int = 1 } def f(c: C) = /*start*/c.a/*end*/ //missing arguments for method a(Int) } //Int
ilinum/intellij-scala
testdata/typeInference/bugs5/SCL5023.scala
Scala
apache-2.0
152
package pureconfig.module import scala.util.Try import akka.http.scaladsl.model.Uri.ParsingMode import akka.http.scaladsl.model.{IllegalUriException, Uri} import pureconfig.error.{CannotConvert, ExceptionThrown} import pureconfig.{ConfigReader, ConfigWriter} package object akkahttp { implicit val uriReader: Conf...
melrief/pureconfig
modules/akka-http/src/main/scala/pureconfig/module/akkahttp/package.scala
Scala
mpl-2.0
678
import sbt._ import Keys._ object RayBuild extends Build { val playPath = Option(System.getProperty("play.path")).getOrElse("../play") val playVersion = Option(System.getProperty("play.version")).getOrElse("2.0") val playRepository = Resolver.file("Local Play Repository", file(new File(playPath, "reposito...
puffnfresh/ray
project/Build.scala
Scala
mit
574
package ohnosequences.compota.cli import java.io.File import com.amazonaws.auth._ import ohnosequences.awstools.ec2.EC2 import com.amazonaws.AmazonClientException import ohnosequences.logging.ConsoleLogger object CredentialsUtils { val logger = new ConsoleLogger("credentials utils") def serializeProvider(provi...
ohnosequences/compotaCLI
src/main/scala/ohnosequences/compota/cli/CredentialsUtils.scala
Scala
agpl-3.0
2,893