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 skutek_examples.sat_solver import skutek.abstraction._ import skutek.std_effects._ object Parser { case object ErrorFx extends Except[(String, Int)] def apply(source: String): AST !! ErrorFx.type = (for { ast <- parseExpr c <- getChar _ <- if (c == EOF) Return else fail("Expected e...
marcinzh/skutek
modules/examples/src/main/scala/skutek_examples/sat_solver/Parser.scala
Scala
mit
2,163
/* * 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 ...
windeye/spark
core/src/main/scala/org/apache/spark/util/collection/PrimitiveKeyOpenHashMap.scala
Scala
apache-2.0
4,282
package brique.bench import java.util.concurrent.TimeUnit import algebra.Eq import brique.ConsList import brique.bench.input._ import org.openjdk.jmh.annotations._ import scala.collection.immutable.Range import scala.{Array, Boolean, Exception, Int, List, Option} @BenchmarkMode(Array(Mode.AverageTime)) @OutputTimeUn...
julien-truffaut/brique
bench/src/main/scala/brique/bench/LongMapBench.scala
Scala
mit
602
package com.productfoundry.akka.cqrs.process import akka.util.Timeout import com.productfoundry.akka.cqrs.EntityIdResolution._ import com.productfoundry.akka.cqrs._ import com.productfoundry.akka.cqrs.publish.EventPublication import com.productfoundry.support.EntityTestSupport import scala.concurrent.duration._ clas...
Product-Foundry/akka-cqrs
core/src/test/scala/com/productfoundry/akka/cqrs/process/ProcessManagerRegistrySpec.scala
Scala
apache-2.0
2,039
package org.catapult.sa.fulgurite.integration import java.io.{File, FileInputStream} import com.github.jaiimageio.plugins.tiff.BaselineTIFFTagSet import org.apache.commons.io.{FileUtils, IOUtils} import org.catapult.sa.fulgurite.geotiff.{GeoTiffMeta, Index} import org.catapult.sa.fulgurite.spark.GeoSparkUtils ...
SatelliteApplicationsCatapult/fulgurite
fulgurite-core/src/test/scala/org/catapult/sa/fulgurite/integration/TestWriting.scala
Scala
lgpl-3.0
5,676
package com.snapswap.telesign.unmarshaller trait UnMarshallerVerify extends CommonUnMarshaller with VerifyResponseUnMarshaller with PhoneIdResponseUnMarshaller object UnMarshallerVerify extends UnMarshallerVerify
snap-swap/telesign-api-client
src/main/scala/com/snapswap/telesign/unmarshaller/UnMarshallerVerify.scala
Scala
mit
224
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
witgo/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetRowConverter.scala
Scala
apache-2.0
31,694
package at.ac.tuwien.ifs.ir.evaluation.pool import at.ac.tuwien.ifs.ir.evaluation.pool.HedgeBasedPool.rnd import at.ac.tuwien.ifs.ir.model._ import scala.collection.parallel.{ParMap, ParSeq} /** * Created by aldo on 31/08/16. */ class FusionBasedPool(method: String, poolSize: Int, lRuns: List[Runs], gT: QRels) e...
aldolipani/PoolBiasEstimators
src/main/scala/at/ac/tuwien/ifs/ir/evaluation/pool/FusionBasedPool.scala
Scala
apache-2.0
2,568
package generators.v22 import generators.Helper._ import org.specs2.mutable.Specification import utils.WithApplication import scala.xml.XML /** * Tests to verify the generation of HTML * * */ class HtmlFunctionalCasesSpec extends Specification { val version = "/0.22" "The HTML generator should generate HT...
Department-for-Work-and-Pensions/RenderingService
test/generators/v22/HtmlFunctionalCasesSpec.scala
Scala
mit
1,396
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.util package object option { implicit class RichOption[T](o: Option[T]) { def getOrThrow(msg: String): T = o.getOrElse(throw new IllegalArgumentException(msg))...
ensime/ensime-server
util/src/main/scala/org/ensime/util/option.scala
Scala
gpl-3.0
327
package org.jetbrains.plugins.scala package lang package parser package parsing package types import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder import org.jetbrains.plugins.scala.lang.parser.parsing.statements.{Dcl, Def, EmptyDc...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/parser/parsing/types/RefineStat.scala
Scala
apache-2.0
1,346
package controllers import javax.inject.Inject import com.mohiva.play.silhouette.api._ import com.mohiva.play.silhouette.api.exceptions.ProviderException import com.mohiva.play.silhouette.api.repositories.AuthInfoRepository import com.mohiva.play.silhouette.impl.authenticators.CookieAuthenticator import com.mohiva.pl...
renexdev/Play-Auth-Slick-Seed-Load-Schema
app/controllers/SocialAuthController.scala
Scala
apache-2.0
2,619
package com.atomist.rug.runtime.plans import com.atomist.rug.spi.Handlers.Instruction.{Detail, Edit} import com.atomist.rug.spi.Handlers.Status.{Failure, Success} import com.atomist.rug.spi.Handlers._ import org.scalatest.{DiagrammedAssertions, FunSpec, Matchers, OneInstancePerTest} import scala.concurrent.ExecutionC...
atomist/rug
src/test/scala/com/atomist/rug/runtime/plans/PlanResultInterpreterTest.scala
Scala
gpl-3.0
4,151
package maker.project import org.scalatest.FunSuite import maker.utils.FileUtils._ import maker.utils.os.Command class JavaCompileTests extends FunSuite with TestUtils { test("Java module fails when expected and stays failed"){ withTempDir{ root => val proj = new TestModule(root, "JavaCompileTes...
syl20bnr/maker
maker/tests/maker/project/JavaCompileTests.scala
Scala
bsd-2-clause
1,932
package com.caibowen.prma.api import scala.concurrent.Future /** * @author BowenCai * @since 05/12/2014. */ trait SimpleCache[K,V]{ def contains(key: K): Boolean def clear(): Unit /** * keys currently available * @return */ def keys: Set[K] /** * put value. * behavior undefined if the...
xkommando/PRMA
api/src/main/scala/com/caibowen/prma/api/SimpleCache.scala
Scala
lgpl-3.0
2,899
/* * Copyright © 2016 - 2020 Schlichtherle IT Services * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
christian-schlichtherle/neuron-di
core-scala/src/main/scala-2.12/global/namespace/neuron/di/scala/LowPriorityMacroAnnotation.scala
Scala
apache-2.0
822
package propel.lib import propel.core.ExprTree._ import BooleanLib._ import CompareLib._ import CollectionLib.Filter import DecimalLib._ import SampleLib._ object SampleExprs { val trueOrFalse = Or (True (), False ()) val oneEqualsZero = Equal (One (), Zero ()) val oneMinusOne = ...
ozmi/propel
src/test/scala/propel/lib/SampleExprs.scala
Scala
mit
1,008
/* * Copyright 2011-2018 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
wiacekm/gatling
gatling-http/src/main/scala/io/gatling/http/referer/RefererHandling.scala
Scala
apache-2.0
1,425
/* * Copyright 2011 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 applicable l...
pbrant/framework
project/Dependencies.scala
Scala
apache-2.0
4,780
/*********************************************************************** * Copyright (c) 2013-2017 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...
ronq/geomesa
geomesa-process/geomesa-process-vector/src/test/scala/org/locationtech/geomesa/process/analytic/UniqueProcessTest.scala
Scala
apache-2.0
2,646
package com.whitepages.cloudmanager.client import java.text.SimpleDateFormat import java.util.Locale import org.apache.solr.common.util.NamedList import scala.collection.JavaConverters._ import scala.concurrent.duration._ trait SolrResponseHelper { implicit val rsp: NamedList[AnyRef] // solr response objects ar...
randomstatistic/solrcloud_manager
src/main/scala/com/whitepages/cloudmanager/client/SolrResponseHelper.scala
Scala
apache-2.0
4,383
/******************************************************************************* Copyright (c) 2013, S-Core, KAIST. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. ***************************************************************...
daejunpark/jsaf
src/kr/ac/kaist/jsaf/analysis/typing/models/DOMCore/DOMImplementationSource.scala
Scala
bsd-3-clause
3,578
/** * Copyright 2016, deepsense.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 applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
deeplang/src/it/scala/io/deepsense/deeplang/doperables/spark/wrappers/estimators/AFTSurvivalRegressionSmokeTest.scala
Scala
apache-2.0
1,711
/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
maslovalex/scalate
scalate-core/src/test/scala/org/fusesource/scalate/jade/JadeTestSupport.scala
Scala
apache-2.0
1,899
package org.littlewings.javaee7.scoped import javax.enterprise.context.ApplicationScoped class Book trait Shop[T] @ApplicationScoped class Business @ApplicationScoped class BookShop extends Business with Shop[Book]
kazuhira-r/javaee7-scala-examples
cdi-typed/src/main/scala/org/littlewings/javaee7/scoped/BookShop.scala
Scala
mit
220
package org.jetbrains.plugins.scala.projectHighlighting import com.intellij.openapi.util.TextRange import com.intellij.pom.java.LanguageLevel import org.jetbrains.plugins.scala.HighlightingTests import org.junit.experimental.categories.Category @Category(Array(classOf[HighlightingTests])) class MeerkatProjectHighligh...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/projectHighlighting/MeerkatProjectHighlightingTest.scala
Scala
apache-2.0
2,267
package HackerRank.Training.BasicProgramming import java.io.{ByteArrayInputStream, IOException, InputStream, PrintWriter} import java.util.InputMismatchException import scala.collection.generic.CanBuildFrom import scala.language.higherKinds import scala.reflect.ClassTag /** * Copyright (c) 2017 A. Roberto Fischer ...
robertoFischer/hackerrank
src/main/scala/HackerRank/Training/BasicProgramming/LisaWorkbook.scala
Scala
mit
7,798
package com.twitter.finagle.redis.protocol import org.jboss.netty.buffer.{ChannelBuffer, ChannelBuffers} import com.twitter.finagle.redis.ClientError import com.twitter.finagle.redis.util._ import Commands.trimList case class LLen(key: ChannelBuffer) extends StrictKeyCommand { val command = Commands.LLEN override...
travisbrown/finagle
finagle-redis/src/main/scala/com/twitter/finagle/redis/protocol/commands/Lists.scala
Scala
apache-2.0
5,859
package name.abhijitsarkar.akka import java.nio.file.{DirectoryStream, Path} import akka.actor.{Actor, Props} import akka.stream.scaladsl.Source import scala.collection.immutable.{List => ImmutableList} /** * @author Abhijit Sarkar */ case class Message(dir: DirectoryStream[Path], text: String) import scala.c...
asarkar/akka
akka-streams-learning/weather-streaming/src/main/scala/name/abhijitsarkar/akka/Transformer.scala
Scala
gpl-3.0
771
/** * Copyright 2015, deepsense.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 applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
docgen/src/main/scala/io/deepsense/docgen/DocPageCreator.scala
Scala
apache-2.0
10,566
package com.rasterfoundry.datamodel import io.circe._ import cats.syntax.either._ sealed abstract class JobStatus(val repr: String) { override def toString = repr } object JobStatus { case object Uploading extends JobStatus("UPLOADING") case object Success extends JobStatus("SUCCESS") case object Failure ext...
azavea/raster-foundry
app-backend/datamodel/src/main/scala/JobStatus.scala
Scala
apache-2.0
1,175
/* * 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.runtime import...
scala/scala
src/library/scala/runtime/ClassValueCompat.scala
Scala
apache-2.0
1,435
package org.zouzias.qclocktwo.phrases import scala.collection.mutable.ArrayBuffer /** * Word phrases as an array of words */ class TimePhrases { type WordPhrase = Array[String] private val phrases_ : ArrayBuffer[WordPhrase] = new ArrayBuffer() /** * Add a new phrase * * @param phrase Phrase as an ...
zouzias/qlocktwo-grid-generator
src/main/scala/org/zouzias/qclocktwo/phrases/TimePhrases.scala
Scala
apache-2.0
559
/* * Copyright 2014–2017 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
drostron/quasar
connector/src/main/scala/quasar/qscript/ThetaJoin.scala
Scala
apache-2.0
5,508
package io.aigar.controller import io.aigar.controller.response.{ErrorResponse} import org.scalatra._ import scalate.ScalateSupport import org.json4s.{DefaultFormats, Formats} import org.scalatra.json._ trait AigarStack extends ScalatraServlet with ScalateSupport with JacksonJsonSupport with ContentEncodingS...
DrPandemic/aigar.io
game/src/main/scala/io/aigar/controller/AigarStack.scala
Scala
mit
901
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.scaladsl.persistence import akka.Done import akka.event.Logging import akka.stream.scaladsl.Flow import scala.concurrent.Future import akka.NotUsed import akka.persistence.query.NoOffset import akka.persistence.q...
rcavalcanti/lagom
persistence/scaladsl/src/main/scala/com/lightbend/lagom/scaladsl/persistence/ReadSideProcessor.scala
Scala
apache-2.0
4,786
package com.twitter.io import com.twitter.io.Writer.ClosableWriter import com.twitter.util.{Future, FuturePool, Promise, Return, Throw, Time} import java.io.OutputStream import java.util.concurrent.atomic.AtomicReference import scala.annotation.tailrec /** * Construct a Writer from a given OutputStream. */ private[...
travisbrown/util
util-core/src/main/scala/com/twitter/io/OutputStreamWriter.scala
Scala
apache-2.0
2,085
/* * Copyright (c) 2015 Elder Research, 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...
ElderResearch/monadic-jfx
src/test/scala/eri/viz/gui/jfx/monadic/MonadicBindingTest.scala
Scala
apache-2.0
3,471
package com.clinkle.sql import java.sql.{ResultSet, Statement, Connection} trait Execable[T] extends Node { query => def exec(implicit executor: Executor): Stream[T] def tryFirst(implicit executor: Executor): Option[T] = exec.headOption def first(implicit executor: Executor): T = tryFirst.get def tryOnly(impl...
Clinkle/stilts
src/com/clinkle/sql/Exec.scala
Scala
apache-2.0
3,226
/* * Original implementation (C) 2009-2011 Debasish Ghosh * Adapted and extended in 2011 by Mathias Doenitz * * 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/l...
beamly/spray-json
src/main/scala/cc/spray/json/CollectionFormats.scala
Scala
apache-2.0
4,113
/* * Copyright 2014 Adam Rosenberger * * 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...
arosenberger/nalloc_2.10
sandbox/src/main/scala/org/nalloc/bitb/kcits/sandbox/map/BlockInlineLambda.scala
Scala
apache-2.0
1,355
package rescala.operator import rescala.compat.FlattenCollectionCompat import scala.annotation.implicitNotFound import scala.reflect.ClassTag import rescala.interface.RescalaInterface trait FlattenApi extends FlattenCollectionCompat { self: RescalaInterface => @implicitNotFound(msg = "Could not flatten ${A}....
guidosalva/REScala
Code/Main/shared/src/main/scala/rescala/operator/FlattenApi.scala
Scala
apache-2.0
2,790
package io.swagger.client.model import io.swagger.client.core.ApiModel import org.joda.time.DateTime case class Update ( /* id */ id: Option[Int], /* user_id */ userId: Int, /* connector_id */ connectorId: Int, /* number_of_measurements */ numberOfMeasurements: Int, /* success */ success: Boolean...
QuantiModo/QuantiModo-SDK-Akka-Scala
src/main/scala/io/swagger/client/model/Update.scala
Scala
gpl-2.0
479
/*********************************************************************** * Copyright (c) 2013-2022 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
locationtech/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/util/AccumuloSchemaBuilderTest.scala
Scala
apache-2.0
2,283
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * 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 * * https://www.apache.org/licenses/LICENSE...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/feats/MobileSpellcasting.scala
Scala
apache-2.0
2,193
package me.frmr.kafka.testtool import scala.math import scala.util.Random object MessageBatcher { private[this] def sliding[T]( collection: Seq[T], slotSize: Int, unevenProbability: Double, maximumUnevenDist: Double, unevenEnabled: Boolean ): Seq[Seq[T]] = { def takeMore = Random.nextDoubl...
farmdawgnation/kafka-detective
testtool/src/main/scala/me/frmr/kafka/testtool/MessageBatcher.scala
Scala
apache-2.0
2,055
import java.util.UUID import akka.actor.{ ActorIdentity, ActorPath, ActorSystem, Identify, Props } import akka.pattern.ask import akka.persistence.journal.leveldb.{ SharedLeveldbJournal, SharedLeveldbStore } import akka.util.Timeout import scala.concurrent.ExecutionContext import scala.concurrent.duration._ trait Sh...
j5ik2o/spetstore-cqrs-es-akka
play2-application/app/SharedJournalSupport.scala
Scala
mit
1,094
import org.scalatest.{FunSuite, Matchers} /** * Created by inieto on 27/04/15. */ class _34_TypeSignatures extends FunSuite with Matchers { test("") { } }
inieto/scala-47deg
ScalaExercises/src/test/scala-2.11/_34_TypeSignatures.scala
Scala
mit
164
package cilib final class MultiEval[A] private (objectives: List[Eval[A]]) { def eval(xs: List[A]): List[Objective[A]] = objectives.map(_.eval(xs)) } object MultiEval { // The varags sucks def apply[A](a: Eval[A], b: Eval[A], rest: Eval[A]*) = new MultiEval(List(a, b) ++ rest.toList) }
robgarden/cilib
moo/src/main/scala/cilib/MultiEval.scala
Scala
gpl-3.0
305
package org.awong.sorting.pq import java.util.NoSuchElementException /** * For example of purely functional PQ, see http://amitdev.github.io/coding/2014/03/06/Priority-Queue/ */ abstract class PriorityQueue[K](implicit val ord: Ordering[K]) { import ord._ import collection.mutable.ArrayBuffer // heap-ordere...
alanktwong/algorithms-scala
sorting/src/main/scala/org/awong/sorting/pq/PriorityQueue.scala
Scala
mit
3,408
// This function will be used while invoking "Summation" to compute // The area under the curve. def f(coefficients:List[Int],powers:List[Int],x:Double):Double = { coefficients.zip(powers).map(arg => math.pow(x, arg._2) * arg._1).sum } // This function will be used while invoking "Summation" to compute...
franklingu/HackerRank
functional-programming/introduction/area-under-curves-and-volume-of-revolving-a-curve/area_under_curves_and_volume_of_revolving_a_curve.scala
Scala
mit
1,277
object Main extends App { val source = scala.io.Source.fromFile(args(0)) val lines = source.getLines.filter(_.length > 0) for (l <- lines) { val m = l.split(" ").foldLeft("")((x: String, y: String) => if (y.length > x.length) y else x) val r = for (i <- 0 to (m.length - 1)) yield "*" * i + m(i) print...
nikai3d/ce-challenges
easy/stepwise_word.scala
Scala
bsd-3-clause
346
package demo.components import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.html_<^._ import scalacss.ProdDefaults._ object ReactTagsInputInfo { object Style extends StyleSheet.Inline { import dsl._ val content = style( textAlign.center, fontSize(30.px), paddingTop(40.px) ...
chandu0101/scalajs-react-components
demo/src/main/scala/demo/components/ReactTagsInputInfo.scala
Scala
apache-2.0
1,072
/* * 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
resource-managers/mesos/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerBackendUtilSuite.scala
Scala
apache-2.0
2,042
/*********************************************************************** * 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-kafka/geomesa-kafka-datastore/src/main/scala/org/locationtech/geomesa/kafka/index/KafkaFeatureCacheImpl.scala
Scala
apache-2.0
5,629
package com.biosimilarity.spirograph import ru.circumflex._, core._, web._ import org.scalatest._ import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.matchers.MustMatchers @RunWith(classOf[JUnitRunner]) class MySpec extends FreeSpec with BeforeAndAfter with MustMatchers...
leithaus/SpliciousRoadmap
src/test/scala/specs.scala
Scala
artistic-2.0
565
package io.jfc import cats.data.Xor /** * A zipper that represents a position in a JSON document and supports * navigation and modification. * * The `focus` represents the current position of the cursor; it may be updated * with `withFocus` or changed using navigation methods like `left` and `right`. * * jfc i...
non/circe
core/src/main/scala/io/jfc/GenericCursor.scala
Scala
apache-2.0
7,876
/** * Copyright (C) 2007 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This prog...
wesley1001/orbeon-forms
src/main/scala/org/orbeon/oxf/pipeline/api/FunctionLibrary.scala
Scala
lgpl-2.1
914
trait DeliteDSL { abstract class <~<[-From, +To] extends (From => To) implicit def trivial[A]: A <~< A = new (A <~< A) {def apply(x: A) = x} trait Forcible[T] object Forcible { def factory[T](f: T => Forcible[T]) = new (T <~< Forcible[T]){def apply(x: T) = f(x)} } case class DeliteInt(x: Int) extends ...
scala/scala
test/files/pos/t2421_delitedsl.scala
Scala
apache-2.0
1,848
package org.jetbrains.plugins.scala.lang.psi.light import com.intellij.psi.impl.light.LightMethod import com.intellij.psi.{PsiElement, PsiMethod, JavaPsiFacade} import org.jetbrains.plugins.scala.lang.psi.types.result.{TypingContext, Success} import org.jetbrains.plugins.scala.lang.psi.api.statements.ScFunction /** ...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/psi/light/StaticTraitScFunctionWrapper.scala
Scala
apache-2.0
2,735
package unfiltered.request /** Accepts request header extractor */ object Accepts { trait Accepting { def contentType: String def ext: String def unapply[T](r: HttpRequest[T]) = { val pathSuffix = Path(r).split("[.]").lastOption r match { case Accept(values) => if(values....
hamnis/unfiltered
library/src/main/scala/request/accepts.scala
Scala
mit
1,638
package com.github.ldaniels528.commons.helpers import java.lang.reflect.{Field, Method} import scala.collection.JavaConverters._ import scala.util.{Failure, Success, Try} /** * Scala Bean Copy Utilities * @author lawrence.daniels@gmail.com */ class ScalaBeanUtil() { /** * Copies values from the source insta...
ldaniels528/commons-helpers
src/main/scala/com/github/ldaniels528/commons/helpers/ScalaBeanUtil.scala
Scala
apache-2.0
6,410
// scalac: -Werror class Test { import MyEnum._ def f(e: MyEnum) = e match { case ONE => println("one") case TWO => println("two") // missing case --> exhaustivity warning! } import MySecondEnum._ def g(e: MySecondEnum) = e match { case RED => println("red") // missing case --> exhaustiv...
lrytz/scala
test/files/neg/t2442/t2442.scala
Scala
apache-2.0
339
package org.bone.ircballoon import org.eclipse.swt.widgets.{List => SWTList, _} import org.eclipse.swt.layout._ import org.eclipse.swt.events._ import org.eclipse.swt.graphics._ import org.eclipse.swt.custom._ import org.eclipse.swt._ import scala.math._ import scala.collection.JavaConversions._ import I18N.i18n._ im...
fuunkaosekai/IRCBalloonJ
src/main/scala/notification/NotificationBlock.scala
Scala
gpl-3.0
9,013
package dao import scala.concurrent.Future import models.{ Category, PostCategory } import play.api.Play import play.api.db.slick.DatabaseConfigProvider import play.api.db.slick.HasDatabaseConfig import play.api.libs.concurrent.Execution.Implicits.defaultContext import slick.driver.JdbcProfile import java.sql.Timesta...
vjousse/play2-blog
app/dao/CategoriesDAO.scala
Scala
mit
1,714
/*********************************************************************** * Copyright (c) 2017 IBM * Copyright (c) 2013-2017 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 ...
MutahirKazmi/geomesa
geomesa-cassandra/geomesa-cassandra-datastore/src/main/scala/org/locationtech/geomesa/cassandra/index/CassandraFeatureIndex.scala
Scala
apache-2.0
6,358
package dotty.tools.dotc.printing import dotty.tools.dotc.core.Constants import dotty.tools.dotc.core.Constants.Constant import dotty.tools.dotc.core.Contexts._ import dotty.tools.dotc.core.Flags._ import dotty.tools.dotc.core.NameOps._ import dotty.tools.dotc.core.Names.Name import dotty.tools.dotc.core.Symbols._ imp...
som-snytt/dotty
compiler/src/dotty/tools/dotc/printing/ReplPrinter.scala
Scala
apache-2.0
2,110
/** * Created by Variant on 16/3/26. */ class P[+T](val first : T,val second :T){ //def replceFirst(newfirst : T) = new P[T](newfirst,second) //逆变点 def replceFirst[R >: T](newfirst : R) = new P[R](newfirst,second) } object Variant_Position { def main(args: Array[String]) { } }
sparkLiwei/ProgrammingNote
scalaLearning/scalaTypeParameteriza/Variant_Position.scala
Scala
cc0-1.0
299
package controllers import javax.inject.{ Inject, Named, Singleton } import akka.actor.{ ActorRef, ActorSystem } import akka.stream.Materializer import akka.util.Timeout import com.github.j5ik2o.spetstore.adaptor.http.{ CreateItemTypeJson, ItemTypeSupport } import com.github.j5ik2o.spetstore.usecase.ItemTypeUseCase i...
j5ik2o/spetstore-cqrs-es-akka
play2-application/app/controllers/ItemTypeController.scala
Scala
mit
1,191
package ru.stachek66.tools import java.io.File import java.net.URL import org.junit.runner.RunWith import org.scalatest.{Ignore, FunSuite} import org.scalatest.junit.JUnitRunner /** * alexeyev * 07.09.14. */ @Ignore class Downloader$Test extends FunSuite { test("downloading-something") { val hello = new ...
alexeyev/mystem-scala
src/test/scala/ru/stachek66/tools/Downloader$Test.scala
Scala
mit
1,132
package spec import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import java.util.TimeZone import org.slf4j.{LoggerFactory, MDC} import scribe.handler.LogHandler import scribe.output.LogOutput import scribe.output.format.{ASCIIOutputFormat, OutputFormat} import scribe.util.Time imp...
outr/scribe
slf4j2/src/test/scala/spec/SLF4JSpec.scala
Scala
mit
2,844
// Generated by <a href="http://scalaxb.org/">scalaxb</a>. package eveapi.xml.account.char.SkillInTraining case class Eveapi(currentTime: String, result: eveapi.xml.account.char.SkillInTraining.Result, cachedUntil: String, attributes: Map[String, scalaxb.DataRecord...
scala-eveapi/eveapi
xml/src/main/scala/eveapi/xml/char/SkillInTraining/SkillInTraining.scala
Scala
mit
1,001
package com.twitter.finagle.builder import com.twitter.concurrent.AsyncSemaphore import com.twitter.finagle.filter.{MaskCancelFilter, RequestSemaphoreFilter} import com.twitter.finagle.netty3.channel.IdleConnectionFilter import com.twitter.finagle.netty3.channel.OpenConnectionsThresholds import com.twitter.finagle.net...
a-manumohan/finagle
finagle-core/src/main/scala/com/twitter/finagle/builder/ServerBuilder.scala
Scala
apache-2.0
19,765
import org.scalatest.FunSuite import hkt._ class BasicSuite extends FunSuite { implicit val listFunctor: Functor[List] = new Functor[List] { def fmap[A, B](fa: List[A])(f: A => B): List[B] = fa.map(f) } implicit val listApplicative: Applicative[List] = new Applicative[List] { def point[A](a: =>...
alsam/scala-hkt-examples
test/hkt_test.scala
Scala
mit
5,106
class ProtobufSbt(info: sbt.ProjectInfo) extends sbt.PluginProject(info) { /** * Publish to a local temp repo, then rsync the files over to repo.codahale.com. */ override def managedStyle = sbt.ManagedStyle.Maven val publishTo = sbt.Resolver.file("Local Cache", ("." / "target" / "repo").asFile) def publis...
jcarnegie/protobuf-sbt
project/build/ProtobufSbt.scala
Scala
mit
684
package io.circe.numbers.testing import org.scalacheck.{ Arbitrary, Gen } /** * An integral string with an optional leading minus sign and between 1 and 25 * digits (inclusive). */ final case class IntegralString(value: String) object IntegralString { implicit val arbitraryIntegralString: Arbitrary[IntegralStri...
travisbrown/circe
modules/numbers-testing/src/main/scala/io/circe/numbers/testing/IntegralString.scala
Scala
apache-2.0
750
object Test { type And[X, Y] = X & Y val x: And[_, _] = ??? // error: unreducible }
som-snytt/dotty
tests/neg/and-wildcard.scala
Scala
apache-2.0
90
/* * Copyright 2014-2021 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
brharrington/atlas
atlas-module-webapi/src/test/scala/com/netflix/atlas/guice/WebApiModuleSuite.scala
Scala
apache-2.0
1,323
/* 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://mozilla.org/MPL/2.0/. */ package cqrs.query import cqrs.command.DomainEvent /** * Represents single event that was published by some agg...
cqrs-endeavour/cqrs-endeavour
cqrs-framework/src/main/scala/cqrs/query/EventEnvelope.scala
Scala
mpl-2.0
512
/* * * 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 * distri...
flaminem/flamy
src/main/scala/com/flaminem/flamy/exec/utils/WorkflowHistory.scala
Scala
apache-2.0
1,754
import stainless.lang._ import stainless.annotation._ object PartitionExample { sealed abstract class IList case object Nil extends IList case class Cons(head: BigInt, tail: IList) extends IList def filter(l: IList, p: BigInt => Boolean): IList = { decreases(l) l match { case Nil => Nil ca...
epfl-lara/stainless
frontends/benchmarks/verification/valid/PartitionExample.scala
Scala
apache-2.0
1,169
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller, Peng Hao * @version 1.3 * @date Sat Nov 7 21:01:31 EST 2015 * @see LICENSE (MIT style license file). */ package scalation.graphalytics.mutable import scala.collection.mutable.{Map, Set => SET} //im...
NBKlepp/fda
scalation_1.3/scalation_modeling/src/main/scala/scalation/graphalytics/mutable/MinSpanningTree.scala
Scala
mit
9,735
package org.psliwa.idea.composerJson.composer.model.version sealed trait Constraint { def isBounded: Boolean = this match { case SemanticConstraint(_) => true case WildcardConstraint(None) => false case WildcardConstraint(Some(constraint)) => constraint.isBounded case WrappedConstraint(constraint, _,...
psliwa/idea-composer-plugin
src/main/scala/org/psliwa/idea/composerJson/composer/model/version/Constraint.scala
Scala
mit
5,306
package io.circe.tests import io.circe.Json import org.scalacheck.{ Arbitrary, Gen } trait ArbitraryInstances { private[this] def maxDepth: Int = 5 private[this] def maxSize: Int = 20 private[this] def genNull: Gen[Json] = Gen.const(Json.empty) private[this] def genBool: Gen[Json] = Arbitrary.arbBool.arbitra...
ktoso/circe
tests/shared/src/main/scala/io/circe/tests/ArbitraryInstances.scala
Scala
apache-2.0
1,419
package filodb.prometheus.ast import filodb.query.BinaryOperator /* * The following label matching operators exist: * = Select labels that are exactly equal to the provided string. * =: Select labels that are exactly equal to the provided string. * !=: Select labels that are not equal to the provided string....
tuplejump/FiloDB
prometheus/src/main/scala/filodb/prometheus/ast/Operators.scala
Scala
apache-2.0
3,557
/* * Copyright (C) 2012 The Regents of The University California. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENS...
sameeragarwal/blinkdb_dev
src/main/scala/shark/memstore2/TablePartitionIterator.scala
Scala
apache-2.0
1,956
/* * Copyright 2015 eleflow.com.br. * * 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 ...
eleflow/uberdata
iuberdata_core/src/main/scala/org/apache/spark/ml/param/shared/HasTimeCol.scala
Scala
apache-2.0
1,054
package com.lunatic.mlx.kddcup99.mllib.transformers import org.apache.spark.rdd.RDD import scala.reflect.ClassTag /** * Remove the columns in the given list */ case class ColumnRemover[T: ClassTag](removableColumns: Option[List[Int]] = None) extends Transformer[Array[T], Array[T]] { //class ColumnRemover[T: Cla...
tupol/sparx-mllib
src/main/scala/com/lunatic/mlx/kddcup99/mllib/transformers/ColumnRemover.scala
Scala
apache-2.0
1,421
package cloudcmd.common.util import cloudcmd.common.FileUtil import org.json.JSONArray import org.json.JSONException import org.json.JSONObject import java.io._ import scala.collection.mutable object JsonUtil { def toJsonArray(data: List[String]) : JSONArray = { val arr = new JSONArray() data.foreach(arr.p...
briangu/cloudcmd
common/src/main/scala/cloudcmd/common/util/JsonUtil.scala
Scala
apache-2.0
2,670
/* * Copyright (C) FuseSource, Inc. * http://fusesource.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 ...
fusesource/fuse-extra
fusemq-apollo/fusemq-apollo-cluster/src/main/scala/org/fusesource/fabric/apollo/cluster/Peer.scala
Scala
apache-2.0
28,761
package org.monkeynuthead.monkeybarrel.glue object MicroPickleSerializers extends Serializers { import Messages._ import upickle.default._ implicit val messageSerializer = new Serializer[Message] { override def serialize(a: Message): String = write(a) override def deserialize(s: String): Mes...
georgenicoll/monkey-barrel
glue/shared/src/main/scala/org/monkeynuthead/monkeybarrel/glue/MicroPickleSerializers.scala
Scala
gpl-2.0
357
import java.io.File import java.nio.file._ import Process._ import Modes._ import ScaladocGeneration._ import com.jsuereth.sbtpgp.PgpKeys import sbt.Keys._ import sbt._ import complete.DefaultParsers._ import pl.project13.scala.sbt.JmhPlugin import pl.project13.scala.sbt.JmhPlugin.JmhKeys.Jmh import sbt.Package.Manife...
dotty-staging/dotty
project/Build.scala
Scala
apache-2.0
79,537
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
tophua/spark1.52
mllib/src/test/scala/org/apache/spark/mllib/tree/GradientBoostedTreesSuite.scala
Scala
apache-2.0
12,954
package BIDMach.datasources import BIDMat.{Mat,SBMat,CMat,CSMat,DMat,FMat,IMat,HMat,GMat,GIMat,GSMat,SMat,SDMat} import BIDMat.MatFunctions._ import BIDMat.SciFunctions._ import java.io._ class MatSource(var mats:Array[Mat], override val opts:MatSource.Opts = new MatSource.Options) extends DataSource(opts) { ...
jamesjia94/BIDMach
src/main/scala/BIDMach/datasources/MatSource.scala
Scala
bsd-3-clause
2,256
package test006 import org.scalatest._ import scalikejdbc._ import scalikejdbc.scalatest.AutoRollback import skinny.dbmigration.DBSeeds import skinny.orm._ trait Connection { Class.forName("org.h2.Driver") ConnectionPool.add(Symbol("test006"), "jdbc:h2:mem:test006;MODE=PostgreSQL", "sa", "sa") } trait CreateTabl...
skinny-framework/skinny-framework
orm/src/test/scala/test006/Spec.scala
Scala
mit
3,289
package poly.collection import poly.collection.exception._ import poly.collection.node._ /** * Represents a bidirectional sequence, i.e. a sequence that supports * fast access to the last element as well as fast reversed traversal. * * @author Tongfei Chen * @since 0.1.0 */ trait BidiSeq[+T] extends Seq[T] with...
ctongfei/poly-collection
core/src/main/scala/poly/collection/BidiSeq.scala
Scala
mit
4,258
package com.twitter.finagle.mux import com.twitter.finagle.mux.transport.Message import com.twitter.finagle.transport.{Transport, TransportProxy} import com.twitter.finagle.{Failure, Status} import com.twitter.util.{Future, Return, Throw, Time} import java.net.SocketAddress import java.security.cert.Certificate import...
lukiano/finagle
finagle-mux/src/main/scala/com/twitter/finagle/mux/Handshake.scala
Scala
apache-2.0
10,091
/* * 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
mllib/src/test/scala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala
Scala
apache-2.0
34,293
package com.twitter.zk import java.util.concurrent.atomic.AtomicReference import scala.annotation.tailrec import org.apache.zookeeper.ZooKeeper import com.twitter.logging.Logger import com.twitter.util.Future trait Connector { import Connector.EventHandler val name = "zk-connector" protected lazy val log =...
edombowsky/util
util-zk/src/main/scala/com/twitter/zk/Connector.scala
Scala
apache-2.0
2,628
package sri.universal.navigation import chandu0101.macros.tojs.JSMacro import sri.core._ import sri.universal.ReactUniversal import sri.universal.components._ import sri.universal.all._ import scala.scalajs.js import scala.scalajs.js.annotation.ScalaJSDefined import scala.scalajs.js.{UndefOr => U, undefined => undefin...
hamazy/sri
universal/src/main/scala/sri/universal/navigation/NavigationHeader.scala
Scala
apache-2.0
1,512