code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
package gitbucket.core.service import gitbucket.core.model.Issue import gitbucket.core.util._ import gitbucket.core.util.StringUtil import Directory._ import ControlUtil._ import org.eclipse.jgit.revwalk.RevWalk import org.eclipse.jgit.treewalk.TreeWalk import org.eclipse.jgit.lib.FileMode import org.eclipse.jgit.api....
zhoffice/gitbucket
src/main/scala/gitbucket/core/service/RepositorySearchService.scala
Scala
apache-2.0
5,303
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.runtime import ...
scala/scala
src/library/scala/runtime/LambdaDeserializer.scala
Scala
apache-2.0
5,867
package com.twitter.util.tunable import com.twitter.util.Var /** * A [[Tunable]] is an abstraction for an object that produces a Some(value) or None when applied. * Implementations may enable mutation, such that successive applications of the [[Tunable]] * produce different values. * * For more information about...
twitter/util
util-tunable/src/main/scala/com/twitter/util/tunable/Tunable.scala
Scala
apache-2.0
4,414
/** * Copyright 2011-2013 StackMob * * 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...
matthewfarwell/stackmob-customcode-dev
src/main/scala/com/stackmob/customcode/dev/server/sdk/cache/CachingServiceImpl.scala
Scala
apache-2.0
6,090
/* RetryPolicySpec.scala * * Copyright (c) 2013-2014 linkedin.com * Copyright (c) 2013-2015 zman.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/lic...
zmanio/atmos
src/test/scala/atmos/RetryPolicySpec.scala
Scala
apache-2.0
8,806
/* * Copyright 2019 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 ...
regadas/scio
scio-core/src/main/scala/com/spotify/scio/util/ScioUtil.scala
Scala
apache-2.0
3,274
/* * 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/expressions/SubExprEvaluationRuntime.scala
Scala
apache-2.0
6,195
package com.wix.fax.phaxio.model /** * @see <a href="http://www.phaxio.com/docs/api/send/sendFax/">Send a fax</a> */ case class SendResponse(success: Boolean, message: String, faxId: Option[Long] = None, data: Option[FaxInfo] = None)
wix/libfax
libfax-phaxio-core/src/main/scala/com/wix/fax/phaxio/model/SendResponse.scala
Scala
apache-2.0
316
/* * 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 ...
minixalpha/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveMetastoreCatalogSuite.scala
Scala
apache-2.0
9,175
object Test { val x = new InfixUsageWithTuple() x foo (1 + 1, 33, true) }
ilinum/intellij-scala
testdata/changeSignature/fromJava/InfixUsageWithTuple_after.scala
Scala
apache-2.0
77
package org.jetbrains.plugins.scala package lang package parser package parsing package xml.pattern import com.intellij.psi.xml.XmlTokenType import org.jetbrains.plugins.scala.lang.lexer.ScalaXmlTokenTypes import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder /** * @author Alexander Podkhalyu...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/parser/parsing/xml/pattern/EmptyElemTagP.scala
Scala
apache-2.0
1,238
package org.crudible.lift.util.decorators import net.liftweb.http.js.JsCmd import net.liftweb.http.js.JsCmds import net.liftweb.http.SHtml import org.crudible.lift.util.LabelCallback case class YesActionDecorator(labelCallback: LabelCallback)
rehei/crudible
crudible-lift/src/main/scala/org/crudible/lift/util/decorators/YesActionDecorator.scala
Scala
apache-2.0
244
package com.zobot.client.packet.definitions.serverbound.play import com.zobot.client.packet.Packet case class UseEntity(target: Int, propertyType: Int, targetX: Any, targetY: Any, targetZ: Any, hand: Any) extends Packet { override lazy val packetId = 0x0A override lazy val packetData: Array[Byte] = fromVarIn...
BecauseNoReason/zobot
src/main/scala/com/zobot/client/packet/definitions/serverbound/play/UseEntity.scala
Scala
mit
457
/* * 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 ...
dotunolafunmiloye/spark
examples/src/main/scala/org/apache/spark/examples/LogQuery.scala
Scala
apache-2.0
3,832
package fi.proweb.train.helper object HeadingConverter { def headingToString(heading: Int): String = { val directions: List[String] = List("N", "NE", "E", "SE", "S", "SW", "W", "NW", "N") directions((Math.round((22 + heading.toDouble) % 360) / 45).toInt) } }
roikonen/MissaJuna
app/fi/proweb/train/helper/HeadingConverter.scala
Scala
apache-2.0
275
package scredis.protocol import org.scalatest._ import org.scalatest.concurrent._ import akka.util.ByteString import scredis.PubSubMessage class ProtocolSpec extends WordSpec with GivenWhenThen with BeforeAndAfterAll with Matchers { private val ArrayString = "*5\\r\\n-error\\r\\n+simple\\r\\n:1000\\r\\n:...
Livestream/scredis
src/test/scala/scredis/protocol/ProtocolSpec.scala
Scala
apache-2.0
3,320
/*^ =========================================================================== TwoBinManager =========================================================================== Copyright (C) 2016-2017 Gianluca Costa =========================================================================== This program is free so...
giancosta86/TwoBinManager
src/test/scala/info/gianlucacosta/twobinmanager/db/TestDbProblemRepository.scala
Scala
gpl-3.0
5,828
package im.actor.server.user import im.actor.api.rpc.users._ import im.actor.server.models import im.actor.server.models.UserPhone import scala.language.postfixOps object UserUtils { def defaultUserContactRecords(phones: Vector[Long], emails: Vector[String]): Vector[ContactRecord] = { val phoneRecords = phones...
winiceo/actor-platform
actor-server/actor-core/src/main/scala/im/actor/server/user/UserUtils.scala
Scala
mit
1,585
package org.odfi.indesign.core.module.ui.www import org.odfi.indesign.core.harvest.HarvestedResource import com.idyria.osi.wsb.webapp.localweb.LocalWebHTMLVIew import com.idyria.osi.wsb.webapp.localweb.LocalWebHTMLVIewCompiler class IndesignUIView extends LocalWebHTMLVIew with HarvestedResource with IndesignU...
opendesignflow/indesign
indesign-wwwui/src/main/scala/org/odfi/indesign/core/module/ui/www/IndesignUIView.scala
Scala
gpl-3.0
3,442
package org.jetbrains.plugins.scala package components import javax.swing.SwingUtilities import javax.swing.event.HyperlinkEvent import com.intellij.ide.plugins._ import com.intellij.ide.plugins.cl.PluginClassLoader import com.intellij.notification._ import com.intellij.openapi.application.{Application, ApplicationMa...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/components/PluginVersionVerifier.scala
Scala
apache-2.0
6,224
package pl.project13.scala.akka.raft import akka.actor.ActorRef sealed trait ClusterConfiguration { def members: Set[ActorRef] def sequenceNumber: Long def isOlderThan(that: ClusterConfiguration) = this.sequenceNumber <= that.sequenceNumber def isNewerThan(that: ClusterConfiguration) = this.sequenceNumber ...
ktoso/akka-raft
src/main/scala/pl/project13/scala/akka/raft/ClusterConfiguration.scala
Scala
apache-2.0
3,750
package com.twitter.finagle.serverset2 import com.twitter.common.io.JsonCodec import com.twitter.common.zookeeper.ServerSets import com.twitter.conversions.time._ import com.twitter.finagle.serverset2.ServiceDiscoverer.ClientHealth import com.twitter.finagle.serverset2.ZkOp.{GetData, GetChildrenWatch, ExistsWatch} imp...
liamstewart/finagle
finagle-serversets/src/test/scala/com/twitter/finagle/serverset2/ServiceDiscovererTest.scala
Scala
apache-2.0
15,002
package com.twitter.logging import com.twitter.concurrent.{NamedPoolThreadFactory, AsyncQueue} import com.twitter.util._ import java.util.concurrent.Executors import java.util.concurrent.atomic.AtomicBoolean import java.util.{logging => javalog} object QueueingHandler { private[this] val executor = Executors.newCa...
twitter/util
util-logging/src/main/scala/com/twitter/logging/QueueingHandler.scala
Scala
apache-2.0
4,802
package shop.infrastructure import slick.driver.PostgresDriver.simple._ // import org.joda.time.DateTime // import com.github.tototoshi.slick.PostgresJodaSupport._ import shop.model._ import scala.slick.jdbc.meta.MTable class ShoppingItemSchema(tag: Tag) extends Table[(Long,String,String,Long)](tag,"shopping_item"){...
flurdy/shoppinglist
shopservice/src/main/scala/infrastructure/ShoppingItemRepository.scala
Scala
mit
1,996
/* * sbt * Copyright 2011 - 2018, Lightbend, Inc. * Copyright 2008 - 2010, Mark Harrah * Licensed under Apache License 2.0 (see LICENSE) */ package sbt.internal.util import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers abstract class UnitSpec extends AnyFlatSpec with Matchers
sbt/sbt
internal/util-complete/src/test/scala/UnitSpec.scala
Scala
apache-2.0
320
package org.akkapulline import scala.reflect.ClassTag import akka.actor._ import scala.collection.mutable import org.akkapulline.Messages._ import scala.util.Try class PullLineAdapter[L: ClassTag, R: ClassTag](workerLocation: String, leftLocation: String, rightLocation:...
fehmicansaglam/akka-pulline
src/main/scala/org/akkapulline/PullLineAdapter.scala
Scala
unlicense
2,120
package com.github.tototoshi.play2.auth.social.core trait OAuthAuthenticator { type AccessToken }
tototoshi/play2-auth
social/src/main/scala/com/github/tototoshi/play2/auth/social/core/OAuthAuthenticator.scala
Scala
apache-2.0
103
package monocle import eu.timepit.refined._ import eu.timepit.refined.api.{Refined, Validate} import eu.timepit.refined.char.{LowerCase, UpperCase} import eu.timepit.refined.string.{EndsWith, StartsWith} import eu.timepit.refined.numeric.Interval package object refined { type ZeroTo[T] = Int Refined Interval.Closed...
aoiroaoino/Monocle
refined/src/main/scala/monocle/refined/package.scala
Scala
mit
918
/* * 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 ...
chuckchen/spark
mllib/src/main/scala/org/apache/spark/mllib/api/python/PythonMLLibAPI.scala
Scala
apache-2.0
54,281
package spatial.codegen.pirgen import argon.core._ import scala.collection.mutable import scala.util.control.NoStackTrace trait PIRSplitting extends PIRTraversal { class SplitException(val msg: String) extends Exception("Unable to split!") /** CU splitting is graph partitioning, where each partition has a ...
stanford-ppl/spatial-lang
spatial/core/src/spatial/codegen/pirgen/PIRSplitting.scala
Scala
mit
14,453
package mesosphere.marathon.core.launchqueue.impl import akka.actor._ import akka.event.LoggingReceive import mesosphere.marathon.core.base.Clock import mesosphere.marathon.core.flow.OfferReviver import mesosphere.marathon.core.launcher.{ TaskOp, TaskOpFactory } import mesosphere.marathon.core.launchqueue.LaunchQueue....
titosand/marathon
src/main/scala/mesosphere/marathon/core/launchqueue/impl/AppTaskLauncherActor.scala
Scala
apache-2.0
17,604
package com.sksamuel.scapegoat.inspections.nulls import com.sksamuel.scapegoat._ /** @author Stephen Samuel */ class NullParameter extends Inspection { def inspector(context: InspectionContext): Inspector = new Inspector(context) { override def postTyperTraverser = Some apply new context.Traverser { imp...
pwwpche/scalac-scapegoat-plugin
src/main/scala/com/sksamuel/scapegoat/inspections/nulls/NullParameter.scala
Scala
apache-2.0
1,116
/* Copyright 2015 Mario Pastorelli ([email protected]) * * 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...
melrief/PureCSV
shared/src/test/scala/purecsv/unsafe/converter/ConverterSuite.scala
Scala
apache-2.0
3,702
package lsh import edu.berkeley.cs.amplab.spark.indexedrdd.IndexedRDD import edu.berkeley.cs.amplab.spark.indexedrdd.IndexedRDD._ import org.apache.hadoop.fs.Path import org.apache.spark.mllib.linalg.Vector import org.apache.spark.mllib.linalg.Vectors import org.apache.spark.mllib.util.{Loader, Saveable} import org.ap...
KevinZwx/SES-LSH
main/scala/lsh/LSHModel.scala
Scala
gpl-2.0
9,719
/* * Wire * Copyright (C) 2016 Wire Swiss GmbH * * 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 progr...
wireapp/wire-android-sync-engine
zmessaging/src/main/scala/com/waz/sync/SyncServiceHandle.scala
Scala
gpl-3.0
19,031
package cpup.mc.computers.content.computers import io.netty.buffer.ByteBuf trait Buffer { def curWidth: Int def curHeight: Int def colors: ByteBuf def data: Array[Char] def fgIndex = Buffer.fgIndex(curWidth)_ def bgIndex = Buffer.bgIndex(curWidth)_ def charIndex = Buffer.charIndex(curWidth)_ def char(x: In...
CoderPuppy/cpup-computers-mc
src/main/scala/cpup/mc/computers/content/computers/Buffer.scala
Scala
mit
2,813
/* * 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...
CodeSmell/stream-reactor
kafka-connect-redis/src/main/scala/com/datamountaineer/streamreactor/connect/redis/sink/config/RedisConfig.scala
Scala
apache-2.0
3,137
/** * Copyright (c) 2007-2011 Eric Torreborre <[email protected]> * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation * the rights to us...
stuhood/specs
src/main/scala/org/specs/specification/SpecificationConfiguration.scala
Scala
mit
2,236
package org.jetbrains.plugins.scala package codeInspection.methodSignature import com.intellij.codeInspection._ import org.intellij.lang.annotations.Language import org.jetbrains.plugins.scala.lang.psi.api.statements.ScFunctionDefinition import quickfix.RemoveEqualsSign /** * Pavel Fatin */ class UnitMethodDefined...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/codeInspection/methodSignature/UnitMethodDefinedWithEqualsSignInspection.scala
Scala
apache-2.0
784
package run.local import org.apache.spark.sql.SparkSession import run.shared.Word2VecExample object Word2VecLocalExample { def main(args: Array[String]): Unit = { // default values var filePath = Word2VecLocalExample.getClass.getClassLoader.getResource("hp1.txt").getPath var masterInfo = "local[*]"...
Erwangf/wikipedia-mining
src/main/scala/run/local/Word2VecLocalExample.scala
Scala
mit
683
/* * Copyright 1998-2018 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...
hizel/lorsource
src/test/scala/ru/org/linux/topic/TopicDaoIntegrationTest.scala
Scala
apache-2.0
3,486
package latis.reader.tsml.ml import latis.util.StringUtils import scala.collection.Map import scala.collection.Seq import scala.collection.mutable import scala.xml.Attribute import scala.xml.Elem import scala.xml.Node import scala.xml.NodeSeq.seqToNodeSeq /** * Wrapper for an Element within the TSML that represents...
dlindhol/LaTiS
src/main/scala/latis/reader/tsml/ml/VariableMl.scala
Scala
epl-1.0
3,124
/* * This file is part of CubeLoader. * Copyright (c) 2016 - 2017, KitsuneAlex, All rights reserved. * * CubeLoader 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 Li...
TeamMD5/CubeLoader
src/main/scala/de/keri/cubelib/client/render/item/ItemRenderingAdapter.scala
Scala
gpl-3.0
1,902
import java.io.File import org.scalatestplus.play.FakeApplicationFactory import play.api._ import play.api.inject._ trait MyApplicationFactory extends FakeApplicationFactory { override def fakeApplication: Application = { val env = Environment.simple(new File(".")) val context = ApplicationLoader.Context.c...
play2-maven-plugin/play2-maven-test-projects
play28/scala/compile-di-example/test/MyApplicationFactory.scala
Scala
apache-2.0
406
package im.actor.server.session import java.util.concurrent.TimeUnit import akka.actor.{ ActorLogging, ActorRef, Cancellable, Props } import akka.stream.actor._ import com.typesafe.config.Config import im.actor.api.rpc.{ RpcOk, UpdateBox, RpcResult ⇒ ApiRpcResult } import im.actor.api.rpc.codecs.UpdateBoxCodec import...
actorapp/actor-platform
actor-server/actor-session/src/main/scala/im/actor/server/session/Resender.scala
Scala
agpl-3.0
16,153
/* * 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
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/encoders/RowEncoderSuite.scala
Scala
apache-2.0
11,542
/* Copyright 2013 Originate 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 ...
Bowbaq/play2-websocket
sample-websocket-app/app/controllers/Application.scala
Scala
apache-2.0
1,307
package infra.sockjs.impl import infra.sockjs.SockJsService /** * @author alari * @since 12/16/13 */ object CookieNeededEchoService extends SockJsService{ override val cookieNeeded = true }
alari/play-sockjs
module-code/app/infra/sockjs/impl/CookieNeededEchoService.scala
Scala
apache-2.0
197
/* * 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 ...
michalsenkyr/spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/orc/OrcFileFormat.scala
Scala
apache-2.0
12,376
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * ...
adarro/ddo-calc
subprojects/common/ddo-core/src/test/scala/io/truthencode/ddo/model/feats/MetaMagicFeatTest.scala
Scala
apache-2.0
967
/* * Copyright (c) <2015-2016>, see CONTRIBUTORS * 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...
amanjpro/languages-a-la-carte
ooj/src/main/scala/eval/constantcollectors.scala
Scala
bsd-3-clause
6,151
/* * Copyright (C) 2015 - 2017 Juergen Pfundt * * 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 ...
JuPfu/arktos
shared/src/main/scala/org/arktos/IRIParser.scala
Scala
apache-2.0
6,143
package services import play.api.Logger import reactivemongo.api.collections.bson.BSONCollection import reactivemongo.api.indexes.{Index, IndexType} import reactivemongo.api.{Cursor, DefaultDB} import reactivemongo.bson.{BSONDocument, BSONDocumentReader, BSONDocumentWriter, document} import scala.concurrent.{Executio...
soniCaH/footbalisto-api
app/services/MongoService.scala
Scala
apache-2.0
2,367
package org.jetbrains.plugins.scala.testingSupport.scalatest.scala2_11.scalatest3_0_1 import org.jetbrains.plugins.scala.testingSupport.scalatest.staticStringTest._ /** * @author Roman.Shein * @since 10.03.2017 */ class Scalatest2_11_3_0_1_StaticStringTest extends Scalatest2_11_3_0_1_Base with FeatureSpecStaticStr...
loskutov/intellij-scala
test/org/jetbrains/plugins/scala/testingSupport/scalatest/scala2_11/scalatest3_0_1/Scalatest2_11_3_0_1_StaticStringTest.scala
Scala
apache-2.0
544
package org.jetbrains.plugins.scala package lang package psi package api package toplevel import com.intellij.openapi.util.text.StringUtil import com.intellij.psi.{PsiClass, PsiElement, PsiMethod} import org.jetbrains.plugins.scala.extensions._ import org.jetbrains.plugins.scala.lang.psi.api.statements._ import org.je...
JetBrains/intellij-scala-historical
src/org/jetbrains/plugins/scala/lang/psi/api/toplevel/ScTypedDefinition.scala
Scala
apache-2.0
5,472
package ml.sparkling.graph.api.operators.algorithms.shortestpaths /** * Created by Roman Bartusiak ([email protected] http://riomus.github.io). */ object ShortestPathsTypes { type JMap[K,V]=java.util.Map[K,V] type JLong=java.lang.Long type JDouble=java.lang.Double type JSet[T]=java.util.Set[T] typ...
sparkling-graph/sparkling-graph
api/src/main/scala/ml/sparkling/graph/api/operators/algorithms/shortestpaths/ShortestPathsTypes.scala
Scala
bsd-2-clause
513
package blackboard.monitor.mbean import scala.collection.mutable.HashMap import scala.collection.mutable.Map import scala.collection.mutable.SynchronizedMap import scala.compat.Platform trait CacheableBean[T] { object MapMaker { def makeMap: Map[String, (Long, T)] = { new HashMap[String, (Long, T)] with ...
blackboard/monitor-bridge
src/main/scala/blackboard/monitor/mbean/CacheableBean.scala
Scala
bsd-3-clause
901
package controllers import play.api.mvc._ /** * Controller that renders example templates. */ object Application extends Controller { def index = Action { Ok(views.html.index()) } /** * Renders a minimal HTML template with no parameters. */ def minimal = Action { Ok(views.html.minimal()) }...
Bubblemint/PlayForScala
ch03/Templates/app/controllers/Application.scala
Scala
apache-2.0
459
package org.ai4fm.proofprocess.ui.actions import org.ai4fm.proofprocess.ProofFeatureDef import org.ai4fm.proofprocess.ui.features.FeatureDefInfoDialog import org.ai4fm.proofprocess.ui.util.SWTUtil.selectionElement import org.eclipse.core.commands.{AbstractHandler, ExecutionEvent, ExecutionException} import org.eclips...
andriusvelykis/proofprocess
org.ai4fm.proofprocess.ui/src/org/ai4fm/proofprocess/ui/actions/FeatureDefInfoHandler.scala
Scala
epl-1.0
1,175
package sample.cluster.factorial import scala.concurrent.duration._ import com.typesafe.config.ConfigFactory import akka.actor.Actor import akka.actor.ActorLogging import akka.actor.ActorSystem import akka.actor.Props import akka.cluster.Cluster import akka.routing.FromConfig import akka.actor.ReceiveTimeout //#front...
linearregression/social_data_collector
src/main/scala/sample/cluster/factorial/FactorialFrontend.scala
Scala
cc0-1.0
1,603
package com.tribbloids.spookystuff.testutils import org.json4s.JValue import org.json4s.jackson.JsonMethods import org.scalatest.Suite trait Suitex { self: Suite => final val ACTUAL = "[ACTUAL / LEFT]" final val EXPECTED = "[EXPECTED / RIGHT]" // CommonUtils.debugCPResource() @transient implici...
tribbloid/spookystuff
mldsl/src/test/scala/com/tribbloids/spookystuff/testutils/Suitex.scala
Scala
apache-2.0
6,528
package im.mange.jetpac.input import im.mange.jetboot.widget.form.FormInput import im.mange.jetpac.Js import net.liftweb.http.SHtml case class CheckBox(field: Field, default: Boolean) extends FormInput { var value = default //TODO: we need to remove the wrapping span - but we can't because EventHandling needs an...
alltonp/jetboot
src/main/scala/im/mange/jetpac/input/CheckBox.scala
Scala
apache-2.0
1,001
// Copyright (C) 2010-2011 Monash University // // This file is part of Factotum. // // Factotum 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 License, or // (at your option...
dnikulin/factotum
src/main/scala/com/dnikulin/factotum/engine/TextStore.scala
Scala
agpl-3.0
8,202
package services.datetime import org.specs2.mutable.Specification import services.SDate import services.graphstages.Crunch class UtcDateRangeSpec extends Specification { val startDateUtc = "2020-05-01T00:00Z" val endDateUtc = "2020-05-03T00:00Z" s"Given a UTC date of $startDateUtc, falling inside of BST" >> { ...
UKHomeOffice/drt-scalajs-spa-exploration
server/src/test/scala/services/datetime/UtcDateRangeSpec.scala
Scala
apache-2.0
2,885
/* * Copyright 2014 - 2015 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 a...
wemrysi/quasar
core/src/main/scala/slamdata/engine/physical/mongodb/bson.scala
Scala
apache-2.0
12,187
/* * 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 ...
matthewfranglen/spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveShim.scala
Scala
mit
11,894
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.testsuite.javalib.lang im...
SebsLittleHelpers/scala-js
test-suite/shared/src/test/require-jdk7/org/scalajs/testsuite/javalib/lang/CharacterTestOnJDK7.scala
Scala
apache-2.0
16,792
package dotty.tools package dotc package typer import core._ import ast.{Trees, untpd, tpd, TreeInfo} import util.Positions._ import util.Stats.track import Trees.Untyped import Mode.ImplicitsEnabled import Contexts._ import Flags._ import Denotations._ import NameOps._ import Symbols._ import Types._ import Decorator...
DarkDimius/dotty
src/dotty/tools/dotc/typer/Applications.scala
Scala
bsd-3-clause
38,248
package io.vamp.http_api.ws import java.util.UUID import akka.actor.PoisonPill import akka.http.scaladsl.model.HttpRequest import akka.http.scaladsl.model.ws.{ Message, TextMessage } import akka.http.scaladsl.server.Route import akka.stream._ import akka.stream.scaladsl.{ Flow, Sink, Source } import akka.util.Timeout...
magneticio/vamp
http_api/src/main/scala/io/vamp/http_api/ws/WebSocketRoute.scala
Scala
apache-2.0
2,620
package org.broadinstitute.dsde.workbench.sam.api import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.model.headers.OAuth2BearerToken import akka.http.scaladsl.testkit.ScalatestRouteTest import cats.effect.IO import org.broadinstitute...
broadinstitute/sam
src/test/scala/org/broadinstitute/dsde/workbench/sam/api/ResourceRoutesV2Spec.scala
Scala
bsd-3-clause
94,070
/* * Copyright (c) 2017-2022 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...
snowplow/snowplow
5-data-modeling/event-manifest-populator/src/test/scala/com/snowplowanalytics/snowplow/eventpopulator/MainSpec.scala
Scala
apache-2.0
4,254
package ch3 import scala.annotation.tailrec import List._ object Exercise18 { def map[A,B](ls: List[A])(f: A => B): List[B] = foldRight(ls, Nil:List[B])((x, acc) => Cons(f(x), acc)) } import Exercise18._ /* from repl you can test typing: :load src/main/scala/fpinscala/ch3/List.scala :load src/main/scala/fpinsc...
rucka/fpinscala
src/main/scala/fpinscala/ch3/Exercise18.scala
Scala
gpl-2.0
379
/* * Copyright 2020 ABSA Group Limited * * 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...
AbsaOSS/spline
rest-gateway/src/main/scala/za/co/absa/spline/gateway/rest/filter/GZIPServletInputStream.scala
Scala
apache-2.0
1,422
/** * 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...
yobennett/kafka
core/src/main/scala/kafka/message/MessageWriter.scala
Scala
apache-2.0
6,050
/** * Copyright (c) 2015 Intel Corporation  * * 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 applicabl...
shibanis1/spark-tk
core/src/test/scala/org/trustedanalytics/sparktk/frame/internal/ops/statistics/correlation/CorrelationMatrixTest.scala
Scala
apache-2.0
2,318
/* * Copyright 2009-2010 LinkedIn, 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 ...
linkedin/norbert
java-network/src/main/scala/com/linkedin/norbert/javacompat/network/NettyNetworkServer.scala
Scala
apache-2.0
2,805
package com.timgroup.eventstore.mysql import com.timgroup.eventstore.api._ import com.fasterxml.jackson.core._ import com.fasterxml.jackson.databind._ import org.scalatest._ import org.scalatest.OptionValues._ class JsonEventCompatibilityTest extends FlatSpec with Matchers { "compatibility predicate" should "rega...
tim-group/tg-eventstore
mysql-legacy/src/test/scala/com/timgroup/eventstore/mysql/JsonEventCompatibilityTest.scala
Scala
bsd-2-clause
4,889
/* * P40.scala * Copyright (C) 2017 n3xtchen <[email protected]> * * Distributed under terms of the GPL-2.0 license. */ package nextchen object P40 { // scala> 28.goldbach // res0: (Int, Int) = (5,23) implicit class S99Int(val n: Int) extends P35.S99Int(n) { // 歌德巴赫猜想 def goldbach() = { def p...
n3xtchen/s-99
src/main/scala/nextchen/P40.scala
Scala
mit
582
package com.stulsoft.avro import java.io.ByteArrayOutputStream import org.apache.avro.Schema import org.apache.avro.generic.{GenericData, GenericRecord} import org.apache.avro.io.{DecoderFactory, EncoderFactory} import org.apache.avro.specific.{SpecificDatumReader, SpecificDatumWriter} import scala.io.Source /** Pl...
ysden123/poc
avro/src/main/scala/com/stulsoft/avro/Main1.scala
Scala
mit
2,764
/* * 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 ...
JihongMA/incubator-carbondata
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/directdictionary/DateDataTypeDirectDictionaryWithNoDictTestCase.scala
Scala
apache-2.0
3,243
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
aosagie/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetInteroperabilitySuite.scala
Scala
apache-2.0
9,332
package com.usercase.request.parser import com.usercase.request.http.HttpData import org.json.JSONObject import scala.collection.mutable /** * Created by C.J.YOU on 2017/2/21. */ class RespondParserReflect(className: String) { val RPClass = Class.forName(className) /** * 通过反射机制自动获取 不同url对应的数据解析方法 *...
bgfurfeature/AI
src/main/scala/com/usercase/request/parser/RespondParserReflect.scala
Scala
apache-2.0
901
package scala.models import io.apibuilder.generator.v0.models.{File, InvocationForm} import io.apibuilder.spec.v0.models.Service import models.TestHelper._ import scala.util.matching.Regex import org.scalatest.funspec.AnyFunSpec import org.scalatest.matchers.should.Matchers class Play26ControllersSpec extends AnyFunS...
mbryzek/apidoc-generator
scala-generator/src/test/scala/models/Play26ControllersSpec.scala
Scala
mit
2,907
object Foo { def f()()(implicit ctx: String): Int = ??? def at[T](op: () => T): Unit = () at(() => f()) // error: missing () }
lampepfl/dotty
tests/neg/i3542a.scala
Scala
apache-2.0
133
package io.plasmap.geo.preprocessing.test import _root_.io.plasmap.generator.OsmObjectGenerator import _root_.io.plasmap.geo.data.OsmBB import _root_.io.plasmap.geo.mappings._ import _root_.io.plasmap.geo.preprocessing.{FlowError, OsmPreprocessor, WayFlow} import _root_.io.plasmap.geo.preprocessing.OsmPreprocessor._ i...
plasmap/plasmap
processing/src/test/scala/io/plasmap/geo/preprocessing/test/WayFlowSpec.scala
Scala
apache-2.0
2,594
package scala.meta.io import java.io._ import java.nio.{file => nio} import java.net._ import java.nio.file.Path import java.nio.file.Paths import scalapb.GeneratedMessage import scala.meta.internal.io.PlatformPathIO import scala.meta.internal.io.FileIO import scala.meta.internal.io.PathIO /** Wrapper around an absol...
olafurpg/scalameta
scalameta/io/shared/src/main/scala/scala/meta/io/AbsolutePath.scala
Scala
bsd-3-clause
2,109
/* * Copyright (c) 2012-2018 Broad Institute, Inc. * * This file is part of Pilon. * * Pilon is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. * * Pilon is distributed in the hope that it will...
B-UMMI/INNUca
src/pilon_v1.23/pilon/src/main/scala/org/broadinstitute/pilon/Tracks.scala
Scala
gpl-3.0
7,490
/** * Copyright (C) 2007 Orbeon, Inc. * * 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 * 2.1 of the License, or (at your option) any later version. * * This prog...
orbeon/orbeon-forms
xforms-analysis/shared/src/main/scala/org/orbeon/oxf/xforms/analysis/PartModelAnalysis.scala
Scala
lgpl-2.1
3,694
package org.http4s package parser import util.CaseInsensitiveString._ import org.specs2.mutable.Specification class HeaderParserSpec extends Specification { "Header parsing should catch errors" in { val h2 = Header.Raw("Date".ci, "Fri, 06 Feb 0010 15:28:43 GMT") // Invalid year: must be >= 1800 h2.parsed...
m4dc4p/http4s
tests/src/test/scala/org/http4s/parser/HeaderParserSpec.scala
Scala
apache-2.0
357
package eu.ace_design.island.stdlib import eu.ace_design.island.game._ import eu.ace_design.island.geom.Point import eu.ace_design.island.map._ import eu.ace_design.island.stdlib.PointOfInterests.{Creek, EmergencySite} import scala.util.Random /** * Standard element to be used as Point of interests **/ object Poin...
ace-design/island
engine/src/main/scala/eu/ace_design/island/stdlib/PointOfInterests.scala
Scala
lgpl-3.0
3,121
class A trait Foo { def foo: A ?=> Int } class Test { new FooI{} } class FooI extends Foo { def foo: A ?=> Int = 3 }
lampepfl/dotty
tests/pos/i4753.scala
Scala
apache-2.0
125
package org.scalatest import Filter.IgnoreTag /** * Filter whose <code>apply</code> method determines which of the passed tests to run and ignore based on tags to include and exclude passed as * as class parameters. * * <p> * This class handles the <code>org.scalatest.Ignore</code> tag specially, in that its <co...
epishkin/scalatest-google-code
src/main/scala/org/scalatest/Filter.scala
Scala
apache-2.0
12,250
/* * Licensed to Intel Corporation under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * Intel Corporation licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use t...
SeaOfOcean/BigDL
dl/src/main/scala/com/intel/analytics/bigdl/models/rnn/Test.scala
Scala
apache-2.0
3,432
package io.tabmo.aeroless trait AsEncoder[A] { self => def encode(a: A): AsValue def contramap[B](f: B => A): AsEncoder[B] = new AsEncoder[B] { override def encode(b: B): AsValue = self.encode(f(b)) } } object AsEncoder { import shapeless._ import shapeless.labelled._ import shapeless.ops.hlist.Is...
tabmo/Aeroless
src/main/scala/io/tabmo/aeroless/AsEncoder.scala
Scala
mit
1,803
/* * Copyright 2017-2018 Azad Bolour * Licensed under GNU Affero General Public License v3.0 - * https://github.com/azadbolour/boardgame/blob/master/LICENSE.md */ package com.bolour.boardgame.scala.server.domain import com.bolour.boardgame.scala.common.domain.PlayPiece import com.bolour.plane.scala.domain.Poin...
azadbolour/boardgame
scala-server/app/com/bolour/boardgame/scala/server/domain/Scorer.scala
Scala
agpl-3.0
1,698
/** * Copyright 2015 Thomson Reuters * * 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 ag...
hochgi/CM-Well
server/cmwell-controller/src/main/scala/cmwell/ctrl/utils/AlertReporter.scala
Scala
apache-2.0
7,896
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE...
adarro/ddo-calc
subprojects/common/ddo-core/src/test/scala/io/truthencode/ddo/model/race/Race$Test.scala
Scala
apache-2.0
1,127
package effechecka import akka.NotUsed import akka.actor.ActorSystem import akka.stream.{ActorMaterializer, SourceShape} import akka.stream.scaladsl.{Concat, Flow, GraphDSL, Sink, Source} import akka.util.ByteString import com.typesafe.config.Config import io.eels.Row import org.apache.hadoop.conf.Configuration import...
jhpoelen/effechecka
src/main/scala/effechecka/ChecklistFetcherHDFS.scala
Scala
mit
3,102
package com.twitter.finagle.loadbalancer import com.twitter.util.{Future, Time} import com.twitter.finagle.{Service, ServiceFactory} import com.twitter.finagle.stats.NullStatsReceiver object Benchmark { // todo: simulate distributions of loads. private[this] val N = 1<<19 private[this] val W = 1 //1000 priva...
enachb/finagle_2.9_durgh
finagle-core/src/main/scala/com/twitter/finagle/loadbalancer/Benchmark.scala
Scala
apache-2.0
1,952
/*********************************************************************** * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
jahhulbert-ccri/geomesa
geomesa-spark/geomesa-spark-sql/src/test/scala/org/locationtech/geomesa/spark/SparkSQLDataTest.scala
Scala
apache-2.0
10,940