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 se.lu.nateko.cp.data.formats import scala.util.matching.Regex class ColumnsMeta(val columns: Seq[ColumnMeta]) { val plainCols: Map[String, ValueFormat] = columns .collect { case PlainColumn(format, title, _) => title -> format } .toMap private val regexCols = columns.collect { case rc: RegexColumn => r...
ICOS-Carbon-Portal/data
src/main/scala/se/lu/nateko/cp/data/formats/ColumnsMeta.scala
Scala
gpl-3.0
1,472
/* * 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 ...
minixalpha/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2ScanExec.scala
Scala
apache-2.0
3,431
package com.seanshubin.builder.domain import scala.concurrent.{ExecutionContext, Future} class ExecutionContextFutureRunner(notifyOfException: Throwable => Unit) (implicit executionContext: ExecutionContext) extends FutureRunner { override def runInFuture[T](block: => T): Future[T]...
SeanShubin/builder
domain/src/main/scala/com/seanshubin/builder/domain/ExecutionContextFutureRunner.scala
Scala
unlicense
481
/* * Copyright 2012-2013 Stephane Godbillon (@sgodbillon) and Zenexity * * 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...
reactific/ReactiveMongo
driver/src/main/scala/utils.scala
Scala
apache-2.0
3,116
/* Copyright 2015 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
tglstory/scalding
scalding-serialization/src/test/scala/com/twitter/scalding/serialization/SerializationProperties.scala
Scala
apache-2.0
6,775
/* * This file is part of the Linux Variability Modeling Tools (LVAT). * * Copyright (C) 2010 Steven She <shshe@gsd.uwaterloo.ca> * * LVAT is free software: you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the * Free Software Foundation, either v...
leutheus/linux-variability-analysis-tools
src/main/scala/gsd/linux/Hierarchy.scala
Scala
lgpl-3.0
2,890
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
slamdata/slamengine
qsu/src/main/scala/quasar/qsu/Graduate.scala
Scala
apache-2.0
10,961
package sjs.react.bootstrap import japgolly.scalajs.react._ /** * Created by alberto on 18/02/15. */ trait BoostrapMixinProps { def bsClass: String def bsStyle: String def bsSize: String def getBsClassSet: Map[String, Boolean] ={ var classes= Map.empty[String, Boolean] if(bsClass.nonEmpty ){ ...
aparo/scalajs-react-extra
react-bootstrap/src/main/scala/sjs/react/bootstrap/BoostrapMixin.scala
Scala
apache-2.0
1,540
// Lastly, Scala provides a convenience for applying a Function trait Function1[T, R] { def apply(x: T): R } val f: Int => Boolean = _ > 2 f.apply(3) // true f(3) // true
agconti/scala-school
04-functions-as-values/slides/slide064.scala
Scala
mit
180
package com.twitter.finagle.http.codec import com.twitter.finagle.Service import com.twitter.finagle.http._ import com.twitter.finagle.http.exp.{GenSerialServerDispatcher, StreamTransport} import com.twitter.finagle.stats.{StatsReceiver, RollupStatsReceiver} import com.twitter.logging.Logger import com.twitter.util.{F...
koshelev/finagle
finagle-http/src/main/scala/com/twitter/finagle/http/codec/HttpServerDispatcher.scala
Scala
apache-2.0
3,137
/** * 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...
SumoLogic/sumobot
src/main/scala/com/sumologic/sumobot/plugins/PluginCollection.scala
Scala
apache-2.0
1,687
/* * 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 ...
ueshin/apache-flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/sources/tsextractors/StreamRecordTimestamp.scala
Scala
apache-2.0
2,107
package org.jetbrains.plugins.scala package lang package parameterInfo package functionParameterInfo import _root_.scala.collection.mutable.ArrayBuffer import _root_.scala.util.Sorting import com.intellij.codeInsight.hint.{HintUtil, ShowParameterInfoContext} import com.intellij.lang.parameterInfo.ParameterInfoUIContex...
consulo/consulo-scala
test/org/jetbrains/plugins/scala/lang/parameterInfo/functionParameterInfo/FunctionParameterInfoTestBase.scala
Scala
apache-2.0
3,880
package com.seanshubin.http.values.domain object RegexUtil { def optional(pattern: String): String = { nonCapture(pattern) + "?" } def capture(pattern: String): String = { s"($pattern)" } def nonCapture(pattern: String): String = { s"(?:$pattern)" } }
SeanShubin/http-values
domain/src/main/scala/com/seanshubin/http/values/domain/RegexUtil.scala
Scala
unlicense
279
package com.dbaneman.leveldb.internal import java.util.UUID import org.iq80.leveldb.{DBIterator, WriteBatch} /** * Created by dan on 9/23/14. */ object ServerState { var writeBatches: Map[UUID, WriteBatch] = Map() var iterators: Map[UUID, DBIterator] = Map() }
dbaneman/leveldb-server4j
src/main/scala/com/dbaneman/leveldb/internal/ServerState.scala
Scala
apache-2.0
270
package net.fwbrasil.activate.statement import net.fwbrasil.activate.util.ManifestUtil._ import net.fwbrasil.activate.util.Reflection._ import net.fwbrasil.activate.util.Reflection.materializeJodaInstant import net.fwbrasil.activate.util.Reflection.set import net.fwbrasil.activate.util.Reflection.get import net.fwbras...
avramirez/activate
activate-core/src/main/scala/net/fwbrasil/activate/statement/StatementMocks.scala
Scala
lgpl-2.1
4,758
/* * 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 ...
DieBauer/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/OverAggregate.scala
Scala
apache-2.0
4,023
/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2010 Travis Brown, The University of Texas at Austin // // 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 ...
tectronics/textgrounder
src/main/scala/opennlp/textgrounder/app/ReprocessTrApp.scala
Scala
apache-2.0
1,755
/* * 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...
jstanier/zipkin
zipkin-redis/src/test/scala/com/twitter/zipkin/storage/redis/RedisIndexSpec.scala
Scala
apache-2.0
3,796
package me.lignum.lambdacraft.computer class Memory(private val size: Int, private val cd: ComplaintDesk) { private val memoryBlock: Array[Byte] = new Array[Byte](size) def getSize = size def isValidAddress(address: Short): Boolean = address < size && address >= 0 def get(address: Short): Byte = if (isV...
Lignumm/LambdaCraft
src/main/scala/me/lignum/lambdacraft/computer/Memory.scala
Scala
mit
638
package org.scalameter package reporting import java.awt.{BasicStroke, Color} import java.io._ import java.text.DateFormat.{MEDIUM, getDateTimeInstance} import java.util.Date import org.jfree.chart.labels.{ItemLabelAnchor, ItemLabelPosition, StandardCategoryItemLabelGenerator} import org.jfree.chart.renderer.categor...
kjanosz/scalameter
src/main/scala/org/scalameter/reporting/ChartReporter.scala
Scala
bsd-3-clause
17,766
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // Licence: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.fixture import org.ensime.api._ import org.ensime.indexer.{ EnsimeVFS, SourceResolver } trait SourceResolverFixture { def withSourceResolver(testCode: SourceResolver =>...
j-mckitrick/ensime-sbt
src/sbt-test/ensime-sbt/ensime-server/core/src/it/scala/org/ensime/fixture/SourceResolverFixture.scala
Scala
apache-2.0
1,538
package org.gensokyo.elasticsearchclient import org.json4s._ import org.json4s.jackson.JsonMethods._ import org.scalatest._ /** * Created by liusen on 15-12-29. */ class ClientSpec extends FlatSpec with Matchers with OptionValues with Inside with Inspectors { def createIndex(index: String): Unit = { ElasticS...
srzyhead/ElasticSearchScalaClient
src/test/java/org/gensokyo/elasticsearchclient/ClientSpec.scala
Scala
mit
17,503
package org.bowlerframework.examples.squeryl import org.squeryl.Schema /** * Created by IntelliJ IDEA. * User: wfaler * Date: 20/02/2011 * Time: 19:56 * To change this template use File | Settings | File Templates. */ object ApplicationSchema extends Schema{ val people = table[Person]("people") }
rkpandey/Bowler
examples/src/main/scala/org/bowlerframework/examples/squeryl/ApplicationSchema.scala
Scala
bsd-3-clause
308
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
liquidarmour/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v2/B122.scala
Scala
apache-2.0
1,262
package at.logic.gapt.examples.tip.prod import at.logic.gapt.expr._ import at.logic.gapt.formats.ClasspathInputFile import at.logic.gapt.formats.tip.TipSmtParser import at.logic.gapt.proofs.gaptic.{ Lemma, TacticsProof, _ } import at.logic.gapt.proofs.{ Ant, Sequent } object prop_32 extends TacticsProof { val benc...
gebner/gapt
examples/tip/prod/prop_32.scala
Scala
gpl-3.0
2,143
package scavlink.task.service import java.security.SecureRandom import org.parboiled.common.Base64 import spray.caching.LruCache import spray.routing.authentication.{BasicUserContext, UserPass} import scala.concurrent.duration._ import scala.concurrent.{ExecutionContext, Future} case class Token(token: String) { ...
nickolasrossi/scavlink
src/main/scala/scavlink/task/service/TokenStore.scala
Scala
mit
2,004
package dit4c.scheduler.service import org.specs2.concurrent.ExecutionEnv import org.specs2.mutable.Specification import org.specs2.ScalaCheck import dit4c.scheduler.ScalaCheckHelpers import akka.http.scaladsl.Http import akka.actor._ import akka.testkit.TestProbe import akka.stream.scaladsl._ import akka.http.scalads...
dit4c/dit4c
dit4c-scheduler/src/test/scala/dit4c/scheduler/service/PortalMessageBridgeSpec.scala
Scala
mit
11,259
package at.forsyte.apalache.tla.types import at.forsyte.apalache.tla.lir.TestingPredefs import org.junit.runner.RunWith import org.scalatest.{BeforeAndAfter, FunSuite} import org.scalatest.junit.JUnitRunner @RunWith( classOf[JUnitRunner] ) class TestTypeReduction extends FunSuite with TestingPredefs with BeforeAndAft...
konnov/dach
tla-types/src/test/scala/at/forsyte/apalache/tla/types/TestTypeReduction.scala
Scala
apache-2.0
1,039
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 Foundatio...
HuangLS/neo4j
manual/cypher/refcard-tests/src/test/scala/org/neo4j/cypher/docgen/refcard/CollectionsTest.scala
Scala
apache-2.0
3,972
/* * 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 ...
zuotingbing/spark
mllib/src/test/scala/org/apache/spark/ml/regression/LinearRegressionSuite.scala
Scala
apache-2.0
53,542
/** MACHINE-GENERATED FROM AVRO SCHEMA. DO NOT EDIT DIRECTLY */ package example.idl.model import org.apache.avro.Schema import org.oedura.scavro.{AvroMetadata, AvroReader, AvroSerializeable} import example.idl.{Card => JCard, Suit => JSuit} sealed trait EnumProtocol extends AvroSerializeable with Product with Seria...
julianpeeters/avrohugger
avrohugger-core/src/test/expected/specific/example/idl/EnumProtocol.scala
Scala
apache-2.0
1,406
package blog2 import skinny.orm._ import scalikejdbc._ import org.joda.time._ case class PostTag( id: Long, tagId: Int, postId: Int, createdAt: DateTime ) object PostTag extends SkinnyJoinTable[PostTag] { override val connectionPoolName = Symbol("blog2") override val tableName = "posts_t...
skinny-framework/skinny-framework
orm/src/test/scala/blog2/PostTag.scala
Scala
mit
603
import _root_.io.gatling.core.scenario.Simulation import ch.qos.logback.classic.{Level, LoggerContext} import io.gatling.core.Predef._ import io.gatling.http.Predef._ import org.slf4j.LoggerFactory import scala.concurrent.duration._ /** * Performance test for the Adres entity. */ class AdresGatlingTest extends Simu...
timaar/Tiimspot
src/test/gatling/simulations/AdresGatlingTest.scala
Scala
apache-2.0
3,397
package org.clulab.learning import java.util.zip.GZIPInputStream import java.io.{BufferedInputStream, FileInputStream, FileOutputStream, FileWriter, ObjectInputStream, ObjectOutputStream, PrintWriter} import org.slf4j.LoggerFactory import scala.collection.mutable.{ArrayBuffer, ListBuffer} import scala.io.{BufferedSo...
sistanlp/processors
main/src/main/scala/org/clulab/learning/RankingDataset.scala
Scala
apache-2.0
19,196
import scala.collection.JavaConverters._ import org.infinispan.manager.DefaultCacheManager import org.infinispan.distexec.mapreduce.{Collator, Collector, Mapper, MapReduceTask, Reducer} object MapReduceExample { def main(args: Array[String]): Unit = { val manager = new DefaultCacheManager("infinispan.xml") ...
kazuhira-r/infinispan-examples
infinispan-mapreduce/src/main/scala/MapReduceExample.scala
Scala
mit
2,566
package scratchpad.wordcountmonoid import scratchpad.monoid.Monoid object Main{ def main(args: Array[String]): Unit = { println(WordCountMonoid.countWords("this is a kitty cat inside the computer")) } } object WordCountMonoid { sealed trait WC case class Stub(chars: String) extends WC case class Part(l...
waxmittmann/fpinscala
answers/src/main/scala/scratchpad/done/WordCountMonoid.scala
Scala
mit
1,494
package models.conservation.events import models.conservation.events.ConservationExtras.{ DescriptionAttributeValue, ExtraAttributes } import play.api.libs.json.{JsObject, Json, Reads, Writes} object ConservationExtras { /** * ExtraAttributes are used to provide additional fields to a specific * {{{Conse...
MUSIT-Norway/musit
service_backend/app/models/conservation/events/ConservationExtras.scala
Scala
gpl-2.0
1,109
package com.eharmony.aloha.semantics.compiled.plugin import com.eharmony.aloha.reflect.RefInfo import com.eharmony.aloha.semantics.compiled.CompiledSemanticsPlugin /** * Provides a way to adapt a [[CompiledSemanticsPlugin]] to a new one with a * different type parameter. * @author deaktator */ trait Morphable...
eHarmony/aloha
aloha-core/src/main/scala/com/eharmony/aloha/semantics/compiled/plugin/MorphableCompiledSemanticsPlugin.scala
Scala
mit
955
package org.infinispan.spark.test import org.infinispan.client.hotrod.RemoteCache import org.infinispan.spark.domain.Runner import org.scalatest.{BeforeAndAfterAll, Suite} import scala.util.Random /** * Trait to be mixed-in by tests requiring a cache populated with [[org.infinispan.spark.domain.Runner]] objects. *...
rnowling/infinispan-spark
src/test/scala/org/infinispan/spark/test/RunnersCache.scala
Scala
apache-2.0
1,274
package ru.wordmetrix.dreamcrammer import scala.annotation.tailrec import scala.util.Random import java.io._ import android.content.Intent import android.media.{MediaPlayer, AudioManager} import android.app.{IntentService, Service} import android.widget.Toast import android.os.{Binder, IBinder, AsyncTask, Handler, Ha...
electricmind/dreamcrammer
src/main/ru/wordmetrix/dreamcrammer/taskservice.scala
Scala
apache-2.0
10,956
package controllers.billing import scalaz._ import Scalaz._ import scalaz.NonEmptyList._ import scalaz.Validation._ import io.megam.auth.funnel._ import io.megam.auth.funnel.FunnelErrors._ import models.billing._ import play.api.mvc._ import controllers.stack.Results import net.liftweb.json._ import net.liftweb.json....
indykish/vertice_gateway
app/controllers/billing/Billedhistories.scala
Scala
mit
2,838
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...
Yhgenomics/marathon
src/test/scala/mesosphere/marathon/core/launchqueue/impl/LaunchQueueModuleTest.scala
Scala
apache-2.0
9,358
package sectery.producers import java.awt.Font import java.awt.Graphics2D import java.awt.RenderingHints import java.awt.image.BufferedImage import java.io.IOException import sectery.Db import sectery.Http import sectery.Producer import sectery.Response import sectery.Rx import sectery.Tx import zio.Clock import zio.Z...
earldouglas/sectery
modules/producers/src/main/scala/sectery/producers/Ascii.scala
Scala
mit
1,419
package org.example object Foo extends App { class Bar { val x = 1 } class Foo extends Bar { def testMethod(i: Int, s: String) = { i + s.length } } val map = Map[String, Int]() val foo = new Foo() println("Hello, " + foo.x) println(foo.testMethod(7, "seven")) } // for SearchService...
eddsteel/ensime
testing/simple/src/main/scala/org/example/Foo.scala
Scala
gpl-3.0
400
package uScheduler.security import java.security.{KeyFactory, PublicKey, Signature} import java.security.spec.X509EncodedKeySpec import java.net.{NetworkInterface, InetAddress} import sun.misc.{BASE64Encoder, BASE64Decoder} object LicenseServiceProvider { /** * getRequestCode. * Gibt die MAC-Adresse des Co...
LarsHadidi/uScheduler
src/main/scala/uScheduler/security/LicenseServiceProvider.scala
Scala
apache-2.0
1,795
package io.estatico.effect.laws.imports trait LawTypes { type IsEq[A] = cats.laws.IsEq[A] val IsEq = cats.laws.IsEq type Eq[A] = cats.Eq[A] val Eq = cats.Eq }
estatico/scala-effect
laws/src/main/scala/io/estatico/effect/laws/imports/LawTypes.scala
Scala
apache-2.0
170
import sbt._ import Keys._ import org.scalatra.sbt._ import com.typesafe.sbteclipse.plugin.EclipsePlugin.EclipseKeys import play.twirl.sbt.SbtTwirl import play.twirl.sbt.Import.TwirlKeys._ import sbtassembly._ import sbtassembly.AssemblyKeys._ object MyBuild extends Build { val Organization = "gitbucket" val Name ...
intermezzo-fr/gitbucket
project/build.scala
Scala
apache-2.0
3,312
/** * 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...
hochgi/CM-Well
server/cmwell-data-tools/src/main/scala/cmwell/tools/data/utils/akka/stats/IngesterStats.scala
Scala
apache-2.0
6,366
/* sbt -- Simple Build Tool * Copyright 2011 Mark Harrah */ package sbt import java.io.File import java.net.URI import Def.{ displayFull, ScopedKey, ScopeLocal, Setting } import Attributed.data import BuildPaths.outputDirectory import Scope.GlobalScope import BuildStreams.Streams import Path._ final class BuildStru...
niktrop/sbt
main/src/main/scala/sbt/BuildStructure.scala
Scala
bsd-3-clause
12,633
package org.apress.prospark import org.apache.spark.SparkConf import org.apache.spark.SparkContext import org.apache.spark.mllib.linalg.Vectors import org.apache.spark.mllib.regression.LabeledPoint import org.apache.spark.mllib.stat.Statistics import org.apache.spark.streaming.Seconds import org.apache.spark.streaming...
ZubairNabi/prosparkstreaming
Chap9/src/main/scala/org/apress/prospark/L9-4Correlation.scala
Scala
apache-2.0
1,614
/* * 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...
122689305/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/Sigmoid.scala
Scala
apache-2.0
1,804
// // Copyright 2016 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 ...
CommBank/coppersmith
core/src/test/scala/commbank/coppersmith/GeneralFeatureSpec.scala
Scala
apache-2.0
4,799
/* * Copyright (C) 2009-2011 Mathias Doenitz * Inspired by a similar implementation by Nathan Hamblen * (https://github.com/n8han/Databinder-Dispatch) * * 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 ...
zhaoyao/sbencoding
src/main/scala/sbencoding/BcValue.scala
Scala
mit
2,896
package org.bitcoins.core.serializers.transaction import org.bitcoins.core.protocol.script.ScriptWitness import org.bitcoins.core.protocol.transaction.TransactionWitness import org.bitcoins.core.serializers.script.RawScriptWitnessParser import scodec.bits.ByteVector import scala.annotation.tailrec /** * Created by...
bitcoin-s/bitcoin-s-core
core/src/main/scala/org/bitcoins/core/serializers/transaction/RawTransactionWitnessParser.scala
Scala
mit
1,755
package demo.components.elementalui import chandu0101.macros.tojs.GhPagesMacros import chandu0101.scalajs.react.components.elementalui._ import demo.components.CodeExample import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.prefix_<^._ import scala.scalajs.js.`|` object EuiMiscDemo { val code = GhPa...
elacin/scalajs-react-components
demo/src/main/scala/demo/components/elementalui/EuiMiscDemo.scala
Scala
apache-2.0
6,153
package org.kneelawk.simplecursemodpackdownloader.task import scala.collection.mutable.HashSet import scala.collection.mutable.Set import java.util.concurrent.locks.ReentrantLock import org.kneelawk.simplecursemodpackdownloader.util.LockUtil._ class TaskManifest { private val tasks = new HashSet[Task] private val...
Kneelawk/SimpleCurseModpackDownloader
src/main/scala/org/kneelawk/simplecursemodpackdownloader/task/TaskManifest.scala
Scala
mit
1,375
package com.rxbytes.splitpal.ui.main.fragments.contacts import android.database.Cursor import com.rxbytes.splitpal.utils.commons.CommonUtils._ import contacts.PhoneContactColumns import macroid.ContextWrapper import scala.concurrent.Future import scala.util.Try import scala.concurrent.ExecutionContext.Implicits.glob...
pamu/split-pal
src/main/scala/com/rxbytes/splitpal/ui/main/fragments/contacts/ContactsFetcher.scala
Scala
apache-2.0
4,065
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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 b...
hpe-cct/cct-core
src/main/scala/cogx/package.scala
Scala
apache-2.0
12,322
package cn.gridx.scala.database.redis.basic import java.util.Date import com.redis._ import scala.collection.immutable.IndexedSeq import scala.concurrent.{Await, Future} import scala.concurrent.duration._ import scala.concurrent.ExecutionContext.Implicits.global /** * Created by tao on 7/14/16. */ object Test {...
TaoXiao/Scala
database/src/main/scala/cn/gridx/scala/database/redis/basic/Test.scala
Scala
apache-2.0
1,007
/* * 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
yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtil.scala
Scala
apache-2.0
16,823
package io.buoyant.k8s import com.fasterxml.jackson.annotation.{JsonProperty, JsonSubTypes, JsonTypeInfo} import com.fasterxml.jackson.core.`type`.TypeReference import com.twitter.finagle.Service import com.twitter.finagle.http.{Request, Response} import com.twitter.io.Buf import com.twitter.util.Future import io.buoy...
linkerd/linkerd
k8s/src/test/scala/io/buoyant/k8s/CustomResourceTest.scala
Scala
apache-2.0
3,991
package com.mnubo.dbevolv.plugin import com.typesafe.config.ConfigFactory import sbt.Attributed._ import sbt.Keys._ import sbt._ import sbtassembly.AssemblyPlugin import sbtassembly.AssemblyPlugin.autoImport._ import sbtdocker.DockerKeys._ import sbtdocker.Instructions._ import sbtdocker.immutable.Dockerfile import sb...
mnubo/dbevolv
plugin/src/main/scala/com/mnubo/dbevolv/plugin/DbevolvPlugin.scala
Scala
apache-2.0
6,233
/* * Copyright 2014 Ralf Steuerwald * * 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...
rsteuerw/ifmaps
src/test/scala/ifmaps/ResultItemExtractorTest.scala
Scala
apache-2.0
3,276
package com.twitter.finagle.service import com.twitter.conversions.time._ import com.twitter.finagle.{ChannelClosedException, Failure, TimeoutException, WriteException} import com.twitter.util.{ TimeoutException => UtilTimeoutException, Duration, JavaSingleton, Return, Throw, Try} import java.util.{concurrent => juc...
sveinnfannar/finagle
finagle-core/src/main/scala/com/twitter/finagle/service/RetryPolicy.scala
Scala
apache-2.0
12,850
/* * 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 ...
pgandhi999/spark
sql/core/src/test/scala/org/apache/spark/sql/streaming/continuous/ContinuousQueuedDataReaderSuite.scala
Scala
apache-2.0
5,589
/* ************************************************************************************* * Copyright 2014 Normation SAS ************************************************************************************* * * This file is part of Rudder. * * Rudder is free software: you can redistribute it and/or modify * it under the...
armeniaca/rudder
rudder-web/src/main/scala/com/normation/rudder/web/components/RuleCompliance.scala
Scala
gpl-3.0
13,202
package org.elasticmq.persistence import org.joda.time.DateTime import org.scalatest.OptionValues import org.scalatest.funsuite.AnyFunSuite import org.scalatest.matchers.should.Matchers class CreateQueueMetadataTest extends AnyFunSuite with Matchers with OptionValues { test("CreateQueueMetadata and CreateQueue stru...
adamw/elasticmq
persistence/persistence-core/src/test/scala/org/elasticmq/persistence/CreateQueueMetadataTest.scala
Scala
apache-2.0
912
/* * Copyright 2017 Datamountaineer. * * 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...
CodeSmell/stream-reactor
kafka-connect-mqtt/src/main/scala/com/datamountaineer/streamreactor/connect/mqtt/source/MqttSourceConnector.scala
Scala
apache-2.0
2,883
package sims.test.gui import processing.core.PApplet import processing.core.PConstants._ import sims.dynamics._ class RichShape(shape: Shape) { private implicit def double2Float(x: Double): Float = x.toFloat def toGraphical(implicit parent: PApplet) = new GraphicalShape(shape) { val top = parent val ren...
jodersky/sims2
src/test/scala/sims/test/gui/RichShape.scala
Scala
bsd-3-clause
1,118
package org.jetbrains.plugins.scala.lang.psi.api.base import org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil import org.jetbrains.plugins.scala.lang.psi.api.statements.ScAnnotationsHolder import org.jetbrains.plugins.scala.lang.psi.api.statements.params._ import org.jetbrains.plugins.scala.lang.psi.api.toplevel.type...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/api/base/ScPrimaryConstructor.scala
Scala
apache-2.0
5,518
package com.twitter.jvm import org.junit.runner.RunWith import org.scalatest.FunSpec import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class NumProcsTest extends FunSpec { describe("numProcs") { it("should be the number of available processors according to the runtime by default") { a...
mosesn/util
util-jvm/src/test/scala/com/twitter/jvm/NumProcsTest.scala
Scala
apache-2.0
663
package user case class UserIds(id: String, username: String, externalId: String)
Leonti/receipts-rest-service
app/src/main/scala/user/UserIds.scala
Scala
mit
83
package scalpel.port object InterProc { val jsonMarker = "//ZxJ/" } trait InterleavedReader { lazy val marker = InterProc.jsonMarker def log(s:String):Unit def handleJson(s:String):Unit def readLine(s:String) = { if(s.startsWith(marker)) handleJson(s.substring(marker.length)) else log(s) ...
lossyrob/scalpel
src/main/scala/scalpel/port/InterleavedReader.scala
Scala
bsd-3-clause
326
package xitrum.handler.inbound import io.netty.channel.Channel import io.netty.channel.ChannelHandler.Sharable import io.netty.channel.ChannelHandlerContext import io.netty.channel.SimpleChannelInboundHandler import io.netty.handler.codec.haproxy.HAProxyMessage import io.netty.handler.codec.http.HttpRequest import io....
xitrum-framework/xitrum
src/main/scala/xitrum/handler/inbound/ProxyProtocolHandler.scala
Scala
mit
1,429
package util.tasks import org.scalatest._ /** * TimedTaskExecutor test * Created by CAB on 13.10.2014. */ class TimedTaskExecutorTest extends WordSpecLike with Matchers { //TimedTask executor val executor = new TimedTaskExecutor{} //Test "should start" in { executor.start()} "should execute task" in ...
AlexCAB/FreelanceAnalytics
test/util/tasks/TimedTaskExecutorTest.scala
Scala
mit
2,840
package com.example.http4s package war import cats.effect.IO import fs2.Scheduler import javax.servlet.{ServletContextEvent, ServletContextListener} import javax.servlet.annotation.WebListener import org.http4s.servlet.syntax._ @WebListener class Bootstrap extends ServletContextListener { lazy val (scheduler, shut...
reactormonk/http4s
examples/war/src/main/scala/com/example/http4s/war/Bootstrap.scala
Scala
apache-2.0
730
package com.twitter.finagle.zipkin.core import java.net.InetSocketAddress import org.scalatest.funsuite.AnyFunSuite class EndpointTest extends AnyFunSuite { private[this] val unresolved = InetSocketAddress.createUnresolved("nope", 44) test("toIpv4 with null") { assert(0 == Endpoint.toIpv4(unresolved.getAddr...
twitter/finagle
finagle-zipkin-core/src/test/scala/com/twitter/finagle/zipkin/core/EndpointTest.scala
Scala
apache-2.0
539
import scala.language.postfixOps object Test extends dotty.runtime.LegacyApp { // lists println(List(1, 2, 3, 4).slice(1, 2)) println(List(1, 2, 3, 4).slice(2, 1)) println(List(1, 2, 3, 4).slice(-1, 1)) println(List(1, 2, 3, 4).slice(1, -1)) println(List(1, 2, 3, 4).slice(-2, 2)) println println(Lis...
yusuke2255/dotty
tests/run/slices.scala
Scala
bsd-3-clause
1,353
/* * 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...
wzhongyuan/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/nn/ops/AddSpec.scala
Scala
apache-2.0
1,232
package io.github.edadma.numbers case class QuaternionInt(a: Int, b: Int, c: Int, d: Int) extends AbstractQuaternionRational[Int, QuaternionInt] { protected def fractional(a: Int): Double = a.toDouble protected def quaternion(a: Int, b: Int, c: Int, d: Int): QuaternionInt = QuaternionInt(a, b, c, d) protected...
edadma/numbers
shared/src/main/scala/io/github/edadma/numbers/QuaternionInt.scala
Scala
mit
1,133
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.api.mvc import akka.stream._ import akka.stream.scaladsl._ import akka.actor.ActorSystem import akka.util.ByteString import org.specs2.mutable.Specification import play.core.test.FakeHeaders import play.core.test.FakeRequest import scala...
benmccann/playframework
core/play/src/test/scala/play/api/mvc/MultipartBodyParserSpec.scala
Scala
apache-2.0
1,901
package im.actor.server.group import java.time.{ LocalDateTime, ZoneOffset } import akka.actor.Status import akka.pattern.pipe import com.google.protobuf.ByteString import im.actor.api.rpc.Update import im.actor.api.rpc.groups._ import im.actor.api.rpc.messaging.ServiceMessage import im.actor.api.rpc.misc.Extension i...
dut3062796s/actor-platform
actor-server/actor-core/src/main/scala/im/actor/server/group/GroupCommandHandlers.scala
Scala
mit
18,805
object Test extends App { { import LibA._ assert(optTwo == Sm(2)) assert(smTwo == Sm(2)) assert(none == Nn) } { import LibB._ assert(optTwo == Sm(2)) assert(smTwo == Sm(2)) assert(none == Nn) } { import LibC._ import Opt._ assert(optTwo == Sm(2)) assert(smTwo...
dotty-staging/dotty
tests/run-macros/quoted-ToExpr-derivation-macro/Test_3.scala
Scala
apache-2.0
360
package breeze.signal import breeze.generic.UFunc import breeze.numerics.sqrt import breeze.linalg._ /** Root mean square of a vector. * * @author ktakagaki * @author dlwh * @date 2/17/14. */ object rootMeanSquare extends UFunc { implicit def rms1D[Vec]( implicit normImpl: norm.Impl2[Vec, Int, Double], ...
scalanlp/breeze
math/src/main/scala/breeze/signal/rootMeanSquare.scala
Scala
apache-2.0
562
/* * 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 ...
esi-mineset/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/MicroBatchExecution.scala
Scala
apache-2.0
23,137
/** * 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...
TiVo/kafka
core/src/main/scala/kafka/cluster/Partition.scala
Scala
apache-2.0
67,163
package io.buoyant.router.h2 import com.twitter.conversions.time._ import com.twitter.finagle.buoyant.h2.service.{H2Classifier, H2ReqRep, H2ReqRepFrame} import com.twitter.finagle.buoyant.h2._ import com.twitter.finagle.service.{ResponseClass, RetryBudget} import com.twitter.finagle.stats.StatsReceiver import com.twit...
denverwilliams/linkerd
router/h2/src/main/scala/io/buoyant/router/h2/ClassifiedRetryFilter.scala
Scala
apache-2.0
9,585
package scuff import org.junit._, Assert._ import scala.collection.immutable.HashMap class TestMonoid { @Test def sum(): Unit = { implicit val ms = Monoid.Sum[Int] val list: List[Int] = 51 :: 17 :: 99 :: Nil val sum = ms reduce list assertEquals(51 + 17 + 99, sum) } @Test def product(): Unit...
nilskp/scuff
src/test/scala/scuff/TestMonoid.scala
Scala
mit
1,003
package com.outr.arango.api import com.outr.arango.api.model._ import io.youi.client.HttpClient import io.youi.http.HttpMethod import io.youi.net._ import io.circe.Json import scala.concurrent.{ExecutionContext, Future} object APISimpleWithin { def put(client: HttpClient, body: PutAPISimpleWithin)(implicit e...
outr/arangodb-scala
api/src/main/scala/com/outr/arango/api/APISimpleWithin.scala
Scala
mit
491
package com.kifi.slack.models import java.util.UUID import com.kifi.slack.models.SlackUserPresenceState.{ Away, Active } import org.joda.time.DateTime import play.api.libs.functional.syntax._ import play.api.libs.json._ case class SlackAuthScope(value: String) object SlackAuthScope { val Identify = SlackAuthScope("...
kifi/slack-client
src/main/scala/com/kifi/slack/models/SlackAuth.scala
Scala
mit
7,042
package net.fehmicansaglam.bson import akka.util.{ByteString, ByteStringBuilder} import net.fehmicansaglam.bson.element.BinarySubtype import net.fehmicansaglam.bson.util.{Codec, Converters} import org.joda.time.DateTime import org.joda.time.format.ISODateTimeFormat object Implicits { implicit class BsonValueDouble...
fehmicansaglam/tepkin
bson/src/main/scala/net/fehmicansaglam/bson/Implicits.scala
Scala
apache-2.0
7,150
package com.typesafe.slick.testkit.util import java.util.logging.{Level, Logger} import java.sql.{DriverManager, SQLException} import slick.compiler.Phase import slick.dbio._ import slick.memory.MemoryProfile import slick.jdbc._ import slick.jdbc.GetResult._ import slick.jdbc.meta.MTable import org.junit.Assert impor...
nafg/slick
slick-testkit/src/main/scala/com/typesafe/slick/testkit/util/StandardTestDBs.scala
Scala
bsd-2-clause
14,546
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
doron123/scala-js
test-suite/src/test/scala/org/scalajs/testsuite/javalib/StringBufferTest.scala
Scala
bsd-3-clause
11,211
/* * Copyright 2020 Precog Data * * 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 ...
djspiewak/quasar
qsu/src/main/scala/quasar/qsu/minimizers/Minimizer.scala
Scala
apache-2.0
1,942
package se.culvertsoft.mgen.compiler.components import scala.Array.canBuildFrom import scala.collection.JavaConversions.mapAsJavaMap import scala.collection.JavaConversions.seqAsJavaList import scala.collection.mutable.HashMap import scala.xml.XML.loadFile import se.culvertsoft.mgen.api.model.Project import se.culver...
culvertsoft/mgen
mgen-compiler/src/main/scala/se/culvertsoft/mgen/compiler/components/ParseProject.scala
Scala
mit
4,046
package mesosphere.marathon package integration import mesosphere.AkkaIntegrationTest import mesosphere.marathon.integration.setup._ import mesosphere.marathon.raml.App import mesosphere.marathon.state.PathId._ import scala.concurrent.duration._ @SerialIntegrationTest class GracefulTaskKillIntegrationTest extends Ak...
natemurthy/marathon
src/test/scala/mesosphere/marathon/integration/GracefulTaskKillIntegrationTest.scala
Scala
apache-2.0
3,556
/* __ *\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ |/_// /_\ \ http://scala-js.org/ ** ** /____/\___/_/ |_/...
japgolly/scala-js
test-suite/js/src/test/scala/org/scalajs/testsuite/compiler/OptimizerTest.scala
Scala
bsd-3-clause
9,236
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you...
wangyixiaohuihui/spark2-annotation
sql/core/src/test/scala/org/apache/spark/sql/UDFSuite.scala
Scala
apache-2.0
9,815
/* * Copyright 2014–2020 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
slamdata/quasar
qsu/src/test/scala/quasar/qsu/CoalesceUnaryMappableSpec.scala
Scala
apache-2.0
4,155