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 com.arcusys.valamis.certificate.storage import com.arcusys.valamis.certificate.model.goal.{GoalType, GoalStatuses, CertificateGoalState} import org.joda.time.DateTime trait CertificateGoalStateRepository { def getStatusesBy(userId: Long, certificateId: Long, isOptional: Boolean): Seq[GoalStatuses.Value] d...
igor-borisov/valamis
valamis-certificate/src/main/scala/com/arcusys/valamis/certificate/storage/CertificateGoalStateRepository.scala
Scala
gpl-3.0
864
package com.getjenny.starchat.resources import akka.http.scaladsl.model.StatusCodes import com.getjenny.starchat.TestEnglishBase import com.getjenny.starchat.entities.io._ import com.getjenny.starchat.entities.persistents._ class TermExtractionResourceTest extends TestEnglishBase { "StarChat" should { s"return...
GetJenny/starchat
src/test/scala/com/getjenny/starchat/resources/TermExtractionResourceTest.scala
Scala
gpl-2.0
4,929
package nl.soqua.lcpi.ast.lambda object Expression { def V(symbol: String): Variable = Variable(symbol) def λ(variable: Variable, body: Expression): LambdaAbstraction = LambdaAbstraction(variable, body) def A(t: Expression, s: Expression): Expression = Application(t, s) } sealed trait Expression case class V...
kevinvandervlist/lcpi
ast/src/main/scala/nl/soqua/lcpi/ast/lambda/Expression.scala
Scala
mit
524
object Test extends App { try { Array("a", "b", "c") match { case Array("a", "x", "c") => println("x") case Array("a", "b", "x") => println("a"); case Array("a", "d", _*) => println("wrongly positive") } assert(false, "match succeeded") } catch { case _: MatchError => // okay } Array("a", "...
som-snytt/dotty
tests/pending/run/t6695.scala
Scala
apache-2.0
473
package com.alanjz.microstrike.gear trait Armor { }
spacenut/microstrike
src/com/alanjz/microstrike/gear/Armor.scala
Scala
gpl-2.0
54
package dotty.tools package dotc.interactive import dotc.ast.tpd import dotc.{CompilationUnit, Compiler, Run} import dotc.core.Contexts.Context import dotc.core.Mode import dotc.reporting.StoreReporter import dotc.util.{SourceFile, SourcePosition} import dotc.util.Spans.Span import org.junit.Test class CustomComplet...
dotty-staging/dotty
compiler/test/dotty/tools/dotc/interactive/CustomCompletionTests.scala
Scala
apache-2.0
5,295
package com.evojam.mongodb.evolutions.model.evolution object Action extends Enumeration { type Action = Value val Update, ApplyUp, ApplyDown = Value }
evojam/mongodb-evolutions-scala
src/main/scala/com/evojam/mongodb/evolutions/model/evolution/Action.scala
Scala
apache-2.0
156
package org.tuubes.core.blocks import com.electronwill.utils.Vec3i /** * A directly accessible Area. * * @author TheElectronWill */ trait DirectArea extends Area { /** * @return the total number of blocks (including air) in this area */ def size: Int /** * @return the minimum coordinates included in...
mcphoton/Photon-Server
core/src/main/scala/org/tuubes/core/blocks/DirectArea.scala
Scala
lgpl-3.0
1,192
package be.wegenenverkeer.atomium.server.slick.models import org.joda.time.DateTime case class EntryModel( id: Option[Long], uuid: String, value: String, timestamp: DateTime)
joachimvda/atomium
modules/server-slick/src/main/scala/be/wegenenverkeer/atomium/server/slick/models/EntryModel.scala
Scala
mit
185
package de.tudresden.inf.lat.tabulas.ext.renderer import java.io.{BufferedWriter, FileReader, FileWriter} import java.util.Objects import de.tudresden.inf.lat.tabulas.ext.parser.{JsonParser, MultiParser, YamlParser} import de.tudresden.inf.lat.tabulas.extension.Extension import de.tudresden.inf.lat.tabulas.parser.{P...
julianmendez/tabulas
tabulas-ext/src/main/scala/de/tudresden/inf/lat/tabulas/ext/renderer/JsonSchemaExtension.scala
Scala
apache-2.0
1,684
package com.gx.cake /** * 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 by ap...
josephguan/scala-design-patterns
creational/cake/src/main/scala/com/gx/cake/CarComponents.scala
Scala
apache-2.0
1,747
package jp.relx.models import org.elasticsearch.client.transport.TransportClient import org.elasticsearch.common.transport.InetSocketTransportAddress import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest import org.elasticsearch.action.admin.indices.refresh.RefreshRequest import org.elasticsearch.act...
mzkrelx/tddsearch
src/main/scala/jp/relx/models/ElasticSearch.scala
Scala
mit
2,929
/** * 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...
sebadiaz/kafka
core/src/main/scala/kafka/server/ReplicaFetcherBlockingSend.scala
Scala
apache-2.0
3,832
package sbt package plugins import Def.Setting /** * Plugin that enables resolving artifacts via ivy. * * Core Tasks * - `update` * - `makePom` * - `publish` * - `artifacts` * - `publishedArtifacts` */ object IvyPlugin extends AutoPlugin { // We are automatically included on everything that has the global ...
pdalpra/sbt
main/src/main/scala/sbt/plugins/IvyPlugin.scala
Scala
bsd-3-clause
663
package teleporter.integration.component.mongo import akka.stream.scaladsl.Source import akka.stream.{Attributes, TeleporterAttributes} import akka.{Done, NotUsed} import org.mongodb.scala.{Document, MongoClient, MongoCollection} import teleporter.integration.component.SourceRoller.RollerContext import teleporter.inte...
huanwuji/teleporter
src/main/scala/teleporter/integration/component/mongo/Mongo.scala
Scala
agpl-3.0
4,851
import scala.reflect.macros.blackbox.Context object Impls1 { def foo[U <: String](c: Context): c.Expr[Unit] = { import c.universe._; c.Expr[Unit](q"""println("hello")""") } } class C class D extends C object Impls2 { def foo[U <: C](c: Context): c.Expr[Unit] = { import c.universe._; c.Expr[Unit](q"""println("hel...
yusuke2255/dotty
tests/disabled/macro/run/macro-expand-tparams-bounds/Impls_1.scala
Scala
bsd-3-clause
333
/* * 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/accounts/frs105/boxes/AC421.scala
Scala
apache-2.0
1,143
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
tophua/spark1.52
mllib/src/main/scala/org/apache/spark/ml/feature/Normalizer.scala
Scala
apache-2.0
2,468
package com.github.play2war.plugin.runners import com.github.play2war.plugin.it._ import java.io.File /** * Starts tomcat8 */ object Tomcat8xRunner extends App { val tomcat8CargoContainer = new CargoContainerManager with Servlet31Container with Java8 { val tomcatVersion = "8.0.22" override def containerU...
swatikiran123/play2-war-plugin
project-code/integration-tests/src/test/scala/com/github/play2war/plugin/runners/Tomcat8xRunner.scala
Scala
apache-2.0
699
package co.blocke.scalajack package yaml package parameters //--- Basic Parameterized Case Class case class Foo1[A](x: A, b: Int) case class Bar1(name: String) //--- Advanced Parameterized Case Class case class Bar2[X](id: X) case class VC1(s: String) extends AnyVal case class Foo2[A](x: Bar2[A], b: Int) case class F...
gzoller/ScalaJack
core/src/test/scala/co.blocke.scalajack/yaml/parameters/Model.scala
Scala
mit
2,243
package com.vngrs.json import annotation.implicitNotFound @implicitNotFound(msg = "Cannot find JsonReaderT or JsonFormat type class for ${T}") trait JsonReaderT[T] { def read(in: JsonReader): T private[json] def rootRead(in: JsonReader): T = { in.beginObject val t = read(in) in.endObject t } }...
csenol/jsonDroid
json/src/main/scala/com/vngrs/json/JsonFormat.scala
Scala
lgpl-3.0
818
package binconcifartests import chisel3._ import chisel3.iotesters.{PeekPokeTester, Driver, ChiselFlatSpec} import scala.util.Random import binconcifar.MuxLayer import scala.collection.mutable.ArrayBuffer class MuxComputeTests( c : MuxLayer ) extends PeekPokeTester( c ) { val myRand = new Random val cycs = 500 ...
da-steve101/binary_connect_cifar
src/test/scala/MuxLayerSuite.scala
Scala
gpl-3.0
1,984
package com.criteo.slab.core import com.criteo.slab.utils.Jsonable._ import org.scalatest.{FlatSpec, Matchers} class LayoutSpec extends FlatSpec with Matchers { "Layout" should "be serializable to JSON" in { val layout = Layout( Column(50, Row("A", 25, List( Box[String]("box1", check1 :: Nil, (vs...
criteo/slab
src/test/scala/com/criteo/slab/core/LayoutSpec.scala
Scala
apache-2.0
521
/* * Copyright 2014–2018 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...
jedesah/Quasar
couchbase/src/test/scala/quasar/physical/couchbase/BasicQueryEnablementSpec.scala
Scala
apache-2.0
6,158
/* * Copyright 2011 Andlabs, GbR. * * This 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. * * OsmRouting is distribut...
orangeman/osm_routing
src/main/scala/WebAPI.scala
Scala
gpl-3.0
1,993
/*** * Copyright 2014 Rackspace US, 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...
wdschei/api-checker
core/src/main/scala/com/rackspace/com/papi/components/checker/step/startend/URLFailXSDMatch.scala
Scala
apache-2.0
2,218
package io.youi.material import io.youi.component.Component import io.youi.component.support.{ContentSupport, InternalContainerSupport} import io.youi.component.types.{Display, Prop} import io.youi.dom import io.youi.dom._ import io.youi.event.EventSupport import io.youi.material.impl.{MDCRipple, MDCRippleImplementati...
outr/youi
gui/src/main/scala/io/youi/material/MDCButton.scala
Scala
mit
2,146
package edu.gemini.pit.ui.action import edu.gemini.pit.model.Model import edu.gemini.ui.workspace.scala.RichShell import edu.gemini.pit.ui.binding._ import edu.gemini.model.p1.immutable._ import edu.gemini.pit.ui.editor.TargetExporter import swing.{UIElement, Action} class TargetExportAction(shell: RichShell[Model]) ...
arturog8m/ocs
bundle/edu.gemini.pit/src/main/scala/edu/gemini/pit/ui/action/TargetExportAction.scala
Scala
bsd-3-clause
766
/* * Copyright (c) 2014. Webtrends (http://www.webtrends.com) * @author cuthbertm on 11/20/14 12:23 PM */ package com.webtrends.harness.component.spotifyapi import akka.actor._ import akka.pattern._ import com.webtrends.harness.app.HActor import com.webtrends.harness.component.spotifyapi.SpotifyAPIActor.Messages._ ...
Crashfreak/SpotifyAPI
src/main/scala/com/webtrends/harness/component/spotifyapi/SpotifyAPIActor.scala
Scala
apache-2.0
3,476
package org.jetbrains.plugins.scala.statistics import java.util.concurrent.ConcurrentHashMap import com.intellij.openapi.diagnostic.Logger import com.intellij.util.containers.ContainerUtil import org.apache.log4j.Level import org.github.jamm.MemoryMeter import scala.collection.mutable import scala.ref.WeakReference ...
LPTK/intellij-scala
src/org/jetbrains/plugins/scala/statistics/CacheStatistics.scala
Scala
apache-2.0
4,017
package actorAPI import java.awt.image.BufferedImage import java.io._ import java.util.Calendar import javax.imageio.ImageIO import akka.actor.Actor import akka.actor.Props import akka.dispatch._ import akka.event.Logging abstract class genericActor extends Actor with RequiresMessageQueue[BoundedMessageQueueSemanti...
pensivearchitect/sweeper-redux
src/main/scala/actorAPI.scala
Scala
bsd-3-clause
847
package gettingstarted import fpinscala.gettingstarted.PolymorphicFunctions.isSorted class IsSortedTest extends org.specs2.mutable.Specification{ "A SortedArray" should { "be fully sorted" in { isSorted(Array(2, 3, 6, 7, 8, 9), (a: Int, b: Int) => a > b) must beFalse isSorted(Array(9, 8, 2, 6, 3, 7)...
coughlac/fpinscala
exercises/src/test/scala/gettingstarted/IsSortedTest.scala
Scala
mit
1,222
object Test { def f(x: Any) = println(x match { case List(_, _) => "two" case List(_, _, _) => "three" case xs @ List(_*) => "list: " + xs.length case _ => "not a list" }) def f2[T](x: List[T]) = println(x match { case List(_, _) => "two" case List(_, _, _) => "thr...
martijnhoekstra/scala
test/files/run/t3530.scala
Scala
apache-2.0
828
package strd.net.http import io.netty.buffer.{ByteBuf, Unpooled} import io.netty.util.CharsetUtil /** * @author Kirill chEbba Chebunin */ object Content { def apply( str : String ): ByteBuf = { Unpooled.wrappedBuffer( str.getBytes(CharsetUtil.UTF_8) ) } def apply( bytes : Array[Byte] ): ByteBuf = { U...
lembrd/strd-net-http
src/main/scala/strd/net/http/Content.scala
Scala
gpl-3.0
357
package client.appstate.groups.members import autowire._ import client.MessageFeedback import client.appstate.{GroupMemberFeedbackReporting, GroupMembers} import client.services.AjaxClient import diode.data._ import diode.{Effect, _} import shared._ import shared.requests.groups.members._ import boopickle.Default._ im...
beikern/foulkon-ui
client/src/main/scala/client/appstate/groups/members/DiodeGroupMember.scala
Scala
apache-2.0
4,955
package akka.io import akka.testkit.{ImplicitSender, TestKit} import akka.actor.{Props, ActorSystem} import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike} import java.nio.file.Paths import akka.io.FileWriter.{WriteLine, Write} import akka.util.ByteString import akka.io.File.{Closed, Close, Written} class F...
drexin/akka-io-file
src/test/scala/akka/io/FileWriterSpec.scala
Scala
apache-2.0
2,347
/* * Copyright 2017 Anton Wierenga * * 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 ...
antonwierenga/activemq-cli
src/main/scala/activemq/cli/command/QueueCommands.scala
Scala
apache-2.0
14,244
package sri.test.components import sri.core.ElementFactory._ import sri.core.{React, ReactComponent} import sri.universal.ReactUniversal import scala.scalajs.js import scala.scalajs.js.Dynamic.{literal => json} import scala.scalajs.js.annotation.{JSName, ScalaJSDefined} object HelloLifeCycle { var willMount = fal...
chandu0101/sri
test/src/main/scala/sri/test/components/HelloLifeCycle.scala
Scala
apache-2.0
1,860
package com.geeksville.dapi import com.github.aselab.activerecord.ActiveRecord import org.scalatra.swagger.Swagger import com.geeksville.dapi.model.CRUDOperations import org.json4s.Formats import com.geeksville.json.ActiveRecordSerializer import com.github.aselab.activerecord.dsl._ import com.geeksville.dapi.model.Dap...
dronekit/dronekit-server
src/main/scala/com/geeksville/dapi/ActiveRecordController.scala
Scala
gpl-3.0
3,708
def min[T](a: Seq[T])(implicit comparator: Comparator[T]): T = a.reduceLeft{(x,y) => if (comparator.compare(x,y)<0) x else y}
lkuczera/scalatypeclasses
steps/Comparatormin.scala
Scala
mit
130
package loaders import org.apache.spark.rdd.RDD import scala.reflect.ClassTag /** * A case class containing an RDD of labeled data * @tparam Label The type of the labels * @tparam Datum The type of the data */ case class LabeledData[Label : ClassTag, Datum : ClassTag](labeledData: RDD[(Label, Datum)]) { val ...
dongjoon-hyun/keystone
src/main/scala/loaders/LabeledData.scala
Scala
apache-2.0
412
package com.mesosphere.universe /** * Conforms to: https://github.com/mesosphere/universe/blob/version-2.x/repo/meta/schema/package-schema.json */ case class PackageDetails( packagingVersion: PackagingVersion, name: String, version: PackageDetailsVersion, maintainer: String, description: String, tags: ...
movicha/cosmos
cosmos-model/src/main/scala/com/mesosphere/universe/PackageDetails.scala
Scala
apache-2.0
687
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
travisbrown/scalatest
src/main/scala/org/scalatest/Outcome.scala
Scala
apache-2.0
21,075
/** * Copyright (C) 2010-2012 LShift 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 applicable law...
aprescott/diffa
kernel/src/main/scala/net/lshift/diffa/kernel/config/migrations/Step0022.scala
Scala
apache-2.0
13,187
package injector import java.io.{File, PrintWriter} import scala.annotation.tailrec import scala.reflect.macros.blackbox class InjectorMacro[C <: blackbox.Context](val c: C) { import c.universe._ def resolve[T: c.WeakTypeTag]: c.Tree = { val self = c.prefix val tpe = weakTypeOf[T] val name = tpe.typ...
fomkin/injector
src/main/scala/injector/InjectorMacro.scala
Scala
apache-2.0
7,582
package functional import models._ import play.api.i18n.MessagesApi import play.api.i18n.{Lang, Messages, MessagesImpl, MessagesProvider} import java.util.concurrent.TimeUnit import play.api.test._ import play.api.test.Helpers._ import java.sql.Connection import helpers.Helper._ import org.specs2.mutable.Specification...
ruimo/store2
test/functional/CategoryMaintenanceSpec.scala
Scala
apache-2.0
14,081
package org.k33nteam.jade.propagation.methodplugins import org.k33nteam.jade.propagation.base.IAPICheckPlugin import org.k33nteam.jade.helpers.SyntaxHelpers._ import org.k33nteam.jade.bean.VulnResult import soot.Scene import soot.SootMethod import scala.collection.mutable.Map import soot.jimple.InstanceInvokeExpr impo...
flankerhqd/JAADAS
jade/src/main/scala/org/k33nteam/jade/propagation/methodplugins/WebviewFileDomainPlugin.scala
Scala
gpl-3.0
2,875
package com.tpl.hamcraft.machines.incubator import net.bdew.lib.machine.{ProcessorMachine, Machine} import net.bdew.lib.gui.GuiProvider import cpw.mods.fml.relauncher.{Side, SideOnly} import net.minecraft.entity.player.EntityPlayer import net.minecraft.client.gui.inventory.GuiContainer import net.minecraft.inventory.C...
piotrb/hamcraft
src/main/scala/com/tpl/hamcraft/machines/incubator/MachineIncubator.scala
Scala
bsd-2-clause
833
package org.skycastle.network.protocol.binary import java.math.BigInteger import java.nio.ByteBuffer /** * Utility methods for dealing with packed numbers. * * @author Hans Haggstrom */ // TODO: Implement the packing algorithm directly, instead of instantiating a BigInteger. object PackedNumbers { private va...
weimingtom/skycastle
src/main/scala/org/skycastle/network/protocol/binary/PackedNumbers.scala
Scala
gpl-2.0
3,109
/* * 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/shuffle/sort/SortShuffleManager.scala
Scala
apache-2.0
9,997
class C(private val x: Any) extends AnyVal // Checking that makeNotPrivate(paramAccessor) doesn't make this visible during typer. // The output is identical with/without `extends AnyVal`. object Test { new p1.A(x).x new B(x).x new C(x).x }
yusuke2255/dotty
tests/untried/neg/t7859/B_2.scala
Scala
bsd-3-clause
247
package net.sansa_stack.rdf.flink.qualityassessment.metrics.relevancy import net.sansa_stack.rdf.common.qualityassessment.utils.NodeUtils._ import org.apache.flink.api.scala._ import org.apache.jena.graph.{Node, Triple} /** * @author Gezim Sejdiu */ object CoverageScope { /** * This metric calculate the co...
SANSA-Stack/Spark-RDF
sansa-rdf-flink/src/main/scala/net/sansa_stack/rdf/flink/qualityassessment/metrics/relevancy/CoverageScope.scala
Scala
gpl-3.0
955
package scalaxy.streams import scala.collection.breakOut trait TuploidValues extends Utils with Tuploids { val global: scala.reflect.api.Universe import global._ import definitions._ // private[this] def isTupleType(tpe: Type): Boolean = // Option(tpe).exists(t => isTupleSymbol(t.typeSymbol)) // privat...
nativelibs4java/scalaxy-streams
src/main/scala/streams/matchers/TuploidValues.scala
Scala
bsd-3-clause
12,072
/*********************************************************************** * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
jahhulbert-ccri/geomesa
geomesa-convert/geomesa-convert-text/src/test/scala/org/locationtech/geomesa/convert/text/CompositeTextConverterTest.scala
Scala
apache-2.0
3,517
package reactivemongo.core.netty import reactivemongo.io.netty.channel.{ Channel, EventLoopGroup } import reactivemongo.io.netty.channel.nio.NioEventLoopGroup import reactivemongo.io.netty.channel.socket.nio.NioSocketChannel import reactivemongo.util.LazyLogger /** * @param eventLoopGroup the event loop group * @...
cchantep/ReactiveMongo
driver/src/main/scala/core/netty/Pack.scala
Scala
apache-2.0
2,869
/* * Copyright 2011 Chris de Vreeze * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
dvreeze/spring-jdbc-scala-utils
src/main/scala/eu/cdevreeze/springjdbc/namedparam/TypedArgMap.scala
Scala
apache-2.0
1,539
package scala.collection import org.junit.Assert._ import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.JUnit4 @RunWith(classOf[JUnit4]) class IterableViewLikeTest { @Test def hasCorrectDropAndTakeMethods(): Unit = { val iter = Iterable(1, 2, 3) import scala.language.postfixOps...
martijnhoekstra/scala
test/junit/scala/collection/IterableViewLikeTest.scala
Scala
apache-2.0
599
/*********************************************************************** * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
ddseapy/geomesa
geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/SimpleFeatureTypes.scala
Scala
apache-2.0
10,916
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/test/scala/org/neo4j/cypher/internal/compiler/v2_3/commands/ExtractTest.scala
Scala
apache-2.0
1,574
/* * Copyright (c) 2018 OVO Energy * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish,...
ovotech/comms-kafka-messages
modules/core/src/main/scala/com/ovoenergy/comms/model/Feedback.scala
Scala
mit
2,702
package mesosphere.marathon package core.deployment import akka.Done import akka.actor.{ ActorRef, Props } import akka.event.EventStream import akka.stream.Materializer import mesosphere.marathon.core.deployment.impl.{ DeploymentActor, DeploymentManagerActor, DeploymentManagerDelegate } import mesosphere.marathon.core...
Caerostris/marathon
src/main/scala/mesosphere/marathon/core/deployment/DeploymentModule.scala
Scala
apache-2.0
2,064
/* 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...
nvoron23/scalding
scalding-date/src/test/scala/com/twitter/scalding/DateTest.scala
Scala
apache-2.0
13,473
package com.databricks.spark.sql.perf.mllib.feature /** Trait defining common state/methods for featurizers taking a single input col */ private[feature] trait UnaryTransformer { private[feature] val inputCol = "inputCol" private[feature] val outputCol = "outputCol" }
databricks/spark-sql-perf
src/main/scala/com/databricks/spark/sql/perf/mllib/feature/UnaryTransformer.scala
Scala
apache-2.0
274
/** * Copyright (c) Lambda Innovation, 2013-2016 * This file is part of LambdaLib modding library. * https://github.com/LambdaInnovation/LambdaLib * Licensed under MIT, see project root for more information. */ package cn.lambdalib.cgui import cn.lambdalib.cgui.gui.component.Component import cn.lambdalib.cgui.gui.Widg...
LambdaInnovation/LambdaLib
src/main/scala/cn/lambdalib/cgui/ScalaCGUI.scala
Scala
mit
2,276
/* * Copyright (c) 2009 Sony Pictures Imageworks 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, thi...
imageworks/scala-migrations
src/main/scala/com/imageworks/migration/MigratorOperation.scala
Scala
bsd-3-clause
2,858
/** * Copyright (C) 2010-2011 LShift 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 applicable law...
aprescott/diffa
agent/src/test/scala/net/lshift/diffa/agent/itest/support/Participants.scala
Scala
apache-2.0
3,117
package xitrum.routing import scala.annotation.tailrec import scala.collection.mutable.{ArrayBuffer, Map => MMap} import io.netty.handler.codec.http.HttpMethod import xitrum.{Action, Log} import xitrum.annotation.Swagger import xitrum.scope.request.{Params, PathInfo} import xitrum.util.LocalLruCache object RouteCol...
caiiiycuk/xitrum
src/main/scala/xitrum/routing/RouteCollection.scala
Scala
mit
17,025
package chana.reactor import akka.actor.Actor import akka.actor.ActorRef import akka.actor.Terminated import akka.cluster.pubsub.DistributedPubSubMediator.{ Publish, Subscribe, SubscribeAck, Unsubscribe, UnsubscribeAck } import akka.event.LoggingAdapter import akka.pattern.ask import akka.routing.ActorRefRoutee import...
hustnn/chana
src/main/scala/chana/reactor/Publisher.scala
Scala
apache-2.0
2,967
package pelikomponentit import peli.Pelitilanne import siirrot.Siirto /* Lähteet: * O1-kurssin tehtävän Chess luokka Piece */ sealed abstract class Maasto(maastonTunnus: Char, nimi_ : String) { override def toString = maastonTunnus.toString def nimi = nimi_ def onMaali = this match { case Maali(...
MrAurela/Formula
Formula/src/pelikomponentit/Maasto.scala
Scala
mit
3,518
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.reflect.macros p...
scala/scala
src/compiler/scala/reflect/macros/contexts/FrontEnds.scala
Scala
apache-2.0
1,207
package cz.kamenitxan.jakon.core.configuration import cz.kamenitxan.jakon.core.custom_pages.{CustomPage, CustomPageInitializer, StaticPage} import cz.kamenitxan.jakon.core.dynamic.{JsonPagelet, JsonPageletInitializer, Pagelet, PageletInitializer} import cz.kamenitxan.jakon.utils.Utils import cz.kamenitxan.jakon.webui....
kamenitxan/Jakon
modules/backend/src/main/scala/cz/kamenitxan/jakon/core/configuration/AnnotationScanner.scala
Scala
bsd-3-clause
3,105
package vexriscv.demo.smp import spinal.core import spinal.core._ import spinal.core.sim.{onSimEnd, simSuccess} import spinal.lib._ import spinal.lib.bus.bmb.sim.BmbMemoryAgent import spinal.lib.bus.bmb._ import spinal.lib.bus.misc.{DefaultMapping, SizeMapping} import spinal.lib.bus.wishbone.{Wishbone, WishboneConfig,...
SpinalHDL/VexRiscv
src/main/scala/vexriscv/demo/smp/VexRiscvSmpCluster.scala
Scala
mit
27,995
package org.camunda.feel.impl import java.time.ZonedDateTime import org.camunda.feel.FeelEngineClock class TimeTravelClock extends FeelEngineClock { private val systemClock = FeelEngineClock.SystemClock private var provider: () => ZonedDateTime = () => systemClock.getCurrentTime def currentTime(currentTime:...
camunda/feel-scala
src/test/scala/org/camunda/feel/impl/TimeTravelClock.scala
Scala
apache-2.0
513
// Copyright 2016 Foursquare Labs Inc. All Rights Reserved. package io.fsq.rogue.types trait MongoDisallowed
foursquare/fsqio
src/jvm/io/fsq/rogue/types/MongoDisallowed.scala
Scala
apache-2.0
111
/* * 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 ...
zuotingbing/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveTestUtils.scala
Scala
apache-2.0
3,339
/* * Copyright (C) 2012 Romain Reuillon * * 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 is di...
ISCPIF/PSEExperiments
openmole-src/openmole/plugins/org.openmole.plugin.environment.ssh/src/main/scala/org/openmole/plugin/environment/ssh/PrivateKey.scala
Scala
agpl-3.0
1,600
/* * Copyright 2015 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
scottcutts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v2/B39.scala
Scala
apache-2.0
851
/* * Copyright (c) 2014-2021 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
monifu/monix
monix-tail/shared/src/main/scala/monix/tail/internal/IterantAttempt.scala
Scala
apache-2.0
6,437
object Asshole { def main(args: Array[String]) = println("Asshole!") }
juliocnsouzadev/scala_datascience
fuctional_programming_principles/fpps-week01-assign00/ass.scala
Scala
mit
72
package com.twitter.algebird import org.scalacheck.Arbitrary import org.scalacheck.Gen.choose import org.scalacheck.Properties import org.scalacheck.Prop.forAll object CollectionSpecification extends Properties("Collections") { import BaseProperties._ implicit def arbMin[T:Arbitrary] : Arbitrary[Min[T]] = Ar...
snoble/algebird
algebird-test/src/test/scala/com/twitter/algebird/CollectionSpecification.scala
Scala
apache-2.0
6,174
package io.flatmap.ml.util import breeze.plot._ import breeze.linalg._ import io.flatmap.ml.som.SelfOrganizingMap._ import scala.util.Try object Plot { def som(title: String, cb: CodeBook, path: String)(weightsMappingFn: List[Double] => Double) = Try { val f = Figure(title) f.subplot(0) += image(cb.mapVal...
ShokuninSan/som
src/main/scala/io/flatmap/ml/util/Plot.scala
Scala
mit
729
/** * Copyright 2011-2016 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 appli...
GabrielPlassard/gatling
gatling-charts/src/main/scala/io/gatling/charts/stats/buffers/PercentilesBuffers.scala
Scala
apache-2.0
1,974
package chee import java.time.Instant import better.files.File import org.scalatest._ import org.scalatest.matchers._ trait MoreMatcher { implicit val _fileExistence = new enablers.Existence[File] { def exists(f: File) = f.exists } class BeforeMatcher(right: Instant) extends Matcher[Instant] { def app...
eikek/chee
src/test/scala/chee/MoreMatcher.scala
Scala
gpl-3.0
830
/* * Copyright 2017 the original author or 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 applicab...
krasserm/akka-stream-eventsourcing
src/test/scala/com/github/krasserm/ases/StopSystemAfterAll.scala
Scala
apache-2.0
924
package com.eevolution.context.dictionary.domain.model import ai.x.play.json.Jsonx import com.eevolution.context.dictionary.api.{ActiveEnabled, DomainModel, Identifiable, Traceable} import org.joda.time.DateTime case class ReplicationRoleAccess(replicationRoleAccessId: Int, tenantId: ...
adempiere/ADReactiveSystem
dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/model/ReplicationRoleAccess.scala
Scala
gpl-3.0
1,987
/* * Copyright 2015 RONDHUIT Co.,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 applicable law or agre...
gazimahmud/nlp4l
src/main/scala/org/nlp4l/lm/HmmTokenizer.scala
Scala
apache-2.0
3,252
package com.twitter.finagle.client import com.twitter.finagle.Filter import com.twitter.finagle.Service import com.twitter.finagle.SimpleFilter import com.twitter.util.tunable.Tunable import com.twitter.util.Duration import com.twitter.util.Future import scala.collection.mutable /** * @see [[BaseMethodBuilder]] */ ...
twitter/finagle
finagle-core/src/main/scala/com/twitter/finagle/client/MethodBuilderTimeout.scala
Scala
apache-2.0
4,452
package streamz.akka import akka.actor._ import akka.stream.actor._ import akka.stream.actor.ActorSubscriberMessage._ import akka.stream.scaladsl2._ import org.reactivestreams.Publisher import scalaz.concurrent.Task import scalaz.stream.Process.Halt import scalaz.stream.Sink import scalaz.stream._ package object st...
Astrac/streamz
streamz-akka-stream/src/main/scala/streamz/akka/stream/package.scala
Scala
apache-2.0
5,209
/* * Copyright (C) 2005, The Beangle Software. * * 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 3 of the License, or * (at your option) any later version. * * This...
beangle/webmvc
freemarker/src/main/scala/org/beangle/webmvc/freemarker/ContextFreemarkerConfigurer.scala
Scala
lgpl-3.0
2,207
package im.actor.server.session import akka.actor.{ Stash, ActorRef, ActorLogging, Props } import akka.stream.actor._ import im.actor.api.rpc.UpdateBox import im.actor.server.sequence._ import scala.annotation.tailrec import scala.collection.immutable private[session] object UpdatesHandler { final case class Autho...
EaglesoftZJ/actor-platform
actor-server/actor-session/src/main/scala/im/actor/server/session/UpdatesHandler.scala
Scala
agpl-3.0
3,166
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
aosagie/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/continuous/ContinuousTrigger.scala
Scala
apache-2.0
2,041
package net.resonious.sburb.abstracts import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer import net.minecraft.tileentity.TileEntity import org.lwjgl.opengl.GL11 import net.minecraft.client.model.ModelBase import net.minecraft.client.renderer.Tessellator import net.minecraft.world.World import ne...
Resonious/mcsburb
src/main/scala/net/resonious/sburb/abstracts/ActiveTileEntityRenderer.scala
Scala
mit
1,990
/* * Copyright (C) 2010 Peter Lewerin <peter.lewerin@tele2.se> * * The contents of this file are subject to the GNU General Public License * Version 3 (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.gnu.org/copyleft/gpl.html ...
dotta/kojo
KojoEnv/src/net/kogics/kojo/staging/screen.scala
Scala
gpl-3.0
1,278
package uk.gov.gds.location.importer.model import org.specs2.mutable.Specification class CountriesTest extends Specification { "Countries object" should { "resolve gsscodes starting with E as England" in { Countries.countryForGssCode("E123456789") must beEqualTo("England") } "resolve gsscodes st...
alphagov/location-data-importer
src/test/scala/uk/gov/gds/location/importer/model/CountriesTest.scala
Scala
mit
571
package com.faacets.qalg import org.scalatest.FunSuite import spire.math.Rational import spire.syntax.innerProductSpace._ import algebra._ import math._ import syntax.all._ /** Examples and tests taken from Lipschutz-Lipson 2004. * * Full reference: * * Lipschutz-Lipson, Schaum's Outline of Theory and Prob...
denisrosset/qalg
tests/src/test/scala/qalg/SchaumSuite.scala
Scala
mit
2,078
package com.twitter.finagle.netty4.param import com.twitter.finagle.netty4.UnpooledAllocator import com.twitter.finagle.Stack import io.netty.buffer.ByteBufAllocator private[netty4] case class Allocator(allocator: ByteBufAllocator) private[netty4] object Allocator { // TODO investigate pooled allocator CSL-2089 /...
spockz/finagle
finagle-netty4/src/main/scala/com/twitter/finagle/netty4/param/Allocator.scala
Scala
apache-2.0
558
package momijikawa.lacquer.KanColleMessage import spray.http.{ HttpRequest, Uri, HttpResponse } import scalaz.{ \\/-, -\\/, \\/ } trait KanColleMessageConverter { val uriRegex: String // レスポンスの文字列から"svdata="を削除して返す def getJsonString(response: HttpResponse): String = response.entity.data.asString.substring(7) ...
windymelt/lacquer
src/main/scala/momijikawa/lacquer/KanColleMessage/KanColleMessageConverter.scala
Scala
bsd-3-clause
750
/*********************************************************************** * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
jahhulbert-ccri/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/util/GeoMesaBatchWriterConfig.scala
Scala
apache-2.0
1,995
/** * 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...
wking1986/kafka-manager
app/kafka/manager/utils/LogConfig.scala
Scala
apache-2.0
5,403
/* * Copyright (C) 2007-2008 Artima, 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 requir...
peachyy/scalastu
expressions-and-control-flow/Breakless2.scala
Scala
apache-2.0
1,032