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 registration.auditor import models.{Topic, TopicTypes} import play.api.libs.ws.WSClient import scala.concurrent.{ExecutionContext, Future} import scala.util.Try case class LiveblogAuditor(wsClient: WSClient, config: AuditorApiConfig) extends Auditor { override def expiredTopics(topics: Set[Topic])(implici...
guardian/mobile-n10n
registration/app/registration/auditor/LiveBlogAuditor.scala
Scala
apache-2.0
1,092
package io.finch import java.util.UUID import cats.Eval import com.twitter.finagle.http.Method import com.twitter.util.{Base64StringEncoder, Future} import io.finch.internal.TooFastString import shapeless._ /** * A collection of [[Endpoint]] combinators. */ trait Endpoints { private[this] val hnilFutureOutput: ...
BenWhitehead/finch
core/src/main/scala/io/finch/Endpoints.scala
Scala
apache-2.0
8,379
package org.broadinstitute.dsde.firecloud.page.methodrepo import org.broadinstitute.dsde.firecloud.FireCloudConfig import org.broadinstitute.dsde.firecloud.component._ import org.broadinstitute.dsde.firecloud.component.Component._ import org.broadinstitute.dsde.firecloud.page.methodcommon.SelectConfigurationView impor...
broadinstitute/firecloud-ui
automation/src/test/scala/org/broadinstitute/dsde/firecloud/page/methodrepo/MethodDetailPage.scala
Scala
bsd-3-clause
2,199
package code package config import net.liftweb._ import common._ import http._ import json._ import mongodb._ import util.Props import com.mongodb.{DBAddress, MongoClient} object MongoConfig extends Factory with Loggable { // configure your MongoMetaRecords to use this. See lib/RogueMetaRecord.scala. val defaul...
jgenso/riego
src/main/scala/code/config/MongoConfig.scala
Scala
apache-2.0
1,647
package com.github.jeanadrien.gatling.mqtt.client import com.github.jeanadrien.gatling.mqtt.client.MqttQoS.MqttQoS import com.github.jeanadrien.gatling.mqtt.protocol.{MqttProtocolReconnectPart, MqttProtocolSocketPart, MqttProtocolThrottlingPart} import org.fusesource.mqtt.client.QoS._ /** * Concrete configuration a...
jeanadrien/gatling-mqtt-protocol
src/main/scala/com/github/jeanadrien/gatling/mqtt/client/MqttClientConfiguration.scala
Scala
apache-2.0
1,188
package chapter.five object ExerciseNine extends App { }
deekim/impatient-scala
src/main/scala/chapter/five/ExerciseNine.scala
Scala
apache-2.0
60
package fruits object Apple1 { def printMe(): Unit = println("Apple!") } class Apple2 { def printMe(): Unit = println("Pear") }
arcyfelix/Courses
18-10-18-Programming-in-Scala-by-Martin-Odersky-Lex-Spoon-and-Bill-Venners/37-Imports/src/fruits/Apple.scala
Scala
apache-2.0
131
/* * Copyright (C) 2020 MapRoulette contributors (see CONTRIBUTORS.md). * Licensed under the Apache License, Version 2.0 (see LICENSE). */ package org.maproulette.framework.model import org.joda.time.DateTime import org.maproulette.cache.CacheObject import org.maproulette.data.{ItemType} import org.maproulette.fram...
mgcuthbert/maproulette2
app/org/maproulette/framework/model/Project.scala
Scala
apache-2.0
2,188
/* * The MIT License (MIT) * * Copyright (c) 2015 Cayde Dixon * * 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 use, ...
cazzar/JukeboxReloaded
src/main/scala/net/cazzar/mods/jukeboxreloaded/network/message/ServerActionMessage.scala
Scala
mit
2,994
/* * Copyright (c) 2017 Xavier Defago (Tokyo Institute of Technology) * * 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 re...
xdefago/ocelot
src/main/scala/ocelot/topology/Topology.scala
Scala
apache-2.0
2,155
/* * Copyright (C) 2014-2015 by Nokia. * See the LICENCE.txt file distributed with this work for additional * information regarding copyright ownership. * * 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 o...
elyast/wookie
spark-api/src/test/scala/wookie/spark/cli/SparkStreamingSpec.scala
Scala
apache-2.0
2,735
/* * 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/core/src/test/scala/org/apache/spark/sql/ConfigBehaviorSuite.scala
Scala
apache-2.0
2,709
/* * Copyright (C) 2014 - 2017 Contributors as noted in the AUTHORS.md file * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option)...
Tensei-Data/tensei-agent
src/main/scala/com/wegtam/tensei/agent/parsers/DatabaseParser.scala
Scala
agpl-3.0
19,742
package shardakka.keyvalue import akka.actor.{ ActorRef, Props } import shardakka.ShardakkaExtension object SimpleKeyValueRoot { def props(name: String): Props = Props(classOf[SimpleKeyValueRoot], name) } final class SimpleKeyValueRoot(name: String) extends Root { override def persistenceId = ShardakkaExtens...
dsaved/africhat-platform-0.1
actor-server/shardakka/src/main/scala/shardakka/keyvalue/SimpleKeyValueRoot.scala
Scala
mit
826
package metaconfig import scala.language.higherKinds import scala.collection.compat._ import scala.reflect.ClassTag import metaconfig.Configured._ import metaconfig.Extractors.Number import metaconfig.generic.Settings import metaconfig.internal.CanBuildFromDecoder import metaconfig.internal.NoTyposDecoder import java....
olafurpg/metaconfig
metaconfig-core/shared/src/main/scala/metaconfig/ConfDecoder.scala
Scala
apache-2.0
4,712
/** * An example MapReduce application using Scala and HBase. * * * The MIT License (MIT) * * Copyright (c) 2014 Jeremy Fisher * * 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 Sof...
rawg/scala-hbase-wordcount
src/main/scala/WordCountMapper.scala
Scala
mit
2,433
package org.embulk.parser.twitter_ads_stats import spray.json.{pimpAny, JsObject, JsString} class SegmentJsonSpec extends UnitSpec { "json write" in { import SegmentJson._ val v: Segment = Map("segment_name" -> "hoge", "segment_value" -> "fuga") val actual = v.toJson val expected = JsObject( ...
septeni-original/embulk-parser-twitter_ads_stats
src/test/scala/org/embulk/parser/twitter_ads_stats/SegmentJsonSpec.scala
Scala
mit
444
package api import javax.inject.Inject import com.payu.shorturl.model.Error import com.payu.shorturl.util.Logging import play.api.i18n._ import play.api.libs.json._ import play.api.mvc._ import scala.concurrent.{ExecutionContext, Future} class Api extends Controller with JsonSupport with I18nSupport with Implic...
felipehaack/shorturl
payu-api/app/api/Api.scala
Scala
gpl-3.0
1,939
package com.featurefm.riversong.tracing import akka.http.scaladsl.model.HttpHeader case class ContextPropagation( headers: Seq[HttpHeader] = Seq() ) object ContextPropagation{ val dtHeadersSet = Set( "x-request-id", "x-b3-traceid", "x-b3-spanid", "x-b3-parentspanid", "x-b3-sampled", "x-b3-flags", "x-ot-span-...
ListnPlay/RiverSong
src/main/scala/com/featurefm/riversong/tracing/ContextPropagation.scala
Scala
mit
393
/** * 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...
asteris-llc/kafka
src/scala/ly/stealth/mesos/kafka/Executor.scala
Scala
apache-2.0
4,595
package uk.gov.gds.ier.transaction.crown.previousAddress import uk.gov.gds.ier.model.MovedHouseOption import uk.gov.gds.ier.transaction.crown.InprogressCrown import uk.gov.gds.ier.step.StepTemplate trait PreviousAddressFirstMustache extends StepTemplate[InprogressCrown] { val title = "Have you changed your UK addr...
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/transaction/crown/previousAddress/PreviousAddressFirstMustache.scala
Scala
mit
1,045
/* * 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 ...
ueshin/apache-spark
graphx/src/main/scala/org/apache/spark/graphx/util/GraphGenerators.scala
Scala
apache-2.0
9,857
package molt.tokenize // We find all of the terminal symbols and make sure we split on // them, then assume everything in between is contiguous. // We are restricting atoms from containing any of our terminal // symbols. class BasicTokenizer(tokens: Set[String]) extends Tokenizer { private def getOverlaps(toks: List...
julianmichael/molt
molt/shared/src/main/scala/molt/tokenize/BasicTokenizer.scala
Scala
mit
2,160
/* * Copyright (c) 2015 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....
snowplow/bigquery-loader-cli
src/main/scala/com.snowplowanalytics.snowplow.storage/BasicSchema.scala
Scala
apache-2.0
4,461
package me.axiometry.blocknet.entity trait CaveSpider extends Spider
Axiometry/Blocknet
blocknet-api/src/main/scala/me/axiometry/blocknet/entity/CaveSpider.scala
Scala
bsd-2-clause
69
package com.socrata.datacoordinator.resources import com.socrata.datacoordinator.id.{DatasetId, DatasetInternalName} import com.socrata.datacoordinator.service.ServiceConfig import com.socrata.http.server._ import com.socrata.http.server.responses._ import com.socrata.http.server.implicits._ case class DatasetSecond...
socrata-platform/data-coordinator
coordinator/src/main/scala/com/socrata/datacoordinator/resources/DatasetSecondaryStatusResource.scala
Scala
apache-2.0
3,255
package org.jetbrains.plugins.scala.lang.dfa.invocationInfo.tests import org.jetbrains.plugins.scala.lang.dfa.invocationInfo.InvocationInfoTestBase import org.jetbrains.plugins.scala.lang.dfa.invocationInfo.arguments.Argument.{PassByName, PassByValue} class MultipleParameterListsInfoTest extends InvocationInfoTestBas...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/dfa/invocationInfo/tests/MultipleParameterListsInfoTest.scala
Scala
apache-2.0
8,983
package 练习16 object Runner { class Tag[T] def i[T](i1: Tag[T], i2: Tag[T]): List[Tag[T]] = List(i1, i2) class Item1 class Item2 class Item3 class Item4 class Item5 class Item6 class Item7 class Item8 class Item9 type 被减数1 = 被减数Positive[被减数Positive[被减数Zero, Item1], Item2] type 减数1 = 减数Posit...
djx314/ubw
a28-练习/src/main/scala/练习16/Runner.scala
Scala
bsd-3-clause
1,177
package scalapt import scalapt.core._ object GenerateScenes { def main(args : Array[String]) : Unit = { SceneIO.save(Cornell.scene, "scenes/cornell.json") SceneIO.save(Cornell2.scene, "scenes/cornell2.json") SceneIO.save(Horizon.scene, "scenes/horizon.json") SceneIO.save(RedGreenB...
jon-hanson/ScalaPT
core/src/test/scala/scalapt/Scenes.scala
Scala
mit
5,193
/* * Copyright (c) 2014 Contributor. All rights reserved. */ package scala.tools.nsc.classpath import scala.tools.nsc.util.ClassPath.RootPackage /** * Common methods related to package names represented as String */ object PackageNameUtils { /** * @param fullClassName full class name with package * @retu...
felixmulder/scala
src/compiler/scala/tools/nsc/classpath/PackageNameUtils.scala
Scala
bsd-3-clause
762
package korolev.effect trait Close[F[_], -T] { def onClose(that: T): F[Unit] def close(that: T): F[Unit] } object Close { def apply[F[_], T](implicit ev: Close[F, T]): Close[F, T] = implicitly[Close[F, T]] }
fomkin/korolev
modules/effect/src/main/scala/korolev/effect/Close.scala
Scala
apache-2.0
220
package kafka.consumer import com.softwaremill.react.kafka.{ConsumerProperties, ConsumerProperties$} import kafka.serializer.DefaultDecoder import kafka.utils.Logging /** * Copied from https://github.com/stealthly/scala-kafka, 0.8.2-beta (not released at the moment) */ class KafkaConsumer[T](val props: ConsumerProp...
dbuschman7/reactive-kafka
src/main/scala/kafka/consumer/KafkaConsumer.scala
Scala
apache-2.0
1,447
package nl.dekkr.pagefetcher.actors import akka.actor.Actor import akka.event.Logging import nl.dekkr.pagefetcher.messages.{RemoveOldPages, StorePage} import nl.dekkr.pagefetcher.services.StorageService class PersistenceActor extends Actor { val log = Logging(context.system, this) def receive = { case Remov...
dekkr/pagefetcher
src/main/scala/nl/dekkr/pagefetcher/actors/PersistenceActor.scala
Scala
mit
554
package org.talkingpuffin.apix case class SourceDetails(raw: String, url: Option[String], name: String) object SourceDetails { /** * From the “source” string, which oddly may contain either a simple string, such as “web,” * or an anchor tag with an href and a source name, extract: * <ol> * <li>the enti...
dcbriccetti/talking-puffin
common/src/main/scala/org/talkingpuffin/apix/SourceDetails.scala
Scala
mit
892
package lila.simul import play.api.data._ import play.api.data.Forms._ import play.api.data.validation.Constraints._ import chess.Mode import lila.common.Form._ final class DataForm { val clockTimes = (5 to 15 by 5) ++ (20 to 90 by 10) ++ (120 to 240 by 30) val clockTimeDefault = 20 val clockTimeChoices = opt...
danilovsergey/i-bur
modules/simul/src/main/DataForm.scala
Scala
mit
1,550
/* * Copyright 2015 The kdtree 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...
hoesler/kdtree
src/main/scala/org/asoem/kdtree/KDTree.scala
Scala
apache-2.0
8,661
package org.jetbrains.plugins.scala.failed.typeInference import org.jetbrains.plugins.scala.base.ScalaLightCodeInsightFixtureTestAdapter /** * @author Roman.Shein * @since 01.04.2016. */ class SetConformanceTest extends ScalaLightCodeInsightFixtureTestAdapter { override protected def shouldPass: Boolean = fa...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/failed/typeInference/SetConformanceTest.scala
Scala
apache-2.0
2,485
package test import org.scalatest.FunSuite import scala.offheap._ @data class ArrayContainer(var arr: Array[Int]) class ArraySuite extends FunSuite { implicit val alloc = malloc test("uninit") { val arr = Array.uninit[Int](10) assert(arr.nonEmpty) assert(arr.size == 10) } test("uninit empty") ...
adamwy/scala-offheap
tests/src/test/scala/ArraySuite.scala
Scala
bsd-3-clause
7,101
/* * Copyright 2007-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...
lzpfmh/framework-2
persistence/record/src/main/scala/net/liftweb/record/field/DoubleField.scala
Scala
apache-2.0
2,174
package com.socrata.testcommon package mocks package util import java.util.Collections import javax.servlet._ import javax.servlet.http._ import scala.collection.JavaConverters._ import UnusedSugarCommon._ // scalastyle:off number.of.methods class AugmentedServletRequest private (private val headers: Map[String, Seq...
socrata-platform/socrata-test-common
src/main/scala/com.socrata.testcommon/mocks/util/AugmentedServletRequest.scala
Scala
apache-2.0
5,150
package com.softwaremill.macwire import org.scalatest.matchers.ShouldMatchers import org.scalatest.FlatSpec import io.Source import tools.reflect.ToolBoxError class CompileTests extends FlatSpec with ShouldMatchers { val GlobalImports = "import com.softwaremill.macwire.MacwireMacros._\\n\\n" val DirectiveRegexp ...
rcirka/macwire
tests/src/test/scala/com/softwaremill/macwire/CompileTests.scala
Scala
apache-2.0
7,095
package sbt import java.io.File import java.util.regex.{ Pattern, PatternSyntaxException } import complete.Parser import complete.DefaultParsers._ object CommandUtil { def readLines(files: Seq[File]): Seq[String] = files flatMap (line => IO.readLines(line)) flatMap processLine def processLine(s: String) = { val ...
pdalpra/sbt
main/command/src/main/scala/sbt/CommandUtil.scala
Scala
bsd-3-clause
2,981
package com.karasiq.shadowcloud.test.utils import java.io.FileNotFoundException import java.nio.file.Files import scala.concurrent.Future import scala.util.Try import akka.stream.IOResult import akka.stream.scaladsl.{FileIO, Source} import akka.util.ByteString object ResourceUtils { def getPathOption(name: String...
Karasiq/shadowcloud
utils/test/.jvm/src/main/scala/com/karasiq/shadowcloud/test/utils/ResourceUtils.scala
Scala
apache-2.0
1,116
/** * CPSTextInterpreter - parses and interprets the CPSText DSL. * Copyright (C) 2011 Max Leuthaeuser * * 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 Licen...
max-leuthaeuser/CPSTextInterpreter
src/main/scala/de/qualitune/parser/CPSTextParser.scala
Scala
gpl-3.0
7,916
package net.sansa_stack.inference.spark.rules.plan import org.apache.jena.graph.Node /** * A join between two triple patterns. * * @author Lorenz Buehmann */ case class Join(tp1: org.apache.jena.graph.Triple, tp2: org.apache.jena.graph.Triple, joinVar: Node) { override def toString: String = tp1.toString + ...
SANSA-Stack/SANSA-RDF
sansa-inference/sansa-inference-spark/src/main/scala/net/sansa_stack/inference/spark/rules/plan/Join.scala
Scala
apache-2.0
365
/* * MUSIT is a museum database to archive natural and cultural history data. * Copyright (C) 2016 MUSIT Norway, part of www.uio.no (University of Oslo) * * 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 Softw...
kpmeen/musit
service_storagefacility/app/models/storage/event/EventType.scala
Scala
gpl-2.0
1,630
/* * 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 ...
javalovelinux/SparkGroovyScript
sql/core/src/test/scala/org/apache/spark/sql/DataFrameNaFunctionsSuite.scala
Scala
apache-2.0
6,502
package lila.game import chess.variant.{ Crazyhouse, Variant } import chess.{ CheckCount, Color, Clock, White, Black, Status, Mode, UnmovedRooks, History => ChessHistory, Game => ChessGame } import chess.format.FEN import org.joda.time.DateTime import reactivemongo.api.bson._ import scala.util.{ Su...
luanlv/lila
modules/game/src/main/BSONHandlers.scala
Scala
mit
11,320
/* * 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...
hdominguez1989/Crossdata
core/src/main/scala/org/apache/spark/sql/crossdata/daos/impl/EphemeralQueriesMapDAO.scala
Scala
apache-2.0
1,142
package me.eax.examples.statsd.client import scala.compat._ import scala.concurrent._ import scala.concurrent.ExecutionContext.Implicits.global package object utils { private val client = new MetricsClientImpl def recordTime[T](metricName: String)(f: => T): T = { val startTimeMs = Platform.currentTime va...
afiskon/scala-statsd-example
src/main/scala/me/eax/examples/statsd/client/utils/package.scala
Scala
mit
875
package org.skrushingiv.util import org.joda.time.{ DateTime, Duration } import scala.concurrent.duration.FiniteDuration /** * This module provides a convenient syntax for creating Streams of DateTimes. * * For syntactical sugar, it allows the use of `scala.concurrent.duration` postfix operators * for durations ...
srushingiv/org.skrushingiv
src/main/scala/org/skrushingiv/util/Dates.scala
Scala
mit
2,559
package io.buoyant.linkerd.protocol.h2 import com.fasterxml.jackson.annotation.JsonIgnore import com.twitter.finagle.buoyant.Dst import com.twitter.finagle.buoyant.h2._ import com.twitter.finagle.{Dtab, Path, Stack} import com.twitter.util.Future import io.buoyant.config.types.Port import io.buoyant.k8s.istio.{Cluster...
denverwilliams/linkerd
linkerd/protocol/h2/src/main/scala/io/buoyant/linkerd/protocol/h2/IstioIdentifier.scala
Scala
apache-2.0
2,967
/* * 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 ...
ron8hu/spark
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/Config.scala
Scala
apache-2.0
5,456
package domain.model /** * GraPHPizer source code analytics engine * Copyright (C) 2015 Martin Helmich <kontakt@martin-helmich.de> * * 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, eithe...
martin-helmich/graphpizer-server
app/domain/model/DataType.scala
Scala
gpl-3.0
1,772
/* * Anthony Anderson (Illyohs) * Copyright (c) 2017. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation version 2.1 * of the License. * * This library is distributed in the hope t...
Illyohs/Scorg
src/main/scala/io/github/illyohs/scorg/ScalaAdapter.scala
Scala
lgpl-2.1
4,374
package de.fuberlin.wiwiss.silk.plugins.transformer.linguistic import de.fuberlin.wiwiss.silk.linkagerule.input.Transformer import de.fuberlin.wiwiss.silk.runtime.plugin.Plugin import java.net.{URLEncoder, HttpURLConnection, URL} import xml.Elem import collection.mutable.{ArrayBuffer, HashSet, Set => MSet} import java...
fusepoolP3/p3-silk
silk-core/src/main/scala/de/fuberlin/wiwiss/silk/plugins/transformer/linguistic/SpotlightTextVectorTransformer.scala
Scala
apache-2.0
2,873
/* Copyright 2017-18, Emmanouil Antonios Platanios. 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 ...
eaplatanios/tensorflow
tensorflow/scala/api/src/main/scala/org/platanios/tensorflow/api/ops/io/data/SparseTensorSlicesDataset.scala
Scala
apache-2.0
3,343
/* ___ _ ___ _ _ *\\ ** / __| |/ (_) | | Your SKilL scala Binding ** ** \\__ \\ ' <| | | |__ generated: 01.02.2019 ...
skill-lang/skill
src/main/scala/de/ust/skill/sir/api/internal/PoolRestriction.scala
Scala
bsd-3-clause
5,818
/** * * Porter stemmer in Scala. The original paper is in * * Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14, * no. 3, pp 130-137, * * See also http://www.tartarus.org/~martin/PorterStemmer * * A few methods were borrowed from the existing Java port from the above page. * * This version is...
utcompling/Scalabha
src/main/scala/opennlp/scalabha/lang/eng/PorterStemmer.scala
Scala
apache-2.0
6,070
package space.thedocking.infinitu.integer import space.thedocking.infinitu.dimension.DimensionValue import org.junit.runner.RunWith import org.specs2.matcher.ShouldMatchers import org.specs2.mutable.Specification import org.specs2.runner.JUnitRunner @RunWith(classOf[JUnitRunner]) class IntegerUniverseSpec extends Spe...
TheDockingSpace/InfinitU
core/shared/src/test/scala/space/thedocking/infinitu/integer/IntegerUniverseSpec.scala
Scala
lgpl-3.0
1,348
/* * Copyright 2015 data Artisans GmbH, 2019 Ververica GmbH * * 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...
dataArtisans/flink-training-exercises
src/main/scala/com/ververica/flinktraining/solutions/datastream_scala/windows/PopularPlacesSolution.scala
Scala
apache-2.0
4,527
/* * 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 ...
kimoonkim/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala
Scala
apache-2.0
35,261
/* * Copyright 2011-2018 GatlingCorp (http://gatling.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 applic...
wiacekm/gatling
gatling-charts/src/main/scala/io/gatling/charts/stats/buffers/CountBuffer.scala
Scala
apache-2.0
1,375
/* * 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 ...
akopich/spark
external/kinesis-asl/src/main/scala/org/apache/spark/examples/streaming/KinesisWordCountASL.scala
Scala
apache-2.0
11,893
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
manuzhang/incubator-gearpump
examples/streaming/kafka/src/test/scala/org/apache/gearpump/streaming/examples/kafka/wordcount/SumSpec.scala
Scala
apache-2.0
2,059
/* * 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
frontend/src/test/scala/quasar/std/relations.scala
Scala
apache-2.0
4,255
object i0{ import i0.i0 // error def i0={ import _ // error import } // error }
lampepfl/dotty
tests/neg/i6056.scala
Scala
apache-2.0
122
package org.bitcoins.protocol.script import org.bitcoins.crypto.ECFactory import org.bitcoins.script.bitwise.OP_EQUALVERIFY import org.bitcoins.script.constant.{BytesToPushOntoStack, ScriptConstant, ScriptToken} import org.bitcoins.script.crypto.{OP_CHECKSIG, OP_HASH160, OP_CODESEPARATOR} import org.bitcoins.script.st...
Christewart/scalacoin
src/test/scala/org/bitcoins/protocol/script/ScriptPubKeyTest.scala
Scala
mit
1,018
/* * Copyright 2016 Branislav Lazic * * 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...
BranislavLazic/akkabot
akkabot-query/src/main/scala/io/akkabot/QueryApp.scala
Scala
apache-2.0
964
package com.twitter.algebird.util.summer /** * @author Mansur Ashraf. */ trait Incrementor { def incr(): Unit def incrBy(amount: Long): Unit }
nevillelyh/algebird
algebird-util/src/main/scala/com/twitter/algebird/util/summer/Incrementor.scala
Scala
apache-2.0
150
package controllers import scala.concurrent._ import play.api.libs.iteratee._ import play.api.mvc._ import play.api.http.{Status, HeaderNames} import reactivemongo.api.gridfs.ReadFileEntry trait IStreamController extends HeaderNames with Status { def serve(optEntry: Future[Option[ReadFileEntry]], errorMsg: String)(...
nmccready/snippets
play/controllers/IStreamController.scala
Scala
mit
957
/* * 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 ...
hequn8128/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/logical/StreamLogicalWindowAggregateRule.scala
Scala
apache-2.0
4,131
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package scalaguide.forms.csrf import javax.inject.Inject import org.specs2.mutable.Specification import play.api.mvc.BaseController import play.api.mvc.ControllerComponents class UserController @Inject() (val controllerComponents: ControllerComponen...
benmccann/playframework
documentation/manual/working/scalaGuide/main/forms/code/scalaguide/forms/csrf/UserControllerSpec.scala
Scala
apache-2.0
1,024
/* * 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
manual/cypher/refcard-tests/src/test/scala/org/neo4j/cypher/docgen/refcard/MergeTest.scala
Scala
apache-2.0
2,960
/** * API for getting build-in resources */ package helper /** * @author ShiZhan * API for getting build-in resources */ object Resource { def getInputStream(name: String) = getClass.getClassLoader.getResourceAsStream(name) def getString(name: String) = io.Source.fromInputStream(getInputStream(name))...
ShiZhan/wnotify
src/main/scala/helper/Resource.scala
Scala
apache-2.0
331
package memnets.core import memnets.model._ import memnets.ui.SkinType import scala.beans._ class EngineEvent trait EngineListener { def process(ee: EngineEvent): Unit } case class ErrorEvent(@BeanProperty msg: String = "error", @BeanProperty ex: Throwable) extends EngineEvent case class FlashTitleEvent(@BeanProper...
MemoryNetworks/memnets
api/src/main/scala/memnets/core/EngineEvents.scala
Scala
apache-2.0
2,848
/* * Copyright 2016 Miroslav Janíček * * 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...
mjanicek/rembulan
rembulan-tests/src/test/scala/net/sandius/rembulan/util/CharsetEncoderByteIteratorSpec.scala
Scala
apache-2.0
18,625
object Test { def mkNumbers(x: Int): List[AnyRef] = { //Use explicit AnyRef to workaround known limitation of type inference with F-Bounds val base = List[AnyRef]( BigDecimal(x), BigInt(x), new java.lang.Double(x.toDouble), new java.lang.Float(x.toFloat), new java.lang.Long(x.toL...
felixmulder/scala
test/files/run/numbereq.scala
Scala
bsd-3-clause
3,548
package com.netaporter.dynamomapper import com.netaporter.dynamomapper.DynamoMapper._ import org.scalatest.prop.PropertyChecks import org.scalatest.{FreeSpec, Matchers} /** * Checks that we can read and write the Scala Traversable traits, * such as Seq, List, and Set. * */ // todo - this is not yet a complete set...
cjwebb/dynamo-mapper
src/test/scala/com/netaporter/dynamomapper/TraversableReadWriteDefaultsSpec.scala
Scala
apache-2.0
1,385
/* * 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 ...
sslavic/kafka
core/src/main/scala/kafka/tools/GetOffsetShell.scala
Scala
apache-2.0
7,023
/* * 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 ...
aosagie/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcTest.scala
Scala
apache-2.0
5,603
/* 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/util/FastSorting.scala
Scala
apache-2.0
1,988
/* * 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 ...
paulcastro/openwhisk
core/invoker/src/main/scala/whisk/core/containerpool/docker/RuncClient.scala
Scala
apache-2.0
2,932
package ca.pgx.common.db.entities import ca.pgx.common.db.collections.CollectionNames import ca.pgx.common.db.helpers.{MongoEnumListField, InjectableMetaRecord} import ca.pgx.common.events.EventAction.EventAction import ca.pgx.common.events.{EventAction, EventType} import com.foursquare.index.IndexedRecord import net....
pgxcentre/eventhub
common/src/main/scala/ca/pgx/common/db/entities/EventLog.scala
Scala
apache-2.0
2,204
package com.gx.factorymethod /** * Copyright 2017 josephguan * * 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 requi...
josephguan/scala-design-patterns
creational/factory-method/src/main/scala/com/gx/factorymethod/Chef.scala
Scala
apache-2.0
982
/* * @author Robin Hafen * * Copyright 2013 University of Zurich * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Un...
gmazlami/dcop-maxsum
src/main/scala/com/signalcollect/dcop/evaluation/candidates/Util.scala
Scala
apache-2.0
1,884
package org.nefilim.influxdb import java.net.InetSocketAddress import java.text.DecimalFormat import java.util.concurrent.TimeUnit import akka.actor.{Actor, ActorLogging, Props} import com.codahale.metrics.{Meter, MetricRegistry, Timer} import scala.collection.JavaConverters._ import scala.concurrent.duration._ impo...
nefilim/ScalaInfluxDBReporter
src/main/scala/org/nefilim/influxdb/Reporter.scala
Scala
mit
5,433
package org.jetbrains.plugins.scala.lang.psi.stubs import com.intellij.psi.stubs.NamedStub import org.jetbrains.plugins.scala.lang.psi.api.base.patterns.ScReferencePattern /** * User: Alexander Podkhalyuzin * Date: 17.07.2009 */ trait ScReferencePatternStub extends NamedStub[ScReferencePattern]
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/stubs/ScReferencePatternStub.scala
Scala
apache-2.0
303
package scala.test import org.scalatest.FunSpec class TestFilterTestA extends FunSpec { describe("A") { it ("tests a") { assert(true) } } }
sdtwigg/rules_scala
test/TestFilterTestA.scala
Scala
apache-2.0
160
package com.itszuvalex.itszulib.network.messages import com.itszuvalex.itszulib.core.traits.tile.{TileMultiFluidTank, TileFluidTank} import cpw.mods.fml.common.network.simpleimpl.{IMessage, IMessageHandler, MessageContext} import io.netty.buffer.ByteBuf import net.minecraft.client.Minecraft import net.minecraftforge.f...
BlockWorker/ItszuLib
src/main/scala/com/itszuvalex/itszulib/network/messages/MessageFluidTankUpdate.scala
Scala
gpl-2.0
1,686
package geostat.lattice import scala.math._ import geostat.MapPoint import geostat.MapPointSet /** * RandomLattice Lattice * * @param npts number of points uniformly distrbuted on the surface */ class RandomLattice(npts: Int = 1) extends Lattice { require(npts > 0) val vertex = generateVertexSet() privat...
alessandroadamo/geostat
src/main/scala/geostat/lattice/RandomLattice.scala
Scala
lgpl-3.0
592
/* * Copyright 2015 MongoDB, 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 ...
jCalamari/mongo-scala-driver
examples/src/test/scala/tour/QuickTour.scala
Scala
apache-2.0
4,572
package org.retistruen trait Collector[T] extends Receiver[T] with CachingEmitter[Seq[Datum[T]]] with Reset { private var buf: Seq[Datum[T]] = Seq.empty /** Returns the collected data in the internal buffer */ protected def buffer = buf /** Clears the collected data from the internal buffer */ protect...
plalloni/retistruen
src/main/scala/org/retistruen/Collector.scala
Scala
mit
489
package core import _root_.builder.OriginalValidator import lib.ServiceConfiguration import com.bryzek.apidoc.api.v0.models.Original import com.bryzek.apidoc.api.v0.models.OriginalType.SwaggerJson import org.scalatest.{FunSpec, Matchers} class OriginalValidatorSpec extends FunSpec with Matchers{ private de...
Seanstoppable/apidoc
core/src/test/scala/core/OriginalValidatorSpec.scala
Scala
mit
1,455
package org.barelyfunctional.tools.scalafs import org.scalatest.{MustMatchers, FunSuite} class DirectoryTest extends FunSuite with MustMatchers { test("can list files in a directory") { Directory("src/test/data").list.map(_.name) must be (List("file1.txt", "file2.txt")) } }
BarelyFunctional/ScalaFS
src/test/scala/org/barelyfunctional/tools/scalafs/DirectoryTest.scala
Scala
epl-1.0
287
package sttp.client.circe import io.circe.jawn.decode import io.circe.{Decoder, Encoder, Printer} import sttp.client.{IsOption, ResponseAs, ResponseError, _} import sttp.client.internal.Utf8 import sttp.model.MediaType //Taken from sttp-circe 2.2.9 and upgraded to circe 0.14. TODO: remove after upgrade to sttp3 trait...
TouK/nussknacker
utils/http-utils/src/main/scala/sttp/client/circe/SttpCirceApi.scala
Scala
apache-2.0
2,025
package mesosphere.marathon.api.v2.json import java.lang.{ Double => JDouble, Integer => JInt } import mesosphere.marathon.Protos.Constraint import mesosphere.marathon.api.validation.FieldConstraints._ import mesosphere.marathon.api.validation.{ PortIndices, ValidV2AppDefinition } import mesosphere.marathon.health.{ ...
cgvarela/marathon
src/main/scala/mesosphere/marathon/api/v2/json/V2AppDefinition.scala
Scala
apache-2.0
5,048
package adt.bson.mongo.async.client object JavaAsyncClientModels extends JavaAsyncClientModels trait JavaAsyncClientModels { type JavaAggregateIterable[T] = com.mongodb.async.client.AggregateIterable[T] type JavaAsyncBatchCursor[T] = com.mongodb.async.AsyncBatchCursor[T] type JavaDistinctIterable[T...
jeffmay/bson-adt
bson-adt-mongo3-async/src/main/scala/adt/bson/mongo/async/client/JavaAsyncClientModels.scala
Scala
apache-2.0
975
package io.atom.electron import scala.scalajs.js import js.annotation.JSName /** * See http://electron.atom.io/docs/v0.30.0/api/process/ */ @JSName("process") @js.native object Process extends js.Object { def platform: String = js.native }
sschaef/tooling-research
electron/src/main/scala/io/atom/electron/Process.scala
Scala
mit
248
package gg.uhc.hosts.endpoints.rules import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.server.Directives.{as, complete, entity, handleRejections} import akka.http.scaladsl.server.Route import gg.uhc.hosts.CustomJsonCodec import gg.uhc.hosts.database.Database import gg.uhc.hosts.endpoints.{CustomDir...
Eluinhost/hosts.uhc.gg
src/main/scala/gg/uhc/hosts/endpoints/rules/SetRules.scala
Scala
mit
907