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 me.archdev.api.external import cats.data.Xor import me.archdev.TweetRoomActor import io.circe.generic.auto._ import io.circe.parser._ import io.circe.syntax._ /** * External messaging protocol between client and server. * This layer of abstraction created to make internal messaging protocol independent f...
ArchDev/unidirectional-akka-redux
backend/src/main/scala/me/archdev/api/external/Protocol.scala
Scala
mit
1,817
object Main { def main(args: Array[String]) { println("Hello, Scala!") } }
pieces029/test-project
scala-console/src/main/scala/com.andrewreitz.test/Main.scala
Scala
apache-2.0
83
package $package$ package comet import net.liftweb.actor._ import net.liftweb.http._ import js._ import JsCmds._ import JE._ import scala.xml.NodeSeq object Presentation extends LiftActor with ListenerManager { object Ask object Init val initialStep = "title" var currentStep:String = initialStep def crea...
sjfloat/presentera.g8
src/main/g8/src/main/scala/$package$/comet/Presentation.scala
Scala
apache-2.0
779
package kafka.producer import java.util.Properties import org.apache.kafka.clients.producer._ object KafkaProducer extends App { // input val topic = "test-topic-name" val msg = "test 1 test 2 test 1 2" // config val properties = new Properties() properties.put("bootstrap.servers", "localhost:9092") ...
abilashgt/study_bigdata
spark/basic_spark/src/main/scala/kafka/producer/KafkaProducer.scala
Scala
apache-2.0
669
/* * 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 ...
bwsw/sj-platform
core/sj-engine-core/src/main/scala/com/bwsw/sj/engine/core/engine/input/CheckpointTaskInput.scala
Scala
apache-2.0
2,119
package dotty.tools.dotc.util import scala.language.unsafeNulls import org.junit.Assert._ import org.junit.Test class DiffUtilTests { def testExpected(found: String, expected: String, foundColoring: String, expectedColoring: String): Unit = { def humanAscii(str: String): String = str .replace(Co...
dotty-staging/dotty
compiler/test/dotty/tools/dotc/util/DiffUtilTests.scala
Scala
apache-2.0
1,971
// Copyright (C) 2010-2011 Monash University // // This file is part of Factotum. // // Factotum is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option...
dnikulin/factotum
src/main/scala/com/dnikulin/factotum/render/SectionMarker.scala
Scala
agpl-3.0
2,878
def =>=[E, A, B, C]: (Product[E, A] => B) => (Product[E, B] => C) => (Product[E, A] => C) = f => g => { case Product((e, a)) => val b = f(Product((e, a))) val c = g(Product((e, b))) c }
hmemcpy/milewski-ctfp-pdf
src/content/3.7/code/scala/snippet09.scala
Scala
gpl-3.0
206
import java.util.List class JavaGenerics { def r(l : List[String]) = l.get(0).<ref>toLowerCase }
LPTK/intellij-scala
testdata/resolve/nonlocal/javaGenerics.scala
Scala
apache-2.0
99
package org.fayalite.util.img import java.awt.image.{DataBufferByte, DataBufferInt, RenderedImage} import javax.imageio.ImageIO import akka.util.ByteString import rx._ import scala.collection.Iterable import scala.io.Source import scala.util.{Failure, Success, Try} import java.awt.image.BufferedImage import java.awt....
ryleg/fayalite
core/src/main/scala/org/fayalite/util/img/ImageUtils.scala
Scala
mit
2,912
package de.qualitune /** * CPSTextInterpreter - parses and interprets the CPSText DSL. * Copyright (C) 2011 Max Leuthaeuser * * 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, eithe...
max-leuthaeuser/CPSTextInterpreter
src/main/scala/de/qualitune/CPSTextRunner.scala
Scala
gpl-3.0
5,030
/* date: Aug 31, 2012 The Group 'g' command conditionally controls one or more other commands, such as, Display, Assign commands. There are four types of 'g' commands Script Examples: g (1)=(1) // if then ge // else ge (2)=(2) ...
hangle/Script
src/GroupCommand.scala
Scala
apache-2.0
1,648
object Test { def main(args: Array[String]) { println(Seq(List('1', '2', '3'), List('a', 'b', 'c')).view.addString(new StringBuilder, "_")) } }
felixmulder/scala
test/files/run/t5656.scala
Scala
bsd-3-clause
158
/* * 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...
pmadrigal/Crossdata
server/src/main/scala/com/stratio/crossdata/server/CrossdataHttpServer.scala
Scala
apache-2.0
7,205
package me.lachlanap.dropunit import me.lachlanap.dropunit.resources.DiskBlueprintLoader import me.lachlanap.dropunit.ui.UIConfig import me.lachlanap.dropunit.world._ object Launcher { def main(args: Array[String]): Unit = { import com.badlogic.gdx.backends.lwjgl._ val worldConfig = WorldConfig( colu...
thorinii/dropunit
src/main/scala/me/lachlanap/dropunit/Launcher.scala
Scala
mit
880
/* * Copyright 2017 helloscala.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 applicable law or agreed ...
helloscala/helloscala
hs-jdbc/src/main/scala/helloscala/jdbc/JdbcUtils.scala
Scala
apache-2.0
27,737
package wom.callable import wom.expression.WomExpression import wom.graph.GraphNode._ import wom.graph.{Graph, TaskCallNode} final case class WorkflowDefinition(name: String, innerGraph: Graph, meta: Map[String, String], ...
ohsu-comp-bio/cromwell
wom/src/main/scala/wom/callable/WorkflowDefinition.scala
Scala
bsd-3-clause
989
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/keras/layers/SpatialDropout1DSpec.scala
Scala
apache-2.0
1,648
/* * Artificial Intelligence for Humans * Volume 1: Fundamental Algorithms * Scala Version * http://www.aifh.org * http://www.jeffheaton.com * * Code repository: * https://github.com/jeffheaton/aifh * Copyright 2013 by Jeff Heaton * * Licensed under the Apache License, Version 2.0 (the "License"); * you ma...
HairyFotr/aifh
vol1/scala-examples/src/main/scala/com/heatonresearch/aifh/kmeans/KMeans.scala
Scala
apache-2.0
8,012
package scalan.arrays import scala.reflect.ClassTag import scalan.common.OverloadHack.Overloaded1 import scalan.staged.BaseExp import scalan.{Scalan, ScalanExp, ScalanStd} import scala.reflect.runtime.universe._ trait ArrayOps { self: Scalan => type Arr[T] = Rep[Array[T]] implicit class RepArrayOps[T: Elem](xs: A...
PCMNN/scalan-ce
core/src/main/scala/scalan/arrays/ArrayOps.scala
Scala
apache-2.0
39,261
package mesosphere.marathon package api.v2 import mesosphere.UnitTest import mesosphere.marathon.api.TestAuthFixture import mesosphere.marathon.core.deployment.{DeploymentPlan, DeploymentStep, DeploymentStepInfo} import mesosphere.marathon.core.group.GroupManager import mesosphere.marathon.state.{AppDefinition, PathId...
gsantovena/marathon
src/test/scala/mesosphere/marathon/api/v2/DeploymentsResourceTest.scala
Scala
apache-2.0
2,797
/* * 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
mllib/src/test/scala/org/apache/spark/ml/source/libsvm/LibSVMRelationSuite.scala
Scala
apache-2.0
2,775
package net.revenj.database.postgres.converters import java.io.ByteArrayInputStream import java.nio.charset.Charset import net.revenj.Utils import net.revenj.database.postgres.PostgresReader import org.xml.sax.InputSource import scala.xml.Elem object XmlConverter extends Converter[Elem] { private val utf8 = Char...
ngs-doo/revenj
scala/revenj-core/src/main/scala/net/revenj/database/postgres/converters/XmlConverter.scala
Scala
bsd-3-clause
1,101
package ch06 /** * Created by fqc on 2016/7/13. * getter and setter 的使用 */ class CannotYoungAgain { private var privateAge: Int = 20 def age = privateAge //getter /*def age_(newVale: Int): Unit = { //普通方法,不是getter块的写法 //setter if (newVale > privateAge) privateAge = newVale //岁数只能正在增长 }*/ def...
fqc/Scala_sidepro
src/ch06/CannotYoungAgain.scala
Scala
mit
735
/* * 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/flow/interprocedural/IndirectCallResolver.scala
Scala
apache-2.0
10,197
/* * Copyright (c) 2014-2015 Snowplow Analytics Ltd. * All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache * License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at * http:/...
ClaraVista-IT/kinesis-s3
src/main/scala/com.snowplowanalytics.snowplow.storage.kinesis/s3/SnowplowTracking.scala
Scala
apache-2.0
4,225
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.2 * @date Sun Jan 11 19:05:20 EST 2015 * @see LICENSE (MIT style license file). */ // FIX: needs improved optimization package scalation.analytics import math.{exp, log, round} import...
mvnural/scalation
src/main/scala/scalation/analytics/PoissonRegression.scala
Scala
mit
16,488
package monocle.std @deprecated("instances have been move to typeclass companion object", since = "1.4.0") object vector @deprecated("instances have been move to typeclass companion object", since = "1.4.0") trait VectorOptics
aoiroaoino/Monocle
core/shared/src/main/scala/monocle/std/Vector.scala
Scala
mit
229
package main.java.piratebot.pirates import main.java.piratebot._ class Brute(game: Game, player: Player) extends Pirate(game, player) { val rank = 14 val name = "Brute" override def dayAction(round : Round): RetriableMethodResponse.Value = { val pirateToKill = round.dayStack.last round.ki...
ItCouldHaveBeenGreat/Eyepatch
src/main/java/piratebot/pirates/brute.scala
Scala
gpl-3.0
572
package at.logic.gapt.expr object NonLogicalConstant { def unapply( e: Expr ) = e match { case c: LogicalConstant => None case Const( n, t ) => Some( n, t ) case _ => None } } object HOLFunction { def apply( head: Expr, args: List[Expr] ): Expr = { val res = Apps( head, arg...
gebner/gapt
core/src/main/scala/at/logic/gapt/expr/constructors.scala
Scala
gpl-3.0
9,225
package com.tu.bdap.gc import org.apache.spark.{ SparkConf, SparkContext } import org.apache.spark.graphx.{ Edge, Graph } import org.apache.spark.graphx._ import Math._ import scala.util.Random import com.tu.bdap.utils.DataSetLoader /** * Graph Colouring assigns each vertex a colour, <br> * so all neighbouring v...
janukowitsch/bdapro-graph-bench
Spark/src/main/scala/com/tu/bdap/gc/GC_BDAP.scala
Scala
mit
4,442
package slick.jdbc.meta import slick.jdbc.PositionedResult /** A qualified name with an optional catalog and schema. */ case class MQName(catalog: Option[String], schema: Option[String], name: String) { override def toString = "MQName(" + catalog.map(_ + ".").getOrElse("") + schema.map(_ + ".").getOrElse("") + name...
jkutner/slick
slick/src/main/scala/slick/jdbc/meta/MQName.scala
Scala
bsd-2-clause
732
package kata.scala import scala.collection.mutable class GraphSearch(private val marked: Set[Int]) { def hasPathTo(vertex: Int): Boolean = marked.contains(vertex) } object DepthFirstSearch { def create(graph: Graph, startVertex: Int): Option[GraphSearch] = { if (!graph.contains(startVertex)) None ...
Alex-Diez/Scala-TDD-Katas
old-katas/graph-search-kata/day-8/src/main/scala/kata/scala/GraphSearch.scala
Scala
mit
1,534
/* * This file is part of eCobertura. * * Copyright (c) 2009, 2010 Joachim Hofer * All rights reserved. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/le...
jmhofer/eCobertura
ecobertura.ui/src/main/scala/ecobertura/ui/util/JavaEditorOpener.scala
Scala
epl-1.0
626
package com.geishatokyo.sqlgen import com.geishatokyo.sqlgen.core.{Cell, DataType, Row, Sheet} import com.geishatokyo.sqlgen.logger.Logger import scala.language.experimental.macros import scala.util.DynamicVariable /** * Created by takezoux2 on 15/05/04. */ class SheetScope{ private val currentRow = new Dynam...
geishatokyo/sql-generator
src/main/scala/com/geishatokyo/sqlgen/ColumnRef.scala
Scala
mit
4,617
package pdi.jwt case class JsonDataEntry( algo: JwtAlgorithm, header: String, headerClass: JwtHeader, header64: String, signature: String, token: String, tokenUnsigned: String, tokenEmpty: String, headerJson: ujson.Value ) extends JsonDataEntryTrait[ujson.Value] trait JwtUpickleFix...
pauldijou/jwt-scala
json/upickle/src/test/scala/JwtUpickleFixture.scala
Scala
apache-2.0
838
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
practice-vishnoi/dev-spark-1
mllib/src/test/scala/org/apache/spark/ml/classification/ProbabilisticClassifierSuite.scala
Scala
apache-2.0
2,089
/* * Copyright 2012 Comcast Cable Communications Management, LLC * * 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...
Comcast/money
money-core/src/main/scala/com/comcast/money/core/context/FormattedMdcContextStorageFilter.scala
Scala
apache-2.0
2,631
/* * 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 ...
WeichenXu123/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
Scala
apache-2.0
51,265
package io.scalac.frees.login.handlers.task.github import fs2.Task import fs2.util.NonFatal import io.scalac.frees.login.algebras._ import io.scalac.frees.login.types.GitHubId import org.http4s._ import org.http4s.client.blaze.PooledHttp1Client import org.http4s.dsl.POST /** * This is simple implementation of GitHu...
LGLO/freestyle-login
src/main/scala/io/scalac/frees/login/handlers/task/github/InHouseGHClient.scala
Scala
apache-2.0
2,784
/* * Copyright (C) 2017 Michael Dippery <[email protected]> * * 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 requi...
mdippery/jupiter
src/test/scala/com/mipadi/jupiter/time/DateConversionsSpec.scala
Scala
apache-2.0
2,857
package control import scala.util.control.NonFatal import scalaz._, Scalaz._, \\&/._ /** * A data type for holding statuses. This is effectively just an * Either with a specialized left. This particular specialization * handles string/exception based failures and should be used * to wrap up unsafe apis (i.e. jav...
etorreborre/lambdajam-2014
src/main/scala/control/Status.scala
Scala
mit
5,149
package controllers import play.api.mvc._ import play.api.i18n.Lang trait BaseController extends ControllerActions case class ViewContext(request: Request[AnyContent], lang: Lang, maybeUser: Option[models.User]) extends WrappedRequest(request) trait ControllerActions extends Controller with misc.Logging { type Re...
alanktwong/play-eventsourced
app/controllers/BaseController.scala
Scala
mit
2,601
package core import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll, FunSpec} import org.scalatest.Matchers class ServicePathParametersSpec extends FunSpec with Matchers { describe("with a service") { val baseJson = """ { "name": "API Builder", "apidoc": { "version": "0.9.6" }, "enums":...
gheine/apidoc
core/src/test/scala/core/ServicePathParametersSpec.scala
Scala
mit
7,983
package com.jejking.rprng.api import akka.actor._ import akka.stream.SystemMaterializer import akka.stream.scaladsl.{Keep, Sink, Source} import akka.stream.testkit.scaladsl.TestSink import com.jejking.rprng.rng.CommonsMathRandomGeneratorFactory import org.apache.commons.math3.random.MersenneTwister import org.scalates...
jejking/rprng
src/test/scala/com/jejking/rprng/api/ToSizedSetSpec.scala
Scala
apache-2.0
2,765
package com.twitter.finatra.streams.queryable.thrift.partitioning import com.twitter.finatra.streams.queryable.thrift.client.partitioning.utils.KafkaUtils.{ murmur2, toPositive } import com.twitter.finatra.streams.queryable.thrift.domain.{KafkaPartitionId, ServiceShardId} object KafkaPartitioner { def partition...
twitter/finatra
kafka-streams/kafka-streams-queryable-thrift-client/src/main/scala/com/twitter/finatra/streams/queryable/thrift/partitioning/KafkaPartitioner.scala
Scala
apache-2.0
909
import ds.{Orderable, BST} import org.junit.runner.RunWith import org.scalacheck.Arbitrary._ import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.scalatest.prop.Checkers import org.scalacheck.Arbitrary @RunWith(classOf[JUnitRunner]) class SetTest extends FunSuite with Checkers { ...
amitdev/functional-ds
src/test/scala/SetTest.scala
Scala
mit
827
// // Vtime.scala -- Scala object Vtime // Project OrcScala // // $Id: Vtime.scala 2933 2011-12-15 16:26:02Z jthywissen $ // // Created by dkitchin on Aug 8, 2011. // // Copyright (c) 2011 The University of Texas at Austin. All rights reserved. // // Use and redistribution of this file is governed by the license terms ...
laurenyew/cOrcS
src/orc/lib/time/Vtime.scala
Scala
bsd-3-clause
858
package org.denigma.kappa import fastparse.core.Parsed import org.denigma.kappa.parsers.{CommentLinksParser, KappaParser} import org.scalatest.{Inside, Matchers, WordSpec} class CommentsParserSuite extends WordSpec with Matchers with Inside { "parse comments" in { val parser = new CommentLinksParser ...
antonkulaga/kappa-notebook
app/js/src/test/scala/org/denigma/kappa/CommentsParserSuite.scala
Scala
mpl-2.0
1,550
package com.arcusys.valamis.util.mustache case class RootToken(children: List[Token]) extends Token with CompositeToken { private val childrenSource = children.map(_.templateSource).mkString def render(context: Any, partials: Map[String, Mustache], callstack: List[Any]): TokenProduct = composite(children, ...
ViLPy/Valamis
valamis-util/src/main/scala/com/arcusys/valamis/util/mustache/RootToken.scala
Scala
lgpl-3.0
401
package model.battle /** * Created by salim on 12/09/2016. */ trait Battleable { var maxHitPoints: Int var damagePoints: Int = 0 def doDamage(points: Int) = { damagePoints += points } def canBattle = !(battleStatus == Status.Unconcious) def battleStatus: Status.Value = { hitPoints match { ...
salimfadhley/scalamoo
src/main/scala/model/battle/Battleable.scala
Scala
mit
466
/****************************************************************************** * Copyright (c) 2014, Equal Experts Ltd * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of ...
EqualExperts/Midas
src/test/scala/com/ee/midas/CLIParserSpecs.scala
Scala
bsd-2-clause
9,729
package com.github.mdr.mash.repl.browser.handler import com.github.mdr.mash.input.InputAction import com.github.mdr.mash.repl._ import com.github.mdr.mash.repl.browser.HelpBrowserState import com.github.mdr.mash.repl.browser.ObjectBrowserActions._ trait HelpBrowserActionHandler { self: ObjectBrowserActionHandler wi...
mdr/mash
src/main/scala/com/github/mdr/mash/repl/browser/handler/HelpBrowserActionHandler.scala
Scala
mit
1,181
/* * 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/main/scala/uk/gov/hmrc/ct/computations/LEC01.scala
Scala
apache-2.0
1,590
package model.domain case class Category(value: String) /** * A list of (name -> value) string attributes for every product. * @param map A map of attributes, that guarantees we don't have duplicate values for a given attribute. */ case class Attributes(map: Map[String, String]) { /** * Adds a new attrib...
alexflav23/exercises
rps/app/model/domain/Product.scala
Scala
apache-2.0
2,483
package chapter8 import scala.io.Source object methodDemo { def main(args: Array[String]): Unit = { processFile("/home/nikhil/nik", 10) } def processFile(filename: String, width: Int): Unit = { val source = Source.fromFile(filename) for (line <- source.getLines()) processLine(filename, widt...
NikhilJose/ScalaPractice
src/main/scala/chapter8/methodDemo.scala
Scala
apache-2.0
493
package com.datastax.spark.connector.rdd import java.io.IOException import com.datastax.driver.core._ import com.datastax.spark.connector._ import com.datastax.spark.connector.cql._ import com.datastax.spark.connector.rdd.CassandraLimit._ import com.datastax.spark.connector.rdd.partitioner.dht.{Token => ConnectorToke...
shashwat7/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/rdd/CassandraTableScanRDD.scala
Scala
apache-2.0
19,424
package com.hyenawarrior.oldnorsedictionary.modelview import android.view.View import android.widget.AdapterView import android.widget.AdapterView.OnItemSelectedListener /** * Created by HyenaWarrior on 2017.06.18.. */ class ItemListener(callback: Int => Unit) extends OnItemSelectedListener { override def onNothin...
HyenaSoftware/IG-Dictionary
app/src/main/scala/com/hyenawarrior/oldnorsedictionary/modelview/ItemListener.scala
Scala
lgpl-3.0
489
package services.actors import helpers._ /** * @author [email protected] */ trait CanonicalNamedActor extends CanonicalNamed { def actorPath = s"/user/$basicName" } trait CanonicalNameAsShardName { self: CanonicalNamed => def shardName: String = basicName }
lizepeng/app.io
modules/services/app/services/actors/CanonicalNamedActor.scala
Scala
apache-2.0
272
package typeformation.cf import java.time.{Duration, ZonedDateTime} import Template.Mapping import io.circe.Json trait CfExp[+T] object CfExp { type E[+T] = CfExp[T] trait IsLit[T] trait Ref[T] { def value: T } private[cf] object IsLit { implicit val stringLit: IsLit[String] = new IsLit[String] ...
typeformation/typeformation
cf/src/main/scala/typeformation/cf/CfExp.scala
Scala
mit
2,753
import sbt._ import Keys._ import sbtassembly.Plugin._ import AssemblyKeys._ import sbtjarjar._ import JarJarPlugin._ object ScaldingProject extends Build { val ScalaVersion = "2.10.6" val ScaldingVersion = "0.15.0" val ParquetVersion = "1.6.0" val AvroVersion = "1.7.6" val AlgebirdVersion = "0.10.2" ...
Tapad/sbt-jarjar
src/sbt-test/sbtjarjar/sample-scalding-project/project/Build.scala
Scala
bsd-3-clause
2,963
/** * This file is part of mycollab-services. * * mycollab-services 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. * * mycolla...
maduhu/mycollab
mycollab-services/src/main/scala/com/esofthead/mycollab/schedule/email/crm/CaseRelayEmailNotificationAction.scala
Scala
agpl-3.0
988
package Chapter09 import scala.annotation.tailrec object FilesAndRegularExpressions { // topics: // reading lines // reading characters // reading tokens and numbers // reading from URLs and other sources // reading binary files // writing text files // visiting directories // serializ...
vasnake/scala-for-the-impatient
src/main/scala/Chapter09/FilesAndRegularExpressions.scala
Scala
gpl-3.0
29,129
/* * Copyright (c) 2016 dawid.melewski * * 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, publ...
meloniasty/ActyxPowerUserAlert
src/main/scala/actyxpoweruseralert/actors/MainActor.scala
Scala
mit
2,913
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/amls-frontend
app/models/businessdetails/LettersAddress.scala
Scala
apache-2.0
1,343
package examples.demo import java.awt.Dimension import examples.demo.ui.{Circle, Shape, ShapesPanel} import rescala.default._ import scala.swing.{MainFrame, SimpleSwingApplication, UIElement} /** So far, we showed Vars and Signals defined as a transformation * of one other Var or Signal. Signals can, however, als...
guidosalva/REScala
Code/Examples/examples/src/main/scala/examples/demo/DScaledClockCircle.scala
Scala
apache-2.0
2,678
package chrome import scala.scalajs.js import scala.scalajs.js.annotation._ package object storage { val sync = values.sync val local = values.local @js.native @JSGlobal("chrome.storage") private object values extends js.Object { val sync: StorageArea = js.native val local: StorageArea = js.native ...
erdavila/auto-steamgifts
src/main/scala/chrome/storage/package.scala
Scala
mit
326
/* * Copyright (c) 2014-2018 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...
Wogan/monix
monix-reactive/shared/src/test/scala/monix/reactive/observables/RefCountObservableSuite.scala
Scala
apache-2.0
4,914
/* * 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 ...
tillrohrmann/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/nodes/logical/FlinkLogicalMatch.scala
Scala
apache-2.0
3,474
package com.krrrr38.mackerel4s package object api { val mockSetting = new ClientSetting { override val API_VERSION: String = "v0" override val AUTH_HEADER_KEY: String = "" override val BASE_URL: String = s"${MockApiServer.url}/$API_VERSION" } }
krrrr38/mackerel-client-scala
src/test/scala/com/krrrr38/mackerel4s/api/package.scala
Scala
mit
262
package com.codacy.client.bitbucket.v1 import play.api.libs.functional.syntax._ import play.api.libs.json._ case class SshKey(pk: Long, key: String, label: String) object SshKey { implicit val reader: Reads[SshKey] = ( (__ \\ "pk").read[Long] and (__ \\ "key").read[String] and (__ \\ "label").read[...
rtfpessoa/bitbucket-scala-client
src/main/scala/com/codacy/client/bitbucket/v1/SshKey.scala
Scala
apache-2.0
349
/* * 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
web/src/test/scala/quasar/api/services/InvokeServiceSpec.scala
Scala
apache-2.0
13,068
// akka import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.stream.ActorMaterializer import akka.event.Logging // scala import scala.io.StdIn // typesafe import com.typesafe.config.ConfigFactory object AkkaHttpApp extends Service { def main(args: Array[String]): Unit = { implicit val sy...
bigsnarfdude/addifier
src/main/scala/AkkaHttp.scala
Scala
mit
696
/* * * * Copyright 2014 websudos ltd. * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required...
nosheenzaza/phantom-data-centric
phantom-zookeeper/src/test/scala/com/websudos/phantom/zookeeper/ZooKeeperInstanceTest.scala
Scala
gpl-2.0
2,038
/* * Copyright (c) 2016, Groupon, Inc. * 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 conditio...
groupon/spark-metrics
src/main/scala/org/apache/spark/groupon/metrics/example/MetricsBenchmarkApp.scala
Scala
bsd-3-clause
6,983
class Regress { var v: Int = _ def f = 42 var w: Int = (_) // error: not default value syntax }
som-snytt/dotty
tests/neg/t11437.scala
Scala
apache-2.0
106
package type_env import exceptions.ICE import tir._ import tpass.TPass /* Given some type env as argument, this pass walks through the * expression and inserts that environment as the new parent * of the FIRST environment it encounters. This is designed * to insert a type environment into a chain of environments....
j-c-w/mlc
src/main/scala/type_env/TypeEnvUpdateParentWalk.scala
Scala
gpl-3.0
1,358
package com.szadowsz.starform.model import com.szadowsz.starform.model.accrete.AccreteProfile import com.szadowsz.starform.model.accrete.constants.AccreteConstants import com.szadowsz.starform.model.eco.calc.EcoCalc import com.szadowsz.starform.model.star.calc.StarCalc import com.szadowsz.starform.model.star.constants...
zakski/accrete-starform-stargen
recreations/composite/src/main/scala/com/szadowsz/starform/model/StarformProfile.scala
Scala
apache-2.0
617
/* * Copyright 2009-2011 WorldWide Conferencing, LLC * * 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...
lzpfmh/framework-2
core/json/src/test/scala/net/liftweb/json/SerializationBugs.scala
Scala
apache-2.0
7,196
/** Open Bank Project - API Copyright (C) 2011, 2014, TESOBE / Music Pictures Ltd This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later...
OpenBankProject/status
src/main/scala/com/tesobe/status/messageQueue/BankStatuesHandler.scala
Scala
agpl-3.0
2,973
/* * Copyright 2014 http4s.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://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
rossabaker/http4s
server/shared/src/main/scala/org/http4s/server/middleware/HttpsRedirect.scala
Scala
apache-2.0
2,487
package mesosphere.marathon import java.util.{ TimerTask, Timer } import java.util.concurrent.atomic.AtomicBoolean import akka.actor.{ ActorRef, ActorSystem } import akka.testkit.{ TestKit, TestProbe } import com.twitter.common.base.ExceptionalCommand import com.twitter.common.zookeeper.{ Group, Candidate } import co...
sielaq/marathon
src/test/scala/mesosphere/marathon/MarathonSchedulerServiceTest.scala
Scala
apache-2.0
7,873
package org.jetbrains.plugins.scala.lang.typeInference package generated class TypeInferenceHigherKindsTest extends TypeInferenceTestBase { //This class was generated by build script, please don't change this override def folderPath: String = super.folderPath + "higherKinds/" def testSCL1655() {doTest()} def...
triggerNZ/intellij-scala
test/org/jetbrains/plugins/scala/lang/typeInference/generated/TypeInferenceHigherKindsTest.scala
Scala
apache-2.0
460
package spinoco.protocol.mail.header import scodec.Codec import spinoco.protocol.mail.EmailAddress import spinoco.protocol.mail.header.codec.EmailAddressCodec /** * RFC 5322 3.6.6: * * Resent fields SHOULD be added to any message that is reintroduced by * a user into the transport system. A separate set of r...
Spinoco/protocol
mail/src/main/scala/spinoco/protocol/mail/header/`Resent-Sender`.scala
Scala
mit
759
/** * Copyright (c) 2015 Intel Corporation  * * 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 applicabl...
shibanis1/spark-tk
core/src/main/scala/org/trustedanalytics/sparktk/frame/internal/ops/groupby/aggregators/HistogramAggregator.scala
Scala
apache-2.0
3,059
/** * * Copyright (c) 2015-2017 Rodney S.K. Lai * https://github.com/rodney-lai * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the * above copyright notice and this permission notice appear in all copies. * * THE SOFTW...
rodney-lai/test-site
home/test/IntegrationSpec.scala
Scala
isc
1,375
package com.technophobia.substeps.domain import com.technophobia.substeps.domain.execution.RunResult import com.technophobia.substeps.domain.repositories.SubstepRepository import com.technophobia.substeps.domain.events.{ExecutionCompleted, ExecutionStarted, DomainEventPublisher} import java.util.Date case class Basic...
G2G3Digital/substeps-scala-core
src/main/scala/com/technophobia/substeps/domain/BasicScenario.scala
Scala
lgpl-3.0
1,086
/* * 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
manual/cypher/cypher-docs/src/test/scala/org/neo4j/cypher/docgen/ConstraintsTest.scala
Scala
apache-2.0
13,754
class Parameterless { def bar(i: Int = 1) = 1 bar() bar() this bar() this.bar() } class Child1 extends Parameterless { override def bar(i: Int) = 2 bar() } class Child2 extends Parameterless { override def bar(i: Int) = 3 bar() } class Child3 extends Parameterless { override def bar(i: Int) = ...
katejim/intellij-scala
testdata/changeSignature/fromScala/Parameterless_after.scala
Scala
apache-2.0
332
/* ************************************************************************************* * 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/rudder/web/components/ComponentInitializationException.scala
Scala
gpl-3.0
1,942
package io.buoyant.telemetry.statsd import com.timgroup.statsd.NoOpStatsDClient import org.scalatest._ class StatsDStatsReceiverTest extends FunSuite { test("creates a stats receiver") { val stats = new StatsDStatsReceiver(new NoOpStatsDClient, 1.0d) assert(stats.isInstanceOf[StatsDStatsReceiver]) } t...
denverwilliams/linkerd
telemetry/statsd/src/test/scala/io/buoyant/telemetry/statsd/StatsDStatsReceiverTest.scala
Scala
apache-2.0
1,288
package matrix import componentwork._, componentswing.{IViewDrawS,IViewDrawF,ObjTexture}, javax.swing.Timer, java.awt.event.{ActionListener, ActionEvent}, java.awt.{Point,Rectangle}, scala.collection.mutable.{Map => MMap}, scala.math.sqrt class Camera(val name:MMap...
AlexCAB/whfzf
matrix/Camera.scala
Scala
mit
4,290
/* * 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 applicabl...
mmatz-ccri/geomesa
geomesa-security/src/main/scala/org/locationtech/geomesa/security/DefaultAuthorizationsProvider.scala
Scala
apache-2.0
1,339
/* * Copyright 2016 Frugal Mechanic (http://frugalmechanic.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...
frugalmechanic/fm-common
js/src/main/scala/fm/common/ElementType.scala
Scala
apache-2.0
1,449
package cromwell.core.io import java.util.concurrent.TimeoutException case class IoTimeout(command: IoCommand[_]) extends TimeoutException(s"The I/O operation $command timed out")
ohsu-comp-bio/cromwell
core/src/main/scala/cromwell/core/io/IoTimeout.scala
Scala
bsd-3-clause
182
/** * Copyright © 2012 Gustav van der Merwe * * 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 program i...
gvdm/proof-system
src/Naturals.scala
Scala
gpl-3.0
3,159
package com.wix.fax.interfax.sl case class Credentials(username: String, password: String)
wix/libfax
libfax-interfaxsl/src/main/scala/com/wix/fax/interfax/sl/Credentials.scala
Scala
apache-2.0
93
import scala.annotation.static class C { val a: Int = 3 class D object D { @static def foo: Int = a * a // error } } @main def Test = val c = new C println(c.D.foo)
dotty-staging/dotty
tests/neg/i11100.scala
Scala
apache-2.0
183
package cromwell.backend.validation.exception import common.exception.MessageAggregation case class ValidationAggregatedException(override val exceptionContext: String, override val errorMessages: Traversable[String]) extends MessageAggregation
ohsu-comp-bio/cromwell
backend/src/main/scala/cromwell/backend/validation/exception/ValidationAggregatedException.scala
Scala
bsd-3-clause
288
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
nagavallia/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/index/QueryPlannerTest.scala
Scala
apache-2.0
3,835