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.danielwestheide.kontextfrei.scalatest import com.danielwestheide.kontextfrei.DCollectionOps trait KontextfreiSpec[DColl[_]] { implicit def ops: DCollectionOps[DColl] }
dwestheide/kontextfrei
scalatest/src/main/scala/com/danielwestheide/kontextfrei/scalatest/KontextfreiSpec.scala
Scala
apache-2.0
184
/* * 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 ...
ptrendx/mxnet
scala-package/core/src/test/scala/org/apache/mxnet/NDArraySuite.scala
Scala
apache-2.0
33,485
/* * 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 ...
TiVo/samza
samza-core/src/test/scala/org/apache/samza/job/TestJobRunner.scala
Scala
apache-2.0
3,142
package registration.auditor case class AuditorApiConfig(url: String, apiKey: String) case class AuditorGroupConfig(contentApiConfig: AuditorApiConfig, paApiConfig: AuditorApiConfig)
guardian/mobile-n10n
registration/app/registration/auditor/AuditorApiConfig.scala
Scala
apache-2.0
184
package lila.fishnet import org.joda.time.DateTime import chess.format.{ Uci, FEN } import chess.variant.Variant sealed trait Work { def _id: Work.Id def game: Work.Game def tries: Int def lastTryByKey: Option[Client.Key] def acquired: Option[Work.Acquired] def createdAt: DateTime def skill: Client.Sk...
clarkerubber/lila
modules/fishnet/src/main/Work.scala
Scala
agpl-3.0
3,399
// Generated by the Scala Plugin for the Protocol Buffer Compiler. // Do not edit! // // Protofile syntax: PROTO3 package com.google.protobuf.struct /** `Struct` represents a structured data value, consisting of fields * which map to dynamically typed values. In some languages, `Struct` * might be supported by a ...
dotty-staging/ScalaPB
scalapb-runtime/non-jvm/src/main/scala/com/google/protobuf/struct/Struct.scala
Scala
apache-2.0
15,477
/* * 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
base/src/main/scala/org/openurp/base/model/person.scala
Scala
lgpl-3.0
2,447
/* 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 distributed u...
zavakid/zcommons
commons.test/src/test/scala/com/zavakid/commons/test/Person.scala
Scala
apache-2.0
852
package nl.codecentric.assumption.dsl.core.parser import java.io.{File, BufferedReader, FileNotFoundException} import nl.codecentric.assumption.dsl.api.model.Experiment import scala.collection.immutable.TreeSet import scala.collection.mutable import scala.io.Source import scala.reflect.internal.util.ScalaClassLoader...
craftsmenlabs/gareth-poc
dsl/core/src/main/scala/nl/codecentric/assumption/dsl/core/parser/ExperimentParser.scala
Scala
gpl-2.0
1,461
package org.jetbrains.plugins.scala package lang package psi package impl package toplevel import _root_.java.util.{Collection, Collections, List} import com.intellij.openapi.util.Pair import com.intellij.psi.PsiReferenceList.Role import com.intellij.psi.javadoc.PsiDocComment import com.intellij.psi.meta.PsiMetaData ...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/toplevel/PsiClassFake.scala
Scala
apache-2.0
3,886
// should not result in a stack overflow object Test { def main(args: Array[String]): Unit = { import collection.mutable.LinkedList val l = new LinkedList[Int]() ++ (0 until 10000) assert(l.length == 10000) } }
folone/dotty
tests/pending/run/t3996.scala
Scala
bsd-3-clause
232
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
slamdata/slamengine
qscript/src/test/scala/quasar/qscript/provenance/ProvFGenerator.scala
Scala
apache-2.0
1,520
package eu.phisikus.plotka.network.consumer import eu.phisikus.plotka.model.{Message, NetworkMessage, NetworkPeer, Peer} import eu.phisikus.plotka.network.listener.dto.TestMessage import eu.phisikus.plotka.network.talker.Talker import org.scalatest.{FunSuite, Matchers} class StandardNetworkMessageConsumerTest extends...
phisikus/plotka
networking/src/test/scala/eu/phisikus/plotka/network/consumer/StandardNetworkMessageConsumerTest.scala
Scala
bsd-3-clause
1,048
package json import java.util.UUID import io.sphere.json._ import io.sphere.json.generic._ import io.sphere.mongo.generic._ import io.sphere.mongo.format.MongoFormat import io.sphere.mongo.format.DefaultMongoFormats._ import io.sphere.mongo.format._ import io.sphere.util.BaseMoney import org.joda.time.format.ISODateT...
sphereio/sphere-scala-libs
benchmarks/src/main/scala/json/JsonBenchmark.scala
Scala
apache-2.0
3,767
/** * 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...
sslavic/kafka
core/src/test/scala/unit/kafka/coordinator/group/MemberMetadataTest.scala
Scala
apache-2.0
3,871
package pokescala.parse import pokescala.model._ import pokescala.model.Implicits._ import scala.util.parsing.json.JSONObject import scala.util.parsing.json.JSONArray import scala.collection.mutable import scala.util.Try object PokemonParser extends Parser[Pokemon] { def parse(implicit raw : Map[String, Any]) : Tr...
haferflocken/PokeScala
PokeScala/src/pokescala/parse/PokemonParser.scala
Scala
apache-2.0
4,166
/*********************************************************************** * 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 ...
giserh/geomesa
geomesa-convert/geomesa-convert-text/src/test/scala/org/locationtech/geomesa/convert/text/NewLinesTest.scala
Scala
apache-2.0
2,472
package org.ferrit.core.test import scala.concurrent.ExecutionContext import org.ferrit.core.http.{Request, Response} import org.ferrit.core.util.Headers import org.ferrit.core.test.FakeHttpClient.NotFound /** * Generates a website of N pages to support a crawler reachability test and * work out the crawler throug...
reggoodwin/ferrit
src/test/scala/org/ferrit/core/test/LinkedListHttpClient.scala
Scala
mit
3,598
package gitbucket.core.servlet import java.io.File import java.sql.{DriverManager, Connection} import gitbucket.core.plugin.PluginRegistry import gitbucket.core.service.SystemSettingsService import gitbucket.core.util._ import org.apache.commons.io.FileUtils import javax.servlet.{ServletContextListener, ServletContext...
skohar/gitbucket
src/main/scala/gitbucket/core/servlet/AutoUpdate.scala
Scala
apache-2.0
6,324
package chrome import net.liftweb.json._ import net.liftweb.json.JsonDSL._ case class TabInfo(frontEndUrl: String, faviconUrl: String, thumbnail: String, title: String, url: String, wsdebugUrl: String) object TabInfo { d...
softprops/chrome-pilot
server/src/main/scala/serial.scala
Scala
mit
771
package jp.kenichi.pades import java.nio.file.{Path, Paths, Files} trait PdfAccess { def size: Long def apply(offset: Long): Byte } object PdfAccess { val empty = new PdfAccess { val size = 0 def apply(index: Long) = throw new IndexOutOfBoundsException(s"$index / $size") } } class PdfFileAccess(file: Path) e...
ken1ma/pades-scala-js
jvm/src/main/scala/jp.kenichi/pades/PdfAccess.scala
Scala
apache-2.0
611
/* From ESOP 2014, Kuwahara et al */ import stainless.lang._ object NestedLoop { def loop1(n: BigInt): BigInt = { if (n > 0) loop1(n - 1) else 0 } def loop2(n: BigInt): BigInt = { if (n > 0) loop1(n) + loop2(n - 1) else 0 } }
epfl-lara/stainless
frontends/benchmarks/termination/valid/NestedLoop.scala
Scala
apache-2.0
247
package org.jetbrains.plugins.scala package lang package psi package impl package toplevel package synthetic import com.intellij.openapi.project.Project import com.intellij.openapi.vfs.VirtualFile import com.intellij.psi._ import com.intellij.psi.impl.light.LightElement import com.intellij.psi.scope.PsiScopeProcessor ...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/toplevel/synthetic/ScSyntheticPackage.scala
Scala
apache-2.0
7,854
/* Title: Pure/General/json.scala Author: Makarius Support for JSON: https://www.json.org/. See also http://seriot.ch/parsing_json.php "Parsing JSON is a Minefield". */ package isabelle import scala.util.parsing.combinator.Parsers import scala.util.parsing.combinator.lexical.Scanners import scala.uti...
larsrh/libisabelle
modules/pide/2018/src/main/scala/General/json.scala
Scala
apache-2.0
11,161
package at.vizu.s2n.types.symbol /** * Phil on 07.12.15. */ class AppliedTypeArgument(val appliedType: TType, genericName: String, upperBound: TType, lowerBound: TType, covariant: Boolean, contravariant: Boolean, val genericModifier: TypeArgument) extends TypeArgument(genericModifier.ct...
viZu/nasca
src/main/scala/at/vizu/s2n/types/symbol/AppliedTypeArgument.scala
Scala
apache-2.0
2,567
package com.github.simonedeponti.play26lettuce import java.nio.ByteBuffer import java.nio.charset.Charset import akka.actor.ActorSystem import akka.serialization.SerializationExtension import io.lettuce.core.codec.RedisCodec /** Encodes and decodes keys and values using akka's pluggable serializers. * * Only va...
simonedeponti/play26-lettuce
src/main/scala/com/github/simonedeponti/play26lettuce/AkkaCodec.scala
Scala
bsd-3-clause
1,468
package jsky.app.ot.viewer.action import jsky.app.ot.viewer.SPViewer import javax.swing._ import java.awt.event.{ActionEvent, InputEvent, KeyEvent} /** * Close the current program. */ class CloseWindowAction(viewer: SPViewer) extends AbstractViewerAction(viewer, "Close Window") { putValue(AbstractViewerAction.S...
arturog8m/ocs
bundle/jsky.app.ot/src/main/scala/jsky/app/ot/viewer/action/CloseWindowAction.scala
Scala
bsd-3-clause
829
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/AttributeOrdering.scala
Scala
apache-2.0
6,616
/* * 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 ...
ArvinDevel/onlineAggregationOnSparkV2
core/src/test/scala/org/apache/spark/scheduler/OutputCommitCoordinatorSuite.scala
Scala
apache-2.0
10,164
/* * 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 agree...
samstokes/zipkin
zipkin-collector-core/src/main/scala/com/twitter/zipkin/config/ZipkinCollectorConfig.scala
Scala
apache-2.0
5,237
/* 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...
danosipov/scalding
scalding-core/src/main/scala/com/twitter/scalding/serialization/KryoHadoop.scala
Scala
apache-2.0
4,409
package nsmc.adhoc import com.mongodb.casbah.Imports._ import com.mongodb.casbah.MongoClient import util.EmbeddedMongo object Doit { def main (args: Array[String]) { val em = new EmbeddedMongo() val mongoClient = MongoClient("localhost", em.getPort()) mongoClient.dbNames().foreach(println) va...
shotishu/spark-mongodb-connector
src/test/scala/nsmc/adhoc/Doit.scala
Scala
apache-2.0
667
object forceDelay { import scala.language.implicitConversions class Susp[+A](lazyValue: => A) extends Function0[A] { private var func: () => Any = () => lazyValue private var value: Any = null override def apply() = { if (func != null) { value = func().asInstanceOf[A] func = null...
yusuke2255/dotty
tests/run/t603.scala
Scala
bsd-3-clause
853
/* * Copyright 2001-2009 OFFIS, Tammo Freese * * 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...
kevinwright/scalatest
src/examples/scala/org/scalatestexamples/easymock/EasyMockExampleFixtureFlatSpec.scala
Scala
apache-2.0
6,826
import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spark.SparkConf import org.apache.spark.mllib.clustering.{KMeans, KMeansModel} import org.apache.spark.mllib.linalg.Vectors import org.apache.log4j.Logger import org.apache.log4j.Level object ByManner { /* Opens header c...
djzurawski/death-records-data-mining-spark
src/main/scala/manner.scala
Scala
mit
5,925
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this f...
mandar2812/DynaML
dynaml-tensorflow/src/main/scala/io/github/tailhq/dynaml/tensorflow/Learn.scala
Scala
apache-2.0
28,677
package org.shapelogic.sc.imageprocessing import org.shapelogic.sc.polygon.Calculator2D._ //import org.shapelogic.sc.logic.LetterTaskFactory import org.shapelogic.sc.polygon.CPointInt import org.shapelogic.sc.polygon.Calculator2D import org.shapelogic.sc.util.Constants import spire.implicits._ import org.shapelogic.sc...
sami-badawi/shapelogic-scala
src/main/scala/org/shapelogic/sc/imageprocessing/MaxDistanceVectorizer.scala
Scala
mit
12,416
package com.twitter.finagle.kestrelx.unit import _root_.java.net.{InetSocketAddress, SocketAddress} import _root_.java.nio.charset.Charset import _root_.java.util.concurrent.{BlockingDeque, ExecutorService, Executors, LinkedBlockingDeque} import com.google.common.cache.{CacheBuilder, CacheLoader, LoadingCache} import...
yancl/finagle-6.22.0
finagle-kestrelx/src/test/scala/com/twitter/finagle/kestrelx/unit/MultiReaderTest.scala
Scala
apache-2.0
19,430
package net.randallalexander.restaurant.chooser.model trait Enum extends Product { def name:String = productPrefix } trait EnumOps[T<:Enum] { def values:Seq[T] def toEnum(name: String):Option[T] = values.find(_.name == name) def toEnumYOLO(name: String):T = toEnum(name).get } trait DatabaseEnum extends Enum ...
randallalexander/restaurant-chooser
service/src/main/scala/net/randallalexander/restaurant/chooser/model/Database.scala
Scala
mit
459
package freecli package option package help import cats.Monoid import cats.implicits._ import core.formatting._ import option.api._ import printer.{Printer, PrinterParts} sealed trait OptionHelp case class SingleOptionHelp(field: OptionField, default: Option[String], required: Boolean) extends OptionHelp case cla...
pavlosgi/freecli
core/src/main/scala/freecli/option/help/OptionsHelp.scala
Scala
apache-2.0
1,438
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.testing.interface import ...
nicolasstucki/scala-js
test-interface/src/main/scala/org/scalajs/testing/interface/TestAdapterBridge.scala
Scala
apache-2.0
4,400
package org.crudible.core.model case class ModelWithText(val model: ModelWithIdentity, val text: String)
rehei/crudible
crudible-core/src/main/scala/org/crudible/core/model/ModelWithText.scala
Scala
apache-2.0
105
package com.tajpure.scheme.compiler import com.tajpure.scheme.compiler.parser.Parser import com.tajpure.scheme.compiler.value.VoidValue object Interpreter { def interp(_source: String): Unit = { if (_source == null || _source.size == 0) { println("input can't be empty") } else { Parser.pa...
tajpure/SoScheme
src/main/scala/com/tajpure/scheme/compiler/Interpreter.scala
Scala
gpl-3.0
2,263
/* * ScalaQCMS -- Scala Quantum Circuit Model Simulator * * Copyright (c) 2012 Antti Vikman */ package models import scalala.scalar.Complex import scalala.library.LinearAlgebra._ import scalala.tensor.Matrix /** * Enumeration of mathematical operators */ object EquationOperator extends Enumeration { type Eq...
n-a-g-r-o-m/ScaQCMS
app/models/Equation.scala
Scala
mit
6,042
package idv.brianhsu.maidroid.plurk.util import java.io.InputStream import android.graphics.BitmapFactory import java.net.URL import java.io._ import android.media.ExifInterface import android.graphics.Matrix import android.graphics.Bitmap case class ResizeFactor(originWidth: Int, originHeight: Int, sampleSize: Int)...
brianhsu/MaidroidPlurk
src/main/scala/util/ImageSampleFactor.scala
Scala
gpl-3.0
3,977
import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._ import sbt.Keys._ import sbt._ import sbtcrossproject.CrossPlugin.autoImport._ import scalajscrossproject.ScalaJSCrossPlugin.autoImport._ import scoverage.ScoverageKeys.coverageEnabled import blended.sbt.Dependencies private object BlendedSecurit...
lefou/blended
project/BlendedSecurity.scala
Scala
apache-2.0
2,080
package gapt.proofs.expansion import gapt.expr._ import gapt.expr.subst.Substitution import gapt.logic.Polarity import org.specs2.mutable.Specification class FormulaToExpansionTreeTest extends Specification { "substituting bound variables" in { formulaToExpansionTree( hof"!x x=x", Set( Substitution(...
gapt/gapt
tests/src/test/scala/gapt/proofs/expansion/FormulaToExpansionTreeTest.scala
Scala
gpl-3.0
607
//----------------------------------------------------------------------- // FILE : RTCredential.scala // SUBJECT : Classes that represent RT credentials in the abstract. // AUTHOR : (C) Copyright 2011 by Simone Willett <[email protected]> // and Peter C. Chapin <[email protected]> // //------------...
pchapin/sprocket
src/edu/uvm/rtadmin/RTCredential.scala
Scala
bsd-3-clause
938
package swiss.sib.analytics.server.logs import org.scalatest.FlatSpec import org.scalatest.Matchers import swiss.sib.analytics.server.logs.utils.LogEntryUtils import org.scalatest.Ignore import swiss.sib.analytics.server.logs.model.LogEntry class LogEntryUtilsSpecs extends FlatSpec with Matchers { def mustAllSu...
sib-swiss/server-log-analytics
src/test/scala/swiss/sib/analytics/server/logs/LogEntryUtilsSpecs.scala
Scala
gpl-2.0
8,127
/* * 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 ...
big-pegasus/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Average.scala
Scala
apache-2.0
3,146
package domain.models import org.joda.money.Money import java.time.LocalDate import scala.math.Ordered.orderingToOrdered import util.PlayDateTimeHelper._ case class LunchOffer( id: Id, name: String, day: LocalDate, price: Money, provider: LunchProviderId) extends Ordered[LunchOffer] { def compa...
rori-dev/lunchbox
backend-play-akka-scala/app/domain/models/LunchOffer.scala
Scala
mit
409
/* * 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
streaming/src/main/scala/spark/streaming/Checkpoint.scala
Scala
apache-2.0
7,011
// Copyright (c) 2014 Belmont Technology Pty Ltd. All rights reserved. package com.grahamlea.examples.rxjava.threading /** * Shows that simply calling parallel() somewhere in the chain doesn't * necessarily result that downstream operations occurring in parallel, * or even on different threads. */ object Example08...
GrahamLea/RxJava-Threading-Examples
src/main/scala/com/grahamlea/examples/rxjava/threading/Example08x_Parallel_NoWorkInsideParallel.scala
Scala
apache-2.0
708
/* * Copyright (C) 2007-2008 Artima, Inc. 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.org/licenses/LICENSE-2.0 * * Unless requir...
peachyy/scalastu
swing/FirstSwingApp.scala
Scala
apache-2.0
1,006
package me.reminisce.analysis import me.reminisce.analysis.model.{ItemSummary, UserSummary} import me.reminisce.analysis.model.Formatters._ import me.reminisce.database import me.reminisce.database.MongoCollections import me.reminisce.database.MongoDBEntities.{FBPage, FBPageLike, FBPost} import me.reminisce.database.M...
reminisceme/game-creator
src/main/scala/me/reminisce/analysis/DataFetcher.scala
Scala
apache-2.0
3,836
package coursier.cli.options import caseapp.{ExtraName => Short, HelpMessage => Help, ValueDescription => Value, _} // format: off final case class DependencyOptions( @Group(OptionGroup.dependency) @Hidden @Help("Exclude module") @Value("organization:name") @Short("E") exclude: List[String] = Nil, @...
coursier/coursier
modules/cli/src/main/scala/coursier/cli/options/DependencyOptions.scala
Scala
apache-2.0
1,668
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
pgandhi999/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/FileIndexSuite.scala
Scala
apache-2.0
20,158
import stainless.lang._ object ObjectHierarchyMutation1 { case class A(var y: Int) case class B(a: A) def update(b: B): Int = { b.a.y = 17 b.a.y } ensuring(res => res == 17) }
epfl-lara/stainless
frontends/benchmarks/imperative/valid/ObjectHierarchyMutation1.scala
Scala
apache-2.0
196
package com.twitter.finagle.netty3 import com.twitter.finagle._ import com.twitter.finagle.IOExceptionStrings.FinestIOExceptionMessages import com.twitter.finagle.netty3.channel._ import com.twitter.finagle.netty3.param.Netty3Timer import com.twitter.finagle.netty3.ssl.server.SslServerConnectHandler import com.twitter...
koshelev/finagle
finagle-netty3/src/main/scala/com/twitter/finagle/netty3/Netty3Listener.scala
Scala
apache-2.0
15,626
package org.openstack.api.restful.ceilometer.v2.requests import org.openstack.api.restful.ceilometer.v2.FilterExpressions.Query /** * @author Antonio Murgia * @version 21/10/14. */ case class ResourcesListGETRequest(q : Seq[Query] = List(), meter_links : Option[Int] = None) { def relativeURL = "/v2/resources" } ...
tmnd1991/ceilometerAPI4s
src/main/scala/org/openstack/api/restful/ceilometer/v2/requests/ResourcesListGETRequest.scala
Scala
apache-2.0
963
/** Pow2.scala -> This file computes the power of 2 in fixed point using a lookup table with linear interpolation Copyright (C) 2015 Stephen Tridgell This file is part of a pipelined OLK application. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Lice...
da-steve101/chisel-pipelined-olk
src/main/scala/Kernel/Pow2.scala
Scala
gpl-2.0
6,724
package com.scalableQuality.quick.surface.commandLineOptions object CommandLineParser { private val quickName = "Quick" private val quickVersion = "\\n\\rrelease: 0.6.2" def apply(args: Array[String]): Option[QuickState] = new scopt.OptionParser[QuickState](quickName) { head(quickName, quickVersion) ...
MouslihAbdelhakim/Quick
src/main/scala/com/scalableQuality/quick/surface/commandLineOptions/CommandLineParser.scala
Scala
apache-2.0
1,399
package skychat.irc import org.bukkit.{BanList, Bukkit} import org.pircbotx.hooks.events.MessageEvent import scala.collection.JavaConverters._ object Commands { def init(): Unit = { import reflect.runtime.universe._ val r = reflect.runtime.currentMirror.reflect(Impl) SkyChatIrc.listen(r.symbol.typeSign...
robotbrain/skychat
src/main/scala/skychat/irc/Commands.scala
Scala
apache-2.0
1,310
package mesosphere.marathon.api.v2 import java.net._ import com.wix.accord._ import mesosphere.marathon.{ AllConf, ValidationFailedException } import mesosphere.marathon.state.FetchUri import org.slf4j.LoggerFactory import play.api.libs.json._ import scala.collection.GenTraversableOnce import scala.reflect.ClassTag ...
vivekjuneja/marathon
src/main/scala/mesosphere/marathon/api/v2/Validation.scala
Scala
apache-2.0
8,117
package org.jetbrains.plugins.scala package compiler import java.util.UUID import com.intellij.compiler.server.BuildManagerListener import com.intellij.notification.{Notification, NotificationType, Notifications} import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.compiler.{CompileC...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/compiler/ServerMediator.scala
Scala
apache-2.0
4,890
/* * Copyright 2016 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/reactivemongo-json
src/test/scala/MongoConnectorSpec.scala
Scala
apache-2.0
1,103
package akka import akka.actor.SupervisorStrategy.{Restart, Resume, Stop} import akka.actor.{Actor, ActorSystem, OneForOneStrategy, Props} /** * Created by Om Prakash C on 20-06-2017. */ object SupervisorExample extends App { case object CreateChild case class SignalChild(order: Int) case class PrintSignal(...
comprakash/learning-scala
concurrency/src/main/scala/akka/SupervisorExample.scala
Scala
gpl-3.0
2,012
/* * 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...
Frannie-Ludmilla/sparta
serving-core/src/main/scala/com/stratio/sparta/serving/core/models/policy/UserJar.scala
Scala
apache-2.0
712
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
jedesah/Quasar
rdbms/src/main/scala/quasar/physical/rdbms/fs/postgres/PostgresDescribeTable.scala
Scala
apache-2.0
3,267
/** * Copyright (C) 2013 Adam Retter ([email protected]) * * 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 re...
adamretter/Shadoop
src/main/scala/shadoop/Logging.scala
Scala
apache-2.0
1,082
package services.datetime import org.specs2.mutable.Specification import services.SDate import services.graphstages.Crunch.europeLondonTimeZone class MidnightTimeZoneSpec extends Specification { def asLocalTimeZone(localDateTimeString: String) = SDate(localDateTimeString, europeLondonTimeZone) "When finding the...
UKHomeOffice/drt-scalajs-spa-exploration
server/src/test/scala/services/datetime/MidnightTimeZoneSpec.scala
Scala
apache-2.0
3,260
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
Veryku/gnocchi
gnocchi-core/src/main/scala/net/fnothaft/gnocchi/models/variant/logistic/AdditiveLogisticVariantModel.scala
Scala
apache-2.0
3,719
/* Copyright 2009-2011 Jay Conrod * * This file is part of Tungsten. * * Tungsten 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 of * the License, or (at your option) any late...
jayconrod/tungsten
core/src/main/scala/tungsten/Copying.scala
Scala
gpl-2.0
1,104
package tomtom.splitter.layer7 import java.net.Socket import scala.util.Try object PortFactory { @volatile var portStream: Stream[Int] = Stream.from(1024).flatMap { port => Try { val socket = new Socket("localhost", port) socket.close() Seq.empty[Int] }.getOrEls...
ebowman/splitter
src/test/scala/tomtom/splitter/layer7/PortFactory.scala
Scala
apache-2.0
502
package slamdata.engine.std trait StdLib extends Library { val math = MathLib val structural = StructuralLib val agg = AggLib val relations = RelationsLib val set = SetLib val array = ArrayLib val string = StringLib val date = DateLib val functions = math.functions ++ structural.functions ++ ...
mossprescott/quasar
src/main/scala/slamdata/engine/std/std.scala
Scala
agpl-3.0
469
/* * 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/transform/vision/image/augmentation/PixelNormalizerSpec.scala
Scala
apache-2.0
1,811
package org.jetbrains.plugins.scala.performance import java.io.File import java.util import com.intellij.lang.javascript.boilerplate.GithubDownloadUtil import com.intellij.openapi.externalSystem.model.ProjectSystemId import com.intellij.openapi.externalSystem.settings.ExternalProjectSettings import com.intellij.opena...
ilinum/intellij-scala
test/org/jetbrains/plugins/scala/performance/DownloadingAndImportingTestCase.scala
Scala
apache-2.0
5,020
package com.pygmalios.rawKafkaCassandra import akka.actor.ActorSystem import akka.testkit.{ImplicitSender, TestKit} import com.datastax.driver.core.PreparedStatement import com.pygmalios.rawKafkaCassandra.actors.KafkaToCassandra import com.pygmalios.rawKafkaCassandra.cassandra.{CassandraSession, CassandraSessionFactor...
pygmalios/raw-kafka-cassandra
src/itest/scala/com/pygmalios/rawKafkaCassandra/TestKafkaISpec.scala
Scala
apache-2.0
2,413
package is.hail.utils import is.hail.HailSuite import org.testng.annotations.Test class SpillingCollectIteratorSuite extends HailSuite { @Test def addOneElement() { val array = (0 to 1234).toArray val sci = SpillingCollectIterator(ctx.localTmpdir, fs, sc.parallelize(array, 99), 100) assert(sci.hasNext) ...
hail-is/hail
hail/src/test/scala/is/hail/utils/SpillingCollectIteratorSuite.scala
Scala
mit
455
package im.actor.server.mtproto.transport @SerialVersionUID(1L) case class Drop(messageId: Long, errorCode: Byte, message: String) extends MTProto { val header = Drop.header } object Drop { val header = 0x3 }
TimurTarasenko/actor-platform
actor-server/actor-models/src/main/scala/im/actor/server/mtproto/transport/Drop.scala
Scala
mit
215
/* * 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 ...
himanshudhami/PredictionIO
data/src/main/scala/org/apache/predictionio/data/store/LEventStore.scala
Scala
apache-2.0
5,830
package org.zazukoians.zz2h import org.apache.clerezza.commons.rdf._ import org.apache.clerezza.rdf.utils.GraphNode import org.osgi.service.component.annotations._ import javax.ws.rs._ import javax.ws.rs.core._ import org.apache.clerezza.rdf.core._ import org.apache.clerezza.rdf.scala.utils._ //import org.apache.clere...
zazukoians/zz2h
src/main/scala/org/zazukoians/zz2h/EntryPage.scala
Scala
apache-2.0
3,804
package org.jetbrains.plugins.scala.externalHighlighters import com.intellij.compiler.server.BuildManagerListener import com.intellij.openapi.project.Project import java.util.UUID class AutomakeBuildManagerListener extends BuildManagerListener { override def buildFinished(project: Project, sessionId: UUID, isAutom...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/externalHighlighters/AutomakeBuildManagerListener.scala
Scala
apache-2.0
528
var id = 0 def getCurrentId: Int = { id += 1; id } class Node() { val key = getCurrentId val children = collection.mutable.Map[Char, Node]() override def toString() = children.map(z => f"${key} ${z._2.key} ${z._1}\\n${z._2.toString()}").mkString } val root = new Node() io.Source.fromFile(new java.io.File(a...
cnt0/rosalind
pure-and-clean/scala/TRIE.scala
Scala
unlicense
422
package tool /** * * @author ponkotuy * Date: 14/10/22. */ sealed abstract class EquipType(val v: Int) object EquipType { case object MainGunS extends EquipType(1) case object MainGunM extends EquipType(2) case object MainGunL extends EquipType(3) case object SubGun extends EquipType(4) case object Torp...
nekoworkshop/MyFleetGirls
server/app/tool/EquipType.scala
Scala
mit
4,604
/* * Copyright (c) 2018. Fengguo Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License v2.0 * which accompanies this distribution, and is available at * https://www.apache.org/licenses/LICENSE-2.0 * * Detailed contributors ar...
arguslab/Argus-SAF
amandroid/src/main/scala/org/argus/amandroid/serialization/PTASlotKeySerializer.scala
Scala
apache-2.0
2,285
/* * 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...
gserranojc/Crossdata
common/src/main/scala/com/stratio/crossdata/common/serializers/StreamedSuccessfulSQLResultSerializer.scala
Scala
apache-2.0
2,030
package rpm4s.data import rpm4s.data.Dependency._ case class RpmPrimaryEntry( name: Name, version: Version, release: Release, architecture: Architecture, vendor: Vendor, license: License, summery: Summary, description: Description, group: rpm4s.data.Group, headerRange: HeaderRange, epoch: Epoch ...
lucidd/rpm4s
shared/src/main/scala/rpm4s/data/RpmPrimaryEntry.scala
Scala
mit
836
package com.blinkbox.books.marvin.watcher import java.lang.Throwable import java.nio.file._ import akka.actor.{ActorSystem, Props} import com.blinkbox.books.config.Configuration import com.blinkbox.books.logging.Loggers import com.blinkbox.books.rabbitmq.{RabbitMq, RabbitMqConfirmedPublisher} import com.typesafe.scal...
blinkboxbooks/watcher
src/main/scala/com/blinkbox/books/marvin/watcher/WatcherService.scala
Scala
mit
2,033
package com.themillhousegroup.mondrian import play.api.Logger import play.api.cache.CacheApi import scala.concurrent.Future import scala.concurrent.duration.Duration /** * Mix this trait in with your MongoService to get simple caching via the Play Framework's CacheApi: * https://www.playframework.com/documentati...
themillhousegroup/mondrian
src/main/scala/com/themillhousegroup/mondrian/MongoCaching.scala
Scala
mit
2,826
package benchmarks import lift.arithmetic.SizeVar import ir._ import ir.ast._ import opencl.ir._ import opencl.ir.pattern._ @deprecated("Uses an old benchmark infrastructure", "") class MatrixVector (override val f: Seq[(String, Array[Lambda])]) extends DeprecatedBenchmark("Matrix Vector Multiplication (gemv)", Seq(4...
lift-project/lift
src/main/benchmarks/MatrixVector.scala
Scala
mit
6,935
/* * Copyright (c) 2014-2015 by its authors. Some rights reserved. * See the project homepage at: http://www.monifu.org * * 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://...
sergius/monifu
monifu/shared/src/main/scala/monifu/reactive/internals/operators/flatScan.scala
Scala
apache-2.0
5,271
// code-examples/Rounding/match-deep-pair-script.scala class Role case object Manager extends Role case object Developer extends Role case class Person(name: String, age: Int, role: Role) val alice = new Person("Alice", 25, Developer) val bob = new Person("Bob", 32, Manager) val charlie = new Person("Charlie", 32, D...
foomango/scalaex
code-examples/Rounding/match-deep-pair-script.scala
Scala
mit
549
/* * 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-compiler/src/main/scala/io/gatling/compiler/config/cli/CommandLineConstants.scala
Scala
apache-2.0
918
// InterpretDTM.scala // // Copyright (C) 2015 Ben Wing, The University of Texas at Austin // // 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/L...
utcompling/textgrounder
src/main/scala/opennlp/textgrounder/postprocess/InterpretDTM.scala
Scala
apache-2.0
10,941
/* * 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 packag...
scala/scala
src/compiler/scala/tools/nsc/backend/JavaPlatform.scala
Scala
apache-2.0
2,323
package chandu0101.scalajs.facades.examples.pages.common import chandu0101.scalajs.react.components.models.Github import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.all._ import scala.scalajs.js /** * Created by chandrasekharkode . */ object GithubUser { case class State(checked: Boolean) ob...
CapeSepias/scalajs-facades
examples/src/main/scala/chandu0101/scalajs/facades/examples/pages/common/GithubUser.scala
Scala
mit
1,187
package com.github.lstephen.ootp.ai.selection.bench import com.github.lstephen.ootp.ai.player.Player import com.github.lstephen.ootp.ai.player.ratings.Position import com.github.lstephen.ootp.ai.regression.Predictor import com.github.lstephen.ootp.ai.score.Score import com.github.lstephen.ootp.ai.selection.depthchart....
lstephen/ootp-ai
src/main/scala/com/github/lstephen/ootp/ai/selection/bench/BenchScorer.scala
Scala
apache-2.0
1,478
package nabab object DefaultGraph { def apply(implicit factory: GraphFactory) = new DefaultGraph( nodes = factory.makeNodeSet, edges = factory.makeEdgeSet, destinations = factory.makeEdgeNodeMap, origins = factory.makeEdgeNodeMap, incomings = factory.makeNodeMap[Set[Edge]], ou...
ochafik/nabab
ScalaPort/src/main/scala/DefaultGraph.scala
Scala
mit
2,694
/* * 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 ...
aliyun/aliyun-emapreduce-sdk
emr-sql/src/main/scala/org/apache/spark/sql/aliyun/udfs/ml/LogisticRegressionUDF.scala
Scala
artistic-2.0
5,997