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 org.jetbrains.plugins.scala.lang.completion.weighter import com.intellij.codeInsight.completion.{CompletionLocation, CompletionWeigher} import com.intellij.codeInsight.lookup.LookupElement import com.intellij.psi.PsiMethod import org.jetbrains.plugins.scala.extensions._ import org.jetbrains.plugins.scala.lang....
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/completion/weighter/ScalaMethodCompletionWeigher.scala
Scala
apache-2.0
1,399
package com.twitter.finagle.thrift import com.twitter.finagle._ import com.twitter.finagle.tracing._ import com.twitter.finagle.util.ByteArrays import com.twitter.util.Future import java.net.InetSocketAddress import org.apache.thrift.protocol.{TMessage, TMessageType, TProtocolFactory, TBinaryProtocol} import org.apach...
joshbedo/finagle
finagle-thrift/src/main/scala/com/twitter/finagle/thrift/ThriftServerFramedCodec.scala
Scala
apache-2.0
7,555
package net.thereturningvoid.bladebot import java.io.{BufferedReader, IOException, BufferedWriter, File} import java.nio.charset.StandardCharsets import java.nio.file.{Files, Path} import com.google.gson.{GsonBuilder, Gson} /** * Mainly taken from DV8FromTheWorld's Yui (https://github.com/DV8FromTheWorld/Yui/blob/...
TheReturningVoid/BladeBot
src/main/scala/net/thereturningvoid/bladebot/SettingsManager.scala
Scala
mit
4,002
import sbt._ import Keys._ object Build extends Build { lazy val a = Project("a", file(".")) settings(externalIvySettings()) dependsOn(b) lazy val b = Project("b", file("b")) settings(externalIvySettings( (baseDirectory in ThisBuild) / "ivysettings.xml" )) }
jamesward/xsbt
sbt/src/sbt-test/dependency-management/ivy-settings-multi-b/project/Build.scala
Scala
bsd-3-clause
261
package scala.meta package internal.hosts.scalac package contexts import org.scalameta.contexts._ import org.scalameta.invariants._ import scala.{Seq => _} import scala.collection.immutable.Seq import scala.meta.semantic.{Context => ScalametaSemanticContext} import scala.meta.internal.hosts.scalac.contexts.{SemanticCo...
mdemarne/scalahost
interface/src/main/scala/scala/meta/internal/hosts/scalac/contexts/SemanticContext.scala
Scala
bsd-3-clause
3,777
package controllers import javax.inject.Singleton import play.api.mvc._ @Singleton class Options extends Controller { def all(path: String) = Action { Ok } }
siz-io/siz-api
app/controllers/Options.scala
Scala
isc
168
package xsbt package boot import java.io.File import scala.util.control.NonFatal import java.net.URI import java.io.IOException import Pre._ import scala.annotation.tailrec /** A wrapper around 'raw' static methods to meet the sbt application interface. */ class ServerApplication private (provider: xsbti.AppProvider)...
xeno-by/old-scalameta-sbt
launch/src/main/scala/xsbt/boot/ServerApplication.scala
Scala
bsd-3-clause
8,066
package blended.updater.remote import java.io.File import scala.util.Try import blended.updater.config.{ ConfigWriter, RuntimeConfig, RuntimeConfigCompanion } import blended.util.logging.Logger import com.typesafe.config.ConfigFactory class FileSystemRuntimeConfigPersistor(storageDir: File) extends RuntimeConfigPer...
lefou/blended
blended.updater.remote/src/main/scala/blended/updater/remote/FileSystemRuntimeConfigPersistor.scala
Scala
apache-2.0
2,239
package scala.macros.internal package engines.scalac package trees // NOTE: Scalac ASTs aren't sufficiently strongly-typed to fully implement our API. // As a result, we have to approximate with things like `type Term = g.Tree`. // Additionally, we have to come up with new AST nodes to express things that // aren't mo...
xeno-by/scalamacros
engines/scalac/src/main/scala/scala/macros/internal/engines/scalac/trees/Trees.scala
Scala
bsd-3-clause
2,400
object Test { def main(args: Array[String]): Unit = { val lst = List(1, 2, 3, 4, 5) assert(lst.scanLeft(0)(_ + _) == List(0, 1, 3, 6, 10, 15)) assert(lst.scanRight(0)(_ + _) == List(15, 14, 12, 9, 5, 0)) val emp = List[Int]() assert(emp.scanLeft(0)(_ + _) == List(0)) assert(emp.scanRight(0)...
som-snytt/dotty
tests/run/scan.scala
Scala
apache-2.0
543
// Copyright 2016, Martin Pokorny <martin@truffulatree.org> // // 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 org.truffulatree.h2odb import java.util.Dat...
mpokorny/h2odb
src/test/scala/AnalysisRecordSpec.scala
Scala
mpl-2.0
7,157
/* * 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 ...
WangTaoTheTonic/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/BatchTableEnvironment.scala
Scala
apache-2.0
14,197
/* * 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 ...
mrchristine/spark-examples-dbc
src/main/scala/org/apache/spark/examples/ml/DecisionTreeExample.scala
Scala
apache-2.0
13,999
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2018, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
ashawley/scala-xml
shared/src/main/scala/scala/xml/QNode.scala
Scala
bsd-3-clause
795
package com.mehmetakiftutuncu.muezzinapi.services.fetchers import java.time.{Duration, LocalDate} import com.github.mehmetakiftutuncu.errors.{CommonError, Errors, Maybe} import com.google.inject.ImplementedBy import com.mehmetakiftutuncu.muezzinapi.models.{Place, PrayerTimesOfDay} import com.mehmetakiftutuncu.muezzin...
mehmetakiftutuncu/MuezzinAPI
app/com/mehmetakiftutuncu/muezzinapi/services/fetchers/PrayerTimesFetcherService.scala
Scala
mit
4,509
package com.twitter.finatra.tests.exceptions import com.twitter.conversions.time._ import com.twitter.finagle._ import com.twitter.finatra.exceptions.ExternalServiceExceptionMatcher import com.twitter.inject.Test import java.io.IOException import java.net.ConnectException import org.apache.thrift.transport.TTransportE...
tom-chan/finatra
utils/src/test/scala/com/twitter/finatra/tests/exceptions/ExternalServiceExceptionMatcherTest.scala
Scala
apache-2.0
1,161
/*********************************************************************** * Copyright (c) 2013-2020 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
ccri/geomesa
geomesa-hbase/geomesa-hbase-datastore/src/test/scala/org/locationtech/geomesa/hbase/data/HBasePartitioningTest.scala
Scala
apache-2.0
8,250
package spinoco.protocol.sdp case class ConnectionData( netType : NetType.Value , addressType: AddressType.Value , address: String , ttl: Option[Int] , count: Option[Int] )
Spinoco/protocol
sdp/src/main/scala/spinoco/protocol/sdp/ConnectionData.scala
Scala
mit
187
/*********************************************************************** * Copyright (c) 2013-2019 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
elahrvivaz/geomesa
geomesa-convert/geomesa-convert-xml/src/main/scala/org/locationtech/geomesa/convert/xml/XmlFunctionFactory.scala
Scala
apache-2.0
3,292
/* * 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 * distrib...
fusepoolP3/p3-silk
silk-core/src/main/scala/de/fuberlin/wiwiss/silk/runtime/plugin/AnyPlugin.scala
Scala
apache-2.0
1,122
package iotus.core import org.scalatest.{Matchers, FunSpec} class CassandraConnectionUriSpec extends FunSpec with Matchers { describe("A Cassandra connection URI object") { it("should parse a URI with a single host") { val cut = CassandraConnectionUri("cassandra://localhost:9042/test") cut.host sho...
petermichalek/iotan-core
src/test/scala/iotus/core/CassandraConnectionUriSpec.scala
Scala
apache-2.0
878
/* * Copyright 2015 Simin You * * 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 ...
kgs/SpatialSpark
src/main/scala/spatialspark/join/BroadcastSpatialJoin.scala
Scala
apache-2.0
3,502
/* sbt -- Simple Build Tool * Copyright 2008, 2009, 2010 Mark Harrah */ package xsbt import xsbti.{ F0, Logger, Maybe } import java.io.File private object DelegatingReporter { def apply(settings: scala.tools.nsc.Settings, delegate: xsbti.Reporter): DelegatingReporter = new DelegatingReporter(Command.getWarnF...
jasonchaffee/sbt
compile/interface/src/main/scala/xsbt/DelegatingReporter.scala
Scala
bsd-3-clause
4,080
/* * Copyright (c) 2013 Alex DiCarlo * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publis...
dicarlo2/ScalaEquals
core-test/src/test/scala/org/scalaequals/test/EqualsFixture.scala
Scala
mit
10,036
package org.bitcoins.core.protocol.script import org.bitcoins.testkit.core.gen.ScriptGenerators import org.scalacheck.{Prop, Properties} class ScriptSpec extends Properties("ScriptSpec") { property("serialization symmetry for ScriptFactory.fromAsmBytes") = { Prop.forAllNoShrink(ScriptGenerators.scriptPubKey) {...
bitcoin-s/bitcoin-s-core
core-test/src/test/scala/org/bitcoins/core/protocol/script/ScriptSpec.scala
Scala
mit
627
/* * 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 ...
akopich/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/ShowCreateTableSuite.scala
Scala
apache-2.0
9,051
/* LogEventsWithSlf4j.scala * * Copyright (c) 2013-2014 linkedin.com * Copyright (c) 2013-2015 zman.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/...
zmanio/atmos
src/main/scala/atmos/monitor/LogEventsWithSlf4j.scala
Scala
apache-2.0
4,890
/** * Copyright 2015 Daniel Götten * <p> * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicab...
dangoe/maci-beanmodel
maci-beanmodel-gen/src/main/scala/de/maci/beanmodel/generator/core/TypeElementProcessor.scala
Scala
apache-2.0
1,609
package fpinscala.state trait RNG { def nextInt: (Int, RNG) // Should generate a random `Int`. We'll later define other functions in terms of `nextInt`. } object RNG { // NB - this was called SimpleRNG in the book text case class Simple(seed: Long) extends RNG { def nextInt: (Int, RNG) = { val newSe...
JobaerChowdhury/fpinscala
exercises/src/main/scala/fpinscala/state/State.scala
Scala
mit
3,997
/* * 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 ...
mkolod/incubator-spark
examples/src/main/scala/org/apache/spark/examples/SparkHdfsLR.scala
Scala
apache-2.0
2,690
package net.hearthstats.hstatsapi import org.scalatest._ import org.junit.runner.RunWith import com.softwaremill.macwire.MacwireMacros._ import org.scalatest.junit.JUnitRunner import org.scalatest.{ Finders, FlatSpec, Matchers } import com.softwaremill.macwire.MacwireMacros.wire import net.hearthstats.config.TestEnvir...
HearthStats/HearthStats.net-Uploader
companion/src/test/scala/net/hearthstats/hstatsapi/CardSpec.scala
Scala
bsd-3-clause
1,210
package com.amdg.fhtml.core.tags class TagsSpec { // "return the first child of the given type if there's just one" in html( // """ // |<div> // | <p></p> // |</div> // """) { tag => // tag.findChild[P] shouldBe Right(P) // } // protected def html(html: Stri...
AMDG-Solutions/fhtml
src/test/scala/com/amdg/fhtml/core/tags/TagsSpec.scala
Scala
apache-2.0
417
package cas.math import scala.Ordering.Implicits._ object Mathf { val sec2Millis = 1000 def sigmoid(x: Double) = 1.0 / (1.0 + math.exp(-x)) def clamp[T: Ordering](a: T, lower: T, upper: T) = if (a < lower) lower else if (a > upper) upper else a def F1Measure(TP: Double, TN: Double, FP: Double, FN: Double, ...
bk0606/CAS
src/main/scala/cas/math/Mathf.scala
Scala
mit
547
/*** * Copyright 2014 Rackspace US, 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 applica...
tylerroyal/api-checker
core/src/test/scala/com/rackspace/com/papi/components/checker/GivenAWadlWithNestedResources.scala
Scala
apache-2.0
7,033
/*§ =========================================================================== Chronos =========================================================================== Copyright (C) 2015-2016 Gianluca Costa =========================================================================== Licensed under the Apache Lic...
giancosta86/Chronos
src/main/scala/info/gianlucacosta/chronos/ast/expressions/ground/DoubleTerm.scala
Scala
apache-2.0
1,182
package de.kaufhof.pillar.config import com.datastax.driver.core.{AuthProvider, PlainTextAuthProvider} import com.typesafe.config.{Config, ConfigFactory} import scala.language.implicitConversions /** * Configuration for connection to cassandra. */ class ConnectionConfiguration(dataStoreName: String, environment:...
j-potts/pillar
src/main/scala/de/kaufhof/pillar/config/ConnectionConfiguration.scala
Scala
mit
3,568
/* * The MIT License (MIT) * * Copyright (c) <2013> <Evgeni Kappinen> * * 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 * ...
kappinen/web2local
web2local/src/main/scala/sources/DataSource.scala
Scala
mit
2,062
package scalaz.stream.actor import scalaz.concurrent.{Actor, Strategy} import scalaz.\\/ import scalaz.\\/._ import scala.collection.immutable.Queue trait TopicActor { /** * Return actor and signal that forms the topic. Each subscriber is identified by `SubscriberRef` and have * its own Queue to keep messag...
aindlq/scalaz-stream
src/main/scala/scalaz/stream/actor/TopicActor.scala
Scala
mit
2,981
package scala.slick.jdbc import slick.util.SlickLogger import org.slf4j.LoggerFactory import scala.reflect.ClassTag import scala.slick.driver.{JdbcProfile,JdbcModelComponent} package object meta { @deprecated("Use profile.createModel() instead","2.1") def createModel(mTables: Seq[MTable], profile: JdbcProfile wit...
nuodb/slick
src/main/scala/scala/slick/jdbc/meta/package.scala
Scala
bsd-2-clause
2,366
package sbn.core.variables /** * This class defines an assignment of a value to a variable. The assignment values are encoded as [[Double]] values, therefore * In case of finite state space distribution, the [[value]] can be seen as an integer indexing the variable's states. * * @param variable the selected va...
fernandoj92/sbn
core/src/main/scala/sbn/core/variables/Assignment.scala
Scala
apache-2.0
1,496
/* * 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...
mtelloz/sparta
serving-core/src/test/scala/com/stratio/sparta/serving/core/models/LoggedUserTest.scala
Scala
apache-2.0
3,440
/* * 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 ...
bravo-zhang/spark
sql/hive/src/test/scala/org/apache/spark/sql/sources/HadoopFsRelationTest.scala
Scala
apache-2.0
28,265
package com.dwolla.cloudflare.domain.model import com.dwolla.circe._ import io.circe._ import io.circe.generic.semiauto package wafrulegroups { trait WafRuleGroupNameTag case class WafRuleGroup(id: WafRuleGroupId, name: WafRuleGroupName, description: String, ...
Dwolla/scala-cloudflare
client/src/main/scala/com/dwolla/cloudflare/domain/model/wafrulegroups/package.scala
Scala
mit
993
/* * 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 ...
wangyixiaohuihui/spark2-annotation
sql/core/src/main/scala/org/apache/spark/sql/jdbc/OracleDialect.scala
Scala
apache-2.0
3,028
package com.rasterfoundry.batch.util import org.apache.hadoop.conf.Configuration import java.io.{ObjectInputStream, ObjectOutputStream} /** * Serializable Configuration wrapper * @param conf Hadoop Configuration */ final case class HadoopConfiguration(var conf: Configuration) extends Serializable { def g...
azavea/raster-foundry
app-backend/batch/src/main/scala/util/HadoopConfiguration.scala
Scala
apache-2.0
546
package reeds import cats.data.{Validated, ValidatedNel}, Validated._ import cats.syntax.functor._ import cats.Id trait Reads[T] extends (String => ValidatedNel[Throwable, T]) { def map[U](f: T => U) = Reads.instance[U] { str => apply(str).map(f) } } object Reads extends ReadsInstances { def apply[T](str:...
Acornsgrow/reeds
reeds-core/src/main/scala/reeds/Reads.scala
Scala
apache-2.0
1,459
package com.tpl.hamcraft.gui class TextureInfoBase { } object TextureInfo extends TextureInfoBase { }
piotrb/hamcraft
src/main/scala/com/tpl/hamcraft/gui/TextureInfo.scala
Scala
bsd-2-clause
106
package com.omis import java.util.UUID import play.api.libs.json.Json case class EmpDetails(userId:UUID, firstName: String, lastName: String, department: String, grade: String, salary: String, payScale: String, shortbio: String, created: String) object EmpDetails { impl...
iriddhi/mis
shared/src/main/scala/com/omis/Models.scala
Scala
apache-2.0
962
package models.mining.mlret import play.api.libs.json.{JsNumber, JsObject, JsString} /** * Created by chetan on 28/04/15. */ /** * Read the ALS object file from the disk and output the data * @param filepath Path of the object file/folder */ class RALS(filepath: String, name: String) extends MOutput { val ob...
ChetanBhasin/Veracious
app/models/mining/mlret/RALS.scala
Scala
apache-2.0
865
package com.argcv.iphigenia.biendata.smp2016.model import com.argcv.valhalla.string.StringHelper._ import scala.collection.parallel.immutable.ParSeq case class Info(i: Long, a: Option[Age], g: Option[Gender], l: Option[Loc]) { override def toString = s"$i,${a.getOrElse(Age(1))},${g.getOrElse(Gender(0))},...
yuikns/iphigenia
src/main/scala/com/argcv/iphigenia/biendata/smp2016/model/Info.scala
Scala
mit
2,542
package com.roundup.kafka.actors import akka.actor.ActorRef import com.roundup.kafka.actors.KafkaStreamDriver.NextMessage import kafka.consumer.ConsumerTimeoutException /** * Created by Lior Gonnen on 3/16/15. */ sealed trait KafkaStreamDriverMessage case object MessageReady extends KafkaStreamDriverMessage case ...
roundup-labs/kafka-on-actors
src/main/scala/com/roundup/kafka/actors/KafkaStreamDriver.scala
Scala
apache-2.0
1,785
package org.globalnames.parser import java.io.{StringWriter, Writer} import org.apache.commons.text.translate._ import scala.collection.mutable.ArrayBuffer import scala.collection.JavaConverters._ class TrackingPositionsUnescapeHtml4Translator extends AggregateTranslator { import TrackingPositionsUnescapeHtml4Tra...
GlobalNamesArchitecture/gnparser
parser/src/main/scala/org/globalnames/parser/TrackingPositionsUnescapeHtml4Translator.scala
Scala
mit
2,492
package com.twitter.inject.app.tests.internal import com.twitter.inject.app.EmbeddedApp import com.twitter.inject.app.tests.SampleGuiceApp import com.twitter.inject.{Test, TwitterModule} import com.twitter.util.Await class InternalAppIntegrationTest extends Test { "start app" in { val app = new EmbeddedApp( ...
deanh/finatra
inject/inject-app/src/test/scala/com/twitter/inject/app/tests/internal/InternalAppIntegrationTest.scala
Scala
apache-2.0
1,621
package exsplay.api.http.transformers.response.plain import spray.http.HttpEntity import exsplay.api.http.transformers.response.ResponseTransformer import exsplay.api.http._ /** * User: wert * Date: 14.07.13 * Time: 19:19 */ class NotTransformResponseTransformer extends ResponseTransformer[HttpEntity] { def ap...
wertlex/exsplay
exsplay/src/main/scala/exsplay/api/http/transformers/response/plain/NotTransformResponseTransformer.scala
Scala
apache-2.0
391
/** * */ package services.lexicalanalysis import com.softwaremill.macwire.MacwireMacros._ import scala.collection.convert.WrapAsScala._ import scala.collection.convert.WrapAsJava._ import fi.seco.lexical.CompoundLexicalAnalysisService import fi.seco.lexical.LanguageRecognizer import fi.seco.lexical.SnowballLexicalA...
jiemakel/seco-lexicalanalysis-play
app/services/lexicalanalysis/LexicalAnalysisModule.scala
Scala
mit
1,409
package project1 import java.util.Random import better.files._ import libsvm.LibSVM import net.sf.javaml.classification.evaluation.CrossValidation import net.sf.javaml.tools.data.FileHandler import project1.utils._ import spire.implicits._ import scala.collection.immutable.IndexedSeq import scala.io.StdIn._ import s...
Thangiee/data-mining-classification-proj
src/main/scala/project1/Main.scala
Scala
apache-2.0
4,222
package hercules.test.utils import java.io.File import hercules.entities.ProcessingUnit /** * Used as an easy mock for processing units. * Created by johda411 on 2015-04-24. */ case class ProcessingUnitPlaceholder(val name: String) extends ProcessingUnit { val uri = new File(name).toURI val isFound: Boolean =...
johandahlberg/hercules
src/test/scala/hercules/test/utils/ProcessingUnitsPlaceholder.scala
Scala
mit
328
package leo package datastructures package blackboard import java.util.concurrent.atomic.AtomicInteger import leo.datastructures.{Role_Plain, Role, Clause, Pretty} import leo.datastructures.context.Context object Store { protected[blackboard] var unnamedFormulas : AtomicInteger = new AtomicInteger(0) def apply...
cbenzmueller/LeoPARD
src/main/scala/leo/datastructures/blackboard/Store.scala
Scala
bsd-3-clause
3,871
package com.gilt.gfc.guava.cache import com.google.common.cache.LoadingCache import com.google.common.collect.Maps import org.scalatest.{Matchers, FunSuite} import org.mockito.Mockito._ class CacheUtilsTest extends FunSuite with Matchers { test("Refresh All") { val k0 = "k0" val k1 = "k1" val m = { ...
gheine/gfc-guava
src/test/scala/com/gilt/gfc/guava/cache/CacheUtilsTest.scala
Scala
apache-2.0
608
package source class A { def a() = UtilS.foo() } object A { def a() = UtilS.foo() }
ilinum/intellij-scala
testdata/move/withoutCompanion/before/source/A.scala
Scala
apache-2.0
90
/* * Copyright 2001-2014 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
scalactic-test/src/test/scala/org/scalactic/anyvals/PosZDoubleSpec.scala
Scala
apache-2.0
16,446
package com.github.agourlay.cornichon.util import monix.eval.Task import scala.concurrent.duration.{ Duration, FiniteDuration } object Timing { def withDuration[A](fct: ⇒ A): (A, Duration) = { val now = System.nanoTime val res = fct val executionTime = Duration.fromNanos(System.nanoTime - now) (re...
OlegIlyenko/cornichon
cornichon-core/src/main/scala/com/github/agourlay/cornichon/util/Timing.scala
Scala
apache-2.0
576
object MultipleDefs1 { val a, b = 23 }
felixmulder/scala
test/files/positions/MultipleDefs1.scala
Scala
bsd-3-clause
41
package com.twitter.finagle.factory import com.twitter.finagle.{ClientConnection, ServiceFactory} import com.twitter.finagle.stats.InMemoryStatsReceiver import com.twitter.util.{Await, Future} import org.mockito.Matchers.any import org.mockito.Mockito.{verify, when} import org.scalatestplus.mockito.MockitoSugar import...
twitter/finagle
finagle-core/src/test/scala/com/twitter/finagle/factory/StatsFactoryWrapperTest.scala
Scala
apache-2.0
1,051
package net.akmorrow13.endive.processing /** * Created by DevinPetersohn on 8/22/16. */ class BoundCorrTestSuite { }
akmorrow13/endive
src/test/scala/net/akmorrow13/endive/processing/BoundCorrTestSuite.scala
Scala
apache-2.0
123
package io.finch.request import org.scalatest.{Matchers, FlatSpec} import com.twitter.util.{Try, Return, Await} import com.twitter.finagle.httpx.Request import scala.math._ import scala.reflect.ClassTag class DecodeSpec extends FlatSpec with Matchers { private def decode[A](json: String)(implicit d: DecodeRequest[...
peel/finch
core/src/test/scala/io/finch/request/DecodeSpec.scala
Scala
apache-2.0
3,794
package sledtr.actors import java.util.Date import sledtr.MyPreDef._ abstract class Task() { var start, finish: Date = _ def doIt() = { start = new Date() try { myTask() } catch { case e => log(this.debugInfo) log(e) e.printStackTrace() } finish = new Date() } ...
K2Da/sledtr
src/main/scala/sledtr/actors/Task.scala
Scala
gpl-3.0
422
/** * Funcion para solucionar el problema de colocacion de reinas en un * tablero de ajedrez, una fila * @param n * @return */ def solucionarProblemaReinas(n : Int) : List[List[(Int, Int)]] = { // Funcion para posicionar una reina en una fila def posicionarReinas(fila : Int) : List[List[(Int, Int)]] = { ...
romanarranz/NTP
S5/ochoReinas.scala
Scala
mit
1,681
/*********************************************************************** * Copyright (c) 2013-2017 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
ronq/geomesa
geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/stats/MethodProfiling.scala
Scala
apache-2.0
6,156
/** * 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/integration/LogCorruptionTest.scala
Scala
apache-2.0
4,479
/* Agenda - Review OOP parts of Scala - Types - Traits - Case classes - Pattern matching */
agconti/scala-school
02-oop-in-scala/slides/slide000.scala
Scala
mit
116
/* * 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 ...
duynguyen/incubator-openwhisk
core/invoker/src/main/scala/whisk/core/containerpool/ContainerProxy.scala
Scala
apache-2.0
17,571
package KeYmaeraD //package cohenhormander; import java.io.BufferedWriter import java.io.OutputStreamWriter import java.io.BufferedReader import java.io.InputStreamReader import java.io.InputStream import java.io.FileInputStream import scala.util.parsing.combinator.lexical._ import scala.util.parsing.combinator.syn...
keymaerad/KeYmaeraD
keyparse.scala
Scala
bsd-3-clause
26,223
package com.github.andr83.parsek.spark.source import com.github.andr83.parsek.spark.PathFilter._ import com.github.andr83.parsek.spark.{PathFilter, SparkJob} import com.github.andr83.parsek.{PString, PValue} import com.typesafe.config.Config import net.ceedubs.ficus.Ficus._ import org.apache.hadoop.fs.Path import org....
andr83/parsek
spark/src/main/scala/com/github/andr83/parsek/spark/source/SequenceFileSource.scala
Scala
mit
1,603
object Test { class C class D def main(args: Array[String]): Unit = { val z: Class[C] = classOf val z2: Class[D] = classOf[D] println(z) println(z2) } }
yusuke2255/dotty
tests/run/t4871.scala
Scala
bsd-3-clause
179
import scala.reflect._ import scala.reflect.api._ import scala.reflect.macros.blackbox._ import scala.language.experimental.macros package object ildl { private type Descr = TransformationDescription with Singleton /** * The iLDL ad-hoc data representation transformation */ def adrt[T](descr: Descr)(f: ...
miniboxing/ildl-plugin
components/runtime/src/ildl/package.scala
Scala
bsd-3-clause
335
package main.scala object Global { // absolute path to project folder! it a template; rm from vers control // fs.default.name port // mapred.job.tracker port val absPath = "/home/username/projectdir" val host = "localhost" val fsPort = "54310" val jtPort = "54311" val buildName = "hadoop-dg-decomp" ...
pomadchin/hadoop-dg-decomp
src/main/scala/Global.scala
Scala
apache-2.0
349
package org.jetbrains.plugins.scala package debugger import java.util import java.util.Collections import com.intellij.debugger.engine._ import com.intellij.debugger.requests.ClassPrepareRequestor import com.intellij.debugger.{MultiRequestPositionManager, NoDataException, PositionManager, SourcePosition} import com.i...
SergeevPavel/intellij-scala
src/org/jetbrains/plugins/scala/debugger/ScalaPositionManager.scala
Scala
apache-2.0
29,607
/* * Copyright (c) 2017 joesan @ http://github.com/joesan * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
joesan/plant-simulator
test/com/inland24/plantsim/services/simulator/rampUpType/RampUpTypeActorTest.scala
Scala
apache-2.0
16,215
package debop4s.core import java.util.concurrent.atomic.AtomicLong import org.slf4j.{LoggerFactory, MDC} /** * Slf4j 의 Log를 생성합니다. */ object Log { def apply(name: String): Log = new Log { override lazy val log = LoggerFactory.getLogger(name) } def apply(clazz: Class[_]): Log = apply(clazz.getName.r...
debop/debop4s
debop4s-core/src/main/scala/debop4s/core/Logging.scala
Scala
apache-2.0
5,021
/* * 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...
travisbrown/scalatest
src/test/scala/org/scalatest/ShouldBeWritableImplicitSpec.scala
Scala
apache-2.0
6,965
package cilib object Dist { import RVar._ val stdUniform: RVar[Double] = next[Double] val stdNormal: RVar[Double] = gaussian(0.0, 1.0) val stdCauchy: RVar[Double] = cauchy(0.0, 1.0) val stdExponential: RVar[Double] = exponential(1.0) val stdGamma: RVar[Double] = gamma(2, 2.0) val std...
cirg-up/cilib
core/src/main/scala/cilib/Dist.scala
Scala
apache-2.0
6,198
/*********************************************************************** * Copyright (c) 2013-2020 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
ccri/geomesa
geomesa-arrow/geomesa-arrow-gt/src/test/scala/org/locationtech/geomesa/arrow/io/SimpleFeatureArrowFileTest.scala
Scala
apache-2.0
12,401
/* * 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/test/scala/com/byteslounge/slickrepo/test/mysql/MySQLJodaTimeVersionedRepositoryTest.scala
Scala
mit
1,375
package unfiltered.request import java.time.Instant import okhttp3.{Cookie, HttpUrl, OkHttpClient} import org.specs2.mutable._ object CookiesSpecJetty extends Specification with unfiltered.specs2.jetty.Planned with CookiesSpec object CookiesSpecNetty extends Specification with unfiltered.specs2.nett...
hamnis/unfiltered
library/src/test/scala/CookiesSpec.scala
Scala
mit
4,320
package im.actor.server.office import java.time.Instant import java.util.concurrent.TimeUnit import akka.actor.{ ActorRef, Cancellable, Status } import akka.cluster.sharding.ShardRegion.Passivate import akka.pattern.pipe import akka.persistence.PersistentActor import im.actor.concurrent.{ ActorFutures, AlertingActor ...
ljshj/actor-platform
actor-server/actor-core/src/main/scala/im/actor/server/office/Processor.scala
Scala
mit
7,012
package com.cloudray.scalapress.folder.controller.admin import org.mockito.Mockito import org.scalatest.{OneInstancePerTest, FunSuite} import org.scalatest.mock.MockitoSugar import com.cloudray.scalapress.folder.{Folder, FolderDao} import javax.servlet.http.HttpServletResponse /** @author Stephen Samuel */ class Subf...
vidyacraghav/scalapress
src/test/scala/com/cloudray/scalapress/folder/controller/admin/SubfolderOrderControllerTest.scala
Scala
apache-2.0
1,190
package org.igye.jfxutils.fxml trait Initable { def init() }
Igorocky/jfxutils
src/main/scala/org/igye/jfxutils/fxml/Initable.scala
Scala
mit
66
/* * 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/test/scala/com/intel/analytics/bigdl/keras/nn/ActivationSpec.scala
Scala
apache-2.0
6,142
package co.ledger.wallet.web.ripple.services import scala.concurrent.ExecutionContext.Implicits.global import biz.enef.angulate.Module.RichModule import co.ledger.wallet.web.ripple.wallet.RippleLibApi import biz.enef.angulate.Service import scala.concurrent.Future /** * Created by alix on 4/21/17. */ class Rippl...
LedgerHQ/ledger-wallet-ripple
src/main/scala/co/ledger/wallet/web/ripple/services/RippleLibApiService.scala
Scala
mit
806
package net.sansa_stack.rdf.spark.io.benchmark.quad import java.net.URI import com.ibm.sparktc.sparkbench.utils.GeneralFunctions._ import com.ibm.sparktc.sparkbench.utils.{SaveModes, SparkBenchException} import com.ibm.sparktc.sparkbench.workload.{Workload, WorkloadDefaults} import net.sansa_stack.hadoop.format.jena....
SANSA-Stack/SANSA-RDF
sansa-bench-spark/src/main/scala/net/sansa_stack/rdf/spark/io/benchmark/quad/QuadParsing.scala
Scala
apache-2.0
2,402
/** * 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 ...
massie/adam
adam-cli/src/test/scala/org/bdgenomics/adam/cli/AboutSuite.scala
Scala
apache-2.0
1,671
/* * 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 ...
sh-cho/cshSpark
util/package.scala
Scala
apache-2.0
876
package com.sksamuel.elastic4s.analyzers import com.sksamuel.elastic4s.anaylzers.TokenFilterDsl import org.scalatest.{Matchers, WordSpec} class StopTokenFilterTest extends WordSpec with TokenFilterDsl with Matchers { "StopTokenFilter builder" should { "set stop words" in { stopTokenFilter("testy").stopwo...
tototoshi/elastic4s
elastic4s-core-tests/src/test/scala/com/sksamuel/elastic4s/analyzers/StopTokenFilterTest.scala
Scala
apache-2.0
717
package com.twitter.finatra package object test { @deprecated("com.twitter.inject.server.FeatureTest", "") type TwitterServerFeatureTest = com.twitter.inject.server.FeatureTest @deprecated("com.twitter.inject.Test", "") type Test = com.twitter.inject.Test @deprecated("Use com.twitter.inject.Mockito", "") ...
deanh/finatra
utils/src/test/scala/com/twitter/finatra/test/package.scala
Scala
apache-2.0
366
/* * 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 ...
Dax1n/spark-core
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerBackend.scala
Scala
apache-2.0
14,387
package controllers import utils.WithBrowser import utils.pageobjects.PageObjects import utils.pageobjects.circumstances.report_changes.GBreaksInCarePage import org.specs2.mutable._ class ThankYouCircsIntegrationSpec extends Specification { section("integration") "Change Thank You" should { "present 'Thank ...
Department-for-Work-and-Pensions/ClaimCapture
c3/test/controllers/ThankYouCircsIntegrationSpec.scala
Scala
mit
1,393
/* * 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 ...
lincoln-lil/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/batch/BatchPhysicalHashWindowAggregate.scala
Scala
apache-2.0
3,360
package nasa.nccs.edas.utilities import nasa.nccs.utilities.Logger import ucar.nc2 object runtime { def printMemoryUsage(logger: Logger) = { val mb = 1024 * 1024 val gb = mb * 1024.0 val runtime = Runtime.getRuntime val buf = new StringBuilder buf ++= "\\n--------------------------------- MEMORY ...
nasa-nccs-cds/EDAS
src/main/scala/nasa/nccs/edas/utilities/generic.scala
Scala
gpl-2.0
1,563
/* * Copyright 2010 Red Hat, Inc. * * Red Hat licenses this file to you 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...
janstey/fuse
fmc/fmc-rest/src/main/scala/org/fusesource/fabric/webui/agents/activemq/QueueResource.scala
Scala
apache-2.0
2,153