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 io.udash.web.commons.views import com.avsystem.commons._ import com.avsystem.commons.misc.AbstractCase import io.udash._ import io.udash.bootstrap._ import io.udash.bootstrap.alert.UdashAlert import io.udash.web.guide.markdown.{MarkdownPage, MarkdownPageRPC} import io.udash.web.guide.styles.MarkdownStyles impo...
UdashFramework/udash-core
guide/commons/.js/src/main/scala/io/udash/web/commons/views/MarkdownView.scala
Scala
apache-2.0
2,972
package org.msgpack.core import org.scalatest.exceptions.TestFailedException import org.msgpack.core.MessagePack.Code import scala.util.Random import org.msgpack.value.ValueType /** * Created on 2014/05/07. */ class MessageFormatTest extends MessagePackSpec { "MessageFormat" should { "cover all byte codes" i...
xerial/msgpack-java
msgpack-core/src/test/scala/org/msgpack/core/MessageFormatTest.scala
Scala
apache-2.0
3,723
/* * 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
mllib/src/test/scala/org/apache/spark/ml/PipelineSuite.scala
Scala
apache-2.0
10,193
package com.arcusys.learn.liferay.update.version260.certificate import com.arcusys.learn.liferay.update.version240.certificate.CertificateTableComponent import com.arcusys.valamis.model.PeriodTypes import com.arcusys.valamis.persistence.common.DbNameUtils._ import com.arcusys.valamis.persistence.common.SlickProfile t...
igor-borisov/valamis
learn-portlet/src/main/scala/com/arcusys/learn/liferay/update/version260/certificate/ActivityGoalTableComponent.scala
Scala
gpl-3.0
1,409
package com.avidmouse.spark.mongodb.examples.streaming import org.apache.spark.SparkConf import org.apache.spark.storage.StorageLevel import org.apache.spark.streaming.{Seconds, StreamingContext} import org.apache.spark.streaming.StreamingContext._ import com.avidmouse.spark.mongodb.Mongo import com.avidmouse.spark.s...
avidmouse/mongo-spark
examples/src/main/scala/com/avidmouse/spark/mongodb/examples/streaming/NetworkWordCount.scala
Scala
apache-2.0
1,539
package org.http4s package blazecore package util import cats.effect._ import cats.implicits._ import fs2._ import org.http4s.syntax.async._ import scala.concurrent._ private[http4s] trait EntityBodyWriter[F[_]] { implicit protected def F: Effect[F] /** The `ExecutionContext` on which to run computations, assum...
reactormonk/http4s
blaze-core/src/main/scala/org/http4s/blazecore/util/EntityBodyWriter.scala
Scala
apache-2.0
2,682
import sbt._ import Keys._ object FPInScalaBuild extends Build { val opts = Project.defaultSettings ++ Seq( scalaVersion := "2.11.5", resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/" ) val scalatest = "org.scalatest" %% "scalatest" % "2.2.4" % "test" val junit = "jun...
nathanvick/fpinscala
project/Build.scala
Scala
mit
1,543
/***************************************** Emitting Generated Code *******************************************/ class Snippet extends ((Array[Int])=>(Array[Int])) { def apply(x0:Array[Int]): Array[Int] = { val x1 = x0.length val x2 = 100 - x1 val x3 = x2 > 10 val x6 = if (x3) { val x4 = println(...
RomanTsegelskyi/lms-truffle
src/out/shonan-hmm1b_dyn.check.scala
Scala
gpl-2.0
489
import scala.quoted._, scala.deriving.* inline def mcr: Any = ${mcrImpl} def mcrImpl(using ctx: Quotes): Expr[Any] = { val tpl: (Expr[1], Expr[2], Expr[3]) = ('{1}, '{2}, '{3}) '{val res: (1, 2, 3) = ${Expr.ofTuple(tpl)}; res} }
dotty-staging/dotty
tests/pos-macros/toexproftuple.scala
Scala
apache-2.0
234
/* * Copyright (c) 2012, 2013 Roberto Tyley * * This file is part of 'BFG Repo-Cleaner' - a tool for removing large * or troublesome blobs from Git repositories. * * BFG Repo-Cleaner is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * ...
NeilBryant/bfg-repo-cleaner
bfg-library/src/main/scala/com/madgag/git/bfg/cleaner/ObjectIdCleaner.scala
Scala
gpl-3.0
7,696
/* * 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
core/src/main/scala/org/apache/spark/storage/DiskBlockManager.scala
Scala
apache-2.0
7,012
/** * 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...
ryez/gatling
gatling-core/src/main/scala/io/gatling/core/body/ElFileBodies.scala
Scala
apache-2.0
2,455
package forimpatient.chapter09 import scala.io.Source /** * Created by Iryna Kharaborkina on 8/6/16. * * Solution to the Chapter 09 Exercise 01 'Scala for the Impatient' by Horstmann C.S. * * Write a Scala code snippet that reverses the lines in a file (making the last line the first one, and so on). */ ...
Kiryna/Scala-for-the-Impatient
src/forimpatient/chapter09/Exercise01.scala
Scala
apache-2.0
485
package debug object This extends App { trait ThisTrait { val traitParam = 1 def traitMethod() = 1 } class ThisClass extends ThisTrait { val classParam = 2 def classMethod() = 2 } object ThisObject extends ThisClass { val objectParam = 3 def objectMethod() = 3 def testMetho...
Kwestor/scala-ide
org.scala-ide.sdt.debug.expression.tests/test-workspace/expr-eval-this/src/debug/This.scala
Scala
bsd-3-clause
524
package ark object Maven2Sbt extends App { object scala { val version = "SCALA_VERSION$" } val xml = <dependencies> <dependency> <groupId>aaa</groupId> <artifactId>bbb</artifactId> <version>ccc</version> <scope>compile</scope> ...
lucaster/ark-calc
src/main/scala/ark/Maven2Sbt.scala
Scala
mit
6,668
package spire package math import org.scalatest.FunSuite import spire.implicits.{eqOps => _, _} import java.math.MathContext class ComplexTest extends FunSuite { test("create Complex[Double]") { val (real, imag) = (3.0, 44.0) val c = Complex(real, imag) assert(c.real === real) assert(c.imag === imag...
tixxit/spire
tests/src/test/scala/spire/math/ComplexTest.scala
Scala
mit
4,474
package com.sksamuel.elastic4s.requests.indexes import com.sksamuel.elastic4s.Indexes case class GetIndexTemplateRequest(indexes: Indexes)
sksamuel/elastic4s
elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/indexes/GetIndexTemplateRequest.scala
Scala
apache-2.0
141
package vearth.animal /** * @author vitchyr */ import vearth.World trait Ant extends Drawable { protected val world: World protected var _isAlive: Boolean = true def isAlive = _isAlive def update() = { move() } val width = world.width val height = world.height override def toString() = s"Ant ...
vpong/vearth
vearth/src/main/scala/animal/Ant.scala
Scala
mit
378
package org.jetbrains.plugins.scala package lang package parameterInfo package typeParameterInfo import java.awt.Color import java.io.File import com.intellij.codeInsight.hint.{HintUtil, ShowParameterInfoContext} import com.intellij.lang.parameterInfo.ParameterInfoUIContext import com.intellij.openapi.fileEditor.{Fil...
triggerNZ/intellij-scala
test/org/jetbrains/plugins/scala/lang/parameterInfo/typeParameterInfo/TypeParameterInfoTestBase.scala
Scala
apache-2.0
3,931
package com.szadowsz.spark.ml.feature import com.szadowsz.spark.ml.params.HasIsInclusive import org.apache.spark.ml.Transformer import org.apache.spark.ml.param.ParamMap import org.apache.spark.ml.param.shared.HasInputCols import org.apache.spark.ml.util.Identifiable import org.apache.spark.sql.types.StructType import...
zakski/project-cadisainmduit
module/spark/src/main/scala/com/szadowsz/spark/ml/feature/ColFilterTransformer.scala
Scala
apache-2.0
1,277
import scala.language.{ implicitConversions } import scala.reflect.runtime.universe._ import scala.tools.reflect.Eval object Test extends App { reify { object lazyLib { /** Delay the evaluation of an expression until it is needed. */ def delay[A](value: => A): Susp[A] = new SuspImpl[A](value) ...
som-snytt/dotty
tests/disabled/macro/run/reify_lazyevaluation.scala
Scala
apache-2.0
1,770
package im.mange.driveby import java.io.File trait FluentDriver extends BrowserAware { def assert(condition: Condition, message: String = ""): this.type = { browser.assert(condition, message); this } def clear(by: By): this.type = { browser.clear(by); this } def click(by: By): this.type = { browser.click(by); t...
alltonp/driveby
src/main/scala/im/mange/driveby/FluentDriver.scala
Scala
apache-2.0
947
/* * 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 ...
pronix/spark
core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
Scala
apache-2.0
69,812
package de.choffmeister.microserviceutils.auth.utils import java.security.SecureRandom private[auth] object SecretGenerator { private lazy val random = new SecureRandom() def generate(bytesLength: Int): Array[Byte] = { val bytes = new Array[Byte](bytesLength) random.nextBytes(bytes) bytes } def ...
choffmeister/microservice-utils
microservice-utils-auth/src/main/scala/de/choffmeister/microserviceutils/auth/utils/SecretGenerator.scala
Scala
mit
523
package revisions import scala.collection.concurrent abstract class AbstractVersioned[T] extends Versioned { protected val versions: concurrent.Map[Int, T] = new concurrent.TrieMap[Int, T] // a cache of the last read or write to this versioned object // the lower 16 bits contain the version number of the ...
dwhjames/scala-concurrent-revisions
src/main/scala/revisions/AbstractVersioned.scala
Scala
bsd-3-clause
2,924
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
wzhongyuan/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/nn/ViewSpec.scala
Scala
apache-2.0
1,045
/* * 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 ...
rmetzger/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/functions/utils/UserDefinedFunctionUtils.scala
Scala
apache-2.0
24,903
/* * 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 ...
practice-vishnoi/dev-spark-1
streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala
Scala
apache-2.0
36,416
/* * Copyright 2017-2022 John Snow Labs * * 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...
JohnSnowLabs/spark-nlp
src/main/scala/com/johnsnowlabs/ml/tensorflow/TensorflowMarian.scala
Scala
apache-2.0
12,036
package io.vamp.model.reader import io.vamp.model.artifact._ import io.vamp.model.notification.UnsupportedProtocolError import io.vamp.model.reader.YamlSourceReader._ import io.vamp.model.reader.ComposeWriter._ import scala.util.Try import scala.language.higherKinds /** * Pairs a result from a Yaml Compose Parse wi...
magneticio/vamp
model/src/main/scala/io/vamp/model/reader/ComposeBlueprintReader.scala
Scala
apache-2.0
14,045
/** * Caches features on a per-item basis. Basically a simple wrapper for * thread-safe hashmap. */ package edu.berkeley.veloxms import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.atomic.AtomicLong /** * @tparam K type of the item whose features are being stored. */ // TODO make sure that ...
kcompher/velox-modelserver
veloxms-core/src/main/scala/edu/berkeley/veloxms/FeatureCache.scala
Scala
apache-2.0
1,327
package io.buoyant.linkerd import com.fasterxml.jackson.annotation.{JsonIgnore, JsonProperty, JsonTypeInfo} import com.twitter.conversions.DurationOps._ import com.twitter.finagle._ import com.twitter.finagle.naming.buoyant.DstBindingFactory import com.twitter.finagle.naming.NameInterpreter import com.twitter.finagle....
linkerd/linkerd
linkerd/core/src/main/scala/io/buoyant/linkerd/Router.scala
Scala
apache-2.0
6,134
/* * 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 ...
zhangjunfang/eclipse-dir
spark/mllib/src/main/scala/org/apache/spark/mllib/optimization/LBFGS.scala
Scala
bsd-2-clause
9,357
package eu.liderproject.functionalsparql import com.hp.hpl.jena.graph.NodeFactory import com.hp.hpl.jena.sparql.core.Quad import java.io.File import java.net.URL import org.apache.jena.riot.RDFDataMgr import org.scalatest._ import scala.collection.JavaConversions._ import scala.xml.XML class DAWGTests extends FlatSpe...
jmccrae/functionalsparql
src/test/scala/functionalsparql/DAWGTests.scala
Scala
apache-2.0
9,965
package com.dataintuitive.luciuscore.filters /** * A basic representation of a filter with a key and a value */ case class Filter(key: String, value:String) extends Serializable /** * A representation for a filter query: one key, multiple (possible) values */ case class QFilter(val key: String, val values: Seq[St...
data-intuitive/LuciusCore
src/main/scala/com/dataintuitive/luciuscore/filters/Filters.scala
Scala
apache-2.0
348
package text.similarity import text.vector.FrequencyVector import util.Config /** * @author K.Sakamoto * Created on 2016/05/23 */ object SimilarityCalculator { def calculate(v1: FrequencyVector, v2: FrequencyVector): Double = { Similarity.calculate(v1, v2, Config.similarity) } } /** * @author...
ktr-skmt/FelisCatusZero
src/main/scala/text/similarity/SimilarityCalculator.scala
Scala
apache-2.0
1,080
package com.github.cocagne package object composable_paxos { type NetworkUID = String }
cocagne/scala-composable-paxos
src/main/scala/com/github/cocagne/composable_paxos/package.scala
Scala
mit
94
import play.sbt.PlayImport._ import sbt._, Keys._ object Dependencies { val lilaMaven = "lila-maven" at "https://raw.githubusercontent.com/ornicar/lila-maven/master" val scalalib = "com.github.ornicar" %% "scalalib" % "7.0.2" val hasher = "com.roundeights" %% "...
luanlv/lila
project/Dependencies.scala
Scala
mit
4,431
/* * 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/computations/CPQ17.scala
Scala
apache-2.0
1,638
package com.thangiee.lolhangouts.ui.search import android.content.Context import android.support.v4.view.MenuItemCompat import android.support.v7.widget.RecyclerView import android.text.Editable import android.view._ import android.widget._ import com.balysv.materialmenu.MaterialMenuDrawable import com.skocken.efficie...
Thangiee/LoL-Hangouts
src/com/thangiee/lolhangouts/ui/search/SummSearchContainer.scala
Scala
apache-2.0
7,216
package org.higherstate.jameson.parsers import org.higherstate.jameson.validators.Validator import org.higherstate.jameson.tokenizers.Tokenizer import org.higherstate.jameson.Path import org.higherstate.jameson.failures._ case class ValidatorParser[+T](parser:Parser[T], validators:List[Validator]) extends Parser[T] {...
HigherState/jameson
src/main/scala/org/higherstate/jameson/parsers/ValidatorParser.scala
Scala
apache-2.0
660
/* * 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 ...
bharathkk/samza
samza-kafka/src/test/scala/org/apache/samza/system/kafka_deprecated/TestKafkaSystemConsumer.scala
Scala
apache-2.0
7,891
package com.tuvistavie.xserver.backend.model abstract class Keymap { val minCode: Int val maxCode: Int }
tuvistavie/scala-x-server
backend/src/main/scala/com/tuvistavie/xserver/model/Keymap.scala
Scala
mit
110
/* * Copyright (c) 2011-2017 Interfaculty Department of Geoinformatics, University of * Salzburg (Z_GIS) & Institute of Geological and Nuclear Sciences Limited (GNS Science) * in the SMART Aquifer Characterisation (SAC) programme funded by the New Zealand * Ministry of Business, Innovation and Employment (MBIE) * ...
ZGIS/smart-csw-ingester
app/services/LuceneIndexBuilderActor.scala
Scala
apache-2.0
10,917
package cromwell.services import java.io.{ByteArrayOutputStream, PrintStream} import java.sql.Connection import java.time.OffsetDateTime import javax.sql.rowset.serial.{SerialBlob, SerialClob, SerialException} import better.files._ import com.typesafe.config.ConfigFactory import cromwell.core.Tags._ import cromwell.c...
ohsu-comp-bio/cromwell
services/src/test/scala/cromwell/services/ServicesStoreSpec.scala
Scala
bsd-3-clause
26,080
/*********************************************************************** * 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...
jahhulbert-ccri/geomesa
geomesa-fs/geomesa-fs-tools/src/main/scala/org/locationtech/geomesa/fs/tools/status/FsGetTypeNamesCommand.scala
Scala
apache-2.0
1,219
package com.taig.tmpltr.engine.html import com.taig.tmpltr._ import play.api.mvc.Content class p( val attributes: Attributes, val content: Content ) extends markup.p with Tag.Body[p, Content] object p extends Tag.Body.Appliable[p, Content]
Taig/Play-Tmpltr
app/com/taig/tmpltr/engine/html/p.scala
Scala
mit
243
/* * 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.nscplugin.test import org...
scala-js/scala-js
compiler/src/test/scala/org/scalajs/nscplugin/test/JSExportTest.scala
Scala
apache-2.0
44,004
package extruder.cats.effect import cats.{Functor, MonadError} import cats.data.EitherT import cats.effect._ import cats.syntax.either._ import extruder.core.ValidationErrorsToThrowable import extruder.data.{ValidationErrors, ValidationT} trait ConcurrentEffectInstances extends ConcurrentInstances with EffectInstance...
janstenpickle/extruder
cats-effect/src/main/scala/extruder/cats/effect/ConcurrentEffectInstances.scala
Scala
mit
1,657
/* * 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 ...
aosagie/spark
mllib/src/main/scala/org/apache/spark/ml/feature/VectorAssembler.scala
Scala
apache-2.0
12,472
package com.github.tarao package slickjdbc package interpolation import util.NonEmpty import scala.annotation.implicitNotFound import slick.jdbc.{SetParameter => SP, PositionedParameters} trait CompoundParameter { implicit val createSetProduct: SP[Product] = SetProduct @inline implicit def createSetList[T](imp...
TimothyKlim/slick-jdbc-extension-scala
src/main/scala/com/github/tarao/slickjdbc/interpolation/SetParameter.scala
Scala
mit
3,617
/* * Copyright 2010 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
travisbrown/util
util-logging/src/main/scala/com/twitter/logging/package.scala
Scala
apache-2.0
686
/* * Copyright (C) 2016 VSCT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writ...
voyages-sncf-technologies/maze
src/main/scala/fr/vsct/dt/maze/topology/ClusterNode.scala
Scala
apache-2.0
3,309
package co.spendabit.webapp.forms.ui.bootstrap import co.spendabit.webapp.forms.ui.FormRenderer /** Implements a form using Bootstrap, as seen in the "basic example", here: * http://getbootstrap.com/css/#forms-example */ class BasicForm extends FormRenderer { def formElem(labeledControls: xml.NodeSeq): xml.Ele...
spendabit/webapp-tools
src/co/spendabit/webapp/forms/ui/bootstrap/BasicForm.scala
Scala
unlicense
1,004
/* * Copyright (c) 2014-2021 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
monixio/monix
monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala
Scala
apache-2.0
5,901
package io.finch import cats.Eq import cats.effect.{ContextShift, IO} import com.twitter.io.Buf import scala.concurrent.ExecutionContext /** * Type class instances for non-Finch types. */ trait MissingInstances { implicit def eqEither[A](implicit A: Eq[A]): Eq[Either[Throwable, A]] = Eq.instance { case (Right...
ImLiar/finch
core/src/test/scala/io/finch/MissingInstances.scala
Scala
apache-2.0
553
/* mls: basic machine learning algorithms 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 the License, or (at your opt...
javadba/mls
src/main/scala/ml/models/Model.scala
Scala
gpl-3.0
4,950
/* * This file is part of AckCord, licensed under the MIT License (MIT). * * Copyright (c) 2019 Katrix * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including ...
Katrix-/AckCord
voice/src/main/scala/ackcord/voice/NaclBidiFlow.scala
Scala
mit
6,634
package calctest.assignment import scala.util.parsing.combinator._ object Spreadsheet { // Cell contents consist of these: Cell reference, Operator, or positive decimal value. object CCT extends Enumeration { type CCT = Value; val C, O, V = Value } import CCT._ type CellExpr = List[(CCT.Value, String)] o...
shyamendra/spreadsheet
src/main/scala/calctest/assignment/Spreadsheet.scala
Scala
mit
4,742
package dbtarzan.db import java.sql.Connection import dbtarzan.config.connections.ConnectionData trait ConnectionProvider { def getConnection(data : ConnectionData) : Connection }
aferrandi/dbtarzan
src/main/scala/dbtarzan/db/ConnectionProvider.scala
Scala
apache-2.0
185
package apsu.util import scala.collection.mutable class EnumRegistry[E <: EnumLike[E]] { private val nameRegistry = mutable.OpenHashMap[String, E]() def register(e: E): Unit = { nameRegistry.get(e.name) match { case Some(e2) => throw new IllegalArgumentException(s"Can't register $e; ${e.name} already ...
chronodm/apsu-util-scala
src/main/scala/apsu/util/EnumRegistry.scala
Scala
mit
561
package gapt.proofs.lk.transformations import gapt.expr.formula.Bottom import gapt.expr.formula.Formula import gapt.expr.formula.Top import gapt.proofs.lk.LKProof import gapt.proofs.lk.rules.AndLeftRule import gapt.proofs.lk.rules.AndRightRule import gapt.proofs.lk.rules.BottomAxiom import gapt.proofs.lk.rules.Contrac...
gapt/gapt
core/src/main/scala/gapt/proofs/lk/transformations/MG3iToLJ.scala
Scala
gpl-3.0
8,760
// scalac: -unchecked -Xfatal-warnings // // constructors used to drop outer fields when they were not accessed // however, how can you know (respecting separate compilation) that they're not accessed!? class Outer { final class Inner } // the matches below require Inner's outer pointer // until scala/bug#4440 is fixe...
martijnhoekstra/scala
test/files/neg/t4440.scala
Scala
apache-2.0
779
package org.eso.ias.asce.transfer import java.util.Optional import org.eso.ias.asce.ComputingElement import org.eso.ias.logging.IASLogger import org.eso.ias.types.{IASTypes, Identifier, InOut} import scala.util.Try /** * <code>ScalaTransfer</code> calls the scala * transfer function provided by the user. * user...
IntegratedAlarmSystem-Group/ias
CompElement/src/main/scala/org/eso/ias/asce/transfer/ScalaTransfer.scala
Scala
lgpl-3.0
2,508
/* * Copyright 2022 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/fset-faststream
app/model/CivilServiceExperienceDetails.scala
Scala
apache-2.0
1,893
package fivelangs.lambda import fivelangs._ object ExtensibleLambda { // In this file, I try to solve the Expression Problem. // I don't expect it to work. import ExtensibleLambdaParsing._ import molt.syntax.cfg.parsable._ import molt.syntax.cfg._ case class GlobalExpSpec( expSpecMakers: List[(Globa...
julianmichael/5langs
src/main/scala/fivelangs/lambda/ExtensibleLambda.scala
Scala
mit
25,084
/** * 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...
qinzhaokun/incubator-eagle
eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormExecutorForAlertWrapper.scala
Scala
apache-2.0
1,892
/* * 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 ...
sahilTakiar/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/sources/memoryV2.scala
Scala
apache-2.0
6,968
import sigmastate.Values.Value import sigmastate.lang.CheckingSigmaBuilder package object sigmastate { import CheckingSigmaBuilder._ /** Represents cost estimation computed by JITC interpreter. * The JITC costs use 10x more accurate scale comparing to block cost values. * @see toBlockCost */ case cl...
ScorexFoundation/sigmastate-interpreter
sigmastate/src/main/scala/sigmastate/sigmastate.scala
Scala
mit
2,547
package ohnosequences.stuff.test import ohnosequences.stuff._ import scala.{Int} import scala.Predef.String import org.scalatest.FunSuite class ScalaCategoryTests extends FunSuite { val l: String -> Int = { x: String => x.length } val toStr: Int -> String = { x: Int => x.toString } // val idInt : ...
ohnosequences/stuff
src/test/scala/ScalaCategory.scala
Scala
agpl-3.0
1,650
/* * 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 ...
jeremiaswerner/openwhisk
common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/LogDriverLogStore.scala
Scala
apache-2.0
3,044
package scala.meta.testkit import java.util.concurrent.CopyOnWriteArrayList import java.util.concurrent.atomic.AtomicInteger import scala.collection.GenIterable import scala.collection.JavaConverters._ import scala.collection.mutable import scala.meta._ import scala.util.control.NonFatal object SyntaxAnalysis { /*...
MasseGuillaume/scalameta
scalameta/testkit/src/main/scala/scala/meta/testkit/SyntaxAnalysis.scala
Scala
bsd-3-clause
2,558
package com.github.takezoe.solr.scala.async import java.io.{ByteArrayOutputStream, InputStream} /** * @author steven * */ class UpdatableInputStream extends InputStream { private var finished = false private val baos = new ByteArrayOutputStream() def appendBytes(bytes: Array[Byte]) = this.synchronized...
takezoe/solr-scala-client
src/main/scala/com/github/takezoe/solr/scala/async/UpdatableInputStream.scala
Scala
apache-2.0
1,731
/*********************************************************************** * 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-redis/geomesa-redis-datastore/src/test/scala/org/locationtech/geomesa/redis/data/RedisDataStoreIntegrationTest.scala
Scala
apache-2.0
7,621
/** * 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"); yo...
Chasego/kafka
core/src/test/scala/unit/kafka/server/AbstractFetcherThreadTest.scala
Scala
apache-2.0
51,676
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
jenniew/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/ops/SigmoidGrad.scala
Scala
apache-2.0
1,442
package strd.util import scala.util.Random import org.slf4j.LoggerFactory /** * $Id$ * $URL$ * User: bulay * Date: 7/31/13 * Time: 4:15 PM */ class MonotonicallyIncreaseGenerator(val workerId : Int) { import GeneratorConsts._ val twepoch = 1349035200000L // 1288834974657L val log = LoggerFactory.getL...
onerinvestments/strd
strd-commons/src/main/scala/strd/util/MonotonicallyIncreaseGenerator.scala
Scala
apache-2.0
2,542
/* * 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 ...
bryanmontesv/incubator-spot
spot-ml/src/main/scala/org/apache/spot/utilities/DomainProcessor.scala
Scala
apache-2.0
6,927
package org.bfn.ninetynineprobs object P80 { // TODO }
bfontaine/99Scala
src/main/scala/P80.scala
Scala
mit
60
package monocle.std import cats.data.NonEmptyVector import monocle.MonocleSuite import monocle.law.discipline.{IsoTests, PrismTests} import monocle.law.discipline.function._ import scala.annotation.nowarn class NonEmptyVectorSpec extends MonocleSuite { import cats.laws.discipline.arbitrary._ checkAll("nevToAndO...
julien-truffaut/Monocle
test/shared/src/test/scala/monocle/std/NonEmptyVectorSpec.scala
Scala
mit
982
package com.github.before.uadetector import scala.concurrent.duration.Duration import scala.io.Codec import com.github.before.uadetector.Time.measure import com.github.before.uadetector.datasource.Data import com.github.before.uadetector.datasource.Entry import com.github.before.uadetector.datasource.IniFormat.Commen...
before/uadetector-scala
src/test/scala/com/github/before/uadetector/ShowDataStatistics.scala
Scala
apache-2.0
1,301
package chana import java.lang.ref.SoftReference import java.text.DateFormat import java.text.SimpleDateFormat import java.util.Calendar import java.util.TimeZone /** * @author Caoyuan Deng */ package object util { private val defaultDfPattern = "yyyy-MM-dd HH:mm:ss" private val dfTl = new ThreadLocal[SoftRefe...
matthewtt/chana
src/main/scala/chana/util/util.scala
Scala
apache-2.0
1,498
package utils import java.time.LocalDateTime /** * Created by henrik on 2017-02-24. */ trait Timestamp { def timeOfCreation: LocalDateTime }
hnrklssn/game-check-match
app/utils/Timestamp.scala
Scala
apache-2.0
147
package spark.broadcast import com.ning.compress.lzf.{LZFInputStream, LZFOutputStream} import java.io._ import java.net._ import java.util.UUID import it.unimi.dsi.fastutil.io.FastBufferedInputStream import it.unimi.dsi.fastutil.io.FastBufferedOutputStream import spark._ import spark.storage.StorageLevel private[s...
joeywen/spark_cpp_api
core/src/main/scala/spark/broadcast/HttpBroadcast.scala
Scala
bsd-3-clause
3,741
package lila.lobby import akka.actor._ import com.typesafe.config.Config import lila.common.PimpedConfig._ final class Env( config: Config, db: lila.db.Env, hub: lila.hub.Env, onStart: String => Unit, blocking: String => Fu[Set[String]], playban: String => Fu[Option[lila.playban.TempBan]], ...
clarkerubber/lila
modules/lobby/src/main/Env.scala
Scala
agpl-3.0
2,708
package com.typesafe.slick.testkit.util import java.io._ import java.net.{URL, URLClassLoader} import java.sql.Driver import java.util.Properties import java.util.zip.GZIPInputStream import scala.collection.mutable import scala.slick.jdbc.{StaticQuery => Q, ResultSetInvoker} import scala.slick.jdbc.GetResult._ import ...
dvinokurov/slick
slick-testkit/src/main/scala/com/typesafe/slick/testkit/util/TestDB.scala
Scala
bsd-2-clause
10,020
import java.io._ import scala.io._ import scala.util._ /** The SuccessChecker checks the success of students solving their * generated problems. Running this application will produce output * that looks like this: * {{{ * X 12345678 MIN 443868 238719 238719 0 0 * X 87654321 FAC 8 40320 0 0 * X 19283...
umass-cs-220/week-11-parallel
code/server/src/main/scala/SuccessChecker.scala
Scala
apache-2.0
2,897
package ch.uzh.ifi.pdeboer.pplib.process.recombination import ch.uzh.ifi.pdeboer.pplib.process.entities._ import ch.uzh.ifi.pdeboer.pplib.util.{ProcessPrinter, TestUtils} import org.junit.{Assert, Test} import scala.reflect.io.File /** * Created by pdeboer on 04/05/15. */ class TextShorteningRecombinationTest { @...
uzh/PPLib
src/test/scala/ch/uzh/ifi/pdeboer/pplib/process/recombination/TextShorteningRecombinationTest.scala
Scala
mit
854
/* * 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 ...
rednaxelafx/apache-spark
core/src/test/scala/org/apache/spark/util/JsonProtocolSuite.scala
Scala
apache-2.0
92,266
/* * 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 ...
zimmermatt/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/batch/sql/SetOperatorsTest.scala
Scala
apache-2.0
6,895
package ir.ast import ir.interpreter.Interpreter.ValueMap import ir._ /** * asScalar pattern. (a.k.a., joinVec). * Code for this pattern can be generated. * * The asScalar pattern has the following high-level semantics: * `asScalar()( [ <x,,1,,, ..., x,,n,,>, ..., <x,,m-n+1,,, ..., x,,m,,> ] ) = * [x,,1,,,...
lift-project/lift
src/main/ir/ast/asScalar.scala
Scala
mit
1,049
/* * 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...
mdavid/lessig-bigdata
lib/snowplow/3-enrich/scala-common-enrich/src/main/scala/com.snowplowanalytics.snowplow.enrich/common/utils/MapTransformer.scala
Scala
mit
9,038
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2015, G...
underscorenico/squants
shared/src/main/scala/squants/motion/Momentum.scala
Scala
apache-2.0
2,324
package org.jetbrains.plugins.cbt.project import java.net.URL import java.util import com.intellij.execution.configurations.SimpleJavaParameters import com.intellij.openapi.application.PathManager import com.intellij.openapi.externalSystem.ExternalSystemManager import com.intellij.openapi.externalSystem.model.Project...
triplequote/intellij-scala
cbt/src/org/jetbrains/plugins/cbt/project/CbtExternalSystemManager.scala
Scala
apache-2.0
2,669
package org.scurator import org.apache.zookeeper.Watcher.Event.{EventType, KeeperState} import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scurator.components._ import scala.concurrent.ExecutionContext.Implicits.global /** * */ @RunWith(classOf[JUnitRunner]) class TestGetChildren ext...
granthenke/scurator
src/test/scala/org/scurator/TestGetChildren.scala
Scala
apache-2.0
3,135
package scalapb import java.util.Base64 import com.google.protobuf.ByteString import com.google.protobuf.struct.{ListValue, Struct, Value} import com.google.protobuf.test.unittest_import.{ImportEnum, ImportMessage} import org.scalatest.EitherValues import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matche...
scalapb/ScalaPB
e2e/src/test/scala/scalapb/StructUtilsSpec.scala
Scala
apache-2.0
18,200
package com.mec.scala object Messages{ object Exit object Finished case class Response(message: String) } import akka.actor.Actor class ShapesDrawingActor extends Actor{ import Messages._ def receive = { case s: Shape => s.draw { str => println(s"ShapeDrawingActor: $str")} sender ! Respo...
mectest1/HelloScala
HelloWorld/src/com/mec/scala/ShapesDrawingActor.scala
Scala
gpl-3.0
661
/** * Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0 * See accompanying LICENSE file. */ package kafka.manager.utils import kafka.manager.CuratorConfig import org.apache.curator.framework.{CuratorFrameworkFactory, CuratorFramework} import org.apache.curator.retry.BoundedExponentialBackoffR...
Flipkart/kafka-manager
test/kafka/manager/utils/KafkaServerInTest.scala
Scala
apache-2.0
1,018
/* * 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.linker.backend import sca...
scala-js/scala-js
linker/shared/src/main/scala/org/scalajs/linker/backend/OutputWriter.scala
Scala
apache-2.0
3,458
package de.tototec.cmvn.configfile // FIXME: make a normal class case class KeyValue(val key: String, val value: String, var file: String = null, var line: java.lang.Integer = null)
ToToTec/cmvn
de.tototec.cmvn/src/main/scala/de/tototec/cmvn/configfile/KeyValue.scala
Scala
apache-2.0
243