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 org.nisshiee.chatwork_slack_relay.infra.chatwork import scala.concurrent.ExecutionContext import com.typesafe.config.ConfigFactory import net.ceedubs.ficus.Ficus._ import org.json4s._ import org.json4s.jackson.JsonMethods._ import org.nisshiee.chatwork_slack_relay.domain._ import org.nisshiee.chatwork_slack_r...
nisshiee/chatwork-slack-relay
src/main/scala/infra/chatwork/MessageRepositoryImpl.scala
Scala
mit
1,335
/* * The MIT License (MIT) * * Copyright (c) 2017 Ángel Cervera Claudio * * 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 ...
angelcervera/pbf4scala
examples/blocksextraction/src/test/scala/com/acervera/osm4scala/examples/blocksextraction/BlocksExtractionSuite.scala
Scala
mit
2,578
package freeslick.profile import com.typesafe.slick.testkit.tests._ import com.typesafe.slick.testkit.util._ import freeslick.testkit._ import org.junit.runner.RunWith class FreeslickDriverTest(driver: TestDB) extends DriverTest(driver) { override def tests: Seq[Class[_ <: GenericTest[_ >: Null <: TestDB]]] = { ...
fommil/freeslick
src/it/scala/freeslick/profile/FreeslickDriverTest.scala
Scala
lgpl-3.0
1,333
/*********************************************************************** * 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...
aheyne/geomesa
geomesa-convert/geomesa-convert-common/src/main/scala/org/locationtech/geomesa/convert2/SimpleFeatureConverterFactory.scala
Scala
apache-2.0
1,404
/* Copyright (C) 2012-2013 Treode, 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...
Treode/cps
src/main/scala/com/treode/cps/sync/future.scala
Scala
apache-2.0
7,006
package breeze.util /** * A Lens defines a functional way of handling getters/setters. They're useful for * extending transformations on a part of a case class to the whole case class by updating that * one component * @author dlwh */ trait Lens[T, U] { def apply(t: T): U = get(t) def get(t: T): U def set(t...
scalanlp/breeze
math/src/main/scala/breeze/util/Lens.scala
Scala
apache-2.0
855
package com.twitter.finatra.json.internal.caseclass.validation.validators import com.twitter.finatra.json.internal.caseclass.validation.validators.SizeValidator._ import com.twitter.finatra.validation.{ErrorCode, Size, ValidationMessageResolver, ValidationResult, Validator} object SizeValidator { def errorMessage(...
nkhuyu/finatra
jackson/src/main/scala/com/twitter/finatra/json/internal/caseclass/validation/validators/SizeValidator.scala
Scala
apache-2.0
1,887
package uk.co.morleydev.ghosthunt.model.component.game /** * A local entity is an entity controlled by this client. Only makes sense for actors, and is used to tag a specific * actor as the one this client is the player for. */ class Local
MorleyDev/GhostHunt
src/main/scala/uk/co/morleydev/ghosthunt/model/component/game/Local.scala
Scala
mit
244
import leon.lang.synthesis._ object Naturals { abstract class Nat { def intValue : Int = { this match { case Zero => 0 case Succ(n) => n.intValue + 1 }} ensuring { _ >= 0 } def +(that : Nat) : Nat = { this match { case Zero => that case Succ(n) => n + Succ(that) }} ensurin...
epfl-lara/leon
testcases/repair/Naturals/Naturals.scala
Scala
gpl-3.0
2,151
package shared import app.InputFormUtils import org.scalatest.{FlatSpec, Matchers} class InputFormUtilsTest extends FlatSpec with Matchers { "InputFormUtils.field" should "produce correct setter" in { case class Person(name: String, age: Int) case class Field[T,F](name: String, get: T => F, set: (T,F) => T)...
Igorocky/lesn
macroses/src/test/scala/shared/InputFormUtilsTest.scala
Scala
mit
1,841
package org.scalastuff.scalabeans.sig import org.junit.Test import org.junit.Assert._ import Mirror._ class ClassDeclExtractorTest { @Test def testSimplePropertiesDetection() { val top = ClassDeclExtractor.extract[testbeans.SimplePropertiesTest].get val classes = top.collect { case cd: ClassDecl...
scalastuff/scalabeans
src/test/scala/org/scalastuff/scalabeans/sig/ClassDeclExtractorTest.scala
Scala
apache-2.0
2,181
/* * 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 ...
jeremiaswerner/openwhisk
core/standalone/src/main/scala/org/apache/openwhisk/standalone/ApiGwLauncher.scala
Scala
apache-2.0
4,820
package leo.modules.calculus import leo.{Checked, LeoTestSuite} import leo.datastructures._ import Term._ import leo.modules.HOLSignature.{i,o, LitTrue} /** * Created by lex on 6/6/16. */ class MatchingTestSuite extends LeoTestSuite { type UEq = Seq[(Term, Term)] private final val MATCHES = true private fi...
leoprover/Leo-III
src/test/scala/leo/modules/calculus/MatchingTestSuite.scala
Scala
bsd-3-clause
6,973
/* * Copyright 2019 ACINQ SAS * * 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...
btcontract/wallet
app/src/main/java/fr/acinq/eclair/payment/PaymentRequest.scala
Scala
apache-2.0
25,653
package musicsvc.test import org.junit.runner._ import org.specs2.mutable._ import org.specs2.runner._ import play.api.test._ /** * add your integration spec here. * An integration test will fire up a whole play application in a real (or headless) browser */ @RunWith(classOf[JUnitRunner]) class IntegrationSpec ext...
hermannhueck/MusicService
Services/MusicService-Play-Scala-Slick-NoAuth/test/musicsvc/test/IntegrationSpec.scala
Scala
apache-2.0
556
package latis.ops import org.junit._ import Assert._ import latis.dm.Dataset import latis.dm.TestDataset import latis.writer.AsciiWriter import latis.data.set.DomainSet import latis.data.set.RealSampledSet import latis.ops.resample.NearestNeighbor import latis.data.set.IntegerSampledSet import latis.time.Time import l...
dlindhol/LaTiS
src/test/scala/latis/ops/TestResample.scala
Scala
epl-1.0
7,157
package com.github.ldaniels528.broadway.core.actors import akka.actor.ActorSystem /** * Broadway Actor System * @author lawrence.daniels@gmail.com */ object BroadwayActorSystem { val system = ActorSystem("broadway_tasks") val scheduler = system.scheduler def shutdown() = system.shutdown() }
ldaniels528/broadway
app-cli/src/main/scala/com/github/ldaniels528/broadway/core/actors/BroadwayActorSystem.scala
Scala
apache-2.0
308
package cdmuhlb.mshexplorer import javafx.beans.{Observable, InvalidationListener} import javafx.beans.property.{DoubleProperty, SimpleDoubleProperty} import javafx.scene.canvas.Canvas import javafx.scene.image.PixelFormat class MshWheel(width: Double, height: Double, spec: MshSpiralSpec) extends Canvas(width, he...
cdmuhlb/MshExplorer
src/main/scala/cdmuhlb/mshexplorer/MshWheel.scala
Scala
mit
1,352
package com.github.gdefacci.bdd case class FilePosition(path:String, lineNumber:Int) { override def toString = s"line $lineNumber in file $path" }
gdefacci/bdd
core/src/main/scala/com/github/gdefacci/bdd/FilePosition.scala
Scala
mit
155
/** * Copyright (c) 2013, The National Archives <digitalpreservation@nationalarchives.gov.uk> * http://www.nationalarchives.gov.uk * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozi...
digital-preservation/dali
src/main/scala/uk/gov/tna/dri/preingest/loader/unit/disk/PartitionTypes.scala
Scala
mpl-2.0
3,140
package regolic import java.io.File import asts.core.Trees._ import asts.fol.Trees._ import util._ object Main { private var dimacs = false private var smtlib2 = false private var time = false private val optionsHelp: String = ( " --dimacs The input file is to be interpreted as a DIMACS C...
regb/scabolic
src/main/scala/regolic/Main.scala
Scala
mit
8,114
/* * Copyright 2019 ACINQ SAS * * 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...
ACINQ/eclair
eclair-core/src/main/scala/fr/acinq/eclair/db/sqlite/SqlitePendingCommandsDb.scala
Scala
apache-2.0
4,008
/* sbt -- Simple Build Tool * Copyright 2011 Mark Harrah */ package sbt import Def.{ Initialize, ScopedKey, Setting, SettingsDefinition } import java.io.{ File, PrintWriter } import java.nio.file.FileSystems import java.net.{ URI, URL } import java.util.Optional import java.util.concurrent.{ TimeUnit, Callable } imp...
Duhemm/sbt
main/src/main/scala/sbt/Defaults.scala
Scala
bsd-3-clause
136,269
/* * 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 ...
jkdcdlly/zipkin
zipkin-sampler/src/main/scala/com/twitter/zipkin/sampler/AdaptiveSampler.scala
Scala
apache-2.0
17,106
/* active-learning-scala: Active Learning library for Scala Copyright (c) 2014 Davi Pereira dos Santos 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 ...
active-learning/active-learning-scala
src/main/scala/clean/run/tempo.scala
Scala
gpl-2.0
5,129
package com.rasterfoundry.akkautil /** * Copied from https://github.com/lonelyplanet/akka-http-extensions * with minor modifications for removing unused variables/code-paths */ import com.rasterfoundry.datamodel._ import akka.http.scaladsl.server.Directive1 import akka.http.scaladsl.server.Directives._ trait P...
raster-foundry/raster-foundry
app-backend/akkautil/src/main/scala/PaginationDirectives.scala
Scala
apache-2.0
2,286
package com.github.cuzfrog.maila import java.time.LocalDate import javax.mail.Message case class MailFilter( maxSearchAmount: Int = 30, filter: (Mail => Boolean) = Mail => true, javaMessageFilter: (Message => Boolean) = Message => true) object Mail...
cuzfrog/maila
src/main/scala/com/github/cuzfrog/maila/MailFilter.scala
Scala
apache-2.0
368
package com.twitter.jvm import com.twitter.app.GlobalFlag object numProcs extends GlobalFlag[Double]( Runtime.getRuntime.availableProcessors().toDouble, "number of logical cores" )
BuoyantIO/twitter-util
util-jvm/src/main/scala/com/twitter/jvm/Cpu.scala
Scala
apache-2.0
187
package examples trait Dat { def bum(x: Int, i: Int): String def bang(i: Int): String } //@main object MyApp extends App { def bla(i: Int) = s"number: $i" //@mapargs(i => i.toString: Int => String) //@mapargs(_.toString: Int => String) @mapargs(bla: Int => String) class Ditte extends Dat { def bum(...
fdietze/kabelsalat
app/src/main/scala/examples/MyApp.scala
Scala
bsd-3-clause
694
package org.scalajs.jsenv.selenium import scala.scalajs.js.Dynamic._ // Canvas example from: http://www.w3schools.com/html/html5_canvas.asp object CanvasCreator { def create(id: String): Unit = { ElementCreator.create(s"<canvas id='$id'></canvas>") } def paint(id: String): Unit = { val canvas = global...
nicolasstucki/scala-js-env-selenium
seleniumJSEnvTest/src/main/scala/org/scalajs/jsenv/selenium/CanvasCreator.scala
Scala
bsd-3-clause
570
package blended.persistence.jdbc import java.{ util => ju } /** * A schema-less persisted entity class, consisting of many fields. */ case class PersistedClass( id: Option[Long], name: String, fields: Seq[PersistedField] )
lefou/blended
blended.persistence.h2/src/main/scala/blended/persistence/jdbc/PersistedClass.scala
Scala
apache-2.0
233
package monocle.law.discipline.function import monocle.function.Index._ import monocle.function._ import monocle.law.discipline.OptionalTests import org.scalacheck.Arbitrary import org.typelevel.discipline.Laws import scalaz.Equal object IndexTests extends Laws { def apply[S, I, A](i: I)(implicit aEq: Equal[A], a...
NightRa/Monocle
law/src/main/scala/monocle/law/discipline/function/IndexTests.scala
Scala
mit
786
package synereo.client.modalpopups import japgolly.scalajs.react.extra.OnUnmount import japgolly.scalajs.react.vdom.prefix_<^._ import synereo.client.components.Bootstrap.Button import synereo.client.components.Bootstrap.CommonStyle import synereo.client.components.Bootstrap.Modal import synereo.client.components.Glob...
LivelyGig/ProductWebUI
sclient/src/main/scala/synereo/client/modalpopups/NewConnection.scala
Scala
apache-2.0
11,903
package squants.experimental.unitgroups.si import squants.{Dimension, Quantity} import squants.{SiUnit, UnitOfMeasure} import squants.experimental.unitgroups.UnitGroup /** * UnitGroups for SI. */ package object strict { /** implicit support for SI unit groups */ object implicits { implicit def mkSiUnitGr...
underscorenico/squants
shared/src/main/scala/squants/experimental/unitgroups/si/strict/package.scala
Scala
apache-2.0
532
package roc package postgresql package transport import java.util.concurrent.TimeUnit import org.openjdk.jmh.annotations._ @Fork(2) @State(Scope.Thread) class BufBenchmarks extends BufferTestData { var buf: Buf = Buf(0) @Setup(Level.Invocation) def instantiateBuf(): Unit = { buf = Buf(4) () } @Te...
finagle/roc
benchmark/src/main/scala/roc/benchmark/buffer/BufBenchmarks.scala
Scala
bsd-3-clause
1,062
package com.mentatlabs.nsa package scalac package dsl package experimental trait ScalacYTyperDSL extends ScalacExperimentalDSL { object Ytyper { val unary_- = new { def -(d: debug.type) = options.ScalacYTyperDebug } } }
melezov/sbt-nsa
nsa-dsl/src/main/scala/com/mentatlabs/nsa/scalac/dsl/experimental/private/ScalacYTyperDSL.scala
Scala
bsd-3-clause
244
/* * 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...
wangyixiaohuihui/spark2-annotation
resource-managers/yarn/src/main/scala/org/apache/spark/scheduler/cluster/YarnClusterScheduler.scala
Scala
apache-2.0
1,406
package io.transwarp.midas.adaptor trait IInputPort { def getIName: String def receiveI(obj: IIOObject): Unit }
transwarpio/rapidminer
api-driver/src/main/scala/io/transwarp/midas/adaptor/IInputPort.scala
Scala
gpl-3.0
117
package com.sksamuel.elastic4s.requests.searches import com.sksamuel.elastic4s.requests.script.Script case class RuntimeMapping(field: String, `type`: String, script: Option[Script] = None) object RuntimeMapping { def apply(field: String, `type`: String, script: Script): RuntimeMapping = RuntimeMapping(field, ...
sksamuel/elastic4s
elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/RuntimeMapping.scala
Scala
apache-2.0
490
package org.jetbrains.plugins.scala.extensions /** This type is handy for working with possible null values. * It has no overhead of converting to Option, and allows to chain several nullable functions in a safe way * using `map` and `collect` methods. */ final class NullSafe[+A >: Null] private(val a: A) extend...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/extensions/NullSafe.scala
Scala
apache-2.0
1,460
/* * Copyright 1998-2016 Linux.org.ru * 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...
kloun/lorsource
src/main/scala/ru/org/linux/markdown/MarkdownRenderActor.scala
Scala
apache-2.0
1,677
import scala.quoted._ object Macros { inline def matches[A, B](inline a: A, inline b: B): Unit = ${impl('a, 'b)} private def impl[A, B](a: Expr[A], b: Expr[B])(using qctx: QuoteContext) : Expr[Unit] = { import qctx.tasty._ val res = scala.internal.quoted.Expr.unapply[Tuple, Tuple](a)(using b, true, qctx...
som-snytt/dotty
tests/run-macros/quote-matcher-runtime/quoted_1.scala
Scala
apache-2.0
756
/* * 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...
diegohurtado/sparta
serving-core/src/main/scala/com/stratio/sparta/serving/core/helpers/PolicyHelper.scala
Scala
apache-2.0
2,574
/* * Copyright 2011-2022 GatlingCorp (https://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...
gatling/gatling
gatling-core-java/src/main/scala/io/gatling/javaapi/core/internal/condition/ScalaRandomSwitchOrElse.scala
Scala
apache-2.0
1,540
import java.io.{File, InputStream} import java.util.zip.{ZipException, ZipFile} import scala.util.matching.Regex import doobie.imports._ import scalaz._ import Scalaz._ import scalaz.concurrent.Task import scala.language.postfixOps /** * Created by nova on 16-12-20. */ class ZipReader { val xa = utils.GetHika...
skywalkerytx/oracle
src/main/scala/ZipReader.scala
Scala
mit
7,012
package io.github.morgaroth.eventsmanger import com.typesafe.config.Config import org.flywaydb.core.Flyway import scala.util.Try /** * Created by morgaroth on 18.10.16. */ case class Migrator(fw: Flyway, enabled: Boolean) { def migrate() = if (enabled) fw.migrate() else -1 } trait FlyWayEvolutions { def ini...
Morgaroth/events_manager
src/main/scala/io/github/morgaroth/eventsmanger/FlyWayEvolutions.scala
Scala
apache-2.0
1,008
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.reflect.macros p...
martijnhoekstra/scala
src/compiler/scala/reflect/macros/contexts/Parsers.scala
Scala
apache-2.0
1,193
package db.scyllaDB import com.websudos.phantom.connectors.{ContactPoints, KeySpace} trait Keyspace { implicit val space: KeySpace = new KeySpace("query_01") } object scylla extends Keyspace { val hosts = Seq("103.56.92.54") val Conn = ContactPoints(hosts).keySpace(space.name) } trait Connector extends sc...
meglytics/bidi
app/db/scyllaConnector.scala
Scala
mit
353
package presentation.canvas import org.scalajs.dom import org.scalajs.dom.html._ import presentation.geometry.Point import scala.scalajs.js.annotation.JSExport import scala.util.Random @JSExport class Sierpinski { @JSExport def triangle(canvas: Canvas) = { canvas.height = 255 canvas.width = 255 val c...
coacoas/scalajs-presentation
src/main/scala/presentation/canvas/Sierpinski.scala
Scala
mit
1,001
/* * Copyright 2010-2014 Benjamin Lings * * 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...
jw3/scala-guice
src/main/scala/net/codingwell/scalaguice/binder/BindingProxies.scala
Scala
apache-2.0
3,918
package org.apache.spark.ml.bundle.ops.feature import ml.combust.bundle.BundleContext import ml.combust.bundle.dsl._ import ml.combust.bundle.op.OpModel import org.apache.spark.ml.bundle._ import org.apache.spark.ml.feature.StringIndexerModel /** * Created by hollinwilkins on 8/21/16. */ class StringIndexerOp ext...
combust-ml/mleap
mleap-spark/src/main/scala/org/apache/spark/ml/bundle/ops/feature/StringIndexerOp.scala
Scala
apache-2.0
1,691
package net.sf.latexdraw.glib.models.impl import scala.collection.JavaConversions.asScalaBuffer import net.sf.latexdraw.glib.models.interfaces.IFreehand import net.sf.latexdraw.glib.models.interfaces.IGroup import net.sf.latexdraw.glib.models.interfaces.IPoint /** * This trait encapsulates the code of the group rel...
arnobl/latexdraw-mutants
GUImutants/original/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/impl/LGroupFreeHand.scala
Scala
gpl-2.0
2,575
package sbt import java.lang.reflect.{ Array => _, _ } import java.lang.annotation.Annotation import annotation.tailrec import sbt.classfile.ClassFile import xsbti.api import xsbti.SafeLazy import SafeLazy.strict import collection.mutable object ClassToAPI { def apply(c: Seq[Class[_]]): api.SourceAPI = process(c)._...
adriaanm/sbt
compile/api/src/main/scala/sbt/ClassToAPI.scala
Scala
bsd-3-clause
18,193
package cloudcmd.cld import cloudcmd.common.IndexedContentAddressableStorage import jpbetz.cli.CommandContext object AdapterUtil { def exec(p1: CommandContext, uri: String = null, minTier: Number = 0, maxTier: Number = Integer.MAX_VALUE, doCommand: (IndexedContentAddressableStorage) => Unit) { val matchedAdapt...
briangu/cloudcmd
cld/src/main/scala/cloudcmd/cld/AdapterUtil.scala
Scala
apache-2.0
1,555
package calc import scala.collection.immutable.IndexedSeq /** * A magic square of order 4 is created by putting the integers 1 to 16 into a 4 by 4 square grid so that the sum of * the numbers in each row, column and main diagonal is the same. What is the sum of the integers at the corners of * this magic square...
ebowman/calc
src/main/scala/calc/Calc36.scala
Scala
unlicense
2,279
/* * Copyright 2020 Precog Data * * 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 ...
djspiewak/quasar
impl/src/test/scala/quasar/impl/evaluate/QueryFederatorSpec.scala
Scala
apache-2.0
6,692
/* * 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 ...
pferrel/PredictionIO
data/src/main/scala/org/apache/predictionio/data/api/EventInfo.scala
Scala
apache-2.0
975
package controllers import java.util.UUID import javax.inject.Inject import models._ import play.api.i18n.{I18nSupport, MessagesApi} import play.api.libs.concurrent.Execution.Implicits.defaultContext import play.api.libs.json.Json import play.api.mvc._ import services._ import scala.concurrent.Future case class Use...
BonarBeavis/veritask
app/controllers/Evaluation.scala
Scala
apache-2.0
5,670
/* * * * Copyright 2016 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 r...
andywhardy/address-reputation-ingester
test/it/it/helper/AppServerUnderTest.scala
Scala
apache-2.0
2,196
package io.swagger.client.model case class JsonErrorResponse ( /* Status: \\"ok\\" or \\"error\\" */ status: String, /* Error message */ message: String)
QuantiModo/QuantiModo-SDK-Scala
src/main/scala/io/swagger/client/model/JsonErrorResponse.scala
Scala
gpl-2.0
165
package com.github.sparkfy.cache.guava import com.github.sparkfy.cache.{Cache, CacheFactory} /** * Created by yellowhuang on 2015/10/16. */ class GuavaCacheFactory(val conf: Map[String, String]) extends CacheFactory { // override def createBuilder[K, V](name: String): CacheBuilder[K, V] = { // new GuavaCac...
sparkfy/sparkfy
sparkfy-common/src/main/scala/com/github/sparkfy/cache/guava/GuavaCacheFactory.scala
Scala
apache-2.0
658
package com.rumblesan.scalaexperiments.tests.mytree import org.specs2.mutable._ import com.rumblesan.scalaexperiments.mytree._ class MyTreeSpec extends Specification { "The 'Algebraic Datatype Example'" should { "create a basic tree of strings" in { val emptyTree: MyTree[String] = MyTreeEmpty va...
rumblesan/scala-experiments
src/test/scala/MyTree/MyTreeSpec.scala
Scala
bsd-2-clause
2,049
// // Copyright (c) 2016 Lin Wang // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, d...
luisfo/hits
HitsApp/src/HitsApp.scala
Scala
mit
7,716
object Test { val (a :: as), bs = List(1, 2, 3) // error val B @ List(), C: List[Int] = List() // error }
som-snytt/dotty
tests/neg/multi-patterns.scala
Scala
apache-2.0
109
package com.eevolution.context.dictionary.infrastructure.repository import com.eevolution.context.dictionary.domain.model.Archive import com.eevolution.context.dictionary.infrastructure.db.DbContext._ /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This program is free s...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/repository/ArchiveMapping.scala
Scala
gpl-3.0
1,842
// Project: sdocx // Module: // Description: // Copyright (c) 2015 Johannes Kastner <jokade@karchedon.de> // Distributed under the MIT license. package biz.enef.sdocx.opc.zip import java.io.OutputStream import java.util.zip.{ZipInputStream, ZipEntry, ZipOutputStream} import biz.enef.sdo...
jokade/sdocx
src/main/scala/biz/enef/sdocx/opc/zip/ZipPackageWriter.scala
Scala
mit
1,929
package com.recursivity.bowler.stub import com.recursivity.bowler._ /** * Created by IntelliJ IDEA. * User: wfaler * Date: Nov 7, 2010 * Time: 11:07:27 PM * To change this template use File | Settings | File Templates. */ class FlatMapComponent extends Component(Some("hello")){ } class ContainerListable ext...
rossabaker/Handlebar
src/test/scala/com/recursivity/bowler/stub/FlatMapComponent.scala
Scala
bsd-3-clause
740
import akka.actor.{ActorSystem, Props, actorRef2Scala} import akka.testkit.{ImplicitSender, TestActors, TestKit} import hu.bme.mit.ire.messages.ChangeSet import hu.bme.mit.ire.nodes.unary.ProjectionNode import hu.bme.mit.ire.util.TestUtil._ import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike} class Project...
FTSRG/ire
src/test/scala/ProjectionNodeTest.scala
Scala
epl-1.0
2,202
package mesosphere.marathon package api.akkahttp import akka.actor.ActorSystem import akka.http.scaladsl.server.Route import akka.http.scaladsl.Http import akka.http.scaladsl.model.{ ContentTypes, HttpEntity, HttpResponse } import akka.stream.ActorMaterializer import com.google.common.util.concurrent.AbstractIdleServi...
Caerostris/marathon
src/main/scala/mesosphere/marathon/api/akkahttp/AkkaHttpMarathonService.scala
Scala
apache-2.0
3,495
/* *\\ ** _____ __ _____ __ ____ ** ** / ___/ / / /____/ / / / \\ FieldKit ** ** / ___/ /_/ /____/ / /__ / / / (c) 2010, FIELD ...
field/FieldKit.scala
src.gl/field/kit/gl/util/Capture.scala
Scala
lgpl-3.0
2,739
package is.hail.utils.richUtils import java.io.Serializable import is.hail.utils._ import scala.collection.{mutable, AbstractIterable} import scala.reflect.ClassTag object RichIterable { def single[A](a: A): Iterable[A] = new AbstractIterable[A] { override def iterator = Iterator.single(a) override def he...
hail-is/hail
hail/src/main/scala/is/hail/utils/richUtils/RichIterable.scala
Scala
mit
3,278
package com.harrys.tables.error import java.sql.SQLException import com.harrys.jooq.util.SQLExceptions import org.jooq.exception.DataAccessException import scala.collection.JavaConversions /** * Created by jpetty on 12/15/15. */ object IntegrityConstraintViolation { def unapplySeq(e: DataAccessException): Op...
harrystech/scala-jooq-tables
src/main/scala/com/harrys/tables/error/IntegrityConstraintViolation.scala
Scala
mit
699
package mesosphere.marathon import mesosphere.chaos.AppConfiguration import mesosphere.chaos.http.HttpConf import mesosphere.marathon.core.plugin.PluginManagerConfiguration import mesosphere.marathon.event.EventConfiguration import mesosphere.marathon.event.http.HttpEventConfiguration import mesosphere.marathon.metric...
vivekjuneja/marathon
src/main/scala/mesosphere/marathon/AllConf.scala
Scala
apache-2.0
867
package com.twitter.algebird.macros import com.twitter.algebird._ import com.twitter.algebird.macros.ArbitraryCaseClassMacro.arbitrary import org.scalacheck.{Arbitrary, Properties} import org.scalacheck.Prop.forAll object CaseClassMacrosTest extends Properties("Case class macros") { import BaseProperties._ impl...
twitter/algebird
algebird-test/src/test/scala/com/twitter/algebird/macros/CaseClassMacrosTest.scala
Scala
apache-2.0
1,853
/* * Copyright (c) 2012-2014 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
TimothyKlim/snowplow
3-enrich/scala-common-enrich/src/main/scala/com.snowplowanalytics.snowplow.enrich/common/adapters/registry/snowplow/Tp1Adapter.scala
Scala
apache-2.0
2,098
/* Copyright 2015 Coursera 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, soft...
coursera/courier
scala/generator-test/src/test/scala/org/coursera/courier/generator/MapGeneratorTest.scala
Scala
apache-2.0
7,104
package fpinscala.monoids import fpinscala.parallelism.Nonblocking._ import fpinscala.parallelism.Nonblocking.Par.toParOps // infix syntax for `Par.map`, `Par.flatMap`, etc trait Monoid[A] { def op(a1: A, a2: A): A def zero: A } object Monoid { val stringMonoid = new Monoid[String] { def op(a1: String, a2...
jonas/fpinscala
exercises/src/main/scala/fpinscala/monoids/Monoid.scala
Scala
mit
8,343
package org.apache.mesos.chronos.scheduler.config import java.lang.Thread.UncaughtExceptionHandler import java.util.concurrent.ScheduledThreadPoolExecutor import java.util.logging.{Level, Logger} import javax.inject.Named import akka.actor.{ActorRef, ActorSystem, Props} import akka.util.Timeout import com.codahale.me...
tony-kerz/chronos
src/main/scala/org/apache/mesos/chronos/scheduler/config/MainModule.scala
Scala
apache-2.0
6,277
package uscala.util import scala.collection.BuildFrom import scala.util.Try object TryOps { implicit class IterableTry[A, M[X] <: IterableOnce[X]](xs: M[Try[A]]) { def sequence(implicit cbf: BuildFrom[M[Try[A]], A, M[A]]): Try[M[A]] = xs.iterator.foldLeft(Try[scala.collection.mutable.Builder[A, M[A]]](cbf...
albertpastrana/uscala
try-ops/src/main/scala-2.13+/uscala/util/TryOps.scala
Scala
mit
426
/* * Copyright 2001-2009 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...
hubertp/scalatest
src/examples/scala/org/scalatestexamples/junit/JUnit3ExampleSuite.scala
Scala
apache-2.0
1,113
/* * Copyright 2016 by Alex Dupre * * 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...
eed3si9n/gigahorse
core/src/main/scala/gigahorse/WebSocketEvent.scala
Scala
apache-2.0
1,198
'symbol 'a' '\\u1234' '\\n'
hacksterio/pygments.rb
vendor/pygments-main/tests/examplefiles/char.scala
Scala
mit
26
package hulk.http.response import cats.data.Xor import scala.reflect.io.File /** * Created by reweber on 23/01/2016 */ private[hulk] case class MustacheTemplate[A](template: Xor[String, File], data: Map[String, A]) object MustacheTemplate { def apply[A](template: String, data: Map[String, A]): MustacheTempla...
reneweb/hulk
framework/src/main/scala/hulk/http/response/MustacheTemplate.scala
Scala
apache-2.0
494
object OverloadedWithLong { def overloaded(x: Long): Any = x def overloaded(x: Any): Unit = ??? } object Test { def main(args: Array[String]): Unit = import OverloadedWithLong.* val l: Any = 0 :: Nil val r = overloaded(l match { case x :: xs => 5 }) assert(r == 5L) }
dotty-staging/dotty
tests/pos/i10116.scala
Scala
apache-2.0
310
package enumeratum import enumeratum.EnumEntry.UpperHyphencase import scala.collection.immutable.IndexedSeq /** Created by Lloyd on 2/5/17. * * Copyright 2017 */ sealed abstract class StackedEnum extends EnumEntry with UpperHyphencase case object StackedEnum extends Enum[StackedEnum] { val values: IndexedS...
lloydmeta/enumeratum
benchmarking/src/main/scala/enumeratum/StackedEnum.scala
Scala
mit
462
package org.vaadin.addons.rinne.helpers import com.vaadin.data.Property.{ReadOnlyStatusChangeEvent, ReadOnlyStatusChangeListener} import com.vaadin.ui.AbstractField import org.vaadin.addons.rinne.mixins.AbstractFieldMixin trait HideWhenEmptyMixin[T] extends AbstractFieldMixin[T] { this: AbstractField[T] => readO...
LukaszByczynski/rinne
src/main/scala/org/vaadin/addons/rinne/helpers/HideWhenEmptyMixin.scala
Scala
apache-2.0
856
package teststate.external import japgolly.univeq.UnivEq import teststate.Exports._ import utest._ // Argh implicits object EqualTest extends TestSuite { case class I(i: Int) implicit def univEqI: UnivEq[I] = UnivEq.derive case class L(l: Long) implicit def equalL: Equal[L] = Equal.by_== def assertId[A](...
japgolly/test-state
core/shared/src/test/scala/teststate/external/EqualTest.scala
Scala
apache-2.0
1,313
package net.bhardy.braintree.scala.search class CustomerSearchRequest extends SearchRequest[CustomerSearchRequest] { def addressCountryName = textNode("address_country_name") def addressExtendedAddress = textNode("address_extended_address") def addressFirstName = textNode("address_first_name") def addressLa...
benhardy/braintree-scala
src/main/scala/search/CustomerSearchRequest.scala
Scala
mit
1,326
package org.jetbrains.plugins.scala package lang package surroundWith package surrounders package expression import com.intellij.lang.ASTNode import com.intellij.openapi.util.TextRange import com.intellij.psi.{PsiElement, PsiWhiteSpace} import org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil import org.jetbrains.plug...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/surroundWith/surrounders/expression/ScalaWithParenthesisSurrounder.scala
Scala
apache-2.0
1,350
package git import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future class EmptyProvider extends Provider { override val repositoryProvider: Option[RepositoryProvider] = Some(new EmptyRepositoryProvider) override val pullRequestProvider: Option[PullRequestProvider] = Some(new Empty...
PRioritizer/PRioritizer-analyzer
src/main/scala/git/EmptyProvider.scala
Scala
mit
897
package com.haskforce.actions.cabal import com.haskforce.Implicits._ import com.haskforce.cabal.settings.AddCabalPackageOptions import com.haskforce.cabal.settings.ui.{AddCabalPackageUtil, AddCabalPackageDialog} import com.haskforce.utils.{CabalExecutor, FileUtil, NotificationUtil} import com.intellij.notification.Not...
charleso/intellij-haskforce
src/com/haskforce/actions/cabal/AddCabalPackageAction.scala
Scala
apache-2.0
2,987
package com.github.mdr.mash import java.io.PrintStream import java.nio.charset.StandardCharsets import java.nio.file.Path import java.util.UUID import com.github.mdr.mash.commands.ErrorPrinter import com.github.mdr.mash.compiler.{ CompilationSettings, CompilationUnit, Compiler } import com.github.mdr.mash.evaluator.{...
mdr/mash
src/main/scala/com/github/mdr/mash/Loader.scala
Scala
mit
4,904
package org.nexbook.repository.immutable import org.joda.time.{DateTime, DateTimeZone} import org.nexbook.domain.{Buy, MarketOrder} import org.scalatest._ import scala.None import scala.collection.immutable.List class OrderInMemoryRepositoryTest extends WordSpec with Matchers { val now = DateTime.now(DateTimeZone...
milczarekIT/nexbook
src/test/scala/org/nexbook/repository/immutable/OrderInMemoryRepositoryTest.scala
Scala
apache-2.0
1,281
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
maropu/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveHints.scala
Scala
apache-2.0
12,707
// Copyright (c) 2013, Johns Hopkins University. All rights reserved. // This software is released under the 2-clause BSD license. // See /LICENSE.txt // Travis Wolfe, twolfe18@gmail.com, 30 July 2013 package edu.jhu.hlt.parma.features import edu.jhu.hlt.parma.feature_interfaces._ import edu.jhu.hlt.parma.inference....
hltcoe/parma
src/main/scala/edu/jhu/hlt/parma/features/Appositive.scala
Scala
bsd-2-clause
7,219
package web import core.{CoreActors, Core} import api.Api import akka.io.IO import spray.can.Http /** * Provides the web server (spray-can) for the REST api in ``Api``, using the actor system * defined in ``Core``. * * You may sometimes wish to construct separate ``ActorSystem`` for the web server machinery. * H...
kciesielski/akka-journal-stress
src/main/scala/web/Web.scala
Scala
apache-2.0
812
package tethys import tethys.commons.LowPriorityInstance import tethys.writers.tokens.TokenWriter trait JsonObjectWriter[A] extends JsonWriter[A] { self => override def write(value: A, tokenWriter: TokenWriter): Unit = { tokenWriter.writeObjectStart() writeValues(value, tokenWriter) tokenWriter.write...
tethys-json/tethys
modules/core/src/main/scala/tethys/JsonObjectWriter.scala
Scala
apache-2.0
1,349
package definiti.core.validation.controls import definiti.common.ast._ import definiti.common.control.{Control, ControlLevel, ControlResult} import definiti.core.validation.helpers.TypeReferenceControlHelper private[core] object AttributeTypeControl extends Control[Root] with TypeReferenceControlHelper { override v...
definiti/definiti-core
src/main/scala/definiti/core/validation/controls/AttributeTypeControl.scala
Scala
mit
1,196
/* https://www.hackerrank.com/challenges/staircase */ package com.negrisoli.algorithms.warmup object Staircase { def main(args: Array[String]) { val sc = new java.util.Scanner (System.in); var n = sc.nextInt(); (1 to n).foreach(i => println(" " * (n-i) + "#" * i)) } }
rbatista/algorithms
challenges/hacker-rank/scala/src/main/scala/com/negrisoli/algorithms/warmup/Staircase.scala
Scala
mit
302
package org.jetbrains.plugins.scala.lang.actions.editor.enter.scala3 import com.intellij.openapi.project.Project import com.intellij.psi.PsiDocumentManager import com.intellij.psi.codeStyle.CodeStyleManager import org.jetbrains.plugins.scala.base.EditorActionTestBase import org.jetbrains.plugins.scala.extensions.inWri...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/actions/editor/enter/scala3/CheckIndentAfterTypingCodeOps.scala
Scala
apache-2.0
3,706