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
/* Copyright (c) 2010-2012, The University of Manchester All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of c...
chrisseaton/dfscala-benchmarks
src/main/scala/eu/teraflux/uniman/dataflow/benchmark/Fibonacci.scala
Scala
bsd-3-clause
2,117
package redis package algebra package interpreter package nonblocking import com.redis.RedisClient import java.util.UUID import akka.actor.ActorSystem import akka.io.Tcp import akka.util.Timeout import org.specs2._, specification._ import scala.concurrent.duration.Duration import scalaz.{CharSet, Free, NonEmptyLi...
ethul/redis-algebra-interpreter
src/test/scala/redis/algebra/interpreter/nonblocking/interpreter.scala
Scala
mit
2,253
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/test/scala/org/neo4j/cypher/internal/compiler/v2_3/planner/logical/steps/SelectCoveredTest.scala
Scala
apache-2.0
4,229
/* * 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 package runtime ...
martijnhoekstra/scala
src/library/scala/runtime/RichByte.scala
Scala
apache-2.0
990
package reactivemongo.api.indexes import reactivemongo.api.{ Collation, Serialization, SerializationPack } /** * A MongoDB index (excluding the namespace). * * Consider reading [[http://www.mongodb.org/display/DOCS/Indexes the documentation about indexes in MongoDB]]. * * {{{ * import reactivemongo.api.bson.BSO...
ReactiveMongo/ReactiveMongo
driver/src/main/scala/api/indexes/Index.scala
Scala
apache-2.0
12,740
package tests.rescala.events import tests.rescala.RETests class AND_EventTest extends RETests { allEngines("handler Of AND Is NOT Executed If Events Fire Singularly"){ engine => import engine._ var test = 0 val e1 = Evt[Int] val e2 = Evt[Int] val e1_AND_e2 = e1 zip e2 e1_AND_e2 += ((x: (In...
volkc/REScala
Tests/shared/src/test/scala/tests/rescala/events/AND_EventTest.scala
Scala
apache-2.0
1,148
package com.pjanof.io import akka.actor.{ Actor, ActorLogging, ActorRef, Props, SupervisorStrategy } import akka.io.{ IO, Tcp } import akka.util.ByteString import com.typesafe.config.{ Config, ConfigFactory } import java.net.InetSocketAddress /** * background * TCP connection actor does not support internal b...
peterjanovsky/akka-examples
src/main/scala/com/pjanof/io/WriteBackPressure.scala
Scala
mit
8,350
package ai.x.example import ai.x.lens._ object Example3{ def _main(args: Array[String]): Unit = { println("Starting") println("-"*80) println() abstract class Indirect[T]{ def map[R]( f: T => R ): Indirect[R] def flatMap[R]( f: T => Indirect[R] ): Indirect[R] = ??? de...
cvogt/talk-2015-11-10
src/main/scala/Example3.scala
Scala
bsd-2-clause
3,507
/* * 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 n...
guozhangwang/kafka
core/src/test/scala/kafka/security/minikdc/MiniKdcTest.scala
Scala
apache-2.0
1,805
package io.vamp.model.event import io.vamp.model.event.Aggregator.AggregatorType object Aggregator extends Enumeration { type AggregatorType = Aggregator.Value val min, max, average, sum, count = Value } case class Aggregator(`type`: AggregatorType, field: Option[String] = None) trait AggregationResult trait ...
magneticio/vamp
model/src/main/scala/io/vamp/model/event/Aggregator.scala
Scala
apache-2.0
600
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
jedesah/Quasar
connector/src/main/scala/quasar/qscript/analysis/Cost.scala
Scala
apache-2.0
5,734
/** * Created by basti on 3/7/14. */ trait TestUtils { def assertStringEquals(s1 : String, s2 : String) = assert( s1 == s2 ) }
dr03lf/gpx-parser
src/test/scala/TestUtils.scala
Scala
apache-2.0
133
/* * 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/models/moneyservicebusiness/SendTheLargestAmountsOfMoneySpec.scala
Scala
apache-2.0
4,352
// MultipleClassArgs.scala import com.atomicscala.AtomicTest._ class Sum3(a1:Int, a2:Int, a3:Int) { def result():Int = { a1 + a2 + a3 } } new Sum3(13, 27, 44).result() is 84
P7h/ScalaPlayground
Atomic Scala/atomic-scala-examples/examples/19_Class Arguments/MultipleClassArgs.scala
Scala
apache-2.0
178
/* * 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 t...
jkdcdlly/zipkin
zipkin-cassandra/src/main/scala/com/twitter/zipkin/storage/cassandra/CassandraSpanStore.scala
Scala
apache-2.0
12,671
import scala.reflect.Selectable.reflectiveSelectable object Test { class C { type S = String; type I } class D extends C { type I = Int } type Foo = { def sel0: Int def sel1: Int => Int def fun0(x: Int): Int def fun1(x: Int)(y: Int): Int def fun2(x: Int): Int => Int def fun3(a1: Int, a2...
som-snytt/dotty
tests/run/structural.scala
Scala
apache-2.0
2,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 ...
brad-kaiser/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/BroadcastExchangeExec.scala
Scala
apache-2.0
5,908
package com.topper.plugin import com.topper.util.FileIO._ object Output { def quote(int: Int) = "\\"" + int.toString + "\\"" def write(graph: Graph) = { Log("writing extracted type relations and call graph...") val projectName = PluginArgs.projectName val nodes = graph.nodes val edges = graph.e...
gtopper/extractor
src/main/scala/com/topper/plugin/Output.scala
Scala
mit
2,122
//class Parser[S] //class ParseError package scratchpad.parsers import fpinscala.testing.{Prop, Gen} /* Laws = p(x) | p(y) */ object Main { def main(args: Array[String]) = { println("Hi") } } trait Parsers[ParseError, Parser[+_]] { self => implicit def operators[A](p: Parser[A]) = ParserOps[A](p) ...
waxmittmann/fpinscala
answers/src/main/scala/scratchpad/done/Parser.scala
Scala
mit
3,488
/** * @author Victor Caballero (vicaba) * @author Xavier Domingo (xadobu) */ package actors.node.protocol.when import actors.ComposableActor import akka.actor.{Props, ActorRef} import scala.collection.mutable import scala.concurrent.duration.FiniteDuration import scala.concurrent.duration._ /** * Message that ...
vicobu/DistributedSystem
src/main/scala/actors/node/protocol/when/Conditions.scala
Scala
mit
3,187
package com.cyrusinnovation.computation /* * Copyright 2014 Cyrus Innovation, LLC. Licensed under Apache license 2.0. */ /** Contains the facts to be operated on in a computation as well as metadata indicating * whether the caller should continue or not (e.g., if the caller is a sequence of * computations). */ c...
psfblair/computation-engine
core/src/main/scala/com/cyrusinnovation/computation/Domain.scala
Scala
apache-2.0
906
package core.pagelet.entity import cz.kamenitxan.jakon.validation.validators.NotEmpty /** * Created by TPa on 15.04.2020. */ class TestJsonPageletData { @NotEmpty var msg: String = _ }
kamenitxan/Jakon
modules/backend/src/test/scala/core/pagelet/entity/TestJsonPageletData.scala
Scala
bsd-3-clause
193
/* * La Trobe University - Distributed Deep Learning System * Copyright 2016 Matthias Langer (t3l@threelights.de) * * 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...
bashimao/ltudl
blaze/src/main/scala/edu/latrobe/blaze/regularizers/L2WeightDecay.scala
Scala
apache-2.0
2,588
import bintray.Plugin._ import sbt._ import sbt.Keys._ import sbtrelease.ReleasePlugin.ReleaseKeys._ import sbtrelease.ReleasePlugin._ object ApplicationBuild extends Build { val scala11Version = "2.11.7" val main = Project("total-map", file(".")).settings( useGlobalVersion := false, organization := "com....
boldradius/total-map
project/Build.scala
Scala
apache-2.0
1,242
class Hello1(greeting: String) { private[this] def talk = println(greeting) def speak = talk }
grzegorzbalcerek/scala-book-examples
examples/PrivateThis1.scala
Scala
mit
99
/* * Copyright 2011 javaBin * 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 agree...
javaBin/submitit
submitit-webapp/src/main/scala/no/java/submitit/app/pages/ReviewPage.scala
Scala
mit
8,992
package com.sopranoworks.bolt import java.io.ByteArrayInputStream import com.google.cloud.spanner.{ResultSet, ResultSets, Struct, Type, Value => SValue} import com.sopranoworks.bolt.values._ import org.antlr.v4.runtime.{ANTLRInputStream, BailErrorStrategy, CommonTokenStream} import org.specs2.mutable.Specification i...
OsamuTakahashi/bolt
src/test/scala/com/sopranoworks/bolt/WhereTest.scala
Scala
mit
8,303
/* * The MIT License (MIT) * * Copyright (c) 2013 Association du Paris Java User Group. * * 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 limitat...
CodeursEnSeine/cfp-2015
app/controllers/SecureCFPController.scala
Scala
mit
6,815
package org.geomesa.nifi.fs import org.apache.nifi.annotation.behavior.InputRequirement.Requirement import org.apache.nifi.annotation.behavior.{InputRequirement, SupportsBatching} import org.apache.nifi.annotation.documentation.{CapabilityDescription, Tags} import org.apache.nifi.components.PropertyDescriptor import o...
jahhulbert-ccri/geomesa-nifi
geomesa-nifi-processors-fs/src/main/scala/org/geomesa/nifi/fs/PutGeoMesaFileSystem.scala
Scala
apache-2.0
2,226
package cakesolutions /** * Case class holding solver result. * * @param left Left co-ordinate of the blob * @param right Right co-ordinate of the blob * @param top Top co-ordinate of the blob * @param bottom Bottom co-ordinate of the blob * @param reads Number of reads of the grid */ case class Result(...
carlpulley/blob
src/main/scala/cakesolutions/Solver.scala
Scala
gpl-2.0
1,726
package scommons.client.ui.popup import scommons.client.ui.Buttons import scommons.client.ui.icon.IconCss import scommons.react.test.TestSpec import scommons.react.test.raw.ShallowInstance import scommons.react.test.util.ShallowRendererUtils class OkPopupSpec extends TestSpec with ShallowRendererUtils { it should ...
viktor-podzigun/scommons
ui/src/test/scala/scommons/client/ui/popup/OkPopupSpec.scala
Scala
apache-2.0
3,178
package epam.idobrovolskiy.wikipedia.trending.cli import epam.idobrovolskiy.wikipedia.trending.preprocessing.PreprocessingTarget /** * Created by Igor_Dobrovolskiy on 26.07.2017. */ case class WikiPrepArgs ( path: String, target: PreprocessingTarget.Value, fullText: Boolean, extractToPath: String, extr...
igor-dobrovolskiy-epam/wikipedia-analysis-scala-core
src/main/scala/epam/idobrovolskiy/wikipedia/trending/cli/WikiPrepArgs.scala
Scala
apache-2.0
371
package kpi.twitter.analysis.tools.kafka import java.io.File import java.util.{Properties, Scanner, UUID} import scala.util.Random import org.apache.commons.io.FileUtils import org.apache.curator.test.TestingServer import org.apache.log4j.Logger import kafka.admin.AdminUtils import kafka.server.{KafkaConfig, KafkaSer...
GRpro/TwitterAnalytics
tools/src/main/scala/kpi/twitter/analysis/tools/kafka/KafkaZookeeper.scala
Scala
apache-2.0
3,460
package scala.reflect.internal.util import org.junit.Assert.{ assertThrows => _, _ } import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.JUnit4 import scala.tools.testkit.AssertUtil._ @RunWith(classOf[JUnit4]) class SourceFileTest { def lineContentOf(code: String, offset: Int) = Posi...
scala/scala
test/junit/scala/reflect/internal/util/SourceFileTest.scala
Scala
apache-2.0
3,747
package net.gree.aurora.scala.domain.clustergroup import net.gree.aurora.domain.clustergroup.ClusterGroupRepositoryFactory import net.gree.aurora.domain.clustergroup.{ClusterGroupRepository => JClusterGroupRepository} import org.sisioh.dddbase.core.lifecycle.sync.SyncRepository import scala.language.implicitConversion...
gree/aurora
aurora-scala/src/main/scala/net/gree/aurora/scala/domain/clustergroup/ClusterGroupRepository.scala
Scala
mit
1,597
class ScalaSteps { @org.jbehave.core.annotations.Given("a date of $date") def aDate(date: java.util.Date) { org.junit.Assert.assertNotNull(date) } @org.jbehave.core.annotations.When("$days days pass") def daysPass(days: Int) { org.junit.Assert.assertNotNull(days) } @org.jbehave.core.annot...
irfanah/jbehave-core
examples/scala/src/main/scala/ScalaSteps.scala
Scala
bsd-3-clause
490
package org.scalatest.tools import scala.collection.mutable.ListBuffer import org.apache.tools.ant.BuildException import org.apache.tools.ant.Task import org.apache.tools.ant.types.Path import org.apache.tools.ant.AntClassLoader import org.apache.tools.ant.taskdefs.Java /** * <p> * An ant task to run ScalaTest. Ins...
svn2github/scalatest
src/main/scala/org/scalatest/tools/ScalaTestAntTask.scala
Scala
apache-2.0
29,674
package java.util import scala.collection.mutable class LinkedHashMap[K, V] private (inner: mutable.LinkedHashMap[Box[K], V], accessOrder: Boolean) extends HashMap[K, V](inner) { self => def this() = this(mutable.LinkedHashMap.empty[Box[K], V], false) def this(initialCapacity: Int, loadFactor: Float, ...
jmnarloch/scala-js
javalib/src/main/scala/java/util/LinkedHashMap.scala
Scala
bsd-3-clause
1,691
import org.specs2.matcher.ParserMatchers import org.specs2.mutable.Specification import space.armada.vex.parsers.CalculatorParser class CalculatorParserSpec extends Specification with ParserMatchers { val parsers = CalculatorParser "CalculatorParser.apply" should { "calculate the addition of two integers" >> {...
ripta/vex
src/test/scala/space/armada/vex/parsers/calculator_parser_spec.scala
Scala
mit
915
/* * 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 ...
rlugojr/incubator-eagle
eagle-core/eagle-application-management/eagle-stream-application-manager/src/main/scala/org/apache/eagle/stream/application/scheduler/AppCommandLoader.scala
Scala
apache-2.0
3,342
package io.aos.ebnf.spl.driver.es import org.elasticsearch.search.facet.FacetBuilder import org.elasticsearch.common.xcontent.XContentBuilder import org.elasticsearch.common.xcontent.ToXContent.Params import org.elasticsearch.search.builder.SearchSourceBuilderException class DistinctDateHistogramFacetBuilder(name: St...
echalkpad/t4f-data
parser/ebnf/src/main/scala/io/aos/ebnf/spl/driver/es/DistinctDateHistogramFacetBuilder.scala
Scala
apache-2.0
1,778
package scalariform.lexer abstract sealed class HiddenToken(val token: Token) { lazy val newlineful = token.text contains '\\n' def text = token.text def rawText = token.rawText } case class Whitespace(override val token: Token) extends HiddenToken(token) sealed abstract class Comment(token: Token) extends...
tkawachi/scalariform
scalariform/src/main/scala/scalariform/lexer/HiddenToken.scala
Scala
mit
652
/* * 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 ...
WindCanDie/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/AggregateBenchmark.scala
Scala
apache-2.0
18,539
package mimir.parser import fastparse._, NoWhitespace._ import sparsity.parser._ object MimirKeyword { def any[_:P] = P( Elements.anyKeyword | ( StringInIgnoreCase( "ADAPTIVE", "ANALYZE", "ASSIGNMENTS", "COMPARE", "DRAW", "FEATURES", "FEEDBACK", ...
UBOdin/mimir
src/main/scala/mimir/parser/MimirKeyword.scala
Scala
apache-2.0
768
package org.jetbrains.plugins.scala.lang.dfa.invocationInfo import com.intellij.psi.{PsiElement, PsiMember, PsiNamedElement} import org.jetbrains.plugins.scala.extensions.{ObjectExt, PsiMemberExt, PsiNamedElementExt} import org.jetbrains.plugins.scala.lang.psi.api.statements.ScFunction import org.jetbrains.plugins.sca...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/dfa/invocationInfo/InvokedElement.scala
Scala
apache-2.0
1,882
package akkaviz.serialization.serializers import akkaviz.serialization.{AkkaVizSerializer, SerializationContext} import upickle.Js case object ThrowableSerializer extends AkkaVizSerializer { override def canSerialize(obj: scala.Any): Boolean = obj match { case t: Throwable => true case _ => false...
blstream/akka-viz
monitoring/src/main/scala/akkaviz/serialization/serializers/ThrowableSerializer.scala
Scala
mit
572
/* * Copyright 2010-2011 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
lift/framework
core/common/src/main/scala/net/liftweb/common/Conversions.scala
Scala
apache-2.0
6,415
package com.github.aselab.activerecord import play.api._ import Play.current class ActiveRecordPlugin extends Plugin { implicit val classLoader = Play.application.classloader lazy val activeRecordTables = current.configuration.getConfig("schema") .map(_.keys).getOrElse(List("models.Tables")).map(ActiveRecordT...
xdougx/scala-activerecord
play2/src/main/scala/ActiveRecordPlugin.scala
Scala
mit
485
package com.taig.tmpltr.engine.html.property import com.taig.tmpltr.Property trait form { class method(method: String) extends Property( method ) object method { object get extends method( "GET" ) object post extends method( "POST" ) } }
Taig/Play-Tmpltr
app/com/taig/tmpltr/engine/html/property/form.scala
Scala
mit
247
package test.scala import org.specs.Specification import org.specs.mock.Mockito import com.protose.resque._ import com.protose.resque.Machine._ import java.net.InetAddress import java.lang.management.ManagementFactory object MachineSpec extends Specification with Mockito { "returns the hostname" in { hostn...
jamesgolick/scala-resque-worker
src/test/scala/MachineSpec.scala
Scala
mit
556
package dotty package tools package dotc import scala.language.unsafeNulls import java.io.{File => JFile} import java.nio.file.{Files, Path, Paths} import org.junit.Assume.assumeTrue import org.junit.{AfterClass, Test} import org.junit.experimental.categories.Category import scala.concurrent.duration._ import vulpi...
lampepfl/dotty
compiler/test/dotty/tools/dotc/IdempotencyTests.scala
Scala
apache-2.0
2,583
package ohnosequences.bio4j.tests import java.io._ import org.scalatest._ import ohnosequences.statika.cli.StatikaEC2._ import ohnosequences.awstools.ec2._ import ohnosequences.awstools.ec2.{Tag => Ec2Tag} import ohnosequences.typesets._ import ohnosequences.statika._ import ohnosequences.statika.aws._ import ohnose...
bio4j/modules
modules/src/test/scala/Bio4jReleaseTest.scala
Scala
agpl-3.0
1,205
package io.finch.petstore import com.twitter.finagle.Service import com.twitter.finagle.httpx.{FileElement, Request, RequestBuilder, Response} import com.twitter.io.{Buf, Reader} import com.twitter.util.{Duration, Await} import io.finch.test.ServiceSuite import org.scalatest.Matchers import org.scalatest.fixture.FlatS...
yonglehou/finch
petstore/src/test/scala/io/finch/petstore/PetstorePetServiceSpec.scala
Scala
apache-2.0
7,612
/* * Copyright (c) 2019. Yuriy Stul */ package com.stulsoft.poc.json.json4s import org.json4s.DefaultFormats import org.json4s.JsonAST.{JArray, JField, JObject, JString} import org.json4s.jackson.JsonMethods.parse import scala.io.Source /** Finds a JSON objects with same value of <i>name</i> field * * @author Y...
ysden123/poc
scala-json/src/main/scala/com/stulsoft/poc/json/json4s/FindDuplicates2.scala
Scala
mit
1,173
/**************************************************************************** * Copyright (C) 2015 Łukasz Szpakowski. * * * * This software is licensed under the GNU General Public License * * v3 ...
luckboy/IssueNotifier
src/main/scala/pl/luckboy/issuenotifier/BootReceiver.scala
Scala
gpl-3.0
972
/************************************************************************ Tinaviz ************************************************************************* This application is part of the Tinasoft project: http://tinasoft.eu Tinaviz main developer: julian.bilcke @ iscpif.fr (twitter...
moma/tinaviz
src/main/scala/eu/tinasoft/tinaviz/graph/Metrics.scala
Scala
gpl-3.0
17,652
/* * 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/ct600/v2/calculations/MarginalRateReliefCalculator.scala
Scala
apache-2.0
3,269
package com.spike.giantdataanalysis.spark package object streaming { }
zhoujiagen/giant-data-analysis
temporal-data-and-realtime-algorithm/temporal-apache-spark-streaming/src/main/scala/com/spike/giantdataanalysis/spark/streaming/package.scala
Scala
mit
74
/* * 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 ...
mbode/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/rules/logical/PythonScalarFunctionSplitRuleTest.scala
Scala
apache-2.0
3,984
package com.s3dropbox.lambda import org.json4s.{Formats, NoTypeHints} import org.json4s.jackson.JsonMethods import java.io.ByteArrayInputStream /** * Manifest contains information about the target Dropbox App folder. */ case class Manifest(fileStates: List[FileState]) { def filenamesToRemove(oldManifest: Manif...
ErrorsAndGlitches/S3DropboxLambda
src/main/scala/com/s3dropbox/lambda/Manifest.scala
Scala
mit
870
package org.nikosoft.oanda.bot.scalping import org.joda.time.Duration import org.nikosoft.oanda.bot.scalping.Model.PositionType.PositionType import org.nikosoft.oanda.bot.scalping.Model.TradeType.TradeType import org.nikosoft.oanda.instruments.Model.CandleStick import org.nikosoft.oanda.instruments.Oscillators.MACDIte...
cnnickolay/forex-trader
trading-bot/src/main/scala/org/nikosoft/oanda/bot/scalping/Model.scala
Scala
mit
3,446
package org.clulab.utils import org.scalatest.FlatSpec import org.scalatest.Matchers class TestThreading extends FlatSpec with Matchers { val threads = 26 val numbers = 0.until(threads) { val parNumbers = ThreadUtils.parallelize(numbers, threads) parNumbers.foreach { number => println(number) ...
sistanlp/processors
main/src/test/scala/org/clulab/utils/TestThreading.scala
Scala
apache-2.0
330
/* * 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...
yiheng/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/visualization/tensorboard/FileWriter.scala
Scala
apache-2.0
2,719
/* * 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 ...
wangmiao1981/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/PythonUDF.scala
Scala
apache-2.0
3,207
/* * Copyright 2014 Lars Edenbrandt * * 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...
slicebox/slicebox
src/main/scala/se/nimsa/sbx/anonymization/AnonymizationProfile.scala
Scala
apache-2.0
3,553
package com.ecfront.ez.framework.service.auth.manage import com.ecfront.ez.framework.core.rpc.RPC import com.ecfront.ez.framework.service.auth.model.EZ_Resource import com.ecfront.ez.framework.service.jdbc.BaseStorage import com.ecfront.ez.framework.service.jdbc.scaffold.SimpleRPCService /** * 资源管理 */ @RPC("/ez/a...
gudaoxuri/ez-framework
services/auth/src/main/scala/com/ecfront/ez/framework/service/auth/manage/ResourceService.scala
Scala
apache-2.0
514
/* * 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 app...
Frannie-Ludmilla/sparta
plugins/src/main/scala/com/stratio/sparta/plugin/cube/operator/mode/ModeOperator.scala
Scala
apache-2.0
1,658
/* Copyright (C) 2008-2014 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
patverga/factorie
src/main/scala/cc/factorie/variable/CategoricalVectorVariable.scala
Scala
apache-2.0
4,688
package org.jetbrains.plugins.scala.editor.importOptimizer import java.util.regex.Pattern import com.intellij.openapi.project.Project import org.jetbrains.plugins.scala.codeInspection.scalastyle.ScalastyleCodeInspection import org.jetbrains.plugins.scala.lang.formatting.settings.ScalaCodeStyleSettings /** * @autho...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/editor/importOptimizer/OptimizeImportSettings.scala
Scala
apache-2.0
2,317
/* * 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
examples/spark/src/main/scala/org/apache/carbondata/examples/DataUpdateDeleteExample.scala
Scala
apache-2.0
6,016
package org.jetbrains.plugins.scala package lang package psi package api package statements import org.jetbrains.plugins.scala.lang.psi.api.base.ScPatternList import org.jetbrains.plugins.scala.lang.psi.api.base.patterns.ScBindingPattern import org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression /** * @author...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/api/statements/ScVariableDefinition.scala
Scala
apache-2.0
952
package org.jetbrains.plugins.scala.testingSupport.scalatest.fileStructureView import org.jetbrains.plugins.scala.testingSupport.IntegrationTest import org.jetbrains.plugins.scala.lang.structureView.elements.impl.TestStructureViewElement._ import org.jetbrains.plugins.scala.testingSupport.test.structureView.TestNodePr...
triggerNZ/intellij-scala
test/org/jetbrains/plugins/scala/testingSupport/scalatest/fileStructureView/FreeSpecFileStructureViewTest.scala
Scala
apache-2.0
2,309
/** * Licensed to Gravity.com under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Gravity.com licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use th...
lloydmeta/gander
src/main/scala/gander/text/StringSplitter.scala
Scala
apache-2.0
1,238
/* * 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/test/scala/com/fulcrumgenomics/cmdline/ClpTests.scala
Scala
mit
2,705
/* * 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 * distrib...
fusepoolP3/p3-silk
silk-learning/src/main/scala/de/fuberlin/wiwiss/silk/learning/reproduction/AggregationOperatorsCrossover.scala
Scala
apache-2.0
1,155
/* * Skylark * http://skylark.io * * Copyright 2012-2017 Quantarray, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unl...
quantarray/skylark
skylark-measure/src/main/scala/com/quantarray/skylark/measure/EnergyPricePerDimensionlessConverter.scala
Scala
apache-2.0
1,731
/* * Copyright (c) 2012-2016 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...
simplybusiness/snowplow-fork
3-enrich/scala-common-enrich/src/test/scala/com.snowplowanalytics.snowplow.enrich.common/enrichments/registry/apirequest/OutputSpec.scala
Scala
apache-2.0
2,680
package com.twitter.finagle.http2.transport.client import com.twitter.finagle.Stack import com.twitter.finagle.http2.MultiplexHandlerBuilder import com.twitter.finagle.http2.transport.client.H2Pool.OnH2Service import com.twitter.finagle.http2.transport.common.H2StreamChannelInit import com.twitter.finagle.netty4.Netty...
twitter/finagle
finagle-http2/src/main/scala/com/twitter/finagle/http2/transport/client/UpgradeRequestHandler.scala
Scala
apache-2.0
6,385
package org.kanyec.ast import org.objectweb.asm.MethodVisitor import org.objectweb.asm.Opcodes._ import org.kanyec.SymbolTable case class CallReadMethodNode(returnVar: String) extends StatementNode{ def generate(mv: MethodVisitor, symbolTable: SymbolTable) = { mv.visitTypeInsn(NEW, "java/util/Scanner"); mv....
nicksam112/kanyec
src/main/scala/org/kanyec/ast/CallReadMethodNode.scala
Scala
apache-2.0
672
/* * Copyright (C) 2016-2017 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.maven import java.net.URLClassLoader import javax.inject.{ Inject, Singleton } import org.eclipse.aether.artifact.Artifact /** * Implements sharing of Scala classloaders, to save on memory */ @Singleton class S...
edouardKaiser/lagom
dev/maven-plugin/src/main/scala/com/lightbend/lagom/maven/ScalaClassLoaderManager.scala
Scala
apache-2.0
2,285
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
scalatest/scalatest
jvm/scalatest-test/src/test/scala/org/scalatest/ClueSpec.scala
Scala
apache-2.0
10,156
/* * 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 ...
starpit/openwhisk
core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/kubernetes/KubernetesClient.scala
Scala
apache-2.0
17,865
package com.github.gdefacci.briscola.spec.tournament import com.github.gdefacci.ddd._ import com.github.gdefacci.bdd._ import testkit.Predicates._ import com.github.gdefacci.briscola.player._ import com.github.gdefacci.briscola.tournament._ import com.github.gdefacci.briscola.competition.SingleMatch import com.github...
gdefacci/briscola
ddd-briscola/src/test/scala/com/github/gdefacci/briscola/spec/tournament/TournamentFeatures.scala
Scala
bsd-3-clause
4,423
package co.spendabit.webapp.forms.controls import org.apache.commons.fileupload.FileItem class FileUploadInput(label: String, name: String) extends Field[FileItem](label) { def validate(params: Map[String, Seq[String]], fileItems: Seq[FileItem]): Either[String, FileItem] = { fileItems.fi...
spendabit/webapp-tools
src/co/spendabit/webapp/forms/controls/FileUploadInput.scala
Scala
unlicense
668
package com.peim.http.api import akka.http.scaladsl.model.StatusCodes._ import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server.Route import akka.http.scaladsl.server.directives.MarshallingDirectives.{as, entity} import com.peim.model.Account import com.peim.model.response.IdWrapper import com.p...
peim/money-transfer-service
src/main/scala/com/peim/http/api/AccountsServiceApi.scala
Scala
mit
1,461
package llsm import org.scijava.Context trait BenchmarkContext { val context: Context = new Context }
keithschulze/llsm
benchmark/src/main/scala/llsm/context.scala
Scala
mit
107
package io.rout import scalatags.Text._ import scalatags.Text.all._ package object html { val bs = io.rout.html.BootstrapCss val tag = scalatags.Text.all // def scalaTag[A](a: Seq[A]) = tag.a(a.map(e => li(e.toString))) def scalaTag[A](f :A => TypedTag[String]) = f def scalaModifier[A](f: A => Modifier)...
teodimoff/rOut
html/src/io/rout/html/package.scala
Scala
apache-2.0
482
package controller import java.util.Locale import lib.{ SessionAttribute, Util } import model.User import skinny.PermittedStrongParameters import skinny.controller.feature.{ FlashFeature, LocaleFeature, RequestScopeFeature } import skinny.filter._ import skinny.micro.SkinnyMicroBase import skinny.micro.context.Skinny...
atware/sharedocs
src/main/scala/controller/ControllerBase.scala
Scala
mit
2,324
package kr.debop.catalina.session.serializer import java.io.{ByteArrayInputStream, ByteArrayOutputStream} import de.ruedigermoeller.serialization.FSTConfiguration import kr.debop.catalina.session._ import org.slf4j.LoggerFactory import scala.util.{Failure, Success, Try} object FstSerializer { lazy val defaultCfg...
debop/tomcat-session-redis
src/main/scala/kr/debop/catalina/session/serializer/FstSerializer.scala
Scala
lgpl-3.0
1,622
package org.jetbrains.plugins.scala.lang.resolve2 /** * Pavel.Fatin, 02.02.2010 */ class ScopeElementTest extends ResolveTestBase { override def folderPath: String = { super.folderPath + "scope/element/" } def testBlock() = doTest() def testCaseClass() = doTest() def testClass() = doTest() def tes...
katejim/intellij-scala
test/org/jetbrains/plugins/scala/lang/resolve2/ScopeElementTest.scala
Scala
apache-2.0
403
package dotty.tools.languageserver.worksheet import dotty.tools.dotc.core.Contexts.Context import dotty.tools.dotc.util.SourcePosition import dotty.tools.dotc.interactive.InteractiveDriver import dotty.tools.languageserver.DottyLanguageServer import dotty.tools.languageserver.DottyLanguageServer.range import org.ecli...
som-snytt/dotty
language-server/src/dotty/tools/languageserver/worksheet/WorksheetService.scala
Scala
apache-2.0
2,097
package edu.gemini.itc.baseline import edu.gemini.itc.baseline.util._ import edu.gemini.itc.shared.GnirsParameters import edu.gemini.spModel.gemini.gnirs.GNIRSParams._ import edu.gemini.spModel.core.WavelengthConversions._ /** * GNIRS baseline test fixtures. */ object BaselineGnirs { lazy val Fixtures = KBandSpe...
spakzad/ocs
bundle/edu.gemini.itc/src/test/scala/edu/gemini/itc/baseline/BaselineGnirs.scala
Scala
bsd-3-clause
2,952
package com.twitter.finagle.memcached.util import com.twitter.io.Buf import scala.collection.mutable.ArrayBuffer object ParserUtils { // Used by byteArrayStringToInt. The maximum length of a non-negative Int in chars private[this] val MaxLengthOfIntString = Int.MaxValue.toString.length private[this] object is...
twitter/finagle
finagle-memcached/src/main/scala/com/twitter/finagle/memcached/util/ParserUtils.scala
Scala
apache-2.0
2,034
package recipes import java.util.concurrent.ThreadLocalRandom trait TimeWindows { private def show(acc: Long, sec: Long) = s" ★ ★ ★ ${Thread.currentThread.getName}: count:$acc interval: $sec sec ★ ★ ★ " def tumblingWindow(acc: fs.State[Long], timeWindow: Long): fs.State[Long] = if (System.currentTimeMil...
haghard/streams-recipes
src/main/scala/recipes/TimeWindows.scala
Scala
apache-2.0
988
package org.effechecka.selector case class OccurrenceSelector(taxonSelector: String = "", wktString: String = "", traitSelector: String = "", uuid: Option[String] = None, ttlSeconds: Option[Int] = None) { def withUUID: OccurrenceSelector = this.copy(uuid = Some(UuidUtils.uuidFor(this).toString)) }
effechecka/effechecka-selector
src/main/scala/org/effechecka/selector/OccurrenceSelector.scala
Scala
mit
302
/* * Copyright (c) 2014-2021 by The Monix Project Developers. * See the project homepage at: https://monix.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...
monix/monix
monix-execution/jvm/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala
Scala
apache-2.0
5,373
import sbt._ object Dependencies { val playJson = "com.typesafe.play" %% "play-json" % "2.6.10" withSources () }
codacy/codacy-api-scala
project/Dependencies.scala
Scala
mit
116
package com.twitter.finagle.http.filter import com.twitter.finagle._ import com.twitter.finagle.context.Contexts import com.twitter.finagle.filter.ServerAdmissionControl import com.twitter.finagle.http.{Fields, Method, Request, Response, Status} import com.twitter.finagle.stats.StatsReceiver import com.twitter.finagle...
luciferous/finagle
finagle-base-http/src/main/scala/com/twitter/finagle/http/filter/HttpNackFilter.scala
Scala
apache-2.0
6,292
package io.buoyant.namerd import com.twitter.finagle.http.{MediaType, Request, Response} import com.twitter.finagle.{Namer, Path, Service, SimpleFilter} import com.twitter.server.handler.ResourceHandler import com.twitter.util.Future import io.buoyant.admin.Admin.{Handler, NavItem} import io.buoyant.admin.names.Delega...
linkerd/linkerd
namerd/main/src/main/scala/io/buoyant/namerd/NamerdAdmin.scala
Scala
apache-2.0
4,653
/* Copyright 2009 David Hall, Daniel Ramage 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 writi...
scalanlp/breeze
math/src/main/scala/breeze/util/TopK.scala
Scala
apache-2.0
2,508