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 net.xivilization.ddate import java.util.Date import java.util.Calendar import android.appwidget.AppWidgetProvider import android.appwidget.AppWidgetManager import android.content.Context import android.widget.RemoteViews class DdateWidget extends AppWidgetProvider { override def onUpdate(context: Context, ...
Leonidas-from-XIV/lndsDdate
src/main/scala/DdateWidget.scala
Scala
gpl-3.0
1,260
package org.jetbrains.plugins.scala package lang package psi package stubs package elements import com.intellij.lang.ASTNode import org.jetbrains.plugins.scala.lang.psi.api.statements.ScFunctionDefinition import org.jetbrains.plugins.scala.lang.psi.impl.statements.ScFunctionDefinitionImpl /** * User: Alexander Podk...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/ScFunctionDefinitionElementType.scala
Scala
apache-2.0
659
// As per https://meta.plasm.us/posts/2013/08/31/feeding-our-vampires/ // scalac: -Werror import scala.annotation.StaticAnnotation import scala.reflect.macros.whitebox.Context import scala.language.experimental.macros class body(tree: Any) extends StaticAnnotation object Macros { def selFieldImpl(c: Context) = { ...
scala/scala
test/files/run/macro-vampire-false-warning/Macros_1.scala
Scala
apache-2.0
2,641
import scala.util.control.NonFatal import scalaz.{\\/, \\/-, -\\/, Bind, Traverse} import scalaz.std.list.listInstance package object buccaneer { type Args = List[String] type Expr[A] = List[Denotation[A]] type AST[A] = List[(Denotation[A], Option[String])] type Result[A] = \\/[String, A] def success[A](a: ...
AvramRobert/buccaneer
src/main/scala/buccaneer/package.scala
Scala
apache-2.0
838
/* * 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
core/src/main/scala/org/apache/spark/io/MutableCheckedOutputStream.scala
Scala
apache-2.0
1,615
/** * Copyright (C) 2011-2012 Kaj Magnus Lindberg (born 1979) * * 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, either version 3 of the * License, or (at your option) any later vers...
debiki/debiki-server-old
modules/debiki-core/src/main/scala/com/debiki/core/user.scala
Scala
agpl-3.0
14,841
/* * Copyright 2018 Frugal Mechanic (http://frugalmechanic.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
frugalmechanic/fm-common
jvm/src/test/scala/fm/common/TestImmutableDate.scala
Scala
apache-2.0
2,037
/* * Copyright (c) 2011-13 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/nat.scala
Scala
apache-2.0
4,490
package scala.meta package internal package equality import scala.meta.internal.semantic._ // NOTE: Semantic comparison operates almost like structural comparison, // but also taking into account envs, denots and typings. // The difference with structural comparison is refs being treated differently, namely: // 1) s...
Dveim/scalameta
scalameta/trees/src/main/scala/scala/meta/internal/equality/Semantic.scala
Scala
bsd-3-clause
5,552
/* * 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 ...
andrewor14/iolap
core/src/main/scala/org/apache/spark/rdd/UnionRDD.scala
Scala
apache-2.0
3,317
/* Copyright (c) 2016, Rice University Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2....
agrippa/spark-swat
functional-tests/tuple-prim-input-output/src/main/scala/sparksimple/SparkSimple.scala
Scala
bsd-3-clause
4,663
package swe.backend.service import java.net._ import com.sun.net.httpserver._ import com.hp.hpl.jena.rdf.model._ import com.hp.hpl.jena.query._ import com.hp.hpl.jena.sparql.resultset._ import scala.collection.JavaConversions._ import java.io._ import scala.io.Source import java.nio._ import org.apache.comm...
flosse/semanticExperiments
backend/src/main/scala/service/WebServer.scala
Scala
gpl-3.0
1,069
package com.twitter.finagle.thrift import com.google.common.base.Charsets import com.twitter.finagle.stats.{Counter, DefaultStatsReceiver, StatsReceiver} import com.twitter.logging.Logger import com.twitter.util.NonFatal import java.nio.{ByteBuffer, CharBuffer} import java.nio.charset.{CoderResult, CharsetEncoder} imp...
sveinnfannar/finagle
finagle-thrift/src/main/scala/com/twitter/finagle/thrift/Protocols.scala
Scala
apache-2.0
7,248
package com.danielasfregola.twitter4s.entities final case class TweetId(id: Long, id_str: String)
DanielaSfregola/twitter4s
src/main/scala/com/danielasfregola/twitter4s/entities/TweetId.scala
Scala
apache-2.0
99
/* * Copyright 2010-2011 Vilius Normantas <code@norma.lt> * * This file is part of Crossbow library. * * Crossbow 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 ...
ViliusN/Crossbow
crossbow-core/test/lt/norma/crossbow/indicators/AverageTest.scala
Scala
gpl-3.0
2,647
/** * Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0 * See accompanying LICENSE file. */ package kafka.manager.utils import kafka.manager.ClusterConfig import org.scalatest.{Matchers, FunSuite} /** * @author hiral */ class TestClusterConfig extends FunSuite with Matchers { test("inva...
keen/kafka-manager
test/kafka/manager/utils/TestClusterConfig.scala
Scala
apache-2.0
1,540
/* * Copyright 2011 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
tellapart/scrooge
scrooge-generator/src/main/scala/com/twitter/scrooge/Main.scala
Scala
apache-2.0
5,579
import cats.Monoid import cats.instances.double.catsKernelStdGroupForDouble import cats.instances.tuple.catsKernelStdCommutativeGroupForTuple2 import scala.collection.Iterator /** * */ package object piecewise { @inline final def cubicRoots(a: Double, b: Double, c: Double, d: Double): Seq[Double] = { imp...
daniil-timofeev/gridsplines
piecewise/src/main/scala/piecewise/package.scala
Scala
apache-2.0
4,082
package ecommerce.shipping.app import akka.actor._ import akka.kernel.Bootable import com.typesafe.config.{Config, ConfigFactory} import ecommerce.shipping.{HttpService, ShippingReadFrontConfiguration} class ShippingReadFrontApp extends Bootable { val config = ConfigFactory.load() val system = ActorSystem("ship...
odd/ddd-leaven-akka-v2
shipping/read-front/src/main/scala/ecommerce/shipping/app/ShippingReadFrontApp.scala
Scala
mit
660
package isabelle.eclipse.ui.editors import isabelle.eclipse.core.text.DocumentModel import isabelle.eclipse.ui.internal.IsabelleUIPlugin.{error, log} import isabelle.eclipse.ui.util.SWTUtil import org.eclipse.jface.text.{ BadLocationException, DocumentEvent, IDocumentListener, ITextViewer, IViewportListener...
andriusvelykis/isabelle-eclipse
isabelle.eclipse.ui/src/isabelle/eclipse/ui/editors/DocumentPerspectiveTracker.scala
Scala
epl-1.0
4,120
package stoop.attachments import org.scalatest.FunSpec import stoop.{TestDoc, DBInfo, DbAdmin} import java.util.UUID import org.scalatest.matchers.ShouldMatchers import scala.concurrent.Await import java.util.concurrent.TimeUnit import scala.concurrent.duration.Duration import spray.json._ import stoop.DbAdmin case c...
MonsantoCo/stoop
src/test/scala/stoop/attachments/AttachmentUploaderTest.scala
Scala
bsd-3-clause
1,435
package filodb import akka.actor.{ActorRef} import akka.pattern.ask import akka.util.Timeout import com.typesafe.config.Config import com.typesafe.scalalogging.slf4j.StrictLogging import java.util.concurrent.ArrayBlockingQueue import org.apache.spark.sql.{SQLContext, SaveMode, DataFrame, Row} import org.apache.spark.s...
markhamstra/FiloDB
spark/src/main/scala/filodb.spark/package.scala
Scala
apache-2.0
8,759
/* Copyright (c) 2015 Lucas Satabin * * 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...
satabin/lingua
fst/src/main/scala/lingua/fst2/package.scala
Scala
apache-2.0
1,993
package scalan.util import scalan.{BaseNestedTests, DFunc} import debox.{Set => DSet, Buffer => DBuffer} class GraphUtilTests extends BaseNestedTests { import GraphUtil._ describe("Collecting dependencies") { val graph = Array( List(1, 2), // 0 List(3), // 1 List(4), // 2 List(5...
ScorexFoundation/sigmastate-interpreter
common/src/test/scala/scalan/util/GraphUtilTests.scala
Scala
mit
1,558
package com.natalinobusa.mavr import akka.actor.{ Actor } import spray.routing.HttpService import spray.routing.directives.PathDirectives._ import spray.json.DefaultJsonProtocol import spray.httpx.SprayJsonSupport.sprayJsonMarshaller import spray.httpx.SprayJsonSupport.sprayJsonUnmarshaller case class Person(fname: ...
natalinobusa/mavr
src/main/scala/com/natalinobusa/mavr/MavrApiService.scala
Scala
apache-2.0
1,973
import scala.language.higherKinds object t9451 { implicit def impl[I[_]]: { type F[X] = { type Self = I[X] } } = new { type F[X] = { type Self = I[X] } } implicitly[{type F[X] = { type Self = Iterable[X] }}] }
lrytz/scala
test/files/pos/t9451.scala
Scala
apache-2.0
227
package com.dslplatform.test import java.io.ByteArrayInputStream import com.dslplatform.api.client.{HttpClient, HttpHeaderProvider, SettingsHeaderProvider} import org.specs2.mutable._ class AuthHeaderTest extends Specification { override def is = s2""" Header Provider is resolved from the ServiceLocator ...
ngs-doo/dsl-client-scala
http/src/test/scala/com/dslplatform/test/AuthHeaderTest.scala
Scala
bsd-3-clause
2,029
/* * Copyright (c) 2017 Georgi Krastev * * 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...
wheaties/shapeless
core/src/main/scala/shapeless/orelse.scala
Scala
apache-2.0
1,563
package skinny.assets import org.scalatest._ class CoffeeScriptCompilerSpec extends FlatSpec with Matchers { behavior of "CoffeeScriptCompiler" it should "compile code" in { val compiler = CoffeeScriptCompiler() val js = compiler.compile( "person.coffee", """class Person | construct...
seratch/skinny-framework
assets/src/test/scala/skinny/assets/CoffeeScriptCompilerSpec.scala
Scala
mit
1,382
package com.modelfabric.akka.cluster import com.modelfabric.akka.actor._ /** * A ClusterSupervisor handles events for a node in the BKNOW cluster */ trait ClusterSupervisor extends UnknownMessageHandler with LocalMessageHandler with MemberEventSubscriber with MemberEventHandler with ClusterStateHandler { ...
modelfabric/scala-utils
src/main/scala/com/modelfabric/akka/cluster/ClusterSupervisor.scala
Scala
mit
427
/* * 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...
mjwallin1/wookiee-zookeeper
src/main/scala/com/webtrends/harness/component/zookeeper/NodeRegistration.scala
Scala
apache-2.0
3,933
package org.openeyes.api.services import org.bson.types.ObjectId import org.openeyes.api.models._ /** * Created by stu on 02/09/2014. */ object PatientService { def find(id: String): Option[Patient] = { Patient.findOneById(new ObjectId(id)) } def findAll = { Patient.findAll().toSeq } def search...
openeyes/poc-backend
src/main/scala/org/openeyes/api/services/PatientService.scala
Scala
gpl-3.0
446
import javax.persistence.{EntityManager, PersistenceContext} import <%= packageName %>.entities.Teste import org.junit.Test import org.junit.runner.RunWith import org.scalatest.MustMatchers import org.scalatest.junit.{JUnitSuite, AssertionsForJUnit} import org.springframework.test.context.jdbc.Sql import org.springfra...
giovannicandido/slush-spring-aurelia
templates/server/src/it/scala/DBSpec.scala
Scala
mit
1,434
package models import java.util.UUID import com.mohiva.play.silhouette.api.{ Identity, LoginInfo } import com.mohiva.play.silhouette.api.{LoginInfo, Identity} import play.api.libs.json.Reads._ import play.api.libs.functional.syntax._ import play.api.libs.json._ /** * The user object. * * @param userID The unique I...
Empia/corpreg
models/User.scala
Scala
apache-2.0
1,655
/* * 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 ...
himanshudhami/PredictionIO
core/src/main/scala/org/apache/predictionio/controller/PAlgorithm.scala
Scala
apache-2.0
4,913
import org.apache.log4j.{Level, Logger} import org.apache.spark.sql.SparkSession import preprocess.Preprocessor /** * 预处理,包括: "数据清洗", "标签索引化", "分词", "向量化" * */ object PreprocessDemo extends Serializable { def main(args: Array[String]): Unit = { Logger.getLogger("org").setLevel(Level.WARN) // HanLP.C...
HGladiator/MyCodes
Scala/PreprocessDemo.scala
Scala
mit
642
package io.udash.web.guide.demos.rpc import io.udash.web.SeleniumTest class RpcSerializationTest extends SeleniumTest { val rpcFrontendUrl = "/rpc/serialization" "RpcSerialization view" should { driver.get(server.createUrl(rpcFrontendUrl)) "contain example button" in { eventually { driver....
UdashFramework/udash-guide
selenium/src/test/scala/io/udash/web/guide/demos/rpc/RpcSerializationTest.scala
Scala
gpl-3.0
1,405
/* * 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...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/feature/image/RowToImageFeature.scala
Scala
apache-2.0
1,486
package org.powlab.jeye.tests import org.powlab.jeye.tests.shortcirc._ import org.powlab.jeye.decompile._ package shortcirc { class ShortCircuitAssignTest1Test extends DecompileTestClass(classOf[ShortCircuitAssignTest1], true) {} class ShortCircuitAssignTest1aTest extends DecompileTestClass(classOf[ShortCircuit...
powlab/jeye
src/test/scala/org/powlab/jeye/tests/ShortcircTests.scala
Scala
apache-2.0
2,162
package com.blinkbox.books.purchasing.admin import akka.actor.{ ActorRefFactory, ActorSystem, Props } import akka.util.Timeout import com.blinkbox.books.config.Configuration import com.blinkbox.books.logging.Loggers import com.blinkbox.books.spray.{ HealthCheckHttpService, HttpServer } import com.typesafe.scalalogging...
blinkboxbooks/skeleton-service
admin/src/main/scala/com/blinkbox/books/purchasing/admin/Main.scala
Scala
mit
1,289
package com.github.cmanou.scrimage.utils.dithering.filters import com.sksamuel.scrimage.Image import org.scalatest.{BeforeAndAfter, FunSuite, OneInstancePerTest} class SierraFilterTest extends FunSuite with BeforeAndAfter with OneInstancePerTest { val original = Image.fromStream(getClass.getResourceAsStream("/maco...
cmanou/scrimage-utils
src/test/scala/com/github/cmanou/scrimage/utils/dithering/filters/SierraFilterTest.scala
Scala
mit
592
/** * Copyright 2011-2012 eBusiness Information, Groupe Excilys (www.excilys.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * *...
Tjoene/thesis
Case_Programs/gatling-1.4.0/gatling-core/src/test/scala/com/excilys/ebi/gatling/core/util/PaddableStringBuilderSpec.scala
Scala
gpl-2.0
1,673
package com.bisphone.util.syntax import com.bisphone.std._ /** * @author Reza Samei <reza.samei.g@gmail.com> */ final class StdFailureAccessors[T<:Throwable](val self: T) extends AnyVal { @inline def cause: Option[Throwable] = Option(self.getCause) @inline def subject: String = self.getMessage @inline def t...
reza-samei/bisphone-std
src/main/scala/com/bisphone/util/syntax/StdFailureAccessors.scala
Scala
mit
364
package models import lib.joda._ import lib.neo4j.data._ import lib.neo4j.data.Parser._ import lib.neo4j.Neo4j import models.enums._ import net.flatmap.ace._ import net.flatmap.ace.CypherParser._ import play.api.Logger import play.api.mvc.RequestHeader import scala.language.postfixOps case class Instance...
fynnfeldpausch/frame
app/models/Instance.scala
Scala
mit
14,732
import sbt._ import Keys._ import AndroidKeys._ object General { val settings = Defaults.defaultSettings ++ Seq ( name := "SimpleRadio", version := "0.1", versionCode := 0, scalaVersion := "2.10.0", platformName in Android := "android-14", resolvers += ( "Edge System Design Repositor...
edge-sys-design/simple-radio
project/Build.scala
Scala
gpl-2.0
1,650
/* * Copyright (C) 2011-2013 exsplay * * 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...
wertlex/exsplay
exsplay/src/main/scala/exsplay/tools/ON.scala
Scala
apache-2.0
1,239
/** * 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...
ijuma/kafka
core/src/main/scala/kafka/javaapi/GroupCoordinatorResponse.scala
Scala
apache-2.0
1,727
import play.api._ import play.api.mvc._ import play.api.mvc.Results._ import scala.concurrent.Future import play.libs.Akka import akka.actor.Props import cc.mewa.channels.ChannelManagerActor import play.api.Play import actors.ConnectionManagerActor import cc.mewa.api.ChannelApp.AppEvent import cc.mewa.channels.EventPr...
AnthillTech/mewa
app/Global.scala
Scala
bsd-2-clause
903
package mimir.util import com.typesafe.scalalogging.LazyLogging import mimir.algebra._ object TextUtils extends LazyLogging { def parsePrimitive(t: Type, s: String): PrimitiveValue = { t match { case TInt() => IntPrimitive(java.lang.Long.parseLong(s)) case TFloat() => FloatPrimitive(java.lan...
UBOdin/mimir
src/main/scala/mimir/util/TextUtils.scala
Scala
apache-2.0
2,877
package scutil.gui.geom import minitest._ object SgSpanTest extends SimpleTestSuite { test("SgSpan should intersect nothing when empty") { assertEquals( SgSpan.startEnd(1, 1) intersects SgSpan.startEnd(0, 2), false ) } test("SgSpan should intersect nothing when empty") { assertEquals( SgSpan.startEn...
ritschwumm/scutil
modules/gui/src/test/scala/scutil/gui/geom/SgSpanTest.scala
Scala
bsd-2-clause
4,588
/* * 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 ...
lincoln-lil/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/utils/ScanUtil.scala
Scala
apache-2.0
6,292
/* * 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...
CodeSmell/stream-reactor
kafka-connect-pulsar/src/main/scala/com/datamountaineer/streamreactor/connect/pulsar/sink/PulsarSinkTask.scala
Scala
apache-2.0
3,224
package org.bowlerframework.squeryl.dao import org.squeryl.{Table, KeyedEntity} import org.bowlerframework.squeryl.SquerylDao import org.squeryl.PrimitiveTypeMode._ /** * Created by IntelliJ IDEA. * User: wfaler * Date: 30/01/2011 * Time: 15:40 * To change this template use File | Settings | File Templates. */ ...
rkpandey/Bowler
squeryl-mapper/src/main/scala/org/bowlerframework/squeryl/dao/IntKeyedDao.scala
Scala
bsd-3-clause
922
/* * 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 ...
chuckchen/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala
Scala
apache-2.0
73,410
package term.project.SentimentalStats import scala.io.Source /** * Handles queries to sportsdatabase.com * * Author: David Prichard * Last Modified: 4-19-2016 */ object SportsDatabase { val baseURL = "http://api.sportsdatabase.com/" val queryFormat = "/query.json?output=json&sdql=" val apiKey = "&api...
4102/Sentimental-Stats
src/main/scala/SportsDatabase.scala
Scala
gpl-3.0
1,364
package de.tu_berlin.formic.datastructure.linear.server import de.tu_berlin.formic.common.datastructure.DataStructureName import upickle.default._ /** * @author Ronny Bräunlich */ class DoubleListDataStructureFactory extends LinearServerDataStructureFactory[Double] { override val name: DataStructureName = Doubl...
rbraeunlich/formic
linear/jvm/src/main/scala/de/tu_berlin/formic/datastructure/linear/server/DoubleListDataStructureFactory.scala
Scala
apache-2.0
442
package scavenger import scala.concurrent.Future import scala.concurrent.ExecutionContext import scavenger.categories.formalccc /** A distinguished type of morphism that chooses the * first component of a product type. * * @since 2.1 * @author Andrey Tyukin */ case class Fst[X, Y]() extends AtomicAlgorithm[...
tyukiand/scavenger_2_x
src/main/scala/scavenger/Projections.scala
Scala
gpl-3.0
864
package org.oneugene.log.akka import akka.actor.{Actor, ActorRef, Props} import akka.event.{Logging, LoggingAdapter} import org.oneugene.log.PropertyChange import org.oneugene.log.model.User import org.oneugene.log.play.{NoChangesRecord, PropertyChangeRecord} import scala.collection.mutable.ArrayBuffer /** * Conta...
oneugene/evgeniy-portfolio
changelog-demo/src/main/scala/org/oneugene/log/akka/UserActor.scala
Scala
mit
1,251
package lib import models.IatiDataSource import reactivemongo.bson._ import models.IatiDataSource._ import play.api.libs.ws.WS import play.api.libs.iteratee.Enumerator import concurrent.ExecutionContext.Implicits.global import reactivemongo.bson.handlers.DefaultBSONHandlers.DefaultBSONDocumentWriter import reactivemon...
DFID/aid-platform-beta
src/platform/modules/admin/app/lib/IatiDataSourceSelector.scala
Scala
mit
3,941
package picasso.model.integer import picasso.utils._ sealed abstract class Expression case class Plus(l: Expression, r: Expression) extends Expression case class Minus(l: Expression, r: Expression) extends Expression case class Constant(i: Int) extends Expression { override def toString = i.toString } case class...
dzufferey/picasso
core/src/main/scala/picasso/model/integer/AST.scala
Scala
bsd-2-clause
11,784
/* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/iht-frontend
test/iht/views/application/assets/insurancePolicy/InsurancePolicyDetailsInTrustViewTest.scala
Scala
apache-2.0
2,335
/** * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com> */ package akka.actor import akka.dispatch.sysmsg._ import akka.dispatch.{ UnboundedMessageQueueSemantics, RequiresMessageQueue } import akka.routing._ import akka.event._ import akka.util.{ Switch, Helpers } /** * @note IMPLEMENT IN SCALA.JS ...
jmnarloch/akka.js
akka-js-actor/js/src/main/scala/akka/actor/ActorRefProvider.scala
Scala
bsd-3-clause
32,982
package com.github.tminglei.slickpg import java.util.concurrent.Executors import org.json4s._ import org.scalatest.FunSuite import slick.jdbc.GetResult import scala.concurrent.{ExecutionContext, Await} import scala.concurrent.duration._ class PgJson4sSupportSuite extends FunSuite { implicit val testExecContext = ...
vikraman/slick-pg
addons/json4s/src/test/scala/com/github/tminglei/slickpg/PgJson4sSupportSuite.scala
Scala
bsd-2-clause
8,215
/* * Copyright (c) 2014, Brook 'redattack34' Heisler * 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 the above copyright * notice, t...
Redattack34/ModularRayguns
src/main/scala/com/castlebravostudios/rayguns/items/misc/Tier3GainMedium.scala
Scala
bsd-3-clause
2,099
/* * Copyright (c) 2015-2017 Toby Weston * * 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...
tobyweston/learn-scala-java-devs
src/main/scala/s4j/scala/chapter06/NamedArgs.scala
Scala
apache-2.0
837
object Test { case object Bob { override def equals(other: Any) = true } class Bob2 { override def equals(other: Any) = true } val Bob2 = new Bob2 def f0(x: Any) = x match { case Bob2 => Bob2 } def f1(x: Any) = x match { case Bob => Bob } // def f2(x: Any): Bob.type = x match { case x @ Bob => x } /...
som-snytt/dotty
tests/run/i1463.scala
Scala
apache-2.0
645
/* * Copyright 2001-2012 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...
svn2github/scalatest
src/main/scala/org/scalatest/concurrent/Eventually.scala
Scala
apache-2.0
23,109
package controllers.web import play.api._ import play.api.mvc._ import play.api.Play.current import play.api.data.Form import play.api.data.Forms._ import play.api.data.validation.Constraints._ import play.api.i18n.Messages import models._ import utils.silhouette._ import utils.silhouette.Implicits._ import com.mohiva...
vtapadia/crickit
modules/web/app/controllers/web/Auth.scala
Scala
apache-2.0
8,073
package org.bitcoins.testkit.wallet import org.bitcoins.commons.config.AppConfig import org.bitcoins.core.api.chain.ChainQueryApi import org.bitcoins.core.api.node.NodeApi import org.bitcoins.core.currency.Satoshis import org.bitcoins.core.protocol.dlc.models.ContractOraclePair import org.bitcoins.dlc.wallet.{DLCAppCo...
bitcoin-s/bitcoin-s
testkit/src/main/scala/org/bitcoins/testkit/wallet/BitcoinSDualWalletTest.scala
Scala
mit
6,975
package org.orbeon.oxf.fr.relational sealed trait Version case object Unspecified extends Version case object Next extends Version case class Specific (version: Int) extends Version case class ForDocument(documentId: String) extends Version object Vers...
wesley1001/orbeon-forms
src/main/scala/org/orbeon/oxf/fr/relational/Version.scala
Scala
lgpl-2.1
958
/* * Copyright 2015 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
keithhall/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600j/v3/J25A.scala
Scala
apache-2.0
1,013
package net.fwbrasil.radon.util import scala.collection._ trait ExclusiveThreadLocalItem { private[util] var boundThread: Option[Thread] = None private[util] def setBoundThread(thread: Option[Thread]) = boundThread = thread } class ExclusiveThreadLocal[T <: ExclusiveThreadLocalItem] { ...
fwbrasil/radon-stm
src/main/scala/net/fwbrasil/radon/util/ExclusiveThreadLocal.scala
Scala
lgpl-2.1
1,272
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC128C.scala
Scala
apache-2.0
1,154
/* sbt -- Simple Build Tool * Copyright 2008, 2009 Steven Blundy, Mark Harrah, David MacIver, Mikko Peltonen */ package sbt import scala.collection.immutable.TreeSet private trait RunCompleteAction extends NotNull private case class Exit(code: Int) extends RunCompleteAction private object Reload extends RunComplet...
matheshar/simple-build-tool
src/main/scala/sbt/Main.scala
Scala
bsd-3-clause
26,513
/* * Copyright (C) 2015 Stratio (http://stratio.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
jjlopezm/crossdata
core/src/main/scala/org/apache/spark/sql/crossdata/catalog/persistent/PersistentCatalogWithCache.scala
Scala
apache-2.0
7,038
package documentation import org.qirx.littlespec.Specification import testUtils.PostToApplication import testUtils.ApiExampleSpecification import play.api.libs.json.Json.obj import play.api.libs.json.Json.arr import testUtils.PutToApplication import testUtils.GetFromApplication import testUtils.PatchToApplication cla...
EECOLOR/play-cms
cms/src/test/scala/documentation/_02_04_Patch_Failures.scala
Scala
mit
3,304
import scala.tools.nsc.interpreter.IMain object Test extends dotty.runtime.LegacyApp { val engine = new IMain.Factory getScriptEngine() engine.asInstanceOf[IMain].settings.usejavacp.value = true engine put ("n", 10) engine eval "1 to n.asInstanceOf[Int] foreach print" }
yusuke2255/dotty
tests/pending/run/t7843-jsr223-service.scala
Scala
bsd-3-clause
280
package org.scalatra.test import scala.util.DynamicVariable import java.net.URLEncoder.encode import dispatch._ import org.apache.http.{HttpEntity, HttpResponse} trait DispatchClient extends Client { type Response = SimpleResponse def baseUrl: String lazy val http: Http = Http def submit[A]( method: St...
kuochaoyi/scalatra
test/src/main/scala/org/scalatra/test/DispatchClient.scala
Scala
bsd-2-clause
1,049
package com.mesosphere.cosmos.error import com.mesosphere.universe import io.circe.Encoder import io.circe.JsonObject import io.circe.generic.semiauto.deriveEncoder final case class ServiceMarathonTemplateNotFound( packageName: String, packageVersion: universe.v3.model.Version ) extends CosmosError { override d...
dcos/cosmos
cosmos-common/src/main/scala/com/mesosphere/cosmos/error/ServiceMarathonTemplateNotFound.scala
Scala
apache-2.0
678
package chapter13 import chapter7.Nonblocking.Par sealed trait Console[A] { def toPar: Par[A] def toThunk: () => A def flatMap[B](f: A => Console[B]): Console[B] = { val thunk = this.toThunk val value = thunk() f(value) } } object Console { case class PrintLine(line: String) extends Console[...
RaphMad/FPInScala
src/main/scala/chapter13/Console.scala
Scala
mit
841
package com.gettyimages.spray.swagger import com.wordnik.swagger.annotations._ import javax.ws.rs.Path import spray.routing.HttpService import spray.httpx.Json4sSupport @Api(value = "/dict", description = "This is a dictionary api.") trait DictHttpService extends HttpService with Json4sSupport { var dict: Map[Stri...
devsprint/akka-http-swagger
src/test/scala/com/gettyimages/spray/swagger/samples/DictHttpService.scala
Scala
apache-2.0
1,549
/* This file is part of Intake24. Copyright 2015, 2016 Newcastle University. 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 appl...
digitalinteraction/intake24
ApiPlayServer/app/security/AuthInfoServiceImpl.scala
Scala
apache-2.0
2,305
/* * @author Philip Stutz * @author Mihaela Verman * * Copyright 2013 University of Zurich * * 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/li...
danihegglin/DynDCO
src/main/scala/com/signalcollect/factory/mapper/DefaultMapperFactory.scala
Scala
apache-2.0
1,284
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ConeyLiu/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/connection/ConnectionProvider.scala
Scala
apache-2.0
2,881
/* * StructuredBPTest.scala * Test of structure belief propagation algorithm. * * Created By: Avi Pfeffer (apfeffer@cra.com) * Creation Date: March 1, 2015 * * Copyright 2015 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email figaro@cra.com for information. * * See htt...
scottcb/figaro
Figaro/src/test/scala/com/cra/figaro/test/algorithm/structured/strategy/StructuredBPTest.scala
Scala
bsd-3-clause
9,820
package org.datacleaner.result.html import org.junit.{Assert, Test} import org.scalatestplus.junit.AssertionsForJUnit class FlotChartLocatorTest extends AssertionsForJUnit { @Test def testBasicStuff = { Assert.assertEquals("http://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js", FlotChartLocato...
datacleaner/DataCleaner
components/html-rendering/src/test/scala/org/datacleaner/result/html/FlotChartLocatorTest.scala
Scala
lgpl-3.0
665
package tests import so.eval.{ EvaluationRequest, Router } import org.scalatest.{ BeforeAndAfter, FunSpec, Inside, ParallelTestExecution } import org.scalatest.matchers.ShouldMatchers class Base64 extends FunSpec with ShouldMatchers with Inside with BeforeAndAfter with ParallelTestExecution { describe("B...
eval-so/minibcs
src/test/scala/Base64.scala
Scala
apache-2.0
850
/*********************************************************************** * 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 ...
nagavallia/geomesa
geomesa-kafka/geomesa-kafka-tools/geomesa-kafka-10-tools/src/main/scala/org/locationtech/geomesa/kafka/tools/status/KafkaDescribeSchemaCommand.scala
Scala
apache-2.0
3,070
/* Copyright 2009-2016 EPFL, Lausanne */ package leon package synthesis package rules.unused import purescala.Constructors._ import purescala.Expressions.{Equals, Expr, FunctionInvocation} import purescala.Extractors.TopLevelAnds case object SelectiveInlining extends Rule("Sel. Inlining") { def instantiateOn(impli...
regb/leon
src/main/scala/leon/synthesis/rules/unused/SelectiveInlining.scala
Scala
gpl-3.0
1,294
/* * Copyright 2014 – 2015 Paul Horn * * 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 agree...
knutwalker/rx-redis
tests/src/test/scala/rx/redis/commands/ConnectionCommandsSpec.scala
Scala
apache-2.0
991
package skuber import org.specs2.mutable.Specification // for unit-style testing import LabelSelector.dsl._ /** * @author David O'Riordan */ class LabelSelectorSpec extends Specification { "A label selector can be constructed" >> { "from a label existence requirement" >> { val sel = LabelSelector("pr...
minatjanster/skuber
client/src/test/scala/skuber/model/LabelSelectorSpec.scala
Scala
apache-2.0
2,670
/* * Licensed to The Apereo Foundation under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * The Apereo Foundation licenses this file to you under the Apache License, * Version 2.0, (the "License"); you ma...
equella/Equella
Source/Plugins/Core/com.equella.serverbase/scalasrc/com/tle/core/db/types/SizedStrings.scala
Scala
apache-2.0
1,755
object Test { case class Bar[A](a: A) trait Toto[A, B] //////////////////////////////////////////////// // PoC of controlled KindPolymorphism in Scala // // The idea is NOT to provide universal kind-polymorphism that would be a bad idea anyway // but to bring a "controlled" kind-polymorphism relying on ...
som-snytt/dotty
tests/pos/anykind.scala
Scala
apache-2.0
7,888
/* * The MIT License (MIT) * <p> * Copyright (c) 2017-2020 * <p> * 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,...
amannocci/streamy
plugin-xymon/src/main/scala/io/techcode/streamy/xymon/util/parser/XymonParser.scala
Scala
mit
4,994
package calc object Calc4 extends App { val perms = (1 to 4).permutations def compute(perm: IndexedSeq[Int]): Double = math.pow(perm(0), math.pow(perm(1), math.pow(perm(2), perm(3)))) println(perms.count(compute(_) == 1)) }
ebowman/calc
src/main/scala/calc/Calc4.scala
Scala
unlicense
234
package purespark.examples import purespark.GraphX._ import purespark.Prelude._ /** * Computes shortest paths to the given set of landmark vertices, returning a graph where each * vertex attribute is a map containing the shortest-path distance to each reachable landmark. */ object ShortestPaths { /**...
ericpony/scala-examples
PureSpark/examples/ShortestPaths.scala
Scala
mit
2,803
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2015, G...
typelevel/squants
shared/src/main/scala/squants/electro/Conductivity.scala
Scala
apache-2.0
1,996
package org.backuity.clist import org.backuity.clist.Command.ParseContext import org.backuity.clist.util.Read import org.backuity.matchete.JunitMatchers import org.junit.Test class CommandTest extends JunitMatchers { @Test def parseContextValidateShouldOnlyRemoveOneArgument(): Unit = { val arg = CliOptionalA...
backuity/clist
core/src/test/scala/org/backuity/clist/CommandTest.scala
Scala
apache-2.0
1,016
package com.insweat.hssd.lib import com.insweat.hssd.lib.util._ import scala.collection.immutable.HashMap import com.insweat.hssd.lib.essence.ValueData import java.text.SimpleDateFormat import java.text.ParseException import com.insweat.hssd.lib.essence.SimpleThypeLike package object constraints { priva...
insweat/hssd
com.insweat.hssd.lib/src/com/insweat/hssd/lib/constraints/package.scala
Scala
lgpl-3.0
4,787
/* * 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 ...
wyzssw/zipkin
zipkin-common/src/test/scala/com/twitter/zipkin/common/SpanTest.scala
Scala
apache-2.0
4,416