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
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
ueshin/apache-flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/descriptors/LiteralValue.scala
Scala
apache-2.0
6,182
/** MACHINE-GENERATED FROM AVRO SCHEMA. DO NOT EDIT DIRECTLY */ package test final case class Up(value: Int) final case class Down(value: Int)
julianpeeters/avrohugger
avrohugger-core/src/test/expected/standard/test/Joystick.scala
Scala
apache-2.0
144
package synahive.restapi.utils import synahive.restapi.models._ import spray.json.DefaultJsonProtocol trait Protocol extends DefaultJsonProtocol { implicit val usersFormat = jsonFormat3(UserEntity) implicit val tokenFormat = jsonFormat3(TokenEntity) }
synahive/synahive-server
src/main/scala/synahive/restapi/utils/Protocol.scala
Scala
mit
258
package org.scalatra import scala.util.DynamicVariable /** * The core Scalatra DSL. */ trait CoreDsl extends Handler with Control { /** * The type of application context supported by this application. Made * abstract for compatibility with the servlet implementation. */ type ApplicationContextT <: App...
louk/scalatra
core/src/main/scala/org/scalatra/CoreDsl.scala
Scala
bsd-2-clause
6,076
package pl.touk.nussknacker.engine.flink.util.source import org.apache.flink.streaming.api.functions.source.SourceFunction import org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext import org.apache.flink.streaming.api.watermark object StaticSource extends SourceFunction[String] { @volat...
TouK/nussknacker
engine/flink/components-utils/src/main/scala/pl/touk/nussknacker/engine/flink/util/source/StaticSource.scala
Scala
apache-2.0
1,063
/* NSC -- new Scala compiler * Copyright 2005-2013 LAMP/EPFL * @author Martin Odersky */ package scala package reflect package internal import scala.collection.{ mutable, immutable } import scala.ref.WeakReference import mutable.ListBuffer import Flags._ import scala.util.control.ControlThrowable import scala.ann...
slothspot/scala
src/reflect/scala/reflect/internal/Types.scala
Scala
bsd-3-clause
210,001
package net.paploo.diestats.statistics.util /** * Marker trait for Monoids that obey commutativity: * concat(x, y) === concat(y, x) * @tparam A */ trait CommutativeMonoid[A] extends Monoid[A] object CommutativeMonoid { def apply[A](emptyValue: => A)(concatFunction: (A, A) => A): CommutativeMonoid[A] = new ...
paploo/DieStats
src/main/scala/net/paploo/diestats/statistics/util/CommutativeMonoid.scala
Scala
bsd-3-clause
2,622
/* * 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 ...
michalsenkyr/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/sources/memoryV2.scala
Scala
apache-2.0
6,366
package org.deeplearning4j.ui.views.html.training import play.twirl.api._ import play.twirl.api.TemplateMagic._ object TrainingHelp_Scope0 { import models._ import controllers._ import play.api.i18n._ import views.html._ import play.api.templates.PlayMagic._ import play.api.mvc._ import play.api.data._ class ...
xuzhongxing/deeplearning4j
deeplearning4j-ui-parent/deeplearning4j-play/src/main/scala/org/deeplearning4j/ui/views/html/training/TrainingHelp.template.scala
Scala
apache-2.0
27,503
/* Copyright 2013, 2014 NICTA This file is part of t3as (Text Analysis As A Service). t3as 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...
NICTA/t3as-pat-clas
pat-clas-common/src/main/scala/org/t3as/patClas/common/search/Constants.scala
Scala
gpl-3.0
3,635
package org.bfn.ninetynineprobs import org.scalatest._ class P38Spec extends UnitSpec { // TODO }
bfontaine/99Scala
src/test/scala/P38Spec.scala
Scala
mit
105
package com.github.morikuni.locest.frequency.test.helper import com.github.morikuni.locest.frequency.domain.model.Word import com.github.morikuni.locest.frequency.domain.repository.{WordRepository, WordRepositorySession} import com.github.morikuni.locest.util.Transaction import org.specs2.mock.Mockito object WordRepo...
morikuni/locest
frequency/test/com/github/morikuni/locest/frequency/test/helper/WordRepositoryHelper.scala
Scala
mit
521
/** * Copyright (C) 2014-2015 Really Inc. <http://really.io> */ package io.really.token package object generator { object AuthType extends Enumeration { type AuthType = Value val Anonymous, Password = Value def Custom(provider: String) = Value(provider) } }
reallylabs/really
modules/really-simple-auth/app/lib/io/really/token/generator/package.scala
Scala
apache-2.0
280
package com.optrak.testakka.simple.impl import com.optrak.testakka.api.GreetingMessage import com.optrak.testakka.simple.api.SimpleService import org.scalatest.{AsyncWordSpec, Matchers} trait SimpleServiceTestBase extends AsyncWordSpec with Matchers { def simpleService: SimpleService "test-akka-integration serv...
Optrak/lagom-testbed
test-akka-integration/akka-model/simple/impl/src/test/scala/com/optrak/testakka/simple/impl/SimpleServiceTestBase.scala
Scala
apache-2.0
740
/* * 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 ...
markusthoemmes/openwhisk
tests/src/test/scala/org/apache/openwhisk/core/loadBalancer/test/InvokerSupervisionTests.scala
Scala
apache-2.0
16,023
package org.hotsextra.matchmaking package rating import scala.collection.immutable.Queue case class NormalDistribution(mu: Double, sig: Double) extends Function1[Double, Double] { def apply(x: Double) = { val exp = -(((x - mu) * (x - mu)) / (2 * sig * sig)) val denom = sig * math.sqrt(2 * math.Pi) math....
martijnhoekstra/hotsextra-matchmaker
src/main/scala/org/hotsextra/matchmaking/rating/NormalDistribution.scala
Scala
agpl-3.0
667
/* * Copyright (c) 2021, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ package com.krux.hyperion.contrib.activity.notification import java.net.{ HttpURLConnectio...
realstraw/hyperion
contrib/activity/notification/src/main/scala/com/krux/hyperion/contrib/activity/notification/SendSlackMessage.scala
Scala
bsd-3-clause
3,099
package breeze.linalg import breeze.linalg.operators.{OpMulScalar, OpSet} import breeze.linalg.support.CanTraverseKeyValuePairs.KeyValuePairsVisitor import breeze.linalg.support.CanTraverseValues.ValuesVisitor import breeze.linalg.support._ import breeze.math.{Semiring} import breeze.storage.Zero import scala.reflect...
claydonkey/breeze
math/src/main/scala/breeze/linalg/SliceVector.scala
Scala
apache-2.0
5,580
package simplez import scala.language.{ higherKinds, implicitConversions } /** * This package provides implicit functions, so that we can for example access * {{{ * val x : List[Int] = List(1,2,3) * x.mappend(List(4,5,6) * }}} instead of * {{{ * Monoid[List].append(x, List(1,2,3) * }}} * */ package...
inoio/simplez
main/src/main/scala/simplez/syntax/package.scala
Scala
bsd-2-clause
16,884
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundatio...
HuangLS/neo4j
community/cypher/frontend-2.3/src/main/scala/org/neo4j/cypher/internal/frontend/v2_3/ast/functions/Left.scala
Scala
apache-2.0
1,197
package views.html package userTournament import lila.api.Context import lila.app.templating.Environment._ import lila.app.ui.ScalatagsTemplate._ import lila.common.paginator.Paginator import lila.user.User object upcoming { def apply(u: User, pager: Paginator[lila.tournament.Tournament])(implicit ctx: Context) = ...
luanlv/lila
app/views/userTournament/upcoming.scala
Scala
mit
1,308
package com.spann.models case class Speed(speed: Float) { def inMeterPerSecond = { (speed * 1000 ) / 3600 } }
sunil-123/SpannRace
src/main/scala/com/spann/models/Speed.scala
Scala
mit
119
/* ** Copyright [2013-2016] [Megam Systems] ** ** 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...
meglytics/bidi
app/models/json/analytics/KeyValueFieldSerialization.scala
Scala
mit
1,823
package work.martins.simon.expect.fluent import work.martins.simon.expect.{Settings, core} import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers class EmptySpec extends AnyFlatSpec with Matchers { "An Expect without a command" should "throw IllegalArgumentException" in { an [Il...
Lasering/scala-expect
src/test/scala/work/martins/simon/expect/fluent/EmptySpec.scala
Scala
mit
1,119
package com.mesosphere.cosmos.finch import com.mesosphere.cosmos.http.RequestSession import com.twitter.finagle.http.Fields import com.twitter.finagle.http.Status import com.twitter.util.Future import com.twitter.util.Throw import io.circe.Json import io.circe.syntax._ import io.finch._ abstract class EndpointHandler...
dcos/cosmos
cosmos-common/src/main/scala/com/mesosphere/cosmos/finch/EndpointHandler.scala
Scala
apache-2.0
1,068
/* * Copyright 2020 Spotify AB. * * 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 ...
spotify/scio
scio-extra/src/main/scala/com/spotify/scio/extra/hll/zetasketch/ZetaSketchable.scala
Scala
apache-2.0
1,830
/* * 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-2.0 * ...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/enhancement/enhancements/EfficientHeighten.scala
Scala
apache-2.0
1,227
package org.biosys.pubmed.models object SummaryParts { def from(doc:scala.xml.Node) = { SummaryPart( label = doc.attribute("Label").map(_.text), text = doc.text ) } } case class SummaryPart(label:Option[String],text:String) { }
sdor/biosys
pubmed_common/src/main/scala/org/biosys/pubmed/models/SummaryPart.scala
Scala
gpl-2.0
255
package argonaut package benchmark import scala.io.Source import Argonaut._ object ParserBench { def parse(json: String, count: Int) = { val elapsed = Benchmark.time(() => json.parse, count) / 1000.0 val bytes = json.getBytes("UTF-8").length val rate = (count / elapsed).toInt (bytes, rate) } d...
etorreborre/argonaut
benchmark/src/main/scala/argonaut/benchmark/ParserBench.scala
Scala
bsd-3-clause
582
/* Copyright (C) 2008-2010 Univ of Massachusetts Amherst, Computer Science Dept This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://code.google.com/p/factorie/ This software is provided under the terms of the Eclipse Public License 1.0 as published by...
andrewmilkowski/factorie
src/main/scala/cc/factorie/example/MultinomialDemo.scala
Scala
epl-1.0
1,336
package de.sciss.fscape import de.sciss.kollflitz.Vec import scala.annotation.tailrec import scala.concurrent.Promise import scala.util.Success class ResizeWindowSpec extends UGenSpec { "The ResizeWindow UGen" should "work as intended" in { // var count = 0 // showControlLog = true // showStreamLog = t...
Sciss/FScape-next
core/jvm/src/test/scala/de/sciss/fscape/ResizeWindowSpec.scala
Scala
agpl-3.0
3,199
/** * Swaggy Jenkins * Jenkins API clients generated from Swagger / Open API specification * * The version of the OpenAPI document: 1.1.2-pre.0 * Contact: [email protected] * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not ed...
cliffano/swaggy-jenkins
clients/scala-sttp/generated/src/main/scala/org/openapitools/client/model/InputStepImpllinks.scala
Scala
mit
483
package io.dmjb.riscv.instructions import io.dmjb.riscv.model.State sealed trait Instruction { def execute(state: State): State } case class LoadByte(rs1: Int, imm: Int, rd: Int) extends IFormat with Instruction { override def execute(state: State): State = { } } case class LoadHalfword() extends IFormat...
dmjb/risc-v
src/main/scala/io/dmjb/riscv/instructions/Instruction.scala
Scala
apache-2.0
4,863
/* * 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 ...
spark0001/spark2.1.1
sql/core/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryException.scala
Scala
apache-2.0
1,871
/* sbt -- Simple Build Tool * Copyright 2009, 2010, 2011, 2012 Mark Harrah */ package sbt import java.io.File import scala.collection.mutable.Map // Assumes exclusive ownership of the file. private[sbt] class TestStatusReporter(f: File) extends TestsListener { private lazy val succeeded = TestStatus.read(f) d...
jasonchaffee/sbt
testing/src/main/scala/sbt/TestStatusReporter.scala
Scala
bsd-3-clause
1,357
package japgolly.scalajs.react import scalaz.{Optional => _, _} import extra._ import router.{BaseUrl, AbsUrl, Path} import router.StaticDsl.Rule private[react] object ScalazReactExtra { final class ScalazReusability$Ops(private val ε: Reusability.type) extends AnyVal { /** Compare using Scalaz equality. */ ...
zlangbert/scalajs-react
scalaz-7.2/src/main/scala/japgolly/scalajs/react/Extra.scala
Scala
apache-2.0
2,374
package TAPL import TAPL.Lib._ object RecType { trait Alg[T] { def TyRec(x: String, t: T): T } trait Print extends Alg[String] { def TyRec(x: String, t: String): String = "Rec " + x + "." + t } trait Parse[T] extends TParser[T] { lexical.reserved += "Rec" lexical.delimiters += "." v...
hy-zhang/parser
Scala/Parser/src/TAPL/FullEquiRec.scala
Scala
bsd-3-clause
1,254
package jp.ne.opt.redshiftfake.parse.compat import Ops._ import net.sf.jsqlparser.expression.operators.arithmetic._ import net.sf.jsqlparser.expression._ import net.sf.jsqlparser.expression.operators.conditional.{AndExpression, OrExpression} import net.sf.jsqlparser.expression.operators.relational._ import net.sf.jsql...
opt-tech/redshift-fake-driver
src/main/scala/jp/ne/opt/redshiftfake/parse/compat/CompatibilityHandler.scala
Scala
apache-2.0
20,632
/** * Copyright (c) 2013, The National Archives <[email protected]> * https://www.nationalarchives.gov.uk * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://moz...
adamretter/csv-validator
csv-validator-core/src/main/scala/uk/gov/nationalarchives/csv/validator/schema/package.scala
Scala
mpl-2.0
2,249
/* * Copyright (C) 2011 Mathias Doenitz * * 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...
spray/spray-json
src/test/scala/spray/json/CustomFormatSpec.scala
Scala
apache-2.0
1,607
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
pgandhi999/spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/package.scala
Scala
apache-2.0
5,298
package org.jetbrains.plugins.scala package codeInspection package shadow import com.intellij.codeInspection.ProblemsHolder import com.intellij.openapi.project.Project import com.intellij.psi.{PsiElement, PsiNamedElement, ResolveResult} import org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil import org.jetbrains.plug...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/codeInspection/shadow/VariablePatternShadowInspection.scala
Scala
apache-2.0
2,421
/** * Copyright 2015 ICT. * * 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 ...
DataSysLab/netflow
load/src/main/scala/cn/ac/ict/acs/netflow/load/worker/Writer.scala
Scala
apache-2.0
1,108
/* * 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 agr...
datamountaineer/stream-reactor
kafka-connect-common/src/test/scala/com/datamountaineer/streamreactor/common/sink/StringGenericRowKeyBuilderTest.scala
Scala
apache-2.0
1,486
package edu.mit.cryptdb.user import edu.mit.cryptdb.SqlExpr // implementations should be completely stateless trait Translator { def translateTableName( plainTableName: String): String def translateColumnName( plainTableName: String, plainColumnName: String, encOnion: Int): String def translatePreco...
tristartom/monomi-optimizer
src/main/scala/user/translator.scala
Scala
mit
717
/* * 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 ...
aokolnychyi/spark
resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnClusterSuite.scala
Scala
apache-2.0
18,205
package com.cloudera.hue.livy.server import java.net.URL import com.cloudera.hue.livy.Logging import com.cloudera.hue.livy.msgs.ExecuteRequest import com.cloudera.hue.livy.server.sessions.Session import com.cloudera.hue.livy.server.sessions.Session.SessionFailedToStart import com.fasterxml.jackson.core.JsonParseExcep...
erickt/hue
apps/spark/java/livy-server/src/main/scala/com/cloudera/hue/livy/server/WebApp.scala
Scala
apache-2.0
5,544
package im.actor.server.api.rpc.service.profile import akka.actor.ActorSystem import akka.util.Timeout import im.actor.api.rpc._ import im.actor.api.rpc.files.ApiFileLocation import im.actor.api.rpc.misc.{ ResponseBool, ResponseSeq } import im.actor.api.rpc.profile.{ ProfileService, ResponseEditAvatar } import im.acto...
ljshj/actor-platform
actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/profile/ProfileServiceImpl.scala
Scala
mit
6,620
/*********************************************************************** * Copyright (c) 2013-2019 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...
elahrvivaz/geomesa
geomesa-process/geomesa-process-vector/src/main/scala/org/locationtech/geomesa/process/tube/TubeBuilder.scala
Scala
apache-2.0
12,217
package org.broadinstitute.dsde.vault.services.uBAM import org.broadinstitute.dsde.vault.model.uBAMJsonProtocol._ import org.broadinstitute.dsde.vault.model.{UBamIngest, UBamIngestResponse} import org.broadinstitute.dsde.vault.{VaultConfig, VaultFreeSpec} import org.scalatest.{DoNotDiscover, Suite} import org.broadins...
broadinstitute/vault-api
src/test/scala/org/broadinstitute/dsde/vault/services/uBAM/UBamIngestServiceSpec.scala
Scala
bsd-3-clause
4,783
//package rat.client.services // //import autowire._ //import boopickle.Default._ //import rat.client.ukko.Actor //import rat.shared.{User, UserName, Api2} //import rx._ //import rat.client.ukko._ //import scala.scalajs.concurrent.JSExecutionContext.Implicits.queue // //case class UpdateUser(user: User) // //trait Main...
omidb/rat
client/src/main/scala/rat/client/services/MainHub.scala
Scala
apache-2.0
1,159
package crm import scala.collection.JavaConverters._ import scala.language._ import scala.util.control.Exception._ import scopt._ import org.w3c.dom._ import dispatch._ import scala.concurrent.Await import scala.concurrent.duration._ import scala.async.Async._ import scala.util._ import org.log4s._ import com.lucidcha...
aappddeevv/mscrm-soap-auth
src/main/scala/crm/copy.scala
Scala
apache-2.0
17,139
/** * Copyright 2011-2016 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
GabrielPlassard/gatling
gatling-core/src/main/scala/io/gatling/core/stats/writer/DataWriterMessage.scala
Scala
apache-2.0
2,592
import org.scalajs.jsenv.nodejs.NodeJSEnv import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._ import sbt.Keys._ import sbt._ object Dependencies { object Version { val scala211 = "2.11.8" val scala212 = "2.12.1" val scalaAsync = "0.9.6" val scalatest = "3.0.0" val utest = "0.3.0" va...
chandu0101/sri-relay
project/Dependencies.scala
Scala
apache-2.0
1,802
package org.labrad.crypto import org.scalatest.FunSuite class CertsTest extends FunSuite { /** * Verify that fingerprint matches what we get from openssl. * * To get the fingerprint of a certificate with openssl, you can do: * $ openssl x509 -fingerprint -in <certfile> */ test("fingerprintSHA1") {...
labrad/scalabrad
core/src/test/scala/org/labrad/crypto/CertsTest.scala
Scala
mit
1,665
/* * 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 ...
mtunique/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/datastream/DataStreamValues.scala
Scala
apache-2.0
2,968
/** * Copyright 2011-2016 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
GabrielPlassard/gatling
gatling-http/src/main/scala/io/gatling/http/resolver/AliasesAwareNameResolver.scala
Scala
apache-2.0
2,096
/* * Copyright 2017 Sumo Logic * * 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...
SumoLogic/epigraph
compiler/src/main/scala/ws/epigraph/compiler/ErrorReporter.scala
Scala
apache-2.0
2,671
package com.rest.akka.api.routes import akka.http.scaladsl.server.Route import akka.http.scaladsl.server.Directives._ import akka.stream.ActorMaterializer import akka.http.scaladsl.marshallers.xml.ScalaXmlSupport._ import com.rest.akka.api.controller.AkkaHttpController import com.rest.akka.api.domain.WelcomeMessage i...
mgobec/rest-akka-api
src/main/scala/com/rest/akka/api/routes/MainRouter.scala
Scala
apache-2.0
1,116
/** * 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-ws/app/wsutil/FormatterManager.scala
Scala
apache-2.0
10,558
package fpinscala.gettingstarted.samples import scala.annotation.tailrec /** * Created by younggi on 4/14/17. */ object FormatResults { def abs(n: Int): Int = { if ( n < 0) -n else n } def factorial(n: Int): Int = { @tailrec def fac(n: Int, acc: Int): Int = { if (n == 0) acc els...
younggi/books
functional_programming_in_scala/funpro_scala/src/main/scala/fpinscala/gettingstarted/samples/FormatResults.scala
Scala
mit
1,160
/* * 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/storage/AntiEntropyStore.scala
Scala
apache-2.0
9,461
package moe.brianhsu.easytaipei import android.app.Activity import android.os.Bundle import android.support.v7.app.AppCompatActivity import android.support.v4.app.FragmentPagerAdapter import android.support.v4.app.FragmentManager import android.view.Menu import android.view.View import android.support.design.widget.Sn...
brianhsu/EasyTaipei
src/main/scala/MainActivity.scala
Scala
gpl-2.0
2,315
package streamz.akka.stream import java.util.concurrent.{TimeUnit, CountDownLatch} import org.reactivestreams.Publisher import scala.collection.immutable import scala.reflect._ import scala.util.Random import scala.util.control.NoStackTrace import scala.concurrent.{Promise, ExecutionContext, Future, Await} import sc...
Astrac/streamz
streamz-akka-stream/src/test/scala/streamz/akka/stream/AkkaStreamSpec.scala
Scala
apache-2.0
9,718
/** * Copyright 2017-2020 The OpenZipkin 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 ...
bizreach/play-zipkin-tracing
play/src/main/scala/brave/play/filter/ZipkinTraceFilter.scala
Scala
apache-2.0
2,468
package suggestions import java.net.URL /** * Created by alex on 17/05/15. */ trait LookupProvider { def lookupUrl(name: String): Option[URL] }
unclealex72/ripper
src/main/scala/suggestions/LookupProvider.scala
Scala
mit
151
import scala.collection.JavaConversions._ // you can use println for debugging purposes, e.g. // println("this is a debug message") object Solution { def solution(A: Array[Int]): Int = { // write your code in Scala 2.10 val n = A.length var best_ind = 0 var best_sum: Long =...
sfindeisen/prgctst
codility/lesson/MinAvgTwoSlice.scala
Scala
gpl-3.0
1,028
package com.redislabs.provider.redis.df.cluster import com.redislabs.provider.redis.df.DataframeSuite import com.redislabs.provider.redis.env.RedisClusterEnv class DataframeClusterSuite extends DataframeSuite with RedisClusterEnv
RedisLabs/spark-redis
src/test/scala/com/redislabs/provider/redis/df/cluster/DataframeClusterSuite.scala
Scala
bsd-3-clause
232
package com.nidkil.downloader.actor import scala.concurrent.Await import scala.concurrent.Future import scala.concurrent.duration.DurationInt import org.scalatest.BeforeAndAfterAll import org.scalatest.Matchers import org.scalatest.WordSpecLike import com.typesafe.config.ConfigFactory import akka.actor.ActorPath impor...
nidkil/akka-downloader
src/test/scala/com/nidkil/downloader/actor/WorkerSpec.scala
Scala
apache-2.0
4,361
package spire package math import spire.algebra._ import org.scalacheck.Arbitrary._ import org.scalacheck._ import Arbitrary.arbitrary object ArbitrarySupport { object Ordinal { trait _0 trait _1 trait _2 trait _3 trait _4 trait _5 trait _6 trait _7 trait _8 trait _9 tr...
non/spire
tests/src/test/scala/spire/math/ArbitrarySupport.scala
Scala
mit
2,682
/* * Copyright 2001-2014 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...
SRGOM/scalatest
scalactic-macro/src/main/scala/org/scalactic/anyvals/PosZFloatMacro.scala
Scala
apache-2.0
1,106
package util import collection.immutable.SortedSet package object power { type PowerComponents = Set[PowerComponent] type PowerUnits = SortedSet[PowerUnit] }
Shopify/collins
app/util/power/package.scala
Scala
apache-2.0
164
/* * Copyright (C) 2013 Alcatel-Lucent. * * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * Licensed to you 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 cop...
molecule-labs/molecule
molecule-core/src/main/scala/molecule/stream/ochan/immutable/MapperT.scala
Scala
apache-2.0
2,633
/* * 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
blaze/src/main/scala/edu/latrobe/blaze/modules/jvm/MultiplyFilter_JVM_Baseline.scala
Scala
apache-2.0
9,824
package se.sics.caracaldb.driver import se.sics.caracaldb.driver.experiments._ import se.sics.kompics.network.Transport object Experiments { val registered = Map( 0 -> new SimpleTransfer(Transport.TCP), 1 -> new SimpleTransfer(Transport.UDT), 2 -> new SimpleTransfer(Transport.DATA), ...
CaracalDB/CaracalDB
experiments/driver/src/main/scala/se/sics/caracaldb/driver/Experiments.scala
Scala
gpl-2.0
640
/* * Copyright (c) 2014-2016 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
haensel-ams/snowplow
3-enrich/hadoop-event-recovery/src/main/scala/com/snowplowanalytics/hadoop/scalding/preprocessors.scala
Scala
apache-2.0
1,767
package io.youi.component import io.youi.component.support.FontSupport import io.youi.component.types.Prop import io.youi.dom import org.scalajs.dom.{Event, html} class TextInput(element: html.Input = dom.create.input, password: Boolean = false) extends Component(element) with FontSupport { lazy val...
outr/youi
gui/src/main/scala/io/youi/component/TextInput.scala
Scala
mit
1,005
package jsky.app.ot.viewer.action import edu.gemini.pot.sp.{Conflicts, ISPNode} import jsky.app.ot.vcs.{VcsStateEvent, VcsIcon, ConflictNavigator} import jsky.app.ot.viewer.SPViewer import javax.swing.{KeyStroke, Action, Icon} import java.awt.event.{InputEvent, ActionEvent, KeyEvent} import scala.swing.{Component, Di...
arturog8m/ocs
bundle/jsky.app.ot/src/main/scala/jsky/app/ot/viewer/action/VcsShowConflictAction.scala
Scala
bsd-3-clause
3,744
package de.m7w3.signal.controller import de.m7w3.signal.ApplicationContext import scala.reflect.runtime.universe.{Type, typeOf} import scalafx.Includes._ import scalafx.scene.Parent import scalafxml.core.{DependenciesByType, FXMLView} import scalafxml.core.macros.{nested, sfxml} @sfxml class MainViewController(@nest...
ayoub-benali/signal-desktop-client
src/main/scala/de/m7w3/signal/controller/MainViewController.scala
Scala
apache-2.0
1,019
/* Copyright 2009-2016 EPFL, Lausanne */ package leon package synthesis import purescala.Expressions.Choose import purescala.Definitions._ import purescala.ExprOps._ import purescala.DefOps._ import purescala.ScalaPrinter import solvers._ import leon.utils._ import scala.concurrent.duration._ import synthesis.strat...
regb/leon
src/main/scala/leon/synthesis/Synthesizer.scala
Scala
gpl-3.0
5,624
/** * Copyright (C) 2012-2013 Vadim Bartko ([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 2 of the License, or * (at your option) any later ve...
hudvin/nomad
src/main/scala/com/nevilon/nomad/storage/graph/TitanDBService.scala
Scala
gpl-2.0
3,387
/** * Copyright (C) 2013 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 prog...
brunobuzzi/orbeon-forms
xforms/jvm/src/test/scala/org/orbeon/oxf/client/ClientFormRunnerSummaryTest.scala
Scala
lgpl-2.1
1,118
/* * 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 ...
ArvinDevel/onlineAggregationOnSparkV2
core/src/main/scala/org/apache/spark/util/collection/ChainedBuffer.scala
Scala
apache-2.0
5,167
/* * Copyright 2013-2016 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 ap...
amuramatsu/Laika
core/src/test/scala/laika/rewrite/CrossReferenceSpec.scala
Scala
apache-2.0
7,742
package org.jetbrains.plugins.scala package testingSupport.test.utest import com.intellij.testIntegration.TestFramework import org.jetbrains.plugins.scala.extensions.IteratorExt import org.jetbrains.plugins.scala.lang.psi.ElementScope import org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil.isInheritorDeep import org....
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/testingSupport/test/utest/UTestTestFramework.scala
Scala
apache-2.0
1,902
package monocle import monocle.function.Plated /** * Show how could we use Optics to manipulate some Json AST */ class JsonExample extends MonocleSuite { sealed trait Json case class JsString(s: String) extends Json case class JsNumber(n: Int) extends Json case class JsArray(l: List[Json]) extends Json ...
rperry/Monocle
example/src/test/scala/monocle/JsonExample.scala
Scala
mit
6,023
package com.nitin.nizhawan.decompiler.structures.constantpool import com.nitin.nizhawan.decompiler.main.ByteReader /** * Created by nitin on 13/12/15. */ class MethodTypeConstPoolEntry(tag:Int,br:ByteReader,pool:ConstantPool) extends ConstPoolEntry(tag,br,pool){ val index = br.readChar() override lazy val info ...
nitin-nizhawan/jedi
src/com/nitin/nizhawan/decompiler/structures/constantpool/MethodTypeConstPoolEntry.scala
Scala
artistic-2.0
353
package ionroller import play.api.libs.json._ final case class ReleaseVersion(tag: String) object ReleaseVersion { implicit object JsonFormat extends Format[ReleaseVersion] { def reads(json: JsValue): JsResult[ReleaseVersion] = json.validate[String] map ReleaseVersion.apply def writes(o: ReleaseVers...
browngeek666/ionroller
core/src/main/scala/ionroller/ReleaseVersion.scala
Scala
mit
366
package concrete.constraint.semantic import com.typesafe.scalalogging.LazyLogging import concrete._ import concrete.constraint.AdviseCount import cspom._ import cspom.variable.IntVariable import org.scalatest.{FlatSpec, Matchers, OptionValues} import scala.util.Random class DiffNTest extends FlatSpec with Matchers w...
concrete-cp/concrete
src/test/scala/concrete/constraint/semantic/DiffNTest.scala
Scala
lgpl-2.1
2,663
package models.storage.nodes import models.storage.Interval import no.uio.musit.formatters.StrictFormatters._ import play.api.libs.functional.syntax._ import play.api.libs.json.Reads._ import play.api.libs.json._ case class EnvironmentRequirement( temperature: Option[Interval[Double]], relativeHumidity: Optio...
MUSIT-Norway/musit
service_backend/app/models/storage/nodes/EnvironmentRequirement.scala
Scala
gpl-2.0
1,065
package spire package algebra /** * Rig is a ring whose additive structure doesn't have an inverse (ie. it is * monoid, not a group). Put another way, a Rig is a Ring without a negative. */ trait Rig[@sp(Byte, Short, Int, Long, Float, Double) A] extends Any with Semiring[A] with AdditiveMonoid[A] with Multiplicativ...
tixxit/spire
core/shared/src/main/scala/spire/algebra/Rig.scala
Scala
mit
950
import scala.annotation.tailrec object OcrNumbers { def convert(grid: List[String]): String = { val validGridSize = grid.length % 4 != 0 || !grid.forall(_.length % 3 == 0) if (validGridSize) "?" else { ocrReadoutLines(grid).map(ocrLine => { val iterator = ocrLine.iterator val...
exercism/xscala
exercises/practice/ocr-numbers/.meta/Example.scala
Scala
mit
1,919
/* * The Reactive Summit Austin talk * Copyright (C) 2016 Jan Machacek * * 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 v...
eigengo/reactive-summit-2016
fat-it/src/main/scala/org/eigengo/rsa/v100/LocalMain.scala
Scala
gpl-3.0
1,550
package im.mange.acceptance.driveby.scalatest.browser import im.mange.acceptance.driveby.scalatest.WebSpecification import im.mange.driveby.conditions._ import org.scalatest.Matchers class TitleSpec extends WebSpecification with Matchers { def `title must be the page title` { given.page(<title>page title</title...
alltonp/driveby
src/test/scala/im/mange/acceptance/driveby/scalatest/browser/TitleSpec.scala
Scala
apache-2.0
369
package com.twitter.finagle.stats /** * Interface used via the LoadService mechanism to obtain an * efficient mechanism to sample stats. */ private[twitter] trait StatsRegistry { /** Whether or not the counters are latched. */ val latched: Boolean def apply(): Map[String, StatEntry] } private[twitter] trai...
twitter/util
util-stats/src/main/scala/com/twitter/finagle/stats/StatsRegistry.scala
Scala
apache-2.0
696
/** * Copyright (C) 2010 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...
orbeon/orbeon-forms
xforms-runtime/shared/src/main/scala/org/orbeon/oxf/xforms/control/ControlLHHASupport.scala
Scala
lgpl-2.1
7,625
/* * 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 ...
andrewor14/iolap
repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala
Scala
apache-2.0
3,905
/* ----------------- sse-breaker ----------------- *\\ * Licensed under the Apache License, Version 2.0. * * Author: Spiros Tzavellas * \\* ----------------------------------------------- */ package com.tzavellas.sse.breaker import org.junit.Assert._ class TestListener extends CircuitStateLis...
sptz45/sse-breaker
src/test/scala/com/tzavellas/sse/breaker/TestListener.scala
Scala
apache-2.0
797
///* // //active-learning-scala: Active Learning library for Scala //Copyright (c) 2014 Davi Pereira dos Santos // // 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 th...
active-learning/active-learning-scala
src/main/scala/clean/tex/newplot.scala
Scala
gpl-2.0
4,457
package intellijhocon.psi import com.intellij.psi.impl.source.PsiFileImpl import com.intellij.psi.{PsiElementVisitor, FileViewProvider} import com.intellij.openapi.fileTypes.FileType import intellijhocon.parser.HoconElementType import HoconElementType.HoconFileElementType import intellijhocon.lang.HoconLanguageFileTyp...
consulo/consulo-scala
intellij-hocon/src/main/scala/intellijhocon/psi/HoconPsiFile.scala
Scala
apache-2.0
582