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 edu.berkeley.nlp.entity.wiki import scala.collection.JavaConverters._ import scala.collection.mutable.ArrayBuffer import edu.berkeley.nlp.entity.coref.Mention import edu.berkeley.nlp.futile.util.Logger import edu.berkeley.nlp.futile.util.Counter /** * Simple data structure to store information about a query ...
malcolmgreaves/berkeley-entity
src/main/java/edu/berkeley/nlp/entity/wiki/Query.scala
Scala
gpl-3.0
5,611
package edu.ncrn.cornell.xml import scala.xml.Node /** * @author Brandon Barker * 9/15/2016 */ object ScalaXmlExtra { implicit class NodeExtra(val node: Node) extends AnyVal{ /** * Convenience method for looking up attribute values using * the attribute name. */ def attribu...
ncrncornell/XPathEnumerator
src/main/scala/edu/ncrn/cornell/xml/ScalaXmlExtra.scala
Scala
apache-2.0
798
package info.glennengstrand.news.resource import javax.inject.Inject import play.api.Logger import play.api.data.Form import play.api.libs.json.Json import io.circe._, io.circe.generic.auto._, io.circe.parser._, io.circe.syntax._ import play.api._ import play.api.mvc._ import info.glennengstrand.news.model._ import s...
gengstrand/clojure-news-feed
server/feed12/app/info/glennengstrand/news/resource/InboundController.scala
Scala
epl-1.0
843
/* * Copyright 2016 Thomas Puhl * * 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...
digitalistbesser/scaladiff
src/test/scala/de/digitalistbesser/diff/io/NormalFormatSpec.scala
Scala
apache-2.0
8,929
package app.circumstances import utils.WithJsBrowser import app.FunctionalTestCommon import utils.pageobjects.circumstances.start_of_process.GReportChangesPage import utils.pageobjects.xml_validation.{XMLBusinessValidation, XMLCircumstancesBusinessValidation} import utils.pageobjects.{Page, PageObjects, TestData, XmlP...
Department-for-Work-and-Pensions/ClaimCapture
c3/test/app/circumstances/FunctionalTestCase21Spec.scala
Scala
mit
1,224
package de.erna.collectors /** * @author Eros Candelaresi <[email protected]> * @since 17.10.13 21:05 * * Base trait for all collector actors. */ trait Collector { }
DerEros/krautmail
server/base/collectors/src/main/scala/de/erna/collectors/Collector.scala
Scala
gpl-3.0
182
/* * 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 ...
ZxlAaron/mypros
external/kinesis-asl/src/test/scala/org/apache/spark/streaming/kinesis/KinesisBackedBlockRDDSuite.scala
Scala
apache-2.0
11,291
package org.jetbrains.plugins.scala package lang package psi package api package toplevel package typedef import com.intellij.execution.junit.JUnitUtil import com.intellij.openapi.progress.ProgressManager import com.intellij.openapi.project.DumbService import com.intellij.pom.java.LanguageLevel import com.intellij.psi...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/api/toplevel/typedef/ScTemplateDefinition.scala
Scala
apache-2.0
21,554
package org.wartremover package contrib.warts import scala.collection.mutable object ExposedTuples extends WartTraverser { val message: String = "Avoid using tuples in public interfaces, as they only supply type information. Consider using a custom case class to add semantic meaning." private final case clas...
tim-zh/wartremover-contrib
core/src/main/scala/wartremover/contrib/warts/ExposedTuples.scala
Scala
apache-2.0
3,713
package org.tribbloid.spookystuff.example.forum import org.tribbloid.spookystuff.SpookyContext import org.tribbloid.spookystuff.actions.Wget import org.tribbloid.spookystuff.example.QueryCore import org.tribbloid.spookystuff.dsl._ /** * Created by peng on 9/26/14. */ object Yelp extends QueryCore { override def ...
chenUT/spookystuff
example/src/main/scala/org/tribbloid/spookystuff/example/forum/Yelp.scala
Scala
apache-2.0
2,059
package connectors import com.github.tomakehurst.wiremock.client.WireMock._ import connectors.NonRepudiationConnector.StoreNrsPayloadSuccess import fixtures.ITRegistrationFixtures import itutil.IntegrationSpecBase import play.api.libs.json.Json import play.api.test.Helpers._ import support.AppAndStubs import uk.gov.h...
hmrc/vat-registration-frontend
it/connectors/NonRepudiationConnectorISpec.scala
Scala
apache-2.0
1,430
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.3 * @date Sun Sep 25 22:39:34 EDT 2011 * @see LICENSE (MIT style license file). */ package apps.dynamics import scala.util.control.Breaks.{breakable, break} import scalation.dynamics.{...
NBKlepp/fda
scalation_1.3/scalation_models/src/main/scala/apps/dynamics/Pathway2.scala
Scala
mit
2,779
package hu.frankdavid.ranking.workbench import hu.frankdavid.ranking._ import org.apache.commons.math3.distribution.NormalDistribution import org.apache.commons.math3.random.{RandomGenerator, Well19937c} import org.apache.commons.math3.util.Precision import scala.annotation.tailrec import scala.collection.mutable imp...
frankdavid/ranking
src/main/scala/hu/frankdavid/ranking/workbench/TestRunner.scala
Scala
apache-2.0
3,415
package io.digitalmagic.akka.dsl import java.time.Instant import akka.actor.{ActorSelection, Props} import io.digitalmagic.coproduct.{Cop, CopK, TNilK} import io.digitalmagic.akka.dsl.API._ import io.digitalmagic.akka.dsl.EventSourcedActorWithInterpreter.IndexFuture import io.digitalmagic.akka.dsl.context.ProgramConte...
digital-magic-io/akka-cqrs-dsl
akka-cqrs-dsl-core/src/test/scala/io/digitalmagic/akka/dsl/Actor1.scala
Scala
apache-2.0
3,484
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.core.server.common import akka.stream.Materializer import akka.stream.scaladsl.Sink import akka.util.ByteString import play.api.Logger import play.api.mvc._ import play.api.http._ import play.api.http.HeaderNames._ import play.api.http.St...
mkurz/playframework
transport/server/play-server/src/main/scala/play/core/server/common/ServerResultUtils.scala
Scala
apache-2.0
13,128
/* * Copyright 2014-2015 Sphonic Ltd. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
melodious/sphonic-phantom
connector/src/main/scala/com/sphonic/phantom/connector/KeySpace.scala
Scala
apache-2.0
1,433
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 import scala.language.higherKinds /** * Events are instantaneous values, defined only at particular * instants...
tdyas/util
util-core/src/main/scala/com/twitter/util/Event.scala
Scala
apache-2.0
12,990
package blended.itestsupport.ldap import java.util import java.util.concurrent.atomic.AtomicBoolean import scala.concurrent.duration.FiniteDuration import scala.concurrent.Future import akka.actor.{ActorSystem, OneForOneStrategy, Props, SupervisorStrategy} import blended.itestsupport.condition.{AsyncChecker, AsyncCo...
woq-blended/blended
blended.itestsupport/src/main/scala/blended/itestsupport/ldap/LDAPAvailableCondition.scala
Scala
apache-2.0
1,519
package typeformation.cf import CfExp.ParameterRef import enum.Enum sealed trait Parameter extends HasLogicalId with HasRef { def logicalId: String def Type: Parameter.DataType def Description: Option[String] def NoEcho: Option[Boolean] def ConstraintDescription: Option[String] override def ref: CfExp[Str...
typeformation/typeformation
cf/src/main/scala/typeformation/cf/Parameter.scala
Scala
mit
4,177
/*********************************************************************** * Copyright (c) 2013-2022 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
locationtech/geomesa
geomesa-fs/geomesa-fs-storage/geomesa-fs-storage-common/src/main/scala/org/locationtech/geomesa/fs/storage/common/metadata/JdbcMetadataFactory.scala
Scala
apache-2.0
5,082
/* * 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...
Crashfreak/wookiee
wookiee-core/src/main/scala/com/webtrends/harness/service/meta/ServiceMetaData.scala
Scala
apache-2.0
1,469
package ch.octo.cffpoc.gtfs.raw import java.io.File import ch.octo.cffpoc.gtfs._ import com.github.tototoshi.csv.CSVReader /** * Created by alex on 02/05/16. */ object RawTripReader extends RawDataCollectionReader[RawTrip] { override def builReadFunction(header: Array[String]): (Array[String]) => RawTrip = { ...
alexmasselot/gtfs-simulation-play
src/main/scala/ch/octo/cffpoc/gtfs/raw/RawTripReader.scala
Scala
apache-2.0
620
package freecli package config package api import argument.{api => A} import option.{api => O} sealed trait Action case class ArgumentAction(a: A.Action) extends Action { def run(): Unit = a match { case A.NoOp => () sys.exit(0) } } case class OptionAction(o: O.Action) extends Action { def run(...
pavlosgi/freecli
core/src/main/scala/freecli/config/api/Action.scala
Scala
apache-2.0
484
package jigg.nlp.ccg /* Copyright 2013-2016 Hiroshi Noji 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 ...
mynlp/jigg
src/main/scala/jigg/nlp/ccg/TrainParser.scala
Scala
apache-2.0
1,032
/* * Copyright 2016 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
ahudspith-equalexperts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v3/B750.scala
Scala
apache-2.0
807
/* * Copyright (c) 2014-2018 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....
snowplow/iglu
2-repositories/iglu-server/src/main/scala/com.snowplowanalytics.iglu.server/model/ApiKey.scala
Scala
apache-2.0
7,767
package at.logic.gapt.expr.fol import at.logic.gapt.expr._ import at.logic.gapt.expr.hol._ import at.logic.gapt.expr.schema._ import at.logic.gapt.proofs.HOLSequent object reduceHolToFol extends reduceHolToFol /** * Creates a FOL formula from a HOL formula, but applies transformations which do _not_ preserve validit...
loewenheim/gapt
src/main/scala/at/logic/gapt/expr/fol/hol2fol.scala
Scala
gpl-3.0
21,747
/* * 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 ...
CodingCat/mxnet
scala-package/examples/src/test/scala/org/apache/mxnetexamples/infer/objectdetector/ObjectDetectorExampleSuite.scala
Scala
apache-2.0
2,919
package nz.wicker.autoencoder.math.optimization import scala.math.abs import scala.math.max import scala.math.min import scala.math.sqrt import nz.wicker.autoencoder.math.structure.VectorSpace import nz.wicker.autoencoder.visualization.Observer /** * Implementation of the conjugate gradient descent as described in ...
joergwicker/autoencoder
src/main/scala/nz/wicker/autoencoder/math/optimization/ConjugateGradientDescent_HagerZhang.scala
Scala
gpl-3.0
11,493
/* * 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/v2/ContinuousScanExec.scala
Scala
apache-2.0
2,503
package com.benkolera.Rt import org.specs2._ import scalaz._ import org.joda.time.DateTime import org.joda.time.DateTimeZone object QueryBuilderSpec extends mutable.Specification { import QueryBuilder._ val dtz = DateTimeZone.UTC val dt = new DateTime(2013,7,6,13,33,42,DateTimeZone.forOffsetHours(10)) val...
benkolera/scala-rt
src/test/scala/Rt/QueryBuilder.scala
Scala
mit
4,511
package me.shadaj.genalgo.sequences import scala.collection.{mutable, IndexedSeqLike} import scala.collection.generic.CanBuildFrom import scala.collection.mutable.ArrayBuffer import me.shadaj.genalgo.util.BitStorage final class Protein private(storage: BitStorage, val length: Int) extends BioSequence[AminoAcid] with...
shadaj/genalgo
shared/src/main/scala/me/shadaj/genalgo/sequences/Protein.scala
Scala
mit
1,245
package com.twitter.inject.server.tests import com.twitter.finagle.http.Status import com.twitter.finagle.stats.InMemoryStatsReceiver import com.twitter.inject.server.{EmbeddedTwitterServer, FeatureTest} import org.scalatest.concurrent.Eventually /** Test a non-inject TwitterServer using an InMemoryStatsReceiver impl...
twitter/finatra
inject/inject-server/src/test/scala/com/twitter/inject/server/tests/FeatureTestNonInjectionInMemoryStatsReceiverTest.scala
Scala
apache-2.0
2,108
package com.gmadorell.youtube_sync.module.synchronize.test.behaviour.sync import com.gmadorell.youtube_sync.module.shared.stub.ListStub import com.gmadorell.youtube_sync.module.synchronize.application.sync.{ PlayListSynchronizer, SynchronizePlayListCommandHandler } import com.gmadorell.youtube_sync.module.synchron...
GMadorell/youtube_sync
src/test/scala/com/gmadorell/youtube_sync/module/synchronize/test/behaviour/sync/SynchronizePlayListSpec.scala
Scala
mit
2,496
package marcin import scala.collection.mutable /** * Created by m on 2015-08-22. */ class InteligentMap { val dateCells = mutable.HashMap.empty[Long,mutable.HashMap[String,Cell]] def add(date:Any,c:Cell):Unit={ if(date==null) return val ldate=date.asInstanceOf[Long] if(dateCells.cont...
MarcinGrabowiecki/iwlistScanner2
src/main/scala/marcin/InteligentMap.scala
Scala
gpl-3.0
572
/* * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com> */ package play.api.db.evolutions import java.sql.ResultSet import org.specs2.mutable.{ After, Specification } import play.api.Configuration import play.api.db.DefaultDBApi // TODO: fuctional test with InvalidDatabaseRevision exception object Evo...
jyotikamboj/container
pf-framework/src/play-jdbc/src/test/scala/play/api/db/evolutions/EvolutionsSpec.scala
Scala
mit
3,586
/* * Copyright 2014 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 applicabl...
mmatz-ccri/geomesa
geomesa-core/src/main/scala/org/locationtech/geomesa/core/iterators/RecordTableIterator.scala
Scala
apache-2.0
1,899
/* * 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 ...
pronix/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/UnsafeRowConverterSuite.scala
Scala
apache-2.0
19,192
/** * Copyright (C) 2012 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...
brunobuzzi/orbeon-forms
xforms/jvm/src/main/scala/org/orbeon/oxf/xforms/function/XFormsElement.scala
Scala
lgpl-2.1
1,301
/* * Copyright 2015 ligaDATA * * 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 ...
traytonwhite/Kamanja
trunk/MetadataAPI/src/main/scala/com/ligadata/MetadataAPI/Utility/ContainerService.scala
Scala
apache-2.0
9,676
package chen.guo.dagexe.config import chen.guo.test.common.UnitSpec import com.typesafe.config.ConfigFactory class DAGSpec extends UnitSpec { "dag" should "give error for cycled graph" in { val dag = new DAG() val n1 = SleepNode("n1", "100") val n2 = SleepNode("n2", "100") dag.addEdge(n1, n2) da...
enjoyear/Simple-DAG-Execution
sde/src/test/scala/chen/guo/dagexe/config/DAGSpec.scala
Scala
apache-2.0
362
package ch.bsisa.hyperbird.report import play.api.Play class ReportConfig { /** * Wkhtmltopdf binary path */ lazy val wkhtmltopdfPath: String = Play.current.configuration.getString(ReportConfig.WkhtmltopdfPathKey) match { case Some(path) => path case None => throw ReportConfigException(s"Report H...
bsisa/hb-api
app/ch/bsisa/hyperbird/report/ReportConfig.scala
Scala
gpl-2.0
2,770
package org.littlewings.javaee7.config import javax.inject.Inject import org.apache.deltaspike.core.api.config.ConfigResolver import org.apache.deltaspike.core.api.projectstage.ProjectStage import org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner import org.junit.{Before, Test} import org.junit.runner.RunWith...
kazuhira-r/javaee7-scala-examples
cdi-deltaspike-configuration/src/test/scala/org/littlewings/javaee7/config/CustomConfigSpec.scala
Scala
mit
943
/* * 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...
cheeseng/scalatest
scalatest-test/src/test/scala/org/scalatest/ShouldNotShorthandForAllSpec.scala
Scala
apache-2.0
32,551
package com.mdataset.lib.worker.basic import com.mdataset.excavator.core.ENode import com.mdataset.lib.basic.model.MdsSourceMainDTO import com.mdataset.lib.worker.basic.exchange.{MdsAPIExchangeWorker, MdsDataExchangeWorker, MdsDefaultAPIExchangeWorker, MdsDefaultDataExchangeWorker} /** * Worker基础上下文 */ object Mds...
MDataSet/mds
modules/lib_worker_basic/src/main/scala/com/mdataset/lib/worker/basic/MdsWorkerBasicContext.scala
Scala
apache-2.0
707
package uk.gov.homeoffice.console import org.specs2.mutable.Specification class ConsoleSpec extends Specification with Console { "Console" should { "present some text" in { println(present("Hello World")) ok } } }
UKHomeOffice/rtp-io-lib
src/test/scala/uk/gov/homeoffice/console/ConsoleSpec.scala
Scala
mit
239
package no.digipost.labs.items import scala.language.postfixOps import scala.collection.mutable.ListBuffer import java.util.Date import org.bson.types.ObjectId class TestItemsRepository extends ItemsRepository { lazy val items: ListBuffer[DbItem] = ListBuffer() def search(query: Option[String]) = List() def ...
digipost/labs
backend/src/test/scala/no/digipost/labs/items/TestItemsRepository.scala
Scala
apache-2.0
2,036
package rpm4s.cli.repo import org.http4s.Uri case class RepoFile( name: String, baseurl: Uri, enabled: Boolean = true, autorefresh: Boolean = true, gpgcheck: Boolean = false ) object RepoFile { def toFile(repoFile: RepoFile): String = { s"""|[${repoFile.name}] |type=rpm-md |b...
lucidd/rpm4s
cli/src/main/scala/rpm4s/cli/repo/RepoFile.scala
Scala
mit
548
/** * Copyright (C) 2017-2018 the original author or authors. * See the LICENSE file distributed with this work for additional * information regarding copyright ownership. * * @author Matthew Cross <github.com/mcross1991> */ package mahjong package test import org.scalatest.{FlatSpec, Matchers} class Base...
mcross1991/mahjong
src/test/scala/mahjong/BaseSpec.scala
Scala
mit
357
import io.gatling.core.Predef._ import io.gatling.http.Predef._ object TeamNotes { def lookup() = exec(http("TeamNotes") .get("""/patientNote/listTeam""")) .pause(10) }
silverbullet-dk/opentele-performance-tests
src/test/scala/user-files/simulations/processes/clinician/TeamNotes.scala
Scala
apache-2.0
182
/* Copyright 2013 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
sengt/summingbird-batch
summingbird-core/src/main/scala/com/twitter/summingbird/viz/Viz.scala
Scala
apache-2.0
1,150
/* * 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 ...
shaoxuan-wang/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/plan/util/FlinkRexUtilTest.scala
Scala
apache-2.0
18,246
package provingground.library import provingground._ import HoTT._ import induction._ object bool$cases_on { lazy val value = lambda("'e_1326394388" :: FuncTyp("bool" :: Type, Type))(lambda("'f_363947866" :: "bool" :: Type)(lmbda("'g_1623762820" :: ("'e_1326394388" :: FuncTyp("bool" :: Type, Type))("bool.ff" :: "bool...
siddhartha-gadgil/ProvingGround
leanlib/src/main/scala/provingground/library/definitions/bool.cases_on.scala
Scala
mit
859
/* * Copyright 2014 Databricks * * 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...
abridgett/spark-csv
src/main/scala/com/databricks/spark/csv/package.scala
Scala
apache-2.0
6,189
package crawling trait Crawler { def siteMap(): Iterable[String] }
mlucchini/wd-crawler
src/main/scala/crawling/Crawler.scala
Scala
gpl-3.0
69
package com.ctask.data import com.ctask.utils.UniqueId import play.api.libs.json.{JsValue, Json, Reads, Writes} import play.api.libs.json._ import play.api.libs.functional.syntax._ object TaskListJsonUtils { val idGenerator = new UniqueId(1) // Json stuff implicit val taskListJsonRead: Reads[TaskList] = ( ...
modsrm/ctask
common/src/main/scala/com/ctask/data/TaskListJsonUtils.scala
Scala
gpl-3.0
762
class C1 { def f {} } class C2 extends C1 { println(/* line: 2 */ f) }
ilinum/intellij-scala
testdata/resolve2/inheritance/element/Function.scala
Scala
apache-2.0
75
package ems import org.joda.time.DateTime import scala.language.implicitConversions package object storage { implicit def toDateTime(dt: java.util.Date) = new DateTime(dt) }
javaBin/ems-redux
src/main/scala/ems/storage/package.scala
Scala
apache-2.0
178
/* * ****************************************************************************** * Copyright 2012-2013 SpotRight * * 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 * * ...
SpotRight/Polidoro
src/main/scala/com/spotright/polidoro/testing/keyspaces/ColumnFamilyDef.scala
Scala
apache-2.0
2,018
package lara.epfl.scalasca.tests.unit.rules import scala.reflect.runtime.universe.Tree import scala.sys.process._ class BasicTest { def outputToStrippedString(cmd: Seq[String]): (String, String) = { val stdError = new StringBuffer() val stdOutput = cmd lines_! ProcessLogger(stdError append _) (stdOutput.toLis...
jean-andre-gauthier/scalasca
src/test/scala/lara/epfl/scalasca/tests/unit/rules/BasicTest.scala
Scala
bsd-3-clause
1,144
package org.jetbrains.plugins.scala.testingSupport.specs2.specs2_2_10_2_4_6 import org.jetbrains.plugins.scala.testingSupport.specs2.Specs2GoToSourceTest /** * @author Roman.Shein * @since 27.01.2015. */ class Specs2_2_10_2_4_6_GoToSourceTest extends Specs2GoToSourceTest with Specs2_2_10_2_4_6_Base{ }
katejim/intellij-scala
test/org/jetbrains/plugins/scala/testingSupport/specs2/specs2_2_10_2_4_6/Specs2_2_10_2_4_6_GoToSourceTest.scala
Scala
apache-2.0
309
/* * 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 ...
zzcclp/carbondata
integration/spark/src/main/scala/org/apache/spark/sql/listeners/ShowCacheEventListener.scala
Scala
apache-2.0
2,349
package text.parser import util.Config /** * @author ynupc * Created on 2016/05/23 */ object SentenceSplitter { def split(text: String): Seq[String] = { Config.sentenceSplitter match { case "none" => Seq[String](text) case _ => Seq[String](text) } } }
ynupc/scalastringcourseday6
src/main/scala/text/parser/SentenceSplitter.scala
Scala
apache-2.0
308
/* * 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
core/src/main/scala/org/apache/spark/storage/StorageLevel.scala
Scala
apache-2.0
8,013
/* * Copyright (C) 2016-2017 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.scaladsl.persistence class NamedEntity() extends PersistentEntity { override type Command = String override type Event = String override type State = String override def entityTypeName: String = "some-nam...
edouardKaiser/lagom
persistence/scaladsl/src/test/scala/com/lightbend/lagom/scaladsl/persistence/NamedEntity.scala
Scala
apache-2.0
417
/* Copyright 2015 White Label Personal Clouds Pty Ltd * * 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 a...
welcomer/framework
src/main/scala/me/welcomer/framework/pico/dsl/PicoEventHandlingDSL.scala
Scala
apache-2.0
2,124
package sp.domain import java.util.UUID import org.json4s._ /** * * All things used in the domain should be an IDAble. When a new object is created, a new random ID is created. * * When an object is updated, the model handler will reuse the id and increment the version. * The plan is that only the model handler...
kristoferB/SP
sp1/src/main/scala/sp/domain/IDable.scala
Scala
mit
980
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.it.http.parsing import akka.stream.Materializer import akka.stream.scaladsl.Source import akka.util.ByteString import play.api.test._ import play.api.mvc.BodyParser import play.api.mvc.PlayBodyParsers import scala.xml.NodeSeq import java...
wegtam/playframework
core/play-integration-test/src/it/scala/play/it/http/parsing/XmlBodyParserSpec.scala
Scala
apache-2.0
7,041
/* * Copyright (c) 2013-2014 Telefónica Investigación y Desarrollo S.A.U. * * 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 * * Unles...
telefonicaid/fiware-cosmos-platform
service-manager/src/main/scala/es/tid/cosmos/servicemanager/services/CosmosUserService.scala
Scala
apache-2.0
1,100
package beam.router import java.awt.geom.Ellipse2D import java.awt.{BasicStroke, Color} import beam.agentsim.agents.vehicles.BeamVehicleType import beam.agentsim.infrastructure.taz.{TAZ, TAZTreeMap} import beam.analysis.plots.{GraphUtils, GraphsStatsAgentSimEventsListener} import beam.router.Modes.BeamMode import beam...
colinsheppard/beam
src/main/scala/beam/router/TravelTimeObserved.scala
Scala
gpl-3.0
13,600
// Copyright (c) 2011-2015 ScalaMock Contributors (https://github.com/paulbutcher/ScalaMock/graphs/contributors) // // 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, inc...
paulbutcher/ScalaMock
examples/src/test/scala/com/example/ControllerTest.scala
Scala
mit
2,053
package akka.pattern.extended import akka.testkit.ThreadUtil import akka.actor.ActorSystem object Thread { def sleep(duration :Long)(implicit system: ActorSystem): Unit = ThreadUtil.sleep(duration)(system) }
unicredit/akka.js
akka-js-actor-tests/js/src/test/scala/akka/pattern/extended/Thread.scala
Scala
bsd-3-clause
216
/** * 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...
richhaase/kafka
core/src/test/scala/integration/kafka/api/ProducerCompressionTest.scala
Scala
apache-2.0
4,200
package com.twitter.inject.conversions import com.twitter.util.{Duration => TwitterDuration} import org.joda.time.Duration object duration { implicit class RichDuration(val self: Duration) extends AnyVal { def toTwitterDuration: TwitterDuration = { TwitterDuration.fromMilliseconds(self.getMillis) } ...
twitter/finatra
inject/inject-utils/src/main/scala/com/twitter/inject/conversions/duration.scala
Scala
apache-2.0
489
package poker.core /** Type safety for poker ranks without runtime overhead * * @param char Poker ranks (2-9, T, J, Q, K, A) where T represents 10 */ final case class Rank(char: Char) extends AnyVal
kyuksel/poker
src/main/scala/poker/core/Rank.scala
Scala
mit
206
package scutil.lang.tc import minitest._ import scutil.core.implicits._ import scutil.lang._ object ApplicativeTest extends SimpleTestSuite { test("map2 in the zip order when zippy") { assertEquals( Applicative[Option].map2(Some(1), Some(2))(_ -> _), (Some(1) zip Some(2)) ) } test("map2 in the same ord...
ritschwumm/scutil
modules/core/src/test/scala/scutil/lang/tc/ApplicativeTest.scala
Scala
bsd-2-clause
1,399
/* * Copyright 2008-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...
lzpfmh/framework-2
web/webkit/src/main/scala/net/liftweb/http/Paginator.scala
Scala
apache-2.0
12,283
/* Copyright 2014 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
nvoron23/summingbird
summingbird-batch/src/main/scala/com/twitter/summingbird/batch/PrunedSpace.scala
Scala
apache-2.0
1,084
/* * Copyright 2001-2012 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...
hubertp/scalatest
src/main/scala/org/scalatest/DistributedSuiteSorter.scala
Scala
apache-2.0
1,281
class WinActor extends Actor { // create an actor val playerer = context.actorOf(Props[PlayerDestroyedActor], PlayerDestroyedActor.ACTOR_NAME) // set timeout for ask -> ? implicit val timeout = Timeout(5 seconds) def handleMessage(player1: IPlayer, player2: IPlayer, ref: ActorRef) = { // ? ...
mosauter/WT_Battleship
public/presentation/architecture/code/winner.scala
Scala
gpl-2.0
1,359
package ml.combust.mleap.tensorflow import ml.combust.bundle.serializer.FileUtil import ml.combust.mleap.core.types.TensorType import ml.combust.mleap.tensor.{DenseTensor, Tensor} import ml.combust.mleap.tensorflow.converter.MleapConverter import org.scalatest.FunSpec import org.tensorflow.{SavedModelBundle, Signature...
combust/mleap
mleap-tensorflow/src/test/scala/ml/combust/mleap/tensorflow/TensorflowModelSpec.scala
Scala
apache-2.0
4,101
abstract class RedBlack[A] extends Serializable { abstract class Tree[+B] extends Serializable case object Empty extends Tree[Nothing] } object Test { def main(args: Array[String]): Unit = { val r = classOf[RedBlack[_]].getMethod("Empty").getGenericReturnType.toString // Output changed in JDK 1.8.0_172: ...
scala/scala
test/files/run/t2873.scala
Scala
apache-2.0
438
package com.jayway.saaloop.dsl import org.specs2.mutable.Specification import com.jayway.saaloop.dsl.Saaloop._ /** * Copyright 2012 Amir Moulavi ([email protected]) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * ...
amir343/saaloop
saaloop-core/src/test/scala/com/jayway/saaloop/dsl/HadoopConfigurationSpec.scala
Scala
apache-2.0
1,342
/** * Copyright (C) 2015 Stratio (http://stratio.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
pfcoperez/spark-mongodb
spark-mongodb-examples/src/main/scala/com/stratio/datasource/mongodb/examples/SQLExample.scala
Scala
apache-2.0
1,391
/* * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree */ package a14e.collz.mut import scala.annotation.tailrec import scala.collection.{AbstractIterator, mutable} object PrefixMap { sealed trait Node class Leaf(val key: String, ...
a14e/collz
src/main/scala/a14e/collz/mut/PrefixMap.scala
Scala
mit
16,911
package eventstore package core sealed trait ConsumerStrategy /** * System supported consumer strategies for use with persistent subscriptions. */ object ConsumerStrategy { val Values: Set[ConsumerStrategy] = Set(DispatchToSingle, RoundRobin) def apply(name: String): ConsumerStrategy = { Values find { _.to...
EventStore/EventStore.JVM
core/src/main/scala/eventstore/core/ConsumerStrategy.scala
Scala
bsd-3-clause
1,026
package epam.idobrovolskiy.wikipedia.trending.cli import epam.idobrovolskiy.wikipedia.trending.time.WikiDate import org.scalatest.{FlatSpec, Matchers} /** * Created by Igor_Dobrovolskiy on 03.08.2017. */ class WikiQueryArgsParserTest extends FlatSpec with Matchers { "CLI w/o any option" should "not be parsed as...
igor-dobrovolskiy-epam/wikipedia-analysis-scala-core
src/test/scala/epam/idobrovolskiy/wikipedia/trending/cli/WikiQueryArgsParserTest.scala
Scala
apache-2.0
2,185
package org.globalwordnet.api.serialize import eu.monnetproject.lang.{Language, Script} import org.globalwordnet.api.wn._ import org.scalatest._ class WNDBSpec extends FlatSpec with Matchers { var lr = new WNLMF(false).read(new java.io.FileReader("src/test/resources/example3.xml")) it should "output a correct d...
jmccrae/gwn-scala-api
src/test/scala/org/globalwordnet/wnapi/test_wndb.scala
Scala
apache-2.0
6,795
import scala.quoted.* import Macros.* object Test { def main(args: Array[String]): Unit = { val sym = new Symantics { type R = Int def Meth(exp: Int): Int = exp def Meth(): Int = 42 } val test = m(sym) } }
lampepfl/dotty
tests/pos-macros/i7110b/Test_2.scala
Scala
apache-2.0
243
/* * Copyright (C) 2015 Keith M. Hughes. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
kmhughes/robotbrains-examples
data/cloud/scala/org.robotbrains.data.cloud.timeseries.server/src/main/scala/org/robotbrains/data/cloud/timeseries/server/data/SensorDataSample.scala
Scala
apache-2.0
1,031
package org.joda import org.joda.time.DateTime import org.scalatest.FunSuite class DatetimeTests extends FunSuite { test("basic datetime test") { val dt = new DateTime(2015, 8, 11, 12, 1, 2, 3) assert(dt.year.get === 2015) assert(dt.monthOfYear.get === 8) assert(dt.dayOfMonth.get === 1) ...
easel/play-json-extra
scalajs-joda-time/src/test/scala/org/joda/DatetimeTests.scala
Scala
apache-2.0
480
package io.surfkit.core.rabbitmq import io.surfkit.model.Api import scala.collection.JavaConversions._ import akka.actor.{Actor, ActorLogging, ActorRef, Props} import akka.util.ByteString import com.rabbitmq.client.Connection import com.rabbitmq.client.Channel import com.rabbitmq.client.DefaultConsumer import com.ra...
coreyauger/surfkit
core/src/main/scala/core/rabbitmq/RabbitUserConsumer.scala
Scala
mit
3,087
/* * 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
modulej/src/main/scala/phases/ConstructorsCheckerFamily.scala
Scala
bsd-3-clause
2,442
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distribute...
wvlet/airframe
airframe-canvas/src/main/scala/wvlet/airframe/canvas/UnsafeUtil.scala
Scala
apache-2.0
1,389
/*********************************************************************** * Copyright (c) 2013-2020 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
aheyne/geomesa
geomesa-kudu/geomesa-kudu-spark/src/main/scala/org/locationtech/geomesa/kudu/spark/KuduSpatialRDDProvider.scala
Scala
apache-2.0
3,496
/* * 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 ...
hequn8128/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/MatchCodeGenerator.scala
Scala
apache-2.0
29,916
def factors(n: Long): List[Long] = (2 to math.sqrt(n).toInt) .find(n % _ == 0).fold(List(n))(i => i.toLong :: factors(n / i)) val r = factors(600851475143L).last assert(r == 6857) // 1 ms
pavelfatin/projecteuler
p03.scala
Scala
gpl-3.0
192
package performance import java.util.concurrent.{Callable, Executors} import com.hadoop.compression.lzo.LzopCodec import org.apache.spark.sql.{DataFrame, Dataset} import org.apache.spark.sql.hive.HiveContext import org.apache.spark.{SparkContext, SparkConf} /** * 从一个Hive表中查询数据, * 1、单线程方式将记录进行两次save操作 * 2、多线程同时...
chocolateBlack/LearningSpark
src/main/scala/performance/JobWithMultiThread.scala
Scala
mit
1,784
/* * 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 applicable ...
planet42/Laika
core/shared/src/main/scala/laika/ast/templates.scala
Scala
apache-2.0
10,866
package org.jetbrains.plugins.scala package editor.smartEnter.fixers import com.intellij.psi._ import com.intellij.openapi.editor.{Editor, Document} import editor.smartEnter.ScalaSmartEnterProcessor import lang.psi.api.expr.{ScExpression, ScIfStmt} import util.PsiTreeUtil /** * @author Ksenia.Sautina * @since 1/28/...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/editor/smartEnter/fixers/ScalaIfConditionFixer.scala
Scala
apache-2.0
1,943