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
/* * 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 ...
WeichenXu123/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/parquet/ParquetScan.scala
Scala
apache-2.0
5,658
package lore.compiler.build import lore.compiler.core.CompilerOptions import java.nio.file.Path case class BuildOptions( /** * The source files to compile, relative to the current working directory. Specifying a directory will compile all * files in the directory. */ sources: Vector[Path] = Vector.em...
marcopennekamp/lore
compiler/src/lore/compiler/build/BuildOptions.scala
Scala
mit
1,325
/* * Copyright 2015-2016 IBM Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
nwspeete-ibm/openwhisk
tests/src/whisk/core/database/test/ExtendedCouchDbRestClient.scala
Scala
apache-2.0
2,445
package com.maximus.imr.rest.util /** * Valid return types for RMI RESTful requests. We understand two return types, CSV & JSON */ object RETURN extends Enumeration { type TYPE = Value val JSON, CSV = Value }
maxird/imr-ca-sdk
scala/src/main/java/com/maximus/imr/rest/util/RETURN.scala
Scala
mit
216
/* * Copyright 2021 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/ct-calculations
src/main/scala/uk/gov/hmrc/ct/computations/calculations/TotalExpenditureQualifyingForTheFirstYearAllowanceCalculator.scala
Scala
apache-2.0
1,000
/*********************************************************************** * Copyright (c) 2017-2018 IBM * 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 ac...
ddseapy/geomesa
geomesa-cassandra/geomesa-cassandra-datastore/src/main/scala/org/locationtech/geomesa/cassandra/index/legacy/CassandraAttributeIndexV1.scala
Scala
apache-2.0
1,277
/* * Copyright 2011 Goldman Sachs. * * 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 ...
gabby2212/gs-collections
scala-unit-tests/src/test/scala/com/gs/collections/impl/list/mutable/SynchronizedMutableListScalaTest.scala
Scala
apache-2.0
1,609
/* * 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 ...
kl0u/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamPhysicalTableSourceScan.scala
Scala
apache-2.0
2,955
/* * Copyright 2001-2008 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...
hubertp/scalatest
src/test/scala/org/scalatest/PrivateMethodTesterSpec.scala
Scala
apache-2.0
3,418
/* * 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
mllib-local/src/test/scala/org/apache/spark/ml/linalg/VectorsSuite.scala
Scala
apache-2.0
16,435
package com.twitter.finagle.http.netty3 import java.nio.charset.Charset import org.jboss.netty.buffer._ import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner // Test assumptions of how Netty works @RunWith(classOf[JUnitRunner]) class NettyTest extends FunSuite { test("...
mkhq/finagle
finagle-netty3-http/src/test/scala/com/twitter/finagle/netty3/http/NettyTest.scala
Scala
apache-2.0
1,203
/* * Copyright (C) 2011 Mathias Doenitz * * 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...
beamly/spray-json
src/test/scala/cc/spray/json/JsonParserSpec.scala
Scala
apache-2.0
2,329
/******************************************************************************* Copyright (c) 2013, S-Core, KAIST. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. ***************************************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/analysis/typing/models/DOMCore/DOMException.scala
Scala
bsd-3-clause
7,387
/** * MIT License * * Copyright (c) 2016-2018 James Sherwood-Jones <james.sherwoodjones@gmail.com> * * 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, includi...
jSherz/lsd-members
backend/src/main/scala/com/jsherz/luskydive/util/TimestampJsonFormat.scala
Scala
mit
2,113
package ark import org.scalatest._ import ark.Trap._ class SomeComboSpec extends FunSpec { describe("A n x Combo") { val combo = Combo(Seq(ArrowSlit, MagnifyingGlass, ArrowSlit, Washbin, Aldebaran, Washbin, Washbin).map { new Hit(_) }) it("Has scores") { assert(combo.ark === 635) assert(comb...
lucaster/ark-calc
src/test/scala/ark/FloorSpec.scala
Scala
mit
431
package mesosphere.marathon.core.launchqueue.impl import akka.actor.{ Actor, ActorContext, ActorLogging, ActorRef, Cancellable, Props, Stash } import akka.event.LoggingReceive import mesosphere.marathon.core.base.Clock import mesosphere.marathon.core.flow.OfferReviver import mesosphere.marathon.core.launcher.{ TaskOp,...
vivekjuneja/marathon
src/main/scala/mesosphere/marathon/core/launchqueue/impl/AppTaskLauncherActor.scala
Scala
apache-2.0
16,241
/* * 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
mllib/src/main/scala/org/apache/spark/ml/Pipeline.scala
Scala
apache-2.0
12,930
package uk.co.odinconsultants.bitcoin.apps.mappings object TransactionKeyMappingsConf { case class KeyMappingConfig(url: String = "", refresh: Boolean = false) def parse(args: Array[String]): Option[KeyMappingConfig] = { val parser = new scopt.OptionParser[KeyMappingConfig](this.getClass.getSimpleName) { ...
PhillHenry/Cryptorigin
bitcoin/src/main/scala/uk/co/odinconsultants/bitcoin/apps/mappings/TransactionKeyMappingsConf.scala
Scala
gpl-2.0
562
/* date: Jan 15, 2012 The 'xxxCmd' objects have a common method 'postIds' The object records the id of the objects it is linked to. NotecardCmd only has children and no children so postIds will invoke 'postChild', while CardSetCmd, for example, has children as well as siblings so it inovkes 'postChi...
hangle/Script
src/Common.scala
Scala
apache-2.0
1,171
// a.scala // Mon Jul 11 14:18:26 PDT 2011 object ExistentialsConsideredHarmful { class Animal(val name: String) object Dog extends Animal("Dog") object Sheep extends Animal("Sheep") trait Tools[A] { def shave(a: A): A } def tools[A](a: A): Tools[A] = null // dummy case class TransportBox[A <: Anim...
AlexSikia/dotty
tests/pending/pos/existentials-harmful.scala
Scala
bsd-3-clause
1,339
import com.orientechnologies.orient.core.metadata.schema.OType import com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal import gremlin.scala._ import java.util.{ArrayList => JArrayList} import org.apache.commons.configuration.BaseConfiguration import org.apache.tinkerpop.gremlin.orientdb._ import org.scal...
mpollmeier/gremlin-scala-examples
orientdb/src/test/scala/SimpleSpec.scala
Scala
apache-2.0
7,302
/* * Copyright (c) 2014-2021 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
monixio/monix
monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RestartUntilObservable.scala
Scala
apache-2.0
3,284
/* * 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/scala-parallel-recommendation/filter-by-category/src/main/scala/Serving.scala
Scala
apache-2.0
1,084
/* * 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/executionplan/LoadCsvIterator.scala
Scala
apache-2.0
1,718
package models import org.joda.time.DateTime import play.api.data.Forms._ import play.api.data.validation.Constraints._ import play.api.data._ import play.api.data.validation.Constraints.pattern import play.api.libs.json._ case class SupType(s1: Int, s2: Int, s3: Int) case class SubType( s11: Int...
luanlv/ResizeImage
app/models/Type.scala
Scala
apache-2.0
2,267
import java.util.Date import cassandra._ import com.typesafe.config.Config import http.NbaResult import org.apache.spark.SparkContext import org.apache.spark.rdd.RDD import org.apache.spark.sql.{ Row, SQLContext } import spark.SparkProgram._ import scala.collection.mutable import scala.concurrent.{ ExecutionContext, ...
haghard/scenter-analytics-spark
src/main/scala/spark/package.scala
Scala
apache-2.0
23,348
package se.yobriefca import sbt._ import Keys._ import scala.util.Try import java.net.URLClassLoader object SbtTasks extends Plugin { val defaultTaskPackage = SettingKey[String]("defaultTaskPackage") override def globalSettings: Seq[Def.Setting[_]] = Seq( defaultTaskPackage := "tasks" ) def installTask...
kouphax/sbt-tasks
src/main/scala/se/yobriefca/SbtTasks.scala
Scala
mit
3,148
package com.adendamedia.cornucopia.actors import akka.actor.SupervisorStrategy.{Escalate, Restart} import akka.actor.{Actor, ActorLogging, ActorRef, ActorRefFactory, OneForOneStrategy, Props, Terminated} import com.adendamedia.cornucopia.redis.{ClusterOperations, ReshardTable} import com.adendamedia.cornucopia.Cornuco...
adenda/cornucopia
src/main/scala/com/adendamedia/cornucopia/actors/ReshardCluster.scala
Scala
lgpl-3.0
7,404
package com.github.chaabaj.openid.oauth import spray.json.RootJsonFormat case class AccessTokenSuccess( accessToken: String, tokenType: Option[String] = None, scope: Option[String] = None, idToken: Option[String] = None, refreshToken: Option[String] = None, expireIn: Option[Long] = None, state: Option[S...
jkugiya/openid-scala
src/main/scala/com/github/chaabaj/openid/oauth/AccessTokenResponse.scala
Scala
mit
721
package com.twitter.util.validation.internal.validators import com.twitter.util.validation.constraints.ConsistentDateParameters import jakarta.validation.constraintvalidation.{SupportedValidationTarget, ValidationTarget} import jakarta.validation.{ConstraintValidator, ConstraintValidatorContext} import java.time.Local...
twitter/util
util-validator/src/test/scala/com/twitter/util/validation/internal/validators/ConsistentDateParametersValidator.scala
Scala
apache-2.0
1,027
package gh2011b.models import net.liftweb.json.JsonAST.JValue case class DeleteEventPayload(ref_type: String, ref: String) object DeleteEventPayload { def apply(json: JValue): Option[DeleteEventPayload] = { val n2s = gh3.node2String(json)(_) val ref_type = n2s("ref_type") val ref = n2s("ref"...
mgoeminne/github_etl
src/main/scala/gh2011b/models/DeleteEventPayload.scala
Scala
mit
444
/** * ************************************************************************** * * * (C) Copyright 2014 by Peter L Jones * * pljones@users.sf.net * ...
pljones/jTrapKATEditor
src/main/scala/info/drealm/scala/SteppedComboBoxUI.scala
Scala
gpl-3.0
4,232
package analysis import analysis.AccessCounts.SubstitutionMap import lift.arithmetic.ArithExpr.{contains, substitute} import lift.arithmetic._ import ir._ import ir.ast.{AbstractMap, AbstractPartRed, Expr, FunCall, Iterate, Lambda} import opencl.generator._ import opencl.ir._ import rewriting.InferNDRange.substituteIn...
lift-project/lift
src/main/analysis/Analyser.scala
Scala
mit
2,703
package com.olegych.scastie import akka.actor.ActorSelection import com.olegych.scastie.api.SbtState package object balancer { type SbtBalancer = LoadBalancer[ActorSelection, SbtState] }
scalacenter/scastie
balancer/src/main/scala/com.olegych.scastie.balancer/package.scala
Scala
apache-2.0
191
/* * Copyright 2021 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/ct-calculations
src/test/scala/uk/gov/hmrc/ct/computations/CP285Spec.scala
Scala
apache-2.0
4,147
package controllers import play.api.libs.json.{JsArray, JsValue, Json} import play.api.mvc.{Action, AnyContent, Controller} import scala.io.Source object Application extends Controller { def index(): Action[AnyContent] = Action { implicit request=> Ok(views.html.index(request)) } }
antonkulaga/semantic-graph
app/controllers/Application.scala
Scala
mpl-2.0
308
package sjsonnew.benchmark import java.io.File import org.openjdk.jmh.annotations.Benchmark import sjsonnew.IsoString class FileIsoStringBenchmark { @Benchmark def fileB: String = { import sjsonnew.BasicJsonProtocol._ val isoFile = implicitly[IsoString[File]] val f = new File("/tmp") isoFile.to(...
eed3si9n/sjson-new
benchmark/src/main/scala/sjsonnew/benchmark/FileIsoStringBenchmark.scala
Scala
apache-2.0
329
val range = 0 until 10; println("Range starts at " + range.start + " and ends at " + range.end + ".") println val increments = 0 until 10 by 5; increments.foreach { i => println(i) } println val direction = 10 until 0 by -3; direction.foreach { i => println(i) } println val inclusive = 0 to 10 by 5; inclusive.foreac...
Mastermindzh/Seven-Languages-in-Seven-Weeks
Scala/Day 1/ranges.scala
Scala
mit
408
/* * Copyright 2011-2021 Asakusa Framework Team. * * 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 ...
asakusafw/asakusafw-spark
compiler/src/test/scala/com/asakusafw/spark/compiler/graph/DirectOutputCommitClassBuilderSpec.scala
Scala
apache-2.0
7,542
package familytree.image import familytree.gedcom.Fam import familytree.util.{Point, Rectangle} import familytree.graphics.Image import java.awt.{Font, Color, Graphics2D} import java.awt.geom.RoundRectangle2D case class FamImageConfig( showPlaces: Boolean = true, showDates: Boolean = true) // Draws a box corresp...
PeWu/familytree
src/main/scala/familytree/image/FamImage.scala
Scala
apache-2.0
1,308
package org.http4s package server.blaze import cats.effect._ import cats.implicits._ import java.nio.ByteBuffer import org.log4s.Logger import scala.collection.mutable.ListBuffer import scala.util.Either import io.chrisdavenport.vault._ private[blaze] final class Http1ServerParser[F[_]]( logger: Logger, maxRe...
ChristopherDavenport/http4s
blaze-server/src/main/scala/org/http4s/server/blaze/Http1ServerParser.scala
Scala
apache-2.0
2,649
package im.actor.server.file import java.io.File import akka.actor._ import com.amazonaws.HttpMethod import com.amazonaws.auth.BasicAWSCredentials import com.amazonaws.services.s3.model.GeneratePresignedUrlRequest import com.amazonaws.services.s3.transfer.TransferManager import com.amazonaws.services.s3.transfer.mode...
WangCrystal/actor-platform
actor-server/actor-core/src/main/scala/im/actor/server/file/S3StorageAdapter.scala
Scala
mit
5,025
package feh.tec.agentes.tarea1 import feh.tec.util._ import feh.tec.agentes.tarea1.Agent._ import feh.tec.agent.StatelessAgentPerformanceMeasure.Criterion import feh.tec.agent.AgentId object Criteria { trait PlugsMovingAgentCriteria extends Debugging{ def debugMessagePrefix: String = "[Criteria] " protecte...
fehu/agent-tareas
tarea1/src/main/scala/feh/tec/agentes/tarea1/Criteria.scala
Scala
mit
4,130
/* * 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 ...
wangmiao1981/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/QueryStageExec.scala
Scala
apache-2.0
9,673
/* * Sonar Scalastyle Plugin * Copyright (C) 2014 All contributors * * 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 late...
skirge/sonar-scala
src/main/scala/com/ncredinburgh/sonar/scalastyle/ScalastyleRepository.scala
Scala
lgpl-3.0
3,708
/** * Licensed to the Minutemen Group under one or more contributor license * agreements. See the COPYRIGHT file distributed with this work for * additional information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in complian...
mohiva/silhouette
modules/provider-social/src/test/scala/silhouette/provider/social/Helpers.scala
Scala
apache-2.0
4,854
package io.transwarp.midas.constant.midas.params.deep /** * Created by xiao on 16-12-2. */ object DenseLayerParams { // Parameters. val Activation = "activation" val NumNodes = "numNodes" // Supported parameter choice. val ActivationOptions: Array[String] = Array( "relu", "tanh", "sigmoid") }
transwarpio/rapidminer
api-driver/src/main/scala/io/transwarp/midas/constant/midas/params/deep/DenseLayerParams.scala
Scala
gpl-3.0
314
package test.scala /** * Created by Francois Belletti on 8/17/15. */ import breeze.linalg.DenseVector import breeze.numerics._ import breeze.stats.distributions.Gaussian import main.scala.overlapping.analytics._ import main.scala.overlapping.containers.{SingleAxisVectTS, SingleAxisVectTSConfig} import main.scala.ov...
bellettif/sparkGeoTS
sparkTS/src/test/scala/TestCorrelation.scala
Scala
bsd-3-clause
5,243
package org.scalacheck.ops.time import java.time.temporal.ChronoUnit import java.time.{Instant, LocalDateTime} import org.scalacheck.Gen trait TruncatedJavaTimeImplicits { import scala.language.implicitConversions implicit def truncatedInstantGen(instantGen: Gen[Instant]): TruncatedInstantGen = { new Trunca...
jeffmay/scalacheck-ops
core/src/main/scala/org/scalacheck/ops/time/TruncatedJavaTimeImplicits.scala
Scala
apache-2.0
979
/* * 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 ...
shaneknapp/spark
core/src/main/scala/org/apache/spark/util/ByteBufferInputStream.scala
Scala
apache-2.0
2,066
package models.daos.tables import java.util.UUID import slick.jdbc.PostgresProfile.api._ import slick.lifted.Tag case class DBRegistration(id: UUID, person_id: UUID, friday: Boolean, saturday: Boolean, sorting: Boolean, category_id: Option[UUID], team_leader: Boolean) class RegistrationTable(tag: Tag) extends Table...
wjglerum/bamboesmanager
app/models/daos/tables/RegistrationTable.scala
Scala
mit
1,068
/** * Created by Variant on 16/4/9. */ case class Book1(title: String, authors: List[String]) object For_Query { def main(args: Array[String]) { val books : List[Book1] = List( Book1("Struture and Interpertation",List("Abeson hold","Sussan")), Book1("Princiles of programming design",List("Aho,Gos...
sparkLiwei/ProgrammingNote
scalaLearning/scalaInSpark/For_Query.scala
Scala
cc0-1.0
808
class List[T] {} class A[+T] { def foo(x: List[T]){} } object Main { def main(args: Array[String]) { } }
tobast/compil-petitscala
tests/typing/bad/testfile-variance-9.scala
Scala
gpl-3.0
106
/*********************************************************************** * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
ddseapy/geomesa
geomesa-hbase/geomesa-hbase-datastore/src/main/scala/org/locationtech/geomesa/hbase/coprocessor/GeoMesaCoprocessor.scala
Scala
apache-2.0
7,326
package com.timeout.docless.swagger import cats.syntax.foldable._ import cats.instances.list._ import cats.instances.map._ case class Path(id: String, parameters: List[OperationParameter] = Nil, operations: Map[Method, Operation] = Map.empty) extends ParamSetters[Path] { private...
timeoutdigital/docless
src/main/scala/com/timeout/docless/swagger/Path.scala
Scala
mit
1,545
package mq.http /** * Created by Bruce on 3/1/15. */ class Producer { }
ElasticQueue/ElasticQueue
src/main/scala/mq/http/Producer.scala
Scala
mit
76
/* * 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 u...
gioenn/xSpark
sql/core/src/main/scala/org/apache/spark/sql/execution/stat/FrequentItems.scala
Scala
apache-2.0
4,601
/* * 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 ...
u2009cf/spark-radar
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala
Scala
apache-2.0
24,534
/* * 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 ...
brad-kaiser/spark
core/src/test/scala/org/apache/spark/deploy/history/FsHistoryProviderSuite.scala
Scala
apache-2.0
31,211
package sbt.classpath import java.lang.ref.{Reference, SoftReference} import java.io.File import java.net.URLClassLoader import java.util.HashMap private[sbt] final class ClassLoaderCache(val commonParent: ClassLoader) { private[this] val delegate = new HashMap[List[File],Reference[CachedClassLoader]] def apply(fil...
harrah/xsbt
util/classpath/src/main/scala/sbt/classpath/ClassLoaderCache.scala
Scala
bsd-3-clause
1,280
package pl.touk.nussknacker.engine.util import pl.touk.nussknacker.engine.api.{MetaData, TypeSpecificData} import java.time._ import java.time.format.DateTimeFormatter import scala.reflect.ClassTag object MetaDataExtractor { def extractTypeSpecificData[T <: TypeSpecificData](metaData: MetaData)(implicit classTag:...
TouK/nussknacker
utils/utils/src/main/scala/pl/touk/nussknacker/engine/util/MetaDataExtractor.scala
Scala
apache-2.0
2,677
/** * @author hamiltont * */ package clasp.core import java.io.Serializable import java.util.Date import java.util.UUID import scala.collection.immutable.Map import scala.collection.mutable.ListBuffer import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Promise import scala.concurrent....
hamiltont/clasp
src/clasp/core/phones.scala
Scala
mit
22,913
/* 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...
strubell/factorie
src/main/scala/cc/factorie/app/nlp/lexicon/wikipedia/WikipediaLexicon.scala
Scala
apache-2.0
4,815
package kvstore import scala.collection.immutable import akka.actor.{ActorRef, Actor} object Arbiter { case object Join case object JoinedPrimary case object JoinedSecondary case class Replicas(replicas: Set[ActorRef]) } class Arbiter extends Actor { import Arbiter._ var leader: Option[ActorRef] = No...
keshavbashyal/playground-notes
principles-of-reactive-programming/kvstore/src/main/scala/kvstore/Arbiter.scala
Scala
mit
649
package euler package til90 object Euler88 extends EulerProblem { // produces tuples (listOfInts, prod, sum) // http://stackoverflow.com/questions/25823177/create-a-scala-function-that-generates-ordered-list-of-integers-of-length-n def intCombinations(n: Int, limit: Int, k: Int = 2, currProd: Int = 1): Seq[(Lis...
TrustNoOne/Euler
scala/src/main/scala/euler/til90/Euler88.scala
Scala
mit
1,022
package mesosphere.marathon.core.externalvolume import com.wix.accord._ import mesosphere.marathon.core.externalvolume.impl._ import mesosphere.marathon.state._ import org.apache.mesos.Protos.{ ContainerInfo, CommandInfo } /** * API facade for callers interested in storage volumes */ object ExternalVolumes { pr...
ss75710541/marathon
src/main/scala/mesosphere/marathon/core/externalvolume/ExternalVolumes.scala
Scala
apache-2.0
1,821
package authentication import java.time.Instant import com.auth0.jwt.JWT import com.auth0.jwt.algorithms.Algorithm import scala.concurrent.duration.{FiniteDuration, _} import scala.util.Try class PathToken(bearerTokenSecret: Array[Byte]) { private val bearerPathTokenLifetime: FiniteDuration = 5.minutes def gen...
Leonti/receipts-rest-service
app/src/main/scala/authentication/PathToken.scala
Scala
mit
1,150
package spark.streaming.dstream import spark.RDD import spark.streaming.{Duration, DStream, Time} private[streaming] class TransformedDStream[T: ClassManifest, U: ClassManifest] ( parent: DStream[T], transformFunc: (RDD[T], Time) => RDD[U] ) extends DStream[U](parent.ssc) { override def dependencies = Li...
koeninger/spark
streaming/src/main/scala/spark/streaming/dstream/TransformedDStream.scala
Scala
bsd-3-clause
529
/* * Copyright (c) 2012 - 2021 Splice Machine, Inc. * * This file is part of Splice Machine. * Splice Machine 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, or (at your option) ...
splicemachine/spliceengine
splice_spark2/src/main/scala/com/splicemachine/nsds/kafka/KafkaTopics.scala
Scala
agpl-3.0
2,678
/* * This file is part of Kiama. * * Copyright (C) 2011-2015 Anthony M Sloane, Macquarie University. * * Kiama is free software: you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the * Free Software Foundation, either version 3 of the License, or ...
adeze/kiama
library/src/org/kiama/example/oberon0/L0/TypeAnalyser.scala
Scala
gpl-3.0
4,449
//package io.skysail.core.model // //import io.skysail.restlet.SkysailServerResource //import io.skysail.restlet.resources.ListServerResource2 //import io.skysail.restlet.resources.EntityServerResource2 // //class TestEntityResource extends EntityServerResource2[TestEntity] { // // //}
evandor/skysail-core
skysail.core/test/io/skysail/core/model/TestEntityResource.scala
Scala
apache-2.0
290
package com.twitter.concurrent import java.util.concurrent.atomic.AtomicReference import scala.annotation.tailrec import scala.collection.immutable.Queue import com.twitter.util.{Await, Future, Promise} /** * An unbuffered FIFO queue, brokered by `Offer`s. Note that the queue is * ordered by successful operations...
n054/util
util-core/src/main/scala/com/twitter/concurrent/Broker.scala
Scala
apache-2.0
4,034
package org.podval.families.numbers.simple.split.base trait NumberSystem[S <: NumberSystem[S]] { //this: S => import NumberSystem.Raw type Number <: NumberBase[S] def createNumber(raw: Raw): Number } object NumberSystem { type Raw = (Boolean, List[Int]) }
dubinsky/podval-families
src/main/scala/org/podval/families/numbers/simple/split/base/NumberSystem.scala
Scala
apache-2.0
269
package com.github.diegopacheco.sandbox.scripts.scala.basic.oo import scala.reflect._ class Numero( @BeanProperty var valor: Int = 0 ){ def + (that:Int) = that + this.valor def - (that:Int) = this.valor - that } object MathOverload { def main(args : Array[String]) : Unit = { val v1 = new Numero(...
diegopacheco/scala-playground
scala-playground/src/com/github/diegopacheco/sandbox/scripts/scala/basic/oo/MathOverload.scala
Scala
unlicense
489
package plugins import play.api.Application import core.CultureHubPlugin import akka.actor.{ Props, ActorContext } import actors.SolrCache import services.{ SOLRIndexingService } import services.search.SOLRSearchService /** * * @author Manuel Bernhardt <bernhardt.manuel@gmail.com> */ class SearchPlugin(app: Applic...
delving/culture-hub
modules/search/app/plugins/SearchPlugin.scala
Scala
apache-2.0
659
/*import sbt._ object Plugins extends Build { lazy val root = Project("root", file(".")) dependsOn( uri("git://github.com/sbt/sbt-assembly.git#0.9.1") ) } */
jorro/scavenger
project/project/build.scala
Scala
gpl-3.0
166
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2006-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
l15k4/scala-parser-combinators
src/main/scala/scala/util/parsing/combinator/lexical/Lexical.scala
Scala
bsd-3-clause
1,539
/** * Copyright 2017 Interel * * 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...
Interel-Group/core3
src/main/scala/core3/workflows/definitions/SystemDeleteGroup.scala
Scala
apache-2.0
2,784
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.tools.testkit i...
scala/scala
src/testkit/scala/tools/testkit/ReflectUtil.scala
Scala
apache-2.0
2,667
package tests.rescala.dynamic import tests.rescala.testtools.RETests class TrueDynamicEvents extends RETests { multiEngined { engine => import engine._ test("higher order events") { val e1 = Evt[Signal[Int]]() val event = Event.dynamic { Some { e1.value.get.value } } val res = event.lat...
guidosalva/REScala
Code/Main/shared/src/test/scala-2/tests/rescala/dynamic/TrueDynamicEvents.scala
Scala
apache-2.0
529
package testaus import siirrot._ import scala.util.Random /* Tulostettiin sarja satunnaisia laskuja. Toistettiin kunnes kaikki päätapaustyypit oli kohdattu. * Tarkastettiin tulokset itse. */ object siirto_vastapaivaNaapuri extends App { val random = new Random() val siirrot = Array.tabulate(10)(_ => new Siirto...
MrAurela/Formula
Formula/src/testaus/siirto_vastapaivaNaapuri.scala
Scala
mit
571
/* * MUSIT is a museum database to archive natural and cultural history data. * Copyright (C) 2016 MUSIT Norway, part of www.uio.no (University of Oslo) * * 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 Softw...
kpmeen/musit
service_thing_aggregate/test/repositories/dao/StorageStatsDaoSpec.scala
Scala
gpl-2.0
1,976
package scala.collection.immutable import org.openjdk.jmh.annotations._ import org.openjdk.jmh.infra._ import org.openjdk.jmh.runner.IterationType import benchmark._ import java.util.concurrent.TimeUnit @BenchmarkMode(Array(Mode.AverageTime)) @Fork(2) @Threads(1) @Warmup(iterations = 10) @Measurement(iterations = 10)...
felixmulder/scala
test/benchmarks/src/main/scala/scala/collection/immutable/VectorMapBenchmark.scala
Scala
bsd-3-clause
776
/* Copyright 2014 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
MansurAshraf/scalding
scalding-macros/src/main/scala/com/twitter/scalding/macros/impl/TypeDescriptorProviderImpl.scala
Scala
apache-2.0
2,484
package lampetia.sql import lampetia.meta.{Property, Model} import lampetia.meta.feature.sql._ import lampetia.sql.ast.{QueryNodeBuilder, Dsl, Operand, Operator} /** * @author Hossam Karim */ trait Ops { self: Dsl with NodeBuilders with SqlIO[_ <: ConnectionSource] with SqlCodec => implicit def sqlTypes: SqlType...
hkarim/lampetia
lampetia-sql/src/main/scala/lampetia/sql/Ops.scala
Scala
mit
4,125
package core import integer.integers import org.scalatest.{FunSuite, Matchers} class RationalExpressionTest extends FunSuite with Matchers { test("Use == for testing \\"algebraic\\" equality") { RationalExpression(2, 3) == RationalExpression(2, 3) should be (true) RationalExpression(2, 3) == RationalExpre...
dkettlestrings/thunder
src/test/scala/core/RationalExpressionTest.scala
Scala
gpl-3.0
1,755
package objsets import common._ import TweetReader._ /** * A class to represent tweets. */ class Tweet(val user: String, val text: String, val retweets: Int) { override def toString: String = "User: " + user + "\\n" + "Text: " + text + " [" + retweets + "]" def moreRetweets(that: Tweet) = this.retweets ...
pacomendes/scala
assignments/w3/objsets/src/main/scala/objsets/TweetSet.scala
Scala
mit
7,230
package com.datawizards.dqm.rules.group import java.sql.Date import com.datawizards.dqm.configuration.ValidationContext import com.datawizards.dqm.result.{GroupByStatistics, InvalidGroup} import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.{FunSuite, Matchers} @RunWith(classOf...
piotr-kalanski/data-quality-monitoring
src/test/scala/com/datawizards/dqm/rules/group/NotEmptyGroupsTest.scala
Scala
apache-2.0
1,563
import scala.reflect.macros.blackbox.Context object Macros { def impl(c:Context): c.Expr[Any] = { import c.universe._ val selfTree = This(c.enclosingImpl.symbol.asModule.moduleClass) c.Expr[AnyRef](selfTree) } def foo: Any = macro impl }
yusuke2255/dotty
tests/disabled/macro/run/t6394a/Macros_1.scala
Scala
bsd-3-clause
258
package com.johnathangilday.autograder.cv import boofcv.alg.feature.shapes.ShapeFittingOps import boofcv.alg.filter.binary.Contour import boofcv.gui.binary.VisualizeBinaryData import boofcv.gui.feature.VisualizeShapes import boofcv.struct.image.ImageUInt8 import com.johnathangilday.autograder.testutils.TestImgFactory ...
gilday/fast-grades
src/test/scala/com/johnathangilday/autograder/cv/SheetProcessorSpec.scala
Scala
apache-2.0
4,818
package kartograffel.server.domain.model import cats.Eq import io.circe.generic.semiauto._ import io.circe.{Decoder, Encoder} case class Tag(id: TagId, name: String, graffelId: GraffelId) object Tag { implicit val tagEq: Eq[Tag] = Eq.fromUniversalEquals implicit val tagDecoder: Decoder[Tag] = deriveDeco...
fthomas/kartograffel
modules/server/jvm/src/main/scala/kartograffel/server/domain/model/Tag.scala
Scala
apache-2.0
387
/* * 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 ...
zzcclp/carbondata
integration/presto/src/test/prestosql/org/apache/carbondata/presto/server/PrestoTestUtil.scala
Scala
apache-2.0
10,160
// Copyright 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 // // Unless required by a...
CommBank/grimlock
grimlock-core/src/test/scala/commbank/grimlock/statistics/TestStatisticsCounts.scala
Scala
apache-2.0
9,737
/* * 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-avro/src/test/scala/com/spotify/scio/avro/types/TypeProviderTest.scala
Scala
apache-2.0
30,695
package vuescale import scala.scalajs.js object prelude { type Vue = facade.Vue lazy val Vue: facade.Vue.type = facade.Vue type Handler[V <: js.Object] = scaladsl.Handler[V] type Component[V <: Vue] = scaladsl.Component[V] val Component = scaladsl.Component type CreateElement = facade.CreateElement ...
lettenj61/vuescale
vuescale-core/src/main/scala/vuescale/Prelude.scala
Scala
mit
349
/* * 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-http/src/main/scala/io/gatling/http/request/HttpRequest.scala
Scala
apache-2.0
2,182
package models.database.facade.service import models.database.AppDB import models.database.alias._ import models.database.alias.service.SpotifyArtist import models.database.facade.ArtistFacade import models.util.Constants import org.squeryl.PrimitiveTypeMode._ import org.squeryl.dsl.GroupWithMeasures import play.api.l...
haffla/stream-compare
app/models/database/facade/service/SpotifyArtistFacade.scala
Scala
gpl-3.0
3,158
// Copyright: 2010 - 2018 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/lgpl-3.0.en.html package org.ensime.sexp.formats import scala.collection.immutable.BitSet import BigIntConvertor._ import org.ensime.sexp.SexpSpec import org.scalacheck.{ Arbitrary, Gen } import org.scalat...
yyadavalli/ensime-server
s-express/src/test/scala/org/ensime/sexp/formats/BigIntConvertorSpec.scala
Scala
gpl-3.0
1,639
package annotation import org.junit.Assert import annotation.api.SkillState import annotation.internal.ParseException import annotation.internal.PoolSizeMissmatchError import annotation.internal.TypeMissmatchError import common.CommonTest /** * Tests the file reading capabilities. */ class ParseTest extends Common...
XyzNobody/skillScalaTestSuite
src/test/scala/annotation/ParseTest.scala
Scala
bsd-3-clause
5,294
/* * 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 ...
style95/openwhisk
core/standalone/src/main/scala/org/apache/openwhisk/standalone/StandaloneOpenWhisk.scala
Scala
apache-2.0
23,095