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
// Copyright 2015,2016,2017,2018,2019,2020 Commonwealth Bank of Australia // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless req...
CommBank/grimlock
grimlock-core/src/test/scala/commbank/grimlock/matrix/TestMatrixSet.scala
Scala
apache-2.0
14,670
package temportalist.compression.main.client.model import java.util import com.google.common.collect.Lists import net.minecraft.block.state.IBlockState import net.minecraft.client.Minecraft import net.minecraft.client.renderer.block.model.SimpleBakedModel.Builder import net.minecraft.client.renderer.block.model._ imp...
TheTemportalist/Compression
src/main/scala/temportalist/compression/main/client/model/ItemListCompressed.scala
Scala
apache-2.0
3,396
package scala.collection.mutable import org.junit.runner.RunWith import org.junit.runners.JUnit4 import org.junit.Test import scala.collection.mutable @RunWith(classOf[JUnit4]) /* Test for scala/bug#8014 and ++ in general */ class VectorTest { val noVec = Vector.empty[Int] val smallVec = Vector.range(0,3) val ...
martijnhoekstra/scala
test/junit/scala/collection/mutable/VectorTest.scala
Scala
apache-2.0
1,331
/* * 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 ...
ConeyLiu/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/CountIf.scala
Scala
apache-2.0
2,209
package ir.bayan.academy.web /** * @author S.Hosein Ayat */ case class HttpRes(statusCode: Int, message: String, content: String) { } object HttpRes { implicit def requestJavaToScala(req: HttpResult): HttpRes = { HttpRes(req.statusCode, req.message, req.content) } implicit def requltScalaToJava(req: ...
h-ayat/simple-web
src/main/scala/ir/bayan/academy/web/HttpRes.scala
Scala
gpl-3.0
413
package org.broadinstitute.sting.queue.util import java.lang.IllegalArgumentException object ShellUtils { /** * Escapes the String it's passed so that it will be interpreted literally when * parsed by sh/bash. Can correctly escape all characters except \\0, \\r, and \\n * * Replaces all instances of ' ...
iontorrent/Torrent-Variant-Caller-stable
public/scala/src/org/broadinstitute/sting/queue/util/ShellUtils.scala
Scala
mit
1,306
package models.blog import java.sql.Timestamp import com.sksamuel.scrimage.{ Image => ScrImage } /** * Created by stanikol on 1/27/17. */ //object Data { // Article case class Article( id: Option[Long], sort_order: String, keywords: String, title: String, text: String, description: String, short_text...
stanikol/walnuts
server/app/models/blog/Data.scala
Scala
apache-2.0
768
//: ---------------------------------------------------------------------------- //: 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
elastic/src/test/scala/FlattendedSpec.scala
Scala
apache-2.0
7,984
package org.hibernate.cache.rediscala.regions import java.util.Properties import org.hibernate.cache.rediscala.client.RedisCache import org.hibernate.cache.rediscala.strategy.RedisAccessStrategyFactory import org.hibernate.cache.spi.TimestampsRegion /** * RedisTimestampsRegion * * @author 배성혁 sunghyouk.bae@gmail....
debop/debop4s
hibernate-rediscala/src/main/scala/org/hibernate/cache/rediscala/regions/RedisTimestampsRegion.scala
Scala
apache-2.0
779
package truerss.api import com.github.fntz.omhs.{CommonResponse, RoutingDSL} import io.netty.handler.codec.http.HttpResponseStatus import io.netty.util.CharsetUtil import truerss.services.ApplicationPluginsService class PluginsApi(private val pluginsService: ApplicationPluginsService) { import OMHSSupport._ impo...
truerss/truerss
src/main/scala/truerss/api/PluginsApi.scala
Scala
mit
1,042
import definiti.native._ import java.time.LocalDateTime package object my { class IsNonEmpty[A](message: String = "This list should not be empty") extends SimpleVerification[Seq[A]](message) { override def isValid(list: Seq[A]): Boolean = ListExtension.nonEmpty(list) } case class MyType(attribute: Seq[String...
definiti/definiti-scala-model
src/test/resources/samples/generics/attributeAsAliasTypeWithGeneric/output.scala
Scala
mit
628
/******************************************************************************* * Copyright (c) 2013 CWI * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://ww...
msteindorfer/oopsla15-artifact
pdb.values.persistent.scala/src/main/scala/org/eclipse/imp/pdb/facts/impl/persistent/scala/BoolValue.scala
Scala
epl-1.0
1,595
package com.eharmony.aloha.models import com.eharmony.aloha.audit.Auditor /** * Created by ryan on 1/18/17. */ trait SubmodelBase[U, N, -A, +B <: U] extends Submodel[N, A, B] with Model[A, B] { def auditor: Auditor[U, N, B] final def apply(a: A): B = subvalue(a).audit...
eHarmony/aloha
aloha-core/src/main/scala/com/eharmony/aloha/models/SubmodelBase.scala
Scala
mit
1,085
/* * 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 ...
vipul1409/zeppelin
zeppelin-display/src/test/scala/org/apache/zeppelin/display/angular/AbstractAngularElemTest.scala
Scala
apache-2.0
4,765
package com.asto.dmp.taobaowarn.util import com.asto.dmp.taobaowarn.base.Constants import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.{FileSystem, Path} import org.apache.spark.Logging import org.apache.spark.rdd.RDD /** * 文件相关的工具类 */ object FileUtils extends Logging { private val conf = new ...
zj-lingxin/dmp_taobao_warn
src/main/scala/com/asto/dmp/taobaowarn/util/FileUtils.scala
Scala
mit
1,624
/*********************************************************************** * 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 ...
tkunicki/geomesa
geomesa-accumulo/geomesa-accumulo-raster/src/main/scala/org/locationtech/geomesa/raster/iterators/RasterFilteringIterator.scala
Scala
apache-2.0
1,876
package org.apache.spark.ml.tree.impl /* * 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 Lice...
alessandrolulli/reforest
src/main/scala/org/apache/spark/ml/tree/impl/RandomForestRunner.scala
Scala
apache-2.0
52,298
/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
scalate/scalate
scalate-core/src/test/scala/org/fusesource/scalate/TemplateEngineHelpersTest.scala
Scala
apache-2.0
1,458
package com.krrrr38.mackerel4s package model import com.ning.http.client.FluentCaseInsensitiveStringsMap /** * When send invalid request, Mackerel send invalid response. * This class wrap Mackerel invalid response. * @param statusCode * @param contentType * @param headers * @param body */ class MackerelRespons...
krrrr38/mackerel-client-scala
src/main/scala/com/krrrr38/mackerel4s/model/MackerelClientException.scala
Scala
mit
797
/* * Copyright (c) 2012-2019 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...
RetentionGrid/snowplow
3-enrich/scala-common-enrich/src/main/scala/com.snowplowanalytics.snowplow.enrich/common/loaders/IpAddressExtractor.scala
Scala
apache-2.0
2,982
/* * 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 ...
bwsw/sj-platform
core/sj-engine-simulators/src/main/scala/com/bwsw/sj/engine/core/simulation/input/InputEngineSimulator.scala
Scala
apache-2.0
5,567
package dsentric.operators import dsentric._ import dsentric.contracts._ object Sanitization { def sanitizeContract[D <: DObject](contract:BaseContract[D], value:RawObject):Option[RawObject] = { def getSanitizer[D2 <: DObject, T](property: Property[D2, T]): Option[Sanitizer[T]] = property._dataOperators...
HigherState/dsentric
maps/src/main/scala/dsentric/operators/Sanitization.scala
Scala
apache-2.0
2,124
package com.jd.cluster import scala.concurrent.forkjoin.ThreadLocalRandom import akka.actor.Actor import akka.actor.ActorRef import akka.actor.ActorSelection.toScala import akka.actor.Address import akka.actor.RelativeActorPath import akka.actor.RootActorPath import akka.cluster.Cluster import akka.cluster.ClusterEven...
pengyanhong/demoAkka
src/com/jd/cluster/ClusterClientActor.scala
Scala
apache-2.0
2,203
/* * 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 ...
logzio/camel
components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
Scala
apache-2.0
8,697
/* * Copyright (C) 2014 - 2016 Softwaremill <http://softwaremill.com> * Copyright (C) 2016 - 2019 Lightbend Inc. <http://www.lightbend.com> */ package akka.kafka.benchmarks import java.util.Locale import akka.kafka.benchmarks.app.RunTestCommand import org.apache.kafka.clients.consumer.{ConsumerConfig, KafkaConsum...
softwaremill/reactive-kafka
benchmarks/src/main/scala/akka/kafka/benchmarks/KafkaTransactionFixtureGen.scala
Scala
apache-2.0
3,279
package scalaxy.streams package test import org.junit._ import org.junit.runner.RunWith import org.junit.runners.Parameterized.Parameters import scala.collection.JavaConversions._ @RunWith(classOf[Parallelized]) class MacroIntegrationTest( name: String, source: String, expectedMessages: CompilerMessages...
nativelibs4java/scalaxy-streams
src/test/scala/MacroIntegrationTest.scala
Scala
bsd-3-clause
895
package de.maci.beanmodel.generator.testhelper import scala.collection.JavaConverters.asScalaBufferConverter import org.junit.runner.RunWith import org.scalatest.Finders import org.scalatest.FlatSpec import org.scalatest.Matchers import org.scalatest.junit.JUnitRunner import de.maci.beanmodel.generator.testhelper.Va...
dangoe/maci-beanmodel
maci-beanmodel-gen/src/test/scala/de/maci/beanmodel/generator/testhelper/VariableElementMockerTest.scala
Scala
apache-2.0
2,572
/** * 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 * dist...
DigitalAssetCom/hlp-candidate
server/network/src/main/scala/org/hyperledger/network/codecs/HashCodec.scala
Scala
apache-2.0
1,041
/* * This file is part of Kiama. * * Copyright (C) 2008-2015 Anthony M Sloane, Macquarie University. * * Kiama 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 ...
solomono/kiama
library/src/org/kiama/example/til/TIL2_1Tests.scala
Scala
gpl-3.0
3,016
package equalitydemo import scalaz._ import Scalaz.{ToEqualOps => _, _} import org.scalactic._ import org.scalatest._ import TripleEqualsSupport.AToBEquivalenceConstraint import TripleEqualsSupport.BToAEquivalenceConstraint import scala.language.implicitConversions trait LowPriorityStrictScalazConstraints extends Tr...
bvenners/equality-integration-demo
src/main/scala/equalitydemo/StrictScalazEquality.scala
Scala
apache-2.0
1,176
package xyz.nabijaczleweli.lonning import scala.annotation.elidable import scala.annotation.elidable._ import org.joda.time.DateTime /** @author Jędrzej * @since 16.04.14 */ object Formatter { @inline final val format = System.getProperty("lonning.fromat", "dd.MM.yy HH:mm:ss") private final...
nabijaczleweli/Scala-Game-of-Life
src/main/scala/xyz/nabijaczleweli/lonning/Formatter.scala
Scala
mit
791
//package com.sksamuel.avro4s.github // //import com.sksamuel.avro4s.SchemaFor //import org.scalatest.funsuite.AnyFunSuite //import org.scalatest.matchers.should.Matchers //import shapeless.{:+:, CNil} // //case class Coproducts(cp: Int :+: String :+: Boolean :+: CNil) //case class CoproductOfCoproductsField(cp: Coprod...
sksamuel/avro4s
avro4s-core/src/test/scala/com/sksamuel/avro4s/github/Github273.scala
Scala
apache-2.0
557
package controllers import java.math.{BigDecimal => JBD} import anorm._ import play.api._ import play.api.Play.current import play.api.db.DB import play.api.mvc._ import com.github.nscala_time.time.Imports._ import models._ object Trades extends Controller with SafeCast { def tradesNoLegs(und: String, year: Str...
Exupery/optionometer
app/controllers/Trades.scala
Scala
mit
5,572
package chessagents import akka.actor.Actor import akka.actor.Props import akka.actor.ActorRef import akka.actor.ActorPath import akka.actor.ActorSystem import akka.pattern.ask import akka.util.Timeout import scala.concurrent.{Await, Future} import scala.concurrent.duration._ import piecesActors._; import chessagen...
m-kostrzewa/ChessAgents
src/chessagents/Player.scala
Scala
mit
8,153
package edu.washington.cs.knowitall.regex import scala.collection.JavaConverters._ import org.junit.runner.RunWith import org.specs2.mutable.Specification import org.specs2.runner.JUnitRunner import edu.washington.cs.knowitall.regex.Expression.BaseExpression @RunWith(classOf[JUnitRunner]) class WordRegularExpressio...
knowitall/openregex
src/test/scala/edu/washington/cs/knowitall/regex/WordRegularExpressionTest.scala
Scala
lgpl-3.0
2,335
package scala.virtualization.lms package common import java.io.PrintWriter import scala.virtualization.lms.internal.GenericNestedCodegen import collection.mutable.ArrayBuffer import scala.reflect.SourceContext trait SynchronizedArrayBufferOps extends ArrayBufferOps { /* object SynchronizedArrayBuffer { def app...
afernandez90/virtualization-lms-core
src/common/SynchronizedArrayBufferOps.scala
Scala
bsd-3-clause
2,081
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
maropu/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/ObjectAggregationIterator.scala
Scala
apache-2.0
13,356
/* * Copyright 2013 - 2020 Outworkers Ltd. * * 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...
outworkers/phantom
phantom-dsl/src/main/scala/com/outworkers/phantom/builder/query/Parts.scala
Scala
apache-2.0
7,476
/* * 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/main/scala/org/apache/spark/ml/ann/Layer.scala
Scala
apache-2.0
26,995
/* * 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 ...
WangTaoTheTonic/flink
flink-streaming-scala/src/test/scala/org/apache/flink/streaming/api/scala/WindowTranslationTest.scala
Scala
apache-2.0
75,694
/* * Copyright 2001-2013 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...
travisbrown/scalatest
src/test/scala/org/scalatest/SuiteSuite.scala
Scala
apache-2.0
30,155
package net.nomadicalien.ch7 import java.util.concurrent.{Callable, CountDownLatch, ExecutorService} object Nonblocking { trait Future[+A] { private[ch7] def apply(k: A => Unit): Unit } type Par[+A] = ExecutorService => Future[A] object Par { def run[A](es: ExecutorService)(p: Par[A]): A = { ...
BusyByte/func-prog-scala
exercises-and-notes/src/main/scala/net/nomadicalien/ch7/Nonblocking.scala
Scala
apache-2.0
6,588
class C { def f(a: Int, b: Int = 0) = 0 f(z = 0, a = 1) }
AlexSikia/dotty
tests/untried/neg/t4928.scala
Scala
bsd-3-clause
62
package metaconfig.internal object Levenshtein { def closestCandidate( query: String, candidates: Seq[String] ): Option[String] = { if (candidates.isEmpty) { None } else { val candidate = candidates.sortBy(distance(query)).head val maxLength = query.length() + candidate.lengt...
olafurpg/metaconfig
metaconfig-core/shared/src/main/scala/metaconfig/internal/Levenshtein.scala
Scala
apache-2.0
1,219
/* sbt -- Simple Build Tool * Copyright 2008, 2009 Mark Harrah, Vesa Vilhonen */ package sbt import java.io.File import java.net.{URL, URLClassLoader} import java.lang.reflect.{Method, Modifier} import Modifier.{isPublic, isStatic} import classpath.ClasspathUtilities trait ScalaRun { def run(mainClass: String, cl...
ornicar/xsbt
run/Run.scala
Scala
bsd-3-clause
3,501
package com.github.jeanadrien.gatling.mqtt.actions import com.github.jeanadrien.gatling.mqtt.client.MqttQoS import com.github.jeanadrien.gatling.mqtt.client.MqttQoS.MqttQoS import com.softwaremill.quicklens._ import io.gatling.core.action.Action import io.gatling.core.session._ import io.gatling.core.structure.Scenari...
jeanadrien/gatling-mqtt-protocol
src/main/scala/com/github/jeanadrien/gatling/mqtt/actions/PublishAndWaitActionBuilder.scala
Scala
apache-2.0
1,777
/* * Copyright (C) 2017 Fabrizio * * 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 ...
ColOfAbRiX/tankwar
src/main/scala/com/colofabrix/scala/gfx/GenericRender.scala
Scala
apache-2.0
1,919
package x7c1.wheat.modern.database.selector.presets import android.database.Cursor import x7c1.wheat.macros.database.Query import x7c1.wheat.modern.database.selector.{CanIdentify, CursorConverter, CursorReadable, CursorReifiable} import scala.language.{higherKinds, reflectiveCalls} abstract class CanFindEntity[ I[...
x7c1/Linen
wheat-modern/src/main/scala/x7c1/wheat/modern/database/selector/presets/CanFindEntity.scala
Scala
mit
725
package com.marcosgarciacasado.ssbatch import org.joda.time.DateTime /** * Key class for the quarter of hour measure aggregation. * * @author Marcos García Casado * */ class AggregatedMeasure (latitudec : String, longitudec : String, requestTimec : String, measurec : String) extends Serializable with Equals { ...
marcos-garcia/smartsantanderdataanalysis
ssbatch/src/main/scala/com/marcosgarciacasado/ssbatch/AggregatedMeasure.scala
Scala
gpl-2.0
1,350
package de.zalando.beard.performance import java.io.{PrintWriter, StringWriter} import com.github.mustachejava.DefaultMustacheFactory import org.scalameter.api._ import scala.collection.JavaConverters._ /** * @author dpersa */ object MustacheJavaBenchmark extends Bench.LocalTime { val context = Map[String, Any...
danpersa/beard
src/test/scala/de/zalando/beard/performance/MustacheJavaBenchmark.scala
Scala
apache-2.0
1,087
/* Copyright (c) 2008 Google 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...
mjanson/gdata-scala-client
src/com/google/gdata/client/AuthTokenFactory.scala
Scala
apache-2.0
1,783
val s = "He" println(s.product.toLong)
Gerhut/scala-for-the-impatient
Chapter2/7.scala
Scala
unlicense
39
package bita import com.redis._ import akka.actor.{ ActorSystem, Actor, Props, ActorRef } import akka.bita.{ RandomScheduleHelper, Scheduler } import akka.bita.pattern.Patterns._ import akka.util.duration._ import akka.util.Timeout import akka.dispatch.Await import bita.util.{ FileHelper, TestHelper } import bita.c...
Tjoene/thesis
Case_Programs/scala-redis-2.9-pre-scala-2.10/src/test/scala/bita/RenamenxSpec.scala
Scala
gpl-2.0
1,927
package com.twitter.scrooge.android_generator import com.twitter.scrooge.ast._ import com.github.mustachejava.{Mustache, DefaultMustacheFactory} import com.twitter.scrooge.mustache.ScalaObjectHandler import java.io.{FileWriter, File, StringWriter} import com.twitter.scrooge.ast.SetType import com.twitter.scrooge.ast.M...
nkhuyu/scrooge
scrooge-generator/src/main/scala/com/twitter/scrooge/android_generator/AndroidGenerator.scala
Scala
apache-2.0
5,636
package models import models.daos.ProductDAO import org.joda.time.DateTime case class Product (id: Long, name: String, description: Option[String] = None, createdAt: DateTime, updatedAt: DateTime, deletedAt: Option[DateTime] = None, partsSeq: Seq[Parts] = Nil) { def this(product: Product) = this( product...
KIWIKIGMBH/kiwierp
kiwierp-backend/app/models/Product.scala
Scala
mpl-2.0
500
package debop4s.data.slick.customtypes import debop4s.data.slick.AbstractSlickFunSuite import debop4s.data.slick.SlickExampleDatabase._ import debop4s.data.slick.SlickExampleDatabase.driver.simple._ import scala.reflect.ClassTag import scala.slick.lifted import scala.util.Try /** * DDD Component 또는 Record 형태의 정보를 매...
debop/debop4s
debop4s-data-slick/src/test/scala/debop4s/data/slick/customtypes/CustomRecordTypesFunSuite.scala
Scala
apache-2.0
2,321
/** * 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...
geeag/kafka
core/src/test/scala/unit/kafka/server/SimpleFetchTest.scala
Scala
apache-2.0
7,596
/** * 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...
prashantbh/kafka
core/src/test/scala/other/kafka/StressTestLog.scala
Scala
apache-2.0
3,825
// // Using Java varargs // // Compile and run: // $ scalac varargs.scala // $ scala varargs // object varargs extends App { val msg = java.text.MessageFormat.format( "At {1,time} on {1,date}, there was {2} on planet {0}.", "Hoth", new java.util.Date(), "a disturbance in the Force") pr...
sergev/vak-opensource
languages/scala/varargs.scala
Scala
apache-2.0
346
package slash_actions import models._ object Revote extends SlashAction { def execute( votingSession:Option[VotingSession], username:String, data:String):Option[String] = { if (votingSession.isDefined) { val session = votingSession.get val ticketDescription = session.ticket clearVo...
myrridin/chasm_bot
app/value_objects/slash_actions/Revote.scala
Scala
mit
891
/* * 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 ...
RSulzmann/openwhisk
tests/src/test/scala/org/apache/openwhisk/core/controller/test/ActivationsApiTests.scala
Scala
apache-2.0
35,813
package com.nyavro.manythanks.ws import org.scalatest._ import org.scalatest.concurrent.ScalaFutures import org.scalatest.time.{Millis, Seconds, Span} import scala.concurrent.ExecutionContext.Implicits.global class UserRepositoryTest extends WordSpec with Matchers with ScalaFutures with Config { implicit val defa...
nyavro/manythanks
repository/src/test/scala/com/nyavro/manythanks/ws/UserRepositoryTest.scala
Scala
apache-2.0
1,278
package redis.api import akka.util.ByteString trait Aggregate case object SUM extends Aggregate case object MIN extends Aggregate case object MAX extends Aggregate case class Limit(value: Double, inclusive: Boolean = true) { def toByteString: ByteString = ByteString(if (inclusive) value.toString else "(" + val...
beni55/rediscala
src/main/scala/redis/api/api.scala
Scala
apache-2.0
984
/** * 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
docgen/src/main/scala/io/deepsense/docgen/SparkOperationsDocGenerator.scala
Scala
apache-2.0
3,869
/** * MIT License * * Copyright (c) 2016-2018 James Sherwood-Jones <james.sherwoodjones@gmail.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, includi...
jSherz/lsd-members
backend/src/main/scala/com/jsherz/luskydive/core/Course.scala
Scala
mit
1,594
/* * Copyright 2011-2018 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
wiacekm/gatling
gatling-core/src/main/scala/io/gatling/core/stats/writer/DataWriterType.scala
Scala
apache-2.0
1,442
package objsets import common._ import TweetReader._ /** * A class to represent tweets. */ class Tweet(val user: String, val text: String, val retweets: Int) { override def toString: String = "User: " + user + "\\n" + "Text: " + text + " [" + retweets + "]" } /** * This represents a set of objects of ty...
shouya/thinking-dumps
progfun/week3/objsets/src/main/scala/objsets/TweetSet.scala
Scala
mit
7,032
package com.teambytes.inflatable.raft.cluster import akka.testkit.ImplicitSender import concurrent.duration._ import akka.cluster.ClusterEvent.{CurrentClusterState, MemberUp} import akka.cluster.Cluster import akka.actor.{RootActorPath, Props} import akka.util.Timeout import clusters._ import com.teambytes.inflatable....
grahamar/inflatable
src/multi-jvm/scala/com/teambytes/inflatable/raft/cluster/ClusterRaftClientSpec.scala
Scala
apache-2.0
3,021
package com.jiffey.slick.additions import scala.slick.session.{Database => SlickDatabase} trait DbInfo { def database: SlickDatabase def driverName: String }
dre1080/slick-additions
src/main/scala/com/jiffey/slick/additions/DbInfo.scala
Scala
apache-2.0
166
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
shaoxuan-wang/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/plan/stream/sql/RelTimeIndicatorConverterTest.scala
Scala
apache-2.0
5,118
package org.thp.cortex.controllers import javax.inject.{ Inject, Singleton } import play.api.http.{ FileMimeTypes, HttpErrorHandler } import play.api.mvc.{ Action, AnyContent } import controllers.{ Assets, AssetsMetadata, ExternalAssets } import play.api.Environment import scala.concurrent.ExecutionContext trait Ass...
CERT-BDF/Cortex
app/org/thp/cortex/controllers/AssetCtrl.scala
Scala
agpl-3.0
839
package tryp import scala.concurrent.duration._ import org.specs2.matcher.{Matcher, AnyMatchers, MatchResult, ValueChecksBase, ValueCheck, Expectable, TrypExpectable} import org.specs2.execute.NoDetails import org.specs2.SpecificationLike object PerformableMatcher { def result[A, B, F[_], S <: F[A]](check: ValueCh...
tek/pulsar
unit/main/src/matchers.scala
Scala
mit
2,887
/* * Copyright 2011-2019 Asakusa Framework Team. * * 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 ...
ueshin/asakusafw-spark
compiler/src/main/scala/com/asakusafw/spark/compiler/graph/branching/BranchKeysField.scala
Scala
apache-2.0
2,736
package com.twitter.finagle.thrift.transport.netty3 import com.twitter.finagle.thrift.ThriftClientFramedPipelineFactory import org.apache.thrift.protocol.TProtocolFactory import org.jboss.netty.channel.{ChannelPipeline, ChannelPipelineFactory} private[finagle] case class ThriftClientBufferedPipelineFactory( proto...
BuoyantIO/finagle
finagle-thrift/src/main/scala/com/twitter/finagle/thrift/transport/netty3/ThriftClientBufferedPipelineFactory.scala
Scala
apache-2.0
631
package drt.shared import java.util.UUID import drt.shared.CrunchApi.MillisSinceEpoch import drt.shared.Queues.Queue import drt.shared.Terminals.Terminal import upickle.default.{ReadWriter, macroRW} trait HasExpireables[A] { def purgeExpired(expireBefore: () => SDateLike): A } trait Expireable { def isExpired(e...
UKHomeOffice/drt-scalajs-spa-exploration
shared/src/main/scala/drt/shared/StaffMovement.scala
Scala
apache-2.0
1,107
package extracells.item import extracells.api.{ECApi, IWirelessGasTermHandler} import extracells.item.ItemWirelessTerminalFluid.isInCreativeTab import extracells.models.ModelManager import net.minecraft.creativetab.CreativeTabs import net.minecraft.entity.player.EntityPlayer import net.minecraft.item.{Item, ItemStack}...
ExtraCells/ExtraCells2
src/main/scala/extracells/item/ItemWirelessTerminalGas.scala
Scala
mit
1,367
package msgpack4z import scalaprops._ import UnionGen._ object MsgpackUnionSpec extends Scalaprops { override def param = super.param.copy( minSuccessful = 10000 ) val orderLaws = scalazlaws.order.all[MsgpackUnion] }
msgpack4z/msgpack4z-core
src/test/scala/msgpack4z/MsgpackUnionSpec.scala
Scala
mit
238
package aecor.example.transaction import aecor.example.account.AccountId import aecor.example.common.Amount import aecor.example.transaction.TransactionRoute.ApiResult import aecor.example.transaction.transaction.Transactions import cats.effect.{ Concurrent, Timer } import cats.implicits._ import scala.concurrent.dura...
notxcain/aecor
modules/example/src/main/scala/aecor/example/transaction/DefaultTransactionService.scala
Scala
mit
1,753
package quizleague.web.model import scala.scalajs.js import scala.scalajs.js.annotation.ScalaJSDefined class Venue( val id:String, val name:String, val address:String, val phone:String, val email:String, val website:String, val imageURL:String, val retired:Boolean = false ) extends Mo...
gumdrop/quizleague-maintain
js/src/main/scala/quizleague/web/model/Venue.scala
Scala
mit
585
/* 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...
vidyar/twitterscalding
scalding-core/src/main/scala/com/twitter/scalding/serialization/Externalizer.scala
Scala
apache-2.0
1,192
package lang.lightweightjava.ast.statement import lang.lightweightjava.ast._ import name.namegraph.{NameGraphExtended, NameGraph} import name.{Identifier, Name, Renaming} import scala.language.implicitConversions trait TermVariable extends Identifier with AST { override def allNames = Set() protected def rename...
matthisk/hygienic-transformations
scala/src/main/scala/lang/lightweightjava/ast/statement/TermVariable.scala
Scala
lgpl-3.0
2,196
class i0 { val i1: (Any => String) = ??? } object i0 { import Ordering.{ implicitly => } (true: Boolean) match { case _: i1 => true } def i1(erased i2: Int): Int = { i1: Set[Int] => } }
som-snytt/dotty
tests/fuzzy/14b960e57195554a6a085eae8e039a949e8b106d.scala
Scala
apache-2.0
185
package org.mozartoz.bootcompiler.fastparse import java.io.File import org.mozartoz.bootcompiler.fastparse.Tokens.PreprocessorDirective import org.mozartoz.bootcompiler.fastparse.Tokens.PreprocessorDirectiveWithArg import org.mozartoz.bootcompiler.fastparse.Tokens.Token import org.mozartoz.bootcompiler.BootCompiler.So...
eregon/mozart-graal
bootcompiler/src/main/scala/org/mozartoz/bootcompiler/fastparse/Preprocessor.scala
Scala
bsd-2-clause
4,245
/* * 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 ...
shaneknapp/spark
core/src/test/scala/org/apache/spark/status/AppStatusStoreSuite.scala
Scala
apache-2.0
9,866
/* * The MIT License * * Copyright (c) 2016 Fulcrum Genomics LLC * * 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...
fulcrumgenomics/fgbio
src/main/scala/com/fulcrumgenomics/vcf/AssessPhasing.scala
Scala
mit
49,087
package de.jannikarndt.datamover.monitor trait Monitoring { protected val monitor: Monitor = Monitor.getMonitor(getClass.getName) }
JannikArndt/DataMover
src/main/scala/de/jannikarndt/datamover/monitor/Monitoring.scala
Scala
mit
137
package cmwell.analytics.data import cmwell.analytics.util.Shard import scala.collection.mutable class XORSummaryFactory extends DataWriterFactory[IndexWithSourceHash]{ val shardSummaries = mutable.Map.empty[Shard, XORSummary] override def apply(shard: Shard): DataWriter[IndexWithSourceHash] = shardSummaries.s...
dudi3001/CM-Well
tools/dataConsistencyTool/extract-index-from-es/src/main/scala/cmwell/analytics/data/XORSummaryFactory.scala
Scala
apache-2.0
484
/* Copyright 2017-2018 EconomicSL 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 ...
EconomicSL/mechanisms
src/main/scala/org/economicsl/mechanisms/CardinalSocialWelfareFunction.scala
Scala
apache-2.0
2,802
package com.kalmanb.sbt.extra import org.scalatest.FunSpec class JenkinsGitPluginTest extends FunSpec { import JenkinsGitPlugin.Git._ val example = <project> <description/> <scm class="hudson.plugins.git.GitSCM" plugin="git@1.4.0"> <configVersion>2</configVersion> <userRemoteConfi...
kalmanb/sbt-jenkins-manager
src/test/scala/com/kalmanb/sbt/extra/JenkinsGitPluginTest.scala
Scala
apache-2.0
996
package BIDMach.models import BIDMat.{Mat,SBMat,CMat,DMat,FMat,IMat,HMat,GMat,GIMat,GSMat,SMat,SDMat} import BIDMat.MatFunctions._ import BIDMat.SciFunctions._ import BIDMat.Solvers._ import BIDMach.datasources._ import BIDMach.datasinks._ import BIDMach.updaters._ import BIDMach._ /** * A scalable appro...
jamesjia94/BIDMach
src/main/scala/BIDMach/models/SVD.scala
Scala
bsd-3-clause
5,725
package com.datastax.spark.connector.cql import com.datastax.driver.core.{AuthProvider, PlainTextAuthProvider} import com.datastax.spark.connector.util.ReflectionUtil import org.apache.spark.SparkConf /** Stores credentials used to authenticate to a Cassandra cluster and uses them * to configure a Cassandra connect...
brkyvz/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/cql/AuthConf.scala
Scala
apache-2.0
3,042
/* * Copyright (c) 2016. Y Experiment (yexperiment.com) MIT License */ package states import com.jme3.app.Application import com.jme3.app.state.AppStateManager import com.jme3.asset.AssetManager import com.jme3.light.DirectionalLight import com.jme3.light.AmbientLight import com.jme3.math.ColorRGBA import com.jme3....
Y-Experiment/LW3D
src/main/scala/states/EnvironmentState.scala
Scala
mit
1,742
package reactivemongo.api import scala.language.higherKinds import scala.collection.generic.CanBuildFrom import scala.collection.mutable.Builder import scala.concurrent.{ ExecutionContext, Future } private[api] trait CursorCompat[T] { _: DefaultCursor.Impl[T] with CursorCompatAPI[T] => import Cursor.{ Cont, E...
cchantep/ReactiveMongo
driver/src/main/scala-2.13-/api/CursorCompat.scala
Scala
apache-2.0
1,771
package com.aquamentis.nwsr import android.content.ContentValues import android.content.Context import android.content.SharedPreferences import android.database.Cursor import android.database.sqlite.SQLiteDatabase import android.database.sqlite.SQLiteOpenHelper import android.preference.PreferenceManager import scala...
alexclare/nwsr
src/scala/nwsr/database.scala
Scala
gpl-3.0
8,193
/******************************************************************************* * Copyright 2010 Maxime Lévesque * * 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.apa...
ccap/Squeryl
src/main/scala/org/squeryl/internals/PosoMetaData.scala
Scala
apache-2.0
10,881
package example import java.util.NoSuchElementException object Lists { /** * This method computes the sum of all elements in the list xs. There are * multiple techniques that can be used for implementing this method, and * you will learn during the class. * * For this example assignment you can use...
guhemama/moocs
Parallel.Programming.in.Scala.Coursera/Assignment0/src/main/scala/example/Lists.scala
Scala
bsd-3-clause
1,855
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
maropu/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala
Scala
apache-2.0
22,782
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/amls-frontend
test/models/eab/EabSpec.scala
Scala
apache-2.0
11,017
package scalacookbook.chapter03 import util.control.Breaks._ /** * Created by liguodong on 2016/6/28. */ object ImplBreakAndContinue extends App{ println("\\n=== BREAK EXAMPLE ===") breakable { for (i <- 1 to 10) { println(i) if (i > 4) break // break out of the for loop } } println(...
liguodongIOT/java-scala-mix-sbt
src/main/scala/scalacookbook/chapter03/ImplBreakAndContinue.scala
Scala
apache-2.0
3,858
/* * Copyright 2015 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...
keithhall/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v2/B150.scala
Scala
apache-2.0
824