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 com.github.rshindo.playchat.repository import java.time.ZoneId import java.util.Date import javax.inject.Singleton import com.github.rshindo.playchat.entity.Channel import com.github.rshindo.playchat.json.{Channel => ChannelJson} import scalikejdbc.DB /** * Created by shindo on 2016/12/18. */ @Singleton ...
rshindo/play-chat
play-chat-server/app/com/github/rshindo/playchat/repository/ChannelRepository.scala
Scala
mit
986
package com.statigories.switchboard.common.providers import com.statigories.switchboard.common.FromMap import org.scalatest.{FlatSpec, Matchers} class SystemPropertyConfigProviderTest extends FlatSpec with Matchers { case class TestClass(foo: String, bar: Int, baz: Option[BigDecimal]) { val dummyProperty = "s...
statigories/switchboard
src/test/scala/com/statigories/switchboard/common/providers/SystemPropertyConfigProviderTest.scala
Scala
mit
1,741
/* * 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 ...
quasar-analytics/quasar
impl/src/test/scala/quasar/impl/destinations/MockDestinationsSpec.scala
Scala
apache-2.0
5,068
package com.wuyuntao.aeneas.cli import com.typesafe.config.ConfigFactory import com.wuyuntao.aeneas.migration.Migrator import scopt.OptionParser object CliApp extends App { val parser = new OptionParser[CliConfig]("aeneas-cli") { head("aeneas-cli", "0.0.1") help("help") .text("Print usage text") ...
wuyuntao/Aeneas
aeneas-cli/src/main/scala/com/wuyuntao/aeneas/cli/CliApp.scala
Scala
apache-2.0
1,018
/** * 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...
thomsonreuters/CM-Well
server/cmwell-data-tools/src/test/scala/cmwell/tools/data/helpers/BaseStreamSpec.scala
Scala
apache-2.0
1,378
package com.bio4j.release.generic import com.bio4j.model._ import scala.compat.java8.OptionConverters._ import bio4j.data.uniprot._ case object conversions { def statusToDatasets(status: Status): UniProtGraph.Datasets = status match { case Reviewed => UniProtGraph.Datasets.swissProt case Unreview...
bio4j/bio4j-data-import
src/main/scala/uniprot/conversions.scala
Scala
agpl-3.0
9,383
/** * 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...
piavlo/operations-debs-kafka
core/src/main/scala/kafka/producer/Producer.scala
Scala
apache-2.0
9,978
package im.actor.server.push import java.nio.ByteBuffer import scala.annotation.tailrec import scala.concurrent._ import scala.concurrent.duration._ import akka.actor._ import akka.pattern.ask import akka.util.Timeout import com.esotericsoftware.kryo.serializers.TaggedFieldSerializer.{ Tag ⇒ KryoTag } import com.goo...
chieryw/actor-platform
actor-server/actor-push/src/main/scala/im/actor/server/push/SeqUpdatesManager.scala
Scala
mit
18,589
package som import java.util.Arrays import java.util.Comparator class Vector[E <: AnyRef](size: Int) { def this() = this(50) var storage: Array[AnyRef] = new Array[AnyRef](size) var firstIdx: Int = 0 var lastIdx: Int = 0 def at(idx: Int): E = { if (idx >= storage.length) { retu...
cedricviaccoz/scala-native
benchmarks/src/main/scala/som/Vector.scala
Scala
bsd-3-clause
2,488
trait Semigroup[T] { def (lhs: T).append(rhs: T): T def (lhs: Int).appendS(rhs: T): T = ??? } object Semigroup { implicit object stringAppend extends Semigroup[String] { override def (lhs: String).append(rhs: String): String = lhs + rhs } implicit def sumSemigroup[N](implicit N: Numeric[N]): Semigroup[N...
som-snytt/dotty
tests/neg/i5773.scala
Scala
apache-2.0
917
/* * 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-coap/src/main/scala/com/datamountaineer/streamreactor/connect/coap/connection/DTLSConnectionFn.scala
Scala
apache-2.0
4,935
package io.github.tailhq.dynaml.graphics.charts.repl import io.github.tailhq.dynaml.graphics.charts.Highcharts._ import org.scalatest.Matchers import org.scalatest.FunSuite /** * User: austin * Date: 12/15/14 */ class HighchartsReplTest extends FunSuite with Matchers { test("Pie repl") { disableOpenWindow ...
mandar2812/DynaML
dynaml-core/src/test/scala/io/github/tailhq/dynaml/graphics/charts/repl/HighchartsReplTest.scala
Scala
apache-2.0
835
package models.db import com.ponkotuy.data.master import scalikejdbc._ import tool.{EquipIconType, EquipType} import util.scalikejdbc.BulkInsert._ case class MasterSlotItem( id: Int, name: String, typ: Array[Int], power: Int, torpedo: Int, bomb: Int, antiair: Int, antisub: Int, search: Int, hit: I...
kxbmap/MyFleetGirls
server/app/models/db/MasterSlotItem.scala
Scala
mit
6,600
/* * MIT License * * Copyright (c) 2017 Enrique González Rodrigo * 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 to use,...
enriquegrodrigo/spark-crowd
spark-crowd/src/main/scala/com/enriquegrodrigo/spark/crowd/methods/RaykarBinary.scala
Scala
mit
25,774
/* * 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 ...
bowenli86/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/batch/table/TemporalTableJoinTest.scala
Scala
apache-2.0
2,471
package com.github.swwjf.ws import com.github.swwjf.errorhandling.WSException import org.springframework.beans.BeanUtils import org.springframework.beans.factory.annotation.Autowired import org.springframework.dao.DataIntegrityViolationException import org.springframework.stereotype.Service import org.springframework....
andrei-l/scala-webapp-with-java-frameworks
webservices/src/main/scala/com/github/swwjf/ws/InfoService.scala
Scala
mit
1,683
/* * Shadowsocks - A shadowsocks client for Android * Copyright (C) 2014 <[email protected]> * * 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 License, or * (at y...
azraelrabbit/shadowsocks-android
src/main/scala/com/github/shadowsocks/BaseService.scala
Scala
gpl-3.0
4,282
/* * 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 ...
bravo-zhang/spark
mllib-local/src/test/scala/org/apache/spark/ml/linalg/BreezeVectorConversionSuite.scala
Scala
apache-2.0
2,360
package predict4s.sgp /* * The traits/classes here are used to compare our results with those from Vallado's software, using the same variable names as in Vallado. */ trait Initl[F] { def satn: Int def ecco : F def epoch : F def inclo : F def no : F // outputs : def ainv : F ; def ao...
pleira/SGP4Extensions
tests/src/test/scala/predict4s/sgp/Initl.scala
Scala
apache-2.0
2,597
package com.mz.training.common.services import java.util.UUID import akka.actor.{Actor, ActorContext, ActorLogging, ActorRef, PoisonPill, Props} import akka.pattern._ import akka.util.Timeout import com.mz.training.common.messages.UnsupportedOperation import com.mz.training.common._ import com.mz.training.common.serv...
michalzeman/angular2-training
akka-http-server/src/main/scala/com/mz/training/common/services/AbstractDomainServiceActor.scala
Scala
mit
5,103
package sbt import org.scalacheck._ import Prop._ import TaskGen._ import Task._ object TaskRunnerCircularTest extends Properties("TaskRunner Circular") { property("Catches circular references") = forAll(MaxTasksGen, MaxWorkersGen) { checkCircularReferences _ } property("Allows references to completed tasks") = for...
xeno-by/old-scalameta-sbt
tasks/standard/src/test/scala/TaskRunnerCircular.scala
Scala
bsd-3-clause
1,325
package com.faacets.qalg package impl import scala.{specialized => sp} import scala.annotation.tailrec import spire.algebra._ import spire.syntax.cfor._ import spire.syntax.field._ import algebra._ import indup.algebra._ object MatSparse0 {/* @inline def feedTo[M, @sp(Double, Long) A](m: M, b: MatBuilder[_, A])(i...
denisrosset/qalg
core/src/main/scala/qalg/impl/MatSparse0.scala
Scala
mit
2,651
/* * MUSIT is a museum database to archive natural and cultural history data. * Copyright (C) 2016 MUSIT Norway, part of www.uio.no (University of Oslo) * * 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 Softw...
kpmeen/musit
service_storagefacility/app/models/storage/nodes/EnvironmentAssessment.scala
Scala
gpl-2.0
1,379
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you...
alessandrolulli/reforest
src/main/scala/reforest/rf/feature/RFFeatureSizer.scala
Scala
apache-2.0
6,683
/* * 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 ...
ConeyLiu/spark
streaming/src/test/scala/org/apache/spark/streaming/ui/UIUtilsSuite.scala
Scala
apache-2.0
3,570
package at.fh.swengb.resifo_android /** * Created by niki on 05.02.2017. */ import android.content.Context import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.TextView import scala.collection.JavaConversions._ import java.util.List class CustomAdapter(...
x-qlusive/resifo-android
app/src/main/scala/at/fh/swengb/resifo_android/CustomAdapter.scala
Scala
apache-2.0
1,384
// Databricks notebook source // MAGIC %md // MAGIC ScaDaMaLe Course [site](https://lamastex.github.io/scalable-data-science/sds/3/x/) and [book](https://lamastex.github.io/ScaDaMaLe/index.html) // COMMAND ---------- // MAGIC %md // MAGIC # Why Apache Spark? // MAGIC // MAGIC * [Apache Spark: A Unified Engine for Bi...
lamastex/scalable-data-science
_sds/3/x/db/000_1-sds-3-x/001_whySpark.scala
Scala
unlicense
9,408
import scala.tools.partest.Util.ArrayDeep object Test extends App { Test1 Test2 } class Foo[T](x: T) trait Bar[T] { def f: T } object Test1 extends TestUtil { print(()) print(true) print('a') print(1) print("abc") print('abc) println() print(List(())) print(List(true)) print(List(1)) print...
scala/scala
test/files/jvm/manifests-old.scala
Scala
apache-2.0
3,768
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.tools.nsc.tasty....
scala/scala
src/compiler/scala/tools/nsc/tasty/bridge/NameOps.scala
Scala
apache-2.0
2,065
/** * 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 ...
bigdatagenomics/bdg-services
bdgs-core/src/test/scala/org/bdgenomics/services/TypedLocationTestSuite.scala
Scala
apache-2.0
2,213
package com.rzethon.marsexp import akka.http.scaladsl.marshalling.ToResponseMarshallable.apply import akka.http.scaladsl.model.HttpMethods._ import akka.http.scaladsl.model.HttpResponse import akka.http.scaladsl.model.StatusCode.int2StatusCode import akka.http.scaladsl.model.headers._ import akka.http.scaladsl.server....
bmagrys/rzethon-mars-exped-stream
backend/src/main/scala/com/rzethon/marsexp/CorsSupport.scala
Scala
mit
1,063
package argonaut import Data._ import org.scalacheck._ import org.specs2._, org.specs2.specification._, execute.Result import org.specs2.matcher._ import scalaz._, Scalaz._ import Argonaut._ import java.io.File object JsonFilesSpecification extends Specification with ScalaCheck { def find = new File(getClass.getRes...
julien-truffaut/argonaut
src/test/scala/argonaut/JsonFilesSpecification.scala
Scala
bsd-3-clause
997
// scalastyle:off line.size.limit /* * Ported by Alistair Johnson from * https://github.com/gwtproject/gwt/blob/master/user/test/com/google/gwt/emultest/java/math/BigIntegerConvertTest.java */ // scalastyle:on line.size.limit package org.scalajs.testsuite.javalib.math import java.math.BigInteger import org.scalaj...
renyaoxiang/scala-js
test-suite/src/test/scala/org/scalajs/testsuite/javalib/math/BigIntegerConvertTest.scala
Scala
bsd-3-clause
21,183
package example import common._ object Lists { /** * This method computes the sum of all elements in the list xs. There are * multiple techniques that can be used for implementing this method, and * you will learn during the class. * * For this example assignment you can use the following methods in ...
elkorn/MOOCs
scala1/example/src/main/scala/example/Lists.scala
Scala
mit
1,975
package com.seanshubin.schulze.server import scala.util.Random class RandomnessImpl(random:Random) extends Randomness { def shuffle[T](target:Seq[T]):Seq[T] = random.shuffle(target) }
SeanShubin/schulze
server/src/main/scala/com/seanshubin/schulze/server/RandomnessImpl.scala
Scala
unlicense
188
/* * Licensed to STRATIO (C) under one or more contributor license agreements. * See the NOTICE file distributed with this work for additional information * regarding copyright ownership. The STRATIO (C) licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file...
Stratio/stratio-connector-sparkSQL
connector-sparksql/src/main/scala/com/stratio/connector/sparksql/core/package.scala
Scala
apache-2.0
3,651
/* Copyright 2009-2018 EPFL, Lausanne */ package inox package solvers package unrolling import utils._ import scala.collection.mutable.{Set => MutableSet, Map => MutableMap} /** Incrementally unfolds equality relations between types for which the * SMT notion of equality is not relevant. * * @see [[ast.Defini...
romac/inox
src/main/scala/inox/solvers/unrolling/EqualityTemplates.scala
Scala
apache-2.0
9,032
/*********************************************************************** * Copyright (c) 2013-2022 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
locationtech/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/iterators/InfiniteIteratorTest.scala
Scala
apache-2.0
1,849
package ncreep.figi import language.experimental.macros import reflect.macros.blackbox.Context import reflect.api._ import ncreep.figi._ /** Use [[Figi.makeConf]] to produce configuration instances. * * Assuming proper implicits in scope: * {{{ * trait Foo { def a: Int; val b: String } * val co...
ncreep/figi
macros/src/main/scala/ncreep/figi/Figi.scala
Scala
bsd-2-clause
5,317
package com.avsystem.commons package mongo import java.nio.ByteBuffer import com.avsystem.commons.serialization.{InputAndSimpleInput, InputMetadata, OutputAndSimpleOutput, TypeMarker} import org.bson.BsonType import org.bson.types.{Decimal128, ObjectId} object ObjectIdMarker extends TypeMarker[ObjectId] object Decim...
AVSystem/scala-commons
commons-mongo/jvm/src/main/scala/com/avsystem/commons/mongo/BsonInputOutput.scala
Scala
mit
2,072
package org.apache.predictionio.examples.experimental.trimapp import org.apache.predictionio.controller.LServing class Serving extends LServing[Query, PredictedResult] { override def serve(query: Query, predictedResults: Seq[PredictedResult]): PredictedResult = { predictedResults.head } }
alex9311/PredictionIO
examples/experimental/scala-parallel-trim-app/src/main/scala/Serving.scala
Scala
apache-2.0
309
/* * Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com> */ package play.it.http import play.api.http.HttpErrorHandler import play.api.mvc._ import play.api.routing.Router import play.api.test.PlaySpecification import play.api.{ Application, ApplicationLoader, BuiltInComponentsFromContext, Environmen...
Shenker93/playframework
framework/src/play-integration-test/src/test/scala/play/it/http/HttpFiltersSpec.scala
Scala
apache-2.0
3,439
package org.scalatra import org.scalatra.test.scalatest.ScalatraFunSuite import skinny.micro.{ SkinnyMicroFilter, SkinnyMicroServlet, UrlGeneratorSupport } import skinny.micro.routing.Route import skinny.micro.util.UrlGenerator class UrlGeneratorContextTestServlet extends SkinnyMicroServlet with UrlGeneratorSupport {...
xerial/skinny-micro
micro/src/test/scala/org/scalatra/UrlGeneratorSupportTest.scala
Scala
bsd-2-clause
2,024
package scalaxy.fx import scala.language.implicitConversions import scala.language.experimental.macros import scala.reflect.ClassTag import javafx.beans.value._ /** Meant to be imported by (package) objects that want to expose change listener macros. */ private[fx] trait ObservableValueExtensions { /** Methods on...
nativelibs4java/Scalaxy
Fx/src/main/scala/scalaxy/fx/ObservableValueExtensions.scala
Scala
bsd-3-clause
1,306
package com.arcusys.valamis.web.configuration.ioc import com.escalatesoft.subcut.inject.Injectable trait InjectableFactory extends Injectable { implicit val bindingModule = Configuration }
igor-borisov/valamis
valamis-portlets/src/main/scala/com/arcusys/valamis/web/configuration/ioc/InjectableFactory.scala
Scala
gpl-3.0
193
/* * naiveIncompleteMatchingAlgorithm.scala * */ package at.logic.gapt.language.hol.algorithms import at.logic.gapt.expr._ object NaiveIncompleteMatchingAlgorithm { def matchTerm( term: LambdaExpression, posInstance: LambdaExpression ): Option[Substitution] = matchTerm( term, posInstance, freeVariables( po...
gisellemnr/gapt
src/main/scala/at/logic/gapt/language/hol/algorithms/NaiveIncompleteMatchingAlgorithm.scala
Scala
gpl-3.0
1,798
package gitbucket.core.model import gitbucket.core.util.DatabaseConfig import com.github.takezoe.slick.blocking.BlockingJdbcProfile trait Profile { val profile: BlockingJdbcProfile import profile.blockingApi._ /** * java.util.Date Mapped Column Types */ implicit val dateColumnType = MappedColumnType.ba...
shiena/gitbucket
src/main/scala/gitbucket/core/model/Profile.scala
Scala
apache-2.0
1,431
package sample import org.junit.Before import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.beans.factory.annotation.Autowired import org.springframework.test.web.servlet._ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders._ import org.springframework.test.web.serv...
jkazama/sample-boot-scala
src/test/scala/sample/ControllerSpecSupport.scala
Scala
mit
5,266
package com.twitter.querulous.sql import java.sql._ import java.util.Properties import com.mysql.jdbc.exceptions.jdbc4.CommunicationsException import java.net.SocketException import com.twitter.querulous.query.DestroyableConnection import org.apache.commons.dbcp.TesterConnection import java.util.concurrent.Executor c...
kievbs/querulous210
src/test/scala/com/twitter/querulous/sql/FakeConnection.scala
Scala
apache-2.0
3,649
package io.livingston.ditto.thrift import java.util.Base64 import com.twitter.finagle.thrift.{Protocols, ThriftClientRequest} import com.twitter.finagle.{ListeningServer, Service, Thrift} import com.twitter.util.{Await, Future} import com.typesafe.scalalogging.LazyLogging import io.livingston.ditto.Latency import org...
scottlivingston/ditto
ditto-thrift/src/main/scala/io/livingston/ditto/thrift/ThriftTrainer.scala
Scala
mit
2,256
package org.jetbrains.plugins.scala.lang.adjustTypes import com.intellij.psi.PsiNamedElement import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase import org.jetbrains.plugins.scala.extensions.{PsiElementExt, PsiNamedElementExt} import org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil import org.j...
loskutov/intellij-scala
test/org/jetbrains/plugins/scala/lang/adjustTypes/StaticJavaTest.scala
Scala
apache-2.0
1,898
package com.github.apuex.akka.gen.dao.mysql import com.github.apuex.akka.gen.util._ import com.github.apuex.akka.gen.util.TextNode._ import scala.xml.Node class MySqlDaoGenerator(xml: Node) { def generate(): Unit = { var dependency = Dependency(xml) xml.filter(x => x.label == "entity") .foreach(x => ...
apuex/akka-model-gen
src/main/scala/com/github/apuex/akka/gen/dao/mysql/MySqlDaoGenerator.scala
Scala
gpl-3.0
615
package scala.pickling package runtime import scala.collection.mutable import scala.collection.concurrent.TrieMap object GlobalRegistry { val picklerMap: mutable.Map[String, FastTypeTag[_] => Pickler[_]] = new TrieMap[String, FastTypeTag[_] => Pickler[_]] val unpicklerMap: mutable.Map[String, Unpickler[_]] =...
phaller/pickling
core/src/main/scala/scala/pickling/runtime/GlobalRegistry.scala
Scala
bsd-3-clause
361
package com.seanshubin.utility.duration.format import com.seanshubin.utility.duration.format.DurationFormat.{MillisecondsFormat, MillisecondsFormatPadded} import org.scalatest.FunSuite class MillisecondsFormatTest extends FunSuite { test("parse") { assertParse("0", "0") assertParse("1 day", "86,400,000") ...
SeanShubin/utility
duration-format/src/test/scala/com/seanshubin/utility/duration/format/MillisecondsFormatTest.scala
Scala
unlicense
4,537
package com.sksamuel.scrimage.filter import com.sksamuel.scrimage.ImmutableImage import org.scalatest.{BeforeAndAfter, FunSuite, OneInstancePerTest} class SnowFilterTest extends FunSuite with BeforeAndAfter with OneInstancePerTest { val original = ImmutableImage.fromStream(getClass.getResourceAsStream("/bird_small...
sksamuel/scrimage
scrimage-filters/src/test/scala/com/sksamuel/scrimage/filter/SnowFilterTest.scala
Scala
apache-2.0
595
package org.eoin import org.eoin.Chapter11._ import org.junit.Test import org.scalacheck.{Arbitrary, Gen} import org.scalatest.Matchers._ import org.scalatest.junit.JUnitSuite import org.scalatest.prop.GeneratorDrivenPropertyChecks import scala.language.higherKinds /** * Created by eoin.parker on 11/10/16. */ cl...
eoinparker/FunctionalProgrammingRedBook
src/test/scala/org/eoin/Chapter11TestSuite.scala
Scala
mit
4,216
package com.github.rbobin.playjsonmatch.processors import com.github.rbobin.playjsonmatch.FailureMessages import play.api.libs.json.JsValue object AnyValueProcessor extends SimpleProcessor { override val regex = "\\\\*".r override def doMatch(maybeJsValue: Option[JsValue]) = maybeJsValue match { case S...
rbobin/play-json-match
src/main/scala/com/github/rbobin/playjsonmatch/processors/AnyValueProcessor.scala
Scala
mit
400
object Test extends App { Api.foo }
som-snytt/dotty
tests/disabled/macro/run/macro-term-declared-in-annotation/Test_3.scala
Scala
apache-2.0
37
/** * Copyright 2009 Google 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 agree...
lgadi/ethelect
infrastructure/net.appjet.oui/logging.scala
Scala
apache-2.0
16,034
/* * Happy Melly Teller * Copyright (C) 2013 - 2015, Happy Melly http://www.happymelly.com * * This file is part of the Happy Melly Teller. * * Happy Melly Teller 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 Fo...
HappyMelly/teller
app/models/core/payment/GatewayWrapper.scala
Scala
gpl-3.0
9,107
package com.github.okapies.finagle.gntp.protocol import java.net.URI import com.twitter.naggati.Encoder import com.github.okapies.finagle.gntp._ object GntpRequestCodec extends GntpMessageCodec[Request] { import util.GntpBoolean._ import GntpConstants._ import GntpConstants.RequestMessageType._ import Head...
okapies/finagle-gntp
src/main/scala/com/github/okapies/finagle/gntp/protocol/GntpRequestCodec.scala
Scala
bsd-2-clause
3,040
/* * 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...
jackylk/incubator-carbondata
mv/core/src/test/scala/org/apache/carbondata/mv/rewrite/MVCoalesceTestCase.scala
Scala
apache-2.0
4,223
package com.twitter.finatra.http.filters import com.twitter.finagle.http.Request import com.twitter.finagle.http.filter.StatsFilter import com.twitter.finatra.filters.MergedFilter import javax.inject.Inject class CommonFilters @Inject()( a: AccessLoggingFilter, b: HttpResponseFilter, c: StatsFilter[Request], ...
kaushik94/finatra
http/src/main/scala/com/twitter/finatra/http/filters/CommonFilters.scala
Scala
apache-2.0
382
/* 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...
cchepelov/scalding
scalding-core/src/main/scala/com/twitter/scalding/Operations.scala
Scala
apache-2.0
27,826
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._ import at.logic.gapt.proofs.{ Ant, Sequent } import at.logic.gapt.provers.viper.aip.AnalyticInductionProver object prop...
gebner/gapt
examples/tip/prod/prop_29.scala
Scala
gpl-3.0
2,198
/* * EMWithBPTest.scala * Tests for the EM algorithm * * Created By: Michael Howard ([email protected]) * Creation Date: Jun 6, 2013 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email [email protected] for information. * * See http://www.github.com/p2t...
agarbuno/figaro
Figaro/src/test/scala/com/cra/figaro/test/algorithm/learning/EMWithBPTest.scala
Scala
bsd-3-clause
23,336
package au.com.dius.pact.provider import au.com.dius.pact.model.Request object ServiceInvokeRequest { def apply(url: String, request: Request):Request = { val r = request.copy r.setPath(s"$url${request.getPath}") r } }
Fitzoh/pact-jvm
pact-jvm-provider/src/main/scala/au/com/dius/pact/provider/ServiceInvokeRequest.scala
Scala
apache-2.0
237
/* * Copyright 2015 Rik van der Kleij * * 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 t...
epost/intellij-haskell
src/com/powertuple/intellij/haskell/view/AddDependencies.scala
Scala
apache-2.0
5,634
/* Copyright (C) 2008-2014 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
iesl/fuse_ttl
src/factorie-factorie_2.11-1.1/src/main/scala/cc/factorie/db/mongo/CubbieMongoTest.scala
Scala
apache-2.0
6,142
package org.jetbrains.plugins.scala.lang.refactoring.util import com.intellij.openapi.util.TextRange import com.intellij.psi._ import com.intellij.psi.util.PsiTreeUtil import org.jetbrains.plugins.scala.ScalaBundle import org.jetbrains.plugins.scala.extensions.ResolvesTo import org.jetbrains.plugins.scala.lang.psi.Sca...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/refactoring/util/ScalaVariableValidator.scala
Scala
apache-2.0
6,842
package modules.computation import org.scalatestplus.play._ import play.api._ import play.api.inject.guice.GuiceApplicationBuilder import scala.collection.mutable.ListBuffer /** * Tests the modules.computation.Pixel class */ class ClusterizerTest extends PlaySpec { // We need to instance a guice application t...
ArchangelX360/EnvironmentalEventsDetector
backend/test/modules/computation/ClusterizerTest.scala
Scala
mit
4,175
package com.besuikerd.autologistics.common.lib.util import java.awt.Toolkit import java.awt.datatransfer._ import java.io.IOException object ClipBoard { val systemClipboard = Toolkit.getDefaultToolkit.getSystemClipboard val clipboardOwner:ClipboardOwner = new ClipboardOwner { override def lostOwnership(clipbo...
besuikerd/AutoLogistics
src/main/scala/com/besuikerd/autologistics/common/lib/util/ClipBoard.scala
Scala
gpl-2.0
823
package com.ldaniels528.broadway.server import java.io.{File, FilenameFilter} import akka.actor.{Actor, ActorRef, ActorSystem, Props} import akka.routing.RoundRobinPool import com.ldaniels528.broadway.core.actors.file.ArchivingActor import com.ldaniels528.broadway.core.narrative.{Anthology, AnthologyParser} import co...
ldaniels528/shocktrade-broadway-server
src/main/scala/com/ldaniels528/broadway/server/ServerConfig.scala
Scala
apache-2.0
4,002
package com.avsystem.commons package misc import com.avsystem.commons.annotation.positioned import com.avsystem.commons.meta._ import com.avsystem.commons.serialization.{GenCaseInfo, GenCodec, GenParamInfo, GenUnionInfo, name} trait GenCodecStructure[T] { def codec: GenCodec[T] def structure: GenStructure[T] } a...
AVSystem/scala-commons
commons-core/src/test/scala/com/avsystem/commons/misc/AdtMetadataTest.scala
Scala
mit
3,400
package unfiltered.jetty object Https { /** bind to the given port for any host */ def apply(port: Int): Https = Https(port, "0.0.0.0") /** bind to a the loopback interface only */ def local(port: Int) = Https(port, "127.0.0.1") /** bind to any available port on the loopback interface */ def anylocal = loc...
softprops/Unfiltered
jetty/src/main/scala/secured.scala
Scala
mit
2,062
package scoverage import sbt._ object ScoverageKeys { // format: off lazy val coverageEnabled = settingKey[Boolean]( "controls whether code instrumentation is enabled or not" ) lazy val coverageReport = taskKey[Unit]("run report generation") lazy val coverageAggregate = taskKey[Unit]("aggregate reports ...
scoverage/sbt-scoverage
src/main/scala/scoverage/ScoverageKeys.scala
Scala
apache-2.0
2,225
/* * 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
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetProtobufCompatibilitySuite.scala
Scala
apache-2.0
2,909
// Copyright (C) 2019 MapRoulette contributors (see CONTRIBUTORS.md). // Licensed under the Apache License, Version 2.0 (see LICENSE). package org.maproulette.jobs import java.util.Calendar import akka.actor.{ActorRef, ActorSystem} import javax.inject.{Inject, Named} import org.maproulette.Config import org.maproulet...
Crashfreak/maproulette2
app/org/maproulette/jobs/Scheduler.scala
Scala
apache-2.0
5,446
/* * 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
mllib/src/main/scala/org/apache/spark/ml/feature/BucketedRandomProjectionLSH.scala
Scala
apache-2.0
9,044
package com.mentatlabs.nsa package scalac package dsl package experimental trait ScalacYNooptimiseDSL extends ScalacExperimentalDSL { object Ynooptimise { val unary_- = options.ScalacYNooptimise } }
mentat-labs/sbt-nsa
nsa-dsl/src/main/scala/com/mentatlabs/nsa/scalac/dsl/experimental/private/ScalacYNooptimiseDSL.scala
Scala
bsd-3-clause
213
package controllers import auth.AuthState import connectors.AuthConnector import javax.inject.Inject import play.api.mvc.{Action, AnyContent, Controller, Request} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future class AuthController @Inject()(authConnector: AuthConnector) exte...
ZDevelop94/RNG-GitHubAPI
app/controllers/AuthController.scala
Scala
apache-2.0
1,471
package com.lookout.borderpatrol.sessionx import com.lookout.borderpatrol.test._ class SessionSpec extends BorderPatrolSuite { import sessionx.helpers._ behavior of "Session" it should "expire" in { Session(sessionid.next, 1).expired should be(false) Session(sessionid.expired, 1).expired should be(tru...
tejom/borderpatrol
core/src/test/scala/com/lookout/borderpatrol/test/sessionx/SessionSpec.scala
Scala
mit
835
package vultura.factor.generation import org.specs2.Specification import org.specs2.matcher.{MatchResult, Matcher} import org.specs2.specification.core.SpecStructure import vultura.factor.Problem import scala.util.Random /** * Created by thomas on 02.01.17. */ class SingletonParameterizationTest extends Specifica...
ziggystar/vultura-factor
src/test/scala/vultura/factor/generation/SingletonParameterizationTest.scala
Scala
mit
1,746
package org.jetbrains.plugins.scala.codeInsight.intention.booleans import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.psi.{PsiDocumentManager, PsiElement} import org.jetbrains.plugins.scala.ex...
triplequote/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/codeInsight/intention/booleans/ExpandBooleanIntention.scala
Scala
apache-2.0
2,357
/* * 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 ...
ueshin/apache-spark
core/src/main/scala/org/apache/spark/executor/ExecutorMetricsPoller.scala
Scala
apache-2.0
7,806
/* * Copyright (c) 2012, TU Berlin * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions...
mzuber/simple-language
src/main/scala/impl/CombinatorParser.scala
Scala
bsd-3-clause
20,898
/* * Copyright 2018 Han van Venrooij * * 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 agree...
irundaia/sbt-sassify
src/main/scala/org/irundaia/util/extensions/package.scala
Scala
apache-2.0
852
/* * Copyright 2011-2018 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 applic...
wiacekm/gatling
gatling-core/src/main/scala/io/gatling/core/check/extractor/jsonpath/JsonPaths.scala
Scala
apache-2.0
1,496
object Test { def main(args: Array[String]): Unit = { new foo.bar.Foo new foo.Foo new Foo } } package foo { package bar { class Foo { new Object { println(this.getClass) // Foo$$anon$1 } new Object { println(this.getClass) // Foo$$anon$2 } } } clas...
som-snytt/dotty
tests/run/i2964e.scala
Scala
apache-2.0
477
/* * @author Philip Stutz * @author Sara Magliacane * * Copyright 2014 University of Zurich & VU University Amsterdam * * 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 * * ...
uzh/fox
src/main/scala/com/signalcollect/admm/optimizers/LinearConstraintOptimizer.scala
Scala
apache-2.0
3,270
import sbt._ import sbt.Keys._ import com.typesafe.sbt.SbtMultiJvm import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys.MultiJvm import com.typesafe.sbt.SbtScalariform import com.typesafe.sbt.SbtScalariform.ScalariformKeys object Build extends sbt.Build { lazy val root = Project("spray-socketio-root", file(".")) .a...
chamsiin1982/spray-socketio
project/Build.scala
Scala
apache-2.0
9,010
package org.moe.runtime.nativeobjects import org.moe.runtime._ import org.scalatest.FunSuite import org.scalatest.BeforeAndAfter class MoeNumObjectTestSuite extends FunSuite with BeforeAndAfter { var r : MoeRuntime = _ before { r = new MoeRuntime() r.bootstrap() } test("... simple Float object") {...
MoeOrganization/moe
src/test/scala/org/moe/runtime/nativeobjects/MoeNumObjectTestSuite.scala
Scala
mit
3,367
import sbt._ import Keys._ object Build extends Build { lazy val solicitorSettings = Defaults.defaultSettings ++ Seq( crossScalaVersions := Seq("2.10.4"), scalaVersion <<= (crossScalaVersions) { versions => versions.head }, scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature"), publishTo :...
gphat/solicitor
project/Build.scala
Scala
mit
2,362
package org.precompiler.spark101.helloworld /** * * @author Richard Li */ class MockConnection { def close(): Unit = { println("Connection closed") } }
precompiler/spark-101
learning-spark/src/main/scala/org/precompiler/spark101/helloworld/MockConnection.scala
Scala
apache-2.0
167
package chapter24 /** * 24.11 배열 * * 스칼라 컬렉션에서 배열은 특별하다. 자바 배열과 일대일로 대응한다. 스칼라 Array[Int]는 자바 * int[]으로 표현할 수 있다는 뜻이다. 하지만 동시에 자바 쪽의 같은 배열에 비해 훨씬 많은 기능을 제공한다. * * - 1. 스칼라 배열은 제네릭 하다. Array[T] * - 2. 스칼라 배열은 스칼라 시퀀스와 호환 가능하다. Array[T]를 Seq[T]가 필요한 곳에 넘길 수 있다. * - 3. 스칼라 배열은 모든 시퀀스의 연산을 지원한다. */ object c2...
seraekim/srkim-lang-scala
src/main/java/chapter24/c24_i11.scala
Scala
bsd-3-clause
6,429
/* * Copyright (c) 2006-2007, AIOTrade Computing Co. and Contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * o Redistributions of source code must retain the above copyrigh...
wandoulabs/wandou-math
wandou-indicator-basic/src/main/scala/org/aiotrade/lib/indicator/basic/MTMIndicator.scala
Scala
apache-2.0
2,268
package org.jetbrains.sbt import java.io.File import javax.swing.Icon import com.intellij.openapi.project.Project import org.jetbrains.annotations.NotNull import org.jetbrains.plugins.scala.buildinfo.BuildInfo import org.jetbrains.plugins.scala.icons.Icons /** * @author Pavel Fatin */ object Sbt { val Name = "sb...
triplequote/intellij-scala
scala/scala-impl/src/org/jetbrains/sbt/Sbt.scala
Scala
apache-2.0
1,925
package view import service.RequestCache import twirl.api.Html import util.StringUtil trait AvatarImageProvider { self: RequestCache => /** * Returns &lt;img&gt; which displays the avatar icon. * Looks up Gravatar if avatar icon has not been configured in user settings. */ protected def getAvatarImageHt...
kxbmap/gitbucket
src/main/scala/view/AvatarImageProvider.scala
Scala
apache-2.0
1,216
package org.jetbrains.plugins.scala package annotator package quickfix import com.intellij.codeInsight.intention.IntentionAction import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.psi.PsiFile import org.jetbrains.plugins.scala.lang.psi.api.base.ScLiteral import or...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/annotator/quickfix/AddLToLongLiteralFix.scala
Scala
apache-2.0
974
package collins.models import org.squeryl.PrimitiveTypeMode._ import org.squeryl.annotations.Column import org.squeryl.dsl.ast.BinaryOperatorNodeLogicalBoolean import org.squeryl.dsl.ast.LogicalBoolean import play.api.libs.json.Json import collins.models.asset.AssetView import collins.models.cache.Cache import colli...
discordianfish/collins
app/collins/models/IpmiInfo.scala
Scala
apache-2.0
5,469