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 dotty.tools.scaladoc package site import java.nio.file.Path case class StaticSiteRoot( rootTemplate: LoadedTemplate, siteMappings: Map[Path, Path] ): lazy val reverseSiteMappings = siteMappings.map(_.swap).toMap lazy val sources = siteMappings.keys.toSet lazy val dests = reverseSiteMappings.keys.toS...
dotty-staging/dotty
scaladoc/src/dotty/tools/scaladoc/site/StaticSiteRoot.scala
Scala
apache-2.0
322
/* * 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 ...
jianran/spark
core/src/main/scala/org/apache/spark/SparkContext.scala
Scala
apache-2.0
116,478
package net.ultrametrics.fractactor import net.ultrametrics.math.Complex /** * A trait for any holomorphic function that can be calculated from a * point in the complex plane. */ trait HolomorphicFunction { /** * Calculate the function at a single point. * @param c a point in the complex plane * @return...
pchuck/fractactor
src/main/scala/net/ultrametrics/fractactor/HolomorphicFunction.scala
Scala
bsd-2-clause
409
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.internal.broker import akka.persistence.query.Offset import akka.stream.scaladsl.Source import com.lightbend.lagom.scaladsl.api.broker.Subscriber import com.lightbend.lagom.scaladsl.api.broker.Topic import com.lightbend...
rcavalcanti/lagom
service/scaladsl/broker/src/main/scala/com/lightbend/internal/broker/TopicProducers.scala
Scala
apache-2.0
1,117
trait BankMessage { def accountId: String } case class Open(accountId: String) extends BankMessage case class Close(accountId: String) extends BankMessage case class Deposit(accountId: String, amount: Double) extends BankMessage case class Withdrawal(accountId: String, amount: Double) extends BankMessage case class ...
timschlechter/akka-demos
scala/src/main/scala/Messages.scala
Scala
mit
459
package org.geneticmachine.machine import org.geneticmachine._ import scala.concurrent.Future final class SimpleMachine[+C <: ExecutionContext] (implicit val executionContext: C, implicit val db: DBDriver) extends Machine[C] { val log = executionContext.logger def submit[I, O, S, C1 >: C <: ExecutionCont...
ZloVechno/genetic-machine
src/main/scala/org/geneticmachine/machine/SimpleMachine.scala
Scala
mit
1,068
// Copyright 2014 Foursquare Labs Inc. All Rights Reserved. package io.fsq.spindle.codegen.runtime.test import io.fsq.spindle.codegen.runtime.enhanced_types.test.gen.{BSONObjectFields, ObjectIdFields, UUIDFields} import io.fsq.spindle.runtime.{KnownTProtocolNames, TProtocolInfo} import java.util.UUID import org.apach...
foursquare/fsqio
test/jvm/io/fsq/spindle/codegen/runtime/test/EnhancedTypesTest.scala
Scala
apache-2.0
2,898
import scala.util.parsing.combinator._ class Arith extends JavaTokenParsers { def expr: Parser[Any] = term ~ rep("+" ~ term | "-" ~ term) def term: Parser[Any] = factor ~ rep("*" ~ factor | "/" ~ factor) def factor: Parser[Any] = floatingPointNumber | "("~expr~")" } object ParseExpr extends Arith { def main(...
sanjosh/scala
dsl-demo/src/main/scala/ParseExpr.scala
Scala
apache-2.0
420
package models import com.lukaspradel.steamapi.data.json.playersummaries.Player import models.ServiceProfile.ProfileState import reactivemongo.bson.{ BSONDocument, BSONDocumentReader, BSONDocumentWriter } /** * Created by henrik on 2017-02-26. */ trait SteamProfile extends ServiceProfile { override type Self = St...
hnrklssn/game-check-match
app/models/SteamProfile.scala
Scala
apache-2.0
1,447
// // Scaled TODO Mode - a Scaled major mode for editing TODO files // http://github.com/scaled/todo-mode/blob/master/LICENSE package scaled.todo import scaled._ import scaled.grammar._ import scaled.major.TextConfig object TodoConfig extends Config.Defs { /** The CSS style applied to `done` list entries. */ va...
scaled/todo-mode
src/scala/scaled/todo/TodoMode.scala
Scala
bsd-3-clause
1,877
package models import java.util.UUID.fromString import base.SemanticFeatureSpec import utils.semantic.{ Vocabulary, Resource } import utils.Implicits._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future class TimetableSpec extends SemanticFeatureSpec { val timetable1 = Timeta...
FHK-ADV/lwm
test/models/TimetableSpec.scala
Scala
mit
3,047
/** * Copyright (C) 2011 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This program i...
evlist/orbeon-forms
src/main/scala/org/orbeon/oxf/fb/ContainerOps.scala
Scala
lgpl-2.1
8,057
package scribe.file import scribe.LogRecord import scribe.output.LogOutput import scribe.output.format.OutputFormat import scribe.util.Time import scribe.writer.Writer import java.io.File import java.nio.charset.Charset import scala.concurrent.ExecutionContext case class FileWriter(pathBuilder: PathBuilder = PathBui...
outr/scribe
fileModule/shared/src/main/scala/scribe/file/FileWriter.scala
Scala
mit
1,791
package org.openapitools.client.model case class StringParameterValue ( _class: Option[String], _name: Option[String], _value: Option[String] ) object StringParameterValue { def toStringBody(var_class: Object, var_name: Object, var_value: Object) = s""" | { | "class":$var_clas...
cliffano/swaggy-jenkins
clients/scala-gatling/generated/src/gatling/scala/org/openapitools/client/model/StringParameterValue.scala
Scala
mit
396
/* * Copyright 2013-2015 Websudos, Limited. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of c...
levinson/phantom
phantom-dsl/src/test/scala/com/websudos/phantom/builder/serializers/UpdateQuerySerializationTest.scala
Scala
bsd-2-clause
6,599
package dotty.tools package dotc package typer import core._ import ast._ import Contexts._ import Types._ import Flags._ import Denotations._ import Names._ import StdNames._ import NameOps._ import Symbols._ import Trees._ import ProtoTypes._ import Constants._ import Scopes._ import annotation.unchecked import util...
VladimirNik/dotty
src/dotty/tools/dotc/typer/Checking.scala
Scala
bsd-3-clause
15,123
package vaadin.scala import vaadin.scala.internal.UploadReceiver import vaadin.scala.internal.UploadProgressListener import vaadin.scala.internal.UploadStartedListener import vaadin.scala.internal.UploadFinishedListener import vaadin.scala.internal.UploadFailedListener import vaadin.scala.internal.UploadSucceededListe...
CloudInABox/scalavaadinutils
src/main/scala/vaadin/scala/Upload.scala
Scala
mit
4,188
/* * Copyright (c) 2015 Daniel Higuero. * * 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...
anazamarron/spark-streaming-exercises
src/main/scala/org/spark/examples/streaming/ejercicio4.scala
Scala
apache-2.0
3,799
/* * 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 ...
narahari92/spark
resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala
Scala
apache-2.0
25,989
package com.lynbrookrobotics.potassium.commons.drivetrain.unicycle.control import com.lynbrookrobotics.potassium.streams.Stream import squants.{Length, Time} import squants.motion._ import squants.space.Feet trait UnicycleMotionProfileControllers extends UnicycleCoreControllers { /** * Uses a control loop that ...
Team846/potassium
commons/src/main/scala/com/lynbrookrobotics/potassium/commons/drivetrain/unicycle/control/UnicycleMotionProfileControllers.scala
Scala
mit
3,847
package views import play.api.{Logger, Play} import java.io.InputStream import com.ee.assets.deployment.{ContentInfo, Deployer} import com.ee.assets.models.SimpleAssetsInfo import com.ee.assets.transformers.{SimpleDeployedElement, DeployedElement} object Helper{ val deployer : Deployer = new Deployer { overrid...
edeustace/assets-loader
example/example-play-app/app/views/Helper.scala
Scala
mit
2,229
package com.softwaremill.codebrag.repository import org.eclipse.jgit.api.Git import scala.collection.JavaConversions._ import org.eclipse.jgit.api.ListBranchCommand.ListMode trait BranchesModel { def remoteBranchesFullNames: Set[String] def findStaleBranchesFullNames(locallyCachedBranches: Set[String]): Set[Str...
softwaremill/codebrag
codebrag-service/src/main/scala/com/softwaremill/codebrag/repository/BranchesModel.scala
Scala
agpl-3.0
1,562
package scala.meta.metac import scala.meta.cli._ final class Settings private (val scalacArgs: List[String]) { private def this() = { this(scalacArgs = Nil) } def withScalacArgs(scalacArgs: List[String]): Settings = { copy(scalacArgs = scalacArgs) } private def copy(scalacArgs: List[String] = scal...
MasseGuillaume/scalameta
semanticdb/metac/src/main/scala/scala/meta/metac/Settings.scala
Scala
bsd-3-clause
570
package com.evecentral.routes import org.scalatest.{BeforeAndAfterAll, FunSuiteLike} import akka.actor.{Props, ActorSystem, Actor} import com.evecentral.dataaccess.StaticProvider import akka.testkit.{TestActorRef, TestKit} class RouteFinderTest(as: ActorSystem) extends TestKit(as) with FunSuiteLike with BeforeAndAfte...
theatrus/eve-central.com
core/src/test/scala/com/evecentral/routes/TestRouteFinderActor.scala
Scala
agpl-3.0
1,075
/* * 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 ...
lxsmnv/spark
core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala
Scala
apache-2.0
27,059
/** * 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
reportlib/src/test/scala/io/deepsense/reportlib/model/DistributionJsonSpec.scala
Scala
apache-2.0
5,033
package com.rasterfoundry.api.team import com.rasterfoundry.akkautil.{ Authentication, CommonHandlers, UserErrorHandler } import com.rasterfoundry.database._ import com.rasterfoundry.datamodel._ import akka.http.scaladsl.server.Route import com.rasterfoundry.akkautil.PaginationDirectives import de.heikoseeberger...
aaronxsu/raster-foundry
app-backend/api/src/main/scala/team/Routes.scala
Scala
apache-2.0
1,846
/* * 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/ct600/v3/B85A.scala
Scala
apache-2.0
812
/* * This file is part of AckCord, licensed under the MIT License (MIT). * * Copyright (c) 2019 Katrix * * 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 ...
Katrix-/AckCord
gateway/src/main/scala/ackcord/util/AckCordGatewaySettings.scala
Scala
mit
2,020
package im.actor.server.file import java.io.ByteArrayOutputStream import akka.actor.ActorSystem import com.sksamuel.scrimage.nio.{ ImageWriter, JpegWriter, PngWriter } import com.sksamuel.scrimage.{ Image, ParImage, Position } import im.actor.server.acl.ACLUtils import im.actor.server.db.DbExtension import im.actor.s...
ljshj/actor-platform
actor-server/actor-core/src/main/scala/im/actor/server/file/ImageUtils.scala
Scala
mit
7,502
/* 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...
benpence/scalding
scalding-thrift-macros/src/main/scala/com/twitter/scalding/thrift/macros/impl/ordered_serialization/ScroogeEnumOrderedBuf.scala
Scala
apache-2.0
2,469
package com.datastax.spark.connector.util case class ConfigParameter[T]( val name: String, val section: String, val default: T, val description: String) extends DataFrameOption { override val sqlOptionName = name.replaceAll("\\\\.", "\\\\_") def option(value: Any): Map[String, String] = { require(val...
maasg/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/util/ConfigParameter.scala
Scala
apache-2.0
367
/* * 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 ...
chenc10/Spark-PAF
core/src/main/scala/org/apache/spark/launcher/WorkerCommandBuilder.scala
Scala
apache-2.0
1,987
package org.jetbrains.plugins.scala.annotator.gutter /** * Pavel.Fatin, 21.01.2010 */ class GroupTest extends LineMarkerTestBase { protected override def getBasePath = super.getBasePath + "/group/" def testSolid(): Unit = doTest() def testSeparated(): Unit = doTest() def testMixed(): Unit = doTest() def ...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/annotator/gutter/GroupTest.scala
Scala
apache-2.0
393
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
pgandhi999/spark
sql/core/src/test/scala/org/apache/spark/sql/TPCHQuerySuite.scala
Scala
apache-2.0
3,901
/* * Copyright (C) 2015 Stratio (http://stratio.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
diegohurtado/sparta
serving-core/src/main/scala/com/stratio/sparta/serving/core/models/policy/writer/FromPkFieldsModel.scala
Scala
apache-2.0
801
/* * 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...
chipsenkbeil/incubator-toree
kernel/src/main/scala/org/apache/toree/magic/builtin/JavaScript.scala
Scala
apache-2.0
1,818
package org.qcri.rheem.spark.operators.graph import java.lang.{Long => JavaLong} import java.util import java.util.Collections import org.apache.spark.graphx.Graph import org.apache.spark.graphx.lib.PageRank import org.qcri.rheem.basic.data.{Tuple2 => T2} import org.qcri.rheem.basic.operators.PageRankOperator import ...
jonasrk/rheem
rheem-platforms/rheem-spark/src/main/scala/org/qcri/rheem/spark/operators/graph/SparkPageRankOperator.scala
Scala
apache-2.0
3,288
/* * Copyright 2017 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...
liquidarmour/ct-calculations
src/test/scala/uk/gov/hmrc/ct/ct600/accounts/AC8023Spec.scala
Scala
apache-2.0
11,864
package coder.simon.types.free import scalaz._ import Scalaz._ object M3 extends App { case class Logger[LOG, A](log: LOG, value: A) { def map[B](f: A => B): Logger[LOG, B] = Logger(log, f(value)) def flatMap[B](f: A => Logger[LOG, B])(implicit m: Monoid[LOG]) = { val n = f(value) Logger(log |+...
erlangxk/fpscala
src/main/scala/coder/simon/types/free/M3.scala
Scala
mit
1,393
package com.openquant.quoter.common import java.io.InputStreamReader import com.openquant.quoter.utils import org.joda.time.format.ISODateTimeFormat /** * @author piotr 31.05.15 */ class FutureList { object FutureContract extends Enumeration { type FutureContract = Value val LightCrudeOil = Value v...
openquant/quoter
src/main/scala/com/larroy/quoter/common/FutureList.scala
Scala
lgpl-3.0
1,170
/*********************************************************************** * 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-metrics/src/test/scala/org/locationtech/geomesa/metrics/reporters/DelimitedFileReporterTest.scala
Scala
apache-2.0
5,664
package org.jetbrains.plugins.scala package annotator import org.jetbrains.plugins.scala.base.libraryLoaders.{LibraryLoader, ScalaReflectLibraryLoader} class MacroDefAnnotatorTest extends ScalaHighlightingTestBase { override protected def supportedIn(version: ScalaVersion): Boolean = version >= LatestScalaVersions.S...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/annotator/MacroDefAnnotatorTest.scala
Scala
apache-2.0
1,218
package dawn.flow sealed trait Block[A] extends Source[A] { parent => override def scheduler = out.scheduler def out: Source[A] val trans = new Op1[A, A] { def rawSource1 = out def listen1(x: Timestamped[A]) = parent.broadcast(x) def name = "Block out" } } trait Block0[A] extends Source...
rubenfiszel/scala-flow
core/src/main/scala/Block.scala
Scala
mit
1,572
package com.twitter.server.util import com.twitter.conversions.time._ import com.twitter.finagle.stats.{StatsRegistry, StatEntry} import com.twitter.util.Time import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner private[server] object MetricSourceTest { class Ctx { ...
BuoyantIO/twitter-server
src/test/scala/com/twitter/server/util/MetricSourceTest.scala
Scala
apache-2.0
1,803
/** * FILE: PageFactory.scala * PERCORSO /Codice/sgad/servertier/src/main/scala/sgad/servertier/presentation/pagemanager * DATA CREAZIONE: 27 Febbraio 2014 * AUTORE: ProTech * EMAIL: protech.unipd@gmail.com * * Questo file è proprietà del gruppo ProTech, viene rilasciato sotto licenza Apache v2. * * DIARIO DEL...
protechunipd/SGAD
Codice/sgad/servertier/src/main/scala/sgad/servertier/presentation/pagemanager/PageFactory.scala
Scala
apache-2.0
9,630
/** * Copyright 2017 RiskSense, Inc. * This file is part of ipaddr library. * * Ipaddr is free software 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.apac...
risksense/ipaddr
src/test/scala/com/risksense/ipaddr/IpNetworkTest.scala
Scala
apache-2.0
4,598
package filodb.memory.format import org.agrona.{DirectBuffer, ExpandableArrayBuffer} import org.agrona.concurrent.UnsafeBuffer import org.scalatest._ import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks import org.scalatest.funspec.AnyFunSpec import org.scalatest.matchers.should.Matchers class NibblePackTest ...
tuplejump/FiloDB
memory/src/test/scala/filodb.memory/format/NibblePackTest.scala
Scala
apache-2.0
10,069
package benchmarks.coloredGraph.internal import java.io.File import java.nio.file.Files import scala.Array.canBuildFrom import scala.collection.mutable.HashMap import scala.util.Random import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import scala.collection.mutable.H...
skill-lang/skillScalaTestSuite
src/test/scala/benchmarks/coloredGraph/internal/WRABenchmark.scala
Scala
bsd-3-clause
5,023
object Test { def main(args: Array[String]): Unit = { def f(erased i: Int) = { new Foo(i)(foo) } f(5) } def foo: Int = { println("foo") 42 } } class Foo(erased a: Int)(b: Int) { println("Foo") }
som-snytt/dotty
tests/run-custom-args/erased/erased-7.scala
Scala
apache-2.0
235
/* Copyright (C) 2008-2016 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
Craigacp/factorie
src/test/scala/cc/factorie/variable/TestProportionsVariable.scala
Scala
apache-2.0
2,248
package com.karasiq.bittorrent.dht import scala.concurrent.duration._ import scala.language.postfixOps import scala.util.{Failure, Random, Success} import akka.actor.{Actor, ActorLogging, ActorRef, DeadLetterSuppression, NotInfluenceReceiveTimeout, PossiblyHarmful, Props} import akka.pattern.{ask, pipe} import akka.u...
Karasiq/torrentstream
library/src/main/scala/com/karasiq/bittorrent/dht/DHTBucket.scala
Scala
apache-2.0
5,751
package chess import Pos._ class HistoryTest extends ChessTest { "threefold repetition" should { def toHash(a: Int) = Array(a.toByte, 0.toByte, 0.toByte) def makeHistory(positions: List[Int]) = (positions map toHash).foldLeft(History()) { case (history, hash) => history.copy(positionHashes = history....
psuter/scalachess
src/test/scala/HistoryTest.scala
Scala
mit
910
/* * 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/test/scala/com/intel/analytics/bigdl/nn/SpatialCrossMapLRNSpec.scala
Scala
apache-2.0
5,862
/* * Copyright (c) 2014-2016 * nonblocking.at gmbh [http://www.nonblocking.at] * * This file is part of Cliwix. * * Cliwix 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...
nonblocking/cliwix
cliwix-core/src/main/scala/at/nonblocking/cliwix/core/transaction/CliwixRollbackException.scala
Scala
agpl-3.0
983
/* Copyright 2017-19, 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_scala
modules/jni/src/main/scala/org/platanios/tensorflow/jni/Session.scala
Scala
apache-2.0
3,498
object ScalaSkeleton { def main(args: Array[String]): Unit = { println("Hello friend.") } }
FunTimeCoding/scala-skeleton
src/ScalaSkeleton.scala
Scala
mit
100
package skuber.util import java.io.InputStreamReader import java.util import org.yaml.snakeyaml.constructor.SafeConstructor import play.api.libs.json.{JsObject, Json} /** * @author David O'Riordan * * This supports reading of resources represented as Yaml into one or more Json objects. */ object YamlReader {...
doriordan/skuber-util
src/main/scala/skuber/util/YamlReader.scala
Scala
apache-2.0
1,260
package org.sisioh.aws4s.s3.model import java.util.Date import com.amazonaws.services.s3.model.CompleteMultipartUploadResult import org.sisioh.aws4s.PimpedType object CompleteMultipartUploadResultFactory { def create(): CompleteMultipartUploadResult = new CompleteMultipartUploadResult() } class RichCompleteMult...
everpeace/aws4s
aws4s-s3/src/main/scala/org/sisioh/aws4s/s3/model/RichCompleteMultipartUploadResult.scala
Scala
mit
1,671
package lila.memo import com.typesafe.config.Config import lila.db.dsl._ final class Env(config: Config, db: lila.db.Env) { private val CollectionCache = config getString "collection.cache" lazy val mongoCache: MongoCache.Builder = MongoCache(db(CollectionCache)) } object Env { lazy val current = "memo" boo...
clarkerubber/lila
modules/memo/src/main/Env.scala
Scala
agpl-3.0
401
package suiryc.scala.misc /* XXX - handle time system (separate for human readable form, or introduce 'cumulative' notion ?) */ /* XXX - handle floating points in human representation ? */ object Units { case class Unit(label: String, factor: Long) abstract class AbstractSystem(unityLabel: String) { val un...
swhgoon/suiryc-scala
core/src/main/scala/suiryc/scala/misc/Units.scala
Scala
gpl-3.0
2,680
package org.jetbrains.plugins.scala package debugger.evaluation import com.intellij.debugger.codeinsight.RuntimeTypeEvaluator import com.intellij.debugger.engine.ContextUtil import com.intellij.debugger.engine.evaluation.{CodeFragmentKind, TextWithImportsImpl, EvaluationContextImpl} import com.intellij.debugger.engine...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/debugger/evaluation/ScalaRuntimeTypeEvaluator.scala
Scala
apache-2.0
4,379
/* * 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/play-auditing
src-common/main/scala/uk/gov/hmrc/audit/handler/LoggingHandler.scala
Scala
apache-2.0
1,333
import Stream._ sealed trait Stream[+A] { def headOption: Option[A] = this match { case Empty => None case Cons(h, t) => Some(h()) } // EX1 def toList: List[A] = this match { case Cons(h, t) => h() :: t().toList case Empty => Nil } // EX2 def take(n: Int): Stream[A] = { def go(s: S...
marcos-sb/scala-exercises
ch5-stream.scala
Scala
gpl-2.0
6,451
package hammock package hi import java.time.ZonedDateTime import cats._ import cats.implicits._ import hammock.hi.Cookie.SameSite import hammock.hi.platformspecific._ import monocle.Optional import monocle.macros.Lenses @Lenses case class Cookie( name: String, value: String, expires: Option[ZonedDateTime...
pepegar/hammock
core/src/main/scala/hammock/hi/Cookie.scala
Scala
mit
5,565
/* * 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 ...
ahnqirage/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala
Scala
apache-2.0
30,501
/* * Copyright (c) 2016 SnappyData, 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 required by ap...
vjr/snappydata
examples/src/main/scala/org/apache/spark/examples/snappydata/WorkingWithJson.scala
Scala
apache-2.0
5,193
package calculator sealed abstract class Expr final case class Literal(v: Double) extends Expr final case class Ref(name: String) extends Expr final case class Plus(a: Expr, b: Expr) extends Expr final case class Minus(a: Expr, b: Expr) extends Expr final case class Times(a: Expr, b: Expr) extends Expr final cas...
alicanalbayrak/ScalaExperiments
calculator/src/main/scala/calculator/Calculator.scala
Scala
mit
1,418
/* * 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/vat-registration-frontend
app/forms/FormValidation.scala
Scala
apache-2.0
12,047
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.testsuite.junit import or...
scala-js/scala-js
test-suite/js/src/main/scala/org/scalajs/testsuite/junit/MultiCompilationTest.scala
Scala
apache-2.0
496
package main.scala import edu.utah.cs.simba.SimbaContext import edu.utah.cs.simba.index.RTreeType import org.apache.spark.{SparkConf, SparkContext} /** * Created by and on 3/20/17. */ object PartitionViewer { case class PointItem(id: Int, x: Double, y: Double) var master: String = "local[*]" var filename...
aocalderon/PhD
Y2Q3/PBFE3/src/main/scala/main/scala/PartitionViewer.scala
Scala
lgpl-3.0
1,914
package com.scalableminds.webknossos.datastore.services import akka.actor.ActorSystem import com.google.inject.Inject import com.google.inject.name.Named import com.scalableminds.webknossos.datastore.models.datasource.inbox.InboxDataSource import com.scalableminds.webknossos.datastore.models.datasource.{DataSource, Da...
scalableminds/webknossos
webknossos-datastore/app/com/scalableminds/webknossos/datastore/services/DataSourceRepository.scala
Scala
agpl-3.0
1,642
/* * 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 ...
andrewor14/iolap
graphx/src/test/scala/org/apache/spark/graphx/util/BytecodeUtilsSuite.scala
Scala
apache-2.0
4,486
/* * 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/main/scala/com/intel/analytics/bigdl/nn/ops/FloorMod.scala
Scala
apache-2.0
1,817
/** * This file is part of mycollab-web. * * mycollab-web 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. * * mycollab-web is d...
uniteddiversity/mycollab
mycollab-web/src/main/scala/com/esofthead/mycollab/module/crm/view/lead/LeadUrlResolver.scala
Scala
agpl-3.0
2,351
package com.caffinc.hydrangea.core.transformer import com.caffinc.hydrangea.core.serde.KafkaRecord /** * Stores the KafkaRecord into a persistent storage (MongoDB) * * @author Sriram */ object StorageTransformer extends Transformer[KafkaRecord, String] { def apply(implicit record: KafkaRecord): String = tra...
caffinc/hydrangea
hydrangea/core/src/main/scala/com/caffinc/hydrangea/core/transformer/StorageTransformer.scala
Scala
mit
447
/** * @author Yuuto */ package yuuto.enhancedinventories.gui import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.InventoryCraftResult; import net.minecraft.inventory.InventoryCrafting; /** * A Dummy cra...
AnimeniacYuuto/EnhancedInventories
src/main/scala/yuuto/enhancedinventories/gui/ContainerCraftingDummy.scala
Scala
gpl-2.0
828
import java.nio.file.Paths def test1 = { Paths.get("") Paths.get("", null) Paths.get("", "") Paths.get("", "", null) val x1: String = ??? val x2: String | Null = ??? Paths.get("", x1) Paths.get("", x2) } def test2 = { val xs1: Seq[String] = ??? val xs2: Seq[String | Null] = ??? val xs3: Seq[St...
lampepfl/dotty
tests/explicit-nulls/unsafe-common/unsafe-java-varargs.scala
Scala
apache-2.0
810
/* * 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 ...
mylog00/flink
flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/AsyncDataStream.scala
Scala
apache-2.0
11,195
package play.api.cache.redis import scala.language.higherKinds /** * Redis Hashes are simply hash maps with strings as keys. It is possible to add * elements to a Redis Hashes by adding new elements into the collection. * * <strong>This simplified wrapper implements only unordered Maps.</strong> * * @tpar...
KarelCemus/play-redis
src/main/scala/play/api/cache/redis/RedisMap.scala
Scala
mpl-2.0
3,124
package org.broadinstitute.dsde.workbench.sam package api import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ import akka.http.scaladsl.model.headers.OAuth2BearerToken import akka.http.scaladsl.model.{StatusCode, StatusCodes} import akka.http.scaladsl.testkit.ScalatestRouteTest import org.broadinstitute...
broadinstitute/sam
src/test/scala/org/broadinstitute/dsde/workbench/sam/api/ManagedGroupRoutesV1Spec.scala
Scala
bsd-3-clause
27,690
package play.api.db import scala.language.reflectiveCalls import play.api._ import play.api.libs._ import play.core._ import java.sql._ import javax.sql._ import com.jolbox.bonecp._ import com.jolbox.bonecp.hooks._ import scala.util.control.{ NonFatal, ControlThrowable } /** * The Play Database API manages sever...
vangav/vos_backend
play-2.2.6/framework/src/play-jdbc/src/main/scala/play/api/db/DB.scala
Scala
mit
21,505
// @SOURCE:D:/git/trask/glowroot/agent-parent/plugins/play-plugin/tmp-router-files/conf/routes // @HASH:0e9301dd33213e860c252067b6753b9f2381dcdd // @DATE:Sat Apr 09 16:55:08 PDT 2016 import Routes.{prefix => _prefix, defaultPrefix => _defaultPrefix} import play.core._ import play.core.Router._ import play.core.j._ im...
trask/glowroot
agent/plugins/play-plugin/src/test/app-2.2.x-java/scala/routes_reverseRouting.scala
Scala
apache-2.0
5,256
/* * Copyright (c) 2018. Fengguo Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License v2.0 * which accompanies this distribution, and is available at * https://www.apache.org/licenses/LICENSE-2.0 * * Detailed contributors ar...
arguslab/Argus-SAF
jawa/src/main/scala/org/argus/jawa/core/compiler/interactive/Response.scala
Scala
apache-2.0
3,061
package com.jgdodson.rosalind object Sign { def main(args: Array[String]): Unit = { val n = args(0).toInt val count = numSignedPermutations(n) val perms = Perm.permutations2((1 to n).toSet).flatMap(signed).map(_.mkString(" ")) println(count) println(perms.mkString("\n")) } def numSignedPerm...
PilgrimShadow/Rosalind.scala
src/main/scala/com/jgdodson/rosalind/Sign.scala
Scala
mit
731
package katas.scala.water import org.scalatest.Matchers import org.junit.Test /** * User: dima * Date: 10/11/2012 */ class Water0 extends Matchers { class Pouring(capacity: Vector[Int]) { type State = Vector[Int] val initialState = capacity map {x => 0} val glasses = 0 until capacity.size val moves = ...
dkandalov/katas
scala/src/katas/scala/water/Water0.scala
Scala
unlicense
2,666
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Dax1n/spark-core
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/CoarseMesosSchedulerBackend.scala
Scala
apache-2.0
11,998
/********************************************************************************************************************** * This file is part of Scrupal, a Scalable Reactive Web Application Framework for Content Management * * ...
scrupal/scrupal
scrupal-storage/src/main/scala/scrupal/storage/api/Codec.scala
Scala
apache-2.0
7,649
package doobie import scalaz.{ Monad, Catchable, Unapply, Leibniz, Free, Functor } import scalaz.stream.Process /** Module of aliases for commonly-used types and syntax; use as `import doobie.imports._` */ object imports { /** * Alias for `doobie.free.connection`. * @group Free Module Aliases */ val FC ...
jamescway/doobie
core/src/main/scala/doobie/imports.scala
Scala
mit
5,104
package lambdacalculus.machine.CallByName import lambdacalculus.machine._ case class CBNConfiguration(stack: List[MachineValue], env:List[MachineValue], code:List[Instruction]) extends Configuration { override def toString:String = { val sb = new StringBuilder() sb ++= "stack: " ++ stack.mkString("(", ",...
cn-uofbasel/nfn-scala
lambdacalc/src/main/scala/lambdacalculus/machine/CallByName/CBNConfiguration.scala
Scala
isc
521
/* * Copyright 2013 Julian Peeters * * 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...
julianpeeters/artisanal-pickle-maker
src/main/scala/tags/NONEsym.scala
Scala
apache-2.0
977
/* * Copyright 2014 Commonwealth Computer Research, 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 applica...
kevinwheeler/geomesa
geomesa-core/src/main/scala/org/locationtech/geomesa/core/data/GeoMesaMetadata.scala
Scala
apache-2.0
7,757
package org.oc.ld32.entity.ai import org.lengine.maths.Vec2f import org.oc.ld32.entity.EntityEnemy import org.oc.ld32.level.BaguetteLevel class AIWander(priority: Int, entity: EntityEnemy) extends AITask(priority, entity) { var angle = 0f var countdown = 0f var direction: Vec2f = null override def shouldCon...
OurCraft/LD32
src/main/scala/org/oc/ld32/entity/ai/AIWander.scala
Scala
apache-2.0
1,603
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ZxlAaron/mypros
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/PropagateEmptyRelationSuite.scala
Scala
apache-2.0
5,974
/* sbt -- Simple Build Tool * Copyright 2009, 2010 Mark Harrah */ package xsbt.boot import Pre._ import java.io.{ File, FileInputStream, FileOutputStream } import java.util.{ Locale, Properties } import scala.collection.immutable.List object Initialize { lazy val selectCreate = (_: AppProperty).create lazy val...
xeno-by/old-scalameta-sbt
launch/src/main/scala/xsbt/boot/Create.scala
Scala
bsd-3-clause
2,122
/* NSC -- new Scala compiler * Copyright 2007-2013 LAMP/EPFL * @author Manohar Jonnalagedda */ package scala.tools.nsc package doc package base package comment import scala.collection._ /** A body of text. A comment has a single body, which is composed of * at least one block. Inside every body is exactly one ...
felixmulder/scala
src/scaladoc/scala/tools/nsc/doc/base/comment/Body.scala
Scala
bsd-3-clause
3,749
package com.googlecode.kanbanik.commands import com.googlecode.kanbanik.builders.{PermissionsBuilder, UserBuilder} import com.googlecode.kanbanik.dtos._ import com.googlecode.kanbanik.model.User import com.googlecode.kanbanik.security._ class EditUserCommand extends BaseUserCommand with CredentialsUtils { override...
gudtago/kanbanik
kanbanik-server/src/main/scala/com/googlecode/kanbanik/commands/EditUserCommand.scala
Scala
apache-2.0
1,737
/* Copyright 2013 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...
rangadi/summingbird
summingbird-online/src/main/scala/com/twitter/summingbird/planner/StripNamedNodes.scala
Scala
apache-2.0
6,339
/* * Copyright 2011-2018 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
wiacekm/gatling
gatling-http/src/main/scala/io/gatling/http/action/HttpActionBuilder.scala
Scala
apache-2.0
1,060
/* * 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 ...
gioenn/xSpark
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveShim.scala
Scala
apache-2.0
9,710