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.ponkotuy.intercept import com.netaporter.uri.Uri import org.jboss.netty.handler.codec.http.{HttpResponse, HttpRequest} /** * * @author ponkotuy * Date: 14/02/18. */ trait Intercepter { def input(req: HttpRequest, res: HttpResponse, uri: Uri): Unit }
nekoworkshop/MyFleetGirls
client/src/main/scala/com/ponkotuy/intercept/Intercepter.scala
Scala
mit
270
package io.buoyant.namerd.storage.etcd import com.twitter.finagle.Path import io.buoyant.config.Parser import io.buoyant.config.types.Port import io.buoyant.namerd.DtabStoreConfig import org.scalatest.{FunSuite, OptionValues} class EtcdConfigTest extends FunSuite with OptionValues { test("sanity") { val store =...
hhtpcd/linkerd
namerd/storage/etcd/src/test/scala/io/buoyant/namerd/storage/etcd/EtcdConfigTest.scala
Scala
apache-2.0
904
package io.fintrospect.formats import org.scalatest.{FunSpec, Matchers} class MsgPackMsgTest extends FunSpec with Matchers { describe("MsgPackMsg") { it("can round trip to bytes and back again") { val letter = Letter(StreetAddress("bob"), StreetAddress("jim"), "rita") MsgPackMsg(letter).as[Letter] ...
daviddenton/fintrospect
msgpack/src/test/scala/io/fintrospect/formats/MsgPackMsgTest.scala
Scala
apache-2.0
349
package com.geishatokyo.diffsql.ast import com.geishatokyo.diffsql.Name import scala.language.implicitConversions /** * Created by takeshita on 14/02/14. */ case class DataType(name : Name, args : List[Int] = Nil){ def length : Int = args.head def precision : Tuple2[Int,Int] = args(0) -> args(1) def ===(d...
geishatokyo/diff-sql-table
parser/src/main/scala/com/geishatokyo/diffsql/ast/DataTypes.scala
Scala
mit
1,629
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package scalaguide.http.scalabodyparsers { import akka.stream.ActorMaterializer import play.api.http.Writeable import play.api.libs.json.{Json, JsValue} import play.api.mvc._ import play.api.test._ import play.api.test.Helpers._ import org.sp...
aradchykov/playframework
documentation/manual/working/scalaGuide/main/http/code/ScalaBodyParsers.scala
Scala
apache-2.0
7,096
package org.veripacks.reader.dependencies import org.objectweb.asm.{Opcodes, ClassVisitor} class SourceFileNameVisitor extends ClassVisitor(Opcodes.ASM5) { var sourceFileName: String = _ override def visitSource(source: String, debug: String) { sourceFileName = source } }
adamw/veripacks
verifier/src/main/scala/org/veripacks/reader/dependencies/SourceFileNameVisitor.scala
Scala
apache-2.0
286
/* * Copyright (C) 2007-2008 Artima, Inc. 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/LICENSE-2.0 * * Unless requir...
peachyy/scalastu
stateful-objects/Simulator2.scala
Scala
apache-2.0
4,394
package fr.univ_lille.cristal.emeraude.chasqui.core.synchronization import akka.actor.{Actor, ActorRef, ActorSystem, ExtendedActorSystem, Extension, ExtensionId, ExtensionIdProvider, Props} import akka.pattern.ask import akka.util.Timeout import fr.univ_lille.cristal.emeraude.chasqui.core.Node._ import fr.univ_lille.c...
guillep/chasqui
src/main/scala/fr/univ_lille/cristal/emeraude/chasqui/core/synchronization/GlobalSynchronizerWithLocalQueueStrategy.scala
Scala
mit
7,769
package pl.touk.nussknacker.ui.security.oauth2 import cats.data.NonEmptyList.one import com.typesafe.scalalogging.LazyLogging import io.circe.Decoder import io.circe.generic.extras.{Configuration, ConfiguredJsonCodec, JsonKey} import pl.touk.nussknacker.ui.security.oauth2.OAuth2ErrorHandler.{OAuth2AccessTokenRejection...
TouK/nussknacker
security/src/main/scala/pl/touk/nussknacker/ui/security/oauth2/BaseOAuth2Service.scala
Scala
apache-2.0
3,329
/* * 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
mllib/src/test/scala/org/apache/spark/ml/util/MLTestingUtils.scala
Scala
apache-2.0
11,403
/* * Shadowsocks - A shadowsocks client for Android * Copyright (C) 2014 <max.c.lv@gmail.com> * * 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 y...
alexliao/reshadow
src/main/scala/com/github/shadowsocks/ShadowsocksApplication.scala
Scala
gpl-3.0
3,403
/* * 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
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/NullExpressionsSuite.scala
Scala
apache-2.0
7,564
/*********************************************************************** * 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-utils/src/main/scala/org/locationtech/geomesa/utils/stats/CountingInputStream.scala
Scala
apache-2.0
2,230
/** * 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...
cvcal/kafka-manager
app/kafka/manager/utils/zero81/ReassignPartitionCommand.scala
Scala
apache-2.0
8,918
package controllers import play.api.mvc._ class Application extends Controller { def index: Action[AnyContent] = Action { Ok("Application started.") } }
SBP07/backend
app/controllers/Application.scala
Scala
gpl-2.0
165
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2015, G...
garyKeorkunian/squants
shared/src/main/scala/squants/thermal/Temperature.scala
Scala
apache-2.0
13,103
package com.emajliramokade package services package interfaces import api.model.EmailProvjera.Odgovor import email.Email import scala.concurrent.Future trait EmailSender { def send(email: Email): Future[Odgovor] }
element-doo/ekade
code/scala/Services/src/main/scala/com/emajliramokade/services/interfaces/EmailSender.scala
Scala
bsd-3-clause
219
case class B(var x: Int) { def succ(): Unit = { x = x + 1 } } object Test { def main(args: Array[String]): Unit = { val b = B(0) b match { case B(x) => //println(x) b.succ() println(x) } } }
yusuke2255/dotty
tests/run/t5158.scala
Scala
bsd-3-clause
246
package gitbucket.core.view import java.text.Normalizer import java.util.regex.Pattern import java.util.Locale import gitbucket.core.controller.Context import gitbucket.core.service.{RepositoryService, RequestCache} import gitbucket.core.util.StringUtil import io.github.gitbucket.markedj._ import io.github.gitbucket....
uli-heller/gitbucket
src/main/scala/gitbucket/core/view/Markdown.scala
Scala
apache-2.0
7,218
import scala.quoted.* object SourceFiles { type Macro[X] = (=> Quotes) ?=> Expr[X] implicit inline def getThisFile: String = ${getThisFileImpl} def getThisFileImpl: Macro[String] = val q = quotes // Quotes is ByName and hence not stable (q stabilizes it) Expr(q.reflect.SourceFile.current.name) }
dotty-staging/dotty
tests/run-macros/tasty-getfile-implicit-by-name-fun-context/Macro_1.scala
Scala
apache-2.0
320
package is.hail.expr.ir.analyses import is.hail.HailContext import is.hail.expr.ir._ object ComputeMethodSplits { def apply(ir: IR, controlFlowPreventsSplit: Memo[Unit]): Memo[Unit] = { val m = Memo.empty[Unit] val splitThreshold = HailContext.getFlag("method_split_ir_limit").toInt require(splitThresho...
hail-is/hail
hail/src/main/scala/is/hail/expr/ir/analyses/ComputeMethodSplits.scala
Scala
mit
1,283
package sample import language._ import scala.concurrent.duration._ import scala.collection.mutable.ListBuffer import akka.actor._ import akka.cluster._ import akka.cluster.ClusterEvent._ import akka.pattern._ import akka.util._ import akka.event._ import akka.event.Logging._ import akka.io._ import com.typesafe.confi...
ograycode/akka-console
src/main/scala/Sample.scala
Scala
apache-2.0
4,132
package reopp.common.guardedcommands.dataconnectors import reopp.common.{Predicate, Utils} import Utils._ import reopp.common.guardedcommands._ import reopp.common.IntPredicate /** * Creates a Filter: a lossy sync that loses data exactly when a predicate does not hold. * * Created by jose on 07/06/12. */ class G...
joseproenca/ip-constraints
code/src/main/scala/reopp/common/guardedcommands/dataconnectors/GCFilter.scala
Scala
mit
2,137
package org.elasticsearch.spark.sql import scala.collection.Map import org.apache.commons.logging.Log import org.apache.commons.logging.LogFactory import org.apache.spark.Partition import org.apache.spark.SparkContext import org.apache.spark.TaskContext import org.apache.spark.sql.api.java.Row import org.elasticsearc...
huangll/elasticsearch-hadoop
spark/sql-12/src/main/scala/org/elasticsearch/spark/sql/JavaEsRowRDD.scala
Scala
apache-2.0
1,805
package com.tajpure.scheme.compiler.value import com.tajpure.scheme.compiler.ast.Node import com.tajpure.scheme.compiler.exception.RunTimeException class IntValue(val value: Long) extends Value { override def +(that: Value): Value = { if (that.isInstanceOf[IntValue]) { new IntValue(value + that.asIns...
tajpure/SoScheme
src/main/scala/com/tajpure/scheme/compiler/value/IntValue.scala
Scala
gpl-3.0
4,244
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
GJL/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/utils/InMemoryTableFactory.scala
Scala
apache-2.0
5,862
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/library/scala/collection/TraversableLike.scala
Scala
bsd-3-clause
28,643
package org.dsa.test /** * Created by xubo on 2016/11/18. */ object test1118 { def main(args: Array[String]) { println('a'.toInt) println('A'.toInt) println() } def compute(a: Int, b: Int) { // (a > b) ? a: b } }
xubo245/CloudSW
src/test/scala/org/dsa/test/test1118.scala
Scala
gpl-2.0
246
package org.aja.tej.examples.sparksql.sql import org.aja.tej.utils.TejUtils import org.apache.spark.sql._ import org.apache.spark.sql.expressions.{MutableAggregationBuffer, UserDefinedAggregateFunction} import org.apache.spark.sql.types._ import org.apache.spark.{SparkConf, SparkContext} /* An UDAF inherits the base ...
Mageswaran1989/aja
src/examples/scala/org/aja/tej/examples/sparksql/sql/UDAF.scala
Scala
apache-2.0
4,184
/* * This software is licensed under the GNU Affero General Public License, quoted below. * * This file is a part of PowerAPI. * * Copyright (C) 2011-2016 Inria, University of Lille 1. * * PowerAPI is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public Lice...
Spirals-Team/powerapi
powerapi-core/src/main/scala/org/powerapi/core/power/package.scala
Scala
agpl-3.0
2,514
package scawler import akka.actor.{ActorRef, ActorSystem} import akka.util.Timeout import scala.concurrent.Future import scala.io.Source /** A companion object to provide constants and/or factory methods for the DSL. */ private[scawler] object WebCrawlerDSL { val HttpPrefix = "http" } /** Provides an easy-to-use ...
scawler/scawler-core
src/main/scala/scawler/WebCrawlerDSL.scala
Scala
apache-2.0
1,198
package com.github.mdr.mash.integration import com.github.mdr.mash.os.MockFileObject._ import com.github.mdr.mash.os.MockFileSystem import com.github.mdr.mash.repl.LineBufferTestHelper._ import com.github.mdr.mash.repl.completions.IncrementalCompletionState import com.github.mdr.mash.utils.Region class IncrementalCom...
mdr/mash
src/test/scala/com/github/mdr/mash/integration/IncrementalCompletionIntegrationTest.scala
Scala
mit
5,011
/** * 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 * distributed ...
ksmpartners/ernie
ernie-engine/src/main/scala/com/ksmpartners/ernie/engine/report/Definition.scala
Scala
apache-2.0
2,275
package com.amazon.datagen.api.rof import com.amazon.mqa.datagen.supplier.{AlphanumericStringSupplier, MinMaxIntegerSupplier} /** * Created by chengpan on 4/20/15. */ object ObjectFactoryTest { def main(args: Array[String]) { val factory = ReflectionObjectFactory( ReflectionObjectFactory.fromSupplier(n...
leakingtapan/rof-scala
src/test/scala/com/amazon/datagen/api/rof/ObjectFactoryTest.scala
Scala
apache-2.0
643
package com.eevolution.context.dictionary.infrastructure.service import java.util.UUID import akka.NotUsed import com.eevolution.context.dictionary.domain._ import com.eevolution.context.dictionary.domain.model.WorkflowNodeTrl import com.eevolution.utils.PaginatedSequence import com.lightbend.lagom.scaladsl.api.{Serv...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/service/WorkflowNodeTrlService.scala
Scala
gpl-3.0
2,096
package nexus.diff.syntax import nexus.diff._ /** * @author Tongfei Chen */ trait TupleExprOpsMixin { implicit class Tuple2ExprOps[F[_], X1, X2](val p: (F[X1], F[X2]))(implicit F: Algebra[F]) { def |>[Y] (f: Func2[X1, X2, Y]): F[Y] = f(p._1, p._2) def |>[Y] (f: PolyFunc2) (implicit ff...
ctongfei/nexus
diff/src/main/scala/nexus/diff/syntax/TupleExprOps.scala
Scala
mit
671
package org.scalarules.finance.nl import org.scalatest.{FlatSpec, Matchers} class PerTest extends FlatSpec with Matchers { it should "do arithmetic when Termijn is not specified" in { val a: Bedrag Per Termijn = 10.euro per Maand val b: Bedrag Per Termijn = 2.euro per Maand a + b should be(12.euro per ...
scala-rules/finance-dsl
src/test/scala/org/scalarules/finance/nl/PerTests.scala
Scala
mit
8,284
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Panos-Bletsos/spark-cost-model-optimizer
core/src/test/scala/org/apache/spark/metrics/InputOutputMetricsSuite.scala
Scala
apache-2.0
14,397
/* * 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
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVInferSchema.scala
Scala
apache-2.0
7,905
package util import org.scalajs.dom import util.logger.log import scala.concurrent.{ExecutionContext, Future, Promise} import scala.util.control.NonFatal object FutureUtils { type LazyFuture[T] = () => Future[T] // Execute a list of LazyFutures, continuing and ignoring if there is any error. def sequenceWith...
felixgborrego/simple-docker-ui
src/main/scala/util/FutureUtils.scala
Scala
mit
1,351
/** * 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...
ollie314/kafka
core/src/main/scala/kafka/security/auth/PermissionType.scala
Scala
apache-2.0
1,708
/* * 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 ...
StephanEwen/incubator-flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/batch/BatchPhysicalOverAggregate.scala
Scala
apache-2.0
2,720
/* * Copyright (c) 2012-2019 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
RetentionGrid/snowplow
3-enrich/scala-common-enrich/src/test/scala/com.snowplowanalytics.snowplow.enrich.common/enrichments/registry/CampaignAttributionEnrichmentSpec.scala
Scala
apache-2.0
5,287
/* * 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 ...
outbrain/postgresql-async
mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/encoder/auth/AuthenticationMethod.scala
Scala
apache-2.0
1,111
package org.jetbrains.sbt package project.structure import com.intellij.execution.process.{ProcessAdapter, ProcessEvent, ProcessOutputTypes} import com.intellij.openapi.util.Key /** * @author Pavel Fatin */ class ListenerAdapter(listener: (OutputType, String) => Unit) extends ProcessAdapter { override def onTextA...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/sbt/project/structure/ListenerAdapter.scala
Scala
apache-2.0
748
package debop4s.data.orm.jpa.spring import java.util.Properties import javax.sql.DataSource import debop4s.data.orm.DataConst._ import org.hibernate.cfg.AvailableSettings /** * JPA 에서 PostgreSql 을 사용하기 위한 환경설정 * Created by debop on 2014. 1. 29.. */ abstract class AbstractJpaPostgreSqlConfiguration extends Abstrac...
debop/debop4s
debop4s-data-orm/src/main/scala/debop4s/data/orm/jpa/spring/AbstractJpaPostgreSqlConfiguration.scala
Scala
apache-2.0
718
package cz.kamenitxan.jakon.core.deploy.entity import java.time.LocalDateTime class Server( val id: Int, val url: String, val path: String, var lastDeployed: LocalDateTime ) { override def toString = s"Server(id=$id, url=$url, path=$path, lastDeployed=$l...
kamenitxan/Jakon
modules/backend/src/main/scala/cz/kamenitxan/jakon/core/deploy/entity/Server.scala
Scala
bsd-3-clause
336
package uk.gov.digital.ho.proving.financialstatus.domain import java.time.{Clock, LocalDate, Period} object LeaveToRemainCalculator { private val ONE_YEAR = 1 private val SIX_MONTHS = 6 private def calcWrapUpPeriod(coursePeriod: Period, preSessional: Boolean) = { if (coursePeriod.getYears >= ONE_YEAR) Per...
UKHomeOffice/pttg-fs-api
src/main/scala/uk/gov/digital/ho/proving/financialstatus/domain/LeaveToRemainCalculator.scala
Scala
mit
2,908
package colossus.protocols.memcache import org.scalatest._ import akka.util.ByteString import colossus.protocols.memcache.MemcacheCommand._ class MemcacheCommandSuite extends FlatSpec with Matchers { "MemcacheCommand" should "format a GET correctly" in { val experimental = Get(ByteString("test")) experiment...
tumblr/colossus
colossus-tests/src/test/scala/colossus/protocols/memcache/MemcacheCommandSpec.scala
Scala
apache-2.0
3,457
package sativum import org.joda.time.LocalDate import peapod.Task /* * This is a Task that is run on a daily basis or which can be tied to a date */ trait DatedTask extends Task[Any] { val partition: LocalDate override lazy val name: String = baseName+ "/" + partition.toString() override lazy val versionNam...
mindfulmachines/sativum
src/main/scala/sativum/DatedTask.scala
Scala
mit
476
package controllers import play.api.mvc._ import java.util.Date import model.EstateProvider import org.joda.time.DateTime class Management( estateProvider: EstateProvider, controllerComponents: ControllerComponents ) extends AbstractController(controllerComponents) { def healthcheck = Action { estateProvid...
guardian/status-app
app/controllers/Management.scala
Scala
apache-2.0
815
package main.scala.overlapping.timeSeriesOld.secondOrder.univariate.Procedures import breeze.linalg._ import main.scala.overlapping.timeSeries._ import main.scala.overlapping.timeSeriesOld.SecondOrderSignature /** * Created by Francois Belletti on 7/14/15. */ /* This calibrate one univariate AR model per columns...
bellettif/sparkGeoTS
sparkTS/src/main/scala/overlapping/timeSeriesOld/secondOrder/univariate/Procedures/DurbinLevinson.scala
Scala
bsd-3-clause
1,471
package org.jetbrains.plugins.scala.lang.completion import com.intellij.codeInsight.completion.{CompletionResultSet, InsertHandler} import com.intellij.codeInsight.lookup.{AutoCompletionPolicy, LookupElement, LookupElementPresentation, LookupElementRenderer} import com.intellij.openapi.application.ApplicationManager i...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/completion/ScalaAfterNewCompletionUtil.scala
Scala
apache-2.0
11,119
package com.sksamuel.elastic4s.akka import java.util.concurrent.TimeUnit import akka.http.scaladsl.model.HttpRequest import akka.http.scaladsl.settings.ConnectionPoolSettings import com.typesafe.config.{Config, ConfigFactory} import scala.collection.JavaConverters._ import scala.concurrent.duration._ import scala.ut...
sksamuel/elastic4s
elastic4s-client-akka/src/main/scala/com/sksamuel/elastic4s/akka/AkkaHttpClientSettings.scala
Scala
apache-2.0
2,632
import scala.reflect.runtime.universe._ import scala.tools.reflect.ToolBox object Test extends dotty.runtime.LegacyApp { val tb = runtimeMirror(getClass.getClassLoader).mkToolBox() val tree1 = reify(new collection.immutable.HashMap[String, String]) val tree2 = reify(new collection.mutable.HashMap[String, String]...
yusuke2255/dotty
tests/disabled/macro/run/showraw_tree_types_typed.scala
Scala
bsd-3-clause
452
package com.github.vitalsoftware.scalaredox.receiver import com.github.vitalsoftware.scalaredox.receiver.ReceiveController._ import com.github.vitalsoftware.util.JsonNaming.KebabCase import play.api.libs.json._ import play.api.mvc._ import play.api.Logger import play.api.libs.json.JsonConfiguration.Aux import scala.c...
vital-software/scala-redox
src/main/scala/com/github/vitalsoftware/scalaredox/receiver/ReceiveController.scala
Scala
mit
3,061
package models case class Configuration( version: String, styleName: String, scriptName: String) { } object Configuration { def apply(conf: play.api.Configuration) = { new Configuration( version = conf.getString("application.version").getOrElse(""), styleName = conf.getString("applicati...
bobeal/geebooks
app/models/Configuration.scala
Scala
agpl-3.0
440
package utils object StringOpz { implicit final class StrOpz(private val s: String) extends AnyVal { def inlined = s.stripMargin.replace("\\n", "") } }
falconepl/daarvin-protos
daarvin-proto/src/main/scala/utils/StringOpz.scala
Scala
gpl-2.0
162
// Sample adapters: class logged extends EntryPoint.Adapter: def wrapper(wrapped: EntryPoint.Wrapper): LoggedWrapper = LoggedWrapper(wrapped) class LoggedWrapper(val wrapped: EntryPoint.Wrapper) extends Wrapper: def adapt[A, R](op: A => R)(args: A): R = val argsString: String = args match case ...
dotty-staging/dotty
tests/run/decorators/sample-adapters.scala
Scala
apache-2.0
1,193
package pl.newicom.dddd.scheduling import akka.actor.ActorPath import akka.persistence.Recover import org.json4s.JsonAST.JString import org.json4s.{CustomSerializer, FullTypeHints} import pl.newicom.dddd.actor.PassivationConfig import pl.newicom.dddd.aggregate._ import pl.newicom.dddd.eventhandling.EventPublisher impo...
ahjohannessen/akka-ddd
akka-ddd-scheduling/src/main/scala/pl/newicom/dddd/scheduling/Scheduler.scala
Scala
mit
1,923
/* * Copyright 2017 TabMo http://tabmo.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 ...
tabmo/parquet-avro-shapeless
src/main/scala/io/tabmo/avro/TWR.scala
Scala
apache-2.0
1,545
package longRunning import ilc.examples.MapIntIntBenchData import ilc.examples.MapSuccBaseGenerated import ilc.examples.ReplacementChangeBenchmark /** * Benchmark generated derivative. */ object MapSuccBaseBenchmark extends ReplacementChangeBenchmark(new MapIntIntBenchData(MapSuccBaseGenerated))
inc-lc/ilc-scala
clients/src/test/scala/longRunning/MapSuccBaseBenchmark.scala
Scala
mit
303
/* * 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 ...
saturday-shi/spark
core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala
Scala
apache-2.0
28,972
/** * 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...
bluebreezecf/kafka
core/src/test/scala/unit/kafka/server/KafkaConfigTest.scala
Scala
apache-2.0
27,979
package com.eevolution.context.dictionary.infrastructure.repository import com.eevolution.context.dictionary.domain.model.PinStance import com.eevolution.context.dictionary.infrastructure.db.DbContext._ /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This program is free...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/repository/PinStanceMapping.scala
Scala
gpl-3.0
1,869
package com.recursivity.bowler.stub import com.recursivity.bowler.Component /** * Created by IntelliJ IDEA. * User: wfaler * Date: Nov 10, 2010 * Time: 10:55:16 PM * To change this template use File | Settings | File Templates. */ class ListModelComponent extends Component(None){ }
rossabaker/Handlebar
src/test/scala/com/recursivity/bowler/stub/ListModelComponent.scala
Scala
bsd-3-clause
294
/* * 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/PrimitiveVector.scala
Scala
apache-2.0
2,185
package util import scala.concurrent._ import ExecutionContext.Implicits.global import org.apache.commons.mail.{DefaultAuthenticator, HtmlEmail} import org.slf4j.LoggerFactory import app.Context import service.{AccountService, RepositoryService, IssuesService, SystemSettingsService} import servlet.Database ...
toshi-saito/gitbucket
src/main/scala/util/Notifier.scala
Scala
apache-2.0
4,336
/* APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed ...
xiazilla/Rap-Concert
src/test.scala
Scala
apache-2.0
1,916
package com.sksamuel.avro4s.schemas import com.sksamuel.avro4s.typeutils.{CaseClassShape, DatatypeShape, SealedTraitShape} import com.sksamuel.avro4s.{SchemaFor} import magnolia1.{CaseClass, AutoDerivation, SealedTrait, TypeInfo} import org.apache.avro.{Schema, SchemaBuilder} import scala.deriving.Mirror trait Magno...
sksamuel/avro4s
avro4s-core/src/main/scala/com/sksamuel/avro4s/schemas/magnolia.scala
Scala
apache-2.0
828
package org.jetbrains.plugins.scala package extensions import com.intellij.psi.PsiElement /** * Pavel Fatin */ object ElementText { def unapply(e: PsiElement): Some[String] = Some(e.getText) }
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/extensions/ElementText.scala
Scala
apache-2.0
199
package com.scalableminds.webknossos.datastore.helpers import com.scalableminds.util.tools.Fox import com.typesafe.scalalogging.LazyLogging import net.liftweb.common.Full import java.io.File import java.nio.file.{Files, Path} import scala.annotation.tailrec import scala.concurrent.ExecutionContext trait DataSetDelete...
scalableminds/webknossos
webknossos-datastore/app/com/scalableminds/webknossos/datastore/helpers/DataSetDeleter.scala
Scala
agpl-3.0
2,044
package com.twitter.finagle.thrift.exp.partitioning import com.twitter.conversions.DurationOps._ import com.twitter.delivery.thriftscala.DeliveryService._ import com.twitter.delivery.thriftscala._ import com.twitter.finagle.Addr import com.twitter.finagle.addr.WeightedAddress import com.twitter.finagle.loadbalancer.Ba...
twitter/finagle
finagle-thrift/src/test/scala/com/twitter/finagle/thrift/exp/partitioning/PartitionAwareClientEndtoEndTest.scala
Scala
apache-2.0
18,436
package at.ac.tuwien.ifs.ir.model /** * Created by aldo on 10/10/14. */ class RunRecord(val iteration: String, val document: Document, val rank: Int, val score: Float) { override def toString: String = s"$iteration ${document.id} $rank $score" } object RunRecord { def apply(iteration: String, document: Docume...
aldolipani/PoolBiasEstimators
src/main/scala/at/ac/tuwien/ifs/ir/model/RunRecord.scala
Scala
apache-2.0
631
package com.mizhi.nlp.stemmers.huskpaice import com.mizhi.nlp.stemmers.huskpaice.RuleAction._ import org.mockito.Mockito.{doReturn, spy} class RuleSpec extends UnitSpec { val rule = Rule("suffix", None, true, stop) describe("apply") { val state = StemmingState("asuffix", true, None) describe("when rule ...
mizhi/scala-stemmer
src/test/scala/com/mizhi/nlp/stemmers/huskpaice/RuleSpec.scala
Scala
mit
3,755
/* * 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/EberronReligionNonWarforged.scala
Scala
apache-2.0
1,138
/* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/iht-frontend
test/iht/controllers/application/assets/stocksAndShares/StocksAndSharesNotListedControllerTest.scala
Scala
apache-2.0
6,863
/** * 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...
vkroz/kafka
core/src/test/scala/unit/kafka/server/DynamicConfigChangeTest.scala
Scala
apache-2.0
5,736
package ch.wsl.box.rest.routes.enablers.twirl import akka.http.scaladsl.marshalling.{Marshaller, _} import akka.http.scaladsl.model.MediaType import akka.http.scaladsl.model.MediaTypes._ import play.twirl.api.{Html, Txt, Xml} object Implicits { /** Twirl marshallers for Xml, Html and Txt mediatypes */ implicit v...
Insubric/box
server/src/main/scala/ch/wsl/box/rest/routes/enablers/twirl/Implicits.scala
Scala
apache-2.0
667
/* * Copyright 2018 Michal Harish, michal.harish@gmail.com * * 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 ...
amient/affinity
core/src/main/scala/io/amient/affinity/core/util/AffinityMetrics.scala
Scala
apache-2.0
3,192
//: ---------------------------------------------------------------------------- //: Copyright (C) 2015 Verizon. 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 Licen...
neigor/funnel
elastic/src/main/scala/Elastic.scala
Scala
apache-2.0
8,723
/* * StructuredAlgorithm.scala * Abstract class for algorithms that are structured * * Created By: Brian Ruttenberg (bruttenberg@cra.com) * Creation Date: December 30, 2015 * * Copyright 2015 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email figaro@cra.com for i...
scottcb/figaro
Figaro/src/main/scala/com/cra/figaro/algorithm/structured/algorithm/StructuredMPEAlgorithm.scala
Scala
bsd-3-clause
2,049
/* * 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...
vax11780/shark
src/main/scala/shark/memstore2/TablePartitionIterator.scala
Scala
apache-2.0
1,956
package com.bradbrok.filmomatic.state object Direction extends Enumeration { type Direction = Value val In, Out, Alternate = Value }
bradbrok/Film-O-Matic
core/src/main/scala/com/bradbrok/filmomatic/state/Direction.scala
Scala
mit
138
/* * 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 ...
apache/kylin
kylin-spark-project/kylin-spark-common/src/main/scala/org/apache/spark/sql/KylinDataFrameManager.scala
Scala
apache-2.0
3,414
import scala.reflect.runtime.universe._ import scala.reflect.runtime.{currentMirror => cm} import scala.tools.reflect.ToolBox object Test extends App { val toolbox = cm.mkToolBox() def printSource[T](expr: Expr[T]) { val ttree = toolbox typecheck expr.tree println(ttree.toString) } var y = 3 printS...
felixmulder/scala
test/files/run/t5816.scala
Scala
bsd-3-clause
350
/* * Copyright (c) 2018. Yuriy Stul */ package com.stulsoft.ysps.pforcomprehansion import scala.util.Try /** * @author Yuriy Stul */ object Example7 extends App { test1() test2() test3() test4() test5() def test1(): Unit = { println("==>test1") val result = for { _ <- f1(false) ...
ysden123/ysps
src/main/scala/com/stulsoft/ysps/pforcomprehansion/Example7.scala
Scala
mit
1,766
package de.sciss.cord package incomplete import de.sciss.cord.audio.AudioProcessingEvent import org.scalajs.dom._ import org.scalajs.dom.html.Canvas import scala.scalajs.js import scalatags.JsDom.all._ import scala.scalajs.js.timers.SetIntervalHandle class Meter { meter => private var lastPeak = 0.0 private va...
Sciss/Cord
src/main/scala/de/sciss/cord/incomplete/Meter.scala
Scala
lgpl-2.1
3,611
/** * Copyright (c) 2016 LIBBLE team supervised by Dr. Wu-Jun LI at Nanjing University. * 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.apach...
syh6585/LIBBLE-Spark
src/main/scala/generalizedLinear/LossFunc.scala
Scala
apache-2.0
12,435
package smt.report import smt.{UpMoveState, DownMoveState, MoveState} object MoveStateDescription { def describe(nms: MoveState): String = nms match { case dms: DownMoveState => { dms.crashedDown match { case None => "rolled back." case Some(s) => "roll-back attempted, but crashed at: " + ...
davidpeklak/smt
src/main/scala/smt/report/MoveStateDescription.scala
Scala
mit
598
import edu.uta.diql._ import org.apache.spark._ import org.apache.spark.rdd._ object Test { def main ( args: Array[String] ) { val conf = new SparkConf().setAppName("Test") val sc = new SparkContext(conf) explain(true) var M = sc.textFile(args(0)) .map( line => { val a = line.split("...
fegaras/DIQL
tests/diablo/spark/MatrixMultiplicationSpark.scala
Scala
apache-2.0
785
package org.json4s package native import org.scalatest.wordspec.AnyWordSpec import org.json4s.prefs.EmptyValueStrategy import org.json4s.MonadicJValue._ class NativeJsonMethodsSpec extends AnyWordSpec { import org.json4s.JsonDSL._ import JsonMethods._ "JsonMethods.parse" should { val stringJson = """{"nu...
xuwei-k/json4s
native-core/shared/src/test/scala/org/json4s/native/NativeJsonMethodsSpec.scala
Scala
apache-2.0
4,073
/* * Copyright 2016 Carlo Micieli * * 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...
CarloMicieli/hascalator
bench/src/main/scala/io/hascalator/benchmarks/lists/FoldBenchmarks.scala
Scala
apache-2.0
1,836
package org.jetbrains.plugins.scala package script import com.intellij.execution.configurations._ import com.intellij.execution.filters._ import com.intellij.openapi.project.Project import com.intellij.psi.{PsiElement, PsiManager} import com.intellij.openapi.vfs.VirtualFile import com.intellij.openapi.util.JDOMExterna...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/script/ScalaScriptRunConfiguration.scala
Scala
apache-2.0
8,237
package pl.umk.bugclassification.scmparser.training import java.util import java.util.ArrayList import org.slf4j.LoggerFactory import weka.classifiers.Classifier import weka.core.{Attribute, DenseInstance, FastVector, Instance, Instances} import scala.collection.mutable.ArrayBuilder.ofDouble trait WekaWrapper { ...
mfejzer/CommitClassification
src/main/scala/pl/umk/bugclassification/scmparser/training/WekaWrapper.scala
Scala
bsd-3-clause
3,060
package unluac.parse import java.nio.ByteBuffer class LBooleanType extends BObjectType[LBoolean] { def parse(buffer: ByteBuffer, header: BHeader): LBoolean = { val value: Int = buffer.get if ((value & 0xFFFFFFFE) != 0) { throw new IllegalStateException } else { val bool: LBoolean = if (...
danielwegener/unluac-scala
shared/src/main/scala/unluac/parse/LBooleanType.scala
Scala
mit
482
/* * 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...
pncampbell/ct-calculations
src/test/scala/uk/gov/hmrc/ct/accounts/frs10x/boxes/ACQ8990Spec.scala
Scala
apache-2.0
1,554
/* * Copyright 2015 Ark International Group * * 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...
arkig/spream
src/main/scala/spream/MovingWindowPartitioning.scala
Scala
apache-2.0
10,584
package edu.osu.cse.groenkeb.logic trait Operator { def matches(op: Operator): Boolean override def toString(): String } trait Predicate extends Operator trait Quantifier extends Operator { def evaluate(domain: Domain, functor: Sentence => Boolean, arg: Sentence): Boolean } trait Connective extends Operator {...
bgroenks96/PropLogic
core/src/main/scala/edu/osu/cse/groenkeb/logic/operator.scala
Scala
mit
1,169
package com.avsystem.scex package compiler import com.avsystem.scex.compiler.presentation.{CachingScexPresentationCompiler, ScexPresentationCompiler} /** * Created: 17-10-2013 * Author: ghik */ class DefaultScexCompiler(val settings: ScexSettings) extends ScexCompiler with ScexPresentationCompiler with Class...
AVSystem/scex
scex-core/src/main/scala/com/avsystem/scex/compiler/DefaultScexCompiler.scala
Scala
mit
490