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 org.antipathy.mvn_scalafmt.format // $COVERAGE-OFF$ /** Base trait for formatting * @tparam I Input type * @tparam O Output type */ trait Formatter[I, O] { /** Format the passed in input * @param input The input to format * @return Formatted output */ def format(input: I): O } // $COVERA...
SimonJPegg/mvn_scalafmt
src/main/scala/org/antipathy/mvn_scalafmt/format/Formatter.scala
Scala
apache-2.0
327
/* * Copyright 2017 Sumo Logic * * 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 i...
SumoLogic/epigraph
java/codegen/src/main/scala/ws/epigraph/java/service/projections/op/OpRecordModelProjectionGen.scala
Scala
apache-2.0
2,522
/** * Licensed to the Minutemen Group under one or more contributor license * agreements. See the COPYRIGHT 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 complian...
datalek/silhouette
silhouette/src/main/scala/silhouette/AuthInfo.scala
Scala
apache-2.0
858
package com.karasiq.shadowcloud.server.http import akka.http.scaladsl.server._ trait SCAkkaHttpRoutes extends SCHttpServerSettings with SCAkkaHttpApiRoutes with SCAkkaHttpFileRoutes with SCWebSocketRoutes { self: Directives ⇒ def scRoutes: Route = { encodeResponse(scApiRoute) ~ scFileRoute ~ scWebSocketRoutes ...
Karasiq/shadowcloud
server/api-routes/src/main/scala/com/karasiq/shadowcloud/server/http/SCAkkaHttpRoutes.scala
Scala
apache-2.0
327
package com.garnercorp.swdvm import com.github.nscala_time.time.Imports._ import org.joda.time.DateTimeConstants._ trait Elapsed { def time: Double def completionFrom(start: DateTime) = start + (time*MINUTES_PER_DAY).toInt.minutes } object Elapsed { private case class PlainElapsed(time: Double) extends Elapsed...
thinkingbox/velmod
src/main/scala/com/garnercorp/swdvm/Elapsed.scala
Scala
apache-2.0
747
package com.github.xiaodongw.swagger.finatra import java.util.Date import com.twitter.finagle.http.{Request, Response} import com.twitter.finagle.{Service, SimpleFilter} import com.twitter.finatra.http.Controller import com.twitter.util.Future import org.joda.time.{DateTime, LocalDate} class SampleFilter extends Sim...
xiaodongw/swagger-finatra
src/test/scala/com/github/xiaodongw/swagger/finatra/SampleController.scala
Scala
apache-2.0
5,347
/* * Licensed to The Apereo Foundation under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * The Apereo Foundation licenses this file to you under the Apache License, * Version 2.0, (the "License"); you ma...
equella/Equella
Source/Plugins/Core/com.equella.core/scalasrc/com/tle/core/searches/SearchConfig.scala
Scala
apache-2.0
3,666
/* * 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 ...
xieguobin/Spark_2.0.0_cn1
mllib/classification/impl/GLMClassificationModel.scala
Scala
apache-2.0
3,539
package functionalProgramming.memoization import org.scalatest.{FunSuite, WordSpecLike} import DicPath._ /** * Created by yujieshui on 2017/2/17. */ class DicPathTest extends WordSpecLike { "solution" must { "case 1,2" in { assert(solution(1, 2) == 4) assert(solution(2, 1) == 6) } "case ...
1178615156/hackerrank
src/test/scala/functionalProgramming/memoization/DicPathTest.scala
Scala
apache-2.0
823
/* * 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 java.util import scala.annotation.tai...
SebsLittleHelpers/scala-js
javalib/src/main/scala/java/util/AbstractCollection.scala
Scala
apache-2.0
2,178
/** * 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...
kavink92/kafka-0.8.0-beta1-src
core/src/main/scala/kafka/common/KafkaZookeperClient.scala
Scala
apache-2.0
1,577
package org.eichelberger.sfc.utils object BitManipulations { // if the first on-bit is at position P, then this routine returns a // mask in which all of the bits from 0..P are turned on, and all of // the bits from P+1..63 are off def usedMask(x: Long): Long = { var y = x | (x >> 1L) y = y | (y >> 2L)...
cne1x/sfseize
src/main/scala/org/eichelberger/sfc/utils/BitManipulations.scala
Scala
apache-2.0
669
package lila.round import akka.actor._ import chess.Color import lila.game.{ Game, GameRepo, Pov } private[round] final class CheatDetector(reporter: ActorSelection) { private val createReport = false def apply(game: Game): Fu[Option[Color]] = interesting(game) ?? { GameRepo findMirror game map { _ ?...
clarkerubber/lila
modules/round/src/main/CheatDetector.scala
Scala
agpl-3.0
1,072
package org.bitcoins.spvnode.serializers.messages.data import org.bitcoins.core.crypto.DoubleSha256Digest import org.bitcoins.core.serializers.RawBitcoinSerializer import org.bitcoins.spvnode.messages.TypeIdentifier import org.bitcoins.spvnode.messages.data.Inventory /** * Created by chris on 6/1/16. * Serializes...
bitcoin-s/bitcoin-s-spv-node
src/main/scala/org/bitcoins/spvnode/serializers/messages/data/RawInventorySerializer.scala
Scala
mit
858
/** Copyright 2016 - 2021 Martin Mauch (@nightscape) * * 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 applicab...
crealytics/spark-excel
src/main/3.0_3.1/scala/com/crealytics/spark/v2/excel/ExcelWriteBuilder.scala
Scala
apache-2.0
1,940
package com.gshakhn.privatewiki.client.components import com.gshakhn.privatewiki.client.UnlockedBinder import com.gshakhn.privatewiki.client.components.testutil.PageInteractions._ import com.gshakhn.privatewiki.client.components.testutil.PrivateWikiBaseSpec import com.gshakhn.privatewiki.shared.{BinderLoaded, NoEncryp...
gshakhn/private-wiki
client/src/test/scala/com/gshakhn/privatewiki/client/components/UnlockingBinderSpec.scala
Scala
apache-2.0
1,716
package com.softwaremill.session import org.scalacheck.{Gen, Prop, Properties} object SessionManagerBasicEncoderTest extends Properties("SessionManagerBasicEncoder") { import Prop._ val secretGen = Gen.choose(64, 256).flatMap(size => Gen.listOfN(size, Gen.alphaNumChar).map(_.mkString)) property("encode+decod...
ilyai/akka-http-session
core/src/test/scala/com/softwaremill/session/SessionManagerBasicEncoderTest.scala
Scala
apache-2.0
1,548
package com.giyeok.jparser.metalang2 import com.giyeok.jparser.Symbols sealed trait AstifierExpr { def replaceThisNode(node: AstifierExpr): AstifierExpr } case object ThisNode extends AstifierExpr { override def replaceThisNode(node: AstifierExpr): AstifierExpr = node } case class Unbind(expr: AstifierExpr,...
Joonsoo/moon-parser
metalang/src/main/scala/com/giyeok/jparser/metalang2/AstifierExpr.scala
Scala
mit
2,898
import sbt._, Keys._ object Generator { private val generateCode = TaskKey[Unit]("generateCode") private val generateFiles = SettingKey[Seq[GeneratedCode]]("generateFiles") private val checkGenerateCode = TaskKey[Boolean]("checkGenerateCode") private val checkGenerateCodeError = TaskKey[Unit]("checkGenerateCod...
msgpack4z/msgpack4z-core
project/Generator.scala
Scala
mit
2,166
package com.twitter.finagle.mux import com.twitter.conversions.time._ import com.twitter.finagle.mux.transport.Message import com.twitter.finagle.stats.StatsReceiver import com.twitter.finagle.transport.Transport import com.twitter.finagle.{Failure, Status} import com.twitter.util.{Duration, Future, Promise, Time} imp...
a-manumohan/finagle
finagle-mux/src/main/scala/com/twitter/finagle/mux/ClientSession.scala
Scala
apache-2.0
8,498
package com.twitter.finagle.http import com.twitter.finagle.client.StackClient import com.twitter.finagle.util.AsyncLatch import com.twitter.finagle._ import com.twitter.io.{Buf, Reader, Writer} import com.twitter.util.{Future, Promise, Return, Throw, Time} import java.util.concurrent.atomic.AtomicBoolean private[fin...
lukiano/finagle
finagle-http/src/main/scala/com/twitter/finagle/http/DelayedReleaseService.scala
Scala
apache-2.0
2,472
package success.independent.descendent import autoregister.annotations._ object A { def register(toRegister: A): Unit = {} } @RegisterAllDescendentObjects("success.independent.descendent.A.register") trait A
math85360/autoregister
src/test/resources/success/independent/descendent/A.scala
Scala
mit
212
import scala.reflect.runtime.universe._ import scala.tools.reflect.Eval object Test extends App { { val x = 42 def foo() = reify(reify(reify(x))); { val x = 2 val code1 = foo() val code2 = code1.eval val code3 = code2.eval println(code3.eval) } } }
som-snytt/dotty
tests/disabled/macro/run/reify_newimpl_37.scala
Scala
apache-2.0
300
package spire package examples import spire.algebra._ import spire.math.{Natural, UInt} import scala.collection.mutable object SetUtil { def powerStream[A](members: Stream[A]): Stream[Set[A]] = { val done = Stream.empty[Set[A]] def powerLoop(as: Stream[A], i: Int): Stream[Set[A]] = { def nthLoop(as:...
tixxit/spire
examples/src/main/scala/spire/example/infset.scala
Scala
mit
5,945
package mesosphere.marathon package api import java.net.URI import javax.servlet.http.{ HttpServlet, HttpServletRequest, HttpServletResponse } import mesosphere.marathon.io.IO import org.slf4j.LoggerFactory class WebJarServlet extends HttpServlet { private[this] val log = LoggerFactory.getLogger(getClass) over...
natemurthy/marathon
src/main/scala/mesosphere/marathon/api/WebJarServlet.scala
Scala
apache-2.0
3,071
/** * SolidAttachment element template for TABuddy-Desktop. * * Copyright (c) 2013 Alexey Aksenov ezh@ezh.msk.ru * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Global License version 3 * as published by the Free Software Foundation with the...
digimead/digi-TABuddy-desktop-type-solidAttachment
src/main/scala/org/digimead/tabuddy/desktop/logic/payload/template/attachment/solid/PropertyDialog.scala
Scala
agpl-3.0
21,104
/* * 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 ...
nickpan47/samza
samza-core/src/test/scala/org/apache/samza/config/TestStorageConfig.scala
Scala
apache-2.0
2,712
class BasicCredentialsProvider(accessKey: String, secretKey: String) extends CredentialsProvider { private val credentials: Credentials = Credentials(accessKey, secretKey) override def getCredentials: Credentials = credentials override def refresh: Unit = {} } object BasicCredentialsProvider { def apply(access...
hirokikonishi/awscala
aws/core/src/main/scala/BasicCredentialsProvider.scala
Scala
apache-2.0
597
package com.goticks import akka.actor.{Props, ActorSystem} import akka.testkit.{ImplicitSender, TestKit} import org.scalatest.{WordSpecLike, MustMatchers} class TickerSellerSpec extends TestKit(ActorSystem("testTickets")) with WordSpecLike with MustMatchers ...
gilbutITbook/006877
chapter-up-and-running/src/test/scala/com/goticks/TicketSellerSpec.scala
Scala
mit
2,262
package polyite.schedule.sampling import polyite.config.Config import polyite.util.Rat import polyite.config.MinimalConfig.NumGeneratorsLimit import polyite.config.MinimalConfig.NumGeneratorsLimit import polyite.schedule.DomainCoeffInfo /** * Some sampling strategies may need to inspect the list of polyhedra that m...
stganser/polyite
src/polyite/schedule/sampling/SamplingStrategy.scala
Scala
mit
4,480
/** * 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...
themarkypantz/kafka
core/src/main/scala/kafka/cluster/Partition.scala
Scala
apache-2.0
32,015
package es.weso.wiFetcher.fetchers import java.io.File import java.io.FileInputStream import java.io.InputStream import scala.collection.mutable.ListBuffer import org.apache.log4j.Logger import es.weso.reconciliator.CountryReconciliator import es.weso.wiFetcher.configuration.Configuration import es.weso.wiFetcher.dao....
weso/wiFetcher
app/es/weso/wiFetcher/fetchers/SpreadsheetsFetcher.scala
Scala
apache-2.0
11,128
/* * Copyright 2015 Nicolas Rinaudo * * 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...
nrinaudo/tabulate
laws/shared/src/main/scala/kantan/csv/laws/discipline/arbitrary.scala
Scala
mit
4,872
package com.seanshubin.schulze import com.seanshubin.black_box_test_5.Fixture class RankedPreferencesFixture extends Fixture { def run(input: Iterable[String]): Iterable[String] = { val entries = input.map(Parser.parseCandidateAndRankEntry).toSeq val candidateNames = entries.map(Parser.nameFromCandidateAndR...
SeanShubin/schulze
test/src/main/scala/com/seanshubin/schulze/RankedPreferencesFixture.scala
Scala
unlicense
566
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
bowenli86/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/metadata/FlinkRelMdColumnOriginNullCountTest.scala
Scala
apache-2.0
6,276
/* * Copyright 2014 the original author or 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 applicab...
vert-x/mod-lang-scala
src/main/scala/org/vertx/scala/core/sockjs/EventBusBridgeHook.scala
Scala
apache-2.0
3,507
import sbt._ object Dependencies { val http4s = Seq( "org.http4s" %% "http4s-circe" % "0.18.0-M1", "org.http4s" %% "http4s-client" % "0.18.0-M1" ) val diffson = Seq( "org.gnieh" %% "diffson-circe" % "2.2.2" ) val circe = Seq( "io.circe" %% "circe-literal" % "0.9.0-M1", "io.circe" %% "ci...
solidninja/openshift-scala-api
project/Dependencies.scala
Scala
mit
684
package models.services import models.gift.{Comment, Gift} import scala.concurrent.Future import scala.language.postfixOps trait EventNotificationService { def publishComment(eventId: Long, comment: Comment): Future[Unit] def publishGift(gift: Gift): Future[Unit] }
epot/Gifter
app/models/services/EventNotificationService.scala
Scala
mit
286
package com.twitter.finagle.stats import com.twitter.conversions.time._ import com.twitter.finagle.builder.{ClientBuilder, ServerBuilder} import com.twitter.finagle.integration.StringCodec import com.twitter.finagle.Service import com.twitter.util.{Await, Future, Promise} import java.net.InetSocketAddress import java...
firebase/finagle
finagle-core/src/test/scala/com/twitter/finagle/stats/StatsReceiverTest.scala
Scala
apache-2.0
5,725
package dotty.tools.dotc package typer import dotty.tools.dotc.ast.{ Trees, tpd } import core._ import Types._, Contexts._, Flags._, Symbols._, Annotations._, Trees._, NameOps._ import Decorators._ import Variances._ import config.Printers.variances /** Provides `check` method to check that all top-level definitions ...
folone/dotty
src/dotty/tools/dotc/typer/VarianceChecker.scala
Scala
bsd-3-clause
5,872
package com.eevolution.context.dictionary.domain.api.service import com.eevolution.context.dictionary.api import com.eevolution.context.dictionary.domain.model.LabelPrinterFunction /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This program is free software: you can red...
adempiere/ADReactiveSystem
dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/api/service/LabelPrinterFunctionService.scala
Scala
gpl-3.0
1,263
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.intg import org.ensime.api._ import org.ensime.core.RefactoringHandlerTestUtils import org.ensime.fixture._ import org.ensime.util.EnsimeSpec import org.ensime.util.ensime...
hzenginx/ensime-server
core/src/it/scala/org/ensime/intg/ReverseLookupsSpec.scala
Scala
gpl-3.0
3,534
package breeze /* Copyright 2012 David Hall 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 writ...
ktakagaki/breeze
src/main/scala/breeze/numerics/package.scala
Scala
apache-2.0
9,583
package scutil.lang import scala.collection.Factory import scutil.lang.tc._ object Validated { def valid[E,T](value:T):Validated[E,T] = Valid(value) def invalid[E,T](problems:E):Validated[E,T] = Invalid(problems) def invalidNes[E,T](problems:E):Validated[Nes[E],T] = Invalid(Nes one problems) //---------------...
ritschwumm/scutil
modules/core/src/main/scala/scutil/lang/Validated.scala
Scala
bsd-2-clause
8,580
package org.crashstars.spark import org.apache.spark.sql.SQLContext import org.apache.spark.{SparkConf, SparkContext} import org.crashstars.common.Logging /** * Created by anavidad on 13/10/15. */ class SparkUtils(conf: SparkConf) extends Logging { def withSparkContext(testCode: (SparkContext) => Any): Unit = { ...
anavidad3/PoC-spark-scala-maven
src/main/scala/org/crashstars/spark/SparkUtils.scala
Scala
apache-2.0
631
/* * 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...
intel-analytics/BigDL
scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/integration/torch/ParallelCriterionSpec.scala
Scala
apache-2.0
2,867
package net.tomasherman.specus.server.api.net import net.tomasherman.specus.common.api.net.Packet /** * This file is part of Specus. * * Specus 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 ver...
tomasherman/specus
server_api/src/main/scala/net/exceptions.scala
Scala
gpl-3.0
1,258
/* * 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...
intel-analytics/BigDL
scala/orca/src/main/scala/com/intel/analytics/bigdl/orca/net/TFNetForInference.scala
Scala
apache-2.0
15,654
package org.rovak.steamclient.steam3 import steam.SteamId import rovak.steamkit.steam.language.EPersonaState object Commands { /** * Sends a chat message * * @param steamId SteamId to send to * @param message Message to send */ case class SendChatMessage(steamId: SteamId, message: String) /** ...
Rovak/scala-steamkit
steamkit/src/main/scala/org/rovak/steamclient/steam3/Commands.scala
Scala
mit
472
/** * User: Alexander Slesarenko * Date: 11/17/13 */ package scalan.meta import scala.language.implicitConversions import scala.tools.nsc.Global import scala.reflect.internal.util.RangePosition import scala.reflect.internal.util.OffsetPosition import scalan.meta.ScalanAst._ import java.util.regex.Pattern trait Sca...
scalan/scalan
meta/src/main/scala/scalan/meta/ScalanParsers.scala
Scala
apache-2.0
24,289
/* * 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 * distribut...
thenetcircle/event-bus
core/src/test/scala/com/thenetcircle/event_bus/story/builder/HttpSourceBuilderTest.scala
Scala
apache-2.0
3,003
package ir.query import ir.Query import text.normalizer.NormalizedString /** * <pre> * Created on 6/1/15. * </pre> * @param keywords keywords * @author K.Sakamoto */ abstract class KeywordsQuery(val keywords: Seq[String]) extends Query { override val query: NormalizedString }
ktr-skmt/FelisCatusZero
src/main/scala/ir/query/KeywordsQuery.scala
Scala
apache-2.0
287
package im.actor.server.push import scala.concurrent.ExecutionContext import slick.dbio.Effect.Read import slick.dbio.{ DBIO, DBIOAction, NoStream } import im.actor.api.rpc.peers.{ Peer, PeerType } import im.actor.server.{ models, persist } private[push] trait VendorPush { protected def setPushCredentials(creds: ...
lstNull/actor-platform
actor-server/actor-cqrs/src/main/scala/im/actor/server/push/VendorPush.scala
Scala
mit
1,698
package edu.osu.cse.groenkeb.logic.model.rules import edu.osu.cse.groenkeb.logic._ import edu.osu.cse.groenkeb.logic.dsl._ import edu.osu.cse.groenkeb.logic.model._ import edu.osu.cse.groenkeb.logic.proof._ import edu.osu.cse.groenkeb.logic.proof.rules._ case class ModelRule(val model: FirstOrderModel) extends BaseRu...
bgroenks96/AutoMoL
core/src/main/scala/edu/osu/cse/groenkeb/logic/model/rules/ModelRule.scala
Scala
mit
1,711
package org.firedancer3d.scenegraph.geometricproperties import org.firedancer3d.math._ abstract class Light case class DirectionalLight( direction: Vec3 = Vec3(1, 1, 1), color: ColorRGB = ColorRGB(1, 1, 1), intensity: Float = 1, ambientIntensity: Float = 0) extends Light { } case class Po...
cyberthinkers/FireDancer3D
firedancer3d_shared/src/main/scala/org/firedancer3d/scenegraph/geometricproperties/Light.scala
Scala
mit
874
/* * 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 ...
yelshater/hadoop-2.3.0
spark-core_2.10-1.0.0-cdh5.1.0/src/main/scala/org/apache/spark/deploy/master/DriverState.scala
Scala
apache-2.0
1,572
/** * Copyright 2014 Idio * * 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...
idio/spotlight-model-editor
src/main/scala/org/idio/dbpedia/spotlight/stores/CustomCandidateMapStore.scala
Scala
apache-2.0
7,823
import org.apache.spark.SparkContext object Ch0501 { def main(args: Array[String]): Unit = { val sc = new SparkContext("local","Chapter 7") println(s"Running Spark Version ${sc.version}") // val inFile = sc.textFile("/Users/ksankar//fdps-v3/data/Line_of_numbers.csv") var stringsRDD = inFile.map(l...
dineshpackt/Fast-Data-Processing-with-Spark-2
code/Ch0501.scala
Scala
mit
456
package Chapter08 object Inheritance { // topics: // extending a class // overriding methods // type checks and casts // protected fields and methods // superclass construction // overriding fields // anonymous subclasses // abstract classes // abstract fields // construction or...
vasnake/scala-for-the-impatient
src/main/scala/Chapter08/Inheritance.scala
Scala
gpl-3.0
22,966
/* * 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 not u...
helena/spark-cassandra
project/SparkCassandraBuild.scala
Scala
apache-2.0
3,270
/* * 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 ...
jackylk/incubator-carbondata
integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala
Scala
apache-2.0
50,827
package com.arcusys.valamis.gradebook.service.impl import com.arcusys.learn.liferay.LiferayClasses._ import com.arcusys.valamis.gradebook.model.LessonAverageGrade import com.arcusys.valamis.gradebook.service.{StatisticBuilder, LessonGradeService, CourseLessonsResultService} import com.arcusys.valamis.lesson.model.Less...
igor-borisov/valamis
valamis-gradebook/src/main/scala/com/arcusys/valamis/gradebook/service/impl/CourseLessonsResultServiceImpl.scala
Scala
gpl-3.0
1,341
package io.ddf.flink.etl import io.ddf.DDF import io.ddf.etl.IHandleMissingData.{NAChecking, Axis} import io.ddf.exception.DDFException import io.ddf.flink.BaseSpec import io.ddf.types.AggregateTypes.AggregateFunction import org.apache.flink.api.scala.DataSet import scala.collection.JavaConversions._ class MissingDa...
ddf-project/ddf-flink
flink/src/test/scala/io/ddf/flink/etl/MissingDataHandlerSpec.scala
Scala
apache-2.0
2,978
/* * Copyright (c) 2014 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....
mdavid/lessig-bigdata
lib/snowplow/4-storage/kinesis-elasticsearch-sink/src/main/scala/com.snowplowanalytics.snowplow.storage.kinesis/elasticsearch/Shredder.scala
Scala
mit
7,342
package sgl /** Provides the Window abstraction, essentially a screen. * * A window is essentially the same as a screen as far as we are concerned for * game developed with SGL. * * The Window exports the available width/height in physical pixels, as well * as density information of the pixels (how big/sma...
regb/scala-game-library
core/src/main/scala/sgl/WindowProvider.scala
Scala
mit
9,634
package gatlin import akka.actor.ActorRef import akka.pattern.ask import akka.persistence.pg.perf.Messages.Alter import akka.persistence.pg.perf.PerfActor import akka.util.Timeout import com.typesafe.config.Config import gatlin.Predef._ import io.gatling.core.Predef._ import scala.concurrent.Await import scala.concur...
kwark/akka-persistence-postgresql
modules/benchmark/src/it/scala/gatlin/SingleActorPerfSimulation.scala
Scala
mit
935
import leon.lang._ import leon.collection._ import leon.annotation._ object Tree { sealed abstract class Tree case object Empty extends Tree case class Node(left: Tree, value: BigInt, right: Tree) extends Tree sealed abstract class Dir case object Left extends Dir case object Right extends Dir def lo...
epfl-lara/leon
testcases/verification/higher-order/valid/SubtreeSearch.scala
Scala
gpl-3.0
1,098
package com.jejking.rprng.png import akka.util.{ByteString, ByteStringBuilder} import java.util.zip.Deflater import scala.annotation.tailrec /** * Essentially copied from the deprecated Akka Http Deflate Compressor. * @param compressionLevel */ class DeflateHelper (compressionLevel: Int) { require(compressio...
jejking/rprng
src/main/scala/com/jejking/rprng/png/DeflateHelper.scala
Scala
apache-2.0
2,084
package ee.cone.c4gate import ee.cone.c4actor.IdGenUtil import ee.cone.c4proto._ trait KeyGenerator { def idGenUtil: IdGenUtil def genPK[P <: Product](model: P, adapter: ProtoAdapter[Product] with HasId): String = idGenUtil.srcIdFromSerialized(adapter.id,ToByteString(adapter.encode(model))) }
conecenter/c4proto
base_lib/src/main/scala/ee/cone/c4gate/OrigKeyGenerator.scala
Scala
apache-2.0
305
package maker.project import com.typesafe.zinc.Compiler import java.io.{ File, FileWriter, Writer } import maker.MakerProps import org.apache.commons.io.FileUtils class EnsimeGenerator(props: MakerProps) { def generateModules(root: File, name: String, modules: List[Module]): Unit = { val writer = new FileWriter...
syl20bnr/maker
maker/src/maker/project/EnsimeGenerator.scala
Scala
bsd-2-clause
4,007
/** * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ package akka.crdt.convergent import akka.remote.testkit.MultiNodeConfig import akka.crdt._ import akka.remote.testkit.MultiNodeSpec import akka.remote.testconductor.RoleName import akka.actor._ import akka.cluster._ import scala.util._ import ...
jboner/akka-crdt
src/multi-jvm/scala/akka/crdt/convergent/GSetClusterSpec.scala
Scala
apache-2.0
3,801
package com.getjenny.starchat.entities.persistents import org.elasticsearch.action.get.GetResponse import org.elasticsearch.action.search.SearchResponse import org.elasticsearch.search.aggregations.bucket.nested.ParsedNested import org.elasticsearch.search.aggregations.bucket.terms.ParsedStringTerms import sun.reflect....
GetJenny/starchat
src/main/scala/com/getjenny/starchat/entities/persistents/WordFrequenciesInQuery.scala
Scala
gpl-2.0
1,348
import synthesis.Definitions._ object BarbaraBrokeIt { def main(args: Array[String]): Unit = { println("Give me a lower bound [0-100]: ") val lower: Int = Console.readInt println("Give me an upper bound [0-100]: ") val upper: Int = Console.readInt try { val (x,y,g) = choose( (x:...
epfl-lara/comfusy
src/examples/BarbaraBrokeIt.scala
Scala
bsd-2-clause
608
package edu.rit.csh.scaladb.serialization.binary class ByteArrayOutput(size: Int) extends BinaryOutput { private val buffer = new Array[Byte](size) private var index = 0 def output: Array[Byte] = buffer override def write(b: Array[Byte], off: Int, len: Int): Unit = { System.arraycopy(b, off, output, ind...
JDrit/RaftService
serialization/src/main/scala/edu/rit/csh/scaladb/serialization/binary/ByteArrayOutput.scala
Scala
apache-2.0
534
package biz.meetmatch.logging import org.apache.spark.scheduler._ import scala.collection.mutable class BusinessSparkListener extends SparkListener { private val jobGroups = mutable.HashMap[Long, String]() override def onJobStart(jobStart: SparkListenerJobStart): Unit = { val jobGroup = Option(jobStart.prop...
tolomaus/languagedetector
src/main/scala/biz/meetmatch/logging/BusinessSparkListener.scala
Scala
mit
1,069
package controllers import play.api._ import play.api.mvc._ import play.api.libs.iteratee.Done import play.api.libs.json._ import play.api.http.HeaderNames import play.api.data.Form import play.api.data.Forms._ import play.modules.reactivemongo.MongoController import play.modules.reactivemongo.json.collection.JSONColl...
alexdupre/ripple-blobvault
app/controllers/Vault.scala
Scala
bsd-2-clause
2,830
/* * 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 ...
InnovaCo/samza
samza-yarn/src/test/scala/org/apache/samza/job/yarn/TestClientHelper.scala
Scala
apache-2.0
3,296
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ZxlAaron/mypros
sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
Scala
apache-2.0
64,296
/** * Copyright (c) 2007-2011 Eric Torreborre <etorreborre@yahoo.com> * * 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 ...
yyuu/specs
src/test/scala/org/specs/specification/sharedSpec.scala
Scala
mit
4,444
/////////////////////////////////////////////////////////////////////////////// // GridRanker.scala // // Copyright (C) 2010-2014 Ben Wing, The University of Texas at Austin // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // ...
utcompling/textgrounder
src/main/scala/opennlp/textgrounder/gridlocate/GridRanker.scala
Scala
apache-2.0
33,885
/* * Copyright 2016 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
ahudspith-equalexperts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v3/B380.scala
Scala
apache-2.0
1,326
/* Copyright 2009-2011 Jay Conrod * * This file is part of Tungsten. * * Tungsten is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 2 of * the License, or (at your option) any late...
jayconrod/tungsten
core/src/test/scala/tungsten/ModuleIOTest.scala
Scala
gpl-2.0
6,685
/* * The MIT License (MIT) * * Copyright (c) 2014 Heiko Blobner * * 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...
windelknecht/stup-utils
src/main/scala/de/windelknecht/stup/utils/data/collection/bitSet/RichEnumBitValue.scala
Scala
mit
3,785
package com.softwaremill.session import org.json4s.JValue import org.scalatest.{Matchers, FlatSpec} class SessionManagerJwtEncoderTest extends FlatSpec with Matchers { val defaultConfig = SessionConfig.default("1234567890123456789012345678901234567890123456789012345678901234567890") val configMaxAge = defaultConf...
ilyai/akka-http-session
jwt/src/test/scala/com/softwaremill/session/SessionManagerJwtEncoderTest.scala
Scala
apache-2.0
3,393
/* * Copyright 2011-2021 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 ...
asakusafw/asakusafw-spark
compiler/src/test/scala/com/asakusafw/spark/compiler/broadcast/MockBroadcast.scala
Scala
apache-2.0
999
package ch.descabato.core.actors import akka.actor.ActorSystem import ch.descabato.core.config.BackupFolderConfiguration import ch.descabato.core.util.FileManager import scala.concurrent.ExecutionContext class BackupContext(val config: BackupFolderConfiguration, val actorSystem: ActorSystem, ...
Stivo/DeScaBaTo
core/src/main/scala/ch/descabato/core/actors/BackupContext.scala
Scala
gpl-3.0
487
package debop4s.web.scalatra.controller import debop4s.web.scalatra.annotations.ServletPath import debop4s.web.scalatra.scalate.ScalatraWebStack import org.scalatra.{AsyncResult, FutureSupport} import org.slf4j.LoggerFactory import org.springframework.stereotype.Component import scala.concurrent._ /** * IndexServle...
debop/debop4s
debop4s-web-scalatra/src/test/scala/debop4s/web/scalatra/controller/IndexServlet.scala
Scala
apache-2.0
1,027
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
jinglining/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/utils/ExpressionTestBase.scala
Scala
apache-2.0
10,968
package guru.nidi.geo.tiff import java.io.{File, FileInputStream, InputStream} import scala.annotation.tailrec import scala.collection.mutable /** * */ //TODO replace with geotools object GeoTiffReader { def read(file: File): GeoTiff = { read(new FileInputStream(file), file.length().toInt) } def read(in...
nidi3/mineedit
geo/src/main/scala/guru/nidi/geo/tiff/GeoTiffReader.scala
Scala
apache-2.0
5,573
/* * 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 ...
jongwook/incubator-s2graph
s2core/src/test/scala/org/apache/s2graph/core/Integrate/QueryTest.scala
Scala
apache-2.0
36,817
/* * 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 ...
chgm1006/spark-app
src/main/scala/org/apache/spark/examples/mllib/DecisionTreeRunner.scala
Scala
apache-2.0
17,177
/******************************************************************************* Copyright (c) 2012-2013, KAIST, S-Core. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. **********************************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/tests/NightlyInterpreterJUTest.scala
Scala
bsd-3-clause
1,658
import sbt._ import Keys._ object BenchmarkPlugin { def benchmarkSettings = Seq( libraryDependencies ++= Seq( "com.google.code.caliper" % "caliper" % "1.0-SNAPSHOT" from "http://n0d.es/jars/caliper-1.0-SNAPSHOT.jar", "com.google.code.java-allocation-instrumenter" % "java-allocation-instrumenter" % "...
tekul/szxcvbn
project/BenchmarkPlugin.scala
Scala
mit
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 may ...
sh-cho/cshSpark
rdd/ParallelCollectionRDD.scala
Scala
apache-2.0
5,815
/* * 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 ...
gyfora/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/rules/logical/SplitPythonConditionFromJoinRule.scala
Scala
apache-2.0
3,385
import java.io.{PrintWriter, File} import com.typesafe.scalalogging.StrictLogging object Application extends StrictLogging { val csvFilePath = "src/main/resources/hadoop_output_no_header.csv" val rand = new scala.util.Random val NR_OF_GIFS_EACH_FILE = 40 val NO_OF_LINES = 1487855 //nr of lines in hadoop_outpu...
softberries/ugproject
HTMLgenerator/src/main/scala/Application.scala
Scala
unlicense
1,353
package com.twitter.finagle import com.twitter.finagle.stats.DefaultStatsReceiver import com.twitter.finagle.toggle.{StandardToggleMap, ToggleMap} package object thriftmux { /** * The name of the finagle-thriftmux [[ToggleMap]]. */ private[this] val LibraryName: String = "com.twitter.finagle.thriftmux"...
luciferous/finagle
finagle-thriftmux/src/main/scala/com/twitter/finagle/thriftmux/package.scala
Scala
apache-2.0
488
// // Item // abstract class Item(name: String, enc: Double, cost: Int, protected var _amount: Int, private var _owner: Character) { require(_amount >= 1) def hand(newowner: Character): Character = { _owner = newowner _owner } def stock(am: Int): Int = { _amount = _amount + am _amount } ...
eiji-a/dnd
src/main/scala/Item.scala
Scala
bsd-3-clause
748
/* * 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 ...
sgururajshetty/carbondata
streaming/src/main/scala/org/apache/carbondata/streaming/parser/FieldConverter.scala
Scala
apache-2.0
4,013
package tifmo.dcstree sealed abstract class DCSTreeEdge { def inRole: SemRole } case class DCSTreeEdgeNormal(inRole: SemRole) extends DCSTreeEdge case class DCSTreeEdgeQuantifier(inRole: SemRole, quantifier: Quantifier) extends DCSTreeEdge /** * A DCS tree edge marked with relation * @param inRole The role of...
tomtung/tifmo
src/main/scala/tifmo/dcstree/DCSTreeEdge.scala
Scala
bsd-2-clause
652