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.sksamuel.elastic4s.streams import java.util.concurrent.{CountDownLatch, TimeUnit} import akka.actor.ActorSystem import com.sksamuel.elastic4s.ElasticDsl._ import com.sksamuel.elastic4s.bulk.{BulkCompatibleDefinition, RichBulkItemResponse} import com.sksamuel.elastic4s.jackson.ElasticJackson import com.sks...
tyth/elastic4s
elastic4s-streams/src/test/scala/com/sksamuel/elastic4s/streams/BulkIndexingSubscriberIntegrationTest.scala
Scala
apache-2.0
4,759
package at.logic.gapt.proofs.resolution import at.logic.gapt.expr._ import at.logic.gapt.proofs.HOLSequent import scala.collection.mutable /** * Eliminate [[AvatarSplit]], [[AvatarComponent]], [[AvatarContradiction]] * splitting inferences from a resolution proof. */ object eliminateSplitting { def apply( p: R...
gebner/gapt
core/src/main/scala/at/logic/gapt/proofs/resolution/eliminateSplitting.scala
Scala
gpl-3.0
4,915
package com.codacy.client.stash import play.api.libs.functional.syntax._ import play.api.libs.json._ case class SshKey(id: Long, key: String, label: String) object SshKey { implicit val reader: Reads[SshKey] = ( (__ \ "key" \ "id").read[Long] and (__ \ "key" \ "text").read[String] and (__ \ "key" \...
rtfpessoa/stash-scala-client
src/main/scala/com/codacy/client/stash/SshKey.scala
Scala
apache-2.0
773
package com.github.sdwebster.app import org.scalatra.test.specs2._ // For more on Specs2, see http://etorreborre.github.com/specs2/guide/org.specs2.guide.QuickStart.html class MyScalatraServletSpec extends ScalatraSpec { def is = "GET / on MyScalatraServlet" ^ "should return status 200" ...
sdwebster/mini-projects
Scala/simpleServer/simple-server/src/test/scala/com/github/sdwebster/app/MyScalatraServletSpec.scala
Scala
mit
501
/** * Copyright (c) 2002-2011 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 F...
neo4j-attic/graphdb
integration-test/integration/standard/src/test/scala/org/neo4j/release/it/std/smoke/KernelSpec.scala
Scala
agpl-3.0
1,997
/* * Copyright 2014 Frugal Mechanic (http://frugalmechanic.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...
frugalmechanic/fm-common
shared/src/main/scala/fm/common/rich/RichIntOption.scala
Scala
apache-2.0
968
package dotty.tools package dotc package interactive import core._ import Phases._ import typer._ class InteractiveCompiler extends Compiler { // TODO: Figure out what phases should be run in IDEs // More phases increase latency but allow us to report more errors. // This could be improved by reporting errors b...
som-snytt/dotty
compiler/src/dotty/tools/dotc/interactive/InteractiveCompiler.scala
Scala
apache-2.0
563
package org.jetbrains.plugins.scala.externalHighlighters import com.intellij.codeInsight.daemon.impl.{HighlightInfo, HighlightInfoType, UpdateHighlightersUtil} import com.intellij.codeInsight.intention.IntentionAction import com.intellij.openapi.editor.{Document, Editor, EditorFactory} import com.intellij.openapi.proj...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/externalHighlighters/ExternalHighlighters.scala
Scala
apache-2.0
7,950
/** * 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...
orbeon/orbeon-forms
xforms/jvm/src/test/scala/org/orbeon/oxf/xforms/processor/XFormsAssetServerTest.scala
Scala
lgpl-2.1
1,673
/* * Copyright 2014 Treode, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
Treode/store
demos/movies/spark/src/movies/MoviesDStream.scala
Scala
apache-2.0
1,444
package com.stefansavev.randomprojections.implementation import com.stefansavev.randomprojections.tuning.PerformanceCounters object Counter{ var i = 0 } class PointScore(val pointId: Int, val score: Double) extends Comparable[PointScore] { override def compareTo(o: PointScore): Int = { //o.score.compareTo(th...
stefansavev/random-projections-at-berlinbuzzwords
src/main/scala/com/stefansavev/randomprojections/implementation/BruteForceBySignatureSearcher.scala
Scala
apache-2.0
2,945
package im.mange.driveby.tracking import org.apache.commons.io.FileUtils import java.io.File import im.mange.driveby.DriveByConfig import collection.mutable.ListBuffer import report.{SpecificationRun, ExampleRun, BrowserRun, ApplicationRun} import scala.Long import scala.Predef._ import im.mange.driveby.DriveByConfig....
alltonp/driveby
src/main/scala/im/mange/driveby/tracking/Tracker.scala
Scala
apache-2.0
5,516
package endpoints.algebra.circe import io.circe.{Decoder => CirceDecoder, Encoder => CirceEncoder} /** * Combines both an [[io.circe.Encoder]] and a [[io.circe.Decoder]] into a single type class. * * You don’t need to define instances by yourself as they can be derived from an existing pair * of an [[io.circe...
Krever/endpoints
algebras/algebra-circe/src/main/scala/endpoints/algebra/circe/CirceCodec.scala
Scala
mit
805
import scala.tools.nsc.doc.base._ import scala.tools.nsc.doc.model._ import scala.tools.partest.ScaladocModelTest object Test extends ScaladocModelTest { override def code = """ package scala.test.scaladoc.tagrequirements /** * object comment * @version 1.0 * @version 2....
felixmulder/scala
test/scaladoc/run/tag-requirements.scala
Scala
bsd-3-clause
1,566
/** * 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
graph/src/main/scala/io/deepsense/graph/nodestate/NodeStatus.scala
Scala
apache-2.0
4,388
/* * 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 ...
caneGuy/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/command/createDataSourceTables.scala
Scala
apache-2.0
9,859
/* * Copyright 2012-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
planet42/Laika
core/shared/src/main/scala/laika/rst/BlockParsers.scala
Scala
apache-2.0
8,500
package views.html import play.templates._ import play.templates.TemplateMagic._ import play.api.templates._ import play.api.templates.PlayMagic._ import models._ import controllers._ import java.lang._ import java.util._ import scala.collection.JavaConversions._ import scala.collection.JavaConverters._ import play....
dsarlis/SAD-Spring-2016-Project-Team4
ApacheCMDA-Frontend/target/scala-2.10/src_managed/main/views/html/workflow.template.scala
Scala
mit
9,127
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
hvanhovell/spark
core/src/main/scala/org/apache/spark/rdd/BlockRDD.scala
Scala
apache-2.0
3,034
import testgen._ import TestSuiteBuilder._ import java.io.File object HelloWorldTestGenerator { def main(args: Array[String]): Unit = { val file = new File("src/main/resources/hello-world.json") val code = TestSuiteBuilder.build(file, fromLabeledTest()) println(s"-------------") println(code) pr...
ricemery/xscala
testgen/src/main/scala/HelloWorldTestGenerator.scala
Scala
mit
349
package org.openurp.edu.eams.teach.election.service.context import java.io.Serializable import org.beangle.commons.collection.Collections import org.beangle.commons.entity.metadata.Model import org.openurp.edu.base.Course import org.openurp.edu.base.code.CourseType @SerialVersionUID(6392274306070105614L) class E...
openurp/edu-eams-webapp
election/src/main/scala/org/openurp/edu/eams/teach/election/service/context/ElectCourseGroup.scala
Scala
gpl-3.0
1,913
/* * Copyright (c) 2014 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org...
snowplow/schema-guru
project/Dependencies.scala
Scala
apache-2.0
3,743
/** * 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/main/scala/kafka/api/RequestKeys.scala
Scala
apache-2.0
977
package org.sparklinedata.hive.hook import org.apache.hadoop.hive.ql.QueryPlan import org.apache.hadoop.hive.ql.hooks.HookContext.HookType import org.apache.hadoop.hive.ql.hooks._ import org.apache.hadoop.hive.ql.session.SessionState import org.apache.hadoop.security.UserGroupInformation import org.apache.hadoop.hive...
hbutani/hive-lineage
hivehook/src/main/scala/org/sparklinedata/hive/hook/PostExecHook.scala
Scala
apache-2.0
2,911
import scala.quoted._ import scala.quoted.{given _} inline def foo = ${fooImpl} def fooImpl(using qctx: QuoteContext) = { val res = Expr.ofList(List('{"One"})) Expr(res.show) }
som-snytt/dotty
tests/run-macros/i6765-b/Macro_1.scala
Scala
apache-2.0
183
package rml.args.config.reader import scala.util.parsing.combinator.RegexParsers import rml.args.config.CmdLineArgs import rml.args.exceptions.IllegalArgException /** * Parses function name and arguments */ object CommandlineArgReader extends RegexParsers { private val errorColoring = false private def ident...
rml/scala_args
src/main/scala/rml/args/config/reader/CommandlineArgReader.scala
Scala
gpl-3.0
3,997
package com.criteo.dev.cluster.command import com.criteo.dev.cluster.{DevClusterProcess, Node, Public} import org.slf4j.LoggerFactory import scala.sys.process._ @Public object ScpAction { private val logger = LoggerFactory.getLogger(ScpAction.getClass) private val processLogger = ProcessLogger( (o: String) =...
criteo/berilia
src/main/scala/com/criteo/dev/cluster/command/ScpAction.scala
Scala
apache-2.0
2,387
/* * 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 ...
wangmiao1981/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/subquery.scala
Scala
apache-2.0
31,420
package aiouniya.spark.tagpy import java.util.Date import aiouniya.spark.DmpSparkJob import aiouniya.spark.util.JsonUtil._ import aiouniya.spark.util._ import org.apache.commons.pool2.impl.GenericObjectPoolConfig import org.apache.spark.sql.SQLContext import org.apache.spark.sql.Row import org.apache.spark....
7u/spark-learning
doc/TagToRedis60.scala
Scala
apache-2.0
5,161
/* * Copyright 2011-2022 GatlingCorp (https://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
gatling/gatling
gatling-jsonpath/src/main/scala/io/gatling/jsonpath/RecursiveIterator.scala
Scala
apache-2.0
1,841
package com.arcusys.valamis.lesson.scorm.model import com.arcusys.valamis.lesson.scorm.model.manifest.{ Manifest, Metadata } import org.joda.time.DateTime import org.scalatest.FlatSpec import org.scalatest.matchers.ShouldMatchers class ManifestTest extends FlatSpec with ShouldMatchers { val someMetadata = new Metad...
ViLPy/Valamis
valamis-scorm-lesson/src/test/scala/com/arcusys/valamis/lesson/scorm/model/ManifestTest.scala
Scala
lgpl-3.0
3,672
package com.harrys.hyppo.worker.proc import com.harrys.hyppo.worker.api.proto.IntegrationException import org.scalatest.{Matchers, WordSpec} import scala.reflect.{ClassTag, classTag} /** * Created by jpetty on 12/11/15. */ class CommandExceptionTest extends WordSpec with Matchers { "The CommandExecutionExcept...
harrystech/hyppo-worker
worker/src/test/scala/com/harrys/hyppo/worker/proc/CommandExceptionTest.scala
Scala
mit
1,598
package com.andyspohn.wai import com.typesafe.config.Config import org.apache.spark.SparkContext import org.apache.spark.rdd.RDD import spark.jobserver._ import scala.util.Try object AlertQueryJob extends SparkJob with NamedRddSupport { val QUERY_CONFIG_PARAM = "query" override def runJob(sc:SparkContext, conf...
spohnan/weather-alert-ingest
src/main/scala/com/andyspohn/wai/AlertQueryJob.scala
Scala
apache-2.0
908
/* * Copyright (c) 2009 Sony Pictures Imageworks Inc. * * 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, thi...
azinman/scala-migrations
src/main/scala/com/imageworks/migration/MigrationStatuses.scala
Scala
bsd-3-clause
2,573
package org.oxbow.codebridge.util import javafx.util.Callback import javafx.beans.value.ChangeListener import javafx.beans.value.ObservableValue import javafx.event.EventHandler import javafx.event.Event import javafx.beans.InvalidationListener import javafx.beans.Observable import java.util.Optional object JFXImplic...
eugener/codebridge
codebridge/src/main/scala/org/oxbow/codebridge/util/JFXImplicits.scala
Scala
gpl-3.0
2,632
package chapter.fourteen object ExerciseSix { sealed abstract class BinaryTree case class Leaf(value: Int) extends BinaryTree case class Node(left: BinaryTree, right: BinaryTree) extends BinaryTree def leafSum(tree: BinaryTree): Int = { tree match { case Node(left, right) => leafSum(left) + leafSum...
deekim/impatient-scala
src/main/scala/chapter/fourteen/ExerciseSix.scala
Scala
apache-2.0
392
package org.jetbrains.plugins.scala package util import java.awt.{Point, Rectangle} import com.intellij.openapi.command.CommandProcessor import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.openapi.ui.popup.util.BaseListPopupStep import com.intellij.openapi.ui.popu...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/util/IntentionUtils.scala
Scala
apache-2.0
10,614
/* * This file is part of the "silex" library of helpers for Apache Spark. * * Copyright (c) 2015 Red Hat, 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....
erikerlandson/silex
src/main/scala/com/redhat/et/silex/feature/extractor/spark/spark.scala
Scala
apache-2.0
3,113
/* * Copyright 2011-2013 Christos KK Loverdos * * 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 o...
loverdos/kernie
src/main/scala/com/ckkloverdos/kernie/app/AppSkeleton.scala
Scala
apache-2.0
807
package io.swarm.tsdb.metadata.impl import io.swarm.infrastructure.persistence.slick.SlickProfileComponent import io.swarm.management.impl.ManagementResourceDaoComponent import io.swarm.management import java.util.UUID import scala.slick.jdbc.StaticQuery /** * Created by Anil Chalil on 12/18/13. */ trait Database...
Turkcell/swarm
tsdbmetadatapersistence/src/main/scala/io/swarm/tsdb/metadata/impl/persistence.scala
Scala
apache-2.0
13,463
package scorex.lagonaki.integration.api import org.scalatest.{FunSuite, Matchers} import play.api.libs.json.JsValue import scorex.crypto.encode.Base58 import scorex.lagonaki.{TestingCommons, TransactionTestingCommons} import scorex.transaction.BlockChain class BlockAPISpecification extends FunSuite with Matchers wit...
alexeykiselev/WavesScorex
src/test/scala/scorex/lagonaki/integration/api/BlockAPISpecification.scala
Scala
cc0-1.0
3,537
package is.hail.utils import scala.reflect.ClassTag final class ArrayStack[@specialized T](hintSize: Int = 16)(implicit tct: ClassTag[T]) { private var a = new Array[T](hintSize) private[this] var size_ = 0 def size: Int = size_ def capacity: Int = a.length def isEmpty: Boolean = size_ == 0 def nonEm...
danking/hail
hail/src/main/scala/is/hail/utils/ArrayStack.scala
Scala
mit
1,065
package NFNcore.Lambda import scala.util.parsing.combinator.PackratParsers import scala.util.parsing.combinator.lexical.StdLexical import scala.util.parsing.combinator.syntactical.StdTokenParsers class LambdaLexer extends StdLexical { override def letter = elem("letter", c => (c.isLetter && c != 'λ') /*|| c == '/'*...
blacksheeep/NFN
src/main/scala/NFNcore/Lambda/LambdaParser.scala
Scala
mit
4,381
/** * 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...
SumoLogic/sumobot
src/main/scala/com/sumologic/sumobot/Main.scala
Scala
apache-2.0
1,407
package gapt.proofs.lkt import gapt.expr.formula.All import gapt.expr.formula.Eq import gapt.expr.formula.Formula import gapt.expr.ty.Ty import gapt.expr.util.freeVariables import gapt.expr.util.rename import gapt.expr.{ BetaReduction, Expr, Var } import scala.collection.mutable class makeEqualityExplicit( debugging...
gapt/gapt
core/src/main/scala/gapt/proofs/lkt/makeEqualityExplicit.scala
Scala
gpl-3.0
3,640
package org.ucf.scala import java.io.File object If { def main(args: Array[String]): Unit = { /** * In Scala If statement is an expression that results in a value. */ val filename = // String if (!args.isEmpty) args(0) else "default.txt" val filename_1 = // Any, since i...
bingrao/Scala-Learning
ControlFlow/src/main/scala/org/ucf/scala/If.scala
Scala
mit
1,014
package scalaprops package scalazlaws import scalaprops.Property.forAll import scalaprops.Properties.properties import scalaz._ object align { def collapse[F[_], A](implicit F: Align[F], E: Equal[F[A \\&/ A]], A: Gen[F[A]]) = forAll(F.alignLaw.collapse[A] _) def laws[F[_]](implicit F: Align[F], af: Gen[F[Int...
scalaprops/scalaprops
scalaz/src/main/scala/scalaprops/scalazlaws/align.scala
Scala
mit
616
/* * 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...
JerryYanWan/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/models/rnn/Test.scala
Scala
apache-2.0
3,753
package scala.collection.immutable import java.util.concurrent.TimeUnit import org.openjdk.jmh.annotations._ import org.openjdk.jmh.infra.Blackhole // sbt "benchmarks/run HashSetBenchmark" @BenchmarkMode(Array(Mode.AverageTime)) @OutputTimeUnit(TimeUnit.NANOSECONDS) @State(Scope.Thread) class HashSetBenchmark { @...
rklaehn/scalamuc_20150707
jmh211/src/main/scala/scala/collection/immutable/HashSetBenchmark.scala
Scala
apache-2.0
1,079
/* * 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 ...
jiajiechen/mxnet
scala-package/core/src/main/scala/ml/dmlc/mxnet/module/DataParallelExecutorGroup.scala
Scala
apache-2.0
28,821
import scala.tools.nsc.interactive.tests.core.IdempotencyTest // At the time of writing this test, removing any part of `enterExistingSym` // leads to a failure. object Test { def main(args: Array[String]) { test(""" object Foo { def term { def foo(c: String = "") = c class Mag...
felixmulder/scala
test/files/presentation/t8941b/Test.scala
Scala
bsd-3-clause
991
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * ...
adarro/ddo-calc
subprojects/common/ddo-core/src/test/scala/io/truthencode/ddo/model/feats/ManyshotTest.scala
Scala
apache-2.0
1,329
package controllers import play.api.db._ import java.sql.{Array =>_, _} import play.api.Play.current object JDBCTests { /** * Get a prepared statement that cleans itself up * * @param conn Connection to use * @param query Query to run * @param f Callback * @return whatever the callback returns ...
lucidsoftware/relate-benchmarks
app/controllers/JDBCTests.scala
Scala
mit
28,798
package fp import fp.Id._ import fp.MonadSpecification.monadLaws import org.scalacheck.Properties object IdSpecification extends Properties("Id") { include(monadLaws[Id]) }
adamgfraser/fp
src/test/scala/fp/IdSpecification.scala
Scala
apache-2.0
178
package com.socrata.tileserver import java.io.{ByteArrayInputStream, InputStream} import scala.language.implicitConversions import com.socrata.testcommon.UnusedSugarCommon import com.socrata.testcommon.UnusedSugarCommon._ import com.socrata.thirdparty.geojson.FeatureJson import util.{RenderProvider, GeoProvider} tr...
socrata-platform/tileserver
src/test/scala/com.socrata.tileserver/UnusedSugar.scala
Scala
apache-2.0
929
package models.upload import anorm._ import play.api.db.DB import play.api.Play.current /** * Created by Ravis on 23/02/15. */ class Upload(val uid: Option[Long], val title: String, val author: String, val teacherId: Long, val disciplineId: Long, val filename: String) { val filePath: String = uid.getOrElse("Not...
RavisMsk/Design-Tech-Home-Task
app/models/upload/Upload.scala
Scala
mit
3,249
package ru.spbau.calcgeom.tests import org.junit._ import ru.spbau.calcgeom.bentleyottman.World.Segment import ru.spbau.calcgeom.bentleyottman.Intersections class IntersectionsTest { @Test def twoSimpleLines() = { val fst = new Segment((-1.0, 0.0), (1.0, 0.0)) val snd = new Segment((1.0, -1.0), (-1.0, 1....
sayon/bentley-ottman-snap-rounding
src/ru/spbau/calcgeom/tests/IntersectionsTest.scala
Scala
mit
376
/* 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 cqrs.command import java.util.UUID /** * Base class for write model aggregate factories. * * An aggre...
cqrs-endeavour/cqrs-endeavour
cqrs-framework/src/main/scala/cqrs/command/AggregateRootFactory.scala
Scala
mpl-2.0
1,726
/* * Copyright 2016 Coursera 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...
coursera/naptime
naptime-graphql/src/test/scala/org/coursera/naptime/ari/graphql/schema/NaptimePaginatedResourceFieldTest.scala
Scala
apache-2.0
2,752
package scalariform.lexer import scalariform.lexer.CharConstants.SU import scalariform.utils.Utils._ object UnicodeEscapeDecoder { /** * Decode unicode escapes of the form "\\u0061" in the given text. * If forgiveErrors is true, then no exception will be thrown on malformed escapes. */ @throws(classOf[S...
mdr/scalariform
scalariform/src/main/scala/scalariform/lexer/UnicodeEscapeReader.scala
Scala
mit
4,279
/* * Copyright 2012 Twitter Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writ...
rodzyn0688/zipkin
zipkin-hadoop/src/test/scala/com/twitter/zipkin/hadoop/WorstRuntimesSpec.scala
Scala
apache-2.0
2,930
/* * Copyright 2019 Spotify AB. * * 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 ...
spotify/scio
scio-examples/src/main/scala/com/spotify/scio/examples/complete/game/GameStats.scala
Scala
apache-2.0
7,027
package com.originate.scalypher abstract class ConstantString(stringified: String) { def toQuery: String = stringified }
Originate/scalypher
src/main/scala/ConstantString.scala
Scala
mit
124
package reactivemongo.core.nodeset import scala.collection.immutable.ListSet import reactivemongo.api.Compressor final class NodeSetInfo private[reactivemongo] ( val name: Option[String], val version: Option[Long], val nodes: Vector[NodeInfo], val primary: Option[NodeInfo], val mongos: Option[NodeInfo], ...
ReactiveMongo/ReactiveMongo
driver/src/main/scala/core/nodeset/NodeSetInfo.scala
Scala
apache-2.0
1,186
/* * 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 ...
chuckchen/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/WriteToDataSourceV2Exec.scala
Scala
apache-2.0
19,591
package models.conservation import no.uio.musit.formatters.WithDateTimeFormatters import no.uio.musit.models._ import org.joda.time.DateTime import play.api.libs.json.{Format, Json} case class ConservationProcessKeyData( eventId: Long, caseNumber: Option[String], registeredDate: DateTime, registeredBy...
MUSIT-Norway/musit
service_backend/app/models/conservation/ConservationProcessKeyData.scala
Scala
gpl-2.0
578
package test import models.computerPersistenceContext._ import org.specs2.mutable._ import play.api.test._ import play.api.test.Helpers._ class ApplicationSpec extends SpecificationWithJUnit { import models._ // -- Date helpers def dateIs(date: java.util.Date, str: String) = new java.text.SimpleDateFo...
fwbrasil/activate-example-play-async
test/test/ApplicationSpec.scala
Scala
lgpl-2.1
2,973
package com.twitter.finatra.http.integration.doeverything.main.filters import com.twitter.finagle.httpx.{Request, Response} import com.twitter.finagle.{Service, SimpleFilter} import com.twitter.finatra.http.response.ResponseBuilder import com.twitter.util.Future import javax.inject.Inject class ForbiddenFilter @Injec...
deanh/finatra
http/src/test/scala/com/twitter/finatra/http/integration/doeverything/main/filters/ForbiddenFilter.scala
Scala
apache-2.0
539
package edu.msstate.dasi.csb.data.distributions import com.holdenkarau.spark.testing.RDDGenerator import edu.msstate.dasi.csb.test.PropertySpec import org.scalacheck.Arbitrary import org.scalactic.anyvals.PosZInt import scala.collection.mutable import scala.util.Random class ConditionalDistributionTest extends Prope...
msstate-dasi/csb
csb/src/test/scala/edu/msstate/dasi/csb/data/distributions/ConditionalDistributionTest.scala
Scala
gpl-3.0
2,187
/* * Copyright 2017 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...
liquidarmour/ct-calculations
src/test/scala/uk/gov/hmrc/ct/accounts/MockRetrieversFixture.scala
Scala
apache-2.0
3,741
import sys.process._ import math._ object Cloud4ThingsMetrics { val statistics = Array("Average", "Minimum", "Maximum") def get_metric_results(metric_name: String, start_time: String, end_time: String, statistic: String, instanceId: String) : String = { "./get_ec2_metric.sh " + metric_name + " " + star...
mvpgomes/cloud4things
evaluation/epcis_load_test/app/Cloud4ThingsMetrics.scala
Scala
mit
1,108
package org.sireum.pilarform.lexer abstract sealed trait TagState case object InStartTag extends TagState case object InEndTag extends TagState case object Normal extends TagState
fgwei/pilarform
pilarform/src/main/scala/org/sireum/pilarform/lexer/TagState.scala
Scala
epl-1.0
182
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
tkunicki/geomesa
geomesa-filter/src/main/scala/org/locationtech/geomesa/filter/visitor/IdExtractingVisitor.scala
Scala
apache-2.0
4,550
package com.cloudray.scalapress.util.mvc import org.springframework.stereotype.Controller import org.springframework.web.bind.annotation.{ResponseBody, RequestMapping} import util.Random import javax.servlet.http.HttpServletResponse import org.apache.commons.io.IOUtils /** @author Stephen Samuel */ @Controller @Reque...
vidyacraghav/scalapress
src/main/scala/com/cloudray/scalapress/util/mvc/BackgroundController.scala
Scala
apache-2.0
713
package com.seanshubin.detangler.contract import java.io.File import java.lang.ProcessBuilder.Redirect import java.util class ProcessBuilderDelegate(delegate: ProcessBuilder) extends ProcessBuilderContract { override def command(command: util.List[String]): ProcessBuilderContract = new ProcessBuilderDelegate(de...
SeanShubin/detangler
contract/src/main/scala/com/seanshubin/detangler/contract/ProcessBuilderDelegate.scala
Scala
unlicense
2,232
package com.raquo.domtypes.generic.defs.styles.keywords /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events */ trait PointerEventsStyle[T] extends NoneStyle[T] with AutoStyle[T] { /** * The element behaves as it would if the pointer-events property was not * specified. In SVG content, t...
raquo/scala-dom-types
shared/src/main/scala/com/raquo/domtypes/generic/defs/styles/keywords/PointerEventsStyle.scala
Scala
mit
3,970
object Foo { def isGood(x: Int): Boolean = { x % 2 == 0 } } object ArrayUtils { def filter(xs: Array[Int], /* something */): Array[Int] = { val it = xs.iterator val builder = Array.newBuilder[Int] while (it.hasNext()) { val x = it.next() if (/* what? */) builder += x } builder.re...
agconti/scala-school
04-functions-as-values/slides/slide005.scala
Scala
mit
333
package sdk import java.util.Date import akka.actor.ActorRef import com.ppdai.open.core.{PropertyObject, RsaCryptoHelper, ValueTypeEnum} import common.Tool._ import db._ import scala.collection.JavaConverters._ import scala.collection.mutable.ListBuffer /** * Created by isaac on 16/3/9. */ class LoansApi object...
livehl/paipai
src/main/scala/sdk/LoansApi.scala
Scala
apache-2.0
6,937
package pl.project13.scala.akka.raft import protocol._ import akka.actor.ActorRef import pl.project13.scala.akka.raft.model.{RaftSnapshot, RaftSnapshotMetadata} trait SharedBehaviors { this: RaftActor => private[raft] implicit val raftDispatcher = context.system.dispatchers.lookup("raft-dispatcher") /** Used ...
dmitraver/akka-raft
src/main/scala/pl/project13/scala/akka/raft/SharedBehaviors.scala
Scala
apache-2.0
7,032
package io.youi.component import io.youi.component.support.FontSupport import io.youi.dom import io.youi.font.{FontAwesome, FontAwesomeIcon} import org.scalajs.dom.html import reactify.Var class FontAwesomeView(element: html.Element = dom.create.i) extends Component(element) with FontSupport { lazy val icon: Var[Fo...
outr/youi
gui/src/main/scala/io/youi/component/FontAwesomeView.scala
Scala
mit
731
package nak.inference.bp import breeze.util.Index /** * A Model is a factor graph with all variables and all factors. * * @param variables * @param factors */ case class Model(variables: IndexedSeq[Variable[_]], factors: IndexedSeq[Factor]) { def +(f: Factor) = copy(factors = factors :+ f) def +(v: Variable[...
scalanlp/nak
src/main/scala/nak/inference/bp/Model.scala
Scala
apache-2.0
719
package circumflex package core import collection.mutable.{ListBuffer, Map} import collection.JavaConversions._ import java.util.{Locale, MissingResourceException, ResourceBundle} import java.net.URL import java.io.File import java.util.jar.JarFile import scala.collection.concurrent.TrieMap /*!# Configuration API Th...
inca/circumflex
core/src/main/scala/circumflex.scala
Scala
bsd-2-clause
5,802
/* * 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/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/connection/ConnectionProvider.scala
Scala
apache-2.0
2,647
package $organization$ import sbt._ import Keys._ object $name;format="Camel"$ extends Plugin { override lazy val settings = Seq( commands ++= Seq( sample ) ) lazy val sample = Command.command("sampleCommand") { state => println("Hello SBT World!") state } }
akiomik/sbt-plugin.g8
src/main/g8/src/main/scala/$organization__packaged$/$name__Camel$.scala
Scala
mit
293
/** * Copyright 2009 Jorge Ortiz * * 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 i...
xuwei-k/nscala-time
src/main/scala/com/github/nscala_time/time/RichReadableInstant.scala
Scala
apache-2.0
1,197
/* * Copyright 2017 Datamountaineer. * * 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...
datamountaineer/stream-reactor
kafka-connect-cassandra/src/main/scala/com/datamountaineer/streamreactor/connect/cassandra/config/CassandraConfig.scala
Scala
apache-2.0
14,159
/* * Copyright 2015 Heiko Seeberger * * 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...
el-dom/akka-http-json
akka-http-json4s/src/test/scala/de/heikoseeberger/akkahttpjson4s/Json4sSupportSpec.scala
Scala
apache-2.0
4,154
package frame import java.awt.image.BufferedImage import play.api.Logger class ImageToAsciiConverter object ImageToAsciiConverter { import ImageChunkUtils._ import frame.Types._ val Log = Logger(classOf[ImageToAsciiConverter]) case class ProcessFrameRequest(frame: BufferedImage, size: Int) val xtraModif...
dgoetsch/gif-ascii
injest/app/frame/ImageToAsciiConverter.scala
Scala
apache-2.0
1,843
package net.gree.aurora.scala.domain.datasource import net.gree.aurora.domain.datasource.{DataSource => JDataSource, JDBCDataSource => JJDBCDataSource, RedisDataSource => JRedisDataSource} import net.gree.aurora.domain.datasource.{DataSourceSelector => JDataSourceSelector} import org.sisioh.dddbase.utils.{Try => JTry}...
gree/aurora
aurora-scala/src/main/scala/net/gree/aurora/scala/domain/datasource/DataSourceSelectorImpl.scala
Scala
mit
1,653
/* * Copyright 2015 Webtrends (http://www.webtrends.com) * * See the LICENCE.txt 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. * Yo...
mjwallin1/wookiee-spray
example-rest/src/main/scala/com/webtrends/service/PersonService.scala
Scala
apache-2.0
3,361
package neuron import scala.annotation.tailrec /** * Created by oleg on 07.11.15. */ class network(in_period: Int, w_period: Int, threshold: Int, leak: Float=> Float) { def create_topology(): List[ticker] ={ def connect(connections_list: List[(Int,Int,Boolean)], neurons : List[neuron]) : List[ticker] ={ ...
osblinnikov/datamining-playground
src/main/scala/neuron/network.scala
Scala
gpl-2.0
1,577
/* * A real-time collaborative tool to develop files over the network. * Copyright (C) 2010 Mauro Ciancio and Leandro Gilioli * {maurociancio,legilioli} at gmail dot com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Publi...
maurociancio/parallel-editor
src/parallel-editor-kernel/src/main/scala/ar/noxit/paralleleditor/kernel/basic/UserListMerger.scala
Scala
gpl-3.0
1,071
/* * Copyright 2017 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...
liquidarmour/ct-calculations
src/main/scala/uk/gov/hmrc/ct/computations/CP20.scala
Scala
apache-2.0
1,105
/** * Copyright 2011-2016 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
GabrielPlassard/gatling
gatling-http/src/main/scala/io/gatling/http/action/async/ws/WsEvents.scala
Scala
apache-2.0
1,606
/* * Copyright 2015 - 2016 Red Bull Media House GmbH <http://www.redbullmediahouse.com> - all rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
ianclegg/eventuate
eventuate-core/src/main/scala/com/rbmhtechnology/eventuate/ResultHandler.scala
Scala
apache-2.0
3,603
package org.jetbrains.plugins.scala package lang package scaladoc package completion import com.intellij.codeInsight.completion._ import com.intellij.codeInsight.lookup.LookupElement import com.intellij.patterns.PlatformPatterns import com.intellij.util.ProcessingContext import org.jetbrains.plugins.scala.lang.complet...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/scaladoc/completion/ScalaDocCompletionContributor.scala
Scala
apache-2.0
2,109
package example.consumer object ConsumerStreamExample { def main(args: Array[String]): Unit = { val topicNames = if(args.length == 0) { "testTopic" } else { args.head } println("topicNames is " + topicNames) val consumer = SingleTopicConsumer(topicNames) consumer.read().foreach(p...
alonsoir/hello-kafka-twitter-scala
src/main/scala/example/consumer/ConsumerStreamExample.scala
Scala
apache-2.0
334
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2006-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/library/scala/util/DynamicVariable.scala
Scala
bsd-3-clause
2,454
/* * Copyright 2015 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...
keithhall/ct-calculations
src/main/scala/uk/gov/hmrc/ct/computations/calculations/ExpensesCalculator.scala
Scala
apache-2.0
1,901
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complian...
fanf/scala-ldap
src/main/scala/com/normation/ldap/listener/InMemoryDsConnectionProvider.scala
Scala
apache-2.0
3,297