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
import org.scalatest.{Matchers, FunSuite} /** @version 1.2.0 */ class SumOfMultiplesTest extends FunSuite with Matchers { test("multiples of 3 or 5 up to 1") { SumOfMultiples.sum(Set(3, 5), 1) should be(0) } test("multiples of 3 or 5 up to 4") { pending SumOfMultiples.sum(Set(3, 5), 4) should be(3)...
TGITS/programming-workouts
exercism/scala/sum-of-multiples/src/test/scala/SumOfMultiplesTest.scala
Scala
mit
1,580
package exercise.ex3 sealed trait List[+A] case object Nil extends List[Nothing] case class Cons[+A](head: A, tail: List[A]) extends List[A] object List { def sum(ints: List[Int]): Int = ints match { case Nil => 0 case Cons(x, xs) => x + sum(xs) } def product(ds: List[Double]): Double = ds match { ...
pluselc/fpinscala
src/main/scala/exercise/ex3/List.scala
Scala
mit
2,974
package com.twitter.finagle import com.twitter.util._ import java.net.InetSocketAddress /** * A namer is a context in which a [[com.twitter.finagle.NameTree * NameTree]] is bound. The context is provided by the * [[com.twitter.finagle.Namer.lookup lookup]] method, which * translates [[com.twitter.finagle.Path Pat...
travisbrown/finagle
finagle-core/src/main/scala/com/twitter/finagle/Namer.scala
Scala
apache-2.0
7,648
package org.sapia.mediafire.core /** * Holds Mediafire session state. * * @author yduchesne */ class MfSession(sessionToken: String) { /** * @return the session token, as returned by Mediafire upon authentication.. */ def getToken() = sessionToken }
sapia-oss/mediafire_maven_plugin
core/src/main/scala/org/sapia/mediafire/core/MfSession.scala
Scala
apache-2.0
266
/* * The MIT License * * Copyright 2015 misakura. * * 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...
t-kgd/library-water
water-scala-core/src/main/scala/jp/gr/java_conf/kgd/library/water/scala/core/value/Size3.scala
Scala
mit
1,557
package com.jejking.rprng.rng import org.apache.commons.math3.random.RandomGenerator import scala.reflect.ClassTag /** * Provides functionality to instantiate various Commons Math [[org.apache.commons.math3.random.RandomGenerator]] types. */ object CommonsMathRandomGeneratorFactory { /** * Creates a new [[or...
jejking/rprng
src/main/scala/com/jejking/rprng/rng/CommonsMathRandomGeneratorFactory.scala
Scala
apache-2.0
766
/* * Copyright 2012 Eligotech BV. * * 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...
eligosource/eventsourced-example
src/main/scala/org/eligosource/eventsourced/example/domain/Adapter.scala
Scala
apache-2.0
1,628
package wom.types import spray.json.JsObject import wom.values._ import scala.util.{Failure, Success, Try} case object WomObjectType extends WomType { val toDisplayString: String = "Object" private def handleCoercionFailures(tries: Try[_]*) = { val errorMessages = tries collect { case Failure(f) => f....
ohsu-comp-bio/cromwell
wom/src/main/scala/wom/types/WomObjectType.scala
Scala
bsd-3-clause
1,616
/* * 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
sql/hive/src/test/scala/org/apache/spark/sql/hive/PartitionedTablePerfStatsSuite.scala
Scala
apache-2.0
17,737
package pp.imdg trait Cache[Key, Value] { def get(key: Key): Option[Value] def put(key: Key, value: Value): Unit def contains(key: Key): Boolean def evict(key: Key): Unit def clear(): Unit }
ppalchikov/pp-imdg
src/main/scala/pp/imdg/Cache.scala
Scala
apache-2.0
206
package com.box.castle.router.mock import java.util.concurrent.atomic.AtomicLong import com.box.castle.batch.CastleMessageBatch import com.box.castle.collections.splitEvenly import kafka.message._ trait MockBatchTools { val MessageOverhead = Message.CrcLength + Message.MagicLength + Message.AttributesLeng...
Box-Castle/router
src/main/scala/com/box/castle/router/mock/MockBatchTools.scala
Scala
apache-2.0
3,056
object Settings { // when changing this, also look at 'scripts/gradingImpl' and the files in s3/settings val courseId = "progfun-2012-001" val challengeUrl = "https://class.coursera.org/"+ courseId +"/assignment/challenge" val submitUrl = "https://class.coursera.org/"+ courseId +"/assignment/submit" val fo...
samsol/FunProg-scala
recfun/project/Settings.scala
Scala
agpl-3.0
1,108
package de.frosner.broccoli.templates.jinjava import javax.inject.Singleton import com.google.inject.{AbstractModule, Provides} import com.hubspot.jinjava.JinjavaConfig import de.frosner.broccoli.BroccoliConfiguration import net.codingwell.scalaguice.ScalaModule /** * Provide JinjavaConfig for the template rendere...
FRosner/cluster-broccoli
server/src/main/scala/de/frosner/broccoli/templates/jinjava/JinjavaModule.scala
Scala
apache-2.0
1,100
/* ********************************************************************* * This file is part of the MELIA theorem prover * * Copyright (c) NICTA/Peter Baumgartner <Peter.Baumgartner@nicta.com.au> * * MELIA is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public Licen...
newca12/MELIA
src/Integers.scala
Scala
gpl-3.0
15,979
/* * * 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 * "Licens...
Sotera/aggregate-micro-paths
spark/src/main/scala/org/xdata/analytics/spark/micropathing/runnables/TextInputRunnable.scala
Scala
apache-2.0
3,815
package scredis.commands import scredis.io.NonBlockingConnection import scredis.protocol.requests.SetRequests._ import scredis.serialization.{ Reader, Writer } import scala.concurrent.Future import scala.concurrent.duration._ /** * This trait implements set commands. * * @define e [[scredis.exceptions.RedisErrorR...
Livestream/scredis
src/main/scala/scredis/commands/SetCommands.scala
Scala
apache-2.0
8,089
package models.analysis.events import models.analysis.Size import no.uio.musit.formatters.WithDateTimeFormatters import no.uio.musit.models.ActorId import org.joda.time.DateTime import play.api.libs.json._ object AnalysisResults { trait ResultTypeCompanion extends WithDateTimeFormatters { val resultType: Strin...
MUSIT-Norway/musit
service_backend/app/models/analysis/events/AnalysisResults.scala
Scala
gpl-2.0
8,909
package pl.oen.msi.keyboard import org.kohsuke.args4j import org.kohsuke.args4j.spi.{OneArgumentOptionHandler, Setter} import org.kohsuke.args4j.{CmdLineParser, OptionDef} object Args { final val HIDE_PARAM_NAME = "-hide" } class Args { @args4j.Option(name = "-c1", aliases = Array("-colour1", "--colour1", "--c1"...
oen9/msi-keyboard
src/main/scala/pl/oen/msi/keyboard/Args.scala
Scala
gpl-3.0
1,329
package org.labrad.data import org.labrad.types._ /** * A utility class that encapsulates an array of complex numbers. * * This class is much more efficient than having an array of Complex objects * because only two arrays need to be allocated, not one object per element * in the array. In addition, this class ...
labrad/scalabrad
core/src/main/scala/org/labrad/data/ComplexArray.scala
Scala
mit
1,444
import org.reactivecouchbase.ReactiveCouchbaseDriver import org.reactivecouchbase.CouchbaseRWImplicits.documentAsJsObjectReader import org.specs2.mutable.{Tags, Specification} import play.api.libs.iteratee.Enumerator import play.api.libs.json.JsObject import scala.concurrent.Await class CounterSpec extends Specificati...
wsargent/ReactiveCouchbase-core
driver/src/test/scala/CounterSpec.scala
Scala
apache-2.0
2,776
trait Functor[F[_]] { def map[A,B](fa: F[A], f: A => B): F[B] } trait ComposeT[F[_],G[_]] { type Apply[A] = F[G[A]] } case class Compose[F[_],G[_]]() { def Functor(implicit f: Functor[F], g: Functor[G]): Functor[ComposeT[F,G]#Apply] = new Functor[ComposeT[F,G]#Apply] { def map[A,B](c: ComposeT[F,G]#Ap...
som-snytt/dotty
tests/untried/neg/t4079/t4079_1.scala
Scala
apache-2.0
772
/*********************************************************************** * 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/iterators/AggregatingScan.scala
Scala
apache-2.0
10,592
/* * 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 ...
caneGuy/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/LookupCatalog.scala
Scala
apache-2.0
4,453
package com.bio4j.dynamograph import com.bio4j.dynamograph.model.AnyEdgeTables import com.bio4j.dynamograph.reader.AnyEdgeReader import ohnosequences.scarph._ import ohnosequences.typesets._ import com.bio4j.dynamograph.default._ trait AnyDynamoEdge extends AnyEdge { dynamoEdge => final type Raw = Representation...
bio4j/dynamograph
src/main/scala/com/bio4j/dynamograph/AnyDynamoEdge.scala
Scala
agpl-3.0
1,947
package be.ellefant.cloudr import android.accounts.Account import android.content.{ SyncResult, ContentProviderClient, AbstractThreadedSyncAdapter } import android.database.Cursor import android.os.Bundle import android.accounts.AuthenticatorException import android.accounts.OperationCanceledException import android.d...
sdb/cloudr
app/src/be/ellefant/cloudr/SyncService.scala
Scala
gpl-3.0
5,699
package japgolly.scalajs.react.callback trait Exports { import japgolly.scalajs.react.{callback => C} final type AsyncCallback[+A] = C.AsyncCallback[A] final val AsyncCallback = C.AsyncCallback final type Callback = C.Callback final val Callback = C.Callback final type CallbackTo[+A] = C.CallbackT...
japgolly/scalajs-react
callback/src/main/scala/japgolly/scalajs/react/callback/Exports.scala
Scala
apache-2.0
476
package se.culvertsoft.mgen.visualdesigner import java.util.ArrayList import java.util.UUID import se.culvertsoft.mgen.visualdesigner.model.ClassPathEntityId import se.culvertsoft.mgen.visualdesigner.model.CustomType import se.culvertsoft.mgen.visualdesigner.model.CustomTypeField import se.culvertsoft.mgen.visualdesig...
culvertsoft/mgen-visualdesigner
src/main/scala/se/culvertsoft/mgen/visualdesigner/EntityFactory.scala
Scala
gpl-2.0
3,769
package com.github.krzysztofkowalski.sessionCache import play.api.mvc._ import java.util.UUID import play.api.Application import scala.concurrent.{Future, ExecutionContext} import ExecutionContext.Implicits.global import play.api.mvc.Cookie import scala.Some import scala.reflect.ClassTag /** * Essentiall...
KrzysztofKowalski/play-session-cache
app/com/github/krzysztofkowalski/sessionCache/SessionCache.scala
Scala
lgpl-3.0
4,072
package scbson.pickle.protocol import scala.reflect.ClassTag import scutil.lang._ import scbson.ast._ import scbson.pickle._ object CollectionProtocol extends CollectionProtocol trait CollectionProtocol { implicit def SetFormat[T](implicit ev:Format[Seq[T]]):Format[Set[T]] = ev compose Bijection(_.toVector, _....
ritschwumm/scbson
modules/pickle/src/main/scala/protocol/CollectionProtocol.scala
Scala
bsd-2-clause
2,412
import scala.collection.immutable.Set import scala.io.Source import scala.collection.mutable.ArrayBuffer import scala.collection.immutable.Set import java.text.SimpleDateFormat import java.util.Date import java.io._ /* REF: http://wanghuanming.com/2014/10/spark-apriori/ */ object aprioriAlgm{ def g...
heming621/postgraduate-
runAlone/project03C/src/aprioriAlgm.scala
Scala
mit
5,238
/* * 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 ...
chenc10/Spark-PAF
mllib/src/main/scala/org/apache/spark/mllib/stat/test/ChiSqTest.scala
Scala
apache-2.0
10,628
package com.appliedscala.events import java.util.UUID import play.api.libs.json.Json /** * * AnswerUpvoted class * <p/> */ case class AnswerUpvoted(answerId: UUID, userId: UUID, questionId: UUID) extends EventData{ override def action = AnswerUpvoted.actionName override def json = Json.writes[AnswerUpvot...
getArtemUsername/play-and-events
events/src/main/scala/com/appliedscala/events/AnswerUpvoted.scala
Scala
mit
451
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
tophua/spark1.52
sql/core/src/main/scala/org/apache/spark/sql/sources/interfaces.scala
Scala
apache-2.0
40,784
/* * Copyright (C) 2012 The Regents of The University California. * 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/LICENS...
lzshlzsh/shark
src/test/scala/shark/memstore2/column/CompressionAlgorithmSuite.scala
Scala
apache-2.0
12,117
object Test { import scala.collection._ trait T { def f() : Unit } def view = new T { def f() = () } trait TLike[+A, RR] { self => def repr: RR = ??? def view2 = new TraversableView[A, RR] { protected lazy val underlying = self.repr override def foreach[U](f: A => U): Unit =...
densh/dotty
tests/pos/i938.scala
Scala
bsd-3-clause
337
// See LICENSE.txt for license details. package examples import chisel3.iotesters.{PeekPokeTester, Driver, ChiselFlatSpec} class VecSearchTests(c: VecSearch) extends PeekPokeTester(c) { val list = VecSearchTest.pattern for (elt <- list) { expect(c.io.out, elt) step(1) } } class VecSearchTester extends ...
timtian090/Playground
chiselTutorial/src/test/scala/examples/VecSearchTests.scala
Scala
mit
568
package com.airbnb.scheduler.state import com.airbnb.scheduler.jobs._ import org.joda.time.Hours import org.specs2.mutable._ import org.specs2.mock._ class PersistenceStoreSpec extends SpecificationWithJUnit with Mockito { "MesosStatePersistenceStore" should { "Writing and reading ScheduledBasedJob a job work...
doronin/chronos
src/test/scala/com/airbnb/scheduler/state/PersistenceStoreSpec.scala
Scala
apache-2.0
2,254
/* * 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 ...
jatin9896/incubator-carbondata
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/localdictionary/LocalDictionarySupportLoadTableTest.scala
Scala
apache-2.0
12,261
package combinators /* Copyright [2013] [Tindr Solutions] 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...
boldradius/form-combinators
src/main/scala/example/Html.scala
Scala
apache-2.0
2,502
package poker.app import org.scalatest.FunSuite import poker.app.Classification._ import poker.core.HandType.RoyalFlush import poker.core.HandStatus import poker.TestHelpers._ final class ClassificationTest extends FunSuite { test("doMain") { assert(doMain(royalFlushStrArray) === HandStatus(RoyalFlush)) } }
kyuksel/poker
src/test/scala/poker/app/ClassificationTest.scala
Scala
mit
318
package enumeratum.values import enumeratum.values.BSONValueHandlers._ import org.scalatest.funspec.AnyFunSpec import org.scalatest.matchers.should.Matchers /** @author * Alessandro Lacava (@lambdista) * @since 2016-04-23 */ class EnumBsonHandlerSpec extends AnyFunSpec with Matchers with EnumBsonHandlerHelper...
lloydmeta/enumeratum
enumeratum-reactivemongo-bson/src/test/scala/enumeratum/values/EnumBsonHandlerSpec.scala
Scala
mit
2,278
/* * 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 ...
Intel-bigdata/OAP
oap-shuffle/remote-shuffle/src/main/scala/org/apache/spark/shuffle/remote/RemoteShuffleManager.scala
Scala
apache-2.0
9,904
package is.hail.expr.ir.lowering import is.hail.expr.ir.agg.Extract import is.hail.expr.ir._ import is.hail.utils.FastSeq trait LoweringPass { val before: IRState val after: IRState val context: String final def apply(ctx: ExecuteContext, ir: BaseIR): BaseIR = { ctx.timer.time(context) { ctx.timer....
danking/hail
hail/src/main/scala/is/hail/expr/ir/lowering/LoweringPass.scala
Scala
mit
4,234
package org.splink.pagelets.twirl import akka.stream.scaladsl.{Concat, Source} import org.splink.pagelets.{Fingerprint, Head, PageStream} import play.twirl.api.{Appendable, Format, Html, HtmlFormat} case class HtmlPageStream(head: Head, body: HtmlStream, js: Option[Fingerprint] = None) class HtmlStream(val source: ...
splink/pagelets
src/main/scala/org/splink/pagelets/twirl/HtmlStream.scala
Scala
apache-2.0
1,353
/* * Copyright 2011-2021 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 ...
asakusafw/asakusafw-spark
runtime/src/main/scala/com/asakusafw/spark/runtime/serializer/KryoRegistrator.scala
Scala
apache-2.0
3,255
package zzb.srvdemo.schema import org.squeryl._ import zzb.srvdemo.entites.{Company, User} object Util extends PrimitiveTypeMode import Util._ /** * Created with IntelliJ IDEA. * User: Simon Xiao * Date: 13-8-20 * Time: 下午5:00 * Copyright baoxian.com 2012~2020 */ object UserDBSchema extends Schema { val use...
stepover/zzb
examples/srvbox-demoService/src/main/scala/zzb/srvdemo/schema/Schemas.scala
Scala
mit
589
// immutable //class Greeter(message: String) { // println("A greeter is being instantiated") // def SayHi() = println(message) //} //val greeter = new Greeter("Hello world!") //greeter.SayHi() //--------------------------------------------------------------------- // mutable //class Greeter(var message: String)...
kwailamchan/programming-languages
scala/learning_scala/constructor.scala
Scala
mit
1,188
package de.choffmeister.microserviceutils.mongodb.testkit import de.choffmeister.microserviceutils.RandomString import de.choffmeister.microserviceutils.components.BaseComponents import de.choffmeister.microserviceutils.mongodb.components.DefaultMongoDbComponents import org.scalatest.{BeforeAndAfterAll, Suite} import...
choffmeister/microservice-utils
microservice-utils-mongodb-testkit/src/main/scala/de/choffmeister/microserviceutils/mongodb/testkit/TestMongoDbComponents.scala
Scala
mit
711
package br.gov.lexml.urnformatter.compacto import junit.framework.Assert.assertEquals import junit.framework.TestCase class Urn2NomeCompactoTest extends TestCase { def testLabel_art1() { assertEquals("art. 1º", Urn2NomeCompacto.format("art1")) } def testLabel_art1_cpt() { assertEquals("art. 1º, caput"...
lexml/lexml-urn-formatter
src/test/scala/br/gov/lexml/urnformatter/compacto/Urn2NomeCompactoTest.scala
Scala
gpl-3.0
46,614
package org.bitcoins.rpc.marshallers.networking import org.bitcoins.rpc.bitcoincore.networking.{NetworkInfo, NetworkInfoImpl, NetworkConnections} import org.bitcoins.rpc.marshallers.RPCMarshallerUtil import spray.json._ /** * Created by Tom on 1/6/2016. */ object NetworkRPCMarshaller extends DefaultJsonProtocol wi...
bitcoin-s/bitcoin-s-rpc-client
src/main/scala/org/bitcoins/rpc/marshallers/networking/NetworkRPCMarshaller.scala
Scala
mit
2,428
package au.net.hivemedia.crateconnector import java.io.IOException import org.json4s.NoTypeHints import org.json4s.native.Serialization import org.json4s.native.Serialization.write import io.crate.client.CrateClient /** * CrateObject supplies methods * for objects to store them in * a Crate Database * * @author ...
LiamHaworth/crate-connector
src/main/scala/au/net/hivemedia/crateconnector/CrateObject.scala
Scala
apache-2.0
4,153
package scorex.lagonaki import org.scalatest.{BeforeAndAfterAll, Sequential} import scorex.lagonaki.TestingCommons._ import scorex.lagonaki.integration._ import scorex.lagonaki.integration.api._ import scorex.lagonaki.unit._ import scorex.transaction.state.StateTest import scorex.transaction.state.database.blockchain....
alexeykiselev/WavesScorex
src/test/scala/scorex/lagonaki/LagonakiTestSuite.scala
Scala
cc0-1.0
1,344
package org.jetbrains.plugins.scala package lang package psi package api package expr /** * @author Alexander Podkhalyuzin * Date: 06.03.2008 */ trait ScPostfixExpr extends ScExpression with ScSugarCallExpr { def operand: ScExpression = findChildrenByClassScala(classOf[ScExpression]).apply(0) def o...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/api/expr/ScPostfixExpr.scala
Scala
apache-2.0
836
/* * JBoss, Home of Professional Open Source * Copyright 2012 Red Hat Inc. and/or its affiliates and other * contributors as indicated by the @author tags. All rights reserved. * See the copyright.txt in the distribution for a full listing of * individual contributors. * * This is free software; you can redistri...
nmldiegues/stibt
infinispan/server/memcached/src/test/scala/org/infinispan/server/memcached/MemcachedMultiNodeTest.scala
Scala
apache-2.0
2,559
package tethys.readers import org.scalatest.matchers.should.Matchers.{value => _, _} import org.scalatest.flatspec.AnyFlatSpec import tethys.JsonReader import tethys.commons.{Token, TokenNode} import tethys.commons.TokenNode._ import tethys.readers.DefaultReadersTest.TestDefinition import tethys.readers.tokens._ impo...
tethys-json/tethys
modules/core/src/test/scala/tethys/readers/DefaultReadersTest.scala
Scala
apache-2.0
2,272
/** * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * to You under the Apache License, Version 2.0 (the "License"); you may not...
vkroz/kafka
core/src/test/scala/integration/kafka/api/SSLConsumerTest.scala
Scala
apache-2.0
9,433
import org.apache.spark.sql.SparkSession import scala.io.Source.fromFile object GitHubDay { def main(args: Array[String]): Unit = { val sparkSession = SparkSession.builder().getOrCreate() val sc = sparkSession.sparkContext val ghLogs = sparkSession.read.json(args(0)) ghLogs.printSchema() Sys...
Slurghy/spark-testing
src/main/scala/GitHubDay.scala
Scala
apache-2.0
1,575
/* * Copyright 2015 Webtrends (http://www.webtrends.com) * * See the LICENCE.txt 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...
Webtrends/wookiee-socko
src/main/scala/com/webtrends/harness/component/socko/utils/SockoUtils.scala
Scala
apache-2.0
2,506
package is.hail.expr.ir.agg import is.hail.annotations.Region import is.hail.asm4s._ import is.hail.backend.ExecuteContext import is.hail.expr.ir.{CodeParamType, EmitCode, EmitCodeBuilder, IEmitCode} import is.hail.types.VirtualTypeWithReq import is.hail.types.physical.PCanonicalNDArray import is.hail.types.physical.s...
hail-is/hail
hail/src/main/scala/is/hail/expr/ir/agg/NDArraySumAggregator.scala
Scala
mit
4,161
// Generated by the Scala Plugin for the Protocol Buffer Compiler. // Do not edit! // // Protofile syntax: PROTO2 package com.google.protobuf.descriptor import _root_.scalapb.internal.compat.JavaConverters._ /** Describes a complete .proto file. * * @param name * file name, relative to root of source tree *...
scalapb/ScalaPB
scalapb-runtime/src/main/scalajvm/com/google/protobuf/descriptor/FileDescriptorProto.scala
Scala
apache-2.0
32,818
/* * 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 ...
witgo/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/connection/OracleConnectionProvider.scala
Scala
apache-2.0
2,620
object Test { opaque type A = Int type AA = A var a: A = ??? var aa: AA = ??? object A { val x: A = a a = x val y: A = aa aa = y type BB = A val z1: BB = a val z2: BB = aa a = z1 aa = z2 } } object Test2 { opaque type A[X] = X type AA[X] = A[X] var a: A[Int] =...
som-snytt/dotty
tests/pos/opaque-aliasing.scala
Scala
apache-2.0
529
/* * 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 ...
witgo/zen
ml/src/main/scala/org/apache/spark/graphx2/impl/VertexPartition.scala
Scala
apache-2.0
2,888
package pl.touk.nussknacker.engine.graph.expression import io.circe.generic.JsonCodec @JsonCodec case class Expression(language: String, expression: String)
TouK/nussknacker
common-api/src/main/scala/pl/touk/nussknacker/engine/graph/expression/Expression.scala
Scala
apache-2.0
158
package com.twitter.chill.java import java.util import com.esotericsoftware.kryo.Kryo import com.esotericsoftware.kryo.io.{Input, Output} import org.objenesis.strategy.StdInstantiatorStrategy import scala.util.Random import org.scalatest.matchers.must.Matchers import org.scalatest.wordspec.AnyWordSpec class BitSetS...
twitter/chill
chill-java/src/test/scala/com/twitter/chill/java/BitSetTest.scala
Scala
apache-2.0
3,355
package com.google.protobuf import java.io.IOException import java.io.InputStream import java.util.Arrays import CodedInputStream._ import scala.collection.mutable object CodedInputStream { def newInstance(input: InputStream): CodedInputStream = new CodedInputStream(input) def newInstance(buf: Array[Byte])...
trueaccord/protobuf-scala-runtime
shared/src/main/scala/com/google/protobuf/CodedInputStream.scala
Scala
apache-2.0
23,235
/** * Copyright (C) 2016 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 License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
Verizon/trapezium
framework/src/main/scala/com/verizon/bda/trapezium/validation/ValidateDataType.scala
Scala
apache-2.0
6,201
package spire package random package rng final class SyncGenerator(gen: Generator) extends Generator { def copyInit: SyncGenerator = new SyncGenerator(gen.copy) override def sync: SyncGenerator = this def getSeedBytes(): Array[Byte] = gen.getSeedBytes() def setSeedBytes(bytes: Array[Byte]): Unit = gen.setSe...
non/spire
core/src/main/scala/spire/random/rng/SyncGenerator.scala
Scala
mit
554
package com.eny.ooo.manager.person case class Person(id:Option[Long], name:String, middle:String, last:String)
nyavro/ooo-master
dbApi/src/main/scala/com/eny/ooo/manager/person/Person.scala
Scala
apache-2.0
112
package scala.internal.quoted import scala.quoted.{Expr, QuoteContext, Type} /** Provides methods to unpickle `Expr` and `Type` trees. */ object Unpickler { type PickledQuote = List[String] type PickledArgs = Seq[Seq[Any] => Any/*(([QCtx <: QuoteContext] =>> QCtx ?=> Expr[Any]) | Type[_])*/] /** Unpickle `rep...
som-snytt/dotty
library/src/scala/internal/quoted/Unpickler.scala
Scala
apache-2.0
875
/** * Copyright (C) 2010-2011 LShift 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...
aprescott/diffa
kernel/src/main/scala/net/lshift/diffa/kernel/frontend/wire/WireResponse.scala
Scala
apache-2.0
1,430
/* * 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...
kevinwright/scalatest
src/main/scala/org/scalatest/ConcurrentInformer.scala
Scala
apache-2.0
2,927
package org.jetbrains.plugins.scala.lang.parser.parsing.expressions import org.jetbrains.plugins.scala.ScalaBundle import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.parser.ScalaElementTypes import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilde...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/parser/parsing/expressions/Ascription.scala
Scala
apache-2.0
1,761
package assigner import assigner.model._ import assigner.search._ import org.junit.runner.RunWith import org.scalacheck.Gen._ import org.scalatest._ import org.scalatest.junit.JUnitRunner import org.scalatest.prop.PropertyChecks @RunWith(classOf[JUnitRunner]) class AssignerSpec extends FlatSpec with Matchers with Pr...
joroKr21/IoS-Algorithm
src/test/scala/assigner/AssignerSpec.scala
Scala
mit
4,252
package lila.common import play.api.i18n.Lang import play.api.libs.json._ import play.api.libs.ws.WS import play.api.Play.current // http://detectlanguage.com final class DetectLanguage(url: String, key: String) { private case class Detection( language: String, confidence: Float, isReliable: Boolean) ...
clarkerubber/lila
modules/common/src/main/DetectLanguage.scala
Scala
agpl-3.0
1,283
package org.jetbrains.plugins.scala.debugger.evaluation.util import com.intellij.debugger.engine.{DebugProcess, DebugProcessImpl, JVMName, JVMNameUtil} import com.intellij.debugger.jdi.VirtualMachineProxyImpl import com.intellij.debugger.{DebuggerBundle, NoDataException, SourcePosition} import com.intellij.lang.ASTNod...
triplequote/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/debugger/evaluation/util/DebuggerUtil.scala
Scala
apache-2.0
23,862
package viscel.server import viscel.shared.{Contents, Description, Log, Vid} import viscel.store.{RowStoreV4, _} class ContentLoader(narratorCache: NarratorCache, rowStore: RowStoreV4, descriptionCache: DescriptionCache) { /** load the book in an order suitable for viewing */ def contents(id: Vid): Option[Conten...
rmgk/viscel
code/jvm/src/main/scala/viscel/server/ContentLoader.scala
Scala
agpl-3.0
1,568
package com.arcusys.valamis.web.servlet.base.auth import org.scalatra.ScalatraBase import org.scalatra.auth.{ScentryConfig, ScentrySupport} trait LiferayAuthSupport extends ScentrySupport[AuthUser] { self: ScalatraBase => protected final val StrategyName = "LiferayAuth" before() { scentry.authenticate(Str...
igor-borisov/valamis
valamis-portlets/src/main/scala/com/arcusys/valamis/web/servlet/base/auth/LiferayAuthSupport.scala
Scala
gpl-3.0
911
package de.htwg.zeta.codeGenerator import de.htwg.zeta.codeGenerator.generation.KlimaCodeGenerator import de.htwg.zeta.codeGenerator.model.Anchor import de.htwg.zeta.codeGenerator.model.Entity import de.htwg.zeta.codeGenerator.model.Link import org.scalatest.freespec.AnyFreeSpec import org.scalatest.matchers.should.Ma...
Zeta-Project/zeta
api/codeGenerator/src/test/scala/de/htwg/zeta/codeGenerator/KlimaCodeGeneratorTest.scala
Scala
bsd-2-clause
1,257
package org.jetbrains.plugins.scala.lang package completion package aot import com.intellij.codeInsight.completion.{CompletionParameters, CompletionResult, CompletionResultSet} import com.intellij.codeInsight.lookup.{LookupElement, LookupElementDecorator, LookupElementPresentation} import com.intellij.openapi.util.tex...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/completion/aot/Consumer.scala
Scala
apache-2.0
3,080
/* * Copyright 2017 Ahmad Mozafarnia * * 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...
ahmadmo/bama-api-demo
app/ir/bama/utils/package.scala
Scala
apache-2.0
1,534
package fhj.swengb.project.courseware.controllers.exam import java.net.URL import java.time.LocalDate import java.util.ResourceBundle import javafx.fxml.FXML import javafx.scene.control.{Label, Button, TextField, DatePicker} import fhj.swengb.project.courseware.components.BaseController import fhj.swengb.project.cours...
McKorleone/fhj.swengb.project.courseware
src/main/scala/fhj/swengb/project/courseware/controllers/exam/ExamUpdateController.scala
Scala
apache-2.0
3,404
package stepping import debug.Helper._ class SimpleStepping { def foo() { bar() // line 8 } def bar() { noop(None) // line 12 noop(None) // line 13 } def mainTest() { foo() } } object SimpleStepping { def main(args: Array[String]) { new SimpleStepping().mainTest } }
jacobono/ensime-server
testing/debug/src/main/scala/stepping/SimpleStepping.scala
Scala
gpl-3.0
312
package org.eso.ias.cdb.test.topology import java.nio.file.FileSystems import org.eso.ias.cdb.CdbReader import org.eso.ias.cdb.json.{CdbJsonFiles, JsonReader} import org.eso.ias.cdb.pojos.{DasuToDeployDao, IasioDao} import org.eso.ias.cdb.topology.TemplateHelper import org.scalatest.FlatSpec import scala.collection....
IntegratedAlarmSystem-Group/ias
CdbChecker/src/test/scala/org/eso.ias/cdb/test/topology/TemplateHelperTest.scala
Scala
lgpl-3.0
8,178
import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context object Macros { def impl(c: Context)(arg: c.Tree) = { import c.universe._ q"""println($arg)""" } def foo(arg: String): Unit = macro impl }
lrytz/scala
test/files/run/macroPlugins-macroRuntime/Macros_2.scala
Scala
apache-2.0
242
package hu.frankdavid.ranking.strategy.util import javax.script.{ScriptEngine, ScriptEngineManager, SimpleBindings} import hu.frankdavid.ranking.TournamentContext import hu.frankdavid.ranking.strategy.StrategyException import scala.collection.JavaConversions._ import scala.collection.mutable abstract class Javascri...
frankdavid/ranking
src/main/scala/hu/frankdavid/ranking/strategy/util/JavascriptFunction.scala
Scala
apache-2.0
1,920
package im.actor.server.api.rpc.service.sequence import im.actor.server.office.EntityNotFound import scala.concurrent.duration._ import scala.concurrent.{ ExecutionContext, Future } import scala.util.Success import akka.actor.ActorSystem import akka.stream.Materializer import akka.util.Timeout import slick.driver.Po...
lzpfmh/actor-platform
actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/sequence/SequenceServiceImpl.scala
Scala
mit
5,953
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
cran/rkafkajars
java/scala/runtime/AbstractFunction13.scala
Scala
apache-2.0
802
package bio4j.data.uniprot.flat import bio4j.data.uniprot._ /* The format is ``` CARBOHYD 251 251 N-linked (GlcNAc...). ``` We have 1. feature type: [0,8[ 2. from: [10,16[ 3. to: [18,24[ 4. description: [31,-[ and possibly the next lines/s */ case class FT(val lines: Seq[String]) exte...
bio4j/data.uniprot
src/main/scala/flat/FT.scala
Scala
agpl-3.0
1,123
object Main extends App { val source = scala.io.Source.fromFile(args(0)) val lines = source.getLines.filter(_.length > 0) for (l <- lines) println(Integer.parseInt(l, 16)) }
nikai3d/ce-challenges
easy/hex_to_decimal.scala
Scala
bsd-3-clause
185
/* * 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.linker.standard import or...
scala-js/scala-js
linker/shared/src/main/scala/org/scalajs/linker/standard/SymbolRequirement.scala
Scala
apache-2.0
4,483
/* * 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 ...
witgo/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StateSchemaCompatibilityChecker.scala
Scala
apache-2.0
4,943
/** * Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0 * See accompanying LICENSE file. */ package kafka.manager import java.nio.charset.StandardCharsets import java.util.Properties import akka.actor.{ActorRef, ActorSystem, Props} import akka.pattern._ import akka.util.Timeout import com.ty...
zheolong/kafka-manager
test/kafka/manager/TestClusterManagerActor.scala
Scala
apache-2.0
10,880
/* * 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 ...
yew1eb/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/expressions/DecimalTypeTest.scala
Scala
apache-2.0
7,803
/* * Copyright (c) 2014 Contributor. All rights reserved. */ package scala.tools.nsc.classpath import scala.reflect.io.{AbstractFile, VirtualDirectory} import scala.tools.nsc.Settings import FileUtils.AbstractFileOps import scala.tools.nsc.util.ClassPath /** * Provides factory methods for classpath. When creating ...
slothspot/scala
src/compiler/scala/tools/nsc/classpath/ClassPathFactory.scala
Scala
bsd-3-clause
2,756
package dev.budget.reconciler.modules import dev.budget.reconciler.ReconcilerApplication import dev.budget.reconciler.api.TransactionsResource import scaldi.Module class ApplicationModule extends Module { bind [ReconcilerApplication] to new ReconcilerApplication bind [TransactionsResource] to new TransactionsRes...
jhungerford/MintYnabReconciler
src/main/scala/dev/budget/reconciler/modules/ApplicationModule.scala
Scala
apache-2.0
328
package com.github.wakfudecrypt.types.data import com.github.wakfudecrypt._ @BinaryDecoder case class CharacGainPerLevel( breedId: Short, _1_hasmap_int8_float32: Map[Byte, Float] ) object CharacGainPerLevel extends BinaryDataCompanion[CharacGainPerLevel] { override val dataId = 16 }
jac3km4/wakfudecrypt
types/src/main/scala/com/github/wakfudecrypt/types/data/CharacGainPerLevel.scala
Scala
mit
293
/* * Copyright (c) 2011-14 Miles Sabin * * 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...
mandubian/shapeless
core/src/test/scala/shapeless/records.scala
Scala
apache-2.0
16,920
package services.storage import java.io.ByteArrayInputStream import com.amazonaws.{HttpMethod, ClientConfiguration} import com.amazonaws.auth.BasicAWSCredentials import com.amazonaws.services.s3.AmazonS3Client import com.amazonaws.services.s3.model.{GeneratePresignedUrlRequest, PutObjectRequest, CannedAccessControlLi...
tsechov/shoehorn
app/services/storage/S3.scala
Scala
apache-2.0
2,764
/* * Copyright 2012 Nummulus * * 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 ...
nummulus/boite
boite/src/test/scala/com/nummulus/boite/EqualsTest.scala
Scala
apache-2.0
1,932