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 tu.providers import tu.coreservice.utilities.Configurator import java.net.{URLConnection, InetSocketAddress, URL, URLEncoder} import java.io.{InputStreamReader, BufferedReader} /** * Provider for WordNetAnnotator. * @author alex toschev * Date: 6/25/12 * Time: 7:00 PM */ /** * Sends */...
tu-team/2
coreservice.annotator/src/main/scala/tu/providers/WordnetAnnotatorProvider.scala
Scala
gpl-3.0
2,653
/* * 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
core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala
Scala
apache-2.0
42,570
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
lxsmnv/spark
examples/src/main/scala/org/apache/spark/examples/sql/SparkSQLExample.scala
Scala
apache-2.0
8,713
package scalachessjs import scala.scalajs.js.JSApp import scala.scalajs.js import org.scalajs.dom import js.Dynamic.{ /* global => g, newInstance => jsnew, */ literal => jsobj } import js.JSConverters._ import js.annotation._ import chess.{ Success, Failure, Game, Pos, Role, PromotableRole, Replay, Status, MoveOrDrop...
veloce/scalachessjs
src/main/scala/scalachessjs/Main.scala
Scala
mit
13,204
package com.rasterfoundry.database import com.rasterfoundry.common.Generators.Implicits._ import com.rasterfoundry.datamodel._ import doobie.implicits._ import org.scalacheck.Prop.forAll import org.scalatest.funsuite.AnyFunSuite import org.scalatest.matchers.should.Matchers import org.scalatestplus.scalacheck.Checker...
raster-foundry/raster-foundry
app-backend/db/src/test/scala/com/azavea/rf/database/UserIntercomConversationDaoSpec.scala
Scala
apache-2.0
1,742
package colang.backend import colang.ast.parsed.RootNamespace /** * Represents a compiler component that transforms intermediate code representation (after semantic analysis) to * the target representation. */ trait Backend { /** * Perform the transformation. * @param rootNamespace populated root nam...
merkispavel/colang
src/main/scala/colang/backend/Backend.scala
Scala
mit
401
//: ---------------------------------------------------------------------------- //: Copyright (C) 2015 Verizon. 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 Licen...
neigor/funnel
agent/src/multi-jvm/scala/Push+Pull+Pub+Sub.scala
Scala
apache-2.0
2,089
/* * 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 ...
dbtsai/spark
examples/src/main/scala/org/apache/spark/examples/ml/FValueSelectorExample.scala
Scala
apache-2.0
2,240
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ahnqirage/spark
core/src/main/scala/org/apache/spark/status/AppStatusListener.scala
Scala
apache-2.0
43,021
package org.jetbrains.plugins.scala.testingSupport.scalatest.generators import org.jetbrains.plugins.scala.testingSupport.scalatest.ScalaTestTestCase trait WordSpecGenerator extends ScalaTestTestCase { val wordSpecClassName = "WordSpecTest" val wordSpecFileName: String = wordSpecClassName + ".scala" addSourc...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/testingSupport/scalatest/generators/WordSpecGenerator.scala
Scala
apache-2.0
1,041
package ru.maizy.cheesecake.server /** * Copyright (c) Nikita Kovaliov, maizy.ru, 2016 * See LICENSE.txt for details. */ import java.io.File case class ServerAppOptions( port: Int = ServerAppOptions.DEFAULT_PORT, host: String = ServerAppOptions.DEFAULT_HOST, config: Option[File] = None ) object Serve...
maizy/cheesecake
server/src/main/scala/ru/maizy/cheesecake/server/Options.scala
Scala
apache-2.0
1,394
package com.twitter.finagle.partitioning import com.twitter.finagle.Addr /** * Cache node metadata consumed by clients that implement sharding (see * [[com.twitter.finagle.memcached.KetamaPartitionedClient]]). * * This class and its companion object are private because they are only an implementation detail for ...
luciferous/finagle
finagle-partitioning/src/main/scala/com/twitter/finagle/partitioning/CacheNodeMetadata.scala
Scala
apache-2.0
2,062
/* * 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 ...
mdespriee/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
Scala
apache-2.0
29,544
/* sbt -- Simple Build Tool * Copyright 2010 Mark Harrah */ package sbt import std._ import xsbt.api.{ Discovered, Discovery } import inc.Analysis import TaskExtra._ import Types._ import xsbti.api.Definition import ConcurrentRestrictions.Tag import testing.{ AnnotatedFingerprint, Fingerprint, Framework, SubclassF...
niktrop/sbt
main/actions/src/main/scala/sbt/Tests.scala
Scala
bsd-3-clause
14,782
package debox import scala.reflect.ClassTag import scala.{specialized => sp} import spire.algebra._ import spire.math.QuickSort import spire.syntax.all._ /** * Buffer is a mutable, indexed sequence of values. * * Buffer wraps an underlying array, which provides constant-time * lookups, updates, and length checks...
non/debox
src/main/scala/debox/Buffer.scala
Scala
mit
24,556
package com.sksamuel.elastic4s import org.elasticsearch.script.Script import org.elasticsearch.script.ScriptService.{ScriptType => ESScriptType} import scala.language.implicitConversions trait ScriptDsl { def script(script: String): ScriptDefinition = ScriptDefinition(script) def script(name: String, script: Str...
muuki88/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/ScriptDsl.scala
Scala
apache-2.0
1,548
package io.github.junheng.akka.hbase.protocol object HScannerProtocol { case class HNext(step: Int) }
junheng/akka-hbase
protocol/src/main/scala/io/github/junheng/akka/hbase/protocol/HScannerProtocol.scala
Scala
mit
105
/* * NodeImpl.scala * (LucreEvent) * * Copyright (c) 2011-2015 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Lesser General Public License v2.1+ * * * For further information, please contact Hanns Holger Rutz at * contact@sciss.de */ package de.sciss.lucre packag...
Sciss/LucreEvent
expr/src/main/scala/de/sciss/lucre/expr/impl/NodeImpl.scala
Scala
lgpl-2.1
754
/* * 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 ...
darionyaphet/spark
core/src/test/scala/org/apache/spark/executor/CoarseGrainedExecutorBackendSuite.scala
Scala
apache-2.0
15,461
package net.machinemuse.numina.network import java.io.{DataInputStream, DataOutputStream} import net.minecraft.item.ItemStack import net.minecraft.nbt.CompressedStreamTools /** * Author: MachineMuse (Claire Semple) * Created: 1:15 AM, 09/05/13 */ object RichInputStream { implicit def toRichStream(in: DataInputS...
MachineMuse/Numina
src/main/scala/net/machinemuse/numina/network/RichIOStreams.scala
Scala
bsd-2-clause
1,415
/* * 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 ...
vgmartinez/incubator-zeppelin
zeppelin-display/src/test/scala/org/apache/zeppelin/display/angular/AbstractAngularModelTest.scala
Scala
apache-2.0
3,439
package com.arcusys.valamis.slide.model object SlideConstants { val PlainTextIdPrefix = "t_" val QuestionIdPrefix = "q_" }
arcusys/Valamis
valamis-slide/src/main/scala/com/arcusys/valamis/slide/model/SlideConstants.scala
Scala
gpl-3.0
129
package lang.akka.first import akka.actor.{ActorSystem, Props} import akka.dispatch.MessageDispatcher object FirstApp extends App { println("------------------ hello actor ---------------------------------") val system = ActorSystem("myActorSystem") private val lookup: MessageDispatcher = system.dispatchers....
congdepeng/scalab
src/main/scala/lang/akka/first/FirstApp.scala
Scala
apache-2.0
573
package com.socrata.soql.functions import com.socrata.soql.types._ object SoQLTypeClasses { val Ordered = Set[SoQLType]( SoQLText, SoQLNumber, SoQLDouble, SoQLMoney, SoQLBoolean, SoQLFixedTimestamp, SoQLFloatingTimestamp, SoQLDate, SoQLTime, SoQLID, SoQLVersion, SoQLU...
socrata-platform/soql-reference
soql-stdlib/src/main/scala/com/socrata/soql/functions/SoQLTypeClasses.scala
Scala
apache-2.0
808
package cortex.io import java.io._ import java.net.{InetSocketAddress, ServerSocket, Socket} import cortex.util.log import scala.concurrent.ExecutionContext.global import scala.concurrent.{ExecutionContext, Future} /** * Essentially our server, this manages the input and output * to and fro the server. */ abs...
jsflax/cortex
src/main/scala/cortex/io/IOManager.scala
Scala
mit
1,656
/* * 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/test/scala/org/apache/spark/carbondata/TableStatusBackupTest.scala
Scala
apache-2.0
2,928
/* * 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 ...
javalovelinux/SparkGroovyScript
sql/core/src/test/scala/org/apache/spark/sql/execution/GlobalTempViewSuite.scala
Scala
apache-2.0
6,535
import sbt._ import sbt.Keys._ import net.virtualvoid.sbt.graph.Plugin._ object ProjectBuild extends Build { lazy val project = Project( id = "root", base = file("."), settings = Project.defaultSettings ++ graphSettings ++ Seq( name := "spark-kafka", organization := "com.tresata", versi...
pronix/spark-kafka
project/Build.scala
Scala
apache-2.0
2,499
/* Copyright 2016-17, Hasso-Plattner-Institut fuer Softwaresystemtechnik GmbH 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 applicab...
bpn1/ingestion
src/main/scala/de/hpi/ingestion/datamerge/MasterUpdate.scala
Scala
apache-2.0
3,905
package com.twitter.gizzard.scheduler import scala.collection.mutable import com.twitter.gizzard.shards.{ShardBlackHoleException, ShardOfflineException} /** * A wrapper Job for a series of smaller jobs that should be executed together. It will attempt * to execute all the smaller jobs, regardless of individual fail...
kmiku7/gizzard
src/main/scala/com/twitter/gizzard/scheduler/NestedJob.scala
Scala
apache-2.0
2,031
package com.atomist.rug.kind.pom import com.atomist.rug.kind.build.{BuildViewMutatingFunctions, BuildViewNonMutatingFunctions} import com.atomist.rug.kind.core.ProjectMutableView import com.atomist.rug.kind.xml.XmlMutableView import com.atomist.rug.spi.{ExportFunction, ExportFunctionParameterDescription, TerminalView}...
atomist/rug
src/main/scala/com/atomist/rug/kind/pom/PomMutableView.scala
Scala
gpl-3.0
26,909
package com.atomist.rug.runtime import com.atomist.param.Tag /** * For things common to _all_ Rugs */ trait Rug { def name: String def description: String def tags: Seq[Tag] }
atomist/rug
src/main/scala/com/atomist/rug/runtime/Rug.scala
Scala
gpl-3.0
191
package com.scalableminds.util.requestlogging import com.typesafe.scalalogging.LazyLogging import play.api.http.{HttpEntity, Status} import play.api.mvc.{Request, Result} import scala.concurrent.duration.FiniteDuration import scala.concurrent.{ExecutionContext, Future} import scala.concurrent.duration._ trait Abstra...
scalableminds/webknossos
util/src/main/scala/com/scalableminds/util/requestlogging/RequestLogging.scala
Scala
agpl-3.0
2,502
package streaming import org.apache.spark.streaming.{Seconds, StreamingContext} import org.apache.spark.{SparkContext, SparkConf} object Windowing { def main (args: Array[String]) { val conf = new SparkConf().setAppName("Windowing").setMaster("local[4]") val sc = new SparkContext(conf) // streams will...
chocolateBlack/LearningSpark
src/main/scala/streaming/Windowing.scala
Scala
mit
1,239
/* * 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 ...
Dax1n/spark-core
core/src/main/scala/org/apache/spark/rdd/UnionRDD.scala
Scala
apache-2.0
3,298
package com.azakordonets.entities import com.azakordonets.enums.DateFormat import org.joda.time.{DateTime, DateTimeZone} class RelativeDate(private val initialDate: DateTime = DateTime.now()) { private var date = initialDate def this(timeZone: DateTimeZone) { this(DateTime.now(timeZone)) } def tomorrow...
azakordonets/Utils
src/main/scala/com/azakordonets/entities/RelativeDate.scala
Scala
apache-2.0
2,350
package at.logic.gapt.testing import at.logic.gapt.expr._ import at.logic.gapt.proofs.expansion.InstanceTermEncoding import at.logic.gapt.proofs.loadExpansionProof import scala.App import ammonite.ops._ object dumpTermset extends App { val Array( inputFileName, outputFileName ) = args val inputPath = Path( input...
gebner/gapt
testing/src/main/scala/termsets.scala
Scala
gpl-3.0
1,335
/* * 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 ...
brad-kaiser/spark
sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala
Scala
apache-2.0
8,363
package ru.maizy.ambient7.core.config.options /** * Copyright (c) Nikita Kovaliov, maizy.ru, 2016-2017 * See LICENSE.txt for details. */ import ru.maizy.ambient7.core.config.Defaults import ru.maizy.influxdbclient.InfluxDbConnectionSettings case class InfluxDbOptions( database: Option[String] = None, bas...
maizy/ambient7
core/src/main/scala/ru/maizy/ambient7/core/config/options/InfluxDbOptions.scala
Scala
apache-2.0
1,018
/** * Copyright (c) 2014-2016 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 ...
TimothyKlim/snowplow
4-storage/kafka-elasticsearch-sink/src/main/scala/com/snowplowanalytics/snowplow/storage/utils/Tracking.scala
Scala
apache-2.0
4,723
/* * Copyright (C) 2013 Alcatel-Lucent. * * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * Licensed to you 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 cop...
molecule-labs/molecule
molecule-io-examples/src/main/scala/molecule/examples/io/stopwatch/SwingExecutor.scala
Scala
apache-2.0
967
package org.scaladebugger.api.profiles.java.info import com.sun.jdi._ import org.scaladebugger.api.lowlevel.{InvokeNonVirtualArgument, InvokeSingleThreadedArgument, JDIArgument} import org.scaladebugger.api.profiles.traits.info._ import org.scaladebugger.api.virtualmachines.ScalaVirtualMachine import org.scaladebugger...
ensime/scala-debugger
scala-debugger-api/src/test/scala/org/scaladebugger/api/profiles/java/info/JavaObjectInfoSpec.scala
Scala
apache-2.0
15,640
package org.scalajars.web import org.scalajars.core._ package object controllers { trait RedisStore extends RedisStoreImpl { def namespace = "scalajars" } object Browser extends Browser with RedisStore object Publisher extends Publisher with Users with RedisStore object Users extends Users with RedisS...
teamon/scalajars.org
app/WebApp.scala
Scala
mit
328
package org.broadinstitute.clio.server.webservice import java.time.OffsetDateTime object MockRejectionDirectives extends RejectionDirectives(OffsetDateTime.MIN)
broadinstitute/clio
clio-server/src/test/scala/org/broadinstitute/clio/server/webservice/MockRejectionDirectives.scala
Scala
bsd-3-clause
163
import java.text.SimpleDateFormat import java.util.Date import com.typesafe.sbt.SbtScalariform._ import net.virtualvoid.sbt.graph.Plugin._ import sbt.Keys._ import sbt._ import sbtassembly.Plugin.AssemblyKeys._ import sbtassembly.Plugin._ import sbtbuildinfo.Plugin._ object Resolvers { val codebragResolvers = Seq( ...
frodejohansen/codebrag
project/Build.scala
Scala
agpl-3.0
11,092
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.it.http import java.io.ByteArrayInputStream import java.util.Arrays import akka.NotUsed import akka.stream.javadsl.Source import com.fasterxml.jackson.databind.JsonNode import play.api.Application import play.api.inject.guice.Gu...
ktoso/playframework
framework/src/play-integration-test/src/test/scala/play/it/http/JavaResultsHandlingSpec.scala
Scala
apache-2.0
7,789
/* * 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 ...
chenc10/Spark-PAF
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/JoinedRow.scala
Scala
apache-2.0
5,054
package p04various object Def { val eol = System.lineSeparator }
vkubicki/Sernel
src/main/scala/p04various/00 - Def.scala
Scala
bsd-3-clause
71
package com.codahale.jerkson import java.io.IOException import org.codehaus.jackson.map.JsonMappingException import org.codehaus.jackson.{JsonParseException, JsonProcessingException} object ParsingException { def apply(cause: JsonProcessingException): ParsingException = { val message = cause match { case ...
cphylabs/jerkson-old
src/main/scala/com/codahale/jerkson/ParsingException.scala
Scala
mit
813
/* * 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-rx/src/main/scala/wvlet/airframe/rx/Ticker.scala
Scala
apache-2.0
2,250
package mm4s.test import java.util.UUID import akka.actor.ActorSystem import akka.stream.ActorMaterializer import akka.stream.scaladsl.Sink import akka.util.Timeout import mm4s.api.UserModels.{LoggedIn, LoginByUsername} import mm4s.api.{Streams, Users} import org.scalatest.Tag import scala.concurrent.Future import s...
jw3/mm4s
api/src/test/scala/mm4s/test/IntegrationTest.scala
Scala
apache-2.0
1,034
package picasso.frontend.compilerPlugin import picasso.utils.{LogDebug, Logger, IO} object PluginSuiteCommon { //add the compiler to the CP val configFile = "frontend/compilerPlugin/build.sbt" //build.scala.versions=scalaVersion lazy val scalaVersion = { val values = IO.readTextFile(configFile) val p...
dzufferey/picasso
frontend/compilerPlugin/src/test/scala/picasso/frontend/compilerPlugin/PluginSuiteCommon.scala
Scala
bsd-2-clause
2,399
package org.rogach.scallop import org.rogach.scallop.exceptions.GenericScallopException import scala.util.Try import scala.concurrent.duration.{Duration, FiniteDuration} /** This trait contains various predefined converters for common use-cases. * org.rogach.scallop package object inherits from this trait, thus yo...
scallop/scallop
src/main/scala/org.rogach.scallop/DefaultConverters.scala
Scala
mit
8,099
// see the comments for macroExpand.onDelayed for an explanation of what's tested here object Test extends App { case class Foo(i: Int, s: String, b: Boolean) def foo[C, L](c: C)(implicit iso: Iso[C, L]): L = iso.to(c) { val equiv = foo(Foo(23, "foo", true)) def typed[T](t: => T) {} typed[(Int, Strin...
lampepfl/dotty
tests/disabled/macro/run/macro-whitebox-fundep-materialization/Test_2.scala
Scala
apache-2.0
364
package streams import common._ /** * This component implements a parser to define terrains from a * graphical ASCII representation. * * When mixing in that component, a level can be defined by * defining the field `level` in the following form: * * val level = * """------ * |--ST-- * |--oo-- * ...
yurii-khomenko/fpScalaSpec
c2w2streams/src/main/scala/streams/StringParserTerrain.scala
Scala
gpl-3.0
2,555
package controllers import com.google.inject.Inject import java.io.ByteArrayInputStream import models.BusinessDetailsModel import models.CacheKeyPrefix import models.CaptureCertificateDetailsFormModel import models.CaptureCertificateDetailsModel import models.ConfirmFormModel import models.FulfilModel import models.Su...
dvla/vrm-assign-online
app/controllers/Success.scala
Scala
mit
4,963
/* * Copyright (c) 2014-2015 by its authors. Some rights reserved. * See the project homepage at: http://www.monifu.org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://...
virtualirfan/monifu
monifu/shared/src/test/scala/monifu/reactive/observables/RefCountObservableSuite.scala
Scala
apache-2.0
3,988
/* * 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 ...
pgandhi999/spark
core/src/main/scala/org/apache/spark/deploy/master/ui/MasterWebUI.scala
Scala
apache-2.0
2,630
/* * 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/ct600e/v3/E10.scala
Scala
apache-2.0
878
package rml.args.arg.function case class FunctionOrigin(origin: String) object FunctionOrigin { def apply(clazz: Class[_]): FunctionOrigin = FunctionOrigin(clazz.getName.toString) implicit val origin = FunctionOrigin("No origin specified") }
rml/scala_args
src/main/scala/rml/args/arg/function/FunctionOrigin.scala
Scala
gpl-3.0
251
package scala.lms package epfl package test2 import common._ import test1._ import reflect.SourceContext import java.io.PrintWriter trait Power1 { this: Arith => def power(b: Rep[Double], x: Int): Rep[Double] = if (x == 0) 1.0 else b * power(b, x - 1) } trait Power2 { this: Arith => def power(b: Rep[Double...
scalan/virtualization-lms-core
test-src/epfl/test2-fft/TestPower.scala
Scala
bsd-3-clause
3,949
package org.hibernate.cache.rediscala.regions import java.util.Properties import org.hibernate.cache.rediscala.client.RedisCache import org.hibernate.cache.rediscala.strategy.RedisAccessStrategyFactory import org.hibernate.cache.spi.access.{AccessType, EntityRegionAccessStrategy} import org.hibernate.cache.spi.{Cache...
debop/debop4s
hibernate-rediscala/src/main/scala/org/hibernate/cache/rediscala/regions/RedisEntityRegion.scala
Scala
apache-2.0
1,492
package pl.newicom.dddd.messaging.event import org.joda.time.DateTime import pl.newicom.dddd.aggregate.DomainEvent import pl.newicom.dddd.utils.UUIDSupport._ case class DomainEventMessage( snapshotId: AggregateSnapshotId, override val event: DomainEvent, override val id: String = uuid, override val ti...
ahjohannessen/akka-ddd
akka-ddd-messaging/src/main/scala/pl/newicom/dddd/messaging/event/DomainEventMessage.scala
Scala
mit
623
/* * 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 ...
map222/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/hints.scala
Scala
apache-2.0
2,365
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // Licence: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.core import akka.actor._ import akka.event.LoggingReceive import org.ensime.api._ import org.ensime.indexer.DatabaseService.FqnSymbol import org.ensime.indexer.{ EnsimeV...
j-mckitrick/ensime-sbt
src/sbt-test/ensime-sbt/ensime-server/core/src/main/scala/org/ensime/core/Indexer.scala
Scala
apache-2.0
2,163
package utils import org.apache.http.client.methods._ import org.apache.http.entity.{ContentType, StringEntity} import org.apache.http.impl.client.{CloseableHttpClient, HttpClients} object HttpClientService extends Serializable { def createNewClient(): CloseableHttpClient = { val builder = HttpClients.custom()...
amollenkopf/dcos-iot-demo
map-webapp/app/Utils/HttpClientService.scala
Scala
apache-2.0
1,402
package examples.demo import java.awt.Dimension import examples.demo.ui.{Circle, Rectangle, ShapesPanel} import rescala.default._ import examples.demo.ui.Shape import scala.swing.{MainFrame, SimpleSwingApplication, UIElement} /** This is a static display of two circles and a rectangle. * It demonstrates, how to ...
guidosalva/REScala
Code/Examples/examples/src/main/scala/examples/demo/ASwingFrame.scala
Scala
apache-2.0
1,222
package build import java.nio.charset.StandardCharsets import java.nio.file._ import com.google.common.jimfs.Jimfs import org.scalajs.jsenv._ import org.scalajs.jsenv.nodejs._ final class NodeJSEnvForcePolyfills(config: NodeJSEnv.Config) extends JSEnv { def this() = this(NodeJSEnv.Config()) val name: String = ...
SebsLittleHelpers/scala-js
project/NodeJSEnvForcePolyfills.scala
Scala
apache-2.0
1,903
/** * Copyright 2013, 2016 Gianluca Amato <gianluca.amato@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, eith...
amato-gianluca/Jandom
core/src/main/scala/it/unich/jandom/targets/Parameters.scala
Scala
lgpl-3.0
4,774
package io.fsq.twofishes.country.test import io.fsq.specs2.FSSpecificationWithJUnit import io.fsq.twofishes.country.{CountryInfo, CountryUtils} import org.specs2.matcher.MatchersImplicits // TODO: See if there's a way to clean up the extra noise this sends to stderr. class CountryUtilsSpec extends FSSpecificationWith...
foursquare/fsqio
test/jvm/io/fsq/twofishes/country/test/CountryInfoTest.scala
Scala
apache-2.0
1,955
package com.markfeeney.circlet /** * Signals a request is fully processed and response fully sent. * In a perfect world this would be returned only by server adapters * when they're done sending the response. But it's useful any time * you want to see the result of a handler executing (e.g. in tests). */ object ...
overthink/circlet
src/main/scala/com/markfeeney/circlet/Sent.scala
Scala
mit
325
/** * 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...
ollie314/kafka
core/src/test/scala/unit/kafka/security/auth/ZkAuthorizationTest.scala
Scala
apache-2.0
10,477
/* * Copyright 2014–2020 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...
slamdata/quasar
impl/src/main/scala/quasar/impl/datasources/DefaultDatasources.scala
Scala
apache-2.0
10,568
package novo import al.strategies._ import ml.Pattern import ml.classifiers.Learner import scala.io.Source trait Args extends App { private lazy val argsb = args filter (x => x.endsWith("=y") || x.endsWith("=n")) private lazy val argsn = args filter (x => x.split('=').last.filter(x => x != '.' && x != '-').foral...
active-learning/active-learning-scala
src/main/scala/novo/Args.scala
Scala
gpl-2.0
1,637
package ch.fhnw.ima.saav.model import ch.fhnw.ima.saav._ import ch.fhnw.ima.saav.model.domain.{IndicatorId, SubCriteriaId} object weight { sealed trait Weight final case class Quality(weight: Double) extends Weight case object Profile extends Weight final case class Weights(subCriteriaWeights: Map[SubCrit...
fhnw-saav/saav
src/main/scala/ch/fhnw/ima/saav/model/weight.scala
Scala
mit
1,225
/** * Copyright 2015, 2016 Gianluca Amato <gianluca.amato@unich.it> * * This file is part of ScalaFix. * ScalaFix 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...
jandom-devel/ScalaFix
core/src/main/scala/it/unich/scalafix/finite/DFOrdering.scala
Scala
gpl-3.0
4,167
/* * Copyright (c) 2014 Paul Bernard * * 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...
quantintel/spectrum
financial/src/main/scala/org/quantintel/ql/currencies/Currency.scala
Scala
apache-2.0
5,489
package com.cloudray.scalapress.search import com.cloudray.scalapress.framework.{ScalapressContext, MenuProvider, MenuItem} /** @author Stephen Samuel */ class SearchMenuProvider extends MenuProvider { def menu(context: ScalapressContext): (String, Seq[MenuItem]) = { ("Search", Seq( MenuItem("Sea...
vidyacraghav/scalapress
src/main/scala/com/cloudray/scalapress/search/SearchMenuProvider.scala
Scala
apache-2.0
615
/** * 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...
wangcy6/storm_app
frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/test/scala/unit/kafka/common/ConfigTest.scala
Scala
apache-2.0
2,934
package forimpatient.chapter02 /** * Created by Iryna Kharaborkina on 7/25/16. * * Solution to the Chapter 02 Exercise 07 'Scala for the Impatient' by Horstmann C.S. * * Without loop compute the product of the Unicode codes of all letters in a string. For * example, the product of the characters in "Hello...
Kiryna/Scala-for-the-Impatient
src/forimpatient/chapter02/Exercise07.scala
Scala
apache-2.0
542
package assets import java.text.SimpleDateFormat import java.util.TimeZone import com.github.nscala_time.time.Imports._ import play.utils.UriEncoding /** * Created by oscar on 12/17/14. */ sealed trait Segment { def contains (s: Segment): Boolean def contains (p: Long): Boolean def intersects (s: Segme...
wigahluk/funes
app/assets/Segment.scala
Scala
apache-2.0
3,019
package io.flow.lint import io.apibuilder.spec.v0.models._ import org.scalatest.funspec.AnyFunSpec import org.scalatest.matchers.should.Matchers class UpsertedDeletedEventModelsSpec extends AnyFunSpec with Matchers { private[this] val linter = linters.UpsertedDeletedEventModels def buildService(modelName: Strin...
flowcommerce/api-lint
src/test/scala/io/flow/lint/UpsertedDeletedEventModelsSpec.scala
Scala
mit
2,473
/* * Copyright 2013 Maurício Linhares * * Maurício Linhares licenses this file to you 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 ...
dripower/postgresql-async
db-async-common/src/main/scala/com/github/mauricio/async/db/general/MutableResultSet.scala
Scala
apache-2.0
1,592
/* * 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/internal/SessionState.scala
Scala
apache-2.0
7,909
package BIDMat object JPlotting { import org.jfree.chart._ import org.jfree.chart.plot._ import org.jfree.data.xy._ import org.jfree.data.statistics._ import org.jfree.chart.renderer.xy._ import org.jfree.util._ import java.awt.image.BufferedImage var ifigure:Int = 0; val marksmat = Array("p...
phlip9/BIDMat
src/main/scala/BIDMat/JPlotting.scala
Scala
bsd-3-clause
5,973
package xitrum.util import java.io.File import scala.collection.mutable.{Map => MMap} import sclasner.Discoverer /** * This utility is useful for hot reloading .class files in defined directories * during development. */ class ClassFileLoader extends ClassLoader { // Directories to search for .class files, examp...
caiiiycuk/xitrum
src/main/scala/xitrum/util/ClassFileLoader.scala
Scala
mit
1,602
object HelloWorld{ var myVar : Int = 10 //变量 var myVar1 = 10 val myvar : String = "Foo" //常量 val myvar1 = "Foo" //可省略类型, 但必须有初始化的值 def main(args:Array[String]){ println("Hello, World!"); } }
PengLiangWang/Scala
base_test/HelloWorld.scala
Scala
gpl-3.0
274
/* * Copyright (c) 2002-2018 "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 General Public License as published by * the Free Software Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/main/scala/org/neo4j/cypher/internal/compiler/v2_3/pipes/NodeByLabelScanPipe.scala
Scala
apache-2.0
2,520
package com.rasterfoundry.datamodel import io.circe.generic.JsonCodec /** * Case class for paginated results * * @param count number of total results available * @param hasPrevious whether or not previous results are available * @param hasNext whether or not additional results are available * @param page ...
raster-foundry/raster-foundry
app-backend/datamodel/src/main/scala/PaginatedResponse.scala
Scala
apache-2.0
619
package org.workcraft.swing import javax.swing.{Timer => JTimer} import Swing._ class Timer(btn : JTimer) extends Component { def stop : Swing[Unit] = unsafeToSwing(btn.stop) def setDelay(delay : Int) = unsafeToSwing(btn.setDelay(delay)) def setInitialDelay(delay : Int) = unsafeToSwing(btn.setInitialDelay(dela...
tuura/workcraft-2.2
ScalaGraphEditorUtil/src/main/scala/org/workcraft/swing/Timer.scala
Scala
gpl-3.0
367
package object simplez { type Id[A] = A type Reader[A, B] = Kleisli[Id, A, B] type ~>[F[_], G[_]] = NaturalTransformation[F, G] type ~~>[F[_[_]], G[_[_]]] = NaturalTransformation2[F, G] object id { implicit val idInstance = new Monad[Id] { def pure[A](a: => A): Id[A] = a def flatMap[A, ...
inoio/simplez
main/src/main/scala/simplez/package.scala
Scala
bsd-2-clause
2,756
package skabele.screenshare.actors import akka.actor._ import akka.testkit._ import org.scalatest._ import WsData._ import WsId._ import InternalMessage._ import scala.concurrent.duration._ class ChatActorSpec extends TestKit(ActorSystem("ChatActorSpec")) with ImplicitSender with WordSpecLike with Matchers with Be...
skabele/simple-screen-share
test/skabele/screenshare/actors/ChatActorSpec.scala
Scala
mit
1,401
import com.github.jeanadrien.gatling.mqtt.Predef._ import io.gatling.core.Predef._ import scala.concurrent.duration._ /** * */ class MqttScenarioExample extends Simulation { val mqttConf = mqtt.host("tcp://localhost:1883") val scn = scenario("MQTT Test") .exec(connect) .exec(subscribe("m...
jeanadrien/gatling-mqtt-protocol
src/test/scala/MqttScenarioExample.scala
Scala
apache-2.0
531
package net.opentsdb.client.netty import org.jboss.netty.channel._ import org.slf4j.{LoggerFactory, Logger} class TsdbClientHandler extends SimpleChannelUpstreamHandler { private final val logger: Logger = LoggerFactory.getLogger(classOf[TsdbClient]) override def handleUpstream(ctx: ChannelHandlerContext, e: C...
sebobr/dontpaytheferryman
opentsdb-kafka/opentsdb-client/src/main/scala/net/opentsdb/client/netty/TsdbClientHandler.scala
Scala
apache-2.0
781
trait T { def f = List(1) map { case i if i > 0 => implicit j: Int => i + implicitly[Int] case _ => implicit j: Int => 42 } def g = List(1) map { case i if i > 0 => import concurrent._ case _ => implicit j: Int => 42 } def h = List(1) map { case i if i > 0 => val x = 42 case _ => implicit j: Int => () } ...
scala/scala
test/files/pos/t10684.scala
Scala
apache-2.0
467
/* * Copyright 2014-2020 Rik van der Kleij * * 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...
rikvdkleij/intellij-haskell
src/main/scala/intellij/haskell/HaskellFile.scala
Scala
apache-2.0
1,142
package japgolly.scalajs.react.extra import japgolly.scalajs.react._ /** * External entities can register with this to listen (receive) data of type A. * * Install in `ScalaComponent.build` via `.configure(Listenable.listen)`. */ trait Listenable[A] { /** * Register a listener. * * @param listener The...
matthughes/scalajs-react
extra/src/main/scala/japgolly/scalajs/react/extra/Listenable.scala
Scala
apache-2.0
1,189
/* * 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 ...
MLnick/spark
sql/core/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryManager.scala
Scala
apache-2.0
12,820
// Project: scalajs-rxjs // Module: // Description: // Copyright (c) 2016. Distributed under the MIT License (see included LICENSE file). package rxjs import scala.scalajs.js @js.native trait Scheduler extends js.Object { }
jokade/scalajs-rxjs
src/main/scala/rxjs/Scheduler.scala
Scala
mit
237
package clients import com.softwaremill.sttp.circe._ import com.softwaremill.sttp.{sttp, _} import contexts.AkkaContext import io.circe.generic.auto._ import shared.requests.policies._ import shared.responses.policies._ trait FoulkonPolicyClient extends FoulkonConfig { self: AkkaContext => val listAllPoliciesReques...
beikern/foulkon-ui
server/src/main/scala/clients/FoulkonPolicyClient.scala
Scala
apache-2.0
2,270