code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
package com.arcusys.valamis.persistence.common import slick.driver.JdbcProfile import slick.jdbc.JdbcBackend import scala.concurrent.duration._ import scala.concurrent.{Await, ExecutionContext, Future} /** * Created by pkornilov on 20.04.16. */ trait DatabaseLayer { self: SlickProfile => import driver.api._ ...
igor-borisov/valamis
valamis-slick-support/src/main/scala/com/arcusys/valamis/persistence/common/DatabaseLayer.scala
Scala
gpl-3.0
1,634
package zzb.domain import spray.http.StatusCodes._ import spray.json.{JsString, JsonParser} import spray.routing.MalformedRequestContentRejection import zzb.datatype._ import zzb.domain.plane._ /** * Created by Simon on 2014/5/15 */ class DirectAlterTest extends PlaneHttpTestBase { var revFirstSave = VersionRevi...
xiefeifeihu/zzb
zzb-domain/src/test/scala/zzb/domain/DirectAlterTest.scala
Scala
mit
10,766
package org.eichelberger.sfseize.api /****************************************************** * discretizers/cells ******************************************************/ // okay, so these aren't just operations on "continuous" spaces, // but also on linear/uniform distributions of continuous values... case clas...
cne1x/sfseize-api
src/main/scala/org/eichelberger/sfseize/api/ExampleImpl.scala
Scala
apache-2.0
6,430
/* * 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 ...
practice-vishnoi/dev-spark-1
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
Scala
apache-2.0
36,308
/* * 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 ...
bravo-zhang/spark
sql/core/src/test/scala/org/apache/spark/sql/DataFrameTungstenSuite.scala
Scala
apache-2.0
3,908
package edu.uw.at.iroberts.wirefugue.kafka.producer.kafka.scala import org.apache.kafka.clients.producer import org.apache.kafka.common.Cluster /** An adapter trait useful for defining stateless partitioners * in Scala. configure() and close() are predefined as no-ops * and the partition() method can (and must) b...
robertson-tech/wirefugue
sensor/src/main/scala/edu/uw/at/iroberts/wirefugue/kafka/producer/kafka/scala/SimplePartitioner.scala
Scala
gpl-3.0
1,377
package me.smartco.akstore.store.rest.route import akka.actor.ActorContext import com.fasterxml.jackson.databind.ObjectMapper import me.smartco.akstore.common.Constants import me.smartco.akstore.common.model.{Payment, Address, AbstractDocument} import me.smartco.akstore.integration.ServiceFacade import me.smartco.akst...
redlion99/akstore
akstore-server/akstore-rest/src/main/scala/me/smartco/akstore/store/rest/route/StaffRoute.scala
Scala
apache-2.0
9,844
// Copyright: 2010 - 2018 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.core import akka.actor._ import akka.event.LoggingReceive.withLabel import org.ensime.api._ import org.ensime.config.richconfig._ import org.ensime.util.FileUtils.toSource...
yyadavalli/ensime-server
core/src/main/scala/org/ensime/core/AnalyzerManager.scala
Scala
gpl-3.0
5,575
/* * Copyright 2018 Zhang Di * * 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 ...
statgenetics/seqspark
src/main/scala/org/dizhang/seqspark/worker/Export.scala
Scala
apache-2.0
2,013
import sbt._ object B extends Build { lazy val root = Project("root", file(".")).dependsOn( file("../plugin") ) }
jaceklaskowski/sbt
sbt/src/sbt-test/project/src-plugins/project/project/P.scala
Scala
bsd-3-clause
115
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.sbt import java.io.Closeable import java.io.FileDescriptor import java.io.FileInputStream import java.io.FilterInputStream import java.io.InputStream import jline.console.ConsoleReader import scala.annotation.tailrec import scala.concurre...
wegtam/playframework
dev-mode/sbt-plugin/src/main/scala/play/sbt/PlayInteractionMode.scala
Scala
apache-2.0
4,480
/* * 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 ...
pgandhi999/spark
sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala
Scala
apache-2.0
16,080
package com.peterpotts.interview import scala.collection.immutable.Seq case class Point(x: Double, y: Double) object TwinCake { private val radius = 100.0 def cut(cherries: Seq[Point]): Option[Point] = { def angle(point: Point) = math.toDegrees(math.atan2(point.y, point.x)) slice(cherries.map(angle)).m...
peterpotts/interview
src/main/scala/com/peterpotts/interview/TwinCake.scala
Scala
mit
1,513
package org.http4s package headers import org.http4s.parser.HttpHeaderParser import org.http4s.util.Writer object `X-B3-TraceId` extends HeaderKey.Internal[`X-B3-TraceId`] with HeaderKey.Singleton { override def parse(s: String): ParseResult[`X-B3-TraceId`] = HttpHeaderParser.X_B3_TRACEID(s) } final case class...
reactormonk/http4s
core/src/main/scala/org/http4s/headers/X-B3-TraceId.scala
Scala
apache-2.0
523
package com.github.j5ik2o.reactive.redis.command.transactions import java.util.UUID import com.github.j5ik2o.reactive.redis.RedisIOException import com.github.j5ik2o.reactive.redis.command.{ CommandRequest, CommandResponse, StringParsersSupport } import com.github.j5ik2o.reactive.redis.parser.StringParsers._ import c...
j5ik2o/reactive-redis
core/src/main/scala/com/github/j5ik2o/reactive/redis/command/transactions/MultiRequest.scala
Scala
mit
1,894
/* * Copyright 2007-2010 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
jeppenejsum/liftweb
framework/lift-modules/lift-facebook/src/main/scala/net/liftweb/ext_api/facebook/FacebookRestApi.scala
Scala
apache-2.0
20,726
package org.jetbrains.plugins.scala package lang.surroundWith.descriptors import com.intellij.lang.surroundWith.{SurroundDescriptor, Surrounder} import com.intellij.psi.{PsiElement, PsiFile} import org.jetbrains.plugins.scala.lang.scaladoc.lexer.ScalaDocTokenType._ import org.jetbrains.plugins.scala.lang.scaladoc.lexe...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/surroundWith/descriptors/ScalaDocCommentDataSurroundDescriptor.scala
Scala
apache-2.0
4,503
/* * Copyright (c) 2014-2016 * nonblocking.at gmbh [http://www.nonblocking.at] * * This file is part of Cliwix. * * Cliwix is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the...
nonblocking/cliwix
cliwix-core-handlers-6-1/src/main/scala/at/nonblocking/cliwix/core/liferay61/handler/UserGroupHandler.scala
Scala
agpl-3.0
7,613
/* * 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 ...
Dax1n/spark-core
core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala
Scala
apache-2.0
31,959
package object scala { type DeprecatedOverriding = deprecatedOverriding type DeprecatedInheritance = deprecatedInheritance }
sgkim126/snippets
scala/deprecatedAnnotations/DeprecatedAnnotations.scala
Scala
bsd-2-clause
129
/* * Copyright 2015 herd contributors * * 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 ...
FINRAOS/herd
herd-code/herd-tools/herd-spark-data-source/src/test/scala/org/apache/spark/sql/herd/MockS3AFilesystem.scala
Scala
apache-2.0
2,773
object test { val b = List(1, 2, 3); def main(args: Array[String]) = Console.println( b match { case List(1, 2, 3) => true; case _ => false; } ) }
yusuke2255/dotty
tests/pending/pos/seqtest2.scala
Scala
bsd-3-clause
179
package sangria.execution.deferred import java.util.concurrent.atomic.AtomicInteger import sangria.ast import sangria.ast.Document import sangria.execution.{DeferredWithInfo, Executor} import sangria.macros._ import sangria.schema._ import sangria.util.{FutureResultSupport, Pos} import sangria.util.SimpleGraphQlSuppo...
OlegIlyenko/sangria
modules/core/src/test/scala/sangria/execution/deferred/DeferredResolverSpec.scala
Scala
apache-2.0
9,020
package xitrum.sockjs import scala.collection.mutable.ArrayBuffer import akka.actor.{Actor, ActorRef, ReceiveTimeout, Terminated} import scala.concurrent.duration._ import xitrum.{Action, Config, SockJsText} // There are 2 kinds of non-WebSocket client: receiver and sender // receiver/sender client <-> NonWebSocket...
georgeOsdDev/xitrum
src/main/scala/xitrum/sockjs/NonWebSocketSession.scala
Scala
mit
6,865
package com.adendamedia.salad.api import io.lettuce.core.RedisFuture import scala.compat.java8.FutureConverters._ import scala.concurrent.{ExecutionContext, Future} import scala.language.implicitConversions import scala.util.{Failure, Success, Try} object ImplicitFutureConverters { /** * Implicitly convert Fu...
adenda/salad
src/main/scala/com/adendamedia/salad/api/ImplicitFutureConverters.scala
Scala
lgpl-3.0
2,752
package business import java.sql.SQLException import models.Profile import org.mindrot.jbcrypt.BCrypt import test.core.BaseTestSpec import scala.util.{Failure, Success} /** * Created by justin on 3/2/15. */ class ProfileManagerTest extends BaseTestSpec { val profileManager: ProfileManager = new ProfileManager w...
maximx1/lecarton
test/business/ProfileManagerTest.scala
Scala
mit
8,428
/* * 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 ...
goldmedal/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ordering.scala
Scala
apache-2.0
5,091
package synthesis //dummy object APAInputAssignments /** This object offers global methods methods to deal with input assignments. */ object InputAssignment { //Combines input sentences def listToCommonString(input_assignment:List[InputAssignment], indent:String):String = { val prog_input = input_assignmen...
epfl-lara/comfusy
src/main/scala/APAInputAssignments.scala
Scala
bsd-2-clause
9,076
package com.sksamuel.scrimage.filter import org.scalatest.{ OneInstancePerTest, BeforeAndAfter, FunSuite } import com.sksamuel.scrimage.Image /** @author Stephen Samuel */ class UnsharpFilterTest extends FunSuite with BeforeAndAfter with OneInstancePerTest { val original = getClass.getResourceAsStream("/bird_small...
carlosFattor/scrimage
scrimage-filters/src/test/scala/com/sksamuel/scrimage/filter/UnsharpFilterTest.scala
Scala
apache-2.0
552
/** * (c) Copyright 2013 WibiData, Inc. * * See the NOTICE 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. * You may obtain a copy of...
kijiproject/kiji-express
kiji-express/src/main/scala/org/kiji/express/flow/KijiInput.scala
Scala
apache-2.0
27,262
package com.lookout.borderpatrol.session import java.util.concurrent.TimeUnit import com.twitter.util.{Duration, Time} import org.scalatest.{FlatSpec, Matchers} class SecretSpec extends FlatSpec with Matchers { def currentExpiry: Time = SecretExpiry.currentExpiry behavior of "Secret" it should "expire in a ...
rtyler/borderpatrol
borderpatrol-core/src/test/scala/com/lookout/borderpatrol/session/SecretSpec.scala
Scala
mit
887
package example sealed abstract class Animal(val cry: String) case object Cat extends Animal("にゃー") case object Dog extends Animal("わん") object Animal { def checkAnimal(animal: Animal): Unit = animal match { case Cat => println(s"!! 😺 !! ${animal} ${animal.cry}") case Dog => println(s"!! 🐩 ...
ohtomi/sandbox
scala-start/src/main/scala/example/Animal.scala
Scala
mit
482
package go3d.server import go3d.{Game, newGame, Black, White} import scala.io.Source import io.circe.parser._ var Games: Map[String, Game] = Map() def registerGame(boardSize: Int): String = val gameId = IdGenerator.getId val game = newGame(boardSize) Games = Games + (gameId -> game) return gameId def readGa...
lene/go-3
src/main/scala/server/Games.scala
Scala
gpl-2.0
923
/* * 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 ...
jinglining/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/runtime/batch/table/AggregateITCase.scala
Scala
apache-2.0
16,617
/* * Copyright (c) 2015-6 Alexandre Archambault * * 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 l...
isaka/shapeless
core/src/test/scala/shapeless/annotation.scala
Scala
apache-2.0
7,192
/** * Copyright 2017 https://github.com/sndnv * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicabl...
sndnv/noisecluster
noisecluster-jvm/src/test/scala/noisecluster/test/specs/transport/aeron/BasicAeronSpec.scala
Scala
apache-2.0
3,884
/* * Copyright 2008-present MongoDB, 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 ag...
rozza/mongo-java-driver
bson-scala/src/main/scala/org/mongodb/scala/bson/codecs/macrocodecs/MacroCodec.scala
Scala
apache-2.0
8,909
/* * 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 ...
ksattler/piglet
src/main/scala/dbis/pig/op/Matcher.scala
Scala
apache-2.0
3,935
package net.paploo.diestats.statistics.util import net.paploo.diestats.test.SpecTest class MonoidTest extends SpecTest { describe("reduce") { it("should reduce a string") { val monoid = implicitly[Monoid[String]] monoid.reduce(Seq("alpha", "beta", "", "gamma")) should === ("alphabetagamma") } ...
paploo/DieStats
src/test/scala/net/paploo/diestats/statistics/util/MonoidTest.scala
Scala
bsd-3-clause
478
package gridscale.slurm import gridscale.effectaside._ import gridscale._ import gridscale.cluster._ import gridscale.local._ object SlurmExampleLocal extends App { val headNode = LocalHost() val jobDescription = SLURMJobDescription(command = "/bin/echo hello from $(hostname)", workDirectory = "/homes/jpassera/...
openmole/gridscale
examples/slurm/src/main/scala/gridscale/slurm/SlurmExampleLocal.scala
Scala
agpl-3.0
688
package highchair.specs import org.specs._ import com.google.appengine.api.datastore.DatastoreServiceFactory import com.google.appengine.tools.development.testing._ class DataStoreSpec extends Specification { val helper = new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig) implicit val ds = Datasto...
chrislewis/highchair
spec/src/main/scala/DataStoreSpec.scala
Scala
mit
498
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundatio...
HuangLS/neo4j
community/cypher/frontend-2.3/src/main/scala/org/neo4j/cypher/internal/frontend/v2_3/symbols/CypherType.scala
Scala
apache-2.0
2,335
/*********************************************************************** * Copyright (c) 2013-2020 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...
ccri/geomesa
geomesa-features/geomesa-feature-avro/src/test/scala/org/locationtech/geomesa/features/avro/AvroFeatureSerializerTest.scala
Scala
apache-2.0
14,449
package at.logic.gapt.grammars import at.logic.gapt.expr._ import at.logic.gapt.proofs.Context import org.specs2.mutable.Specification class LggTest extends Specification { "leastGeneralGeneralization" should { "compute lgg of first-order terms" in { val ( lgg, substs ) = leastGeneralGeneralization( le"f ...
gebner/gapt
tests/src/test/scala/at/logic/gapt/grammars/LggTest.scala
Scala
gpl-3.0
1,373
package io.pipeline.prediction.jvm import scala.collection.JavaConverters.asScalaBufferConverter import scala.collection.JavaConverters.mapAsJavaMapConverter import org.jpmml.evaluator.Evaluator import com.netflix.hystrix.HystrixCommand import com.netflix.hystrix.HystrixCommandGroupKey import com.netflix.hystrix.Hys...
BrentDorsey/pipeline
prediction.ml/jvm/src/main/scala/io/pipeline/prediction/jvm/PMMLEvaluationCommand.scala
Scala
apache-2.0
2,880
package net.machinemuse.powersuits.common import cpw.mods.fml.common.network.IGuiHandler import net.machinemuse.general.gui.CosmeticGui import net.machinemuse.general.gui.GuiFieldTinker import net.machinemuse.general.gui.GuiTinkerTable import net.machinemuse.general.gui.KeyConfigGui import net.minecraft.client.Minecra...
QMXTech/MachineMusePowersuits
src/main/scala/net/machinemuse/powersuits/common/MPSGuiHandler.scala
Scala
bsd-3-clause
1,502
package de.fosd.typechef.featureexpr.sat /** * CNFHelper provides several auxiliary functions to determine whether an expression is * in normal form and to access parts of that normal form */ object CNFHelper { //for testing def isCNF(expr: SATFeatureExpr) = isTrueFalse(expr) || isClause(expr) || (expr m...
ckaestne/TypeChef
FeatureExprLib/src/main/scala/de/fosd/typechef/featureexpr/sat/CNFHelper.scala
Scala
lgpl-3.0
1,944
/* * Copyright 2011-2015 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
lift/framework
persistence/mongodb-record/src/test/scala/net/liftweb/mongodb/record/QueryExamplesSpec.scala
Scala
apache-2.0
5,416
/* * Copyright (c) 2014-2021 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
monixio/monix
monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingScheduler.scala
Scala
apache-2.0
3,402
/* * 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 ...
bowenli86/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/utils/UserDefinedAggFunctions.scala
Scala
apache-2.0
5,550
/* * Copyright 2017-2022 John Snow Labs * * 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...
JohnSnowLabs/spark-nlp
src/main/scala/com/johnsnowlabs/util/ConfigHelper.scala
Scala
apache-2.0
3,159
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.api.libs.ws.ahc import akka.util.ByteString import play.shaded.ahc.org.asynchttpclient.{ Response => AHCResponse } import play.api.libs.json.JsValue import play.api.libs.ws._ import scala.xml.Elem /** * A WS HTTP Response back...
hagl/playframework
framework/src/play-ahc-ws/src/main/scala/play/api/libs/ws/ahc/AhcWSResponse.scala
Scala
apache-2.0
1,937
/* * Copyright (C) 2016 University of Basel, Graphics and Vision Research Group * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) an...
unibas-gravis/scalismo-ui
src/main/scala/scalismo/ui/rendering/actor/TetrahedralActor.scala
Scala
gpl-3.0
8,699
package io.getquill.context.spark import io.getquill.Spec case class Person(name: String, age: Int) case class Couple(her: String, him: String) class PeopleJdbcSpec extends Spec { val context = io.getquill.context.sql.testContext import testContext._ import sqlContext.implicits._ val couples = liftQuery {...
getquill/quill
quill-spark/src/test/scala/io/getquill/context/spark/PeopleSparkSpec.scala
Scala
apache-2.0
5,007
package com.taig.tmpltr.engine.html.property import com.taig.tmpltr.Property trait a { class target( target: String ) extends Property( target ) object target { object blank extends target( "_blank" ) object parent extends target( "_parent" ) object self extends target( "_self" ) object top extends target(...
Taig/Play-Tmpltr
app/com/taig/tmpltr/engine/html/property/a.scala
Scala
mit
387
/* * 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 ...
pgandhi999/spark
sql/core/src/main/scala/org/apache/spark/sql/jdbc/PostgresDialect.scala
Scala
apache-2.0
5,448
package ilc package language package bacchus import org.scalatest.FunSuite import org.scalatest.Matchers class BacchusPrettySuite extends FunSuite with Matchers { object Lang extends Evaluation with feature.base.Pretty import Lang._ test("values have short descriptions") { NatValue(9).toString should be...
inc-lc/ilc-scala
src/test/scala/ilc/language/bacchus/BacchusPrettySuite.scala
Scala
mit
594
/* * Copyright 2013 TeamNexus * * TeamNexus Licenses this file to you under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://opensource.org/licenses/mit-license.php * * Unless required by applicable law ...
crvidya/nexus-scala
src/main/scala/com/nexus/webserver/handlers/WebServerHandlerWebsocket.scala
Scala
mit
1,762
/* * 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/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
Scala
apache-2.0
82,258
/* * 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 * distribute...
xerial/silk
silk-cui/src/main/scala/xerial/silk/cui/ClassFinder.scala
Scala
apache-2.0
3,705
package app import service._ import util._ import util.Directory._ import util.ControlUtil._ import jp.sf.amateras.scalatra.forms._ import org.eclipse.jgit.api.Git import org.scalatra.FlashMapSupport import org.scalatra.i18n.Messages import scala.Some import java.util.ResourceBundle class WikiController extends WikiC...
toshi-saito/gitbucket
src/main/scala/app/WikiController.scala
Scala
apache-2.0
11,070
package com.mesosphere.cosmos import org.scalatest.FreeSpec import com.twitter.util.Return import com.twitter.util.Throw final class TrysSpec extends FreeSpec { "join[A,B]" in { assertResult(Return((1,2)))(Trys.join(Return(1), Return(2))) val e = new IllegalArgumentException val n = new NoSuchElementEx...
dcos/cosmos
cosmos-test-common/src/test/scala/com/mesosphere/cosmos/TrysSpec.scala
Scala
apache-2.0
903
import sbt._ import Keys._ import bintray.BintrayKeys._ object IngredientsBuild extends Build { lazy val commonSettings = seq( organization := "io.buildo", scalaVersion := "2.11.8", crossScalaVersions := Seq("2.11.8", "2.12.1"), resolvers ++= Seq( "buildo mvn" at "https://raw.github.com/build...
buildo/ingredients
project/Build.scala
Scala
mit
1,488
package djinni import djinni.ast._ import djinni.generatorTools._ import djinni.meta._ class ObjcMarshal(spec: Spec) extends Marshal(spec) { override def typename(tm: MExpr): String = { val (name, _) = toObjcType(tm) name } def typename(name: String, ty: TypeDef): String = idObjc.ty(name) override d...
aijiekj/djinni
src/source/ObjcMarshal.scala
Scala
apache-2.0
5,504
package org.jetbrains.plugins.scala package lang package parser package parsing package top import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.parser.parsing.base.Modifier import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder import org.jetbra...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/lang/parser/parsing/top/TmplDef.scala
Scala
apache-2.0
3,377
/* * 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
mllib/src/main/scala/org/apache/spark/ml/r/GBTRegressorWrapper.scala
Scala
apache-2.0
5,192
package au.gov.dva.sopapi.tests.parsertests import au.gov.dva.sopapi.sopref.parsing.implementations.parsers.LegalReferenceSequences import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class LegalReferenceSequenceTests extends FunSuite { ...
govlawtech/dva-sop-api
app/src/test/scala/au/gov/dva/sopapi/tests/parsertests/LegalReferenceSequenceTests.scala
Scala
apache-2.0
1,117
package controllers import com.pellucid.caseconfig._ import com.typesafe.config.Config import models.configuration.AppProxy import play.api.mvc.{ActionBuilder, Controller, Request, Result} import scala.concurrent.Future trait ApiController extends Controller { val appConfig: Config private val appProxy = appCo...
joakim-ribier/proxy-foscam
app/controllers/ApiController.scala
Scala
mit
1,021
package s { object Boop extends j.Bar_1 { def foo() {} def bar() {} } class Baz(x: j.Bar_1) { x.foo override def toString = "Baz" } } object Test { def main(args: Array[String]): Unit = { println(new s.Baz(s.Boop)) } }
yusuke2255/dotty
tests/pending/run/t1430/Test_2.scala
Scala
bsd-3-clause
252
package breeze.linalg package operators import breeze.util.ArrayUtil import spire.syntax.cfor._ import support._ import scala.reflect.ClassTag import java.util import breeze.macros.expand import breeze.math._ import breeze.generic.UFunc import breeze.storage.Zero import breeze.generic.UFunc.{UImpl2, UImpl} import scal...
claydonkey/breeze
math/src/main/scala/breeze/linalg/operators/SparseVectorOps.scala
Scala
apache-2.0
47,719
// Copyright (C) 2011 Dmitri Nikulin // // This file is part of Vijil. // // Vijil is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later ve...
dnikulin/vijil
src/main/scala/com/dnikulin/vijil/render/RenderNotes.scala
Scala
agpl-3.0
1,604
package com.twitter.finagle.stats import com.twitter.common.metrics._ import com.twitter.common.stats.{Statistics, ApproximateHistogram} object ImmediateMetricsStatsReceiver { def newHistogramInterface(name: String): HistogramInterface = { new HistogramInterface { private[this] val hist = new ApproximateH...
koshelev/finagle
finagle-stats/src/main/scala/com/twitter/finagle/stats/ImmediateMetricsStatsReceiver.scala
Scala
apache-2.0
1,743
/* * Copyright (c) 2014-2021 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
monifu/monix
monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldRightL.scala
Scala
apache-2.0
3,244
/* * 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...
xnejp03/releaser
src/test/scala/uk/gov/hmrc/releaser/domain/ArtefactMetaDataSpecs.scala
Scala
apache-2.0
1,391
package com.github.diegopacheco.sandbox.ml.scala.smile.naivebayes import smile.classification.NaiveBayes import smile.feature.Bag import java.io.File object NaiveBayesExample extends App { val basePath = new File(".").getCanonicalPath + "/src/main/resources" val spamPath = basePath + "/spam" val spam2...
diegopacheco/ML_sandbox
Scala/scala_smile_ML_playground/src/main/scala/com/github/diegopacheco/sandbox/ml/scala/smile/naivebayes/NaiveBayesExample.scala
Scala
unlicense
6,597
/* * Copyright 2013-2015 JetBrains s.r.o. * * 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...
JetBrains/sbt-tc-logger
test/testdata/testsupport/nested/src/test/scala/MainSuite.scala
Scala
apache-2.0
1,253
package org.talkingpuffin.ui import java.awt.Rectangle import javax.swing.ImageIcon import java.text.NumberFormat import scala.swing.event.WindowClosing import org.talkingpuffin.{Main, Globals, Session, Constants} import org.talkingpuffin.filter.TagUsers import org.talkingpuffin.util.{FetchRequest, Loggable} import or...
dcbriccetti/talking-puffin
desktop/src/main/scala/org/talkingpuffin/ui/TopFrame.scala
Scala
mit
5,814
/******************************************************************************* * (C) Copyright 2015 Haifeng Li * * 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.apac...
arehart13/smile
shell/src/universal/bin/init.scala
Scala
apache-2.0
1,390
package bad.robot.radiate import bad.robot.radiate.OptionSyntax._ import scalaz.syntax.std.option._ object Environment { def getEnvironmentVariable(variable: String): Option[String] = { NonEmptyOption(sys.env.get(variable)) } def getEnvironmentVariable(variable: String, defaultValue: String): String = { ...
tobyweston/radiate
src/main/scala/bad/robot/radiate/Environment.scala
Scala
apache-2.0
402
package scalacookbook.chapter05 /** * Created by liguodong on 2016/7/4. */ object Main extends App{ // java // public String doSomething(int x) { // // code here // } // scala // def doSomething(x: Int): String = { // // code here // } def plusOne(i: Int) = i + 1 println(plusOne(109)) }
liguodongIOT/java-scala-mix-sbt
src/main/scala/scalacookbook/chapter05/Main.scala
Scala
apache-2.0
310
package scala.meta.internal package semanticdb import java.nio.charset.Charset import scala.collection.mutable import scala.{meta => m} import scala.meta.internal.io._ import scala.reflect.internal.util.{Position => GPosition, SourceFile => GSourceFile} import scala.reflect.io.VirtualFile import scala.reflect.io.{Plai...
DavidDudson/scalameta
scalameta/semanticdb-scalac-core/src/main/scala/scala/meta/internal/semanticdb/InputOps.scala
Scala
bsd-3-clause
2,074
/* Copyright 2009-2021 EPFL, Lausanne */ import stainless.lang._ object MySet { def set1(): Boolean = { val s = Set(1, 2, 3, 4) s.contains(3) }.holds def set2(): Boolean = { val s1 = Set[Int]() val s2 = Set.empty[Int] s1 == s2 }.holds }
epfl-lara/stainless
frontends/benchmarks/verification/valid/MySet.scala
Scala
apache-2.0
270
package geotrellis.raster.op.local import geotrellis._ import geotrellis._ import geotrellis.process._ /** * Set all values of output raster to one value or another based on whether a * condition is true or false. */ case class IfElseCell(r:Op[Raster], cond:Int => Boolean, trueValue:Int, fals...
Tjoene/thesis
Case_Programs/geotrellis-0.7.0/src/main/scala/geotrellis/raster/op/local/IfElseCell.scala
Scala
gpl-2.0
420
def fuse[M[_],N[_],A,B](fa: F[A])(f: A => M[B], g: A => N[B]) (implicit M: Applicative[M], N: Applicative[N]): (M[F[B]], N[F[B]]) = traverse[({type f[x] = (M[x], N[x])})#f, A, B](fa)(a => (f(a), g(a)))(M product N)
galarragas/FpInScala
answerkey/applicative/14.answer.scala
Scala
mit
239
/* * konpare * Copyright (C) 2015 Alexander Fefelov <https://github.com/alexanderfefelov> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your ...
alexanderfefelov/konpare
src/main/scala/com/github/alexanderfefelov/konpare/syntax/predicate/Create.scala
Scala
gpl-3.0
1,123
package controllers.forms import play.api.data.Form import play.api.data.Forms._ /** * Created by info on 11.07.2016. */ case class SetupForm(email: String, password: String, firstName: String, lastName: String, hadoopUser: String, qrygraphFolder: String, fsDefaultName: String, mapredJobTracker: String) object S...
Starofall/QryGraph
qrygraph/jvm/app/controllers/forms/SetupForm.scala
Scala
mit
693
/* Copyright 2009-2015 - Big Data Technologies S.R.L. All Rights Reserved. */ package org.supler.field import org.supler._ import org.supler.validation._ import play.api.libs.json._ case class SelectManyListField[T, U]( name: String, read: T => List[U], write: (T, List[U]) => T, validators: List[Validator[T,...
aparo/scalajs-supler
supler/shared/src/main/scala/org/supler/field/SelectManyListField.scala
Scala
apache-2.0
2,944
/* * 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 ...
kevinyu98/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisSuite.scala
Scala
apache-2.0
33,274
package com.github.ellchow.scaramouch.collection import org.scalatest._ import org.scalatest.matchers._ import org.scalatest.prop._ import org.scalacheck._ import scalaz._, Scalaz._ class SearchTest extends FlatSpec with Matchers with GeneratorDrivenPropertyChecks { behavior of "binary search" it shou...
ellchow/scaramouch
scaramouch-collection/src/test/scala/com/github/ellchow/scaramouch/collection/SearchTest.scala
Scala
apache-2.0
1,137
package doodle.core import scala.annotation.tailrec /** * A value in the range [0, 1] */ final case class Normalized(get: Double) extends AnyVal { def +(that: Normalized): Double = this.get + that.get def -(that: Normalized): Double = this.get - that.get def max(that: Normalized): Normalized = ...
Angeldude/doodle
shared/src/main/scala/doodle/core/Normalized.scala
Scala
apache-2.0
1,241
/** * Copyright 2013 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 agreed ...
samuelgruetter/RxScala
src/main/scala/rx/lang/scala/subscriptions/CompositeSubscription.scala
Scala
apache-2.0
2,656
package im.actor.server.persist.contact import im.actor.server.db.ActorPostgresDriver.api._ import im.actor.server.models class UserPhoneContactTable(tag: Tag) extends UserContactBase[models.contact.UserPhoneContact](tag, "user_phone_contacts") with InheritingTable { def phoneNumber = column[Long]("phone_number") ...
VikingDen/actor-platform
actor-server/actor-persist/src/main/scala/im/actor/server/persist/contact/UserPhoneContact.scala
Scala
mit
1,021
package com.olegych.scastie package client package components import japgolly.scalajs.react._, vdom.all._, extra._ final case class PromptModal(modalText: String, modalId: String, isClosed: Boolean, close: Reusable[Callback], ...
scalacenter/scastie
client/src/main/scala/com.olegych.scastie.client/components/PromptModal.scala
Scala
apache-2.0
1,527
/* * Copyright 2012-2020 the original author or 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 ap...
planet42/Laika
core/shared/src/main/scala/laika/render/FORenderer.scala
Scala
apache-2.0
16,246
package com.twitter.finagle import com.twitter.finagle.server.ServerRegistry import com.twitter.finagle.util.InetSocketAddressUtil import com.twitter.util._ import java.net.{InetSocketAddress, SocketAddress} /** * Trait ListeningServer represents a bound and listening * server. Closing a server instance unbinds the...
koshelev/finagle
finagle-core/src/main/scala/com/twitter/finagle/Server.scala
Scala
apache-2.0
5,279
package com.simple.simplespec.matchers import org.hamcrest.{Description, BaseMatcher} class ApproximateNumericMatcher[A](expected: A, delta: A, num: Numeric[A]) extends BaseMatcher[A] { def describeTo(description: Description) { description.a...
SimpleFinance/simplespec
src/main/scala/com/simple/simplespec/matchers/ApproximateNumericMatcher.scala
Scala
mit
724
/* * La Trobe University - Distributed Deep Learning System * Copyright 2016 Matthias Langer (t3l@threelights.de) * * 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...
bashimao/ltudl
blaze/src/main/scala/edu/latrobe/blaze/modules/bitmap/CropCenterSquare.scala
Scala
apache-2.0
2,335
import sbt._ import Keys._ import play.Project._ import cloudbees.Plugin._ object ApplicationBuild extends Build { val appName = "jphm1" val appVersion = "1.0-SNAPSHOT" val appDependencies = Seq( // Add your project dependencies here, jdbc, anorm, "mysql" % "mysql-connector-java" ...
smk-wgen/maji3
project/Build.scala
Scala
gpl-2.0
596
/* * Test case for SI-4835. This tests confirm that the fix * doesn't break laziness. To test memory consumption, * I need to confirm that OutOfMemoryError doesn't occur. * I could create such tests. However, such tests consume * too much time and memory. */ object Test { private final val INFINITE = -1 de...
yusuke2255/dotty
tests/run/t4835.scala
Scala
bsd-3-clause
1,221
package com.atomist.param case class SimpleParameterValues(parameterValues: Seq[ParameterValue]) extends ParameterValues object SimpleParameterValues { def apply(pvs: ParameterValue*): ParameterValues = SimpleParameterValues(pvs) def apply(m: Map[String, Object]): ParameterValues = fromMap(m) def apply...
atomist/rug
src/main/scala/com/atomist/param/SimpleParameterValues.scala
Scala
gpl-3.0
588