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 controllers.v1 import javax.inject._ import models.ConversionStatus._ import play.api.libs.json._ import play.api.mvc._ import services.WorkerService @Singleton class WorkerController @Inject()(workerService: WorkerService, cc: ControllerComponents) extends AbstractController(cc) { def status = Action { ...
kuhnuri/kuhnuri-worker
common/app/controllers/v1/WorkerController.scala
Scala
apache-2.0
1,705
object ch7_1 { trait Par[A] def map2[A,B,C](a: Par[A], b: Par[B])(f: (A, B) => C): Par[C] = ??? } import ch7_1._ /* from repl you can test typing: :load src/main/scala/fpinscala/ch7/Exercise1.scala */
rucka/fpinscala
src/main/scala/fpinscala/ch7/Exercise1.scala
Scala
gpl-2.0
208
package no.netcompany.testdatagen.utils // Copyright (C) 2014 Lars Reed -- GNU GPL 2.0 -- see LICENSE.txt import scala.util.Random /** * A random function that answers true in n% of the cases. */ trait Percentage { /** A random function that answers true in n% of the cases. */ def hit(n: Int): Boolean= Random....
lre-mesan/testdata
src/main/scala/no/netcompany/testdatagen/utils/Percentage.scala
Scala
gpl-2.0
340
package filodb.coordinator import com.typesafe.config.Config import com.typesafe.scalalogging.StrictLogging import kamon.{MetricReporter, SpanReporter} import kamon.metric._ import kamon.metric.MeasurementUnit.{information, time} import kamon.metric.MeasurementUnit.Dimension.{Information, Time} import kamon.trace.Span...
velvia/FiloDB
coordinator/src/main/scala/filodb.coordinator/KamonLogger.scala
Scala
apache-2.0
3,570
package com.malpeza.solid.isp class TransactionResponse(val done: Boolean, val reason: Option[FailReason]) { def this() { this(false, Option(CallBank)) } } object TransactionResponse { def apply() = new TransactionResponse() def apply(done: Boolean) = new TransactionResponse(done, None) def apply(failRe...
lsolano/blog.solid.demo
scala/src/main/scala/com/malpeza/solid/isp/TransactionResponse.scala
Scala
mit
604
package net.xylophones.planetoid.game.logic import net.xylophones.planetoid.game.maths.{RotationDegreesToDirectionVector, Vector3D} import net.xylophones.planetoid.game.model.{PlayerInput, Rocket, Planet, GamePhysics} import net.xylophones.planetoid.game.logic.ModelTestObjectMother._ import org.junit.runner.RunWith im...
wjsrobertson/planetoid3d
game/src/test/scala/net/xylophones/planetoid/game/logic/RocketPositionCalculatorTest.scala
Scala
apache-2.0
4,652
package sk.scalagine.math import org.scalatest.matchers.{MatchResult, Matcher} import org.scalautils.TripleEqualsSupport.Spread import org.scalautils.Prettifier import sk.scalagine.math /** * Created with IntelliJ IDEA. * User: zladovan * Date: 11.5.2014 * Time: 21:55 */ trait PlusMinusMatchers { trait Contai...
zladovan/scalagine
engine/math/src/test/scala/sk/scalagine/math/PlusMinusMatchers.scala
Scala
mit
3,460
package mesosphere.marathon package api.validation import com.wix.accord.validate import mesosphere.UnitTest import mesosphere.marathon.api.v2.AppNormalization import mesosphere.marathon.api.v2.validation.AppValidation import mesosphere.marathon.core.plugin.PluginManager import mesosphere.marathon.raml.{ App, AppCCont...
guenter/marathon
src/test/scala/mesosphere/marathon/api/validation/AppUpdateValidatorTest.scala
Scala
apache-2.0
4,378
package org.randi3.model.criterion import org.randi3.model.criterion.constraint.OrdinalConstraint import org.randi3.model.Entity._ import scalaz._ import Scalaz._ case class OrdinalCriterion private(id: Int, version: Int, name: String, description: String, values: Set[String], inclusionConstraint: Option[OrdinalConst...
dschrimpf/randi3-core
src/main/scala/org/randi3/model/criterion/OrdinalCriterion.scala
Scala
gpl-3.0
1,880
/** * Created on February 17, 2011 * Copyright (c) 2011, 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 * ...
weiju/adf-tools
adf-core/src/main/scala/org/dmpp/adf/logical/HasComment.scala
Scala
bsd-3-clause
2,426
class C { def +=(n: Int) {} } var v = new C v /* line: 2 */ += 1
ilinum/intellij-scala
testdata/resolve2/function/assignment/NotAssignmentOrdinary.scala
Scala
apache-2.0
67
package mesosphere.marathon.integration import mesosphere.marathon.api.v2.json.GroupUpdate import mesosphere.marathon.integration.setup.{ IntegrationFunSuite, IntegrationHealthCheck, SingleMarathonIntegrationTest, WaitTestSupport } import mesosphere.marathon.state.{ AppDefinition, PathId, UpgradeStrategy } import org....
yp-engineering/marathon
src/test/scala/mesosphere/marathon/integration/GroupDeployIntegrationTest.scala
Scala
apache-2.0
16,525
/* * Copyright (C) 2012 reuillon * * This program 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. * * This program is distribut...
ISCPIF/PSEExperiments
openmole-src/openmole/plugins/org.openmole.plugin.environment.egi/src/main/scala/org/openmole/plugin/environment/egi/P12Certificate.scala
Scala
agpl-3.0
1,185
package intellij.haskell.cabal.lang.psi.impl import com.intellij.psi.PsiElement import intellij.haskell.cabal.lang.psi._ import intellij.haskell.psi.HaskellPsiUtil trait BuildDependsImpl extends PsiElement { /** Retrieves the package names as strings. */ def getPackageNames: Array[String] = HaskellPsiUtil.getChi...
rikvdkleij/intellij-haskell
src/main/scala/intellij/haskell/cabal/lang/psi/impl/BuildDependsImpl.scala
Scala
apache-2.0
638
// Copyright (C) 2011-2012 the original author or authors. // 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. // You ...
carstendev/Functional-Programming-in-Scala-Course
recfun/src/test/scala/recfun/BalanceSuite.scala
Scala
apache-2.0
1,483
/* * 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 ...
tophua/spark1.52
mllib/src/test/scala/org/apache/spark/ml/impl/TreeTests.scala
Scala
apache-2.0
7,574
/* * 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 ...
bowenli86/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/agg/batch/HashAggCodeGenerator.scala
Scala
apache-2.0
8,983
package com.softwaremill.example import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.stream.ActorMaterializer import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.model.StatusCodes._ import com.softwaremill.session._ import com.softwaremill.session.CsrfDirectives._ import com.so...
ilyai/akka-http-session
example/src/main/scala/com/softwaremill/example/Example.scala
Scala
apache-2.0
3,245
/* * 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 ...
likithkailas/StreamingSystems
core/src/main/scala/org/apache/spark/storage/DiskBlockObjectWriter.scala
Scala
apache-2.0
8,641
package com.pragmasoft.eventaggregator.streams import akka.kafka.scaladsl.Consumer import akka.kafka.scaladsl.Consumer.Control import akka.kafka.{ConsumerSettings, Subscriptions} import akka.stream.scaladsl.Source import com.pragmasoft.eventaggregator.ActorSystemProvider import com.typesafe.scalalogging.LazyLogging im...
galarragas/event-aggregator
src/main/scala/com/pragmasoft/eventaggregator/streams/KafkaSourceProvider.scala
Scala
apache-2.0
1,616
/*********************************************************************** * Copyright (c) 2013-2019 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
elahrvivaz/geomesa
geomesa-security/src/main/scala/org/locationtech/geomesa/security/DefaultAuthorizationsProvider.scala
Scala
apache-2.0
1,183
// scalac: -Xlint:infer-any -Xfatal-warnings // trait Test { type R = PartialFunction[Any, Unit] val x: R = { case "" => } val y: R = { case "" => } val z: R = x orElse y val zz = x orElse y }
scala/scala
test/files/pos/t8861.scala
Scala
apache-2.0
209
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
bravo-zhang/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala
Scala
apache-2.0
27,200
package uk.ac.ncl.openlab.intake24.services.foodindex.danish import org.apache.commons.lang3.StringUtils import org.workcraft.phrasesearch.{CaseInsensitiveString, WordOps} class DanishWordOpsImpl extends WordOps { val stemmer = new DanishSnowballStemmer() val danishWords: Set[String] = scala.io.Source.fromInputS...
digitalinteraction/intake24
FoodDataServices/src/main/scala/uk/ac/ncl/openlab/intake24/services/foodindex/danish/DanishWordOpsImpl.scala
Scala
apache-2.0
1,470
/* * MOIS: NetCdf Step Handler Test * Copyright (C) 2014 University of Edinburgh School of Informatics * * This program 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 Licens...
edinburgh-rbm/mois
src/test/scala/uk/ac/ed/inf/mois/test/NetCDFTest.scala
Scala
gpl-3.0
2,861
package io.getquill.norm import io.getquill.ast._ import io.getquill.ast.Implicits._ import io.getquill.norm.EqualityBehavior.AnsiEquality /** * Due to the introduction of null checks in `map`, `flatMap`, and `exists`, in * `FlattenOptionOperation` in order to resolve #1053, as well as to support non-ansi * compli...
getquill/quill
quill-core-portable/src/main/scala/io/getquill/norm/SimplifyNullChecks.scala
Scala
apache-2.0
4,519
package dk.bayes.math.discretise import org.junit._ import Assert._ import dk.bayes.clustergraph.testutil.AssertUtil._ class HistogramTest { @Test def toValues = { assertVector(List(-10, 0, 10), Histogram(-10, 10, 3).toValues, 0.001) assertVector(List(-10, -3, 4, 11), Histogram(-10, 11, 4).toValues, 0.001)...
danielkorzekwa/bayes-scala
src/test/scala/dk/bayes/math/discretise/HistogramTest.scala
Scala
bsd-2-clause
2,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 ...
cloudera/spark
streaming/src/main/scala/org/apache/spark/streaming/dstream/UnionDStream.scala
Scala
apache-2.0
2,085
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
bravo-zhang/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/types/DecimalType.scala
Scala
apache-2.0
8,658
package com.datastax.spark.connector.types import com.datastax.oss.driver.api.core.CqlSession import com.datastax.spark.connector.SparkCassandraITFlatSpecBase import com.datastax.spark.connector.cluster.DefaultCluster import com.datastax.spark.connector.cql.CassandraConnector import com.datastax.spark.connector._ impo...
datastax/spark-cassandra-connector
connector/src/it/scala/com/datastax/spark/connector/types/UserDefinedTypeSpec.scala
Scala
apache-2.0
2,424
package org.jetbrains.plugins.scala import java.io.Closeable import java.lang.reflect.InvocationTargetException import java.util.concurrent.{Callable, Future} import javax.swing.SwingUtilities import com.intellij.openapi.application.{ApplicationManager, Result} import com.intellij.openapi.command.{CommandProcessor, W...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/extensions/package.scala
Scala
apache-2.0
19,938
package io.sqooba.oss.timeseries.archive import fi.iki.yak.ts.compression.gorilla._ import io.sqooba.oss.timeseries.immutable.TSEntry import io.sqooba.oss.timeseries.validation.{TSEntryFitter, TimestampValidator} import scala.util.Success /** A GorillaBlock represents a compressed/encoded TimeSeries as defined in th...
Shastick/tslib
src/main/scala/io/sqooba/oss/timeseries/archive/GorillaBlock.scala
Scala
mit
11,976
package com.twitter.diffy.analysis import javax.inject.Inject import com.twitter.diffy.compare.{Difference, PrimitiveDifference} import com.twitter.diffy.lifter.{JsonLifter, Message} import com.twitter.diffy.thriftscala._ import com.twitter.finagle.tracing.Trace import com.twitter.logging._ import com.twitter.util.{F...
1c4r/diffy
src/main/scala/com/twitter/diffy/analysis/DifferenceCollector.scala
Scala
apache-2.0
3,727
package com.k2b6s9j.terrafirmacompanion import cpw.mods.fml.common.Mod import cpw.mods.fml.common.event.{FMLPostInitializationEvent, FMLInitializationEvent, FMLPreInitializationEvent} import net.minecraftforge.common.config.Configuration import org.apache.logging.log4j.Logger @Mod( modid = "TFCompanion", name = "...
kepler0/TerraFirmaCompanion
src/main/scala/com/k2b6s9j/terrafirmacompanion/TerraFirmaCompanion.scala
Scala
mit
1,121
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala package collecti...
martijnhoekstra/scala
src/library/scala/collection/immutable/SortedMap.scala
Scala
apache-2.0
7,481
/* * 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
bson/src/test/scala/rxmongo/bson/BSONSpec.scala
Scala
mit
10,175
/** * Copyright 2015 Gianluca Amato <gamato@unich.it> * * This file is part of JANDOM: JVM-based Analyzer for Numerical DOMains * JANDOM 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 o...
francescaScozzari/Jandom
core/src/test/scala/it/unich/jandom/fixpoint/FiniteEquationSystemTest.scala
Scala
lgpl-3.0
4,372
/* * Copyright 2009-2010 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...
jeppenejsum/liftweb
framework/lift-base/lift-webkit/src/main/scala/net/liftweb/builtin/snippet/Tail.scala
Scala
apache-2.0
908
package dotty.partest import dotty.tools.dotc.reporting.ConsoleReporter import scala.tools.partest.{ TestState, nest } import java.io.{ File, PrintWriter, FileWriter } /* NOTE: Adapted from partest.DirectCompiler and DottyTest */ class DPDirectCompiler(runner: DPTestRunner) extends nest.DirectCompiler(runner) { o...
spetz911/dotty
test/dotty/partest/DPDirectCompiler.scala
Scala
bsd-3-clause
1,571
package se.betygen.update.config import akka.actor.ActorContext import akka.util.Timeout import se.betygen.update.config.DefaultConfig.Actors.defaultTimeout import scala.concurrent.ExecutionContext import scala.language.postfixOps trait ActorDefaults { val context: ActorContext implicit val timeout = Timeout(def...
betygen/update
src/main/scala/se/betygen/update/config/ActorDefaults.scala
Scala
mit
441
/** * 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...
luismcl/crossdata
core/src/main/scala/org/apache/spark/sql/crossdata/execution/nativeudfs.scala
Scala
apache-2.0
3,862
/* * Copyright 2001-2015 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 agreed to in ...
scalatest/scalatest
project/GenScalaTestDotty.scala
Scala
apache-2.0
31,477
package graffiti.ioc import scala.reflect.ClassTag /** * @author Alexander De Leon <me@alexdeleon.name> */ trait Injector { def getInstance[T: ClassTag]: T def getInstance[T: ClassTag](name: String): T def getInstances[T: ClassTag]: Seq[T] }
devialab/graffiti
core/src/main/scala/graffiti/ioc/Injector.scala
Scala
mit
252
package com.meetup.iap import com.meetup.iap.receipt.Subscription import org.slf4j.LoggerFactory import java.io.File import scala.io.Source import org.json4s.DefaultFormats import org.json4s.native.Serialization.{read, writePretty} import org.apache.commons.io.FileUtils /** * Save the existing biller data to a tem...
meetup/apple-of-my-iap
iap-service/src/main/scala/com/meetup/iap/BillerCache.scala
Scala
mit
1,714
/*§ =========================================================================== Chronos =========================================================================== Copyright (C) 2015-2016 Gianluca Costa =========================================================================== Licensed under the Apache Lic...
giancosta86/Chronos
src/main/scala/info/gianlucacosta/chronos/ast/statements/Println.scala
Scala
apache-2.0
1,208
/* * Copyright 2013 Stephan Rehfeld * * 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 ...
stephan-rehfeld/scaladelray
src/main/scala/scaladelray/ui/model/SingleColorMaterialProvider.scala
Scala
apache-2.0
2,141
package wordCount2 import akka.actor.Actor import akka.routing.RoundRobinPool import akka.actor.Props import akka.actor.ActorLogging object MapActor { val STOP_WORDS_LIST = Set("a", "am", "an", "and", "are", "as", "at", "be", "do", "go", "if", "in", "is", "it", "of", "on", "the", "to") def routerProps() = R...
fabiofumarola/akka-tutorial
src/main/scala/wordCount2/MapActor.scala
Scala
cc0-1.0
911
package io.finch import java.util.UUID class DecodePathSpec extends FinchSpec { checkAll("DecodePath[Int]", DecodePathLaws[Int].all) checkAll("DecodePath[Long]", DecodePathLaws[Long].all) checkAll("DecodePath[Boolean]", DecodePathLaws[Boolean].all) checkAll("DecodePath[UUID]", DecodePathLaws[UUID].all) }
yanana/finch
core/src/test/scala/io/finch/DecodePathSpec.scala
Scala
apache-2.0
316
package kea package instances import cats.Semigroup import com.typesafe.config.Config import kea.types._ trait ConfigInstances { /** Implicit converter to the `Conf` from Typelevel config. */ implicit def toConf(config: Config): Conf = Conf(config) /** * Define how to combine validation results. */ ...
lewismj/kea
core/src/main/scala/kea/instances/config.scala
Scala
bsd-2-clause
649
package sample.blog.post import akka.actor.{ ActorSystem, Props } import akka.testkit._ import com.typesafe.config.Config import demesne._ import demesne.testkit.AggregateRootSpec import demesne.testkit.concurrent.CountDownFunction import org.scalatest.Tag import omnibus.akka.envelope._ import omnibus.akka.publish.Rel...
dmrolfs/demesne
examples/src/test/scala/blog/post/PostModuleSpec.scala
Scala
apache-2.0
16,567
/* * Copyright 2014–2017 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
drostron/quasar
mimir/src/main/scala/quasar/mimir/TransSpecable.scala
Scala
apache-2.0
16,081
package io.buoyant.telemetry.influxdb import com.fasterxml.jackson.annotation.JsonIgnore import com.twitter.finagle.Stack import io.buoyant.telemetry.{MetricsTree, Telemeter, TelemeterConfig, TelemeterInitializer} class InfluxDbTelemeterInitializer extends TelemeterInitializer { type Config = InfluxDbConfig val c...
denverwilliams/linkerd
telemetry/influxdb/src/main/scala/io/buoyant/telemetry/influxdb/InfluxDbTelemeterInitializer.scala
Scala
apache-2.0
626
package suql.parser import suql.testing.UnitSpec import scala.collection.immutable.HashMap class ParserErrorTestCasesSpec extends UnitSpec { val parser = new SuqlPackratParser val errorTestCases = HashMap( "\\"hello world" -> "unterminated string literal" ) for ((input, errorDescription) <- errorTestCa...
rmuch/suql
src/test/scala/suql/parser/ParserErrorTestCasesSpec.scala
Scala
mit
442
package com.catinthedark.lib /** * Created by over on 13.12.14. */ abstract class Stub(name: String) extends YieldUnit[Unit] { override def toString = name override def onActivate(data: Any) = {} override def onExit() = {} override def run(delay: Float): (Option[Unit], Any) = (None, null) }
cat-in-the-dark/old48_35_game
src/main/scala/com/catinthedark/lib/Stub.scala
Scala
mit
307
/* * 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 ...
HyukjinKwon/spark-xml
src/main/scala/org/apache/spark/sql/xml/parsers/dom/DomXmlPartialSchemaParser.scala
Scala
apache-2.0
5,035
package skinny.controller.feature import javax.servlet.ServletOutputStream import skinny.engine.SkinnyEngineBase import skinny.logging.LoggerProvider /** * Chunked Response (Transfer-Encoding: chunked). */ trait ChunkedResponseFeature { self: SkinnyEngineBase with LoggerProvider => def withOutputStream(f: Servl...
holycattle/skinny-framework
framework/src/main/scala/skinny/controller/feature/ChunkedResponseFeature.scala
Scala
mit
1,209
package com.datawizards.splot.examples.charts.bar import com.datawizards.splot.api.implicits._ object BarChartLegendCustomization extends App { val data = Seq(1.0, 4.0, 9.0) data .buildPlot() .bar() .legendVisible(false) .display() data .buildPlot() .bar() .seriesName("custom name"...
piotr-kalanski/SPlot
src/main/scala/com/datawizards/splot/examples/charts/bar/BarChartLegendCustomization.scala
Scala
apache-2.0
364
package com.andre_cruz object OptionUtils { def optionIf[T](predicate: => Boolean)(result: => T): Option[T] = { if (predicate) Option(result) else None } }
codecruzer/scala-utils
src/main/scala/com/andre_cruz/OptionUtils.scala
Scala
apache-2.0
190
/** * Test cases for ChineseCalendar.scala. * * @author Yujian Zhang <yujian{dot}zhang[at]gmail(dot)com> * * License: * GNU General Public License v2 * http://www.gnu.org/licenses/gpl-2.0.html * Copyright (C) 2014 Yujian Zhang */ import net.whily.chinesecalendar.ChineseCalendar._ import net.whily.chinese...
whily/chinesecalendar
src/test/scala/net/whily/chinesecalendar/ChineseCalendarTest.scala
Scala
gpl-2.0
29,269
/* * 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 ...
shaneknapp/spark
streaming/src/main/scala/org/apache/spark/streaming/scheduler/rate/RateEstimator.scala
Scala
apache-2.0
2,873
package com.twitter.finagle.tracing /** * This is a tracing system similar to Dapper: * * “Dapper, a Large-Scale Distributed Systems Tracing Infrastructure”, * Benjamin H. Sigelman, Luiz André Barroso, Mike Burrows, Pat * Stephenson, Manoj Plakal, Donald Beaver, Saul Jaspan, Chandan * Shanbhag, 2010. * ...
cogitate/twitter-finagle-uuid
finagle-core/src/main/scala/com/twitter/finagle/tracing/Trace.scala
Scala
apache-2.0
10,881
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/frsse2008/formats/package.scala
Scala
apache-2.0
4,219
package bulu.actor.build import akka.actor.Actor import bulu.util._ import akka.actor.ActorLogging import org.apache.hadoop.hbase.util.Bytes import scala.collection.mutable.ArrayBuffer import org.apache.hadoop.hbase.client.Put import akka.actor.ActorRef class CellSaver(cube: String, sinker:ActorRef) extends A...
hwzhao/bulu
src/main/scala/bulu/actor/build/CellSaver.scala
Scala
apache-2.0
1,060
package io.buoyant.consul.v1 import com.twitter.finagle.Service import com.twitter.finagle.http.{Request, Response} import com.twitter.io.Buf import com.twitter.util.Future import io.buoyant.test.Awaits import org.scalatest.FunSuite class HealthApiTest extends FunSuite with Awaits { val nodesBuf = Buf.Utf8("""[{"No...
denverwilliams/linkerd
consul/src/test/scala/io/buoyant/consul/v1/HealthApiTest.scala
Scala
apache-2.0
1,839
/* * 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 agree...
zerdliu/zipkin
zipkin-collector-service/src/test/scala/com/twitter/zipkin/config/ConfigSpec.scala
Scala
apache-2.0
1,411
package org.spixi.flink.handson.model trait TimeEvent[T] { def timestamp: Long def value: T }
spi-x-i/flink-handson
simple-handson/src/main/scala/org/spixi/flink/handson/model/TimeEvent.scala
Scala
gpl-3.0
100
package lila.storm import com.softwaremill.macwire._ import play.api.Configuration import lila.common.config._ import lila.user.UserRepo @Module final class Env( appConfig: Configuration, db: lila.db.Db, colls: lila.puzzle.PuzzleColls, cacheApi: lila.memo.CacheApi, userRepo: UserRepo )(implicit ...
luanlv/lila
modules/storm/src/main/Env.scala
Scala
mit
707
package io.flow.proxy import io.apibuilder.spec.v0.models.Service import io.flow.build.{Application, BuildType, DownloadCache} import io.flow.registry.v0.{Client => RegistryClient} import play.api.libs.json.Json case class Controller() extends io.flow.build.Controller { /** * Allowlist of applications in the '...
flowcommerce/api-lint
src/main/scala/io/flow/proxy/Controller.scala
Scala
mit
4,878
package scala.macros //http://meta.plasm.us/posts/2013/07/12/vampire-methods-for-structural-types/ import scala.annotation.StaticAnnotation import scala.language.experimental.macros import scala.reflect.macros.Context class body(tree: Any) extends StaticAnnotation object StructuralMacros { def makeInstance = macr...
bdas/macros-scala
macro/src/main/scala/scala/macros/Vampire.scala
Scala
apache-2.0
709
package com.nabijaczleweli.minecrasmer.util trait IOreDictRegisterable { def registerOreDict(): Unit }
nabijaczleweli/ASMifier
src/main/scala/com/nabijaczleweli/minecrasmer/util/IOreDictRegisterable.scala
Scala
mit
105
package tanukkii.akkahttp.aws package dynamodb import akka.http.scaladsl.model.{HttpRequest, HttpResponse} import akka.stream.Materializer import com.amazonaws.services.dynamodbv2.model._ import scala.concurrent.Future trait DynamoDBClient extends AWSClient { import AWSClientConversions._ private val mu = Marsha...
TanUkkii007/akka-http-aws
akka-http-aws-dynamodb/src/main/scala/tanukkii/akkahttp/aws/dynamodb/DynamoDBClient.scala
Scala
mit
4,517
/* * * Copyright 2015. * * 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...
tudarmstadt-lt/JoBimTextCT
org.jobimtext.ct/src/main/scala/org/jobimtext/misc/JoinBySharedFeaturesCartesian.scala
Scala
apache-2.0
1,862
/* * 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 ...
ArvinDevel/onlineAggregationOnSparkV2
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/nullExpressions.scala
Scala
apache-2.0
8,346
package com.github.mdr.mash.ns.os import com.github.mdr.mash.completions.CompletionSpec import com.github.mdr.mash.functions.{ BoundParams, MashFunction, Parameter, ParameterModel } import com.github.mdr.mash.inference.TypedArguments import com.github.mdr.mash.os.linux.LinuxFileSystem import com.github.mdr.mash.runtim...
mdr/mash
src/main/scala/com/github/mdr/mash/ns/os/GlobFunction.scala
Scala
mit
1,063
package model import util.Read object Perceptron { def q15() = { val dataset = Read.fromFile("/hw1_15_train.dat") def iter(h: Hypothesis, i: Int, n: Int, no_error: Boolean): Int = if (n > 60) n else if (i == 0 && no_error && h.hasSeparated(dataset)) n else { val nextIndex = (i + 1)...
hsinhuang/codebase
ntumlone-002/Perceptron/src/main/scala/model/Perceptron.scala
Scala
gpl-2.0
602
package cz.kamenitxan.jakon.utils.security.oauth import java.sql.Connection import java.util import com.github.scribejava.apis.GoogleApi20 import com.github.scribejava.core.builder.ServiceBuilder import com.github.scribejava.core.model.{OAuth2AccessToken, OAuthRequest, Verb} import com.google.gson.Gson import cz.kame...
kamenitxan/Jakon
modules/backend/src/main/scala/cz/kamenitxan/jakon/utils/security/oauth/Google.scala
Scala
bsd-3-clause
3,103
/* * 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...
qiuxin2012/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/nn/HighwaySpec.scala
Scala
apache-2.0
3,960
import io.gatling.build.SonatypeReleasePlugin import BuildSettings._ import Bundle._ import ConfigFiles._ import CopyLogback._ import Dependencies._ import VersionFile._ import pl.project13.scala.sbt.JmhPlugin import sbt.Keys._ import sbt._ object GatlingBuild extends Build { /******************/ /** Root projec...
ryez/gatling
project/GatlingBuild.scala
Scala
apache-2.0
3,606
/*** ** _______ ** |__ __| reqT - a requriements engineering tool ** _ __ ___ __ _ | | (c) 2011-2014, Lund University ** | __|/ _ \\ / _ || | http://reqT.org ** | | | __/| (_| || | ** |_| \\___| \\__ ||_| ** | | *...
reqT/NanoZap
src/main/scala/NanoZap.scala
Scala
bsd-2-clause
1,004
import io.github.voidcontext.bricksetclient.api._ import io.github.voidcontext.bricksetclient.client.BricksetClient import scala.concurrent.{Await, Future} import scala.concurrent.duration._ import scala.util.{Success, Failure} object OwnedSets { val apikey = "apikey" val username = "username" val password = "...
voidcontext/scala-brickset-client
examples/ownedsets.scala
Scala
mit
850
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
jedesah/Quasar
marklogicIt/src/test/scala/quasar/physical/marklogic/fs/FormatAwareFileSystemSpec.scala
Scala
apache-2.0
11,280
package io.akkawarsjawa.api import spray.httpx.Json4sSupport import org.json4s._ object Json4sProtocol extends Json4sSupport { implicit def json4sFormats: Formats = DefaultFormats }
PiotrTrzpil/warsjawa-akka
src/main/scala/io/akkawarsjawa/api/Json4sProtocol.scala
Scala
apache-2.0
188
package org.jetbrains.plugins.scala.lang.macros import org.jetbrains.plugins.scala.DependencyManagerBase.RichStr import org.jetbrains.plugins.scala.base.libraryLoaders.{IvyManagedLoader, LibraryLoader} import org.jetbrains.plugins.scala.debugger.{ScalaVersion, Scala_2_12, Scala_2_13} import org.jetbrains.plugins.scala...
jastice/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/macros/ShapelessConformanceTest.scala
Scala
apache-2.0
2,499
package com.sksamuel.avro4s.decoders import com.sksamuel.avro4s.{Avro4sDecodingException, Decoder} import org.apache.avro.Schema import java.nio.ByteBuffer trait ByteDecoders: given Decoder[Array[Byte]] = ArrayByteDecoder given Decoder[ByteBuffer] = ByteBufferDecoder given Decoder[List[Byte]] = ArrayByteDecode...
sksamuel/avro4s
avro4s-core/src/main/scala/com/sksamuel/avro4s/decoders/bytes.scala
Scala
apache-2.0
1,984
/*********************************************************************** * Copyright (c) 2013-2018 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...
jahhulbert-ccri/geomesa
geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geohash/BoundingBoxGeoHashIterator.scala
Scala
apache-2.0
2,490
package org.http4s import org.http4s.headers._ class HeadersSpec extends Http4sSpec { val clength = `Content-Length`.unsafeFromLong(10) val raw = Header.Raw("raw-header".ci, "Raw value") val base = Headers(clength.toRaw, raw) "Headers" should { "Not find a header that isn't there" in { base.get(`...
reactormonk/http4s
tests/src/test/scala/org/http4s/HeadersSpec.scala
Scala
apache-2.0
3,520
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.linker.standard import or...
scala-js/scala-js
linker/shared/src/main/scala/org/scalajs/linker/standard/CommonPhaseConfig.scala
Scala
apache-2.0
1,710
import org.specs._ import com.redis._ import com.redis.operations._ import org.specs.mock.Mockito import org.mockito.Mock._ import org.mockito.Mockito._ import org.mockito.Mockito.doNothing class RedisTestClient(val connection: Connection) extends Operations with ListOperations with SetOperations with NodeOperations ...
baroquebobcat/pubsubhubbub-rb
vendor/redis-1.02/client-libraries/scala/src/test/scala/com/redis/helpers/RedisClientTestHelper.scala
Scala
apache-2.0
443
/* * 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 ...
tophua/spark1.52
core/src/main/scala/org/apache/spark/launcher/SparkSubmitArgumentsParser.scala
Scala
apache-2.0
1,323
/* * Copyright 2016-2018 SN127.fi * * 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...
jaa127/tackler
core/src/main/scala/fi/sn127/tackler/core/Balance.scala
Scala
apache-2.0
6,305
package com.seanshubin.scala.training.core trait QueryParser { def parse(queryString: String): Query }
SeanShubin/scala-training
core/src/main/scala/com/seanshubin/scala/training/core/QueryParser.scala
Scala
unlicense
106
/* sbt -- Simple Build Tool * Copyright 2009, 2010 Mikko Peltonen, Stuart Roebuck, Mark Harrah */ package sbt import BasicCommandStrings.ClearOnFailure import State.FailureWall import annotation.tailrec import java.io.File import Types.const trait Watched { /** The files watched when an action is run with a prec...
jasonchaffee/sbt
main/command/src/main/scala/sbt/Watched.scala
Scala
bsd-3-clause
3,578
package scorex.network.message import java.net.{InetAddress, InetSocketAddress} import java.util import com.google.common.primitives.{Bytes, Ints} import scorex.block.Block import scorex.consensus.ConsensusModule import scorex.crypto.EllipticCurveImpl import scorex.crypto.singing.SigningFunctions import scorex.crypto...
ScorexProject/Scorex-Lagonaki
scorex-basics/src/main/scala/scorex/network/message/BasicMessagesRepo.scala
Scala
cc0-1.0
5,115
package org.jetbrains.jps.incremental import _root_.java.io._ import _root_.java.net.URL import _root_.java.util.Properties /** * @author Pavel Fatin */ package object scala { type Closeable = { def close() } def using[A <: Closeable, B](resource: A)(block: A => B): B = { try { block(resource) ...
consulo/consulo-scala
compiler-settings/src/org/jetbrains/jps/incremental/scala/package.scala
Scala
apache-2.0
1,478
package services import java.util.UUID import akka.actor.{ActorRef, ActorSystem} import akka.util.Timeout import controllers.ShiftPersistence import drt.shared.CrunchApi._ import drt.shared.KeyCloakApi.{KeyCloakGroup, KeyCloakUser} import drt.shared.Terminals.Terminal import drt.shared._ import drt.shared.redlist.RedL...
UKHomeOffice/drt-scalajs-spa-exploration
server/src/main/scala/services/ApiService.scala
Scala
apache-2.0
3,120
package io.getquill.h2 import io.getquill.PeopleMonixSpec import org.scalatest.Matchers._ class PeopleMonixJdbcSpec extends PeopleMonixSpec { val context = testContext import testContext._ override def beforeAll = { testContext.transaction { for { _ <- testContext.run(query[Couple].delete) ...
mentegy/quill
quill-jdbc-monix/src/test/scala/io/getquill/h2/PeopleMonixJdbcSpec.scala
Scala
apache-2.0
2,365
package model.ui import backend.data.mongodb.service.UserDataServiceMongo import backend.data.service.UserDataService import backend.data.mongodb.service.TagDataServiceMongo import backend.data.service.TagDataService import play.api.Play import model.blog.PostEnriched /** * Meta tags which are used to fill the meta...
ExNexu/scablo
app/model/ui/MetaTags.scala
Scala
bsd-2-clause
1,758
for index in 1...5 { println("\\(index) times 5 is \\(index * 5)") } // 1 times 5 is 5 // 2 times 5 is 10 // 3 times 5 is 15 // 4 times 5 is 20 // 5 times 5 is 25
leverich/swiftislikescala
comparisons/basics/inclusive_range_operator/swift.scala
Scala
mit
165
package manager import connectors.K8055 import model._ import play.api.Logger import scala.concurrent.ExecutionContext.Implicits.global object SequenceExecutionManager extends SequenceExecutionManager{ override val sequenceManager = SequenceManager override val timer = Timer } trait SequenceExecutionManager { ...
bullimog/k8055-sequencer
app/manager/SequenceExecutionManager.scala
Scala
apache-2.0
3,174
/** * ***************************************************************************** * Copyright 2014 Katja Hahn * * 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...
katjahahn/PortEx
src/main/java/com/github/katjahahn/parser/sections/idata/DelayLoadDirectoryEntry.scala
Scala
apache-2.0
6,528