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
/* * 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. */ import scala.util.parsing.comb...
scala/scala-parser-combinators
shared/src/test/scala/scala/util/parsing/combinator/t1229.scala
Scala
apache-2.0
811
/* * The MIT License * * Copyright (c) 2019 Fulcrum Genomics LLC * * 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 us...
fulcrumgenomics/fgbio
src/test/scala/com/fulcrumgenomics/vcf/api/AlleleTest.scala
Scala
mit
2,887
package com.lkroll.ep.mapviewer.graphics import com.lkroll.ep.mapviewer.datamodel.{Bathyscaphe => BathyscapheData, AstronomicalObject} import com.lkroll.ep.mapviewer.{ExtObject3D, Main, SceneContainer} import org.denigma.threejs._ import scala.scalajs.js import js.JSConverters._ import squants._ import squants.space...
Bathtor/ep-explorer
src/main/scala/com/lkroll/ep/mapviewer/graphics/Bathyscaphe.scala
Scala
mit
2,129
/* * Copyright 2016 MongoDB, 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...
jCalamari/mongo-scala-driver
driver/src/main/scala/org/mongodb/scala/gridfs/GridFSFindObservable.scala
Scala
apache-2.0
4,339
/* * Copyright (c) 2015 Robert Conrad - All Rights Reserved. * Unauthorized copying of this file, via any medium is strictly prohibited. * This file is proprietary and confidential. * Last modified by rconrad, 1/4/15 7:16 PM */ package base.entity.user.mock import java.util.UUID import base.common.random.Random...
robconrad/base-api
project-entity/src/test/scala/base/entity/user/mock/UserServiceMock.scala
Scala
mit
2,492
package org.bitcoins.spvnode.messages.control import org.bitcoins.spvnode.gen.ControlMessageGenerator import org.scalacheck.{Prop, Properties} /** * Created by chris on 7/20/16. */ class FilterLoadMessageSpec extends Properties("FilterLoadMessageSpec") { property("Serialization symmetry") = Prop.forAll(Con...
Christewart/bitcoin-s-spv-node
src/test/scala/org/bitcoins/spvnode/messages/control/FilterLoadMessageSpec.scala
Scala
mit
435
/* ************************************************************************************* * 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...
jooooooon/rudder
rudder-core/src/main/scala/com/normation/rudder/services/marshalling/XmlUnserialisationImpl.scala
Scala
agpl-3.0
28,969
package warsztat.groups.dao import java.util.UUID import warsztat.groups.domain.Group import scala.concurrent.Future trait GroupDao { def saveGroup(group: Group): Future[Unit] def addUserToGroup(groupId: UUID, userId: UUID): Future[Unit] }
bjankie1/warsztat-scala
src/main/scala/warsztat/groups/dao/GroupDao.scala
Scala
apache-2.0
251
package com.gx.typeclasses /** * Copyright 2017 josephguan * * 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 require...
josephguan/scala-design-patterns
structural/type-classes/src/main/scala/com/gx/typeclasses/Speakable.scala
Scala
apache-2.0
698
package akka.ainterface.remote import akka.ainterface.datatype._ import akka.ainterface.datatype.interpolation._ import akka.ainterface.test.arbitrary.AinterfaceArbitrary._ import org.scalacheck.Arbitrary.arbitrary import org.scalacheck.{Arbitrary, Gen} class SendSpec extends BaseSpec { // TODO: tests all formats ...
ainterface/ainterface
ainterface-integration-test/src/test/scala/akka/ainterface/remote/SendSpec.scala
Scala
apache-2.0
1,319
package fr.hurrycane.routes import akka.actor.ActorRef import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server.Route import akka.http.scaladsl.server.directives.MethodDirectives.{ get, post } import akka.http.scaladsl.server.directives.PathDirectives.p...
haris44/Bot-API
src/main/scala/fr/hurrycane/routes/MessageRoutes.scala
Scala
bsd-3-clause
2,231
package com.whisk.docker.testkit import java.nio.charset.StandardCharsets import java.util.concurrent.TimeUnit import com.google.common.io.Closeables import com.spotify.docker.client.DockerClient.{AttachParameter, RemoveContainerParam} import com.spotify.docker.client.messages._ import com.spotify.docker.client.{Dock...
whisklabs/docker-it-scala
core/src/main/scala/com/whisk/docker/testkit/ContainerCommandExecutor.scala
Scala
mit
3,824
package opentrack.jp.journey import opentrack.jp.station.CRS case class CallingPoint(station: CRS, arrivalTime: Option[Int], departureTime: Option[Int])
open-track/journey-planner-scala
app/opentrack/jp/journey/CallingPoint.scala
Scala
gpl-3.0
155
/* * 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
enumeratum/core/shared/src/test/scala/kantan/codecs/enumeratum/values/LongEnumCodecTests.scala
Scala
apache-2.0
1,257
package code.snippet import _root_.scala.xml.{NodeSeq, Text} import _root_.net.liftweb.util._ import _root_.net.liftweb.mapper._ import _root_.net.liftweb.common._ import _root_.net.liftweb.http.S import net.liftweb.http.{S,DispatchSnippet,Paginator,PaginatorSnippet, SortedPaginator,SortedPaginatorSnippet} import ...
scsibug/fermata
src/main/scala/code/snippet/Messages.scala
Scala
bsd-3-clause
2,825
package com.teamisotope.techexpansion.util import net.minecraft.client.resources.I18n import net.minecraft.entity.player.EntityPlayer import net.minecraft.util.text.{TextComponentString, TextFormatting} import net.minecraftforge.event.entity.EntityJoinWorldEvent import net.minecraftforge.fml.common.eventhandler.Subscr...
collaborationmods/TechExpansion
src/main/scala/com/teamisotope/techexpansion/util/Handlers.scala
Scala
gpl-3.0
465
package ch09 /* * 3. Write a Scala code snippet that reads a file and prints all words * with more than 12 characters to the console. Extra credit if you can * do this in a single line. * */ import scala.io.Source object ex03 extends App { var fileName = "" if (args.length < 1) { println("No input from ...
tuxdna/scala-for-the-impatient-exercises
src/main/scala/ch09/ex03.scala
Scala
apache-2.0
538
/* The MIT License (MIT) Copyright (c) 2014 Martin Snyder 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 u...
MartinSnyder/scala-transactional-datastore
inmemory_store/src/test/scala/com/martinsnyder/datastore/test/ConstraintAndTransactionTest.scala
Scala
mit
5,489
package monocle.std import monocle.TestUtil._ import monocle.law.PrismLaws import org.specs2.scalaz.Spec class TheseSpec extends Spec { checkAll("These - Disjunction" , PrismLaws( theseDisjunction[Int, String])) }
CapeSepias/Monocle
test/src/test/scala/monocle/std/TheseSpec.scala
Scala
mit
218
package ru.dgolubets.reactjs.server.actors import java.io.{File, PrintWriter} import java.nio.file.Files import scala.language.postfixOps import io.circe.Json import org.scalatest._ import ru.dgolubets.reactjs.server._ /** * Integration tests for RenderActor actor. */ class RenderServerActorSpec extends WordSpec w...
DGolubets/reactjs-server
src/test/scala/ru/dgolubets/reactjs/server/actors/RenderServerActorSpec.scala
Scala
mit
3,406
package com.bazaarvoice.sswf import com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient import com.amazonaws.services.simpleworkflow.model._ import com.bazaarvoice.sswf.model.history.StepsHistory import com.bazaarvoice.sswf.model.result.{InProgress, StepResult, Success} import com.bazaarvoice.sswf.model.{...
bazaarvoice/super-simple-workflow
sswf-core/src/it/scala/com/bazaarvoice/sswf/WaitTimeTest.scala
Scala
apache-2.0
8,984
package com.github.mdr.mash.parser import com.github.mdr.mash.lexer.{ LexerResult, MashLexer } import com.github.mdr.mash.parser.ConcreteSyntax.Program import com.github.mdr.mash.utils.PointedRegion import scala.language.implicitConversions case class ParseError(message: String, location: PointedRegion) object Mash...
mdr/mash
src/main/scala/com/github/mdr/mash/parser/MashParser.scala
Scala
mit
1,159
package com.socrata.datacoordinator.secondary.feedback import java.io.IOException import com.rojoma.json.util.JsonArrayIterator.ElementDecodeException import com.rojoma.json.v3.ast.{JArray, JObject, JString, JValue} import com.rojoma.json.v3.codec.{DecodeError, JsonDecode} import com.rojoma.json.v3.io.{JValueEventIte...
socrata-platform/data-coordinator
secondarylib-feedback/src/main/scala/com/socrata/datacoordinator/secondary/feedback/DataCoordinatorClient.scala
Scala
apache-2.0
14,718
/* * DecisionVariableElimination.scala * Variable elimination for Decisions algorithm. * * Created By: Brian Ruttenberg (bruttenberg@cra.com) * Creation Date: Oct 1, 2012 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email figaro@cra.com for informati...
wkretschmer/figaro
Figaro/src/main/scala/com/cra/figaro/algorithm/decision/DecisionVariableElimination.scala
Scala
bsd-3-clause
11,770
package pkg { trait B extends A class C extends B } object Test { def test1: Unit = { val c = new pkg.C c.foo() // OK val b: pkg.B = c b.foo() // error: Unable to emit reference to method foo in class A, class A is not accessible in object Test } val c2 = new pkg.C c2.foo() // OK val b2:...
dotty-staging/dotty
tests/neg/java-trait-access/B.scala
Scala
apache-2.0
447
import org.junit._ import Assert._ import tu.coreservice.spellcorrector.{SpellCorrectorGoogle, SpellCorrector} @Test class CorrectorTest { @Test def testCompoundCorrector() = { //Hello world test var corrector = SpellCorrector.apply() var test = corrector.correctSentence("The wrld are red") asser...
keskival/2
coreservice.spellcorrector/src/test/scala/CorrectorTest.scala
Scala
gpl-3.0
1,305
package com.phaller.rasync.npv class StatsCollector(min: Double, max: Double, numBuckets: Int) { var instances: Int = 1 private val range: Double = max - min private var mean: Double = 0 private var numObs: Int = 0 val buckets: Array[Int] = Array.ofDim[Int](numBuckets) def addObs(obs: Double): Unit = { ...
phaller/reactive-async
monte-carlo-npv/src/main/scala/com/phaller/rasync/npv/StatsCollector.scala
Scala
bsd-2-clause
1,605
import org.scalatest._ import scala.xml.transform._ import scala.xml._ class XMLSpec extends FlatSpec { val xml = <root><sub horse="Steed">Gumby</sub></root> "our xml" should "have a gumby attribute" in { assert((xml \\ "sub").text == "Gumby") assert((xml \\\\ "@horse").text == "Steed") object Chan...
delving/play-oscr
test/XMLSpec.scala
Scala
apache-2.0
859
/* _____ _ * | ___| __ __ _ _ __ ___ (_) __ _ _ __ * | |_ | '__/ _` | '_ ` _ \\| |/ _` | '_ \\ * | _|| | | (_| | | | | | | | (_| | | | | * |_| |_| \\__,_|_| |_| |_|_|\\__,_|_| |_| * * Copyright 2014 Pellucid Analytics * * Licensed under the Apache License, Version 2.0 (the "License"); *...
codeaudit/framian
framian/src/main/scala/framian/Rec.scala
Scala
apache-2.0
2,823
import javax.inject._ import play.api._ import play.api.http.HttpFilters import play.filters.csrf.CSRFFilter /** * This class configures filters that run on every request. This * class is queried by Play to get a list of filters. * * Play will automatically use filters from any class called * `Filters` that is p...
orendain/trucking-iot
web-application/backend/app/Filters.scala
Scala
apache-2.0
826
/* * 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/test/scala/com/intel/analytics/bigdl/dllib/nn/SpatialWithinChannelLRNSpec.scala
Scala
apache-2.0
7,495
/* * 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 ...
jkbradley/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/MutableProjectionSuite.scala
Scala
apache-2.0
3,906
package mesosphere.marathon import java.io.FileInputStream import com.google.protobuf.ByteString import org.apache.mesos.Protos.{Credential, FrameworkID, FrameworkInfo} import org.apache.mesos.{MesosSchedulerDriver, Scheduler, SchedulerDriver} import FrameworkInfo.Capability import com.typesafe.scalalogging.StrictLog...
gsantovena/marathon
src/main/scala/mesosphere/marathon/MarathonSchedulerDriver.scala
Scala
apache-2.0
4,669
package com.p44.models import play.api.libs.json._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future case class Fish(name: String, pounds: Double) object Fish { implicit val jsonWriter = Json.writes[Fish] // Json.toJson(obj): JsValue implicit val jsonReader = Json.reads[Fish...
p44/FishStore
app/com/p44/models/FishStoreModels.scala
Scala
apache-2.0
4,365
/* * 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 ...
hu17889/mllib_subpackage
src/main/scala/malgo/tree/model/LambdaDecisionTreeModel.scala
Scala
apache-2.0
12,322
package org.scalaide.debug.internal.breakpoints import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.atomic.AtomicReference import scala.collection.JavaConverters.mapAsScalaConcurrentMapConverter import scala.collection.Seq import scala.collection.concurrent import scala.concurrent.ExecutionConte...
stephenh/scala-ide
org.scala-ide.sdt.debug/src/org/scalaide/debug/internal/breakpoints/ScalaDebugBreakpointManager.scala
Scala
bsd-3-clause
7,248
/** * 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...
ErikKringen/kafka
core/src/main/scala/kafka/server/KafkaHealthcheck.scala
Scala
apache-2.0
4,460
package integrationtest import _root_.controller.Controllers import service._ import org.scalatra.test.scalatest._ import skinny._ import skinny.test.SkinnyTestSupport class MustacheControllerSpec extends ScalatraFlatSpec with SkinnyTestSupport { addFilter(Controllers.mustache, "/*") it should "show top page" i...
BlackPrincess/skinny-framework
example/src/test/scala/integrationtest/MustacheControllerSpec.scala
Scala
mit
533
/* * 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 ...
mlperf/training_results_v0.7
Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/tvm/vta/hardware/chisel/src/main/scala/core/TensorGemm.scala
Scala
apache-2.0
11,435
package com.twitter.summingbird.online import com.twitter.summingbird.memory.Memory import com.twitter.summingbird.planner.StripNamedNode import com.twitter.summingbird.{ Dependants, Producer, OptionMappedProducer, NamedProducer, Source, Summer } import org.scalatest.FunSuite import scala.collection.mutable.{ Map => M...
nabarunnag/Summingbird_dev
summingbird-online/src/test/scala/com/twitter/summingbird/online/StripNameTest.scala
Scala
apache-2.0
7,059
/* * 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 ...
ueshin/apache-spark
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/KubernetesClusterManager.scala
Scala
apache-2.0
6,780
/* * Copyright 2009-2011 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 applica...
pbrant/framework
web/webkit/src/test/scala/net/liftweb/webapptest/MemoizeSpec.scala
Scala
apache-2.0
2,200
/******************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright (c) 2013,2014 by Peter Pilgrim, Addiscombe, Surrey, XeNoNiQUe UK * * All rights reserved. This program and the accompanying materials * are made available under...
peterpilgrim/digital-scala-javaone-2014
src/main/scala/uk/co/xenonique/digitalone/simple/Traveller3.scala
Scala
gpl-3.0
1,428
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
caneGuy/spark
mllib/src/main/scala/org/apache/spark/ml/feature/VectorSlicer.scala
Scala
apache-2.0
7,193
/** * Copyright (C) 2013 Carnegie Mellon University * * 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 appl...
twmarshall/tdb
core/src/main/scala/tdb/list/PartitionedAggregatorList.scala
Scala
apache-2.0
1,674
/* __ *\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\___/_/ |_/...
cran/rkafkajars
java/scala/xml/parsing/DefaultMarkupHandler.scala
Scala
apache-2.0
1,081
/* * DecisionMetropolisHastings.scala * Decision Metropolis-Hastings sampler. * * Created By: Brian Ruttenberg (bruttenberg@cra.com) * Creation Date: Oct 1, 2012 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email figaro@cra.com for information. * ...
jyuhuan/figaro
Figaro/src/main/scala/com/cra/figaro/algorithm/decision/DecisionMetropolisHastings.scala
Scala
bsd-3-clause
9,842
/* sbt -- Simple Build Tool * Copyright 2011 Mark Harrah */ package sbt import java.io.File import java.net.URI import Def.{ displayFull, ScopedKey, ScopeLocal, Setting } import Attributed.data import BuildPaths.outputDirectory import Scope.GlobalScope import BuildStreams.Streams import Path._ final class BuildStru...
xeno-by/old-scalameta-sbt
main/src/main/scala/sbt/BuildStructure.scala
Scala
bsd-3-clause
12,210
package com.gilt.play.json.controllers import com.gilt.play.json.templates.JsonFormat import play.api.libs.concurrent.Execution.Implicits.defaultContext import play.api.libs.json.{Json, Writes} import play.api.mvc._ import play.mvc.Http import scala.concurrent.Future trait PaginatedController { /** Should generate...
gilt/play-json-service-lib
play-2.3/src/main/scala/com/gilt/play/json/controllers/JsonController.scala
Scala
mit
3,808
package org.apache.spark.streaming.talos.perfcounter import org.apache.spark.streaming.talos.perfcounter.CounterType.CounterType import org.json4s.JsonDSL._ import org.json4s.jackson.JsonMethods._ import scala.collection.mutable /** * Created by jiasheng on 19/12/2016. */ case class PerfBean( endpoint: String,...
XiaoMi/galaxy-sdk-java
galaxy-talos-client/galaxy-talos-spark/src/main/scala/org/apache/spark/streaming/talos/perfcounter/PerfBean.scala
Scala
apache-2.0
929
/* * Copyright (C) 2015 Stratio (http://stratio.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
Stratio/crossdata
core/src/main/scala/org/apache/spark/sql/crossdata/daos/EphemeralTableStatusMapDAO.scala
Scala
apache-2.0
1,434
package com.github.jeanadrien.evrythng.scala.rest import com.github.jeanadrien.evrythng.scala.json.EvtJsonProtocol._ import com.github.jeanadrien.evrythng.scala.json.{Collection, Ref, Thng} import com.typesafe.scalalogging.LazyLogging /** * */ class CollectionContext(collectionId : Ref, val apiKey : String, proje...
jeanadrien/evrythng-scala-sdk
src/main/scala/com/github/jeanadrien/evrythng/scala/rest/CollectionContext.scala
Scala
apache-2.0
1,751
/* * 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 ...
SparklineData/spark-druid-olap
src/test/scala/org/sparklinedata/druid/client/test/HLLTest.scala
Scala
apache-2.0
3,708
import quoted.* class Foo { class Bar def foo()(using Quotes) = { Type[Bar] // error } }
dotty-staging/dotty
tests/neg-macros/i7013b.scala
Scala
apache-2.0
100
package delta.hazelcast import scala.concurrent.duration.DurationInt import com.hazelcast.core.IAtomicLong import scuff.LamportClock import scuff.LamportClock.CASLong import scuff.concurrent.ScuffScalaFuture import delta.EventSource import delta.LamportTicker object AtomicLongLamportTicker { def apply(al: IAtomic...
nilskp/delta
delta-hazelcast/src/main/scala/delta/hazelcast/AtomicLongLamportTicker.scala
Scala
mit
744
/*********************************************************************** * Copyright (c) 2013-2020 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...
aheyne/geomesa
geomesa-features/geomesa-feature-kryo/src/main/scala/org/locationtech/geomesa/features/kryo/json/JsonPathFilterFunction.scala
Scala
apache-2.0
1,877
package org.scalaide.core.internal.builder.zinc import java.util.Optional import sbt.internal.inc.Analysis import xsbti.compile.AnalysisContents import xsbti.compile.CompileAnalysis import xsbti.compile.MiniSetup object AnalysisStore { import xsbti.compile.{ AnalysisStore => SbtAnalysisStore } def materializeLaz...
scala-ide/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/core/internal/builder/zinc/AnalysisStore.scala
Scala
bsd-3-clause
957
/* * 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...
monix/monix
monix-eval/shared/src/test/scala/monix/eval/CoevalRunSuite.scala
Scala
apache-2.0
2,440
package com.twitter.finagle.memcached.stress import com.twitter.finagle.Service import com.twitter.finagle.builder.ClientBuilder import com.twitter.finagle.memcached.integration.InProcessMemcached import com.twitter.finagle.memcached.protocol._ import com.twitter.finagle.memcached.protocol.text.Memcached import com.tw...
kristofa/finagle
finagle-memcached/src/test/scala/com/twitter/finagle/memcached/stress/InterpreterServiceTest.scala
Scala
apache-2.0
1,560
package wop package object game { type Point = (Int, Int) }
ognick/wizards-of-portal
core/src/main/scala/wop/game/package.scala
Scala
gpl-3.0
63
package rere.sasl.util import org.scalatest.FlatSpec import org.scalatest.Matchers._ class NoCommaStringTest extends FlatSpec { behavior of "NoCommaString" it should "provide correct equals implementation" in { new NoCommaString("abc") shouldBe new NoCommaString("abc") new NoCommaString("abc").equals("a...
pbaun/rere
modules/sasl/src/test/scala/rere/sasl/util/NoCommaStringTest.scala
Scala
apache-2.0
624
/** * 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...
noslowerdna/kafka
core/src/test/scala/unit/kafka/utils/MockScheduler.scala
Scala
apache-2.0
4,205
package notebook.io import scala.concurrent.Future import scala.util.{Failure, Success, Try} object FutureUtil { // remove when scala.version >= 2.11 def tryToFuture[T](t:Try[T]):Future[T] = t match { case Success(s) => Future.successful(s) case Failure(f) => Future.failed(f) } implicit class TryTo...
andypetrella/spark-notebook
modules/core/src/main/scala/notebook/io/FutureUtil.scala
Scala
apache-2.0
417
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
wangmiao1981/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/ExpressionTypeCheckingSuite.scala
Scala
apache-2.0
11,827
package com.github.symcal.dp import scala.annotation.tailrec import scala.reflect.ClassTag import spire.syntax.cfor._ /** Potentially very large ( > 2^31) array with fractal structure. * New memory allocations are limited to arrays of fixed base length. **/ final class Massif[@specialized(Int, Long) T: ClassTag]...
winitzki/dpnum
dpint/src/main/scala/com/github/symcal/dp/Massif.scala
Scala
apache-2.0
6,364
package mesosphere.marathon.upgrade import akka.actor.{ ActorRef, ActorSystem, Props } import akka.event.EventStream import akka.pattern.ask import akka.testkit.TestActor.{ AutoPilot, NoAutoPilot } import akka.testkit.{ TestActorRef, TestKit, TestProbe } import akka.util.Timeout import mesosphere.marathon.io.storage.S...
tnachen/marathon
src/test/scala/mesosphere/marathon/upgrade/DeploymentManagerTest.scala
Scala
apache-2.0
3,627
package cats.examples.typeclasses.semigroupsandmonads import cats._ import cats.implicits._ /** * Monoid extends Semigroup, adding an empty method, that returns a value that * can be combined with other values without modifying the other value. * * For example Monoid[String] may define empty as "", Monoid[Int...
carwynellis/cats-examples
src/main/scala/cats/examples/typeclasses/semigroupsandmonads/MonoidExample.scala
Scala
mit
1,761
package dotty.tools package dotc package printing import core._ import Texts._, ast.Trees._ import Types.{Type, SingletonType}, Symbols.Symbol, Scopes.Scope, Constants.Constant, Names.Name, Denotations._, Annotations.Annotation import typer.Implicits.SearchResult import util.SourcePosition import typer.ImportIn...
som-snytt/dotty
compiler/src/dotty/tools/dotc/printing/Printer.scala
Scala
apache-2.0
6,361
package scala_sample case class Color(red: Int, green: Int, blue: Int) object SimpleSample extends App { val red = Color(255, 0, 0) val green = Color(0, 255, 0) val blue = Color(0, 0, 255) println(s"red = $red, green = $green, blue = $blue") }
j5ik2o/scala-first-study
src/main/scala/scala_sample/SimpleSample.scala
Scala
mit
257
package org.jetbrains.plugins.scala package codeInsight.intentions import com.intellij.codeInsight.intention.IntentionAction import org.junit.Assert import java.util import extensions._ import scala.Some import com.intellij.psi.codeStyle.CodeStyleManager import base.ScalaLightCodeInsightFixtureTestAdapter import scala...
consulo/consulo-scala
test/org/jetbrains/plugins/scala/codeInsight/intentions/ScalaIntentionTestBase.scala
Scala
apache-2.0
1,843
/* * 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 ...
bharathkk/samza
samza-core/src/main/scala/org/apache/samza/container/SamzaContainerMetrics.scala
Scala
apache-2.0
2,463
/* * Copyright (c) 2016 BBC Design and Engineering * * 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,...
bbc/scheduler-plus
src/main/scala/bbc/schedulerplus/system/RedisJobManager.scala
Scala
mit
1,449
/* ************************************************************************************* * 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/domain/eventlog/Package.scala
Scala
gpl-3.0
1,846
package mesosphere.marathon package integration import mesosphere.AkkaIntegrationTest import mesosphere.marathon.integration.facades.ITEnrichedTask import mesosphere.marathon.integration.facades.MarathonFacade._ import mesosphere.marathon.integration.facades.MesosFacade.{ ITMesosState, ITResources } import mesosphere....
Caerostris/marathon
src/test/scala/mesosphere/marathon/integration/ResidentTaskIntegrationTest.scala
Scala
apache-2.0
14,203
package scala.meta.trees import com.intellij.openapi.progress.ProgressManager import com.intellij.psi._ import org.jetbrains.plugins.scala.extensions.PsiMethodExt import org.jetbrains.plugins.scala.lang.psi.api.base._ import org.jetbrains.plugins.scala.lang.psi.api.base.types._ import org.jetbrains.plugins.scala.lang....
ilinum/intellij-scala
src/scala/meta/trees/TypeAdapter.scala
Scala
apache-2.0
12,226
package org.juanitodread.pitayafinch.nlp.tools.models.entities import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future class MoneyEntityModel extends FinderModel("/nlp/models/entities/en-ner-money.bin") { override def getName: String = "Money" } object MoneyEntityModel { privat...
juanitodread/pitaya-finch
src/main/scala/org/juanitodread/pitayafinch/nlp/tools/models/entities/MoneyEntityModel.scala
Scala
apache-2.0
551
/* * 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 ...
pronix/spark
mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala
Scala
apache-2.0
19,398
package embrace object `package` { implicit class EmbraceAny [ A ] ( val a : A ) extends AnyVal { @inline def $ [ Z ] ( f : A => Z ) = f(a) } implicit class EmbraceTuple2 [ A, B ] ( val a : (A, B) ) extends AnyVal { @inline def $$ [ Z ] ( f : (A, B) => Z ) = f.tupled(a) } implicit class EmbraceTuple...
nikita-volkov/embrace
src/main/scala/embrace/package.scala
Scala
mit
598
/** * Track the trackers * Copyright (C) 2015 Sebastian Schelter, Felix Neutatz * * 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) a...
HungUnicorn/trackthetrackers
analysis/src/main/scala/io/ssc/trackthetrackers/analysis/plots/ToplevelCountryMap.scala
Scala
gpl-3.0
2,414
/* * La Trobe University - Distributed Deep Learning System * Copyright 2015 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
blaze/src/main/scala/edu/latrobe/blaze/modules/package.scala
Scala
apache-2.0
1,212
package org.bitcoins.rpc.channels import org.bitcoins.core.channels._ import org.bitcoins.core.crypto.{ECPrivateKey, ECPublicKey} import org.bitcoins.core.currency.{CurrencyUnit, Satoshis} import org.bitcoins.core.number.Int64 import org.bitcoins.core.policy.Policy import org.bitcoins.core.protocol.script._ import org...
bitcoin-s/bitcoin-s-rpc-client
src/main/scala/org/bitcoins/rpc/channels/ChannelClient.scala
Scala
mit
8,230
/* * 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 package reflect ...
scala/scala
src/reflect/scala/reflect/internal/pickling/UnPickler.scala
Scala
apache-2.0
30,980
package io.buoyant.telemetry.statsd import com.timgroup.statsd.StatsDClient import com.twitter.finagle.stats.{Counter => FCounter, Stat => FStat} private[statsd] object Metric { // stats (timing/histograms) only send when Math.random() <= sampleRate class Counter(statsDClient: StatsDClient, name: String, sampleR...
denverwilliams/linkerd
telemetry/statsd/src/main/scala/io/buoyant/telemetry/statsd/Metric.scala
Scala
apache-2.0
987
/* * 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 ...
Huyuwei/tvm
vta/hardware/chisel/src/main/scala/core/LoadUop.scala
Scala
apache-2.0
6,725
package io.circe.benchmark import org.scalatest.FlatSpec class ParsingBenchmarkSpec extends FlatSpec { val benchmark: ParsingBenchmark = new ParsingBenchmark import benchmark._ "The parsing benchmark" should "correctly parse integers using Circe" in { assert(parseIntsC === intsC) } it should "correct...
alexarchambault/circe
benchmark/src/test/scala/io/circe/benchmark/ParsingBenchmarkSpec.scala
Scala
apache-2.0
999
import java.nio.file._ import scala.util._ object Main extends App { println("Hello world") val path = Paths get "/data/test01" val result = Try(Files createFile path) println(result) }
benmccann/sbt-native-packager
test-project-docker/src/main/scala/Main.scala
Scala
bsd-2-clause
201
/* * 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...
zhangxiaoli73/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/integration/torch/LogSoftMaxSpec.scala
Scala
apache-2.0
5,730
package polynomial import integer.IntegersModP import org.scalatest.{FunSuite, Matchers} import polynomial.Predef.X import core.InfixOps._ class PolynomialRingOverFieldTest extends FunSuite with Matchers { implicit val intsMod5 = IntegersModP(5) implicit val polyRing = PolynomialRingOverField(intsMod5, X) val...
dkettlestrings/thunder
src/test/scala/polynomial/PolynomialRingOverFieldTest.scala
Scala
gpl-3.0
7,633
/* * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Fou...
TiarkRompf/lancet
src/main/scala/optiml/macros/OptiMLMacros.scala
Scala
agpl-3.0
9,308
/* * Copyright 2011-2017 Chris de Vreeze * * 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...
dvreeze/yaidom
jvm/src/test/scala/eu/cdevreeze/yaidom/integrationtest/LargeXmlParsingTest.scala
Scala
apache-2.0
5,767
package spoiwo.examples.features import spoiwo.model._ import spoiwo.model.enums.HyperLinkType import spoiwo.natures.streaming.xlsx.Model2XlsxConversions.XlsxSheet object HyperlinkExample { val hyperlinksSheet: Sheet = Sheet(name = "Hyperlinks") .withRows( Row().withCellValues("PERSON", "EMAIL"), R...
norbert-radyk/spoiwo
examples/src/main/scala/spoiwo/examples/features/HyperlinkExample.scala
Scala
mit
709
package at.hazm.webserver import java.io.File import java.net.{InetSocketAddress, URI, URL, URLClassLoader} import java.nio.charset.StandardCharsets import java.util.regex.Pattern import com.twitter.util.StorageUnit import com.typesafe.config._ import org.slf4j.LoggerFactory import play.api.libs.json.{JsObj...
torao/hazmat-webserver
src/main/scala/at/hazm/webserver/Config.scala
Scala
apache-2.0
9,073
/* Copyright 2009-2021 EPFL, Lausanne */ package stainless package extraction package oo class AdtSpecialization(override val s: Trees, override val t: Trees) (using override val context: inox.Context) extends CachingPhase with SimpleFunctions with SimpleSorts with SimpleTypeDe...
epfl-lara/stainless
core/src/main/scala/stainless/extraction/oo/AdtSpecialization.scala
Scala
apache-2.0
11,882
/* * Copyright 2013-2015 Websudos, Limited. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of c...
levinson/phantom
phantom-reactivestreams/src/test/scala/com/websudos/phantom/reactivestreams/suites/BatchSubscriberWhiteboxTest.scala
Scala
bsd-2-clause
3,166
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
pncampbell/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/frsse2008/micro/AC421.scala
Scala
apache-2.0
1,158
package contege.seqgen import scala.collection.JavaConversions._ import scala.collection.mutable.Set import scala.collection.mutable.Map import java.util.ArrayList import contege.ClassReader import contege.Random import contege.Atom import contege.ConstructorAtom import contege.MethodAtom import contege.Stats import c...
michaelpradel/ConTeGe
src/contege/seqgen/PrepareCUTCallTask.scala
Scala
gpl-2.0
2,170
import org.scalacheck._ import org.scalacheck.Prop._ import java.net.{URLClassLoader, URLDecoder} import scala.collection.mutable import scala.xml.NodeSeq object XMLUtil { import scala.xml._ def stripGroup(seq: Node): Node = { seq match { case group: Group => { <div class="group">{ group.nodes....
felixmulder/scala
test/scaladoc/scalacheck/HtmlFactoryTest.scala
Scala
bsd-3-clause
27,733
/* * 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
sql/core/src/test/scala/org/apache/spark/sql/DataFrameJoinSuite.scala
Scala
apache-2.0
11,796
package scala.slick.driver import java.sql.Types import scala.slick.SlickException import scala.slick.lifted._ import scala.slick.ast._ import scala.slick.util.MacroSupport.macroSupportInterpolation import scala.slick.profile.{SqlProfile, Capability} /** * Slick driver for <a href="http://www.hsqldb.org/">HyperSQL</...
boldradius/slick
src/main/scala/scala/slick/driver/HsqldbDriver.scala
Scala
bsd-2-clause
4,849
package com.avsystem.commons.misc import com.avsystem.commons.IIterable object OptRef { def apply[A >: Null](value: A): OptRef[A] = new OptRef[A](value) def unapply[A >: Null](opt: OptRef[A]): OptRef[A] = opt //name-based extractor def some[A >: Null](value: A): OptRef[A] = if (value != null) new OptRef[A]...
AVSystem/scala-commons
commons-core/src/main/scala/com/avsystem/commons/misc/OptRef.scala
Scala
mit
5,146