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 es.weso.computex import org.scalatest._ import org.scalatest.matchers.ShouldMatchers import com.typesafe.config.ConfigFactory import com.typesafe.config.Config import es.weso.utils.JenaUtils._ import com.hp.hpl.jena.rdf.model.ResourceFactory import es.weso.computex.TableComputations._ import com.hp.hpl.jena.rd...
weso/wiCompute
src/test/scala/es/weso/computex/TableComputationsSuite.scala
Scala
mit
2,327
/* * 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/pensions-lifetime-allowance-frontend
test/controllers/AccountControllerSpec.scala
Scala
apache-2.0
1,648
package breeze.stats.distributions; /* Copyright 2009 David Hall, Daniel Ramage 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 require...
tjhunter/scalanlp-core
learn/src/main/scala/breeze/stats/distributions/MarkovChain.scala
Scala
apache-2.0
9,773
/* * Copyright 2014–2017 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
drostron/quasar
mongodb/src/main/scala/quasar/physical/mongodb/expression/docvar.scala
Scala
apache-2.0
3,224
package org.littlewings.infinispan.spring import org.infinispan.client.hotrod.RemoteCacheManager import org.infinispan.client.hotrod.configuration.ConfigurationBuilder import org.infinispan.spring.provider.SpringRemoteCacheManager import org.springframework.cache.CacheManager import org.springframework.context.annotat...
kazuhira-r/infinispan-getting-started
remote-spring-cache/src/main/scala/org/littlewings/infinispan/spring/Config.scala
Scala
mit
613
package com.twitter.searchbird import java.net.InetSocketAddress import com.twitter.finagle.Thrift import com.twitter.server.TwitterServer import com.twitter.util.Await object AggregatorServer extends TwitterServer { override val defaultHttpPort = 8080 val port = flag("port", new InetSocketAddress(8000), "Thrift...
maufee/Searchbird
src/main/scala/com/twitter/searchbird/AggregatorServer.scala
Scala
apache-2.0
543
package com.marekkadek.scraper import java.nio.charset.StandardCharsets import com.marekkadek.scraper.jsoup.JsoupBrowser import fs2._ import fs2.Task._ import Utils._ class JsoupBrowserSpec extends ScraperTest { "JsoupBrowser" - { "reading input stream" in { val is = resource("/building_materials.htm")....
KadekM/scrawler
modules/scraper/src/test/scala/com/marekkadek/scraper/JsoupBrowserSpec.scala
Scala
mit
491
/** --------------------------------------------------------------------------- Copyright (c) 2011 Dan Simpson 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 ...
dansimpson/satchel
core/src/main/scala/org/ds/satchel/processors/RhinoSupport.scala
Scala
mit
2,390
/* * Copyright (C) 2014 - 2016 Softwaremill <http://softwaremill.com> * Copyright (C) 2016 - 2019 Lightbend Inc. <http://www.lightbend.com> */ package akka.kafka.benchmarks import akka.NotUsed import akka.actor.ActorSystem import akka.kafka.ConsumerMessage.TransactionalMessage import akka.kafka.ProducerMessage.{En...
softwaremill/reactive-kafka
benchmarks/src/main/scala/akka/kafka/benchmarks/ReactiveKafkaTransactionFixtures.scala
Scala
apache-2.0
3,809
/* * 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 ...
gridgain/apache-ignite
examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinitySimpleExample.scala
Scala
apache-2.0
2,841
package com.twitter.finagle.http.filter import com.twitter.finagle.Service import com.twitter.finagle.http.{Method, Request, Response, Version} import com.twitter.logging.{BareFormatter, Logger, StringHandler} import com.twitter.util.{Await, Future, Time} import org.junit.runner.RunWith import org.scalatest.FunSuite i...
travisbrown/finagle
finagle-http/src/test/scala/com/twitter/finagle/http/filter/LoggingFilterTest.scala
Scala
apache-2.0
5,097
package tw.com.chttl.spark.mllib.util import org.apache.spark.SparkContext import org.apache.spark.mllib.fpm.FPGrowthModel /** * Created by leorick on 2016/1/21. */ object FPGUtil extends Serializable { /** * usage: 計算 FPGModel 內 itemset 的 lift 值 * return Array[(lift:Double, items:(Array[String], freq:Long,...
leoricklin/spark-util
src/main/scala/tw/com/chttl/spark/mllib/util/FPGUtil.scala
Scala
apache-2.0
1,694
package controllers import javax.inject._ import play.api.mvc._ /** // * This controller demonstrates how to use dependency injection to // * bind a component into a controller class. The class creates an // * `Action` that shows an incrementing count to users. The [[Counter]] // * object is injected by the Guice de...
Chopintropbien/MySquares
app/controllers/CountController.scala
Scala
mit
732
package com.softwaremill.bootzooka.user.application import java.time.OffsetDateTime import java.util.UUID import com.softwaremill.bootzooka.common.FutureHelpers._ import com.softwaremill.bootzooka.common.sql.SqlDatabase import com.softwaremill.bootzooka.user._ import com.softwaremill.bootzooka.user.domain.{BasicUserD...
ldrygala/bootzooka
backend/src/main/scala/com/softwaremill/bootzooka/user/application/UserDao.scala
Scala
apache-2.0
3,160
package ch.descabato.ui import java.io.InputStream import java.util.Date import ch.descabato.core.Universe import ch.descabato.core.actors.MetadataStorageActor.BackupDescription import ch.descabato.core.commands.DoReadAbstract import ch.descabato.core.model.{BackupPart, FileAttributes, FileDescription} import scala....
Stivo/DeScaBaTo
ui/src/main/scala/ch/descabato/ui/Index.scala
Scala
gpl-3.0
3,163
/* * 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...
pncampbell/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC155.scala
Scala
apache-2.0
2,026
package org.nisshiee.crawler package object jsoup extends DocumentInstances
nisshiee/async-crawler
jsoup/src/main/scala/package.scala
Scala
mit
77
package net.flatmap.js.codemirror import scala.scalajs.js.annotation.JSExport import scala.scalajs.js import scala.scalajs.js.RegExp trait Mode[S] { @JSExport def startState(): S = js.undefined.asInstanceOf[S] @JSExport def token(stream: Stream, state: S): String } trait BlankLineBehavior[S] { self: Mode[S] => ...
flatmap/cobra
modules/js-bindings/codemirror/src/main/scala/net/flatmap/js/codemirror/Mode.scala
Scala
lgpl-3.0
2,866
/* * 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/test/scala/com/asakusafw/spark/compiler/SparkClientCompilerSpec.scala
Scala
apache-2.0
8,047
package linguistic import org.scalajs.dom import org.scalajs.dom.ext.Ajax import shared.protocol.SignInResponse import scala.concurrent.Future import upickle.default._ object gateaway { trait LoginMode case object SignInMode extends LoginMode case object SignUpMode extends LoginMode case class UiSession( ...
haghard/linguistic
ui/src/main/scala/linguistic/gateaway.scala
Scala
apache-2.0
1,356
package pigpio.scaladsl import akka.actor.ActorSystem import akka.testkit.{TestActorRef, TestKit} import org.scalamock.scalatest.MockFactory import org.scalatest.{Matchers, WordSpecLike} class GpioPinSpec extends TestKit(ActorSystem()) with WordSpecLike with Matchers with MockFactory { "initial state" should { ...
jw3/pigpio-scala
src/test/scala/pigpio/scaladsl/GpioPinSpec.scala
Scala
apache-2.0
1,618
package ch.wsl.box.client.views.components.widget import ch.wsl.box.model.shared.{JSONField, WidgetsNames} import ch.wsl.box.shared.utils.JSONUtils.EnhancedJson import io.udash._ import io.circe._ import io.circe.generic.auto._ import scalatags.JsDom import scalatags.JsDom.all._ case class WidgetSelector(name:String,...
Insubric/box
client/src/main/scala/ch/wsl/box/client/views/components/widget/DynamicWidget.scala
Scala
apache-2.0
1,874
package com.generativists.thirdway.fields.grid2d import org.scalatest.{FunSpec, Matchers} class MockGrid(val width:Int = 3, val height:Int = 3) extends Grid[Int] { override def update(x: Int, y: Int, value: Int): Unit = { } override def apply(x: Int, y: Int): Int = x + y } class VonNeumannSpec extends FunSpec...
generativists/ThirdWay
src/test/scala/com/generativists/thirdway/fields/grid2d/NeighborsSpec.scala
Scala
mit
3,904
package com.github.neysofu.tyche import scala.util.Random import org.scalatest.{WordSpec, Matchers} class MarkovChainSpec extends WordSpec with Matchers { sealed trait State object FinalState extends State object StartState extends State val chain = new MarkovChain[State]( _ match { case FinalStat...
neysofu/tyche
src/test/scala/com/github/neysofu/tyche/MarkovChainSpec.scala
Scala
mit
807
package pr import org.scalatest.Matchers import org.apache.spark._ import org.apache.spark.rdd._ import org.scalatest.FreeSpec import org.apache.parquet.schema.MessageTypeParser import org.apache.parquet.schema.MessageType import org.apache.parquet.hadoop.api.ReadSupport.ReadContext import org.apache.parquet.hadoop....
rabbitonweb/ParquetRDD
src/test/scala/pr/ParquetRDDSpec.scala
Scala
apache-2.0
2,144
package provingground.learning import provingground._, HoTT._ import GeneratorVariables._, Expression._ import scala.collection.parallel._ import shapeless._ import TermRandomVars._ import ParMapState._ import DE.{finalProb, initProb} import provingground.learning.GeneratorNode._ import scala.collection.parallel.im...
siddhartha-gadgil/ProvingGround
jvmcore/src/main/scala/provingground/learning/ParTangentDistEq.scala
Scala
mit
16,210
package com.malaska.spark.training.streaming.structured import com.malaska.spark.training.streaming.{Message, MessageBuilder} import org.apache.log4j.{Level, Logger} import org.apache.spark.sql.SparkSession import org.apache.spark.sql.streaming.Trigger import org.apache.spark.sql.functions._ object CountingInAStreamD...
TedBear42/spark_training
src/main/scala/com/malaska/spark/training/streaming/structured/CountingInAStreamDatasetExpGroupBy.scala
Scala
apache-2.0
1,793
package com.github.jt.sbt import sbt._ /** * Dependencies which work together. */ object Deps { object Log { val slf4j = "org.slf4j" % "slf4j-api" % "1.7.19" val grizzled = "org.clapper" %% "grizzled-slf4j" % "1.0.2" exclude("org.slf4j", "slf4j-api") val logback = "ch.qos.logback" % "logback-classic" ...
joeytsai/jt-sbt-plugin
src/main/scala/com/github/jt/sbt/Deps.scala
Scala
apache-2.0
2,107
/* Copyright 2012 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...
jzmq/scalding
scalding-core/src/main/scala/com/twitter/scalding/FlowState.scala
Scala
apache-2.0
4,666
/*-------------------------------------------------------------------------*\\ ** ScalaCheck ** ** Copyright (c) 2007-2021 Rickard Nilsson. All rights reserved. ** ** http://www.scalacheck.org ** ** ...
rickynils/scalacheck
jvm/src/test/scala/org/scalacheck/PropertyFilterSpecification.scala
Scala
bsd-3-clause
3,126
package com.mark.adt /** * A student represents a person that submits assignments to be evaluated by * a grader. * */ class Student(name: String) { require(name != null) require(name.length != 0) def getName: String = name override def toString: String = name override def equals(that: Any): Boolean...
joseamuniz/mark
src/com/mark/adt/Student.scala
Scala
mit
478
/* * Copyright (c) 2012 SnowPlow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org...
antagonist112358/tomahawk
project/Dependencies.scala
Scala
apache-2.0
4,671
package ch.wsl.box.services.files import ch.wsl.box.model.shared.JSONID import ch.wsl.box.services.file.{FileCacheKey, FileId, ImageCacheStorage} import scala.concurrent.{ExecutionContext, Future} class InMemoryImageCacheStorage extends ImageCacheStorage { private val store:scala.collection.mutable.Map[FileCac...
Insubric/box
server/src/main/scala/ch/wsl/box/services/files/InMemoryImageCacheStorage.scala
Scala
apache-2.0
1,066
package io.github.pauljamescleary.petstore.infrastructure.repository.doobie import java.time.Instant import cats._ import cats.data._ import cats.effect.Bracket import cats.syntax.all._ import doobie._ import doobie.implicits._ import doobie.implicits.legacy.instant._ import tsec.authentication.{AugmentedJWT, Backing...
pauljamescleary/scala-pet-store
src/main/scala/io/github/pauljamescleary/petstore/infrastructure/repository/doobie/DoobieAuthRepositoryInterpreter.scala
Scala
apache-2.0
2,938
/* * 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 ...
bwsw/sj-platform
core/sj-engine-core/src/test/scala-2.12/com/bwsw/sj/engine/core/output/EntityBuilderTests.scala
Scala
apache-2.0
2,003
/* * The MIT License (MIT) * * Copyright (c) 2016 Algolia * http://www.algolia.com/ * * 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...
algolia/algoliasearch-client-scala
src/main/scala/algolia/definitions/IndexingDefinition.scala
Scala
mit
3,378
/** * Copyright (C) 2013 Kaj Magnus Lindberg (born 1979) * * This program 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 * License, or (at your option) any later version. ...
debiki/debiki-server-old
app/controllers/CloseCollapseController.scala
Scala
agpl-3.0
2,276
package breeze.collection.mutable /* Copyright 2012 David Hall 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...
scalanlp/breeze
math/src/test/scala/breeze/collection/mutable/SparseArrayTest.scala
Scala
apache-2.0
2,597
/* * 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/sbt-slamdata
core/src/main/scala/slamdata/SbtSlamDataBase.scala
Scala
apache-2.0
19,783
/* * 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
community/cypher/frontend-2.3/src/main/scala/org/neo4j/cypher/internal/frontend/v2_3/ast/functions/Atan2.scala
Scala
apache-2.0
1,195
package wandou.math.random import java.util.Random /** * Discrete random sequence that follows a * <a href="http://en.wikipedia.org/wiki/Poisson_distribution" target="_top">Poisson * distribution</a>. * @author Daniel Dyer */ class PoissonGenerator private (mean: NumberGenerator[Double], rng: Random) extends Num...
wandoulabs/wandou-math
wandou-math/src/main/scala/wandou/math/random/PoissonGenerator.scala
Scala
apache-2.0
1,959
/** * Copyright 2011-2017 GatlingCorp (http://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...
timve/gatling
gatling-http/src/test/scala/io/gatling/http/WsCompileTest.scala
Scala
apache-2.0
3,088
package chandu0101.scalajs.react.components.demo.components.googlemap import chandu0101.scalajs.react.components.demo.components.CodeExample import chandu0101.scalajs.react.components.fascades.LatLng import chandu0101.scalajs.react.components.maps.GoogleMap import japgolly.scalajs.react._ import japgolly.scalajs.react...
coreyauger/scalajs-react-components
demo/src/main/scala/chandu0101/scalajs/react/components/demo/components/googlemap/GoogleMapBasic.scala
Scala
apache-2.0
923
package pl.pholda.malpompaaligxilo.dsl.expr.form import pl.pholda.malpompaaligxilo.dsl.DslFormExpr import pl.pholda.malpompaaligxilo.form.FormInstance case class IfStatement(ifExpr: DslFormExpr[_], trueExpr: DslFormExpr[_], falseExpr: DslFormExpr[_]) extends DslFormExpr[Any] { override def apply(formInstance: For...
pholda/MalpompaAligxilo
dsl/shared/src/main/scala/pl/pholda/malpompaaligxilo/dsl/expr/form/IfStatement.scala
Scala
gpl-3.0
459
/* * 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/CoalesceUnaryMappable.scala
Scala
apache-2.0
2,940
package org.vitrivr.adampro.shared.catalog.catalogs import org.vitrivr.adampro.shared.catalog.CatalogManager import slick.driver.H2Driver.api._ /** * ADAMpro * * Catalog to store metadata to each entity. * * Ivan Giangreco * July 2016 */ private[catalog] class EntityOptionsCatalog(tag: Tag) extends Tabl...
dbisUnibas/ADAMpro
src/main/scala/org/vitrivr/adampro/shared/catalog/catalogs/EntityOptionsCatalog.scala
Scala
mit
948
package org.nexbook.orderchange import org.nexbook.core.Command /** * Created by milczu on 12/23/15. */ case class OrderChangeCommand(orderChange: OrderChange) extends Command[OrderChange] { override def payload: OrderChange = orderChange }
milczarekIT/nexbook
src/main/scala/org/nexbook/orderchange/OrderChangeCommand.scala
Scala
apache-2.0
249
/* * Copyright 2017 Netflix, 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 i...
spinnaker/kayenta
kayenta-judge/src/main/scala/com/netflix/kayenta/judge/classifiers/metric/MannWhitneyClassifier.scala
Scala
apache-2.0
9,376
package com.sksamuel.elastic4s.cat import com.sksamuel.elastic4s.{HealthStatus, Indexes} import com.sksamuel.exts.OptionImplicits._ trait CatsApi { def catAliases(): CatAliases = CatAliases() def catAllocation(): CatAllocation = CatAllocation() def catCount(): CatCount = CatC...
Tecsisa/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/cat/CatsApi.scala
Scala
apache-2.0
1,289
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v3/B480.scala
Scala
apache-2.0
965
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
erictu/adam
adam-core/src/test/scala/org/bdgenomics/adam/projections/FieldEnumerationSuite.scala
Scala
apache-2.0
2,411
package it.polimi.genomics.spark.implementation.MetaOperators.SelectMeta import it.polimi.genomics.core.DataStructures.MetaOperator import it.polimi.genomics.core.DataStructures.MetadataCondition._ import it.polimi.genomics.core.DataTypes.MetaType import it.polimi.genomics.core.exception.SelectFormatException import i...
DEIB-GECO/GMQL
GMQL-Spark/src/main/scala/it/polimi/genomics/spark/implementation/MetaOperators/SelectMeta/SelectMD.scala
Scala
apache-2.0
1,174
package com.novus.unfinagled import com.twitter.finagle.Service import dispatch.classic.{ Handler, Http => DHttp } import java.util.UUID.randomUUID import org.jboss.netty.handler.codec.http.{ HttpResponse, HttpRequest } import org.scalatest.FeatureSpec import unfiltered.scalatest.Hosted trait FinagleServed[T] extends...
novus/unfinagled
unfinagled-scalatest/src/main/scala/com/novus/unfinagled/FinagleServed.scala
Scala
mit
912
/* * Copyright © 2016 - 2019 Schlichtherle IT Services * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
christian-schlichtherle/neuron-di
guice/src/test/scala/global/namespace/neuron/di/guice/java/test/CachingApplicationSpec.scala
Scala
apache-2.0
2,330
import org.scalatestplus.play._ import play.api.test._ import play.api.test.Helpers._ /** * Add your spec here. * You can mock out a whole application including requests, plugins etc. * For more information, consult the wiki. */ class ApplicationSpec extends PlaySpec with OneAppPerTest { "Routes" should { ...
gurghet/Rota
test/ApplicationSpec.scala
Scala
mit
1,057
package com.olvind package mui object MuiTypeMapperFunction { val TouchTapEventHandler = "TouchTapEvent => Callback" val TouchEventHandler = "ReactTouchEvent => Callback" val MouseEventHandler = "ReactMouseEvent => Callback" val FocusEventhandler = "ReactFocusEvent => Callback" val KeyboardEventHand...
chandu0101/scalajs-react-components
gen/src/main/scala/com/olvind/mui/MuiTypeMapperFunction.scala
Scala
apache-2.0
10,140
/* * 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/util/Html.scala
Scala
apache-2.0
21,434
package com.twitter.zipkin.storage.cassandra /* * Copyright 2012 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 * ...
zerdliu/zipkin
zipkin-cassandra/src/main/scala/com/twitter/zipkin/storage/cassandra/CassandraIndex.scala
Scala
apache-2.0
11,437
/* * Copyright (c) 2014-2020 by The Monix Project Developers. * See the project homepage at: https://monix.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...
alexandru/monifu
monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/PublisherIsObservableSuite.scala
Scala
apache-2.0
4,912
import leon.annotation._ import leon.lang._ import leon.lang.synthesis._ object Addresses { case class Info( address: Int, zipcode: Int, phoneNumber: Int ) case class Address(info: Info, priv: Boolean) sealed abstract class List case class Cons(a: Address, tail:List) extends List case obj...
ericpony/scala-examples
testcases/synthesis/oopsla2013/AddressBook/AddressesMergeAddressBooksStep1.scala
Scala
mit
2,093
object Foo { def test(s: String) = { (s: Seq[Char]) match { case Seq('f', 'o', 'o', ' ', rest1*) => rest1 case Seq('b', 'a', 'r', ' ', ' ', rest2*) => rest2 case _ => s } } }
dotty-staging/dotty
tests/pos/t2945.scala
Scala
apache-2.0
241
package com.wavesplatform import com.wavesplatform.account.KeyPair import com.wavesplatform.block.Block import com.wavesplatform.block.Block.{GenerationSignatureLength, GenerationVRFSignatureLength, ProtoBlockVersion} import com.wavesplatform.common.state.ByteStr import com.wavesplatform.common.utils.EitherExt2 import...
wavesplatform/Waves
node/src/test/scala/com/wavesplatform/BlockGen.scala
Scala
mit
2,984
package com.github.mogproject.redismock.util.ops import org.scalatest.{Matchers, FunSpec} class BooleanOpsSpec extends FunSpec with Matchers { describe("BooleanOps#whenTrue") { it("should return false with no side effect") { var x = 0 false whenTrue (x += 1) shouldBe false x shouldBe 0 } ...
mogproject/scala-redis-mock
src/test/scala/com/github/mogproject/redismock/util/ops/BooleanOpsSpec.scala
Scala
apache-2.0
773
package reactivemongo.api.bson package compat import scala.language.implicitConversions import scala.util.{ Failure, Success } import reactivemongo.bson.{ BSONArray => LegacyArray, BSONBinary => LegacyBinary, BSONBoolean => LegacyBoolean, BSONDateTime => LegacyDateTime, BSONDecimal => LegacyDecimal, BSON...
ornicar/ReactiveMongo
bson-compat/src/main/scala/ValueConverters.scala
Scala
apache-2.0
9,653
object Foo { def isGood(x: Int): Boolean = { x % 2 == 0 } }
agconti/scala-school
04-functions-as-values/slides/slide003.scala
Scala
mit
66
package com.v_standard.sbtplugin.scalikejdbc.ormgenerator import com.v_standard.sbtplugin.scalikejdbc.ormgenerator.db.{DBConnectionInfo, DBLoader} import java.nio.file.Paths /** * メインクラス。 */ object Tool extends App { val pkg = args(0) val driver = args(1) val url = args(2) val schema = if (args(3) == "") null ...
VanishStandard/scalikejdbc-orm-generator
tool/src/main/scala/com/v_standard/sbtplugin/scalikejdbc/ormgenerator/Tool.scala
Scala
bsd-3-clause
665
package com.mediative.eigenflow.process import java.util.Date import akka.actor.SupervisorStrategy.Stop import akka.actor.{ Actor, ActorRef, OneForOneStrategy, Props, SupervisorStrategy, Terminated } import com.mediative.eigenflow.StagedProcess import com.mediative.eigenflow.publisher.MessagingSystem object ProcessS...
ypg-data/eigenflow
src/main/scala/com.mediative.eigenflow/process/ProcessSupervisor.scala
Scala
apache-2.0
1,278
package tpass trait TUnitPass extends TPass[Unit, Unit] { override def combine(u: Unit, v: Unit) = u override def combineList(u: List[Unit]) = () override def default = () }
j-c-w/mlc
src/main/scala/tpass/TUnitPass.scala
Scala
gpl-3.0
181
/* * Copyright (C) 2005, The OpenURP Software. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
openurp/api
edu/src/main/scala/org/openurp/edu/grade/regular/model/RegularGradeState.scala
Scala
lgpl-3.0
1,407
/** * sbt-android-mill - simple-build-tool multi-thread plugin with profiling * * Copyright (c) 2012 Alexey Aksenov ezh@ezh.msk.ru * * 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 * *...
sbt-android-mill/sbt-android-mill
src/main/scala/sbt/android/mill/target/Emulator.scala
Scala
apache-2.0
2,575
package com.ftchinese.jobs.database import java.sql.{Connection, PreparedStatement} import com.ftchinese.jobs.common.Logging /** * Analytic database class * Created by GWB on 2014/12/11. */ class AnalyticDB extends Logging { private var _dataSource: AnalyticDataSource = null private var _conn:Connection =...
FTChinese/push
src/main/scala/com/ftchinese/jobs/database/AnalyticDB.scala
Scala
mit
4,967
package com.szadowsz.starform.unit /** * Separation of Mass Unit Constants from General Program Constants. * * These values should not be alterable. * * These values come from the following files of the original programs unless otherwise noted: * const.h - Burdick (accrete) * const.h - Burdick (starform)...
zakski/accrete-starform-stargen
recreations/streamline/src/main/scala/com/szadowsz/starform/unit/MassConstants.scala
Scala
apache-2.0
2,964
package mesosphere.marathon package api import java.net._ import javax.servlet._ import javax.servlet.http.{HttpServletRequest, HttpServletResponse} import akka.http.scaladsl.model.StatusCodes._ import com.typesafe.scalalogging.StrictLogging import mesosphere.marathon.core.election.ElectionService import mesosphere.m...
mesosphere/marathon
src/main/scala/mesosphere/marathon/api/LeaderProxyFilter.scala
Scala
apache-2.0
4,918
package http.client.request trait HttpRequestHelpers { /** Converts a sequence of key/value pairs into a map of key to sequence of values if and * only if the value is defined (not None). * Used to create a Map[K, Seq[V]]. * @param keyValue pairs to include in map * @return the map */ protected...
SocialOrra/social4s
http-client/src/main/scala/http/client/request/HttpRequestHelpers.scala
Scala
apache-2.0
877
package io.eels.component.parquet import java.io.File import io.eels.Frame import io.eels.schema.{Field, StringType, StructType} import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.{FileSystem, Path} import org.scalatest.{FlatSpec, Matchers} class ParquetProjectionTest extends FlatSpec with Match...
stheppi/eel
eel-components/src/test/scala/io/eels/component/parquet/ParquetProjectionTest.scala
Scala
apache-2.0
1,380
//: ---------------------------------------------------------------------------- //: Copyright (C) 2014 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...
stew/remotely
core/src/main/scala/Server.scala
Scala
apache-2.0
4,973
package org.sisioh.aws4s.eb.model import com.amazonaws.services.elasticbeanstalk.model.{ DescribeEventsResult, EventDescription } import org.sisioh.aws4s.PimpedType import scala.collection.JavaConverters._ object DescribeEventsResultFactory { def create(): DescribeEventsResult = new DescribeEventsResult() } cla...
everpeace/aws4s
aws4s-eb/src/main/scala/org/sisioh/aws4s/eb/model/RichDescribeEventsResult.scala
Scala
mit
1,018
/* * 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 ...
sryza/spark
core/src/main/scala/org/apache/spark/rdd/BlockRDD.scala
Scala
apache-2.0
2,033
package io.netty.handler.codec.http2 import io.netty.buffer.ByteBuf; import io.netty.channel.{ChannelDuplexHandler, ChannelHandlerContext, ChannelPromise} import io.netty.handler.codec.http.HttpServerUpgradeHandler.UpgradeEvent; /** * This is a direct reimplementation of io.netty.handler.codec.http2.Http2FrameCodec....
hhtpcd/linkerd
finagle/h2/src/main/scala/io/netty/handler/codec/http2/H2FrameCodec.scala
Scala
apache-2.0
9,220
/**************************************************************************** * Copyright Fabien Sartor * Contributors: Fabien Sartor (fabien.sartor@gmail.com) * http://fasar.fr * * This software is a computer program whose purpose to compute differences * between two files. * ****************...
fasar/diffTools
application/web-jsp/src/main/scala/fsart/diffTools/outputDriver/Impl/CsvExcelView2SpecialAppEngine.scala
Scala
apache-2.0
5,537
/* * Copyright 2016-2020 47 Degrees Open Source <https://www.47deg.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 ...
47deg/github4s
github4s/src/main/scala/github4s/domain/PullRequest.scala
Scala
apache-2.0
4,517
package com.dominikgruber.fpinscala.chapter03 import org.scalatest._ class Exercise24Spec extends FlatSpec with Matchers { "hasSubsequence" should "detect a subsequence (I)" in { val l1 = List(1, 1, 1, 2, 3, 4, 5) val l2 = List(1, 2, 3) List.hasSubsequence(l1, l2) should be (true) } it should "det...
TheDom/functional-programming-in-scala
src/test/scala/com/dominikgruber/fpinscala/chapter03/Exercise24Spec.scala
Scala
mit
790
//Generate the classes and assertions under test. case class TestCase(classType: String, p1: ParamConfig, p2: ParamConfig) { val className = s"${classType.headOption.getOrElse('r')}${abbr(p1)}_${abbr(p2)}".capitalize val tParams = "[@specialized(Int) A, @specialized(Int) B]" def abbr(p: ParamConfig): String = p.m...
scala/scala
test/files/run/t8831_many/generator.scala
Scala
apache-2.0
3,981
package chk.commons.test import chk.commons.util.TraversableUtils class TraversableUtilsSpec extends TraversableUtils with UnitSpec { behavior of "Traversable Utils" it should "convert list to option" in { val list = List("1", "2") list.emptyOpt should be ('defined) list.emptyOpt.value should conta...
chainkite/chk-commons
core/src/test/scala/chk/commons/test/TraversableUtilsSpec.scala
Scala
mit
432
package com.twitter.scrooge import org.apache.thrift.TApplicationException import org.apache.thrift.TException import org.apache.thrift.protocol.TMessage import org.apache.thrift.protocol.TMessageType import org.apache.thrift.protocol.TProtocol import org.apache.thrift.protocol.TProtocolException import org.slf4j.Logg...
VisualDNA/scrooge
scrooge-core/src/main/scala/com/twitter/scrooge/ThriftFunction.scala
Scala
apache-2.0
1,796
package scavro import org.specs2.mutable.Specification import org.oedura.scavro.{AvroReader, AvroWriter} import scavrotest._ class Scavro28Test extends Specification { "A case class with a `List[List[String]]` field" should { "serialize and deserialize correctly" in { val record = AvroTypeProviderTest...
julianpeeters/sbt-avrohugger
src/sbt-test/avrohugger/ScavroSerializationTests/src/test/scala/scavro/NestedPrimitivesSpec.scala
Scala
apache-2.0
10,021
package opencl.generator.matrixMultiplication import benchmarks.GEMM import ir._ import ir.ast._ import lift.arithmetic.ArithExpr import opencl.executor._ import opencl.ir._ import opencl.ir.pattern._ import org.junit.Assert._ import org.junit.Assume.assumeFalse import org.junit.Test object CGO_2017 extends TestWith...
lift-project/lift
src/test/opencl/generator/matrixMultiplication/CGO_2017.scala
Scala
mit
16,567
package mlib.impl.protocol import play.api.libs.json.Json import mlib.api.Message // ACHTUNG!BEWARE!ОСТОРОЖНО!: class fields name will be translated to and from json with format macro // so watch for typos // TODO make macro with field names as string literals object Content { // system case class SystemError(co...
InnovaCo/mlib
src/main/scala/mlib/impl/protocol/Content.scala
Scala
mit
574
/* * sbt * Copyright 2011 - 2018, Lightbend, Inc. * Copyright 2008 - 2010, Mark Harrah * Licensed under Apache License 2.0 (see LICENSE) */ package sbt.internal.util import java.io._ import java.util.{ List => JList } import jline.console.ConsoleReader import jline.console.history.{ FileHistory, MemoryHistory }...
xuwei-k/xsbt
internal/util-complete/src/main/scala/sbt/internal/util/LineReader.scala
Scala
apache-2.0
12,939
/* * 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
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaSourceRDD.scala
Scala
apache-2.0
8,371
/* * 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/distance/numeric/DateMetric.scala
Scala
apache-2.0
2,352
package org.jetbrains.plugins.scala.lang.transformation.annotations import org.jetbrains.plugins.scala.extensions.&& import org.jetbrains.plugins.scala.lang.psi.api.Typed import org.jetbrains.plugins.scala.lang.psi.api.expr.ScUnderscoreSection import org.jetbrains.plugins.scala.lang.psi.impl.ScalaCode._ import org.jet...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/lang/transformation/annotations/AddTypeToUnderscoreParameter.scala
Scala
apache-2.0
669
/* * 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
community/cypher/frontend-2.3/src/main/scala/org/neo4j/cypher/internal/frontend/v2_3/ast/functions/Abs.scala
Scala
apache-2.0
1,256
/* * 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 ...
eyalfa/spark
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala
Scala
apache-2.0
63,186
/* * Copyright 2014 Databricks * * 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...
BrentDorsey/pipeline
metrics.ml/spark-prometheus/src/main/scala/com/databricks/spark/prometheus/PrometheusRelationProvider.scala
Scala
apache-2.0
2,383
package merkelonrails import org.parboiled.errors.ParsingException class ArithmeticTest extends MerkelGeneratorTest { it should "function when a variable is declared" in { val code: String = "IT'S SHOWTIME\n" + "HEY CHRISTMAS TREE var\n" + "YOU SET US UP 123\n" + "YOU HAVE BEEN TE...
ubertroll/MerkelOnRails
src/test/scala/merkelonrails/ArithmeticTest.scala
Scala
apache-2.0
11,924
package uk.gov.gds.ier.transaction.overseas.confirmation import uk.gov.gds.ier.langs.Language import uk.gov.gds.ier.service.{WithAddressService, AddressService} import uk.gov.gds.ier.transaction.overseas.{OverseasControllers, WithOverseasControllers} import uk.gov.gds.ier.controller.routes.ErrorController import uk.go...
alphagov/ier-frontend
app/uk/gov/gds/ier/transaction/overseas/confirmation/ConfirmationStep.scala
Scala
mit
7,890
package kiambogo.scrava import kiambogo.scrava.models._ import org.scalatest.{FlatSpec, Matchers} class IntegrationTest extends FlatSpec with Matchers { private val testToken = "21b4fe41a815dd7de4f0cae7f04bbbf9aa0f9507" private val testClient = new ScravaClient(testToken) "Scrava" should "retrieve Athlete...
kiambogo/scrava
src/test/scala/kiambogo/scrava/IntegrationTest.scala
Scala
mit
5,103
package mesosphere.marathon package core.base import akka.Done import mesosphere.marathon.core.async.ExecutionContexts import scala.concurrent.Future sealed trait CrashStrategy { def crash(): Future[Done] } case object JvmExitsCrashStrategy extends CrashStrategy { override def crash(): Future[Done] = { Runt...
Caerostris/marathon
src/main/scala/mesosphere/marathon/core/base/CrashStrategy.scala
Scala
apache-2.0
379
package peregin.gpv.manual import java.io.File import peregin.gpv.model.Telemetry import peregin.gpv.{ConverterDialog, Setup} import peregin.gpv.gui.Goodies import peregin.gpv.gui.TemplatePanel.TemplateEntry import peregin.gpv.gui.dashboard.CyclingDashboard object ConverterDialogManualTest extends App { Goodies....
peregin/gps-overlay-on-video
src/test/scala/peregin/gpv/manual/ConverterDialogManualTest.scala
Scala
mit
722