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
/* * 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...
cheeseng/scalatest
scalatest-test/src/test/scala/org/scalatest/AsyncPropSpecLikeSpec.scala
Scala
apache-2.0
3,847
package data.structures.trees /** * Created by skunnumkal on 7/23/14. * * http://aperiodic.net/phil/scala/s-99/tree1.scala */ abstract class Tree[+T]{ def height:Int def stringRep:String def dotString:String } case class Node[T](value:T,var left:Tree[T],var right:Tree[T]) extends Tree[T]{ override def ...
sajit/skalad
scala/src/main/scala/data/structures/trees/Tree.scala
Scala
apache-2.0
1,622
package im.actor.server.persist import im.actor.server.model.StickerData import im.actor.server.db.ActorPostgresDriver.api._ import slick.dbio.Effect.Write import slick.profile.FixedSqlAction class StickerDataTable(tag: Tag) extends Table[StickerData](tag, "sticker_data") { def id = column[Int]("id", O.PrimaryKey) ...
EaglesoftZJ/actor-platform
actor-server/actor-persist/src/main/scala/im/actor/server/persist/StickerDataRepo.scala
Scala
agpl-3.0
2,172
/* * Copyright (C) 2005, The OpenURP 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...
openurp/api
edu/src/main/scala/org/openurp/edu/grade/course/model/DefaultMapping.scala
Scala
lgpl-3.0
2,273
/** * 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...
griddynamics/kafka
core/src/test/scala/unit/kafka/log/SegmentListTest.scala
Scala
apache-2.0
1,948
/* * Copyright 2011-2018 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
wiacekm/gatling
gatling-recorder/src/main/scala/io/gatling/recorder/scenario/template/SimulationTemplate.scala
Scala
apache-2.0
4,661
/* * Copyright (c) 2020-2020 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.apach...
snowplow/snowplow-scala-tracker
modules/id-emitter/src/main/scala/com/snowplowanalytics/snowplow/scalatracker/emitters/id/BaseEmitter.scala
Scala
apache-2.0
892
package io.swarm.infrastructure.persistence.slick import scala.slick.jdbc.JdbcBackend._ /** * Created by capacman on 10/26/13. */ trait SlickDbProvider { val db: Database }
Turkcell/swarm
corepersistence/src/main/scala/io/swarm/infrastructure/persistence/slick/SlickSessionProvider.scala
Scala
apache-2.0
180
/* * 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 ...
andrewor14/iolap
mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/CoordinateMatrix.scala
Scala
apache-2.0
6,127
package tyler.breakout.collisions import tyler.breakout.ImmutableVector2f object CollisionUtils { /** * Check if a point exists within an axis aligned rectangle. * * @param p - (x, y) tuple * @param AABB (topLeft.x, topLeft.y), (bottomRight.x, bottomRight.y) * @return - True if the point is within...
DaveTCode/BreakoutGameScala
src/main/scala/tyler/breakout/collisions/CollisionUtils.scala
Scala
mit
1,703
/* * Copyright 2008-present 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 ag...
jyemin/mongo-java-driver
bson-scala/src/test/scala/org/mongodb/scala/bson/collections/MutableDocumentSpec.scala
Scala
apache-2.0
12,025
package org.scalatra import javax.servlet.http.{HttpServletResponse, HttpServletRequest} import util.RicherString._ import java.util.Locale.ENGLISH import grizzled.slf4j.Logger import collection.JavaConverters._ object CorsSupport { val OriginHeader: String = "Origin" val AccessControlRequestMethodHeader: String ...
etorreborre/scalatra
core/src/main/scala/org/scalatra/CORSSupport.scala
Scala
bsd-2-clause
9,086
/* * Copyright 2019 ACINQ SAS * * 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...
ACINQ/eclair
eclair-core/src/test/scala/fr/acinq/eclair/channel/states/b/WaitForFundingCreatedStateSpec.scala
Scala
apache-2.0
6,164
package org.scalafmt.stats case class JavaInfo(name: String, vendor: String, version: String) object JavaInfo { def apply(): JavaInfo = JavaInfo( sys.props("java.vm.name"), sys.props("java.vm.vendor"), sys.props("java.vm.version") ) }
scalameta/scalafmt
scalafmt-tests/src/test/scala/org/scalafmt/stats/JavaInfo.scala
Scala
apache-2.0
266
/* NSC -- new Scala compiler * Copyright 2005-2011 LAMP/EPFL * @author Alexander Spoon */ package org.apache.spark.repl import scala.tools.nsc._ import scala.tools.nsc.interpreter._ /** Settings for the interpreter * * @version 1.0 * @author Lex Spoon, 2007/3/24 **/ class SparkISettings(intp: SparkIMain) { ...
windeye/spark
repl/src/main/scala/org/apache/spark/repl/SparkISettings.scala
Scala
apache-2.0
1,863
package breeze.optimize import breeze.util.Implicits._ import breeze.math.InnerProductSpace trait MinimizingLineSearch { def minimize(f: DiffFunction[Double], init: Double = 1.0):Double } /** * A line search optimizes a function of one variable without * analytic gradient information. Differs only in whether or ...
wavelets/breeze
src/main/scala/breeze/optimize/LineSearch.scala
Scala
apache-2.0
1,703
/* * Stratio Meta * * Copyright (c) 2014, Stratio, All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3.0 of the License, or (at your option) ...
dhiguero/stratio-meta
meta-server/src/test/scala/com/stratio/meta/server/server/statements/CreateKeyspaceActorTest.scala
Scala
gpl-3.0
2,655
package com.weez.mercury.common import scala.language.dynamics class ModelObject(private var map: Map[String, Any]) extends Dynamic { def selectDynamic[T](field: String): T = { map.get(field) match { case Some(x) => x.asInstanceOf[T] case None => throw new ModelException(s"missing property '$field'"...
weeztech/weez-mercury
main/src/main/scala/com/weez/mercury/common/ModelObject.scala
Scala
apache-2.0
3,258
/* Copyright 2012 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
tdyas/scalding
scalding-core/src/main/scala/com/twitter/scalding/serialization/KryoHadoop.scala
Scala
apache-2.0
5,620
package lang.datatype.simple.number.integer object LongMain extends App { private val box1: Long = Long.box(1) private val clazz: Class[_ <: Long] = box1.getClass println(clazz) println(Long.MaxValue) println(Long.MinValue) //literals private val l: Long = 100L //static create private val box: Lo...
congdepeng/scalab
src/main/scala/lang/datatype/simple/number/integer/LongMain.scala
Scala
apache-2.0
443
package controllers import helpers.TestWithApplication import helpers.UnitSpec import pages.vrm_retention.PrivacyPolicyPage import play.api.test.FakeRequest import play.api.test.Helpers.contentAsString import play.api.test.Helpers.defaultAwaitTimeout import play.api.test.Helpers.OK import play.api.test.Helpers.status ...
dvla/vrm-retention-online
test/controllers/PrivacyPolicyUnitSpec.scala
Scala
mit
700
/* * Copyright (C) 2016 Nikos Katzouris * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is d...
nkatzz/OLED
src/main/scala/oled/functions/SingleCoreOLEDFunctions.scala
Scala
gpl-3.0
17,978
/* * Copyright (C) 2016 Vincibean <Andre Bessi> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
Vincibean/ScalaForTheImpatient-Solutions
src/main/scala/org/vincibean/scala/impatient/chapter10/exercise8/HasSubmachineGun.scala
Scala
gpl-3.0
1,291
package com.twitter.bijection.thrift import org.apache.thrift.transport.TTransport import org.apache.thrift.TConfiguration case class TArrayByteTransport(buf: Array[Byte]) extends TTransport { private[thrift] final var bufferPos = 0 private[this] final val bufferSiz_ = buf.size @inline final def bufferSiz = ...
twitter/bijection
bijection-thrift/src/main/scala/com/twitter/bijection/thrift/TArrayByteTransport.scala
Scala
apache-2.0
1,326
/* * 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 ...
shivangi1015/incubator-carbondata
integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/complexType/TestCreateTableWithDouble.scala
Scala
apache-2.0
3,895
package com.durooma.api.route import java.sql.Date import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport import com.durooma.api.model._ import com.durooma.db.Tables import org.joda.time.DateTime import org.joda.time.format.{DateTimeFormatter, ISODateTimeFormat} import spray.json.{DefaultJsonProtocol, Deser...
durooma/api
src/main/scala/com/durooma/api/route/JsonSupport.scala
Scala
mit
1,826
package io.finch import com.twitter.finagle.{SimpleFilter, Service} import com.twitter.finagle.httpx.Request import com.twitter.util.{Await, Future} import org.scalatest.{Matchers, FlatSpec} class FilterOpsSpec extends FlatSpec with Matchers { private[finch] class PrefixFilter(val prefix: String) extends SimpleFil...
peel/finch
core/src/test/scala/io/finch/FilterOpsSpec.scala
Scala
apache-2.0
987
/* * 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...
VlachJosef/bforms
app/uk/gov/hmrc/bforms/core/parsers/BasicParsers.scala
Scala
apache-2.0
2,793
/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md 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 compliance with the License. * Yo...
janurag/scalate
scalate-core/src/main/scala/org/fusesource/scalate/console/ConsoleHelper.scala
Scala
apache-2.0
8,841
/* * Copyright (C) 2015 Christopher Freestone * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program...
Pwootage/game
src/main/scala/com/pwootage/game/Game.scala
Scala
gpl-3.0
3,603
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2014, G...
non/squants
src/main/scala/squants/electro/ElectricCharge.scala
Scala
apache-2.0
4,528
package at.logic.gapt.provers.veriT import at.logic.gapt.formats.veriT._ import at.logic.gapt.proofs.expansionTrees.{ ExpansionSequent, isQuantified, formulaToExpansionTree } import at.logic.gapt.proofs.expansionTrees.algorithms.addSymmetry import at.logic.gapt.utils.traits.ExternalProgram import scala.sys.process._ i...
gisellemnr/gapt
src/main/scala/at/logic/gapt/provers/veriT/VeriTProver.scala
Scala
gpl-3.0
2,726
/* * 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 ...
jinglining/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/rules/logical/AggregateReduceGroupingRuleTest.scala
Scala
apache-2.0
1,646
package scala.meta.tests.parsers.dotty import scala.meta.tests.parsers._ import scala.meta._ class MatchTypeSuite extends BaseDottySuite { implicit val parseBlock: String => Stat = code => blockStat(code)(dialects.Scala3) test("simple") { val intput = runTestAssert[Stat]( """|type Elem[X] = X ...
scalameta/scalameta
tests/shared/src/test/scala/scala/meta/tests/parsers/dotty/MatchTypeSuite.scala
Scala
bsd-3-clause
6,354
/* * 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.nsc impor...
scala/scala
src/compiler/scala/tools/nsc/PipelineMain.scala
Scala
apache-2.0
29,552
/** * Copyright 2010-2016 Boxfuse GmbH * * 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...
cdedie/flyway
flyway-sbt/src/main/scala/org/flywaydb/sbt/FlywayPlugin.scala
Scala
apache-2.0
22,446
// scalac: -Xfatal-warnings -Xlint:unused -Ywarn-macros:before // import scala.language.experimental.macros object Unused extends App { def m(body: Int): Int = macro UnusedMacro.macroImpl private def g(): Int = 17 // g is used before but not after expansion def f(): Int = m(g()) println(f()) }
lrytz/scala
test/files/pos/t10296-before/Unused_2.scala
Scala
apache-2.0
310
package opentrack.jp.journey import opentrack.jp.station.CRS case class TimetableLeg(origin: CRS, destination: CRS, mode: String, departureTime: Int, arrivalTime: Int, callingPoints: List[CallingPoi...
open-track/journey-planner-scala
app/opentrack/jp/journey/TimetableLeg.scala
Scala
gpl-3.0
576
package akka.persistence.s3 package snapshot import java.io.ByteArrayInputStream import akka.actor.ActorLogging import akka.persistence.serialization.Snapshot import akka.persistence.{ SelectedSnapshot, SnapshotMetadata, SnapshotSelectionCriteria } import akka.persistence.snapshot.SnapshotStore import akka.serializati...
TanUkkii007/akka-persistence-s3
src/main/scala/akka/persistence/s3/snapshot/S3SnapshotStore.scala
Scala
mit
4,177
/* * Copyright 2015 - 2016 Red Bull Media House GmbH <http://www.redbullmediahouse.com> - all rights reserved. * * 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...
ianclegg/eventuate
eventuate-core/src/main/scala/com/rbmhtechnology/eventuate/serializer/DurableEventSerializer.scala
Scala
apache-2.0
5,086
package breeze.optimize /* Copyright 2009 David Hall, Daniel Ramage Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable la...
claydonkey/breeze
math/src/main/scala/breeze/optimize/LBFGSB.scala
Scala
apache-2.0
11,876
/* * (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-core
src/main/scala/cogx/runtime/allocation/SharedLatchesByBinnedFieldSize.scala
Scala
apache-2.0
3,017
/* * 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 ...
h2oai/sparkling-water
extensions/src/main/scala/ai/h2o/sparkling/extensions/rest/api/LogLevelHandler.scala
Scala
apache-2.0
1,761
package s3.website import java.io.File import java.util.concurrent.atomic.AtomicInteger import com.amazonaws.AmazonServiceException import com.amazonaws.services.cloudfront.AmazonCloudFront import com.amazonaws.services.cloudfront.model.{CreateInvalidationRequest, CreateInvalidationResult, TooManyInvalidationsInProgr...
SivagnanamCiena/s3_website
src/test/scala/s3/website/S3WebsiteSpec.scala
Scala
mit
34,739
package com.twitter.finatra.jackson.modules import com.fasterxml.jackson.annotation.JsonInclude.Include import com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair import com.fasterxml.jackson.databind.{ Module => JacksonModule, ObjectMapper => JacksonObjectMapper, _ } import com.fasterxml.jackso...
twitter/finatra
jackson/src/main/scala/com/twitter/finatra/jackson/modules/ScalaObjectMapperModule.scala
Scala
apache-2.0
10,216
package specsspec import org.specs2.mutable._ object HelloWorldSpec extends Specification { "The 'Hello world' string" should { "contain 11 characters" in { "Hello world" must have size(11) } "start with 'Hello'" in { "Hello world" must startWith("Hello") } "end with 'world'" in { ...
sbt/sbt-mocha
src/sbt-test/sbt-mocha-plugin/test/src/test/scala/Specs2Spec.scala
Scala
apache-2.0
372
/* * 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 java.util import scala.annotation.tai...
SebsLittleHelpers/scala-js
javalib/src/main/scala/java/util/Random.scala
Scala
apache-2.0
5,377
class A { def m() { var x = y } } object Main { def main(args: Array[String]) { } }
tobast/compil-petitscala
tests/typing/bad/testfile-unbound_var-1.scala
Scala
gpl-3.0
84
package infra.sockjs import play.api.test.PlaySpecification /** * @author alari * @since 12/16/13 */ class ServiceRoutesSpec extends PlaySpecification { "router" should { import SockJsAction._ "dispatch greetings" in { SockJsService.dispatch("GET", "") must_== Greetings SockJsService.dispatc...
alari/play-sockjs
module-code/test/infra/sockjs/ServiceRoutesSpec.scala
Scala
apache-2.0
2,140
package com.github.caiiiycuk.ast2uml import org.scalatest._ import com.github.caiiiycuk.ast2uml.clang.ClangAstParser import com.github.caiiiycuk.ast2uml._ import com.github.caiiiycuk.ast2uml.query.AstQuery import com.github.caiiiycuk.ast2uml.render.PlantUml class RenderTest extends FlatSpec with Matchers { behavio...
caiiiycuk/ast2uml
src/test/scala/com/github/caiiiycuk/ast2uml/RenderTest.scala
Scala
gpl-3.0
481
package es.codemotion.akkaships.server.actors import akka.actor._ import es.codemotion.akkaships.common.domain._ object ShipActor { def props(ship:Ship, boardActor:ActorRef,statisticsActor:ActorRef): Props = Props(new ShipActor(ship,boardActor,statisticsActor)) } class ShipActor(val ship:Ship, val boardActor:Actor...
miguel0afd/Akkaships
Server/src/main/scala/es/codemotion/akkaships/server/actors/ShipActor.scala
Scala
apache-2.0
1,169
package com.twitter.server import com.twitter.finagle.stats.BucketAndCount import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class ExportingHistogramsTest extends FunSuite { import handler.HistogramQueryHandler.{pdf, cdf, BucketAndPe...
BuoyantIO/twitter-server
src/test/scala/com/twitter/server/ExportingHistogramsTest.scala
Scala
apache-2.0
1,902
package com.mehmetakiftutuncu.muezzinapi.services import org.jsoup.Jsoup import scala.collection.JavaConverters._ import org.jsoup.nodes.{Document, Element} package object fetchers { def parseListOf[T](html: String, cssId: String)(construct: (Int, String) => T): List[T] = { val document: Document = Jsoup.parse...
mehmetakiftutuncu/MuezzinAPI
app/com/mehmetakiftutuncu/muezzinapi/services/fetchers/package.scala
Scala
mit
625
/** * Copyright 2013-2014 Jorge Aliss (jaliss at gmail dot com) - twitter: @jaliss * * 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 *...
mojo22jojo/securesocial-test
module-code/app/securesocial/core/authenticator/Authenticator.scala
Scala
apache-2.0
4,547
/* * Copyright 2015 Niklas Grossmann * * 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...
ngrossmann/momo
src/test/scala/net/n12n/momo/couchbase/TimeSeriesSpec.scala
Scala
apache-2.0
3,270
/* * ============= Ryft-Customized BSD License ============ * Copyright (c) 2015, Ryft Systems, Inc. * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must...
getryft/spark-ryft-connector
spark-ryft-connector/src/test/scala/com/ryft/spark/connector/IPv4ValueSpec.scala
Scala
bsd-3-clause
3,184
package org.jetbrains.plugins.scala package overrideImplement import java.util.Properties import com.intellij.codeInsight.generation.GenerationInfoBase import com.intellij.ide.fileTemplates.{FileTemplate, FileTemplateManager} import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.edito...
triplequote/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/overrideImplement/ScalaGenerationInfo.scala
Scala
apache-2.0
9,357
/* NSC -- new Scala compiler * Copyright 2009-2013 Typesafe/Scala Solutions and LAMP/EPFL * @author Martin Odersky */ package scala.tools.nsc package interactive import scala.reflect.internal.util.SourceFile import scala.collection.mutable.ArrayBuffer trait RichCompilationUnits { self: Global => /** The status ...
felixmulder/scala
src/interactive/scala/tools/nsc/interactive/RichCompilationUnits.scala
Scala
bsd-3-clause
1,808
/** Run with : * * ./test * mvn scala:compile && scala -cp target/classes Test * mvn scala:compile && scala -cp target\\classes Test * javap -c -classpath target\\classes Test$ */ object TestMatrix { import TestUtils._ def main(args: Array[String]): Unit = { val name = if (args.isEmpty) "...
nativelibs4java/ScalaCL
Old/Test/src/main/scala/TestMatrix.scala
Scala
bsd-3-clause
1,577
/* * Copyright 2010 LinkedIn * * 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...
jinfei21/kafka
src/kafka/consumer/FetchedDataChunk.scala
Scala
apache-2.0
763
package linksCollector import scala.concurrent.duration._ import akka.actor.Actor import akka.actor.ActorRef import akka.actor.ActorLogging import akka.actor.Props import akka.actor.ReceiveTimeout object Controller { case class Check(url: String, depth: Int) { require(depth > -1) } case class Result(cache...
keshavbashyal/playground-notes
principles-of-reactive-programming/links-collector/src/main/scala/Controller.scala
Scala
mit
1,168
/* * Copyright 2020 Precog Data * * 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 ...
djspiewak/quasar
impl/src/test/scala/quasar/impl/storage/ConcurrentMapIndexedStoreSpec.scala
Scala
apache-2.0
2,315
package troy package driver import java.math.{ BigInteger, BigDecimal } import java.net.InetAddress import java.nio.ByteBuffer import java.util.{ UUID, Date } import scala.collection.JavaConverters._ import com.datastax.driver.core.utils.UUIDs import com.datastax.driver.core._ import org.mockito.Matchers import org...
schemasafe/troy
troy-driver/src/test/scala/troy/driver/CodecsSpec.scala
Scala
apache-2.0
65,636
package org.scaladebugger.api.utils import scala.collection.mutable.{Map => MutableMap} /** * Represents a generic form of memoization. Modified from Pathikrit Bhowmick's * copy of Scala Memoization. * * @see https://github.com/pathikrit/scalgos/blob/master/src/main/scala/com/github/pathikrit/scalgos/Memo.scala ...
ensime/scala-debugger
scala-debugger-api/src/main/scala/org/scaladebugger/api/utils/Memoization.scala
Scala
apache-2.0
1,997
//----------------------------------------------------------------------- // FILE : CredentialStorageInMemory.scala // SUBJECT : Holds credentials entirely in memory. // AUTHOR : (C) Copyright 2011 by Peter C. Chapin <PChapin@vtc.vsc.edu> // //----------------------------------------------------------------------- ...
pchapin/sprocket
src/edu/uvm/rt/CredentialStorageInMemory.scala
Scala
bsd-3-clause
4,738
package com.asto.dop.core.business import com.asto.dop.core.helper.HttpHelper import io.vertx.core.http.HttpServerRequest import io.vertx.core.{Handler, Vertx} object BusinessAPIMock { def start(): Unit = { Vertx.vertx().createHttpServer().requestHandler(new Handler[HttpServerRequest] { override def hand...
zj-lingxin/dop-core
src/test/scala/com/asto/dop/core/business/BusinessAPIMock.scala
Scala
mit
2,936
package ucesoft.cbm.cpu.asm import java.awt.datatransfer.{Clipboard, DataFlavor} import java.awt.event.{WindowAdapter, WindowEvent} import java.awt.{BorderLayout, Color, Cursor, FlowLayout} import java.io.{File, FileInputStream, InputStream, PrintWriter, StringReader, StringWriter} import java.text.SimpleDateFormat im...
abbruzze/kernal64
Kernal64/src/ucesoft/cbm/cpu/asm/Assembler.scala
Scala
mit
27,957
package org.mauritania.photosync.olympus.sync import java.io.{File, FileFilter} import org.mauritania.photosync.olympus.client.{CameraClient, FileInfo} import org.mauritania.photosync.olympus.sync.FilesManager.Config import org.slf4j.LoggerFactory import scala.collection.immutable.Seq import scala.util.{Failure, Try...
mauriciojost/olympus-photosync
src/main/scala/org/mauritania/photosync/olympus/sync/FilesManager.scala
Scala
apache-2.0
3,906
import edu.uta.diql._ import org.apache.spark._ import org.apache.spark.rdd._ import org.apache.spark.sql._ import org.apache.log4j._ import scala.util.Random case class GB ( K: Long, A: Double ) object GroupBy { def main ( args: Array[String] ) { val repeats = args(0).toInt val length = args(1).toLong ...
fegaras/DIQL
benchmarks/sqlgen/GroupBy.scala
Scala
apache-2.0
2,733
package pregnaware.frontend.services.user import java.time.LocalDate import akka.actor.ActorContext import akka.util.Timeout import pregnaware.frontend.services.BackEndFuncs import pregnaware.user.entities._ import pregnaware.utils.Json4sSupport._ import spray.http.{HttpRequest, HttpEntity} import spray.http.HttpMeth...
jds106/pregnaware
service/src/main/scala/pregnaware/frontend/services/user/UserServiceBackend.scala
Scala
mit
2,811
package org.jetbrains.plugins.scala.stacktrace import java.util.regex.Pattern import com.intellij.execution.filters._ import com.intellij.openapi.vfs.VirtualFile import com.intellij.psi.search.GlobalSearchScope import org.jetbrains.plugins.scala.caches.ScalaShortNamesCacheManager import org.jetbrains.plugins.scala.ex...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/stacktrace/ScalaPackageObjectFilterFactory.scala
Scala
apache-2.0
3,046
package com.codahale.jerkson.ser import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.databind.{ SerializerProvider, JsonSerializer } class IterableSerializer extends JsonSerializer[Iterable[_]] { def serialize(value: Iterable[_], json: JsonGenerator, provider: SerializerProvider) { ser...
mDialog/jerkson
src/main/scala/com/codahale/jerkson/ser/IterableSerializer.scala
Scala
mit
701
package com.aristocrat.mandrill.services import com.aristocrat.mandrill.MandrillClient import com.aristocrat.mandrill.requests.Urls._ import com.google.inject.{Inject, Singleton} import com.twitter.finagle.httpx.Response import com.twitter.util.Future @Singleton class UrlsService @Inject()(client: MandrillClient) { ...
aristocratic/mandrill
src/main/scala/com/aristocrat/mandrill/services/UrlsService.scala
Scala
mit
961
package org.fusesource.scalate.util /** * Some helper methods for calling from Java */ object JavaInterops { def toImmutableMap[K, V](map: collection.mutable.Map[K, V]): collection.immutable.Map[K, V] = { collection.immutable.Map(map.toList: _*) } def toMutableMap[K, V](map: collection.immutable.Map[K, V...
scalate/scalate
scalate-util/src/main/scala/org/fusesource/scalate/util/JavaInterops.scala
Scala
apache-2.0
410
/* * 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/ct600e/v3/E70.scala
Scala
apache-2.0
1,064
package org.jetbrains.plugins.scala.failed.resolve import com.intellij.psi.impl.source.tree.LeafPsiElement import org.jetbrains.plugins.scala.PerfCycleTests import org.jetbrains.plugins.scala.base.SimpleTestCase import org.jetbrains.plugins.scala.lang.psi.api.base.ScStableCodeReferenceElement import org.jetbrains.plug...
loskutov/intellij-scala
test/org/jetbrains/plugins/scala/failed/resolve/OverrideUnapplyTest.scala
Scala
apache-2.0
1,437
/* * 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 ...
techaddict/spark
sql/core/src/main/scala/org/apache/spark/sql/Column.scala
Scala
apache-2.0
39,102
package org.geoscript //.feature import org.geoscript.geometry._ import org.geoscript.projection._ import scala.collection.JavaConverters._ /** * Facilities for manipulating vector data. */ package object feature { /** * A Feature is a single entry in a geospatial dataset. For example, a * Feature might re...
dwins/geoscript.scala
geoscript/src/main/scala/feature/Feature.scala
Scala
mit
8,434
/* * Copyright 2015 Alex Garella * * 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 l...
agarella/RxKinesis
examples/TwitterAnalytics/src/main/scala/com/alexgarella/rxkinesis/examples/twitteranalytics/TwitterAnalytics.scala
Scala
apache-2.0
4,814
/* * 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...
yiheng/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/ops/CategoricalColVocaList.scala
Scala
apache-2.0
4,608
/** * 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/http/src/main/scala/silhouette/http/transport/CookieTransport.scala
Scala
apache-2.0
6,500
package slick.lifted import slick.relational.{ProductResultConverter, SimpleFastPathResultConverter, ResultConverterDomain, TypeMappingResultConverter} import scala.language.{existentials, implicitConversions, higherKinds} import scala.language.experimental.macros import scala.annotation.implicitNotFound import scala...
xavier-fernandez/slick
slick/src/main/scala/slick/lifted/Shape.scala
Scala
bsd-2-clause
20,879
package com.bigchange.config import scala.collection.mutable /** * Created by C.J.YOU on 2016/12/9. */ trait Parameter { // spark.appName def getParameterByTagName(tagName: String):String def getAllParameter: mutable.HashMap[String, String] }
bigchange/AI
src/main/scala/com/bigchange/config/Parameter.scala
Scala
apache-2.0
260
/* * 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/OptionShouldContainOneOfLogicalAndSpec.scala
Scala
apache-2.0
37,514
/* * This software is licensed under the GNU Affero General Public License, quoted below. * * This file is a part of PowerAPI. * * Copyright (C) 2011-2016 Inria, University of Lille 1. * * PowerAPI is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public Lice...
Spirals-Team/powerapi
powerapi-core/src/test/scala/org/powerapi/core/ConfigurationSuite.scala
Scala
agpl-3.0
3,585
package tap.util trait IndentedTextBuffer { protected var tabs: Int = 0 def indent() {tabs = tabs + 1} def dedent() {if (tabs > 0) tabs = tabs - 1} def apply(text: Any*) }
garyb/tap
src/main/scala/tap/util/IndentedTextBuffer.scala
Scala
mit
188
package queue trait PullRequestQueue { def open(): Unit def stream: Stream[Message] def close(): Unit }
PRioritizer/PRioritizer-watcher
src/main/scala/queue/PullRequestQueue.scala
Scala
mit
111
package repositories.analysis.dao import no.uio.musit.test.MusitSpecWithAppPerSuite import no.uio.musit.test.matchers.MusitResultValues class TreatmentDaoSpec extends MusitSpecWithAppPerSuite with MusitResultValues { val dao: TreatmentDao = fromInstanceCache[TreatmentDao] "The TreatmentDao " should { "retur...
MUSIT-Norway/musit
service_backend/test/repositories/analysis/dao/TreatmentDaoSpec.scala
Scala
gpl-2.0
487
package eu.devtty.ipfs.jsinterface.raw import eu.devtty.cid.CID import eu.devtty.ipfs.{Block, BlockStat} import io.scalajs.nodejs.buffer.Buffer import scala.scalajs.js @js.native trait JsBlockApi extends js.Object { def get(cid: CID, callback: js.Function2[String, Block, _]): Unit = js.native def get(cid: String...
magik6k/scalajs-ipfs-api
js-interface/src/main/scala/eu/devtty/ipfs/jsinterface/raw/JsBlockApi.scala
Scala
mit
899
/** * Copyright 2015, deepsense.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 applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
workflowjson/src/main/scala/io/deepsense/models/json/workflow/InferenceWarningJsonProtocol.scala
Scala
apache-2.0
1,631
/* * 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...
Myllyenko/incubator-toree
plugins/src/test/scala/test/utils/TestMethodInfo.scala
Scala
apache-2.0
1,121
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
nagavallia/geomesa
geomesa-security/src/main/scala/org/locationtech/geomesa/security/DataStoreSecurityService.scala
Scala
apache-2.0
3,269
/* * Copyright (C) 2005, The OpenURP 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...
openurp/api
edu/src/main/scala/org/openurp/edu/grade/plan/model/PlanAuditResult.scala
Scala
lgpl-3.0
2,528
// See LICENSE.txt for license details. package examples import chisel3.iotesters.{PeekPokeTester, Driver, ChiselFlatSpec} class ByteSelectorTests(c: ByteSelector) extends PeekPokeTester(c) { val test_in = 12345678 for (t <- 0 until 4) { poke(c.io.in, test_in) poke(c.io.offset, t) step(1) expe...
timtian090/Playground
chiselTutorial/src/test/scala/examples/ByteSelectorTests.scala
Scala
mit
665
/* * 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/accounts/frs102/boxes/AC19.scala
Scala
apache-2.0
1,290
package com.nikolastojiljkovic.quilltrait.postgres import com.nikolastojiljkovic.quilltrait.PageSqlSpec import com.nikolastojiljkovic.quilltrait.model.{ Page, SampleTraitWithNestable, SeoSupport } import scala.concurrent.ExecutionContext.Implicits.{ global => ec } import scala.concurrent.duration.Duration import scal...
nstojiljkovic/quill-trait
quill-trait-core/jvm/src/test/scala/com/nikolastojiljkovic/quilltrait/postgres/PagePostgresAsyncSpec.scala
Scala
apache-2.0
1,685
package worker import scala.concurrent.duration._ import akka.actor.Actor import akka.pattern._ import akka.util.Timeout import akka.cluster.singleton.{ClusterSingletonProxySettings, ClusterSingletonProxy} object Frontend { case object Ok case object NotOk } class Frontend extends Actor { import Frontend._ i...
typesafehub/activator-akka-distributed-workers
src/main/scala/worker/Frontend.scala
Scala
cc0-1.0
785
/* * Copyright 2014-2021 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
copperlight/atlas
atlas-jmh/src/main/scala/com/netflix/atlas/core/util/StringMatching.scala
Scala
apache-2.0
3,834
import annotations.template import reflect.runtime.universe.TypeTag case class SW(s: String) case class IW(c: Int) case class DW(d: Double) case class PD(sw: SW, iw: IW, bw: DW) @template((i: Int, s: String, d: Double) => PD(SW(s), IW(i), DW(d))) object Test extends App { def typeToString[T](o: T)(implicit t: TypeT...
pomadchin/template-macro
example/src/main/scala/Test.scala
Scala
apache-2.0
558
import scala.annotation.tailrec object SumSquareDifference { def square(x:Int):Int = x*x; @tailrec def sum(crnt: Int, max: Int, total: Int): Int = if(crnt > max) total else sum(crnt+1, max, total+crnt); def squareOfSum(min: Int, max: Int): Int = square(sum(min, max, 0)) @tailrec def sumO...
lilith645/EulerChallenges
Problem6/SumSquareDifference.scala
Scala
gpl-3.0
691