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 may ...
ArvinDevel/onlineAggregationOnSparkV2
sql/core/src/test/scala/org/apache/spark/sql/UDFSuite.scala
Scala
apache-2.0
6,215
object UpdateVars3 { def main(args: Array[String]) { var x: Int = 3 var y: Int = x + 2 y = 2 * y x = y - x println(s"x = $x, y = $y") } }
LoyolaChicagoBooks/introcs-scala-examples
update_vars3/update_vars3.scala
Scala
gpl-3.0
162
package com.yammer.dropwizard.examples object SayingFactory { def buildSaying(implicit config: ExampleConfiguration) = config.saying }
jamesward/dropwizard
dropwizard-scala_2.9.1/src/test/scala/com/yammer/dropwizard/examples/SayingFactory.scala
Scala
apache-2.0
138
package scala.slick.ast import scala.slick.SlickException import scala.slick.util.Logging import TypeUtil.typeToTypeUtil import Util._ /** * A node in the query AST. * * Every Node has a number of child nodes and an optional type annotation. */ trait Node { type Self >: this.type <: Node private[this] var see...
retronym/slick
src/main/scala/scala/slick/ast/Node.scala
Scala
bsd-2-clause
26,270
package im.actor.server.api.frontend import akka.actor._ import akka.event.Logging import akka.stream.Materializer import akka.stream.scaladsl._ import slick.driver.PostgresDriver.api.Database import im.actor.server.session.SessionRegion import im.actor.server.tls.{ Tls, TlsContext } object TcpFrontend extends Front...
boneyao/actor-platform
actor-server/actor-frontend/src/main/scala/im/actor/server/api/frontend/TcpFrontend.scala
Scala
mit
1,043
/* * Copyright (C) 2005, The OpenURP 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...
openurp/api
edu/src/main/scala/org/openurp/edu/grade/course/domain/DefaultGpaPolicy.scala
Scala
lgpl-3.0
3,995
/* * 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/Action.scala
Scala
gpl-3.0
2,307
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
maropu/spark
resource-managers/mesos/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosFineGrainedSchedulerBackendSuite.scala
Scala
apache-2.0
16,638
/* * 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/query/prepared/PreparedUpdateQueryTest.scala
Scala
apache-2.0
9,405
import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.http.scaladsl.server.Directives._ import akka.stream.ActorMaterializer import ch.megard.akka.http.cors.scaladsl.CorsDirectives.cors import com.mongodb.event.{ClusterClosedEvent, ClusterDescriptionChangedEvent, ClusterListener, ClusterOpeningEvent}...
CucumisSativus/rpgRollerBackend
src/main/scala/Main.scala
Scala
mit
3,332
/* * Copyright 2001-2009 Stephen Colebourne * * 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...
aparo/scalajs-joda
src/main/scala/org/joda/time/PeriodType.scala
Scala
apache-2.0
22,603
package org.pgscala package builder package converters object PGNullableURLConverterBuilder extends PGNullableConverterBuilder { override val imports = """ import java.net.URL; import java.net.MalformedURLException; """ val pgType = "varchar" val clazz = "java.net.URL" val to = "url.toString()" val from ...
melezov/pgscala
builder/src/main/scala/org/pgscala/builder/converters/java/PGNullableURLConverterBuilder.scala
Scala
bsd-3-clause
407
package magnolia1 import language.experimental.macros import scala.annotation.tailrec import scala.reflect.* case class TypeInfo( owner: String, short: String, typeParams: Iterable[TypeInfo] ): def full: String = s"$owner.$short" object CaseClass: trait Param[Typeclass[_], Type]( val label: Str...
propensive/magnolia
src/core/interface.scala
Scala
apache-2.0
5,214
package com.cloudray.scalapress.folder.tag import org.scalatest.{OneInstancePerTest, FunSuite} import org.scalatest.mock.MockitoSugar import com.cloudray.scalapress.folder.{FolderDao, Folder} import javax.servlet.http.HttpServletRequest import org.mockito.Mockito import com.cloudray.scalapress.framework.{ScalapressReq...
vidyacraghav/scalapress
src/test/scala/com/cloudray/scalapress/folder/tag/PrimaryFoldersTagTest.scala
Scala
apache-2.0
1,303
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2010, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
cran/rkafkajars
java/scala/collection/mutable/AddingBuilder.scala
Scala
apache-2.0
1,563
package algebra package ring import scala.{specialized => sp} /** * CommutativeRig is a Rig that is commutative under multiplication. */ trait CommutativeRig[@sp(Int, Long, Float, Double) A] extends Any with Rig[A] with CommutativeSemiring[A] with MultiplicativeCommutativeMonoid[A] object CommutativeRig extends Ad...
sritchie/algebra
core/src/main/scala/algebra/ring/CommutativeRig.scala
Scala
mit
496
package com.github.easel.sjscharts.morrisjs import org.scalajs.dom import scala.scalajs.js import scala.scalajs.js.JSConverters._ import scala.scalajs.js.annotation.{JSGlobal, JSName} import scala.scalajs.js.{JSON, UndefOr, |} /** * Created by erik on 1/7/16. */ //scalastyle:off @js.native @JSGlobal("Morris") ob...
easel/scalajs-charts
src/main/scala/com/github/easel/sjscharts/morrisjs/Morris.scala
Scala
mit
4,711
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
liquidarmour/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/frs105/boxes/AC8087.scala
Scala
apache-2.0
1,329
/* * 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 ...
shaoxuan-wang/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/rules/logical/CalcRankTransposeRule.scala
Scala
apache-2.0
7,346
import sbt._ import com.twitter.sbt._ class ChainsawProject(info: ProjectInfo) extends StandardProject(info) with SubversionPublisher { override def subversionRepository = Some("http://svn.local.twitter.com/maven/") val slf4jVersion = "1.5.8" val slf4jApi = "org.slf4j" % "slf4j-api" % slf4jVersion withSources ...
twitter-archive/chainsaw
project/build/project.scala
Scala
apache-2.0
541
package tastytest import IntersectionErasure._ object TestIntersectionErasure extends Suite("TestIntersectionErasure") { def boxedId[T](t: T): T = t val bWithA: B with A = new B with A {} // dotc erases to A, scalac to B test("SAM bridges") { val sam: IntersectionSAM = x => x assert(sam(bWithA) === b...
scala/scala
test/tasty/run/src-2/tastytest/TestIntersectionErasure.scala
Scala
apache-2.0
1,037
/* * 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 ...
paulcastro/openwhisk
core/controller/src/main/scala/whisk/core/controller/Controller.scala
Scala
apache-2.0
9,919
/** * 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/authenticator/src/main/scala/silhouette/authenticator/pipeline/ReadsAuthenticationPipeline.scala
Scala
apache-2.0
2,134
package com.arcusys.valamis.web.configuration.database import com.arcusys.valamis.persistence.common.SlickProfile import com.arcusys.valamis.persistence.impl.slide.SlideTableComponent import com.arcusys.valamis.slide.model.DeviceEntity import slick.driver.JdbcProfile import slick.jdbc.JdbcBackend class CreateDefaultD...
igor-borisov/valamis
valamis-portlets/src/main/scala/com/arcusys/valamis/web/configuration/database/CreateDefaultDevices.scala
Scala
gpl-3.0
1,271
/* * Copyright 2015 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 ...
keshin/squbs
squbs-pattern/src/main/scala/org/squbs/pattern/orchestration/OFuture.scala
Scala
apache-2.0
22,714
/******************************************************************************* * Copyright (c) 2019. Carl Minden * * 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 ...
carlminden/anathema-roguelike
src/com/anathema_roguelike/entities/characters/stimuli/Sound.scala
Scala
gpl-3.0
3,041
/* * Copyright 2014 IBM Corp. * * 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...
codeaudit/spark-kernel
kernel-api/src/test/scala/integration/interpreter/AddExternalJarMagicSpecForIntegration.scala
Scala
apache-2.0
7,771
/* * 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.aws trait AdpAction extends AdpDataPipelineObject /** * An act...
realstraw/hyperion
core/src/main/scala/com/krux/hyperion/aws/AdpActions.scala
Scala
bsd-3-clause
1,330
/* * Copyright (C) 2007-2008 Artima, Inc. 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 requir...
peachyy/scalastu
modules/Food.scala
Scala
apache-2.0
884
package library.network.utils import java.net.Socket import library.network.rpcprotocol.LibraryClientRPCWorker import library.services.ILibraryServer class LibraryRPCConcurrentServer(val port: Int, val libraryServer: ILibraryServer) extends AbstractConcurrentServer(port) { println("LibraryRPCConcurrentServer...
leyyin/university
systems-for-design-and-implementation/labs/lab3/LibraryNetworking/src/library/network/utils/LibraryRPCConcurrentServer.scala
Scala
mit
517
package views.html.search import play.api.data.Form import lila.api.Context import lila.app.templating.Environment._ import lila.app.ui.ScalatagsTemplate._ import lila.common.paginator.Paginator import controllers.routes object index { import trans.search._ def apply(form: Form[_], paginator: Option[Paginator...
luanlv/lila
app/views/search/index.scala
Scala
mit
2,864
/*********************************************************************** * Copyright (c) 2013-2020 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...
aheyne/geomesa
geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/sft/SimpleFeatureSpec.scala
Scala
apache-2.0
11,298
/* * Generation.scala * (Muta) * * Copyright (c) 2013-2014 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Lesser General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * [email protected] */ package de.sciss.muta trait Generatio...
Sciss/Muta
src/main/scala/de/sciss/muta/Generation.scala
Scala
lgpl-3.0
434
object Signature { enum MatchDegree { case NoMatch, ParamMatch, FullMatch } export MatchDegree._ // Check that exported values have singeleton types val x: MatchDegree.NoMatch.type = NoMatch // Check that the following two methods are not exported. // Exporting them would lead to a double definitio...
som-snytt/dotty
tests/pos/export-enum.scala
Scala
apache-2.0
412
package net.janvsmachine.fpinscala.parsing sealed trait Json object Json { case object JNull extends Json case class JNumber(get: Double) extends Json case class JString(get: String) extends Json case class JBool(get: Boolean) extends Json case class JArray(get: IndexedSeq[Json]) extends Json case class J...
stettix/fp-in-scala
src/main/scala/net/janvsmachine/fpinscala/parsing/Json.scala
Scala
apache-2.0
2,172
import sbt._ object Versions { val scalaVersion = "2.11.6" val ideaVersion = "143.379.1" val sbtStructureVersion = "4.2.1" val luceneVersion = "4.8.1" val aetherVersion = "1.0.0.v20140518" val sisuInjectVersion = "2.2.3" val wagonVersion = "2.6" val httpComponentsVersion = "4.3.1" } object Dependenci...
LPTK/intellij-scala
project/dependencies.scala
Scala
apache-2.0
6,811
/** * Created by Variant on 16/3/16. */ //包对象 package object people{ val defaultName = "Scala" } //包中可以引用包对象定义的成员变量 package people{ class people{ val name = defaultName } } object PackageOps { } //特殊引入写法 import java.util.{HashMap => JavaHashMap} //不用scala中的Stringbuilder类 import scala.{StringBuilder => _...
sparkLiwei/ProgrammingNote
scalaLearning/scalaOOP/PackageOps.scala
Scala
cc0-1.0
436
/** * 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 ...
erictu/adam
adam-core/src/main/scala/org/bdgenomics/adam/projections/VariantField.scala
Scala
apache-2.0
1,017
/* * 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
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingAggregationSuite.scala
Scala
apache-2.0
22,605
package models import org.bson.types.ObjectId import play.api.libs.functional.syntax._ import play.api.libs.json.{JsPath, Reads} /** * Comic Class representing comic meta data and strategies for parsing strips from comic website. * @param id Object id uniquely identifying a Comic. * @param hostname String usually ...
comicgator/comicgator
maestro/app/models/Comic.scala
Scala
mit
2,262
package org.jetbrains.plugins.scala import com.intellij.ProjectTopics import com.intellij.execution.ExecutionException import com.intellij.openapi.Disposable import com.intellij.openapi.editor.Document import com.intellij.openapi.externalSystem.ExternalSystemModulePropertyManager import com.intellij.openapi.fileEditor...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/project/package.scala
Scala
apache-2.0
20,534
/* * 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-blink/src/test/scala/org/apache/flink/table/calcite/FlinkTypeFactoryTest.scala
Scala
apache-2.0
2,401
package com.dividezero.stubby.core.service.model import com.dividezero.stubby.core.model.StubResponse class StubServiceResult( // returned by the 'findMatch' method val attempts: List[MatchResult], val response: Option[StubResponse], val delay: Option[Int]) { def this(attempts: List[MatchResult]) = t...
themillhousegroup/http-stub-server-scala
core/src/main/scala/com/dividezero/stubby/core/service/model/StubServiceResult.scala
Scala
apache-2.0
411
/* * 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 ...
mrsqueeze/SparkOnHBase
src/main/scala/com/cloudera/spark/hbase/example/HBaseBulkPutExampleFromFile.scala
Scala
apache-2.0
2,684
package org.jetbrains.plugins.scala.lang.resolveSemanticDb import java.nio.file.{Files, Path} import scala.collection.mutable import scala.meta.internal.semanticdb.Locator case class SDbRef(symbol: String, position: TextPos, endPosition: TextPos, targetPosition: Option[TextPos]) { def range: (TextPos, TextPos) = (...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/resolveSemanticDb/SemanticDb.scala
Scala
apache-2.0
4,538
/* Copyright 2009-2021 EPFL, Lausanne */ package stainless package extraction package imperative trait Definitions extends oo.Trees { self: Trees => override type Symbols >: Null <: ImperativeAbstractSymbols trait ImperativeAbstractSymbols extends OOAbstractSymbols with imperative.SymbolOps wit...
epfl-lara/stainless
core/src/main/scala/stainless/extraction/imperative/Definitions.scala
Scala
apache-2.0
1,274
package is.hail.expr.ir import scala.collection.mutable object RefEquality { def apply[T <: AnyRef](t: T): RefEquality[T] = new RefEquality[T](t) } class RefEquality[+T <: AnyRef](val t: T) { override def equals(obj: scala.Any): Boolean = obj match { case r: RefEquality[T] => t.eq(r.t) case _ => false ...
hail-is/hail
hail/src/main/scala/is/hail/expr/ir/RefEquality.scala
Scala
mit
2,064
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/alignment/AlignmentCombination.scala
Scala
apache-2.0
784
/* * 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 ...
zhangminglei/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/factories/TableFactoryUtil.scala
Scala
apache-2.0
2,761
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.it.http.parsing import akka.stream.Materializer import akka.stream.scaladsl.Source import akka.util.ByteString import play.api.test._ import play.api.mvc.BodyParsers class IgnoreBodyParserSpec extends PlaySpecification { "The ignore bo...
wegtam/playframework
core/play-integration-test/src/it/scala/play/it/http/parsing/IgnoreBodyParserSpec.scala
Scala
apache-2.0
1,040
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/EmptyParenthesesInspectionTest.scala
Scala
apache-2.0
1,513
/*********************************************************************** * 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/test/scala/org/locationtech/geomesa/process/transform/ArrowConversionProcessTest.scala
Scala
apache-2.0
4,938
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
greghogan/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/batch/BatchExecHashJoin.scala
Scala
apache-2.0
11,166
package output import leon.lazyeval._ import leon.lang._ import leon.annotation._ import leon.instrumentation._ import leon.invariant._ object MergeSort { case class Set1[T]() abstract class IList { def size: BigInt = { this match { case ICons(_, xs) => BigInt(1) + xs.size cas...
epfl-lara/leon
testcases/lazy-datastructures/ManualnOutdated/LazyMegeSort-edited.scala
Scala
gpl-3.0
5,675
package com.themillhousegroup.arallon.util /** * Should you ever need to rebuild the list of timezones, * this will do it using the latest Java TZ data: */ object TZBuilder { val caseInsensitiveStringSort = (a: String, b: String) => String.CASE_INSENSITIVE_ORDER.compare(a, b) < 0 lazy val allTimeZoneStrings =...
themillhousegroup/arallon
src/main/scala/com/themillhousegroup/arallon/util/TZBuilder.scala
Scala
mit
941
package cronus.auth import com.twitter.inject.Logging import com.twitter.util.Await import org.scalatest.WordSpec import scala.annotation.tailrec class SaltGeneratorTest extends WordSpec with Logging { val salt = new SaltGenerator "SaltGenerator" should { "Not generate two salts that are the same" in { ...
codeape/cronus
src/test/scala/cronus/auth/SaltGeneratorTest.scala
Scala
apache-2.0
603
package fs2.async.mutable import fs2._ import fs2.Stream._ /** * Asynchronous Topic. * * Topic allows you to distribute `A` published by arbitrary number of publishers to arbitrary number of subscribers. * * Topic has built-in back-pressure support implemented as maximum bound (`maxQueued`) that a subscribe...
japgolly/scalaz-stream
core/src/main/scala/fs2/async/mutable/Topic.scala
Scala
mit
4,809
package com.crobox.clickhouse import akka.http.scaladsl.model.StatusCode sealed abstract class ClickhouseExecutionException(msg: String, cause: Throwable = null) extends RuntimeException(msg, cause) { val retryable: Boolean } case class ClickhouseException(message: String, query: String, cause: Throwable = nul...
crobox/clickhouse-scala-client
client/src/main/scala/com.crobox.clickhouse/ClickhouseException.scala
Scala
lgpl-3.0
1,107
package com.szadowsz.cadisainmduit.people.census.uk.norire import java.io.File import com.szadowsz.cadisainmduit.people.census.canada.CanadaNamesFreqCalculator._ import com.szadowsz.cadisainmduit.people.census.{CensusHandler, SegGenderCensusHandler} import com.szadowsz.common.io.write.CsvWriter import com.szadowsz.sp...
zakski/project-cadisainmduit
module/dataprep-people/src/main/scala/com/szadowsz/cadisainmduit/people/census/uk/norire/NorireNamesFreqCalculator.scala
Scala
apache-2.0
3,371
/** * 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...
linkedin/pinot
pinot-connectors/pinot-spark-connector/src/main/scala/org/apache/pinot/connector/spark/connector/PinotServerDataFetcher.scala
Scala
apache-2.0
5,352
package models.join import models.db._ /** * * @author ponkotuy * Date: 14/10/22. */ case class SlotItemWithMaster(item: SlotItem, master: MasterSlotItem) { def memberId = item.memberId def slotitemId = master.id def name = master.name def category = master.category def iconType = master.iconType def ...
ttdoda/MyFleetGirls
server/app/models/join/SlotItemWithMaster.scala
Scala
mit
1,494
package aoc.day07 import io.IO object Part1 extends App { /* --- Day 7: Some Assembly Required --- This year, Santa brought little Bobby Tables a set of wires and bitwise logic gates! Unfortunately, little Bobby is a little under the recommended age range, and he needs help assembling the circuit. Each wire has ...
GuillaumeDD/AdventOfCode2015
src/main/scala/aoc/day07/Part1.scala
Scala
gpl-3.0
6,373
package screact import scutil.core.implicits.* import scutil.lang.* // AKA Publisher object Events { // (in foldLeft never[T]) { _ orElse _ } def multiOrElse[T](in:Seq[Events[T]]):Events[T] = events { (in mapFilter { _.message }).headOption } def multiOccurs[T](in:Seq[Events[T]]):Events[Seq[T]] = events...
ritschwumm/screact
src/main/scala/screact/Events.scala
Scala
bsd-2-clause
7,122
package com.twitter.finatra.validation.constraints import com.twitter.finatra.validation.ErrorCode import com.twitter.util.validation.constraintvalidation.TwitterConstraintValidatorContext import jakarta.validation.{ConstraintValidator, ConstraintValidatorContext} import java.util.concurrent.TimeUnit import java.util....
twitter/finatra
validation/src/main/scala/com/twitter/finatra/validation/constraints/TimeGranularityConstraintValidator.scala
Scala
apache-2.0
2,198
package mashup import java.util.concurrent.CountDownLatch import akka.actor.{Actor, ActorRef, Props} import com.danielasfregola.twitter4s.TwitterRestClient import com.danielasfregola.twitter4s.entities._ import com.danielasfregola.twitter4s.entities.enums.ResultType import mashup.AppImplicitsAndConfig.AppConfig impor...
kevin-orr/interviewQs
github-twitter-mashup-app/scala-with-actors/src/main/scala/mashup/TwitterActor.scala
Scala
mit
2,650
/* * 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 * * Unless required by applica...
jnh5y/geomesa
geomesa-core/src/main/scala/org/locationtech/geomesa/core/data/GeoMesaMetadata.scala
Scala
apache-2.0
8,687
/* * The MIT License (MIT) * * Copyright (c) 2021 GatlingCql developers * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights t...
gatling-cql/GatlingCql
src/main/scala/io/github/gatling/cql/request/CqlProtocolBuilder.scala
Scala
mit
1,668
/* * 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/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBFileManager.scala
Scala
apache-2.0
21,099
/** 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 use th...
shirleyyoung0812/spark-streaming-kafka-output
src/test/scala/org/cloudera/spark/streaming/kafka/util/KafkaConsumer.scala
Scala
apache-2.0
3,390
/* * 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/core/src/test/scala/org/apache/spark/sql/execution/datasources/SchemaPruningSuite.scala
Scala
apache-2.0
18,538
package pgep.GeneticOperators.Reproducers class TwoPointCrossover(selection: GenotypeSelector) extends Reproducer(2, 1, selection) { def this() = this(null) protected[Reproducers] override def apply(selected: List[Genotype]) = { val (src1Idx, src2Idx) = if (random.nextInt(2) == 0) (0, 1) else (1, 0) val...
khernyo/PGEP
src/pgep/GeneticOperators/Reproducers/TwoPointCrossover.scala
Scala
gpl-3.0
1,169
/* Copyright 2016-17, Hasso-Plattner-Institut fuer Softwaresystemtechnik GmbH 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 applicab...
bpn1/ingestion
src/main/scala/de/hpi/ingestion/deduplication/models/PrecisionRecallDataTuple.scala
Scala
apache-2.0
948
/* * 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 ...
kissmetrics/spark
core/src/main/scala/org/apache/spark/ui/jobs/UIData.scala
Scala
apache-2.0
11,007
/*^ =========================================================================== Helios - Core =========================================================================== Copyright (C) 2013-2016 Gianluca Costa =========================================================================== Licensed under the Apac...
giancosta86/Helios-core
src/main/scala/info/gianlucacosta/helios/apps/Version.scala
Scala
apache-2.0
2,589
package org.jetbrains.plugins.scala package codeInspection.collections import com.intellij.openapi.util.TextRange import com.intellij.psi.{PsiElement, SmartPointerManager, SmartPsiElementPointer} import org.jetbrains.plugins.scala.lang.psi.api.expr._ import scala.language.implicitConversions /** * Nikolay.Tropin *...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/codeInspection/collections/Simplifications.scala
Scala
apache-2.0
2,490
/* * Copyright 2013-2016 Tsukasa Kitachi * * 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...
kxbmap/configs
core/src/test/scala/configs/testutil/instance/anyVal.scala
Scala
apache-2.0
3,068
/* * Part of GDL book_api. * Copyright (C) 2017 Global Digital Library * * See LICENSE */ package io.digitallibrary.bookapi.service import java.util.UUID import com.typesafe.scalalogging.LazyLogging import io.digitallibrary.bookapi.BookApiProperties import io.digitallibrary.bookapi.controller.NewFeaturedConten...
GlobalDigitalLibraryio/book-api
src/main/scala/io/digitallibrary/bookapi/service/WriteService.scala
Scala
apache-2.0
18,247
package sml.instructions import sml.Machine /** * Add the values in 2 registers and store * result in specified register */ case class AddInstruction(label: String, opcode: String, result: Int, op1: Int, op2: Int) extends MathInstruction { /** * @see Instruction#execute(m: Machine) */ override def ...
BBK-PiJ-2015-67/sdp-portfolio
coursework/cw-one/src/main/scala/sml/instructions/AddInstruction.scala
Scala
unlicense
691
package org.skycastle.client.wrappers import org.scalaprops.Bean import com.jme3.math.Vector3f /** * Wraps a 3D vector, allowing it to be read from configuration files. */ class Vec3 extends Bean { val x = p('x, 0f) val y = p('y, 0f) val z = p('z, 0f) // setBeanName('Vec3) def this(x: Float, y: Float, z...
zzorn/skycastle
src/main/scala/org/skycastle/client/wrappers/Vec3.scala
Scala
gpl-2.0
561
package com.olivergg.starttabs.scalaservice import com.olivergg.starttabs.dto.Friend object FriendsService { // Some fake testing data private var friends: Array[Friend] = Array( Friend(0, "Ben Sparrow", "Enjoys drawing things", "https://pbs.twimg.com/profile_images/514549811765211136/9SgAuHeY.png"), Fri...
olivergg/scalajs-ionic-starttabs
app-js/src/main/scala/com/olivergg/starttabs/scalaservice/FriendsService.scala
Scala
gpl-2.0
1,068
package com.twitter.ostrich.admin /** * This allows us to turn on and off Finagle's tracing. * * See: https://github.com/twitter/finagle */ class FinagleTracing(klass: Class[_]) { private val enableM = klass.getDeclaredMethod("enable") private val disableM = klass.getDeclaredMethod("disable") def enable() ...
hydro2k/ostrich
src/main/scala/com/twitter/ostrich/admin/FinagleTracing.scala
Scala
apache-2.0
684
/* * Copyright 2008-2010 WorldWide Conferencing, LLC * * 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...
wsaccaco/lift
examples/JPADemo/JPADemo-web/src/main/scala/net/liftweb/jpademo/snippet/Author.scala
Scala
apache-2.0
2,436
package pl.writeony.son2.scallop import pl.writeonly.scalaops.specs.WhiteAssertSpec class FancyThingsSpec extends WhiteAssertSpec { "A Conf" should { "xxx" in { // Conf.props("key1") should equal (Some("value1")) // Conf.firstListName() should equal ("first") // Conf.secondList...
writeonly/son2
scallions-clis/scallions-llop/src/test/scala/pl/writeony/son2/scallop/FancyThingsSpec.scala
Scala
apache-2.0
489
package net.mkowalski.sparkfim.util import org.apache.log4j.Logger trait Logging { lazy val LOG = Logger.getLogger(this.getClass.getName) }
mjkowalski/spark-fim
src/main/scala/net/mkowalski/sparkfim/util/Logging.scala
Scala
mit
146
package com.shorrockin.narrator.utils import se.scalablesolutions.akka.actor.Actor import java.util.UUID trait UniqueId { this:Actor => id = UUID.randomUUID.toString }
shorrockin/narrator
src/main/scala/utils/UniqueId.scala
Scala
apache-2.0
181
package com.coveo.blitz.server trait GameException extends Exception { def message: String override def getMessage: String = s"Blitz - $message" } case class GeneratorException(message: String) extends GameException case class NotFoundException(message: String) extends GameException case class UserNotFoundExcep...
coveord/Blitz2016-Server
server/app/exception.scala
Scala
mit
760
class Ticket1909 (x: Int) { def this() = this({ def bar() = 5 bar() }) } object Test extends App { new Ticket1909() }
lampepfl/dotty
tests/run/t1909b.scala
Scala
apache-2.0
132
/* Copyright 2009-2018 EPFL, Lausanne */ package inox package solvers package unrolling import utils._ import scala.collection.mutable.{Map => MutableMap} trait TemplateGenerator { self: Templates => import context._ import program._ import program.trees._ import program.symbols._ protected type TemplateC...
epfl-lara/inox
src/main/scala/inox/solvers/unrolling/TemplateGenerator.scala
Scala
apache-2.0
29,380
package org.jetbrains.plugins.scala package gotoclass import com.intellij.navigation.{ChooseByNameContributor, NavigationItem} import com.intellij.openapi.project.Project import com.intellij.psi.PsiClass import com.intellij.psi.search.GlobalSearchScope import com.intellij.psi.stubs.StubIndex import org.jetbrains.plugi...
triplequote/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/gotoclass/ScalaGoToClassContributor.scala
Scala
apache-2.0
1,615
package sds.util class MultiArgsStringBuilder { val build: StringBuilder = new StringBuilder(); def this(init: String) { this() build.append(init) } def append(elements: Any*): Unit = elements.foreach(build.append) override def toString(): String = build.toString() }
g1144146/sds_for_scala
src/main/scala/sds/util/MultiArgsStringBuilder.scala
Scala
apache-2.0
310
package scala.offheap package internal package macros import scala.reflect.macros.blackbox class Layout(val c: blackbox.Context) extends Common { import c.universe.{weakTypeOf => wt, _} import c.internal._, decorators._ def inLayout(tpe: Type)(f: => Tree) = { tpe.typeSymbol.updateAttachment(Clazz.InLayout(...
adamwy/scala-offheap
macros/src/main/scala/offheap/internal/macros/Layout.scala
Scala
bsd-3-clause
1,171
/* * Copyright 2013 - 2015, Daniel Krzywicki <[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 without limitation the rights ...
ros3n/IntOb
core/src/main/scala/pl/edu/agh/scalamas/solutions/SolutionsComponent.scala
Scala
mit
1,438
package $organization$.$name;format="lower,word"$ import org.scalatest._ import org.nd4j.linalg.factory.Nd4j class AppSpec extends FlatSpec with Matchers { "This project" should "have some tests" in { (2 + 2) should be (4) } it should "Be able to create NDArrays on the CPU or GPU" in { val a = Nd4j.on...
wmeddie/dl4j-scala.g8
src/main/g8/src/test/scala/AppSpec.scala
Scala
apache-2.0
411
package ai.agnos.sparql.stream.client import akka.http.scaladsl.model.MediaType.NotCompressible import akka.http.scaladsl.model.{ContentType, HttpCharsets, MediaType} import org.eclipse.rdf4j.model.{ModelFactory, ValueFactory} import org.eclipse.rdf4j.model.impl.{LinkedHashModelFactory, SimpleValueFactory} /* ...
modelfabric/reactive-sparql
src/main/scala/ai/agnos/sparql/stream/client/SparqlClientConstants.scala
Scala
mit
3,210
package com.databricks.spark.avro import java.io.File import java.nio.ByteBuffer import java.sql.Timestamp import scala.collection.JavaConversions._ import org.apache.avro.Schema import org.apache.avro.Schema.{Type, Field} import org.apache.avro.file.DataFileWriter import org.apache.avro.generic.{GenericData, Generi...
JDrit/spark-avro
src/test/scala/com/databricks/spark/avro/AvroSuite.scala
Scala
apache-2.0
15,510
object Test { def idiv(x: Int): Unit = x / 0 def ldiv(x: Long): Unit = x / 0 def irem(x: Int): Unit = x % 0 def lrem(x: Long): Unit = x % 0 def check(x: => Any) = try { x; sys.error("failed to throw divide by zero!") } catch { case _: ArithmeticException => } def main(args: Array[String]) { check(idiv...
felixmulder/scala
test/files/run/t8601.scala
Scala
bsd-3-clause
390
package edison.cli class OptionParserForTests extends EdisonOptionParser { var errors: String = "" override def reportError(msg: String): Unit = errors += msg + "\\n" override def reportWarning(msg: String): Unit = failure("warnings are not expected in this test") override def showTryHelp: Unit = () }
pawel-wiejacha/edison
service/src/test/scala/edison/cli/OptionParserForTests.scala
Scala
mit
312
package com.hooboy.etjo.game import org.newdawn.slick._ import org.newdawn.slick.geom._ import com.hooboy.etjo.render._ class Player(private val etjo: ETJO, private val config: PlayerConfig, private val map: GameMap) extends WorldObject { private var x = config.startx private var y = config.starty private var p...
Z6fans/etjo
src/com/hooboy/etjo/game/Player.scala
Scala
mit
1,656
// Copyright 2011 Kiel Hodges package sample2 import replicant._ import experiment1._ class MockWidgetRepository extends MockGenericRepository[Widget] { self => override val testDouble: WidgetRepository = new TestDouble with WidgetRepository { def findByPartNumber(partNumber: String): Widget = self.findByPar...
greenbar/replicant
scala/src/test/scala/sample2/MockWidgetRepository.scala
Scala
mit
442
/* * 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 ...
windeye/spark
mllib/src/main/scala/org/apache/spark/mllib/util/MFDataGenerator.scala
Scala
apache-2.0
4,579