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 shredzzz.kirkwood.utils
object cuUtils
{
implicit def ByteArrayOps(x: Array[Byte]) = new ByteArrayOps(x)
class ByteArrayOps(x: Array[Byte])
{
def asZeroStr() = {
val bld = new StringBuilder
for (elem <- x.takeWhile(_ != 0)) {
bld.append(elem.toChar)
}
bld.toString()
... | shredzzz/kirkwood | src/main/scala/shredzzz/kirkwood/utils/cuUtils.scala | Scala | apache-2.0 | 331 |
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package com.google.protobuf.wrappers
@SerialVersionUID(0L)
final case class BoolValue(
value: Boolean = false
) extends com.trueaccord.scalapb.GeneratedMessage with com.trueaccord.scalapb.Messag... | eiennohito/ScalaPB | scalapb-runtime/js/src/main/scala/com/google/protobuf/wrappers/BoolValue.scala | Scala | apache-2.0 | 3,197 |
package metrics
import java.time.{ Duration, Instant }
trait Metrics {
def time[T](name: String, f: => T): T = {
val start = Instant.now()
val result = f
val end = Instant.now()
val duration = Duration.between(start, end)
println(s"${name} took: ${duration.toMillis}ms")
result
}
}
| jmarin/microservice-template | src/main/scala/metrics/Metrics.scala | Scala | apache-2.0 | 314 |
package scalarules.test.phase.add_to_all_rules
import org.scalatest.flatspec._
class PhaseTest extends AnyFlatSpec {
val message = "You can customize test phases!"
"HelloTest" should "be able to customize test phases!" in {
assert(message.equals("You can customize test phases!"))
}
}
| bazelbuild/rules_scala | test/phase/add_to_all_rules/PhaseTest.scala | Scala | apache-2.0 | 297 |
package com.twitter.service.cachet.proxy.client
import javax.servlet.http.HttpServletResponse
trait HttpClient {
def apply(host: String, port: Int, request: RequestSpecification, response: HttpServletResponse)
}
| nkallen/cachet | src/main/scala/com/twitter/service/cachet/proxy/client/HttpClient.scala | Scala | mit | 216 |
package com.twitter.finagle.netty4.channel
import com.twitter.finagle.netty4.ssl.server.Netty4ServerSslChannelInitializer
import com.twitter.finagle.param._
import com.twitter.finagle.transport.Transport
import com.twitter.finagle.Stack
import io.netty.channel._
import java.util.logging.Level
private[netty4] object N... | mkhq/finagle | finagle-netty4/src/main/scala/com/twitter/finagle/netty4/channel/Netty4RawServerChannelInitializer.scala | Scala | apache-2.0 | 2,015 |
/*
*
* 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
* distri... | flaminem/flamy | src/main/scala/com/flaminem/flamy/model/collection/immutable/TableInfoCollection.scala | Scala | apache-2.0 | 1,803 |
/*
* Copyright 2019 Spotify AB.
*
* 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 ... | regadas/scio | scio-macros/src/main/scala/com/spotify/scio/MagnoliaMacros.scala | Scala | apache-2.0 | 2,533 |
package scala.meta
package ui
import org.scalameta.show._
import Show.{ sequence => s, repeat => r, indent => i, newline => n }
import scala.{Seq => _}
import scala.collection.immutable.Seq
import scala.meta.internal.ast._
import scala.{meta => api}
import scala.meta.internal.{ast => impl}
import scala.annotation.impl... | smarter/scalameta | scalameta/src/main/scala/scala/meta/ui/ShowStructure.scala | Scala | bsd-3-clause | 1,769 |
/**
* The MIT License (MIT)
*
* Copyright (c) 2013 Lorand Szakacs
*
* 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 ... | lorandszakacs/fall2013-610-project-blackfyre | scala-data-aggregator/src/main/scala/util/IO.scala | Scala | mit | 6,521 |
package autolift.cats
import cats.{MonadFilter, Functor}
import autolift.{LiftFilter, LiftFilterSyntax, LiftFilterContext}
trait CatsLiftFilter[Obj, Fn] extends LiftFilter[Obj, Fn] with Serializable
object CatsLiftFilter extends LowPriorityCatsLiftFilter{
def apply[Obj, Fn](implicit lift: LiftFilter[Obj, Fn]) = li... | wheaties/AutoLifts | autolift-cats/src/main/scala/autolift/cats/LiftFilter.scala | Scala | apache-2.0 | 929 |
/*
* Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com>
*/
package play.api.mvc
import play.api.libs.json._
import play.api.libs.iteratee._
import play.api.libs.concurrent._
import scala.concurrent.Future
import play.core.Execution.Implicits.internalContext
import akka.actor.{ Props, ActorRef }
import... | jyotikamboj/container | pf-framework/src/play/src/main/scala/play/api/mvc/WebSocket.scala | Scala | mit | 5,712 |
package dk.tennis.compare.rating.multiskill.model.perfdiff
object NumOfSets extends Enumeration {
type NumOfSets = Value
val THREE_SETS, FIVE_SETS = Value
} | danielkorzekwa/tennis-player-compare | multiskill/src/main/scala/dk/tennis/compare/rating/multiskill/model/perfdiff/NumOfSets.scala | Scala | bsd-2-clause | 163 |
/* NSC -- new Scala compiler
* Copyright 2005-2013 LAMP/EPFL
* @author Martin Odersky
*/
package scala.tools.nsc
package backend.jvm
import java.io.{ DataOutputStream, FileOutputStream, IOException, File => JFile }
import scala.tools.nsc.io._
import java.util.jar.Attributes.Name
import scala.language.postfixOps
... | felixmulder/scala | src/compiler/scala/tools/nsc/backend/jvm/BytecodeWriters.scala | Scala | bsd-3-clause | 5,687 |
package mesosphere.marathon
package core.deployment.impl
import akka.Done
import akka.actor.SupervisorStrategy.Stop
import akka.actor._
import akka.event.EventStream
import akka.stream.Materializer
import com.typesafe.scalalogging.StrictLogging
import mesosphere.marathon.MarathonSchedulerActor.{DeploymentFailed, Deplo... | mesosphere/marathon | src/main/scala/mesosphere/marathon/core/deployment/impl/DeploymentManagerActor.scala | Scala | apache-2.0 | 21,249 |
package utils.auth
import org.mockito.Mockito
import play.api.Configuration
import play.api.test.{ FakeRequest, PlaySpecification }
import utils.secrets.SecretsManager
class TwilioRequestValidatorImplSpec extends PlaySpecification {
"The twilio request validator" should {
"validate the example request from doc... | vetafi/vetafi-web | test/utils/auth/TwilioRequestValidatorImplSpec.scala | Scala | apache-2.0 | 1,339 |
package uk.gov.dvla.vehicles.presentation.common.views.constraints
import org.joda.time.DateTime
import play.api.data.validation.{Constraint, Invalid, Valid, ValidationError}
import uk.gov.dvla.vehicles.presentation.common.services.DateService
import uk.gov.dvla.vehicles.presentation.common.views.constraints.Required.... | dvla/vehicles-presentation-common | app/uk/gov/dvla/vehicles/presentation/common/views/constraints/DayMonthYear.scala | Scala | mit | 1,779 |
/*
* 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/test/scala/com/intel/analytics/bigdl/torch/TanhSpec.scala | Scala | apache-2.0 | 2,692 |
/**
* 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... | mohiva/silhouette | modules/persistence/src/main/scala/silhouette/persistence/services/IdentityService.scala | Scala | apache-2.0 | 1,321 |
import scala.tools.nsc._
import scala.tools.partest.{Lambdaless, ReplTest}
object Test extends ReplTest with Lambdaless {
override def extraSettings = "-opt:l:inline -opt-inline-from:**"
def code = """
val n = 2
() => n
"""
}
| lrytz/scala | test/files/run/t5789.scala | Scala | apache-2.0 | 243 |
package net.sansa_stack.inference.flink.conformance
import scala.collection.mutable
import org.apache.flink.api.scala._
import org.apache.jena.graph.Triple
import org.apache.jena.rdf.model.Model
import net.sansa_stack.inference.data.{Jena, JenaOps}
import net.sansa_stack.inference.flink.data.{RDFGraph, RDFGraphWrite... | SANSA-Stack/SANSA-Inference | sansa-inference-flink/src/test/scala/net/sansa_stack/inference/flink/conformance/OWLHorstConformanceTest.scala | Scala | apache-2.0 | 1,082 |
/**
* Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0
* See accompanying LICENSE file.
*/
package models.navigation
import play.api.mvc.Call
/**
* @author hiral
*/
object QuickRoutes {
import models.navigation.BreadCrumbs._
val baseRoutes : Map[String, Call] = Map(
"Clusters" -... | evertrue/kafka-manager | app/models/navigation/QuickRoutes.scala | Scala | apache-2.0 | 2,325 |
package org.jetbrains.plugins.scala
package lang
package parser
package parsing
package expressions
import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes
import org.jetbrains.plugins.scala.lang.parser.parsing.base.Constructor
import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder
import... | jastice/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/parser/parsing/expressions/AnnotationExpr.scala | Scala | apache-2.0 | 1,785 |
package org.jetbrains.plugins.hocon
package manipulators
import org.jetbrains.plugins.hocon.psi.HKey
import org.junit.runner.RunWith
import org.junit.runners.AllTests
@RunWith(classOf[AllTests])
class HKeyManipulatorTest extends HoconManipulatorTest(classOf[HKey], "key")
object HKeyManipulatorTest extends TestSuiteC... | ghik/intellij-hocon | test/org/jetbrains/plugins/hocon/manipulators/HKeyManipulatorTest.scala | Scala | apache-2.0 | 350 |
package io.buoyant.router.h2
import com.twitter.finagle.{Filter, Service, ServiceFactory, SimpleFilter, Stack, Stackable}
import com.twitter.finagle.buoyant.h2.{Headers, Request, Response, Message}
import java.net.URI
/**
* Coerces HTTP proxy requests to normal requests.
*/
object ProxyRewriteFilter {
/**
* I... | denverwilliams/linkerd | router/h2/src/main/scala/io/buoyant/router/h2/ProxyRewriteFilter.scala | Scala | apache-2.0 | 2,189 |
package scala.models.play.files
import com.github.ghik.silencer.silent
import io.apibuilder.generator.v0.models.InvocationForm
import scala.generator._
import scala.models.Attributes
object ModelsGens {
val Arbitrary = "_root_.org.scalacheck.Arbitrary"
val Gen = "_root_.org.scalacheck.Gen"
val JsObject = "_r... | mbryzek/apidoc-generator | scala-generator/src/main/scala/models/play/files/ModelsGens.scala | Scala | mit | 6,840 |
/*
* Copyright 2014 Kevin Herron
*
* 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 ... | digitalpetri/scala-ethernet-ip | logix-services/src/main/scala/com/digitalpetri/ethernetip/cip/logix/tags/LogixTagSupport.scala | Scala | apache-2.0 | 2,450 |
package org.crockeo.genericplatformer.game.world
import org.crockeo.genericplatformer.game.traits._
import org.crockeo.genericplatformer.game.World
import org.crockeo.genericplatformer.geom._
abstract class WorldObject(pos: Vector, size: Vector) extends CollisionRectangle(pos, size)
... | crockeo/generic-platformer | src/org/crockeo/genericplatformer/game/world/WorldObject.scala | Scala | gpl-3.0 | 431 |
/*
* 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... | travisbrown/zipkin | zipkin-web/src/main/scala/com/twitter/zipkin/common/json/JsonTraceSummary.scala | Scala | apache-2.0 | 1,201 |
package ru.org.codingteam.keter.game.actions
import ru.org.codingteam.keter.game.objects.equipment.WalkCapability
import ru.org.codingteam.keter.game.objects.{ActorId, GenericObjectAction, Person}
import ru.org.codingteam.keter.map.{Move, UniverseSnapshot}
case class WalkAction(move: Move) extends GenericObjectAction... | codingteam/Keter | src/main/scala/ru/org/codingteam/keter/game/actions/WalkAction.scala | Scala | mit | 1,034 |
package domala.internal.macros
case class DaoParamClass[T](name: String, clazz: Class[T])
| bakenezumi/domala | core/src/main/scala/domala/internal/macros/DaoParamClass.scala | Scala | apache-2.0 | 91 |
package quisp
/**
* @author rodneykinney
*/
package object enums {
implicit val symbolJS = EnumTrait.jsFormat[FlotSymbol]
implicit val cornerJS = EnumTrait.jsFormat[Corner]
implicit val hAlignJS = EnumTrait.jsFormat[HAlign]
implicit val axisModeJS = EnumTrait.jsFormat[AxisMode]
implicit val vAlignJS = Enum... | rodneykinney/quisp | src/main/scala/quisp/enums/package.scala | Scala | apache-2.0 | 705 |
/*
* 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 ... | hdinsight/spark-eventhubs | core/src/main/scala/org/apache/spark/sql/eventhubs/EventHubsForeachWriter.scala | Scala | apache-2.0 | 3,615 |
/* __ *\\
** ________ ___ / / ___ __ ____ Scala.js Test Suite **
** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ **
** /____/\\___/... | matthughes/scala-js | test-suite/src/test/scala/org/scalajs/testsuite/compiler/InteroperabilityTest.scala | Scala | bsd-3-clause | 16,737 |
/*
* Derived from https://github.com/spray/spray/blob/v1.1-M7/spray-http/src/main/scala/spray/http/HttpEncoding.scala
*
* Copyright (C) 2011-2012 spray.io
* Based on code copyright (C) 2010-2011 by the BlueEyes Web Framework Team (http://github.com/jdegoes/blueeyes)
*
* Licensed under the Apache License, Version ... | ZizhengTai/http4s | core/src/main/scala/org/http4s/TransferCoding.scala | Scala | apache-2.0 | 1,623 |
/*
* Copyright 2014 Intelix Pty Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed... | mglukh/ehub | modules/core/src/main/scala/common/actors/ActorWithRemoteSubscribers.scala | Scala | apache-2.0 | 972 |
package phenan.prj.body
import phenan.prj._
import phenan.prj.ir._
import scalaz.Memo._
trait LiteralOperatorParsersModule {
this: LiteralOperandParsersModule with CommonParsersModule with ContextSensitiveParsersModule
with Environments with DSLEnvironments with EnvModifyStrategy
with IRs with IRExpression... | csg-tokyo/proteaj2 | src/main/scala/phenan/prj/body/LiteralOperatorParsersModule.scala | Scala | mit | 4,728 |
/*
* Copyright 2017 Datamountaineer.
*
* 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... | datamountaineer/stream-reactor | kafka-connect-elastic6/src/main/scala/com/datamountaineer/streamreactor/connect/elastic6/config/ElasticConfigConstants.scala | Scala | apache-2.0 | 5,079 |
package sri.web.examples
import sri.core._
import sri.web.all._
import sri.web.vdom.htmltags._
import scala.scalajs.js
import scala.scalajs.js.{UndefOr => U, undefined}
object Button {
val Component = (props: Props,children : ReactElement) => {
div(style = props.style, onClick = (e: ReactMouseEventH) => prop... | chandu0101/sri | web-examples/src/main/scala/sri/web/examples/Button.scala | Scala | apache-2.0 | 640 |
package ua.org.yozh
import org.tmatesoft.svn.core.{SVNNodeKind, SVNDirEntry}
import org.tmatesoft.svn.core.io.SVNRepository
import java.io.{File, ByteArrayOutputStream}
import org.apache.lucene.util.Version
import org.apache.lucene.store.FSDirectory
import org.apache.lucene.index.{IndexWriterConfig, IndexWriter}
impor... | artem-karpenko/svn-search | svn-indexer/src/main/scala/ua/org/yozh/IndexingVisitor.scala | Scala | gpl-2.0 | 1,034 |
/**
* Copyright 2015, deepsense.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | deepsense-io/seahorse-workflow-executor | workflowjson/src/main/scala/io/deepsense/models/json/workflow/WorkflowVersionUtil.scala | Scala | apache-2.0 | 2,867 |
/***********************************************************************
* Copyright (c) 2013-2015 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0 which
* accompanies this distribution and is ... | vpipkt/geomesa | geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/commands/EnvironmentCommand.scala | Scala | apache-2.0 | 3,108 |
/**
* 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... | sslavic/kafka | core/src/test/scala/unit/kafka/server/DeleteTopicsRequestWithDeletionDisabledTest.scala | Scala | apache-2.0 | 2,604 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | aokolnychyi/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/RateSourceProvider.scala | Scala | apache-2.0 | 9,940 |
/*
* WindowedInAOutA.scala
* (FScape)
*
* Copyright (c) 2001-2022 Hanns Holger Rutz. All rights reserved.
*
* This software is published under the GNU Affero General Public License v3+
*
*
* For further information, please contact Hanns Holger Rutz at
* contact@sciss.de
*/
package de.sciss.fscape.stre... | Sciss/FScape-next | core/shared/src/main/scala/de/sciss/fscape/stream/impl/logic/WindowedInOut.scala | Scala | agpl-3.0 | 6,629 |
package com.github.gigurra.glasciia
import com.badlogic.gdx.Gdx
import scala.collection.concurrent.TrieMap
/**
* Created by johan on 2016-12-03.
*/
trait Logging {
protected lazy val log: Logger = Logger.getLogger(this.getClass)
}
object Logging {
import com.badlogic.gdx.Application
val NONE = Applicati... | GiGurra/glasciia | glasciia-core/src/main/scala/com/github/gigurra/glasciia/Logging.scala | Scala | mit | 4,761 |
case class A(x: Int) {
def copy(x: Int = x) = A(x)
}
// NOTE: the companion inherits a public apply method from Function1!
case class NeedsCompanion private (x: Int)
object ClashNoSig { // ok
private def apply(x: Int) = if (x > 0) new ClashNoSig(x) else ???
def unapply(x: ClashNoSig) = x
ClashNoSig(2) match ... | som-snytt/dotty | tests/pos/i4564.scala | Scala | apache-2.0 | 1,440 |
package bifrost.network
import java.net.{InetAddress, InetSocketAddress, NetworkInterface, URI}
import akka.actor._
import akka.io.Tcp._
import akka.io.{IO, Tcp}
import akka.pattern.ask
import akka.util.Timeout
import bifrost.network.message.{Message, MessageHandler, MessageSpec}
import bifrost.network.peer... | Topl/Project-Bifrost | src/main/scala/bifrost/network/NetworkController.scala | Scala | mpl-2.0 | 6,531 |
package at.linuxhacker.procmetrics.tests.values
import org.junit.runner.RunWith
import org.junit.Test
import org.scalatest.junit.JUnitRunner
import org.scalatest.FlatSpec
import at.linuxhacker.procmetrics.values._
@Test
@RunWith(classOf[JUnitRunner])
class Tests extends FlatSpec {
"An ProcStringValue 'tester'" mus... | hstraub/ProcMetrics | src/test/scala/at/linuxhacker/procmetrics/tests/values/Tests.scala | Scala | gpl-3.0 | 1,123 |
package com.arcusys.valamis.lesson.model
import com.arcusys.valamis.member.model.MemberTypes
case class LessonViewer(lessonId: Long, viewerId: Long, viewerType: MemberTypes.Value)
| igor-borisov/valamis | valamis-lesson/src/main/scala/com/arcusys/valamis/lesson/model/LessonViewer.scala | Scala | gpl-3.0 | 182 |
package im.actor.server.api.rpc.service
import im.actor.api.rpc.messaging.{ UpdateMessageContentChanged, ApiTextMessage }
import im.actor.api.rpc.peers.{ ApiPeer, ApiPeerType }
import scala.concurrent.Await
import scala.concurrent.duration._
import com.amazonaws.services.s3.transfer.TransferManager
import com.google... | WangCrystal/actor-platform | actor-server/actor-tests/src/test/scala/im/actor/server/api/rpc/service/SequenceServiceSpec.scala | Scala | mit | 6,715 |
package sisdn.common
class DuplicateEntityException private(ex: RuntimeException) extends RuntimeException(ex) {
def this(message:String) = this(new RuntimeException(message))
def this(message:String, throwable: Throwable) = this(new RuntimeException(message, throwable))
}
object DuplicateEntityException {
def ... | mhashimm/backend | src/main/scala/sisdn/common/DuplicateEntityException.scala | Scala | agpl-3.0 | 485 |
package org.bfn.ninetynineprobs
import org.scalatest._
class P81Spec extends UnitSpec {
// TODO
}
| bfontaine/99Scala | src/test/scala/P81Spec.scala | Scala | mit | 105 |
/*
* 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 ... | SnappyDataInc/spark | core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala | Scala | apache-2.0 | 46,411 |
package tweetscuttler
class ChatObject {
private var username: String = _
private var message: String = _
def getUsername: String = {
username
}
def setUsername(s: String) {
username = s
}
def getMessage: String = {
message
}
def setMessage(s: String) {
message = s
}
}
object C... | stevenjob/TweetScuttler | backend/src/main/scala/tweetscuttler/ChatObject.scala | Scala | mit | 491 |
/*
* 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
* distribute... | wvlet/airframe | airspec/src/main/scala/wvlet/airspec/runner/AirSpecEventHandler.scala | Scala | apache-2.0 | 803 |
import sbt._
import Keys._
object MlnBuild extends Build {
lazy val scCore = ProjectRef(file("../signal-collect"), id = "signal-collect")
val scMln = Project(id = "mln",
base = file(".")) dependsOn (scCore)
}
| saramagliacane/signal-collect-mln | project/Build.scala | Scala | apache-2.0 | 218 |
/*
* Copyright 2011-2022 GatlingCorp (https://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 appli... | gatling/gatling | gatling-charts/src/main/scala/io/gatling/charts/component/StatisticsTextComponent.scala | Scala | apache-2.0 | 8,714 |
/*
* Copyright 2018 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/paac-frontend | test/form/PackageSpec.scala | Scala | apache-2.0 | 1,766 |
package postgresweb.css
import postgresweb.components.Tables
import scalacss.ScalaCssReact._
import scalacss.mutable.GlobalRegistry
import scalacss.Defaults._
object AppCSS {
def load = {
GlobalRegistry.register(
GlobalStyle,
Tables.Style,
CommonStyles
)
GlobalRegistry.onRegistration... | minettiandrea/postgres-restify | client/src/main/scala/postgresweb/css/AppCSS.scala | Scala | apache-2.0 | 347 |
package org.shelmet.heap.shared
object ClassType {
def parse(sig : String) : ClassType = {
// classname examples
// [[I
// [Lcom.foo.Bar;
// com.foo.Bar
if (sig.contains("/"))
parse(sig.replace("/", "."))
else if (sig.startsWith("[")) {
val subType = sig.drop(1)
val containe... | rorygraves/shelmet | src/main/scala/org/shelmet/heap/shared/ClassType.scala | Scala | gpl-2.0 | 1,504 |
import sbt._
import scala.languageFeature._
import org.scalajs.sbtplugin.ScalaJSPlugin
import ScalaJSPlugin.autoImport._
import org.scalajs.sbtplugin.cross.CrossProject
object Dependencies {
object Scala {
lazy val version = "2.12.4"
val compiler = "org.scala-lang" %% "scala-compiler" % version
val li... | aparo/scalajs-react-extra | project/Dependencies.scala | Scala | apache-2.0 | 1,892 |
/***********************************************************************
* Copyright (c) 2013-2016 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is ... | nagavallia/geomesa | geomesa-accumulo/geomesa-accumulo-jobs/src/main/scala/org/locationtech/geomesa/jobs/accumulo/AccumuloJobUtils.scala | Scala | apache-2.0 | 5,762 |
/*
* 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 ... | bOOm-X/spark | sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala | Scala | apache-2.0 | 102,848 |
/*
* Copyright (c) 2012-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.apach... | janeefting/snowplow | 3-enrich/scala-common-enrich/src/main/scala/com.snowplowanalytics.snowplow.enrich/common/utils/ConversionUtils.scala | Scala | apache-2.0 | 14,739 |
/*
* 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/BenchmarkQueryTest.scala | Scala | apache-2.0 | 2,749 |
/*
* 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/scalactic-test/src/test/scala/org/scalactic/DirectRequirementsSpec.scala | Scala | apache-2.0 | 195,888 |
/*
* Copyright (C) 15/01/14 Romain Reuillon
*
* 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) any later version.
*
* This pr... | ISCPIF/PSEExperiments | openmole-src/openmole/plugins/org.openmole.plugin.method.abc/src/main/scala/org/openmole/plugin/method/abc/ABC.scala | Scala | agpl-3.0 | 902 |
package org.jetbrains.plugins.scala.lang.psi.stubs.elements
import com.intellij.lang.ASTNode
import org.jetbrains.plugins.scala.lang.psi.api.statements.ScVariableDeclaration
import org.jetbrains.plugins.scala.lang.psi.impl.statements.ScVariableDeclarationImpl
import org.jetbrains.plugins.scala.lang.psi.stubs.ScVariabl... | gtache/intellij-lsp | intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/ScVariableDeclarationElementType.scala | Scala | apache-2.0 | 723 |
package charts.builder.spreadsheet
import charts.ChartType
import charts.Region
import scala.collection.JavaConversions._
import java.lang.{Iterable => JIterable}
import java.util.{Iterator => JIterator, List => JList, Map => JMap}
case class ChartPermutation(
chartType: ChartType, region: Region, parameters: Ma... | uq-eresearch/aorra | app/charts/builder/spreadsheet/ChartPermutations.scala | Scala | mit | 1,696 |
/*
* Copyright (C) 2007-2008 Artima, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | peachyy/scalastu | expressions-and-control-flow/Exceptions.scala | Scala | apache-2.0 | 2,449 |
package com.github.vspiewak
import java.time.format.DateTimeFormatter
import com.cybozu.labs.langdetect.DetectorFactory
import com.github.vspiewak.util.LogUtils
import com.github.vspiewak.util.SentimentAnalysisUtils._
import org.apache.spark.SparkConf
import org.apache.spark.streaming.twitter._
import org.apache.spar... | rtre84/Spark-Twitter-Sentiment | src/main/scala/com/github/vspiewak/TwitterSentimentAnalysis.scala | Scala | mit | 2,661 |
/*
*************************************************************************************
* Copyright 2011 Normation SAS
*************************************************************************************
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero Ge... | VinceMacBuche/cf-clerk | src/main/scala/com/normation/cfclerk/xmlparsers/CompatibleParser.scala | Scala | agpl-3.0 | 2,651 |
/*
* 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... | wangcy6/storm_app | frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/main/scala/kafka/metrics/KafkaTimer.scala | Scala | apache-2.0 | 1,214 |
/*
Copyright 2011 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 applicable law or... | markusgumbel/scalabioalg | demo/src/test/scala/net/gumbix/bioinf/struct/demo/Struct2DDemo.scala | Scala | apache-2.0 | 1,310 |
package com.github.gigurra.glasciia
import com.badlogic.gdx.utils.GdxNativesLoader
/**
* Created by johan on 2016-12-10.
*/
trait GlasciiaUnitTest {
/**
* Created by johan on 2016-12-10.
*/
GdxNativesLoader.load()
Logging.overrideBackend(Logging.SystemOutErrBackend)
}
| GiGurra/glasciia | glasciia-core/src/main/scala/com/github/gigurra/glasciia/GlasciiaUnitTest.scala | Scala | mit | 290 |
package at.forsyte.apalache.tla.bmcmt.rules
import at.forsyte.apalache.tla.bmcmt._
import at.forsyte.apalache.tla.bmcmt.caches.IntRangeCache
import at.forsyte.apalache.tla.bmcmt.types._
import at.forsyte.apalache.tla.lir.OperEx
import at.forsyte.apalache.tla.lir.oper.TlaFunOper
import at.forsyte.apalache.tla.lir.conve... | konnov/dach | tla-bmcmt/src/main/scala/at/forsyte/apalache/tla/bmcmt/rules/DomainRule.scala | Scala | apache-2.0 | 3,891 |
/*
* 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/controllers/businessmatching/updateservice/ChangeBusinessTypeControllerSpec.scala | Scala | apache-2.0 | 5,245 |
/*
* Copyright 2014 Databricks
*
* 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... | mattroberts297/spark-xml | src/main/scala/com/databricks/spark/xml/XmlRelation.scala | Scala | apache-2.0 | 3,731 |
package calculator
object Polynomial {
def computeDelta(a: Signal[Double], b: Signal[Double],
c: Signal[Double]): Signal[Double] = {
Var({
val aVal = a()
val bVal = b()
val cVal = c()
bVal * bVal - 4.0 * aVal * cVal
})
}
def computeSolutions(a: Signal[Double]... | alvsanand/scala_specialization_coursera | progfun2_calculator/src/main/scala/calculator/Polynomial.scala | Scala | apache-2.0 | 736 |
package placid
import Dependencies._
import Dependencies.Compile._
import Dependencies.Compile.{ test ⇒ forTest }
import Settings._
import sbt._
import sbt.Keys._
object CompleteBuild
extends Build {
def buildSettings = Seq(
organization := "pleasant",
scalaVersion := Dependencies.Versions.scalaVersi... | weltermann17/pleasant-scala | project/Build.scala | Scala | apache-2.0 | 857 |
import annotation.tailrec
object Test {
def a(): Option[String] = Some("a")
def test1: Any = {
a() match {
case Some(b1) =>
a() match {
case Some(b2) =>
@tailrec
def tick(i: Int): Unit = if (i < 0) () else tick(i - 1)
tick(10000000) // testing that t... | felixmulder/scala | test/files/run/t8893.scala | Scala | bsd-3-clause | 841 |
/*
* 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 ... | shuangshuangwang/spark | sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala | Scala | apache-2.0 | 19,054 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | maropu/spark | sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/SparkMetadataOperationSuite.scala | Scala | apache-2.0 | 30,691 |
package net.rrm.ehour.ui.report.cache
import net.rrm.ehour.AbstractSpec
import org.mockito.Mockito._
import org.springframework.cache.ehcache.{EhCacheCache, EhCacheCacheManager}
import net.rrm.ehour.report.reports.AggregateReportDataObjectMother
import net.sf.ehcache.CacheManager
class ReportCacheServiceEhCacheImplSp... | momogentoo/ehour | eHour-wicketweb/src/test/scala/net/rrm/ehour/ui/report/cache/ReportCacheServiceEhCacheImplSpec.scala | Scala | gpl-2.0 | 1,271 |
/*
* Licensed to Intel Corporation under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* Intel Corporation licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use t... | SeaOfOcean/BigDL | dl/src/main/scala/com/intel/analytics/bigdl/parameters/Parameter.scala | Scala | apache-2.0 | 2,286 |
package org.jetbrains.plugins.scala
package codeInsight.delegateMethod
import com.intellij.testFramework.IdeaTestUtil
import com.intellij.testFramework.builders.JavaModuleFixtureBuilder
import com.intellij.testFramework.fixtures.{JavaCodeInsightFixtureTestCase, ModuleFixture}
import org.jetbrains.plugins.scala.codeIns... | ilinum/intellij-scala | test/org/jetbrains/plugins/scala/codeInsight/delegateMethod/ScalaDelegateToJavaMethodTest.scala | Scala | apache-2.0 | 5,756 |
/**
* 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... | geeag/kafka | core/src/main/scala/kafka/network/RequestChannel.scala | Scala | apache-2.0 | 12,860 |
object A {
object InnerObject {
def bla: Int = 2
}
}
| lampepfl/dotty | sbt-test/source-dependencies/inner-object/A.scala | Scala | apache-2.0 | 61 |
package org.openmole.gui.ext.client
/*
* Copyright (C) 05/02/15 // mathieu.leclaire@openmole.org
*
* 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, o... | openmole/openmole | openmole/gui/ext/org.openmole.gui.ext.client/src/main/scala/org/openmole/gui/ext/client/InputFilter.scala | Scala | agpl-3.0 | 1,559 |
/*
* Copyright (c) 2014-2015 by its authors. Some rights reserved.
* See the project homepage at: http://www.monifu.org
*
* 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://... | virtualirfan/monifu | monifu/shared/src/main/scala/monifu/reactive/Observer.scala | Scala | apache-2.0 | 7,391 |
package com.acme.FinatraAngularApp.models.database
import com.acme.FinatraAngularApp.DB
import scala.slick.driver.H2Driver.simple._
object UsersDatabase {
val users = TableQuery[Users]
DB.connection.withSession { implicit session =>
users.ddl.create
}
}
case class UserEntity(token: String, id: Option[Int... | eodgooch/finatra-angular-boilerplate | src/main/scala/com/acme/FinatraAngularApp/models/database/UsersDatabase.scala | Scala | mit | 566 |
package org.rebeam.boxes.graph
import org.rebeam.boxes.core._
import org.rebeam.boxes.swing.SwingView
import org.rebeam.boxes.swing.icons.IconFactory
import BoxScriptImports._
import BoxTypes._
import BoxUtils._
import java.awt.Color
import java.awt.geom.Rectangle2D
import java.text.DecimalFormat
import GraphMouseEv... | trepidacious/boxes-graph | src/main/scala/org/rebeam/boxes/graph/GraphLayer.scala | Scala | gpl-2.0 | 1,571 |
/*
* 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/main/scala/com/intel/analytics/bigdl/dllib/utils/intermediate/IRToDnn.scala | Scala | apache-2.0 | 24,128 |
/*
* 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 ... | practice-vishnoi/dev-spark-1 | streaming/src/test/scala/org/apache/spark/streaming/scheduler/rate/PIDRateEstimatorSuite.scala | Scala | apache-2.0 | 6,755 |
package com.github.mdr.mash.ns.collections
import com.github.mdr.mash.functions._
import com.github.mdr.mash.inference._
import com.github.mdr.mash.runtime.{ MashNull, MashValue, MashValueOrdering }
object MinByFunction extends MashFunction("collections.minBy") {
object Params {
val Sequence = Parameter(
... | mdr/mash | src/main/scala/com/github/mdr/mash/ns/collections/MinByFunction.scala | Scala | mit | 2,272 |
/*
* 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 ... | USCDataScience/nutch-analytics | src/main/scala/gov/nasa/jpl/analytics/tools/dump/DumpImages.scala | Scala | apache-2.0 | 5,405 |
package mesosphere.marathon
import akka.actor.{ ActorRef, ActorSystem, Props }
import akka.testkit._
import akka.util.Timeout
import com.fasterxml.jackson.databind.ObjectMapper
import mesosphere.marathon.MarathonSchedulerActor._
import mesosphere.marathon.Protos.MarathonTask
import mesosphere.marathon.event.{ Deployme... | drewrobb/marathon | src/test/scala/mesosphere/marathon/MarathonSchedulerActorTest.scala | Scala | apache-2.0 | 13,218 |
/**
* 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... | flange/drift-dev | kafka/00-kafka_2.11-0.10.1.0/libs/tmp/kafka/message/MessageAndMetadata.scala | Scala | apache-2.0 | 1,751 |
/*
* Copyright (C) 2017 Belgrade Center for Digital Humanities
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
... | adamretter/exist-algolia-index | src/main/scala/org/humanistika/exist/index/algolia/LocalIndexableRootObjectJsonSerializer.scala | Scala | gpl-3.0 | 1,278 |
Subsets and Splits
Filtered Scala Code Snippets
The query filters and retrieves a sample of code snippets that meet specific criteria, providing a basic overview of the dataset's content without revealing deeper insights.