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 jigg.pipeline /* Copyright 2013-2015 Takafumi Sakakibara and Hiroshi Noji Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requi...
tomeken-yoshinaga/jigg
src/main/scala/jigg/pipeline/JumanAnnotator.scala
Scala
apache-2.0
5,496
/*********************************************************************** * 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-arrow/geomesa-arrow-gt/src/main/scala/org/locationtech/geomesa/arrow/io/records/RecordBatchLoader.scala
Scala
apache-2.0
2,067
class AddNewClause { def foo(b: Boolean)(x: Int, y: Int) = {} foo(true)(1, 0) this.foo(true)(1, 0) } class AddNewClause2 extends AddNewClause { override def foo(b: Boolean)(x: Int, y: Int): Unit = { super.foo(true)(x, 0) } }
triggerNZ/intellij-scala
testdata/changeSignature/fromScala/AddNewClause_after.scala
Scala
apache-2.0
240
package fpinscala.answers.parsing import SliceableTypes._ import scala.util.matching.Regex /* This implementation is a bit trickier than the one in `Reference.scala`. The main change is to add another piece of state to `ParseState`, an `isSliced` flag, and an additional `Slice` constructor to `Result`. If the `isSlic...
peterbecich/fpinscala
answers/src/main/scala/fpinscala/parsing/instances/Sliceable.scala
Scala
mit
9,959
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
michalsenkyr/spark
mllib/src/main/scala/org/apache/spark/ml/r/AFTSurvivalRegressionWrapper.scala
Scala
apache-2.0
5,549
package lila import play.api.i18n.Lang package object i18n extends PackageObject { type Count = Int type MessageKey = String private[i18n] type MessageMap = java.util.Map[MessageKey, Translation] private[i18n] type Messages = Map[Lang, MessageMap] private[i18n] def logger = lila.log("i18n") pri...
luanlv/lila
modules/i18n/src/main/package.scala
Scala
mit
567
package dispatch /** Trust all TLS certs */ trait HttpsLeniency { self: BlockingHttp => import java.net.Socket import javax.net.ssl.{X509TrustManager, SSLContext} import java.security.KeyStore import java.security.cert.X509Certificate import org.apache.http.conn.scheme.Scheme import org.apache.http.conn.ss...
cmc333333/Databinder-Dispatch
http/src/main/scala/https.scala
Scala
lgpl-2.1
1,038
package com.lightning.walletapp.lnutils import spray.json._ import com.lightning.walletapp._ import com.lightning.walletapp.ln._ import com.lightning.walletapp.ln.wire._ import com.lightning.walletapp.ln.Scripts._ import com.lightning.walletapp.lnutils.olympus._ import com.lightning.walletapp.lnutils.olympus.OlympusWr...
btcontract/lnwallet
app/src/main/java/com/lightning/walletapp/lnutils/ImplicitJsonFormats.scala
Scala
apache-2.0
22,115
import sbt._ import sbt.Keys._ import io.github.chikei.sbt.onelog.OneLogKeys._ object Build extends sbt.Build { val commonSettings = Defaults.defaultSettings ++ Seq( scalaVersion := "2.10.3" ,version := "0.1" ) lazy val root = Project( id = "multi", base = file("."), settings = common...
chikei/sbt-one-log
src/sbt-test/sbt-one-log/multi/project/Build.scala
Scala
apache-2.0
1,451
package com.github.mdr.mash.repl.completions import com.github.mdr.mash.completions.CompletionResult import com.github.mdr.mash.input.InputAction import com.github.mdr.mash.repl.NormalActions._ import com.github.mdr.mash.repl.{ LineBuffer, Repl } import com.github.mdr.mash.utils.Region trait IncrementalCompletionActi...
mdr/mash
src/main/scala/com/github/mdr/mash/repl/completions/IncrementalCompletionActionHandler.scala
Scala
mit
4,102
package postgresweb.routes import japgolly.scalajs.react.extra.router.{Resolution, RouterConfigDsl, RouterCtl, _} import japgolly.scalajs.react.vdom.prefix_<^._ import postgresweb.css.CommonStyles import postgresweb.models.Menu object AppRouter { sealed trait AppPage case class Items(p : FormContainer) extends ...
minettiandrea/postgres-web
src/main/scala/postgresweb/routes/AppRouter.scala
Scala
apache-2.0
891
package org.camunda.feel.impl.builtin import org.camunda.feel.impl.FeelIntegrationTest import org.camunda.feel.syntaxtree.{ValBoolean, ValNull} import org.scalatest.matchers.should.Matchers import org.scalatest.flatspec.AnyFlatSpec class BuiltinRangeFunctionTest extends AnyFlatSpec with Matchers with Feel...
camunda/feel-scala
src/test/scala/org/camunda/feel/impl/builtin/BuiltinRangeFunctionTest.scala
Scala
apache-2.0
25,651
package net.nomadicalien.ch10 object Monoids { trait Monoid[A] { def op(a1: A, a2: A): A def zero: A } /** * EXERCISE 10.7 */ def foldMapV[A,B](v: IndexedSeq[A], m: Monoid[B])(f: A => B): B = { if(v.isEmpty) { m.zero } else if(v.size == 1) { f(v(0)) } else { val...
BusyByte/func-prog-scala
exercises-and-notes/src/main/scala/net/nomadicalien/ch10/Monoids.scala
Scala
apache-2.0
2,406
package com.twitter.concurrent import com.twitter.io.{Buf, Pipe} import com.twitter.util.{Await, Future, StdBenchAnnotations} import org.openjdk.jmh.annotations.{Benchmark, Param, Scope, State} /** * These benchmarks measure the overhead of various implementations of a * conduit between a `source: () => Future[Buf]...
twitter/util
util-benchmark/src/main/scala/com/twitter/concurrent/ConduitSpscBenchmark.scala
Scala
apache-2.0
4,238
package de.htwg.zeta.parser.shape.check import de.htwg.zeta.parser.check.ErrorCheck import de.htwg.zeta.parser.check.ErrorCheck.ErrorMessage import de.htwg.zeta.parser.check.FindDuplicates import de.htwg.zeta.parser.shape.parsetree.ShapeParseTree case class CheckDuplicateShapes(shapeParseTrees: List[ShapeParseTree]) ...
Zeta-Project/zeta
api/parser/src/main/scala/de/htwg/zeta/parser/shape/check/CheckDuplicateShapes.scala
Scala
bsd-2-clause
650
class Foo1[+T] { private[this] type MyType = T } class Foo2[+T] { protected[this] type MyType = T }
yusuke2255/dotty
tests/pos/variances-local.scala
Scala
bsd-3-clause
105
/* * Copyright (c) 2015 Lucas Satabin * * 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 writi...
satabin/toolxit-ng
eyes/src/main/scala/toolxit/eyes/TeXEyes.scala
Scala
apache-2.0
7,110
package domala.internal.reflect.util import java.math.BigInteger import java.sql.{Blob, Clob, NClob, SQLXML, Time, Timestamp} import java.time.{LocalDate, LocalDateTime, LocalTime} import domala.jdbc.`type`.TypeConverter object ClassTypeConverter extends TypeConverter { type T = Class[_] override def hasParam(...
bakenezumi/domala
core/src/main/scala/domala/internal/reflect/util/ClassTypeConverter.scala
Scala
apache-2.0
4,655
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
nagavallia/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/data/AccumuloFeature.scala
Scala
apache-2.0
8,233
/* * 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/pbik-frontend
test/controllers/HomePageControllerSpec.scala
Scala
apache-2.0
5,279
package doobie.util import shapeless._, shapeless.test._, shapeless.record._ import doobie.imports._ import org.specs2.mutable.Specification object compositespec extends Specification { case class Woozle(a: (String, Int), b: Int :: String :: HNil, c: Boolean) case class LenStr1(n: Int, s: String) case class ...
jamescway/doobie
core/src/test/scala/doobie/util/composite.scala
Scala
mit
1,354
package sbtdocker import sbt.Logger import sys.process.{Process, ProcessLogger} object DockerTag { def apply(id: ImageId, name: ImageName, dockerPath: String, log: Logger): Unit = { val processLogger = ProcessLogger( { line => log.info(line) }, { line => log.info(line) ...
marcuslonnberg/sbt-docker
src/main/scala/sbtdocker/DockerTag.scala
Scala
mit
585
package de.qualitune.ast /** * Classes representing all method like objects in the CPSText language. * This are role behaviors and operations. * * User: Max Leuthaeuser * Date: 06.05.12 */ package object callable
max-leuthaeuser/CPSTextInterpreter
src/main/scala/de/qualitune/ast/callable/package.scala
Scala
gpl-3.0
230
package almond.interpreter.messagehandlers import almond.channels.Channel import almond.interpreter.comm.CommTargetManager import almond.logger.LoggerContext import almond.protocol.{Comm, CommInfo} import cats.effect.IO import scala.concurrent.ExecutionContext import almond.protocol.RawJson final case class CommMess...
alexarchambault/jupyter-scala
modules/shared/interpreter/src/main/scala/almond/interpreter/messagehandlers/CommMessageHandlers.scala
Scala
apache-2.0
2,520
package collins.solr /** * needs some work, currently only a few tests use this. */ object CollinsQueryDSL { class CollinsQueryString(val s: String) { lazy val query: CQLQuery = CollinsQueryParser(List(AssetDocType, AssetLogDocType)).parseQuery(s).fold( err => throw new Exception("CQL error: " + err), ...
Shopify/collins
app/collins/solr/CollinsQueryDSL.scala
Scala
apache-2.0
1,409
/* * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ import sbt._ import Keys._ object ApplicationBuild extends Build { val appName = "play-position-mapper" val appVersion = "1.0-SNAPSHOT" val bufferLogger = new AbstractLogger { @volatile var messages = List.empty[String] def getLe...
jyotikamboj/container
pf-framework/src/sbt-plugin/src/sbt-test/play-sbt-plugin/play-position-mapper/project/Build.scala
Scala
mit
1,947
package com.typesafe.sbt.packager.linux import sbt._ trait LinuxMappingDSL { /** DSL for packaging files into .deb */ def packageMapping(files: (File, String)*) = LinuxPackageMapping(files) /** * @param dir - use some directory, e.g. target.value * @param files */ def packageTemplateMapping(file...
fsat/sbt-native-packager
src/main/scala/com/typesafe/sbt/packager/linux/LinuxMappingDSL.scala
Scala
bsd-2-clause
1,726
package com.airbnb.aerosolve.training import java.io.{StringReader, BufferedWriter, BufferedReader, StringWriter} import java.util import com.airbnb.aerosolve.core.models.ModelFactory import com.airbnb.aerosolve.core.util.Util import com.airbnb.aerosolve.core.{Example, FeatureVector} import com.typesafe.config.{Confi...
airbnb/aerosolve
training/src/test/scala/com/airbnb/aerosolve/training/MaxoutTrainerTest.scala
Scala
apache-2.0
3,670
package io.protoless.fields import scala.annotation.implicitNotFound import scala.collection.mutable import scala.collection.generic.CanBuildFrom import scala.reflect.ClassTag import scala.util.{Failure, Success, Try} import com.google.protobuf.{ByteString, WireFormat, CodedInputStream => CIS} import com.google.proto...
julien-lafont/protoless
modules/core/src/main/scala/io/protoless/fields/FieldDecoder.scala
Scala
apache-2.0
16,799
package org.openurp.edu.eams.teach.program.share.web.action import java.util.Date import org.apache.struts2.ServletActionContext import org.beangle.commons.collection.Order import org.beangle.commons.dao.query.builder.Condition import org.beangle.data.jpa.dao.OqlBuilder import org.beangle.data.model.Entity import ...
openurp/edu-eams-webapp
plan/src/main/scala/org/openurp/edu/eams/teach/program/share/web/action/SharePlanAction.scala
Scala
gpl-3.0
7,308
import plugin._ import util._ import java.util.Date import java.io.File import org.eclipse.jgit.api.Git import org.eclipse.jgit.lib._ import org.eclipse.jgit.dircache.DirCache import model.Account val pluginDef = ScalaPlugin.define(id, version, author, url, description) val GistRepoDir = s"${Directory.GitBucketHome}/...
wnoguchi/gitbucket_plugins
gist/plugin.scala
Scala
apache-2.0
12,854
package samples.scalaexchange.step3 import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.http.scaladsl.model.headers.RawHeader import akka.http.scaladsl.server._ import akka.stream.ActorMaterializer import samples.scalaexchange.utils.SampleApp import scala.io.StdIn object SimpleStreamHttpServiceA...
ktoso/akka-scala-exchange
src/main/scala/samples/scalaexchange/step3/SimpleStreamHttpServiceApp.scala
Scala
apache-2.0
985
package com.bfm.topnotch.tnengine import java.io.File import java.net.URL import org.apache.commons.httpclient.HttpStatus import org.apache.http.client.methods.HttpGet import org.apache.http.impl.client.HttpClients import org.json4s.JsonDSL._ import org.json4s._ import org.json4s.native.JsonMethods._ impor...
blackrock/TopNotch
src/main/scala/com/bfm/topnotch/tnengine/TnReader.scala
Scala
apache-2.0
5,452
package net.anti344.rcircuits.client.render import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer import net.anti344.rcircuits.client.RenderHelper._ import net.minecraft.tileentity.TileEntity import net.anti344.rcircuits.client.models.{CircuitModel, CircuitBaseModel} import net.anti344.rcircuits.ti...
markus23/RedstoneMicrocircuits
src/main/scala/net/anti344/rcircuits/client/render/CircuitBaseRender.scala
Scala
gpl-2.0
778
package cromwell.services import cromwell.database.migration.liquibase.LiquibaseSettings import cromwell.database.slick.EngineSlickDatabase import cromwell.database.sql.EngineSqlDatabase object EngineServicesStore { val EngineLiquibaseSettings = LiquibaseSettings("changelog.xml") private val engineDatabaseConfig...
ohsu-comp-bio/cromwell
services/src/main/scala/cromwell/services/EngineServicesStore.scala
Scala
bsd-3-clause
577
package pl.iterators.kebs.instances.util import pl.iterators.kebs.instances.InstanceConverter import pl.iterators.kebs.instances.util.CurrencyString.CurrencyFormat import java.util.Currency trait CurrencyString { implicit val currencyFormatter: InstanceConverter[Currency, String] = InstanceConverter[Currency, ...
theiterators/kebs
instances/src/main/scala/pl/iterators/kebs/instances/util/CurrencyString.scala
Scala
mit
490
/* * 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 ...
gengliangwang/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateStoreProvider.scala
Scala
apache-2.0
14,242
/* * Copyright 2014 Frugal Mechanic (http://frugalmechanic.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
frugalmechanic/fm-serializer
src/main/scala/fm/serializer/OptionDeserializer.scala
Scala
apache-2.0
3,662
package regolic.qelim.lra import regolic.qelim.QuantifierElimination import regolic.asts.core.Trees._ import regolic.asts.fol.Trees._ import regolic.asts.fol.Manip._ import regolic.asts.theories.real.Trees._ object FourierMotzkin extends QuantifierElimination { def constructiveElimExistential(formula: Formula, var...
regb/scabolic
src/main/scala/regolic/qelim/lra/FourierMotzkin.scala
Scala
mit
441
package dk.bayes.dsl.variable.gaussian.univariate import dk.bayes.dsl.InferEngine import dk.bayes.dsl.variable.gaussian.univariatelinear.UnivariateLinearGaussian object inferUnivariateGaussianSimplest extends InferEngine[UnivariateGaussian, UnivariateGaussian] { def isSupported(x: UnivariateGaussian): Boolean = { ...
danielkorzekwa/bayes-scala
src/main/scala/dk/bayes/dsl/variable/gaussian/univariate/inferUnivariateGaussianSimplest.scala
Scala
bsd-2-clause
1,197
/* * Copyright 2015-2016 Uncharted Software 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 ...
unchartedsoftware/sparkplug
sparkplug-server/src/main/scala/software/uncharted/sparkplug/Plug.scala
Scala
apache-2.0
3,579
package jgo.tools.compiler package scope import interm.symbol._ trait EnclosedScope extends Scope { val enclosing: Scope abstract override def get(name: String): Option[Symbol] = super.get(name) orElse enclosing.get(name) abstract override def contains(name: String): Boolean = super.contains(name)...
thomasmodeneis/jgo
src/src/main/scala/jgo/tools/compiler/scope/EnclosedScope.scala
Scala
gpl-3.0
748
/* * 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/iht-frontend
app/iht/controllers/application/tnrb/EstateClaimController.scala
Scala
apache-2.0
5,880
package org.jetbrains.plugins.scala.lang package refactoring.extractMethod import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.lang.psi.api.statements.params.ScTypeParam import org.jetbrains.plugins.scala.lang.psi.api.toplevel.ScTypeParametersOwner import org.jetbrains.plugins.scala.lang.psi.types.Sc...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/refactoring/extractMethod/ScalaExtractMethodSettings.scala
Scala
apache-2.0
1,512
// src/main/scala/progscala2/traits/ui/Widget.scala package progscala2.traits.ui abstract class Widget
sunilrebel/programming-scala
examples/src/main/scala/progscala2/traits/ui/widget.scala
Scala
mpl-2.0
104
package fr.janalyse.ssh import java.io._ import scala.io.BufferedSource object SSHTools { def md5sum(str: String): String = { md5sum(new ByteArrayInputStream(str.getBytes())) // TODO : Warning manage charsets... } def md5sum(input: InputStream): String = { val bis = new BufferedInputStream(input) va...
dacr/jassh
src/main/scala/fr/janalyse/ssh/SSHTools.scala
Scala
apache-2.0
1,382
/* * Copyright 2008 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable la...
wsaccaco/lift
archetypes/lift-archetype-jpa-basic/src/main/resources/archetype-resources/web/src/main/scala/snippet/Author.scala
Scala
apache-2.0
2,369
/* * Wire * Copyright (C) 2016 Wire Swiss GmbH * * 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 progr...
wireapp/wire-android-sync-engine
zmessaging/src/test/scala/com/waz/testutils/TestClock.scala
Scala
gpl-3.0
1,420
package bitcoin import java.time.Instant import java.time.temporal.ChronoUnit import scala.math.Ordering.Implicits._ // A half-open time interval [begin, end) case class Interval(begin: Instant, end:Instant) { def contains(instant: Instant) = (begin <= instant) && (instant < end) } object Interval { val empty =...
linearregression/akka-streams-http-intro
src/main/scala/bitcoin/Periodic.scala
Scala
apache-2.0
1,297
/* * Copyright 2013 Akiyoshi Sugiki, University of Tsukuba * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
axi-sugiki/kumoi
src/kumoi/shell/pm/PMShellSupport.scala
Scala
apache-2.0
2,198
package eu.gruchala.apps import java.io.FileNotFoundException import eu.gruchala.BaseSpec class UrlExecutorAppSpec extends BaseSpec { import eu.gruchala.apps.UrlExecutorApp._ "reading a file" should { "return file contents" when { "file exists" in { val buffer = readFile("urls.csv") b...
leszekgruchala/scala-exercises
src/test/scala/eu/gruchala/apps/UrlExecutorAppSpec.scala
Scala
apache-2.0
548
@deprecated("Suppress warnings", since="2.11") object Test extends App { type CM[T] = ClassManifest[T] println(implicitly[CM[Int]]) println(implicitly[CM[Int]] eq Manifest.Int) }
felixmulder/scala
test/files/run/classmanifests_new_alias.scala
Scala
bsd-3-clause
186
import scala.deriving.* object Test extends App { case class Foo() derives Bar, Baz case class Bar[T](id: String) object Bar { implicit def barGen[T](implicit m: Mirror.Of[T]): Bar[T] = Bar("Bar.barGen") def derived[T](implicit m: Mirror.Of[T]): Bar[T] = Bar("Bar.derived") } trait Baz[T] { def i...
dotty-staging/dotty
tests/run/derived-specificity.scala
Scala
apache-2.0
725
package com.datastax.spark.connector.rdd import org.apache.spark.metrics.InputMetricsUpdater import com.datastax.driver.core.Session import com.datastax.spark.connector._ import com.datastax.spark.connector.cql._ import com.datastax.spark.connector.rdd.reader._ import com.datastax.spark.connector.util.CqlWhereParser....
nvoron23/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/rdd/CassandraJoinRDD.scala
Scala
apache-2.0
9,913
package org.helianto.security.service import org.springframework.security.oauth2.common.{DefaultOAuth2AccessToken, OAuth2AccessToken} import org.springframework.security.oauth2.provider.OAuth2Authentication import org.springframework.security.oauth2.provider.token.TokenEnhancer import org.springframework.stereotype.Se...
iservport/helianto-spring
src/main/scala/org/helianto/security/service/CustomTokenEnhancer.scala
Scala
apache-2.0
740
/******************************************************************************* Copyright (c) 2012-2013, KAIST, S-Core. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. *********************************************************...
daejunpark/jsaf
src/kr/ac/kaist/jsaf/analysis/typing/models/DOMHtml/HTMLTextAreaElement.scala
Scala
bsd-3-clause
9,354
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This file is part of Rudder. * * Rudder is free software: you can redistribute it and/or modify * it under the...
armeniaca/rudder
rudder-core/src/main/scala/com/normation/rudder/repository/EventLogRepository.scala
Scala
gpl-3.0
12,413
/* * 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-core/src/main/scala/io/gatling/core/session/Session.scala
Scala
apache-2.0
9,773
import java.io.File import scala.io.Source import io.circe.parser.decode import ocr.{OcrTextAnnotation, Vertex, Word} object MLPrepare extends App { val folder = "/home/leonti/Downloads/receipts/" def getListOfFiles(dir: String): List[File] = { val d = new File(dir) if (d.exists && d.isDirectory) { ...
Leonti/receipts-rest-service
app/src/main/scala/MLPrepare.scala
Scala
mit
2,019
class Test { def combine = this match { case that if that eq this => this // just return this case that: Test2 => println(that) this case _ => sys.error("meh") } } class Test2 extends Test
yusuke2255/dotty
tests/untried/pos/virtpatmat_binding_opt.scala
Scala
bsd-3-clause
218
// Copyright (c) 2018 Ben Zimmer. All rights reserved. // Various unit tests. package bdzimmer.orbits import org.scalatest.FunSuite class PlanetsTestsSuite extends FunSuite { test("solve start and end date") { val ship = ConstAccelCraft("Test", 12000.0, 0.45) val startDate = CalendarDateTime(2018, 5, ...
bdzimmer/orbits
src/test/scala/bdzimmer/orbits/PlanetsTestsSuite.scala
Scala
bsd-3-clause
3,860
/*********************************************************************** * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * Portions Crown Copyright (c) 2017-2018 Dstl * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version...
jahhulbert-ccri/geomesa
geomesa-accumulo/geomesa-accumulo-spark/src/main/scala/org/locationtech/geomesa/spark/accumulo/AccumuloSpatialRDDProvider.scala
Scala
apache-2.0
9,352
package actors import akka.actor.{PoisonPill, ActorSystem} import akka.testkit.{ImplicitSender, TestKit, TestProbe} import org.scalatest.{MustMatchers, WordSpecLike} import scala.concurrent.duration._ class EventServerSpec extends TestKit(ActorSystem("ClassifierSpecAS")) with ImplicitSender with WordSpecLike with Mus...
openforce/spark-mllib-scala-play
test/actors/EventServerSpec.scala
Scala
apache-2.0
1,226
package fpinscala.exercises.ch04errorhandling import org.scalatest.FunSuite /** * Created by hjmao on 17-3-2. */ class OptionTest extends FunSuite { test("testMap with None") { val me = None val f = ((a: Int) => a.toString) val expected = None val actual = me.map(f) assert(actual == expected)...
huajianmao/fpinscala
src/test/scala/fpinscala/exercises/ch04errorhandling/OptionTest.scala
Scala
mit
4,484
package com.karasiq.nanoboard.encoding.formats import akka.util.ByteString import com.karasiq.nanoboard.NanoboardMessage import com.upokecenter.cbor.CBORObject import scala.collection.JavaConversions._ /** * CBOR message pack format * @see [[http://cbor.io Concise Binary Object Representation]] */ trait CBORMe...
Karasiq/nanoboard
library/src/main/scala/com/karasiq/nanoboard/encoding/formats/CBORMessagePackFormat.scala
Scala
apache-2.0
1,630
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
Kegeruneku/rudder
rudder-core/src/main/scala/com/normation/rudder/domain/policies/ActiveTechniqueCategory.scala
Scala
agpl-3.0
2,288
package tastytest import HKNest._ object TestHKNest { trait Show[-T] def test4 = new HKClass_4[Show] def test5 = new HKClass_5[List] }
scala/scala
test/tasty/neg/src-2/TestHKNest5_fail.scala
Scala
apache-2.0
143
package com.enkidu.lignum.parsers.ast.expression.types.annotations import com.enkidu.lignum.parsers.ast.expression.types.Type trait Annotation extends Type
marek1840/java-parser
src/main/scala/com/enkidu/lignum/parsers/ast/expression/types/annotations/Annotation.scala
Scala
mit
157
object Main { def main(args: Array[String]) { /** * TODO - * Enter a string and the program will reverse it and print it out. */ } }
derekargueta/Projects
Scala/src/Text/ReverseString.scala
Scala
mit
155
package edu.berkeley.eecs.btrdb.sparkconn.rdd /** Contains [[edu.berkeley.eecs.btrdb.sparkconn]] class that is the main entry point for * analyzing Quasar data from Spark. */ package object partitioner { }
SoftwareDefinedBuildings/quasar-spark-connector
src/main/scala/edu/berkeley/eecs/btrdb/sparkconn/rdd/partitioner/package.scala
Scala
gpl-3.0
210
/* * Copyright (c) 2012-2018 Broad Institute, Inc. * * This file is part of Pilon. * * Pilon is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. * * Pilon is distributed in the hope that it will...
B-UMMI/INNUca
src/pilon_v1.23/pilon/src/main/scala/org/broadinstitute/pilon/GenomeRegion.scala
Scala
gpl-3.0
27,454
/* * Test cases with literal Range specifications. * * Copyright (c) 2006-2010 Spotify AB * * @author Tommie Gannert * @date 2010-02-22 */ object LiteralTest { def main(args: Array[String]) { testUntil() testTo() testUntilBy() testToBy() } def testUntil() { for (i <- 0 until 10000) { println(""...
tommie/scala-rangefor
test/literal.scala
Scala
mit
562
package semverfi import org.specs._ object ParseSpec extends Specification { "semver parse" should { "parse 'garbage' as invalid version" in { Parse("1.0.0a") must_== Invalid("1.0.0a") } "parse normal versions" in { Parse("0.1.0") must_== NormalVersion(0,1,0) } "parse pre-release ver...
softprops/semverfi
src/test/scala/parse.scala
Scala
mit
1,308
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\\ * @ @ * * # # # # (c) 2017 CAB * * # # # # # # ...
AlexCAB/MathAct
mathact_core/src/main/scala/mathact/core/layout/infrastructure/LayoutActor.scala
Scala
mit
5,989
/* * Copyright (c) 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.apache.org...
janeefting/snowplow
4-storage/kinesis-lzo-s3-sink/src/main/scala/com.snowplowanalytics.snowplow.storage.kinesis/s3/S3SinkExecutor.scala
Scala
apache-2.0
1,391
// Copyright (C) 2017 Calin Cruceru <calin.cruceru@stud.acs.upb.ro>. // // See the LICENCE file distributed with this work for additional // information regarding copyright ownership. package org.symnet package models.iptables package extensions.conntrack // project import core._ import extensions.filter.ProtocolMatc...
calincru/iptables-sefl
src/main/scala/org/symnet/models/iptables/extensions/conntrack/CtprotoMatch.scala
Scala
mit
913
// Test that NotNull annotations are working in class files. import javax.annotation.J_2 class S_3 { def kk: String = J_2.k def ll: String = J_2.l def mm: String = (new J_2).m def nn: String = (new J_2).n def ff(i: Int): String = J_2.f(i) def gg(i: Int): String = J_2.g(i) def hh(i: Int): String = (new J...
som-snytt/dotty
tests/explicit-nulls/pos-separate/notnull/S_3.scala
Scala
apache-2.0
502
/* * 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 *...
fusepoolP3/p3-silk
silk-mapreduce/src/main/scala/de/fuberlin/wiwiss/silk/hadoop/load/QuadInputFormat.scala
Scala
apache-2.0
1,914
package gov.uk.dvla.vehicles.acquire.runner import cucumber.api.CucumberOptions import cucumber.api.junit.Cucumber import org.junit.runner.RunWith @RunWith(classOf[Cucumber]) @CucumberOptions( features = Array("acceptance-tests/src/test/resources/gherkin/EnterAddressManually.feature"), glue = Array("gov.uk.dvla.v...
dvla/vehicles-acquire-online
acceptance-tests/src/test/scala/gov/uk/dvla/vehicles/acquire/runner/EnterAddressManually.scala
Scala
mit
420
/* * Copyright 2013 David Savage * * 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...
davemssavage/modula
osgi/src/main/scala/org/chronologicalthought/modula/osgi/AbstractBundle.scala
Scala
apache-2.0
7,562
/* * 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...
dotty-staging/scalatest
scalatest-test/src/test/scala/org/scalatest/SequentialNestedSuiteExecutionSpec.scala
Scala
apache-2.0
3,026
package ore.models.project.factory import ore.data.project.Category case class ProjectTemplate( name: String, pluginId: String, category: Category, description: Option[String] )
SpongePowered/Ore
orePlayCommon/app/ore/models/project/factory/ProjectTemplate.scala
Scala
mit
196
/** * 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...
Parth-Brahmbhatt/kafka
core/src/main/scala/kafka/server/DelayedFetch.scala
Scala
apache-2.0
4,163
package bio4j.data.uniprot.test import org.scalatest.FunSuite import bio4j.data.uniprot._, flat._ import java.time.LocalDate class Lines extends FunSuite { test("ID") { val line1 = ID("CYC_BOVIN Reviewed; 104 AA.") val line2 = ID("GIA2_GIALA Reviewed; 296 AA.") ...
bio4j/data.uniprot
src/test/scala/lines.scala
Scala
agpl-3.0
11,483
/* * Ported from https://github.com/junit-team/junit */ package org.junit.internal object ArrayComparisonFailure class ArrayComparisonFailure(fMessage: String) extends AssertionError { private var fIndices: List[Int] = Nil def this(message: String, cause: AssertionError, index: Int) = { this(message) i...
lrytz/scala-js
junit-runtime/src/main/scala/org/junit/internal/ArrayComparisonFailure.scala
Scala
bsd-3-clause
774
package org.tinydvr.util import org.tinydvr.config.Configured import org.tinydvr.schedulesdirect.api.{SchedulesDirectAuthenticator, SchedulesDirectAPIClient} trait SchedulesDirectAPI extends Configured { import org.tinydvr.schedulesdirect.api.Implicits._ // TODO: make this a def and re-create if token expires. ...
lou-k/tinydvr
src/main/scala/org/tinydvr/util/SchedulesDirectAPI.scala
Scala
gpl-3.0
760
/** * Copyright (C) 2011 Orbeon, Inc. * * 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 * 2.1 of the License, or (at your option) any later version. * * This program i...
martinluther/orbeon-forms
src/main/scala/org/orbeon/oxf/util/Multipart.scala
Scala
lgpl-2.1
15,485
package aoc.day04 import io.IO object Part1 extends App { /* --- Day 4: The Ideal Stocking Stuffer --- Santa needs help mining some AdventCoins (very similar to bitcoins) to use as gifts for all the economically forward-thinking little girls and boys. To do this, he needs to find MD5 hashes which, in hexadecimal...
GuillaumeDD/AdventOfCode2015
src/main/scala/aoc/day04/Part1.scala
Scala
gpl-3.0
1,606
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
minixalpha/spark
core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala
Scala
apache-2.0
21,228
package spark.feature import org.apache.spark.ml.Transformer import org.apache.spark.ml.attribute.AttributeGroup import org.apache.spark.ml.param.{ParamMap, _} import org.apache.spark.ml.util._ import org.apache.spark.sql.functions._ import org.apache.spark.sql.types.StructType import org.apache.spark.sql.types.Metada...
laxmanjangley/FFrame
src/main/scala/spark/feature/ExpressionTransformer.scala
Scala
apache-2.0
4,241
package cpup.lib.module import java.lang.annotation.Annotation import com.typesafe.config.Config import org.slf4j.Logger case class ModuleType[T](final val cla: Class[T]) { override def toString: String = s"ModuleType<${cla.getName}>" lazy val id = Option(cla.getAnnotation(classOf[ModuleID])).map(_.id).getOrElse(...
CoderPuppy/cpup-lib
src/main/scala/cpup/lib/module/ModuleType.scala
Scala
mit
474
package org.example5.declaration class X
JetBrains/intellij-scala
scala/scala-impl/testdata/move/moveMultipleClasses_UsedInLocalImports/before/org/example5/declaration/X.scala
Scala
apache-2.0
41
/* * 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 ...
openwhisk/openwhisk
tests/src/test/scala/ha/ShootComponentsTests.scala
Scala
apache-2.0
11,961
package com.mucahitbayar.shoppingcart.data import com.mucahitbayar.shoppingcart.domain.{Discount, Product} class DiscountRepository extends Repository[Discount] { override def exists(id: String): Boolean = DiscountRepository.discounts.contains(id.trim.toLowerCase) override def get(id: String): Option[Discount]...
mucahitbayar/ScalaTDDShop
src/main/scala/com/mucahitbayar/shoppingcart/data/DiscountRepository.scala
Scala
mit
789
/* * Copyright 2009 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 t...
hydro2k/ostrich
src/test/scala/com/twitter/ostrich/stats/GraphiteStatsLoggerTest.scala
Scala
apache-2.0
2,925
package redis import scala.concurrent._ import akka.util.ByteString class RedisTest extends RedisSpec { sequential "basic test" should { "ping" in { Await.result(redis.ping, timeOut) mustEqual "PONG" } "set" in { Await.result(redis.set("key", "value"), timeOut) mustEqual true } "...
beni55/rediscala
src/test/scala/redis/RedisTest.scala
Scala
apache-2.0
1,137
package com.github.everpeace.kafka.reassign_optimizer import com.github.everpeace.kafka.reassign_optimizer.Config.WeightType import com.github.everpeace.kafka.reassign_optimizer.Config.WeightType.WeightType import scala.concurrent.duration.{Duration, _} case class Config( zkString: String ="", ...
everpeace/kafka-reassign-optimizer
src/main/scala/com/github/everpeace/kafka/reassign_optimizer/Config.scala
Scala
apache-2.0
4,488
/* * 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 ...
Dax1n/spark-core
core/src/main/scala/org/apache/spark/shuffle/ShuffleHandle.scala
Scala
apache-2.0
1,071
import java.io.Serializable import breeze.linalg.{DenseMatrix => BDM, sum, DenseVector, min} import org.apache.spark.Logging import org.apache.spark.annotation.DeveloperApi import org.apache.spark.graphx.Graph import org.apache.spark.mllib.linalg.distributed.{CoordinateMatrix, MatrixEntry, BlockMatrix} import org.apac...
arzavj/spark-all-pairs-shortest-path
src/main/scala/DistributedBlockFW.scala
Scala
apache-2.0
11,226
package dotty.tools package repl import dotc.reporting.Diagnostic /** Contains the different data and type structures used to model results * in the REPL */ object results { /** Type alias for `List[Diagnostic]` */ type Errors = List[Diagnostic] /** Result is a type alias for an Either with left value `Err...
som-snytt/dotty
compiler/src/dotty/tools/repl/results.scala
Scala
apache-2.0
623