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 eu.ace_design.island.arena.exporters
import java.io.{File, PrintWriter}
import java.nio.file.{Files, Paths, StandardCopyOption}
import eu.ace_design.island.game.{ExplorationEvent, Game, GameBoard}
import eu.ace_design.island.map.IslandMap
import eu.ace_design.island.viewer.PoiJSONViewer
import eu.ace_design.i... | ace-design/island | arena/src/main/scala/eu/ace_design/island/arena/exporters/ResultExporters.scala | Scala | lgpl-3.0 | 1,838 |
package de.fosd.typechef.parser.c
import junit.framework.Assert._
import de.fosd.typechef.featureexpr._
import org.junit.{Assert, Test}
import de.fosd.typechef.conditional.Opt
import java.util
import util.Collections
class ConsistencyTest extends TestHelper {
def parseFile(fileName: String, featureModel: FeatureMod... | ckaestne/TypeChef | CParser/src/test/scala/de/fosd/typechef/parser/c/ConsistencyTest.scala | Scala | lgpl-3.0 | 2,550 |
/*
* Copyright 2014-2022 Netflix, 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... | Netflix/atlas | atlas-jmh/src/main/scala/com/netflix/atlas/eval/model/LwcMessagesParse.scala | Scala | apache-2.0 | 2,835 |
package org.au9ustine.puzzles.s99
import org.scalatest.{Matchers, FlatSpec}
/**
* Problem 14 Unit Testing
*
* Created by shaotch on 10/15/15.
*/
class P14$Test extends FlatSpec with Matchers {
"P14.duplicate" should "duplicate the elements of a list" in {
val lst = List('a, 'b, 'c, 'c, 'd)
val expecte... | au9ustine/org.au9ustine.puzzles.s99 | src/test/scala/org/au9ustine/puzzles/s99/P14$Test.scala | Scala | apache-2.0 | 420 |
/*
* 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 ... | MLnick/spark | sql/core/src/test/scala/org/apache/spark/sql/StatisticsCollectionSuite.scala | Scala | apache-2.0 | 12,855 |
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs
// Licence: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.indexer.lucene
import org.apache.lucene.document.Document
trait DocumentRecovery[T] {
def toEntity(d: Document): T
}
| j-mckitrick/ensime-sbt | src/sbt-test/ensime-sbt/ensime-server/core/src/main/scala/org/ensime/indexer/lucene/DocumentRecovery.scala | Scala | apache-2.0 | 269 |
package com.thetestpeople.trt.webdriver.screens
import play.api.test.TestBrowser
import org.openqa.selenium.WebDriver
import com.thetestpeople.trt.webdriver.screens.RichSelenium._
import org.openqa.selenium.By._
import org.openqa.selenium.WebElement
import com.thetestpeople.trt.utils.Utils
import org.openqa.selenium.B... | thetestpeople/trt | test/com/thetestpeople/trt/webdriver/screens/SearchLogsScreen.scala | Scala | mit | 1,627 |
package ee.cone.c4actor.dep
trait DepAskFactoryApp {
def depAskFactory: DepAskFactory
}
| conecenter/c4proto | extra_lib/src/main/scala/ee/cone/c4actor/dep/DepAskFactoryApp.scala | Scala | apache-2.0 | 91 |
package mesosphere.marathon.integration.setup
import java.lang.management.ManagementFactory
import org.eclipse.jetty.server.{ Request, Server }
import org.eclipse.jetty.server.handler.AbstractHandler
import javax.servlet.http.{ HttpServletResponse, HttpServletRequest }
import akka.actor.ActorSystem
import spray.clien... | 14Zen/marathon | src/test/scala/mesosphere/marathon/integration/setup/AppMock.scala | Scala | apache-2.0 | 1,670 |
package fpinscala.errorhandling
import org.scalatest._
import scala.util.Try
class OptionTest extends FlatSpec with Matchers {
"The Option trait" should "apply f if the Option is not None." in {
val someInteger = Some(2)
val someIntegerMultiplyBy2 = someInteger.map(element => element * 2)
someIntegerM... | ardlema/fpinscala | exercises/src/test/scala/fpinscala/errorhandling/OptionTest.scala | Scala | mit | 3,350 |
package com.sopranoworks.bolt
import org.joda.time.DateTime
import org.specs2.mutable.Specification
class TimestampParserTest extends Specification {
"parse timestamp" should {
"normally success" in{
val (tm,n) = TimestampParser("2014-09-27 12:30:00.45 America/Los_Angeles")
tm.getYear must_== 2014... | OsamuTakahashi/bolt | src/test/scala/com/sopranoworks/bolt/TimestampParserTest.scala | Scala | mit | 2,460 |
/*
* Copyright (C) 2005 - 2019 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package global.namespace.truelicense.tests.v2.xml
import global.namespace.truelicense.tests.core.LicenseConsumerPerformance
object V2XmlLicenseConsumerPerformance extends LicenseConsumerPerformance ... | christian-schlichtherle/truelicense | tests/src/test/scala/global/namespace/truelicense/tests/v2/xml/V2XmlLicenseConsumerPerformance.scala | Scala | apache-2.0 | 393 |
package dk.bayes.math.numericops
trait isIdentical[X] {
def apply(x1:X,x2:X,tolerance:Double):Boolean
} | danielkorzekwa/bayes-scala | src/main/scala/dk/bayes/math/numericops/isIdentical.scala | Scala | bsd-2-clause | 107 |
/* - Coeus web framework -------------------------
*
* Licensed under the Apache License, Version 2.0.
*
* Author: Spiros Tzavellas
*/
package com.tzavellas.coeus.util.internal
import org.junit.Test
import org.junit.Assert._
class InterpolatorTest {
import Interpolator._
val args: Seq[String] = Array("email... | sptz45/coeus | src/test/scala/com/tzavellas/coeus/util/internal/InterpolatorTest.scala | Scala | apache-2.0 | 1,477 |
package org.dsa.iot.rx.core
import org.dsa.iot.rx.RxMerger3
/**
* Combines three Observables into a single Observable of Tuple3, emitting a new tuple each time any
* of the sources emits a new item.
*
* @see <a href="http://reactivex.io/documentation/operators/combinelatest.html">ReactiveX operators documentatio... | IOT-DSA/dslink-scala-ignition | src/main/scala/org/dsa/iot/rx/core/CombineLatest3.scala | Scala | apache-2.0 | 784 |
package breeze
package object polynomial extends DensePolynomial {
}
| wavelets/breeze | src/main/scala/breeze/polynomial/package.scala | Scala | apache-2.0 | 70 |
package net.sansa_stack.inference.rules.minimizer
import scala.collection.mutable.{ArrayBuffer, Buffer}
import scalax.collection.Graph
import scalax.collection.edge.LDiEdge
import scala.collection.JavaConverters._
import scala.collection.mutable
import scalax.collection.GraphTraversal.Parameters
import org.apache.jen... | SANSA-Stack/SANSA-RDF | sansa-inference/sansa-inference-common/src/main/scala/net/sansa_stack/inference/rules/minimizer/RuleDependencyGraphMinimizer.scala | Scala | apache-2.0 | 17,686 |
/*
* Copyright 2022 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/help-to-save-frontend | test/uk/gov/hmrc/helptosavefrontend/controllers/ControllerSpecWithGuiceAppPerTest.scala | Scala | apache-2.0 | 2,553 |
package provingground.scalahott
import provingground._
import HoTT._
import spire.implicits._
import spire.math._
import org.scalatest._, flatspec._
import QField.{LocalTyp => Q, Literal => rat, _}
class RationalsSpec extends flatspec.AnyFlatSpec {
val x = "x" :: Q
val y = "y" :: Q
"Rational division" sh... | siddhartha-gadgil/ProvingGround | mantle/src/test/scala/provingground/RationalsSpec.scala | Scala | mit | 706 |
/*
* 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 | core/src/main/scala/org/beangle/webmvc/dispatch/spi.scala | Scala | lgpl-3.0 | 1,245 |
package controllers
import models.User
import models.Subscription
import com.mohiva.play.silhouette.core.{ LogoutEvent, Environment, Silhouette }
import com.mohiva.play.silhouette.contrib.services.CachedCookieAuthenticator
import scala.concurrent.Future
import javax.inject.Inject
import models.daos.ProductDAO
import m... | Wirwing/hello-conekta-play-framework | app/controllers/SubscriptionsController.scala | Scala | mit | 1,794 |
package de.leanovate.swaggercheck.shrinkable
import org.scalacheck.Shrink
import org.scalatest.{MustMatchers, WordSpec}
class CheckJsArraySpec extends WordSpec with MustMatchers {
"JsArray" should {
"shrink without min size" in {
val original = CheckJsArray(None, Seq(
CheckJsInteger(None, None, 10... | leanovate/swagger-check | json-schema-gen/src/test/scala/de/leanovate/swaggercheck/shrinkable/CheckJsArraySpec.scala | Scala | mit | 2,061 |
/*
* 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 | sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveOperatorQueryableSuite.scala | Scala | apache-2.0 | 1,940 |
/*
* 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... | asorianostratio/incubator-toree | kernel/src/main/scala/org/apache/toree/magic/builtin/ShowTypes.scala | Scala | apache-2.0 | 1,695 |
package org.scalaide.refactoring.internal
import java.text.Collator
import java.util.Comparator
import scala.tools.refactoring.implementations
import scala.tools.refactoring.implementations.OrganizeImports.ImportsStrategy
import scala.tools.refactoring.implementations.OrganizeImports.OrganizeImportsConfig
import org... | sschaef/scala-ide | org.scala-ide.sdt.core/src/org/scalaide/refactoring/internal/OrganizeImports.scala | Scala | bsd-3-clause | 12,696 |
package de.tudresden.inf.lat.tabulas.table
import java.util.{Comparator, Objects}
import de.tudresden.inf.lat.tabulas.datatype.{PrimitiveTypeValue, Record}
/** Comparator for records.
*
*/
case class RecordComparator(sortingOrder: Seq[String], fieldsWithReverseOrder: Set[String]) extends Comparator[Record] {
o... | julianmendez/tabulas | tabulas-core/src/main/scala/de/tudresden/inf/lat/tabulas/table/RecordComparator.scala | Scala | apache-2.0 | 1,813 |
package com.codegans.moodmeter.util
import com.codegans.moodmeter.model.{Vote, Presentation, User}
import org.squeryl.Schema
/**
* JavaDoc here
*
* @author Victor Polischuk
* @since 15.03.2015 9:52
*/
object Library extends Schema {
val users = table[User]
val presentations = table[Presentation]
var votes ... | victor-cr/mood-meter | server/src/main/scala/com/codegans/moodmeter/util/Library.scala | Scala | mit | 336 |
/*
* 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 ... | stanzhai/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LocalRelation.scala | Scala | apache-2.0 | 3,500 |
import scala.reflect.classTag
@deprecated("Suppress warnings", since="2.11")
object Test extends App {
println(classManifest[scala.List[_]])
println(classTag[scala.List[_]])
println(classManifest[scala.collection.immutable.List[_]])
println(classTag[scala.collection.immutable.List[_]])
println(classManifest[... | som-snytt/dotty | tests/disabled/reflect/run/t6329_vanilla.scala | Scala | apache-2.0 | 488 |
package com.github.j5ik2o.forseti.infrastructure.util
import scala.concurrent.Future
import scalaz.EitherT
import scalaz.syntax.either._
object EitherTUtil {
def createRightOfEitherT[A <: Throwable, B](value: B): EitherT[Future, A, B] = {
EitherT(Future.successful(value.right[A]))
}
def createLeftOfEither... | j5ik2o/forseti | infrastructure/src/main/scala/com/github/j5ik2o/forseti/infrastructure/util/EitherTUtil.scala | Scala | mit | 573 |
package com.twitter.finagle.exp.swift
import com.twitter.finagle.Service
import com.twitter.finagle.thrift.ThriftClientRequest
import com.twitter.util.{Await, Future}
import org.apache.thrift.protocol._
import org.apache.thrift.transport._
import org.junit.runner.RunWith
import org.mockito.ArgumentCaptor
import org.mo... | LithiumTD/finagle | finagle-swift/src/test/scala/com/twitter/finagle/swift/ProxyTest.scala | Scala | apache-2.0 | 1,864 |
package scoverage
import org.scalatest.BeforeAndAfter
import org.scalatest.OneInstancePerTest
import org.scalatest.funsuite.AnyFunSuite
/** @author Stephen Samuel */
class CoverageTest
extends AnyFunSuite
with BeforeAndAfter
with OneInstancePerTest {
test("coverage for no statements is 1") {
val co... | scoverage/scalac-scoverage-plugin | scalac-scoverage-plugin/src/test/scala/scoverage/CoverageTest.scala | Scala | apache-2.0 | 1,702 |
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs
// License: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.util
import java.io.File
import java.lang.management.ManagementFactory
import scala.concurrent.{ ExecutionContext, Future }
import scala.concurrent.duration._
import com... | pascr/ensime-server | testutil/src/main/scala/org/ensime/util/HeapDumper.scala | Scala | gpl-3.0 | 947 |
package scamr.mapreduce.lambda
import org.apache.hadoop.mapreduce.{JobID, TaskAttemptID, TaskInputOutputContext}
import scamr.mapreduce.CounterUpdater
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.Path
// A wrapper around Hadoop's TaskInputOutputContext that only exposes limited functionalit... | ooyala/scamr | src/main/scala/scamr/mapreduce/lambda/BaseLambdaContext.scala | Scala | apache-2.0 | 1,118 |
package org.brzy.calista.schema
/**
* Document Me..
*
* @author Michael Fortin
*/
class CounterFamily(val name: String) extends Family {
def apply[K](key: K) = new CounterKey(key, this)
override def toString = "CounterFamily(" + name + ")"
}
/**
*
*/
object CounterFamily {
def apply(name: String) = new... | m410/calista | src/main/scala/org/brzy/calista/schema/CounterFamily.scala | Scala | apache-2.0 | 343 |
/*
* 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 ... | ArvinDevel/onlineAggregationOnSparkV2 | sql/core/src/main/scala/org/apache/spark/sql/expressions/WindowSpec.scala | Scala | apache-2.0 | 6,231 |
package es.weso.rdf
import es.weso.rdf.nodes.{ RDFNode, IRI, BNodeId }
import es.weso.rdf.triples.RDFTriple
import scala.collection.Set
import scala.collection.immutable.Map
import es.weso.tgraph.TContext
case class Exists(fn: BNodeId => RDFGraph)(implicit seed: BNodeId) extends RDFGraph {
override def isEmpty = ... | labra/wesin | src/main/scala/es/weso/rdfgraph/Exists.scala | Scala | lgpl-3.0 | 2,001 |
/*
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... | steveloughran/chill | chill-scala/src/main/scala/com/twitter/chill/ObjectSerializer.scala | Scala | apache-2.0 | 1,586 |
/*
* 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 ... | sh-cho/cshSpark | rdd/JdbcRDD.scala | Scala | apache-2.0 | 8,397 |
package objektwerks.cluster
object SeedNode extends Node | objektwerks/akka.cluster | seednode/src/main/scala/objektwerks/cluster/SeedNode.scala | Scala | apache-2.0 | 57 |
package stoner.board
import stoner.board.BoardDimension.STANDARD_BOARD_DIM
object Position {
def labelClassToPos(label : Double, boardDim : BoardDimension) = {
val p = label.toInt
val c = p / boardDim.row
val r = p - c*boardDim.row
Position(c,r)
}
}
case class Position(column : Int, row... | RJRyV/stoner | src/main/scala/stoner/board/Position.scala | Scala | gpl-3.0 | 506 |
/*
* Copyright (C) 2012 Pavel Fatin <http://pavelfatin.com>
*
* 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.
*
... | pavelfatin/toyfs | src/main/scala/com/pavelfatin/fs/File.scala | Scala | gpl-3.0 | 1,888 |
object A {
opaque type T33 = Int
object T33 {
val a = new Array[T33](3)
}
} | lampepfl/dotty | tests/pos/i6286.scala | Scala | apache-2.0 | 85 |
/*
* Copyright (c) 2014-2018 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache... | Wogan/monix | monix-execution/shared/src/test/scala/monix/execution/schedulers/TracingSchedulerSuite.scala | Scala | apache-2.0 | 5,256 |
package scala.lms
package common
import java.io.PrintWriter
import scala.lms.internal.GenericNestedCodegen
import collection.mutable.ArrayBuffer
import scala.reflect.SourceContext
trait SynchronizedArrayBufferOps extends ArrayBufferOps {
/*
object SynchronizedArrayBuffer {
def apply[A:Manifest](xs: Rep[A]*)(im... | scalan/virtualization-lms-core | src/common/SynchronizedArrayBufferOps.scala | Scala | bsd-3-clause | 2,051 |
/*
* Copyright 2001-2006 Stephen Colebourne
*
* 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... | aparo/scalajs-joda | src/main/scala/org/joda/time/Interval.scala | Scala | apache-2.0 | 18,671 |
package com.rocketfuel.sdbc.base
import cats.effect.Async
import fs2.Stream
import scala.collection.{AbstractIterator, GenTraversableOnce}
/**
* `CloseableIterator` has a similar interface to scala.collection.Iterator,
* but also is Closeable, and combinators return CloseableIterators.
*
* The iterator will close... | rocketfuel/sdbc | base/src/main/scala-2.1x/com/rocketfuel/sdbc/base/CloseableIterator.scala | Scala | bsd-3-clause | 8,759 |
package com.sksamuel.elastic4s.search
import com.sksamuel.elastic4s.ElasticsearchClientUri
import com.sksamuel.elastic4s.http.{ElasticDsl, HttpClient}
import com.sksamuel.elastic4s.testkit.SharedElasticSugar
import org.elasticsearch.action.support.WriteRequest.RefreshPolicy
import org.scalatest.{FlatSpec, Matchers}
c... | aroundus-inc/elastic4s | elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/search/MatchQueryTest.scala | Scala | apache-2.0 | 1,063 |
package controllers
import play.api.mvc.Controller
import uk.gov.dvla.vehicles.presentation.common.LogFormats.DVLALogger
trait BusinessController extends Controller with DVLALogger {
protected implicit val isPrivateKeeper = false
protected implicit val AllCacheKeys = models.AllCacheKeys
protected implicit val... | dvla/vehicles-online | app/controllers/BusinessController.scala | Scala | mit | 441 |
package org.jetbrains.plugins.scala
package lang.parser.parsing
import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes
import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder
import org.jetbrains.plugins.scala.lang.parser.parsing.expressions.BlockExpr
import org.jetbrains.plugins.scala.la... | JetBrains/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/parser/parsing/CommonUtils.scala | Scala | apache-2.0 | 4,553 |
package com.typesafe.slick.testkit.tests
import scala.language.higherKinds
import com.typesafe.slick.testkit.util.{JdbcTestDB, AsyncTest}
class MainTest extends AsyncTest[JdbcTestDB] { mainTest =>
import tdb.profile.api._
case class User(id: Int, first: String, last: String)
class Users(tag: Tag) extends Tabl... | slick/slick | slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/MainTest.scala | Scala | bsd-2-clause | 8,692 |
package codesniffer.codefunnel.utils
import javax.sql.DataSource
import com.caibowen.gplume.resource.ClassLoaderInputStreamProvider
import gplume.scala.context.{AppContext}
import gplume.scala.jdbc.DB
/**
* Created by Bowen Cai on 2/24/2016.
*/
object DBUtils {
def quote(param: String): String = ... | xkommando/CodeSniffer | codefunnel/src/main/scala/codesniffer/codefunnel/utils/DBUtils.scala | Scala | lgpl-3.0 | 659 |
package notebook
import java.util.concurrent.ConcurrentHashMap
import scala.collection.JavaConverters._
import scala.concurrent._
import scala.concurrent.duration._
import akka.actor._
import akka.actor.Deploy
import com.typesafe.config.Config
import kernel.remote.{RemoteActorSystem, RemoteActorProcess}
/**
* A ... | vitan/spark-notebook | modules/subprocess/src/main/scala/notebook/Kernel.scala | Scala | apache-2.0 | 1,967 |
package org.workcraft.gui.propertyeditor.colour
import java.awt.Color
import org.workcraft.gui.propertyeditor.EditableProperty
import org.workcraft.scala.Expressions._
object ColorProperty {
def create(name: String, property: ModifiableExpression[Color]): Expression[EditableProperty] = property.map(value => {
... | tuura/workcraft-2.2 | Gui/src/main/scala/org/workcraft/gui/propertyeditor/colour/ColorProperty.scala | Scala | gpl-3.0 | 417 |
/*
* 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 ... | Panos-Bletsos/spark-cost-model-optimizer | mllib/src/main/scala/org/apache/spark/mllib/clustering/LDAModel.scala | Scala | apache-2.0 | 39,428 |
/*
* 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 ... | maropu/spark | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/SimplifyConditionalsInPredicateSuite.scala | Scala | apache-2.0 | 10,608 |
/*
active-learning-scala: Active Learning library for Scala
Copyright (c) 2014 Davi Pereira dos Santos
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
... | active-learning/active-learning-scala | src/main/scala/al/strategies/Entropy.scala | Scala | gpl-2.0 | 1,257 |
/*
* 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 ... | hequn8128/flink | flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/table/AggregateITCase.scala | Scala | apache-2.0 | 12,874 |
/*
* Copyright 2011-2022 GatlingCorp (https://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... | gatling/gatling | gatling-charts/src/main/scala/io/gatling/charts/stats/ResultsHolder.scala | Scala | apache-2.0 | 2,525 |
/**
* This file is part of agora-board.
* Copyright (C) 2016 Agora Voting SL <agora@agoravoting.com>
* agora-board 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.... | agoravoting/agora-board | app/models/Backend.scala | Scala | agpl-3.0 | 1,513 |
/*
* 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 ... | mahak/spark | sql/core/src/test/scala/org/apache/spark/sql/DatasetSerializerRegistratorSuite.scala | Scala | apache-2.0 | 2,358 |
package quisp.highcharts
import quisp._
import quisp.enums.HcSeriesType
import spray.json.{JsValue, JsonWriter}
import java.awt.Color
import javax.jws.WebMethod
/**
* Generic chart configuration
* @author rodneykinney
*/
case class Chart(
chart: ChartOptions = ChartOptions(),
colors: Seq[Color] = null,
... | rodneykinney/quisp | src/main/scala/quisp/highcharts/Chart.scala | Scala | apache-2.0 | 5,230 |
/*
* 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... | keithhall/ct-calculations | src/main/scala/uk/gov/hmrc/ct/computations/CP87Input.scala | Scala | apache-2.0 | 931 |
/*
* This file is part of Apparat.
*
* Copyright (C) 2010 Joa Ebert
* http://www.joa-ebert.com/
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the Lice... | joa/apparat | apparat-core/src/main/scala/apparat/tools/reducer/Reducer.scala | Scala | lgpl-2.1 | 10,430 |
/*
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... | tglstory/scalding | scalding-core/src/main/scala/com/twitter/scalding/FileSource.scala | Scala | apache-2.0 | 19,768 |
/*
* 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 | examples/src/main/scala/org/scalatest/examples/fixture/funspec/sharing/ExampleSpec.scala | Scala | apache-2.0 | 2,258 |
/* Copyright 2012 Typesafe (http://www.typesafe.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | spray/twirl | twirl-compiler/src/test/scala/twirl/compiler/TemplateUtilsSpec.scala | Scala | apache-2.0 | 2,729 |
package org.genivi.sota.http
import akka.http.scaladsl.model.headers.OAuth2BearerToken
import akka.http.scaladsl.server.{AuthorizationFailedRejection, Directive0, Directive1, Directives, Rejection}
import akka.http.scaladsl.server.Directives._
import cats.data.Xor
import com.advancedtelematic.akka.http.jwt.InvalidScop... | PDXostc/rvi_sota_server | common/src/main/scala/org/genivi/sota/http/AuthNamespaceDirectives.scala | Scala | mpl-2.0 | 4,362 |
/*
* Copyright (c) 2013 University of Massachusetts Amherst
* Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*/
package edu.umass.cs.iesl.bibmogrify.reader
import edu.umass.cs.iesl.scalacommons.DateUtils._
import edu.umass.cs.iesl.bibmogrify.model._
import edu.umass.c... | iesl/bibmogrify | src/main/scala/edu/umass/cs/iesl/bibmogrify/reader/PatentST36Reader.scala | Scala | apache-2.0 | 19,281 |
// Copyright 2014,2015,2016,2017,2018,2019,2020 Commonwealth Bank of Australia
//
// 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
//
// Unles... | CommBank/grimlock | grimlock-examples/src/main/scala/commbank/grimlock/scalding/MutualInformation.scala | Scala | apache-2.0 | 5,148 |
/* __ *\\
** ________ ___ / / ___ __ ____ Scala.js sbt plugin **
** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ **
** /____/\\___/... | swhgoon/scala-js | sbt-plugin/src/main/scala/scala/scalajs/sbtplugin/testing/Events.scala | Scala | bsd-3-clause | 1,466 |
package model.auth
import be.objectify.deadbolt.scala.models.{Permission, Role, Subject}
case class Student(identifier: String, authToken: String) extends Subject {
val roles: List[Role] = List(StudentRole)
val permissions: List[Permission] = List(StudentPermission)
}
object StudentRole extends Role {
val nam... | BandOf3/assignment-system-web | app/model/auth/Student.scala | Scala | mit | 425 |
// Copyright (C) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in project root for information.
package com.microsoft.ml.spark
import com.microsoft.ml.spark.ColumnOptions.ColumnOptions
import com.microsoft.ml.spark.DataOptions.DataOptions
import org.apache.spark.mllib.rand... | rastala/mmlspark | src/core/test/datagen/src/main/scala/GenerateRow.scala | Scala | mit | 2,275 |
////////////////////////////////////////////////////////////////////////////////
// //
// OpenSolid is a generic library for the representation and manipulation //
// of geometric objects such as points, curves, surfaces, and volumes. ... | ianmackenzie/opensolid-core | src/test/scala/org/opensolid/core/VectorBox2dGenerators.scala | Scala | mpl-2.0 | 1,778 |
package avrohugger
package format
package standard
import treehugger.forest._
import definitions._
import treehuggerDSL._
import org.apache.avro.Schema
import scala.collection.JavaConversions._
object StandardObjectTree {
def toObjectDef(
classStore: ClassStore,
schema: Schema) = {
// register new ... | ppearcy/avrohugger | avrohugger-core/src/main/scala/format/standard/StandardObjectTree.scala | Scala | apache-2.0 | 635 |
package org.embulk.parser.firebase_avro.define.root.user_dim.user_properties.value
case class Value(string_value: Option[String] = None,
int_value: Option[Long] = None,
float_value: Option[Double] = None,
double_value: Option[Double] = None)
| smdmts/embulk-parser-firebase_avro | src/main/scala/org/embulk/parser/firebase_avro/define/root/user_dim/user_properties/value/Value.scala | Scala | mit | 294 |
package wakfutcp.client.util
import java.net.{InetAddress, InetSocketAddress}
import java.security.KeyFactory
import java.security.spec.X509EncodedKeySpec
import javax.crypto.Cipher
import akka.actor.typed.scaladsl._
import akka.actor.typed.{ActorRef, Behavior, Terminated}
import akka.actor.{ActorSystem, PoisonPill}
... | OpenWakfu/wakfutcp | protocol/src/main/scala/wakfutcp/client/util/GameSession.scala | Scala | mit | 6,619 |
package ssscs
import java.util.Date
case class ArticleInfo(url: String, title: String, date: Date)
| raincole/ssscs | src/main/scala/ssscs/ArticleInfo.scala | Scala | mit | 101 |
package org.jetbrains.plugins.scala.caches.stats
trait TrackedCacheType {
type Cache
def id: String
def name: String
def alwaysTrack: Boolean
def capabilities: CacheCapabilities[Cache]
def tracked: collection.Seq[Cache]
def cachedEntityCount: Int
def clear(): Unit
}
| JetBrains/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/caches/stats/TrackedCacheType.scala | Scala | apache-2.0 | 285 |
/*
* 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/commons | text/src/main/scala/org/beangle/commons/text/inflector/RuleBasedPluralizer.scala | Scala | lgpl-3.0 | 4,564 |
/**
* 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 not... | samaitra/kafka | core/src/test/scala/integration/kafka/api/SaslTestHarness.scala | Scala | apache-2.0 | 1,210 |
package fpinscala.parallelism
import java.util.concurrent.atomic.AtomicInteger
import java.util.concurrent.{ExecutorService, Executors, ThreadFactory, Future => JFuture}
import org.scalatest.concurrent.{Eventually, ScalaFutures}
import org.scalatest.prop.PropertyChecks
import org.scalatest.{BeforeAndAfter, EitherValu... | benen/fpinscala | exercises/src/test/scala/fpinscala/parallelism/NonBlockingParSpec.scala | Scala | mit | 1,566 |
/*
* 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 ... | manuzhang/incubator-gearpump | experiments/akkastream/src/main/scala/org/apache/gearpump/akkastream/task/Zip2Task.scala | Scala | apache-2.0 | 1,955 |
/*
* Copyright 2015 LG CNS.
*
* 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 t... | jw0201/scouter | scouter.server/src/scouter/server/account/AccountFileHandler.scala | Scala | apache-2.0 | 4,646 |
/**
Scalding with Avro (and Json) tutorial part 0.
To run this job:
yarn jar target/scalding-tutorial-0.14.0.jar AvroTutorial0 --local --avro --json
Check the output:
java -jar avro-tools-1.7.6.jar tojson tutorial/data/avrooutput0.avro
**/
import com.twitter.scalding.{Job, Args, JsonLine}
import com.twitter.sc... | Cascading/scalding-tutorial | src/main/scala/tutorial/AvroTutorial0.scala | Scala | apache-2.0 | 780 |
/**
* Copyright 2015 Thomson Reuters
*
* 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... | nruppin/CM-Well | server/cmwell-domain/src/test/scala/InfotonSerializerSpec.scala | Scala | apache-2.0 | 12,941 |
/*
* 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-core/src/test/scala/com/full360/prometheus/BaseSpec.scala | Scala | mit | 1,613 |
package scalaz.contrib
package nscala_time
import scalaz._
import scalaz.syntax.enum._
import org.joda.time._
trait Instances {
private def orderFromInt[A](f: (A, A) => Int): Order[A] = new Order[A] {
def order(x: A, y: A) = Ordering.fromInt(f(x, y))
}
implicit val durationInstance = new Monoid[Duration] ... | typelevel/scalaz-contrib | nscala-time/main/scala/instances.scala | Scala | mit | 3,865 |
package com.clarifi.reporting
/** A G-algebra for "running" a value in G
* where G is usually some monad.
*
* @note identity law: run(fa) == run(run(fa).point[G]) | Applicative[G]
* @note distributive law: run(f)(run(fa)) == run(fa <*> f) | Apply[G]
*/
trait Run[G[_]] {
def run[A](a: G[A]): A
}
| ermine-language/ermine-legacy | src/main/scala/com/clarifi/reporting/Run.scala | Scala | bsd-2-clause | 309 |
/* Copyright (C) 2008-2016 University of Massachusetts Amherst.
This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible)
http://factorie.cs.umass.edu, http://github.com/factorie
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with... | melisabok/factorie | src/main/scala/cc/factorie/app/nlp/lemma/Lemmatizer.scala | Scala | apache-2.0 | 931 |
/*
* Scala.js (https://www.scala-js.org/)
*
* Copyright EPFL.
*
* Licensed under Apache License 2.0
* (https://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package org.scalajs.testsuite.scalalib
import... | scala-js/scala-js | test-suite/shared/src/test/scala/org/scalajs/testsuite/scalalib/RangesTest.scala | Scala | apache-2.0 | 3,668 |
/*
* 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... | SRGOM/scalatest | scalatest-test/src/test/scala/org/scalatest/ParallelTestExecutionTestTimeoutExamples.scala | Scala | apache-2.0 | 24,200 |
package scaldi
import org.scalatest.{Matchers, WordSpec}
import java.text.{DateFormat, SimpleDateFormat}
class IdentifierSpec extends WordSpec with Matchers {
"Identifier" when {
"defaults are used" should {
"be converted from string" in {
getId("str") should equal (StringIdentifier("str"... | Mironor/scaldi | src/test/scala/scaldi/IdentifierSpec.scala | Scala | apache-2.0 | 1,497 |
package unfiltered.netty.async
import unfiltered.netty.{ async, ReceivedMessage, RequestBinding, ServerErrorResponse }
import unfiltered.netty.request.{ AbstractMultiPartDecoder, Decode, Helpers, MultiPartBinding, MultiPartCallback, MultiPartPass, TidyExceptionHandler }
import unfiltered.request.HttpRequest
import unf... | beni55/unfiltered | netty-uploads/src/main/scala/request/async/plans.scala | Scala | mit | 3,464 |
/*
* 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 ... | pferrel/PredictionIO | examples/experimental/scala-parallel-similarproduct-localmodel/src/main/scala/Preparator.scala | Scala | apache-2.0 | 1,436 |
// code-examples/AppDesign/enumerations/http-case-script.scala
sealed abstract class HttpMethod(val id: Int) {
def name = getClass getSimpleName
override def toString = name
}
case object Connect extends HttpMethod(0)
case object Delete extends HttpMethod(1)
case object Get extends HttpMethod(2)
case object ... | XClouded/t4f-core | scala/src/tmp/AppDesign/enumerations/http-case-script.scala | Scala | apache-2.0 | 1,096 |
import org.apache.jena.rdf.model.ResourceFactory
/**
* @author jiemakel
*
*/
object CIDOC {
val ns = "http://www.cidoc-crm.org/cidoc-crm/"
def R(s: String) = ResourceFactory.createResource(ns+s)
def P(s: String) = ResourceFactory.createProperty(ns+s)
val CRM_Entity = R("E1_CRM_Entity")
val Temporal_Entity = ... | jiemakel/anything2rdf | src/main/scala/CIDOC.scala | Scala | mit | 16,883 |
/*
* 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/hive/src/test/scala/org/apache/spark/sql/hive/client/FiltersSuite.scala | Scala | apache-2.0 | 3,967 |
/*
* 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 ... | publicRoman/spark | resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/backend/IntegrationTestBackend.scala | Scala | apache-2.0 | 1,612 |
package com.twitter.util.security
import java.security.Principal
import java.security.cert.Certificate
import javax.net.ssl.{SSLSession, SSLSessionContext}
import javax.security.cert.X509Certificate
/**
* Represents a non-existent secure relationship between two entities, i.e.
* a non-existent `SSLSession`.
*/
obj... | twitter/util | util-security/src/main/scala/com/twitter/util/security/NullSslSession.scala | Scala | apache-2.0 | 1,272 |
Subsets and Splits
Filtered Scala Code Snippets
The query filters and retrieves a sample of code snippets that meet specific criteria, providing a basic overview of the dataset's content without revealing deeper insights.