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 org.machine.engine.graph.commands.workflows import org.scalatest._ import org.scalatest.mock._ import org.machine.engine.TestUtils import java.io.File; import java.io.IOException; import org.neo4j.io.fs.FileUtils import com.typesafe.config._ import org.neo4j.graphdb.GraphDatabaseService import org.machine.en...
sholloway/graph-engine
src/test/scala/org/machine/engine/graph/commands/workflows/ElementDefintionWorkflowFunctionsSpec.scala
Scala
mit
24,510
/*********************************************************************** * 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 ...
MutahirKazmi/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/data/AccumuloDataStore.scala
Scala
apache-2.0
13,221
package org.cddcore.rendering.view import org.cddcore.engine.Engine import org.cddcore.enginecomponents.{EngineComponent, Scenario, UseCase} import org.cddcore.rendering.RenderContext object View { val Class = "class" val Stack = "stack" val Message = "message" val Advice = "advice" val Reason = ...
phil-rice/CddCore2
module/rendering/src/main/scala/org/cddcore/rendering/view/View.scala
Scala
bsd-2-clause
1,956
package com.twitter.finagle.mux import com.twitter.concurrent.AsyncQueue import com.twitter.conversions.time._ import com.twitter.finagle.liveness.FailureDetector import com.twitter.finagle.mux.transport.Message import com.twitter.finagle.stats.NullStatsReceiver import com.twitter.finagle.transport.QueueTransport impo...
mkhq/finagle
finagle-mux/src/test/scala/com/twitter/finagle/mux/DispatcherTest.scala
Scala
apache-2.0
1,613
package net.ultrametrics.fractactor import scala.actors.Actor import scala.actors.Actor._ import net.ultrametrics.math.Complex /** * Fractal point calculator. * * Given a coordinate in the complex plane, computes the corresponding * value of a holomorphic function (such as the Mandelbrot set) layered * onto th...
pchuck/fractactor
src/main/scala/net/ultrametrics/fractactor/FractalCalculator.scala
Scala
bsd-2-clause
1,385
/* * @author Philip Stutz * @author Sara Magliacane * * Copyright 2014 University of Zurich & VU University Amsterdam * * 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 * * ...
uzh/fox
src/test/scala/com/signalcollect/psl/serialization/PslSerializationSpec.scala
Scala
apache-2.0
3,261
package com.seanshubin.uptodate.logic import java.nio.charset.StandardCharsets import org.scalatest.FunSuite class MetadataParserTest extends FunSuite { test("parse") { val charset = StandardCharsets.UTF_8 val metadataParser: MetadataParser = new MetadataParserImpl(charset) val actual = metadataParser....
SeanShubin/up-to-date
logic/src/test/scala/com/seanshubin/uptodate/logic/MetadataParserTest.scala
Scala
unlicense
1,765
package scdbpf import org.parboiled.scala._ import DbpfProperty._ import passera.unsigned._ private class PropertyParser extends Parser { def HexDigit = rule(SuppressNode) { "0" - "9" | "a" - "f" | "A" - "F" } def HexNumber = rule(SuppressNode) { rule { "0" ~ ignoreCase("x") ~ oneOrMore(HexDigit) } ~> (java.lan...
memo33/scdbpf
src/main/scala/scdbpf/internal/PropertyParser.scala
Scala
mit
5,467
/* * 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 ...
bravo-zhang/spark
sql/core/src/test/scala/org/apache/spark/sql/sources/FilteredScanSuite.scala
Scala
apache-2.0
13,158
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/main/scala/org/neo4j/cypher/internal/compiler/v2_3/commands/expressions/RelationshipFunction.scala
Scala
apache-2.0
1,900
/* * Copyright 2020 Precog Data * * 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 ...
quasar-analytics/quasar
impl/src/test/scala/quasar/impl/evaluate/QueryFederatorSpec.scala
Scala
apache-2.0
6,688
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.3 * @date Wed Dec 30 14:48:41 EST 2009 * @see LICENSE (MIT style license file). */ package apps.event import scalation.model.Modelable import scalation.event.{Entity, Event, Model, Wai...
NBKlepp/fda
scalation_1.3/scalation_models/src/main/scala/apps/event/Bank.scala
Scala
mit
5,554
object o { def apply(i: AnyRef*)(j: String) = i } object Test { def main(args: Array[String]) { println("(o()_)(\"\") = " + (o()_)("")) println("(o(\"a1\")_)(\"\") = " + (o("a1")_)("")) println("(o(\"a1\", \"a2\")_)(\"\") = " + (o("a1", "a2")_)("")) } }
felixmulder/scala
test/files/run/t5966.scala
Scala
bsd-3-clause
271
class B(val x: Int) { self: A => def this(a: String) = this() } class A()
AlexSikia/dotty
tests/untried/neg/t4460c.scala
Scala
bsd-3-clause
80
package pokescala.model import java.time.LocalDateTime import pokescala.net.PokeAPI class Type( val name : String, val offensiveMults : Map[String, Double], val id : Int, val resourceURI : String, val created : LocalDateTime, val modified : LocalDateTime) extends Model[Type] { val registr...
haferflocken/PokeScala
PokeScala/src/pokescala/model/Type.scala
Scala
apache-2.0
607
package akka.contrib.persistence.mongodb import org.junit.runner.RunWith import org.scalatestplus.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class ScalaPersistenceJournalTckSpec extends JournalTckSpec(classOf[ScalaDriverPersistenceExtension], s"officialScalaJournalTck") @RunWith(classOf[JUnitRunner]) class Sca...
JeanFrancoisGuena/akka-persistence-mongo
scala/src/test/scala/akka/contrib/persistence/mongodb/ScalaPersistenceJournalTckSpec.scala
Scala
apache-2.0
497
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
cran/rkafkajars
java/scala/Product2.scala
Scala
apache-2.0
1,529
package org.knora.webapi.messages.v1.responder.permissionmessages import org.knora.webapi._ import org.knora.webapi.messages.v1.responder.usermessages.UsersResponderRequestV1 import org.scalatest.{Matchers, WordSpecLike} /** * This spec is used to test subclasses of the [[UsersResponderRequestV1]] class. */ class...
nie-ine/Knora
webapi/src/test/scala/org/knora/webapi/messages/v1/responder/permissionmessages/PermissionMessagesV1Spec.scala
Scala
agpl-3.0
4,430
package reeds import java.net.{InetSocketAddress, URI, URL} import cats.data._ import Validated._ import cats.instances.list._ import cats.syntax.functor._ trait net { import Reads._ implicit object InetSocketAddressReads extends Reads[InetSocketAddress] { //Regex intended to parse host/port combo (host can...
Acornsgrow/reeds
reeds-core/src/main/scala/reeds/net.scala
Scala
apache-2.0
882
package com.twitter.finagle.zipkin.thrift import com.twitter.conversions.time._ import com.twitter.finagle.builder.ClientBuilder import com.twitter.finagle.service.TimeoutFilter import com.twitter.finagle.stats.{NullStatsReceiver, StatsReceiver} import com.twitter.finagle.thrift.{ThriftClientFramedCodec, thrift} impor...
firebase/finagle
finagle-zipkin/src/main/scala/com/twitter/finagle/zipkin/thrift/RawZipkinTracer.scala
Scala
apache-2.0
9,807
object Test { import scala.Eql given [X, Y](using Eql[X, Y]) as Eql[List[X], List[Y]] = Eql.derived val b: Byte = 1 val c: Char = 2 val i: Int = 3 val l: Long = 4L val ii: Integer = i List(b) == List(l) List(l) == List(c) List(b) != List(c) List(i) == List(l) List(i) == List(ii) List(ii) ==...
som-snytt/dotty
tests/pos/multiversal.scala
Scala
apache-2.0
594
// A is a class, so W does not conform to A in bytecode. an access (w: W).m() requires a cast to A. trait W extends A class C extends W object Test { def main(args: Array[String]): Unit = { val w: W = new C assert(w.m() == 1) } }
lrytz/scala
test/files/run/t10249/Test.scala
Scala
apache-2.0
243
/* * 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/cdi
spring/src/main/scala/org/beangle/cdi/spring/beans/ScalaEditorRegistrar.scala
Scala
lgpl-3.0
3,725
/* * Copyright 2019 Spotify AB. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
spotify/scio
scio-core/src/main/scala/com/spotify/scio/JavaConverters.scala
Scala
apache-2.0
2,422
/* * Copyright (c) 2012-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://www.apach...
mdavid/lessig-bigdata
lib/snowplow/3-enrich/scala-hadoop-enrich/project/BuildSettings.scala
Scala
mit
3,467
package org.schedoscope.dsl.transformations import org.scalatest.{FlatSpec, Matchers} import org.schedoscope.dsl.View import org.schedoscope.dsl.transformations.HiveTransformation._ case class HiveView() extends View { val f = fieldOf[String] transformVia { () => HiveTransformation( insertInto...
christianrichter/schedoscope
schedoscope-core/src/test/scala/org/schedoscope/dsl/transformations/TransformationTest.scala
Scala
apache-2.0
1,307
/* * Copyright 2019 Spotify AB. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
regadas/scio
scio-examples/src/main/scala/com/spotify/scio/examples/extra/TypedStorageBigQueryTornadoes.scala
Scala
apache-2.0
2,438
/* * 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...
pncampbell/ct-calculations
src/test/scala/uk/gov/hmrc/ct/computations/CP667Spec.scala
Scala
apache-2.0
1,355
/* * 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 ...
goldmedal/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/SQLExecutionRDD.scala
Scala
apache-2.0
2,452
package au.com.dius.pact.provider.sbtsupport import au.com.dius.pact.provider.unfiltered.Conversions import au.com.dius.pact.model.{Request, Response} import au.com.dius.pact.provider.CollectionUtils import com.typesafe.scalalogging.StrictLogging import com.ning.http.client.FluentStringsMap import dispatch.url import...
flaregames/pact-jvm
pact-jvm-provider/src/main/scala/au/com/dius/pact/provider/sbtsupport/HttpClient.scala
Scala
apache-2.0
1,335
package com.twitter.finagle.mux import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.{OneInstancePerTest, FunSpec} @RunWith(classOf[JUnitRunner]) class TagMapTest extends FunSpec with OneInstancePerTest { def test(range: Range, fastSize: Int) { describe("TagMap[range=%d un...
travisbrown/finagle
finagle-mux/src/test/scala/com/twitter/finagle/mux/TagMapTest.scala
Scala
apache-2.0
1,463
import sbt._ import Keys._ object ApplicationBuild extends Build { val appName = "json-lib" val appVersion = "1.0-SNAPSHOT" val local: Project.Initialize[Option[sbt.Resolver]] = version { (version: String) => val localPublishRepo = "./repository" if(version.trim.endsWith("SNAPSHOT")) ...
ReactiveCouchbase/json-lib
project/Build.scala
Scala
apache-2.0
1,991
package org.flowpaint.filters import org.flowpaint.property.Data import org.flowpaint.util.{DataSample, PropertyRegister, MathUtils} /** * Calculates the distance along the line, as well as the length of the previous stroke. * * @author Hans Haggstrom */ // TODO: Add velocity calculation too class DistanceCalcul...
zzorn/flowpaint
src/main/scala/org/flowpaint/filters/DistanceCalculatorFilter.scala
Scala
gpl-2.0
1,362
package mesosphere.marathon package state import mesosphere.{ UnitTest, ValidationTestLike } import mesosphere.marathon.state.PathId._ import scala.collection.SortedSet class PathIdTest extends UnitTest with ValidationTestLike { "A PathId" can { "be parsed from string" in { Given("A base id") val p...
guenter/marathon
src/test/scala/mesosphere/marathon/state/PathIdTest.scala
Scala
apache-2.0
5,193
package org.greencheek.spray.cache.memcached import org.greencheek.util.memcached.WithMemcached import org.specs2.runner.JUnitRunner import org.junit.runner.RunWith /** * Created by dominictootell on 30/03/2014. */ // jmemcache binary protocol does not play nice with spy // Therefore this class does not have the JU...
tootedom/spray-cache-spymemcached
src/test/scala/org/greencheek/spray/cache/memcached/BinaryMemcachedCacheSpec.scala
Scala
apache-2.0
687
/** * Created by Mathieu Leclaire on 23/04/18. * * 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 version. * ...
openmole/openmole
openmole/gui/plugins/org.openmole.gui.plugin.wizard.jar/src/main/scala/org/openmole/gui/plugin/wizard/jar/JarWizardGUI.scala
Scala
agpl-3.0
6,234
import io.circe.{ Decoder, Encoder } import io.circe.generic.semiauto.{ deriveDecoder, deriveEncoder } import sangria.macros._ import types._ object EpisodeEnum { object EpisodeEnum extends GraphQLQuery { val document: sangria.ast.Document = graphql"""query EpisodeEnum { hero { name appearsIn } }""" ...
muuki88/sbt-graphql
src/test/resources/apollo/starwars-circe/EpisodeEnum.scala
Scala
apache-2.0
806
package org.sofi.deadman.component.manager import akka.actor._ import com.rbmhtechnology.eventuate._ import org.sofi.deadman.component.actor.TaskActor import org.sofi.deadman.messages.command._ import org.sofi.deadman.messages.event._ final class CommandManager(val id: String, val eventLog: ActorRef) extends Eventsou...
SocialFinance/deadman-switch
core/src/main/scala/org/sofi/deadman/component/manager/CommandManager.scala
Scala
bsd-3-clause
1,268
package wafna.radius.protocol import java.nio.ByteBuffer import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import StdAttrType._ @RunWith(classOf[JUnitRunner]) class TestPacketSerialization extends FunSuite { val packetType = PacketType.AccessRequest.code val pac...
wafna/scud
radius/src/test/scala/wafna/radius/protocol/TestPacketSerialization.scala
Scala
unlicense
1,816
package io.getquill import io.getquill.context.Context trait TestEntities { this: Context[_, _] => case class TestEntity(s: String, i: Int, l: Long, o: Option[Int]) case class TestEntity2(s: String, i: Int, l: Long, o: Option[Int]) case class TestEntity3(s: String, i: Int, l: Long, o: Option[Int]) case cla...
mentegy/quill
quill-core/src/test/scala/io/getquill/TestEntities.scala
Scala
apache-2.0
676
object LongCalls { def foo(x: String => String) = x("45") foo(/*start*/_.substring(1).concat("556")/*end*/) } //String => String
jastice/intellij-scala
scala/scala-impl/testdata/typeInference/expected/placeholder/LongCalls.scala
Scala
apache-2.0
133
/* * 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 ...
jinglining/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/stream/sql/MiniBatchIntervalInferTest.scala
Scala
apache-2.0
14,382
package cz.jenda.pidifrky.ui import android.os.Bundle import cz.jenda.pidifrky.R import cz.jenda.pidifrky.logic.DebugReporter import cz.jenda.pidifrky.ui.api.{BasicTabActivity, ExceptionHandler, NavigationDrawer, TabFragment} import cz.jenda.pidifrky.ui.fragments.{CardsAllListFragment, CardsNearestListFragment, Mercha...
jendakol/pidifrky
client/src/main/scala/cz/jenda/pidifrky/ui/ListActivity.scala
Scala
apache-2.0
1,349
package com.ing.bakery.baker import scala.concurrent.Future object BakerReadinessCheck { var ready: Boolean = false def enable(): Unit = { BakerReadinessCheck.ready = true } } class BakerReadinessCheck extends (() => Future[Boolean]) { override def apply(): Future[Boolean] = Future.successful(BakerReadinessChe...
ing-bank/baker
bakery/state/src/main/scala/com/ing/bakery/baker/BakerReadinessCheck.scala
Scala
mit
332
/* * 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 ...
helena/spark-cassandra
project/Publish.scala
Scala
apache-2.0
1,930
package com.github.kickshare.indexer.es.exception /** * Throws when batch fails for any reason. * @param msg describing error. */ class IndexingFailedException(msg: String) extends Exception(msg)
kucera-jan-cz/kickshare
kickshare-tools/data-indexer/src/main/scala/com/github/kickshare/indexer/es/exception/IndexingFailedException.scala
Scala
apache-2.0
200
/* * Copyright (c) 2014-2016 * nonblocking.at gmbh [http://www.nonblocking.at] * * This file is part of Cliwix. * * Cliwix is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the...
nonblocking/cliwix
cliwix-core/src/main/scala/at/nonblocking/cliwix/core/util/LiferayCacheUtil.scala
Scala
agpl-3.0
1,792
/* * Main method */ // Java style object Echo { def main(args: Array[String]): Unit = { args foreach { println _ } } } // Alternative object Echo extends App { for (arg <- args) println(arg) } /* * Assertions. * Assertions are used to document and check design-by-contract style invariants in code. Th...
marconilanna/snippets
snippets.scala
Scala
unlicense
6,835
/* * Copyright © 2017 Full 360 Inc * * 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,...
full360/prometheus_client_scala
client-finatra/src/test/scala/com/full360/prometheus/http/finatra/FinatraSummarySpec.scala
Scala
mit
2,632
/** * Exercise 1: * * Set up a map of prices for a number of gizmos that you covet. Then produce a * second map with the same keys and the prices at a 10 percent discount. * **/ val gizmos = Map("MAC" -> 3500, "iPhone" -> 12345, "SpaceShip" -> 1045600) val discountgizmos = for((k, v) <- gizmos) yield (k, v * 0.9) di...
ragmha/scala-impatient
solutions/maps-and-tuples/ex1.scala
Scala
mit
427
/* * This file is part of Evo2DSim. * * Evo2DSim 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. * * Evo2DSim is distrib...
vchuravy/Evo2DSim
core/src/main/scala/org/vastness/evo2dsim/core/evolution/genomes/EvolutionManager.scala
Scala
mit
1,721
package monocle.state import monocle.Getter import cats.data.Reader trait ReaderGetterSyntax { @deprecated("no replacement", since = "3.0.0-M1") implicit def toReaderGetterOps[S, A](getter: Getter[S, A]): ReaderGetterOps[S, A] = new ReaderGetterOps[S, A](getter) } @deprecated("no replacement", since = "3.0....
julien-truffaut/Monocle
state/src/main/scala/monocle/state/ReaderGetterSyntax.scala
Scala
mit
1,016
package chandu0101.scalajs.facades.examples.pages.components.leaflet import chandu0101.scalajs.facades.examples.pages.common.CodeExample import chandu0101.scalajs.facades.leaflet._ import japgolly.scalajs.react.ReactComponentB import japgolly.scalajs.react.vdom.all._ import scala.scalajs.js import scala.scalajs.js.Dy...
CapeSepias/scalajs-facades
examples/src/main/scala/chandu0101/scalajs/facades/examples/pages/components/leaflet/LGeoJSONStyle.scala
Scala
mit
2,848
// // Taranos Cloud Sonification Framework: Service Core // Copyright (C) 2018 David Hinson, Netrogen Blue LLC (dhinson@netrogenblue.com) // // 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 F...
taranos/taranoscsf-core
src/main/scala/org/taranos/mc/trunk/intraprocess/SignalSink.scala
Scala
agpl-3.0
13,952
package at.droelf.gui.entities case class Email(from: String, text: String)
dr03lf/travel-log
app/at/droelf/gui/entities/ContactEntities.scala
Scala
apache-2.0
77
/* * Copyright 2015 PayPal * * 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 ...
keshin/squbs
squbs-pipeline/src/main/scala/org/squbs/pipeline/PipelineProcessorActor.scala
Scala
apache-2.0
6,956
import sbt._ object Resolvers { val list = Seq( Resolver.mavenLocal, Resolver.sonatypeRepo("releases"), Resolver.typesafeRepo("releases"), "Spray Repository" at "http://repo.spray.io", Resolver.jcenterRepo, Resolver.sbtPluginRepo("sbt-plugin-releases"), Resolver.bintrayRepo("mingchuno", "...
mavenlink/changestream
project/Resolvers.scala
Scala
mit
387
package epic.ontonotes import epic.framework.Example import epic.trees.{AnnotatedLabel, Tree} /* Copyright 2012 David Hall 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.o...
maxim-rabinovich/epic
src/main/scala/epic/ontonotes/Document.scala
Scala
apache-2.0
1,341
package toolkit import java.io.{File, FileNotFoundException} import org.parboiled2.ParseError import org.scalatest._ import toolkit.exceptions.ExocuteParseError import scala.util.{Failure, Success, Try} /** * Created by #GrowinScala * * Takes two directories: correct and incorrect * correct directory should...
exocute/Toolkit
src/test/scala/toolkit/ParserTest.scala
Scala
bsd-2-clause
6,313
/* * 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 ...
aliyun/aliyun-emapreduce-sdk
emr-tablestore/src/main/scala/org/apache/spark/sql/aliyun/tablestore/TableStoreCatalog.scala
Scala
artistic-2.0
1,850
/* * 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 ...
bowenli86/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/plan/TimeIndicatorConversionTest.scala
Scala
apache-2.0
18,026
//package io.skysail.app.wyt.services // //import io.skysail.repo.orientdb.ScalaDbService //import io.skysail.core.model.ApplicationModel //import io.skysail.app.wyt.repository.WytRepository //import org.json4s.DefaultFormats //import io.skysail.app.wyt.domain.Confirmation //import io.skysail.app.wyt.domain.Turn // //c...
evandor/skysail-notes
skysail.app.wyt/src/io/skysail/app/wyt/services/TurnService.scala
Scala
apache-2.0
1,502
package edu.rice.habanero.benchmarks.count import edu.rice.habanero.actors.{JumiActor, JumiActorState, JumiPool} import edu.rice.habanero.benchmarks.{Benchmark, BenchmarkRunner} /** * * @author <a href="http://shams.web.rice.edu/">Shams Imam</a> (shams@rice.edu) */ object CountingJumiActorBenchmark { def main(a...
shamsmahmood/savina
src/main/scala/edu/rice/habanero/benchmarks/count/CountingJumiActorBenchmark.scala
Scala
gpl-2.0
2,209
/* * 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 ...
trueyao/spark-lever
external/zeromq/src/test/scala/org/apache/spark/streaming/zeromq/ZeroMQStreamSuite.scala
Scala
apache-2.0
2,211
package japgolly.scalajs.react.extra.router import org.scalajs.dom import scalaz.effect.IO import scalaz.{-\/, \/-, \/} import japgolly.scalajs.react.{ReactElement, ReactComponentC, TopNode} /** * DSL for specifying a set of routing rules. */ trait RoutingRules { final type P = this.type final type...
beni55/scalajs-react
extra/src/main/scala/japgolly/scalajs/react/extra/router/RoutingRules.scala
Scala
apache-2.0
6,733
package uk.co.pragmasoft.graphdb.orient.sampledao import com.orientechnologies.orient.core.id.ORID import com.tinkerpop.blueprints.{Direction, TransactionalGraph, Vertex} import uk.co.pragmasoft.graphdb.orient.{OrientDBBasicConversions, OrientGraphMarshaller} object marshallers { implicit object MusicianMarshaller...
galarragas/sgal
sgal-orient/src/test/scala/uk/co/pragmasoft/graphdb/orient/sampledao/marshallers.scala
Scala
apache-2.0
4,477
package com.goticks import akka.actor._ import akka.io.IO import com.typesafe.config.ConfigFactory import spray.can.Http //********** ********** ********** ********** ********** ********** ********** \\\\ object Main extends App { val config = ConfigFactory.load() val host = config.getString("http.host") val por...
mduttaroy-dev/akka-trials-01.idea
src/main/scala/com/goticks/Main.scala
Scala
gpl-2.0
759
package com.rklaehn.abc import algebra.{Eq, Order} import cats.Show import cats.implicits._ import com.rklaehn.sonicreducer.Reducer final class ArrayMultiMap[@sp(ILD) K, @sp(ILD) V] private[abc] ( private[abc] val map: ArrayMap[K, ArraySet[V]]) { def keys: ArraySet[K] = map.keys def entries: Iterator[(K, V)] ...
rklaehn/abc
extras/src/main/scala/com/rklaehn/abc/ArrayMultiMap.scala
Scala
apache-2.0
3,693
/* 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...
twitter/algebird
algebird-core/src/main/scala/com/twitter/algebird/Monoid.scala
Scala
apache-2.0
11,808
package com.sksamuel.elastic4s.searches.aggs import com.sksamuel.elastic4s.searches.aggs.pipeline.PipelineAggregationDefinition import com.sksamuel.exts.OptionImplicits._ case class ReverseNestedAggregationDefinition(name: String, path: Option[String] = None, ...
tyth/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/searches/aggs/ReverseNestedAggregationDefinition.scala
Scala
apache-2.0
1,061
package scala.slick.direct import common._ /* // DOES NOT WORK, because it fetches Ordering[Reversed[T]] for Ordering[T] class ReverseOrder{ type Reversed[T] = T def reversed[T](t:T) : Reversed[T] = t.asInstanceOf[Reversed[T]] implicit def reversedOrdering[T](implicit ordering:Ordering[T]) : Ordering[Reversed[T]...
boldradius/slick
src/main/scala/scala/slick/direct/order.scala
Scala
bsd-2-clause
1,079
package com.jrende.commands import com.jrende.model.TweetManager import com.jrende.view.Renderer case class Next(params: Seq[String]) extends Command() { override def execute(): Unit = { Renderer.renderTweets(TweetManager.getNextPage()) } }
Jrende/Skvitter
src/main/scala/com/jrende/commands/Next.scala
Scala
mit
251
package colossus.extensions.util.bson import java.nio.ByteOrder trait BsonValue extends Writable { implicit val byteOrder = ByteOrder.LITTLE_ENDIAN }
fehmicansaglam/colossus-extensions
mongo/src/main/scala/colossus/extensions/util/bson/BsonValue.scala
Scala
apache-2.0
154
package com.scripts import org.apache.spark.rdd.RDD import org.apache.spark.{SparkConf, SparkContext} object RDDAssignment { def main (args: Array[String]) { import PageCounter._ val conf = new SparkConf().setAppName("Big Apple").setMaster("local[4]") val sc = new SparkContext(conf) // Page Counts RD...
sum-coderepo/spark-scala
src/main/scala/com/scripts/RDDassignment.scala
Scala
apache-2.0
1,536
/* * Copyright 2011-2018 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
wiacekm/gatling
gatling-metrics/src/main/scala/io/gatling/metrics/sender/MetricsSender.scala
Scala
apache-2.0
1,284
package com.bazaarvoice.sswf /** * Marshaller for workflow input. Simply provide the mechanism to serialize and deserialize workflow inputs. * @tparam SSWFInput The JVM object representing your workflow input. */ trait InputParser[SSWFInput] { def serialize(input: SSWFInput): String def deserialize(inputString:...
bazaarvoice/super-simple-workflow
sswf-core/src/main/scala/com/bazaarvoice/sswf/InputParser.scala
Scala
apache-2.0
342
/* * 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
connector/src/main/scala/quasar/qscript/qsu/ReifyBuckets.scala
Scala
apache-2.0
4,391
package io.buoyant.linkerd.protocol.http import com.twitter.finagle.Path import com.twitter.finagle.buoyant.Dst import com.twitter.finagle.http.Request import com.twitter.finagle.util.LoadService import io.buoyant.config.Parser import io.buoyant.linkerd.IdentifierInitializer import io.buoyant.linkerd.protocol.HttpIden...
denverwilliams/linkerd
linkerd/protocol/http/src/test/scala/io/buoyant/linkerd/protocol/http/StaticIdentifierConfigTest.scala
Scala
apache-2.0
1,295
/* * 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/src/test/scala/org/neo4j/cypher/internal/compiler/CypherPreParserTest.scala
Scala
apache-2.0
5,436
package com.sksamuel.scapegoat import org.scalatest.freespec.AnyFreeSpec import org.scalatest.matchers.should.Matchers class ReadmeTest extends AnyFreeSpec with Matchers { val readme = scala.io.Source .fromFile("README.md") .getLines() .toSeq val inspectionNamesAndLevelsFromReadme = re...
sksamuel/scapegoat
src/test/scala/com/sksamuel/scapegoat/ReadmeTest.scala
Scala
apache-2.0
2,149
/* ************************************************************************************* * Copyright 2011-2013 Normation SAS ************************************************************************************* * * This file is part of Rudder. * * Rudder is free software: you can redistribute it and/or modify * it unde...
armeniaca/rudder
rudder-core/src/main/scala/com/normation/rudder/repository/jdbc/WorkflowJdbcRepository.scala
Scala
gpl-3.0
7,871
/* * Copyright (c) 2017 Magomed Abdurakhmanov, Hypertino * 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 com.hypertino.facade.filters.annotated impo...
hypertino/hyperfacade
src/main/scala/com/hypertino/facade/filters/annotated/ExtractItemResponseFilter.scala
Scala
mpl-2.0
1,933
package org.infinispan.spark.test import java.lang.Thread._ import org.apache.spark.streaming.scheduler.{StreamingListener, StreamingListenerReceiverStarted} import org.apache.spark.streaming.{Seconds, StreamingContext} import org.apache.spark.{SparkConf, SparkContext} import org.scalatest.{BeforeAndAfterEach, Suite}...
galderz/infinispan-spark
src/test/scala/org/infinispan/spark/test/SparkStream.scala
Scala
apache-2.0
1,348
package com.maxmouchet.vamk.timetables.parser.timetable.models import org.joda.time.LocalTime case class TimeInterval(startTime: LocalTime, endTime: LocalTime)
OpenLamas/vamk-timetables
lib/scala/src/main/scala/com/maxmouchet/vamk/timetables/parser/timetable/models/TimeInterval.scala
Scala
mit
161
package org.joda.time trait ReadableInterval { def getChronology(): Chronology def getStartMillis(): Long def getStart(): DateTime def getEndMillis(): Long def getEnd(): DateTime def contains(instant: ReadableInstant): Boolean def contains(interval: ReadableInterval): Boolean def overlaps(inter...
mdedetrich/soda-time
shared/src/main/scala/org/joda/time/ReadableInterval.scala
Scala
bsd-2-clause
888
/*********************************************************************** * Copyright (c) 2013-2019 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...
elahrvivaz/geomesa
geomesa-index-api/src/main/scala/org/locationtech/geomesa/index/filters/AgeOffFilter.scala
Scala
apache-2.0
2,249
/* * 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/plan/RexProgramExtractorTest.scala
Scala
apache-2.0
24,575
/* * 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 ...
GJL/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/runtime/batch/table/TableSinkITCase.scala
Scala
apache-2.0
4,060
package edu.gemini.model.p1.targetio.api import edu.gemini.model.p1.immutable.Target import java.io.{InputStream, File} trait TargetReader[+T <: Target] { type TargetResult = Either[ParseError, T] type Result = Either[DataSourceError, List[TargetResult]] def read(file: File): Result def read(is: InputS...
arturog8m/ocs
bundle/edu.gemini.model.p1.targetio/src/main/scala/edu/gemini/model/p1/targetio/api/TargetReader.scala
Scala
bsd-3-clause
369
package es.weso.utils object Boolean { def all(vs: Traversable[Boolean]): Boolean = { vs.fold(true)(_ && _) } def some(vs: Traversable[Boolean]): Boolean = { vs.fold(false)(_ || _) } }
jorgeyp/ShExcala
src/main/scala/es/weso/utils/Boolean.scala
Scala
mit
201
/* * Copyright (c) 2016 by its authors. Some rights reserved. * See the project homepage at: https://sincron.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.apa...
monixio/sincron
sincron-atomic/jvm/src/main/scala/org/sincron/atomic/AtomicDouble.scala
Scala
apache-2.0
3,888
/** * Copyright 2015, deepsense.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
reportlib/src/test/scala/io/deepsense/reportlib/model/TableJsonSpec.scala
Scala
apache-2.0
3,799
package argonaut trait JsonIdentity[J] { val j: J /** * Encode to a JSON value using the given implicit encoder. */ def jencode(implicit e: EncodeJson[J]): Json = e(j) /** * Encode to a JSON value using the given implicit encoder. Alias for `jencode`. */ def asJson(implicit e: EncodeJson[J]): J...
jedws/argonaut
argonaut/src/main/scala/argonaut/JsonIdentity.scala
Scala
bsd-3-clause
937
/** ***************************************************************** * See the NOTICE file distributed with this work for additional * * information regarding Copyright ownership. The author/authors * * license this file to you under the terms of the Apache License, * * Version 2.0 (the "License"); you ma...
reactivecodes/sbt-codes
src/main/scala/codes/reactive/sbt/SbtCodes.scala
Scala
apache-2.0
5,739
def caseClassSequencePattern(value: Any):String = value match { case Numbers(_*, a) => "Last number: "+a }
grzegorzbalcerek/scala-book-examples
examples/PatternsCaseClasses5.scala
Scala
mit
109
package org.jetbrains.plugins.scala package lang package checkers package checkPrivateAccess import java.io.File import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.util.text.StringUtil import com.intellij.openapi.vfs.{CharsetToolkit, LocalFileSystem} import com.intellij.psi.PsiMember import com....
ilinum/intellij-scala
test/org/jetbrains/plugins/scala/lang/checkers/checkPrivateAccess/CheckPrivateAccessTestBase.scala
Scala
apache-2.0
2,584
package com.tribbloids.spookystuff.doc import com.tribbloids.spookystuff.actions._ import com.tribbloids.spookystuff.{dsl, SpookyEnvFixture} import com.tribbloids.spookystuff.testutils.LocalPathDocsFixture import com.tribbloids.spookystuff.utils.serialization.AssertSerializable import org.apache.spark.SparkEnv /** ...
tribbloid/spookystuff
core/src/test/scala/com/tribbloids/spookystuff/doc/TestUnstructured.scala
Scala
apache-2.0
3,693
package me.yingrui.segment.util object CharCheckUtil { def isChinese(c: Char): Boolean = Character.UnicodeBlock.of(c) == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS def isChinese(s: String): Boolean = { s.find(ch => !isChinese(ch)) match { case None => true case _ => false } ...
yingrui/mahjong
lib-segment/src/main/scala/me/yingrui/segment/util/CharCheckUtil.scala
Scala
gpl-3.0
667
package com.temportalist.href.common.inventory import com.temportalist.href.common.tile.TETransmitter import com.temportalist.origin.wrapper.common.inventory.ContainerWrapper import net.minecraft.entity.player.EntityPlayer /** * * * @author TheTemportalist */ class ContainerTransmitter(p: EntityPlayer, te: TETran...
TheTemportalist/href
src/main/scala/com/temportalist/href/common/inventory/ContainerTransmitter.scala
Scala
apache-2.0
595
package scodec package protocols import language.higherKinds import fs2.Stream package object time { /** * A single value in a `TimeSeries`. Provides a timestamp along with either a value of type `A` or * a clock tick (represented by a none). */ type TimeSeriesValue[+A] = TimeStamped[Option[A]] /** ...
scodec/scodec-protocols
src/main/scala/scodec/protocols/time/package.scala
Scala
bsd-3-clause
1,195