code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
/* * Copyright 2010 Data Fueled * * 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 ...
waywardmonkeys/trace
trace-local/src/main/scala/com/datafueled/trace/local/util/Timer.scala
Scala
apache-2.0
1,016
package com.github.hgiddens.ausms package telstra import io.circe.Json import io.circe.syntax._ import org.specs2.matcher.{ Matcher, MatcherMacros } import org.specs2.mutable.Specification object MessageStatusResponseSpec extends Specification with MatcherMacros { def body(status: String) = Json.obj( "to"...
hgiddens/au-sms
telstra-client/src/test/scala/com/github/hgiddens/ausms/telstra/ResourcesSpec.scala
Scala
mit
1,279
package org.elasticmq.rest.sqs.model import org.elasticmq.rest.sqs.model.RedrivePolicy.{BackwardCompatibleRedrivePolicy, RedrivePolicy} import spray.json.{ DefaultJsonProtocol, JsNumber, JsObject, JsString, JsValue, JsonFormat, JsonReader, JsonWriter, deserializationError } object RedrivePolicyJson ...
adamw/elasticmq
rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/model/RedrivePolicyJson.scala
Scala
apache-2.0
1,859
/* * Copyright 2015 * * 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, ...
TouK/influxdb-reporter
core/src/main/scala/influxdbreporter/core/metrics/push/Meter.scala
Scala
apache-2.0
1,041
/* * The MIT License (MIT) * * Copyright (C) 2012 47 Degrees, LLC http://47deg.com [email protected] * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including with...
47deg/mvessel
core/src/main/scala/com/fortysevendeg/mvessel/util/DateUtils.scala
Scala
mit
1,440
/* * Copyright (C) 2012 Pavel Fatin <http://pavelfatin.com> * * 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 your option) any later version. * ...
pavelfatin/toyfs
src/test/scala/com/pavelfatin/fs/internal/toyfs/MockRecordStorage.scala
Scala
gpl-3.0
1,350
/* * 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
sql/core/src/test/scala/org/apache/spark/sql/execution/ShufflePartitionsUtilSuite.scala
Scala
apache-2.0
11,185
/*********************************************************************** * Copyright (c) 2013-2017 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
ronq/geomesa
geomesa-fs/geomesa-fs-tools/src/main/scala/org/locationtech/geomesa/fs/tools/compact/CompactCommand.scala
Scala
apache-2.0
4,039
/* * Copyright (c) 2014-2021 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...
monifu/monix
monix-reactive/shared/src/test/scala/monix/reactive/observers/ContramapObserverSuite.scala
Scala
apache-2.0
2,495
package com.bostontechnologies.quickfixs.messages import scala.collection.JavaConversions._ import quickfix.field._ import quickfix.Message import com.bostontechnologies.quickfixs.components.{RoutingGroup, Entry} import com.bostontechnologies.quickfixs.fields.RichGroup import quickfix.fix50.MarketDataSnapshotFullRefre...
Forexware/quickfixs
src/main/scala/com/bostontechnologies/quickfixs/messages/RichMarketDataSnapshotFullRefresh.scala
Scala
apache-2.0
1,964
package org.nkvoll.javabin.service.internal import org.elasticsearch.client.Client import org.elasticsearch.client.transport.TransportClient import org.elasticsearch.common.settings.Settings import org.elasticsearch.common.transport.InetSocketTransportAddress import org.elasticsearch.node.{ NodeBuilder, Node } import ...
nkvoll/javabin-rest-on-akka
src/main/scala/org/nkvoll/javabin/service/internal/ElasticsearchClientCreation.scala
Scala
mit
1,853
/* * Copyright (C) 2005, The Beangle 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...
beangle/db
transport/src/main/scala/org/beangle/db/transport/schema/SchemaWrapper.scala
Scala
gpl-3.0
3,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 ...
zohar-mizrahi/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/dataset/DataSetWindowAggregate.scala
Scala
apache-2.0
16,824
package turkey.tasks import upickle.default._ trait Service[Request <: { type Response }] { def processRequest(request: Request): request.Response } object Service { case class UnitRequest() { final type Response = Unit } case object UnitRequest { implicit val responseRW = new ResponseRW[UnitRequest] { ...
julianmichael/turkey
turkey/shared/src/main/scala/turkey/tasks/Service.scala
Scala
mit
594
/* * 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 ...
dbtsai/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/SparkPlanTest.scala
Scala
apache-2.0
10,014
/* * Copyright (c) Microsoft. All rights reserved. * Licensed under the MIT license. See LICENSE file in the project root for full license information. */ package org.apache.spark.api.csharp import org.apache.spark.util.Utils import java.io.{DataOutputStream, ByteArrayOutputStream, DataInputStream, ByteArrayInputS...
cyruszhang/SparkCLR
scala/src/main/org/apache/spark/api/csharp/CSharpBackendHandler.scala
Scala
mit
9,534
/* * 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/main/scala/com/intel/analytics/bigdl/dllib/keras/layers/GaussianNoise.scala
Scala
apache-2.0
2,109
package com.bobwilsonsgarage.frontend.rest.routes import akka.cluster.sharding.ClusterSharding import akka.pattern.ask import akka.util.Timeout import com.bobwilsonsgarage.frontend.resources.BobWilsonsGarageServiceRestProtocol import com.bobwilsonsgarage.frontend.rest.{HostAndPath, RestApiServiceActor} import com.bobw...
dbolene/BobWilsonsGarage
frontEnd/src/main/scala/com/bobwilsonsgarage/frontend/rest/routes/OrdersRoutes.scala
Scala
apache-2.0
3,576
package cromwell.database.slick import cats.instances.future._ import cats.syntax.functor._ import cromwell.database.sql.SubWorkflowStoreSqlDatabase import cromwell.database.sql.tables.SubWorkflowStoreEntry import scala.concurrent.{ExecutionContext, Future} import scala.language.postfixOps trait SubWorkflowStoreSlic...
ohsu-comp-bio/cromwell
database/sql/src/main/scala/cromwell/database/slick/SubWorkflowStoreSlickDatabase.scala
Scala
bsd-3-clause
2,722
package ch3 import List._ object Exercise3 { def setHead[T](l: List[T], newValue: T) = l match { case Nil => Nil case Cons(x, Nil) => Cons(newValue, Nil) case Cons(x, xs) => Cons(newValue, xs) } } import Exercise3._ /* from repl you can test typing: :load src/main/scala/fpinscala/ch3/List.scala ...
rucka/fpinscala
src/main/scala/fpinscala/ch3/Exercise3.scala
Scala
gpl-2.0
465
/* * 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 ...
h2oai/sparkling-water
ml/src/main/scala/ai/h2o/sparkling/ml/params/HasUnsupportedOffsetCol.scala
Scala
apache-2.0
1,259
package com.simple.simplespec.matchers import scala.collection.TraversableLike import org.hamcrest.{Description, BaseMatcher} class SizedTraversableMatcher[A <: TraversableLike[_, _]](expectedSize: Int) extends BaseMatcher[A] { def describeTo(description: Description) { description.appendText("a collection with...
SimpleFinance/simplespec
src/main/scala/com/simple/simplespec/matchers/SizedTraversableMatcher.scala
Scala
mit
524
/* * 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...
jedesah/Quasar
frontend/src/main/scala/quasar/frontend/logicalplan/LogicalPlan.scala
Scala
apache-2.0
13,159
/* * Copyright (c) 2014-2018 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...
Wogan/monix
monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala
Scala
apache-2.0
13,730
package composing_methods /** * Created by lingx on 2015/10/27. */ class IntroduceExplainingVariable { }
zj-lingxin/refactoring
src/main/scala/composing_methods/IntroduceExplainingVariable.scala
Scala
mit
109
/* Title: Tools/jEdit/src/active.scala Author: Makarius Active areas within the document. */ package isabelle.jedit import isabelle._ import org.gjt.sp.jedit.View object Active { def action(view: View, text: String, elem: XML.Elem) { GUI_Thread.require {} Document_View(view.getTextArea...
MerelyAPseudonym/isabelle
src/Tools/jEdit/src/active.scala
Scala
bsd-3-clause
2,838
import java.io.File import scala.io.Source object Main extends App { implicit class RichFile(val from: File) extends AnyVal { def read = Source.fromFile(from.getPath).mkString } val contents = new File("RichFile2.scala").read println(contents) }
yeahnoob/scala-impatient-2e-code
src/ch21/sec02/RichFile2.scala
Scala
gpl-3.0
260
/* * Beangle, Agile Development Scaffold and Toolkits. * * Copyright © 2005, The Beangle 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...
beangle/tomcat
shell/src/test/scala/org/beangle/sas/tomcat/TomcatMakerTest.scala
Scala
gpl-3.0
1,733
package object postoffice { type Weight = Double }
blstream/akka-viz
demo/src/main/scala/postoffice/package.scala
Scala
mit
53
/* Copyright 2012 Georgia Tech Research Institute Author: [email protected] This file is part of org.gtri.util.iteratee library. org.gtri.util.iteratee library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as publis...
gtri-iead/org.gtri.util.iteratee
impl/src/main/scala/org/gtri/util/iteratee/impl/test/TestIntIteratee.scala
Scala
gpl-3.0
1,741
package Chapter14 object PatternMatchingAndCaseClasses { // topics: // a better switch // guards // variables in patterns // type patterns // matching arrays, lists, tuples // extractors // patterns in variable declarations // patterns in for-expressions // case classes // the c...
vasnake/scala-for-the-impatient
src/main/scala/Chapter14/PatternMatchingAndCaseClasses.scala
Scala
gpl-3.0
28,251
package io.swagger.client.api import io.swagger.client.model.OutputFile import io.swagger.client.model.Error import io.swagger.client.ApiInvoker import io.swagger.client.ApiException import com.sun.jersey.multipart.FormDataMultiPart import com.sun.jersey.multipart.file.FileDataBodyPart import javax.ws.rs.core.MediaT...
onlineconvert/onlineconvert-api-sdk-scala
src/main/scala/io/swagger/client/api/OutputApi.scala
Scala
apache-2.0
5,928
class Child1 extends Overriders { override def foo(i: Int) = i + 1 foo(42) }
ilinum/intellij-scala
testdata/changeSignature/fromJava/Overriders.scala
Scala
apache-2.0
81
package com.amarjanica.discourse.util trait Imports { /*Common imports*/ type JsonIgnoreProperties = com.fasterxml.jackson.annotation.JsonIgnoreProperties type JsonProperty = com.fasterxml.jackson.annotation.JsonProperty }
amarjanica/discourse-scala-client
src/main/scala/com/amarjanica/discourse/util/Imports.scala
Scala
mit
230
/* * 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...
ccaballe/crossdata
crossdata-driver/src/main/scala/com/stratio/crossdata/driver/querybuilder/Select.scala
Scala
apache-2.0
4,733
package org.jetbrains.plugins.scala.codeInspection.methodSignature import com.intellij.codeInspection.LocalInspectionTool import com.intellij.testFramework.EditorTestUtil import com.intellij.testFramework.fixtures.CodeInsightTestFixture import org.jetbrains.plugins.scala.codeInspection.{ScalaInspectionBundle, ScalaQui...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/codeInspection/methodSignature/ApparentResultTypeRefinementInspectionTest.scala
Scala
apache-2.0
1,469
package org.jetbrains.plugins.scala package lang package completeStatement import com.intellij.ide.highlighter.JavaFileType import com.intellij.openapi.actionSystem.IdeActions.ACTION_EDITOR_COMPLETE_STATEMENT import com.intellij.openapi.fileTypes.LanguageFileType import com.intellij.psi.statistics.StatisticsManager im...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/completeStatement/ScalaCompleteStatementTestBase.scala
Scala
apache-2.0
3,104
package vexatos.cheatycomputers import li.cil.oc.Constants.{BlockName, ItemName} import li.cil.oc.api import li.cil.oc.api.detail.ItemInfo import li.cil.oc.common.InventorySlots.InventorySlot import li.cil.oc.common.tileentity.traits.Rotatable import li.cil.oc.common.{InventorySlots, Slot, Tier} import li.cil.oc.util....
Vexatos/CheatyComputers
src/main/scala/vexatos/cheatycomputers/ScalaProxy.scala
Scala
mit
3,957
/* * Copyright 2015 Sanford Ryza, Uri Laserson, Sean Owen and Joshua Wills * * See LICENSE file for further information. */ package com.cloudera.datascience.risk import java.io.File import java.text.SimpleDateFormat import scala.collection.mutable.ArrayBuffer import scala.io.Source import breeze.plot._ import ...
accavdar/aas
ch09-risk/src/main/scala/com/cloudera/datascience/risk/RunRisk.scala
Scala
apache-2.0
11,829
package colang.ast.raw import colang.Strategy.Result import colang.Strategy.Result.{Malformed, NoMatch, Success} import colang.ast.raw.ParserImpl.{Absent, Invalid, Present, SingleTokenStrategy} import colang.issues.Terms import colang.tokens.{Comma, Identifier, LeftParen, RightParen} import colang.{SourceCode, TokenSt...
merkispavel/colang
src/main/scala/colang/ast/raw/ParameterList.scala
Scala
mit
2,810
package shorty import org.easymock.EasyMock._ import org.easymock.EasyMock import javax.servlet.http._ class TestMethodParser extends BaseTest { describe("MethodParser") { it ("should be properly parse") { testParsing("POST",POST) testParsing("GET",GET) testParsing("PUT",PUT) testParsi...
davetron5000/shorty
src/test/scala/shorty/TestMethodParser.scala
Scala
mit
3,184
/* * La Trobe University - Distributed Deep Learning System * Copyright 2016 Matthias Langer ([email protected]) * * 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.apa...
bashimao/ltudl
base/src/main/scala/edu/latrobe/_BLAS.scala
Scala
apache-2.0
16,186
package components.plane.applications import components.plane.elements.Point object Reflection { def reflectX(point: Point)(x: Int): Point = point.copy(x = 2 * x - point.x) def reflectX(points: Iterable[Point])(x: Int): Iterable[Point] = for (point <- points) yield reflectX(point)(x) }
arie-benichou/blockplus
src/main/scala/components/plane/applications/Reflection.scala
Scala
gpl-3.0
299
/* * 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-bloomberg/src/main/scala/com/datamountaineer/streamreactor/connect/bloomberg/ConnectSchema.scala
Scala
apache-2.0
2,547
package de.choffmeister.auth.common import de.choffmeister.auth.common.util.Base64StringConverter._ import de.choffmeister.auth.common.util._ class PasswordHasher(defaultName: String, defaultConfig: List[String], algorithms: Seq[PasswordHashAlgorithm]) { def hash(password: String, additionalConfig: List[String] = N...
choffmeister/auth-utils
auth-common/src/main/scala/de/choffmeister/auth/common/PasswordHasher.scala
Scala
mit
1,169
/*********************************************************************** * 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-process/geomesa-process-vector/src/main/scala/org/locationtech/geomesa/process/analytic/MinMaxProcess.scala
Scala
apache-2.0
4,295
package com.wavesplatform.it.sync.grpc import com.google.protobuf.ByteString import com.wavesplatform.common.utils.EitherExt2 import com.wavesplatform.it.api.SyncGrpcApi._ import com.wavesplatform.it.sync._ import com.wavesplatform.protobuf.transaction.MassTransferTransactionData.Transfer import com.wavesplatform.prot...
wavesplatform/Waves
node-it/src/test/scala/com/wavesplatform/it/sync/grpc/MassTransferTransactionGrpcSuite.scala
Scala
mit
9,586
/* * Copyright (C) 2012 Romain Reuillon * * 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 your option) any later version. * * This program is di...
openmole/openmole
openmole/third-parties/org.openmole.tool.cache/src/main/scala/org/openmole/tool/cache/TimeCache.scala
Scala
agpl-3.0
1,231
/* ************************************************************************************* * Copyright 2013 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
Kegeruneku/rudder
rudder-web/src/main/scala/com/normation/rudder/web/rest/parameters/ParameterApiService2.scala
Scala
agpl-3.0
9,431
/* * This file is part of KatLib, licensed under the MIT License (MIT). * * Copyright (c) 2016 Katrix * * 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 w...
Katrix-/KatLib
katLib/shared/src/main/scala/io/github/katrix/katlib/command/CommandBase.scala
Scala
mit
5,270
// Let's rewrite functionally! object Main extends App { import Color._ import IO._ case class Person(name: String, age: Int, color: Color) // why do we need: .right.toOption and .flatten? val people : Seq[Person] = (1 to 3).toList.map { _ => readPerson.right.toOption }.flatten printPerson((people.maxB...
leeavital/scala-examples
seven.scala
Scala
cc0-1.0
1,379
package org.apache.spark.api.ruby import scala.collection.JavaConverters._ import scala.reflect.{ClassTag, classTag} import org.apache.spark.api.java.JavaRDD import org.apache.spark.api.ruby.marshal._ /* ================================================================================================= * object Ruby...
ondra-m/ruby-spark
ext/spark/src/main/scala/RubySerializer.scala
Scala
mit
462
package mesosphere.marathon.storage.migration import akka.Done import akka.stream.scaladsl.Source import com.codahale.metrics.MetricRegistry import mesosphere.AkkaUnitTest import mesosphere.marathon.Protos.StorageVersion import mesosphere.marathon.core.storage.store.PersistenceStore import mesosphere.marathon.metrics....
timcharper/marathon
src/test/scala/mesosphere/marathon/storage/migration/MigrationTest.scala
Scala
apache-2.0
9,766
/* * Copyright (c) 2013-2014 Telefónica Investigación y Desarrollo S.A.U. * * 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 * * Unles...
telefonicaid/fiware-cosmos-platform
cosmos-api/test/es/tid/cosmos/api/profile/CosmosProfileTestHelpers.scala
Scala
apache-2.0
3,758
// 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/BigIntegerOperateBitsTest.java */ // scalastyle:on line.size.limit package org.scalajs.testsuite.javalib.math import java.math.BigInteger import org.ju...
lrytz/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/math/BigIntegerOperateBitsTest.scala
Scala
bsd-3-clause
38,218
/* * Copyright 2014-2015 Websudos Ltd, Sphonic Ltd. 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...
nkijak/phantom
phantom-connectors/src/main/scala/com/websudos/phantom/connectors/ContactPoint.scala
Scala
bsd-2-clause
2,899
package com.arcusys.learn.models /** * Created by Iliya Tryapitsin on 13.03.14. */ @deprecated case class BadgeResponse(recipient: String, issued_on: String, badge: BadgeModel) @deprecated case class BadgeModel(name: String, image: String, description: String, criteria: String, issuer: IssuerModel, ve...
ViLPy/Valamis
learn-portlet/src/main/scala/com/arcusys/learn/models/BadgeResponse.scala
Scala
lgpl-3.0
467
package reactivemongo.api.collections import scala.concurrent.duration.FiniteDuration import reactivemongo.api.{ ChangeStreams, Cursor, CursorProducer, CursorOptions, ReadConcern, SerializationPack } trait ChangeStreamOps[P <: SerializationPack] { collection: GenericCollection[P] => import collection....
ReactiveMongo/ReactiveMongo
driver/src/main/scala/api/collections/ChangeStreamOps.scala
Scala
apache-2.0
4,858
/** * Licensed to the Minutemen Group under one or more contributor license * agreements. See the COPYRIGHT file distributed with this work for * additional information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in complian...
mohiva/silhouette
modules/provider-social/src/test/scala/silhouette/provider/social/state/DefaultStateHandlerSpec.scala
Scala
apache-2.0
8,143
package play.core.j import play.api.mvc._ import play.templates._ /** Defines a magic helper for Play templates in a Java context. */ object PlayMagicForJava { import scala.collection.JavaConverters._ import scala.language.implicitConversions /** Transforms a Play Java `Option` to a proper Scala `Option`. */ ...
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/play-java/src/main/scala/play/core/TemplateMagicForJava.scala
Scala
mit
1,609
package reductions import org.scalameter._ import common._ object ParallelCountChangeRunner { @volatile var seqResult = 0 @volatile var parResult = 0 val standardConfig = config( Key.exec.minWarmupRuns -> 20, Key.exec.maxWarmupRuns -> 40, Key.exec.benchRuns -> 80, Key.verbose -> true ) with...
syhan/coursera
parprog1/reductions/src/main/scala/reductions/ParallelCountChange.scala
Scala
gpl-3.0
3,034
object O { def d(t: Top) = t match { case s: Sub => true case _ => false } def main(args: Array[String]): Unit = { val c = new AnyRef with C c.bob().toString + c.bob2().toString } }
som-snytt/dotty
tests/pos/t1107b/O.scala
Scala
apache-2.0
208
package depress_bender // Read inputs from System.in, Write outputs to use print. // Your class name has to be Solution import math._ import scala.util._ import scala.collection.mutable.{HashMap => Map, HashSet => Set, MutableList => List, Stack} object Solution { class Position(val x: Int, val y: Int) { def =...
bvaudour/codingame
level2/Bender_a_depressed_robot.scala
Scala
gpl-2.0
3,847
package com.scalaAsm.x86 package Instructions package General // Description: Conditional Move - below or equal/not above (CF=1 AND ZF=1) // Category: general/datamov trait CMOVNA extends InstructionDefinition { val mnemonic = "CMOVNA" } object CMOVNA extends TwoOperands[CMOVNA] with CMOVNAImpl trait CMOVNAImpl e...
bdwashbu/scala-x86-inst
src/main/scala/com/scalaAsm/x86/Instructions/General/CMOVNA.scala
Scala
apache-2.0
756
package skiis2 import java.util.concurrent.Executors import org.scalatest.WordSpec import org.scalatest.matchers.ShouldMatchers import scala.collection._ import java.util.concurrent.atomic.AtomicInteger @org.junit.runner.RunWith(classOf[org.scalatest.junit.JUnitRunner]) class ParMapSuite extends WordSpec with ShouldM...
teddyknox/skiis
src/test/scala/skiis2/ParMapSuite.scala
Scala
apache-2.0
1,890
package wow.common.database import java.sql.ResultSet import scalikejdbc._ trait EnumerationValueToSqlSyntax[A] { def apply(value: A): SQLSyntax } /** * Makes an enumeration bindable to database */ trait DatabaseSerializableEnumeration { this: Enumeration => /** * The name of the type in the database...
SKNZ/SpinaciCore
wow/core/src/main/scala/wow/common/database/DatabaseSerializableEnumeration.scala
Scala
mit
1,150
/* Copyright 2010 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
markusgumbel/dshl7
core/src/main/scala/net/gumbix/hl7dsl/DSL/RoleDSL.scala
Scala
apache-2.0
4,280
package org.sisioh.aws4s.eb.model import com.amazonaws.services.elasticbeanstalk.model.{ ListAvailableSolutionStacksResult, SolutionStackDescription } import org.sisioh.aws4s.PimpedType import scala.collection.JavaConverters._ object ListAvailableSolutionStacksResultFactory { def create(): ListAvailableSolutionSt...
sisioh/aws4s
aws4s-eb/src/main/scala/org/sisioh/aws4s/eb/model/RichListAvailableSolutionStacksResult.scala
Scala
mit
1,294
package com.softwaremill.codebrag.domain import org.bson.types.ObjectId /** * Class contains Codebrag's instance global settings, i.e. uniqueId */ case class InstanceSettings(uniqueId: String) { def uniqueIdAsObjectId = new ObjectId(uniqueId) }
softwaremill/codebrag
codebrag-domain/src/main/scala/com/softwaremill/codebrag/domain/InstanceSettings.scala
Scala
agpl-3.0
251
/* * 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 ...
hvanhovell/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/ResolveSubquerySuite.scala
Scala
apache-2.0
10,311
package provingground.scalahott import provingground._, HoTT._ /** * Wrapper for universe with refined scala type for objects (i.e., types) in it. * Refined scala types typically recursively built from (dependent) function types and types of already refined types. */ case class ScalaUniv[U <: Term with Subs[U]]...
siddhartha-gadgil/ProvingGround
core/src/main/scala/provingground/scalahott/ScalaUniverses.scala
Scala
mit
5,849
package fpinscala.monoids import fpinscala.monoids.Monoid._ import org.scalatest._ class FoldableIndexedSeqTest extends FlatSpec with Matchers { "The Foldable[IndexedSeq]" should "implement foldRight method" in { val listOfIntegers = IndexedSeq(1, 2, 3) val sumOfList = IndexedSeqFoldable.foldRight(list...
ardlema/fpinscala
exercises/src/test/scala/fpinscala/monoids/FoldableIndexedSeqTest.scala
Scala
mit
820
package sp.kalle.testing import sp.domain._ import Logic._ object TestingAPI extends sp.domain.testing.TestingDerived { sealed trait API case class X1(a: String, b: Int = 3, c: Boolean = false) extends API case class X2(a: String, b: Int = 3, c: Boolean = false) extends API case class X3(a: ...
sequenceplanner/sp-domain
src/test/scala/sp/domain/testing/TestingAPI.scala
Scala
mit
4,142
package controllers import org.specs2.mutable.Specification //import play.api.test.Helpers.{GET, OK, contentType, running, status} import play.api.test.Helpers._ import play.api.test.{FakeApplication, FakeRequest} /** * You can mock out a whole application including requests, plugins etc. * For more information,...
amsterdam-scala/play-reactive-mongo-coffee-angular
test/controllers/ApplicationIT.scala
Scala
apache-2.0
794
/** * Copyright (C) 2011 JTalks.org Team * This library 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 library ...
Noctrunal/jcommune
jcommune-performance-tests/src/test/scala/IDEPathHelper.scala
Scala
lgpl-2.1
1,579
/* * Copyright 2013 http4s.org * * 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...
http4s/http4s
core/shared/src/main/scala/org/http4s/headers/Proxy-Authenticate.scala
Scala
apache-2.0
2,475
/* * Copyright 2013 Stephane Godbillon (@sgodbillon) * * 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 applicabl...
reactific/ReactiveMongo
bson/src/main/scala/bufferhandlers.scala
Scala
apache-2.0
11,648
/* * Wire * Copyright (C) 2016 Wire Swiss GmbH * * 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 your option) any later version. * * This progr...
wireapp/wire-android-sync-engine
zmessaging/src/main/scala/com/waz/utils/Locales.scala
Scala
gpl-3.0
7,233
/** * Copyright (C) 2010-2012 LShift Ltd. * * 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...
0x6e6562/diffa
kernel/src/test/scala/net/lshift/diffa/kernel/util/cache/CacheProviderTest.scala
Scala
apache-2.0
3,499
package generator.graphql.helpers trait TestHelpers { def rightOrErrors[T](value: Either[_, T]): T = { value match { case Right(r) => r case Left(errors) => sys.error(s"Expected valid value but got: ${errors}") } } }
mbryzek/apidoc-generator
graphql-generator/src/test/scala/generator/graphql/helpers/TestHelpers.scala
Scala
mit
242
package com.twitter.finatra.http.tests.integration.pools.test import com.twitter.finagle.http.Status._ import com.twitter.finatra.http.tests.integration.pools.main.{PooledController, PooledServer} import com.twitter.finatra.http.EmbeddedHttpServer import com.twitter.inject.server.FeatureTest class PooledServerIntegra...
syamantm/finatra
http/src/test/scala/com/twitter/finatra/http/tests/integration/pools/test/PooledServerIntegrationTest.scala
Scala
apache-2.0
770
import Common._ import org.specs2.mutable._ import reactivemongo.api.collections.bson.BSONCollection import reactivemongo.api.commands.bson.BSONUpdateCommand._ import reactivemongo.api.commands.bson.BSONUpdateCommandImplicits._ import reactivemongo.bson._ import scala.concurrent._ class UpdateSpec extends Specificati...
reactific/ReactiveMongo
driver/src/test/scala/commands/UpdateSpec.scala
Scala
apache-2.0
2,289
package com.karasiq.torrentstream.shared import boopickle.Pickler import boopickle.Default._ @SerialVersionUID(0L) final case class TorrentInfo(announceList: Seq[Seq[String]], comment: String, createdBy: String, files: Seq[(String, Long)], infoHash: String, na...
Karasiq/torrentstream
shared/src/main/scala/com/karasiq/torrentstream/shared/TorrentInfo.scala
Scala
apache-2.0
444
/* * Copyright 2012-2013 Stephane Godbillon (@sgodbillon) and Zenexity * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
bfil/ReactiveMongo
driver/src/main/scala/utils.scala
Scala
apache-2.0
3,073
package im.tox.toktok.app.util import android.os.Bundle import android.support.v7.app.AppCompatActivity import im.tox.toktok.TypedLayout abstract class ActivityAdapter[VH >: Null](layout: TypedLayout[_]) extends AppCompatActivity { private var holder: VH = null protected def onCreateViewHolder(): VH protected...
vassad/toktok
src/main/scala/im/tox/toktok/app/util/ActivityAdapter.scala
Scala
agpl-3.0
563
package org.jetbrains.plugins.scala package lang package psi package api package base package patterns import com.intellij.psi._ import com.intellij.psi.util.PsiModificationTracker import org.jetbrains.plugins.scala.extensions._ import org.jetbrains.plugins.scala.lang.psi.api.base.types.ScTypeVariableTypeElement impor...
LPTK/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/api/base/patterns/ScPattern.scala
Scala
apache-2.0
17,213
package backend import akka.actor._ import com.typesafe.config.ConfigFactory import backend.factorial._ import scala.collection.JavaConversions._ /** * Booting a cluster backend node with all actors */ object Backend extends App { // Simple cli parsing val port = args match { case Array() => "0" ca...
enpassant/estore
backend/src/main/scala/backend/Backend.scala
Scala
gpl-3.0
740
package controllers.circs.your_details import app.ReportChange import controllers.circs.report_changes.GOtherChangeInfo import controllers.mappings.Mappings import models.domain._ import models.view.CachedChangeOfCircs import org.specs2.mutable._ import play.api.test.Helpers._ import play.api.test.FakeRequest import u...
Department-for-Work-and-Pensions/ClaimCapture
c3/test/controllers/circs/your_details/GYourDetailsFormSpec.scala
Scala
mit
16,189
/* * RichCPD.scala * Conditional probability distributions with rich cases. * * Created By: Avi Pfeffer ([email protected]) * Creation Date: Apr 25, 2011 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email [email protected] for information. * * See htt...
jyuhuan/figaro
Figaro/src/main/scala/com/cra/figaro/library/compound/RichCPD.scala
Scala
bsd-3-clause
7,139
/* * Copyright 2010 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...
twitter/bijection
bijection-clojure/src/test/scala/com/twitter/bijection/clojure/ClojureBijectionLaws.scala
Scala
apache-2.0
911
/** * Copyright 2015 Thomson Reuters * * Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
hochgi/CM-Well
server/cmwell-ws/app/filters/GeneralAttributesFilter.scala
Scala
apache-2.0
1,565
package spire package algebra /** * A trait for linearly ordered additive commutative monoid. The following laws holds: * * (1) if `a <= b` then `a + c <= b + c` (linear order), * (2) `signum(x) = -1` if `x < 0`, `signum(x) = 1` if `x > 0`, `signum(x) = 0` otherwise, * * Negative elements only appear when `scala...
adampingel/spire
core/src/main/scala/spire/algebra/Signed.scala
Scala
mit
2,102
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
gridgain/apache-ignite
modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/VisorArgListSpec.scala
Scala
apache-2.0
2,000
def map[B](f: A => B): Gen[B] = Gen(sample.map(f), exhaustive.map(_.map(f))) def map2[B,C](g: Gen[B])(f: (A,B) => C): Gen[C] = Gen(sample.map2(g.sample)(f), map2Stream(exhaustive,g.exhaustive)(map2Option(_,_)(f)))
galarragas/FpInScala
answerkey/testing/7.answer.scala
Scala
mit
227
/* * Copyright 2013 - 2020 Outworkers Ltd. * * 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...
outworkers/phantom
phantom-dsl/src/test/scala/com/outworkers/phantom/builder/serializers/datatypes/DataTypeSerializationTest.scala
Scala
apache-2.0
4,634
/* * Copyright 2018 Analytics Zoo 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...
intel-analytics/analytics-zoo
zoo/src/test/scala/com/intel/analytics/zoo/pipeline/api/keras/layers/Cropping3DSpec.scala
Scala
apache-2.0
2,719
/* * 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 ...
style95/openwhisk
core/controller/src/main/scala/org/apache/openwhisk/core/controller/actions/SequenceActions.scala
Scala
apache-2.0
25,512
// ImportNameChange.scala import util.{ Random => Bob, Properties => Jill } val r = new Bob val p = Jill
P7h/ScalaPlayground
Atomic Scala/atomic-scala-examples/examples/11_ImportsAndPackages-1stEdition/ImportNameChange.scala
Scala
apache-2.0
108
package mesosphere.marathon.upgrade import mesosphere.marathon.core.task.Task import mesosphere.marathon.core.task.state.MarathonTaskStatus import mesosphere.marathon.state.Timestamp case class ScalingProposition(tasksToKill: Option[Seq[Task]], tasksToStart: Option[Int]) object ScalingProposition { def propose( ...
timcharper/marathon
src/main/scala/mesosphere/marathon/upgrade/ScalingProposition.scala
Scala
apache-2.0
2,876
package cz.cvut.fit.palicand.knapsack import java.io.File import java.lang.System import com.typesafe.scalalogging.{LazyLogging, Logger} import cz.cvut.fit.palicand.knapsack.algorithms.evolution.KnapsackGeneticAlgorithm import scala.util.Random /** * Created by palicka on 15/12/15. */ object KnapsackEvA extends...
palicand/mi_paa_genetic_algorithm
src/main/scala/cz/cvut/fit/palicand/knapsack/KnapsackEvA.scala
Scala
mit
2,275