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...
sebadiaz/kafka
core/src/main/scala/kafka/log/LogCleaner.scala
Scala
apache-2.0
45,163
package com.github.etacassiopeia.s99.list /** * <h1>P10</h1> * Run-length encoding of a list * * @author Mohsen Zainalpour * @version 1.0 * @since 28/04/16 */ object P10 { def main(args: Array[String]) { println(encode(List('a, 'a, 'a, 'a, 'b, 'c, 'c, 'a, 'a, 'd, 'e, 'e, 'e, 'e))) } def encod...
EtaCassiopeia/S-99
src/main/scala/com/github/etacassiopeia/s99/list/P10.scala
Scala
apache-2.0
700
package de.windelknecht.stup.utils.coding.mvc import java.util.UUID import de.windelknecht.stup.utils.coding.reflect.CaseClassReflector import scala.collection.mutable import scala.reflect.ClassTag import scala.reflect.runtime.{universe => ru} /** * Base trait of all entities. They all must implement an id method ...
windelknecht/stup-utils
src/main/scala/de/windelknecht/stup/utils/coding/mvc/Entity.scala
Scala
mit
4,427
/* * 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 ...
adrian-ionescu/apache-spark
sql/core/src/test/scala/org/apache/spark/sql/execution/vectorized/ColumnarBatchBenchmark.scala
Scala
apache-2.0
12,224
package kafka.common /** * Thrown when a request is made for broker but no brokers with that topic * exist. */ class NoBrokersForPartitionException(message: String) extends RuntimeException(message) { def this() = this(null) }
tcrayford/hafka
kafka/core/src/main/scala/kafka/common/NoBrokersForPartitionException.scala
Scala
bsd-3-clause
232
package net.particlez.gui import java.awt.Color import scala.swing.event.ButtonClicked import scala.swing.event.Event import scala.swing.event.Key import scala.swing.event.KeyPressed import scala.swing.event.WindowClosing import scala.swing.Button import scala.swing.Dialog import scala.swing.FlowPanel import scala.swin...
bbiletskyy/particlez
src/main/scala/net/particlez/gui/CommandPanel.scala
Scala
apache-2.0
2,913
/* Copyright 2012 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
MansurAshraf/scalding
scalding-commons/src/main/scala/com/twitter/scalding/commons/source/DailySources.scala
Scala
apache-2.0
3,847
package blended.jms.utils import java.io.{PrintWriter, StringWriter} import blended.akka.{ActorSystemWatching, OSGIActorConfig} import blended.util.logging.Logger import domino.DominoActivator import javax.jms.ConnectionFactory import scala.jdk.CollectionConverters._ import scala.util.control.NonFatal object Connec...
woq-blended/blended
blended.jms.utils/src/main/scala/blended/jms/utils/ConnectionFactoryActivator.scala
Scala
apache-2.0
2,843
package org.opencompare.dataset.bestbuy import org.opencompare.api.java import org.opencompare.api.java.util.PCMElementComparator import org.opencompare.api.java.{Cell, Feature, PCM} import scala.collection.JavaConversions._ import scala.collection.mutable /** * Created by gbecan on 4/2/15. */ class PCMAnalyzer { ...
gbecan/OpenCompare
org.opencompare/dataset-best-buy/src/test/scala/org/opencompare/dataset/bestbuy/PCMAnalyzer.scala
Scala
apache-2.0
4,675
/*Β§ =========================================================================== Chronos =========================================================================== Copyright (C) 2015-2016 Gianluca Costa =========================================================================== Licensed under the Apache Lic...
giancosta86/Chronos
src/main/scala/info/gianlucacosta/chronos/ast/expressions/CastToString.scala
Scala
apache-2.0
1,180
package spray.oauth.utils import java.security.SecureRandom import spray.oauth.utils.OAuth2Parameters._ /** * Created with IntelliJ IDEA. * User: hasan.ozgan * Date: 3/25/14 * Time: 12:12 PM * To change this template use File | Settings | File Templates. */ object TokenGenerator { val TOKEN_HASH_CHARS = "0123...
hasanozgan/spray-oauth
core/src/main/scala/spray/oauth/utils/TokenGenerator.scala
Scala
apache-2.0
827
/* * 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 ...
SparklineData/spark-druid-olap
src/test/scala/org/apache/spark/sql/sources/druid/test/FilterPlanningTest.scala
Scala
apache-2.0
5,271
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
slamdata/slamengine
sql/src/main/scala/quasar/sql/Query.scala
Scala
apache-2.0
694
/* * Copyright (c) 2013-2014 TelefΓ³nica InvestigaciΓ³n y Desarrollo S.A.U. * * 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 * * Unles...
telefonicaid/fiware-cosmos-platform
cosmos-admin/src/main/scala/es/tid/cosmos/admin/command/CommandRunner.scala
Scala
apache-2.0
4,581
/* * Copyright (c) 2013, Scodec * 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 retain the above copyright notice, this * list of conditions a...
scodec/scodec-bits
core/shared/src/main/scala/scodec/bits/BitVector.scala
Scala
bsd-3-clause
79,384
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v3/B472.scala
Scala
apache-2.0
983
/* * 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 ...
sryza/spark
core/src/main/scala/org/apache/spark/ui/storage/RDDPage.scala
Scala
apache-2.0
4,506
package riftwarpx.mongo import _root_.java.time.{ ZonedDateTime, LocalDateTime } import scalaz._ import scalaz.Scalaz._ import scalaz.Validation.FlatMap._ import almhirt.common._ import almhirt.almvalidation.kit._ import almhirt.converters.BinaryConverter import reactivemongo.bson._ import riftwarp._ obje...
chridou/almhirt
ext/riftwarpx-mongo/src/main/scala/riftwarpx/mongo/FromBsonRematerializer.scala
Scala
apache-2.0
3,650
/*********************************************************************** * 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-spark/geomesa-spark-sql/src/main/scala/org/apache/spark/sql/IndexPartitioner.scala
Scala
apache-2.0
1,302
/* * Copyright (c) 2013-2017 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://...
sspinc/snowplow
3-enrich/stream-enrich/src/main/scala/com.snowplowanalytics.snowplow.enrich.stream/EnrichApp.scala
Scala
apache-2.0
13,359
package com.lonelyplanet.scalahealthcheck import org.zalando.jsonapi.model.Attribute import org.zalando.jsonapi.model.JsonApiObject.StringValue import org.zalando.jsonapi.model.RootObject.ResourceObject case class DependencyDetails(`type`: String, id: String, location: String, status: DependencyStatus, description: S...
lonelyplanet/scala-healthcheck
src/main/scala/com/lonelyplanet/scalahealthcheck/DependencyDetails.scala
Scala
mit
1,128
/* * 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
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
Scala
apache-2.0
33,782
package blended.jolokia import spray.json._ import DefaultJsonProtocol._ import spray.json.lenses.JsonLenses._ sealed trait JolokiaObject object JolokiaExecResult { def apply(result : JsValue): JolokiaExecResult = { val objectName = result.extract[String]("request" / "mbean") val operation = result.extrac...
lefou/blended
blended.jolokia/src/main/scala/blended/jolokia/JolokiaObject.scala
Scala
apache-2.0
1,636
/** * 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...
chirino/activemq
activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/util/Log.scala
Scala
apache-2.0
3,557
import tools.partest.DirectTest // verify that all languageFeature names are accepted by -language object Test extends DirectTest { override def code = "class Code { def f = (1 to 10) size }" // exercise a feature to sanity-check coverage of -language options override def extraSettings = s"-usejavacp -d ${testOu...
yusuke2255/dotty
tests/pending/run/t5905-features.scala
Scala
bsd-3-clause
1,401
package edu.mit.csail.sdg.ormolu.rel.ops import edu.mit.csail.sdg.ormolu.rel.{Relation} import edu.mit.csail.sdg.hsqldb.data.access.query.setOps.{Union => SqlUnion} import edu.mit.csail.sdg.hsqldb.data.access.Subquery /** * The union (+) of two relations. A tuple is in left + right when it is in left or in righ...
dlreeves/ormolu
src/edu/mit/csail/sdg/ormolu/rel/ops/Union.scala
Scala
mit
838
/** * 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...
akosiaris/kafka
core/src/test/scala/unit/kafka/server/LeaderElectionTest.scala
Scala
apache-2.0
7,023
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/lgpl-3.0.en.html package org.ensime.sexp.formats import org.ensime.sexp._ import shapeless._ import shapeless.syntax.typeable._ trait SexpFormats { /** * Constructs an `SexpFormat` from its two parts,...
espinhogr/ensime-server
s-express/src/main/scala/org/ensime/sexp/formats/SexpFormats.scala
Scala
gpl-3.0
1,252
/* * Copyright (C) 2012-2013 Age Mooij (http://scalapenos.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
agemooij/riak-scala-client
src/test/scala/com/scalapenos/riak/ConflictResolutionSpec.scala
Scala
apache-2.0
6,188
/* * Copyright (c) 2015-2017 Lymia Alusyia <lymia@lymiahugs.com> * * 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 * to use,...
Lymia/CivV_Mod2DLC
src/main/scala/moe/lymia/mppatch/ui/utils.scala
Scala
mit
8,616
import com.typesafe.sbt.SbtAspectj.AspectjKeys._ import com.typesafe.sbt.SbtAspectj._ import com.typesafe.sbt.SbtScalariform import sbt.Keys._ import sbt._ import sbtavro.SbtAvro._ import scoverage.ScoverageSbtPlugin._ import de.heikoseeberger.sbtheader.HeaderPlugin import de.heikoseeberger.sbtheader.AutomateHeaderPlug...
paulcleary/money
project/MoneyBuild.scala
Scala
apache-2.0
11,526
package smartupedit package io import language.reflectiveCalls trait Saving extends FileHandling { def chooseSaveTarget(dir: File = baseDir): Option[File] final def save(): ActionResult = save(current) final def saveAs(): ActionResult = save(None) private[io] final def save(opt: Option[File] = cur...
wookietreiber/smartupedit
core/main/scala/io/Saving.scala
Scala
gpl-3.0
554
package io.cronit.services import akka.actor.{ActorRef, ActorSystem, Scheduler} import akka.testkit.{TestKit, TestProbe} import io.cronit.builder.RestJobModelBuilder import io.cronit.utils.{Clock, DateUtils} import org.mockito.Mockito._ import org.scalatest.{BeforeAndAfterAll, FlatSpecLike, Matchers} import org.specs2...
212data/cronit-service
src/test/scala/io/cronit/services/JobSchedulerServiceTest.scala
Scala
apache-2.0
2,146
import scala.quoted.* def f(using Quotes): Unit = '{ type T[X] = List[X] }
dotty-staging/dotty
tests/pos-macros/quote-type-with-param.scala
Scala
apache-2.0
78
package org.broadinstitute.dsde.firecloud.webservice import akka.http.scaladsl.model.HttpMethods.GET import org.broadinstitute.dsde.firecloud.mock.MockWorkspaceServer import org.broadinstitute.dsde.firecloud.service.ServiceSpec import scala.concurrent.ExecutionContext /** * We don't create a mock server so we can ...
broadinstitute/firecloud-orchestration
src/test/scala/org/broadinstitute/dsde/firecloud/webservice/NotificationsApiServiceNegativeSpec.scala
Scala
bsd-3-clause
2,000
package im.actor.server.file import scala.util.control.NoStackTrace object FileErrors { object LocationInvalid extends IllegalArgumentException with NoStackTrace }
chieryw/actor-platform
actor-server/actor-peer-managers/src/main/scala/im/actor/server/file/FileErrors.scala
Scala
mit
168
package uberset.basic_compiler /* Author: uberset Date: 2015-11-09 Licence: GPL v2 */ object TestAll { def main(args: Array[String]): Unit = { TestParser.main(args) TestInterpreter.main(args) backend.TestGenerator86.main(args) } }
uberset/basic-compiler
src/test/scala/uberset/basic_compiler/TestAll.scala
Scala
gpl-2.0
271
package functions /** * Represents a DBpedia function */ trait Function { /** * Executes the function */ def execute() : Any }
FnOio/dbpedia-parsing-functions-scala
src/main/scala/functions/Function.scala
Scala
gpl-2.0
146
package doobie.hi import doobie.enum.holdability._ import doobie.enum.resultsettype._ import doobie.enum.resultsetconcurrency._ import doobie.enum.transactionisolation._ import doobie.enum.autogeneratedkeys.AutoGeneratedKeys import doobie.enum.jdbctype.JdbcType import doobie.syntax.catchable.ToDoobieCatchableOps._ im...
rperry/doobie
core/src/main/scala/doobie/hi/connection.scala
Scala
mit
10,335
/* * 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/data
jdbc/src/main/scala/org/beangle/data/jdbc/ds/DataSourceFactory.scala
Scala
lgpl-3.0
4,144
package com.sretsnom.mangareader.client import org.specs2.mutable.Specification class ClientSpec extends Specification { }
sretsnom/mangareader
clientMR/src/test/scala/com/sretsnom/mangareader/client/ClientSpec.scala
Scala
gpl-3.0
124
/* * 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/main/scala/org/apache/flink/table/sources/wmstrategies/BoundedOutOfOrderTimestamps.scala
Scala
apache-2.0
1,565
/* * Copyright 2007-2011 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...
sortable/framework
persistence/record/src/main/scala/net/liftweb/record/field/TimeZoneField.scala
Scala
apache-2.0
2,185
package io.getquill import com.twitter.util.{ Await, Future, Local } import com.twitter.finagle.postgres._ import com.typesafe.config.Config import io.getquill.ReturnAction.{ ReturnColumns, ReturnNothing, ReturnRecord } import io.getquill.context.finagle.postgres._ import io.getquill.context.sql.SqlContext import io.g...
getquill/quill
quill-finagle-postgres/src/main/scala/io/getquill/FinaglePostgresContext.scala
Scala
apache-2.0
5,620
package com.dekayd.pyramidcode.utils import com.dekayd.pyramidcode.coordinates.DegreesMinutesSeconds import scala.math.BigDecimal.RoundingMode._ import com.dekayd.pyramidcode.coordinates.Degrees import com.dekayd.pyramidcode.coordinates.DecimalDegrees import com.typesafe.scalalogging.slf4j.LazyLogging /** * @author...
bluestix/pyramidcode
pyramid-code/pyramid-code-services/src/main/scala/com/dekayd/pyramidcode/utils/CoordinateUtils.scala
Scala
gpl-2.0
2,356
package info.glennengstrand.io import scredis._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.{Future, Await} import scala.concurrent.duration._ import scala.util.{Try, Failure, Success} /** helper function for connecting to redis */ object RedisService { def connect: Redis = { ...
Krasnyanskiy/clojure-news-feed
server/feed2/src/main/scala/info/glennengstrand/io/Redis.scala
Scala
epl-1.0
1,902
/* * 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 ...
vinodkc/spark
core/src/test/scala/org/apache/spark/deploy/history/FsHistoryProviderSuite.scala
Scala
apache-2.0
66,762
/* * Copyright (c) 2013-2017 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.a...
sspinc/snowplow
3-enrich/stream-enrich/src/test/scala/com.snowplowanalytics.snowplow.enrich.stream/bad/InvalidEnrichedEventSpec.scala
Scala
apache-2.0
1,939
package org.epl_lang.bytecode.util /** * TypeOperation * * A representation of a operation performed on a type to form a compound type. * * Two forms of binary type operations exist: union and intersection. * * Intersection allow for defining an algebraic type in which the two types involved in the opera...
epl-lang/epl-compiler
src/main/scala/org/epl_lang/bytecode/util/TypeOperation.scala
Scala
apache-2.0
1,012
package coursera import scala.concurrent.{Promise, ExecutionContext, Future} import scala.async.Async._ import scala.util.{Success, Failure, Try} import coursera.extensions._ package object combinators { def retryI[T](n: Int)(block: =>Future[T]): Future[T] = { if (n == 0) { Future.failed(new Exception("S...
mitochon/hexercise
src/mooc/reactive/week4.codesamples/src/test/scala/coursera/combinators/Combinators.scala
Scala
mit
3,184
package gitbucket.core.service import gitbucket.core.model.Label import gitbucket.core.model.Profile._ import profile.simple._ trait LabelsService { def getLabels(owner: String, repository: String)(implicit s: Session): List[Label] = Labels.filter(_.byRepository(owner, repository)).sortBy(_.labelName asc).list...
marklacroix/gitbucket
src/main/scala/gitbucket/core/service/LabelsService.scala
Scala
apache-2.0
1,515
/*********************************************************************** * 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-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/data/VisibilitiesTest.scala
Scala
apache-2.0
4,423
object Test extends dotty.runtime.LegacyApp { import collection.mutable.ListBuffer def newLB = ListBuffer('a, 'b, 'c, 'd, 'e) def iiobe[A](f: => A) = try { f } catch { case ex: IndexOutOfBoundsException => println(ex) } val lb0 = newLB iiobe( lb0.insert(-1, 'x) ) val lb1 = newLB iiobe( lb1.ins...
folone/dotty
tests/run/t6632.scala
Scala
bsd-3-clause
483
/* * Copyright 2015 - 2016 Red Bull Media House GmbH <http://www.redbullmediahouse.com> - 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...
RBMHTechnology/eventuate
eventuate-core/src/multi-jvm/scala/com/rbmhtechnology/eventuate/EventuateMultiNodeSpec.scala
Scala
apache-2.0
3,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 ...
lhaiesp/samza
samza-test/src/test/scala/org/apache/samza/test/integration/StreamTaskTestUtil.scala
Scala
apache-2.0
14,058
package com.bryghts import scala.runtime.IntegralProxy import java.lang.{Long => JavaLong} import scala.runtime.FractionalProxy import scala.runtime.RangedProxy import scala.runtime.ScalaNumberProxy import scala.collection.immutable.NumericRange import scala.collection.immutable.Range import scala.collection.generic....
marcesquerra/KissNumber
src/main/scala/com/bryghts/kissnumber/package.scala
Scala
mit
4,492
import org.scalatest.{Matchers, FunSuite} /** @version 1.3.0 */ class MatchingBracketsTest extends FunSuite with Matchers { test("paired square brackets") { MatchingBrackets.isPaired("[]") should be(true) } test("empty string") { pending MatchingBrackets.isPaired("") should be(true) } test("un...
exercism/xscala
exercises/practice/matching-brackets/src/test/scala/MatchingBracketsTest.scala
Scala
mit
1,843
package com.mycompany.scalcium.tagger import scala.Array.fallbackCanBuildFrom class MapMatrix { var initVector = new MapVector(Map()) var size = 0 def addVector(vector: MapVector): Unit = { initVector = initVector.add(vector) size = size + 1 } def centroid(): MapVector = { initVector.divi...
sujitpal/scalcium
src/main/scala/com/mycompany/scalcium/tagger/MapMatrix.scala
Scala
apache-2.0
2,106
package scala.tasty.interpreter package jvm import scala.tasty.interpreter.jvm.JVMReflection import scala.tasty.Reflection class Interpreter[R <: Reflection & Singleton](reflect0: R) extends TreeInterpreter[R](reflect0) { import reflect.{_, given _} // All references are represented by themselves and values are ...
som-snytt/dotty
tests/run-custom-args/tasty-interpreter/interpreter/jvm/Interpreter.scala
Scala
apache-2.0
7,332
package com.ometer.mongo import com.ometer.ClassAnalysis import com.ometer.bson.BsonAST._ import com.mongodb.WriteResult /** * A Sync DAO parameterized to support returning case class entities. */ abstract trait CaseClassSyncDAO[OuterQueryType, EntityType <: Product, IdType] extends SyncDAO[OuterQueryType, Enti...
havocp/mongo-scala-thingy
src/main/scala/com/ometer/mongo/CaseClassDAO.scala
Scala
apache-2.0
2,157
package demy.mllib import org.apache.spark.sql.types._ import org.apache.spark.sql.catalyst.expressions.GenericRowWithSchema import demy.mllib.util.log._ case class ModelVersion(steps:Seq[ModelStep]=Seq[ModelStep](), comment:String="", customLogs:GenericRowWithSchema=new GenericRowWithSchema(values= Array[Any](), sch...
forchard-epi/demy
mllib/src/main/scala/ModelVersion.scala
Scala
bsd-3-clause
5,553
/*********************************************************************** * Copyright (c) 2013-2016 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 is ...
spandanagrawal/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/iterators/Z3DensityIterator.scala
Scala
apache-2.0
3,586
/** * Copyright: Copyright (C) 2016, ATS Advanced Telematic Systems GmbH * License: MPL-2.0 */ package org.genivi.sota.resolver.components import eu.timepit.refined.api.Refined import eu.timepit.refined.string.Regex import org.genivi.sota.data.Namespace import org.genivi.sota.db.Operators._ import org.genivi.sota.r...
PDXostc/rvi_sota_server
external-resolver/src/main/scala/org/genivi/sota/resolver/components/ComponentRepository.scala
Scala
mpl-2.0
2,702
package com.sksamuel.elastic4s.analyzers import org.scalatest.{Matchers, WordSpec} class EdgeNGramTokenFilterTest extends WordSpec with TokenFilterApi with Matchers { "EdgeNGramTokenFilter builder" should { "not set any defaults" in { edgeNGramTokenFilter("testy").json.string shouldBe """{"type":"edgeNGr...
Tecsisa/elastic4s
elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/analyzers/EdgeNGramTokenFilterTest.scala
Scala
apache-2.0
714
package org.elastic.elasticsearch.scala.driver.common import org.elastic.elasticsearch.scala.driver.common.DataModelSearch.MultiSearchOps import utest._ import org.elastic.rest.scala.driver.RestBase._ import org.elastic.rest.scala.driver.utils.NoJsonHelpers object ApiModelSearchTests extends TestSuite { v...
Alex-At-Home/elasticsearch_scala_driver
elasticsearch_scala_core/shared/src/test/scala/org/elastic/elasticsearch/scala/driver/common/ApiModelSearchTests.scala
Scala
apache-2.0
39,817
package im.actor.server import java.net.InetAddress import akka.actor._ import akka.testkit._ import com.typesafe.config._ import im.actor.server.commons.ActorConfig import org.scalatest._ import org.scalatest.concurrent.ScalaFutures object ActorSpecification { private[this] def defaultSystemName = "actor-server-t...
lstNull/actor-platform
actor-server/actor-tests/src/test/scala/im/actor/server/ActorSpecification.scala
Scala
mit
1,624
package com.dominikgruber.fpinscala.chapter03 import org.scalatest._ class Exercise16Spec extends FlatSpec with Matchers { "add1" should "return Nil for an empty list" in { List.add1(Nil) should be (Nil) } it should "return List(2, 3, 4, 5, 6) for List(1, 2, 3, 4, 5)" in { List.add1(List(1, 2, 3, 4, 5...
TheDom/functional-programming-in-scala
src/test/scala/com/dominikgruber/fpinscala/chapter03/Exercise16Spec.scala
Scala
mit
360
package rere.ql.values import rere.ql.options.Options import rere.ql.ql2.Term.TermType import rere.ql.rasterization.{recursive, trampolined} import rere.ql.types.{ReqlDatum, ReqlObject} class ReqlMakeObjFromPairsListQuery(pairs: List[(String, ReqlDatum)]) extends ReqlObject { def command = TermType.MAKE_OBJ def s...
pbaun/rere
modules/ql/src/main/scala/rere/ql/values/ReqlMakeObjFromPairsListQuery.scala
Scala
apache-2.0
625
/* * Copyright (c) 2014-2016 * nonblocking.at gmbh [http://www.nonblocking.at] * * This file is part of Cliwix. * * Cliwix is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the...
nonblocking/cliwix
cliwix-core-handlers-6-1/src/main/scala/at/nonblocking/cliwix/core/liferay61/handler/SiteRoleAssignmentHandler.scala
Scala
agpl-3.0
9,041
/* * 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 u...
nilbody/sparkling-water
core/src/test/scala/water/api/DataFramesHandlerSuite.scala
Scala
apache-2.0
7,652
package doobie.hi import doobie.enum.holdability.Holdability import doobie.enum.transactionisolation.TransactionIsolation import doobie.enum.fetchdirection.FetchDirection import doobie.enum.resultsetconcurrency.ResultSetConcurrency import doobie.enum.resultsettype.ResultSetType import doobie.syntax.catchable.ToDoobie...
wedens/doobie
core/src/main/scala/doobie/hi/statement.scala
Scala
mit
4,156
package pl.touk.nussknacker.engine.avro import cats.data.Validated.{Invalid, Valid} import org.apache.avro.Schema import org.scalatest.{Assertion, FunSuite, Matchers} import pl.touk.nussknacker.engine.graph.expression.Expression class AvroDefaultExpressionDeterminerTest extends FunSuite with Matchers { import pl.to...
TouK/nussknacker
utils/avro-components-utils/src/test/scala/pl/touk/nussknacker/engine/avro/AvroDefaultExpressionDeterminerTest.scala
Scala
apache-2.0
4,860
/** * 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...
KevinLiLu/kafka
core/src/main/scala/kafka/server/ReplicaManager.scala
Scala
apache-2.0
81,391
package pureconfig import scala.language.higherKinds import com.typesafe.config.ConfigFactory import pureconfig.module.magnolia.auto.reader._ import pureconfig.module.magnolia.auto.writer._ class CoproductConvertersSuite2_12 extends BaseSuite { behavior of "ConfigConvert" it should "read disambiguation inform...
pureconfig/pureconfig
modules/magnolia/src/test/scala-2.12+/pureconfig/CoproductConvertersSuite2_12.scala
Scala
mpl-2.0
702
package com.juliasoft.service.pdf import io.finch.HttpResponse import io.finch.route._ import io.finch.request._ import io.finch.request.items.ParamItem import io.finch.response.{NotFound, BadRequest} object Handlers { val handleRequestReaderErrors: PartialFunction[Throwable, HttpResponse] = { case NotPresent(P...
TheDIM47/pdf-merge-service
src/main/scala/com/juliasoft/service/pdf/Handlers.scala
Scala
apache-2.0
1,177
package jumpmicro.shared.util.akkaosgi import language.existentials import java.net.URL import java.util.Enumeration import org.log4s._ import org.osgi.framework.{Bundle, BundleContext} import scala.util.Try import org.osgi.framework.wiring.{BundleRevision, BundleWire, BundleWiring} import scala.collection.JavaConvert...
PhilAndrew/JumpMicro
JMShared/src/main/scala/jumpmicro/shared/util/akkaosgi/MyBundleDelegatingClassLoader.scala
Scala
mit
4,661
/** * Swaggy Jenkins * Jenkins API clients generated from Swagger / Open API specification * * The version of the OpenAPI document: 1.1.2-pre.0 * Contact: blah@cliffano.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not ed...
cliffano/swaggy-jenkins
clients/scala-akka/generated/src/main/scala/org/openapitools/client/model/Pipeline.scala
Scala
mit
782
package ru.arkoit.cableguy.annotations import scala.annotation.StaticAnnotation trait ServiceTag extends StaticAnnotation final class serviceNoTag extends ServiceTag
akozhemiakin/cableguy
core/src/main/scala/ru/arkoit/cableguy/annotations/ServiceTag.scala
Scala
apache-2.0
169
package com.github.tminglei.slickpg import java.util.concurrent.Executors import org.json4s._ import org.scalatest.FunSuite import slick.jdbc.GetResult import scala.concurrent.{ExecutionContext, Await} import scala.concurrent.duration._ class PgJson4sSupportSuite extends FunSuite { implicit val testExecContext = ...
frosforever/slick-pg
addons/json4s/src/test/scala/com/github/tminglei/slickpg/PgJson4sSupportSuite.scala
Scala
bsd-2-clause
7,000
package relational import scala.collection.mutable.{Map, SynchronizedMap, HashMap} class Adapter(d: Symbol) { val DEFAULT_DRIVER = 'all private var driver = d def this() = this('all) def configure(driver: Symbol = DEFAULT_DRIVER) { this.driver = driver } def currentDriver = driver } object Adapter...
mauricioszabo/relational-scala
src/main/scala/relational/Adapter.scala
Scala
artistic-2.0
371
package com.example import akka.actor.{Actor, ActorContext, ActorLogging, ActorRef, Props} import java.io._ import akka.serialization._ import java.nio.ByteBuffer import Disruptor._ trait JournalerDB { val serialization: Serialization def writeData(seqNr: Long, data: AnyRef): Unit def writeSeqData(seqNr: Long...
enpassant/disruptor
src/main/scala/com/example/Journaler.scala
Scala
apache-2.0
469
package org.talkingpuffin.util import java.awt.event.MouseAdapter import java.awt.event.MouseEvent import javax.swing.JPopupMenu import javax.swing.JTable class PopupListener(table: JTable, popup: JPopupMenu) extends MouseAdapter { override def mousePressed(e: MouseEvent) = maybeShowPopup(e) override def mouseR...
dcbriccetti/talking-puffin
desktop/src/main/scala/org/talkingpuffin/ui/util/PopupListener.scala
Scala
mit
740
/* Copyright 2013 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
danosipov/scalding
scalding-core/src/main/scala/com/twitter/package.scala
Scala
apache-2.0
2,269
package com.neilconcepts.battlespace.routes import java.util.UUID import com.neilconcepts.battlespace.domain.Board.Point import com.neilconcepts.battlespace.domain.Messages._ import com.neilconcepts.battlespace.domain.bst.GameId import com.neilconcepts.battlespace.domain.Board import com.neilconcepts.battlespace.stor...
bneil/battlespace
src/main/scala/com/neilconcepts/battlespace/routes/GameRoutes.scala
Scala
mit
2,226
package uk.co.seansaville.ninetyninescalaprobs.lists import uk.co.seansaville.ninetyninescalaprobs.UnitSpec class Problem25Spec extends UnitSpec { "randomPermute" should "generate a random permutation of the elements of a list" in { for (_ <- 1 to 100) { val list = Problem24.lotto(100, 1000) assert...
seansaville/99scalaprobs
src/test/scala/uk/co/seansaville/ninetyninescalaprobs/lists/Problem25Spec.scala
Scala
mit
441
package com.sksamuel.elastic4s.mappings import com.sksamuel.elastic4s.{Executable, IndexType, ProxyClients} import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse import org.elasticsearch.action.admin.indices.mapping.put.{PutMappingAction, PutMappingRequest, PutMappingRequestBuilder, PutMappingR...
beni55/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/mappings/MappingDsl.scala
Scala
apache-2.0
1,825
package com.wavesplatform.network import java.net.{InetAddress, SocketAddress} import io.netty.channel.ChannelHandlerContext import io.netty.channel.embedded.EmbeddedChannel import io.netty.channel.socket.SocketChannel sealed trait PeerKey case object PeerKey { case class InetPeerKey(host: InetAddress, nonce: Long...
wavesplatform/Waves
node/src/main/scala/com/wavesplatform/network/PeerKey.scala
Scala
mit
844
/* * 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...
alessandrolulli/reforest
src/main/scala/reforest/rf/slc/SLCExecutor.scala
Scala
apache-2.0
15,304
package org.kududb.spark.demo.basic import org.kududb.client.KuduClient /** * Created by ted.malaska on 9/3/15. */ object ScanTable { def main(args:Array[String]): Unit = { if (args.length == 0) { println("<kuduMaster> <tableName> <limit>") return } val kuduMaster = args(0) val tableNa...
pwpearson/SparkOnKudu
src/main/scala/org/kududb/spark/demo/basic/ScanTable.scala
Scala
apache-2.0
827
/* * Copyright 2014 Databricks * * 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...
capitalone/Hydrograph
hydrograph.engine/hydrograph.engine.spark/src/main/scala/hydrograph/engine/spark/datasource/xml/XmlInputFormat.scala
Scala
apache-2.0
8,091
package org.broadinstitute.clio.client.commands import java.net.URI import java.time.OffsetDateTime import java.util.UUID import better.files.File import caseapp.core.Error import caseapp.core.argparser.{ArgParser, SimpleArgParser} import cats.syntax.either._ import enumeratum.{Enum, EnumEntry} import scala.reflect....
broadinstitute/clio
clio-client/src/main/scala/org/broadinstitute/clio/client/commands/ClioParsers.scala
Scala
bsd-3-clause
2,106
package wsbench import sbt._,Keys._ object Build extends Build { override lazy val settings = super.settings ++ Seq( name := "wsbench-akka-http", organization := "com.github.wsbench", version := "0.0.1-SNAPSHOT", scalaVersion := "2.11.8", scalacOptions ++= Seq( "-feature", "-unchecke...
wsbench/wsbench
apps/akka-http/project/build.scala
Scala
mit
666
package test.generators import org.scalatest.Spec import org.scalatest.matchers.ShouldMatchers import vog.generators.MonoImage import java.awt.Color import java.awt.image.BufferedImage /** * @author Ivyl */ class MonoImageSpec extends Spec with ShouldMatchers { describe("MonoImage") { it("should generate buf...
ivyl/vog-engine
test/generators/MonoImageSpec.scala
Scala
mit
760
/* Copyright (C) 2008-2016 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
strubell/factorie
src/main/scala/cc/factorie/app/nlp/hcoref/CorefModel.scala
Scala
apache-2.0
2,503
object Sample { def main(args: Array[String]) { val x = 1 def foo(y: Int) { def foo(y: Int) { class A { def foo() { class B { def foo() { def goo(y: Int) { "stop here" x } goo(...
consulo/consulo-scala
testdata/debugger/ScalaLocalVariablesEvaluation/locMethLocMethLocClassLocMeth/src/Sample.scala
Scala
apache-2.0
470
package com.github.skozlov.turing.math00 import org.scalatest.{Matchers, FlatSpec} import com.github.skozlov.turing.build.Dsl._ class SumTest extends FlatSpec with Matchers { "Sum" should "be 0 for 0 and 0" in { val tape = "000".finiteTape tape(Sum) tape.caretIndex shouldBe 0 tape.cells shouldBe cellStatesFr...
skozlov/turing
math00/src/test/scala/com/github/skozlov/turing/math00/SumTest.scala
Scala
apache-2.0
660
package im.actor.server.bot.services import akka.actor.ActorSystem import akka.util.Timeout import im.actor.bots.BotMessages import im.actor.concurrent.FutureResult import im.actor.config.ActorConfig import im.actor.server.bot.{ BotExtension, BotServiceBase } private[bot] final class WebHooksBotService(system: ActorS...
EaglesoftZJ/actor-platform
actor-server/actor-bots/src/main/scala/im/actor/server/bot/services/WebHooksBotService.scala
Scala
agpl-3.0
1,455
/* * Copyright 2012 Tumblr 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...
dsyer/zipkin
zipkin-redis/src/test/scala/com/twitter/zipkin/storage/redis/RedisSortedSetMapSpec.scala
Scala
apache-2.0
2,970
package org.http4s.metrics.prometheus import cats.effect.IO import io.prometheus.client.CollectorRegistry import org.http4s.{Http4sSpec, HttpRoutes, Request, Status} import org.http4s.dsl.io._ import org.http4s.metrics.prometheus.util._ import org.http4s.server.middleware.Metrics import org.http4s.Method.GET import or...
aeons/http4s
prometheus-metrics/src/test/scala/org/http4s/metrics/prometheus/PrometheusServerMetricsSpec.scala
Scala
apache-2.0
8,169
/* * -β•₯⌐⌐⌐⌐ -⌐⌐⌐⌐- * β‰‘β•’β–‘β–‘β–‘β–‘βŒ\\β–‘β–‘β–‘Ο† β•“β•β–‘β–‘β–‘β–‘βŒβ–‘β–‘β–‘β–‘β•ͺβ•• * ╣╬░░` `β–‘β–‘β–‘β•’β”˜ Ο†β–’β•£β•¬β•β•œ β–‘β–‘β•’β•£Q * β•‘β•£β•¬β–‘βŒ ` β•€β–’β–’β–’Γ…` ║╒╬╣ * β•šβ•£β•¬β–‘βŒ β•”β–’β–’β–’β–’`Β«β•• β•’β•’β•£β–’ * ╫╬░░╖ .β–‘ ╙╨╨ ╣╣╬░φ β•“Ο†β–‘β•’β•’Γ… * β•™β•’β–‘β–‘β–‘β–‘βŒ"β–‘β–‘β–‘β•œ β•™Γ…β–‘β–‘β–‘β–‘βŒβ–‘β–‘β–‘β–‘β•` * ``˚¬ ⌐ ˚˚⌐´ * * ...
Flipkart/connekt
commons/src/main/scala/com/flipkart/connekt/commons/services/WindowsOAuthService.scala
Scala
mit
4,789