code stringlengths 5 1M | repo_name stringlengths 5 109 | path stringlengths 6 208 | language stringclasses 1
value | license stringclasses 15
values | size int64 5 1M |
|---|---|---|---|---|---|
/*
* Copyright (C) 2017 HAT Data Exchange Ltd
* SPDX-License-Identifier: AGPL-3.0
*
* This file is part of the Hub of All Things project (HAT).
*
* HAT 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 Founda... | Hub-of-all-Things/HAT2.0 | hat/app/org/hatdex/hat/she/models/LambdaFunctionExecutable.scala | Scala | agpl-3.0 | 6,577 |
package com.eharmony.aloha.models.multilabel
import java.io.{Closeable, PrintWriter, StringWriter}
import com.eharmony.aloha.audit.Auditor
import com.eharmony.aloha.dataset.density.Sparse
import com.eharmony.aloha.factory._
import com.eharmony.aloha.factory.ri2jf.RefInfoToJsonFormat
import com.eharmony.aloha.id.Model... | eHarmony/aloha | aloha-core/src/main/scala/com/eharmony/aloha/models/multilabel/MultilabelModel.scala | Scala | mit | 21,936 |
/*
* Copyright 2014-2021 Netflix, 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... | brharrington/atlas | atlas-core/src/test/scala/com/netflix/atlas/core/stacklang/NDropSuite.scala | Scala | apache-2.0 | 995 |
// Copyright (C) 2011-2012 the original author or authors.
// 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 ... | scalastyle/scalastyle | src/main/scala/org/scalastyle/scalariform/IfBraceChecker.scala | Scala | apache-2.0 | 4,023 |
package bifrost.api
import akka.http.scaladsl.model.headers.RawHeader
import akka.http.scaladsl.model.{HttpEntity, HttpMethods, HttpRequest, MediaTypes}
import akka.http.scaladsl.testkit.ScalatestRouteTest
import akka.util.ByteString
import bifrost.api.http.UtilsApiRoute
import bifrost.BifrostGenerators
import io.circ... | Topl/Project-Bifrost | src/test/scala/bifrost/api/UtilsRPCSpec.scala | Scala | mpl-2.0 | 3,154 |
/*
* Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com>
*/
package com.lightbend.lagom.internal.javadsl.persistence.jdbc
import java.util.Optional
import javax.inject.Inject
import javax.inject.Singleton
import akka.actor.ActorSystem
import akka.persistence.jdbc.query.scaladsl.JdbcReadJournal
impor... | rcavalcanti/lagom | persistence-jdbc/javadsl/src/main/scala/com/lightbend/lagom/internal/javadsl/persistence/jdbc/JdbcPersistentEntityRegistry.scala | Scala | apache-2.0 | 1,067 |
// scalac: -Werror
object Test {
def main(args: Array[String]): Unit = {
val j = new J_2()
println(j.bar1())
println(j.bar2())
println(j.bar3())
}
}
| lrytz/scala | test/files/run/t4317/S_3.scala | Scala | apache-2.0 | 166 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | starpit/openwhisk | tests/src/test/scala/org/apache/openwhisk/core/controller/test/RespondWithHeadersTests.scala | Scala | apache-2.0 | 2,990 |
/*
* Copyright (C) 2013 <mathieu.leclaire at free.fr>
*
* 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.
*
* This... | mathieuleclaire/prynt | src/main/scala/prynt/util/Workspace.scala | Scala | lgpl-3.0 | 997 |
package sampleclean.activeml
/* SimpleApp.scala */
import org.apache.spark.SparkContext._
import org.apache.spark.mllib.classification.{SVMModel, SVMWithSGD}
import org.apache.spark.mllib.linalg.Vectors
import org.apache.spark.mllib.regression.LabeledPoint
import org.apache.spark.mllib.tree.RandomForest
import org.ap... | agilemobiledev/sampleclean-async | src/main/scala/sampleclean/activeml/TreeDedupDemo.scala | Scala | apache-2.0 | 9,580 |
/*
* 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 ... | witgo/zen | examples/src/main/scala/com/github/cloudml/zen/examples/ml/AbstractParams.scala | Scala | apache-2.0 | 1,903 |
import annotation.targetName
enum Tree:
case Bind(sym: Symbol, body: Tree)
class Symbol
object Test1:
abstract class TreeAccumulator[X]:
def app(x: X, tree: Tree): X
def app(x: X, trees: List[Tree]): X = ???
val acc = new TreeAccumulator[List[Symbol]]:
def app(syms: List[Symbol], tree: Tree) = tree... | dotty-staging/dotty | tests/pos/targetName-infer-result.scala | Scala | apache-2.0 | 721 |
import sbt._
import Keys._
object SaaloopBuild extends Build {
import Dependencies._
import BuildSettings._
override lazy val settings = super.settings :+ {
shellPrompt := { s => Project.extract(s).currentProject.id + " > " }
}
// -----------------------------------------------------------------------... | amir343/saaloop | project/SaaloopBuild.scala | Scala | apache-2.0 | 1,538 |
/*
* Copyright 2015 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... | scottcutts/ct-calculations | src/main/scala/uk/gov/hmrc/ct/computations/CP998.scala | Scala | apache-2.0 | 1,469 |
package models.lldp
import play.api.libs.json._
object Chassis {
import ChassisId._
implicit object ChassisFormat extends Format[Chassis] {
override def reads(json: JsValue) = Chassis(
(json \\ "NAME").as[String],
(json \\ "ID").as[ChassisId],
(json \\ "DESCRIPTION").as[String]
)
ove... | Shopify/collins | app/models/lldp/Chassis.scala | Scala | apache-2.0 | 699 |
/*
* Copyright (c) 2013-2014 Telefónica Investigación y Desarrollo S.A.U.
*
* 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
*
* Unles... | telefonicaid/fiware-cosmos-platform | cosmos-admin/src/main/scala/es/tid/cosmos/admin/cluster/DefaultClusterCommands.scala | Scala | apache-2.0 | 1,575 |
package com.overviewdocs.ingest.model
import play.api.libs.json.JsObject
/** File2: we know it has been Created, but nothing else.
*
* This holds just enough information to:
*
* 1. Convert to a WrittenFile2 during resume.
* 2. Convert to a WrittenFile2 while writing to the database.
*/
case class CreatedF... | overview/overview-server | worker/src/main/scala/com/overviewdocs/ingest/model/CreatedFile2.scala | Scala | agpl-3.0 | 1,827 |
package exam.national_center_test.xml.choice.collcetion
/**
* <pre>
* Created on 5/24/15.
* </pre>
* @author K.Sakamoto
*/
trait ChoiceCollection {
def choiceCollectionType: ChoiceCollectionType.Value = {
this match {
case _: ChoiceSet =>
ChoiceCollectionType.Set
case _: ChoiceSingleton ... | ktr-skmt/FelisCatusZero | src/main/scala/exam/national_center_test/xml/choice/collcetion/ChoiceCollection.scala | Scala | apache-2.0 | 543 |
/*
* This file is 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... | TresAmigosSD/SMV | src/main/scala/org/tresamigos/smv/AggFuncs.scala | Scala | apache-2.0 | 10,612 |
package org.apache.datacommons.prepbuddy.api.java
import java.util.{List => JList}
import org.apache.datacommons.prepbuddy.clusterers.Clusters
import scala.collection.JavaConverters._
class JavaClusters(clusters: Clusters) extends Serializable {
def getAllClusters: JList[JavaCluster] = clusters.getAllClusters... | blpabhishek/prep-buddy | src/main/scala/org/apache/datacommons/prepbuddy/api/java/JavaClusters.scala | Scala | apache-2.0 | 684 |
/*
* Copyright 2010-2011 Vilius Normantas <code@norma.lt>
*
* This file is part of Crossbow library.
*
* Crossbow 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 ... | ViliusN/Crossbow | crossbow-core/test/lt/norma/crossbow/indicators/InstrumentWrapperTest.scala | Scala | gpl-3.0 | 2,105 |
import bandit.LinUCBBandit
import model.{Database, TinderUser, UserDao}
import net.liftweb.json._
class TinderBot(tinderClient: TinderClient, userDao: UserDao, bandit: LinUCBBandit) {
val client = tinderClient
val dao = userDao
def getRecommendation: TinderUser = {
implicit val formats = net.liftweb.json.D... | evancasey/tinder-bandits | src/main/scala/TinderBot.scala | Scala | mit | 1,579 |
/***********************************************************************
* Copyright (c) 2013-2018 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... | ddseapy/geomesa | geomesa-lambda/geomesa-lambda-tools/src/main/scala/org/locationtech/geomesa/lambda/tools/stats/LambdaStatsCountCommand.scala | Scala | apache-2.0 | 1,130 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2006-2010, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\\___/_/... | cran/rkafkajars | java/scala/ref/ReferenceWrapper.scala | Scala | apache-2.0 | 1,170 |
package com.sksamuel.scoverage.samples
import org.scalatest.FunSuite
/** @author Stephen Samuel */
class SimpleObject2Test extends FunSuite {
test("invoking simpleobject2") {
SimpleObject2.method1(3)
SimpleObject2.method1(4)
}
}
| scoverage/sbt-scoverage-samples | src/test/scala/com/sksamuel/scoverage/samples/SimpleObject2Test.scala | Scala | apache-2.0 | 244 |
/*
* Copyright 2016 Guy Van den Broeck and Wannes Meert (UCLA and KU Leuven)
*
* 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... | UCLA-StarAI/Forclift | src/main/scala/edu/ucla/cs/starai/forclift/examples/TransitiveExample.scala | Scala | apache-2.0 | 3,108 |
package de.windelknecht.stup.utils.coding.version
import org.scalatest.{Matchers, WordSpec}
/**
* Created by me.
* User: Heiko Blobner
* Mail: heiko.blobner@gmx.de
*
* Date: 31.07.13
* Time: 21:57
*/
class TwoNumberVersionSpec
extends WordSpec
with Matchers {
"implicit def toVersion(:String)" should {
... | windelknecht/stup-utils | src/test/scala/de/windelknecht/stup/utils/coding/version/TwoNumberVersionSpec.scala | Scala | mit | 3,120 |
package toolkit.exceptions
/**
* Created by #GrowinScala
*/
class GraphHasNoSink extends Exception("The graph doesn't have a valid sink activity") | exocute/Toolkit | src/main/scala/toolkit/exceptions/GraphHasNoSink.scala | Scala | bsd-2-clause | 151 |
package models.party
import java.time.OffsetDateTime
case class Hackerspace(partyId: Long, country: String, city: String, foudationDate: Option[OffsetDateTime])
extends WithParty
| HackerSchool/Passport | app/models/party/Hackerspace.scala | Scala | bsd-3-clause | 183 |
/*
* 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 ... | cloudera/spark | core/src/test/scala/org/apache/spark/rdd/SortingSuite.scala | Scala | apache-2.0 | 4,868 |
package org.jetbrains.plugins.scala
package lang
package resolve
package imports
import com.intellij.psi.PsiPolyVariantReference
import org.junit.Assert
class HideImportsTest extends ScalaResolveTestCase {
override def folderPath: String = super.folderPath() + "resolve/imports/simple/"
def testHidePredefImplici... | triggerNZ/intellij-scala | test/org/jetbrains/plugins/scala/lang/resolve/imports/HideImportsTest.scala | Scala | apache-2.0 | 750 |
/*
* (c) Copyright 2016 Hewlett Packard Enterprise Development LP
*
* 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 b... | hpe-cct/cct-core | src/main/scala/cogx/compiler/gpu_operator/statement/DebugStatement.scala | Scala | apache-2.0 | 877 |
package org.rebeam.boxes.swing.layout
import java.awt.{CardLayout, BorderLayout, Dimension, Container, Component, LayoutManager}
import javax.swing.{JPanel, Icon, JComponent}
import org.rebeam.boxes.core._
import org.rebeam.boxes.core.reaction._
import org.rebeam.boxes.swing._
import org.rebeam.boxes.swing.views._
imp... | trepidacious/boxes-swing | src/main/scala/org/rebeam/boxes/swing/layout/PartialView.scala | Scala | gpl-2.0 | 4,255 |
package ch.epfl.bluebrain.nexus.iam.client
import akka.http.scaladsl.model.StatusCode
import scala.reflect.ClassTag
@SuppressWarnings(Array("IncorrectlyNamedExceptions"))
sealed abstract class IamClientError(val message: String) extends Exception {
override def fillInStackTrace(): IamClientError = this
override v... | hygt/nexus-iam | client/src/main/scala/ch/epfl/bluebrain/nexus/iam/client/IamClientError.scala | Scala | apache-2.0 | 1,153 |
/* NSC -- new Scala compiler
* Copyright 2005-2013 LAMP/EPFL
*/
package scala
package reflect
package io
import scala.collection.mutable
/**
* An in-memory directory.
*
* @author Lex Spoon
*
* ''Note: This library is considered experimental and should not be used unless you know what you are doing.''
*/
cla... | felixmulder/scala | src/reflect/scala/reflect/io/VirtualDirectory.scala | Scala | bsd-3-clause | 2,094 |
/**
* *****************************************************************************
* Copyright (c) 2014 Guillaume DUBUISSON DUPLESSIS <guillaume.dubuisson_duplessis@insa-rouen.fr>.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0... | GuillaumeDD/scala99problems | src/main/scala/binaryTree/P62/P62.scala | Scala | gpl-3.0 | 1,749 |
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.apache.spark.SparkConf
import org.apache.spark.graphx._
import com.google.cloud.hadoop.io.bigquery.BigQueryConfiguration
import com.google.cloud.hadoop.io.bigquery.BigQueryOutputFormat
import com.google.cloud.hadoop.io.bigquery.Gson... | rchen/2016-Distributed-Systems | final/src/main/scala/PageRank.scala | Scala | mit | 5,342 |
/*
* 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 ... | hvanhovell/spark | hadoop-cloud/src/hadoop-3/test/scala/org/apache/spark/internal/io/cloud/CommitterBindingSuite.scala | Scala | apache-2.0 | 5,482 |
package configuration
import com.typesafe.config.{Config, ConfigFactory}
import scala.util.{Success, Try}
trait CredentialsProvider {
def config = ConfigFactory.load()
}
trait Credentials extends RichConfig {
def config: Config
private implicit lazy val _config = config
lazy val salesUnitKey = getString(... | k0ner/micro-proxy | src/main/scala/configuration/Credentials.scala | Scala | apache-2.0 | 753 |
package org.jetbrains.plugins.scala
package debugger.evaluation.evaluator
import com.intellij.debugger.engine.evaluation.EvaluationContextImpl
import com.intellij.debugger.engine.evaluation.expression.{Evaluator, Modifier}
/**
* Nikolay.Tropin
* 7/24/13
*/
class ScalaBlockExpressionEvaluator(statements: Seq[Evalua... | triggerNZ/intellij-scala | src/org/jetbrains/plugins/scala/debugger/evaluation/evaluator/ScalaBlockExpressionEvaluator.scala | Scala | apache-2.0 | 612 |
package com.arcusys.learn.liferay.update.version250
import com.arcusys.learn.liferay.LiferayClasses.LUpgradeProcess
import com.arcusys.valamis.gradebook.storage.CourseTableComponent
import com.arcusys.valamis.persistence.common.{SlickDBInfo, SlickProfile}
import com.arcusys.valamis.web.configuration.ioc.Configuration
... | igor-borisov/valamis | learn-portlet/src/main/scala/com/arcusys/learn/liferay/update/version250/DBUpdater2414.scala | Scala | gpl-3.0 | 861 |
package scalapb.parquet
import com.google.protobuf.ByteString
import com.google.protobuf.Descriptors.FieldDescriptor.JavaType
import com.google.protobuf.Descriptors.{EnumValueDescriptor, FieldDescriptor}
import scalapb.{GeneratedMessage, Message}
import org.apache.parquet.io.api.Binary
import org.apache.parquet.Log
im... | trueaccord/sparksql-scalapb | sparksql-scalapb/src/main/scala/scalapb/parquet/MessageWriter.scala | Scala | apache-2.0 | 2,165 |
package spark.streaming
import spark.streaming.StreamingContext._
import scala.runtime.RichInt
import util.ManualClock
class BasicOperationsSuite extends TestSuiteBase {
override def framework() = "BasicOperationsSuite"
before {
System.setProperty("spark.streaming.clock", "spark.streaming.util.ManualClock")... | koeninger/spark | streaming/src/test/scala/spark/streaming/BasicOperationsSuite.scala | Scala | bsd-3-clause | 9,658 |
/* *\\
** Squants **
** **
** Scala Quantities and Units of Measure Library and DSL **
** (c) 2013-2015, G... | derekmorr/squants | shared/src/main/scala/squants/motion/VolumeFlow.scala | Scala | apache-2.0 | 3,711 |
package week4
/**
* Lecture 4.5
*
* A trait to test object decomposition in scala
*/
trait ExprDcmp
{
def isNumber: Boolean
def isSum: Boolean
def numValue: Int
def leftOp: ExprDcmp
def rightOp: ExprDcmp
def eval: Int
}
case class NumberDcmp( n: Int ) extends ExprDcmp
{
def isNumber = true
def isSum =... | andrucuna/scala | progfun-coursera/progfun/src/week4/ExprDcmp.scala | Scala | gpl-2.0 | 702 |
package main
object HelloWorldScala {
def main(args: Array[String]) {
println("Hello World Scala!")
}
} | DWiechert/functional-programming-patterns | src/main/scala/main/HelloWorldScala.scala | Scala | apache-2.0 | 108 |
package views.disposal_of_vehicle
import composition.TestHarness
import org.apache.http.client.methods.{CloseableHttpResponse, HttpGet, HttpPost, HttpPut, HttpRequestBase}
import org.apache.http.impl.client.HttpClients
import play.mvc.Http.Status
import pages.disposal_of_vehicle.HealthCheckPage
import uk.gov.dvla.vehi... | dvla/vehicles-online | test/views/disposal_of_vehicle/HealthCheckIntegrationSpec.scala | Scala | mit | 1,373 |
package org.jetbrains.plugins.scala.lang.psi.impl
import com.intellij.psi.{PsiElement, PsiFileFactory}
import org.jetbrains.plugins.scala.ScalaFileType
import org.jetbrains.plugins.scala.extensions.PsiElementExt
import org.jetbrains.plugins.scala.lang.psi.ScalaPsiElement
import org.jetbrains.plugins.scala.lang.psi.api... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/impl/ScalaCode.scala | Scala | apache-2.0 | 4,643 |
package user
import clock.Clock
class UserService(dao : UserDao)(implicit clock: Clock) {
def createUser(name : String): User = {
val time = clock.now
println("Creating user at " + time)
new User(123, name, time)
}
}
| backuitist/scala-nespresso | implicit/src/main/scala/user/UserService.scala | Scala | apache-2.0 | 252 |
/*
Copyright 2012 Twitter, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distr... | snoble/algebird | algebird-core/src/main/scala/com/twitter/algebird/MapAlgebra.scala | Scala | apache-2.0 | 4,537 |
package ca.innovativemedicine.vcf
/**
* Specifies airty information about a metadata field (ie. Number=...).
*
* The actual arity can be an exact number, a variable amount (0..*), or can be
* made to match the number of alleles or genotypes.
*/
sealed trait Arity
object Arity {
case object MatchAlleleCount e... | innovativemedicine/vcfimp | vcfimp/src/main/scala/ca/innovativemedicine/vcf/Metadata.scala | Scala | bsd-2-clause | 2,363 |
package truerss.api
import com.github.fntz.omhs.RoutingDSL
import io.netty.handler.codec.http.multipart.FileUpload
import io.netty.util.CharsetUtil
import truerss.services.OpmlService
import truerss.util.OpmlExtractor
import zio.Task
class OpmlApi(private val opmlService: OpmlService) {
import OMHSSupport._
impo... | truerss/truerss | src/main/scala/truerss/api/OpmlApi.scala | Scala | mit | 1,019 |
package net.andimiller.iql
import org.scalatest.{FlatSpec, MustMatchers}
class UnparserSpec extends FlatSpec with MustMatchers {
"Unparser" should "unparse a basic expression" in {
val input = "(1 + 1)"
val ast = Parser.bracketedExpression.parse(input).get.value
Unparser.expressionUnparser(ast) must ... | andimiller/integrated-query-language | core/jvm/src/test/scala/net/andimiller/iql/UnparserSpec.scala | Scala | mit | 580 |
/*
* 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 ... | cin/spark | sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala | Scala | apache-2.0 | 25,840 |
package uk.gov.dvla.vehicles.presentation.common.model
import org.joda.time.DateTime
import play.api.libs.json.Json
import uk.gov.dvla.vehicles.presentation.common
import common.clientsidesession.CacheKey
import common.webserviceclients.vehicleandkeeperlookup.VehicleAndKeeperLookupDetailsDto
import common.views.constr... | dvla/vehicles-presentation-common | app/uk/gov/dvla/vehicles/presentation/common/model/VehicleAndKeeperDetailsModel.scala | Scala | mit | 4,098 |
// Copyright 2014 Commonwealth Bank of Australia
//
// 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 ap... | CommBank/answer | core/src/main/scala/au/com/cba/omnia/answer/Extractor.scala | Scala | apache-2.0 | 816 |
package org.slf4j
import java.util.{logging => jl}
class Logger(name: String = "default") {
private val inner = wvlet.log.Logger(name)
def error(message: Any, more: Any*): Unit = inner.error(message + more.mkString(" "))
def error(message: Any, fmt: String, more: Any*): Unit = inner.error(message + more.mkStri... | unicredit/akka.js | akka-js-actor-typed/js/src/main/scala/org/slf4j/package.scala | Scala | bsd-3-clause | 1,432 |
package org.macrogl.algebra
class Vector4f extends Vector {
var x, y, z, w: Float = _
def this(v1: Float, v2: Float, v3: Float, v4: Float) = {
this()
x = v1
y = v2
z = v3
w = v4
}
def this(v: Vector4f) = {
this()
Vector4f.set(v, this)
}
def apply(pos: Int): Float = pos m... | storm-enroute/macrogl | src/macrogl/scala/org/macrogl/algebra/Vector4f.scala | Scala | bsd-3-clause | 3,761 |
/*
* 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/ct600e/v2/E10.scala | Scala | apache-2.0 | 834 |
package net.fwbrasil.activate.statement.query
import net.fwbrasil.activate.statement.SimpleValue
import net.fwbrasil.activate.entity.IntEntityValue
import net.fwbrasil.activate.statement.SimpleValue
import net.fwbrasil.activate.entity.IntEntityValue
class Pagination[S](query: OrderedQuery[S]) {
def navigator(page... | xdevelsistemas/activate | activate-core/src/main/scala/net/fwbrasil/activate/statement/query/Pagination.scala | Scala | lgpl-2.1 | 1,493 |
package com.twitter.tiny.domain.http
import com.twitter.finagle.http.Request
import javax.inject.Inject
case class PostUrlRequest(
@Inject request: Request,
url: String)
| syamantm/finatra | examples/tiny-url/src/main/scala/com/twitter/tiny/domain/http/PostUrlRequest.scala | Scala | apache-2.0 | 176 |
package com.shocktrade.client.posts
import com.shocktrade.common.models.OperationResult
import com.shocktrade.common.models.post.{Comment, Post, Reply, SharedContent}
import io.scalajs.npm.angularjs.Service
import io.scalajs.npm.angularjs.http.Http
import scala.concurrent.ExecutionContext
import scala.scalajs.js
/**... | ldaniels528/shocktrade.js | app/client/angularjs/src/main/scala/com/shocktrade/client/posts/PostService.scala | Scala | apache-2.0 | 7,999 |
/**
* Copyright 2015 Thomson Reuters
*
* 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 ag... | nruppin/CM-Well | server/cmwell-data-tools/src/main/scala/cmwell/tools/data/utils/chunkers/GroupChunker.scala | Scala | apache-2.0 | 4,556 |
import java.io.DataInputStream
import java.io.DataOutputStream
//
// pop
// stack: ..., value -> ...
//
class Pop(owner: AttributeOwner) extends NoOperandOp(owner, OpCode.POP, "pop") {
}
//
// pop2
// stack: ..., value1, value2 -> ... (category 1 values)
// or
// stack: ..., value -> ... (category 2 value)
// (see t... | pattyshack/abc | src/jvm_bytecode/operations/stack_operations.scala | Scala | bsd-3-clause | 2,379 |
package org.littlewings.tweetbot.application.carat.lyrics.config
import javax.enterprise.context.ApplicationScoped
import com.typesafe.config.{Config, ConfigFactory}
import org.littlewings.tweetbot.config.EncryptTwitterConfigSupport
@ApplicationScoped
class CaratLyricsConfig extends EncryptTwitterConfigSupport {
o... | kazuhira-r/tweet-bot | src/main/scala/org/littlewings/tweetbot/application/carat/lyrics/config/CaratLyricsConfig.scala | Scala | mit | 434 |
/*
* 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/ct-calculations | src/main/scala/uk/gov/hmrc/ct/accounts/frsse2008/AC33.scala | Scala | apache-2.0 | 1,436 |
/* 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/control_flow/GradientState.scala | Scala | apache-2.0 | 14,557 |
import common._
import barneshut.conctrees._
package object barneshut {
class Boundaries {
var minX = Float.MaxValue
var minY = Float.MaxValue
var maxX = Float.MinValue
var maxY = Float.MinValue
def width = maxX - minX
def height = maxY - minY
def size = math.max(width, height)
... | huajianmao/learning | coursera/parprog1/week4/barneshut/src/main/scala/barneshut/package.scala | Scala | mit | 6,563 |
package mesosphere.marathon.api.v2
import java.util.Collections
import mesosphere.marathon._
import mesosphere.marathon.api.{ TaskKiller, TestAuthFixture }
import mesosphere.marathon.core.task.Task
import mesosphere.marathon.core.task.tracker.TaskTracker
import mesosphere.marathon.health.HealthCheckManager
import mes... | pgkelley4/marathon | src/test/scala/mesosphere/marathon/api/v2/TasksResourceTest.scala | Scala | apache-2.0 | 8,757 |
/*
* Copyright 2017-2018 47 Degrees, LLC. <http://www.47deg.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 require... | frees-io/freestyle | modules/examples/todolist-http-http4s/src/main/scala/todo/model/models.scala | Scala | apache-2.0 | 784 |
/*
* 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/hive/src/test/scala/org/apache/spark/sql/hive/HiveMetastoreCatalogSuite.scala | Scala | apache-2.0 | 13,734 |
import com.softwaremill.macwire.{InstanceLookup, Macwire}
import java.util.Locale
import play.api.GlobalSettings
import play.api.mvc.QueryStringBindable.Parsing
object Global extends GlobalSettings with Macwire {
val instanceLookup = wiredInModule(Application)
override def getControllerInstance[A](controllerClass... | jiemakel/seco-lexicalanalysis-play | app/Global.scala | Scala | mit | 389 |
package im.mange.acceptance.driveby.scalatest.condition
import im.mange.acceptance.driveby.scalatest.WebSpecification
import im.mange.driveby.Class
import im.mange.driveby.conditions._
import org.scalatest.Matchers
class ElementCountEqualsSpec extends WebSpecification with Matchers {
def `count by class` {
val ... | alltonp/driveby | src/test/scala/im/mange/acceptance/driveby/scalatest/condition/ElementCountEqualsSpec.scala | Scala | apache-2.0 | 522 |
package kea
package instances
import java.net.{URI, URL}
import com.typesafe.config.Config
trait UrlInstances {
implicit val urlReader: ConfigReader[URL] = (c: Config, p: String) => validated(new URL(c.getString(p)))
implicit val uriReader: ConfigReader[URI] = (c: Config, p: String) => validated(new URI(c.getSt... | lewismj/kea | core/src/main/scala/kea/instances/url.scala | Scala | bsd-2-clause | 374 |
package org.hammerlab.bam.spark
import hammerlab.path._
import org.hammerlab.bam.test.resources.bam1
import org.hammerlab.cli.app.MainSuite
class ComputeSplitsTest
extends MainSuite(ComputeSplits) {
override def extraArgs(outPath: Path) = Seq(bam1, outPath)
import org.hammerlab.test.matchers.lines.Line._
t... | ryan-williams/spark-bam | cli/src/test/scala/org/hammerlab/bam/spark/ComputeSplitsTest.scala | Scala | apache-2.0 | 2,001 |
/*
* Artificial Intelligence for Humans
* Volume 2: Nature Inspired Algorithms
* Java Version
* http://www.aifh.org
* http://www.jeffheaton.com
*
* Code repository:
* https://github.com/jeffheaton/aifh
*
* Copyright 2014 by Jeff Heaton
*
* Licensed under the Apache License, Version 2.0 (the "License");
* y... | PeterLauris/aifh | vol2/vol2-scala-examples/src/main/scala/com/heatonresearch/aifh/evolutionary/population/BasicPopulation.scala | Scala | apache-2.0 | 3,887 |
package nicol
import akka.actor.ActorSystem
import akka.event.Logging
import akka.actor.ActorDSL._
import org.lwjgl.opengl._
import java.util.UUID
import scala.concurrent.duration._
import scala.concurrent.ExecutionContext.Implicits.global
/**
* Modified for scala 2.10; since Actors frameworks is no longer a part of... | fehu/agent-tareas | lwjgl/src/main/scala/nicol/Game.scala | Scala | mit | 1,111 |
/**
* Copyright 2010 Johannes Wachter, Marcus Körner, Johannes Potschies, Jeffrey Groneberg, Sergej Jakimcuk
*
* 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.o... | jwachter/travel-service | src/main/scala/travelservice/model/TicketFlight.scala | Scala | apache-2.0 | 1,961 |
/*
* 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/test/scala/monifu/reactive/observers/BufferDropNewSuite.scala | Scala | apache-2.0 | 9,106 |
package scalax.chart
package module
/** $LabelGeneratorsInfo */
object LabelGenerators extends LabelGenerators
/** $LabelGeneratorsInfo
*
* @define LabelGeneratorsShortInfo [[LabelGenerators]] contains means to conveniently create label
* generators for all supported chart types.
*
* {{{
* val chart = Pie... | wookietreiber/scala-chart | src/main/scala/scalax/chart/module/LabelGenerators.scala | Scala | lgpl-3.0 | 816 |
//
// Taranos Cloud Sonification Framework: Service Core
// Copyright (C) 2018 David Hinson, Netrogen Blue LLC (dhinson@netrogenblue.com)
//
// 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 F... | taranos/taranoscsf-core | src/main/scala/org/taranos/mc/trunk/intraprocess/SignalBridgePlant.scala | Scala | agpl-3.0 | 8,942 |
package mesosphere.raml.backend.treehugger
import mesosphere.raml.backend.{PlayPath, camelify, scalaFieldName, underscoreToCamel}
import mesosphere.raml.ir.{ConstraintT, FieldT}
import treehugger.forest._
import definitions._
import treehuggerDSL._
import scala.annotation.tailrec
object FieldVisitor {
def visit(p... | mesosphere/marathon | type-generator/src/main/scala/mesosphere/raml/backend/treehugger/FieldVisitor.scala | Scala | apache-2.0 | 4,122 |
/*
* Happy Melly Teller
* Copyright (C) 2013 - 2016, Happy Melly http://www.happymelly.com
*
* This file is part of the Happy Melly Teller.
*
* Happy Melly Teller 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 Fo... | HappyMelly/teller | app/models/repository/cm/Repositories.scala | Scala | gpl-3.0 | 1,470 |
package io.scalac.amqp.impl
import scala.collection.JavaConversions._
import scala.concurrent.duration.Duration
import java.util.concurrent.TimeUnit
import akka.util.ByteString
import com.google.common.collect.ImmutableMap
import com.google.common.net.MediaType
import com.rabbitmq.client.{AMQP, ConnectionFactory, E... | iozozturk/reactive-rabbit | src/main/scala/io/scalac/amqp/impl/Conversions.scala | Scala | apache-2.0 | 5,904 |
package org.scalajs.testsuite.javalib.util
import java.{lang => jl, util => ju}
import org.junit.Test
import org.scalajs.testsuite.utils.CollectionsTestBase
import scala.reflect.ClassTag
trait CollectionsOnMapsTest extends CollectionsTestBase {
def factory: MapFactory
@Test def unmodifiableMap(): Unit = {
... | mdedetrich/scala-js | test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/util/CollectionsOnMapsTest.scala | Scala | bsd-3-clause | 2,446 |
/*
* Copyright 2012-2013 Stephane Godbillon (@sgodbillon) and Zenexity
*
* 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 req... | maxime-gautre/ReactiveMongo | driver/src/main/scala/core/commands/administrative.scala | Scala | apache-2.0 | 1,140 |
/*
* 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... | ajbozarth/incubator-livy | integration-test/src/main/scala/org/apache/livy/test/framework/ExternalCluster.scala | Scala | apache-2.0 | 3,683 |
package com.sksamuel.elastic4s.requests.update
import com.fasterxml.jackson.annotation.JsonProperty
case class UpdateByQueryResponse(took: Long,
@JsonProperty("timed_out") timedOut: Boolean,
total: Long,
updated: Long,
... | stringbean/elastic4s | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/update/UpdateByQueryResponse.scala | Scala | apache-2.0 | 840 |
/*
* Copyright 2011-2014 Chris de Vreeze
*
* 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... | EBPI/yaidom | src/main/scala/nl/ebpi/yaidom/parse/DocumentParserUsingStax.scala | Scala | apache-2.0 | 5,347 |
package enigma
import scalaz.syntax.state._
import scalaz.State, State._
case class Machine(
plugboard: Plugboard,
right: Rotor,
middle: Rotor,
left: Rotor,
reflector: Reflector
)
object Machine {
import monocle.{Lenser,Lenses,Lens}
import monocle.syntax._
val lenserM = Lenser[Machine]
val rightL ... | timperrett/enigma | src/main/scala/enigma/Machine.scala | Scala | apache-2.0 | 2,012 |
package org.jetbrains.plugins.scala
package lang
package scaladoc
package psi
package impl
import _root_.org.jetbrains.plugins.scala.lang.psi.ScalaPsiElementImpl
import api.ScDocMethodParams
import com.intellij.lang.ASTNode
/**
* User: Alexander Podkhalyuzin
* Date: 22.07.2008
*/
class ScDocMethodParamsImpl(nod... | consulo/consulo-scala | src/org/jetbrains/plugins/scala/lang/scaladoc/psi/impl/ScDocMethodParamsImpl.scala | Scala | apache-2.0 | 443 |
object Outer {
import Inner._
deathname
object Inner {
def deathname: Int = 1
}
}
| yusuke2255/dotty | tests/pos/t0774/unrelated.scala | Scala | bsd-3-clause | 96 |
package im.dlg.api
trait Hacks {
def hackAttributeName(name: String): String = {
if (name == "uid")
"userId"
else if (name.endsWith("Uid"))
name.take(name.length - 3) + "UserId"
else if (name == "rid")
"randomId"
else
name
}
def extTypeName(structName: String): String = s... | dialogs/sbt-dialog-api | src/main/scala/im/dlg/api/Hacks.scala | Scala | mit | 506 |
/*
* Copyright 2011-2014 Chris de Vreeze
*
* 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... | EBPI/yaidom | src/main/scala/nl/ebpi/yaidom/convert/package.scala | Scala | apache-2.0 | 1,405 |
package views.html.climate
import play.templates._
import play.templates.TemplateMagic._
import play.api.templates._
import play.api.templates.PlayMagic._
import models._
import controllers._
import java.lang._
import java.util._
import scala.collection.JavaConversions._
import scala.collection.JavaConverters._
impo... | dsarlis/SAD-Spring-2016-Project-Team4 | ApacheCMDA-Frontend/target/scala-2.10/src_managed/main/views/html/climate/dataSetList.template.scala | Scala | mit | 10,415 |
/*
* Scala (https://www.scala-lang.org)
*
* Copyright EPFL and Lightbend, Inc.
*
* Licensed under Apache License 2.0
* (http://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package scala.tools.nsc
packag... | scala/scala | src/interactive/scala/tools/nsc/interactive/tests/core/PresentationCompilerRequestsWorkingMode.scala | Scala | apache-2.0 | 2,825 |
/*
* Copyright 2015 Avira Operations 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 applicable law or agre... | Avira/sparser | test/src/main/scala/com/avira/ds/sparser/test/ParserTestSuite.scala | Scala | apache-2.0 | 7,495 |
object Test {
def main(args: Array[String]): Unit = {
val x = new Array[Int](1)
x(0) = 10
println(JA.get(x)) // error
println(JA.getVarargs(x*)) // now OK.
}
}
| lampepfl/dotty | tests/neg/i533/Test.scala | Scala | apache-2.0 | 180 |
/*
*************************************************************************************
* Copyright 2011 Normation SAS
*************************************************************************************
*
* This file is part of Rudder.
*
* Rudder is free software: you can redistribute it and/or modify
* it under the... | armeniaca/rudder | rudder-web/src/main/scala/com/normation/spring/ScalaApplicationContext.scala | Scala | gpl-3.0 | 4,862 |
/*
* Copyright (c) 2002-2018 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundatio... | HuangLS/neo4j | community/cypher/cypher-compiler-2.3/src/test/scala/org/neo4j/cypher/internal/compiler/v2_3/executionplan/FallbackPlanBuilderTest.scala | Scala | apache-2.0 | 4,366 |
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.