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
// TODO(high): proper incremental xsbt.version.properties generation // TODO(low): proper generated API sources caching: doesn't detect output directory change import sbt._ import Keys._ import Project.Initialize import Util._ import Common._ import Licensed._ import Scope.ThisScope import LaunchProguard.{prog...
ornicar/xsbt
project/Sbt.scala
Scala
bsd-3-clause
13,775
package feh.phtpe import org.specs2.Specification import feh.phtpe.short._ class CollectionsOfPhisTypedSpec extends Specification{ def is = s2""" __map__ ${ ( 1 to 10 map (_.of[kg]) map(_ * 2) ).map(_.value) == Range(2, 22, 2) } __reduce__ ${ ( 1 to 10 map(_.of[kg]) ).reduceLeft(_ + _) =@= 55.of[k...
fehu/phtpe
phtpe/src/test/scala/feh/phtpe/CollectionsOfPhisTypedSpec.scala
Scala
mit
534
package com.typesafe.slick.testkit.tests import com.typesafe.slick.testkit.util.{JdbcTestDB, AsyncTest} import slick.jdbc.{ResultSetHoldability, ResultSetConcurrency, ResultSetType, JdbcBackend} class JdbcMiscTest extends AsyncTest[JdbcTestDB] { import tdb.profile.api._ def testNullability = { class T1(tag:...
AtkinsChang/slick
slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/JdbcMiscTest.scala
Scala
bsd-2-clause
2,561
/* * Copyright 2013 http4s.org * * 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 i...
http4s/http4s
examples/blaze/src/main/scala/com/example/http4s/blaze/BlazeMetricsExample.scala
Scala
apache-2.0
1,757
package kata.calc import kata.calc.Calculator import org.scalatest.{FlatSpec, Matchers} class StringCalculatorTest extends FlatSpec with Matchers { it should " evaluate integer " in { Calculator.evaluate("100") shouldBe 100 } it should " evaluate float number " in { Calculator.evaluate("...
Alex-Diez/Scala-TDD-Katas
old-katas/string-calc/day-1/src/test/scala/kata/calc/StringCalculatorTest.scala
Scala
mit
912
package nl.malienkolders.htm.admin.comet import net.liftweb._ import http._ import actor._ object ChatServer extends LiftActor with ListenerManager { private var msgs: InboxMessages = InboxMessages(Vector()) def createUpdate = msgs override def lowPriority = { case s: String => msgs = InboxMessages(...
hema-tournament-manager/htm
htm-admin/src/main/scala/nl/malienkolders/htm/admin/comet/ChatServer.scala
Scala
apache-2.0
453
package w2v /** * Created by cbadenes on 17/09/15. */ object TestWikiW2V { def main(args: Array[String]) : Unit={ ModelBuilder.main(List("2","1g","/Users/cbadenes/Projects/siminwikart-challenge4/text/wikipedia/articles_body10000.csv","model/w2v").toArray) } }
cbadenes/text-mining-algorithms
src/test/scala/w2v/TestWikiW2V.scala
Scala
apache-2.0
273
/* * Copyright 2016 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 t...
coursera/courscala
courscala/src/test/scala/org/coursera/common/jsonformat/TypedFormatsTest.scala
Scala
apache-2.0
1,618
/* * Copyright 2017 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...
liquidarmour/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600j/v3/J25A.scala
Scala
apache-2.0
992
/** * Copyright (C) 2010-2011 LShift Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
0x6e6562/diffa
agent/src/main/scala/net/lshift/diffa/agent/rest/EscalationsResource.scala
Scala
apache-2.0
1,665
object Test { def f[T](xs: T*): T = xs.head def g[T] = f[T] _ def main(args: Array[String]): Unit = { println(g("hello" +: args)) } }
folone/dotty
tests/pending/run/eta-expand-star.scala
Scala
bsd-3-clause
147
package spatial.codegen.chiselgen import argon.core._ import argon.nodes._ import spatial.aliases._ import spatial.metadata._ import spatial.nodes._ import spatial.utils._ trait ChiselGenRegFile extends ChiselGenSRAM { private var nbufs: List[(Sym[SRAM[_]], Int)] = List() override protected def name(s: Dyn[_])...
stanford-ppl/spatial-lang
spatial/core/src/spatial/codegen/chiselgen/ChiselGenRegFile.scala
Scala
mit
11,082
package varys.examples.tracedriven import java.io._ import java.net._ import varys.util.AkkaUtils import varys.{Logging, Utils} import varys.framework.client._ import varys.framework._ import scala.concurrent.duration._ import scala.concurrent.{Future, Await, ExecutionContext} /** * Created by wakira on 15-7-17. *...
frankfzw/varys
examples/src/main/scala/varys/examples/tracedriven/Worker.scala
Scala
apache-2.0
4,043
package scala.tasty.internal package dotc package core package tasty trait TastyPrinters { self: PicklerAPI => import Contexts._, Decorators._ import printing.Texts._ import TastyName._ import StdNames._ import TastyUnpickler._ import TastyBuffer.Addr import util.Positions.{Position, offsetToInt} import collection....
VladimirNik/tasty
plugin/src/main/scala/scala/tasty/internal/dotc/core/tasty/TastyPrinter.scala
Scala
bsd-3-clause
4,494
/* * StreamIn.scala * (FScape) * * Copyright (c) 2001-2022 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Affero General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * [email protected] */ package de.sciss.fscape package str...
Sciss/FScape-next
core/shared/src/main/scala/de/sciss/fscape/stream/StreamIn.scala
Scala
agpl-3.0
14,899
/* * 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 ...
tejasapatil/spark
sql/core/src/main/scala/org/apache/spark/sql/functions.scala
Scala
apache-2.0
136,266
/* * Copyright 2014 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 agreed to...
Treode/store
store/src/com/treode/store/catalog/Proposer.scala
Scala
apache-2.0
6,579
package chee.metadata import chee.UserError import chee.query.Transform import chee.properties._ import MetadataMacro._ import com.typesafe.scalalogging.LazyLogging class MetadataMacro(f: Condition => Traversable[String]) extends Transform with LazyLogging { def this(mf: MetadataFile) = this(mf.findIds _) def ma...
eikek/chee
src/main/scala/chee/metadata/MetadataMacro.scala
Scala
gpl-3.0
1,147
package ai.dragonfly.img import ai.dragonfly.color.Color object Img { def apply(width: Int, height: Int): Img = new ai.dragonfly.img.native.Img( width, Array.fill[Int](width * height)(Color.CLEAR.argb) ) }
dragonfly-ai/img
img/shared/src/main/scala/ai/dragonfly/img/Img.scala
Scala
apache-2.0
216
/* __ *\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2006-2015, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\___/_/ |_/...
rorygraves/perf_tester
corpus/scala-library/src/main/scala/util/Sorting.scala
Scala
apache-2.0
11,943
package ore.rest import play.api.libs.json.Json.obj import play.api.libs.json._ import ore.db.Model import ore.models.api.ProjectApiKey import ore.models.project._ /** * Contains implicit JSON [[Writes]] for the Ore API. */ trait OreWrites { implicit val projectApiKeyWrites: Writes[Model[ProjectApiKey]] = (ke...
SpongePowered/Ore
ore/app/ore/rest/OreWrites.scala
Scala
mit
1,597
package org.jetbrains.plugins.scala.failed.typeInference import org.jetbrains.plugins.scala.PerfCycleTests import org.jetbrains.plugins.scala.lang.typeInference.TypeInferenceTestBase import org.junit.experimental.categories.Category /** * @author Alefas * @since 25/03/16 */ @Category(Array(classOf[PerfCycleTest...
jeantil/intellij-scala
test/org/jetbrains/plugins/scala/failed/typeInference/AnonymousFunctionsTest.scala
Scala
apache-2.0
837
package mot.protocol import mot.buffer.WriteBuffer import mot.buffer.ReadBuffer /** * Special frame type, which represents an unknown received frame. It is never written. */ case class UnknownFrame(messageType: Byte, length: Int) extends Frame { def writeSpecific(writeBuffer: WriteBuffer) = throw new UnsupportedO...
marianobarrios/mot
src/main/scala/mot/protocol/UnknownFrame.scala
Scala
bsd-2-clause
568
package org.jetbrains.plugins.scala.conversion.copy import java.awt.datatransfer.Transferable import java.lang.Boolean import com.intellij.codeInsight.CodeInsightSettings import com.intellij.codeInsight.daemon.impl.CollectHighlightsUtil import com.intellij.diagnostic.LogMessageEx import com.intellij.openapi.diagnosti...
katejim/intellij-scala
src/org/jetbrains/plugins/scala/conversion/copy/ScalaCopyPastePostProcessor.scala
Scala
apache-2.0
6,946
package scalan.primitives import scalan.{ScalanDslExp, BaseTests} class RewriteSuite extends BaseTests { val scalan = new ScalanDslExp import scalan._ // TODO will be a describe block { val rand1 = random(5) val rand2 = random(5) test("A random should be equal to itself") { (rand1 === rand...
scalan/scalan
core/src/test/scala/scalan/primitives/RewriteSuite.scala
Scala
apache-2.0
856
/* * 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/rdd/AsyncRDDActions.scala
Scala
apache-2.0
4,306
import sbt._ import Keys._ /** * This object includes the publishing mechanism. We simply publish to the ``artifacts`` directory, * which Jenkins build uses to automatically push the built artefacts to Artifactory. */ object PublishSettings { lazy val publishSettings: Seq[Def.Setting[_]] = Seq( publishArtifa...
imace/open-muvr
server/project/PublishSettings.scala
Scala
apache-2.0
1,588
package io.github.kender.spray.eureka.client import org.json4s.jackson.Serialization import org.json4s.{NoTypeHints, DefaultFormats, Formats} import spray.httpx.Json4sJacksonSupport import scala.concurrent._ import akka.actor.ActorSystem import spray.client.pipelining._ import spray.http._ import io.github.kender....
kender/spray-eureka-client
src/main/scala/io/github/kender/spray/eureka/client/InstanceClient.scala
Scala
mit
2,461
package monocle.std import monocle.{Iso, Prism} import monocle.catssupport.Implicits._ import cats.instances.list._ import cats.instances.option._ import cats.syntax.traverse._ object string extends StringOptics trait StringOptics { val stringToList: Iso[String, List[Char]] = Iso((_: String).toList)(_.mkStr...
fkz/Monocle
core/shared/src/main/scala/monocle/std/String.scala
Scala
mit
1,679
package commons package object scala { case class Config(notificationEnabled: Boolean) case class User(firstName: String, lastName: String) { def fullName: String = s"$firstName $lastName" } val config = Config(notificationEnabled = true) val currentUser = User("Jane", "Doe") def notifyUser(user: U...
naderghanbari/scala-vs-java
src/main/scala/commons/scala/package.scala
Scala
apache-2.0
407
package com.twitter.util.jackson.caseclass import com.fasterxml.jackson.annotation.JsonIgnoreProperties /** * "Serde" (technically "SerDe") is a portmanteau of "Serialization and Deserialization" * * Mix this trait into a case class to get helpful logging methods. * This trait adds a `@JsonIgnoreProperties` for f...
twitter/util
util-jackson/src/main/scala/com/twitter/util/jackson/caseclass/SerdeLogging.scala
Scala
apache-2.0
682
/* * Copyright (C) 2011 Romain Reuillon * * 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 version. * * This progra...
openmole/openmole
openmole/core/org.openmole.core.workflow/src/main/scala/org/openmole/core/workflow/sampling/ExplicitSampling.scala
Scala
agpl-3.0
1,406
package com.github.romangrebennikov.columnize.protocol.cql.types import java.nio.ByteBuffer /** * Created by shutty on 10/12/15. */ case object DoubleType extends CQL.Type { def deserialize(raw:ByteBuffer) = DoubleValue(raw) } case class DoubleValue(data:Double) extends CQL.Value object DoubleValue { def apply...
shuttie/columnize
src/main/scala/com/github/romangrebennikov/columnize/protocol/cql/types/DoubleType.scala
Scala
bsd-2-clause
371
package scala.lms package common import internal._ import scala.reflect.SourceContext /** * This trait automatically lifts any concrete instance to a representation. */ trait LiftAll extends Base { protected implicit def __unit[T:Manifest](x: T) = unit(x) } /** * The Base trait defines the type constructor Rep,...
scalan/virtualization-lms-core
src/common/Base.scala
Scala
bsd-3-clause
3,022
/* * Copyright 2001-2008 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
scalatest/scalatest-finders
src/test/scala/org/scalatest/finders/WordSpecFinderSuite.scala
Scala
apache-2.0
24,201
package mesosphere.marathon import java.util.concurrent.locks.ReentrantLock import com.typesafe.config.Config import scala.concurrent.Future import scala.language.implicitConversions package object util { type Success[T] = scala.util.Success[T] val Success = scala.util.Success type Failure[T] = scala.util.Fai...
gsantovena/marathon
src/main/scala/mesosphere/marathon/util/package.scala
Scala
apache-2.0
595
// // PrettyPrint.scala -- Scala class PrettyPrint // Project OrcScala // // Created by dkitchin on Jun 7, 2010. // // Copyright (c) 2017 The University of Texas at Austin. All rights reserved. // // Use and redistribution of this file is governed by the license terms in // the LICENSE file found in the project's top-l...
orc-lang/orc
OrcScala/src/orc/ast/orctimizer/named/PrettyPrint.scala
Scala
bsd-3-clause
6,418
package uk.gov.gds.ier.transaction.ordinary.postalVote import uk.gov.gds.ier.step.StepTemplate import uk.gov.gds.ier.transaction.ordinary.InprogressOrdinary import uk.gov.gds.ier.model.PostalVoteOption trait PostalVoteMustache extends StepTemplate[InprogressOrdinary] { case class PostalVoteModel( question: Que...
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/transaction/ordinary/postalVote/PostalVoteMustache.scala
Scala
mit
1,987
package gg.uhc.hosts.endpoints.matches import java.time.format.DateTimeFormatter import java.time.temporal.ChronoUnit import java.time.{Instant, ZoneOffset} import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.server.Directives.{entity, _} import akka.http.scaladsl.server._ import gg.uhc.hosts._ impo...
Eluinhost/hosts.uhc.gg
src/main/scala/gg/uhc/hosts/endpoints/matches/CreateMatch.scala
Scala
mit
9,031
package regolic.lp import regolic.algebra.{Rational, Vector, Matrix} import org.scalatest.FunSuite import Simplex.{Optimal, Infeasible, Unbounded} class SimplexSuite extends FunSuite { def r(n: BigInt) = Rational(n) def r(n: BigInt, d: BigInt) = Rational(n, d) def s2t(str: String, basis: List[Int]): Tableau =...
regb/scabolic
src/test/scala/regolic/lp/SimplexSuite.scala
Scala
mit
1,894
package kr.scala.experiments.tests.akka.examples.chap03 import akka.actor.{Props, Actor} import akka.event.Logging import org.scalatest.FunSuite /** * MyActor * Created by debop on 2014. 3. 3. */ class MyActor(val name: String = "actor") extends Actor { def this() { this("actor") } val log = ...
debop/scala-experiments
src/test/scala/kr/scala/experiments/tests/akka/examples/chap03/MyActor.scala
Scala
apache-2.0
1,045
package com.getjenny.starchat.resources import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.server.Route import akka.pattern.CircuitBreaker import com.getjenny.starchat.entities.io.{Permissions, ReturnMessageData} import com.getjenny.starchat.routing.{StarChatCircuitBreaker, StarChatResource} import ...
GetJenny/starchat
src/main/scala/com/getjenny/starchat/resources/ClusterNodesResource.scala
Scala
gpl-2.0
5,013
/* * Copyright 2019 Spotify AB. * * 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 ...
spotify/scio
scio-macros/src/main/scala/com/spotify/scio/coders/CoderMacros.scala
Scala
apache-2.0
5,215
/* * Copyright (c) 2015 Robert Conrad - All Rights Reserved. * Unauthorized copying of this file, via any medium is strictly prohibited. * This file is proprietary and confidential. * Last modified by rconrad, 1/1/15 5:04 PM */ package base.entity.auth.context import base.entity.auth.AuthRoles.AuthRole import ba...
robconrad/base-api
project-entity/src/test/scala/base/entity/auth/context/AuthContextTest.scala
Scala
mit
3,067
package fpinscala.testing import fpinscala.laziness.Stream import fpinscala.state._ import fpinscala.parallelism._ import fpinscala.parallelism.Par.Par import Gen._ import Prop._ import java.util.concurrent.{Executors,ExecutorService} /* The library developed in this chapter goes through several iterations. This file...
yawaramin/fpinscala
exercises/src/main/scala/fpinscala/testing/Gen.scala
Scala
mit
7,629
package chat.tox.antox.tox import java.util import android.app.{Notification, PendingIntent} import android.content.{Context, Intent} import android.preference.PreferenceManager import android.support.v4.app.{NotificationCompat, TaskStackBuilder} import android.util.Log import chat.tox.antox.R import chat.tox.antox.a...
gale320/Antox
app/src/main/scala/chat/tox/antox/tox/MessageHelper.scala
Scala
gpl-3.0
7,712
package kafka.consumer import com.softwaremill.react.kafka.ConsumerProperties import kafka.message.MessageAndMetadata import kafka.serializer.DefaultDecoder import kafka.utils.{IteratorTemplate, Logging} import scala.concurrent.duration._ import scala.language.postfixOps /** * Copied from https://github.com/stealth...
Tecsisa/reactive-kafka
core/src/main/scala/kafka/consumer/KafkaConsumer.scala
Scala
apache-2.0
1,275
package com.sothr.imagetools.engine.util import grizzled.slf4j.Logging /** * Class to handle version detection and evaluation * * Created by drew on 1/6/14. */ class Version(val versionString: String) extends Logging { //parse version into parts //typical version string i.e. 0.1.0-DEV-27-060aec7 val (major,...
warricksothr/ImageTools
engine/src/main/scala/com/sothr/imagetools/engine/util/Version.scala
Scala
mit
2,781
package concurrent_programming.peers object ProtocolMain { def main(args: Array[String]): Unit = { CentralizedProtocol.run() SymmetricProtocol.run() TwiceRing.run() MultiRing.run() TreeProtocol.run() } }
AlexandruValeanu/Concurrent-Programming-in-Scala
src/concurrent_programming/peers/ProtocolMain.scala
Scala
gpl-3.0
229
package com.typesafe.slick.testkit.tests import org.junit.Assert._ import com.typesafe.slick.testkit.util.{TestkitTest, TestDB} class ColumnDefaultTest(val tdb: TestDB) extends TestkitTest { import tdb.profile.simple._ case class User(id: Int, first: String, last: String) object A extends Table[(Int, String, ...
zefonseca/slick-1.0.0-scala.2.11.1
slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/ColumnDefaultTest.scala
Scala
bsd-2-clause
706
package scorex.consensus import play.api.libs.json.JsObject import scorex.block.Block trait BlockGenerationData { def bytes: Array[Byte] def json: JsObject def isGenesis: Boolean def signature(): Array[Byte] def isValid(block: Block): Boolean //block score value, where blockchain quality measure is t...
Pole-he/Scorex-Lagonaki
src/main/scala/scorex/consensus/BlockGenerationData.scala
Scala
cc0-1.0
491
package org.jetbrains.plugins.scala package lang package psi package stubs package impl import api.base.ScStableCodeReferenceElement import api.toplevel.imports.ScImportExpr import com.intellij.psi.PsiElement import com.intellij.psi.stubs.{IStubElementType, StubElement} import com.intellij.util.io.StringRef import ps...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/psi/stubs/impl/ScImportExprStubImpl.scala
Scala
apache-2.0
1,849
package scala.meta.internal.semanticdb.scalac import org.scalameta.unreachable import scala.{meta => m} import scala.meta.internal.inputs._ import scala.meta.internal.{semanticdb => s} trait DiagnosticOps { self: SemanticdbOps => implicit class XtensionCompilationUnitDiagnostics(unit: g.CompilationUnit) { def r...
olafurpg/scalameta
semanticdb/scalac/library/src/main/scala/scala/meta/internal/semanticdb/scalac/DiagnosticOps.scala
Scala
bsd-3-clause
1,495
package module.dao import awscala.dynamodbv2._ import com.google.inject.ImplementedBy import models.{CarAdvertField, CarAdvert} import org.joda.time.DateTime import org.slf4j.LoggerFactory @ImplementedBy(classOf[CarAdvertDaoImpl]) trait CarAdvertDao { def deleteBy(id: String, title: String): Boolean def update(...
boonhero/car-advert
app/module/dao/CarAdvertDao.scala
Scala
mit
3,056
package com.twitter.server.handler import com.twitter.finagle.Service import com.twitter.finagle.http.Request import com.twitter.finagle.http.Response import com.twitter.finagle.http.Uri import com.twitter.finagle.stats.BucketAndCount import com.twitter.finagle.stats.HistogramDetail import com.twitter.finagle.stats.Wi...
twitter/twitter-server
server/src/main/scala/com/twitter/server/handler/HistogramQueryHandler.scala
Scala
apache-2.0
14,067
package algorithm import com.typesafe.scalalogging.slf4j.Logging import net.sourceforge.cilib.algorithm.Algorithm import net.sourceforge.cilib.stoppingcondition.StoppingCondition /* Stops algorithm execution immediately */ object StopNowStoppingCondition extends StoppingCondition[Algorithm] with Logging { override...
felixamerbauer/firefly-simulator
src/main/scala/algorithm/StopNowStoppingCondition.scala
Scala
gpl-3.0
477
package org.jetbrains.plugins.scala package lang package parameterInfo import java.awt.Color import com.intellij.codeInsight.CodeInsightBundle import com.intellij.codeInsight.lookup.LookupElement import com.intellij.lang.parameterInfo._ import com.intellij.psi._ import com.intellij.psi.tree.IElementType import com.in...
double-y/translation-idea-plugin
src/org/jetbrains/plugins/scala/lang/parameterInfo/ScalaPatternParameterInfoHandler.scala
Scala
apache-2.0
11,453
/********************************************************************************************************************** * This file is part of Scrupal, a Scalable Reactive Web Application Framework for HtmlContents Management * * ...
scrupal/scrupal-core
scrupal-server/src/main/scala/scrupal/html/Utilities.scala
Scala
apache-2.0
8,246
/** * Copyright (c) 2014 Rafael Brandão <[email protected]> * * This 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 3 of the License, or (at * your option) any later version. * ...
rafael-brandao/ecurrencies
api/src/main/scala/ecurrencies/Message.scala
Scala
lgpl-3.0
1,016
/* * Copyright (C) 2016-2017 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.serialization // JsonSerializable would be a nice name, but that is already defined in Jackson, // so we are avoiding wrong import mistake by using another name /** * Marker interface for messages that are serial...
edouardKaiser/lagom
jackson/src/main/scala/com/lightbend/lagom/serialization/Jsonable.scala
Scala
apache-2.0
751
package java.time.temporal import java.time.{DateTimeException, Duration} trait TemporalUnit { def getDuration(): Duration def isDurationEstimated(): Boolean def isDateBased(): Boolean def isTimeBased(): Boolean def isSupportedBy(temporal: Temporal): Boolean = { try { temporal.plus(1, this) ...
sjrd/scala-js-java-time
src/main/scala/java/time/temporal/TemporalUnit.scala
Scala
bsd-3-clause
549
// Test_2.scala trait Bar inline given derivedReducible(using scala.deriving.Mirror.SumOf[Qux[_]]): Bar = scala.compiletime.summonInline[Bar] ??? def test = derivedReducible // error
dotty-staging/dotty
tests/neg-macros/i13406/Test_2.scala
Scala
apache-2.0
189
/** * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ package scalding import org.scalatest._ import TestUtil._ class CountWordsSpec extends FunSpec { val testText = """Avantgarde Labs is a team of enthusiastic knowledge architects – |Our strength is the rapid integration and analysi...
avantgarde-labs/bdug-dd-scalding
src/test/scala/scalding/CountWordsSpec.scala
Scala
apache-2.0
2,399
/* * Copyright (c) 2014 Dufresne Management Consulting LLC. */ package com.nickelsoftware.bettercare4me.models import org.joda.time.DateTime import org.joda.time.Months import org.joda.time.Years import com.nickelsoftware.bettercare4me.utils.NickelException import com.nickelsoftware.bettercare4me.utils.Utils.add2Ma...
reactivecore01/bettercare4.me
play/app/com/nickelsoftware/bettercare4me/models/Patient.scala
Scala
apache-2.0
6,925
package com.faacets.yamlson import org.scalatest.{FunSuite, Matchers} /** * An opinionated stack of traits to improve consistency and reduce boilerplate. * Thanks typelevel/cats for the idea. */ trait YamlsonSuite extends FunSuite with Matchers
denisrosset/yamlson
src/test/scala/com.faacets.yamlson/YamlsonSuite.scala
Scala
mit
253
package com.twitter.finagle import com.twitter.finagle.Stack.Parameterized import com.twitter.finagle.service.ResponseClassificationSyntheticException package object buoyant { implicit class ParamsMaybeWith(val params: Stack.Params) extends AnyVal { def maybeWith[T: Stack.Param](p: Option[T]): Stack.Params = {...
linkerd/linkerd
finagle/buoyant/src/main/scala/com/twitter/finagle/buoyant/package.scala
Scala
apache-2.0
1,336
package fpinscala.laziness import Stream._ trait Stream[+A] { def foldRight[B](z: => B)(f: (A, => B) => B): B = // The arrow `=>` in front of the argument type `B` means that the function `f` takes its second argument by name and may choose not to evaluate it. this match { case Cons(h,t) => f(h(), t().fol...
lzongren/fpinscala
exercises/src/main/scala/fpinscala/laziness/Stream.scala
Scala
mit
5,555
package com.programmaticallyspeaking.ncd.nashorn.java9 import com.programmaticallyspeaking.ncd.host.SimpleValue import com.programmaticallyspeaking.ncd.nashorn.RealMarshallerTestFixture import org.scalatest.Inside class TemplateLiteralTest extends RealMarshallerTestFixture with RunningJava9 with Inside { "Marshalli...
provegard/ncdbg
src/test/scala/com/programmaticallyspeaking/ncd/nashorn/java9/TemplateLiteralTest.scala
Scala
bsd-3-clause
861
package is.hail.types.physical import is.hail.annotations.{Annotation, Region} import is.hail.types.physical.stypes.concrete.{SIndexablePointer, SIndexablePointerValue} import is.hail.types.physical.stypes.interfaces.SIndexableValue import is.hail.types.virtual.{TDict, Type} import org.apache.spark.sql.Row object PCa...
hail-is/hail
hail/src/main/scala/is/hail/types/physical/PCanonicalDict.scala
Scala
mit
2,745
package org.littlewings.javaee7.microprofile.service import javax.enterprise.context.ApplicationScoped @ApplicationScoped class CalcService { def add(a: Int, b: Int): Int = a + b }
kazuhira-r/javaee7-scala-examples
wildfly-swarm-mp-jaxrs-cdi/src/main/scala/org/littlewings/javaee7/microprofile/service/CalcService.scala
Scala
mit
185
/* * ContainerTest.scala * Container tests. * * Created By: Avi Pfeffer ([email protected]) * Creation Date: Nov 27, 2014 * * Copyright 2014 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email [email protected] for information. * * See http://www.github.com/p2t2/figaro for ...
jyuhuan/figaro
Figaro/src/test/scala/com/cra/figaro/test/library/collection/ContainerTest.scala
Scala
bsd-3-clause
12,596
package com.arcusys.learn.liferay import com.liferay.asset.kernel.exception.NoSuchVocabularyException import com.liferay.asset.kernel.model.{AssetEntry, BaseAssetRenderer, BaseAssetRendererFactory, _} import com.liferay.blogs.kernel.model.BlogsEntry import com.liferay.bookmarks.model.BookmarksEntry import com.liferay....
arcusys/Valamis
learn-liferay700-services/src/main/scala/com/arcusys/learn/liferay/LiferayClasses.scala
Scala
gpl-3.0
5,993
package org.atnos.eff.concurrent import scala.concurrent.duration.FiniteDuration /** * The design of the Scheduler is taken from: * https://github.com/functional-streams-for-scala/fs2/blob/series/1.0/core/jvm/src/main/scala/fs2/Scheduler.scala */ trait Scheduler { def schedule(timedout: =>Unit, duration: Finite...
etorreborre/eff
shared/src/main/scala/org/atnos/eff/concurrent/Scheduler.scala
Scala
mit
345
object Test { implicit class Foo(sc: StringContext) { object q { def apply(arg: Any*): Int = 3 } } def f = { val _parent = 3 q"val hello = $_parent" q"class $_" // error // error } // error }
som-snytt/dotty
tests/neg/i1779.scala
Scala
apache-2.0
227
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
manuzhang/incubator-gearpump
streaming/src/test/scala/org/apache/gearpump/streaming/dsl/window/impl/DefaultWindowRunnerSpec.scala
Scala
apache-2.0
2,512
package org.jetbrains.plugins.scala package lang package psi package impl package toplevel package imports import com.intellij.lang.ASTNode import com.intellij.openapi.progress.ProgressManager import com.intellij.openapi.util.Key import com.intellij.psi._ import com.intellij.psi.util.PsiTreeUtil import org.jetbrains.p...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/toplevel/imports/ScImportStmtImpl.scala
Scala
apache-2.0
15,102
object Foo { def foo(): Int = { val f: Int ?=> Int = (using x: Int) => 2 * x f(using 2) } val f = implicit (x: Int) => x ((using x: Int) => x): (Int ?=> Int) // error: no implicit argument found }
som-snytt/dotty
tests/neg/i2514a.scala
Scala
apache-2.0
216
/* * Copyright (C) 2010 Peter Lewerin * * The contents of this file are subject to the GNU General Public License * Version 3 (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.gnu.org/copyleft/gpl.html * * Software distribute...
richardfontana/fontana2007-t
KojoEnv/src/net/kogics/kojo/staging/staging.scala
Scala
gpl-3.0
21,679
/* * 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 ...
fredji97/samza
samza-yarn/src/main/scala/org/apache/samza/util/hadoop/HttpInputStream.scala
Scala
apache-2.0
1,443
/** * 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
workflowjson/src/test/scala/io/deepsense/models/json/StandardSpec.scala
Scala
apache-2.0
795
package core.api import com.lvxingpai.model.marketplace.misc.Coupon import com.lvxingpai.model.marketplace.order.{ Order, OrderActivity } import core.exception.ResourceNotFoundException import core.formatter.marketplace.order.OrderFormatter import core.payment.{ AlipayService, PaymentService, WeChatPaymentService } im...
Lvxingpai/Hanse
app/core/api/OrderAPI.scala
Scala
apache-2.0
7,989
/* * 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 ...
hwstreaming/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/logical/FlinkLogicalJoin.scala
Scala
apache-2.0
4,531
/* * 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 ...
Nullification/asterixdb-spark-connector
src/main/scala/org/apache/spark/sql/asterix/package.scala
Scala
apache-2.0
1,098
package org.jetbrains.plugins.scala package annotator package gutter import java.util import javax.swing.Icon import com.intellij.codeHighlighting.Pass import com.intellij.codeInsight.daemon.{DaemonCodeAnalyzerSettings, LineMarkerInfo, LineMarkerProvider} import com.intellij.openapi.application.ApplicationManager imp...
triplequote/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/annotator/gutter/ScalaLineMarkerProvider.scala
Scala
apache-2.0
11,591
/* ************************************************************************************* * Copyright 2013 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
Kegeruneku/rudder
rudder-core/src/main/scala/com/normation/rudder/api/ApiAccountRepository.scala
Scala
agpl-3.0
9,886
/* * 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 ...
HuaweiBigData/carbondata
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/partition/TestDDLForPartitionTable.scala
Scala
apache-2.0
18,832
/* * 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/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/InvokerSupervision.scala
Scala
apache-2.0
18,064
/* * Copyright 2009-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
akisaarinen/ccf
ccf/src/main/scala/ccf/session/Message.scala
Scala
apache-2.0
2,200
/* Deduction Tactics Copyright (C) 2012-2017 Raymond Dodge This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This progra...
rayrobdod/boardGame
Model/src/main/scala/Field.scala
Scala
gpl-3.0
12,169
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
slamdata/slamengine
frontend/src/main/scala/quasar/frontend/logicalplan/JoinDir.scala
Scala
apache-2.0
1,220
/* * 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 ...
bdrillard/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/binaryfile/BinaryFileFormatSuite.scala
Scala
apache-2.0
14,561
package com.kakao.mango import scala.language.implicitConversions /** enables the usage of JSON conversions by importing this package * * {{{ * import com.kakao.mango.json._ * * case class Example(hello: String) * * val obj = Example("world") * println(toJson(obj)) // prints {"hello":"world"...
kakao/mango
mango-core/src/main/scala/com/kakao/mango/json/package.scala
Scala
apache-2.0
550
package io.questions.model.questionnaire import io.questions.testdata.ExampleComponents import io.questions.model.questionnaire.Element.{ NonRepeatingParent, Primitive, RepeatingParent } import io.questions.model.questionnaire.FieldName.FieldNameStringSyntax import io.questions.model.questionnaire.NodeMetadata.{ PageT...
channingwalton/qanda
questionnaire/src/test/scala/io/questions/model/questionnaire/TestQuestionnaire.scala
Scala
mit
6,900
package io.github.mandar2812.dynaml.kernels import breeze.linalg._ import io.github.mandar2812.dynaml.algebra.{PartitionedMatrix, PartitionedPSDMatrix} import io.github.mandar2812.dynaml.utils import org.apache.log4j.Logger /** * Defines an abstract class outlines the basic * functionality requirements of an SVM Ke...
transcendent-ai-labs/DynaML
dynaml-core/src/main/scala/io/github/mandar2812/dynaml/kernels/SVMKernel.scala
Scala
apache-2.0
10,174
package postgresweb.css import japgolly.scalajs.react.vdom.TagMod import scalacss.Defaults._ import scalacss.ScalaCssReact._ /** * Created by andreaminetti on 22/02/16. */ object CommonStyles extends StyleSheet.Inline { import dsl._ val layout:TagMod = style(addClassNames("mdl-layout","mdl-js-layout","mdl-la...
minettiandrea/postgres-web
src/main/scala/postgresweb/css/CommonStyles.scala
Scala
apache-2.0
1,001
package com.twitter.util.security import com.twitter.logging.Logger import com.twitter.util.Try import com.twitter.util.security.X509CertificateFile._ import java.io.{ByteArrayInputStream, File} import java.security.cert.{CertificateFactory, X509Certificate} /** * A representation of an X.509 Certificate PEM-encoded...
BuoyantIO/twitter-util
util-security/src/main/scala/com/twitter/util/security/X509CertificateFile.scala
Scala
apache-2.0
1,701
package sri.mobile import scala.scalajs.js @js.native trait ViewPagerAndroidEvent extends js.Object { val position : Int = js.native val offset : Double = js.native } @js.native trait DrawerLayoutAndroidEvent extends js.Object @js.native trait WebViewEvent extends js.Object { } @js.native trait MapViewEven...
chandu0101/sri
mobile/src/main/scala/sri/mobile/ReactNativeEvents.scala
Scala
apache-2.0
341
package fr.laas.fape.anml.model import fr.laas.fape.anml.ANMLException import fr.laas.fape.anml.model.concrete.{InstanceRef, RefCounter} import fr.laas.fape.anml.parser.{PDisjunctiveType, PSimpleType, PType} import scala.collection.JavaConverters._ import scala.collection.mutable class InstanceManager(val refCounte...
athy/fape
anml-parser/src/main/scala/fr/laas/fape/anml/model/InstanceManager.scala
Scala
bsd-2-clause
6,365
/* * 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 ...
rednaxelafx/apache-spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/FileDataSourceV2.scala
Scala
apache-2.0
4,886
import java.io.{File, FileInputStream} import java.util.Properties import com.indvd00m.ascii.render.api.{ICanvas, IContextBuilder, IRender} import com.indvd00m.ascii.render.elements.{Label, Line, Rectangle} import com.indvd00m.ascii.render.{Point, Render} import com.typesafe.config.{Config, ConfigFactory, ConfigValueF...
amient/affinity
cli/src/main/scala/TimeLogTool.scala
Scala
apache-2.0
8,423