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
/** * 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...
sebadiaz/kafka
core/src/main/scala/kafka/cluster/Replica.scala
Scala
apache-2.0
9,893
package ml.combust.mleap.xgboost.runtime import biz.k11i.xgboost.util.FVec import ml.combust.mleap.core.types.NodeShape import ml.combust.mleap.runtime.function.UserDefinedFunction import ml.combust.mleap.tensor.Tensor import ml.combust.mleap.runtime.frame.{MultiTransformer, Row, Transformer} import ml.combust.mleap.c...
combust/mleap
mleap-xgboost-runtime/src/main/scala/ml/combust/mleap/xgboost/runtime/XGBoostPredictorClassification.scala
Scala
apache-2.0
1,273
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
samklr/exhibitor-mesos-framework
src/main/scala/ly/stealth/mesos/exhibitor/ExhibitorServer.scala
Scala
apache-2.0
8,135
/* * Copyright © 2011-2012 Sattvik Software & Technology Resources, Ltd. Co. * 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/licens...
sattvik/baitha
src/test/scala/com/sattvik/baitha/test/EnhancedPreferencesSpec.scala
Scala
apache-2.0
13,292
package com.eigenvektor.priorityqueue /** A common supertrait for all heaps * * @type E the element type. */ trait Heap[E] { /** Tells if the heap is empty */ val isEmpty:Boolean /** The size of the heap */ val size:Int /** Adds an element to this heap * * @param x The element to add...
Vyzen/trout
src/main/scala/com/eigenvektor/priorityqueue/Heap.scala
Scala
gpl-3.0
1,328
package dotty.tools package dotc package reporting import core.Contexts._ import util.{SourcePosition, NoSourcePosition} import util.{SourceFile, NoSource} import core.Decorators.PhaseListDecorator import collection.mutable import config.Settings.Setting import config.Printers import java.lang.System.currentTimeMillis...
AlexSikia/dotty
src/dotty/tools/dotc/reporting/Reporter.scala
Scala
bsd-3-clause
9,204
package backend.data.mongodb.service import backend.data.service.ArchiveDataService import backend.data.service.PostDataService /** * The ArchiveDataService using MongoDB * * @author Stefan Bleibinhaus * */ object ArchiveDataServiceMongo extends ArchiveDataService { override protected def postDataService:...
ExNexu/scablo
app/backend/data/mongodb/service/ArchiveDataServiceMongo.scala
Scala
bsd-2-clause
380
/* Title: Pure/System/options.scala Author: Makarius System options with external string representation. */ package isabelle import java.util.Calendar object Options { type Spec = (String, Option[String]) val empty: Options = new Options() /* representation */ sealed abstract class Type ...
MerelyAPseudonym/isabelle
src/Pure/System/options.scala
Scala
bsd-3-clause
12,398
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this fi...
takezoe/elasticsearch-hadoop
spark/sql-20/src/main/scala/org/elasticsearch/spark/sql/ScalaEsRowRDD.scala
Scala
apache-2.0
2,899
package io.buoyant.interpreter.fs import com.fasterxml.jackson.annotation.JsonIgnore import com.twitter.finagle.Dtab import com.twitter.finagle.Stack.Params import com.twitter.finagle.naming.NameInterpreter import com.twitter.io.Buf import com.twitter.util.Activity import io.buoyant.config.types.File import io.buoyant...
denverwilliams/linkerd
interpreter/fs/src/main/scala/io/buoyant/interpreter/fs/FsInterpreterConfig.scala
Scala
apache-2.0
1,060
package services import org.joda.time.DateTime import scala.concurrent.Future import play.api.libs.json._ /** * This is the interface of the Toggl service which is supposed to get the list of projects in a workspace. */ trait TogglService { /** * Get a list of the project names in a Toggl workspace * @...
dcharoulis/teahub
app/services/TogglService.scala
Scala
apache-2.0
2,959
package org.storrent import akka.actor.{ Actor, ActorRef, Props, ActorSystem } object Storrent { val system = ActorSystem("storrent") def main(args: Array[String]) { if(args.isEmpty) { println("Usage: Storrent [torrent file] [torrent file] ...") } else { args.foreach { f => system.actorOf(Prop...
bowlofstew/storrent
src/main/scala/Storrent.scala
Scala
apache-2.0
369
package mesosphere.marathon.core.launcher import mesosphere.marathon.core.launcher.impl.TaskLabels import mesosphere.marathon.core.task.Task import mesosphere.marathon.core.task.Task.LocalVolume import mesosphere.marathon.tasks.ResourceUtil import org.apache.mesos.{ Protos => MesosProtos } /** * An operation which ...
pgkelley4/marathon
src/main/scala/mesosphere/marathon/core/launcher/TaskOp.scala
Scala
apache-2.0
3,900
package com.chrisomeara.pillar import org.scalatest.{FunSpec, BeforeAndAfter} import org.scalatest.matchers.ShouldMatchers import java.io.{ByteArrayInputStream, FileInputStream} import java.util.Date class ParserSpec extends FunSpec with BeforeAndAfter with ShouldMatchers { describe("#parse") { describe("137002...
comeara/pillar
src/test/scala/com/chrisomeara/pillar/ParserSpec.scala
Scala
mit
5,892
package com.evojam.nlp.util import java.io.File trait ObjectLoader { def load[T](file: File, gzipped: Boolean = true): Option[T] def loadResource[T](name: String, gzipped: Boolean = true): Option[T] }
evojam/scala-common
src/main/scala/com/evojam/nlp/util/ObjectLoader.scala
Scala
apache-2.0
207
/* * Copyright 2013 zhongl * * 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 w...
chosen0ne/HouseMD
src/test/scala/com/github/zhongl/test/F.scala
Scala
apache-2.0
738
package com.ebay.neutrino import com.ebay.neutrino.balancer.CNameResolver import com.ebay.neutrino.config._ import org.scalatest.{FlatSpec, Matchers} class PoolResolverTest extends FlatSpec with Matchers with NeutrinoTestSupport { behavior of "Creating Pool Resolvers" implicit val core = new NeutrinoCore(Neutrin...
eBay/Neutrino
src/test/scala/com/ebay/neutrino/PoolResolverTest.scala
Scala
apache-2.0
4,920
/* * 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 ...
WeichenXu123/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StreamExecution.scala
Scala
apache-2.0
26,614
package s1.sjakki import o1.grid._ import scala.collection.mutable.Buffer /** - eri sääntöjä ja twistejä jossain vaiheesa. */ class ChessBoard(boardWidth: Int = 8, boardLength: Int = 8) extends Grid[Square](boardWidth, boardLength) { private var whites = Buffer[]()//pieces private var blacks = Buffer[]() fo...
Trosterud/sjakki
src/s1/sjakki/sjakki.scala
Scala
mit
2,207
/* vim: set ts=2 et sw=2 sts=2 fileencoding=utf-8: */ import scala.util.control.Exception._ import scala.util.{Try, Success, Failure} import scala.collection.JavaConverters._ import scala.xml.Elem import org.apache.poi.ss.usermodel._ import org.apache.poi.xssf.usermodel.XSSFWorkbook import org.scalatra._ import java....
wak109/exceler
jvm/src/main/scala/ExcelerServlet.scala
Scala
mit
2,965
package examples import problemtype.ExactCover object ExactCoverExample0 extends App { val U: Array[Int] = Array(1, 2, 3, 4, 5, 6, 7) val S: Map[String, Array[Int]] = Map[String, Array[Int]]( "A" -> Array(3, 5, 6), "B" -> Array(1, 4, 7), "C" -> Array(2, 3, 6), "D" -> Array(1, 4), "E" -> Array(...
csurfer/scala-dlx
src/main/scala/examples/ExactCoverExample0.scala
Scala
mit
451
package mesosphere.marathon package core.appinfo.impl import mesosphere.marathon.core.appinfo.{ AppInfo, EnrichedTask, TaskCounts, TaskStatsByVersion } import mesosphere.marathon.core.base.Clock import mesosphere.marathon.core.deployment.{ DeploymentPlan, DeploymentStepInfo } import mesosphere.marathon.core.group.Grou...
natemurthy/marathon
src/main/scala/mesosphere/marathon/core/appinfo/impl/AppInfoBaseData.scala
Scala
apache-2.0
9,855
/* Copyright 2009-2021 EPFL, Lausanne */ import stainless.lang._ import stainless.annotation._ object Extern1 { @extern def plop(a: BigInt): BigInt = { require(a > 0) a + scala.math.abs(-3) } ensuring { _ > 0 } def test(b: BigInt): BigInt = { plop(if (b <= 0) -b+1 else b) } ensuring { ...
epfl-lara/stainless
sbt-plugin/src/sbt-test/sbt-plugin/simple/success/src/main/scala/Extern1.scala
Scala
apache-2.0
380
/** * Copyright 2015, deepsense.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
workflowjson/src/test/scala/io/deepsense/models/json/workflow/DOperationCategoryNodeJsonProtocolSpec.scala
Scala
apache-2.0
2,411
/* * The MIT License * * Copyright (c) 2016 Fulcrum Genomics LLC * * 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 us...
fulcrumgenomics/fgbio
src/test/scala/com/fulcrumgenomics/fastq/TrimFastqTest.scala
Scala
mit
5,507
/* * Copyright 2015 PayPal * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
keshin/squbs
squbs-unicomplex/src/main/scala/org/squbs/unicomplex/UnicomplexBoot.scala
Scala
apache-2.0
26,505
package org.jetbrains.sbt import java.io.{BufferedInputStream, File, FileInputStream} import java.net.URI import java.util.Properties import java.util.jar.JarFile import com.intellij.openapi.externalSystem.model.{DataNode, ProjectKeys} import com.intellij.openapi.externalSystem.model.project.ModuleData import com.int...
ilinum/intellij-scala
src/org/jetbrains/sbt/SbtUtil.scala
Scala
apache-2.0
6,409
/* * Copyright (C) 2015 Language Technology Group * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * ...
tudarmstadt-lt/newsleak
common/src/test/scala/utils/BenchmarkTest.scala
Scala
agpl-3.0
2,177
/////////////////////////////////////////////////////////////////////////////// // TextGrounderInfo.scala // // Copyright (C) 2011-2014 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...
utcompling/textgrounder
src/main/scala/opennlp/textgrounder/gridlocate/TextGrounderInfo.scala
Scala
apache-2.0
1,451
package org.jetbrains.plugins.scala package lang package psi package impl package toplevel package synthetic import _root_.javax.swing.Icon import com.intellij.navigation.ItemPresentation import com.intellij.openapi.editor.colors.TextAttributesKey import com.intellij.openapi.progress.ProcessCanceledException import c...
advancedxy/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/toplevel/synthetic/ScSyntheticClass.scala
Scala
apache-2.0
18,342
/* * ****************************************************************************** * * Copyright (C) 2013 Christopher Harris (Itszuvalex) * * [email protected] * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * * as p...
Itszuvalex/Femtocraft-alpha-1
src/main/java/com/itszuvalex/femtocraft/power/tiles/TileEntityFemtoCubeFrame.scala
Scala
gpl-2.0
1,937
package defw.http import org.scalatest._ import java.net.{URI => JavaNetURI} class URITest extends FlatSpec { "URI.apply" should "create uri object from http://hc.apache.org/?a=b#c" in { val uri = URI("http://hc.apache.org/?a=b#c") assert(uri.isInstanceOf[JavaNetURI] === true) } }
takahish0306/scala-defw
util/src/test/scala/defw/http/URITest.scala
Scala
apache-2.0
298
import org.junit.Assert._ import org.junit.Test import org.junit.Ignore import Chisel._ import chiselutils.xilinx._ class Fifo36E1TestSuite extends TestSuite { @Test def fifo36E1() { class UserTop extends Module { val io = new QueueIO( UInt( width = 72 ), 500 ) val enqClk = Clock() val deqCl...
da-steve101/chisel-utils
src/test/scala/Fifo36E1Suite.scala
Scala
lgpl-3.0
889
package BIDMach.models import BIDMat.{Mat,SBMat,CMat,DMat,FMat,IMat,HMat,GMat,GIMat,GSMat,SMat,SDMat} import BIDMat.MatFunctions._ import BIDMat.SciFunctions._ import BIDMach.datasources._ import BIDMach.datasinks._ import BIDMach.updaters._ import BIDMach._ /** * LDA model using online Variational Bayes ...
jamesjia94/BIDMach
src/main/scala/BIDMach/models/LDA.scala
Scala
bsd-3-clause
10,119
/* * ____ ____ _____ ____ ___ ____ * | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R) * | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data * | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In...
precog/platform
common/src/main/scala/com/precog/common/jobs/JobResult.scala
Scala
agpl-3.0
2,975
package com.datastax.spark.connector.rdd.partitioner.dht import java.net.InetAddress case class TokenRange[V, T <: Token[V]] ( start: T, end: T, replicas: Set[InetAddress], dataSize: Long) { def isWrappedAround(implicit tf: TokenFactory[V, T]): Boolean = start >= end && end != tf.minToken def isFull(imp...
maasg/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/rdd/partitioner/dht/TokenRange.scala
Scala
apache-2.0
1,074
/* * 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 ...
u2009cf/spark-radar
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/FilterPushdownSuite.scala
Scala
apache-2.0
38,080
import sbt._ object Dependencies { lazy val appDependencies = Seq( "com.typesafe.slick" %% "slick" % "3.2.1", "com.typesafe.akka" %% "akka-http" % "10.0.9", "joda-time" % "joda-time" % "2.9.9" ) lazy val testDependencies = Seq( "org.scalatest" ...
avalon12/crypto-trader
traderbot/project/Dependencies.scala
Scala
gpl-3.0
375
/* * Copyright (C) 2016  Academic Medical Center of the University of Amsterdam (AMC) * * This program is semi-free software: you can redistribute it and/or modify it * under the terms of the Rosemary license. You may obtain a copy of this * license at: * * https://github.com/AMCeScience/Rosemary-Vanilla/blob/...
AMCeScience/Rosemary-Vanilla
app/nl/amc/ebioscience/rosemary/controllers/api/ProcessingsController.scala
Scala
agpl-3.0
18,879
package org.remus32.NanoHttpdLayer import fi.iki.elonen.NanoHTTPD import fi.iki.elonen.NanoHTTPD.IHTTPSession import fi.iki.elonen.NanoHTTPD.Response.IStatus import scala.language.implicitConversions /** * Created by remus32 on 17/04/16. */ trait Implicits { implicit def ihttpsessionToRequest(that: IHTTPSessio...
remus32/BetterServer
serverLayer/src/main/scala/org/remus32/NanoHttpdLayer/Implicits.scala
Scala
gpl-3.0
814
/* * Created on 2010/04/01 * Copyright (c) 2010-2014, Wei-ju Wu. * 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, ...
weiju/zmpp2
zmpp-glulx/src/test/scala/org/zmpp/glulx/StackTest.scala
Scala
bsd-3-clause
4,125
package db.scalikejdbc import org.intracer.wmua.Image import org.specs2.mutable.Specification class ImageSpec extends Specification with TestDb { sequential def image(id: Long) = Image(id, s"File:Image$id.jpg", None, None, 640, 480, Some(s"12-345-$id")) def addToContest(contestId: Long, images: Seq[Image...
intracer/wlxjury
test/db/scalikejdbc/ImageSpec.scala
Scala
apache-2.0
2,206
package com.azavea.server import com.azavea.server.mapalgebra.focal._ import geotrellis.raster._ import geotrellis.raster.io._ import geotrellis.raster.histogram.{Histogram, StreamingHistogram} import geotrellis.raster.render._ import geotrellis.spark._ import geotrellis.spark.buffer.{BufferedTile, Direction} import ...
geotrellis/geotrellis-pointcloud-demo
src/app-backend/server/src/main/scala/com/azavea/server/Router.scala
Scala
apache-2.0
27,497
package net.sansa_stack.inference.data import org.apache.jena.graph.{Node, Triple} /** * @author Lorenz Buehmann */ trait JenaRDFTripleLike extends TripleOps[Jena] { // self: Triple => // // override def s: Node = self.getSubject // override def p: Node = self.getPredicate // override def o: Node = self.getOb...
SANSA-Stack/SANSA-RDF
sansa-inference/sansa-inference-common/src/main/scala/net/sansa_stack/inference/data/JenaRDFTripleLike.scala
Scala
apache-2.0
327
/* * 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 t...
rocwzp/zipkin
zipkin-cassandra/src/main/scala/com/twitter/zipkin/storage/cassandra/CassandraSpanStore.scala
Scala
apache-2.0
12,646
package jp.ne.opt.redshiftfake import org.scalatest.fixture class FakeConnectionTest extends fixture.FlatSpec with H2Sandbox { it should "convert and execute alter table add column with default and null to postgres equivalents" in { conn => val stmt = conn.createStatement() stmt.execute("CREATE TABLE test...
opt-tech/redshift-fake-driver
src/test/scala/jp/ne/opt/redshiftfake/FakeConnectionTest.scala
Scala
apache-2.0
692
import org.scalatest.{Matchers, FunSuite} /** @version 1.2.0 */ class RomanNumeralsTest extends FunSuite with Matchers { test("1 is a single I") { RomanNumerals.roman(1) should be ("I") } test("2 is two I's") { pending RomanNumerals.roman(2) should be ("II") } test("3 is three I's") { pend...
ricemery/xscala
exercises/roman-numerals/src/test/scala/RomanNumeralsTest.scala
Scala
mit
1,971
/* * Model.scala * Book example unit test support file. * * Created By: Michael Reposa ([email protected]), Avi Pfeffer ([email protected]) * Creation Date: Feb 26, 2016 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email [email protected] for information....
scottcb/figaro
Figaro/src/test/scala/com/cra/figaro/test/book/chap03/Model.scala
Scala
bsd-3-clause
4,621
// Copyright 2014 Commonwealth Bank of Australia // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ap...
toddmowen/maestro
maestro-core/src/main/scala/au/com/cba/omnia/maestro/core/codec/Tag.scala
Scala
apache-2.0
1,773
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
maropu/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/bucketing/CoalesceBucketsInJoinSuite.scala
Scala
apache-2.0
11,084
package xsbti import java.io.File import scala.collection.mutable.ArrayBuffer import xsbti.api.SourceAPI import xsbti.DependencyContext._ class TestCallback(override val nameHashing: Boolean, override val includeSynthToNameHashing: Boolean) extends AnalysisCallback { val sourceDependencies = new ArrayBuffer[(File, F...
som-snytt/xsbt
interface/src/test/scala/xsbti/TestCallback.scala
Scala
bsd-3-clause
1,929
trait Foo[T <: Foo[T, Enum], Enum <: Enumeration] { type StV = Enum#Value type Meta = MegaFoo[T, Enum] type Slog <: Enumeration def getSingleton: Meta } trait MegaFoo[T <: Foo[T, Enum], Enum <: Enumeration] extends Foo[T, Enum] { def doSomething(what: T, misc: StV, dog: Meta#Event) = None abstract class ...
loskutov/intellij-scala
testdata/scalacTests/pos/t1292.scala
Scala
apache-2.0
651
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.2 * @date Wed Feb 20 17:39:57 EST 2013 * @see LICENSE (MIT style license file). */ package scalation.analytics import scalation.linalgebra.{MatrixD, VectoD, VectorD} import scalation.ma...
NBKlepp/fda
scalation_1.2/src/main/scala/scalation/analytics/PolyRegression.scala
Scala
mit
5,725
/* * 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 ...
manuzhang/incubator-gearpump
examples/distributeservice/src/test/scala/org/apache/gearpump/experiments/distributeservice/DistServiceAppMasterSpec.scala
Scala
apache-2.0
4,033
package us.illyohs.civilmagiks.common.entity import net.minecraftforge.fml.common.registry.EntityRegistry import us.illyohs.civilmagiks.common.core.CivilMagicks import us.illyohs.civilmagiks.common.entity.mics.EntitySigil object ModEnitites { def init: Unit ={ EntityRegistry.registerModEntity(classOf[Entity...
Illyohs/CivilMagicks
src/main/scala/us/illyohs/civilmagiks/common/entity/ModEnitites.scala
Scala
bsd-2-clause
384
package org.etl.dsl.singlethread import org.etl.server.ProcessAST import org.junit.Test import org.etl.server.ProcessExecutor import java.nio.charset.StandardCharsets._ import java.nio.file.{Files, Paths} class DoozleTest { @Test def runProcess()={ val instanceName = "test.doozle.process#1" val fi...
jpvelsamy/sparrow
sparrow-server/src/test/scala/org/etl/dsl/singlethread/DoozleAction.scala
Scala
apache-2.0
1,068
package gg.uhc.hosts import gg.uhc.hosts.database.{AlertRuleRow, MatchRow} object Alerts { val allAlertFields: List[String] = "ip" :: "address" :: "hosting name" :: "content" :: "tags" :: Nil implicit class MatchRowAlertExtensions(m: MatchRow) { def matchesRule(rule: AlertRuleRow): Boolean = getV...
Eluinhost/hosts.uhc.gg
src/main/scala/gg/uhc/hosts/Alerts.scala
Scala
mit
1,263
package slinky.core import slinky.core.facade.{ErrorBoundaryInfo, PrivateComponentClass, React, ReactElement} import slinky.readwrite.{Reader, Writer} import scala.scalajs.js import scala.scalajs.js.annotation.JSName abstract class DefinitionBase[Props, State, Snapshot](jsProps: js.Object) extends React.Component(js...
shadaj/slinky
core/src/main/scala/slinky/core/DefinitionBase.scala
Scala
mit
6,728
/** * Licensed to the Minutemen Group under one or more contributor license * agreements. See the COPYRIGHT file distributed with this work for * additional information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in complian...
mohiva/silhouette
modules/http/src/main/scala/silhouette/http/package.scala
Scala
apache-2.0
1,530
/* * Copyright 2013 Commonwealth Computer Research, 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...
nhambletCCRI/geomesa
geomesa-core/src/main/scala/org/locationtech/geomesa/core/index/QueryPlanners.scala
Scala
apache-2.0
18,724
package org.automanlang.core.scheduler import org.automanlang.core.logging.LogLevelDebug import org.automanlang.core.policy.aggregation.UserDefinableSpawnPolicy import org.scalatest._ import java.util.UUID import org.automanlang.test._ import org.automanlang.adapters.mturk.DSL._ import org.automanlang.adapters.mturk.m...
dbarowy/AutoMan
libautoman/src/test/scala/org/automanlang/core/scheduler/ComplicatedTimeoutTest.scala
Scala
gpl-2.0
2,108
package com.datawizards.sparklocal.examples.dataset import com.datawizards.dmg.annotations.{column, table} import com.datawizards.dmg.dialects import com.datawizards.sparklocal.dataset.io.ModelDialects object Model { case class Person(id: Int, name: String, gender: String) case class WorkExperience(personId: Int,...
piotr-kalanski/spark-local
src/main/scala/com/datawizards/sparklocal/examples/dataset/Model.scala
Scala
apache-2.0
1,452
package com.twitter.jvm import java.util.concurrent.locks.ReentrantLock import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.concurrent.Eventually import org.scalatest.junit.JUnitRunner import org.scalatest.time.{Millis, Seconds, Span} import com.twitter.util.{Await, Promise} class Phi...
travisbrown/util
util-jvm/src/test/scala/com/twitter/jvm/ContentionTest.scala
Scala
apache-2.0
1,356
package io.getquill.context.cassandra import io.getquill._ import io.getquill.context.mirror.Row class CassandraContextMacroSpec extends Spec { val context = mirrorContext import mirrorContext._ "runs queries" - { "static" in { val q = quote { qr1.filter(t => t.i == lift(1)) } va...
mentegy/quill
quill-cassandra/src/test/scala/io/getquill/context/cassandra/CassandraContextMacroSpec.scala
Scala
apache-2.0
1,589
package sds.classfile import sds.classfile.{ClassfileStream => Stream} import sds.classfile.attribute.{AttributeInfo => Attribute} import sds.classfile.constant_pool.{ConstantInfo => Cons} import sds.util.AccessFlag.get import sds.util.DescriptorParser.parse class MemberInfo(data: Stream, pool: Array[Cons], f: (Strea...
g1144146/sds_for_scala
src/main/scala/sds/classfile/MemberInfo.scala
Scala
apache-2.0
1,275
object infpaths3 { object a { trait T { t => type M <: t.g.N // error type T <: a.T val f: t.T trait U { u => type N <: t.f.M type U <: a.x.g.U // error val f: u.U } val g: t.U } val x: a.T = ??? } }
som-snytt/dotty
tests/neg/i280.scala
Scala
apache-2.0
279
/** * (c) Copyright 2013 WibiData, Inc. * * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of...
kijiproject/kiji-schema-shell
src/main/scala/org/kiji/schema/shell/spi/EnvironmentPlugin.scala
Scala
apache-2.0
3,232
package edu.berkeley.nlp.coref import edu.berkeley.nlp.futile.util.Logger import edu.berkeley.nlp.futile.fig.basic.Indexer trait DocumentInferencer { def getInitialWeightVector(featureIndexer: Indexer[String]): Array[Double]; def computeLikelihood(docGraph: DocumentGraph, pairwiseScor...
nate331/jbt-berkeley-coref-resolution
src/main/java/edu/berkeley/nlp/coref/DocumentInferencer.scala
Scala
gpl-3.0
1,686
package com.moon.pattern /** * Created by Paul on 2017/3/6. */ object ScalaPattern3 { var purchases: Vector[() => Unit] = Vector() def makePurchase(register: ScalaCashRegister, amount: Int): () => Unit = { () => { println("purchase in amount: " + amount) register.total + amount } } de...
linpingchuan/misc
scala/pattern/src/test/scala-2.12/com/moon/pattern/ScalaPattern3.scala
Scala
gpl-2.0
855
package colang.utils import java.util.Locale object InternalErrors { def missingPrelude: Nothing = { val message = Locale.getDefault.getLanguage match { case "be" => "Памылка: 'prelude.co' ня знойдзены. Калі ласка, усталюйце стандартную бібліятэку CO." case "ru" => "Ошибка: 'prelude.co' не найден. П...
merkispavel/colang
src/main/scala/colang/utils/InternalErrors.scala
Scala
mit
3,110
package spatial.codegen.pirgen import spatial.aliases._ import argon.codegen.FileGen import argon.core._ import scala.language.postfixOps import scala.sys.process._ trait PIRFileGen extends FileGen { override protected def emitMain[S:Type](b: Block[S]): Unit = emitBlock(b) override protected def emitFileHeade...
stanford-ppl/spatial-lang
spatial/core/src/spatial/codegen/pirgen/PIRFileGen.scala
Scala
mit
1,459
/* * Copyright 2022 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/iht-frontend
app/iht/utils/DeclarationReason.scala
Scala
apache-2.0
1,338
package com.twitter.logging import com.twitter.app.{App, Flaggable} object Logging { implicit object LevelFlaggable extends Flaggable[Level] { def parse(s: String) = if (Logger.levelNames contains s) Logger.levelNames(s) else throw new Exception("Invalid log level: "+s) } implic...
BuoyantIO/twitter-util
util-logging/src/main/scala/com/twitter/logging/App.scala
Scala
apache-2.0
3,464
/* * Copyright 2010 LinkedIn * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
jinfei21/kafka
src/kafka/utils/IteratorTemplate.scala
Scala
apache-2.0
1,953
/* * 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/domain
src/main/scala/uk/gov/hmrc/domain/SaUtrGenerator.scala
Scala
apache-2.0
970
/* ___ _ ___ _ _ *\\ ** / __| |/ (_) | | The SKilL Generator ** ** \\__ \\ ' <| | | |__ (c) 2013-16 University of Stuttgart ** ** |___/_|\\_\\_|_|____| see LICENSE ...
skill-lang/skill
src/main/scala/de/ust/skill/generator/jforeign/internal/StateMaker.scala
Scala
bsd-3-clause
6,082
/** * This file is part of warg. * * warg is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * warg is distributed in the hope t...
starub/warg
src/main/scala/org/warg/modules/dnd2ed/dices/Dice.scala
Scala
gpl-3.0
881
package com.sksamuel.avro4s.schema import com.sksamuel.avro4s.{AvroSchema, BigDecimals, ScalePrecision, SchemaFor} import org.apache.avro.Schema import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec case class BigDecimalSeqOption(biggies: Seq[Option[BigDecimal]]) case class BigDecima...
sksamuel/avro4s
avro4s-core/src/test/scala/com/sksamuel/avro4s/schema/BigDecimalSchemaTest.scala
Scala
apache-2.0
4,350
/* * Copyright © 2015 Reactific Software LLC. All Rights Reserved. * * 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 us...
reactific/RxMongo
messages/src/main/scala/rxmongo/messages/Indices.scala
Scala
mit
11,510
package test import sbt._ object Global { val x = 3 } object GlobalAutoPlugin extends AutoPlugin { object autoImport { lazy val globalAutoPluginSetting = settingKey[String]("A top level setting declared in a plugin.") } }
dansanduleac/sbt
sbt/src/sbt-test/project/global-plugin/global/plugins/A.scala
Scala
bsd-3-clause
237
package org.apache.spot.netflow object FlowColumnIndex extends Enumeration { val HOUR = 4 val MINUTE = 5 val SECOND = 6 val SOURCEIP = 8 val DESTIP = 9 val SOURCEPORT = 10 val DESTPORT = 11 val IPKT = 16 val IBYT = 17 val NUMTIME = 27 val IBYTBIN = 28 val IPKTYBIN = 29 ...
kpeiruza/incubator-spot
spot-ml/src/main/scala/org/apache/spot/netflow/FlowColumnIndex.scala
Scala
apache-2.0
433
import sbt._ import Keys._ import play.Project._ import de.johoop.jacoco4sbt._ import JacocoPlugin._ object ApplicationBuild extends Build { val appName = "ProtoPoll" val appVersion = "0.2.0-SNAPSHOT" val appDependencies = Seq( javaCore, javaJdbc, javaEbean, "org.webjars" % "html5shiv" % "...
adericbourg/proto-poll
project/Build.scala
Scala
gpl-3.0
1,288
/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package viper.silver.testing import java.nio.file._ import collection.mutable import org.scalatest.{ConfigMap...
sccblom/vercors
viper/silver/src/main/scala/viper/silver/testing/SilSuite.scala
Scala
mpl-2.0
5,167
/* * 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 ...
witgo/spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/HiveTableScanExec.scala
Scala
apache-2.0
9,360
package time import jeqa.types.Sentence /** * @author K.Sakamoto */ object TimeSorter { def sort(input: Seq[Sentence]): Seq[Sentence] = { for (d <- { for (data <- input) yield { val time: TimeTmp = new TimeTmp( if (Option(data.getBeginTime).nonEmpty) {Option(data.getBeginTime.getYear)}...
ktr-skmt/FelisCatusZero
src/main/scala/time/TimeSorter.scala
Scala
apache-2.0
889
/* * 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-tail/shared/src/test/scala/monix/tail/BatchCursorSuite.scala
Scala
apache-2.0
7,463
package util import core.Astar import scala.util.Random /** * Created by gabriel on 5/4/16. */ trait Movable { type Position = (Int, Int) def randomPath(map: Map[Position, Boolean], location: Position): List[Position] = { Astar.search(map, location, randomPosition(map)) } private def randomPositio...
riosgabriel/66Taxis
app/util/Movable.scala
Scala
mit
431
package au.id.cxd.text.count import au.id.cxd.text.model.LatentSemanticIndex import breeze.linalg.{DenseMatrix, DenseVector} import scala.collection.mutable /** * Created by cd on 12/1/17. */ trait DocumentTermVectoriser { /** * count the single query array and create a vector * that assigns the tfidf...
cxd/scala-au.id.cxd.math
math/src/main/scala/au/id/cxd/text/count/DocumentTermVectoriser.scala
Scala
mit
1,480
/* * 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 ...
joseph-torres/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVDataSource.scala
Scala
apache-2.0
9,696
package com.sfxcode.nosql.mongo import org.bson.conversions.Bson import org.mongodb.scala.model.Sorts.{ascending, descending, orderBy} object Sort extends Sort trait Sort { def sortByKey(key: String, sortAscending: Boolean = true): Bson = if (sortAscending) orderBy(ascending(key)) else orderBy...
sfxcode/simple-mongo
src/main/scala/com/sfxcode/nosql/mongo/Sort.scala
Scala
apache-2.0
341
/* * 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 ...
sachintyagi22/spark
core/src/main/scala/org/apache/spark/TaskEndReason.scala
Scala
apache-2.0
10,095
/** * sbt-dependency-manager - fetch and merge byte code and source code jars, align broken sources within jars. * For example, it is allow easy source code lookup for IDE while developing SBT plugins (not only). * * Copyright (c) 2012-2013 Alexey Aksenov [email protected] * * Licensed under the Apache License, Vers...
sbt-android-mill/sbt-dependency-manager
src/main/scala/sbt/dependency/manager/Plugin.scala
Scala
apache-2.0
41,927
import scala.deriving.* import scala.quoted.* object Macro1 { def mirrorFields[T: Type](using Quotes): List[String] = Type.of[T] match { case '[field *: fields] => Type.show[field] :: mirrorFields[fields] case '[EmptyTuple] => Nil } // Demonstrates the use of quoted pattern matching // ove...
dotty-staging/dotty
tests/run-macros/i8007/Macro_1.scala
Scala
apache-2.0
804
object ch11_8 { import scala.language.higherKinds import ch11.Functor trait Monad[F[_]] extends Functor[F] { def unit[A](a: => A): F[A] def compose[A,B,C](f: A => F[B], g: B => F[C]): A => F[C] def flatMap[A,B](ma: F[A])(f: A => F[B]): F[B] = compose(map(ma), f) } } import ch11_8._ /* from rep...
rucka/fpinscala
src/main/scala/fpinscala/ch11/Exercise8.scala
Scala
gpl-2.0
446
/* * Copyright 2010 LinkedIn * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
jinfei21/kafka
src/kafka/log/SegmentList.scala
Scala
apache-2.0
2,570
package com.twitter.util import java.util.concurrent.atomic.{AtomicInteger, AtomicReference} import scala.annotation.tailrec import scala.collection.generic.CanBuild import scala.collection.immutable.Queue /** * Events are instantaneous values, defined only at particular * instants in time (cf. [[com.twitter.util.V...
stremlenye/util
util-core/src/main/scala/com/twitter/util/Event.scala
Scala
apache-2.0
12,742
package io.opencensus.scala.http4s import cats.effect.{Effect, Resource} import cats.implicits._ import io.opencensus.scala.Tracing import io.opencensus.scala.http.propagation.Propagation import io.opencensus.scala.http.{HttpAttributes => BaseHttpAttributes} import io.opencensus.scala.http4s.HttpAttributes._ import io...
census-ecosystem/opencensus-scala
http4s/src/main/scala/io/opencensus/scala/http4s/TracingClient.scala
Scala
apache-2.0
2,536
package com.jdrews.logstation.service import akka.actor._ import akka.pattern._ import com.jdrews.logstation.tailer.{LogTailerActor, LogThisFile} import com.jdrews.logstation.utils.LogStationColorizer import scala.concurrent.Await import scala.concurrent.duration._ import scala.util.matching.Regex /** * Created by ...
jdrews/logstation
src/main/scala/com/jdrews/logstation/service/LogStationServiceActor.scala
Scala
apache-2.0
2,704
/** Copyright 2015 TappingStone, 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 ...
ydanilenko/PredictionIO
tools/src/main/scala/io/prediction/tools/console/Export.scala
Scala
apache-2.0
1,280
package models import test.ApplicationSpecification import org.specs2._ import specification._ import AssetSortType._ import SortDirection._ import java.sql.Timestamp class AssetDistanceSorterSpec extends ApplicationSpecification { args(sequential = true) "Create a meta" should { "for outlets" in { ...
Shopify/collins
test/models/AssetDistanceSorterSpec.scala
Scala
apache-2.0
4,272