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 org.tinydvr.config import java.sql.{Connection, DriverManager} import org.squeryl.adapters.H2Adapter import org.squeryl.internals.DatabaseAdapter case class DatabaseConnectionInfo(url: String, username: String, password: String) { private val H2DB_REGEX = """^jdbc:h2:.*""".r def getAdapter: DatabaseAdapt...
lou-k/tinydvr
src/main/scala/org/tinydvr/config/ConfigurationTypes.scala
Scala
gpl-3.0
989
/* * 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/spark/testsuite/datacompaction/DataCompactionBoundaryConditionsTest.scala
Scala
apache-2.0
3,729
/* * 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 ...
jackylk/astro
src/main/scala/org/apache/spark/sql/hbase/HBaseRelation.scala
Scala
apache-2.0
46,861
package japgolly.scalajs.react.extra.internal final class LazyVar[A](initArg: () => A) { // Don't prevent GC of initArg or waste mem propagating the ref private[this] var init = initArg private[this] var value: A = _ def get(): A = { if (init ne null) set(init()) value } def set(a: A): Un...
matthughes/scalajs-react
extra/src/main/scala/japgolly/scalajs/react/extra/internal/LazyVar.scala
Scala
apache-2.0
362
/* * Copyright 2014–2017 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
drostron/quasar
precog/src/main/scala/quasar/precog/package.scala
Scala
apache-2.0
1,032
package com.gu.management object HttpRequestsTimingMetric extends TimingMetric( group = "application", name = "http-requests", title = "HTTP requests", description = "HTTP requests as determined by the request logging filter") object ExceptionCountMetric extends CountMetric( group = "application", name = ...
guardian/guardian-management
management/src/main/scala/com/gu/management/RequestMetrics.scala
Scala
apache-2.0
867
package scala.meta.tests package parsers import org.scalatest.exceptions.TestFailedException import scala.meta._ class ModSuite extends ParseSuite { test("implicit") { val Defn.Object(Seq(Mod.Implicit()), _, _) = templStat("implicit object A") val Defn.Class(Seq(Mod.Implicit()), _, _, _, _) = templStat("im...
Dveim/scalameta
scalameta/scalameta/src/test/scala/scala/meta/tests/parsers/ModSuite.scala
Scala
bsd-3-clause
14,310
package org.mbari.varspub import java.io.{File, FileOutputStream} import javax.imageio.ImageIO import org.junit.runner.RunWith import org.mbari.vars.varspub.WatermarkUtilities import org.scalatest.junit.JUnitRunner import org.scalatest.{Matchers, FlatSpec} /** * * * @author Brian Schlining * @since 2015-03-24T12...
hohonuuli/vars
vars-standalone/src/test/scala/org/mbari/varspub/WatermarkUtilitiesSpec.scala
Scala
lgpl-2.1
928
import scala.scalajs.js import js.annotation._ import js.| package bz.otte.qtip2 { // package QTip2 { import org.scalajs.dom.Event @js.native trait Content extends js.Object { var title: QTip2.Title | js.Any = js.native var text: QTip2.Text = js.native var attr: String = js....
wrotte/scala-js-cytoscape-js
src/main/scala/bz/otte/qtip2/QTip2.scala
Scala
mit
5,378
/* Copyright 2013 Ilya Lakhin (Илья Александрович Лахин) 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 applica...
Eliah-Lakhin/papa-carlo
src/test/scala/name.lakhin.eliah.projects/papacarlo/test/JsonParserSpec.scala
Scala
apache-2.0
1,022
/* * Copyright 2014–2017 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
drostron/quasar
frontend/src/main/scala/quasar/sql/ParsingError.scala
Scala
apache-2.0
1,075
package stronghold.graphs /** * problem description: http://rosalind.info/problems/trie/ */ object PatternMatching { object SampleData { val sample: List[String] = List( "ATAGA", "ATC", "GAT" ) } import SampleData.sample import utils.UtilityFunctions.{readInputDat...
ghostrider77/Bioinformatics
Bioinformatics/src/main/scala-2.11/stronghold/graphs/PatternMatching.scala
Scala
mit
1,063
/*********************************************************************** * Copyright (c) 2013-2018 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...
ddseapy/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/stats/SeqStatTest.scala
Scala
apache-2.0
5,965
package scorex.api.http import play.api.libs.json.{JsPath, Reads} import play.api.libs.functional.syntax._ case class SignedMessage(message: String, signature: String, publickey: String) object SignedMessage { implicit val messageReads: Reads[SignedMessage] = ( (JsPath \ "message").read[String] and (Js...
B83YPoj/Waves
src/main/scala/scorex/api/http/SignedMessage.scala
Scala
apache-2.0
432
package me.shengmin import java.io._ object Io { def useReaderWriter[R](arguments: Array[String])(block: (BufferedReader, PrintWriter) => R) = { use( new BufferedReader( if (arguments.length == 0) new InputStreamReader(System.in) else new FileReader(arguments(0))), new PrintWriter(n...
shengmin/coding-problem
common/src/main/scala/me/shengmin/core/Io.scala
Scala
mit
822
/* * 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...
wangyixiaohuihui/spark2-annotation
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StreamingQueryListenerBus.scala
Scala
apache-2.0
5,509
/** * 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...
eribeiro/kafka
core/src/test/scala/unit/kafka/consumer/TopicFilterTest.scala
Scala
apache-2.0
4,053
/* * AudioFileOut.scala * (FScape) * * Copyright (c) 2001-2022 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Affero General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * [email protected] */ package de.sciss.fscape package...
Sciss/FScape-next
core/jvm/src/main/scala/de/sciss/fscape/graph/AudioFileOut.scala
Scala
agpl-3.0
2,019
package com.mentatlabs.nsa package scalac package options /* -Ywarn-nullary-override * ======================= * 2.9.1 - 2.11.1: Warn when non-nullary overrides nullary, e.g. `def foo()` over `def foo`. * 2.11.2 - 2.12.0: Warn when non-nullary `def f()' overrides nullary `def f'. */ case object ScalacYWarnNul...
melezov/sbt-nsa
nsa-core/src/main/scala/com/mentatlabs/nsa/scalac/options/private/ScalacYWarnNullaryOverride.scala
Scala
bsd-3-clause
416
def hello:String = { println("in hello") "hello" }
grzegorzbalcerek/scala-book-examples
examples/ByNameParameters2.scala
Scala
mit
55
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.testsuite.javalib.util.fun...
scala-js/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/util/function/ToLongBiFunctionTest.scala
Scala
apache-2.0
688
// Starter Code for Exercise 2 // From "Overloading" atom import com.atomicscala.AtomicTest._ f() is 0 f(1) is 1 f(1, 2) is 3 f(1, 2, 3) is 6 f(1, 2, 3, 4) is 10
P7h/ScalaPlayground
Atomic Scala/atomic-scala-solutions/24_Overloading/Starter-2.scala
Scala
apache-2.0
163
/* * Copyright 2013 websudos 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 agreed t...
nosheenzaza/phantom-data-centric
phantom-dsl/src/test/scala/com/websudos/phantom/dsl/specialized/JodaDateTimeColumn.scala
Scala
gpl-2.0
1,959
package com.getjenny.starchat.services /** * Created by Angelo Leto <[email protected]> on 23/08/17. */ import akka.actor.{Actor, Props} import com.getjenny.starchat.SCActorSystem import scala.collection.parallel.ParSeq import scala.concurrent.duration._ import scala.language.postfixOps import scala.util.{Failur...
GetJenny/starchat
src/main/scala/com/getjenny/starchat/services/CronReloadDTService.scala
Scala
gpl-2.0
3,813
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // Licence: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.core.javac import java.nio.charset.Charset import scala.collection.JavaConversions._ import scala.collection.breakOut import scala.collection.mutable.ArrayBuffer import s...
d1egoaz/ensime-sbt
src/sbt-test/sbt-ensime/ensime-server/core/src/main/scala/org/ensime/core/javac/JavaCompletion.scala
Scala
apache-2.0
9,777
// Copyright 2011 Foursquare Labs Inc. All Rights Reserved. package io.fsq.rogue import com.mongodb.BasicDBObjectBuilder import java.util.regex.Pattern abstract class QueryClause[V]( val fieldName: String, val actualIndexBehavior: MaybeIndexed, val conditions: (CondOps.Value, V)* ) { def extend(q: BasicDBObj...
foursquare/fsqio
src/jvm/io/fsq/rogue/QueryClause.scala
Scala
apache-2.0
8,856
package com.github.rosmith.nlp.query.filter import com.github.rosmith.nlp.query.filter.BinaryOperator._ import com.github.rosmith.nlp.query.Variable import com.github.rosmith.nlp.query.OperandValue class BinaryQueryFilter(lv: OperandValue, op: BinaryOperator, rv: OperandValue) extends SingleQueryFilter { private v...
rosmith/giet
src/main/scala/com/github/rosmith/nlp/query/filter/BinaryQueryFilter.scala
Scala
mit
1,215
package cz.vse.easyminer.util import com.github.kxbmap.configs._ import com.typesafe.config.ConfigFactory object Conf { private val config = new Conf(new EnrichTypesafeConfig(ConfigFactory.load)) def apply() = config } class Conf(etc: EnrichTypesafeConfig) { def get[T: AtPath](path: String): T = etc.ge...
KIZI/EasyMiner-Apriori-R
src/main/scala/cz/vse/easyminer/util/Conf.scala
Scala
bsd-3-clause
583
/* * Copyright (c) 2012-2014 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...
TimothyKlim/snowplow
3-enrich/scala-common-enrich/src/main/scala/com.snowplowanalytics.snowplow.enrich/common/adapters/registry/snowplow/RedirectAdapter.scala
Scala
apache-2.0
7,049
/* * 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 ...
vjagadish/samza-clone
samza-core/src/main/scala/org/apache/samza/metrics/reporter/MetricsHeader.scala
Scala
apache-2.0
2,242
package maven2sbt.core /** * @author Kevin Lee * @since 2019-04-21 */ sealed trait Dependency object Dependency extends DependencyPlus { final case class Scala( groupId: GroupId, artifactId: ArtifactId, version: Version, scope: Scope, exclusions: List[Exclusion] ) extends Dependency ...
Kevin-Lee/maven2sbt
core/src/main/scala/maven2sbt/core/Dependency.scala
Scala
mit
1,425
package org.npmaven package rest import java.io.OutputStream import model._ import commonjs. {Registry => NpmRegistry} import util.FutureConversions._ import artifacts.Artifactory._ import net.liftweb.common.Loggable import net.liftweb.http._ import net.liftweb.http.rest.RestHelper import scala.concurrent.ExecutionC...
npmaven/npmaven
src/main/scala/org/npmaven/rest/NpmRest.scala
Scala
apache-2.0
1,546
package org.positronicnet.content import _root_.android.content.Context import _root_.android.content.ContentValues import _root_.android.content.ContentUris import _root_.android.content.ContentResolver import _root_.android.net.Uri import _root_.android.util.Log import _root_.android.database.ContentObserver // andr...
rst/positronic_net
src/main/scala/content/PositronicContentResolver.scala
Scala
bsd-3-clause
11,250
/* This function is usually called `zipWith`. The discussion about stack usage from the explanation of `map` also applies here. By putting the `f` in the second argument list, Scala can infer its type from the previous argument list. */ def zipWith[A,B,C](a: List[A], b: List[B])(f: (A,B) => C): List[C] = (a,b) match ...
ud3sh/coursework
functional-programming-in-scala-textbook/answerkey/datastructures/23.answer.scala
Scala
unlicense
440
/*********************************************************************** * 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-lambda/geomesa-lambda-datastore/src/main/scala/org/locationtech/geomesa/lambda/stream/kafka/KafkaFeatureCache.scala
Scala
apache-2.0
9,232
package parser.px.analyzers import parser.px.Analyzer trait Filter { protected type Tk def ignore(name:Tk):Boolean } trait NoFilter extends Filter { protected type Tk def ignore(name:Tk):Boolean = false }
Y-P-/data-processing-binding
Parser/src/parser/px/analyzers/Filter.scala
Scala
gpl-3.0
234
package japgolly.scalajs.react.extra.internal import japgolly.scalajs.react._ import japgolly.scalajs.react.internal.CoreGeneral._ import japgolly.scalajs.react.internal.EffectUtil import japgolly.scalajs.react.util.DefaultEffects import japgolly.scalajs.react.util.Effect.Sync import japgolly.scalajs.react.vdom.html_<...
japgolly/scalajs-react
extra/src/main/scala/japgolly/scalajs/react/extra/internal/TriStateCheckboxF.scala
Scala
apache-2.0
3,716
package com.danielasfregola.twitter4s.http.clients.rest.application.parameters import com.danielasfregola.twitter4s.http.marshalling.Parameters private[twitter4s] final case class RatesParameters(resources: Option[String]) extends Parameters
DanielaSfregola/twitter4s
src/main/scala/com/danielasfregola/twitter4s/http/clients/rest/application/parameters/RatesParameters.scala
Scala
apache-2.0
244
package ecommerce.shipping.view import ecommerce.shipping.ShippingStatus import ecommerce.shipping.ShippingStatus.ShippingStatus import pl.newicom.dddd.aggregate.EntityId import slick.jdbc.JdbcProfile import slick.jdbc.meta.MTable._ import scala.concurrent.ExecutionContext class ShipmentDao(implicit val profile: Jdb...
pawelkaczor/ddd-leaven-akka-v2
shipping/read-back/src/main/scala/ecommerce/shipping/view/ShipmentDao.scala
Scala
mit
1,773
/* * Copyright 2012 Twitter Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
lanrion/zipkin
zipkin-server/src/test/scala/com/twitter/zipkin/storage/cassandra/CassandraStorageSpec.scala
Scala
apache-2.0
3,659
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v3/B525.scala
Scala
apache-2.0
1,239
package net.cucumbersome.rpgRoller.warhammer.player import net.cucumbersome.rpgRoller.warhammer.player.CombatActor.{Health, Id, Name} case class CombatActor(id: Id, name: Name, statistics: Statistics, hp: Health) object CombatActor{ case class Id(data: String) extends AnyVal with Serializable case class Healt...
CucumisSativus/rpgRollerBackend
src/main/scala/net/cucumbersome/rpgRoller/warhammer/player/CombatActor.scala
Scala
mit
397
/* * 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
examples/spark/src/main/scala/org/apache/carbondata/examples/CarbonDataFrameExample.scala
Scala
apache-2.0
2,517
/* Copyright 2012 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
avibryant/algebird
algebird-core/src/main/scala/com/twitter/algebird/RightFolded.scala
Scala
apache-2.0
1,786
/* * 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 ...
lincoln-lil/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/rules/physical/stream/StreamPhysicalWatermarkAssignerRule.scala
Scala
apache-2.0
2,241
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.testsuite.javalib.util im...
nicolasstucki/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/util/ArrayListTest.scala
Scala
apache-2.0
954
package org.http4s.client.blaze import java.security.SecureRandom import java.security.cert.X509Certificate import javax.net.ssl.{SSLContext, X509TrustManager} import org.http4s.BuildInfo import org.http4s.blaze.util.TickWheelExecutor import org.http4s.headers.{AgentProduct, `User-Agent`} import scala.concurrent.durat...
reactormonk/http4s
blaze-client/src/main/scala/org/http4s/client/blaze/bits.scala
Scala
apache-2.0
1,309
package com.programmaticallyspeaking.ncd.config import com.programmaticallyspeaking.ncd.testing.UnitTest class ConfTest extends UnitTest { case class Arguments(args: String*) { val conf = new Conf(args) } "NCDbg configuration" - { "without arguments" - new Arguments { "has a default listen add...
provegard/ncdbg
src/test/scala/com/programmaticallyspeaking/ncd/config/ConfTest.scala
Scala
bsd-3-clause
1,499
package sharry.restserver import scala.concurrent.duration._ import cats.data.Kleisli import cats.data.OptionT import cats.effect._ import cats.implicits._ import fs2.Stream import sharry.backend.auth.AuthToken import sharry.common.LenientUri import sharry.common.syntax.all._ import sharry.restserver.http4s.EnvMiddl...
eikek/sharry
modules/restserver/src/main/scala/sharry/restserver/RestServer.scala
Scala
gpl-3.0
4,739
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package java.text import java.util.Locale /*...
scala-js/scala-js
javalib-ext-dummies/src/main/scala/java/text/DecimalFormatSymbols.scala
Scala
apache-2.0
1,483
package gapt.provers.escargot.impl import gapt.expr.formula.hol.universalClosure import gapt.proofs.{ ContextSection, HOLClause, HOLSequent, Sequent } import gapt.proofs.resolution._ import gapt.provers.escargot.{ LPO, TermOrdering } import gapt.provers.viper.spin._ import gapt.provers.sat.Sat4j import gapt.utils.Logg...
gapt/gapt
core/src/main/scala/gapt/provers/escargot/state.scala
Scala
gpl-3.0
16,117
package com.olvind package requiresjs import jdk.nashorn.internal.ir._ abstract class VisitorHelperNameStack[N <: Node, Out](n: N) extends VisitorHelper[N, Out](n) { protected var nameStack: List[VarName] = Nil override def enterPropertyNode(n: PropertyNode): Boolean = matcher(n.getKey) { case (i: Iden...
chandu0101/scalajs-react-components
gen/src/main/scala/com/olvind/requiresjs/VisitorHelperNameStack.scala
Scala
apache-2.0
1,093
package org.jetbrains.plugins.scala package codeInspection package shadow import com.intellij.codeInspection.{InspectionManager, LocalQuickFix, ProblemDescriptor, ProblemHighlightType} import com.intellij.openapi.project.Project import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.extensions.ObjectExt...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/codeInspection/shadow/VariablePatternShadowInspection.scala
Scala
apache-2.0
3,227
/* * Copyright 2018 Branislav Lazic * * 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...
BranislavLazic/akka-cqrs-activator
src/main/scala/org/akkacqrs/validator/IssueCommandsValidator.scala
Scala
apache-2.0
2,836
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
pncampbell/ct-calculations
src/test/scala/uk/gov/hmrc/ct/accounts/frs105/boxes/AC406Spec.scala
Scala
apache-2.0
994
/* * Copyright 2018 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/paac-frontend
test/controllers/PostTriggerPensionInputsControllerSpec.scala
Scala
apache-2.0
15,540
/* * 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 writin...
Harikiranvuyyuru/squbs
squbs-unicomplex/src/test/scala/org/squbs/unicomplex/JavaFailedFlowSvcSpec.scala
Scala
apache-2.0
2,189
/* * Copyright 2001-2015 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...
dotty-staging/scalatest
scalatest-test/src/test/scala/org/scalatest/RecoverMethodsSpec.scala
Scala
apache-2.0
5,465
/* * This file is part of the "silex" library of helpers for Apache Spark. * * Copyright (c) 2015 Red Hat, 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....
erikerlandson/silex
src/main/scala/com/redhat/et/silex/frame/natjoin.scala
Scala
apache-2.0
2,487
/* * * * Copyright 2014 Commonwealth Computer Research, 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 * * * ...
nhambletCCRI/geomesa
geomesa-core/src/test/scala/org/locationtech/geomesa/core/iterators/LiveDensityIteratorTest.scala
Scala
apache-2.0
5,564
/** * http://www.codechef.com/SPT2015/problems/SPIT3 * GitHub: https://github.com/amezhenin/codechef_problems */ object Main { /** * Checkout https://github.com/amezhenin/codechef_scala_template to test your solutions with sbt-doctest * {{{ * >>> Main.alg("abcdefgh") * false * * >>> Main.alg("SP...
amezhenin/codechef_problems
contests/SPT2015/spit3.scala
Scala
mit
685
package dbis.pig.cep.nfa import scala.reflect.ClassTag import scala.collection.mutable.ListBuffer import dbis.pig.backends.{SchemaClass => Event} /** * @brief a controller class to construct the NFA for detecting the complex event. * The user should create the states, edges and transitions by calling particular met...
ksattler/piglet
ceplib/src/main/scala/dbis/pig/cep/nfa/NFAController.scala
Scala
apache-2.0
3,403
/* * Copyright (C) FuseSource, Inc. * http://fusesource.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
janstey/fuse
mq/mq-fabric/src/main/scala/org/fusesource/mq/fabric/ActiveMQServiceFactory.scala
Scala
apache-2.0
21,537
package fpinscala.state trait RNG { def nextInt: (Int, RNG) // Should generate a random `Int`. We'll later define other functions in terms of `nextInt`. } object RNG { case class SimpleRNG(seed: Long) extends RNG { def nextInt: (Int, RNG) = { val newSeed = (seed * 0x5DEECE66DL + 0xBL) & 0xFFFFFFFFFFFFL ...
goboss/fpinscala
exercises/src/main/scala/fpinscala/state/State.scala
Scala
mit
6,353
package com.eclipsesource.schema.internal.draft4.constraints import com.eclipsesource.schema.{SchemaMap, SchemaObject, SchemaProp, SchemaResolutionContext, SchemaType, SchemaValue} import com.eclipsesource.schema.internal.constraints.Constraints._ import com.eclipsesource.schema.internal.validation.VA import com.osink...
edgarmueller/play-json-schema-validator
src/main/scala/com/eclipsesource/schema/internal/draft4/constraints/ObjectConstraints4.scala
Scala
apache-2.0
3,151
/*********************************************************************** * Copyright (c) 2013-2018 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...
ddseapy/geomesa
geomesa-geojson/geomesa-geojson-rest/src/main/scala/org/locationtech/geomesa/geojson/servlet/GeoJsonServlet.scala
Scala
apache-2.0
8,035
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
bravo-zhang/spark
core/src/main/scala/org/apache/spark/broadcast/BroadcastFactory.scala
Scala
apache-2.0
1,727
/** * 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 not...
themarkypantz/kafka
core/src/test/scala/unit/kafka/admin/ReassignPartitionsClusterTest.scala
Scala
apache-2.0
27,062
/* Copyright (C) 2008-2014 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance ...
patverga/factorie
src/main/scala/cc/factorie/app/nlp/segment/PunktTokenizer.scala
Scala
apache-2.0
8,732
package models case class Messages(totalCount: Int, edges: List[MessageEdges], pageInfo: MessagePageInfo)
sysgears/apollo-universal-starter-kit
modules/chat/server-scala/src/main/scala/models/Messages.scala
Scala
mit
107
/* * 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-actormonitor/src/test/scala/org/squbs/actormonitor/TestCube/TestCube.scala
Scala
apache-2.0
926
package com.wavesplatform.lang.contract.meta import com.wavesplatform.lang.v1.compiler.Types.FINAL import com.wavesplatform.protobuf.dapp.DAppMeta private[meta] trait MetaMapperStrategy[V <: MetaVersion] { def toProto(data: List[List[FINAL]], nameMap: Map[String, String] = Map.empty): Either[String, DAppMeta] def...
wavesplatform/Waves
lang/shared/src/main/scala/com/wavesplatform/lang/contract/meta/MetaMapperStrategy.scala
Scala
mit
384
/* * 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://mozilla.org/MPL/2.0/. */ /* TODO: Large parts of this code are identical or at least very similar to the code that * implements ...
sccblom/vercors
viper/silicon/src/main/scala/supporters/qps/PredicateSnapFunctionsEmitter.scala
Scala
mpl-2.0
3,937
/* * 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 ...
himanshudhami/PredictionIO
tools/src/main/scala/org/apache/predictionio/tools/dashboard/Dashboard.scala
Scala
apache-2.0
5,235
package controllers import javax.inject.Inject import play.api.mvc._ /** * A very small controller that renders a home page. */ class HomeController @Inject()(cc: ControllerComponents) extends AbstractController(cc) { def index = Action { implicit request => Ok("Hello, this is Play!") } }
Shenker93/playframework
framework/src/sbt-plugin/src/sbt-test/play-sbt-plugin/generated-keystore/src/main/scala/controllers/HomeController.scala
Scala
apache-2.0
304
/* * 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 ...
wangmiao1981/spark
sql/core/src/test/scala/org/apache/spark/sql/ExplainSuite.scala
Scala
apache-2.0
26,407
package org.jetbrains.plugins.scala.compilationCharts.ui sealed trait VAlign object VAlign { final case object Center extends VAlign final case object Bottom extends VAlign final case object Top extends VAlign }
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/compilationCharts/ui/VAlign.scala
Scala
apache-2.0
221
package breeze.linalg.operators import breeze.collection.mutable.OpenAddressHashArray import breeze.generic.UFunc import breeze.generic.UFunc.UImpl2 import breeze.linalg.support.{CanCopy, CanTraverseValues, CanZipMapKeyValues, CanZipMapValues} import breeze.linalg._ import breeze.macros.expand import breeze.math.{Fiel...
scalanlp/breeze
math/src/main/codegen/breeze/linalg/operators/HashVectorOps.scala
Scala
apache-2.0
26,195
package com.github.mdr.mash.parser sealed trait RedirectOperator object RedirectOperator { case object StandardInput extends RedirectOperator case object StandardOutput extends RedirectOperator }
mdr/mash
src/main/scala/com/github/mdr/mash/parser/RedirectOperator.scala
Scala
mit
206
package com.sksamuel.elastic4s.bulk import com.sksamuel.elastic4s.DocumentRef import com.sksamuel.elastic4s.index.RichIndexResponse import org.elasticsearch.action.DocWriteRequest.OpType import org.elasticsearch.action.bulk.BulkItemResponse import org.elasticsearch.action.bulk.BulkItemResponse.Failure import org.elast...
aroundus-inc/elastic4s
elastic4s-tcp/src/main/scala/com/sksamuel/elastic4s/bulk/RichBulkItemResponse.scala
Scala
apache-2.0
1,473
/* * Copyright 2014 Treode, 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...
Treode/store
store/test/com/treode/store/locks/LockSpec.scala
Scala
apache-2.0
6,431
package pt.tecnico.dsi.akkastrator import scala.collection.immutable.{HashMap, SortedMap} import scala.collection.{immutable, mutable} import akka.actor.{Actor, ActorLogging, ActorPath, PossiblyHarmful} import akka.persistence._ import shapeless.HNil object Orchestrator { case class StartOrchestrator(id: Long) ...
ist-dsi/akkastrator
src/main/scala/pt/tecnico/dsi/akkastrator/Orchestrator.scala
Scala
mit
17,193
package com.eevolution.context.dictionary.domain.api.service import com.eevolution.context.dictionary.api import com.eevolution.context.dictionary.domain.model.DynamicValidationRule /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This program is free software: you can re...
adempiere/ADReactiveSystem
dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/api/service/DynamicValidationRuleService.scala
Scala
gpl-3.0
1,266
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.testsuite.jsinterop impor...
scala-js/scala-js
test-suite/js/src/test/scala/org/scalajs/testsuite/jsinterop/NonNativeJSTypeTest.scala
Scala
apache-2.0
62,032
package org.apache.spark.sql.cassandra import org.apache.spark.Logging import org.apache.spark.sql._ import org.apache.spark.sql.catalyst.expressions._ import org.apache.spark.sql.catalyst.planning.PhysicalOperation import org.apache.spark.sql.catalyst.plans.logical import org.apache.spark.sql.catalyst.plans.logical.L...
boneill42/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/org/apache/spark/sql/cassandra/CassandraStrategies.scala
Scala
apache-2.0
1,954
package com.tribbloids.spookystuff.utils import scala.collection.mutable.ArrayBuffer /** * heavily stateful iterator that can revert to any previous state using time machine * currently, maxBacktracking is forced to infinite, which consumes huge amount of memory * this will need further optimisation if streamin...
tribbloid/spookystuff
mldsl/src/main/scala/com/tribbloids/spookystuff/utils/BacktrackingIterator.scala
Scala
apache-2.0
1,484
/** * 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...
eribeiro/kafka
core/src/test/scala/unit/kafka/message/MessageCompressionTest.scala
Scala
apache-2.0
4,611
package uk.skelty.ScalIRC import java.io._ import scala.io._ class Message (writer: BufferedWriter, ident: String, channel: String, msgtype: String) { /** * Process a message. * @type String */ def process (isadmin: Boolean, extra: String = "") { println("Processing message type: " + msgtype) if (msgtyp...
SkylarKelty/scalirc
src/main/scala/uk/skelty/ScalIRC/Message.scala
Scala
mit
607
// This implementation of map2 passes the initial RNG to the first argument // and the resulting RNG to the second argument. It's not necessarily wrong // to do this the other way around, since the results are random anyway. // We could even pass the initial RNG to both `f` and `g`, but that might // have unexpected re...
ud3sh/coursework
functional-programming-in-scala-textbook/answerkey/state/06.answer.scala
Scala
unlicense
693
/** * Copyright 2014 Jorge Aliss (jaliss at gmail dot com) - twitter: @jaliss * * 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 * * U...
didmar/securesocial-ws-sample
app/service/CustomRoutesService.scala
Scala
apache-2.0
3,923
/** * Copyright 2016 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
Netflix/osstracker
osstracker-scraper/src/main/scala/com/netflix/oss/tools/osstrackerscraper/GithubScraper.scala
Scala
apache-2.0
13,145
package models.viewhelper import scala.language.higherKinds import controllers.sugar.Requests.OreRequest import ore.db.access.ModelView import ore.db.impl.OrePostgresDriver.api._ import ore.db.impl.schema.{OrganizationRoleTable, OrganizationTable, UserTable} import ore.db.{Model, ModelService} import ore.models.organ...
SpongePowered/Ore
orePlayCommon/app/models/viewhelper/UserData.scala
Scala
mit
2,668
class B extends A { override var x = 3 }
jamesward/xsbt
sbt/src/sbt-test/source-dependencies/var/B.scala
Scala
bsd-3-clause
41
import scala.util.control.Exception._ def safe(c: => Int) = (catching(classOf[ArithmeticException]) or catching(classOf[NumberFormatException])). andFinally{ println("finally safe") }.either(c)
grzegorzbalcerek/scala-book-examples
examples/ToValues2.scala
Scala
mit
240
package org.jetbrains.plugins.scala package lang.psi.light.scala import com.intellij.psi.impl.light.LightElement import org.jetbrains.plugins.scala.lang.psi.api.toplevel.ScNamedElement /** * Nikolay.Tropin * 2014-08-15 */ object isLightScNamedElement { def unapply(lightElem: LightElement): Option[ScNamedElement]...
LPTK/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/light/scala/isLightScNamedElement.scala
Scala
apache-2.0
768
package com.avsystem.commons package macros.misc import com.avsystem.commons.macros.MacroCommons import scala.reflect.macros.blackbox /** * Author: ghik * Created: 20/11/15. */ class LazyLoggingMacros(val c: blackbox.Context) extends MacroCommons { import c.universe._ val DelegationCls = tq"$MiscPkg.Dele...
AVSystem/scala-commons
commons-macros/src/main/scala/com/avsystem/commons/macros/misc/LazyLoggingMacros.scala
Scala
mit
756
package com.github.tweets.gateway.github import com.github.tweets.common.GitHubProjectInfo import org.mockito.Mockito import org.scalatest.FunSuite import org.scalatest.mock.MockitoSugar import org.springframework.web.client.RestTemplate class GitHubAPIGatewayImplTest extends FunSuite with MockitoSugar { implicit v...
andrei-l/tweets-for-github-projects-gatherer
src/test/scala/com/github/tweets/gateway/github/GitHubAPIGatewayImplTest.scala
Scala
mit
1,137
package zzb.datatype import java.text.SimpleDateFormat import java.util.concurrent.atomic.AtomicReference import com.github.nscala_time.time.Imports import org.joda.time.format.DateTimeFormatter //import spray.json.DefaultJsonProtocol._ import BasicJsonFormats._ import spray.json._ import zzb.datatype.meta.EnumType...
stepover/zzb
zzb-datatype/src/main/scala/zzb/datatype/BasicTypes.scala
Scala
mit
11,407
package cromwell.backend.validation import cats.data.ValidatedNel import cats.syntax.validated._ import cromwell.core.{OptionNotFoundException, WorkflowOptions} import common.util.TryUtil import wom.core.EvaluatedRuntimeAttributes import wom.types.WomType import wom.values.WomValue import scala.util.{Failure, Try} o...
ohsu-comp-bio/cromwell
backend/src/main/scala/cromwell/backend/validation/RuntimeAttributesDefault.scala
Scala
bsd-3-clause
1,561
/** * 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 ...
ryan-williams/guacamole
src/main/scala/org/bdgenomics/guacamole/commands/SomaticPoCIndelCaller.scala
Scala
apache-2.0
5,215