code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
package com.wavesplatform.mining.microblocks import cats.syntax.applicativeError._ import cats.syntax.bifunctor._ import cats.syntax.either._ import com.wavesplatform.account.KeyPair import com.wavesplatform.block.Block.BlockId import com.wavesplatform.block.{Block, MicroBlock} import com.wavesplatform.metrics._ impor...
wavesplatform/Waves
node/src/main/scala/com/wavesplatform/mining/microblocks/MicroBlockMinerImpl.scala
Scala
mit
7,312
package org.workcraft.plugins package stg21 import org.workcraft.util.Maybe import org.workcraft.dependencymanager.advanced.core.EvaluationContext import org.workcraft.dependencymanager.advanced.user.ModifiableExpressionBase import org.workcraft.dependencymanager.advanced.user.ModifiableExpression import java.awt.ge...
tuura/workcraft-2.2
STGPlugin21/src/main/scala/org/workcraft/plugins/stg21/stg.scala
Scala
gpl-3.0
6,902
package ghpages.examples import ghpages.GhPagesMacros import japgolly.scalajs.react.ReactComponentB import japgolly.scalajs.react.vdom.prefix_<^._ import ghpages.examples.util.SideBySide object HelloMessageExample { def content = SideBySide.Content(jsSource, source, main()) lazy val main = addIntro(HelloMessage...
vcarrera/scalajs-react
gh-pages/src/main/scala/ghpages/examples/HelloMessageExample.scala
Scala
apache-2.0
1,014
package org.jetbrains.plugins.scala.codeInspection.types import com.intellij.codeInspection.LocalInspectionTool import com.intellij.testFramework.EditorTestUtil import org.jetbrains.plugins.scala.codeInspection.{ScalaInspectionBundle, ScalaQuickFixTestBase} import org.jetbrains.plugins.scala.externalLibraries.kindProj...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/codeInspection/types/KindProjectorSimplifyTypeProjectionTest.scala
Scala
apache-2.0
5,217
package models import scalikejdbc._ import skinny.orm.{Alias, SkinnyCRUDMapperWithId} case class Train(id: Long, patternId: Long, trainClass: String, name: String) { def pattern()(implicit session: DBSession = AutoSession): Option[Pattern] = Pattern.findById(patternId) } object Train extends SkinnyCRUDMapperWithId...
ponkotuy/train-analyzer
app/models/Train.scala
Scala
apache-2.0
1,111
package com.harborx.api.system import com.harborx.api.{HxAppComponents, OneAppPerTestWithComponents} import org.scalamock.scalatest.MockFactory import org.scalatest._ import org.scalatestplus.play.{PlaySpec, _} import play.api.ApplicationLoader.Context import play.api.mvc._ import play.api.test.FakeRequest import play...
harborx/play-di-example
play-macwire/test/com/harborx/api/system/SystemSpec.scala
Scala
mit
1,303
package net.litola import java.io.File import org.scalatest.FunSpec class SassCompilerSpec extends FunSpec { describe("SassCompiler") { it("should compile well-formed scss file") { val scssFile = new File("src/test/resources/ok.scss") val (full, minified, deps) = SassCompiler.compile(scssFile, Nil...
arakcheev/play-sass
src/test/scala/net/litola/SassCompilerSpec.scala
Scala
mit
1,639
package com.chatwork.quiz.misc import org.scalatest.{ Matchers, FunSpec } import scala.math.Ordering.IntOrdering class BTreeSpec extends FunSpec with Matchers { describe("BTree#size") { it("should return the number of elements in the BTree") { BTree(Branch(Leaf(1), 2, Leaf(3))).size shouldBe 3 BTr...
kazzna/scala-quiz
src/test/scala/com/chatwork/quiz/misc/BTreeSpec.scala
Scala
mit
1,296
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
jinglining/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/codegen/calls/DateFormatCallGen.scala
Scala
apache-2.0
1,823
package com.datawizards.splot.charts import com.datawizards.splot.SPlotBaseTest import com.datawizards.splot.api.implicits._ import com.datawizards.splot.builders.PlotBuilder import com.datawizards.splot.model.PlotAxisValues.XAxisValueTypeString import com.datawizards.splot.model.PlotType import org.junit.runner.RunWi...
piotr-kalanski/SPlot
src/test/scala/com/datawizards/splot/charts/BarPlotTest.scala
Scala
apache-2.0
3,903
import scala.util.parsing.combinator.Parsers import scala.util.parsing.input.CharSequenceReader object IntParser extends Parsers { type Elem = Char def digit = elem("a digit (character between '0' and '9')", (c => c >= '0' && c <= '9')) ^^ (_ - '0') def digits = rep1(digit) ^^ (numbers => (0 /:...
grzegorzbalcerek/scala-book-examples
examples/IntParser.scala
Scala
mit
854
package controllers import javax.inject.Inject import com.mohiva.play.silhouette.api.Authenticator.Implicits._ 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.silhoue...
vetafi/vetafi-web
app/controllers/SignInController.scala
Scala
apache-2.0
3,948
package $organization$ import com.imageworks.migration._ class Migrate_$datetime$_$migration_name;format="Camel"$ extends Migration { def up() { } def down() { } }
akiomik/scala-migrations.g8
src/main/g8/src/main/scala/$organization__packaged$/Migrate_$datetime$_$migration_name__Camel$.scala
Scala
mit
178
package reactivemongo.api.bson /** * Implicit conversions for handler & values types * between `reactivemongo.bson` and `reactivemongo.api.bson` . * * {{{ * import reactivemongo.api.bson.compat._ * }}} * * For more specific imports, see [[ValueConverters]] * and [[HandlerConverters]] . */ package object comp...
ornicar/ReactiveMongo
bson-compat/src/main/scala/package.scala
Scala
apache-2.0
370
package tshrdlu.twitter /** * Copyright 2013 Jason Baldridge * * 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 require...
utcompling/tshrdlu
src/main/scala/tshrdlu/twitter/Stream.scala
Scala
apache-2.0
1,601
/* * @author Philip Stutz * @author Mihaela Verman * * Copyright 2013 University of Zurich * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apa...
jacqueslk/triplerush-filter
src/main/scala/com/signalcollect/triplerush/Dictionary.scala
Scala
apache-2.0
4,640
package org.jetbrains.plugins.scala package lang package psi package impl package expr import java.util import com.intellij.psi.impl.source.tree.LazyParseablePsiElement import com.intellij.psi.{PsiClass, PsiElement, PsiElementVisitor, PsiModifiableCodeBlock} import org.jetbrains.plugins.scala.lang.parser.ScalaElemen...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScBlockExprImpl.scala
Scala
apache-2.0
2,842
package hclu.hreg.common /** * This class wraps string, so when this value is serialized as json not as plain string * e.g. * {"value":"Some text"} not "Some text" */ case class StringJsonWrapper(value: String)
tsechov/hclu-registry
backend/src/main/scala/hclu/hreg/common/StringJsonWrapper.scala
Scala
apache-2.0
216
package com.landoop.streamreactor.connect.hive.sink import com.datamountaineer.streamreactor.common.utils.JarManifest import java.util import com.landoop.streamreactor.connect.hive.sink.config.HiveSinkConfigDef import org.apache.kafka.common.config.ConfigDef import org.apache.kafka.connect.connector.Task import org.a...
datamountaineer/stream-reactor
kafka-connect-hive/src/main/scala/com/landoop/streamreactor/connect/hive/sink/HiveSinkConnector.scala
Scala
apache-2.0
1,202
package fly.play.aws import org.specs2.mutable.Specification object AwsErrorSpec extends Specification { "AwsError" should { "create a correct error from XML" in { val xml = <ErrorResponse xmlns="https://sts.amazonaws.com/doc/2011-06-15/"> <Error> <Type>Sender</Type> ...
Rhinofly/play-s3
src/test/scala/fly/play/aws/AwsErrorSpec.scala
Scala
mit
1,404
package org.usagram.clarify.validator import org.usagram.clarify.Indefinite import org.usagram.clarify.error.RequireAtLeast class AtLeast[-V](limit: Int) extends Validator[Iterable[V]] { def validate(value: Iterable[V]) = failIf(value.size < limit) { RequireAtLeast(limit) } def characters: AtLeastC...
takkkun/clarify
core/src/main/scala/org/usagram/clarify/validator/AtLeast.scala
Scala
mit
625
package cromwell.util.docker import javax.xml.bind.DatatypeConverter import cromwell.core.ErrorOr import cromwell.util.TryUtil import wdl4s.values._ import scala.util.{Failure, Success, Try} import scalaz.Scalaz._ import scalaz.{Failure => FailureZ, Success => SuccessZ, _} case class DockerHash(hashType: String, ha...
cowmoo/cromwell
engine/src/main/scala/cromwell/util/docker/DockerHash.scala
Scala
bsd-3-clause
4,468
/* * Copyright 2014 Alan Rodas Bonjour * * 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 ...
alanrodas/scaland
cli/src/main/scala/com/alanrodas/scaland/cli/implicits.scala
Scala
apache-2.0
6,928
/** * 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 ap...
pfcoperez/spark-mongodb
spark-mongodb/src/main/scala/com/stratio/datasource/mongodb/rdd/MongodbRDDIterator.scala
Scala
apache-2.0
2,144
package com.twitter.finagle.stats import com.twitter.util.{Future, Await} import org.junit.runner.RunWith import org.scalatest.{Matchers, FunSuite} import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class BroadcastStatsReceiverTest extends FunSuite with Matchers { test("counter") { val re...
edombowsky/util
util-stats/src/test/scala/com/twitter/finagle/stats/BroadcastStatsReceiverTest.scala
Scala
apache-2.0
4,455
/* * 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 ...
gioenn/xSpark
external/kafka-0-8/src/main/scala/org/apache/spark/streaming/kafka/KafkaCluster.scala
Scala
apache-2.0
15,781
/** * Copyright (C) 2014 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...
brunobuzzi/orbeon-forms
form-runner/jvm/src/test/scala/org/orbeon/oxf/fr/ErrorSummaryTest.scala
Scala
lgpl-2.1
2,695
/* sbt -- Simple Build Tool * Copyright 2010 Mark Harrah */ package sbt package std import Types._ import Task._ import java.io.{BufferedInputStream, BufferedReader, File, InputStream} sealed trait MultiInTask[In <: HList] { def flatMap[T](f: In => Task[T]): Task[T] def flatMapR[T](f: Results[In] => Task[T]): ...
jamesward/xsbt
tasks/standard/TaskExtra.scala
Scala
bsd-3-clause
9,408
package scala.lms package common import java.io.PrintWriter import scala.lms.internal._ import scala.collection.mutable.Set import scala.reflect.SourceContext trait SetOps extends Base { object Set { def apply[A:Manifest](xs: Rep[A]*)(implicit pos: SourceContext) = set_new[A](xs) } implicit def repSetToSet...
scalan/virtualization-lms-core
src/common/SetOps.scala
Scala
bsd-3-clause
4,729
package akka import akka.actor.{Actor, ActorSystem, Props} /** * Created by Om Prakash C on 16-06-2017. */ object SimpleActorExample extends App { class SimpleActor extends Actor { def receive = { case s: String => println("String = " + s) case i: Int => println("Int = " + i) } } val sy...
comprakash/learning-scala
concurrency/src/main/scala/akka/SimpleActorExample.scala
Scala
gpl-3.0
479
package com.wavesplatform.transaction.smart.script import com.wavesplatform.lang.directives.Directive.extractValue import com.wavesplatform.lang.directives.DirectiveKey._ import com.wavesplatform.lang.directives._ import com.wavesplatform.lang.directives.values._ import com.wavesplatform.lang.script.v1.ExprScript impo...
wavesplatform/Waves
node/src/main/scala/com/wavesplatform/transaction/smart/script/ScriptCompiler.scala
Scala
mit
3,881
package com.twitter.finagle.netty3 import com.twitter.finagle.benchmark.StdBenchAnnotations import com.twitter.finagle.util.{BufWriter, BufReader} import com.twitter.io.{Buf, Charsets} import org.jboss.netty.buffer.{ChannelBuffer, ChannelBuffers} import org.openjdk.jmh.annotations._ import scala.collection.mutable.Arr...
sveinnfannar/finagle
finagle-benchmark/src/main/scala/com/twitter/finagle/netty3/BufCodecBenchmark.scala
Scala
apache-2.0
3,271
/* * Copyright 2015 Paul Horn * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
knutwalker/ff7-simulator
items/src/main/scala/ff7/monsters/ReflectUtil.scala
Scala
apache-2.0
1,752
package com.readclosely.model /* Copyright 2009-2010 Karl Pichotta 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...
kpich/readclosely
src/main/scala/com/readclosely/model/DeletedAnnotation.scala
Scala
apache-2.0
2,490
/** * * 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 ...
tveronezi/boxdata
src/main/scala/boxdata/ejb/SystemLoadEjb.scala
Scala
apache-2.0
2,255
/* * 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 required by applicable law or a...
ahudspith-equalexperts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v3/B860.scala
Scala
apache-2.0
1,189
package scala.pickling.runtime import org.scalatest.FunSuite import scala.pickling._, scala.pickling.Defaults._, json._ class Person(val name: String, val age: Int) class PersonRuntimeTest extends FunSuite { test("main") { val p: Any = new Person("joe", 23) // the following is invoking the macro to genera...
scala/pickling
core/src/test/scala/scala/pickling/runtime/PersonRuntimeTest.scala
Scala
bsd-3-clause
684
/*********************************************************************** * 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-convert/geomesa-convert-common/src/test/scala/org/locationtech/geomesa/convert2/metrics/ReporterFactoryTest.scala
Scala
apache-2.0
2,008
/* * 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 la...
hubertp/scalatest
src/main/scala/org/scalatest/DispatchReporter.scala
Scala
apache-2.0
10,230
/* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/vat-registration-frontend
test/controllers/ContactPreferenceControllerSpec.scala
Scala
apache-2.0
4,375
/* * Copyright 2013 Maurício Linhares * * Maurício Linhares licenses this file to you 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 ...
dripower/postgresql-async
postgresql-async/src/main/scala/com/github/mauricio/async/db/postgresql/parsers/BackendKeyDataParser.scala
Scala
apache-2.0
985
package core import org.scalatest.{FunSpec, Matchers} class UnionTypeSpec extends FunSpec with Matchers with helpers.ApiJsonHelpers { val baseJson = """ { "name": "Union Types Test", "unions": { "user": { %s "types": [ { "type": "%s", "description": "foobar" }, ...
gheine/apidoc
core/src/test/scala/core/UnionTypeSpec.scala
Scala
mit
11,704
package gapt.examples.tip.prod import gapt.expr._ import gapt.expr.ty.TBase import gapt.proofs.context.update.InductiveType import gapt.proofs.Sequent import gapt.proofs.gaptic._ import gapt.provers.viper.aip.AnalyticInductionProver object prop_20 extends TacticsProof { // Sorts ctx += TBase( "sk" ) // Induct...
gapt/gapt
examples/tip/prod/prop_20.scala
Scala
gpl-3.0
2,709
package com.coding42.gol import com.coding42.gol.GameOfLife.{LifeBoard, Pos} import scalafx.scene.canvas.Canvas import scalafx.scene.image.WritableImage import scalafx.scene.paint.Color /** * Handles zoom, drag and canvas updates */ case class CanvasPainter(canvas: Canvas, lifeBoardOp: Option[LifeBoard], zoom: I...
adrijardi/life
src/main/scala/com/coding42/gol/CanvasPainter.scala
Scala
mit
1,937
object Versions extends WebJarsVersions with ScalaJSVersions with SharedVersions { val scala = "2.11.6" val akkaHttp = "1.0-RC3" val ammonite = "0.3.0" } trait ScalaJSVersions { val threejsFacade = "0.0.71-0.1.5" val jqueryFacade = "0.6" val jsext = "0.5" val dom = "0.8.1" val codemirrorFacade = "5.3...
waman/threejs-facade
project/Versions.scala
Scala
mpl-2.0
778
// Copyright: 2010 - 2018 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.server import io.netty.channel.{ Channel, ChannelHandlerContext, SimpleChannelInboundHandler } import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolH...
yyadavalli/ensime-server
server/src/main/scala/org/ensime/server/WebSocketFrameHandler.scala
Scala
gpl-3.0
4,443
package net.orfjackal.dimdwarf.mq trait MessageSender[T] { def send(message: T) }
orfjackal/dimdwarf
dimdwarf-core/src/main/scala/net/orfjackal/dimdwarf/mq/MessageSender.scala
Scala
apache-2.0
85
package integrationtest import org.scalatra.test.scalatest._ import skinny._ import skinny.controller._ import skinny.test.SkinnyTestSupport class AssetsSpec extends ScalatraFlatSpec with SkinnyTestSupport { addFilter(AssetsController, "/*") it should "show react jsx template resources" in { get("/assets/js...
BlackPrincess/skinny-framework
example/src/test/scala/integrationtest/AssetsSpec.scala
Scala
mit
3,219
/*********************************************************************** * Copyright (c) 2013-2015 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 which * accompanies this distribution and is ...
lozpeng/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/iterators/TestData.scala
Scala
apache-2.0
20,424
package djinni import djinni.ast._ import djinni.generatorTools._ import djinni.meta._ class CppMarshal(spec: Spec) extends Marshal(spec) { override def typename(tm: MExpr): String = toCppType(tm, None) def typename(name: String, ty: TypeDef): String = ty match { case e: Enum => idCpp.enumType(name) case...
jrogers/djinni
src/source/CppMarshal.scala
Scala
apache-2.0
7,638
package org.jetbrains.plugins.scala.conversion.ast /** * Created by Kate Ustyuzhanina * on 10/22/15 */ case class ArrayAccess(expression: IntermediateNode, idxExpression: IntermediateNode) extends IntermediateNode case class ClassCast(operand: IntermediateNode, castType: IntermediateNode...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/conversion/ast/ExpressionsConstruction.scala
Scala
apache-2.0
3,688
/* * Copyright © 2015-2019 the contributors (see Contributors.md). * * This file is part of Knora. * * Knora 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 *...
musicEnfanthen/Knora
webapi/src/test/scala/org/knora/webapi/e2e/InstanceCheckerSpec.scala
Scala
agpl-3.0
32,684
package sharry.backend.mail import cats.effect._ import sharry.common._ import sharry.store._ import sharry.store.records.RAccount import emil.MailAddress import munit._ class QueriesTest extends FunSuite with StoreFixture { test("get email from account") { withStore { store => val accountId = Ident.un...
eikek/sharry
modules/backend/src/test/scala/sharry/backend/mail/QueriesTest.scala
Scala
gpl-3.0
837
package org.jetbrains.plugins.scala package lang package psi package api package toplevel package packaging import statements.ScDeclaredElementsHolder import base.ScStableCodeReferenceElement import api.toplevel._ trait ScPackaging extends ScToplevelElement with ScImportsHolder with ScPackageContainer with ScDeclare...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/psi/api/toplevel/packaging/ScPackaging.scala
Scala
apache-2.0
501
package nexus.diff import cats._ /** * Typeclass witnessing a structure `S[_]` can be unrolled under the computation box `F[_]`. * For example, a traced sequence `Traced[Seq[A]]` can be unrolled to `Seq[Traced[A]]`. * * This is a more specific abstraction than [[cats.Traverse]]. * @author Tongfei Chen */ trait ...
ctongfei/nexus
diff/src/main/scala/nexus/diff/Unroll.scala
Scala
mit
619
package com.mesosphere.universe.v3.model import com.mesosphere.cosmos.circe.Decoders._ import com.mesosphere.cosmos.circe.Encoders._ import io.circe.Decoder import io.circe.Encoder import io.circe.generic.semiauto.deriveDecoder import io.circe.generic.semiauto.deriveEncoder import java.nio.ByteBuffer /** * Conforms...
dcos/cosmos
cosmos-common/src/main/scala/com/mesosphere/universe/v3/model/Marathon.scala
Scala
apache-2.0
625
/* * 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 ...
houshengbo/openwhisk
tools/admin/src/main/scala/org/apache/openwhisk/core/database/LimitsCommand.scala
Scala
apache-2.0
8,207
package sangria import sangria.validation._ package object schema { val IntType = ScalarType[Int]("Int", description = Some("32-bit integer value"), coerceOutput = ast.IntValue(_), coerceUserInput = { case i: Int => Right(i) case i: Long if i.isValidInt => Right(i.toInt) case i: BigInt...
narahari92/sangria
src/main/scala/sangria/schema/package.scala
Scala
apache-2.0
5,984
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
practice-vishnoi/dev-spark-1
streaming/src/main/scala/org/apache/spark/streaming/scheduler/ReceiverInfo.scala
Scala
apache-2.0
1,236
package com.arcusys.learn.liferay.services import com.arcusys.learn.liferay.LiferayClasses.{LDynamicQuery, LRatingsEntry} import com.liferay.portal.kernel.service.ServiceContextThreadLocal import com.liferay.ratings.kernel.service.RatingsEntryLocalServiceUtil import scala.collection.JavaConverters._ object RatingsEn...
arcusys/Valamis
learn-liferay700-services/src/main/scala/com/arcusys/learn/liferay/services/RatingsEntryLocalServiceHelper.scala
Scala
gpl-3.0
2,152
package mesosphere.marathon package api object MarathonMediaType { /** * JSON media type plus a weight which prefers this media type over alternatives if there are multiple * matches and no other has a qs value of >= 2. * * Related issue: https://github.com/mesosphere/marathon/issues/1647 * *...
guenter/marathon
src/main/scala/mesosphere/marathon/api/MarathonMediaType.scala
Scala
apache-2.0
616
package com.salcedo.rapbot.sense import akka.actor.{Actor, ActorLogging, Props} import akka.dispatch.Futures import com.salcedo.rapbot.sense.SenseActor._ import com.salcedo.rapbot.snapshot.RemoteSnapshot import com.salcedo.rapbot.snapshot.SnapshotActor.TakeSubSystemSnapshot import scala.concurrent.Future object Sens...
misalcedo/RapBot
Hub/src/main/scala/com/salcedo/rapbot/sense/SenseActor.scala
Scala
mit
2,014
/* * 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 ...
jkbradley/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/SQLExecutionSuite.scala
Scala
apache-2.0
4,033
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/amls-frontend
test/controllers/businessmatching/updateservice/ChangeSubSectorHelperSpec.scala
Scala
apache-2.0
19,481
package models import java.util.UUID import org.joda.time.{LocalDate, LocalTime} import play.api.libs.functional.syntax._ import play.api.libs.json._ import utils.Ops.JsPathX import utils.date.DateTimeJsonFormatter._ sealed trait ScheduleEntryLike extends UniqueEntity { def labworkId: UUID def start: LocalTime ...
THK-ADV/lwm-reloaded
app/models/ScheduleEntry.scala
Scala
mit
2,330
package org.ocular.utils import android.util.Log trait Logger { def log(string: String) = if (Logger.enabled) Log.d("OCULAR", string) } object Logger { val enabled = false }
dant3/ocular
core/src/main/scala/org/ocular/utils/Logger.scala
Scala
apache-2.0
181
package sampler.abc.actor.root.state.task.egen import sampler.abc.UUID import scala.collection.immutable.Queue class ObservedIdsTrimmer(maxParticleMemory: Int) { def apply(queuedIds: Queue[UUID]) = { val queueSize = queuedIds.size if (queueSize >= maxParticleMemory) { val reducedNum: Int = (maxParti...
tearne/Sampler
sampler-abc/src/main/scala/sampler/abc/actor/root/state/task/egen/ObservedIdsTrimmer.scala
Scala
apache-2.0
444
package filodb.core.store import scala.concurrent.{Await, ExecutionContext, Future} import scala.concurrent.duration._ import scala.util.Try import filodb.core.metadata.RichProjection import filodb.core.Types._ case class Histogram(min: Int, max: Int, sum: Int, numElems: Int, buckets: Map[Int, Int]) { /** Adds an ...
adeandrade/FiloDB
core/src/main/scala/filodb.core/store/Analyzer.scala
Scala
apache-2.0
4,263
import java.text.DecimalFormat package object viewsupport { val level = new DecimalFormat("#.##") }
kristiankime/web-education-games
app/viewsupport/package.scala
Scala
mit
103
/* * 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 ...
nchammas/spark
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQuerySuite.scala
Scala
apache-2.0
50,892
// // author: Cosmin Basca // // Copyright 2010 University of Zurich // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless r...
cosminbasca/sparqlclient
src/main/scala/com/sparqlclient/HttpException.scala
Scala
apache-2.0
1,339
package db import java.io.File import scala.collection.JavaConverters._ import org.biojava3.core.sequence.{DNASequence, ProteinSequence} import org.biojava3.core.sequence.io.FastaReaderHelper import scala.slick.driver.JdbcProfile /** * Created by preecha on 10/10/14 AD. */ class DAL(val driver:JdbcProfile) extend...
yumyai/fasta-search
src/main/scala/db/DAL.scala
Scala
apache-2.0
2,129
def unit[A]: A => Unit = _ => ()
hmemcpy/milewski-ctfp-pdf
src/content/1.5/code/scala/snippet02.scala
Scala
gpl-3.0
32
/* * Copyright 2014-2022 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...
Netflix/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/util/IntHashSetSuite.scala
Scala
apache-2.0
3,557
import javax.jcr.{Node, PropertyType, Value} import net.devkat.ocm.OcmException import java.util.Calendar import org.apache.commons.io.IOUtils import scala.reflect.runtime.universe._ sealed trait JcrValue { def jcrValue: Value } abstract class AbstractJcrValue[T](value: Value, v: T) extends JcrValue { def jcrValu...
devkat/scala-ocm
common/src/main/scala/net/devkat/ocm/JcrValue.scala
Scala
apache-2.0
6,228
package org.jetbrains.plugins.scala.lang.typeInference import org.jetbrains.plugins.scala.base.ScalaLightCodeInsightFixtureTestAdapter /** * @author anton.yalyshev * @since 07.09.18. */ class ApplyConformanceTest extends ScalaLightCodeInsightFixtureTestAdapter { def testSCL13654(): Unit = { checkTextHasN...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/typeInference/ApplyConformanceTest.scala
Scala
apache-2.0
917
/* * Copyright (c) 2014-2016 * nonblocking.at gmbh [http://www.nonblocking.at] * * This file is part of Cliwix. * * Cliwix is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the...
nonblocking/cliwix
cliwix-core-handlers-6-2/src/main/scala/at/nonblocking/cliwix/core/liferay62/util/TrashFilter62.scala
Scala
agpl-3.0
1,239
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
CiscoCloud/exhibitor-mesos-framework
src/main/scala/ly/stealth/mesos/exhibitor/Cli.scala
Scala
apache-2.0
24,796
/* * 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.jdk import java...
lrytz/scala
src/library/scala/jdk/OptionShape.scala
Scala
apache-2.0
2,654
// timber -- Copyright 2012-2021 -- Justin Patterson // // 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...
scalawag/timber
timber-backend/src/main/scala/org/scalawag/timber/backend/dispatcher/configuration/dsl/Condition.scala
Scala
apache-2.0
3,338
package services.alertwatcherxr import javax.inject._ import scala.concurrent.Future import utils.Awaits import models.alertwatcherxr.Alert import dao.alertwatcherxr.AlertWatcherXRDao import dao.alertwatcherxr.IAlertWatcherXRDao import org.joda.time.DateTime import org.joda.time.LocalDate import java.sql.Timestamp imp...
tnddn/iv-web
portal/rest-portal/app/services/alertwatcherxr/AlertWatcherXRService.scala
Scala
apache-2.0
2,272
package routes import java.util.concurrent.TimeUnit import akka.actor.ActorRef import akka.pattern._ import akka.util.Timeout import spray.http.HttpHeaders.`Content-Type` import spray.http.MediaTypes._ import spray.httpx.marshalling._ import spray.json._ import spray.json.DefaultJsonProtocol._ import spray.routing._ ...
raymondpoling/CatsOfUlthar
src/main/scala/routes/CatListRoute.scala
Scala
apache-2.0
1,092
/* * 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-google-cloud-platform/src/it/scala/com/spotify/scio/bigtable/BigtableIT.scala
Scala
apache-2.0
6,136
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
jinglining/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/batch/BatchExecLimit.scala
Scala
apache-2.0
4,270
package org.zouzias.spray.actors import akka.actor.{ActorRefFactory, ActorLogging} import org.zouzias.spray.httpservices.{UserHttpService} import spray.routing.HttpServiceActor class UserActor extends HttpServiceActor with ActorLogging{ lazy val service = new UserHttpService { override implicit def actorRefFa...
zouzias/spray-swagger-template
src/main/scala/org/zouzias/spray/actors/UserActor.scala
Scala
apache-2.0
400
package com.example.http4s package blaze import cats.effect._ import com.example.http4s.ssl.SslExample import org.http4s.server.blaze.BlazeBuilder object BlazeHttp2Example extends SslExample[IO] { def builder: BlazeBuilder[IO] = BlazeBuilder[IO].enableHttp2(true) }
reactormonk/http4s
examples/blaze/src/main/scala/com/example/http4s/blaze/BlazeHttp2Example.scala
Scala
apache-2.0
270
/* * The MIT License * * Copyright (c) 2016 Fulcrum Genomics LLC * * 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 us...
fulcrumgenomics/fgbio
src/main/scala/com/fulcrumgenomics/personal/nhomer/SplitTag.scala
Scala
mit
3,040
package io.github.shogowada.scala.jsonrpc.example.e2e.websocket object ElementIds { val Ready = "ready" val NewTodoDescription = "new-todo-description" val AddTodo = "add-todo" }
shogowada/scala-json-rpc
examples/e2e-web-socket/shared/src/main/scala/io/github/shogowada/scala/jsonrpc/example/e2e/websocket/ElementIds.scala
Scala
mit
186
package org.mitre.mandolin /** * This package includes functionality for model selection. */ package object mselect { }
project-mandolin/mandolin
mandolin-core/src/main/scala/org/mitre/mandolin/mselect/package.scala
Scala
apache-2.0
123
// Solution-4a.scala // Solution to Exercise 4 in "Imports & Packages" // Solution 1: import 1 class import com.atomicscala.trivia.Literature val lit = new Literature println("Imported 1 class") /* OUTPUT_SHOULD_BE Imported 1 class */
P7h/ScalaPlayground
Atomic Scala/atomic-scala-solutions/14_ImportsAndPackages-2ndEdition/Solution-4a.scala
Scala
apache-2.0
238
package play.api.templates import play.api.mvc._ import play.templates._ import play.api.http.MimeTypes import org.apache.commons.lang3.StringEscapeUtils /** * Appendable content using a StringBuilder. * @param buffer StringBuilder to use * @tparam A self-type */ abstract class BufferedContent[A <: BufferedConten...
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/play/src/main/scala/play/api/templates/Templates.scala
Scala
mit
4,805
package fs2 import scala.reflect.ClassTag import org.scalacheck.Arbitrary import org.scalatest.Matchers import org.scalatest.prop.GeneratorDrivenPropertyChecks import TestUtil._ object ChunkProps extends Matchers with GeneratorDrivenPropertyChecks { def propSize[A: Arbitrary, C <: Chunk[A]: Arbitrary] = ...
zaneli/fs2
core/shared/src/test/scala/fs2/ChunkProps.scala
Scala
mit
1,208
package net.gree.aurora.scala.domain.clustergroup import net.gree.aurora.domain.clustergroup.{ClusterGroupId => JClusterGroupId} private[domain] class ClusterGroupIdImpl(val underlying: JClusterGroupId) extends ClusterGroupId { def value: String = underlying.getValue }
gree/aurora
aurora-scala/src/main/scala/net/gree/aurora/scala/domain/clustergroup/ClusterGroupIdImpl.scala
Scala
mit
276
package com.codeaspect.tern.fw class ConvertableTest { }
urvaksh/tern
src/test/scala/com/codeaspect/tern/fw/ConvertableTest.scala
Scala
lgpl-3.0
58
package com.codahale.jersey.inject import javax.ws.rs.core.MultivaluedMap import com.sun.jersey.server.impl.model.parameter.multivalued.MultivaluedParameterExtractor /** * Given a parameter name and a possibly-null default value, attempts to extract * the first parameter values and return a Some instance, returning...
codahale/jersey-scala
src/main/scala/com/codahale/jersey/inject/ScalaOptionStringExtractor.scala
Scala
mit
794
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
bowenli86/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/GeneratedExpression.scala
Scala
apache-2.0
3,825
package com.jaroop.anorm import anorm._ package object relational { /** Implicitly convert `SimpleSql[T]` to `RelationalSQL[T]` for almost seemless integration * @param sql * @return A `RelationalSQL` wrapper of `SimpleSql` */ implicit def simple2Relational[T](sql: SimpleSql[T]): RelationalSQL[T] = RelationalS...
mhzajac/anorm-relational
src/main/scala/com/jaroop/anorm/relational/relational.scala
Scala
apache-2.0
585
package lv.ddgatve.math import scala.collection.mutable.MutableList object OutlineParser { // Parse the <part> element - return list of contained chunks def makePart(arg: scala.xml.Node): List[Chunk] = { val result = (arg \\\\ "item") map ( itemNode => makeItem(itemNode)) result.toList ...
kapsitis/ddgatve-stat
src/main/scala/lv/ddgatve/math/OutlineParser.scala
Scala
apache-2.0
2,815
/* * Copyright 2013 Akiyoshi Sugiki, University of Tsukuba * * 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 a...
axi-sugiki/kumoi
src/kumoi/shell/event/FailureObliviousEvent.scala
Scala
apache-2.0
1,004
package recfun import scala.annotation.tailrec object Main extends App { override def main(args: Array[String]) { println("Pascal's Triangle") for (row <- 0 to 10) { for (col <- 0 to row) print(pascal(col, row) + " ") println() } } /** * Exercise 1 */ def pascal: Partial...
faloi/progfun-scala
recfun/src/main/scala/recfun/Main.scala
Scala
mit
1,387