code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
//: ---------------------------------------------------------------------------- //: Copyright (C) 2015 Verizon. 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 Licen...
neigor/funnel
chemist/src/main/scala/Sharding.scala
Scala
apache-2.0
2,881
package frameless import org.apache.spark.sql.Row import org.apache.spark.sql.types.StructType import shapeless.{HList, LabelledGeneric} import shapeless.test.illTyped import org.scalatest.matchers.should.Matchers case class UnitsOnly(a: Unit, b: Unit) case class TupleWithUnits(u0: Unit, _1: Int, u1: Unit, u2: Unit,...
adelbertc/frameless
dataset/src/test/scala/frameless/RecordEncoderTests.scala
Scala
apache-2.0
2,914
def evenGT5(v: Vector[Int]) = { var result = Vector[Int]() for {n <- v if n > 5 if n % 2 == 0} { result = result :+ n } result } val v = Vector(1, 2, 3, 4, 5, 6, 7, 8, 9) println(evenGT5(v)) def oddGT5Refactored(v: Vector[Int]) = { val result = for {n <- v if...
mkoltsov/AtomicScala
Basics/Comprehensions.scala
Scala
mit
962
import scala.quoted.Expr object Macro { inline def foo(inline n: Int): Int = ${ 'n } }
som-snytt/dotty
tests/pos/quote-lift-inline-params-b.scala
Scala
apache-2.0
94
/* * Copyright 2016 Actian 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 applicable law or agree...
ActianCorp/spark-vector
src/test/scala/com/actian/spark_vector/datastream/VectorEndpointTest.scala
Scala
apache-2.0
2,399
package com.github.diegopacheco.scala.pocs.pipes import scala.util.chaining._ import scala.language.implicitConversions object PipesMainApp extends App { def plus1(i: Int) = i + 1 def double(i: Int) = i * 2 def square(i: Int) = i * i val x = 1.pipe(plus1).pipe(double).pipe(square) println(s"x is == ${x}")...
diegopacheco/scala-playground
scala-2.13-pipes-fun/src/main/scala/com/github/diegopacheco/scala/pocs/pipes/PipesMainApp.scala
Scala
unlicense
660
/** * 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...
robort/kafka
core/src/main/scala/kafka/security/auth/SimpleAclAuthorizer.scala
Scala
apache-2.0
12,429
package org.hrscala.sbt object First extends App { println("=" * 100) println("Hello from First") println("-" * 100) }
HRScala/its-so-sbt
40-custom-tasks/first/src/main/scala/org/hrscala/sbt/First.scala
Scala
unlicense
126
/* * 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 ...
nadav-har-tzvi/amaterasu
executor/src/main/scala/org/apache/spark/repl/amaterasu/runners/spark/SparkScalaRunner.scala
Scala
apache-2.0
6,619
/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package viper.silicon.supporters.functions import org.slf4s.Logging import viper.silver.ast import ...
sccblom/vercors
viper/silicon/src/main/scala/supporters/functions/FunctionSupporter.scala
Scala
mpl-2.0
8,962
import java.io._ import com.omegaup._ import com.omegaup.data._ import com.omegaup.runner._ import com.omegaup.libinteractive.idl.Parser import com.omegaup.libinteractive.target.Options import com.omegaup.libinteractive.target.Command import org.slf4j._ import org.scalatest.BeforeAndAfterAll import org.scalatest.Free...
omegaup/backend
runner/src/test/scala/CompileTests.scala
Scala
bsd-2-clause
20,714
package at.forsyte.apalache.tla.bmcmt.rules import at.forsyte.apalache.tla.bmcmt._ import at.forsyte.apalache.tla.bmcmt.rules.aux.PowSetCtor import at.forsyte.apalache.tla.lir.OperEx import at.forsyte.apalache.tla.lir.oper.{BmcOper, TlaSetOper} /** * This rule expands a powerset, that is, SUBSET S for a set S. In t...
konnov/dach
tla-bmcmt/src/main/scala/at/forsyte/apalache/tla/bmcmt/rules/SetExpandRule.scala
Scala
apache-2.0
1,440
package views import com.micronautics.cache._ import play.api.i18n.Lang import play.twirl.api._ import scala.language.implicitConversions import java.io.File import play.api.Environment trait PFViewImplicits { implicit def pfViewToHtml(pfView: PFView): String = Html(pfView.toString()) implicit def pfViewToString...
mslinn/PFView
src/main/scala-2.11/views/PFView.scala
Scala
mit
5,914
package bifrost.network import scala.util.Random trait SendingStrategy { def choose(peers: Seq[ConnectedPeer]): Seq[ConnectedPeer] } object SendToRandom extends SendingStrategy { override def choose(peers: Seq[ConnectedPeer]): Seq[ConnectedPeer] = peers.nonEmpty match { case true => Seq(peers(Rando...
Topl/Project-Bifrost
src/main/scala/bifrost/network/SendingStrategy.scala
Scala
mpl-2.0
1,285
package com.outr.arango.query.dsl import com.outr.arango.Ref import com.outr.arango.query.Query sealed trait CollectWith { def value: String } object CollectWith { object Count extends CollectWith { override def value: String = "COUNT" } class Partial(collectWith: CollectWith) { def INTO(ref: Ref): ...
outr/scarango
driver/src/main/scala/com/outr/arango/query/dsl/CollectWith.scala
Scala
mit
516
package fr.inria.hopla.visitorCase.HtmlTag /** * Created by JIN Benli on 26/03/14. */ object Tags extends Tags trait Tags { val html = "html".tag val head = "head".tag val body = "body".tag val h1 = "h1".tag }
rouvoy/hopla
hopla-toolchain/src/main/scala/fr/inria/hopla/VisitorCase/HtmlTag/Tags.scala
Scala
apache-2.0
223
package japgolly.scalajs.react.component import scala.scalajs.js import japgolly.scalajs.react.internal._ import japgolly.scalajs.react.{Callback, Children, CtorType, PropsChildren, vdom, raw => RAW} import scala.scalajs.js.| object Js extends JsBaseComponentTemplate[RAW.React.ComponentClassP] { def apply[P <: js....
matthughes/scalajs-react
core/src/main/scala/japgolly/scalajs/react/component/Js.scala
Scala
apache-2.0
14,389
package org.phenoscape.owl import org.phenoscape.owl.Vocab._ import org.phenoscape.scowl._ import org.semanticweb.owlapi.apibinding.OWLManager import org.semanticweb.owlapi.model._ import org.semanticweb.owlapi.model.parameters.Imports import java.io.File import scala.jdk.CollectionConverters._ object ReverseDevelop...
phenoscape/phenoscape-owl-tools
src/main/scala/org/phenoscape/owl/ReverseDevelopsFromRuleGenerator.scala
Scala
mit
1,369
import scala.io._ class InnoString(str : String){ private var name = str override def toString = str def concat(arg: String) = { name = name + arg println(this.name) } def +(that: InnoString) = new InnoString(this.name + that.name) def ==(that: InnoString) = new InnoString((this.name == that.name).toString) ...
devmukul44/Scala_Starter
ex3.scala
Scala
mit
649
/* 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...
twitter/scalding
scalding-thrift-macros/src/test/scala/com/twitter/scalding/thrift/macros/TestHelper.scala
Scala
apache-2.0
2,645
package ch.randm.uoi import Unit._ /** Storage size is the amount of Bits that a certain entity (i.e. a file) takes up in memory or on a disk. * * This class provides a way for developers to abstract over * [[https://en.wikipedia.org/wiki/Units_of_information Units of Information]]. An initial value can be crea...
randm-ch/units-of-information
src/main/scala/ch/randm/uoi/UnitsOfInformation.scala
Scala
mit
12,393
package org.jetbrains.plugins.scala package lang package psi package stubs import com.intellij.psi.stubs.StubElement import com.intellij.util.ArrayUtil.EMPTY_STRING_ARRAY import org.jetbrains.plugins.scala.lang.psi.api.statements.ScValueOrVariable import org.jetbrains.plugins.scala.lang.psi.stubs.impl.{ScExpressionOwn...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/stubs/ScPropertyStub.scala
Scala
apache-2.0
979
package component import javafx.fxml.FXML import javafx.scene.control.Label import me.mtrupkin.core.Point import model.space.Entity /** * Created by mtrupkin on 5/22/2015. */ class EntityReadoutController { @FXML var position: Label = _ @FXML var distance: Label = _ @FXML var typeName: Label = ...
mtrupkin/flagship
src/main/scala/component/EntityReadoutController.scala
Scala
mit
764
/* * Copyright 2008-present MongoDB, 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 ag...
rozza/mongo-java-driver
driver-scala/src/main/scala/org/mongodb/scala/Observable.scala
Scala
apache-2.0
18,433
/** * 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...
piavlo/operations-debs-kafka
core/src/test/scala/unit/kafka/consumer/ZookeeperConsumerConnectorTest.scala
Scala
apache-2.0
12,794
/* * Copyright 2009-2010 LinkedIn, 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 ...
nickhristov/norbert
network/src/main/scala/com/linkedin/norbert/network/partitioned/loadbalancer/DefaultLoadBalancerHelper.scala
Scala
apache-2.0
5,898
/* * Copyright 2013 Maurício Linhares * * Maurício Linhares licenses this file to you 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 ...
dripower/postgresql-async
postgresql-async/src/main/scala/com/github/mauricio/async/db/postgresql/codec/PostgreSQLConnectionDelegate.scala
Scala
apache-2.0
1,285
package de.sciss.lucre.swing import de.sciss.lucre.{DoubleObj, IntObj, MapObj} import de.sciss.lucre.expr.CellView import de.sciss.swingplus.GroupPanel import scala.collection.immutable.{IndexedSeq => Vec} import scala.swing.event.ButtonClicked import scala.swing.{Alignment, Button, Component, Label, ToggleButton} o...
Sciss/LucreSwing
jvm/src/test/scala/de/sciss/lucre/swing/OptionalApp.scala
Scala
agpl-3.0
3,634
package scala.slick.jdbc.meta import java.sql._ import scala.slick.jdbc.ResultSetInvoker /** * A wrapper for a row in the ResultSet returned by DatabaseMetaData.getFunctions(). */ case class MFunction(name: MQName, remarks: String, returnsTable: Option[Boolean], specificName: String) { def getFunctionColumns(colu...
boldradius/slick
src/main/scala/scala/slick/jdbc/meta/MFunction.scala
Scala
bsd-2-clause
910
/* * 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 ...
minixalpha/spark
core/src/test/scala/org/apache/spark/UnpersistSuite.scala
Scala
apache-2.0
1,645
/** * 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"); yo...
sslavic/kafka
core/src/main/scala/kafka/server/QuotaFactory.scala
Scala
apache-2.0
5,042
/* * Copyright 2015 Delft University of Technology * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
tudelft-atlarge/graphalytics-platforms-graphx
src/main/test/scala/science/atlarge/graphalytics/graphx/ffm/ForestFireModelJobTest.scala
Scala
apache-2.0
2,712
/* * The MIT License (MIT) * * Copyright (c) 2015 Einevea * * 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...
einevea/econcepts
src/main/scala/com/einevault/econcepts/model/MemDB.scala
Scala
mit
2,289
package com.ataraxer.apps.chess.scala import com.ataraxer.apps.chess.scala.Color._ import com.ataraxer.apps.chess.scala.pieces.Piece case class Cell(val coordinates: Coord, val piece: Option[Piece] = None) { def color = piece map { _.color } def isEmpty = (piece == None) override def toString: String = pi...
ataraxer/chess-game-scala
src/main/scala/Cell.scala
Scala
mit
461
object Daemon { def main(args: Array[String]) { val t = new Thread { override def run(): Unit = synchronized { wait() } } t.setDaemon(true); t.start } }
mdedetrich/sbt
sbt/src/sbt-test/run/daemon/src/main/scala/Daemon.scala
Scala
bsd-3-clause
167
/* Copyright 2012 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
nkhuyu/scalding
scalding-date/src/main/scala/com/twitter/scalding/RichDate.scala
Scala
apache-2.0
4,290
/** * 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...
chirino/activemq-apollo
apollo-amqp/src/main/scala/org/apache/activemq/apollo/amqp/AmqpMessage.scala
Scala
apache-2.0
11,814
package at.logic.gapt.formats.latex import at.logic.gapt.proofs.HOLSequent import at.logic.gapt.expr._ import at.logic.gapt.expr.hol._ trait SequentsListLatexExporter { def getOutput: java.io.Writer def close = getOutput.close private val nLine = sys.props( "line.separator" ) val smskip = nLine + nLine val...
gebner/gapt
core/src/main/scala/at/logic/gapt/formats/latex/SequentsListLatexExporter.scala
Scala
gpl-3.0
6,797
package kr.ac.kaist.ir.deep.train import kr.ac.kaist.ir.deep.fn._ import kr.ac.kaist.ir.deep.network.{AutoEncoder, Network} import kr.ac.kaist.ir.deep.rec.BinaryTree import org.apache.spark.annotation.Experimental /** * __Input Operation__ : VectorTree as Input & Unfolding Recursive Auto Encoder Training (no output ...
nearbydelta/ScalaNetwork
src/main/scala/kr/ac/kaist/ir/deep/train/URAEType.scala
Scala
gpl-2.0
3,470
package com.sksamuel.elastic4s import org.elasticsearch.action.search.SearchResponse import org.elasticsearch.client.Client import scala.concurrent.Future trait ScrollDsl { implicit object ScrollExecutable extends Executable[SearchScrollDefinition, SearchResponse] { override def apply(client: Client, s: Searc...
l15k4/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/ScrollDsl.scala
Scala
apache-2.0
692
package lila.relay import akka.actor._ import akka.pattern.{ ask, pipe } import scala.concurrent.duration._ import scala.util.{ Try, Success, Failure } import lila.hub.SequentialActor private[relay] final class GameActor( fics: ActorRef, ficsId: Int, relayId: String, getRelayGame: () => Fu[Option[Rel...
pavelo65/lila
modules/relay/src/main/GameActor.scala
Scala
mit
3,341
package microtools.patch import com.github.plokhotnyuk.jsoniter_scala.core.{JsonValueCodec, writeToString} import microtools.models.Problems import microtools.patch.JsonPointer._ import microtools._ import play.api.libs.functional.syntax._ import play.api.libs.json.Reads._ import play.api.libs.json._ case class Patch...
21re/play-micro-tools
src/main/scala/microtools/patch/Patch.scala
Scala
mit
4,262
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
hpe-cct/cct-core
src/main/scala/cogx/compiler/codegenerator/opencl/cpukernels/CPUOuterProductKernel.scala
Scala
apache-2.0
3,765
/* * 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.testing.bridge import sca...
scala-js/scala-js
test-bridge/src/main/scala/org/scalajs/testing/bridge/JSRPC.scala
Scala
apache-2.0
1,353
package omnibus.configuration import akka.actor.ActorContext import spray.routing.authentication._ import scala.concurrent.Future object Security { def adminPassAuthenticator(userPass: Option[UserPass])(implicit context: ActorContext) = { implicit val system = context.system implicit val executionContext = ...
agourlay/omnibus
src/main/scala/omnibus/configuration/Security.scala
Scala
apache-2.0
542
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
aosagie/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/sources/WriteToMicroBatchDataSource.scala
Scala
apache-2.0
1,710
package dk.itu.wsq.queue class DuplicatingQueue[E: Manifest](val size: Int) extends WorkStealingQueue[E] { import scala.annotation.tailrec private val tasks: Array[Option[E]] = new Array[Option[E]](size) @volatile private var head: Int = 0 @volatile private var tail: Int = 0 private var tailMin = Integer.MA...
christianharrington/WorkStealingQueues
Scala/src/main/scala/dk/itu/wsq/queue/DuplicatingQueue.scala
Scala
unlicense
1,629
package org.scalajs.openui5.sap.ui.layout import org.scalajs.openui5.sap.ui.core.{ControlSetters, ControlSettings, Control} import org.scalajs.openui5.util.{Settings, SettingsMap, noSettings} import scala.scalajs.js import scala.scalajs.js.annotation.{ScalaJSDefined, JSName} @ScalaJSDefined trait BlockLayoutRowSetti...
lastsys/scalajs-openui5
src/main/scala/org/scalajs/openui5/sap/ui/layout/BlockLayoutRow.scala
Scala
mit
1,442
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
massie/adam
adam-core/src/main/scala/org/bdgenomics/adam/rdd/fragment/FragmentRDD.scala
Scala
apache-2.0
5,225
/** * 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...
themarkypantz/kafka
core/src/test/scala/unit/kafka/consumer/ZookeeperConsumerConnectorTest.scala
Scala
apache-2.0
20,095
package controllers import models.Notification import play.api.mvc.{ Action, Controller, Request } import play.api.data._ import play.api.data.Forms._ import play.api.Logger import play.api.i18n.{ I18nSupport, MessagesApi } import be.objectify.deadbolt.scala.ActionBuilders import javax.inject.Inject import scala.concu...
kdoomsday/kaminalapp
app/controllers/LoginController.scala
Scala
mit
3,347
object SCL2806 { trait A trait B class C extends A with B var z: A = null new C match { case x: B => /*start*/x/*end*/ } } //SCL2806.C
ilinum/intellij-scala
testdata/typeInference/bugs5/SCL2806.scala
Scala
apache-2.0
156
/* * This file is part of Kiama. * * Copyright (C) 2011-2015 Anthony M Sloane, Macquarie University. * * Kiama 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 3 of the License, or ...
joaoraf/kiama
library/src/org/kiama/example/oberon0/L0/SyntaxAnalyser.scala
Scala
gpl-3.0
3,629
// BMI.scala val kg = 72.57 // 160 lbs val heightM = 1.727 // 68 inches val bmi = kg/(heightM * heightM) if(bmi < 18.5) println("Underweight") else if(bmi < 25) println("Normal weight") else println("Overweight")
P7h/ScalaPlayground
Atomic Scala/atomic-scala-examples/examples/06_EvaluationOrder/BMI.scala
Scala
apache-2.0
215
package ch.ltouroumov.modularmachines.common.init import ch.ltouroumov.modularmachines.common.tileentity.controller.MachineControllerEntity import ch.ltouroumov.modularmachines.common.tileentity.modules.{MachineModuleCoil, MachineModuleSmelter} import ch.ltouroumov.modularmachines.common.tileentity.ports.{MachinePortI...
ltouroumov/modular-machines
src/main/scala/ch/ltouroumov/modularmachines/common/init/Blocks.scala
Scala
gpl-2.0
2,325
package inloopio.math.indicator import java.awt.Color /** * * @author Caoyuan Deng */ trait Plottable { def plot: Plot def getColor(idx: Int): Color def setColor(idx: Int, color: Color) def layer: Int def layer_=(order: Int) }
dcaoyuan/inloopio-libs
inloopio-math/src/main/scala/inloopio/math/indicator/Plottable.scala
Scala
bsd-3-clause
246
package ulang.syntax import ulang.source._ case class Defs(data: Map[Con, Set[Op]], syn: Map[Con, (List[TypeParam], Type)], axioms: List[Expr]) { def +(con: Con, params: List[TypeParam], rhs: Type) = copy(syn = syn + (con -> (params, rhs))) def +(con: Con, constrs: Set[Op]) = copy(data = data + (con -> constrs)) ...
gernst/ulang
src/ulang/syntax/Defs.scala
Scala
mit
2,159
package controllers import anorm._ import views._ import models._ import utils.DoubleFormat._ import play.api._ import play.api.mvc._ import play.api.data._ import play.api.data.Forms._ /** * Manage and control container, monitors, users. */ object Application extends Controller with Secured { val loginForm =...
cpeck1/tempmonServer
app/controllers/Application.scala
Scala
bsd-2-clause
2,442
package charactor.core.model.objects.charactor.attributes import charactor.core.model.objects.charactor.parts.MoveDecider import charactor.core.model.objects.charactor.Charactor import actors.OutputChannel import charactor.core.model.objects.Positionable import charactor.core.messages.{MoveMessage, MoveAnywhereMessage...
PiotrTrzpil/charactor
src/charactor/core/model/objects/charactor/attributes/BlindAttribute.scala
Scala
apache-2.0
786
package no.netcompany.testdatagen.recordgen // Copyright (C) 2014 Lars Reed -- GNU GPL 2.0 -- see LICENSE.txt import java.io.{BufferedWriter, FileOutputStream, IOException, OutputStreamWriter} import java.nio.charset.Charset import no.netcompany.testdatagen.BareGenerator /** * This generator is typically the end o...
lre-mesan/testdata
src/main/scala/no/netcompany/testdatagen/recordgen/ToFile.scala
Scala
gpl-2.0
2,151
/* Copyright 2014 White Label Personal Clouds Pty Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
welcomer/framework
src/test/scala/me/welcomer/framework/picocontainer/repository/PicoContainerRepositoryComponentMockImpl.scala
Scala
apache-2.0
1,520
/** * Copyright (C) 2015 DANS - Data Archiving and Networked Services ([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...
DANS-KNAW/easy-pid-generator
src/test/scala/nl/knaw/dans/easy/pid/fixture/CustomMatchers.scala
Scala
apache-2.0
1,447
/* * 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...
zhangxiaoli73/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/integration/torch/MarginRankingCriterionSpec.scala
Scala
apache-2.0
3,596
package com.recursivity.specs2 import org.specs2._ import runner.SpecificationsFinder._ class index extends Specification{ def is = examplesLinks("Specs2 Example specifications") // see the SpecificationsFinder trait for the parameters of the 'specifications' method def examplesLinks(t: String) = t.title ^ sp...
wfaler/specs2-demo
src/test/scala/com/recursivity/specs2/Index.scala
Scala
mit
374
/* * 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 ...
akopich/spark
sql/core/src/test/scala/org/apache/spark/sql/SQLContextSuite.scala
Scala
apache-2.0
6,063
package structures package laws case class IsEqual[A](lhs: A, rhs: A) { def isEqual(implicit eq: Equal[A]): Boolean = eq.equal(lhs, rhs) }
mpilquist/Structures
laws/src/main/scala/structures/laws/IsEqual.scala
Scala
bsd-3-clause
142
// Copyright (C) 2019 MapRoulette contributors (see CONTRIBUTORS.md). // Licensed under the Apache License, Version 2.0 (see LICENSE). package org.maproulette.models.utils import java.sql.SQLException import anorm._ import org.apache.commons.lang3.StringUtils import org.joda.time.DateTime import org.joda.time.format....
mvexel/maproulette2
app/org/maproulette/models/utils/DALHelper.scala
Scala
apache-2.0
13,329
trait Monad[M[_]] object Test { def x: Monad[M forSome { type M[_] }] = ??? }
loskutov/intellij-scala
testdata/scalacTests/failed/t9008.scala
Scala
apache-2.0
81
package utl.net.http import com.twitter.ostrich.admin.Service import io.netty.bootstrap.ServerBootstrap import io.netty.buffer.PooledByteBufAllocator import io.netty.channel._ import io.netty.channel.nio.NioEventLoopGroup import io.netty.channel.socket.SocketChannel import io.netty.channel.socket.nio.NioServerSocketCh...
onerinvestments/strd
strd-commons/src/main/scala/utl/net/http/HttpServer.scala
Scala
apache-2.0
2,122
import sbt._ import Keys._ object Tools { type Sett = Def.Setting[_] def onVersion[A](all: Seq[A], on292: => Seq[A] = Seq(), on210: => Seq[A] = Seq(), on211: => Seq[A] = Seq()) = scalaVersion(v => all ++ (if (v.contains("2.11")) on211 else if (v.contains("2.10")) on210 else on292)) def onVersionTask[A](all...
etorreborre/argonaut
project/Tools.scala
Scala
bsd-3-clause
525
/* * DoubleSpinnerView.scala * (LucreSwing) * * Copyright (c) 2014-2021 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Affero General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * [email protected] */ package de.sciss.lucre.sw...
Sciss/LucreSwing
jvm/src/main/scala/de/sciss/lucre/swing/DoubleSpinnerView.scala
Scala
agpl-3.0
1,773
package com.gx.flyweight /** * Copyright 2017 josephguan * * 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 ...
josephguan/scala-design-patterns
structural/flyweight/src/main/scala/com/gx/flyweight/Tea.scala
Scala
apache-2.0
1,561
/////////////////////////////////////////////////////////////// // © ООО «Праймтолк», 2011-2013 // // Все права принадлежат компании ООО «Праймтолк». // /////////////////////////////////////////////////////////////// /** * SynapseGrid * © Primetalk Ltd., 2013. * All rights rese...
ppopoff/SynapseGrid
synapse-grid-examples/src/main/scala/ru/primetalk/synapse/examples/Examples2.scala
Scala
bsd-2-clause
857
/* * Copyright (c) 2015-2022 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.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.ap...
opencypher/openCypher
tools/tck-api/src/main/scala/org/opencypher/tools/tck/api/groups/Group.scala
Scala
apache-2.0
5,705
package com.github.spirom.sparkflights.etl import com.github.spirom.sparkflights.fw.RDDLogger import org.apache.log4j.{Level, Logger} import org.apache.spark.sql.SQLContext import org.apache.spark.{SparkConf, SparkContext} object ParquetSubsetLocal { val logger = Logger.getLogger(getClass.getName) logger.setLe...
spirom/SparkFlightExamples
src/main/scala/com/github/spirom/sparkflights/etl/ParquetSubsetLocal.scala
Scala
mit
1,141
package jigg.nlp.ccg.tagger /* Copyright 2013-2015 Hiroshi Noji 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 ...
sakabar/jigg
src/main/scala/jigg/nlp/ccg/tagger/MaxentMultiTagger.scala
Scala
apache-2.0
5,555
/* * Copyright 2013 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 applicable l...
lzpfmh/framework-2
project/Developers.scala
Scala
apache-2.0
2,021
package controllers.admin import jp.t2v.lab.play2.auth.test.Helpers.AuthFakeRequest import model.form.data._ import model.form.{BlockPageForm, ComputerForm, SSHOrderForm, SelectComputersForm} import model.json.{ComputerJson, LoginJson} import play.api.libs.json.Json import play.api.test.FakeRequest import services.sta...
ProjectAton/AtonLab
test/controllers/admin/ComputerControllerFailedSpec.scala
Scala
gpl-3.0
6,470
/** * The MIT License (MIT) * * Copyright (c) 2018 Israel Freitas([email protected]) * * 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 with...
ifreitas/AimlToXml
src/main/scala/ifreitas/scalaaiml/elements/Srai.scala
Scala
mit
1,348
package org.jetbrains.plugins.scala.lang.resolve2 /** * Pavel.Fatin, 02.02.2010 */ class PredefLiteralTest extends ResolveTestBase { override def folderPath: String = { super.folderPath + "predef/literal/" } //TODO answer? // def testBoolean = doTest //TODO answer? // def testByte = doTest //TODO a...
triggerNZ/intellij-scala
test/org/jetbrains/plugins/scala/lang/resolve2/PredefLiteralTest.scala
Scala
apache-2.0
754
package regolic.asts.theories.int import regolic.asts.core.Trees._ import regolic.asts.fol.Trees.Constant import regolic.asts.fol.{Trees => FolT} object Trees { object IntSort { def apply() = Sort("Int", List()) def unapply(sort: Sort): Boolean = sort match { case Sort("Int", List()) => true ca...
regb/scabolic
src/main/scala/regolic/asts/theories/int/Trees.scala
Scala
mit
10,049
package pieces import chessagents.Translation /** * Created by Aleksandra on 19.05.2016. */ class Pawn(val color : String) extends Piece{ var possibleMovements = Array.ofDim[Translation](3,2) if (color.equals(WHITE)) { possibleMovements = Array( Array( new Translation(-1, 0, 2), //first move...
m-kostrzewa/ChessAgents
src/pieces/Pawn.scala
Scala
mit
1,435
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/nn/ops/LogicalAnd.scala
Scala
apache-2.0
1,677
/* * 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 ...
shaoxuan-wang/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/util/RankProcessStrategy.scala
Scala
apache-2.0
4,200
/* * 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 ...
big-pegasus/spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala
Scala
apache-2.0
21,844
package gettingstarted import fpinscala.errorhandling.{Either, Right, Left} import org.specs2.mutable.Specification class EitherTest extends Specification{ "orElse" should { "return the first Either if its defined otherwise it returns the second Either" in { val x: Int = 5 val success: Either[Stri...
coughlac/fpinscala
exercises/src/test/scala/gettingstarted/EitherTest.scala
Scala
mit
3,339
package controllers import scala.concurrent.Future import play.api.mvc._ import play.api.data._ import play.api.data.Forms._ import play.api.Play.current import play.api.i18n.Messages.Implicits._ import play.api.libs.concurrent.Execution.Implicits.defaultContext import views._ import model.PIMAidDBContext._ import m...
RSSchermer/pim-aid
app/controllers/DrugGroupsController.scala
Scala
mit
2,475
package nl.dekkr.feedr.route import akka.actor._ import nl.dekkr.feedr.domain.UserAggregate import nl.dekkr.feedr.service._ import spray.httpx.Json4sSupport import spray.routing._ import spray.routing.authentication.BasicAuth object UserRoute { case class ChangePasswordRequest(pass: String) } trait UserRoute exten...
plamola/feedR
src/main/scala/nl/dekkr/feedr/route/UserRoute.scala
Scala
mit
1,292
package eu.devtty.peerinfo import eu.devtty.multiaddr.Multiaddr import eu.devtty.peerid.PeerId import scala.scalajs.js import scala.scalajs.js.annotation.JSImport @js.native @JSImport("peer-info", JSImport.Namespace) object PeerInfo extends js.Object { def create(id: PeerId, callBack: js.Function1[PeerInfo, _]): U...
magik6k/scalajs-ipfs-api
peerInfo/src/main/scala/eu/devtty/peerinfo/PeerInfo.scala
Scala
mit
1,808
package stormlantern.consul.client.dao trait Indexed[T] { def index: Long def resource: T }
derjust/reactive-consul
client/src/main/scala/stormlantern/consul/client/dao/Indexed.scala
Scala
mit
97
package com.devlaam.simulate.server /* Simulator Server to connect to multiple Lora Gateways Copyright (C) 2015 Ruud Vlaming 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, ei...
devlaam/lora_simulator
src/main/scala/server.scala
Scala
gpl-3.0
9,389
package pfds.number sealed trait SparseRepresentation extends Nat[SparseRepresentation] { val weights: List[Int] private def carry(w: Int, weights: List[Int]): List[Int] = weights match { case Nil => List(w) case ww::remain => if (w < ww) w::weights else if (w == ww) carry(w + ww, remain) ...
ZhiruiLi/PfdsInScala
src/main/scala/pfds/number/SparseRepresentation.scala
Scala
mit
1,806
package ImpatientScala import scala.beans.BeanProperty /** * Classes - Chapter 5 */ object Chapter5Main { println( "1. Improve the Counter class in Section 5.1 , 'Simple Classes and Parameterless Methods,' Improve the " + "Counter class in Section 5.1 , “Simple Classes and Parameterless Methods,”" ...
dandxy89/LearningScala
src/main/scala/ImpatientScala/Chapter5Main.scala
Scala
mit
7,202
/* * 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 ...
fhueske/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/utils/MockTableEnvironment.scala
Scala
apache-2.0
3,368
package org.camunda.feel.impl.spi import org.camunda.feel.context.CustomFunctionProvider import org.camunda.feel.syntaxtree._ // DO NOT DELETE, used in ScriptEngineTest through src/test/resources/META-INF/services class TestFunctionProvider extends CustomFunctionProvider { override def getFunction(name: String): O...
saig0/feel
feel-engine/src/test/scala/org/camunda/feel/impl/spi/TestFunctionProvider.scala
Scala
apache-2.0
620
package controllers import java.util.UUID import com.google.inject.AbstractModule import com.mohiva.play.silhouette.api.{ Environment, LoginInfo } import com.mohiva.play.silhouette.impl.authenticators.CookieAuthenticator import com.mohiva.play.silhouette.test._ import models.User import net.codingwell.scalaguice.Scal...
phosphene/play-slick-silhouette-scalatest
test/controllers/ApplicationControllerSpec.scala
Scala
apache-2.0
2,947
package mimir.parser import java.io.{Reader,File} import scala.collection.mutable.Buffer import org.jline.terminal.{Terminal,TerminalBuilder} import org.jline.reader.{LineReader,LineReaderBuilder,EndOfFileException,UserInterruptException} import com.typesafe.scalalogging.LazyLogging import fastparse.Parsed import mimi...
UBOdin/mimir
src/main/scala/mimir/parser/LineReaderParser.scala
Scala
apache-2.0
6,959
/* * 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 ...
spark-test/spark
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala
Scala
apache-2.0
14,238
// Copyright 2012 Foursquare Labs Inc. All Rights Reserved. package io.fsq.spindle.__shaded_for_spindle_bootstrap__.runtime trait SemitypedHasPrimaryKey[F] { def primaryKey: F } trait HasPrimaryKey[F, R <: Record[R]] extends SemitypedHasPrimaryKey[F] trait HasMetaPrimaryKey[F, R <: Record[R]] { def primaryKey: ...
foursquare/fsqio
src/jvm/io/fsq/spindle/codegen/__shaded_for_spindle_bootstrap__/runtime/HasPrimaryKey.scala
Scala
apache-2.0
367
package org.broadinstitute.dsde.firecloud.service import java.util.UUID import org.broadinstitute.dsde.rawls.model._ import org.joda.time.DateTime import spray.json.DefaultJsonProtocol._ import spray.json.RootJsonFormat object DataUseRestrictionTestFixtures { case class DataUseRestriction( GRU: Boolean = fal...
broadinstitute/firecloud-orchestration
src/test/scala/org/broadinstitute/dsde/firecloud/service/DataUseRestrictionTestFixtures.scala
Scala
bsd-3-clause
7,250