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 breeze.util /** * Stores various implicits, also available by importing breeze.util._ */ object Implicits extends DoubleImplicits with IteratorImplicits { } trait DoubleImplicits { class RichDouble(x: Double) { def closeTo(y: Double, tol: Double=1E-5) = { (math.abs(x - y) / (math.abs(x) + math....
wavelets/breeze
src/main/scala/breeze/util/Implicits.scala
Scala
apache-2.0
1,235
package muster package codec package play import _root_.play.api.libs.json._ import scala.util.Try package object api { implicit class JsValueProducingObject[T: Producer](p: T) { def asJsValue = PlayJsonCodec.from(p) } implicit class JsValueConsumingObject(jv: JsValue) { @inline def as[T](implicit co...
json4s/muster
codecs/play-json/src/main/scala/muster/codec/play/api/package.scala
Scala
mit
597
package org.jetbrains.plugins.scala.util import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.project.Project import com.intellij.openapi.util.Computable /** * User: Alexander Podkhalyuzin * Date: 16.11.11 */ object ScalaUtil { def writeAction[T](project: Project)(callback: => ...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/util/ScalaUtil.scala
Scala
apache-2.0
630
// scalastyle:off /* NSC -- new Scala compiler * Copyright 2005-2013 LAMP/EPFL * @author Paul Phillips */ package org.apache.spark.repl import org.apache.spark.annotation.DeveloperApi import scala.tools.nsc._ import scala.tools.nsc.interpreter._ import scala.tools.jline._ import scala.tools.jline.console.comple...
ArvinDevel/onlineAggregationOnSparkV2
repl/scala-2.10/src/main/scala/org/apache/spark/repl/SparkJLineCompletion.scala
Scala
apache-2.0
15,145
package net.nomadicalien.ch7
BusyByte/functional-n-reactive-domain-modeling
chapter7/src/main/scala/Listings.scala
Scala
apache-2.0
29
package com.circusoc.taglink import com.circusoc.testgraph._ import org.scalacheck.Gen import org.slf4j.LoggerFactory class TagLocationLinker extends NodeJoiner[TaglinkLocation, TaglinkTag, TaglinkTagLocationPair] { override def join(from: TaglinkLocation, to: TaglinkTag): TaglinkTagLocationPair = { TaglinkTag...
ririw/circusoc-backend
src/test/scala/com/circusoc/taglink/taglink.scala
Scala
agpl-3.0
1,944
package agilesitesng.wem.actor import agilesitesng.wem.actor.Cas3.Cas3Actor import akka.actor.ActorSystem import akka.pattern.ask import akka.testkit.{TestActorRef, TestKit} import akka.util.Timeout import com.typesafe.config.ConfigFactory import org.scalatest.{BeforeAndAfterAll, MustMatchers, WordSpecLike} import sc...
agilesites/agilesites2-build
src/test/scala/agilesitesng/wem/actor/Cas3Spec.scala
Scala
mit
1,078
package com.sksamuel.scapegoat.inspections.equality import com.sksamuel.scapegoat._ /** * @author Stephen Samuel */ class ComparingFloatingPointTypes extends Inspection( text = "Floating type comparison", defaultLevel = Levels.Error, description = "Checks for equality checks on floating point ...
sksamuel/scalac-scapegoat-plugin
src/main/scala/com/sksamuel/scapegoat/inspections/equality/ComparingFloatingPointTypes.scala
Scala
apache-2.0
1,532
package com.celexus.tipsy.model import java.time.LocalDateTime import java.time.format.DateTimeFormatter import play.api.libs.json.JsObject /** * Representation of an Institutional holding at a date */ class HoldingAtDate(result: JsObject) { /** * Date of holding */ val date: LocalDateTime = LocalDat...
Ccook/tipsy
src/main/scala/com/celexus/tipsy/model/HoldingAtDate.scala
Scala
apache-2.0
1,009
package scalaz.stream import java.io.{ByteArrayOutputStream, PrintStream} import java.util.concurrent.ScheduledExecutorService import org.scalacheck.Prop.protect import org.scalacheck.Properties import scalaz.concurrent.Task class PrintSpec extends Properties("io.print") { implicit val S: ScheduledExecutorService...
shawjef3/scalaz-stream
src/test/scala/scalaz/stream/PrintSpec.scala
Scala
mit
1,777
package org.squeryl.test.schooldb2 import org.squeryl.test.PrimitiveTypeModeForTests._ import org.squeryl._ import dsl.ast._ import dsl.{OneToMany, CompositeKey2} import java.sql.{Savepoint} import org.squeryl.framework._ trait SchoolDb2Object { val id: Long = 0 } object SchoolDb2 extends SchoolDb2 ...
Krasnyanskiy/squeryl
src/test/scala/org/squeryl/test/schooldb2/SchoolDb2.scala
Scala
apache-2.0
15,788
// Generated by the Scala Plugin for the Protocol Buffer Compiler. // Do not edit! // // Protofile syntax: PROTO3 package com.google.protobuf.api /** Declares an API Interface to be included in this interface. The including * interface must redeclare all the methods from the included interface, but * documentatio...
dotty-staging/ScalaPB
scalapb-runtime/jvm/src/main/scala/com/google/protobuf/api/Mixin.scala
Scala
apache-2.0
9,604
/* * 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 ...
hortonworks-spark/cloud-integration
cloud-examples/src/test/scala/com/cloudera/spark/cloud/s3/S3ASeekReadSequentialIOSuite.scala
Scala
apache-2.0
1,217
package com.softwaremill.macmemo /** * Taken from MacWire https://github.com/adamw/macwire */ private[macmemo] class Debug { var ident = 0 def apply(msg: => String): Unit = { if (enabled) { val prefix = " " * ident println(s"$prefix[debug] $msg") } } def withBlock[T](msg: => String)(b...
kciesielski/macmemo
macros/src/main/scala/com/softwaremill/macmemo/Debug.scala
Scala
apache-2.0
602
/* * SonificationObjView.scala * (SysSon) * * Copyright (c) 2013-2017 Institute of Electronic Music and Acoustics, Graz. * Copyright (c) 2014-2019 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU General Public License v3+ * * * For further information, please contact H...
iem-projects/sysson
src/main/scala/at/iem/sysson/gui/impl/SonificationObjView.scala
Scala
gpl-3.0
5,549
package com.sageserpent.plutonium import java.lang.reflect.Method import scala.reflect.runtime.universe._ import com.sageserpent.plutonium.ItemExtensionApi.UniqueItemSpecification object AbstractPatch { def patchesAreRelated(lhs: AbstractPatch, rhs: AbstractPatch): Boolean = { val bothReferToTheSameItem = lhs....
sageserpent-open/open-plutonium
src/main/scala/com/sageserpent/plutonium/AbstractPatch.scala
Scala
mit
1,462
package org.jetbrains.plugins.scala.testingSupport.scalatest.scala2_11.scalatest2_1_7 import org.jetbrains.plugins.scala.SlowTests import org.jetbrains.plugins.scala.testingSupport.scalatest.IgnoredSpecTest import org.junit.experimental.categories.Category /** * @author Roman.Shein * @since 22.01.2015. */ @Cate...
jastice/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/testingSupport/scalatest/scala2_11/scalatest2_1_7/Scalatest2_11_2_1_7_IgnoredTestTest.scala
Scala
apache-2.0
448
package net.fehmicansaglam.tepkin import java.io._ import java.security.MessageDigest import akka.actor.ActorRef import akka.stream.Materializer import akka.stream.scaladsl.{FileIO, Source} import akka.util.{ByteString, Timeout} import net.fehmicansaglam.bson.BsonDocument import net.fehmicansaglam.bson.BsonDsl._ impo...
fehmicansaglam/tepkin
tepkin/src/main/scala/net/fehmicansaglam/tepkin/GridFs.scala
Scala
apache-2.0
5,276
package codesample.scala.coursera.course1.week4 object ObjectOrientedNaturalNumber { abstract class Nat { def isZero: Boolean def predecessor: Nat def successor: Nat = new Succ(this) def +(that: Nat): Nat def -(that: Nat): Nat } object Zero extends Nat { override def isZero: Boolean = ...
aquatir/remember_java_api
code-sample-scala/scala-coursera/src/main/scala/codesample/scala/coursera/course1/week4/ObjectOrientedNaturalNumber.scala
Scala
mit
1,262
package smarthouse.restapi.models.db import smarthouse.restapi.models.EventEntity import smarthouse.restapi.utils.DatabaseService trait EventEntityTable { protected val databaseService: DatabaseService import databaseService.driver.api._ class Events(tag: Tag) extends Table[EventEntity](tag, "events") { d...
andrewobukhov/smart-house
src/main/scala/smarthouse/restapi/models/db/EventEntityTable.scala
Scala
mit
602
package sampleclean.parse import sampleclean.api.{SampleCleanQuery,SampleCleanAQP,SampleCleanContext} import org.apache.spark.sql.SchemaRDD /** * The SampleCleanQueryParser is the class that handles parsing SampleClean commands. * This class triggers execution when a command is parsed successfully. Commands * that...
agilemobiledev/sampleclean-async
src/main/scala/sampleclean/parse/SampleCleanQueryParser.scala
Scala
apache-2.0
3,773
package org.jetbrains.plugins.dotty.lang.parser.parsing.types import org.jetbrains.plugins.scala.lang.parser.parsing.types.RefineStat /** * @author adkozlov */ object RefinedStatSeq extends org.jetbrains.plugins.scala.lang.parser.parsing.types.RefineStatSeq { override protected val refineStat = RefineStat }
whorbowicz/intellij-scala
src/org/jetbrains/plugins/dotty/lang/parser/parsing/types/RefinedStatSeq.scala
Scala
apache-2.0
317
package im.mange.flakeless.innards import im.mange.flakeless.Flakeless import org.openqa.selenium.{By, SearchContext} private [flakeless] object AssertElementAbledness { def apply(in: SearchContext, by: By, expected: Boolean, flakeless: Option[Flakeless]): Unit = { WaitForElement(flakeless, Command(s"Asse...
alltonp/flakeless
src/main/scala/im/mange/flakeless/innards/AssertElementAbledness.scala
Scala
mit
571
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.testsuite.javalib.security...
nicolasstucki/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/security/ThrowablesTest.scala
Scala
apache-2.0
520
package controllers import java.net.URI import java.util.UUID.randomUUID import actors.UserActor import controllers.backApi.protocol import controllers.backApi.protocol.{Team, AppUser} import play.api._ import play.api.libs.json.{JsResult, Json, JsValue} import play.api.libs.ws.{WSResponse, WS} import play.api.mvc._ ...
ganghq/shebang
app/controllers/Application.scala
Scala
mit
3,214
/* * 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 ...
bharathkk/samza
samza-core/src/test/scala/org/apache/samza/system/filereader/TestFileReaderSystemAdmin.scala
Scala
apache-2.0
4,055
/** * 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...
wangcy6/storm_app
frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/main/scala/kafka/log/LogValidator.scala
Scala
apache-2.0
17,802
package ru.retailrocket.spark.multitool import org.scalatest._ import java.nio.file.FileAlreadyExistsException import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spark.SparkConf import org.apache.spark.rdd._ import scala.util._ import Implicits._ object Helpers { def f(...
RetailRocket/SparkMultiTool
src/test/scala/ru/retailrocket/spark/multitool/FunctionsSuite.scala
Scala
mit
3,914
package breeze.linalg.functions import breeze.generic.UFunc import breeze.linalg.operators.OpMulInner object tanimotoDistance extends UFunc { implicit def tanimotoDistanceFromDotProduct[T, U](implicit dotTU: OpMulInner.Impl2[T, U, Double], dotTT: OpMulInner.Impl2[...
wstcpyt/breeze
math/src/main/scala/breeze/linalg/functions/tanimotoDistance.scala
Scala
apache-2.0
751
package com.gilt.thehand.rules.typed import com.gilt.thehand.{Context, AbstractRuleSpec} class LongLteSpec extends AbstractRuleSpec { val testCases = Map( LongLte(54) -> ( Set(Context(54), Context(53), Context(BigDecimal("53")), Context(53.0), Context(54.00), Context("54.0"), Context('6'), Context(true)),...
gilt/the-hand
src/test/scala/com/gilt/thehand/rules/typed/LongLteSpec.scala
Scala
apache-2.0
1,028
package org.photon.login import com.twitter.util.Future import org.apache.mina.core.session.IoSession import org.apache.mina.transport.socket.nio.{NioProcessor, NioSocketAcceptor} import java.net.InetSocketAddress import org.photon.common.{Observable, Strings, Async} import scala.collection.mutable import org.apache.m...
Emudofus/Photon
login/main/src/org/photon/login/NetworkComponentImpl.scala
Scala
mit
5,960
package es.upm.oeg.epnoi.matching.metrics.domain.space import es.upm.oeg.epnoi.matching.metrics.domain.entity.{AuthorProfile, TopicDistribution, TopicalResource} import es.upm.oeg.epnoi.matching.metrics.similarity.{AuthorsSimilarity, TopicsSimilarity} import es.upm.oeg.epnoi.matching.metrics.topics.TopicModel import o...
cbadenes/epnoi-matching-metrics
src/main/scala/es/upm/oeg/epnoi/matching/metrics/domain/space/TopicsSpace.scala
Scala
apache-2.0
2,468
/* * 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 ...
aljoscha/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamExecSink.scala
Scala
apache-2.0
4,328
package com.github.dzhg.tedis.server import com.github.dzhg.tedis.utils.{ServerAndClient, TedisSuite} class PipelineSpec extends TedisSuite with ServerAndClient { "Tedis Pipeline" must { "support MULTI" in { val result = client.pipeline { pipeline => } result.value mustBe empty } "handle m...
dzhg/tedis
src/test/scala/com/github/dzhg/tedis/server/PipelineSpec.scala
Scala
mit
1,413
package validation import org.scalatest.FunSuite import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import WorkingWithLists.P21._ @RunWith(classOf[JUnitRunner]) class P21TestSuite extends FunSuite { test("insertAt an ordinary list: insertAt('new, 1, List('a, 'b, 'c, 'd)) = List('a, 'new, 'b, 'c...
ihac/Ninety-Nine-Scala-Problems
src/test/scala/validation/P21TestSuite.scala
Scala
gpl-3.0
2,084
package spark import java.io._ import java.util.concurrent.atomic.AtomicInteger import scala.actors.remote.RemoteActor import scala.collection.mutable.ArrayBuffer import org.apache.hadoop.fs.Path import org.apache.hadoop.conf.Configuration import org.apache.hadoop.mapred.InputFormat import org.apache.hadoop.mapred.S...
javelinjs/spark
core/src/main/scala/spark/SparkContext.scala
Scala
bsd-3-clause
17,263
package java.time.temporal trait TemporalAdjuster { def adjustInto(temporal: Temporal): Temporal }
sjrd/scala-js-java-time
src/main/scala/java/time/temporal/TemporalAdjuster.scala
Scala
bsd-3-clause
102
val aint_{{OUTPUT}} = {{CONDITION}}.count() val ares_{{OUTPUT}} = Seq(("ALL", aint_{{OUTPUT}}.toInt)) {{OUTPUT}} = sc.parallelize((ares_{{OUTPUT}})){{TO_CACHE}}
vpapaioannou/Musketeer
src/translation/spark_templates/CountTemplate.scala
Scala
apache-2.0
163
package com.wavesplatform.lang import com.google.protobuf.ByteString import com.wavesplatform.common.utils.EitherExt2 import com.wavesplatform.lang.contract.DApp._ import com.wavesplatform.lang.contract.{ContractSerDe, DApp} import com.wavesplatform.lang.v1.ContractLimits import com.wavesplatform.lang.v1.compiler.Term...
wavesplatform/Waves
lang/tests/src/test/scala/com/wavesplatform/lang/ContractSerdeTest.scala
Scala
mit
4,651
package poly.collection.impl.hashtable import cats.implicits._ import poly.collection._ import poly.collection.typeclass._ import poly.macroutil._ /** * @author Tongfei Chen */ class OpenHashTable[K: Hash, E >: Null <: OpenHashEntryLike[K, E]](initialSize: Int = Settings.ArrayInitialSize) { var table: Array[AnyR...
ctongfei/poly-collection
core/src/main/scala/poly/collection/impl/hashtable/OpenHashTable.scala
Scala
mit
3,079
package com.github.jparkie.spark.cassandra import java.net.InetAddress import org.apache.cassandra.streaming.StreamEvent._ import org.apache.cassandra.streaming.{ SessionInfo, StreamEvent, StreamEventHandler, StreamState } import org.slf4j.Logger import scala.collection.JavaConverters._ import scala.collection.mutab...
jparkie/Spark2Cassandra
src/main/scala/com/github/jparkie/spark/cassandra/SparkCassStreamEventHandler.scala
Scala
apache-2.0
5,183
package org.vegas.compiler import org.vegas.vtype.ast import org.parboiled2._ import scala.collection.immutable.Seq import scala.collection.mutable.Stack class StageNParser(val input: ParserInput) extends Parser { def Program = rule { Whitespace ~ oneOrMore(Expression ~ ";" ~ Whitespace) ~ EOI } def Expressi...
rrdelaney/vegas
src/main/scala/org/vegas/compiler/StageNParser.scala
Scala
mit
4,350
/* * Copyright 2014–2017 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
drostron/quasar
mongodb/src/main/scala/quasar/physical/mongodb/mongoiterable.scala
Scala
apache-2.0
1,362
package com.codahale.jerkson.tests import org.specs2.mutable._ import com.codahale.jerkson.Json._ import scala.collection.immutable._ import com.codahale.jerkson.ParsingException class ImmutableCollectionSupportSpec extends Specification { "An immutable.Seq[Int]" should { "generates a JSON array of ints" in { ...
rememberthemilk/jerkson
src/test/scala/com/codahale/jerkson/tests/ImmutableCollectionSupportSpec.scala
Scala
mit
8,329
package scwebapp.servlet.extension import jakarta.servlet.* import scwebapp.servlet.HttpAttribute object ServletRequestExtensions { extension(peer:ServletRequest) { def attribute[T<:AnyRef](name:String):HttpAttribute[T] = new HttpAttribute[T]( () => peer.getAttribute(name), (it) => peer.setAttribute(n...
ritschwumm/scwebapp
modules/servlet/src/main/scala/scwebapp/servlet/extension/ServletRequestExtensions.scala
Scala
bsd-2-clause
379
/* * Copyright 2012 Twitter Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
nshkrob/zipkin
project/Project.scala
Scala
apache-2.0
17,578
package org.allenai.common.guice import org.allenai.common.Compat.JavaConverters._ import org.allenai.common.Logging import org.allenai.common.Config._ import com.google.inject.name.Named import com.typesafe.config.{ Config, ConfigException, ConfigFactory, ConfigObject, ConfigUtil, ConfigValueType } impor...
allenai/common
guice/src/main/scala/org/allenai/common/guice/ConfigModule.scala
Scala
apache-2.0
9,523
/* * 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 ...
vjagadish/samza-clone
samza-kafka/src/main/scala/org/apache/samza/system/kafka/MessageSink.scala
Scala
apache-2.0
1,287
/* Copyright 2014 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
twitter/scalding
scalding-hadoop-test/src/test/scala/com/twitter/scalding/platform/PlatformTest.scala
Scala
apache-2.0
28,880
/* * Licensed to Intel Corporation under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * Intel Corporation licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use t...
SeaOfOcean/BigDL
dl/src/main/scala/com/intel/analytics/bigdl/tensor/DenseTensorMath.scala
Scala
apache-2.0
27,724
/* * Copyright 2013 - 2017 Outworkers 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 or...
websudos/morpheus
morpheus-dsl/src/test/scala/com/outworkers/morpheus/engine/query/UpdateQuerySerialisationTest.scala
Scala
bsd-2-clause
5,191
package com.olegych.scastie.client import com.olegych.scastie.api._ import com.olegych.scastie.client.components.Scastie import scala.scalajs.js import scala.collection.mutable.{Map => MMap} import scala.util.{Try, Failure, Success} import org.scalajs.dom.raw.HTMLElement import japgolly.scalajs.react._ import play...
OlegYch/scastie
client/src/main/scala/com.olegych.scastie.client/Global.scala
Scala
apache-2.0
2,462
package com.collective.modelmatrix.catalog import com.collective.modelmatrix.db.DatabaseConfig import org.scalatest.{BeforeAndAfterAll, FlatSpec} trait ITDatabase extends CatalogDatabase { self: FlatSpec with BeforeAndAfterAll => val dbConfig: DatabaseConfig = ITDatabaseConfig override val db = dbConfig.databas...
codeaudit/modelmatrix
modelmatrix-core/src/test/scala/com/collective/modelmatrix/catalog/TestDatabase.scala
Scala
apache-2.0
742
package apus.auth import apus.protocol.Jid import scala.concurrent.Future import scala.xml.Elem /* * Created by Hao Chen on 2014/11/25. */ /** * User authentication */ trait UserAuth { def auth(jid: Jid, password: String): Future[Boolean] } class UserAuthException(val resp: Option[Elem], message: String = n...
raulchen/Apus
src/main/scala/apus/auth/UserAuth.scala
Scala
apache-2.0
391
package com.wallace.demo.rest.sever.demo.apiservices.redisclient.entity /** * Created by 10192057 on 2018/8/28 0028. */ object RedisClientEntity { }
LeagueForHacker/Rest-Sever-Demo
src/main/scala/com/wallace/demo/rest/sever/demo/apiservices/redisclient/entity/RedisClientEntity.scala
Scala
mit
155
package text.normalizer import text.StringOption /** * @author K.Sakamoto * Created on 2016/02/20 */ object CharacterNormalizerAfterUnicodeNormalization extends DictionaryBasedNormalizer( StringOption("character_dic_after_unicode_normalization.yml"))
ktr-skmt/FelisCatusZero
src/main/scala/text/normalizer/CharacterNormalizerAfterUnicodeNormalization.scala
Scala
apache-2.0
273
/*initInDeclaration*/ class A(i: Int) class Test extends A(/*start*/1/*end*/) /* /*initInDeclaration*/ class A(i: Int) class Test extends { var i: Int = 1 } with A(/*start*/i/*end*/) */
triggerNZ/intellij-scala
testdata/introduceField/FromBaseConstructorAddEarlyDefs.scala
Scala
apache-2.0
187
package com.github.diegopacheco.scala3.playground.features class PersonRecord(elems: (String, Any)*) extends Selectable: private val fields = elems.toMap def selectDynamic(name: String): Any = fields(name) type Person = PersonRecord { val name: String val age: Int } object StructuralTypeMainApp extends App {...
diegopacheco/scala-playground
scala-3-playground/scala-3-playground/src/main/scala/com/github/diegopacheco/scala3/playground/features/StructuralTypeMainApp.scala
Scala
unlicense
638
/** * Copyright 2015 Devon Miller * * 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...
nightscape/scala-vdom
js/src/main/scala/org/im/vdom/package.scala
Scala
apache-2.0
1,876
import scala.reflect.macros.blackbox import scala.language.experimental.macros trait ByNameImplicit[T] { def value: T } object ByNameImplicit { implicit def implicit1[T]: ByNameImplicit[T] = macro ByNameImplicitMacro.ByNameImplicitMacroImpl.implicitFetch[T] } object ByNameImplicitMacro { class ByNameImplicit...
djx314/ubw
raw06-未实现/src/main/scala/ByNameImplicit.scala
Scala
bsd-3-clause
691
package concrete.heuristic.revision import concrete.ProblemState import concrete.constraint.Constraint final class PiDomOnW extends Key[Constraint] { def getKey(c: Constraint, s: ProblemState) = Key.prod(c.scope, s) / c.weight }
concrete-cp/concrete
src/main/scala/concrete/heuristic/revision/PiDomOnW.scala
Scala
lgpl-2.1
233
package gapt.proofs.gaptic import gapt.expr._ import gapt.proofs.context.facet.ProofNames import gapt.proofs.Sequent import gapt.proofs.context.mutable.MutableContext import org.specs2.mutable.Specification class ProofMacrosTest extends Specification { "proof" in { Proof( Sequent() :+ ( "goal" -> hof"a -> a" )...
gapt/gapt
tests/src/test/scala/gapt/proofs/gaptic/LemmaMacrosTest.scala
Scala
gpl-3.0
791
package is.hail.expr.ir.lowering import java.io.{ByteArrayInputStream, ByteArrayOutputStream} import is.hail.annotations.{BroadcastRow, Region, RegionValue} import is.hail.asm4s._ import is.hail.expr.ir.{Compile, CompileIterator, ExecuteContext, GetField, IR, In, Let, MakeStruct, PartitionRVDReader, ReadPartition, St...
cseed/hail
hail/src/main/scala/is/hail/expr/ir/lowering/RVDToTableStage.scala
Scala
mit
4,395
/* Copyright 2012 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
rjhall/etsy.scalding
src/main/scala/com/twitter/scalding/ReduceOperations.scala
Scala
apache-2.0
15,836
package im.actor.server.api.frontend import akka.actor._ import akka.event.Logging import akka.stream.Materializer import akka.stream.scaladsl._ import slick.driver.PostgresDriver.api.Database import im.actor.server.session.SessionRegion import im.actor.server.tls.{ Tls, TlsContext } object TcpFrontend extends Front...
lstNull/actor-platform
actor-server/actor-frontend/src/main/scala/im/actor/server/api/frontend/TcpFrontend.scala
Scala
mit
1,014
/* * 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/main/scala/uk/gov/hmrc/ct/computations/AP3.scala
Scala
apache-2.0
1,010
package net.sansa_stack.query.spark.dof.bindings import org.apache.jena.sparql.core.Var /* * Resulting class for bindings * */ class Result[A](_rdd: A, _keys: List[Var]) { def rdd: A = _rdd def keys: List[Var] = _keys }
SANSA-Stack/SANSA-RDF
sansa-query/sansa-query-spark/src/main/scala/net/sansa_stack/query/spark/dof/bindings/Result.scala
Scala
apache-2.0
228
package io.github.tomykaira.uchronie.ui import org.scalatest.matchers.ShouldMatchers import org.scalatest.{FunSpec, BeforeAndAfter} import io.github.tomykaira.uchronie.GitSpecHelper class DiffDecoratorSpec extends FunSpec with BeforeAndAfter with ShouldMatchers with GitSpecHelper { before { initRepo() } de...
tomykaira/constraintscala
uchronie/src/test/scala/io/github/tomykaira/uchronie/ui/DiffDecoratorSpec.scala
Scala
bsd-3-clause
832
package im.actor.server.api import akka.actor.ActorSystem import slick.driver.PostgresDriver.api._ import im.actor.server.push._ trait ActorSpecHelpers { protected def buildSeqUpdManagerRegion()(implicit system: ActorSystem, db: Database): SeqUpdatesManagerRegion = { val appleConfig = ApplePushManagerConfig.lo...
v2tmobile/actor-platform
actor-server/actor-tests/src/test/scala/im/actor/server/ActorSpecHelpers.scala
Scala
mit
589
package org.hrscala.sbt import com.github.nscala_time.time.Imports._ import org.joda.time.Days import org.scalacheck._ import org.specs2._ class CalendarUnitTest extends Specification with ScalaCheck { def is = s2""" Check days in year $daysInYearTest Check months in year $daysInMonthTest """...
HRScala/its-so-sbt
02-conventional-layout/src/test/scala/org/hrscala/sbt/CalendarUnitTest.scala
Scala
unlicense
914
/* * 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
app/services/SubmissionService.scala
Scala
apache-2.0
9,266
package io.finch import java.io.{ByteArrayInputStream, InputStream} import java.util.UUID import java.util.concurrent.TimeUnit import scala.concurrent.duration.Duration import cats.data.{NonEmptyList, WriterT} import cats.effect.{IO, Resource} import cats.laws._ import cats.laws.discipline.AlternativeTests import ca...
rpless/finch
core/src/test/scala/io/finch/EndpointSpec.scala
Scala
apache-2.0
15,216
package codacy.plugins.test import java.io.{File => JFile} import scala.sys.process._ import scala.util.Try import better.files.File object DockerHelpers { val testsDirectoryName = "tests" private val processLogger = ProcessLogger((_: String) => ()) val dockerRunCmd = List("docker", "run", "--net=none", "--...
codacy/codacy-plugins-test
src/main/scala/codacy/plugins/test/DockerHelpers.scala
Scala
mit
1,248
package dsmoq.services.json /** * 画像情報を返却するためのJSON型 * * @param id 画像ID * @param url 画像URL */ case class Image( id: String, url: String )
nkawa/dsmoq
server/apiServer/src/main/scala/dsmoq/services/json/Image.scala
Scala
apache-2.0
181
/* * Copyright 2011-2019 Asakusa Framework Team. * * 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 ...
ueshin/asakusafw-spark
compiler/src/main/scala/com/asakusafw/spark/compiler/graph/CoGroupClassBuilder.scala
Scala
apache-2.0
7,956
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
spaced/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/scalalib/RangesTest.scala
Scala
bsd-3-clause
4,048
/* * 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/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/stream/table/validation/TemporalTableJoinValidationTest.scala
Scala
apache-2.0
3,984
package funsets import common._ /** * 2. Purely Functional Sets. */ object FunSets { /** * We represent a set by its characteristic function, i.e. * its `contains` predicate. */ type Set = Int => Boolean /** * Indicates whether a set contains a given element. */ def contains(s: Set, elem: In...
jan-j/functional-programming-principles-in-scala
week-2/src/main/scala/funsets/FunSets.scala
Scala
mit
2,418
package server import java.util.concurrent.Executors import common.CommonObjects import common.CommonObjects.{Configuration, _} import libsvm._ import libsvm.svm_parameter._ import scala.annotation.tailrec import scala.concurrent.duration._ import scala.concurrent.{Await, ExecutionContext, Future} object Learning {...
domrde/hybrid-pathfinding
server/src/main/scala/server/Learning.scala
Scala
mit
9,551
package work.martins.simon.expect.core import scala.annotation.tailrec import scala.util.matching.Regex import com.typesafe.scalalogging.LazyLogging import work.martins.simon.expect.StringUtils._ import work.martins.simon.expect.core.RunContext.{ChangeToNewExpect, Continue, Terminate} import work.martins.simon.expect....
Lasering/scala-expect
src/main/scala/work/martins/simon/expect/core/Whens.scala
Scala
mit
10,484
/* * 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 ...
zzcclp/carbondata
integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/dataload/TestGlobalSortDataLoad.scala
Scala
apache-2.0
25,592
package com.twitter.finagle.builder import org.mockito.Mockito.{verify, when} import org.mockito.Matchers import org.mockito.Matchers._ import org.scalatest.FunSuite import org.scalatest.mock.MockitoSugar import org.scalatest.junit.JUnitRunner import org.scalatest.concurrent.Eventually._ import org.junit.runner.RunWit...
JustinTulloss/finagle
finagle-core/src/test/scala/com/twitter/finagle/builder/ClientBuilderTest.scala
Scala
apache-2.0
3,994
package io.fintrospect.filters import java.time.Duration import java.time.Duration.ofSeconds import java.time.Instant.ofEpochMilli import com.twitter.finagle.Service import com.twitter.finagle.http.{Request, Response, Status} import com.twitter.util.Await.result import com.twitter.util.{Await, Future} import io.fintr...
daviddenton/fintrospect
core/src/test/scala/io/fintrospect/filters/ResponseFiltersTest.scala
Scala
apache-2.0
5,124
/* * 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
core/test/com/treode/async/AsyncIteratorTestTools.scala
Scala
apache-2.0
2,905
package uk.gov.gds.ier.validation.constraints import play.api.data.validation.{Invalid, Valid, Constraint} import uk.gov.gds.ier.model.{Country} import uk.gov.gds.ier.validation.FormKeys import uk.gov.gds.ier.transaction.ordinary.InprogressOrdinary trait CountryConstraints { self: FormKeys => lazy val validCountr...
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/validation/constraints/CountryConstraints.scala
Scala
mit
1,177
package week3.lists trait List[T] { def isEmpty : Boolean def head : T def tail : List[T] def nth(n: Int): T = nthInner(n, this) private def nthInner[T](n: Int, xs: List[T]): T = if (xs.isEmpty) throw new IndexOutOfBoundsException else if (n == 0) xs.head else nthInner(n- 1, x...
juliocnsouzadev/scala_datascience
fuctional_programming_principles/fpps-notes/src/week3/lists/List.scala
Scala
mit
330
package scalaprops import scalaz._ final class ScalazLaw private (val ord: Int, val fullName: String, val simpleName: String) { override def hashCode = ord override def toString = simpleName } object ScalazLaw { private[this] val set = scala.collection.mutable.Set.empty[ScalazLaw] private[this] def law(full...
scalaprops/scalaprops
scalaz/src/main/scala/scalaprops/ScalazLaw.scala
Scala
mit
10,061
package isabelle.eclipse.core.internal import org.eclipse.core.runtime.{IStatus, Plugin, Status} import org.osgi.framework.BundleContext import isabelle.eclipse.core.app.Isabelle /** * @author Andrius Velykis */ object IsabelleCorePlugin { // The shared instance private var instance: IsabelleCorePlugin = _ ...
andriusvelykis/isabelle-eclipse
isabelle.eclipse.core/src/isabelle/eclipse/core/internal/IsabelleCorePlugin.scala
Scala
epl-1.0
1,443
package composition.webserviceclients.vrmassigneligibility import com.tzavellas.sse.guice.ScalaModule import composition.webserviceclients.vrmassigneligibility.TestVrmAssignEligibilityWebServiceBinding.createResponse import org.mockito.Matchers.any import org.mockito.Mockito.when import org.scalatest.mock.MockitoSugar...
dvla/vrm-assign-online
test/composition/webserviceclients/vrmassigneligibility/TestVrmAssignEligibilityWebServiceBinding.scala
Scala
mit
2,848
object Local { def foo() = { val aaa = 239 prntln(<ref>aaa) } }
ilinum/intellij-scala
testdata/resolve/local/local1.scala
Scala
apache-2.0
76
package org.jetbrains.plugins.scala package util import java.awt.{Point, Rectangle} import com.intellij.openapi.command.CommandProcessor import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.openapi.ui.popup.util.BaseListPopupStep import com.intellij.openapi.ui.popu...
jeantil/intellij-scala
src/org/jetbrains/plugins/scala/util/IntentionUtils.scala
Scala
apache-2.0
10,720
package home.yang.dataflow /** * Created by Administrator on 2016/5/2 0002. */ abstract class Filter[T](isPass:(Ordered[T])=>Boolean) extends ValueMapper{ def keyName:String }
wjingyao2008/firsttry
dataflow/src/main/scala/home/yang/dataflow/Filter.scala
Scala
apache-2.0
185
/* * Copyright 2016 The BigDL 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 applicable law or agr...
jenniew/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/torch/PowerSpec.scala
Scala
apache-2.0
3,878
/* * Monkeyman static web site generator * Copyright (C) 2013 Wilfred Springer * * 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 2 * of the License, or (at your option) an...
wspringer/monkeyman
src/main/scala/nl/flotsam/monkeyman/decorator/less/LessDecorator.scala
Scala
gpl-2.0
1,502
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
maropu/spark
resource-managers/mesos/src/main/scala/org/apache/spark/deploy/mesos/ui/DriverPage.scala
Scala
apache-2.0
6,355
/* * 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/handler/DocumentLibraryFileTypeHandler.scala
Scala
agpl-3.0
3,359
package name.abhijitsarkar.akka import akka.actor.LoggingFSM import akka.actor.ActorLogging import akka.actor.Actor object OrderSystem { sealed trait State case object OrderPending extends State case object OrderPlaced extends State case object OrderReady extends State case object OrderClosed extends State ...
asarkar/akka
order-fsm/src/main/scala/name/abhijitsarkar/akka/OrderSystem.scala
Scala
gpl-3.0
2,807
package go3d class Move(val position: Position, val color: Color) extends HasColor: def this(x: Int, y: Int, z:Int, col: Color) = this(Position(x, y, z), col) def x: Int = position.x def y: Int = position.y def z: Int = position.z override def toString: String = s"$position $color" override def hashCode()...
lene/go-3
src/main/scala/Move.scala
Scala
gpl-2.0
506
package test import net.minecraft.command.ICommandSender import net.minecraft.entity.Entity import net.minecraft.nbt.NBTTagCompound import net.minecraft.world.World /** * * * @author TheTemportalist 2/8/15 */ class EntityTestS(world: World) extends Entity(world) with ICommandSender { override def entityInit(): ...
TheTemportalist/Test
src/main/scala/test/EntityTestS.scala
Scala
apache-2.0
478
package domain.models.response sealed trait Response case class SimpleResponse(message: String) extends Response /** * Class used as a response in REST api methods (eShopRestApi module) */ case class FSMProcessInfoResponse(state: String, data: String, ...
kkrzys/eShop
eShop-core/src/main/scala/domain/models/response/Response.scala
Scala
apache-2.0
361