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 ...
lhaiesp/samza
samza-yarn/src/main/scala/org/apache/samza/job/yarn/SamzaAppMasterMetrics.scala
Scala
apache-2.0
2,669
/* * Copyright (c) 2014, Brook 'redattack34' Heisler * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, t...
Redattack34/ModularRayguns
src/main/scala/com/castlebravostudios/rayguns/items/misc/Tier3Diode.scala
Scala
bsd-3-clause
2,083
package com.yuzhouwan.hacker.singleton /** * Copyright @ 2019 yuzhouwan.com * All right reserved. * Function:Singleton Object * * @author Benedict Jin * @since 2018/6/22 */ class SingletonObj private(db: String) { override def toString: String = db } object SingletonObj { private val dbs: Map[Strin...
asdf2014/yuzhouwan
yuzhouwan-hacker/src/main/scala/com/yuzhouwan/hacker/singleton/SingletonObj.scala
Scala
apache-2.0
568
/*********************************************************************** * 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 ...
nagavallia/geomesa
geomesa-kafka/geomesa-kafka-datastore/geomesa-kafka-08-datastore/src/test/scala/org/locationtech/geomesa/kafka08/KafkaDataStoreSchemaManagerTest.scala
Scala
apache-2.0
13,940
package com.github.mdr.mash.functions import com.github.mdr.mash.completions.CompletionSpec import com.github.mdr.mash.evaluator.{ Arguments, EvaluationContext } import com.github.mdr.mash.inference._ import com.github.mdr.mash.runtime.MashValue abstract class MashMethod(val name: String) { def call(target: MashVa...
mdr/mash
src/main/scala/com/github/mdr/mash/functions/MashMethod.scala
Scala
mit
1,375
/* * Copyright 2017 Datamountaineer. * * 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...
datamountaineer/stream-reactor
kafka-connect-redis/src/main/scala/com/datamountaineer/streamreactor/connect/redis/sink/writer/RedisStreams.scala
Scala
apache-2.0
3,649
package dit4c.scheduler.service import akka.actor._ import akka.http.scaladsl.Http import akka.stream.scaladsl._ import akka.stream.OverflowStrategy import akka.http.scaladsl.model.ws.Message import akka.http.scaladsl.model.ws.WebSocketRequest import akka.NotUsed import akka.stream.ActorMaterializer import akka.http.s...
dit4c/dit4c
dit4c-scheduler/src/main/scala/dit4c/scheduler/service/PortalMessageBridge.scala
Scala
mit
15,842
/** * Created by Irina on 8/20/14. */ package org.scalatrain case class JourneyPlanner(trains: Set[Train]) { require(trains != null, "trains must not be null") val stations: Set[Station] = trains flatMap { _.stations } def trains(station: Station): Set[Train] = { require(station != null, "station must no...
onoprodum/myScalatrain
src/main/scala/JourneyPlanner.scala
Scala
gpl-2.0
388
/* * Copyright 2010-2011 Vilius Normantas <code@norma.lt> * * This file is part of Crossbow library. * * Crossbow 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 ...
ViliusN/Crossbow
crossbow-core/test/lt/norma/crossbow/indicators/EmaContinuousTest.scala
Scala
gpl-3.0
3,592
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author Matthew Saltz, John Miller * @version 1.3 * @date Thu Jul 25 11:28:31 EDT 2013 * @see LICENSE (MIT style license file). * * Graph Dual Simulation Using Immutable Sets */ package scalation.graphalytics import ...
NBKlepp/fda
scalation_1.3/scalation_modeling/src/main/scala/scalation/graphalytics/DualSim2.scala
Scala
mit
5,264
class X { def a = 5 } trait Y extends X { override def a = 7 } class Test extends X with Y { override def a = { 7 + super.a } def b = super[X].a def c = super[Y].a }
VladimirNik/tasty
exttests/tests/super1/Test.scala
Scala
bsd-3-clause
171
/* * Copyright (c) 2014. Webtrends (http://www.webtrends.com) * @author cuthbertm on 11/20/14 12:16 PM */ package com.webtrends.harness.component.spotifyapi import com.webtrends.harness.component.Component class SpotifyAPIManager(name:String) extends Component(name) with SpotifyAPI { /** * We add super.recei...
Crashfreak/SpotifyAPI
src/main/scala/com/webtrends/harness/component/spotifyapi/SpotifyAPIManager.scala
Scala
apache-2.0
829
package org.tinydvr.service import net.liftweb.json.Extraction.decompose import net.liftweb.json._ import org.scalatra._ import org.slf4j.LoggerFactory /** * Adds some useful functionality on top of the ScalatraServlet get and post functions */ trait JsonAPIServlet extends ScalatraServlet { val CONTENT_TYPE_JSON ...
lou-k/tinydvr
src/main/scala/org/tinydvr/service/JsonAPIServlet.scala
Scala
gpl-3.0
2,012
/* * 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 ...
andrewor14/iolap
core/src/main/scala/org/apache/spark/ui/JettyUtils.scala
Scala
apache-2.0
10,592
package com.github.gtache.lsp.contributors import com.github.gtache.lsp.contributors.psi.LSPPsiElement import com.github.gtache.lsp.editor.EditorEventManager import com.github.gtache.lsp.utils.FileUtils import com.intellij.lang.documentation.DocumentationProvider import com.intellij.openapi.diagnostic.Logger import co...
gtache/intellij-lsp
intellij-lsp/src/com/github/gtache/lsp/contributors/LSPDocumentationProvider.scala
Scala
apache-2.0
1,690
import scala.quoted.* object Macro { inline def ff: Unit = ${impl(Type.of[Int])} def impl(t: Type[Int])(using Quotes): Expr[Unit] = '{} }
dotty-staging/dotty
tests/pos-macros/macro-with-type/Macro_1.scala
Scala
apache-2.0
142
object Test { def f[X] = () f[List] // Checking edge cases that should not compile with kind-polymorphism trait X[A <: AnyKind, F[_ <: AnyKind]] { type B = F[A] } val i0: X[Option, Double]#B = Some(5) // error val i1: X[Option, List]#B = Some(5) // error val i2: X[Option[Double], List]#B = Some(5) ...
som-snytt/dotty
tests/neg/anykind3.scala
Scala
apache-2.0
1,949
/* * Copyright 2014 Frugal Mechanic (http://frugalmechanic.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...
frugalmechanic/fm-xml
src/test/scala/fm/xml/TestRichXMLStreamReader2.scala
Scala
apache-2.0
5,337
import org.scalameter.{Bench, Gen} object ComparisonSpec extends Bench.OfflineReport with SmallDocSpec with NestedDocSpec with MultiFieldDocSpec { override lazy val scale: Gen[Int] = Gen.range("scale")(0, 1000, 20) }
evojam/mongo-drivers-benchmarks
test/ComparisonSpec.scala
Scala
apache-2.0
222
/** * Copyright 2015, deepsense.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 applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
deeplang/src/main/scala/io/deepsense/deeplang/catalogs/doperations/exceptions/DOperationNotFoundException.scala
Scala
apache-2.0
847
/* * Copyright 2014 Commonwealth Computer Research, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
kevinwheeler/geomesa
geomesa-core/src/main/scala/org/locationtech/geomesa/core/data/AccumuloFeatureSource.scala
Scala
apache-2.0
5,708
package notification.controllers import java.util.UUID import authentication.AuthAction import com.amazonaws.services.cloudwatch.model.StandardUnit import metrics.{CloudWatchMetrics, MetricDataPoint} import models.{TopicTypes, _} import notification.models.PushResult import notification.services import notification.s...
guardian/mobile-n10n
notification/app/notification/controllers/Main.scala
Scala
apache-2.0
5,714
package gitbucket.core.servlet import java.io.File import java.sql.{DriverManager, Connection} import gitbucket.core.plugin.PluginRegistry import gitbucket.core.service.SystemSettingsService import gitbucket.core.util._ import org.apache.commons.io.FileUtils import javax.servlet.{ServletContextListener, ServletContext...
lefou/gitbucket
src/main/scala/gitbucket/core/servlet/AutoUpdate.scala
Scala
apache-2.0
6,711
/* * Copyright 2013 Maurício Linhares * * Maurício Linhares licenses this file to you 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 ...
ilangostl/postgresql-async
mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/message/client/PreparedStatementMessage.scala
Scala
apache-2.0
832
package com.cloudray.scalapress.plugin.compatibility import org.scalatest.{OneInstancePerTest, FunSuite} import org.scalatest.mock.MockitoSugar import com.cloudray.scalapress.item.{Item, ItemDao} import com.cloudray.scalapress.folder.{Folder, FolderDao} import org.mockito.Mockito import com.cloudray.scalapress.framewo...
vidyacraghav/scalapress
src/test/scala/com/cloudray/scalapress/plugin/compatibility/ECRedirectControllerTest.scala
Scala
apache-2.0
1,417
package mesosphere.marathon.core.appinfo import mesosphere.marathon.state.AppDefinition trait AppSelector { def matches(app: AppDefinition): Boolean } object AppSelector { def apply(matchesFunc: AppDefinition => Boolean): AppSelector = new AppSelector { override def matches(app: AppDefinition): Boolean = mat...
ss75710541/marathon
src/main/scala/mesosphere/marathon/core/appinfo/AppSelector.scala
Scala
apache-2.0
692
import java.io._ import java.util.zip._ class C { def isWrapper(is: FileInputStream): InputStream = { val pb = new PushbackInputStream(is, 2) val signature = new Array[Byte](2) pb.read(signature) pb.unread(signature) if (signature.sameElements(Array(0x1F, 0x8B))) { new GZIPInputStream(new ...
shimib/scala
test/files/neg/t9636.scala
Scala
bsd-3-clause
379
/* * Copyright (c) 2011, Daniel Spiewak * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of cond...
djspiewak/anti-xml
src/test/scala/com/codecommit/antixml/XMLSpecs.scala
Scala
bsd-3-clause
4,084
package io.github.dmitrib.elasticsearch.cli import com.beust.jcommander.{Parameter, Parameters} import java.util import org.elasticsearch.index.query.{QueryBuilder, FilterBuilders, QueryBuilders} import org.elasticsearch.action.search.SearchType import org.elasticsearch.common.unit.TimeValue import java.util.concurren...
gmoskovicz/elasticsearch-cli
src/main/scala/io/github/dmitrib/elasticsearch/cli/ScanCommand.scala
Scala
apache-2.0
3,984
/** * 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/main/scala/kafka/server/RequestPurgatory.scala
Scala
apache-2.0
9,141
/* * Copyright 2016 Lightcopy * * 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...
lightcopy/parquet-index
src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaUtils.scala
Scala
apache-2.0
4,719
package mesosphere.marathon import org.rogach.scallop.ScallopConf import java.net.InetSocketAddress import mesosphere.util.BackToTheFuture import scala.concurrent.duration._ trait ZookeeperConf extends ScallopConf { private val userAndPass = """[^/@]+""" private val hostAndPort = """[A-z0-9-.]+(?::\\d+)?""" pr...
14Zen/marathon
src/main/scala/mesosphere/marathon/ZookeeperConf.scala
Scala
apache-2.0
2,388
package pl.touk.nussknacker.engine.requestresponse.deployment import java.io.{File, PrintWriter} import java.nio.charset.StandardCharsets import pl.touk.nussknacker.engine.api.process.ProcessName import io.circe.syntax._ import pl.touk.nussknacker.engine.api.CirceUtil import pl.touk.nussknacker.engine.util.Implicits.S...
TouK/nussknacker
engine/lite/request-response/runtime/src/main/scala/pl/touk/nussknacker/engine/requestresponse/deployment/ProcessRepository.scala
Scala
apache-2.0
2,170
/* * (C) Copyright 2015 Atomic BITS (http://atomicbits.io). * * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Affero General Public License * (AGPL) version 3.0 which accompanies this distribution, and is available in * the LICENSE file or at http...
rcavalcanti/scraml
modules/scraml-parser/src/main/scala/io/atomicbits/scraml/parser/model/Parameter.scala
Scala
agpl-3.0
1,727
/* 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...
avp1984/scalding
scalding-core/src/main/scala/com/twitter/scalding/typed/TypedPipe.scala
Scala
apache-2.0
44,218
/* sbt -- Simple Build Tool * Copyright 2008, 2009, 2010 Mark Harrah */ package sbt import java.io.{ File, Writer } import inc.Relations object DotGraph { private def fToString(roots: Iterable[File]): (File => String) = (x: File) => sourceToString(roots, x) def sources(relations: Relations, outputDirectory...
niktrop/sbt
main/actions/src/main/scala/sbt/DotGraph.scala
Scala
bsd-3-clause
2,691
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this f...
mandar2812/DynaML
dynaml-core/src/main/scala/io/github/tailhq/dynaml/models/lm/GeneralizedLinearModel.scala
Scala
apache-2.0
5,178
package squants.experimental.unitgroups.si.strict import org.scalatest.{FlatSpec, Matchers} import squants.energy.Energy import squants.mass.Mass import squants.space.Length import squants.experimental.unitgroups.ImplicitDimensions.space._ import squants.experimental.unitgroups.ImplicitDimensions.energy._ import squan...
underscorenico/squants
shared/src/test/scala/squants/experimental/unitgroups/si/strict/StrictSiSpec.scala
Scala
apache-2.0
850
/* * Copyright 2011-2014 Chris de Vreeze * * 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...
EBPI/yaidom
src/test/scala/nl/ebpi/yaidom/queryapitests/AbstractXmlBaseTest.scala
Scala
apache-2.0
6,505
package com.twitter.finagle.client import com.twitter.conversions.time._ import com.twitter.finagle.pool.{WatermarkPool, CachingPool, BufferingPool} import com.twitter.finagle.stats.StatsReceiver import com.twitter.finagle.util.DefaultTimer import com.twitter.util.{Timer, Duration} /** * Create a watermark pool back...
firebase/finagle
finagle-core/src/main/scala/com/twitter/finagle/client/DefaultPool.scala
Scala
apache-2.0
1,771
package uk.org.openeyes.jsonschema.core import java.net.URI import org.json4s._ import java.io.{File,FileReader,Reader} class SchemaLoader(parse: (JsonInput, Boolean) => JValue) { def loadFromDir(path: String): Map[String, JValue] = { val root = new File(path) if (!root.isDirectory) throw new IllegalArgumen...
openeyes/oe-json-schema
core/src/main/scala/SchemaLoader.scala
Scala
gpl-3.0
933
package org.repwatch.models class PhoneNumber()
csunwold/repwatch
domain/src/main/scala/org/repwatch/models/PhoneNumber.scala
Scala
gpl-3.0
49
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.2 * @date Mon Sep 21 15:05:06 EDT 2009 * @see LICENSE (MIT style license file). */ package scalation.animation import scala.collection.mutable.{HashSet, ListBuffer} import scala.math.a...
NBKlepp/fda
scalation_1.2/src/main/scala/scalation/animation/Dgraph.scala
Scala
mit
20,104
package test6 trait A { object Foo extends Module[Foo[_]] class Foo[TResult] def b = new B }
twitter-forks/sbt
sbt/src/sbt-test/compiler-project/inc-pickled-existential/src/main/scala/A.scala
Scala
bsd-3-clause
102
/* * 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 ...
tophua/spark1.52
sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
Scala
apache-2.0
42,555
package sigmastate.utxo import sigmastate.serialization.ValueSerializer.getSerializer import sigmastate.serialization.OpCodes.OpCode import scalan.util.Extensions.ByteOps import sigmastate.SMethod import sigmastate.serialization.OpCodes import scala.collection.mutable object ComplexityTableStat { // NOTE: this cla...
ScorexFoundation/sigmastate-interpreter
sigmastate/src/main/scala/sigmastate/utxo/ComplexityTableStat.scala
Scala
mit
2,956
/* * 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
mllib/src/test/scala/org/apache/spark/mllib/util/TestingUtilsSuite.scala
Scala
apache-2.0
22,688
package org.jetbrains.plugins.scala.lang.types.existentialSimplification package generated class ExistentialSimplificationFirstRuleTest extends ExistentialSimplificationTestBase { //This class was generated by build script, please don't change this override def folderPath: String = super.folderPath + "firstRule/" ...
triggerNZ/intellij-scala
test/org/jetbrains/plugins/scala/lang/types/existentialSimplification/generated/ExistentialSimplificationFirstRuleTest.scala
Scala
apache-2.0
351
package js.util /** * State is a data structure that holds a function that returns a result of * type R with an input-output state of type S. * * Aside: This is also known as the state monad. */ sealed class State[S,+R](run: S => (S,R)) { def apply(s: S) = run(s) def map[P](f: R => P): State[S,P] = ...
mpgarate/ProgLang-Assignments
HW5/src/main/scala/js/util/State.scala
Scala
mit
807
package backend import logging.{CorrelatedLogging, CorrelatedWS, CorrelationContext} import models.billing.CreateOrder import play.api.libs.concurrent.Execution.Implicits._ import play.api.libs.json.Json import scaldi.{Injectable, Injector} class BillingBackend(implicit inj: Injector) extends Injectable with Correlat...
leanovate/microzon-web
app/backend/BillingBackend.scala
Scala
mit
1,055
package com.sksamuel.scapegoat.inspections import com.sksamuel.scapegoat.{Inspection, InspectionContext, Inspector, Levels} /** * @author Stephen Samuel */ class PublicFinalizer extends Inspection( text = "PublicFinalizer", defaultLevel = Levels.Info, description = "Checks for overridden final...
sksamuel/scalac-scapegoat-plugin
src/main/scala/com/sksamuel/scapegoat/inspections/PublicFinalizer.scala
Scala
apache-2.0
1,008
/** * 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...
ErikKringen/kafka
core/src/main/scala/kafka/server/epoch/LeaderEpochFileCache.scala
Scala
apache-2.0
7,523
/* * 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 ...
Panos-Bletsos/spark-cost-model-optimizer
core/src/main/scala/org/apache/spark/api/python/PythonUtils.scala
Scala
apache-2.0
2,565
package io.transwarp.midas.utils import java.sql.Connection import java.util object TablePropertiesUtils extends ITablePropertiesUtils { override def getMetaValue(values: String): Map[String, String] = null override def getMeta(connection: Connection, database: String, ...
transwarpio/rapidminer
transwarp-midas-api/src/main/scala/io/transwarp/midas/utils/TablePropertiesUtils.scala
Scala
gpl-3.0
776
/** * SparklineData, Inc. -- http://www.sparklinedata.com/ * * Scala based Audience Behavior APIs * * Copyright 2014-2015 SparklineData, 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 Lice...
cubefyre/audience-behavior-apis
analytics/src/main/scala/org/sparklinedata/analytics/UserAnalytics.scala
Scala
apache-2.0
18,929
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ArvinDevel/onlineAggregationOnSparkV2
sql/core/src/main/scala/org/apache/spark/sql/execution/Aggregate.scala
Scala
apache-2.0
7,866
package processes.monadTransformers.scalaz import processes.PatchAssignmentSpec class PlainSpec extends PatchAssignmentSpec( "Scalaz plain monad transformers", s => new Plain(s) )
EECOLOR/scala-clean-code-patterns
src/test/scala/processes/monadTransformers/scalaz/PlainSpec.scala
Scala
mit
189
package com.getjenny.starchat.services import akka.actor.{Actor, ActorRef, Props} import com.getjenny.starchat.SCActorSystem import com.getjenny.starchat.entities.io.RefreshPolicy import com.getjenny.starchat.services.esclient.crud.EsCrudBase import com.getjenny.starchat.utils.Index import org.elasticsearch.index.quer...
GetJenny/starchat
src/main/scala/com/getjenny/starchat/services/CronDeleteInstanceService.scala
Scala
gpl-2.0
3,098
package org.imdex.tractor.internal /** * Created by a.tsukanov on 29.07.2016. */ private[tractor] final class ActorIndex(private val index: Int) extends AnyVal private[tractor] object ActorIndex { def apply(index: Int): ActorIndex = new ActorIndex(index) }
Im-dex/trActor
tractor-actor/src/main/scala/org/imdex/tractor/internal/ActorIndex.scala
Scala
mit
267
/* * Sonar Scoverage Plugin * Copyright (C) 2013 Rado Buransky * dev@sonar.codehaus.org * * 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...
RadoBuransky/sonar-scoverage-plugin
plugin/src/test/scala/com/buransky/plugins/scoverage/xml/data/XmlReportFile1.scala
Scala
lgpl-3.0
58,108
/* * Copyright 2013 Maurício Linhares * * Maurício Linhares licenses this file to you 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 ...
ilangostl/postgresql-async
mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/message/client/HandshakeResponseMessage.scala
Scala
apache-2.0
1,253
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
bravo-zhang/spark
mllib/src/test/scala/org/apache/spark/ml/feature/VectorIndexerSuite.scala
Scala
apache-2.0
14,991
/* * 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/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionStopsAfterCompaction.scala
Scala
apache-2.0
5,145
package org.clulab import java.io.{File, FileWriter} import scala.language.reflectiveCalls package object brat { type Closeable = { def close(): Unit } def using[A <: Closeable, B](param: A)(f: A => B): B = try { f(param) } finally { param.close() } def readFile(filename: String): String = using (io.S...
clulab/odin-brat
src/main/scala/org/clulab/brat/package.scala
Scala
apache-2.0
722
/* * Copyright ActionML, LLC under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * ActionML licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except...
Raj-JainHC/universal-recommender
src/main/scala/EsClient.scala
Scala
apache-2.0
14,686
object nqueens { def queens(n: Int): Set[List[Int]] = { def placeQueens(k: Int): Set[List[Int]] = if (k == 0( Set(List()) else for { queens <- placeQueens(k - 1) col <- 0 until n if isSafe(vol, queens) ...
tobal/scala-course
examples/nqueens.scala
Scala
gpl-3.0
907
package org.broadinstitute.dsde.firecloud.dataaccess import akka.actor.ActorSystem import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport import akka.http.scaladsl.model.Uri.Query import akka.http.scaladsl.model.{StatusCodes, Uri} import akka.http.scaladsl.unmarshalling.Unmarshal import akka.stream.Materiali...
broadinstitute/firecloud-orchestration
src/main/scala/org/broadinstitute/dsde/firecloud/dataaccess/HttpThurloeDAO.scala
Scala
bsd-3-clause
6,255
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
liquidarmour/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/frs105/boxes/AC66.scala
Scala
apache-2.0
1,125
/* * 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/src/main/scala/org/apache/flink/table/plan/rules/FlinkRuleSets.scala
Scala
apache-2.0
9,175
/** * Copyright 2012 Mikio Hokari * * 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 ...
pokarim/archerial
src/main/scala/com/archerial/queryexp/AbstractQueryExp.scala
Scala
apache-2.0
2,257
package sample.cluster.stats import scala.concurrent.duration._ import scala.concurrent.forkjoin.ThreadLocalRandom import akka.actor.Actor import akka.actor.ActorSystem import akka.actor.Address import akka.actor.PoisonPill import akka.actor.Props import akka.actor.RelativeActorPath import akka.actor.RootActorPath im...
kalmanb/akka-examples
src/main/scala/cluster/StatsSample.scala
Scala
apache-2.0
3,131
/* * Copyright 2016-2018 Michal Harish, michal.harish@gmail.com * * 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 u...
amient/affinity
avro/src/main/scala/io/amient/affinity/avro/record/AvroExtractors.scala
Scala
apache-2.0
7,432
package at.logic.gapt.proofs.lk import at.logic.gapt.expr._ import at.logic.gapt.expr.fol._ import at.logic.gapt.expr.fol.FOLMatchingAlgorithm import at.logic.gapt.proofs.lk.base._ import at.logic.gapt.proofs.occurrences.FormulaOccurrence import at.logic.gapt.proofs.proofs.BinaryRuleTypeA import at.logic.gapt.utils.ds...
loewenheim/gapt
src/main/scala/at/logic/gapt/proofs/lk/inductionRules.scala
Scala
gpl-3.0
6,928
package com.datastax.spark.connector.cql import java.net.{InetAddress, NetworkInterface} import java.nio.ByteBuffer import java.util.{Collection => JCollection, Iterator => JIterator} import com.datastax.driver.core._ import com.datastax.driver.core.policies.LoadBalancingPolicy import com.datastax.spark.connector.uti...
shashwat7/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/cql/LocalNodeFirstLoadBalancingPolicy.scala
Scala
apache-2.0
6,107
package com.twitter.scrooge import com.twitter.scrooge.adapt.thrift._ import com.twitter.scrooge.adapt.thrift.TestStructUnion.{First, Second} import java.nio.ByteBuffer import org.scalacheck.{Arbitrary, Gen} import org.scalacheck.Arbitrary.arbitrary package object adapt { implicit val binaryArbitrary: Arbitrary[Byt...
twitter/scrooge
scrooge-adaptive/src/test/scala/com/twitter/scrooge/adapt/package.scala
Scala
apache-2.0
4,048
package com.peterpotts.snake.mapreduce import com.peterpotts.snake.predicate.Extractor case class ValueExtractor(value: Any) extends Extractor[Any] { def apply(argument: Any) = value override def toString() = value.toString }
peterpotts/snake
src/main/scala/com/peterpotts/snake/mapreduce/ValueExtractor.scala
Scala
mit
233
/* * This software is licensed under the GNU Affero General Public License, quoted below. * * This file is a part of PowerAPI. * * Copyright (C) 2011-2014 Inria, University of Lille 1. * * PowerAPI is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public Lice...
rouvoy/powerapi
powerapi-core/src/main/scala/org/powerapi/module/libpfm/cycles/LibpfmCoreCyclesFormulaConfiguration.scala
Scala
agpl-3.0
2,267
package com.sksamuel.elastic4s.alias import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest trait AliasActionDefinition { def build: IndicesAliasesRequest.AliasActions }
ulric260/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/alias/AliasActionDefinition.scala
Scala
apache-2.0
193
package com.twitter.finagle.redis.protocol import com.twitter.finagle.util.BufReader import com.twitter.io.Buf import scala.annotation.tailrec import scala.collection.mutable.ListBuffer /** * Thread-safe, stateful, asynchronous Redis decoder. */ private[redis] final class StageDecoder(init: Stage) { private[this...
spockz/finagle
finagle-redis/src/main/scala/com/twitter/finagle/redis/protocol/StageDecoder.scala
Scala
apache-2.0
2,066
package one.lockstep.multilock.server import one.lockstep.multilock.protocol.message._ import one.lockstep.util.codec._ import one.lockstep.util.crypto._ import scodec.Codec import scodec.codecs._ case class LockState(body: LockState.Body, // the main body of the state pendingInboundRequestOpt: ...
lockstep-one/vault
monolock-server/src/main/scala/one/lockstep/multilock/server/LockState.scala
Scala
agpl-3.0
2,411
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
javadba/p2p
src/main/scala/org/openchai/web/pong/PongSolver.scala
Scala
apache-2.0
1,280
package com.arcusys.learn.liferay.services import com.arcusys.learn.liferay.LiferayClasses.{LPermissionChecker, LUser} import com.liferay.portal.kernel.security.auth.PrincipalThreadLocal import com.liferay.portal.kernel.security.permission.{PermissionCheckerFactoryUtil, PermissionThreadLocal} import com.liferay.portal...
arcusys/Valamis
learn-liferay700-services/src/main/scala/com/arcusys/learn/liferay/services/PermissionHelper.scala
Scala
gpl-3.0
1,048
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
lincoln-lil/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/GeneratedExpression.scala
Scala
apache-2.0
3,814
package org.ndc.ndc class TwoShingles { def fromTokens(tokens: Array[String]): Array[String] = { if (tokens.length <= 1) { return tokens } else { (for (position <- Range(0, tokens.length - 1)) yield tokens(position) + tokens(position + 1)).toArray } } }
NikolajLeischner/near_duplicates
src/main/scala/org/ndc/ndc/TwoShingles.scala
Scala
mit
306
/* * Copyright 2017 Spotify AB. * * 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 ...
spotify/featran
core/src/main/scala/com/spotify/featran/transformers/NHotWeightedEncoder.scala
Scala
apache-2.0
4,155
/* * Copyright (C) 2020 MapRoulette contributors (see CONTRIBUTORS.md). * Licensed under the Apache License, Version 2.0 (see LICENSE). */ package org.maproulette.framework.mixins import org.maproulette.framework.psql.filter._ import org.maproulette.framework.psql.Query import org.maproulette.framework.model.Task i...
mgcuthbert/maproulette2
app/org/maproulette/framework/mixins/LeaderboardMixin.scala
Scala
apache-2.0
3,754
package io.flow.delta.actors.functions import io.flow.delta.actors.SupervisorResult import io.flow.delta.lib.config.Defaults import io.flow.test.utils.FlowPlaySpec class SetDesiredStateSpec extends FlowPlaySpec with db.Helpers { "no-op if no tags" in { val build = upsertBuild() SetDesiredState.run(build, D...
flowcommerce/delta
api/test/actors/functions/SetDesiredStateSpec.scala
Scala
mit
1,754
/** * 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 ...
tomwhite/adam
adam-core/src/main/scala/org/bdgenomics/adam/rich/RichAlignmentRecord.scala
Scala
apache-2.0
8,509
package dotty.tools package dotc package util import scala.collection.mutable.ArrayBuffer import dotty.tools.io._ import annotation.tailrec import java.util.regex.Pattern import java.io.IOException import Chars._ import ScriptSourceFile._ import Positions._ import java.util.Optional object ScriptSourceFile { @shar...
densh/dotty
src/dotty/tools/dotc/util/SourceFile.scala
Scala
bsd-3-clause
4,636
/* * Copyright 2014–2020 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/quasar
foundation/src/test/scala/quasar/RateLimiterSpec.scala
Scala
apache-2.0
23,156
package pl.touk.nussknacker.engine.flink.test import com.typesafe.scalalogging.LazyLogging import org.apache.flink.api.common.{JobExecutionResult, JobID, JobStatus} import org.apache.flink.configuration._ import org.apache.flink.runtime.execution.ExecutionState import org.apache.flink.runtime.executiongraph.AccessExec...
TouK/nussknacker
engine/flink/test-utils/src/main/scala/pl/touk/nussknacker/engine/flink/test/MiniClusterExecutionEnvironment.scala
Scala
apache-2.0
4,581
package io.flow.build import org.scalatest.funspec.AnyFunSpec import org.scalatest.matchers.should.Matchers class ApplicationSpec extends AnyFunSpec with Matchers { it("parse valid strings") { Application.parse("flow/user") should be(Some(Application("flow", "user", "latest"))) Application.parse(" flow/us...
flowcommerce/api-build
src/test/scala/io/flow/ApplicationSpec.scala
Scala
mit
769
/** * 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...
chirino/activemq-apollo
apollo-util/src/main/scala/org/apache/activemq/apollo/util/path/PathMap.scala
Scala
apache-2.0
3,487
package com.github.frankivo import utest.{TestSuite, Tests, test} object TestTrappedRainWater extends TestSuite { val tests: Tests = Tests { test("Example1") { val result = TrappedRainWater.getAmount(Array(2, 1, 4, 1, 2, 5)) val expected = 6 assert(expected == result) } te...
frankivo/dailyprogrammer
perl79/src/test/scala/com/github/frankivo/TestTrappedRainWater.scala
Scala
gpl-3.0
483
// Project: angulate2 (https://github.com/jokade/angulate2) // Description: // Copyright (c) 2016 Johannes.Kastner <jokade@karchedon.de> // Distributed under the MIT License (see included LICENSE file) package angulate2.core import angulate2.internal.ClassDecorator import scala.annotation.StaticAnn...
jokade/angulate2
bindings/src/main/scala/angulate2/core/Output.scala
Scala
mit
422
package com.rlazoti.urlshortener.bin import com.rlazoti.urlshortener.web.services.RoutingService import com.rlazoti.urlshortener.web.filters.HandleExceptions import com.twitter.finagle.builder.Server import com.twitter.finagle.builder.ServerBuilder import com.twitter.finagle.http.Http import java.net.InetSocketAddress...
rlazoti/url-shortener
src/main/scala/com/rlazoti/urlshortener/bin/StartServer.scala
Scala
mit
614
package im.actor.server.dialog.group import akka.actor.{ ActorRef, ActorSystem, Props } import akka.contrib.pattern.{ ClusterSharding, ShardRegion } object GroupDialogRegion { private val idExtractor: ShardRegion.IdExtractor = { case c: GroupDialogCommand ⇒ (c.dialogId.groupId.toString, c) } private val sh...
dsaved/africhat-platform-0.1
actor-server/actor-core/src/main/scala/im/actor/server/dialog/group/GroupDialogRegion.scala
Scala
mit
1,019
package facebook object FacebookFixture { def miniTimeline = """ { "data": [ { "id": "644378010_10151239069468011", "from": { "name": "Olivier Clavel", "id": "547334298" }, "to": { "data": [ { "name":...
Froggies/Skimbo
test/parser/facebook/FacebookFixture.scala
Scala
agpl-3.0
59,048
package example.akkawschat import java.util.Date import akka.actor.ActorSystem import akka.http.scaladsl.model.ws.{ Message, TextMessage } import akka.http.scaladsl.server.Directives import akka.stream.scaladsl.Flow import shared.Protocol import shared.Protocol._ import upickle.default._ import scala.concurrent.dura...
yukihirai0505/tutorial-program
programming/scala/websocket/backend/src/main/scala/example/akkawschat/Webservice.scala
Scala
mit
2,217
package org.pinky.representation import java.io.{OutputStream, OutputStreamWriter} import javax.servlet.ServletContext import com.google.inject.Inject import org.fusesource.scalate.TemplateEngine import org.fusesource.scalate.support.TemplateFinder /** * HTML representation which uses Scalate to do its heavy lifting...
d5nguyenvan/pinky
src/main/scala/org/pinky/representation/HtmlRepresentationScalate.scala
Scala
bsd-3-clause
1,429