code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
package com.webtrends.harness.component.zookeeper import java.util import java.util.UUID import org.apache.curator.x.discovery.details.InstanceProvider import org.apache.curator.x.discovery.{ServiceInstance, UriSpec} import org.specs2.mutable.SpecificationWithJUnit import scala.collection.JavaConverters._ class Woo...
Webtrends/wookiee-zookeeper
src/test/scala/com/webtrends/harness/component/zookeeper/WookieeWeightedStrategySpec.scala
Scala
apache-2.0
2,688
/* * 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 ...
yew1eb/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/BatchTableEnvironment.scala
Scala
apache-2.0
21,194
/*** * Copyright 2017 Andrea Lorenzani * * 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 ...
andrealorenzani/HAVacationRental
src/test/scala/name/lorenzani/andrea/homeaway/services/GetRequestHandlerTest.scala
Scala
apache-2.0
3,032
/** * Majyyka * * MajyykLimitAlgo.scala * * @author Myo-kun * @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html) */ package myokun.mods.majyyka.core.player object MajyykLimitAlgo { def getMajyykLimitForLevel(level:Int):Double = { return (Math.sqrt(level)) * 100 } ...
myoKun345/Majyyka
majyyka_common/myokun/mods/majyyka/core/player/MajyykLimitAlgo.scala
Scala
lgpl-3.0
326
package pl.msitko.xml.parsing import pl.msitko.xml.BasicJvmSpec import pl.msitko.xml.entities._ class XmlParserJvmSpec extends XmlParserSpec with BasicJvmSpec { // tests written here specifically (as opposed to `XmlParserSpec`) are ones // which documents different behavior between JVM and JS implementation "p...
note/xml-lens
io/jvm/src/test/scala/pl/msitko/xml/parsing/XmlParserJvmSpec.scala
Scala
mit
1,713
package test class A { sealed class B sealed def f = 0 sealed val v = 0 }
folone/dotty
tests/untried/neg/t1838.scala
Scala
bsd-3-clause
81
package com.insweat.hssd.lib.essence.thypes import com.insweat.hssd.lib.essence.SchemaLike import com.insweat.hssd.lib.essence.SimpleThypeLike import com.insweat.hssd.lib.essence.Element import scala.collection.immutable.HashMap import com.insweat.hssd.lib.essence.Thype import scala.xml.XML import scala.xml.Utility im...
insweat/hssd
com.insweat.hssd.lib/src/com/insweat/hssd/lib/essence/thypes/TupleThype.scala
Scala
lgpl-3.0
4,909
package io.eels.component.orc import java.util.concurrent.atomic.AtomicInteger import java.util.function.IntUnaryOperator import com.sksamuel.exts.Logging import com.typesafe.config.ConfigFactory import io.eels.Row import io.eels.schema.StructType import org.apache.hadoop.conf.Configuration import org.apache.hadoop.f...
stheppi/eel
eel-orc/src/main/scala/io/eels/component/orc/OrcWriter.scala
Scala
apache-2.0
3,171
/* * 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 ...
wgpshashank/spark
tools/src/main/scala/spark/tools/JavaAPICompletenessChecker.scala
Scala
apache-2.0
14,100
import sbt._ import sbt.Keys._ import sbtassembly.Plugin._ import sbtassembly.Plugin.AssemblyKeys._ object ProjectBuild extends Build { lazy val project = "encog" lazy val root = Project(id = project, base = file("."), settings = Project.defaultSettings ++ assem...
hugoferreira/chessocr
project/Build.scala
Scala
mit
1,386
/* * Copyright 2007-2010 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...
jeppenejsum/liftweb
framework/lift-base/lift-util/src/main/scala/net/liftweb/util/Props.scala
Scala
apache-2.0
7,568
package com.sdc.play.module.plausc.providers.oauth2 import org.codehaus.jackson.JsonNode import com.sdc.play.module.plausc.user._ /** * @author Dr. Erich W. Schreiner - Software Design & Consulting GmbH * @version 0.1.0.0 * @since 0.1.0.0 */ class FoursquareAuthInfo(token: String) extends OAuth2AuthInfo(t...
eschreiner/play2-scala-auth
code/app/com/sdc/play/module/plausc/providers/oauth2/Foursquare.scala
Scala
apache-2.0
4,134
package io.digitalmagic.akka.dsl import java.time.Instant import akka.actor.Props import io.digitalmagic.coproduct.TListK.::: import io.digitalmagic.coproduct.{Cop, CopK, TNilK} import io.digitalmagic.akka.dsl.API._ import io.digitalmagic.akka.dsl.EventSourcedActorWithInterpreter.IndexFuture import io.digitalmagic.akk...
digital-magic-io/akka-cqrs-dsl
akka-cqrs-dsl-core/src/test/scala/io/digitalmagic/akka/dsl/Adder.scala
Scala
apache-2.0
3,376
/* * Copyright 2012-2013 Stephane Godbillon (@sgodbillon) and Zenexity * * 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...
avdv/ReactiveMongo
driver/src/main/scala/api/collections/genericcollection.scala
Scala
apache-2.0
35,160
/* * Copyright 2015 Ringo Wathelet * * 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...
workingDog/acme-protocol
src/main/scala/com/kodekutters/acme/Util.scala
Scala
apache-2.0
3,828
package com.datastax.spark.connector.util import org.scalatest.{Matchers, FlatSpec} import scala.collection.mutable.ArrayBuffer class BufferedIterator2Spec extends FlatSpec with Matchers { "BufferedIterator" should "return the same items as the standard Iterator" in { val iterator = new BufferedIterator2(Seq(...
viirya/spark-cassandra-connector
spark-cassandra-connector/src/test/scala/com/datastax/spark/connector/util/BufferedIterator2Spec.scala
Scala
apache-2.0
2,272
package notebook.server import java.io._ import java.net.URLDecoder import java.text.SimpleDateFormat import java.util.Date import notebook.NBSerializer import notebook.NBSerializer._ import org.apache.commons.io.FileUtils import play.api.Logger import play.api.libs.json._ import utils.Const.UTF_8 class NotebookMana...
pb-pravin/spark-notebook
app/notebook/server/NotebookManager.scala
Scala
apache-2.0
4,730
/** * Copyright (C) 2010 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This prog...
orbeon/orbeon-forms
xforms-compiler/jvm/src/main/scala/org/orbeon/oxf/xforms/analysis/PathMapXPathAnalysisBuilder.scala
Scala
lgpl-2.1
23,481
/* * OpenURP, Agile University Resource Planning Solution * * Copyright (c) 2014-2015, OpenURP Software. * * OpenURP 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 Licens...
openurp/edu-core
grade/core/src/main/scala/org/openurp/edu/grade/app/model/PlanAuditLog.scala
Scala
gpl-3.0
1,311
package io.apibuilder.validation.helpers trait PerformanceHelpers { def time(numberIterations: Int)(f: Long => Any): Long = { val start = System.currentTimeMillis() 0.to(numberIterations).foreach { i => f(i.toLong) } System.currentTimeMillis() - start } }
flowcommerce/lib-apidoc-json-validation
src/test/scala/io/apibuilder/validation/helpers/PerformanceHelpers.scala
Scala
mit
286
/* * * * Copyright 2014 websudos ltd. * * * * 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...
nosheenzaza/phantom-data-centric
phantom-zookeeper/src/test/scala/com/websudos/phantom/zookeeper/TestTable.scala
Scala
gpl-2.0
850
package edu.gemini.spModel.core import org.scalacheck.Prop.forAll import org.specs2.ScalaCheck import org.specs2.mutable.Specification import AlmostEqual.AlmostEqualOps object WavelengthSpec extends Specification with ScalaCheck with Arbitraries with Helpers { "Wavelength Conversions" should { "support nan...
arturog8m/ocs
bundle/edu.gemini.spModel.core/src/test/scala/edu/gemini/spModel/core/WavelengthSpec.scala
Scala
bsd-3-clause
693
package cd class Motion(val callsign: CallSign, val posOne: Vector3D, val posTwo: Vector3D) { def delta(): Vector3D = posTwo.minus(this.posOne); def findIntersection(other: Motion): Vector3D = { var init1 = this.posOne var init2 = other.posOne var vec1 = delta() v...
cedricviaccoz/scala-native
benchmarks/src/main/scala/cd/Motion.scala
Scala
bsd-3-clause
3,711
/* * 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
streaming/src/test/scala/org/apache/spark/streaming/util/WriteAheadLogSuite.scala
Scala
apache-2.0
29,852
package uk.gov.gds.ier.transaction.overseas.openRegister import uk.gov.gds.ier.test._ import uk.gov.gds.ier.transaction.overseas.InprogressOverseas class OpenRegisterMustacheTests extends MustacheTestSuite with OpenRegisterForms with OpenRegisterMustache { it should "empty progress form should produce empty ...
michaeldfallen/ier-frontend
test/uk/gov/gds/ier/transaction/overseas/openRegister/OpenRegisterMustacheTests.scala
Scala
mit
2,483
//@ package xyz.hyperreal.energize import java.sql.{Connection, Statement, DriverManager} import collection.mutable.{ArrayBuffer, HashMap, ListBuffer} import collection.JavaConverters._ import org.mindrot.jbcrypt.BCrypt import xyz.hyperreal.bvm._ import xyz.hyperreal.json.{DefaultJSONReader, JSON} object Definiti...
vinctustech/energize
src/main/scala/Definition.scala
Scala
isc
8,548
package com.databricks.spark.sql.perf.mllib.regression import org.apache.spark.ml.PipelineStage import org.apache.spark.ml.regression.DecisionTreeRegressor import com.databricks.spark.sql.perf.mllib.OptionImplicits._ import com.databricks.spark.sql.perf.mllib._ object DecisionTreeRegression extends BenchmarkAlgorit...
databricks/spark-sql-perf
src/main/scala/com/databricks/spark/sql/perf/mllib/regression/DecisionTreeRegression.scala
Scala
apache-2.0
540
/* * Copyright 2012-2020 the original author or 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 ap...
planet42/Laika
core/js/src/test/scala/laika/time/PlatformDateFormatSpec.scala
Scala
apache-2.0
1,600
package scala.collection.immutable import scala.language.higherKinds import org.scalacheck.{Arbitrary, Gen, Properties, Shrink} import org.scalacheck.commands.Commands import scala.collection.mutable import scala.util.{Success, Try} object SetProperties extends Properties("immutable.Set builder implementations"){ ...
martijnhoekstra/scala
test/scalacheck/scala/collection/immutable/SetProperties.scala
Scala
apache-2.0
3,996
/* * Copyright 2017 PayPal * * 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 writin...
mzeltser69/squbs
squbs-ext/src/main/scala/org/squbs/streams/TimeoutBidi.scala
Scala
apache-2.0
20,080
package org.scala_tools.maven.mojo.extractor import scala.tools.nsc._ import scala.tools.nsc.reporters._ import org.apache.maven.project.MavenProject import org.apache.maven.plugin.descriptor.MojoDescriptor; import scala.collection.JavaConversions._ import org.scala_tools.maven.mojo.util.MavenProjectTools class Mo...
jacekszymanski/mvnplugins
scala-mojo-support/src/main/java/org/scala_tools/maven/mojo/extractor/MojoExtractorCompiler.scala
Scala
apache-2.0
6,239
package org.sat4j.scala import org.sat4j.specs.ContradictionException object Logic { /** A pretty printer for logic syntax trees. */ object PrettyPrint { def apply(e: Exp): String = e match { case True => "True" case False => "False" case Not(True) => "~True" case Not(False) => "~Fals...
dreef3/glowing-avenger
src/main/scala/org/sat4j/scala/Logic.scala
Scala
mit
15,571
// package benchmarks // package cec // package cec2005 // import benchmarks.cec.Helper // import benchmarks.dimension._ // import benchmarks.dimension.implicits._ // import benchmarks.matrix._ // import benchmarks.matrix.implicits._ // import shapeless._ // import shapeless.ops.nat.ToInt // import spire.implicits._ /...
cirg-up/benchmarks
src/main/scala/benchmarks/cec/cec2005/Params.scala
Scala
apache-2.0
11,003
package sparkapps import org.apache.spark.mllib.classification._ import org.apache.spark.mllib.evaluation.BinaryClassificationMetrics import org.apache.spark.mllib.linalg.Vectors import org.apache.spark.mllib.regression.LabeledPoint import org.apache.spark.{SparkContext, SparkConf} /** * Created by ludwineprobst on ...
Ludwsam/SparkTemplate
src/main/scala/sparkapps/ClassifyMailWithSVMWithSGD.scala
Scala
mit
1,727
package spray.can.websocket import akka.actor.Actor import akka.actor.ActorLogging import akka.actor.ActorRef import spray.can.Http import spray.can.server.UHttp import spray.can.websocket import spray.can.websocket.frame.Frame import spray.can.websocket.frame.FrameStream trait WebSocketServerWorker extends Actor wit...
smootoo/simple-spray-websockets
src/main/scala/spray/can/websocket/WebSocketServerWorker.scala
Scala
unlicense
1,533
/** DrawPanel */ package org.loom.scaffold import javax.swing._ import java.awt._ import java.awt.event._ import org.loom.interaction._ class DrawPanel() extends JPanel { println("DrawPanel loaded") var paused: Boolean = false val drawManager: DrawManager = new DrawManager() val interactionManager...
brogan/Loom
src/org/loom/scaffold/DrawPanel.scala
Scala
gpl-3.0
1,698
/*********************************************************************** * Copyright (c) 2013-2015 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 ...
drackaer/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/process/temporalDensity/TemporalDensityProcess.scala
Scala
apache-2.0
4,004
package lila.user import play.api.mvc.{ Request, RequestHeader } sealed trait UserContext { val req: RequestHeader val me: Option[User] def isAuth = me.isDefined def isAnon = !isAuth def is(user: User): Boolean = me ?? (user ==) def userId = me map (_.id) def username = me map (_.username) def...
r0k3/lila
modules/user/src/main/UserContext.scala
Scala
mit
1,256
package io.youi.drawable.stats class RenderStats { private val samples = 1000 private var firstRender = 0L private var lastRender = 0L private var renderStart = 0L private var renderFinish = 0L private val count: Var[Long] = Var(0L) private var lastElapsed = 0.0 private val elapsed: Array[Double] = n...
outr/youi
ui/js/src/main/scala/io/youi/drawable/stats/RenderStats.scala
Scala
mit
1,767
package vep.app.user import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server.Route import vep.app.user.adhesion.AdhesionIntegrationModule import vep.app.user.profile.ProfileIntegrationModule import vep.app.user.registration.RegistrationIntegrationModule import vep.app.user.session.SessionIntegra...
kneelnrise/vep
src/main/scala/vep/app/user/UserIntegrationModule.scala
Scala
mit
673
package com.dslplatform.api.client import scala.reflect.ClassTag import scala.concurrent.ExecutionContext import scala.concurrent.duration.Duration import scala.concurrent.Await import scala.collection.mutable.Buffer import com.dslplatform.api.patterns.Cube import com.dslplatform.api.patterns.Searchable import com.dsl...
ngs-doo/dsl-client-scala
http/src/main/scala/com/dslplatform/api/client/CubeBuilder.scala
Scala
bsd-3-clause
5,006
/* * Copyright (c) 2014 the original author or authors. * * Licensed under the MIT License; * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://opensource.org/licenses/MIT * * Unless required by applicable law or agreed to in writing...
kaisellgren/ScalaGit
src/main/scala/git/util/FileUtil.scala
Scala
mit
4,055
package io.coppermine case class Position(commit: Long, prepare: Long)
YoEight/scala-eventstore-lean
src/main/scala/io/coppermine/Position.scala
Scala
bsd-3-clause
72
package com.twitter.finagle.ssl /** * Protocols represent the versions of the TLS protocol which should * be enabled with a given TLS [[Engine]]. * * @note Java users: See [[ProtocolsConfig]]. */ sealed trait Protocols object Protocols { /** * Indicates that the determination for which TLS protocols are su...
luciferous/finagle
finagle-core/src/main/scala/com/twitter/finagle/ssl/Protocols.scala
Scala
apache-2.0
899
package com.karasiq.nanoboard import java.io.File /** * Official implementation compatibility util * @see [[https://github.com/nanoboard/nanoboard]] */ object NanoboardLegacy { /** * Reads places.txt file in `nanoboard/1.*` client format * @param file File path */ def placesFromTxt(file: String)...
Karasiq/nanoboard
library/src/main/scala/com/karasiq/nanoboard/NanoboardLegacy.scala
Scala
apache-2.0
1,160
package scala.meta package tests.prettyprinters import scala.meta.internal.trees.Origin import scala.meta.testkit.StructurallyEqual import org.scalameta.logger import org.scalatest.FunSuite class PrettyPrinterSuite extends FunSuite { implicit class XtensionResetOrigin[T <: Tree](tree: T) { def resetAllOrigins:...
MasseGuillaume/scalameta
scalameta/testkit/src/test/scala/scala/meta/tests/prettyprinters/PrettyPrinterSuite.scala
Scala
bsd-3-clause
1,112
/* * InputAttrFolder.scala * (Mellite) * * Copyright (c) 2012-2022 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Affero General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * contact@sciss.de */ package de.sciss.mellite.im...
Sciss/Mellite
app/src/main/scala/de/sciss/mellite/impl/proc/InputAttrFolder.scala
Scala
agpl-3.0
1,990
package blended.jms.bridge.internal import blended.jms.utils.ProviderAware import blended.testsupport.scalatest.LoggingFreeSpec class ProviderFilterSpec extends LoggingFreeSpec { case class Dummy( vendor : String, provider: String ) extends ProviderAware "The Providerfilter should" - { "match if ...
lefou/blended
blended.jms.bridge/src/test/scala/blended/jms/bridge/internal/ProviderFilterSpec.scala
Scala
apache-2.0
980
/* * 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 ...
shaoxuan-wang/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/rules/logical/CalcSnapshotTransposeRule.scala
Scala
apache-2.0
2,025
/******************************************************************************* * 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/servlet/SimpleServlet.scala
Scala
gpl-3.0
1,476
package org.elasticmq sealed abstract class VisibilityTimeout case class MillisVisibilityTimeout(millis: Long) extends VisibilityTimeout { val seconds = millis / 1000 } object MillisVisibilityTimeout { def fromSeconds(seconds: Long) = MillisVisibilityTimeout(seconds * 1000) } object DefaultVisibilityTimeout ext...
adamw/elasticmq
core/src/main/scala/org/elasticmq/MillisVisibilityTimeout.scala
Scala
apache-2.0
343
/* * # Trove * * This file is part of Trove - A FREE desktop budgeting application that * helps you track your finances, FREES you from complex budgeting, and * enables you to build your TROVE of savings! * * Copyright © 2016-2019 Eric John Fredericks. * * Trove is free software: you can redistribute it ...
emanchgo/budgetfree
src/main/scala/trove/core/Project.scala
Scala
gpl-3.0
1,046
/** * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com> */ package akka.dispatch import java.util.concurrent._ import akka.event.Logging.{ Debug, Error, LogEventException } import akka.actor._ import akka.dispatch.sysmsg._ import akka.event.{ BusLogging, EventStream } import com.typesafe.config.{ Conf...
Fincore/org.spark-project.akka
actor/src/main/scala/akka/dispatch/AbstractDispatcher.scala
Scala
mit
18,294
/* NSC -- new Scala compiler * Copyright 2005-2013 LAMP/EPFL * @author Paul Phillips */ package scala package reflect package internal import scala.collection.mutable import util.HashSet import scala.annotation.tailrec /** An abstraction for considering symbol pairs. * One of the greatest sources of compiler bu...
felixmulder/scala
src/reflect/scala/reflect/internal/SymbolPairs.scala
Scala
bsd-3-clause
9,613
package akka.contrib.persistence.mongodb import akka.actor.ActorSystem import akka.persistence.{SelectedSnapshot, SnapshotMetadata} import akka.serialization.SerializationExtension import akka.testkit.TestKit import com.mongodb.casbah.Imports._ import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @R...
twillouer/akka-persistence-mongo
casbah/src/test/scala/akka/contrib/persistence/mongodb/CasbahPersistenceSnapshotterSpec.scala
Scala
apache-2.0
5,964
package io.buoyant.namerd package iface import com.twitter.finagle.netty4.ssl.server.Netty4ServerEngineFactory import com.twitter.finagle.ssl.server.SslServerEngineFactory import io.buoyant.config.Parser import org.scalatest.FunSuite class MeshInterpreterInitializerTest extends FunSuite { test("address") { val...
denverwilliams/linkerd
namerd/iface/mesh/src/test/scala/io/buoyant/namerd/iface/MeshIfaceInitializerTest.scala
Scala
apache-2.0
1,441
/* * 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-log-leveldb/src/it/scala/com/rbmhtechnology/eventuate/LocationSpecLeveldb.scala
Scala
apache-2.0
2,655
/* biojava-adam BioJava and ADAM integration. Copyright (c) 2017-2022 held jointly by the individual authors. 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 versi...
heuermh/biojava-adam
scripts/loadFastaProtein.scala
Scala
lgpl-3.0
1,800
/* Generated File */ package models.table.customer import com.kyleu.projectile.services.database.slick.SlickQueryService.imports._ import java.time.ZonedDateTime import models.customer.RentalRow import models.table.store.{InventoryRowTable, StaffRowTable} import scala.language.higherKinds object RentalRowTable { va...
KyleU/boilerplay
app/models/table/customer/RentalRowTable.scala
Scala
cc0-1.0
2,417
package com.chainstaysoftware.unitofmeasure import EqualsHelper.DoubleWithEpsilonEquals /** * Holds a speed value like 100kph. * example - 100kph would be SpeedQuantity(Quantity[LengthUnit](100, * LengthUnit.Meter, EngineeringScale.KILO), TimeUnit.Hour, EngineeringScale.NONE)) */ case class SpeedQuantity(length: ...
ricemery/unitofmeasure
src/main/scala/com/chainstaysoftware/unitofmeasure/SpeedQuantity.scala
Scala
apache-2.0
2,388
package test; object Test { class Editor { private object extraListener { def h : AnyRef = extraListener } def f = extraListener.h } def main(args : Array[String]) : Unit = (new Editor).f }
loskutov/intellij-scala
testdata/scalacTests/pos/t1123.scala
Scala
apache-2.0
215
/* * Copyright 2016-2020 Daniel Urban and contributors listed in AUTHORS * Copyright 2020 Nokia * SPDX-License-Identifier: Apache-2.0 * * 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 *...
durban/seals
examples/lib/client/src/main/scala/com/example/lib/Client.scala
Scala
apache-2.0
3,185
package com.sksamuel.scapegoat.inspections.math import com.sksamuel.scapegoat._ /** * @author Stephen Samuel */ class BigDecimalDoubleConstructor extends Inspection( text = "Big decimal double constructor", defaultLevel = Levels.Warning, description = "Checks for use of BigDecimal(double) whic...
sksamuel/scalac-scapegoat-plugin
src/main/scala/com/sksamuel/scapegoat/inspections/math/BigDecimalDoubleConstructor.scala
Scala
apache-2.0
1,763
package plantae.citrus.mqtt.actors.connection import java.net.InetSocketAddress import akka.actor.{Actor, ActorLogging, Props} import akka.io.{IO, Tcp} import plantae.citrus.mqtt.actors.SystemRoot class Server extends Actor with ActorLogging { import Tcp._ import context.system IO(Tcp) ! Bind(self, new InetS...
sureddy/mqttd
src/main/scala-2.11/plantae/citrus/mqtt/actors/connection/Server.scala
Scala
mit
771
/*********************************************************************** * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
jahhulbert-ccri/geomesa
geomesa-fs/geomesa-fs-tools/src/main/scala/org/locationtech/geomesa/fs/tools/FsDataStoreCommand.scala
Scala
apache-2.0
4,312
package xyz.seto.obscene import xyz.seto.obscene.utils.Rectangle import java.io.DataInput import java.io.DataOutput import scala.collection.mutable.ListBuffer /** A Single stroke of a gesture * Comprised of a list of gesture points and * the rectangle bounding box */ class GestureStroke(val points: List[Gesture...
chrisseto/obscene
core/src/main/scala/GestureStroke.scala
Scala
apache-2.0
1,980
/* * Copyright (C) 2010 Lalit Pant <pant.lalit@gmail.com> * * The contents of this file are subject to the GNU General Public License * Version 3 (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.gnu.org/copyleft/gpl.html * *...
richardfontana/fontana2007-t
KojoEnv/src/net/kogics/kojo/figure/FigArc.scala
Scala
gpl-3.0
940
package fr.renoux.gaston.model import fr.renoux.gaston.util.{BitSet, testOnly} import scala.annotation.tailrec /** A Record is a triplet of slot, topic and assigned persons */ final case class Record(slot: Slot, topic: Topic, persons: Set[Person])(implicit val problem: Problem) extends Ordered[Record] { import pr...
gaelrenoux/gaston
src/main/scala/fr/renoux/gaston/model/Record.scala
Scala
apache-2.0
3,804
package co.rc.smserviceclient.exceptions import spray.http.HttpResponse /** * Class that defines an UnhandledResponseException */ class UnhandledResponseException( response: HttpResponse ) extends SessionServiceClientException( s"The external service returned an unexpected response: $response" )
rodricifuentes1/session-manager-service-client
src/main/scala/co/rc/smserviceclient/exceptions/UnhandledResponseException.scala
Scala
mit
301
package controllers.blog import java.util.Calendar import models.blog.{ Article, CommentsShow } import models.goods.Category import play.api.data.Form import play.api.data.Forms.{ mapping, text, _ } /** * Created by stanikol on 2/1/17. */ object FormsData { val timeFormatForSortOrder = new java.text.SimpleDate...
stanikol/walnuts
server/app/controllers/blog/FormsData.scala
Scala
apache-2.0
1,796
/* * MIT License * * Copyright (c) 2016 Gonçalo Marques * * 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, ...
gonmarques/slick-repo
src/main/scala/com/byteslounge/slickrepo/meta/Entity.scala
Scala
mit
1,394
package models import scalikejdbc._ import skinny.orm.{Alias, SkinnyCRUDMapperWithId} case class Station(id: Long, name: String, no: Int, lineId: Long) object Station extends SkinnyCRUDMapperWithId[Long, Station] { override def defaultAlias: Alias[Station] = createAlias("st") val st = defaultAlias override d...
ponkotuy/train-analyzer
app/models/Station.scala
Scala
apache-2.0
907
/* * Copyright 2011-2013 The myBatis Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
tempbottle/scala-1
mybatis-scala-core/src/main/scala/org/mybatis/scala/config/DefaultScriptingDriver.scala
Scala
apache-2.0
732
/** * This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]]. */ // DO NOT EDIT MANUALLY package gigahorse final class FileBody private ( val file: java.io.File) extends gigahorse.Body() with Serializable { override def equals(o: Any): Boolean = o match { case x: FileB...
eed3si9n/gigahorse
core/src/main/contraband-scala/gigahorse/FileBody.scala
Scala
apache-2.0
792
package com.seanshubin.utility.string import com.seanshubin.utility.collection.SeqDifference import com.seanshubin.utility.string.TableFormat.{LeftJustify, RightJustify} import org.scalatest.FunSuite class TableFormatTest extends FunSuite { test("box drawing characters") { val tableFormat = TableFormat.BoxDrawi...
SeanShubin/utility
string/src/test/scala/com/seanshubin/utility/string/TableFormatTest.scala
Scala
unlicense
6,851
package com.temportalist.weepingangels.common.network import com.temportalist.origin.foundation.common.network.IPacket import com.temportalist.weepingangels.common.tile.TEStatue import cpw.mods.fml.common.network.simpleimpl.{IMessage, IMessageHandler, MessageContext} import cpw.mods.fml.relauncher.Side import net.mine...
TheTemportalist/WeepingAngels
src/main/scala/com/temportalist/weepingangels/common/network/PacketModifyStatue.scala
Scala
apache-2.0
1,676
package com.wavesplatform.lang.v1.parser import cats.instances.either._ import cats.instances.list._ import cats.instances.option._ import cats.syntax.either._ import cats.syntax.traverse._ import com.wavesplatform.common.state.ByteStr import com.wavesplatform.lang.v1.ContractLimits import com.wavesplatform.lang.v1.ev...
wavesplatform/Waves
lang/shared/src/main/scala/com/wavesplatform/lang/v1/parser/Parser.scala
Scala
mit
29,101
package lila.tournament import org.joda.time.DateTime import scala.concurrent.duration.FiniteDuration import lila.db.BSON._ import lila.user.{ User, UserRepo } final class Winners( mongoCache: lila.memo.MongoCache.Builder, ttl: FiniteDuration) { private implicit val WinnerBSONHandler = reactivemongo.b...
terokinnunen/lila
modules/tournament/src/main/Winners.scala
Scala
mit
1,284
package io.buoyant.namerd import com.twitter.util.{Await, Closable} import io.buoyant.admin.{App, Build} import java.io.File import scala.io.Source object Main extends App { def main(): Unit = { val build = Build.load("/io/buoyant/namerd/build.properties") log.info("namerd %s (rev=%s) built at %s", build.v...
hhtpcd/linkerd
namerd/main/src/main/scala/io/buoyant/namerd/Main.scala
Scala
apache-2.0
1,527
package org.jetbrains.plugins.scala package testingSupport package specs2 /** * @author Roman.Shein * @since 16.10.2014. */ abstract class SCL7228Test extends Specs2TestCase { addSourceFile("SCL7228Test.scala", """ |import org.specs2.mutable.Specification | |class SCL7228Test extends Specif...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/testingSupport/specs2/SCL7228Test.scala
Scala
apache-2.0
654
/* * Copyright 2014 Frédéric Cabestre * * 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...
fcabestre/Scala-MQTT-client
core/src/main/scala/net/sigusr/mqtt/impl/protocol/Action.scala
Scala
apache-2.0
1,627
/* * Copyright (c) 2014-2020 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...
alexandru/monifu
reactiveTests/src/test/scala/monix/reactiveTests/SubscriberWhiteBoxAsyncTest.scala
Scala
apache-2.0
2,535
/* * 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 ...
yu-iskw/gihyo-spark-book-example
src/test/scala/jp/gihyo/spark/TestStreamingContext.scala
Scala
apache-2.0
1,785
/** * Copyright 2009 Google 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 agree...
jds2001/Etherpad-development
infrastructure/net.appjet.common.sars/sha1.scala
Scala
apache-2.0
1,386
/* * 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.silicon.supporters import org.slf4s.Logging import viper.silver.ast import viper.silv...
sccblom/vercors
viper/silicon/src/main/scala/supporters/ChunkSupporter.scala
Scala
mpl-2.0
9,586
package artisanal.pickle.maker import models._ import parser._ import org.specs2._ import mutable._ import specification._ import scala.reflect.internal.pickling.ByteCodecs import scala.tools.scalap.scalax.rules.scalasig._ import com.novus.salat.annotations.util._ import scala.reflect.ScalaSignature class ShortS...
julianpeeters/artisanal-pickle-maker
src/test/scala/singleValueMember/ShortSpec.scala
Scala
apache-2.0
882
package com.acework.js.components.bootstrap import com.acework.js.components.bootstrap.Utils._ import japgolly.scalajs.react.Addons.ReactCloneWithProps import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.prefix_<^._ import scala.scalajs.js._ /** * Created by weiyin on 10/03/15. */ object ListGroup e...
lvitaly/scalajs-react-bootstrap
core/src/main/scala/com/acework/js/components/bootstrap/ListGroup.scala
Scala
mit
1,027
package models import java.sql.Timestamp //import scala.slick.driver.PostgresDriver.simple._ //import scala.slick.driver.MySQLDriver.simple._ import scala.slick.driver.H2Driver.simple._ import models.DTO.{Comment, Customer, User, Ticket} /** * Created by pnagarjuna on 22/05/15. */ object Tables { val usersTabl...
pamu/ticketing-system
app/models/Tables.scala
Scala
apache-2.0
3,151
package com.featurefm.metrics import akka.actor._ import com.codahale.metrics.health.HealthCheckRegistry import nl.grons.metrics.scala.{CheckedBuilder, MetricName} import scala.collection.concurrent.TrieMap class HealthCheckExtension(system: ExtendedActorSystem) extends Extension { /** The application wide regist...
ListnPlay/Kastomer
src/main/scala/com/featurefm/metrics/HealthCheckExtension.scala
Scala
mit
1,881
/* * Copyright 2016 Dennis Vriend * * 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...
dnvriend/demo-akka-persistence-jdbc
src/main/scala/com/github/dnvriend/WrapperTest.scala
Scala
apache-2.0
2,476
package com.pygmalios.reactiveinflux.jawa import java.util import java.util.Date import com.pygmalios.reactiveinflux._ import com.pygmalios.reactiveinflux.jawa.Conversions._ import com.pygmalios.{reactiveinflux => sc} import org.joda.time.{DateTime, Instant} class JavaPoint(val underlyingPoint: sc.Point) extends Jav...
pygmalios/reactiveinflux
src/main/scala/com/pygmalios/reactiveinflux/jawa/JavaPoint.scala
Scala
apache-2.0
1,487
/* * 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 ...
yelshater/hadoop-2.3.0
spark-core_2.10-1.0.0-cdh5.1.0/src/main/scala/org/apache/spark/partial/GroupedCountEvaluator.scala
Scala
apache-2.0
2,598
/* * 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/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonFileMetastore.scala
Scala
apache-2.0
19,992
import collection.mutable._ class TestSet(s0: Set[Int], s1: Set[Int]) { val Iterations = 10 val Range = 100000 val testEachStep = false val Threshold = 20000 val r = new java.util.Random(12345) def test(s: Set[Int], n: Int): Any = { val v = n >> 3 n & 7 match { case 0 | 1 | 2 => s contains v ...
som-snytt/dotty
tests/run/colltest.scala
Scala
apache-2.0
1,903
package org.jetbrains.plugins.scala.lang.types.existentialSimplification package generated class ExistentialSimplificationSecondRuleTest extends ExistentialSimplificationTestBase { //This class was generated by build script, please don't change this override def folderPath: String = super.folderPath + "secondRule/...
ilinum/intellij-scala
test/org/jetbrains/plugins/scala/lang/types/existentialSimplification/generated/ExistentialSimplificationSecondRuleTest.scala
Scala
apache-2.0
488
/* * scala-bcp * Copyright 2014 深圳岂凡网络有限公司 (Shenzhen QiFun Network Corp., LTD) * * 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 * ...
qifun/scala-bcp
src/main/scala/com/qifun/bcp/BcpIo.scala
Scala
apache-2.0
7,014
package epic.framework /* Copyright 2012 David Hall 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 ...
jovilius/epic
src/main/scala/epic/framework/EPInference.scala
Scala
apache-2.0
5,868
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
brad-kaiser/spark
mllib/src/main/scala/org/apache/spark/ml/tree/impl/DecisionTreeMetadata.scala
Scala
apache-2.0
9,545
package chandu0101.scalajs.react.components package elementalui import chandu0101.macros.tojs.JSMacro import japgolly.scalajs.react._ import japgolly.scalajs.react.raw.React import scala.scalajs.js import scala.scalajs.js.`|` case class CheckBox(className: js.UndefOr[String] = js.undefined, disab...
rleibman/scalajs-react-components
core/src/main/scala/chandu0101/scalajs/react/components/elementalui/Checkbox.scala
Scala
apache-2.0
1,101
package se.gigurra.wallace.renderer import com.badlogic.gdx.graphics.g2d.SpriteBatch import se.gigurra.wallace.util.Decorated class RichSpriteBatch(_base: SpriteBatch) extends Decorated[SpriteBatch](_base) { def active(f: => Unit): Unit = { this.begin() try { f } finally { this.end() } ...
GiGurra/Wall-Ace
lib_render/src/main/scala/se/gigurra/wallace/renderer/RichSpriteBatch.scala
Scala
gpl-2.0
378