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 example import dynscala._ /** Grails like queries (just a demo/proof-of-concept) */ trait DynQuery extends DynScala { implicit object trap extends Trap[AnyRef] { def apply(receiver: AnyRef, site: CallSite) = { def receiverName = receiver.getClass.getName def tableName = receiverName.split('...
jonifreeman/dynscala
src/test/scala/example/DynQuery.scala
Scala
apache-2.0
1,568
/* * 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 ...
publicRoman/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/hints.scala
Scala
apache-2.0
2,377
/* * Copyright 2015 – 2016 Martin Seeler * * 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...
MartinSeeler/rx-oanda
src/test/scala/rx/oanda/trades/TradeClosedDecoderSpec.scala
Scala
apache-2.0
1,691
package tu.coreservice.tinkinglifecycle /** * @author max talanov * date 2012-07-09 * time: 10:19 AM */ import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.FunSuite import org.slf4j.LoggerFactory import tu.model.knowledge.communication.{ShortTermMemory, Trai...
tu-team/2
coreservice.thinkinglifecycle/src/test/scala/tu/coreservice/tinkinglifecycle/ThinkingLifeCycleTest.scala
Scala
gpl-3.0
8,533
package net.scalytica.symbiotic.api.types import net.scalytica.symbiotic.api.types.PartyBaseTypes.{OrgId, PartyId, UserId} import net.scalytica.symbiotic.api.types.ResourceParties.Owner trait SymbioticContext { /** Reference to the user currently interacting with the API's */ val currentUser: UserId /** * ...
kpmeen/symbiotic
symbiotic-shared/src/main/scala/net/scalytica/symbiotic/api/types/SymbioticContext.scala
Scala
apache-2.0
903
/** Copyright 2015 TappingStone, 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 ...
ch33hau/PredictionIO
core/src/main/scala/io/prediction/core/BasePreparator.scala
Scala
apache-2.0
1,377
package com.github.jefersonm.sandbox.scala.fizzbuzz object FizzBuzz { def processArray(nums: Array[Int]): String = { var result = "" for(num <- nums) { if(num % 3 == 0 && num % 5 == 0) result += "fizzbuzz," else if(num % 3 == 0) result += "fizz," else if(num % 5 == 0) result += "buzz," else ...
jefersonm/sandbox
languages/scala/FizzBuzz/src/com/github/jefersonm/sandbox/scala/fizzbuzz/FizzBuzz.scala
Scala
mit
374
package com.twitter.inject.tests import com.twitter.conversions.time._ import com.twitter.finagle.{BackupRequestLost, Failure, IndividualRequestTimeoutException, CancelledRequestException} import com.twitter.inject.{RootMonitor, Test} class RootMonitorTest extends Test { "RootMonitor" should { "handle Cancell...
syamantm/finatra
inject/inject-utils/src/test/scala/com/twitter/inject/tests/RootMonitorTest.scala
Scala
apache-2.0
1,648
package ch.becompany.akka.io import java.io.{InputStream, UnsupportedEncodingException} import org.mozilla.universalchardet.UniversalDetector import scala.util.{Failure, Success, Try} object DetectEncoding { def apply(in: InputStream): String = try { val detector = new UniversalDetector(null) var...
becompany/akka-file-io
src/main/scala/ch/becompany/akka/io/DetectEncoding.scala
Scala
apache-2.0
701
package games.demo import transport.ConnectionHandle import transport.WebSocketUrl import games.demo.Specifics.WebSocketClient import scala.concurrent.{ Promise, Future, ExecutionContext } import games._ import games.math._ import games.opengl._ import games.audio._ import games.input._ import games.utils._ import ja...
joelross/scalajs-games
demo/shared/src/main/scala/games/demo/Engine.scala
Scala
bsd-3-clause
24,111
/* * 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 ...
ueshin/apache-spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/AggregationQuerySuite.scala
Scala
apache-2.0
34,105
package net.kogics.jiva.evolution import net.kogics.jiva.Predef._ import junit.framework._ import net.kogics.jiva.population._ class TestApgaFitnessEvaluator extends TestCase { def testFitnessAndLifetime = { val currPop = Population(Chromosome("10110"), Chromosome("10001"), Chromosome("00100"), ...
milliondreams/jiva-ng
src/test/scala/net/kogics/jiva/evolution/TestApgaFitnessEvaluator.scala
Scala
gpl-3.0
1,535
package object A extends runtime.A { implicit def a( : ) = 1() // error // error // error }
som-snytt/dotty
tests/neg/i7750.scala
Scala
apache-2.0
95
/* * Copyright 2014-2022 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
Netflix-Skunkworks/iep-apps
atlas-persistence/src/main/scala/com/netflix/atlas/persistence/S3CopySink.scala
Scala
apache-2.0
8,242
package eventsource.slick import akka.actor.ActorSystem import org.scalamock.scalatest.MockFactory import org.scalatest.concurrent.ScalaFutures import org.scalatest.{BeforeAndAfterAll, MustMatchers, WordSpec} import play.api.{Logger, LoggerLike} import scala.concurrent.{Await, Future} import scala.concurrent.duration...
21re/play-eventsource
src/test/scala/eventsource/slick/RetryingSpec.scala
Scala
mit
1,993
/* * 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 ...
hengyicai/OnlineAggregationUCAS
sql/hive/src/test/scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala
Scala
apache-2.0
2,107
/* * Copyright (c) 2015, * Ilya Sergey, Christopher Earl, Matthew Might and David Van Horn * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain t...
ilyasergey/reachability
src/org/ucombinator/util/StringUtils.scala
Scala
bsd-3-clause
2,363
package scalaxy import scala.language.reflectiveCalls import scala.language.experimental.macros import scala.language.implicitConversions import scala.reflect.NameTransformer import scala.reflect.macros.blackbox.Context import scala.reflect.runtime.{ universe => ru } import scalaxy.streams.HacksAndWorkarounds.cast...
nativelibs4java/scalaxy-streams
src/main/scala/package.scala
Scala
bsd-3-clause
2,720
/* * Copyright 2014 JHC Systems Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
andrewjskatz/sqlest
src/main/scala/sqlest/sql/DeleteStatementBuilder.scala
Scala
apache-2.0
1,388
package cz.cvut.fit.cervamar.gatling.simulations import cz.cvut.fit.cervamar.gatling.GremlinPredef._ import cz.cvut.fit.cervamar.gatling.protocol.GremlinProtocol import io.gatling.core.Predef._ import org.apache.tinkerpop.gremlin.driver.Result /** * Created by cerva on 14/04/2017. */ class GremlinModernSimulation...
cervamar/gremlin-gatling
src/test/scala/cz/cvut/fit/cervamar/gatling/simulations/GremlinModernSimulation.scala
Scala
apache-2.0
1,279
import scala.concurrent.{ Await, Future, Promise } import scala.concurrent.duration._ import akka.actor.{ Actor, ActorRef, ActorSystem, Props } import reactivemongo.api.{ AuthenticationMode, DefaultDB, FailoverStrategy, MongoConnectionOptions, ScramSha1Authentication, ScramSha256Authentication, X509Auth...
ornicar/ReactiveMongo
driver/src/test/scala/DriverSpec.scala
Scala
apache-2.0
17,469
/* * 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 ...
jackylk/incubator-carbondata
integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala
Scala
apache-2.0
45,126
package org.http4s package client package blaze import java.nio.ByteBuffer import java.nio.charset.StandardCharsets import fs2._ import org.http4s.blaze.SeqTestHead import org.http4s.blaze.pipeline.LeafBuilder import org.http4s.client.blaze.bits.DefaultUserAgent import scodec.bits.ByteVector import scala.concurrent....
ZizhengTai/http4s
blaze-client/src/test/scala/org/http4s/client/blaze/Http1ClientStageSpec.scala
Scala
apache-2.0
9,185
import org.glotaran.core.events.{GlotaranEvent, GlotaranEventSubscription} import org.glotaran.core.session.events.{CreateSessionEvent, CreatedSessionEvent} import org.glotaran.kernel.kernelinterface.KernelInterface import org.glotaran.kernel.sessionmanager.KernelSessionManager import org.junit.runner.RunWith import or...
glotaran/glotaran-kernel
glotaran-kernel-sessionmanager/src/test/scala/TestSessionManager.scala
Scala
gpl-3.0
1,317
package io.gatling.keycloak import io.gatling.core.session._ import org.keycloak.adapters.spi.HttpFacade.Cookie /** * @author Radim Vansa &lt;rvansa@redhat.com&gt; */ case class Oauth(requestName: Expression[String]) { def authorize(uri: Expression[String], cookies: Expression[List[Cookie]]) = new AuthorizeActi...
rvansa/keycloak-benchmark
src/main/scala/io/gatling/keycloak/Oauth.scala
Scala
apache-2.0
447
/* Copyright 2012-2015, University of Geneva. This file is part of Great Balls of Fire (GBF). Great Balls of Fire (GBF) is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (...
unigeSPC/gbf
simulator/src/util/ArrayView.scala
Scala
gpl-3.0
1,413
package com.github.marsojm.odds object Rules { def threeOfAKind(cards: List[Card]): Boolean = { val groups = cards.groupBy( c => c.rank ) !groups.forall( item => item._2.length < 3) } def pair(cards: List[Card]): Boolean = { val groups = cards.groupBy( c => c.rank ) !groups.forall( item => item...
marsojm/odds
src/main/scala/com/github/marsojm/odds/Rules.scala
Scala
mit
344
package scavlink.task.client import akka.actor.{Actor, Props} import akka.io.IO import scavlink.ScavlinkContext import scavlink.task._ import spray.can.Http import spray.can.server.UHttp import spray.can.websocket.frame.TextFrame import spray.can.websocket.{UpgradedToWebSocket, WebSocketClientWorker} import spray.http...
nickolasrossi/scavlink
src/main/scala/scavlink/task/client/ClientActor.scala
Scala
mit
2,892
/*********************************************************************** * 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-kafka/geomesa-kafka-datastore/geomesa-kafka-10-datastore/src/main/scala/org/locationtech/geomesa/kafka10/KafkaGeoMessageEncoding.scala
Scala
apache-2.0
2,129
/** * Copyright 2011-2017 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 appli...
MykolaB/gatling
gatling-recorder/src/main/scala/io/gatling/recorder/util/collection.scala
Scala
apache-2.0
1,300
package org.opensplice.mobile.dev import java.util.UUID import scala.language.implicitConversions import org.opensplice.mobile.dev.gen.uuid import nuvo.nio.RawBuffer package object common { final val ELIDABLE_TRACE = 3100 final val ELIDABLE_DEBUG = 3200 final val ELIDABLE_INFO = 3300 final val ELIDABLE_WARN =...
levitha/levitha
src/main/scala/org/opensplice/mobile/dev/common/common.scala
Scala
apache-2.0
1,697
package deaktator.cats.free.ex1 /** * An exploration of the [[http://okmij.org/ftp/tagless-final/ finally tagless]] implementation explained * on [[https://twitter.com/pchiusano Paul Chiusano]]'s blog article: * [[https://pchiusano.github.io/2014-05-20/scala-gadts.html Alternatives to GADTs in Scala]]. * * T...
deaktator/learn-cats
src/main/scala/deaktator/cats/free/ex1/tagless/package.scala
Scala
mit
766
/** * 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...
0x6e6562/diffa
kernel/src/main/scala/net/lshift/diffa/kernel/config/DomainConfigStore.scala
Scala
apache-2.0
13,982
package org.oxygen.redscript trait Printer { def print(text: String) def println(text: String) }
chenzhuoyu/RedIO
src/main/scala/org/oxygen/redscript/Printer.scala
Scala
lgpl-2.1
106
package io.pathfinder.models import com.avaje.ebean.config.ScalarTypeConverter import com.fasterxml.jackson.databind.JsonNode import com.fasterxml.jackson.databind.node.ObjectNode import play.api.libs.json.JsObject import play.api.libs.json.Writes.JsonNodeWrites import play.api.libs.json.Reads.JsonNodeReads /** * Th...
CSSE497/pathfinder-server
app/io/pathfinder/models/JsonConverter.scala
Scala
mit
725
object StrictArithmetic1 { def foo1(x: Int, y: Int) = { x << y } }
epfl-lara/stainless
frontends/benchmarks/strictarithmetic/invalid/StrictArithmetic1.scala
Scala
apache-2.0
79
/** * Copyright (C) 2017 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 p...
orbeon/orbeon-forms
xforms-runtime/shared/src/main/scala/org/orbeon/oxf/xforms/control/controls/XFormsLHHAControl.scala
Scala
lgpl-2.1
3,376
package core import me.mtrupkin.core.Point /** * Created by mtrupkin on 4/25/2015. */ case class Vector(x: Double, y: Double) { def +(p: Vector): Vector = Vector(x + p.x, y + p.y) def +=(p: Vector): Vector = Vector(x + p.x, y + p.y) def -(p: Vector): Vector = Vector(x - p.x, y - p.y) def *(u: Dou...
mtrupkin/flagship
src/main/scala/core/Vector.scala
Scala
mit
694
// scalac: -Ydelambdafy:inline // import scala.language.{ postfixOps } import java.{ lang => jl } trait T[A] { def f(): A } class C extends T[Char] { def f(): Char = 'a' } class Arr { def arr1(xs: Array[Int]): List[Int] = xs.toList def arr2(xs: Array[jl.Character]): List[jl.Character] = xs.toList def arr3(x...
martijnhoekstra/scala
test/files/run/primitive-sigs-2-old.scala
Scala
apache-2.0
1,358
/* 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...
stripe/scalding
scalding-date/src/main/scala/com/twitter/scalding/RichDate.scala
Scala
apache-2.0
3,326
package com.twitter.chill import com.twitter.bijection.Injection // need the root, because java looks like chill.java to scalac. :( import _root_.java.io.Serializable /** * @author * Sam Ritchie * @author * Oscar Boykin * * Convenience class that holds both a Class[T] and an Injection from type T to Array[...
twitter/chill
chill-bijection/src/main/scala/com/twitter/chill/InjectionRegistrar.scala
Scala
apache-2.0
1,421
package org.jetbrains.plugins.scala.lang.psi.types import com.intellij.openapi.roots.ProjectRootManager import org.jetbrains.plugins.scala.macroAnnotations.CachedInUserData import org.jetbrains.plugins.scala.project.ProjectContext /** * @author adkozlov */ final class ScalaTypeSystem private (implicit val project...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/types/ScalaTypeSystem.scala
Scala
apache-2.0
998
package freedomandy.data /** * Created by andy on 05/06/2017. */ case class BlobUploadInfo(container: String, fileName: String, fileType: String, size: Long, uri:String) case class BlobInfo(fileName: String, sasToken: String)
freedomandy/akka-storage
src/main/scala-2.11/freedomandy/data/BlobData.scala
Scala
mit
231
/* * 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 ...
manuzhang/incubator-gearpump
streaming/src/test/scala/org/apache/gearpump/streaming/metrics/ProcessorAggregatorSpec.scala
Scala
apache-2.0
10,548
/* * 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...
dotty-staging/scalatest
scalatest-test/src/test/scala/org/scalatest/fixture/WordSpecSpec.scala
Scala
apache-2.0
196,481
package uk.co.morleydev.zander.client.validator.impl import uk.co.morleydev.zander.client.validator.ValidateArtefactDetailsExistence import uk.co.morleydev.zander.client.model.arg.Project import uk.co.morleydev.zander.client.model.arg.BuildCompiler.BuildCompiler import uk.co.morleydev.zander.client.model.arg.BuildMode...
MorleyDev/zander.client
src/main/scala/uk/co/morleydev/zander/client/validator/impl/ValidateArtefactDetailsExist.scala
Scala
mit
757
/* * 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 ...
jasonpet/openwhisk
common/scala/src/main/scala/org/apache/openwhisk/core/WhiskConfig.scala
Scala
apache-2.0
9,524
/* * Copyright 2015 - 2016 Red Bull Media House GmbH <http://www.redbullmediahouse.com> - 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...
ianclegg/eventuate
eventuate-crdt/src/main/scala/com/rbmhtechnology/eventuate/crdt/CRDTSerializer.scala
Scala
apache-2.0
8,363
/* * 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...
scalatest/scalatest
jvm/scalatest-test/src/test/scala/org/scalatest/ShouldNotShorthandForAllSpec.scala
Scala
apache-2.0
35,226
package spotlight.serialization.kryo import com.esotericsoftware.kryo.io.{ Input, Output } import com.esotericsoftware.kryo.{ Kryo, Serializer } import com.typesafe.config.{ Config, ConfigFactory, ConfigRenderOptions } /** Created by rolfsd on 11/1/16. */ class KryoConfigSerializer() extends Serializer[Config] { ...
dmrolfs/spotlight
core/src/main/scala/spotlight/serialization/kryo/KryoConfigSerializer.scala
Scala
mit
758
package blockplus.context import org.junit._ import org.junit.Assert._ import blockplus.move.Moves import blockplus.piece.PieceType._ import blockplus.move.Move import scala.collection.immutable.Stack import blockplus.Color._ import org.junit.rules.ExpectedException import java.util.NoSuchElementException import scal...
arie-benichou/blockplus
src/test/scala/blockplus/context/MoveHistoryTest.scala
Scala
gpl-3.0
3,691
package org.showgregator.service.model import java.nio.ByteBuffer import java.util.UUID import javax.crypto.Mac import javax.crypto.spec.SecretKeySpec import com.datastax.driver.core.{ResultSet, Row} import com.twitter.util.Future import com.websudos.phantom.CassandraTable import com.websudos.phantom.Implicits._ impo...
csm/showgregator
showgregator-service/src/main/scala/org/showgregator/service/model/UserAccess.scala
Scala
agpl-3.0
2,602
package AccurateML.nonLinearRegression import breeze.linalg.{DenseMatrix => BDM, DenseVector => BDV} import breeze.optimize.DiffFunction object ErrorMetric{ final val RMSE:Int = 1 final val MAD:Int = 2 } /** * @author Nodalpoint * * Abstract definition of an error (or loss) objective function for the ...
harryandlina/ARIM
project/nonLinearRegression/SumOfSquaresFunction.scala
Scala
apache-2.0
1,273
package org.jetbrains.plugins.scala.lang.refactoring.move.members import java.awt.BorderLayout import com.intellij.openapi.project.Project import com.intellij.openapi.ui.Messages import com.intellij.psi.util.PsiTreeUtil import com.intellij.psi.{PsiDocumentManager, PsiMember} import com.intellij.refactoring.Refactorin...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/refactoring/move/members/ScalaMoveMembersDialog.scala
Scala
apache-2.0
3,629
package com.bnctech.etcd import java.util.UUID import java.util.concurrent.atomic.AtomicBoolean import com.bnctech.etcd.exceptions.EtcdErrorException import com.bnctech.etcd.protocol.{EtcdError, EtcdResponse} import com.bnctech.etcd.utils.Converter.convertStringToObject import io.vertx.core.eventbus.DeliveryOptions i...
BnC-Technologies/vertx-etcd
vertx-etcd/src/main/scala/com/bnctech/etcd/Watcher.scala
Scala
mit
3,885
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
jedesah/Quasar
frontend/src/test/scala/quasar/sql/StatementSpec.scala
Scala
apache-2.0
1,105
//package edu.umass.cs.iesl.nertools // //import org.specs._ //import org.specs.runner.{ConsoleRunner, JUnit4} // //class MySpecTest extends JUnit4(MySpec) ////class MySpecSuite extends ScalaTestSuite(MySpec) //object MySpecRunner extends ConsoleRunner(MySpec) // //object MySpec extends Specification { // "This wonder...
k8si/nertools
src/test/scala/edu/umass/cs/iesl/nertools/MySpec.scala
Scala
unlicense
436
/* * 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 ...
tangyang/zipkin
zipkin-web/src/test/scala/com/twitter/zipkin/web/QueryExtractorSpec.scala
Scala
apache-2.0
4,087
package me.rjfarmer.rlh.client import me.rjfarmer.rlh.api.CacheableResponse import me.rjfarmer.rlh.client.PimpedDomElement._ import org.scalajs.dom import org.scalajs.dom.html import org.scalajs.dom.raw.HTMLLIElement import scalatags.JsDom.all._ /** * A panel with some kind of history. * */ trait HistoryPanel[T <...
random-j-farmer/little-helper
app/js/src/main/scala/me/rjfarmer/rlh/client/HistoryPanel.scala
Scala
mit
1,758
/* * Copyright 2015 Simin You * * 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 ...
manueltimita/SpatialSpark
src/main/scala/spatialspark/query/RangeQuery.scala
Scala
apache-2.0
1,642
package io.soheila.um.utils import io.soheila.um.events._ import io.soheila.um.types.ActivityType import io.soheila.um.types.ActivityType.ActivityType object ActivityTypeToEventMapper { def mapActivity(userUUID: String, activityType: ActivityType): UserEvt = { activityType match { case ActivityType.Activa...
esfand-r/soheila-um
src/main/scala/io/soheila/um/utils/ActivityTypeToEventMapper.scala
Scala
apache-2.0
835
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
Kegeruneku/rudder
rudder-core/src/main/scala/com/normation/rudder/domain/nodes/NodeGroupCategory.scala
Scala
agpl-3.0
2,466
/* * 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 ...
SparklineData/spark-druid-olap
src/test/scala/org/sparklinedata/druid/client/test/DataSourceTest.scala
Scala
apache-2.0
3,475
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Panos-Bletsos/spark-cost-model-optimizer
sql/core/src/main/scala/org/apache/spark/sql/ForeachWriter.scala
Scala
apache-2.0
3,762
import sbt._ import sbt.Keys._ import com.typesafe.sbteclipse.plugin.EclipsePlugin._ object Build extends Build { lazy val dependencies = Seq( "biz.aQute" % "bndlib" % "1.50.0", "org.specs2" %% "specs2" % "2.1.1" % "test" ) lazy val suba = Project( "suba", new File("suba"), settings = Pro...
michae1T/sbteclipse
src/sbt-test/sbteclipse/04-dependency-options/project/Build.scala
Scala
apache-2.0
1,050
package com.arcusys.valamis.util import java.io.{File, FileInputStream, FileOutputStream, InputStream} import java.security.SecureRandom import javax.activation.MimetypesFileTypeMap object FileSystemUtil { private val valamisTempDirectory = new File(System.getProperty("java.io.tmpdir"), "valamis") valamisTempDir...
igor-borisov/valamis
valamis-util/src/main/scala/com/arcusys/valamis/util/FileSystemUtil.scala
Scala
gpl-3.0
2,254
package ch.uzh.ifi.pdeboer.pplib.examples.gdpinfluence import ch.uzh.ifi.pdeboer.pplib.hcomp.dbportal.MySQLDBPortalDecorator import ch.uzh.ifi.pdeboer.pplib.hcomp.{FreetextQuery, HComp, HCompQueryProperties} import ch.uzh.ifi.pdeboer.pplib.process.entities.DefaultParameters._ import ch.uzh.ifi.pdeboer.pplib.process.en...
uzh/PPLib
src/main/scala/ch/uzh/ifi/pdeboer/pplib/examples/gdpinfluence/FeatureInfluenceOnIncome_Experiment1.scala
Scala
mit
2,124
/** * Copyright 2015 Comcast Cable Communications Management, 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...
Comcast/ActorServiceRegistry
common/src/main/scala/com/comcast/csv/common/protocol/ServiceRegistryProtocol.scala
Scala
apache-2.0
2,351
// Databricks notebook source // MAGIC %md // MAGIC ScaDaMaLe Course [site](https://lamastex.github.io/scalable-data-science/sds/3/x/) and [book](https://lamastex.github.io/ScaDaMaLe/index.html) // COMMAND ---------- // MAGIC %md // MAGIC # Extensions // MAGIC // MAGIC In this notebook, we introduce multiple improve...
lamastex/scalable-data-science
dbcArchives/2021/000_0-sds-3-x-projects/student-project-18_group-ProjectRL/02_Extensions.scala
Scala
unlicense
12,196
package com.avast.metrics.scalaapi package object perkey { implicit class MonitorToPerKeyOps(monitor: Monitor) { def perKey: PerKeyOps = PerKeyMonitor(monitor).perKey } }
avast/metrics
scala-api/src/main/scala/com/avast/metrics/scalaapi/perkey/package.scala
Scala
mit
180
/* * ____ ____ _____ ____ ___ ____ * | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R) * | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data * | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In...
precog/platform
gjallerhorn/src/main/scala/com/precog/gjallerhorn/ApiResult.scala
Scala
agpl-3.0
1,782
package io.github.databob.generators import java.lang.Integer.MAX_VALUE import io.github.databob.Generator._ /** * Represents the minimum and maximum size of a generated collection. */ case class CollectionSizeRange(min: Int, max: Int) { if (max < min) throw new IllegalArgumentException(s"Can't have a negative ...
daviddenton/databob.scala
src/main/scala/io/github/databob/generators/CollectionSizeRange.scala
Scala
apache-2.0
1,288
/* * 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 ...
indhub/mxnet
scala-package/core/src/main/scala/org/apache/mxnet/AttrScope.scala
Scala
apache-2.0
1,961
package com.twitter.finagle.redis.naggati import com.twitter.conversions.time._ import com.twitter.finagle.Service import com.twitter.finagle.builder.{ClientBuilder, ServerBuilder} import com.twitter.finagle.redis.naggati.test.TestCodec import com.twitter.finagle.redis.protocol._ import com.twitter.finagle.redis.util....
sveinnfannar/finagle
finagle-redis/src/test/scala/com/twitter/finagle/redis/RedisTest.scala
Scala
apache-2.0
7,690
/** * 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/scaml/ScamlTemplateErrorTest.scala
Scala
apache-2.0
2,843
package io.buoyant.k8s import com.twitter.finagle.Service import com.twitter.io.Buf import com.twitter.util.Future import com.twitter.util.Promise import io.buoyant.test.Awaits import org.scalatest.FunSuite import org.scalatest.OptionValues import com.twitter.finagle.http.{Request, Response} class IngressCacheTest ex...
linkerd/linkerd
k8s/src/test/scala/io/buoyant/k8s/IngressCacheTest.scala
Scala
apache-2.0
17,015
/* * 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 ...
ueshin/apache-spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalog.scala
Scala
apache-2.0
11,649
/* * Copyright 2017 Datamountaineer. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
datamountaineer/stream-reactor
kafka-connect-azure-documentdb/src/test/scala/com/datamountaineer/streamreactor/connect/azure/documentdb/sink/DocumentDbSinkTaskJsonTest.scala
Scala
apache-2.0
13,109
package com.twitter.finagle.loadbalancer import com.twitter.finagle._ import com.twitter.finagle.client.Transporter import com.twitter.finagle.loadbalancer.aperture.EagerConnections import com.twitter.finagle.loadbalancer.aperture.WeightedApertureToggle import com.twitter.finagle.service.FailFastFactory import com.twi...
twitter/finagle
finagle-core/src/main/scala/com/twitter/finagle/loadbalancer/LoadBalancerFactory.scala
Scala
apache-2.0
23,007
package uk.zebington.junkcraft.common.tileentities import net.minecraft.entity.item.EntityItem import net.minecraft.entity.{Entity, EntityLivingBase} import net.minecraft.server.gui.IUpdatePlayerListBox import net.minecraft.tileentity.TileEntity import net.minecraft.util.{AxisAlignedBB, DamageSource} import scala.col...
zebington/JunkCraft
src/main/scala/uk/zebington/junkcraft/common/tileentities/TileEntityElectricFence.scala
Scala
gpl-3.0
834
package fpinscala import scala.{Option=>_, Some=>_, None=>_} import fpinscala.answers._ import org.scalatest.FlatSpec import org.scalatest.matchers.ShouldMatchers class OptionSpec extends FlatSpec with ShouldMatchers { "getOrElse" should """returns the result inside the Some case of the Option, or if the Opt...
ryo-murai/fpinscala-exercises
myanswers/src/test/scala/fpinscala/OptionSpec.scala
Scala
mit
4,227
package skinny.validator import org.scalatest._ class floatMaxValueSpec extends FlatSpec with Matchers { behavior of "floatMaxValue" it should "be available" in { val max = 3F val validate = new floatMaxValue(max) validate.name should equal("floatMaxValue") validate.messageParams should equal(S...
holycattle/skinny-framework
validator/src/test/scala/skinny/validator/floatMaxValueSpec.scala
Scala
mit
689
package systems.adaptix.bling.tags.graph import scala.collection.mutable.Stack /** * A rooted, directed, acyclic graph implementation. * Created by nkashyap on 5/17/15. */ class RootedDag(val root: DagVertex) { /** * Checks whether the directed graph with the given root is acyclic. * * @return true if t...
nkashy1/bling
src/main/scala/systems/adaptix/bling/tags/graph/RootedDag.scala
Scala
mit
2,467
/* * 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 ...
sahilTakiar/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/SourceOptions.scala
Scala
apache-2.0
1,824
// // $Id$ // // Wiggle - a 2D game development library - http://code.google.com/p/wiggle/ // Copyright 2008-2010 Michael Bayne // Distributed under the "Simplified BSD License" in LICENSE.txt package wiggle.util /** * Encapsulates a function that interpolates between two values. */ trait Interpolator { /** Inter...
zdevzee/wiggle
src/main/scala/wiggle/util/Interpolator.scala
Scala
bsd-3-clause
2,056
package org.jetbrains.plugins.scala.lang.resolve import org.jetbrains.plugins.scala.debugger.{ScalaVersion, Scala_2_11} import org.jetbrains.plugins.scala.extensions.ResolvesTo import org.jetbrains.plugins.scala.lang.psi.api.statements.ScFunction import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.ScClass...
jastice/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/resolve/MacroBundleTest.scala
Scala
apache-2.0
999
package com.sksamuel.elastic4s.requests.searches.queries.term import com.sksamuel.elastic4s.requests.common.DocumentRef import com.sksamuel.elastic4s.requests.searches.queries.Query import com.sksamuel.exts.OptionImplicits._ case class TermsQuery[T](field: String, values: Iterable[T], ...
stringbean/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/term/TermsQuery.scala
Scala
apache-2.0
1,202
package com.pwootage.metroidprime.formats.mlvl import com.pwootage.metroidprime.formats.BinarySerializable import com.pwootage.metroidprime.formats.io.PrimeDataFile class AreaHeader extends BinarySerializable{ var name: Int = -1 val transform = new Array[Float](12) val boundingBox = new Array[Float](6) var MR...
Pwootage/prime-patcher
src/main/scala/com/pwootage/metroidprime/formats/mlvl/AreaHeader.scala
Scala
gpl-3.0
751
package testutils import org.scalatest._ import scala.io.Source trait Spec extends FlatSpec with ShouldMatchers with JsValueMatchers { def readFile(path: String): Source = Source.fromURL(getClass.getResource(path)) }
janlisse/ecdc
src/core/src/test/scala/testutils/Spec.scala
Scala
isc
222
package uk.gov.gds.ier.transaction.crown.openRegister import uk.gov.gds.ier.validation.{ErrorTransformForm, ErrorMessages, FormKeys} import play.api.data.Forms._ import uk.gov.gds.ier.transaction.crown.InprogressCrown trait OpenRegisterForms { self: FormKeys with ErrorMessages => lazy val openRegisterOptInM...
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/transaction/crown/openRegister/OpenRegisterForms.scala
Scala
mit
672
package Actors import akka.actor._ import akka.contrib.pattern.DistributedPubSubExtension import akka.contrib.pattern.DistributedPubSubMediator import play.api.Play.current import play.api.libs.concurrent.Akka import play.api.libs.concurrent.Execution.Implicits._ /** * Manages the main stream status change event bus...
Blotre/blotre
app/Actors/StreamSupervisor.scala
Scala
mit
4,113
package sparklyr import java.io.{DataInputStream, DataOutputStream} import java.nio.charset.StandardCharsets import java.sql.{Date, Time, Timestamp} import scala.collection.JavaConverters._ import scala.collection.mutable.WrappedArray object Serializer { type ReadObject = (DataInputStream, Char) => Object type W...
kevinykuo/sparklyr
java/spark-1.5.2/serializer.scala
Scala
apache-2.0
13,320
/* * Copyright (c) 2014-2020 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...
alexandru/monifu
monix-tail/shared/src/main/scala/monix/tail/internal/IterantBuffer.scala
Scala
apache-2.0
5,579
/* * 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 ...
kimihe/Swallow
swallow-benchmark/HiBench-master/sparkbench/graph/src/main/scala/com/intel/hibench/sparkbench/graph/nweight/PregelNWeight.scala
Scala
apache-2.0
3,646
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
wzhongyuan/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/tensor/TensorNumeric.scala
Scala
apache-2.0
49,591
package com.github.jeanadrien.gatling.mqtt.client import com.typesafe.scalalogging.StrictLogging /** * */ private[client] object Callback extends StrictLogging { class HalfCallback[T](val onSuccessFn : T => Unit) { def onFailure(onFailureFn : Throwable => Unit) = new org.fusesource.mqtt.client.Callb...
jeanadrien/gatling-mqtt-protocol
src/main/scala/com/github/jeanadrien/gatling/mqtt/client/Callback.scala
Scala
apache-2.0
586
package com.sdl.nplm.conf import org.deeplearning4j.nn.api.Layer import org.deeplearning4j.nn.api.LayerFactory import org.deeplearning4j.nn.conf.NeuralNetConfiguration import org.deeplearning4j.optimize.api.IterationListener import org.nd4j.linalg.api.ndarray.INDArray import com.sdl.nplm.params.WordEmbeddingLayerPara...
aurelienwaite/sparknn
src/main/scala/com/sdl/nplm/conf/WordEmbeddingLayer.scala
Scala
apache-2.0
1,521
/* * Copyright (C) 2016 Language Technology Group and Interactive Graphics Systems Group, Technische Universität Darmstadt, Germany * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, ...
thorbenwiese/newsleak-frontend
app/util/es/ESRequestUtils.scala
Scala
agpl-3.0
5,995
package orz.mongo.tochka.conv import orz.mongo.tochka._ case class Piyo( int: Int , long: Long , double: Double , bigInt: BigInt , decimal: BigDecimal , text: String , seq: Seq[String] , seqOpt: Option[Seq[String]] , optSeq: Seq[Option[String]] , map: Map[String, String] , mapOpt: Option[Map[S...
fkmt-disk/tochka
src/test/scala/orz/mongo/tochka/conv/Piyo.scala
Scala
mit
2,094
/** * Copyright (C) 2010 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
xforms-runtime/shared/src/main/scala/org/orbeon/oxf/xforms/action/actions/XFormsRefreshAction.scala
Scala
lgpl-2.1
2,032