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 com.ruimo.scoins import scala.util.{Try, Success, Failure} import java.nio.file.{Files, Path, FileVisitResult, SimpleFileVisitor} import java.nio.file.attribute.FileAttribute import java.nio.file.attribute.BasicFileAttributes import java.io.IOException object PathUtil { def deleteDir(dir: Path): Unit = { ...
ruimo/scoins
src/main/scala/com/ruimo/scoins/PathUtil.scala
Scala
apache-2.0
2,007
sealed trait HList final case class HCons[H, T <: HList](head : H, tail : T) extends HList case object HNil extends HList object HList { type ::[H, T <: HList] = HCons[H, T] type HNil = HNil.type implicit def hlistOps[L <: HList](l : L) = new { def ::[H](h : H) : H :: L = HCons(h, l) def last(implicit l...
scala/scala
test/files/pos/t5156.scala
Scala
apache-2.0
609
/* * Copyright 2017 TWO SIGMA OPEN SOURCE, 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 applicable...
jpallas/beakerx
kernel/scala/src/main/scala/com/twosigma/beakerx/scala/chart/categoryplot/plotitem/CategoryLines.scala
Scala
apache-2.0
1,379
package one.lockstep.lock import one.lockstep.lock.client._ class MultilockFaultyLockSpec extends AbstractFaultyLockSpec with MultilockIntegrationFixtures { override def lockManagerFixtureProvider: FaultyLockManagerFixtureProvider = hints => new MultilockManagerIntegFixture(hints: _*) with MultilockFaultyPipeli...
lockstep-one/vault
vault-test/src/test/scala/one/lockstep/lock/MultilockFaultyLockSpec.scala
Scala
agpl-3.0
335
package breeze.linalg import breeze.generic.UFunc /** * Computes the condition number of the given real matrix. */ object cond extends UFunc { implicit def canDetUsingSVD[T](implicit luImpl: svd.Impl[T, (DenseMatrix[Double], DenseVector[Double], DenseMatrix[Double])]):Impl[T, Double] = { new Impl[T, Double]...
eponvert/breeze
src/main/scala/breeze/linalg/cond.scala
Scala
apache-2.0
449
package org.miszkiewicz.model.json import org.miszkiewicz.model.smtpapi._ import spray.json._ import scala.collection.mutable import scala.language.implicitConversions object FilterJsonProtocol extends DefaultJsonProtocol { implicit def bool2int(b: Boolean): Int = if (b) 1 else 0 implicit object BCCJsonFormat ...
dmiszkiewicz/sendgrid-scala
src/main/scala/org/miszkiewicz/model/json/FilterJsonProtocol.scala
Scala
mit
4,213
// AORTA is copyright (C) 2012 Dustin Carlino, Mike Depinet, and Piyush // Khandelwal of UT Austin // License: GNU GPL v2 package utexas.aorta.sim.intersections import scala.annotation.tailrec import scala.collection.mutable import Function.tupled import utexas.aorta.map.{Turn, Vertex, Edge} import utexas.aorta.sim....
dabreegster/aorta
utexas/aorta/sim/intersections/SignalPolicy.scala
Scala
gpl-2.0
9,428
package a2 { class Foo1 { import a2.b2.C println(/* */C.getClass) println(classOf[/* line: 17 */C]) } class Foo2 { import _root_.a2.b2.C println(/* */C.getClass) println(classOf[/* line: 13 */C]) } package b2 { case class C } package a2 { package b2 { case class C ...
LPTK/intellij-scala
testdata/resolve2/import/relation/Clash.scala
Scala
apache-2.0
328
package org.allenai.pipeline /** Maven-style version id */ case class MavenVersionId( major: Int, minor: Option[Int] = None, incremental: Option[Int] = None, build: Option[Int] = None, qualifier: Option[String] = None ) extends Comparable[MavenVersionId] { require(!incremental.isDefined || minor....
cristipp/common
pipeline/src/main/scala/org/allenai/pipeline/MavenVersionId.scala
Scala
apache-2.0
2,880
package ru.primetalk.synapse.core.ext import scala.language.implicitConversions /** * An extension that adds counter for aux contacts. * @author zhizhelev, 25.03.15. */ trait AuxNumberingExt extends ContactStyleExt { case object AuxiliaryContact extends ContactStyle class AuxContactNumberingExt(val sb: Syste...
ppopoff/SynapseGrid
synapse-grid-core/src/main/scala/ru/primetalk/synapse/core/ext/AuxNumberingExt.scala
Scala
bsd-2-clause
919
package io.taig.android.widget.syntax import android.view.ViewGroup import io.taig.android.widget.operation import scala.language.implicitConversions trait viewGroup { implicit def viewGroupSyntax(viewGroup: ViewGroup): operation.viewGroup = { new operation.viewGroup(viewGroup) } } object viewGroup extends ...
Taig/Toolbelt
widget/src/main/scala/io/taig/android/widget/syntax/viewGroup.scala
Scala
mit
330
package scalariform.lexer import scala.collection.mutable /** * Keeping track of nesting level of XML within Scala. */ trait ModeStack { self: ScalaLexer ⇒ private val modeStack = new mutable.Stack[LexerMode] modeStack.push(new ScalaMode) protected def popMode(): Unit = { modeStack.pop() } protect...
scala-ide/scalariform
scalariform/src/main/scala/scalariform/lexer/ModeStack.scala
Scala
mit
1,359
package org.jetbrains.plugins.scala.lang.dataFlow import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.lang.psi.controlFlow.Instruction import junit.framework.Assert import org.jetbrains.plugins.scala.lang.psi.controlFlow.impl.ScalaControlFlowBuilder import com.intellij.psi.util.PsiTreeUtil import org...
consulo/consulo-scala
test/org/jetbrains/plugins/scala/lang/dataFlow/ReachingDefsTest.scala
Scala
apache-2.0
2,768
/* * 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/data/RotationMatrix.scala
Scala
apache-2.0
3,663
package alerts import java.util.Date import akka.kafka.{Subscriptions, ConsumerSettings} import akka.kafka.scaladsl.Consumer import akka.stream.actor.ActorSubscriber import akka.stream.scaladsl.{Source, Sink} import java.time.format.DateTimeFormatter import com.datastax.driver.core.ConsistencyLevel import akka.actor....
haghard/actyx-dashboard
app/alerts/KafkaSupport.scala
Scala
apache-2.0
4,257
/* * Copyright (c) 2012, The Broad Institute * * 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, * copy, modify, me...
iontorrent/Torrent-Variant-Caller-stable
public/scala/src/org/broadinstitute/sting/queue/extensions/gatk/GATKScatterFunction.scala
Scala
mit
4,842
//: ---------------------------------------------------------------------------- //: Copyright (C) 2015 Verizon. 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 Licen...
neigor/funnel
zeromq/src/main/scala/package.scala
Scala
apache-2.0
1,768
object selftypes { trait A { self: AB => type AA = List[this.BX] class AX } trait B { self: AB => type BB = AA class BX } class AB extends A with B }
yusuke2255/dotty
tests/pos/selftypes.scala
Scala
bsd-3-clause
185
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
apache/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/batch/sql/join/NestedLoopSemiAntiJoinTest.scala
Scala
apache-2.0
1,206
/* * Copyright 2014 Michael Krolikowski * * 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...
mkroli/shurl
src/main/scala/com/github/mkroli/shurl/DatabaseComponent.scala
Scala
apache-2.0
4,142
/* * 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
core/src/test/scala/org/apache/spark/rdd/SortingSuite.scala
Scala
apache-2.0
6,964
import org.scalatest.prop.PropertyChecks import org.scalatest.{FlatSpec, MustMatchers} class GoofusTest extends FlatSpec with MustMatchers with PropertyChecks { case class DummySensor(override val name: String, override val id: Long, valueFunc: () => Double) extends Sensor(name, id) { var initialized = false ...
mikolak-net/scalatest_matcher_prez_demo
src/test/scala/GoofusTest.scala
Scala
gpl-2.0
5,153
trait StringTempl { def mkString: String def mkString(x: String): String } object Test { extension (x: String) def shouldBe(y: String): Boolean = ??? def test(tmpl: StringTempl): Unit = { tmpl.mkString shouldBe "hello" // error tmpl.mkString(", world") shouldBe "hello, world" ...
dotty-staging/dotty
tests/pos/i6705.scala
Scala
apache-2.0
323
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-index-api/src/main/scala/org/locationtech/geomesa/index/index/z3/legacy/Z3IndexV6.scala
Scala
apache-2.0
2,873
package io.policarp.scala.credstash import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient import com.amazonaws.services.kms.AWSKMSClient import org.mockito.Mockito import org.scalatest.{ mock => _, _ } import org.scalatest.mockito.MockitoSugar._ trait SimpleCredStashClientTestHarness extends WordSpec with Bef...
kdrakon/scala-credstash
src/test/scala/io/policarp/scala/credstash/SimpleCredStashClientTestHarness.scala
Scala
apache-2.0
595
object SCL9261 extends App { import slick.driver.H2Driver.api._ import slick.lifted.AbstractTable trait HasId[U, P] { type Id = U type IdColumn = P def id: IdColumn } type HasId1[T] = HasId[T, Rep[T]] class B[T <: AbstractTable[_], U, P](cons: Tag => T with HasId[U, P])( implicit usha...
triplequote/intellij-scala
scala/scala-impl/testdata/typeInference/slick/SCL9261.scala
Scala
apache-2.0
737
/*********************************************************************** * 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 ...
MutahirKazmi/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/cache/SoftThreadLocalTest.scala
Scala
apache-2.0
2,470
package uk.gov.digital.ho.proving.financialstatus.api.validation import java.time.LocalDate import org.springframework.http.HttpStatus import uk.gov.digital.ho.proving.financialstatus.domain.UserProfile import scala.util.{Either, Left, Right} trait DailyBalanceParameterValidator { val serviceMessages: ServiceMes...
UKHomeOffice/pttg-fs-api
src/main/scala/uk/gov/digital/ho/proving/financialstatus/api/validation/DailyBalanceParameterValidator.scala
Scala
mit
4,152
import scala.tools.nsc.doc.Universe import scala.tools.nsc.doc.model._ import scala.tools.partest.ScaladocJavaModelTest object Test extends ScaladocJavaModelTest { override def resourceFile = "SI-4826.java" override def scaladocSettings = "-no-java-comments" def testModel(rootPackage: Package) = { import a...
felixmulder/scala
test/scaladoc/run/SI-4826-no-comments.scala
Scala
bsd-3-clause
555
/** * 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...
noslowerdna/kafka
core/src/test/scala/unit/kafka/admin/DelegationTokenCommandTest.scala
Scala
apache-2.0
6,482
package com.tresata.spark.kafka import java.net.ConnectException import scala.util.Random import scala.collection.immutable.SortedMap import org.apache.spark.{ Partition, SparkContext, TaskContext } import org.apache.spark.rdd.RDD import kafka.message.{ Message, MessageAndOffset, MessageSet } import kafka.common.{ T...
vincentye38/spark-kafka
src/main/scala/com/tresata/spark/kafka/KafkaRDD.scala
Scala
apache-2.0
10,596
/* * * __________ ______ __ ________ _ __ ______ * /_ __/ __ \\/ _/ / / / / _/ __ \\/ | / / / ____/ * / / / /_/ // // / / / / // / / / |/ / / / __ * / / / _, _// // /___/ /____/ // /_/ / /| / / /_/ / * /_/ /_/ |_/___/_____/_____/___/\\____/_/ |_/ \\____/ *...
chan150/TrillionG
src/main/scala/kr/acon/util/LoggingPolicy.scala
Scala
apache-2.0
1,204
/* Copyright 2017-19, Emmanouil Antonios Platanios. 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.org/licenses/LICENSE-2.0 * * Unless ...
eaplatanios/tensorflow_scala
modules/api/src/main/scala/org/platanios/tensorflow/api/learn/layers/Basic.scala
Scala
apache-2.0
6,159
package actions import play.api._ import play.api.mvc._ import play.api.data.Form import play.api.data.Forms._ import controllers._ import models._ import forms._ trait ValidateForm[A] extends Action[A] object ValidateForm { val sessionkey = Form( single("sessionkey" -> text) ) def apply[A] (bodyParser: B...
groundwater/Scala-Play-CSRF
app/actions/Actions.scala
Scala
mit
1,763
package org.sisioh.aws4s.eb.model import java.util.Date import com.amazonaws.services.elasticbeanstalk.model.ApplicationDescription import org.sisioh.aws4s.PimpedType import scala.collection.JavaConverters._ object RichApplicationDescriptionFactory { def create(): ApplicationDescription = new ApplicationDescript...
everpeace/aws4s
aws4s-eb/src/main/scala/org/sisioh/aws4s/eb/model/RichApplicationDescription.scala
Scala
mit
2,321
package blended.akka.logging import akka.actor.{Actor, ActorSystem} import akka.dispatch.RequiresMessageQueue import akka.event.Logging._ import akka.event.{DummyClassForStringSources, LoggerMessageQueueSemantics, _} import akka.util.Helpers import blended.util.logging.Logger /** * Base trait for all classes that wa...
woq-blended/blended
blended.akka.logging/src/main/scala/blended/akka/logging/BlendedLogger.scala
Scala
apache-2.0
4,183
package com.pointr.tcp.rexec import com.pointr.tcp.rpc.TcpClient object RexecClient { def main(args: Array[String]): Unit = { System.setProperty("java.net.preferIPv4Stack","true") val client = TcpClient.createClientFromArgs(if (args.length>0) args else Array("localhost","8989","rexec-client.yaml")) clie...
OpenChaiSpark/OCspark
tcpclient/src/main/scala/com/pointr/tcp/rexec/RexecClient.scala
Scala
apache-2.0
345
/** * Copyright (C) 2013 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 program i...
orbeon/orbeon-forms
form-runner/jvm/src/db/scala/org/orbeon/oxf/fr/persistence/test/RestApiTest.scala
Scala
lgpl-2.1
20,557
/* * Copyright 2010-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...
pbrant/framework
persistence/mapper/src/test/scala/net/liftweb/mapper/MappedLongForeignKeySpec.scala
Scala
apache-2.0
2,401
/* * Copyright 2016 OrgSync. * * 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 ...
orgsync/oskr-events
src/main/scala/com/orgsync/oskr/events/streams/grouping/ExpandedPartGroupingWindows.scala
Scala
apache-2.0
2,408
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller, Zhaochong Liu * @version 1.3 * @date Sat Jul 30 22:53:47 EDT 2016 * @see LICENSE (MIT style license file). */ package scalation.linalgebra import scalation.math.double_exp import scalation.math.Ex...
NBKlepp/fda
scalation_1.3/scalation_mathstat/src/main/scala/scalation/linalgebra/Fac_QR_H.scala
Scala
mit
7,775
import sbt._ import Keys._ import sbtassembly.Plugin._ import sbtjflex.SbtJFlexPlugin._ import AssemblyKeys._ object Versions{ val scalaMajorVersion = "2.11" val scalaMinorVersion = "7" val factorieVersion = "1.2" } object FactorieBuild extends Build { import Dependencies._ lazy val overrideSettings = { ...
melisabok/factorie
project/Build.scala
Scala
apache-2.0
4,984
package org.covolution.quick import org.apache.spark.streaming.{Seconds, StreamingContext} import org.apache.spark.{SparkConf, SparkContext} /** * @author Gethin James * Try this: * spark-submit --class org.covolution.quick.App /tmp/data/uber-squick-1.0-SNAPSHOT.jar */ object App { def main(args : Array[String...
covolution/squick
src/main/scala/org/covolution/quick/App.scala
Scala
apache-2.0
751
/* * Copyright (c) 2014-2021 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
monifu/monifu
monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala
Scala
apache-2.0
13,883
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/test/scala/org/neo4j/cypher/internal/compiler/v2_3/executionplan/PlanFingerprintReferenceTest.scala
Scala
apache-2.0
5,263
package com.yammer.dropwizard.examples import com.yammer.dropwizard.cli.ConfiguredCommand import com.yammer.dropwizard.Logging import com.yammer.dropwizard.config.Bootstrap import net.sourceforge.argparse4j.inf.{Subparser, Namespace} import net.sourceforge.argparse4j.impl.Arguments class SayCommand extends Configured...
ericholscher/dropwizard
dropwizard-scala_2.9.1/src/test/scala/com/yammer/dropwizard/examples/SayCommand.scala
Scala
apache-2.0
1,025
package org.broadinstitute.dsde.workbench.sam.config /** * Terms of Service configuration. * @param enabled Set to false to disable Terms of Service enforcement * @param isGracePeriodEnabled Set to true if the grace period for ToS acceptance is active * @param version The latest version of the Terms of Service...
broadinstitute/sam
src/main/scala/org/broadinstitute/dsde/workbench/sam/config/TermsOfServiceConfig.scala
Scala
bsd-3-clause
557
/* * Copyright 2001-2008 Artima, 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 agre...
vivosys/scalatest
src/main/scala/org/scalatest/PrivateMethodTester.scala
Scala
apache-2.0
14,284
package com.weightwatchers.reactive.kinesis import akka.actor.{Actor, PoisonPill, Props} import com.fasterxml.uuid.Generators import com.typesafe.config.{Config, ConfigFactory} import com.typesafe.scalalogging.LazyLogging import com.weightwatchers.reactive.kinesis.SimpleKinesisProducer._ import com.weightwatchers.reac...
WW-Digital/reactive-kinesis
src/it/scala/com/weightwatchers/reactive/kinesis/SimpleKinesisProducer.scala
Scala
apache-2.0
6,032
/* * Copyright 2010 LinkedIn * * 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 w...
tcrayford/hafka
kafka/core/src/main/scala/kafka/message/CompressionCodec.scala
Scala
bsd-3-clause
1,197
package binconcifartests import chisel3._ import chisel3.iotesters.{PeekPokeTester, Driver, ChiselFlatSpec} import scala.util.Random import binconcifar.MemShiftRegister import scala.collection.mutable.ArrayBuffer class MemShiftRegisterTests[T <: Bits]( c : MemShiftRegister[Vec[T]], bitWidth : Int ) extends PeekPokeT...
da-steve101/binary_connect_cifar
src/test/scala/MemShiftRegisterSuite.scala
Scala
gpl-3.0
1,694
/* * 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
mllib/src/test/scala/org/apache/spark/ml/evaluation/BinaryClassificationEvaluatorSuite.scala
Scala
apache-2.0
1,158
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.it.action import akka.actor.ActorSystem import akka.stream.Materializer import play.api._ import play.api.data._ import play.api.data.Forms._ import play.api.data.format.Formats._ import play.api.libs.Files.TemporaryFile import play.api.m...
wegtam/playframework
core/play-integration-test/src/it/scala/play/it/action/FormActionSpec.scala
Scala
apache-2.0
3,448
/********************************************************************************************************************** * This file is part of Scrupal, a Scalable Reactive Web Application Framework for Content Management * * ...
scrupal/scrupal
scrupal-api/src/test/scala/scrupal/api/FormsSpec.scala
Scala
apache-2.0
7,890
package roles import models.Parts trait OrderedParts { this: Parts => }
KIWIKIGMBH/kiwierp
kiwierp-backend/app/roles/OrderedParts.scala
Scala
mpl-2.0
78
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
aokolnychyi/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/types/HiveStringType.scala
Scala
apache-2.0
2,422
package com.wavesplatform.state.diffs import com.wavesplatform.account.{AddressScheme, Alias} import com.wavesplatform.common.state.ByteStr import com.wavesplatform.common.utils.EitherExt2 import com.wavesplatform.db.WithState import com.wavesplatform.features.{BlockchainFeature, BlockchainFeatures} import com.wavespl...
wavesplatform/Waves
node/src/test/scala/com/wavesplatform/state/diffs/CommonValidationTest.scala
Scala
mit
10,213
/* * 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 ...
manishgupta88/carbondata
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/describeTable/TestDescribeTable.scala
Scala
apache-2.0
3,120
package com.tpalanga.account.route import akka.http.scaladsl.model.{ContentTypes, HttpEntity} import akka.http.scaladsl.server.Directives.{complete, get, path} import akka.http.scaladsl.server.Route class PingRoute extends BaseRoute { val route: Route = path("ping") { get { complete(HttpEntity(Con...
tpalanga/akka-http-microservice
accountService/src/main/scala/com/tpalanga/account/route/PingRoute.scala
Scala
unlicense
385
/* * Copyright (c) 2018. Fengguo Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License v2.0 * which accompanies this distribution, and is available at * https://www.apache.org/licenses/LICENSE-2.0 * * Detailed contributors ar...
arguslab/Argus-SAF
jawa/src/main/scala/org/argus/jawa/core/ast/jawafile/JawaSourceFile.scala
Scala
apache-2.0
932
package wykopml.flows import akka.actor.ActorSystem import akka.stream.Materializer import akka.stream.scaladsl._ import wykopml.parsers.IndexParser import scala.concurrent.ExecutionContextExecutor trait IndexParserFlow { implicit def system: ActorSystem implicit def executor: ExecutionContextExecutor implic...
blstream/wykopml
updater/src/main/scala/wykopml/flows/IndexParserFlow.scala
Scala
mit
546
/** * Created by zhouqihua on 2017/7/19. */ import java.math.BigDecimal object KMScalaKit { def bigDemicalDoubleAdd(number1: Double, number2: Double): Double = { val a: BigDecimal = new BigDecimal(number1.toString); val b: BigDecimal = new BigDecimal(number2.toString); val sum: Double = a.add(b).d...
kimihe/Swallow
swallow-sim/flow/src/main/scala/KMScalaKit.scala
Scala
apache-2.0
1,831
/** * Copyright (C) 2012 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
src/test/scala/org/orbeon/oxf/util/HeadersTest.scala
Scala
lgpl-2.1
2,198
/* * 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-lazyseq
src/main/scala/fm/lazyseq/TakeWhileLazySeq.scala
Scala
apache-2.0
1,027
package com.rasterfoundry.backsplash import java.net.URLDecoder import java.nio.charset.StandardCharsets import geotrellis.raster._ import geotrellis.raster.io.geotiff._ import geotrellis.spark.SpatialKey import geotrellis.spark.tiling._ import geotrellis.proj4._ import geotrellis.vector.{Extent, Point} import geotre...
azavea/raster-foundry
app-backend/backsplash-export/src/main/scala/com/rasterfoundry/backsplash/package.scala
Scala
apache-2.0
2,140
package org.jetbrains.sbt import com.intellij.execution.configurations.ParametersList import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.diagnostic.Logger import com.intellij.openapi.externalSystem.model.project.ModuleData import com.intellij.openapi.externalSystem.model.{DataNode, ...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/sbt/SbtUtil.scala
Scala
apache-2.0
12,489
package dk.tennis.compare.rating.multiskill.infer.skillmodelparams import dk.tennis.compare.rating.multiskill.model.perfdiff.Player import dk.tennis.compare.rating.multiskill.model.perfdiff.skillsfactor.cov.CovFunc /** * @param priorSkillsGivenOpponent key - opponent name, value - player skills against opponent */ ...
danielkorzekwa/tennis-player-compare
multiskill/src/main/scala/dk/tennis/compare/rating/multiskill/infer/skillmodelparams/SkillsModelParams.scala
Scala
bsd-2-clause
406
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
pncampbell/ct-calculations
src/test/scala/uk/gov/hmrc/ct/computations/CP88Spec.scala
Scala
apache-2.0
2,204
package hcube.scheduler.model case class ExecTrace( jobId: String, time: Long, history: List[ExecState] ) case class ExecState(state: String, time: Long, msg: String = "")
hcube-dev/hcube-scheduler
src/main/scala/hcube/scheduler/model/ExecTrace.scala
Scala
apache-2.0
180
package Pacman import Chisel._ class Interleaver(firstLayer: LayerParameters) extends Module { val K = firstLayer.K val cores = firstLayer.NumberOfCores val numberOfBlocks = 3 val wordPerBlock = firstLayer.MatrixWidth / K val io = new Bundle { val wordIn = Decoupled(Bits(width = K)).flip val inte...
martinhath/bnn
src/main/scala/Interleaver.scala
Scala
mit
2,043
package io.arabesque.aggregation.reductions import org.apache.hadoop.io.Writable case class ReductionFunctionContainer[V <: Writable] (func: (V,V) => V) extends ReductionFunction[V] { def reduce (v1: V, v2: V): V = func (v1, v2) }
dccspeed/Arabesque
src/main/scala/io/arabesque/aggregation/functions/ReductionFunctionContainer.scala
Scala
apache-2.0
239
/*********************************************************************** * 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-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/index/legacy/z3/Z3WritableIndex.scala
Scala
apache-2.0
7,289
/* * Copyright (c) 2013. Regents of the University of California * * 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 require...
fnothaft/adam
adam-core/src/main/scala/edu/berkeley/cs/amplab/adam/util/ParquetLogger.scala
Scala
apache-2.0
894
/** * 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...
cexbrayat/camel
components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/ExchangePatternTest.scala
Scala
apache-2.0
3,017
package com.lexan.lox.source case class SourceLocation(idx: Int) case class SourceSpan(begin: SourceLocation, end: SourceLocation) { lazy val length: Int = end.idx - begin.idx def merge(other: SourceSpan) = SourceSpan( if(begin.idx < other.begin.idx) begin else other.begin, if(end.idx > other.end....
doczir/lox
src/main/scala/com/lexan/lox/source/SourceCode.scala
Scala
unlicense
704
package de.htwg.zeta.common.format.project.gdsl.shape.geoModel import de.htwg.zeta.common.format.project.gdsl.style.StyleFormat import de.htwg.zeta.common.models.project.gdsl.shape.geomodel.Triangle import play.api.libs.json.JsObject import play.api.libs.json.JsResult import play.api.libs.json.JsValue import play.api....
Zeta-Project/zeta
api/common/src/main/scala/de/htwg/zeta/common/format/project/gdsl/shape/geoModel/TriangleFormat.scala
Scala
bsd-2-clause
1,972
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
pncampbell/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600j/v3/J50A.scala
Scala
apache-2.0
992
package com.twitter.finagle.client import com.twitter.finagle._ import com.twitter.finagle.client.AddrMetadataExtraction.AddrMetadata import com.twitter.finagle.naming.BindingFactory import com.twitter.finagle.loadbalancer.LoadBalancerFactory import com.twitter.finagle.stack.nilStack import com.twitter.util.{Await, Fu...
twitter/finagle
finagle-core/src/test/scala/com/twitter/finagle/client/AddrMetadataExtractionTest.scala
Scala
apache-2.0
2,558
package com.outr.nextui.transition class Repeat(times: Int = 1, transition: Transition) extends Transition { private var counter = 0 override def init(): Unit = { counter = 0 transition.init() } override def invoke(delta: Double): Unit = { transition.invoke(delta) } override def finished: Bo...
outr/nextui
core/src/main/scala/com/outr/nextui/transition/Repeat.scala
Scala
mit
494
package model import com.mchange.v2.c3p0.ComboPooledDataSource import scala.slick.driver.{JdbcProfile,MySQLDriver} object Database extends Profile { val profile: JdbcProfile = MySQLDriver private final val host = "jdbc:mysql://localhost/tinder" private final val username = "root" private final val password ...
evancasey/tinder-bandits
src/main/scala/model/Database.scala
Scala
mit
689
package org.jetbrains.plugins.scala.testingSupport.scalatest.scopeTest import org.jetbrains.plugins.scala.testingSupport.scalatest.generators.FreeSpecGenerator /** * @author Roman.Shein * @since 05.05.2015. */ trait FreeSpecScopeTest extends FreeSpecGenerator { def testFreeSpecEmptyScope() { assert(checkConf...
loskutov/intellij-scala
test/org/jetbrains/plugins/scala/testingSupport/scalatest/scopeTest/FreeSpecScopeTest.scala
Scala
apache-2.0
1,188
/* * Copyright (c) 2014 Contributor. All rights reserved. */ package scala.tools.nsc.classpath import java.net.URL import scala.annotation.tailrec import scala.collection.mutable.ArrayBuffer import scala.reflect.internal.FatalError import scala.reflect.io.AbstractFile import scala.tools.nsc.util.ClassPath import sca...
felixmulder/scala
src/compiler/scala/tools/nsc/classpath/AggregateClassPath.scala
Scala
bsd-3-clause
5,407
/* * Contributions: * Jean-Francois GUENA: implement "suffixed collection name" feature (issue #39 partially fulfilled) * ... */ package akka.contrib.persistence.mongodb class CasbahReadJournalSpec extends ReadJournalSpec(classOf[CasbahPersistenceExtension], "casbah") class CasbahSuffixReadJournalSpec extends R...
alari/akka-persistence-mongo
casbah/src/test/scala/akka/contrib/persistence/mongodb/CasbahReadJournalSpec.scala
Scala
apache-2.0
424
package dao import javax.inject.Singleton import domain.WordBundle import persistence.DbConnected import scalikejdbc._ @Singleton class WordBundleDao extends DbConnected { private def wordBundleMapper(rs: WrappedResultSet)(implicit session: DBSession) = { val id = rs.long("id") WordBundle( id = Some...
vadim-shb/english-vocabulator
server/app/dao/WordBundleDao.scala
Scala
apache-2.0
3,229
package com.nefariouszhen.khronos.db import com.fasterxml.jackson.annotation.JsonProperty class MetricsPayload( @JsonProperty val tags: Array[Array[String]], @JsonProperty val values: Array[Array[Double]] )
khronos-metrics/khronos
khronos-db-core/src/main/scala/com/nefariouszhen/khronos/db/MetricsPayload.scala
Scala
apache-2.0
217
/* * 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/main/scala/io/truthencode/ddo/model/feats/DefensiveRoll.scala
Scala
apache-2.0
1,392
package one.lockstep.util.internal trait EitherModule { implicit class RightBiasedEither[+L, +R](either: Either[L, R]) { def get = either match { case Left(left) => throw new NoSuchElementException(left.toString) case Right(a) => a } def foreach[U](f: R => U): Unit = either.right.foreach(f) ...
lockstep-one/vault
vault-common/src/main/scala/one/lockstep/util/internal/EitherModule.scala
Scala
agpl-3.0
843
/* * 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 ...
esi-mineset/spark
mllib/src/main/scala/org/apache/spark/mllib/optimization/Gradient.scala
Scala
apache-2.0
12,531
package repositories import java.util.UUID import scala.concurrent.Future trait PasswordInfoRepository extends Repository { import ctx._ val pwInfo = quote(querySchema[UserPasswordInfo]("password_info")) def byUserId(userId: UUID) = quote { pwInfo.filter(_.userId == lift(userId)) } }
iriddhi/mis
server/src/main/scala/repositories/PasswordInfoRepository.scala
Scala
apache-2.0
302
package io.tmos.arm /** * A resource that is managed. * * Only one implementation is provided currently [[DefaultManagedResource]]. Subclasses only need to provide * [[ManagedResource.map]] * * @tparam A the type of the resource to manage */ trait ManagedResource[+A]{ /** * Allows the resource to be used ...
tmoschou/arm4s
src/main/scala/io/tmos/arm/ManagedResource.scala
Scala
bsd-3-clause
1,829
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2006-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
l15k4/scala-parser-combinators
src/main/scala/scala/util/parsing/combinator/lexical/Scanners.scala
Scala
bsd-3-clause
2,455
package mesosphere.marathon.core.launchqueue import akka.actor.{ ActorRef, Props } import mesosphere.marathon.core.base.Clock import mesosphere.marathon.core.flow.OfferReviver import mesosphere.marathon.core.launcher.TaskOpFactory import mesosphere.marathon.core.launchqueue.impl.{ TaskLauncherActor, LaunchQueueAct...
yp-engineering/marathon
src/main/scala/mesosphere/marathon/core/launchqueue/LaunchQueueModule.scala
Scala
apache-2.0
1,819
/* * Copyright 2011 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
nshkrob/scrooge
scrooge-linter/src/main/scala/com/twitter/scrooge/linter/Main.scala
Scala
apache-2.0
2,355
/* * 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 ...
gustavoanatoly/samza
samza-core/src/test/scala/org/apache/samza/util/TestUtil.scala
Scala
apache-2.0
3,069
/* * Copyright (c) 2014-2018 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
Wogan/monix
monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropFirstSuite.scala
Scala
apache-2.0
1,842
package se.uu.farmbio.cp.alg import org.apache.spark.SharedSparkContext import org.junit.runner.RunWith import org.scalatest.FunSuite import se.uu.farmbio.cp.ICP import se.uu.farmbio.cp.TestUtils import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class LogisticRegressionTest extends FunSuite with S...
mcapuccini/spark-cp
cp/src/test/scala/se/uu/farmbio/cp/alg/LogisticRegressionTest.scala
Scala
apache-2.0
772
/* * Copyright (c) 2014 Dufresne Management Consulting LLC. */ package com.nickelsoftware.bettercare4me.hedis.hedis2014; import org.scalatestplus.play.OneAppPerSuite import org.scalatestplus.play.PlaySpec import com.nickelsoftware.bettercare4me.hedis.HEDISRulesTestSpec import com.nickelsoftware.bettercare4me.hedis.S...
reactivecore01/bettercare4.me
play/test/com/nickelsoftware/bettercare4me/hedis/hedis2014/CMC_RuleTestSpec.scala
Scala
apache-2.0
2,463
package org.tribbloid.spookystuff.example.image import org.tribbloid.spookystuff.SpookyContext import org.tribbloid.spookystuff.actions._ import org.tribbloid.spookystuff.dsl._ import org.tribbloid.spookystuff.example.QueryCore /** * Created by peng on 10/06/14. */ object GoogleImage extends QueryCore { override...
chenUT/spookystuff
example/src/main/scala/org/tribbloid/spookystuff/example/image/GoogleImage.scala
Scala
apache-2.0
1,052
package filodb.core.reprojector import com.typesafe.scalalogging.slf4j.StrictLogging import org.velvia.filo.RowReader import scala.collection.mutable.HashMap import filodb.core.KeyRange import filodb.core.Types._ import filodb.core.metadata.{Column, Dataset, RichProjection} import filodb.core.store.SegmentInfo /** ...
markhamstra/FiloDB
core/src/main/scala/filodb.core/reprojector/MemTable.scala
Scala
apache-2.0
2,201
package breeze.linalg import org.scalatest.funsuite.AnyFunSuite /** * * @author dlwh */ class SliceVectorTest extends AnyFunSuite { test("basic slices of a counter") { val ctr = Counter("a" -> 1, "b" -> 2, "c" -> 42) val v: Vector[Int] = ctr(Seq("c", "b")) assert(v(0) === 42) assert(v(1) === 2) ...
scalanlp/breeze
math/src/test/scala/breeze/linalg/SliceVectorTest.scala
Scala
apache-2.0
1,952