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.benchmark import breeze.linalg.DenseMatrix import shredzzz.kirkwood.cumath.tensor.CuMatrix import shredzzz.kirkwood.driver.CuContext import shredzzz.kirkwood.utils.cuDriver object MatrixBenchmark { def main(args: Array[String]) { val size = 300 val loops = 1000 val matrix = ...
shredzzz/kirkwood
src/test/scala/shredzzz/kirkwood/benchmark/MatrixBenchmark.scala
Scala
apache-2.0
1,210
package com.gx.repository case class Account(id: Int, name: String, age: Int)
josephguan/scala-design-patterns
persistence/repository/src/main/scala/com/gx/repository/Account.scala
Scala
apache-2.0
79
package com.mesosphere.universe.v3.circe import com.mesosphere.universe.v3.model.DcosReleaseVersion import com.mesosphere.universe.v3.model.DcosReleaseVersion._ import io.circe.Json import io.circe.jawn.decode import io.circe.syntax._ import org.scalatest.FreeSpec import scala.util.Right class DcosReleaseVersionEncod...
dcos/cosmos
cosmos-test-common/src/test/scala/com/mesosphere/universe/v3/circe/DcosReleaseVersionEncoderDecoderSpec.scala
Scala
apache-2.0
852
object Hello { sealed abstract class X[+A] { type This[+A] <: X[A] def asThis: This[A] } class Y[+A] extends X[A] { override type This[+AA] = Y[AA] override def asThis: This[A] = this } def hackBackToSelf[F[+u] <: X[u], A](f: F[Any])(f2: f.This[A]): F[A] = f2.asInstanceOf[F[A]] case ...
dotty-staging/dotty
tests/pos/i11955.scala
Scala
apache-2.0
702
package net.sansa_stack.inference.spark.data.model import net.sansa_stack.inference.data._ /** * A data structure that comprises a collection of triples. Note, due to the implementation of the Spark * datastructures, this doesn't necessarily mean to be free of duplicates which is why a `distinct` operation * is...
SANSA-Stack/SANSA-RDF
sansa-inference/sansa-inference-spark/src/main/scala/net/sansa_stack/inference/spark/data/model/AbstractRDFGraphSpark.scala
Scala
apache-2.0
593
package models.auth case class NamePassLogin(id: String, userName: String, password: String, linkedId: Option[String], serializedprofile: Option[String])
kristiankime/calc-tutor
app/models/auth/NamePassLogin.scala
Scala
mit
154
package com.github.mohamedkomalo.leveldbgui import java.io.File import javax.swing._ import javax.swing.table.AbstractTableModel import com.github.mohamedkomalo.util.SwingWrappers._ /** * Created by Mohamed Kamal on 11/6/2015. */ class LeveldbGuiClientViewImpl extends LeveldbGuiClientWindowGenerated with LeveldbGu...
mohamedkomalo/leveldb-gui-client
src/main/scala/com/github/mohamedkomalo/leveldbgui/LeveldbGuiClientViewImpl.scala
Scala
mit
4,658
package com.codacy.client.bitbucket.v1 import java.time.LocalDateTime import play.api.libs.functional.syntax._ import play.api.libs.json._ case class CommitComment( id: Long, username: String, commit: String, display_name: String, content: String, created_on: LocalDateTime ) object CommitCom...
codacy/bitbucket-scala-client
src/main/scala/com/codacy/client/bitbucket/v1/CommitComment.scala
Scala
apache-2.0
826
package models.gsv import java.sql.Timestamp import models.utils.MyPostgresDriver.simple._ import play.api.Play.current case class GSVData(gsvPanoramaId: String, imageWidth: Int, imageHeight: Int, tileWidth: Int, tileHeight: Int, imageDate: String, imageryType: Int, copyright: String, expired: Bool...
ProjectSidewalk/SidewalkWebpage
app/models/gsv/GSVDataTable.scala
Scala
mit
2,771
package com.sk.app.proxmock.application.domain.providers.url import com.jayway.restassured.RestAssured._ import com.sk.app.proxmock.BaseIntegrationTest import org.hamcrest.Matchers._ /** * Created by szymo on 25/11/2016. */ class GroovyExpressionUrlProviderTest extends BaseIntegrationTest("/proxy/groovy/expressio...
szymonkudzia/proxmock
sources/src/test/scala/com/sk/app/proxmock/application/domain/providers/url/GroovyExpressionUrlProviderTest.scala
Scala
mit
1,341
package edu.rice.habanero.benchmarks.philosopher import java.util.concurrent.atomic.{AtomicBoolean, AtomicLong} import edu.rice.habanero.actors.{ScalaActor, ScalaActorState} import edu.rice.habanero.benchmarks.{Benchmark, BenchmarkRunner} /** * * @author <a href="http://shams.web.rice.edu/">Shams Imam</a> (shams@r...
shamsmahmood/savina
src/main/scala/edu/rice/habanero/benchmarks/philosopher/PhilosopherScalaActorBenchmark.scala
Scala
gpl-2.0
3,669
package redbot.utils object OptParams { trait OptParamTag type ?[+T] = Option[T] with OptParamTag implicit def Opt2Param[T]: Option[T] => ?[T] = _.asInstanceOf[?[T]] implicit def OptConfusion[T]: Option[T] => Option[T] = throw new IllegalStateException("This shouldn't be callable...") implicit def Val2Param...
JamesGallicchio/RedBot
src/main/scala/redbot/utils/OptParams.scala
Scala
mit
836
package pl.touk.nussknacker.engine.management.sample.service import java.time.LocalDateTime import java.util.Optional import javax.annotation.Nullable import pl.touk.nussknacker.engine.api.{MethodToInvoke, ParamName, Service} import scala.concurrent.Future class OptionalTypesService extends Service with Serializabl...
TouK/nussknacker
engine/flink/management/dev-model/src/main/scala/pl/touk/nussknacker/engine/management/sample/service/OptionalTypesService.scala
Scala
apache-2.0
965
/* * Copyright (c) 2014-2021 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
monifu/monifu
monix-eval/shared/src/test/scala/monix/eval/CoevalMiscSuite.scala
Scala
apache-2.0
3,098
package grammarcomp package benchmarks import grammar._ import EBNFGrammar._ import grammar.CFGrammar._ import grammar.GrammarReaders.GrammarImplicit object ExprGrammarDSL { import GrammarDSL._ import scala.language.postfixOps def benchmarkName = "ToolGrammar using DSL" def benchmarkSource = "lara-compl...
epfl-lara/GrammarComparison
src/main/scala/grammarcomp/benchmarks/ExpressionGrammarDSL.scala
Scala
mit
1,075
package cross import com.sandinh.phputils.PhpObject.parse import java.io.{BufferedInputStream, FileInputStream} import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers import sys.process._ class UnserSpec extends AnyFlatSpec with Matchers { def unser(): Any = { val bis = new Buff...
giabao/php-utils
src/test/scala/cross/UnserSpec.scala
Scala
apache-2.0
1,079
/* * 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 ...
haowu80s/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateOrdering.scala
Scala
apache-2.0
5,067
package uk.gov.gds.ier.transaction.overseas.nino import uk.gov.gds.ier.test.ControllerTestSuite class NinoControllerTests extends ControllerTestSuite { behavior of "NinoController.get" it should "display the page" in { running(FakeApplication()) { val Some(result) = route( FakeRequest(GET, "/re...
michaeldfallen/ier-frontend
test/uk/gov/gds/ier/transaction/overseas/nino/NinoControllerTests.scala
Scala
mit
4,221
package com.rocketfuel.sdbc object PostgreSql extends postgresql.PostgreSql { override def initializeJson(connection: PostgreSql.Connection): Unit = () } object PostgreSqlArgonaut extends postgresql.PostgreSql with postgresql.ArgonautSupport object PostgreSqlJson4SJackson extends postgresql.PostgreSql ...
rocketfuel/sdbc
postgresql/src/main/scala/com/rocketfuel/sdbc/PostgreSql.scala
Scala
bsd-3-clause
551
package reactivemongo.core final class NettyPackSpec extends org.specs2.mutable.Specification { "Netty pack" title "Pack" should { import netty.Pack lazy val expected: Pack = _root_.tests.Common.nettyNativeArch match { case Some("linux") => Pack.epoll.orNull case Some("osx") => Pack.kqueue....
cchantep/ReactiveMongo
driver/src/test/scala/NettyPackSpec.scala
Scala
apache-2.0
441
package fpinscala sealed trait List[+A] // `List` data type, parameterized on a type, `A` case object Nil extends List[Nothing] // A `List` data constructor representing the empty list /* Another data constructor, representing nonempty lists. Note that `tail` is another `List[A]`, which may be `Nil` or another `Cons`....
aromine2/fpinscala
answers/src/main/scala/fpinscala/List.scala
Scala
mit
14,383
package com.wallace.demo.app.topKDemo /** * Created by 10192057 on 2018/6/22 0022. */ object KClosetPoint { case class Point(x: Int, y: Int) case object Point { val zero: Point = Point(0, 0) } def equal(a: Point, b: Point): Boolean = a.x == b.x && a.y == b.y def distance(start: Point, end: Point)...
BiyuHuang/CodePrototypesDemo
demo/ScalaDemo/src/main/scala/com/wallace/demo/app/topKDemo/KClosetPoint.scala
Scala
apache-2.0
2,541
package ecommerce.sales import scala.slick.jdbc.JdbcBackend.Database import pl.newicom.dddd.http.Endpoint abstract class ReadEndpoint extends Endpoint[Database] { }
odd/ddd-leaven-akka-v2
sales/read-front/src/main/scala/ecommerce/sales/ReadEndpoint.scala
Scala
mit
168
package ui.premiseView import java.awt.{Toolkit, BorderLayout, Dimension, Font} import javax.swing._ /** * Created by MarioDiniz on 08/09/16. */ class PremiseView(premise: String = "") extends JFrame { private val premisePanel = new JPanel() private var graphPanel: ResultPanel = null config configInput ...
mariohd/LogicCompiler
src/main/scala/ui/premiseView/PremiseView.scala
Scala
mit
1,209
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.api.test import com.google.inject.AbstractModule import org.specs2.mutable._ import play.api.inject.guice.{ GuiceApplicationBuilder, GuiceApplicationLoader } import play.api.{ Play, Application } class SpecsSpec extends Specific...
Shruti9520/playframework
framework/src/play-specs2/src/test/scala/play/api/test/SpecsSpec.scala
Scala
apache-2.0
1,268
object Test { def foo(x : AnyVal) = x match {case b : Boolean => "It's a bool"} }
som-snytt/dotty
tests/patmat/t3163.scala
Scala
apache-2.0
83
package ml.combust.mleap.bundle.ops.regression import ml.combust.bundle.BundleContext import ml.combust.bundle.dsl._ import ml.combust.bundle.op.OpModel import ml.combust.bundle.serializer.ModelSerializer import ml.combust.mleap.bundle.ops.MleapOp import ml.combust.mleap.core.regression.{DecisionTreeRegressionModel, G...
combust-ml/mleap
mleap-runtime/src/main/scala/ml/combust/mleap/bundle/ops/regression/GBTRegressionOp.scala
Scala
apache-2.0
2,048
import scala.quoted.* class Foo { def f[T2](t: Type[T2])(using Quotes) = t match { case '[ *:[Int, t2] ] => Type.of[ *:[Int, t2] ] } }
dotty-staging/dotty
tests/pos-macros/i7264.scala
Scala
apache-2.0
149
// Generated by the Scala Plugin for the Protocol Buffer Compiler. // Do not edit! // // Protofile syntax: PROTO3 package com.komanov.serialization.domain.protos.site @SerialVersionUID(0L) final case class PageComponentDataPb( data: com.komanov.serialization.domain.protos.site.PageComponentDataPb.Data = com.kom...
dkomanov/scala-serialization
scala-serialization/src/main/scala/com/komanov/serialization/domain/protos/site/PageComponentDataPb.scala
Scala
mit
26,286
/* * 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/nn/MVSpec.scala
Scala
apache-2.0
2,536
package com.seanshubin.todo.sample.test import org.scalatest.FunSuite class DataStoreTest extends FunSuite { test("post") { runTestNamed("post") } test("delete") { runTestNamed("delete") } test("put") { runTestNamed("put") } test("patch") { runTestNamed("patch") } def runTestNamed(n...
SeanShubin/javascript-todo-samples
test/src/test/scala/com/seanshubin/todo/sample/test/DataStoreTest.scala
Scala
unlicense
462
package com.datastax.spark.connector import scala.language.implicitConversions /** Unambiguous reference to a column in the query result set row. */ sealed trait ColumnRef /** A column that can be selected from CQL results set by name */ sealed trait SelectableColumnRef extends ColumnRef { /** Returns a CQL phrase...
nvoron23/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/ColumnRef.scala
Scala
apache-2.0
2,967
/* * Copyright © 2014 TU Berlin (emma@dima.tu-berlin.de) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
aalexandrov/emma
emma-language/src/main/scala/org/emmalanguage/compiler/lang/backend/Caching.scala
Scala
apache-2.0
5,384
package com.scalableQuality.quick.core.phases sealed trait ColumnUsageStages case object ValidationStage extends ColumnUsageStages case object MatchingStage extends ColumnUsageStages case object ReportingStage extends ColumnUsageStages
MouslihAbdelhakim/Quick
src/main/scala/com/scalableQuality/quick/core/phases/ColumnUsageStages.scala
Scala
apache-2.0
237
/* * 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/main/scala/org/neo4j/cypher/internal/compiler/v2_3/pipes/matching/MatchingContext.scala
Scala
apache-2.0
2,870
/* * 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 ...
lincoln-lil/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/rules/physical/batch/BatchPhysicalLegacyTableSourceScanRule.scala
Scala
apache-2.0
2,801
/******************************************************************************* * Copyright (c) 2019. Carl Minden * * 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 ...
carlminden/anathema-roguelike
src/com/anathema_roguelike/entities/characters/perks/actions/targetingstrategies/shapes/Cone.scala
Scala
gpl-3.0
1,549
/** * 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...
wangcy6/storm_app
frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/main/scala/kafka/tools/ProducerPerformance.scala
Scala
apache-2.0
13,606
package org.zalando.jsonapi.json package playjson import org.zalando.jsonapi.model.RootObject import spray.httpx.marshalling.Marshaller import spray.httpx.unmarshalling.Unmarshaller class PlayJsonJsonapiSupportSpec extends JsonapiSupportSpec { override def jsonapiSupportClassName: String = "PlayJsonJsonapiSupport" ...
texvex/scala-jsonapi
src/test/scala/org/zalando/jsonapi/json/playjson/PlayJsonJsonapiSupportSpec.scala
Scala
mit
584
package core import spray.httpx.unmarshalling.{MalformedContent, Unmarshaller, Deserialized} import spray.http.HttpEntity import spray.json._ import spray.client.pipelining._ import domain.Tweet import java.text.SimpleDateFormat import akka.actor.{ActorRef, Actor} trait TweetMarshaller { type Tweets = Vector[Tweet]...
eigengo/activator-akka-cassandra
src/main/scala/core/tweetscan.scala
Scala
apache-2.0
1,806
/* # Copyright 2016 Georges Lipka # # 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 wri...
glipka/Easy-React-With-ScalaJS
src/main/scala/com/glipka/easyReactJS/reactRouter/MatchArgs.scala
Scala
apache-2.0
1,064
/* * 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 ...
apache/karaf-webconsole
servicemix/src/main/scala/org/apache/karaf/webconsole/servicemix/internal/ServiceMixPage.scala
Scala
apache-2.0
2,920
package org.thp.cortex.models import javax.inject.{ Inject, Singleton } import scala.concurrent.Future import scala.util.Try import play.api.libs.json.{ JsObject, JsString, Json } import org.elastic4play.models.JsonFormat.enumFormat import org.elastic4play.models.{ AttributeDef, BaseEntity, ChildModelDef, EntityDef...
CERT-BDF/Cortex
app/org/thp/cortex/models/Worker.scala
Scala
agpl-3.0
2,566
package sbt.wrap import org.scalacheck._ import java.util.{HashSet, LinkedHashSet} object WrappedHashSetTests extends MutableSetWrapperTests(new HashSet[Int]) object WrappedLinkedHashSetTests extends MutableSetWrapperTests(new LinkedHashSet[Int]) { specify("toList preserves order", checkAddOrdered _) private def c...
matheshar/simple-build-tool
src/test/scala/sbt/wrap/MutableSetWrapper.scala
Scala
bsd-3-clause
2,447
package io.finch.internal import com.twitter.finagle.http.Response import com.twitter.util.Future import io.finch.{Endpoint, Output} import shapeless.HNil import shapeless.ops.function.FnToProduct /** * A type class that allows the [[Endpoint]] to be mapped to either `A => B` or `A => Future[B]`. * @groupname LowPr...
yanana/finch
core/src/main/scala/io/finch/internal/Mapper.scala
Scala
apache-2.0
3,592
package sbtmarathon import java.io.IOException import java.net.{InetSocketAddress, ServerSocket} import java.util.concurrent.Executors import scala.concurrent.{ExecutionContext, Future} import com.twitter.finagle.{Http, Service} import com.twitter.finagle.http.{Request, Response} import com.twitter.util.Await import o...
Tapad/sbt-marathon
marathon/src/test/scala/sbtmarathon/MockMarathonServer.scala
Scala
bsd-3-clause
1,532
/* Copyright 2009-2016 EPFL, Lausanne */ package leon package grammars /** The empty expression grammar */ case class Empty() extends ExpressionGrammar { def computeProductions(l: Label)(implicit ctx: LeonContext) = Nil }
epfl-lara/leon
src/main/scala/leon/grammars/Empty.scala
Scala
gpl-3.0
226
package com.example import com.twitter.finagle.{Http, Service} import com.twitter.util.{Await, Future} import com.twitter.finagle.http.Response import java.net.InetSocketAddress import org.jboss.netty.handler.codec.http._ import util.Properties import java.io.{InputStream, FileNotFoundException, InputStreamReader, Bu...
jkutner/scala-ssl-sample
src/main/scala/com/example/Server.scala
Scala
mit
1,706
/* * 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 ...
ptkool/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
Scala
apache-2.0
131,416
/* * Copyright (C) 2020 MapRoulette contributors (see CONTRIBUTORS.md). * Licensed under the Apache License, Version 2.0 (see LICENSE). */ package org.maproulette.framework.service import java.util.UUID import org.maproulette.framework.model._ import org.maproulette.framework.psql.Query import org.maproulette.fra...
mgcuthbert/maproulette2
test/org/maproulette/framework/service/ChallengeSnapshotServiceSpec.scala
Scala
apache-2.0
1,573
/* ************************************************************************************* * 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...
jooooooon/rudder
rudder-web/src/main/scala/com/normation/rudder/web/components/ShowNodeDetailsFromNode.scala
Scala
agpl-3.0
7,356
/* * 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 ...
esi-mineset/spark
streaming/src/test/scala/org/apache/spark/streaming/MasterFailureTest.scala
Scala
apache-2.0
15,603
package utils.silhouette import models.TokenUser import com.mohiva.play.silhouette.core.services.TokenService import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicits.global class TokenUserService extends TokenService[TokenUser] { def create (token: TokenUser): Future[Option[TokenUser]] = { ...
vtapadia/crickit
modules/web/app/utils/silhouette/TokenUserService.scala
Scala
apache-2.0
509
/* * Copyright (c) 2018 OVO Energy * * 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, copy, modify, merge, publish,...
ovotech/comms-kafka-messages
modules/core/src/main/scala/com/ovoenergy/comms/model/IssuedForDeliveryV3.scala
Scala
mit
2,122
/* * 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/src/main/scala/org/apache/spark/sql/hive/TableReader.scala
Scala
apache-2.0
22,672
/* * 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 ...
kimihe/Swallow
swallow-benchmark/HiBench-master/sparkbench/ml/src/main/scala/com/intel/sparkbench/ml/LinearRegressionDataGenerator.scala
Scala
apache-2.0
4,095
/* * 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...
travisbrown/scalatest
src/test/scala/org/scalactic/enablers/CollectingSpec.scala
Scala
apache-2.0
1,796
package com.shocktrade.client.profile import com.shocktrade.client.models.UserProfile import com.shocktrade.common.forms.ExchangesForm import com.shocktrade.common.models.user.{NetWorth, OnlineStatus} import io.scalajs.npm.angularjs.Service import io.scalajs.npm.angularjs.http.Http import io.scalajs.social.facebook.Fa...
ldaniels528/shocktrade.js
app/client/angularjs/src/main/scala/com/shocktrade/client/profile/UserProfileService.scala
Scala
apache-2.0
3,412
/* * 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.annotation /** ...
scala/scala
src/library/scala/annotation/unused.scala
Scala
apache-2.0
717
package contract import com.twitter.finagle.Service import com.twitter.finagle.http.{Request, Response} import com.twitter.util.Await import example.external.UserDirectory import example.{EmailAddress, User, Username} import org.scalatest.{FunSpec, Matchers} /** * This represents the contract that both the real and...
daviddenton/fintrospect-example-app
src/test/scala/contract/UserDirectoryContract.scala
Scala
apache-2.0
1,600
package com.raquo.domtypes.generic.defs.attrs import com.raquo.domtypes.generic.builders.HtmlAttrBuilder import com.raquo.domtypes.generic.codecs.{BooleanAsOnOffStringCodec, BooleanAsTrueFalseStringCodec} /** @tparam A HtmlAttribute[Value] */ trait HtmlAttrs[A[_]] { this: HtmlAttrBuilder[A] => /** * Declares t...
raquo/scala-dom-types
shared/src/main/scala/com/raquo/domtypes/generic/defs/attrs/HtmlAttrs.scala
Scala
mit
4,381
package a4.shard import java.io.File import org.junit.Assert._ import org.junit.Test class DomainTest { val fooWikiLocation = new java.io.File(getClass.getResource("/wikitestbasepath").toURI) val fooWiki = Wiki("foo", "Foo Wiki", fooWikiLocation) val fooRoot = Folder(fooWiki, fooWiki.location) @Test def ...
aggregat4/shard
src/test/scala/a4/shard/DomainTest.scala
Scala
apache-2.0
1,392
package monocle.function import monocle.MonocleSuite import monocle.law.discipline.function.Cons1Tests import scalaz.IList class Cons1Spec extends MonocleSuite { implicit val clistCons1: Cons1[CNel, Char, IList[Char]] = Cons1.fromIso(CNel.toNel) checkAll("fromIso", Cons1Tests[CNel, Char, IList[Char]]) }
rperry/Monocle
test/shared/src/test/scala/monocle/function/Cons1Spec.scala
Scala
mit
315
/* * 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 ...
tophua/spark1.52
core/src/main/scala/org/apache/spark/status/api/v1/ApplicationListResource.scala
Scala
apache-2.0
3,866
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.scaladsl.persistence.testkit import akka.actor.ActorSystem import com.lightbend.lagom.internal.persistence.testkit.PersistenceTestConfig import com.lightbend.lagom.internal.persistence.testkit.{ AwaitPersistenceIn...
rcavalcanti/lagom
persistence/scaladsl/src/main/scala/com/lightbend/lagom/scaladsl/persistence/testkit/AbstractTestUtil.scala
Scala
apache-2.0
838
package dotty.tools.dotc.core import language.implicitConversions object Flags { /** A FlagSet represents a set of flags. Flags are encoded as follows: * The first two bits indicate whether a flagset applies to terms, * to types, or to both. Bits 2..63 are available for properties * and can be doubly ...
DarkDimius/dotty
src/dotty/tools/dotc/core/Flags.scala
Scala
bsd-3-clause
19,468
package ipeluffo import java.io.File import ipeluffo.util.Utils import org.apache.hadoop.fs.FileUtil import org.apache.spark.rdd.RDD /** * Created by ipeluffo on 12/13/15. */ object ProcessSearchedPlacesByCount { def main (args: Array[String]): Unit = { if (args.length < 2) { println("Usage: Process...
ipeluffo/InfoVisDataProcessing
src/main/scala/ipeluffo/ProcessSearchedPlacesByCount.scala
Scala
mit
1,986
/* * Copyright 2022 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/sbt-bobby
src/main/scala/uk/gov/hmrc/bobby/Bobby.scala
Scala
apache-2.0
2,207
/* * Copyright 2022 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/sbt-bobby
src/main/scala/uk/gov/hmrc/bobby/domain/Message.scala
Scala
apache-2.0
1,612
package org.broadinstitute.dsde.vault.datamanagement.model import com.wordnik.swagger.annotations.{ApiModelProperty, ApiModel} import scala.annotation.meta.field @ApiModel(value = "A collection of uBAMS") case class UBamCollection ( @(ApiModelProperty@field)(value = "The Vault IDs of the uBAMs included in this col...
broadinstitute/vault-datamanagement
src/main/scala/org/broadinstitute/dsde/vault/datamanagement/model/UBamCollection.scala
Scala
bsd-3-clause
830
/* Copyright 2014 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...
tresata/scalding
scalding-core/src/main/scala/com/twitter/scalding/typed/Sketched.scala
Scala
apache-2.0
4,589
/** * This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]]. */ // DO NOT EDIT MANUALLY package sbt.protocol.testing.codec trait JsonProtocol extends sjsonnew.BasicJsonProtocol with sbt.protocol.testing.codec.TestStringEventFormats with sbt.protocol.testing.codec.TestInitEventForm...
sbt/sbt
testing/src/main/contraband-scala/sbt/protocol/testing/codec/JsonProtocol.scala
Scala
apache-2.0
865
package spire.benchmark.jmh import org.openjdk.jmh.annotations.{Scope, Setup, State} import spire.math.FastComplex import scala.util.Random._ @State(Scope.Thread) class FastComplexState extends StateSupport { var values: Array[Long] = _ @Setup def setup: Unit = values = init(size)(FastComplex(nextFloat(), next...
woparry/spire
benchmark-jmh/src/main/scala/spire/benchmark/jmh/FastComplexState.scala
Scala
mit
332
/* * Copyright © 2016 Schlichtherle IT Services * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
christian-schlichtherle/neuron-di
core-scala/src/test/scala/global/namespace/neuron/di/scala/sample/GreetingModule.scala
Scala
apache-2.0
1,412
package free package mu sealed trait ExprInstr[+A] case class Val(i: Double) extends ExprInstr[Nothing] case class Add[A](l: A, r: A) extends ExprInstr[A] case class Mul[A](l: A, r: A) extends ExprInstr[A] case class Div[A](l: A, r: A) extends ExprInstr[A] case class Sub[A](l: A, r: A) extends ExprInstr[A] object Exp...
YoEight/psug-free
src/main/scala/free/mu/Expr.scala
Scala
mit
1,130
/* sbt -- Simple Build Tool * Copyright 2009 Mark Harrah */ package sbt import java.io.File import org.apache.ivy.util.url.CredentialsStore object Credentials { def apply(realm: String, host: String, userName: String, passwd: String): Credentials = new DirectCredentials(realm, host, userName, passwd) def ap...
pdalpra/sbt
ivy/src/main/scala/sbt/Credentials.scala
Scala
bsd-3-clause
2,926
/** * Copyright (C) 2012 Typesafe, Inc. <http://www.typesafe.com> */ package org.pantsbuild.zinc import java.io.File import scala.annotation.tailrec /** * Parsing command-line options, immutably. */ object Options { def parse[Context](context: Context, options: Set[OptionDef[Context]], args: Seq[String], stopO...
cevaris/pants
src/scala/org/pantsbuild/zinc/Options.scala
Scala
apache-2.0
8,281
package mesosphere.marathon package api.v2.validation import com.wix.accord.Validator import com.wix.accord.dsl._ import mesosphere.marathon.api.v2.Validation import mesosphere.marathon.raml.{ EnvVarSecret, EnvVarValue, EnvVarValueOrSecret, SecretDef } trait SecretValidation { import Validation._ def stringify(r...
Caerostris/marathon
src/main/scala/mesosphere/marathon/api/v2/validation/SecretValidation.scala
Scala
apache-2.0
1,217
/** * Copyright 2016, 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
deeplang/src/main/scala/io/deepsense/deeplang/params/exceptions/ParamsEqualException.scala
Scala
apache-2.0
862
/* * 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...
luchy0120/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/optim/Predictor.scala
Scala
apache-2.0
5,451
/* * 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 ...
BryanCutler/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/RemoveRedundantProjectsSuite.scala
Scala
apache-2.0
8,424
package org.http4s.websocket import org.specs2.mutable.Specification class WebSocketHandshakeSpec extends Specification { "WebSocketHandshake" should { "Be able to split multi value header keys" in { val totalValue = "keep-alive, Upgrade" val values = List("upgrade", "Upgrade", "keep-alive", "Keep...
aeons/http4s
tests/src/test/scala/org/http4s/websocket/WebSocketHandshakeSpec.scala
Scala
apache-2.0
752
/* * Copyright 2017-2022 John Snow Labs * * 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...
JohnSnowLabs/spark-nlp
src/test/scala/com/johnsnowlabs/nlp/DocumentAssemblerTestSpec.scala
Scala
apache-2.0
2,570
package org.ferrit.dao.cassandra import java.util.Date import org.joda.time.DateTime import com.datastax.driver.core.{Session, PreparedStatement} import com.datastax.driver.core.{BoundStatement, ResultSet, Row} import org.ferrit.dao.DocumentMetaDataDAO import org.ferrit.dao.cassandra.CassandraDAO._ import org.ferrit.c...
reggoodwin/ferrit
src/main/scala/org/ferrit/dao/cassandra/CassandraDocumentMetaDataDAO.scala
Scala
mit
2,738
object A { val x = 2; val y = x.asInstanceOf[Byte]; val z = 1.0 / 2; val s = "z is " + z; } object Test extends App { Console.println(A.x); Console.println(A.y); Console.println(A.z); Console.println(A.s); }
densh/dotty
tests/pos/constfold.scala
Scala
bsd-3-clause
234
package com.redis.cluster import java.util.zip.CRC32 import scala.collection.immutable.TreeMap import scala.collection.mutable.ArrayBuffer /** * Consistent Hashing node ring abstraction. */ case class HashRing[T](nodes: List[T], replicas: Int) { val cluster = new ArrayBuffer[T] private var ring = TreeMap[Long,...
Tjoene/thesis
Case_Programs/scala-redis-2.9-pre-scala-2.10/src/main/scala/com/redis/cluster/HashRing.scala
Scala
gpl-2.0
2,089
/* * 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...
mohitjaggi/spark-csv
src/test/scala/com/databricks/spark/csv/CsvSuite.scala
Scala
apache-2.0
14,915
/* * Copyright 2014–2017 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
drostron/quasar
blueeyes/src/main/scala/quasar/precog/common/accounts/StaticAccountFinder.scala
Scala
apache-2.0
1,392
package org.scalajs.testsuite.javalib.time.chrono import java.time.{DateTimeException, LocalTime, LocalDate} import java.time.chrono.ChronoLocalDate import org.junit.Test import org.junit.Assert._ import org.scalajs.testsuite.utils.AssertThrows._ class ChronoLocalDateTest { import ChronoLocalDate._ @Test def te...
sjrd/scala-js-java-time
testSuite/shared/src/test/scala/org/scalajs/testsuite/javalib/time/chrono/ChronoLocalDateTest.scala
Scala
bsd-3-clause
874
package com.lynbrookrobotics.potassium.commons.lift import com.lynbrookrobotics.potassium.commons.lift.offloaded.{OffloadedLift, OffloadedLiftProperties} import com.lynbrookrobotics.potassium.control.PIDConfig import com.lynbrookrobotics.potassium.control.offload.OffloadedSignal.{OpenLoop, PositionBangBang} import com...
Team846/potassium
commons/src/test/scala/com/lynbrookrobotics/potassium/commons/lift/OffloadedLiftTaskTest.scala
Scala
mit
6,451
/* * Copyright (c) 2011-2017 Interfaculty Department of Geoinformatics, University of * Salzburg (Z_GIS) & Institute of Geological and Nuclear Sciences Limited (GNS Science) * in the SMART Aquifer Characterisation (SAC) programme funded by the New Zealand * Ministry of Business, Innovation and Employment (MBIE) * ...
ZGIS/smart-portal-backend
app/models/db/DatabaseSessionHolder.scala
Scala
apache-2.0
1,793
package models import de.leanovate.swaggercheck.schema.model.ValidationResult import de.leanovate.swaggercheck.shrinkable.CheckJsValue import org.scalacheck.Arbitrary import org.specs2.ScalaCheck import org.specs2.matcher.MustMatchers import org.specs2.mutable.Specification import play.api.libs.json.Json import suppor...
leanovate/book-db-sample
backends/play-scala-slick/test/models/AuthorSpec.scala
Scala
mit
1,006
package quizleague.web.maintain.competitionstatistics import quizleague.web.core._ import quizleague.web.maintain.component.ItemListComponentConfig import quizleague.web.maintain.component.TemplateElements._ import quizleague.web.model._ import quizleague.web.names._ import scala.scalajs.js object CompetitionStatist...
gumdrop/quizleague-maintain
js/src/main/scala/quizleague/web/maintain/competitionstatistics/CompetitionStatisticsListComponent.scala
Scala
mit
860
//----------------------------------------------------------------------- // FILE : CredentialStorage.scala // SUBJECT : Interface to classes that holds RT_0 credentials along with their minimum model. // AUTHOR : (C) Copyright 2011 by Peter C. Chapin <PChapin@vtc.vsc.edu> // //-------------------------------------...
pchapin/sprocket
src/edu/uvm/rt/CredentialStorage.scala
Scala
bsd-3-clause
2,006
/* * 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/accounts/AC411.scala
Scala
apache-2.0
957
/* * Copyright 2020 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 i...
spotify/scio
scio-repl/src/main/scala-2.13/com/spotify/scio/repl/compat/package.scala
Scala
apache-2.0
651
/* * Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com> */ package play.it.http import java.io.{ File, InputStream } import java.net.URL import java.security.cert.X509Certificate import javax.net.ssl.{ HttpsURLConnection, SSLContext, X509TrustManager } import play.api.inject.guice.GuiceApplicationB...
Shenker93/playframework
framework/src/play-integration-test/src/test/scala/play/it/http/SecureFlagSpec.scala
Scala
apache-2.0
4,167
package sample.util import scala.util.control.Breaks import com.ibm.icu.text.Transliterator /** 各種型/文字列変換をサポートします。(ICU4Jライブラリに依存しています) */ trait ConvertUtils { private val ZenkakuToHan: Transliterator = Transliterator.getInstance("Fullwidth-Halfwidth") private val HankakuToZen: Transliterator = Transliterator.get...
jkazama/sample-boot-scala
src/main/scala/sample/util/ConvertUtils.scala
Scala
mit
3,852
package com.sksamuel.scrimage.filter import org.scalatest.{ OneInstancePerTest, BeforeAndAfter, FunSuite } import com.sksamuel.scrimage.Image /** @author Stephen Samuel */ class ContrastFilterTest extends FunSuite with BeforeAndAfter with OneInstancePerTest { val original = Image(getClass.getResourceAsStream("/bir...
carlosFattor/scrimage
scrimage-filters/src/test/scala/com/sksamuel/scrimage/filter/ContrastFilterTest.scala
Scala
apache-2.0
560
/** * Copyright (c) 2013-2015 Patrick Nicolas - Scala for Machine Learning - All rights reserved * * The source code in this file is provided by the author for the sole purpose of illustrating the * concepts and algorithms presented in "Scala for Machine Learning". It should not be used to * build commercial ap...
batermj/algorithm-challenger
books/cs/machine-learning/scala-for-machine-learning/1rst-edition/original-src-from-the-book/src/main/scala/org/scalaml/supervised/regression/RegressionModel.scala
Scala
apache-2.0
2,498