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 im.actor.server.api.rpc.service.sequence import scala.concurrent.duration._ import scala.concurrent.{ ExecutionContext, Future } import scala.util.Success import akka.actor.ActorSystem import akka.stream.Materializer import akka.util.Timeout import slick.driver.PostgresDriver.api._ import im.actor.api.rpc._ ...
nguyenhongson03/actor-platform
actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/sequence/SequenceServiceImpl.scala
Scala
mit
6,094
/* * 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/responses/QueryMatch.scala
Scala
mit
1,257
package com.es.scala.chapter06 class Rational(n: Int, d: Int) { private def gcd(x: Int, y: Int): Int = { if (x == 0) y else if (x < 0) gcd(-x, y) else if (y < 0) -gcd(x, -y) else gcd(y % x, x) } private val g = gcd(n, d) val numer: Int = n / g val denom: Int = d / g def +(that: Rational) ...
chetankumart/learning-scala
ScalaByExample/src/main/scala/com/es/scala/chapter06/Rational.scala
Scala
apache-2.0
866
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/lgpl-3.0.en.html package spray.json import annotation.tailrec import java.lang.{ StringBuilder => JStringBuilder } /** * A JsonPrinter serializes a JSON AST to a String. */ trait JsonPrinter extends (JsV...
VlachJosef/ensime-server
json/src/main/scala/spray/json/JsonPrinter.scala
Scala
gpl-3.0
2,898
// Copyright 2016 Yahoo Inc. // Licensed under the terms of the Apache 2.0 license. // Please see LICENSE file in the project root for terms. package com.yahoo.ml.caffe import java.io.{File, ObjectInputStream, ByteArrayInputStream} import java.net.URI import caffe.Caffe._ import com.yahoo.ml.jcaffe._ import org.apac...
yahoo/CaffeOnSpark
caffe-grid/src/main/scala/com/yahoo/ml/caffe/ImageDataSource.scala
Scala
apache-2.0
5,527
/* * 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...
zhangxiaoli73/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/integration/torch/AbsSpec.scala
Scala
apache-2.0
2,199
/* * 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 ...
sgururajshetty/carbondata
integration/spark2/src/main/commonTo2.2And2.3/org/apache/spark/sql/hive/CarbonInMemorySessionState.scala
Scala
apache-2.0
10,249
package com.airbnb.notification import java.util.logging.{Level, Logger} import akka.actor.{Terminated, Actor} import org.apache.commons.mail.{DefaultAuthenticator, SimpleEmail} import com.airbnb.scheduler.jobs.BaseJob /** * A very simple mail client that works out of the box with providers such as Amazon SES. * TO...
doronin/chronos
src/main/scala/com/airbnb/notification/MailClient.scala
Scala
apache-2.0
1,499
package com.socialthingy.p2p import java.net.{InetAddress, InetSocketAddress} import java.nio.ByteBuffer import org.scalatest.{FlatSpec, Matchers} class PacketUtilsSpec extends FlatSpec with Matchers { "PacketUtils" should "compress and decompress a message" in { val messageIn = ByteBuffer.allocate(16384) ...
alangibson27/plus-f
plus-f/src/test/scala/com/socialthingy/p2p/PacketUtilsSpec.scala
Scala
mit
1,089
package scoverage import java.io.File import java.util.concurrent.Executors import org.scalatest.{BeforeAndAfter, FunSuite} import scala.concurrent._ import scala.concurrent.duration._ /** * Verify that [[Invoker.invoked()]] is thread-safe */ class InvokerConcurrencyTest extends FunSuite with BeforeAndAfter { ...
gslowikowski/scalac-scoverage-plugin
scalac-scoverage-runtime/jvm/src/test/scala/scoverage/InvokerConcurrencyTest.scala
Scala
apache-2.0
1,441
/* * 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/main/scala/org/apache/flink/table/planner/plan/optimize/BatchCommonSubGraphBasedOptimizer.scala
Scala
apache-2.0
3,792
import akka.actor.{ActorSystem, Props} import akka.testkit.{ImplicitSender, TestActors, TestKit} import hu.bme.mit.ire._ import hu.bme.mit.ire.messages.{ChangeSet, Primary, Secondary} import hu.bme.mit.ire.nodes.binary.JoinNode import hu.bme.mit.ire.nodes.unary.{ProductionNode, SelectionNode} import hu.bme.mit.ire.util...
FTSRG/ire
src/test/scala/TerminatorTest.scala
Scala
epl-1.0
4,326
/* * 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 ...
manishgupta88/carbondata
examples/spark2/src/main/scala/org/apache/carbondata/examples/AlluxioExample.scala
Scala
apache-2.0
4,436
/* * 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/main/scala/org/apache/spark/sql/execution/columnar/InMemoryColumnarTableScan.scala
Scala
apache-2.0
13,184
package org.chipmunk.test.relation import scala.collection.mutable import org.chipmunk.entity.Identifiable import org.chipmunk.entity.Identifiable.Id import org.chipmunk.entity.relation.m2m.Association2 import org.squeryl.dsl.{ ManyToMany => SManyToMany } object ManyToMany { def apply[O <: Identifiable]( outer...
kpjjpk/chipmunk
src/main/scala/org/chipmunk/test/relation/ManyToMany.scala
Scala
mit
1,878
package org.opencommercesearch.api.models /* * Licensed to OpenCommerceSearch under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. OpenCommerceSearch licenses this * file to you under the Apache License, Version...
madickson/opencommercesearch
opencommercesearch-api/app/org/opencommercesearch/api/models/UserQuery.scala
Scala
apache-2.0
1,654
/* * 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 ...
ajbozarth/incubator-livy
repl/src/test/scala/org/apache/livy/repl/ReplDriverSuite.scala
Scala
apache-2.0
2,546
package intellijhocon.codestyle import com.intellij.psi.codeStyle.{DisplayPriority, CodeStyleSettings, CodeStyleSettingsProvider} import com.intellij.application.options.{TabbedLanguageCodeStylePanel, CodeStyleAbstractConfigurable} import intellijhocon.lang.HoconLanguage class HoconCodeStyleSettingsProvider extends C...
consulo/consulo-scala
intellij-hocon/src/main/scala/intellijhocon/codestyle/HoconCodeStyleSettingsProvider.scala
Scala
apache-2.0
949
package org.shapelogic.sc.imageutil /** * To chain more PixelHandlers.<br /> * * @author Sami Badawi */ trait HasPixelArea { def getPixelArea(): PixelArea def setPixelArea(pixelArea: PixelArea): Unit }
sami-badawi/shapelogic-scala
src/main/scala/org/shapelogic/sc/imageutil/HasPixelArea.scala
Scala
mit
211
package co.blocke.scalajack package yaml package mapkeys import TestUtil._ import munit._ import munit.internal.console import java.util.UUID class ValueClassKeys() extends FunSuite: val sj = ScalaJack(YamlFlavor()) test("Value class of BigDecimal") { describe( "-------------------------------------\n...
gzoller/ScalaJack
core/src/test/scala/co.blocke.scalajack/yaml/mapkeys/ValueClassKeys.scala
Scala
mit
18,884
package utils.pageobjects import utils.pageobjects.circumstances.start_of_process._ import utils.pageobjects.circumstances.consent_and_declaration.GCircsDeclarationPage import utils.pageobjects.circumstances.report_changes._ object CircumstancesPageFactory extends PageFactory { def buildPageFromUrl(url: String,ctx...
Department-for-Work-and-Pensions/ClaimCapture
c3/test/utils/pageobjects/CircumstancesPageFactory.scala
Scala
mit
1,544
package au.com.dius.pact.consumer.specs2 import java.util.concurrent.Executors import au.com.dius.pact.consumer.dispatch.HttpClient import au.com.dius.pact.model.{OptionalBody, PactReader, Request} import scala.collection.JavaConversions import scala.concurrent.{ExecutionContext, Future} case class ConsumerService(...
olga-vasylchenko/pact-jvm
pact-jvm-consumer-specs2/src/test/scala/au/com/dius/pact/consumer/specs2/ConsumerService.scala
Scala
apache-2.0
1,558
package net.xylophones.planetoid.game.model import com.fasterxml.jackson.module.scala.JsonScalaEnumeration import net.xylophones.planetoid.game.model.Winner.Winner case class GameModel(val planet: Planet, val players: Players, val explosions: Set[Explosion] = Set(), ...
wjsrobertson/planetoid3d
game/src/main/scala/net/xylophones/planetoid/game/model/GameModel.scala
Scala
apache-2.0
570
/* * The MIT License (MIT) * * Copyright (c) 2014 Heiko Blobner * * 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...
windelknecht/stup-utils
src/test/scala/de/windelknecht/stup/utils/tools/BitTwiddlingSpec.scala
Scala
mit
3,718
package com.brkyvz.spark import scala.language.implicitConversions import org.apache.spark.mllib.linalg._ package object linalg { implicit def wrapDenseMatrix(x: DenseMatrix): DenseMatrixWrapper = DenseMatrixWrapper(x) implicit def wrapSparseMatrix(x: SparseMatrix): SparseMatrixWrapper = SparseMatrixWrapper(x) ...
brkyvz/lazy-linalg
src/main/scala/com/brkyvz/spark/linalg/package.scala
Scala
apache-2.0
1,950
package com.socrata.spandex.common.client import com.rojoma.json.v3.codec.JsonEncode import com.rojoma.json.v3.util.JsonUtil import org.elasticsearch.action.index.IndexRequest import org.elasticsearch.action.update.UpdateRequest import org.elasticsearch.common.xcontent.XContentType object ElasticsearchRequestFactorie...
socrata-platform/spandex
spandex-common/src/main/scala/com/socrata/spandex/common/client/ElasticsearchRequestFactories.scala
Scala
apache-2.0
750
/* * 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/accounts/frs102/boxes/AC118.scala
Scala
apache-2.0
1,477
/* * 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/gmp-frontend
test/views/html/ContributionsEarningsSpec.scala
Scala
apache-2.0
2,381
/* * Copyright 2001-2008 Artima, 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 agre...
kevinwright/scalatest
src/test/scala/org/scalatest/junit/RunNotifierSuite.scala
Scala
apache-2.0
8,279
package lila.relation import akka.stream.scaladsl._ import reactivemongo.akkastream.cursorProducer import reactivemongo.api.ReadPreference import scala.concurrent.duration._ import lila.common.config.MaxPerSecond import lila.db.dsl._ import lila.user.{ User, UserRepo } final class RelationStream( coll: Coll, ...
luanlv/lila
modules/relation/src/main/RelationStream.scala
Scala
mit
1,411
package org.kirhgoff.ap.model.lifegame import java.awt.Graphics import org.kirhgoff.ap.core._ import scala.util.Random //------------------------------- // Model //--------------------------------- class LifeGameElementMerger extends ElementMerger () { override def createdElement(target: Element, update: Element...
kirhgoff/life-server
app/org/kirhgoff/ap/model/lifegame/LifeGameWorldModel.scala
Scala
mit
2,566
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package impl import com.lightbend.lagom.scaladsl.api.ServiceCall import api.FooService import scala.concurrent.duration._ import akka.discovery.Discovery import akka.actor.ActorSystem class FooServiceImpl(actorSystem: ActorSystem) extends FooService ...
lagom/lagom
dev/sbt-plugin/src/sbt-test/sbt-plugin/service-discovery/a/impl/src/main/scala/impl/FooServiceImpl.scala
Scala
apache-2.0
575
package fm.http.client import fm.common.IP import io.netty.channel.ChannelHandler import java.net.{InetSocketAddress, SocketAddress} final case class ProxyOptions( proxyType: ProxyType, host: String, port: Int, user: Option[String], pass: Option[String] ) { def makeChannelHandler: ChannelHandler = proxyTy...
er1c/fm-http
src/main/scala/fm/http/client/ProxyOptions.scala
Scala
apache-2.0
513
package dotty.tools package dotc package core package tasty import dotty.tools.tasty.TastyFormat.SOURCE import dotty.tools.tasty.TastyBuffer import TastyBuffer._ import ast._ import ast.Trees._ import ast.Trees.WithLazyField import util.{SourceFile, NoSource} import core._ import Contexts._, Symbols._, Annotations._,...
som-snytt/dotty
compiler/src/dotty/tools/dotc/core/tasty/PositionPickler.scala
Scala
apache-2.0
3,883
//package de.sciss.connect //package impl // //import de.sciss.synth.proc.Sys // //object ElementImpl { // import scala.{Int => _Int} // // object Int { // def newVar[S <: Sys[S]](init: _Int)(implicit tx: S#Tx): NodeChanged.Int.Var[S] = ??? // // private final class VarImpl[S <: Sys[S]] // } //}
Sciss/SoundDesigner
src/main/scala/de/sciss/connect/impl/ElementImpl.scala
Scala
gpl-2.0
305
/** * 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...
WillCh/cs286A
dataMover/kafka/core/src/test/scala/unit/kafka/zk/ZKPathTest.scala
Scala
bsd-2-clause
5,884
package io.getquill import io.getquill.ast._ import io.getquill.context.sql.{ FlattenSqlQuery, SqlQuery } import io.getquill.context.sql.idiom._ import io.getquill.idiom.{ StringToken, Token } import io.getquill.idiom.Statement import io.getquill.idiom.StatementInterpolator._ import io.getquill.util.Messages.fail tra...
mentegy/quill
quill-sql/src/main/scala/io/getquill/SQLServerDialect.scala
Scala
apache-2.0
2,186
/* * 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 ...
zzcclp/carbondata
integration/spark/src/test/scala/org/apache/carbondata/index/bloom/BloomCoarseGrainIndexSuite.scala
Scala
apache-2.0
42,737
/* * 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 ...
chuckchen/spark
sql/core/src/test/scala/org/apache/spark/sql/TPCDSQueryTestSuite.scala
Scala
apache-2.0
5,689
/** * * ${FILE_NAME} * Ledger wallet * * Created by Pierre Pollastri on 09/01/15. * * The MIT License (MIT) * * Copyright (c) 2015 Ledger * * 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...
Morveus/ledger-wallet-android
app/src/main/scala/com/ledger/ledgerwallet/utils/TR.scala
Scala
mit
3,873
package at.logic.gapt.proofs.expansion import at.logic.gapt.expr._ import Polarity._ import at.logic.gapt.expr.hol.containsQuantifierOnLogicalLevel import at.logic.gapt.proofs.Sequent object prenexifyET { private def weakQuantifier( polarity: Polarity ) = polarity match { case Positive => Ex case Ne...
gebner/gapt
core/src/main/scala/at/logic/gapt/proofs/expansion/prenexifyET.scala
Scala
gpl-3.0
4,521
/* * 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 ...
hhbyyh/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFileFormat.scala
Scala
apache-2.0
30,605
/* * 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...
intel-analytics/BigDL
scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/nn/ThresholdSpec.scala
Scala
apache-2.0
5,968
package org.jetbrains.plugins.scala package lang package surroundWith package surrounders package expression /** * @author: Dmitry Krasilschikov */ import com.intellij.psi.PsiElement import com.intellij.lang.ASTNode import com.intellij.openapi.util.TextRange import org.jetbrains.plugins.scala.lang.lexer.ScalaToken...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/surroundWith/surrounders/expression/ScalaWithForYieldSurrounder.scala
Scala
apache-2.0
1,348
package extruder.metrics.prometheus package object push extends PrometheusPushEncoder with PrometheusPushDataSource with PrometheusPushEncoderInstances { object encoder extends PrometheusPushEncoder with PrometheusPushDataSource object instances extends PrometheusPushEncoderInstances }
janstenpickle/extruder
metrics/prometheus/src/main/scala/extruder/metrics/prometheus/push/package.scala
Scala
mit
292
package com.twitter.zipkin.query /* * 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 re...
netconstructor/zipkin
zipkin-server/src/main/scala/com/twitter/zipkin/query/ZipkinQuery.scala
Scala
apache-2.0
2,267
package ch.wsl.model.shared /** * Created by andreaminetti on 16/03/16. */ case class JSONSchema( `type`:String, title:Option[String] = None, properties: Map[String,JSONSchemaL2] = Map(), required: Option[Seq[String]] = No...
minettiandrea/postgres-restify
shared/src/main/scala/ch/wsl/model/shared/JSONSchema.scala
Scala
apache-2.0
1,519
/* * Copyright (C) 2014 - 2017 Contributors as noted in the AUTHORS.md file * * 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)...
Tensei-Data/tensei-agent
src/it/scala/usecases/databases/CopyBetweenDatabases.scala
Scala
agpl-3.0
94,992
package elascala import java.util.Date import org.junit.Test import support.{ESIntegrationTest, Person} /** * Created by vayne on 15. 2. 16.. */ class ElascalaTest extends ESIntegrationTest { val sut = new Elascala("http://127.0.0.1", 9200) @Test def canUpdate() { val inserted = sut.insert(("name" -> "vay...
MinCha/elascala
src/test/scala/elascala/ElascalaTest.scala
Scala
apache-2.0
1,873
import sbt.Keys._ import sbt.ScriptedPlugin.autoImport._ import sbt.VirtualAxis.PlatformAxis import sbt._ import sbt.internal.ProjectMatrix case class SbtAxis(fullVersion: Option[String], idSuffix: String, directorySuffix: String) extends VirtualAxis.WeakAxis { val scalaVersion: String = fullVersion.map(Vers...
rtimush/sbt-updates
project/SbtAxis.scala
Scala
bsd-3-clause
2,487
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * 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...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/feats/HalfElfDilettanteBard.scala
Scala
apache-2.0
1,665
package edu.rmellema.Scalacalc import scala.annotation.tailrec object Tokenizer { @tailrec private def tokenizeImpl(s: String, acc: List[String]): List[String] = { if (s.isEmpty) { acc } else { val c: Char = s.head val t = s.tail if (c.isLetter) tokenizeImpl(t.dropWhile(_.is...
rmellema/Scalacalc
src/edu/rmellema/Scalacalc/Tokenizer.scala
Scala
mit
965
package vk.scout.wrap.messages import vk.scout.wrap.ApiConnector case class MessagesMarkAsImportant(messageIds: Traversable[Int], important: Boolean) extends ApiConnector { protected[this] val methodName: String = "messages.markAsRead" protected[this] def apiParamsMap: Map[Stri...
ipostanogov/vk-scout
src/main/scala/vk/scout/wrap/messages/MessagesMarkAsImportant.scala
Scala
mit
459
package scalan.collections import scala.reflect.ClassTag import scalan.common.OverloadHack.Overloaded1 import scalan.staged.BaseExp import scalan.{Scalan, ScalanExp, ScalanStd} import scala.reflect.runtime.universe._ trait ListOps { self: Scalan => type Lst[T] = Rep[List[T]] implicit class RepListOps[T: Elem](xs:...
PCMNN/scalan-ce
core/src/main/scala/scalan/collections/ListOps.scala
Scala
apache-2.0
14,291
package com.glowingavenger.plan.model.action import com.glowingavenger.plan.model.state.{BeliefState, Answer} case class Question(attr: Symbol) extends Action { override def result(state: BeliefState): BeliefState = { if (applicableIn(state)) Answer(state.predicates, attr) else state } override d...
dreef3/glowing-avenger
src/main/scala/com/glowingavenger/plan/model/action/Question.scala
Scala
mit
566
/* * 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
examples/src/main/scala/org/apache/spark/streaming/examples/TwitterPopularTags.scala
Scala
apache-2.0
2,873
import org.scalatest.{FunSuite, Matchers} /** * Created by inieto on 27/04/15. */ class _09_Sets extends FunSuite with Matchers { /* Sets are Iterables that contain no duplicate elements. The operations on sets are summarized in the following table for general sets and in the table after that for mutable sets...
inieto/scala-47deg
ScalaExercises/src/test/scala-2.11/_09_Sets.scala
Scala
mit
4,964
/* * 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-workbench-outdated/src/main/scala/de/fuberlin/wiwiss/silk/workbench/lift/snippet/OutputDialog.scala
Scala
apache-2.0
1,956
/* * 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 ...
wgpshashank/spark
core/src/main/scala/spark/rdd/GlommedRDD.scala
Scala
apache-2.0
1,173
/********************************************************************** * See the NOTICE file distributed with this work for additional * * information regarding Copyright ownership. The author/authors * * license this file to you under the terms of the Apache License, * * Version 2.0 (the "License");...
reactivecodes/sbt-codes
src/main/scala/codes/reactive/sbt/SbtCodesOsgi.scala
Scala
apache-2.0
3,279
/** * Β© 2019 Refinitiv. 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 License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
e-orz/CM-Well
server/cmwell-data-tools/src/main/scala/cmwell/tools/data/downloader/streams/Downloader.scala
Scala
apache-2.0
18,641
package demo.components import chandu0101.macros.tojs.GhPagesMacros import chandu0101.scalajs.react.components.{ReactTagsInput, ReactTagsInputM, RefHolder} import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.prefix_<^._ import scala.scalajs.js object ReactTagsInputDemo { val code = GhPagesMacros.ex...
elacin/scalajs-react-components
demo/src/main/scala/demo/components/ReactTagsInputDemo.scala
Scala
apache-2.0
1,256
package EntityStore.Interface import java.util import CSON._ import HandlerSocket.Protocol.MySQLErrorCodes import akka.io.Tcp import CSON.Types._ import EntityInterface._ import akka.util.ByteString import java.nio.{ByteOrder, ByteBuffer} import akka.actor.{ActorRef,ActorSystem} import java.util.concurrent.Concurrent...
Mevolutrix/MevoFramework
Interface.EntityStore/src/main/scala/EntityStore/Interface/StoreCommunication.scala
Scala
apache-2.0
13,980
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\\ * @ @ * * # # # # (c) 2017 CAB * * # # # # # # ...
AlexCAB/MathAct
mathact_tools/src/main/scala/mathact/tools/Sketches.scala
Scala
mit
3,535
package dotty.tools.dotc.util import collection.immutable /** A linear map is a map where after an `updated` the previous map * value cannot be used anymore. The map is implemented as an immutable * map for sizes <= 4 (where immutable maps have specialized, compact * representations) and as a HashMap for larger...
dotty-staging/dotty
compiler/src/dotty/tools/dotc/util/LinearMap.scala
Scala
apache-2.0
1,383
/* * Copyright 2013-2015 Websudos, Limited. * * 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 c...
levinson/phantom
phantom-jdk8/src/test/scala/com/websudos/phantom/jdk8/tables/ConcretePrimitivesJdk8.scala
Scala
bsd-2-clause
2,837
package pieces import chessagents.Translation /** * Created by Aleksandra on 12.05.2016. */ class Rook (val color : String) extends Piece{ var possibleMovements = Array.ofDim[Translation](4,7) possibleMovements = Array( Array( new Translation(1, 0), new Translation(2, 0), new Translation(3, 0...
m-kostrzewa/ChessAgents
src/pieces/Rook.scala
Scala
mit
1,598
/* * Copyright 2018 Roberto Tyley * * 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...
rtyley/play-git-hub
src/main/scala/com/madgag/scalagithub/model/Status.scala
Scala
gpl-3.0
2,377
/** * Copyright (C) 2015 Orbeon, Inc. * * 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 * 2.1 of the License, or (at your option) any later version. * * This program i...
wesley1001/orbeon-forms
src/main/scala/org/orbeon/oxf/xforms/analysis/model/DependencyAnalyzer.scala
Scala
lgpl-2.1
5,721
package io.finch.petstore import _root_.argonaut._ import _root_.argonaut.Argonaut._ import org.scalatest.prop.Checkers import org.scalatest.{FlatSpec, Matchers} /* Tests for Order */ class OrderSpec extends FlatSpec with Matchers with Checkers{ "The Order codec" should "correctly decode JSON to Order" in { c...
peel/finch
petstore/src/test/scala/io/finch/petstore/OrderSpec.scala
Scala
apache-2.0
610
package geotrellis.run import akka.kernel.Bootable import scala.util.Random import com.typesafe.config.ConfigFactory import akka.actor.{ ActorRef, Props, Actor, ActorSystem } import geotrellis.raster.op._ import geotrellis.process._ import geotrellis._ class RemoteClientApplication extends Bootable { val system ...
Tjoene/thesis
Case_Programs/geotrellis-0.7.0/tasks/src/main/scala/geotrellis/run/RemoteClient.scala
Scala
gpl-2.0
2,449
package views.vrm_assign import composition.TestHarness import helpers.vrm_assign.CookieFactoryForUISpecs import org.openqa.selenium.{By, WebElement, WebDriver} import org.scalatest.selenium.WebBrowser.{click, currentUrl, go} import pages.vrm_assign.BeforeYouStartPage import pages.vrm_assign.LeaveFeedbackPage import p...
dvla/vrm-assign-online
test/views/vrm_assign/PaymentFailureIntegrationSpec.scala
Scala
mit
2,929
package functionalops.kafka.metrics import scalaz._ import Scalaz._ import scalaz.effect._ import javax.management._ trait Types { type MBeanAction[A] = MBeanServerConnection => IO[A] type ListenerAction[A] = Notification => A => IO[Unit] type RegistrationAction[A] = ListenerAction[A] => ObjectName => MBea...
springning/kafka-metrics
src/main/scala/types.scala
Scala
bsd-3-clause
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 ...
davidzchen/samza
samza-kafka/src/main/scala/org/apache/samza/util/KafkaUtil.scala
Scala
apache-2.0
2,974
package models.request import play.api.libs.json.Json case class AddCardRequest( recipients: Seq[String], senders: Seq[String], message: String) { } object AddCardRequest { implicit val format = Json.format[AddCardRequest] }
PureHacks/KudosBoard
app/models/request/AddCardRequest.scala
Scala
mit
283
package org.mbari.opencv import java.awt.image.{DataBufferByte, BufferedImage} import java.io.{ByteArrayInputStream, File} import javax.imageio.ImageIO import org.opencv.core.{CvType, MatOfByte, Mat, Core} import org.mbari.nativelib.Native import org.opencv.highgui.Highgui import org.slf4j.LoggerFactory /** * This o...
hohonuuli/opencv-imgofinterest
src/main/scala/org/mbari/opencv/OpenCV.scala
Scala
mit
2,161
package io.finch.route import com.twitter.finagle.Service import com.twitter.finagle.httpx.Response import com.twitter.util.Future import io.finch._ import io.finch.request.{RequestReader, ToRequest} import io.finch.response.{EncodeResponse, NotFound, Ok} import scala.annotation.implicitNotFound import shapeless.{Copr...
penland365/finch
core/src/main/scala/io/finch/route/ToService.scala
Scala
apache-2.0
4,738
import scala.reflect.macros.blackbox.Context object Macros { def returnsString(i: Double): String = macro returnsIntImpl def returnsIntImpl(c: Context)(i: c.Expr[Double]): c.Expr[Int] = ??? }
yusuke2255/dotty
tests/untried/neg/t5689.scala
Scala
bsd-3-clause
197
/* * 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
impl/src/main/scala/quasar/impl/local/LocalDatasource.scala
Scala
apache-2.0
1,397
// - Project: scalajs-angulate (https://github.com/jokade/scalajs-angulate) // Description: Defines angulate-specific annotations // // Distributed under the MIT License (see included file LICENSE) package biz.enef.angulate import acyclic.file import scala.annotation.StaticAnnotation import scala.scalajs.js /** * ...
CapeSepias/scalajs-angulate
src/main/scala/biz/enef/angulate/annotations.scala
Scala
mit
987
package io.reactors package container import scala.collection._ import scala.annotation.implicitNotFound import io.reactors.common.BinaryHeap /** Reactive binary heap. * * Exposes a signal `head`, used to probe or subscribe to changes to * the first element in the heap. * * @tparam T type of th...
storm-enroute/reactive-collections
reactors-container/shared/src/main/scala/io/reactors/container/RBinaryHeap.scala
Scala
bsd-3-clause
1,731
/* * 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...
VlachJosef/bforms-frontend
app/uk/gov/hmrc/bforms/models/FormTypeId.scala
Scala
apache-2.0
929
/* * Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com> */ package play.core.server import java.lang.management.ManagementFactory import java.util.Properties /** * Abstracts a JVM process so it can be mocked for testing or to * isolate pseudo-processes within a VM. Code using this class * should...
Shenker93/playframework
framework/src/play-server/src/main/scala/play/core/server/ServerProcess.scala
Scala
apache-2.0
2,234
/* * 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 ...
greghogan/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/stream/table/TemporalTableFunctionJoinTest.scala
Scala
apache-2.0
6,447
package scala2ch.session import org.scalatest.{MustMatchers, WordSpecLike} import scala.concurrent.Await import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ class SessionTest extends WordSpecLike with MustMatchers { "Session" must { "get key-value pair" in { val s...
TanUkkii007/scala2ch
src/test/scala/scala2ch/session/SessionTest.scala
Scala
mit
682
package org.qirx.littlespec.fragments import org.qirx.littlespec.Specification object FragmentContainerSpec extends Specification { "Specification should be able to execute fragments resulting in" - { def todoResult(title: String) = Pending(Text(title), "TODO") "no results if empty" - { val contain...
EECOLOR/little-spec
core/src/test/scala/org/qirx/littlespec/fragments/FragmentContainerSpec.scala
Scala
mit
1,108
package info.armado.ausleihe.client.remote.services import java.time.Year import info.armado.ausleihe.client.transport.dataobjects.entities._ import info.armado.ausleihe.client.transport.dataobjects.information.GameInformationDTO import info.armado.ausleihe.client.transport.dataobjects.inuse._ import info.armado.ausle...
Spielekreis-Darmstadt/lending
lending-client-backend/src/main/scala/info/armado/ausleihe/client/remote/services/UniversalService.scala
Scala
apache-2.0
6,836
package com.identityblitz.log import com.identityblitz.log.service.spi.LogConfService import com.identityblitz.conf.BlitzConf /** */ class TestLogConfService extends BlitzConf("log") with LogConfService { }
brainysmith/log-lib
src/test/scala/com/identityblitz/log/TestLogConfService.scala
Scala
mit
210
/* * 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 ...
Zhangshunyu/incubator-carbondata
integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/Compactor.scala
Scala
apache-2.0
6,671
/* * Copyright 2001-2013 Artima, 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 writ...
travisbrown/scalatest
src/test/scala/org/scalatest/ListShouldContainTheSameElementsAsLogicalAndSpec.scala
Scala
apache-2.0
49,972
package scala.macros package semantic private[macros] trait Semantic extends Denotations with Flags with Mirrors with Symbols with Operations with Types { self: Universe => implicit class XtensionSemanticRef(ref: Ref)(implicit protected val m: Mirror) extends SymbolBasedOps { def s...
xeno-by/scalamacros
core/src/main/scala/scala/macros/semantic/Semantic.scala
Scala
bsd-3-clause
1,213
package org.salgo.sorting import scala.annotation.tailrec import scala.collection.immutable.:: import scala.reflect.ClassTag object MergeSort extends GeneralFunctionalSortingAlgorithm { def sort[T: ClassTag](a: Seq[T])(implicit ev: T => Ordered[T]) : Seq[T] = { a.length match { case n if n < 2 => a ...
ascensio/salgo
src/org.salgo/sorting/MergeSort.scala
Scala
apache-2.0
928
package com.github.davidhoyt.playground.learn import java.util.Objects object CaseClass { //Desugared case class class Book(val title: String, val authors: List[String]) { override def hashCode(): Int = super.hashCode() + Objects.hash(title, authors) override def equals(obj: scala.Any): Boolean = ...
davidhoyt/playground-scala
src/main/scala/com/github/davidhoyt/playground/learn/CaseClass.scala
Scala
apache-2.0
680
/* * 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 ...
mahak/spark
core/src/main/scala/org/apache/spark/scheduler/ShuffleMapTask.scala
Scala
apache-2.0
4,669
package lila.round import akka.actor._ import akka.stream.scaladsl._ import org.joda.time.DateTime import scala.concurrent.duration._ import lila.common.LilaStream import lila.db.dsl._ import lila.game.{ Game, GameRepo, Query } import lila.round.actorApi.round.{ Abandon, QuietFlag } /* * Cleans up unfinished games ...
luanlv/lila
modules/round/src/main/Titivate.scala
Scala
mit
3,610
package com.outr.stripe.connect case class TransferSchedule(delayDays: Int, interval: String, monthlyAnchor: Option[Int], weeklyAnchor: Option[String])
outr/scala-stripe
core/jvm/src/main/scala/com/outr/stripe/connect/TransferSchedule.scala
Scala
mit
153
import scala.tools.nsc._ import scala.tools.partest.ReplTest object Test extends ReplTest { def code = """ import scala.language.experimental._, scala.reflect.macros.blackbox.Context object GrabContext { def lastContext = Option(System.getProperties.get("lastContext").asInstanceOf[reflect.macros.runtim...
yusuke2255/dotty
tests/disabled/macro/run/macro-system-properties.scala
Scala
bsd-3-clause
735
/** * 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 ...
VinACE/adam
adam-core/src/test/scala/org/bdgenomics/adam/util/IntervalListReaderSuite.scala
Scala
apache-2.0
1,678
/* * Copyright 2017 PayPal * * 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 ...
Harikiranvuyyuru/squbs
squbs-ext/src/test/scala/org/squbs/env/EnvironmentSpec.scala
Scala
apache-2.0
2,818
package com.freshsoft.matterbridge.util import org.flywaydb.core.Flyway import scala.util.Try /** * Database migrations */ class FlywayService(jdbcUrl: String, dbUser: String, dbPassword: String) { private[this] val flyway = new Flyway() flyway.setDataSource(jdbcUrl, dbUser, dbPassword) def migrateDataba...
Freshwood/matterbridge
src/main/scala/com/freshsoft/matterbridge/util/FlywayService.scala
Scala
mit
464