code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
package com.gizwits.rabbitmq import org.apache.spark.storage.StorageLevel import org.apache.spark.streaming.StreamingContext import org.apache.spark.streaming.api.java.{JavaReceiverInputDStream, JavaStreamingContext} import org.apache.spark.streaming.dstream.ReceiverInputDStream import scala.reflect.ClassTag object ...
Bestfeel/spark-rabbitmq-stream
src/main/scala/com/gizwits/rabbitmq/RabbitMQUtils.scala
Scala
apache-2.0
6,948
package org.machine.engine.encoder.json import org.scalatest._ import org.scalatest.mock._ import org.machine.engine.graph.nodes.{Association} import org.machine.engine.graph.commands.{CommandScopes, EngineCmdResult, QueryCmdResult, UpdateCmdResult, DeleteCmdResult, InsertCmdResult} class OutboundJSONSerializerSpec ...
sholloway/graph-engine
src/test/scala/org/machine/engine/encoder/json/OutboundJSONSerializerSpec.scala
Scala
mit
2,844
package org.vitrivr.adampro.data.index.structures.va import org.apache.spark.sql.{DataFrame, Row} import org.vitrivr.adampro.data.datatypes.vector.Vector import org.vitrivr.adampro.data.datatypes.vector.Vector._ import org.vitrivr.adampro.query.tracker.QueryTracker import org.vitrivr.adampro.data.index.Index._ import...
dbisUnibas/ADAMpro
src/main/scala/org/vitrivr/adampro/data/index/structures/va/VAPlusIndex.scala
Scala
mit
1,949
package slick.codegen import java.net.URI import scala.concurrent.{Await, ExecutionContext} import scala.concurrent.duration.Duration import slick.basic.DatabaseConfig import slick.{model => m} import slick.jdbc.JdbcProfile import slick.model.Model import slick.util.ConfigExtensionMethods.configExtensionMethods /** ...
nafg/slick
slick-codegen/src/main/scala/slick/codegen/SourceCodeGenerator.scala
Scala
bsd-2-clause
7,492
package smtlib package theories package experimental import trees.Terms._ import Operations._ object Strings { /** The strings and format are taken from here: * http://cvc4.cs.nyu.edu/wiki/Strings#Examples */ private val StringConcat = "str.++" private val StringLength = "str.len" private val ...
regb/scala-smtlib
src/main/scala/smtlib/theories/experimental/Strings.scala
Scala
mit
7,774
import scala.reflect.io._ import java.net.URLClassLoader object Test extends App { val jarsOrDirectories = Set("partest.lib", "partest.reflect", "partest.comp") map sys.props object AllowedMissingClass { // Some classes in scala-compiler.jar have references to jline / ant classes, which seem to be // not ...
felixmulder/scala
test/files/jvm/innerClassEnclMethodJavaReflection.scala
Scala
bsd-3-clause
2,722
package SMART import Chisel._ // Implementing the XY Routing Unit class RoutingUnit() extends Module { val io = new Bundle { val xHops = UInt(INPUT, width = X_HOP_WIDTH) val yHops = UInt(INPUT, width = Y_HOP_WIDTH) val xDir = UInt(INPUT, width = 1) val yDir = UInt(INPUT, wi...
hyoukjun/OpenSMART
Backend/Chisel/RoutingUnit.scala
Scala
mit
3,512
package controllers import javax.inject.Inject import play.api.mvc._ /** * This controller creates an `Action` to handle HTTP requests to the * application's home page. */ class HomeController @Inject()(cc: ControllerComponents) extends AbstractController(cc) { /** * Create an Action to render an HTML page...
rafajpet/iot-pood
iot-pood-web/app/controllers/HomeController.scala
Scala
mit
733
/* * 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 ...
shivangi1015/incubator-carbondata
integration/spark2/src/test/scala/org/apache/spark/carbondata/restructure/AlterTableRevertTestCase.scala
Scala
apache-2.0
4,710
package actors import models.Recipe import akka.actor._ import play.api.libs.json._ class RecipesActor extends Actor { def receive = { case ListRecipes() => sender() ! Json.toJson(Recipe.list) } implicit val recipeWrites = new Writes[Recipe] { def writes(recipe: Recipe) = Json.obj( ...
MatthieuNICOLAS/play-with-dart
app/actors/RecipesActor.scala
Scala
gpl-3.0
620
package com.sksamuel.elastic4s.requests.get import java.net.URLEncoder import com.fasterxml.jackson.databind.JsonNode import com.sksamuel.elastic4s.requests.common.FetchSourceContextQueryParameterFn import com.sksamuel.elastic4s.requests.indexes.VersionTypeHttpString import com.sksamuel.elastic4s.{ElasticError, Elast...
stringbean/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/get/GetHandlers.scala
Scala
apache-2.0
3,975
/* Copyright 2012 Georgia Tech Research Institute Author: lance.gatlin@gtri.gatech.edu This file is part of org.gtri.util.scala library. org.gtri.util.scala library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the...
gtri-iead/org.gtri.util.scala
exelog/src/main/scala/org/gtri/util/scala/exelog/sideeffects/Log4jLog.scala
Scala
gpl-3.0
2,385
package BIDMach.networks.layers import BIDMat.{Mat,SBMat,CMat,DMat,FMat,IMat,LMat,HMat,GMat,GDMat,GIMat,GLMat,GSMat,GSDMat,SMat,SDMat} import BIDMat.MatFunctions._ import BIDMat.SciFunctions._ import BIDMach.datasources._ import BIDMach.updaters._ import BIDMach.mixins._ import BIDMach.models._ import BIDMach...
jamesjia94/BIDMach
src/main/scala/BIDMach/networks/layers/RectLayer.scala
Scala
bsd-3-clause
1,713
/* * 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 ...
shuangshuangwang/spark
sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
Scala
apache-2.0
46,356
/* * 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/amls-frontend
test/controllers/businessactivities/IdentifiySuspiciousActivityControllerSpec.scala
Scala
apache-2.0
4,949
package alternating import scala.collection.mutable.ListBuffer @serializable class AlternatingAlgorithm { def generateInitialEdge(item : (Long, Iterable[Long])) : Iterable[(Long, Set[Long])] = { var outputList : ListBuffer[(Long, Set[Long])] = new ListBuffer val it = item._2.toSet.iterator while (it.hasNex...
hpclab/cracker
src/alternating/AlternatingAlgorithm.scala
Scala
mit
4,484
package org.template.recommendation import io.prediction.controller.PAlgorithm import io.prediction.controller.Params import io.prediction.data.storage.BiMap import org.apache.spark.SparkContext._ import org.apache.spark.mllib.recommendation.ALS import org.apache.spark.mllib.recommendation.{Rating => MLlibRating} im...
wenaz/PredictionIO
examples/scala-parallel-recommendation/custom-query/src/main/scala/ALSAlgorithm.scala
Scala
apache-2.0
4,962
package rml.args.conversions.map import rml.args.arg.input.ListArg import rml.args.arg.input.PositionalArg import rml.args.arg.input.SingleArg import rml.args.exceptions.IllegalArgException import rml.args.arg.restriction.SetRestriction import rml.args.arg.InputArg import rml.args.arg.input.JoinArg import rml.args.arg...
rml/scala_args
src/main/scala/rml/args/conversions/map/ToEnum.scala
Scala
gpl-3.0
1,671
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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 b...
hpe-cct/cct-core
src/main/scala/cogx/compiler/codegenerator/opencl/hyperkernels/ComplexBinaryRealConstHyperKernel.scala
Scala
apache-2.0
2,802
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
goldmedal/spark
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala
Scala
apache-2.0
44,765
package sigmastate import org.scalatest.{PropSpecLike, Tag} import org.scalactic.source.Position import sigmastate.eval.Profiler import spire.syntax.all.cfor import scala.util.DynamicVariable trait CrossVersionProps extends PropSpecLike with TestsBase { val printVersions: Boolean = false /** Number of times ea...
ScorexFoundation/sigmastate-interpreter
sigmastate/src/test/scala/sigmastate/CrossVersionProps.scala
Scala
mit
1,860
package regolic.lp import regolic.asts.core.Trees._ import regolic.asts.core.Manip._ import regolic.asts.theories.real.Trees._ import regolic.asts.theories.real.Manip._ import regolic.asts.theories.real.Eval import regolic.algebra.Rational import regolic.algebra.Vector import regolic.algebra.Matrix import scala.coll...
regb/scabolic
src/main/scala/regolic/lp/StandardLinearProgram.scala
Scala
mit
4,695
package org.littlewings.javaee7.rest import javax.ws.rs.core.{Context, MediaType, Response, UriInfo} import javax.ws.rs._ import io.swagger.annotations.{Api, ApiOperation} import scala.collection.JavaConverters._ object BookResource { private[rest] val books: scala.collection.mutable.Map[String, Book] = new j...
kazuhira-r/javaee7-scala-examples
resteasy-swagger/src/main/scala/org/littlewings/javaee7/rest/BookResource.scala
Scala
mit
1,199
/* * 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 ...
tzulitai/flink
flink-examples/flink-examples-table/src/main/scala/org/apache/flink/table/examples/scala/StreamSQLExample.scala
Scala
apache-2.0
3,802
package scalaz.stream import Cause._ import scala.annotation.tailrec import scala.collection.SortedMap import scalaz.{Catchable, Functor, Monad, Monoid, Nondeterminism, \\/, -\\/, ~>} import scalaz.\\/._ import scalaz.concurrent.{Actor, Strategy, Task} import scalaz.stream.process1.Await1 /** * An effectful stream o...
rossabaker/scalaz-stream
src/main/scala/scalaz/stream/Process.scala
Scala
mit
54,798
/******************************************************************************* * Copyright (c) 2014 Guillaume DUBUISSON DUPLESSIS <guillaume.dubuisson_duplessis@insa-rouen.fr>. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * ...
GuillaumeDD/scala99problems
src/main/scala/multiwayTree/P72/sol02.scala
Scala
gpl-3.0
879
package com.olegych.scastie package client package components import japgolly.scalajs.react._, vdom.all._, extra._ import org.scalajs.dom import org.scalajs.dom.html import org.scalajs.dom.{window, document} final case class CopyModal(title: String, subtitle: String, content: String, modalId: String, isClosed: Bool...
scalacenter/scastie
client/src/main/scala/com.olegych.scastie.client/components/CopyModal.scala
Scala
apache-2.0
1,939
import mist.api._ import mist.api.dsl._ import mist.api.encoding.defaults._ import org.apache.spark.SparkContext object PiExample extends MistFn { override def handle: Handle = { val samples = arg[Int]("samples").validated(_ > 0, "Samples should be positive") withArgs(samples).onSparkContext((n: Int, sc: Sp...
Hydrospheredata/mist
examples/examples/src/main/scala/PiExample.scala
Scala
apache-2.0
556
/* * 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 ...
aosagie/spark
external/kafka-0-10/src/main/scala/org/apache/spark/streaming/kafka010/KafkaDataConsumer.scala
Scala
apache-2.0
14,254
package org.bitcoins.testkit.util import org.bitcoins.testkitcore.util.BitcoinSUnitTest import org.scalatest.Assertion import org.scalatest.exceptions.TestFailedException import scala.concurrent.Future class ScalaTestUtilTest extends BitcoinSUnitTest { implicit val ec: scala.concurrent.ExecutionContext = scal...
bitcoin-s/bitcoin-s
testkit/src/test/scala/org/bitcoins/testkit/util/ScalaTestUtilTest.scala
Scala
mit
896
/** * * Copyright (c) 2015-2017 Rodney S.K. Lai * https://github.com/rodney-lai * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the * above copyright notice and this permission notice appear in all copies. * * THE SOFTW...
rodney-lai/test-site
emailer/src/main/scala/com/rodneylai/database/MongoAccessHelper.scala
Scala
isc
3,263
object funcionalSenSideEffect{ def main(args: Array[String]): Unit = { senSide(args).foreach(println) } //no estilo funcional unha funcion que é Unit ou void //xeralmente e a que ten side effects que se consideran //que son dificiles de testear etc //pro exemplo un side effect é un valor que non podemos...
jmlb23/scala
libro_odersky/scripts_CH3/funcional/funcionalSenSideEffect.scala
Scala
gpl-3.0
601
/** * Copyright (c) 2015, Cloudera, Inc. All Rights Reserved. * * Cloudera, Inc. 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/LIC...
helio9cn/spark-finance
src/test/scala/com/cloudera/finance/ts/TimeSeriesSuite.scala
Scala
apache-2.0
2,758
package com.lonelyplanet.scalahealthcheck trait HealthChecker { def check: HealthCheckResult }
lonelyplanet/scala-healthcheck
src/main/scala/com/lonelyplanet/scalahealthcheck/HealthChecker.scala
Scala
mit
98
/* * 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 ...
jkbradley/spark
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2Suite.scala
Scala
apache-2.0
26,320
package com.arcusys.valamis.certificate.service.export import java.io.FileInputStream import com.arcusys.valamis.certificate.model.{Certificate, CertificateFilter} import com.arcusys.valamis.certificate.model.goal._ import com.arcusys.valamis.certificate.storage._ import com.arcusys.valamis.course.CourseService impor...
igor-borisov/valamis
valamis-certificate/src/main/scala/com/arcusys/valamis/certificate/service/export/CertificateExportProcessor.scala
Scala
gpl-3.0
4,118
package com.twitter.finagle.zipkin.core /** * The `Span` is the core datastructure in RPC tracing. It denotes the * issuance and handling of a single RPC request. */ import com.twitter.finagle.thrift.thrift import com.twitter.finagle.tracing.TraceId import com.twitter.util.Time /** * The span itself is an immutab...
luciferous/finagle
finagle-zipkin-core/src/main/scala/com/twitter/finagle/zipkin/core/Span.scala
Scala
apache-2.0
3,735
package reactivemongo.core.actors import scala.util.control.NonFatal import scala.collection.immutable.ListSet import reactivemongo.api.{ AuthenticationMode, ReadPreference, ScramSha1Authentication, ScramSha256Authentication } import reactivemongo.core.errors.CommandException import reactivemongo.api.comma...
ReactiveMongo/ReactiveMongo
driver/src/main/scala/core/actors/MongoScramAuthentication.scala
Scala
apache-2.0
9,381
package io.buoyant.linkerd import com.fasterxml.jackson.annotation.{JsonIgnore, JsonProperty, JsonSubTypes} import com.twitter.conversions.time._ import com.twitter.finagle.{param, Stack} import com.twitter.finagle.buoyant.TotalTimeout import com.twitter.finagle.service._ import com.twitter.util.Duration import io.buo...
pawelprazak/linkerd
linkerd/core/src/main/scala/io/buoyant/linkerd/SvcConfig.scala
Scala
apache-2.0
2,916
package com.twitter.algebird import java.nio._ /** * MinHasher as a Monoid operates on this class to avoid the too generic Array[Byte]. The bytes are assumed to * be never modified. The only reason we did not use IndexedSeq[Byte] instead of Array[Byte] is because a * ByteBuffer is used internally in MinHasher and ...
twitter/algebird
algebird-core/src/main/scala/com/twitter/algebird/MinHasher.scala
Scala
apache-2.0
7,647
/*********************************************************************** * 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-kafka/geomesa-kafka-tools/src/main/scala/org/locationtech/geomesa/kafka/tools/export/KafkaExportCommand.scala
Scala
apache-2.0
5,652
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
jmnarloch/scala-js
test-suite/src/test/scala/org/scalajs/testsuite/javalib/StackTraceElementTest.scala
Scala
bsd-3-clause
1,283
/* * Copyright (c) 2021, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ package com.krux.hyperion.expression /** * Expression that references a run time field *...
realstraw/hyperion
core/src/main/scala/com/krux/hyperion/expression/ReferenceExpression.scala
Scala
bsd-3-clause
593
package controllers import play.api._ import play.api.mvc._ import play.api.Play.current import play.api.libs.concurrent.Execution.Implicits._ // Play Json imports import play.api.libs.json._ object Application extends Controller { def index = Action { Ok(views.html.index("Your new application is ready.")) ...
lukiano/networkblame
app/controllers/Application.scala
Scala
mit
325
package com.twitter.finagle.builder import com.twitter.finagle._ import com.twitter.finagle.channel.OpenConnectionsThresholds import com.twitter.finagle.netty3.Netty3Listener import com.twitter.finagle.ssl.{Ssl, Engine} import com.twitter.finagle.stats.{StatsReceiver, NullStatsReceiver} import com.twitter.finagle.trac...
joshbedo/finagle
finagle-core/src/main/scala/com/twitter/finagle/builder/ServerBuilder.scala
Scala
apache-2.0
20,650
package controllers import lila.app._ import lila.notify.Notification.Notifies import play.api.libs.json._ import views.html object Notify extends LilaController { val env = Env.notifyModule import env.jsonHandlers._ def recent(page: Int) = Auth { implicit ctx => me => val notifies = Notifies(me.i...
clarkerubber/lila
app/controllers/Notify.scala
Scala
agpl-3.0
441
package slamdata.engine.std import scalaz._ import Scalaz._ import slamdata.engine.{Data, Func, Type, Mapping, SemanticError} import SemanticError._ import Validation.{success, failure} import NonEmptyList.nel trait StringLib extends Library { private def stringApply(f: (String, String) => String): Func.Typer = {...
mossprescott/quasar
src/main/scala/slamdata/engine/std/string.scala
Scala
agpl-3.0
4,562
package com.bwsw.cloudstack.pulse.models import com.bwsw.cloudstack.pulse.influx.{CounterField, QueryBuilder} /** * Created by Ivan Kudryavtsev on 27.07.17. */ class DiskInfluxModel extends InfluxModel { override def prepareQuery(params: Map[String, String]): String = { val aggregation = params("aggregation...
bwsw/cs-pulse-server
src/main/scala-2.12/com/bwsw/cloudstack/pulse/models/DiskInfluxModel.scala
Scala
apache-2.0
986
package frp import scala.util.DynamicVariable class Signal[T](expr: => T) { import Signal._ private var myExpr: () => T = _ private var myValue: T = _ private var observers: Set[Signal[_]] = Set() private var observed: List[Signal[_]] = Nil update(expr) protected def computeValue(): Unit = { for (...
mpakhomov/scala-progfun-2015
src/main/scala/frp/Signal.scala
Scala
mit
1,321
package com.mdataset.service.api.exchange import com.ecfront.common.Resp import com.ecfront.ez.framework.service.eventbus.EventBusProcessor import com.mdataset.lib.basic.BasicContext import com.mdataset.lib.basic.model.{MdsCollectStatusDTO, MdsSourceMainDTO} /** * Worker交互接口的消息默认实现 * * 使用EventBus通道 */ object ...
MDataSet/mds
modules/service_api/src/main/scala/com/mdataset/service/api/exchange/MdsDefaultAPIExchangeMaster.scala
Scala
apache-2.0
1,527
/* * 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 ...
bOOm-X/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
Scala
apache-2.0
35,045
/* * 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/jdbc/JdbcDialects.scala
Scala
apache-2.0
14,283
/* * 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 ...
xieguobin/Spark_2.0.0_cn1
ml/recommendation/ALS.scala
Scala
apache-2.0
49,989
package com.signalcollect.dcop.scalability.conflicts import com.signalcollect.dcop.benchmark.BenchmarkModes import com.signalcollect.ExecutionConfiguration import com.signalcollect.dcop.benchmark.BenchmarkConfiguration import com.signalcollect.dcop.evaluation.maxsum.MaxSumAlgorithm import com.signalcollect.configurati...
gmazlami/dcop-maxsum
src/main/scala/com/signalcollect/dcop/scalability/conflicts/SyncConflictsOverStepsScaling.scala
Scala
apache-2.0
6,492
/* * Copyright 2018 Vladimir Konstantinov * * 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 ...
oxy-development/korro
src/main/scala/com/github/illfaku/korro/config/RouteConfig.scala
Scala
apache-2.0
1,834
import scala.actors.Futures._ import nimrod.util._ val inv = opts.flag("inverse","Use the corpus in inverse mode") val maxSize = opts.intValue("m","Minimum length",5) val acceptanceRate = opts.doubleValue("a","The required percentage of alignment",0.75) val alignFile = opts.roFile("alignFile","The file containing symme...
jmccrae/nimrod
scripts/simple-phrase-extractor.scala
Scala
apache-2.0
3,855
package coursier.cli.install object ShellUtil { def rcFileOpt: Option[String] = Option(System.getenv("SHELL")).map(_.split('/').last).flatMap { case "zsh" => Some("~/.zshrc") case "bash" => Some("~/.bashrc") case _ => None } }
alexarchambault/coursier
modules/cli/src/main/scala/coursier/cli/install/ShellUtil.scala
Scala
apache-2.0
264
package com.twitter.finatra.benchmarks import com.twitter.finagle.httpx.{Method, Request, Response} import com.twitter.finatra.http.internal.routing.{Route, RoutingService} import com.twitter.inject.requestscope.{FinagleRequestScope, FinagleRequestScopeFilter} import com.twitter.util.Future import org.openjdk.jmh.anno...
deanh/finatra
benchmarks/src/main/scala/com/twitter/finatra/benchmarks/FinagleRequestScopeBenchmark.scala
Scala
apache-2.0
1,157
package cs220 case class HelloThread(s: String) extends Thread { override def run = println(s"Hello from a thread: $s!") } object ThreadExample { def thread(s: String) = HelloThread(s) def main(args: Array[String]) = { thread("Hazzah!").start } }
umass-cs-220/week-11-parallel
code/threads/src/main/scala/cs220/ThreadExample01.scala
Scala
apache-2.0
262
package uk.gov.gds.ier.transaction.overseas.nino import uk.gov.gds.ier.transaction.overseas.InprogressOverseas import uk.gov.gds.ier.step.StepTemplate trait NinoMustache extends StepTemplate[InprogressOverseas] { val title = "What is your National Insurance number?" case class NinoModel( question:Questio...
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/transaction/overseas/nino/NinoMustache.scala
Scala
mit
814
class A { implicit def e: E = new E def x(i: Int)(implicit y: E): String = "" } class E
twitter-forks/sbt
sbt/src/sbt-test/source-dependencies/implicit-params/A.scala
Scala
bsd-3-clause
89
/** * Copyright (C) 2010 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 prog...
wesley1001/orbeon-forms
src/main/scala/org/orbeon/oxf/xforms/analysis/VariableAnalysisTrait.scala
Scala
lgpl-2.1
4,372
package de.gwdg.europeanaqa.spark.saturation import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spark.SparkConf import org.apache.spark.sql._ import org.apache.spark.sql.expressions.Window import org.apache.spark.sql.functions.sum import org.apache.spark.sql.functions.col imp...
pkiraly/europeana-qa-spark
scala/src/main/scala/de/gwdg/europeanaqa/spark/saturation/SaturationWithHistogramForAllCollections.scala
Scala
gpl-3.0
10,523
/* * Copyright 2001-2008 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/test/scala/org/scalatest/TimesOnIntSpec.scala
Scala
apache-2.0
1,570
package me.jeffmay.neo4j.client.ws import me.jeffmay.util.RunHooks import play.api.libs.ws.ning.NingWSClient import play.api.libs.ws.{WSClient, WSRequest} object TestWSClient { private lazy val client: NingWSClient = synchronized { val started = NingWSClient() RunHooks.addShutdownHook("TestNeo4jWSClient.cl...
AudaxHealthInc/neo4j-scala-client
ws-test-util/src/main/scala/me/jeffmay/neo4j/client/ws/TestWSClient.scala
Scala
apache-2.0
736
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
WeichenXu123/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalog.scala
Scala
apache-2.0
11,856
/* * Licensed to Intel Corporation under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * Intel Corporation licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use t...
zhichao-li/BigDL
dl/src/test/scala/com/intel/analytics/bigdl/optim/LBFGSSpec.scala
Scala
apache-2.0
2,263
/* * 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 ...
asurve/arvind-sysml2
src/main/scala/org/apache/sysml/api/dl/Caffe2DML.scala
Scala
apache-2.0
40,652
package monocle.law.discipline import monocle.Traversal import monocle.law.TraversalLaws import org.scalacheck.Prop._ import org.scalacheck.{Arbitrary, Prop} import org.typelevel.discipline.Laws import scalaz.Equal import scalaz.std.list._ import scalaz.std.option._ object TraversalTests extends Laws { def apply[...
rperry/Monocle
law/shared/src/main/scala/monocle/law/discipline/TraversalTests.scala
Scala
mit
1,180
package com.lot.order.service import akka.actor.Actor import akka.actor.ActorLogging import com.lot.exchange.Message.NewOrder import com.lot.exchange.Message.ModifyOrder import com.lot.exchange.Message.CancelOrder import com.lot.order.model.Order import scala.concurrent.duration._ import akka.util.Timeout import scala...
thimmaiah/life_of_a_trade_scala
src/main/scala/com/lot/order/service/OrderPreCheck.scala
Scala
apache-2.0
3,700
/* * 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/zen
ml/src/main/scala/com/github/cloudml/zen/ml/linalg/BLAS.scala
Scala
apache-2.0
6,010
package controllers import contexts.{CreateInventoryOrderContext, UpdateInventoryOrderContext} import jsons.InventoryOrderJson import models.InventoryOrder import org.joda.time.DateTime import play.api.data.Form import play.api.data.Forms._ import play.api.libs.concurrent.Execution.Implicits.defaultContext object Inv...
KIWIKIGMBH/kiwierp
kiwierp-backend/app/controllers/InventoryOrdersController.scala
Scala
mpl-2.0
2,337
package ch.uzh.ifi.pdeboer.pplib.process.stdlib import ch.uzh.ifi.pdeboer.pplib.patterns.{FixPatchExecuter, FixVerifyFPDriver} import ch.uzh.ifi.pdeboer.pplib.process.entities._ /** * Created by pdeboer on 14/12/14. */ @PPLibProcess class FixPatchProcess(params: Map[String, Any] = Map.empty) extends ProcessStub[Lis...
uzh/PPLib
src/main/scala/ch/uzh/ifi/pdeboer/pplib/process/stdlib/FixPatchProcess.scala
Scala
mit
2,372
/* sbt -- Simple Build Tool * Copyright 2010 Mark Harrah */ package sbt import sbt.io.Path object CommandStrings { /** The prefix used to identify a request to execute the remaining input on source changes.*/ val AboutCommand = "about" val TasksCommand = "tasks" val SettingsCommand = "settings" val Proje...
mdedetrich/sbt
main/src/main/scala/sbt/CommandStrings.scala
Scala
bsd-3-clause
12,762
// 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 ...
kahosato/scalastyle
src/main/scala/org/scalastyle/scalariform/AbstractClassChecker.scala
Scala
apache-2.0
1,720
/* * 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 ...
WindCanDie/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/BatchScanExec.scala
Scala
apache-2.0
1,878
/** * Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0 * See accompanying LICENSE file. */ package kafka.manager import java.util.Properties import org.joda.time.DateTime import kafka.common.TopicAndPartition import org.slf4j.LoggerFactory import scala.collection.immutable.Queue import sc...
Flipkart/kafka-manager
app/kafka/manager/ActorModel.scala
Scala
apache-2.0
30,622
object SCL6807 { object literal extends scala.Dynamic { def applyDynamic(s: String)(r: String) = 1 def applyDynamicNamed(s : String)(r: (String, Any)) = "2" } val x = literal /*start*/(literal.foo(x = 2), literal(""), this literal (x = 2), literal(x = 2), x(""), this x (x = 2), ...
ilinum/intellij-scala
testdata/typeInference/bugs5/SCL6807.scala
Scala
apache-2.0
392
package com.proinnovate import javafx.application.Application import javafx.fxml.FXMLLoader import javafx.scene.Parent import javafx.scene.Scene import javafx.stage.Stage import javafx.scene.control.{ProgressIndicator, TextField, Button} import com.typesafe.scalalogging.slf4j.Logging import javafx.event.{ActionEvent, ...
sroebuck/mp3andburn
src/main/scala/com/proinnovate/BurnApp.scala
Scala
mit
6,251
import session.model.Session import session.services.CryptoService class CryptoServiceSpec extends AuthenticationTestHelper { val cryptoService: CryptoService = inject[CryptoService] "CryptoService" must { "encrypt and decrypt session data correctly" in { val session = Session(userId = Some(43), csrfTo...
sysgears/apollo-universal-starter-kit
modules/authentication/server-scala/src/test/scala/CryptoServiceSpec.scala
Scala
mit
511
/* * Wire * Copyright (C) 2016 Wire Swiss GmbH * * 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 progr...
wireapp/wire-android-sync-engine
zmessaging/src/main/scala/com/waz/log/LogOutput.scala
Scala
gpl-3.0
1,246
package es.uvigo.ei.sing.sds package database import scala.concurrent.Future import play.api.Play import play.api.db.slick.{ DatabaseConfigProvider, HasDatabaseConfig } import play.api.libs.concurrent.Execution.Implicits.defaultContext import slick.driver.JdbcProfile import entity.{ Category, Keyword } import util....
agjacome/smart-drug-search
src/main/scala/database/KeywordsDAO.scala
Scala
mit
4,469
package org.jetbrains.plugins.dotty.lang.parser.parsing.top.template import org.jetbrains.plugins.dotty.lang.parser.parsing.types.SelfType /** * @author adkozlov */ object TemplateBody extends org.jetbrains.plugins.scala.lang.parser.parsing.top.template.TemplateBody { override protected def templateStat = Templ...
loskutov/intellij-scala
src/org/jetbrains/plugins/dotty/lang/parser/parsing/top/template/TemplateBody.scala
Scala
apache-2.0
375
trait A { type T; type M >: T } trait B extends A { val x : String; val u : A { type T = B.this.T } ; type T = x.type; type M = u.M }
densh/dotty
tests/pos/t758.scala
Scala
bsd-3-clause
142
package lables.pimpmylib object LabelMaker { def createLabel(from : CanBeLabeled): String = from.label } trait CanBeLabeled { def label: String }
tupol/scala-patterns-tc-pml
src/main/scala/lables/pimpmylib/LabelMaker.scala
Scala
apache-2.0
155
/* * 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 ...
smartiniOnGitHub/grails-scala
src/scala/grails_scala_test/Events.scala
Scala
apache-2.0
1,113
package no.vestein.webapp.game import no.vestein.webapp.App.Ctx2D trait Renderable { def render(ctx: Ctx2D): Unit }
WoodStone/PurpleRain-ScalaJS
src/main/scala/no/vestein/webapp/game/Renderable.scala
Scala
gpl-3.0
122
// Copyright 2014 Commonwealth Bank of Australia // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ap...
CommBank/maestro
maestro-example/src/test/scala/au/com/cba/omnia/maestro/example/CustomerHiveJobSpec.scala
Scala
apache-2.0
2,324
/** * © 2019 Refinitiv. 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 applicable l...
dudi3001/CM-Well
server/cmwell-bg/src/main/scala/cmwell/bg/IndicesManager.scala
Scala
apache-2.0
5,280
package com.twitter.finagle.http2.transport.common import com.twitter.finagle.http.filter.HttpNackFilter import com.twitter.finagle.http2.RstException import io.netty.buffer.Unpooled import io.netty.channel.embedded.EmbeddedChannel import io.netty.handler.codec.http.FullHttpMessage import io.netty.handler.codec.http2....
twitter/finagle
finagle-http2/src/test/scala/com/twitter/finagle/http2/transport/common/Http2StreamMessageHandlerTest.scala
Scala
apache-2.0
3,906
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
pncampbell/ct-calculations
src/main/scala/uk/gov/hmrc/ct/computations/CPAux3.scala
Scala
apache-2.0
1,195
import org.qirx.littlespec.Specification object Test extends Specification { "Test should be able to" - { "run a test" - { 1 + 1 is 2 } "show an example" - { example { 1 + 1 is 2 } } } }
EECOLOR/little-spec
scalajs/src/sbt-test/test-dependencies/scalajs/testClasses/Test.scala
Scala
mit
234
package is.hail.utils import scala.collection.mutable import scala.reflect.ClassTag object FastSeq { def empty[T](implicit tct: ClassTag[T]): IndexedSeq[T] = FastSeq() def apply[T](args: T*)(implicit tct: ClassTag[T]): IndexedSeq[T] = { args match { case args: mutable.WrappedArray[T] => args case...
hail-is/hail
hail/src/main/scala/is/hail/utils/FastSeq.scala
Scala
mit
402
/* * 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 ...
mkolod/incubator-spark
mllib/src/main/scala/org/apache/spark/mllib/recommendation/MatrixFactorizationModel.scala
Scala
apache-2.0
1,977
/* * Twitter Korean Text - Scala library to process Korean text * * 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/...
tglstory/twitter-korean-text
src/test/scala/com/twitter/penguin/korean/tokenizer/KoreanChunkerTest.scala
Scala
apache-2.0
4,710
package me.apidoc.avro import lib.Text object Util { def formatName(name: String): String = { //Text.camelCaseToUnderscore(name).toLowerCase name.trim } def toOption(value: String): Option[String] = { if (value == null || value.trim.isEmpty) { None } else { Some(value.trim) } ...
Seanstoppable/apidoc
avro/src/main/scala/me/apidoc/avro/Util.scala
Scala
mit
326
package models import java.util.UUID import database.Cassandra import com.datastax.driver.core.querybuilder.QueryBuilder import constants.Table object Target { def getRow(target: String, input: String) = { try { val id = UUID.fromString(input) val row = Cassandra.session.execute( QueryBuild...
lequangdzung/quora-clone
api-app/app/models/Target.scala
Scala
gpl-2.0
514
/* * 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. */ // GENERATED CODE: DO NOT EDIT...
lrytz/scala
src/library/scala/Tuple17.scala
Scala
apache-2.0
2,012
package nars.language import java.util.ArrayList import nars.io.Symbols import nars.storage.Memory import Inheritance._ //remove if not needed import scala.collection.JavaConversions._ import CompoundTerm._ import Statement._ object Inheritance { /** * Try to make a new compound from two components. Called by t...
automenta/opennars
nars_scala/src/main/scala/nars/language/Inheritance.scala
Scala
gpl-2.0
1,880
/* * Copyright (c) 2016. <jason.zou@gmail.com> * * LeaderTest.scala is part of marc4scala. * * marc4scala 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 ...
jasonzou/marc4scala
src/test/scala/org/marc4scala/LeaderTest.scala
Scala
gpl-3.0
1,368