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 ...
pgandhi999/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/AttributeSet.scala
Scala
apache-2.0
5,902
package com.ovoenergy.comms.testhelpers import java.time.Instant import java.util.UUID import org.scalacheck.rng.Seed import org.scalacheck.{Arbitrary, Gen} import scala.util.Random object ArbGenerator { implicit def arbInstant: Arbitrary[Instant] = Arbitrary { Instant.now().plusSeconds(Random.nextInt(5)) }...
ovotech/comms-kafka-serialisation
modules/test-helpers/src/main/scala/com/ovoenergy/comms/testhelpers/ArbGenerator.scala
Scala
mit
618
package sttp.client3.testing import scala.concurrent.ExecutionContext trait AsyncExecutionContext { implicit def executionContext: ExecutionContext = ExecutionContext.global }
softwaremill/sttp
core/src/test/scalanative/sttp/client3/testing/AsyncExecutionContext.scala
Scala
apache-2.0
180
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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 b...
hpe-cct/cct-nn
src/test/scala/toolkit/neuralnetwork/function/SumOfSquaresSpec.scala
Scala
apache-2.0
1,918
package io.udash.web.guide.markdown import io.udash.rpc.DefaultServerRpcCompanion import scala.concurrent.Future trait MarkdownPageRPC { def loadContent(page: MarkdownPage): Future[String] } object MarkdownPageRPC extends DefaultServerRpcCompanion[MarkdownPageRPC]
UdashFramework/udash-guide
shared/src/main/scala/io/udash/web/guide/markdown/MarkdownPageRPC.scala
Scala
gpl-3.0
270
package javabin import akka.actor._ import com.typesafe.config.ConfigFactory import akka.cluster.Cluster import akka.contrib.pattern.{ClusterSingletonProxy, ClusterSingletonManager} import scala.Some import scala.util.Random import akka.actor.Actor.Receive import scala.concurrent.Await import akka.util.Timeout import ...
staale/javabin-20140612
src/main/scala/javabin/ClusterSample.scala
Scala
apache-2.0
4,020
package redmine4s.api.model import org.joda.time.DateTime import redmine4s.Redmine case class User(id: Long, login: String, lastname: String, firstname: String, mail: String, lastLoginOn: Option[DateTime], createdOn: DateT...
tomingtoming/redmine4s
src/main/scala/redmine4s/api/model/User.scala
Scala
apache-2.0
1,364
/* * La Trobe University - Distributed Deep Learning System * Copyright 2016 Matthias Langer (t3l@threelights.de) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apa...
bashimao/ltudl
cublaze/src/main/scala/edu/latrobe/cublaze/modules/LogSoftmax_CUDA_CUDNN.scala
Scala
apache-2.0
2,851
/** * Copyright: Copyright (C) 2016, ATS Advanced Telematic Systems GmbH * License: MPL-2.0 */ package org.genivi.sota.core.user_profile import akka.actor.ActorSystem import akka.event.Logging import akka.http.scaladsl.Http import akka.http.scaladsl.model._ import akka.http.scaladsl.unmarshalling.Unmarshal import a...
PDXostc/rvi_sota_server
core/src/main/scala/org/genivi/sota/core/user_profile/UserProfileClient.scala
Scala
mpl-2.0
1,948
package com.github.mehmetakiftutuncu.errors.representation import com.github.mehmetakiftutuncu.errors.base.ErrorBase /** * A base trait for representing errors * * @tparam R Type of the error representation * * @author Mehmet Akif Tütüncü */ trait ErrorRepresenter[R] { /** * Represents given error ...
mehmetakiftutuncu/Errors
src/main/scala/com/github/mehmetakiftutuncu/errors/representation/ErrorRepresenter.scala
Scala
mit
1,180
package sds.classfile.bytecode import org.junit.Test import org.scalatest.Assertions import sds.classfile.constant_pool._ class OpcodeInfoTest extends Assertions { val info: Array[ConstantInfo] = Array( new Utf8Info("utf8"), new NumberInfo(ConstantInfo.INTEGER, 0), new NumberInfo(ConstantInfo.FLOAT, 0.0f)...
g1144146/sds_for_scala
src/test/scala/sds/classfile/bytecode/OpcodeInfoTest.scala
Scala
apache-2.0
3,308
trait DiagSum[P[_, _]]{ def paa[A]: P[A, A] }
hmemcpy/milewski-ctfp-pdf
src/content/3.10/code/scala/snippet17.scala
Scala
gpl-3.0
47
package com.intenthq.pucket.thrift import com.intenthq.pucket.thrift.ThriftTestUtils._ import com.intenthq.pucket.test.model.ThriftTest import org.scalacheck.{Gen, Prop} import org.specs2.scalaz.DisjunctionMatchers import org.specs2.{ScalaCheck, Specification} class ThriftPucketDescriptorSpec extends Specification wi...
intenthq/pucket
thrift/src/test/scala/com/intenthq/pucket/thrift/ThriftPucketDescriptorSpec.scala
Scala
mit
2,001
package streams import common._ /** * This component implements the solver for the Bloxorz game */ trait Solver extends GameDef { /** * Returns `true` if the block `b` is at the final position */ def done(b: Block): Boolean = b.isStanding && b.b1 == goal /** * This function takes two arguments: the...
relyah/CourseraFunctionalProgramming
resource/progfun-master/streams/src/main/scala/streams/Solver.scala
Scala
gpl-2.0
3,705
/* * 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.runtime.java8 @...
scala/scala
src/library/scala/runtime/java8/JFunction2$mcJJD$sp.scala
Scala
apache-2.0
659
/* * 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 ...
mtunique/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/batch/sql/CorrelateTest.scala
Scala
apache-2.0
7,484
package com.xenopsconsulting.gamedayapi.fetchstrategies import java.util.Date trait LocalCachingFetchStrategyProvider extends FetchStrategyProvider { override def newFetchStrategy(date: Date, team: String, nightcap: Boolean = false): FetchStrategy = { new LocalCachingFetchStrategy(date, team, nightcap) } ...
ecopony/scala-gameday-api
src/main/scala/com/xenopsconsulting/gamedayapi/fetchstrategies/LocalCachingFetchStrategyProvider.scala
Scala
mit
437
package com.nulabinc.backlog.migration.common.convert.writes import javax.inject.Inject import com.nulabinc.backlog.migration.common.convert.Writes import com.nulabinc.backlog.migration.common.domain.BacklogAttachment import com.nulabinc.backlog.migration.common.utils.{FileUtil, Logging} import com.nulabinc.backlog4j...
nulab/backlog-migration-common
core/src/main/scala/com/nulabinc/backlog/migration/common/convert/writes/AttachmentWrites.scala
Scala
mit
681
package roc package postgresql import cats.implicits._ import cats.kernel.Eq import java.security.MessageDigest import roc.postgresql.failures.{Failure, ReadyForQueryDecodingFailure, UnexpectedNoneFailure, UnknownAuthenticationRequestFailure, UnknownPostgresqlMessageTypeFailure} import roc.postgresql.server.Postgres...
finagle/roc
core/src/main/scala/roc/postgresql/Messages.scala
Scala
bsd-3-clause
7,697
/* * Copyright 2009-2010 LinkedIn, 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 ...
linkedin/norbert
network/src/test/scala/com/linkedin/norbert/network/client/loadbalancer/RoundRobinLoadBalancerFactorySpec.scala
Scala
apache-2.0
3,949
/* ___ _ ___ _ _ *\\ ** / __| |/ (_) | | Your SKilL scala Binding ** ** \\__ \\ ' <| | | |__ generated: 01.02.2019 ...
skill-lang/skill
src/main/scala/de/ust/skill/sir/api/internal/F_ConstantInteger_value.scala
Scala
bsd-3-clause
6,957
package io.github.binaryfoo.lagotto import java.io.File import io.github.binaryfoo.lagotto.JposTimestamp.DateTimeExtension import io.github.binaryfoo.lagotto.shell.{RichText, Html} import org.joda.time.{DateTime, LocalTime} import scala.collection.mutable class FieldExprTest extends LagoTest { val parser = new F...
binaryfoo/lagotto
src/test/scala/io/github/binaryfoo/lagotto/FieldExprTest.scala
Scala
mit
27,767
package bifrost.transaction.serialization import bifrost.transaction.bifrostTransaction.TransferTransaction import bifrost.transaction.box.proposition.PublicKey25519Proposition import bifrost.transaction.proof.Signature25519 import com.google.common.primitives.{Bytes, Ints, Longs} import scorex.crypto.signatures...
Topl/Project-Bifrost
src/main/scala/bifrost/transaction/serialization/TransferSerializer.scala
Scala
mpl-2.0
3,626
/* * Copyright 2016 Nicolas Rinaudo * * 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...
nrinaudo/kantan.codecs
shapeless/laws/shared/src/main/scala/kantan/codecs/shapeless/laws/discipline/package.scala
Scala
apache-2.0
720
package com.avast.metrics.scalaeffectapi.perkey.impl import cats.effect.std.Dispatcher import com.avast.metrics.scalaeffectapi.{Gauge, Monitor, SettableGauge} import com.avast.metrics.scalaeffectapi.perkey.{PerKeyGaugeFactory, PerKeyMetric} import scala.collection.concurrent.TrieMap class PerKeyGaugeFactoryImpl[F[_]...
avast/metrics
scala-effect-api/src/main/scala/com/avast/metrics/scalaeffectapi/perkey/impl/PerKeyGaugeFactoryImpl.scala
Scala
mit
1,788
class T[+A](a:A) {} object Main { def main(args: Array[String]) { } }
tobast/compil-petitscala
tests/typing/good/testfile-variance-4.scala
Scala
gpl-3.0
71
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.api.i18n import java.util.Locale import javax.inject.Inject import javax.inject.Provider import javax.inject.Singleton import play.api.Configuration import play.api.Logger import scala.util.Try import scala.util.control.NonFatal import ...
mkurz/playframework
core/play/src/main/scala/play/api/i18n/Langs.scala
Scala
apache-2.0
5,858
package lore.compiler.assembly import java.nio.file.Path case class AssembledFragment(path: Path, bytecode: Array[Byte])
marcopennekamp/lore
compiler/src/lore/compiler/assembly/AssembledFragment.scala
Scala
mit
123
package com.github.mijicd.waes.features import com.github.mijicd.waes.TestSpec import com.github.mijicd.waes.api.Diffs import com.github.mijicd.waes.domain.{DataKeeper, DiffResult} import com.github.mijicd.waes.representations.{Data, JsonFormats} import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner i...
mijicd/spray-json-diff
src/test/scala/com/github/mijicd/waes/features/ComparingContent.scala
Scala
mit
3,223
package com.blinkbox.books.spray import org.joda.time.{DateTimeZone, DateTime} import org.joda.time.format.{DateTimeFormatterBuilder, ISODateTimeFormat} import spray.httpx.unmarshalling._ import scala.util.control.NonFatal package object unmarshalling { /** * Deserializer to parse BigDecimal values in query par...
blinkboxbooks/common-spray.scala
src/main/scala/com/blinkbox/books/spray/unmarshalling/package.scala
Scala
mit
1,196
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
jedesah/Quasar
foundation/src/test/scala/quasar/time/DateGenerators.scala
Scala
apache-2.0
5,135
package com.github.tminglei.slickpg import org.scalatest.funsuite.AnyFunSuite import slick.basic.Capability import slick.jdbc.JdbcCapabilities import scala.concurrent.Await import scala.concurrent.duration._ class PgUpsertSuite extends AnyFunSuite with PostgresContainer { object MyPostgresProfile extends ExPostgr...
tminglei/slick-pg
core/src/test/scala/com/github/tminglei/slickpg/PgUpsertSuite.scala
Scala
bsd-2-clause
14,386
package com.ligadata.KamanjaManager import com.ligadata.KamanjaBase._ import com.ligadata.InputOutputAdapterInfo.{ ExecContext, InputAdapter, OutputAdapter, ExecContextObj, PartitionUniqueRecordKey, PartitionUniqueRecordValue } import scala.reflect.runtime.{ universe => ru } import scala.util.control.Breaks._...
traytonwhite/Kamanja
trunk/KamanjaManager/src/main/scala/com/ligadata/KamanjaManager/KamanjaManager.scala
Scala
apache-2.0
28,692
package com.arcusys.valamis.web.service import java.awt.image.BufferedImage import java.awt.{AlphaComposite, RenderingHints} import java.io.{ByteArrayInputStream, ByteArrayOutputStream, InputStream} import javax.imageio.ImageIO import org.slf4j.LoggerFactory trait ImageProcessor { def resizeImage(data: Array[Byte]...
arcusys/Valamis
valamis-portlets/src/main/scala/com/arcusys/valamis/web/service/ImageProcessor.scala
Scala
gpl-3.0
2,745
/* * Copyright (c) 2015 Contributor. All rights reserved. */ package org.scalaide.debug.internal.expression package proxies.phases import scala.reflect.runtime.universe import scala.tools.reflect.ToolBox import org.scalaide.debug.internal.expression.AstTransformer /** * Replaces all occurrences of `ClassTag` clas...
dragos/scala-ide
org.scala-ide.sdt.debug.expression/src/org/scalaide/debug/internal/expression/proxies/phases/FixClassTags.scala
Scala
bsd-3-clause
1,367
/* * Twitter Korean Text - Scala library to process Korean text * * 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/...
iluxa-com/twitter-korean-text
src/main/scala/com/twitter/penguin/korean/util/KoreanConjugation.scala
Scala
apache-2.0
11,054
/** * SparklineData, Inc. -- http://www.sparklinedata.com/ * * Scala based Audience Behavior APIs * * Copyright 2014-2015 SparklineData, 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 Lice...
cubefyre/audience-behavior-semantic-etl
etl/src/main/scala/org/sparkline/etl/operators/SelectColumns.scala
Scala
apache-2.0
1,719
/* * 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/hive/src/test/scala/org/apache/spark/sql/hive/ParquetPartitioningTest.scala
Scala
apache-2.0
7,670
package io.swagger.client.model case class ConversionStep ( /* ADD or MULTIPLY */ operation: String, /* This specifies the order of conversion steps starting with 0 */ value: Double)
QuantiModo/QuantiModo-SDK-Scala
src/main/scala/io/swagger/client/model/ConversionStep.scala
Scala
gpl-2.0
198
/* * Copyright (c) 2013 Daniel Krzywicki <daniel.krzywicki@agh.edu.pl> * * 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 ...
eleaar/scala-mas
core/src/main/scala/pl/edu/agh/scalamas/mas/RootEnvironment.scala
Scala
mit
3,348
package org.puma.generator import org.puma.configuration.ConfigurationUtil /** * Project: puma * Package: org.puma.generator * * Author: Sergio Álvarez * Date: 03/2014 */ object GeneratorFactory { def get:Generator = { val mode = ConfigurationUtil.getMode mode match { case "scoreGenerator" => ne...
sergio-alvarez/puma
src/main/scala/org/puma/generator/GeneratorFactory.scala
Scala
apache-2.0
460
/* * 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 ...
ksattler/piglet
src/main/scala/dbis/pig/op/Join.scala
Scala
apache-2.0
2,251
package com.bigchange.train import org.apache.spark.mllib.classification.NaiveBayes import org.apache.spark.mllib.linalg.Vectors import org.apache.spark.mllib.regression.LabeledPoint import org.apache.spark.rdd.RDD import org.apache.spark.{SparkConf, SparkContext} /** * Created by C.J.YOU on 2016/5/9. * 用于数值识别的贝叶...
bigchange/AI
src/main/scala/com/bigchange/train/DigitRecognizer.scala
Scala
apache-2.0
1,831
package x import a._ class f class g( ) extends k { def foo( ) = return <caret>true } /* do false for if new null return super this throw true try while */
JetBrains/intellij-scala
scala/scala-impl/testdata/keywordCompletion/generatedTests/autoTest_82.scala
Scala
apache-2.0
168
class X(val y: String) class Y(y: => String) extends X(y) class Z(z: => String) extends X(z)
som-snytt/dotty
tests/pos/i1776.scala
Scala
apache-2.0
93
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * 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 * * https://www.apache.org/licenses/LICENSE...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/feats/HalfElfDilettanteFighter.scala
Scala
apache-2.0
2,107
/** * Copyright 2015 Mohiva Organisation (license at mohiva dot 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 req...
cemcatik/play-silhouette
silhouette/test/com/mohiva/play/silhouette/impl/providers/oauth2/state/CookieStateSpec.scala
Scala
apache-2.0
8,374
package org.jetbrains.plugins.scala.testingSupport.test.ui import java.awt.BorderLayout import java.util import com.intellij.execution.ExecutionBundle import com.intellij.execution.ui.CommonProgramParametersPanel import com.intellij.ide.`macro`.MacrosDialog import com.intellij.openapi.ui.LabeledComponent import com.in...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/testingSupport/test/ui/CommonScalaParametersPanel.scala
Scala
apache-2.0
2,619
/*********************************************************************** * 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 ...
mdzimmerman/geomesa
geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/accumulo/ingest/RasterIngest.scala
Scala
apache-2.0
3,343
package chana.avro import org.apache.avro.generic.GenericData import org.apache.avro.generic.GenericRecordBuilder object AvroRecords { val schema = Schemas.account val chargeRecordsSchema = schema.getField(Schemas.CHARGE_RECORDS).schema val chargeRecordSchema = Schemas.chargeRecord val appInfoSchema = Schemas...
wandoulabs/chana
chana-avro/src/test/scala/chana/avro/AvroRecords.scala
Scala
apache-2.0
1,774
package org.openurp.edu.eams.core object CommonAuditState extends Enumeration { val UNSUBMITTED = new CommonAuditState("未提交") val SUBMITTED = new CommonAuditState("已提交") val ACCEPTED = new CommonAuditState("通过") val REJECTED = new CommonAuditState("不通过") class CommonAuditState(val fullName: String) exte...
openurp/edu-eams-webapp
core/src/main/scala/org/openurp/edu/eams/core/CommonAuditState.scala
Scala
gpl-3.0
574
package scala.pickling.test.sealedtraitstaticannotated import scala.pickling._ import scala.pickling.static._ import scala.pickling.json._ import Defaults.{ stringPickler, intPickler, refPicklerUnpickler, nullPickler } import Defaults.{ pickleOps, unpickleOps } import org.scalatest.FunSuite // we are skipping RedOrO...
scala/pickling
core/src/test/scala/scala/pickling/generation/SealedTraitStaticAnnotatedTest.scala
Scala
bsd-3-clause
3,419
trait Nat case class S(x: Nat) extends Nat case class Z() extends Nat trait Sum[+S1, +S2] case class Fst[+F](x: F) extends Sum[F, Nothing] case class Snd[+S](x: S) extends Sum[Nothing, S] trait shaped[SH1, SH2] { def toShape(x: SH1): SH2 def fromShape(x: SH2): SH1 } object Test { type NatShape = Sum[Nat, Z] ...
lampepfl/dotty
tests/run/lazy-implicit-nums.scala
Scala
apache-2.0
1,267
/*********************************************************************** * 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-fs/geomesa-fs-storage/geomesa-fs-storage-parquet/src/test/scala/org/locationtech/geomesa/parquet/ParquetFSTest.scala
Scala
apache-2.0
4,949
package io.circe.generic.codec import io.circe.{ Codec, Decoder, DecodingFailure, HCursor, JsonObject } import io.circe.generic.Deriver import scala.language.experimental.macros import shapeless.HNil /** * A codec for a generic representation of a case class or ADT. * * Note that users typically will not work with...
travisbrown/circe
modules/generic/shared/src/main/scala-2/io/circe/generic/codec/ReprAsObjectCodec.scala
Scala
apache-2.0
816
/* * Copyright University of Basel, Graphics and Vision Research Group * * 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 ...
unibas-gravis/scalismo-faces
src/main/scala/scalismo/faces/parameters/SceneParameter.scala
Scala
apache-2.0
7,202
/* * Copyright (c) 2017 Clement Trosa <me@trosa.io> * * 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...
iomonad/avian
src/main/scala/io/trosa/avian/Types.scala
Scala
mit
1,412
/* * 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.jsinterop impor...
nicolasstucki/scala-js
test-suite/js/src/test/scala/org/scalajs/testsuite/jsinterop/TupleTest.scala
Scala
apache-2.0
14,856
/* * 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/src/main/scala/org/scalatest/events/Event.scala
Scala
apache-2.0
112,184
package wandou.util.pinyin /** * Contains the utility functions supporting text processing * * */ object TextHelper { /** * @param hanyuPinyinWithToneNumber * @return Hanyu Pinyin string without tone number */ def extractToneNumber(hanyuPinyinWithToneNumber: String): String = hanyuP...
wandoulabs/wandou-math
wandou-util/src/main/scala/wandou/util/pinyin/TextHelper.scala
Scala
apache-2.0
634
package util import java.io.File import java.nio.file.{Path, Paths} import com.typesafe.config.{Config => TypeSafeConfig, ConfigFactory} import net.ceedubs.ficus.Ficus._ /** * @author ynupc * Created on 2016/07/25 */ object Config { final private[this] var config: TypeSafeConfig = ConfigFactory.load(...
ynupc/scalastringcourseday3
src/main/scala/util/Config.scala
Scala
apache-2.0
1,030
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/feature/transform/vision/image/augmentation/Brightness.scala
Scala
apache-2.0
1,951
/* * 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 ...
guoxiaolongzte/spark
core/src/test/scala/org/apache/spark/scheduler/CoarseGrainedSchedulerBackendSuite.scala
Scala
apache-2.0
4,648
/** * Copyright 2015 Lorand Szakacs * * 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...
lorandszakacs/sg-downloader
sg-harvester/src/test/scala/com/lorandszakacs/sg/contentparser/data/sgSetPagesHTMLs.scala
Scala
apache-2.0
5,514
package org.vitrivr.adampro.data.entity import org.apache.spark.sql.SaveMode import org.apache.spark.sql.functions._ import org.vitrivr.adampro.data.datatypes.vector.SparseVectorWrapper import org.vitrivr.adampro.data.datatypes.vector.Vector.{DenseSparkVector, VectorBase} import org.vitrivr.adampro.utils.exception.Gen...
dbisUnibas/ADAMpro
src/main/scala/org/vitrivr/adampro/data/entity/SparsifyHelper.scala
Scala
mit
2,697
package com.ulb.code.wit.main import org.apache.spark._ import org.apache.spark.graphx._ import org.apache.spark.graphx.lib._ import org.apache.spark.rdd.RDD import org.apache.log4j.Logger import org.apache.log4j.Level import scala.io.Source import scala.util.control.Breaks.break import scala.collection.mutable.HashMap...
rohit13k/NeighborhoodProfileDistributed
src/com/ulb/code/wit/main/ConnectedComponentBatch.scala
Scala
apache-2.0
33,609
/* * 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/OptionShouldContainOneElementOfLogicalOrSpec.scala
Scala
apache-2.0
30,177
package com.avast.cactus.v3.test import com.avast.cactus.{checkDoesNotCompile, checkCompiles, Converter} import com.avast.cactus.v3.TestMessageV3.Data4 import org.scalatest.FunSuite class WrappersToAnythingTest extends FunSuite { test("wrappers to anything") { checkCompiles { """ |import com.avast...
avast/cactus
gpbv3/src/test/scala/com/avast/cactus/v3/test/WrappersToAnythingTest.scala
Scala
apache-2.0
9,631
package com.github.jeroenr.tepkin.protocol.command import com.github.jeroenr.bson.BsonDsl._ import com.github.jeroenr.bson.BsonDocument /** * Explicitly creates a collection. * * @param collectionName The name of the new collection. * @param capped Optional. To create a capped collection. specify true. If you spe...
jeroenr/tepkin
tepkin/src/main/scala/com/github/jeroenr/tepkin/protocol/command/Create.scala
Scala
apache-2.0
3,159
/* Copyright 2013 Lance Gatlin Author: lance.gatlin@gmail.com This file is part of org.s_mach library. org.s_mach library 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...
lancegatlin/s_mach.fsm
src/main/scala/org/s_mach/Plan/package.scala
Scala
gpl-3.0
4,288
package controllers import javax.inject.{Inject, Singleton} import play.api.i18n.{I18nSupport, MessagesApi} import play.api.mvc.{Action, AnyContent, Controller} @Singleton class HomeController @Inject()(val messagesApi: MessagesApi) extends Controller with I18nSupport { def index: Action[AnyContent] = Action { im...
j5ik2o/forseti
app/resource-server/app/controllers/HomeController.scala
Scala
mit
371
// Copyright (C) 2015 ENSIME Authors // License: GPL 3.0 package org.ensime.util import Predef.{ any2stringadd => _, _ => _ } package object list { implicit class RichList[T](val list: List[T]) extends AnyVal { // two list creations. Could be optimised to an array and a list creation /** * @return ev...
eddsteel/ensime
util/src/main/scala/org/ensime/util/list.scala
Scala
gpl-3.0
1,250
package com.github.daenyth.taklib import cats.scalatest.EitherValues import org.scalatest.{FlatSpec, Matchers} class TpsParserTest extends FlatSpec with Matchers with EitherValues { "A size 6 board empty board" should "be parsed" in { Board.fromTps("x6/x6/x6/x6/x6/x6 1 1").value shouldEqual Board.ofSize(6) } ...
Daenyth/taklib
taklib/src/test/scala/com/github/daenyth/taklib/TpsParserTest.scala
Scala
agpl-3.0
430
package jmh import org.openjdk.jmh.annotations._ import scala.offheap._ @State(Scope.Thread) class GCBinaryTree { @Param(scala.Array("20")) var n: Int = _ @Benchmark def run = GCHeap.run(n) } @State(Scope.Thread) class OffheapBinaryTree { @Param(scala.Array("20")) var n: Int = _ @Benchmark def run ...
volodarsky/scala-offheap
jmh/src/main/scala/BinaryTree.scala
Scala
bsd-3-clause
2,135
/* * Copyright 2015 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 agreed t...
jasimmk/atlas
atlas-core/src/main/scala/com/netflix/atlas/core/db/MemoryDatabase.scala
Scala
apache-2.0
7,163
/* * 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/nisp-frontend
app/uk/gov/hmrc/nisp/utils/DateProvider.scala
Scala
apache-2.0
814
package com.saikocat.meownificent.error import spray.routing._ import spray.routing.directives.RouteDirectives._ import spray.http.StatusCodes trait ApiRejectionHandler { implicit val apiRejectionHandler = RejectionHandler { case MalformedHeaderRejection(headerName, msg, _) :: _ => complete(StatusCodes.No...
saikocat/meownificent
rest/src/main/scala/com/saikocat/meownificent/error/ApiRejectionHandler.scala
Scala
mit
344
package common.protocol /** * Staffing Service Interaction Protocol. * @author dbolene */ object StaffingServiceProtocol { case class StaffingRequest(requestedStaff: Int) case class StaffingResponse(staffProvided: Int) } object StaffingService { val endpointName = "StaffingService" }
dbolene/BobWilsonsGarage
common/src/main/scala/common/protocol/StaffingServiceProtocol.scala
Scala
apache-2.0
298
/*********************************************************************** * Copyright (c) 2013-2019 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
elahrvivaz/geomesa
geomesa-convert/geomesa-convert-common/src/main/scala/org/locationtech/geomesa/convert2/transforms/EnrichmentCacheFunctionFactory.scala
Scala
apache-2.0
1,135
package jvmsnippets.xrecords.scala.util /** * Assorted validation checks. */ object Checks { def checkEqual[A](left: A, right: A, message: String = "Values must be equal and non-null"): Unit = { if (left == null || right == null) { throw new NullPointerException("Neither argument ca...
jvmsnippets/jvmsnippets-examples
xrecords/scala-xrecords/src/main/scala/jvmsnippets/xrecords/scala/util/Checks.scala
Scala
apache-2.0
803
/* * 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 ...
aokolnychyi/spark
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala
Scala
apache-2.0
8,341
/* * Copyright (c) 2019. Lorem ipsum dolor sit amet, consectetur adipiscing elit. * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagi...
BiyuHuang/CodePrototypesDemo
demo/ScalaDemo/src/main/scala/com/wallace/demo/app/actordemo/master_worker/Master.scala
Scala
apache-2.0
6,729
/* * 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
support/src/main/scala/org/beangle/webmvc/support/action/EntityAction.scala
Scala
lgpl-3.0
6,862
package fr.njin.playoauth.common.domain import java.time.Instant import fr.njin.playoauth.common.OAuth import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration /** * Represents the oauth2 token */ trait OauthToken extends OauthTokenBase { /** * @return the value of the token */ def a...
giabao/play-oauth
common/src/main/scala/fr/njin/playoauth/common/domain/OauthToken.scala
Scala
apache-2.0
1,512
package fpinscala.laziness import org.scalatest.{FreeSpec, Matchers} import fpinscala.laziness.Stream._ import scala.util.Random class StreamSpec extends FreeSpec with Matchers { def randomInts: Stream[Int] = cons(Random.nextInt(), randomInts) "Stream.apply is not lazy" in { var c = 0 val s: Stream[Int...
lshlyapnikov/fpinscala
exercises/src/test/scala/fpinscala/laziness/StreamSpec.scala
Scala
mit
8,471
package sample import java.util.UUID import akka.actor.Props import akka.pattern.{ask, pipe} import akka.util.Timeout import com.github.levkhomich.akka.tracing.TracingSupport import scala.concurrent.duration._ case class GetUserInfoMsg(id: String, path: String) extends TracingSupport case class GetUserInfoRs(info:...
UniersKang/AkkaTracingExample
src/main/scala/sample/UserAction.scala
Scala
gpl-2.0
1,544
package com.enginyoyen.statsd.utils import scala.util._ /** * Created by Engin Yoeyen on 01/09/14. */ object StringUtils { def lineSeparator = Properties.lineSeparator /** * Generates a graphite message format * <p>Example : "foo.bar.baz 42 74857843" where the last number is a UNIX epoch time.</p> * ...
enginyoyen/statsd-scala-server
src/main/scala/com/enginyoyen/statsd/utils/StringUtils.scala
Scala
mit
846
/* * Copyright © 2014 TU Berlin (emma@dima.tu-berlin.de) * * 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 app...
emmalanguage/emma
emma-language/src/test/scala/org/emmalanguage/test/schema/Marketing.scala
Scala
apache-2.0
1,704
package com.circusoc.simplesite.members class MemberGenerator { }
ririw/circusoc-backend
src/test/scala/com/circusoc/simplesite/members/MemberGenerator.scala
Scala
agpl-3.0
67
/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package viper.silver.testing import java.nio.file.{Files, Path} /** * The result of parsing the ...
sccblom/vercors
viper/silver/src/main/scala/viper/silver/testing/TestAnnotations.scala
Scala
mpl-2.0
6,738
package uk.ac.ncl.openlab.intake24.foodsql.modular import java.util.UUID import anorm.NamedParameter.symbol import anorm.{AnormUtil, Macro, NamedParameter, SQL, SqlParser, sqlToSimple} import org.apache.commons.lang3.StringUtils import org.postgresql.util.PSQLException import org.slf4j.LoggerFactory import uk.ac.ncl....
digitalinteraction/intake24
FoodDataSQL/src/main/scala/uk/ac/ncl/openlab/intake24/foodsql/modular/FoodsAdminQueries.scala
Scala
apache-2.0
13,110
package chat.tox.antox.activities import android.content.Intent import android.content.pm.ActivityInfo import android.media.AudioManager import android.os.{Build, Bundle} import android.support.v4.app.FragmentActivity import android.view.{View, ViewAnimationUtils, ViewTreeObserver, WindowManager} import android.widget...
subliun/Antox
app/src/main/scala/chat/tox/antox/activities/CallActivity.scala
Scala
gpl-3.0
6,330
package mountainrangepvp.net.tcp import io.netty.buffer.ByteBuf import io.netty.channel.{ChannelHandlerContext, SimpleChannelInboundHandler} import mountainrangepvp.engine.Log import mountainrangepvp.net._ /** * Decodes messages from the server. */ class ClientSideMessageHandler(log: Log, client: ClientInterface) e...
thorinii/MountainRangePvP
src/main/scala/mountainrangepvp/net/tcp/ClientSideMessageHandler.scala
Scala
mit
970
package chee import better.files._ import chee.crypto.CryptMethod import chee.FileOps.Result package cli { case class ResultCount private (counter: Map[Result, Int]) { def inc(r: Result): ResultCount = { ResultCount(counter + (r -> (get(r) + 1))) } def get(r: Result): Int = counter(r) } objec...
eikek/chee
src/main/scala/chee/cli/package.scala
Scala
gpl-3.0
2,676
/* * Values.scala * Lazily compute the range of values of elements. * * Created By: Avi Pfeffer (apfeffer@cra.com) * Creation Date: Dec 27, 2013 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email figaro@cra.com for information. * * See http://www....
bruttenberg/figaro
Figaro/src/main/scala/com/cra/figaro/algorithm/lazyfactored/LazyValues.scala
Scala
bsd-3-clause
17,910
/*********************************************************************** * Copyright (c) 2013-2017 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...
ronq/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/index/BucketIndexTest.scala
Scala
apache-2.0
3,905
import scala.concurrent._ object Test { def f: Int = x; val x: Int = f; { def f: Int = x; val x: Int = f; } { def f: Int = g; val x: Int = f; def g: Int = x; } { def f: Int = g; var x: Int = f; def g: Int = x; } { def f: Int = g; Console.println("foo"); de...
scala/scala
test/files/neg/forward.scala
Scala
apache-2.0
513
/* * 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/src/main/scala/org/scalatest/tools/SuiteDiscoveryHelper.scala
Scala
apache-2.0
10,813
package com.github.chengpohi.model /** * Fetch Item * Created by chengpohi on 3/18/16. */ case class FetchItem(url: String, indexName: String, indexType: String, selectors: List[FieldSelector], urlRegex: Option[String] = None) { def filterByRule(): Boolean = { false } def filterOrFetch(fetch: (FetchItem)...
chengpohi/secer
indexer/src/main/scala/com/github/chengpohi/model/FetchItem.scala
Scala
apache-2.0
421
/* * Copyright (c) 2012-2019 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.ap...
RetentionGrid/snowplow
3-enrich/spark-enrich/src/test/scala/com.snowplowanalytics.snowplow.enrich.spark/good/CljTomcatCallrailEventSpec.scala
Scala
apache-2.0
5,378