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.mesosphere.cosmos.error import com.mesosphere.cosmos.thirdparty.marathon.circe.Encoders._ import com.mesosphere.cosmos.thirdparty.marathon.model.AppId import io.circe.Encoder import io.circe.JsonObject import io.circe.generic.semiauto.deriveEncoder final case class AmbiguousAppId(packageName: String, appI...
takirala/cosmos
cosmos-common/src/main/scala/com/mesosphere/cosmos/error/AmbiguousAppId.scala
Scala
apache-2.0
646
/* * 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
ejson/src/main/scala/quasar/ejson/EJson.scala
Scala
apache-2.0
3,120
/* * 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 ...
rednaxelafx/apache-spark
mllib/src/main/scala/org/apache/spark/ml/feature/Word2Vec.scala
Scala
apache-2.0
15,287
package com.kakao.cuesheet.deps import java.io.{File, FileInputStream} import java.nio.charset.StandardCharsets.UTF_8 import java.nio.file.Paths import java.util.jar.JarFile import java.util.zip.ZipInputStream import com.kakao.mango.io.{AutoClosing, FileSystems, ZipStreams} import com.kakao.mango.logging.Logging imp...
kakao/cuesheet
src/main/scala/com/kakao/cuesheet/deps/JarArtifactResolver.scala
Scala
apache-2.0
6,098
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ueshin/apache-spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/pathFilters.scala
Scala
apache-2.0
5,359
/* Copyright (C) 2008-2010 Univ of Massachusetts Amherst, Computer Science Dept This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://code.google.com/p/factorie/ This software is provided under the terms of the Eclipse Public License 1.0 as published by...
andrewmilkowski/factorie
src/main/scala/cc/factorie/util/MapCache.scala
Scala
epl-1.0
5,122
import scala.reflect.{ClassTag, classTag} object Test extends App { println(classTag[Int]) println(classTag[Array[Int]]) println(classTag[Array[Array[Int]]]) println(classTag[Array[Array[Array[Int]]]]) println(classTag[Array[Array[Array[Array[Int]]]]]) }
som-snytt/dotty
tests/disabled/reflect/run/classtags_multi.scala
Scala
apache-2.0
266
package one.lockstep.monolock.client import java.util.concurrent.atomic._ import one.lockstep.lock._ import one.lockstep.lock.client._ import one.lockstep.lock.client.transport.RequestRejectedException import one.lockstep.monolock.client.pipeline._ import one.lockstep.monolock.protocol._ import one.lockstep.util._ imp...
lockstep-one/vault
vault-client/src/main/scala/one/lockstep/monolock/client/MonolockManager.scala
Scala
agpl-3.0
10,675
/* * Copyright 2015-2017 Marconi Lanna * * 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...
marconilanna/REPLesent
REPLesent.scala
Scala
apache-2.0
18,977
package xyz.hyperreal package object sprolog { val DOT = Symbol( "." ) val NIL = Symbol( "[]" ) type Predicate = WAMInterface => Boolean case class Indicator( functor: Symbol, arity: Int ) extends Ordered[Indicator] { def compare( that: Indicator ) = if (functor.name < that.functor.name) -1 else ...
edadma/sprolog
src/main/scala/sprolog.scala
Scala
mit
1,997
package com.codacy.client.stash.service import com.codacy.client.stash.User import com.codacy.client.stash.client.{PageRequest, Request, RequestResponse, StashClient} class AdminServices(client: StashClient) { val BASE: String = "/rest/api/1.0/admin" /** * Retrieves a list of users that are members of a spe...
codacy/stash-scala-client
src/main/scala/com/codacy/client/stash/service/AdminServices.scala
Scala
apache-2.0
1,137
/* * Licensed to Cloudera, Inc. under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Cloudera, Inc. licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use thi...
GitHublong/hue
apps/spark/java/livy-repl/src/main/scala/com/cloudera/hue/livy/repl/package.scala
Scala
apache-2.0
1,087
/* * 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 ...
windeye/spark
core/src/main/scala/org/apache/spark/scheduler/DAGSchedulerEvent.scala
Scala
apache-2.0
2,746
package rxtxio import akka.actor.ActorSystem import akka.io._ import akka.testkit._ import org.scalatest.BeforeAndAfterAll import org.scalatest.matchers.ShouldMatchers import org.scalatest.FunSuiteLike import Serial._ class SerialManagerSpec extends TestKit(ActorSystem("SerialManagerSpec")) with FunSuiteLike with...
msiegenthaler/rxtx-akka-io
src/test/scala/rxtxio/SerialManagerSpec.scala
Scala
apache-2.0
586
package com.tribbloids.spookystuff.execution import com.tribbloids.spookystuff.actions._ import com.tribbloids.spookystuff.dsl.GenPartitioner import com.tribbloids.spookystuff.row.{DataRow, SquashedFetchedRDD, SquashedFetchedRow} import org.apache.spark.rdd.RDD /** * Created by peng on 27/03/16. */ case class Fet...
tribbloid/spookystuff
core/src/main/scala/com/tribbloids/spookystuff/execution/FetchPlan.scala
Scala
apache-2.0
1,016
package com.hamrah.akka.persistence package object rocksdb { }
mhamrah/akka-persistence-rocksdb
src/package.scala
Scala
apache-2.0
65
/* * Copyright ASCII Soup (Nils Luxton) (c) 2016. * * GNU GPL v3 - See LICENSE.txt for details */ package com.asciisoup.advent.DayTwo import scala.io.Source object Puzzle extends App { val input = Source.fromInputStream(getClass.getResourceAsStream("/day_two.txt")) val keypad = Keypad(Grid.fromDimensions(Di...
ascii-soup/AdventOfCode2016
src/main/scala/com/asciisoup/advent/DayTwo/Puzzle.scala
Scala
gpl-3.0
525
package scala.scalanative package compiler import scala.collection.mutable import nir._ trait Pass extends (Seq[Defn] => Seq[Defn]) { type OnAssembly = PartialFunction[Seq[Defn], Seq[Defn]] type OnDefn = PartialFunction[Defn, Seq[Defn]] type OnBlock = PartialFunction[Block, Seq[Block]] type OnInst ...
phdoerfler/scala-native
tools/src/main/scala/scala/scalanative/compiler/Pass.scala
Scala
bsd-3-clause
7,695
package org.tejo.iza.rules.test import org.tejo.iza.rules.ClaraQuery /** Base class for instances which contains data * which tests one rule: query is made and result * is (not) expected. * */ abstract class RuleTestData { def facts: List[Any] def queryResultMap: Map[ClaraQuery[_], Any] }
tomaszym/izabela
rules/src/test/scala/org/tejo/iza/rules/test/RuleTestData.scala
Scala
gpl-2.0
306
package glint.matrix import java.io.{ByteArrayInputStream, ByteArrayOutputStream, ObjectInputStream, ObjectOutputStream} import breeze.linalg.DenseVector import glint.SystemTest import glint.models.client.BigMatrix import org.scalatest.{FlatSpec, Matchers} /** * BigMatrix test specification */ class BigMatrixSpe...
rjagerman/glint
src/test/scala/glint/matrix/BigMatrixSpec.scala
Scala
mit
5,164
package org.scaladebugger.api.profiles.java.info import org.scaladebugger.api.lowlevel.events.misc.NoResume import org.scaladebugger.api.profiles.java.JavaDebugProfile import org.scaladebugger.api.profiles.traits.info.ThreadInfo import org.scaladebugger.api.utils.JDITools import org.scaladebugger.api.virtualmachines.D...
ensime/scala-debugger
scala-debugger-api/src/it/scala/org/scaladebugger/api/profiles/java/info/JavaMethodInfoIntegrationSpec.scala
Scala
apache-2.0
3,023
package views.html import play.templates._ import play.templates.TemplateMagic._ import play.api.templates._ import play.api.templates.PlayMagic._ import models._ import controllers._ import play.api.i18n._ import play.api.mvc._ import play.api.data._ import views.html._ /* addDevice Template File */ object addDevic...
pamu/FooService
FooService1/target/scala-2.10/src_managed/main/views/html/addDevice.template.scala
Scala
apache-2.0
3,393
/** * Copyright (C) 2011 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 program i...
martinluther/orbeon-forms
src/test/scala/org/orbeon/oxf/cache/MemoryCacheTest.scala
Scala
lgpl-2.1
6,188
package com.lucidchart.open.nark.models import java.sql.Blob import java.sql.Clob import java.util.UUID import org.apache.commons.io.IOUtils import com.lucidchart.open.nark.utils.UUIDHelper import anorm._ object AnormImplicits { /** * Attempt to convert a SQL value into a byte array * * @param value value ...
lucidsoftware/nark
app/com/lucidchart/open/nark/models/AnormImplicits.scala
Scala
apache-2.0
5,150
package im.actor.server.commons.serialization import akka.serialization._ import com.google.protobuf.{ GeneratedMessage ⇒ GGeneratedMessage, ByteString } import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap.{ Builder ⇒ MapBuilder } import com.trueaccord.scalapb.GeneratedMessage import scala.util.{ Fa...
winiceo/actor-platform
actor-server/actor-commons-base/src/main/scala/im/actor/server/commons/serialization/ActorSerializer.scala
Scala
mit
3,078
/* * Copyright (c) 2014-2021 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
monifu/monifu
monix-tail/shared/src/test/scala/monix/tail/IterantFromSeqSuite.scala
Scala
apache-2.0
1,458
package rpgboss.editor.uibase import rpgboss.lib._ import rpgboss.model._ import scala.collection.mutable.Buffer import scala.swing._ import scala.swing.event._ import javax.swing.ImageIcon import rpgboss.editor.Internationalized object SwingUtils { def lbl(s: String) = new Label(s) def leftLabel(s: String) = new...
rpgboss/rpgboss
desktop/src/main/scala/rpgboss/editor/uibase/SwingUtils.scala
Scala
agpl-3.0
9,751
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
saltstar/spark
examples/src/main/scala/org/apache/spark/examples/graphx/Analytics.scala
Scala
apache-2.0
6,090
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
cran/rkafkajars
java/scala/xml/include/sax/XIncluder.scala
Scala
apache-2.0
5,356
package com.sksamuel.scrimage import org.scalatest.{Matchers, WordSpec} class Image47Test extends WordSpec with Matchers { "loading iphone image" should { "detect rotation flag" in { val src = Image.fromResource("/issue47.JPG") src.height shouldBe 3264 src.width shouldBe 2448 } } }
carlosFattor/scrimage
scrimage-core/src/test/scala/com/sksamuel/scrimage/Image47Test.scala
Scala
apache-2.0
316
package cromwell.filesystems.gcs import akka.actor.ActorSystem import com.google.api.gax.retrying.RetrySettings import com.google.auth.Credentials import com.google.cloud.storage.contrib.nio.CloudStorageConfiguration import cromwell.cloudsupport.gcp.auth.GoogleAuthMode import cromwell.cloudsupport.gcp.gcs.GcsStorage i...
ohsu-comp-bio/cromwell
filesystems/gcs/src/main/scala/cromwell/filesystems/gcs/GcsPathBuilderFactory.scala
Scala
bsd-3-clause
1,409
package controllers import play.api.mvc._ import dao.{QueryBuilder => Q, DAO} import models.{Row, Table,Error => Err} import play.api.libs.json.{JsValue, Json} import scala.concurrent.Future import play.api.libs.json._ import play.api.Logger import scala.concurrent.ExecutionContext.Implicits.global object Applicat...
enginyoyen/postgresql-rest-api
app/controllers/Application.scala
Scala
mit
2,529
package ee.cone.c4actor import net.jpountz.lz4.{LZ4BlockInputStream, LZ4BlockOutputStream} import okio.{Buffer, ByteString} import scala.annotation.tailrec case object LZ4Compressor extends DeCompressor with Compressor with RawCompressor { @tailrec private def readAgain(in: LZ4BlockInputStream, sink: Buffer): U...
wregs/c4proto
c4actor-kafka/src/main/scala/ee/cone/c4actor/LZ4Compressor.scala
Scala
apache-2.0
1,301
package ammonite.sshd.util import acyclic.file import java.io.{InputStream, OutputStream, PrintStream} /** * Container for staging environment important for Ammonite repl to run correctly. * @param thread a thread where execution takes place. Important for restoring contextClassLoader * @param contextClassLoader t...
coderabhishek/Ammonite
sshd/src/main/scala/ammonite/sshd/util/Environment.scala
Scala
mit
1,899
package tifmo import dcstree.Executor import dcstree.Relation import inference.Dimension import inference.IEngineCore import inference.TermIndex import inference.Term import inference.IEFunction import inference.RuleDo import inference.RuleArg import inference.IEPredRL import inference.IEPredSubsume import inference.D...
tianran/tifmo
src/tifmo/document/RelPartialOrder.scala
Scala
bsd-2-clause
3,387
/* * 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.partest.as...
lrytz/scala
src/partest/scala/tools/partest/async/OutputAwait.scala
Scala
apache-2.0
3,338
package views.html package appeal import controllers.routes import play.api.data.Form import lila.api.Context import lila.app.templating.Environment._ import lila.app.ui.ScalatagsTemplate._ import lila.appeal.Appeal import lila.common.String.html.richText import lila.mod.IpRender.RenderIp import lila.mod.{ ModPreset,...
luanlv/lila
app/views/appeal/discussion.scala
Scala
mit
5,580
/* * 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
jawa/src/main/scala/org/argus/jawa/core/compiler/util/ReadClassFile.scala
Scala
apache-2.0
687
/* * 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 ...
lxsmnv/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/json/JsonSuite.scala
Scala
apache-2.0
90,184
package com.github.mdr.mash.ns.core.thread import com.github.mdr.mash.completions.CompletionSpec import com.github.mdr.mash.functions.{ BoundParams, MashFunction, ParameterModel } import com.github.mdr.mash.inference.{ Type, TypedArguments } import com.github.mdr.mash.ns.collections.{ MapFunction, MapTypeInferenceStra...
mdr/mash
src/main/scala/com/github/mdr/mash/ns/core/thread/ParallelMapFunction.scala
Scala
mit
2,196
/* * Copyright (c) Sourcy Software & Services GmbH 2015. * * _____ ____ __ __ _____ _____ __ __ (_)____ * / ___// __ \\ / / / // ___// ___// / / / / // __ \\ * (__ )/ /_/ // /_/ // / / /__ / /_/ /_ / // /_/ / * /____/ \\____/ \\__,_//_/ \\___/ \\__, /(_)/_/ \\____/ * ...
sourcy/jirastatscollector
src/main/scala/io/sourcy/jirastatscollector/HttpBasicAuth.scala
Scala
apache-2.0
834
/* * Copyright (c) <2015-2016>, see CONTRIBUTORS * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list...
amanjpro/languages-a-la-carte
oberon0/src/main/scala/codegen/package.scala
Scala
bsd-3-clause
1,692
package org.freeour.app.models import org.slf4j.LoggerFactory import scala.slick.driver.MySQLDriver.simple._ /** * Created by Bill Lv on 2/3/15. */ case class User(id: Option[Long] = None, email: String, password: String, var nickname: String, var phone: Option[String] = None, isAdm...
ideaalloc/freeour
src/main/scala/org/freeour/app/models/User.scala
Scala
gpl-2.0
1,800
package com.github.akileev.akka.serial.io import akka.actor.ActorSystem import akka.io._ import akka.testkit._ import com.github.akileev.akka.serial.io.Serial._ import org.scalatest.{BeforeAndAfterAll, FunSuiteLike} import scala.concurrent.Await import scala.concurrent.duration.Duration class SerialManagerSpec exten...
akileev/akka-serial-io
src/test/scala/com/github/akileev/akka/serial/io/SerialManagerSpec.scala
Scala
apache-2.0
717
/* * 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 ...
StyleTang/incubator-rocketmq-externals
rocketmq-spark/src/main/scala/org/apache/rocketmq/spark/Logging.scala
Scala
apache-2.0
2,137
package org.dbpedia.spotlight.db.spotter /** * Created by dav009 on 24/03/2014. */ import org.dbpedia.spotlight.db.{FSADictionary, FSASpotter} import org.junit.Assert.assertEquals import org.junit.Test object TestFSA{ def getMockedFSA():FSADictionary ={ val testFSADict:FSADictionary = new FSADictionary...
Skunnyk/dbpedia-spotlight-model
core/src/test/scala/org/dbpedia/spotlight/db/spotter/TestFSA.scala
Scala
apache-2.0
1,688
package com.sksamuel.elastic4s.requests.searches.queries.geo import com.sksamuel.elastic4s.EnumConversions import com.sksamuel.elastic4s.json.{XContentBuilder, XContentFactory} object GeoPolyonQueryBodyFn { def apply(q: GeoPolygonQuery): XContentBuilder = { val builder = XContentFactory.jsonBuilder() build...
stringbean/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/geo/GeoPolyonQueryBodyFn.scala
Scala
apache-2.0
964
package com.landoop.streamreactor.connect.hive.sink.staging import com.landoop.streamreactor.connect.hive.TopicPartitionOffset import org.apache.hadoop.fs.{FileSystem, Path} import scala.concurrent.duration.FiniteDuration /** * The [[CommitPolicy]] is responsible for determining when * a file should be flushed (cl...
datamountaineer/stream-reactor
kafka-connect-hive-1.1/src/main/scala/com/landoop/streamreactor/connect/hive/sink/staging/CommitPolicy.scala
Scala
apache-2.0
2,266
/** * 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 ...
allenday/adam
adam-core/src/test/scala/org/bdgenomics/adam/converters/GenotypesToVariantsConverterSuite.scala
Scala
apache-2.0
1,880
package org.bfn.ninetynineprobs object P97 { // TODO }
bfontaine/99Scala
src/main/scala/P97.scala
Scala
mit
60
package org.im package loader import org.scalatest._ import cats._ import cats.implicits._ import cats.data._ import Validated._ class dslspec extends FlatSpec with Matchers { import Implicits._ import com.lucidchart.open.relate.interp.Parameter._ "A mapping" should "find all mappings" in { object tmaps e...
aappddeevv/loader
csv/src/test/scala/org/im/loader/dsltest.scala
Scala
apache-2.0
12,649
package spire package math import java.lang.Long.numberOfLeadingZeros import java.lang.Double.{ isInfinite, isNaN } import java.math.{ MathContext, RoundingMode, BigInteger, BigDecimal => JBigDecimal } import java.util.concurrent.atomic.AtomicReference import scala.math.{ ScalaNumber, ScalaNumericConversions } impor...
tixxit/spire
core/shared/src/main/scala/spire/math/Algebraic.scala
Scala
mit
57,623
package com.protose.resque import com.twitter.json.Json class JobFactory(performableMap: Map[String, Performable]) { def apply(worker: Worker, queue: String, payload: String): Job = { Job(worker, queue, payload, performableMap) } } case class Job(worker: Worker, queue: String, payload: ...
jamesgolick/scala-resque-worker
src/main/scala/Job.scala
Scala
mit
700
package core.formatter.serializer import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.databind.{ SerializerProvider, JsonSerializer } import models.Conversation /** * Created by zephyre on 7/11/15. */ class ConversationSerializer[T <: Conversation] extends JsonSerializer[T] { override def...
Lvxingpai/Hedylogos-Server
app/core/formatter/serializer/ConversationSerializer.scala
Scala
apache-2.0
766
package de.jannikarndt.datamover.monitor import java.time.{LocalDateTime, ZoneOffset} import scala.collection.mutable object Monitor { val monitors: mutable.Map[String, Monitor] = mutable.Map[String, Monitor]() def getMonitor(className: String): Monitor = { monitors.getOrElseUpdate(className, new Mo...
JannikArndt/DataMover
src/main/scala/de/jannikarndt/datamover/monitor/Monitor.scala
Scala
mit
1,583
/* * Copyright 2010-2011 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
pbrant/framework
core/common/src/main/scala/net/liftweb/common/CombinableBox.scala
Scala
apache-2.0
2,622
package com.example.akkaTcpChat import akka.actor.{Props, ActorSystem} import scala.concurrent.duration._ import java.net.InetSocketAddress //import com.example.akkaTcpChat.client.{InputUserMessage, UserInteract} class Application extends Bootable { implicit val actorSystem = ActorSystem("tcpserver") implicit va...
spoconnor/ElixirMessagingServer
ScalaServer/src/main/scala/Main.scala
Scala
mit
1,560
/* * Copyright (c) 2014-2018 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...
Wogan/monix
monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByPredicateSuite.scala
Scala
apache-2.0
2,040
package com.twitter.finagle.util import com.twitter.app.GlobalFlag import com.twitter.conversions.time._ import com.twitter.finagle.stats.FinagleStatsReceiver import com.twitter.logging.Logger import com.twitter.util.{JavaTimer, ProxyTimer, Timer} /** * Configures whether to probe for slow tasks executing in the def...
koshelev/finagle
finagle-core/src/main/scala/com/twitter/finagle/util/DefaultTimer.scala
Scala
apache-2.0
4,333
package macrolog import com.typesafe.scalalogging.{Logger => ScalaLogger} import org.slf4j.{Logger => Underlying} import scala.reflect.ClassTag /** * @author Maksim Ochenashko */ object Logger { def apply(scalaLogger: ScalaLogger): Logger = new Logger(scalaLogger) def apply(underlying: Underlying): Log...
iRevive/macrolog
src/main/scala/macrolog/Logger.scala
Scala
mit
2,393
package org.jetbrains.plugins.scala.annotator.template import org.jetbrains.plugins.scala.annotator.{AnnotatorTestBase, Error} /** * Pavel Fatin */ class AbstractInstantiationTest extends AnnotatorTestBase(AbstractInstantiation.THIS) { private val Message = "(\\\\w+\\\\s\\\\w+) is abstract; cannot be instantiat...
ilinum/intellij-scala
test/org/jetbrains/plugins/scala/annotator/template/AbstractInstantiationTest.scala
Scala
apache-2.0
2,382
package org.mitlware.test import scalaz._ import org.scalacheck._ import org.scalacheck.Prop.forAll import org.mitlware._ case object MockMetricIntImpl extends MetricImpl[Int] { override def cost( from : Int, to : Int ) = from - to } case object MockMetricIntState extends MetricView[Int] { override def getMetri...
MitLware/MitLware-scala-experimental
src/org/mitlware/test/SpecMetric.scala
Scala
bsd-3-clause
1,242
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ueshin/apache-spark
mllib/src/main/scala/org/apache/spark/mllib/clustering/LDAModel.scala
Scala
apache-2.0
38,814
/* * 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...
svn2github/scalatest
src/test/scala/org/scalatest/ShouldLengthSpec.scala
Scala
apache-2.0
110,949
package org.langmeta.tests package io import org.langmeta._ import org.langmeta.internal.io._ import org.scalatest.FunSuite class IOSuite extends FunSuite { val buildSbt: AbsolutePath = RelativePath("build.sbt").toAbsolute test("PathIO.workingDirectory") { val obtained = PathIO.workingDirectory.toString ...
DavidDudson/scalameta
langmeta/tests/src/test/scala/org/langmeta/tests/io/IOSuite.scala
Scala
bsd-3-clause
1,491
package api.icalendar import org.scalatest.matchers.ShouldMatchers import java.net.URI import com.google.common.io.Resources.getResource import net.fortuna.ical4j.model.property._ import models.Event import org.joda.time.DateTime import org.scalatest.{BeforeAndAfter, FunSuite} import api.icalendar.ICalendar._ import m...
mdia/OneCalendar
test/api/icalendar/ICalendarTest.scala
Scala
apache-2.0
4,136
package org.emailscript.mail import java.io.{File, FileOutputStream} import java.util import java.util.{Date, Properties} import javax.mail.Flags.Flag import javax.mail.{Folder => JavaMailFolder, _} import javax.mail.internet.{InternetAddress, MimeMessage} import javax.mail.search.{ComparisonTerm, ReceivedDateTerm} i...
OdysseusLevy/emailscript
src/main/scala/org/emailscript/mail/MailUtils.scala
Scala
lgpl-3.0
4,731
package at.forsyte.apalache.tla package object types { type typeContext = Map[TypeVar, SmtTypeVariable] type nameContext = Map[String, SmtTypeVariable] }
konnov/apalache
tla-types/src/main/scala/at/forsyte/apalache/tla/types/package.scala
Scala
apache-2.0
159
package com.github.mdr.mash.ns.core.help import com.github.mdr.mash.classes.{ AbstractObjectWrapper, Field, MashClass, NewStaticMethod } import com.github.mdr.mash.evaluator.EvaluatorException import com.github.mdr.mash.ns.core.{ ClassClass, StringClass } import com.github.mdr.mash.runtime.{ MashNull, MashObject, Mash...
mdr/mash
src/main/scala/com/github/mdr/mash/ns/core/help/FieldHelpClass.scala
Scala
mit
1,330
package reactivemongo.api /** * MongoDB [[https://docs.mongodb.com/manual/core/read-preference/index.html read preference]] enables to read from primary or secondaries * with a predefined strategy. * * {{{ * import reactivemongo.api.ReadPreference * * val pref: ReadPreference = ReadPreference.primary * }}} */...
cchantep/ReactiveMongo
driver/src/main/scala/api/ReadPreference.scala
Scala
apache-2.0
8,114
/* * 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 ...
rezasafi/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
Scala
apache-2.0
34,603
package probability.random import au.id.cxd.math.probability.analysis.AndersonDarlingTest import au.id.cxd.math.probability.discrete.Binomial import au.id.cxd.math.probability.random.{RApproxBinom, RBinom} import org.scalatest.{FlatSpec, Matchers} // TODO: need a goodness of fit test to test membership of the binomia...
cxd/scala-au.id.cxd.math
math/src/test/scala/probability/random/TestRBinom.scala
Scala
mit
2,282
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
jooooooon/rudder
rudder-core/src/main/scala/com/normation/rudder/repository/jdbc/ReportsJdbcRepository.scala
Scala
agpl-3.0
17,171
package co.ledger.wallet.core.wallet.ripple.api import co.ledger.wallet.core.concurrent.AsyncCursor import co.ledger.wallet.core.net.{HttpClient, HttpException} import co.ledger.wallet.core.wallet.ripple._ import co.ledger.wallet.core.wallet.ripple.database.AccountRow import scala.concurrent.ExecutionContext.Implicit...
LedgerHQ/ledger-wallet-ripple
src/main/scala/co/ledger/wallet/core/wallet/ripple/api/ApiAccountRestClient.scala
Scala
mit
3,680
package hackerRank.algorithms object CompareTriplets { def main(args: Array[String]) { val sc = new java.util.Scanner(System.in); val a0 = sc.nextInt() val a1 = sc.nextInt() val a2 = sc.nextInt() val b0 = sc.nextInt() val b1 = sc.nextInt() val b2 = sc.nextInt() def givePoint(val1: In...
cricanr/AlgorithmsHackerRank
src/main/scala/hackerRank/algorithms/CompareTriplets.scala
Scala
mit
735
package org.nikosoft.oanda.bot import akka.actor.{ActorSystem, Props} import akka.stream.ActorMaterializer import akka.stream.scaladsl.Sink import org.nikosoft.oanda.api.ApiModel.InstrumentModel.CandlestickGranularity import org.nikosoft.oanda.instruments.Model.{StochasticCandleIndicator, _} object Launcher extends A...
cnnickolay/forex-trader
trading-bot/src/main/scala/org/nikosoft/oanda/bot/Launcher.scala
Scala
mit
1,022
package zzz.akka.avionics import akka.actor.{ Actor, ActorLogging, ActorRef, ActorSelection, Props } import akka.pattern._ import akka.util.Timeout import scala.concurrent.Await import scala.concurrent.duration._ import zzz.akka.{ IsolatedResumeSupervisor, IsolatedStopSupervisor, OneForOneSupervisor } class Plane e...
jackcviers/learning-akka
src/main/scala/zzz/akka/avionics/Plane.scala
Scala
apache-2.0
3,947
package spotlight.train import akka.NotUsed import scala.concurrent.duration.FiniteDuration import scala.concurrent.{Future, Promise} import akka.actor.ActorSystem import akka.stream.scaladsl.Flow import scalaz.{-\\/, \\/-} import scalaz.concurrent.Task import spotlight.model.timeseries.{TimeSeries, TimeSeriesBase, ...
dmrolfs/spotlight
sandbox/src/main/scala/spotlight/train/TrainOutlierAnalysis.scala
Scala
mit
1,573
/* * 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 ...
ueshin/apache-flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/nodes/exec/ExecNode.scala
Scala
apache-2.0
2,499
/* * LabelExpandedImpl.scala * (LucreSwing) * * Copyright (c) 2014-2021 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 * [email protected] */ package de.sciss.lucre.sw...
Sciss/LucreSwing
jvm/src/main/scala/de/sciss/lucre/swing/graph/impl/LabelExpandedImpl.scala
Scala
agpl-3.0
2,342
// Copyright (C) 2016 MapRoulette contributors (see CONTRIBUTORS.md). // Licensed under the Apache License, Version 2.0 (see LICENSE). package org.maproulette.provider import play.api.libs.mailer._ import java.io.File import org.apache.commons.mail.EmailAttachment import javax.inject.{Inject, Singleton} import org.map...
Crashfreak/maproulette2
app/org/maproulette/provider/EmailProvider.scala
Scala
apache-2.0
2,878
package scodec.msgpack package codecs import scodec.bits.ByteVector class MessagePackCodecSpec extends TestSuite { implicit val codec: scodec.Codec[MessagePack] = MessagePackCodec "nil" should "be able to encode and decode" in { roundtrip[MessagePack](MNil) } "bool" should "be able to encode and decode"...
xuwei-k/scodec-msgpack
shared/src/test/scala/scodec/msgpack/codecs/MessagePackCodecSpec.scala
Scala
mit
4,274
sealed trait IntegralNumber sealed trait FiniteNumber extends IntegralNumber object IntegralNumber { sealed abstract class BaseNumber extends IntegralNumber sealed abstract class NonFinite extends BaseNumber object NaN extends NonFinite sealed abstract class FiniteNumberImpl[N](val value: N) extends BaseNumbe...
som-snytt/dotty
tests/patmat/t7437.scala
Scala
apache-2.0
546
/* * 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 ...
jfeltesse-mdsol/zipkin
zipkin-web/src/main/scala/com/twitter/zipkin/web/TraceSummary.scala
Scala
apache-2.0
2,151
package mljoin import java.util.concurrent.atomic.AtomicLong import java.util.ArrayList import java.util.concurrent.atomic.AtomicBoolean import org.apache.spark.rdd._ object Statistics { val serializeTime = new AtomicLong val deserializeTime = new AtomicLong val serialized_B_i = new AtomicLong val serialized_...
niketanpansare/mljoin
src/main/scala/mljoin/Statistics.scala
Scala
apache-2.0
3,642
// 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 ducttape.exec import ducttape.util.BashException import ducttape.util.Shell import ducttape.util.Files import duct...
jhclark/ducttape
src/main/scala/ducttape/exec/PackageBuilder.scala
Scala
mpl-2.0
2,707
/* * 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 ...
Intel-bigdata/OAP
oap-cache/oap/src/main/scala/org/apache/spark/sql/execution/datasources/CachedPartitionedFilePreferredLocs.scala
Scala
apache-2.0
1,980
package io.github.mandar2812.dynaml.optimization import breeze.linalg.{DenseMatrix, DenseVector, norm} import org.scalatest.{FlatSpec, Matchers} /** * Created by mandar on 5/7/16. */ class ConjugateGradientSpec extends FlatSpec with Matchers { "Conjugate Gradient " should "be able to solve linear systems "+ ...
transcendent-ai-labs/DynaML
dynaml-core/src/test/scala/io/github/mandar2812/dynaml/optimization/ConjugateGradientSpec.scala
Scala
apache-2.0
717
/* * 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 u...
andrewor14/iolap
sql/core/src/main/scala/org/apache/spark/sql/metric/SQLMetrics.scala
Scala
apache-2.0
4,928
package com.equalinformation.scala.programs.list /** * Created by bpupadhyaya on 6/21/16. */ object SimpleListApp_AI_1 { def main(args: Array[String]): Unit = { val paragraph = scala.io.StdIn.readLine("Please enter three word English sentences: ") val words = paragraph.split(" ") val sentences = Ni...
bpupadhyaya/scala-programs-collection
scala-programs-collection/src/main/scala/com/equalinformation/scala/programs/list/SimpleListApp_AI_1.scala
Scala
apache-2.0
845
package animal /** * @author vitchyr */ import vearth.World import vearth.animal.Ant /** Eye create a 1D image of the world. */ class Eye(protected val world: World, protected val ant: Ant) extends Sensor { def getInput = { } }
vpong/vearth
src/main/scala/animal/Eye.scala
Scala
mit
240
/** * 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...
kavink92/kafka-0.8.0-beta1-src
core/src/main/scala/kafka/admin/ReassignPartitionsCommand.scala
Scala
apache-2.0
5,116
package iomonad import language.higherKinds import language.implicitConversions /** * Created by ariwaranosai on 16/8/27. * */ trait Functor[F[_]] { self => def map[A, B](a: F[A])(f: A => B): F[B] } trait Applicative[F[_]] extends Functor[F] { self => def unit[A](a: => A): F[A] def apply[A, B](f: F...
ariwaranosai/FPinScala
src/main/scala/iomonad/monad.scala
Scala
mit
2,866
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v2/B10.scala
Scala
apache-2.0
817
package opennlp.scalabha.tag.support import org.junit.Assert._ import org.junit.Test import opennlp.scalabha.tag._ import opennlp.scalabha.util.CollectionUtils._ import opennlp.scalabha.util.LogNum import opennlp.scalabha.test.TestUtils._ import opennlp.scalabha.util.CollectionUtil._ class TagDictFactoryTests { @...
eponvert/Scalabha
src/test/scala/opennlp/scalabha/tag/support/TagDictFactoryTests.scala
Scala
apache-2.0
8,123
package dbtarzan.gui.config import dbtarzan.config.connections.ConnectionData import dbtarzan.config.password.Password import dbtarzan.db.{IdentifierDelimiters, Schema} import dbtarzan.gui.config.connections.ConnectionDataValidation import org.scalatest.flatspec.AnyFlatSpec class ConnectionDataValidationTest extends ...
aferrandi/dbtarzan
src/test/scala/dbtarzan/gui/config/ConnectionDataValidationTest.scala
Scala
apache-2.0
2,034
/* * 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...
scalatest/scalatest
jvm/scalatest-test/src/test/scala/org/scalatest/RandomTestOrderSpec.scala
Scala
apache-2.0
10,994
/* * 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/test/scala/monifu/reactive/internals/operators/SampleRepeatedSuite.scala
Scala
apache-2.0
3,964
/* Copyright (c) 2013 Anthony Mulcahy 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, publish, distribute,...
amulcahy/mcOptCal
src/main/scala/glFuncPlot.scala
Scala
mit
10,259
package gg.uhc.hosts.endpoints.alerts import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.server.Directives.{complete, handleRejections} import akka.http.scaladsl.server.Route import gg.uhc.hosts.database.Database import gg.uhc.hosts.endpoints.{CustomDirectives, EndpointRejectionHandler} class Delet...
Eluinhost/hosts.uhc.gg
src/main/scala/gg/uhc/hosts/endpoints/alerts/DeleteAlertRule.scala
Scala
mit
831