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...
kevinsookocheff-wf/kafka
core/src/main/scala/kafka/network/RequestChannel.scala
Scala
apache-2.0
10,902
package msandin.vial class Ref[C](val env :Env[C], val content :C) private class Env2[C]( makeContent :Env2[C] => Seq[(Name, C)], lookupExternal :(Name, Name) => Option[Ref[C]]) { private val content = makeContent(this) } trait Env[C] { object ContentScope extends Scopes[Name, C, Ref[C]] de...
msandin/vial
src/msandin/vial/Env.scala
Scala
mit
2,458
package io.ubiqesh.uplink.disruptor import com.lmax.disruptor.EventHandler import io.ubiqesh.uplink.disruptor.persistence.actions.PushAction import io.ubiqesh.uplink.disruptor.persistence.actions.RemoveAction import io.ubiqesh.uplink.disruptor.persistence.actions.SetAction import io.ubiqesh.uplink.disruptor.persistenc...
ubiqesh/ubiqesh
uplink/src/main/scala/io/ubiqesh/uplink/disruptor/PersistenceProcessor.scala
Scala
apache-2.0
1,318
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/main/scala/org/neo4j/cypher/internal/compiler/v2_3/executionplan/LegacyExecutablePlanBuilder.scala
Scala
apache-2.0
7,739
/* * Shadowsocks - A shadowsocks client for Android * Copyright (C) 2014 <max.c.lv@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at y...
zhangxq5012/shadowsocks-android
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
Scala
gpl-3.0
36,106
package ru.maizy.cheesecake.server.marshallers /** * Copyright (c) Nikita Kovaliov, maizy.ru, 2016 * See LICENSE.txt for details. */ import ru.maizy.cheesecake.core.utils.StringUtils import ru.maizy.cheesecake.server.bodyparser.{ BodyParserSpec, JsonParserSpec, RegexpParserSpec, XmlParserSpec } import spray.json.{...
maizy/cheesecake
server/src/main/scala/ru/maizy/cheesecake/server/marshallers/BodyParseSpecMarshallers.scala
Scala
apache-2.0
1,239
/* * Copyright 2013 http4s.org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
http4s/http4s
core/shared/src/main/scala/org/http4s/headers/Accept-Patch.scala
Scala
apache-2.0
1,511
package io.coral.actors //json import org.json4s._ import io.coral.actors.transform.GroupByActor import akka.actor.Props import scaldi.Injectable._ import scaldi.Injector object CoralActorFactory { def getProps(json: JValue)(implicit injector: Injector) = { val actorPropFactories = inject [List[ActorPropFact...
daishichao/coral
runtime-api/src/main/scala/io/coral/actors/CoralActorFactory.scala
Scala
apache-2.0
1,191
package wow.realm import scodec.Codec import scodec.codecs._ import wow.common.database.DatabaseSerializableEnumeration /** * Created by sknz on 4/28/17. */ package object entities { /** * Get character DAO * @param realm current realm * @return character DAO */ def CharacterDAO(implicit realm...
SKNZ/SpinaciCore
wow/core/src/main/scala/wow/realm/entities/package.scala
Scala
mit
1,431
package dotty.tools package dotc package config import io._ import classpath.AggregateClassPath import core._ import Symbols._, Types._, Contexts._, StdNames._ import Flags._ import transform.ExplicitOuter, transform.SymUtils._ class JavaPlatform extends Platform { private var currentClassPath: Option[ClassPath] =...
dotty-staging/dotty
compiler/src/dotty/tools/dotc/config/JavaPlatform.scala
Scala
apache-2.0
2,525
package org.jetbrains.plugins.scala.lang.psi.api.base.types import org.jetbrains.plugins.scala.lang.psi.api.base.ScReferenceElement /** * @author Alexander Podkhalyuzin * Date: 13.03.2008 */ trait ScTypeProjection extends ScTypeElement with ScReferenceElement { override protected val typeName = "TypeProjection" ...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/api/base/types/ScTypeProjection.scala
Scala
apache-2.0
401
package org.falcon.streaming import twitter4j._ import org.falcon.model.Tweet import org.falcon.writer.Writer import org.falcon.util.Util import java.util.{Date, TimeZone} import java.text.SimpleDateFormat /** * Project: falcon * Package: org.falcon.streaming * * Author: Sergio Álvarez * Date: 09/2013 */ class...
sergio-alvarez/falcon
src/main/scala/org/falcon/streaming/TwitterStreaming.scala
Scala
apache-2.0
2,050
package io.backchat.scapulet package object extractors { // Splitter to apply two pattern matches on the same scrutinee. // http://stackoverflow.com/questions/2261358/pattern-matching-with-conjunctions-patterna-and-patternb object && { def unapply[A](a: A) = Some((a, a)) } }
backchatio/scapulet
src/main/scala/io/backchat/scapulet/extractors/package.scala
Scala
bsd-3-clause
289
/* * 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 ...
Sephiroth-Lin/incubator-carbondata
integration/spark2/src/test/scala/org/apache/spark/carbondata/restructure/AlterTableValidationTestCase.scala
Scala
apache-2.0
16,773
/* * 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 ...
gyfora/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/utils/DateTimeTestUtil.scala
Scala
apache-2.0
1,745
package edu.jhu.hlt.probe /** * @author Tongfei Chen (ctongfei@gmail.com). */ object Test extends App { val fff = FeatureVector.parse("") val fWord = FeatureGroup.count("word")(Array(1, 2, 3, 1, 2, 4, 6, 7)) val fX = FeatureGroup("idf")((0 until 4).map(i => i → (1.0 / i))) val g1 = fWord cartesianProduct f...
ctongfei/probe
core/src/test/scala/me/tongfei/probe/Test.scala
Scala
mit
813
package org.apress.prospark import scala.io.Source import org.apache.spark.SparkConf import org.apache.spark.SparkContext import org.apache.spark.streaming.Seconds import org.apache.spark.streaming.StreamingContext import org.apache.hadoop.io.LongWritable import org.apache.hadoop.fs.Path import org.apache.hadoop.mapre...
ZubairNabi/prosparkstreaming
Chap3/src/main/scala/org/apress/prospark/L3-1DStreams.scala
Scala
apache-2.0
1,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...
pncampbell/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600e/v2/E28.scala
Scala
apache-2.0
1,081
package mesosphere.marathon.api.v2.json import com.wix.accord._ import com.wix.accord.dsl._ import mesosphere.marathon.state._ import mesosphere.marathon.api.v2.Validation._ import scala.reflect.ClassTag case class GroupUpdate( id: Option[PathId], apps: Option[Set[AppDefinition]] = None, groups: Option[S...
yp-engineering/marathon
src/main/scala/mesosphere/marathon/api/v2/json/GroupUpdate.scala
Scala
apache-2.0
3,575
package org.arnoldc import java.io.File object Executor { def execute(className:String) = { val classLoader = new java.net.URLClassLoader(Array(new File(".").toURI.toURL), getClass.getClassLoader) val clazz = classLoader.loadClass(className) val instance = clazz.newInstance().asInstanceOf[ {def main(te...
khodges42/DovahkiinC
src/main/scala/org/dovahkiinc/Executor.scala
Scala
apache-2.0
372
package io /** * This is a root package of the Finch library, which provides an immutable layer of functions and types atop of Finagle * for writing lightweight HTTP services. */ package object finch extends Endpoints with Outputs with RequestReaders with ValidationRules { /** * Representations for the variou...
BenWhitehead/finch
core/src/main/scala/io/finch/package.scala
Scala
apache-2.0
949
/* * Copyright 2011-2022 GatlingCorp (https://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...
gatling/gatling
gatling-recorder/src/main/scala/io/gatling/recorder/http/flows/PlainNoProxyMitmActor.scala
Scala
apache-2.0
1,970
/* * 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/physical/batch/BatchExecSortLimitRule.scala
Scala
apache-2.0
4,021
package io.vamp.model.reader import io.vamp.model.notification.{ EmptyImportError, ImportDefinitionError } import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class ImportReaderSpec extends ReaderSpec { "ImportReader" should "read the single import" in { Import...
magneticio/vamp
model/src/test/scala/io/vamp/model/reader/ImportReaderSpec.scala
Scala
apache-2.0
1,499
package com.geeksville.mavlink import gnu.io._ import java.io._ import com.geeksville.akka.InstrumentedActor import org.mavlink.messages.MAVLinkMessage import com.geeksville.util.ThreadTools import com.geeksville.util.Using._ import org.mavlink._ import com.geeksville.util.DebugInputStream import com.geeksville.util.B...
geeksville/arduleader
posixpilot/src/main/scala/com/geeksville/mavlink/MavlinkFtdi.scala
Scala
gpl-3.0
2,113
package com.timgroup.eventstore.api import org.joda.time.{DateTime, DateTimeZone} import org.scalatest._ trait EventStoreTest { this: FunSpec with MustMatchers => val effectiveTimestamp = new DateTime(2015, 1, 15, 23, 43, 53, DateTimeZone.UTC) def anEventStore(eventStore: EventStore) = { it("can save event...
tim-group/tg-eventstore
api-legacy/testlib/src/main/scala/com/timgroup/eventstore/api/EventStoreTest.scala
Scala
bsd-2-clause
3,884
package rssreader.utils import scala.concurrent.ExecutionContext.Implicits.global import reactivemongo.api.{DB, MongoDriver} object MongoContext { val driver = new MongoDriver val connection = driver.connection(List("192.168.1.102")) def db: DB = connection("RSSReader") }
Dev25/RSSReader
src/main/scala/rssreader/utils/MongoContext.scala
Scala
mit
282
/* * ============= Ryft-Customized BSD License ============ * Copyright (c) 2015, Ryft Systems, Inc. * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must...
getryft/spark-ryft-connector
spark-ryft-connector/src/test/scala/com/ryft/spark/connector/RyftQuerySpec.scala
Scala
bsd-3-clause
5,003
package demo.pages import com.acework.js.components.bootstrap._ import com.acework.js.utils.{Mappable, Mergeable} import demo.examples.util.CodeContent import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.prefix_<^._ import scala.scalajs.js.UndefOr._ /** * Created by weiyin on 17/03/15. */ object Too...
weiyinteo/scalajs-react-bootstrap
demo/src/main/scala/demo/pages/Tooltips.scala
Scala
mit
6,900
package sigmastate.serialization.generators import org.scalacheck.{Arbitrary, Gen} import sigmastate._ import sigmastate.Values.{ConcreteCollection, Value, IntConstant} trait ConcreteCollectionGenerators { self: ObjectGenerators => val minCollLength = 1 val maxCollLength = 10 def concreteCollectionGen[T <: STy...
ScorexFoundation/sigmastate-interpreter
sigmastate/src/test/scala/sigmastate/serialization/generators/ConcreteCollectionGenerators.scala
Scala
mit
1,275
package com.bryghts.ftypes package async import scala.concurrent.{ExecutionContext, Future} /** * Created by Marc Esquerrà on 23/01/2016. */ class String private(override val future: Future[java.lang.String]) ( implicit protected val executionContext: Executi...
marcesquerra/FTypes-String
shared/src/main/scala/com/bryghts/ftypes/async/String.scala
Scala
mit
12,831
package org.qcri.rheem.api import java.io.File import java.net.URI import java.nio.file.{Files, Paths} import java.sql.{Connection, Statement} import java.util.function.Consumer import org.junit.{Assert, Test} import org.qcri.rheem.basic.RheemBasics import org.qcri.rheem.core.api.{Configuration, RheemContext} import ...
jonasrk/rheem
rheem-api/src/test/scala/org/qcri/rheem/api/ApiTest.scala
Scala
apache-2.0
19,307
package eu.brosbit.opos.snippet.doc import scala.xml.Unparsed import _root_.net.liftweb.util._ import _root_.net.liftweb.common._ import _root_.eu.brosbit.opos.model._ import _root_.net.liftweb.http.SHtml import Helpers._ import _root_.net.liftweb.http.js.JsCmds._ import _root_.net.liftweb.http.js.JsCmd import _ro...
mikolajs/osp
src/main/scala/eu/brosbit/opos/snippet/doc/PSOSn.scala
Scala
agpl-3.0
2,990
package lila.tournament import scala.concurrent.duration._ private[tournament] final class Cached { private val nameCache = lila.memo.MixedCache[String, Option[String]]( ((id: String) => TournamentRepo byId id map2 { (tour: Tournament) => tour.fullName }), timeToLive = 6 hours, default = _ => none) ...
danilovsergey/i-bur
modules/tournament/src/main/Cached.scala
Scala
mit
362
package sangria.validation.rules import sangria.ast import sangria.ast.AstVisitorCommand import sangria.validation._ import scala.collection.mutable.{Set ⇒ MutableSet} import scala.language.postfixOps /** * No undefined variables * * A GraphQL operation is only valid if all variables encountered, both directly *...
PhilAndrew/JumpMicro
JMSangriaGraphql/src/main/scala/sangria/validation/rules/NoUndefinedVariables.scala
Scala
mit
1,626
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
cran/rkafkajars
java/scala/reflect/Code.scala
Scala
apache-2.0
869
// Copyright 2014 Commonwealth Bank of Australia // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ap...
CommBank/parlour
src/test/scala/au/com/cba/omnia/parlour/OmniaSpec.scala
Scala
apache-2.0
796
package com.qingstor.sdk.steps import com.qingstor.sdk.config.QSConfig import com.qingstor.sdk.service.Bucket import cucumber.api.java8.StepdefBody._ import cucumber.api.java8.En import com.qingstor.sdk.steps.TestUtil.TestConfig import io.circe.Json import io.circe.parser._ import scala.concurrent.Await import scala....
cheerx/qingstor-sdk-scala
src/test/scala/com/qingstor/sdk/steps/BucketExternalMirrorSteps.scala
Scala
apache-2.0
3,585
package org.scalatra.util import java.nio.charset.Charset class RicherString(orig: String) { def isBlank = orig == null || orig.trim.isEmpty def isNonBlank = !isBlank def toOption = nonBlank def nonBlank = if (isBlank) None else Some(orig) // def urlDecode(charset: Charset =) } object RicherString { impli...
kuochaoyi/scalatra
core/src/main/scala/org/scalatra/util/RicherString.scala
Scala
bsd-2-clause
384
package week4 trait List[T] { def isEmpty: Boolean def head: T def tail: List[T] } class Cons[T](val head: T, val tail: List[T]) extends List[T] { def isEmpty = false } class Nil[T] extends List[T] { def isEmpty = true def head = throw new NoSuchElementException("Nil.head") def tail = throw new NoSuchE...
vmatelsky/fpp_scala
progfun/src/week4/List.scala
Scala
apache-2.0
505
package maven import java.io.File import sbt._ import org.sonatype.aether.connector.wagon.{WagonRepositoryConnectorFactory, WagonProvider} import org.sonatype.aether.spi.connector.RepositoryConnectorFactory import org.apache.maven.repository.internal.{MavenRepositorySystemSession, DefaultServiceLocator} import org.son...
rossabaker/maven-sbt
src/main/scala/maven/Engine.scala
Scala
mit
13,944
package com.datawizards.splot.charts import com.datawizards.splot.SPlotBaseTest import com.datawizards.splot.api.implicits._ import com.datawizards.splot.builders.PlotBuilder import com.datawizards.splot.mapper.SPlotToXChartMapper import com.datawizards.splot.model.PlotAxisValues.XAxisValueTypeString import com.datawi...
piotr-kalanski/SPlot
src/test/scala/com/datawizards/splot/charts/PiePlotTest.scala
Scala
apache-2.0
2,294
import com.mongodb.{DBCollection => MongoDBCollection, DBObject} /** * * @param underlying */ class DBCollection(override val underlying: MongoDBCollection) extends ReadOnly { private def collection(name: String) = underlying.getCollection(name) def readOnlyCollection(name: String) = new DBCollection(collecti...
ScalaPlayAkka/ScalaSimple
src/DBCollection.scala
Scala
apache-2.0
1,069
/* * 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 ...
jiangxb1987/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala
Scala
apache-2.0
34,890
package im.actor.server.dialog import akka.actor.ActorSystem import akka.http.scaladsl.util.FastFuture import im.actor.api.rpc.PeersImplicits import im.actor.api.rpc.counters.{ ApiAppCounters, UpdateCountersChanged } import im.actor.api.rpc.messaging._ import im.actor.server.db.DbExtension import im.actor.server.messa...
y0ke/actor-platform
actor-server/actor-core/src/main/scala/im/actor/server/dialog/ActorDelivery.scala
Scala
agpl-3.0
4,369
package org.dbpedia.spotlight.db.tokenize import org.dbpedia.spotlight.db.model.{Stemmer, StringTokenizer} import org.dbpedia.spotlight.model.Text abstract class BaseStringTokenizer(stemmer: Stemmer) extends StringTokenizer { protected def tokenizeUnstemmed(text: String): Seq[String] def tokenize(text: String): ...
Skunnyk/dbpedia-spotlight-model
core/src/main/scala/org/dbpedia/spotlight/db/tokenize/BaseStringTokenizer.scala
Scala
apache-2.0
496
/* * Copyright 2012-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
planet42/Laika
core/shared/src/main/scala/laika/parse/text/Literal.scala
Scala
apache-2.0
1,573
package de.htwg.zeta.server.model.modelValidator.generator.consistencyRules import scala.collection.breakOut import scala.collection.mutable import de.htwg.zeta.common.models.project.concept.Concept class NoCyclicInheritance extends ConceptRule { override val name: String = getClass.getSimpleName override val d...
Zeta-Project/zeta
api/server/app/de/htwg/zeta/server/model/modelValidator/generator/consistencyRules/NoCyclicInheritance.scala
Scala
bsd-2-clause
1,350
package org.jetbrains.plugins.scala package lang.completion import com.intellij.codeInsight.completion._ import com.intellij.codeInsight.lookup.{LookupElement, LookupElementBuilder} import com.intellij.patterns.{PlatformPatterns, PsiElementPattern} import com.intellij.psi.util.PsiTreeUtil import com.intellij.psi.{PsiE...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/completion/SameSignatureCallParametersProvider.scala
Scala
apache-2.0
8,068
package uk.gov.gds.ier.transaction.forces.openRegister import uk.gov.gds.ier.transaction.forces.ForcesControllers import com.google.inject.{Inject, Singleton} import uk.gov.gds.ier.serialiser.JsonSerialiser import uk.gov.gds.ier.config.Config import uk.gov.gds.ier.security.EncryptionService import uk.gov.gds.ier.step....
alphagov/ier-frontend
app/uk/gov/gds/ier/transaction/forces/openRegister/OpenRegisterStep.scala
Scala
mit
1,181
/* * Copyright 2015 Michael Cuthbert * * 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...
Crashfreak/JVerDocs
src/main/scala/org/creak/docversioning/DocumentFactory.scala
Scala
apache-2.0
1,605
package com.github.jancajthaml.money import org.scalameter.api.{Measurer, Bench, Gen, exec} object SubtractionPerformance extends Bench.OfflineReport { val times = Gen.range("times")(0, 10000, 1000) performance of "subtraction" in { measure method "Money.subtract" in { using(times) config ( e...
jancajthaml-scala/money
src/test/scala/com/github/jancajthaml/money/SubtractionPerformance.scala
Scala
unlicense
1,527
package typeLevelProgramming object TypeLevelProgramming { import scala.reflect.runtime.universe._ def show[T](value: T)(implicit tag: TypeTag[T]) = tag.toString.replace("typeLevelProgramming.TypeLevelProgramming.", "") def main(args: Array[String]): Unit = { println("This is where main will live") } ...
grscheller/scheller-linux-archive
grok/Scala2/typeLevelProgramming/src/main/scala/typeLevelProgramming.scala
Scala
bsd-3-clause
323
package org.bfn.ninetynineprobs import org.scalatest._ class P89Spec extends UnitSpec { // TODO }
bfontaine/99Scala
src/test/scala/P89Spec.scala
Scala
mit
105
/* * 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/accounts/frs102/boxes/AC127.scala
Scala
apache-2.0
1,573
package poly.collection.mut import poly.collection._ import poly.collection.factory._ import poly.collection.impl._ import poly.macroutil._ /** * A mutable sequence backed by a resizable array. * @since 0.1.0 * @author Tongfei Chen */ class ArraySeq[T] private(private[poly] var data: ResizableSeq[T]) extends Abst...
ctongfei/poly-collection
core/src/main/scala/poly/collection/mut/ArraySeq.scala
Scala
mit
1,553
package com.twitter.finagle.mux.exp.pushsession import com.twitter.conversions.time._ import com.twitter.finagle.exp.pushsession.{MockChannelHandle, PushChannelHandle} import com.twitter.finagle.{Failure, Path, Service, Status} import com.twitter.finagle.liveness.FailureDetector import com.twitter.finagle.mux.{Request...
mkhq/finagle
finagle-mux/src/test/scala/com/twitter/finagle/mux/exp/pushsession/MuxClientSessionTest.scala
Scala
apache-2.0
8,925
package fpinscala.state trait RNG { def nextInt: (Int, RNG) } object RNG { case class Simple(seed: Long) extends RNG { def nextInt: (Int, RNG) = { val newSeed = (seed * 0x5DEECE66DL + 0xBL) & 0xFFFFFFFFFFFFL // `&` is bitwise AND. We use the current seed to generate a new seed. val nextRNG = Simpl...
suliatis/fpinscala
exercises/src/main/scala/fpinscala/state/State.scala
Scala
mit
2,970
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
aokolnychyi/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisSuite.scala
Scala
apache-2.0
17,535
// 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...
helifu/kudu
java/kudu-spark/src/main/scala/org/apache/kudu/spark/kudu/RowConverter.scala
Scala
apache-2.0
5,198
/* * Copyright 1998-2016 Linux.org.ru * 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...
kloun/lorsource
src/main/scala/ru/org/linux/search/SearchResultService.scala
Scala
apache-2.0
6,781
package com.aidan.chapter6 import org.scalatest.FunSuite import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner /* * * * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * !!!!! Warning: !!!!!! * !!!!! Scala files should be i...
aidanwhiteley/scala_impatient
src/test/scala/com/aidan/chapter6/Chapter6Test.scala
Scala
apache-2.0
2,004
package co.ledger.wallet.web.ripple.components import biz.enef.angulate.{Directive, Scope} import biz.enef.angulate.Module.RichModule import biz.enef.angulate.core.{Attributes, JQLite} import org.scalajs.dom import org.scalajs.dom.CanvasRenderingContext2D import org.scalajs.dom.ext.Color import org.scalajs.dom.raw.Eve...
LedgerHQ/ledger-wallet-ripple
src/main/scala/co/ledger/wallet/web/ripple/components/QrCodeScanner.scala
Scala
mit
6,983
package org.daydev.scala.bb.parse import org.scalatest.FunSuite import org.daydev.scala.bb.parse.lexer.OpenTag import org.daydev.scala.bb.parse.lexer.CloseTag import org.daydev.scala.bb.parse.lexer.Newline import org.daydev.scala.bb.model.BbTag import org.daydev.scala.bb.model.PlainText class TokenStackSpec extends F...
daydev/bbcode-scala
src/test/scala/org/daydev/scala/bb/parse/TokenStackSpec.scala
Scala
mit
2,013
package org.tagsharp.dsl import org.jsoup.nodes.Element /** * This augments Jsoup, whose own Attribute does not retain * a reference back to its parent Element. The back reference is * needed for error highlighting. */ case class Attribute(name:String, element:Element) { lazy val value:String = { element.a...
reggoodwin/tagsharp
src/main/scala/org/tagsharp/dsl/Attribute.scala
Scala
mit
525
/* * Copyright 2016 Coursera 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...
coursera/naptime
naptime/src/main/scala/org/coursera/naptime/models.scala
Scala
apache-2.0
25,680
/* * sbt * Copyright 2011 - 2018, Lightbend, Inc. * Copyright 2008 - 2010, Mark Harrah * Licensed under Apache License 2.0 (see LICENSE) */ package sbt package internal import sbt.internal.util.Types import sbt.util.Show import java.util.regex.Pattern import java.io.File import Keys.Streams import Def.ScopedKey ...
xuwei-k/xsbt
main/src/main/scala/sbt/internal/Output.scala
Scala
apache-2.0
3,276
package ilove.quark.us import io.quarkus.test.junit.QuarkusIntegrationTest @QuarkusIntegrationTest class ReactiveGreetingResourceIT extends ReactiveGreetingResourceTest
quarkusio/quarkus
independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/RESTEasyReactiveCodestartTest/testContent/src_test_scala_ilove_quark_us_ReactiveGreetingResourceIT.scala
Scala
apache-2.0
171
package io.taig.android.functional.syntax import cats.FlatMap import io.taig.android.functional.operation import scala.language.{higherKinds, implicitConversions} trait flatMap { implicit def flatMapSyntax[A, F[_]: FlatMap]( flatMap: F[A]): operation.flatMap[A, F] = { new operation.flatMap[A, F](flatMap)...
Taig/Toolbelt
functional/src/main/scala/io/taig/android/functional/syntax/flatMap.scala
Scala
mit
359
package update.fixtures import update.GameScanner /** * Created by alex on 01/02/16. */ trait FixturesGameScanner extends GameScanner { }
unclealex72/west-ham-calendar
app/update/fixtures/FixturesGameScanner.scala
Scala
apache-2.0
145
/* * 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/amls-frontend
app/connectors/KeystoreConnector.scala
Scala
apache-2.0
1,556
/** * 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/plugins/AccessControl.scala
Scala
apache-2.0
1,205
package org.bitcoins.core.util import org.bitcoins.core.consensus.Consensus import org.bitcoins.core.crypto._ import org.bitcoins.core.currency.CurrencyUnits import org.bitcoins.core.number.UInt32 import org.bitcoins.core.policy.Policy import org.bitcoins.core.protocol.CompactSizeUInt import org.bitcoins.core.protocol...
bitcoin-s/bitcoin-s
core/src/main/scala/org/bitcoins/core/util/BitcoinScriptUtil.scala
Scala
mit
29,311
/** * Copyright (c) 2012-2013 Rached Ben Mustapha * * See the file LICENSE for copying permission. */ package net.benmur.shinynemesis.analyzer import scala.collection.mutable.{ ArrayBuffer, Map } import net.benmur.shinynemesis.Config class ColorAnalyzer( private val tolerance: Int, private val frameGrou...
benmur/shiny-nemesis
src/main/scala/net/benmur/shinynemesis/analyzer/ColorAnalyzer.scala
Scala
mit
2,252
/* * 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 ...
apache/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/OverAggregateITCase.scala
Scala
apache-2.0
44,044
import akka.actor.{ Actor, ActorLogging, ActorSystem, Props } import akka.cluster.Cluster import akka.contrib.pattern.{ DistributedPubSubExtension, DistributedPubSubMediator } import akka.event.{ Logging, LoggingAdapter } import akka.http.Http import akka.http.marshalling.ToResponseMarshallable import akka.http.model.S...
vikraman/akka-sse-primes
src/main/scala/AkkaSseService.scala
Scala
unlicense
3,566
package com.wavesplatform.lang.v1.compiler import cats.instances.list._ import cats.instances.option._ import cats.instances.vector._ import cats.syntax.applicative._ import cats.syntax.either._ import cats.syntax.traverse._ import cats.{Id, Show} import com.wavesplatform.lang.contract.DApp import com.wavesplatform.la...
wavesplatform/Waves
lang/shared/src/main/scala/com/wavesplatform/lang/v1/compiler/ContractCompiler.scala
Scala
mit
17,218
package com.rasterfoundry.batch.stacExport import geotrellis.server.stac._ import com.rasterfoundry.datamodel._ import geotrellis.proj4.CRS import geotrellis.vector.reproject.Reproject import cats.implicits._ import io.circe._ import java.sql.Timestamp object StacCatalogBuilder { sealed trait CatalogRequirements ...
azavea/raster-foundry
app-backend/batch/src/main/scala/stacExport/StacCatalogBuilder.scala
Scala
apache-2.0
8,609
package com.twitter.finagle.util import java.util.concurrent.atomic.AtomicInteger import collection.mutable.ArrayBuffer /** * The AsyncLatch is an asynchronous latch. */ class AsyncLatch(initialCount: Int = 0) { require(initialCount >= 0) @volatile private[this] var count = initialCount private[this] var wait...
enachb/finagle_2.9_durgh
finagle-core/src/main/scala/com/twitter/finagle/util/AsyncLatch.scala
Scala
apache-2.0
1,199
package com.acerete.exception case class WrongSolutionException(message: String) extends Exception
adriwankenobi/paint-shop-scala
src/com/acerete/exception/WrongSolutionException.scala
Scala
gpl-2.0
99
package com.datawizards.dqm.rules.field import org.apache.spark.sql.Row import org.apache.spark.sql.catalyst.expressions.GenericRowWithSchema import org.apache.spark.sql.types.StructType trait RowBuilder { def createRow(values: Array[Any], schema: StructType): Row = { new GenericRowWithSchema(values, schema) ...
piotr-kalanski/data-quality-monitoring
src/test/scala/com/datawizards/dqm/rules/field/RowBuilder.scala
Scala
apache-2.0
324
package org.elasticsearch.spark.rdd.api.java import java.util.{Map => JMap} import scala.collection.JavaConverters.mapAsScalaMapConverter import org.apache.spark.api.java.JavaPairRDD import org.apache.spark.api.java.JavaPairRDD.fromRDD import org.apache.spark.api.java.JavaRDD import org.apache.spark.api.java.JavaSpa...
eliasah/elasticsearch-hadoop
spark/src/main/scala/org/elasticsearch/spark/rdd/api/java/JavaEsSpark.scala
Scala
apache-2.0
2,430
package domino import org.scalatest.WordSpecLike import org.scalatest.ShouldMatchers import org.osgi.framework.ServiceRegistration import domino.test.PojoSrTestHelper import domino.test.PojoSrTestHelper import org.osgi.framework.ServiceListener object ServiceProvidingSpec { trait MyService { def doIt() } ...
helgoboss/domino
src/test/scala/domino/ServiceProvidingSpec.scala
Scala
mit
6,993
/* * 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
sql/core/src/test/scala/org/apache/spark/sql/NestedDataSourceSuite.scala
Scala
apache-2.0
3,398
package assigner import assigner.model._ import org.junit.runner.RunWith import org.scalacheck.Gen._ import org.scalatest._ import org.scalatest.junit.JUnitRunner import org.scalatest.prop.PropertyChecks @RunWith(classOf[JUnitRunner]) class ModelSpec extends FlatSpec with Matchers with PropertyChecks with DataGen { ...
joroKr21/IoS-Algorithm
src/test/scala/assigner/ModelSpec.scala
Scala
mit
1,063
package de.mukis.backend import de.mukis.api.EchoAPI._ class EchoService { def echo(msg: String): Echo = Echo(s"echo: $msg") }
hmfula/scanop
ts/src/main/scala/de/mukis/backend/EchoService.scala
Scala
mit
139
import io.circe.{Decoder, Encoder, Json} import shapeless._ import scala.language.higherKinds trait ImportCompanion[II <: HList] extends Any { implicit def implicit11[Model](implicit i: EncoderInit[Model, II]): Encoder[Model] = i.encoder implicit def implicit12[H, I <: HList, Model](imp...
djx314/ubw
raw03-祭祀日常小百科/src/main/scala/ImportCompanion.scala
Scala
bsd-3-clause
1,200
/* Deduction Tactics Copyright (C) 2012-2015 Raymond Dodge This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This progra...
rayrobdod/deductionTactics
src/main/scala/com/rayrobdod/deductionTactics/swingView/host/Top.scala
Scala
gpl-3.0
7,236
package com.solarmosaic.client.utilityApi import com.solarmosaic.client.utilityApi.model.response.AccountResponse import spray.json._ class AccountResponseTests extends Test { "AccountResponse JSON format" should { "correctly deserialize from valid JSON" in { response.accountJson(response.account).convert...
solarmosaic/utility-api-client
src/test/scala/com/solarmosaic/client/utilityApi/AccountResponseTests.scala
Scala
mit
528
package com.github.caiiiycuk.pg2sqlite.schema import java.sql.Types object Column { val TYPE_DETECTORS = List( ("""boolean""".r -> Types.BOOLEAN), ("""int""".r -> Types.BIGINT), ("""float""".r -> Types.DOUBLE), ("""numeric""".r -> Types.NUMERIC), ("""bytea""".r -> Types.BLOB), ("""geometry""...
caiiiycuk/postgresql-to-sqlite
src/main/scala/com/github/caiiiycuk/pg2sqlite/schema/Column.scala
Scala
mit
833
/* * 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 ...
ebruchez/darius-xml.js
xerces/shared/src/main/scala/org/orbeon/apache/xerces/xni/parser/XMLConfigurationException.scala
Scala
apache-2.0
1,586
package dotty.tools.repl import scala.language.unsafeNulls import java.nio.file.{Path, Files} import java.util.Comparator import java.util.regex.Pattern import org.junit.{Test, BeforeClass, AfterClass} import org.junit.Assert.assertEquals class LoadTests extends ReplTest { import LoadTests._, ReplCompilerTests._ ...
lampepfl/dotty
compiler/test/dotty/tools/repl/LoadTests.scala
Scala
apache-2.0
2,262
/* * Copyright (c) 2012-2013 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...
richo/snowplow
3-etl/hive-etl/snowplow-log-deserializers/src/test/scala/com/snowplowanalytics/snowplow/hadoop/hive/EventTypeTest.scala
Scala
apache-2.0
1,596
/* * Copyright 2012-2013 Stephane Godbillon (@sgodbillon) and Zenexity * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
qubell/ReactiveMongo
driver/src/main/scala/api/collections/bsoncollection.scala
Scala
apache-2.0
7,974
package ch03 /** * * @author Richard Li */ class TryToUseSealedTraitDefinedInOtherSource /*extends Month*/{ //compilation error }
precompiler/scala-101
scala-design-pattern/src/main/scala/ch03/TryToUseSealedTraitDefinedInOtherSource.scala
Scala
apache-2.0
138
/* * 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 ...
ksimar/incubator-carbondata
integration/spark2/src/test/scala/org/apache/carbondata/spark/testsuite/allqueries/InsertIntoCarbonTableSpark2TestCase.scala
Scala
apache-2.0
1,641
package cgta.serland import cgta.serland.SerSchemas.XObject import cgta.serland.testing.UnitTestHelpSerClass import cgta.otest.FunSuite ////////////////////////////////////////////////////////////// // Created by bjackman @ 4/22/14 9:50 AM ////////////////////////////////////////////////////////////// object TestS...
cgta/open
serland/shared/src/test/scala/cgta/serland/TestSerObject.scala
Scala
mit
632
package rincewind import scala.util.Try import com.typesafe.config.ConfigFactory import akka.actor.{ ActorSystem, Props } case object StartWriter case object Retry object Writer { def main(args: Array[String]): Unit = { val config = ConfigFactory.load("application") (for { hostname <- Option(confi...
cchantep/rincewind
writer/src/main/scala/rincewind/Writer.scala
Scala
gpl-2.0
3,268
package tech.elephant.scala import org.apache.spark.SparkContext import org.apache.spark.SparkConf import org.apache.spark.sql.SQLContext import grizzled.slf4j.Logger object SimpleScalaSQL { val logger = Logger[this.type] def main(args: Array[String]) { // A parquet file on hdfs val conf = new SparkConf...
omeyn/scala-games
src/main/scala-2.10/tech/elephant/scala/SimpleScalaSQL.scala
Scala
apache-2.0
3,081
package com.github.cthulhu314.scalaba.persistance.files import java.io._ import java.util.concurrent.atomic.AtomicInteger class SimpleFileRepository(path : String) extends FileRepository { private val id = new AtomicInteger(0) def create(file : Array[Byte]) : Option[String] = { val fos = new FileOutputStream(path...
cthulhu314/scalaba
src/main/scala/com/github/cthulhu314/scalaba/persistance/files/SimpleFileRepository.scala
Scala
mit
697