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 org.chipmunk.util import java.sql.DriverManager import java.sql.Driver import org.squeryl.PrimitiveTypeMode.inTransaction import org.squeryl.Session import org.squeryl.SessionFactory import org.squeryl.internals.DatabaseAdapter object Configurator { def initialize( driverName: String, adapter: Data...
kpjjpk/chipmunk
src/main/scala/org/chipmunk/util/Configurator.scala
Scala
mit
1,028
package sangria.validation.rules import sangria.ast import sangria.ast.AstVisitorCommand import sangria.validation._ import scala.collection.mutable.{Set ⇒ MutableSet} /** * Unique fragment names * * A GraphQL document is only valid if all defined fragments have unique names. */ class UniqueFragmentNames extends...
PhilAndrew/JumpMicro
JMSangriaGraphql/src/main/scala/sangria/validation/rules/UniqueFragmentNames.scala
Scala
mit
849
package persistence.dal import io.getquill._ import utils._ import org.scalatest.{FunSuite, Suite} trait AbstractPersistenceTest extends FunSuite { this: Suite => trait Modules extends ConfigurationModuleImpl with PersistenceModuleTest { } trait PersistenceModuleTest extends PersistenceModule with DbConte...
cdiniz/quill-async-akka-http
src/test/scala/persistence/dal/AbstractPersistenceTest.scala
Scala
apache-2.0
536
package com.twitter.zipkin.storage.redis import scala.collection.immutable.List import com.twitter.scrooge.BinaryThriftStructSerializer import com.twitter.zipkin.thriftscala import com.twitter.zipkin.conversions.thrift._ import com.twitter.zipkin.common.{Annotation, BinaryAnnotation, Span} /** * Tests the RedisSna...
srijs/zipkin
zipkin-redis/src/test/scala/com/twitter/zipkin/storage/redis/RedisSnappyThriftCodec.scala
Scala
apache-2.0
876
object Main { def main(args: Array[String]) { try { assert(args.length >= 1) val elem = Integer.parseInt(args(0)) if (elem >= 0) { println("Positive number") } else { println("Negative number") } } catch { case e: NumberFormatException => println(...
dzufferey/picasso
frontend/compilerPlugin/src/test/resources/plugin/if.scala
Scala
bsd-2-clause
358
export SPARK_CLASSPATH=/home/epiclulz/local/cs/lib/cs.jar export ADD_JARS=/home/epiclulz/local/cs/lib/cs.jar /home/epiclulz/local/spark/bin/spark-shell --master spark://solo-kumbu:7077 --jars $ADD_JARS import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spark.SparkConf import...
hihellobolke/clearspark
scala/spark-shell.scala
Scala
apache-2.0
3,102
/* * 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 ...
tillrohrmann/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/schema/TableSourceTable.scala
Scala
apache-2.0
4,374
/** * Copyright 2013 Gianluca Amato * * 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 of the License, or ...
francescaScozzari/Jandom
core/src/main/scala/it/unich/jandom/narrowings/Narrowing.scala
Scala
lgpl-3.0
1,300
/* * 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 ...
bwsw/sj-platform
core/sj-batch-streaming-engine/src/main/scala/com/bwsw/sj/engine/batch/task/input/RetrievableCompleteCheckpointTaskInput.scala
Scala
apache-2.0
4,226
// Databricks notebook source exported at Mon, 14 Mar 2016 04:43:58 UTC // MAGIC %md // MAGIC // MAGIC # [Scalable Data Science](http://www.math.canterbury.ac.nz/~r.sainudiin/courses/ScalableDataScience/) // MAGIC // MAGIC // MAGIC ### prepared by [Raazesh Sainudiin](https://nz.linkedin.com/in/raazesh-sainudiin-4595...
lamastex/scalable-data-science
db/xtraResources/ProgGuides1_6/sqlProgrammingGuide/004_performanceTuning_sqlProgGuide.scala
Scala
unlicense
7,477
package score.discord.canti.command.api import net.dv8tion.jda.api.entities.User import net.dv8tion.jda.api.Permission import score.discord.canti.wrappers.jda.ID import score.discord.canti.wrappers.jda.Conversions.richSnowflake trait CommandPermissions: def canExecute(origin: CommandInvoker): Boolean def descrip...
ScoreUnder/canti-bot
src/main/scala/score/discord/canti/command/api/CommandPermissions.scala
Scala
agpl-3.0
1,028
/* * This file is part of the sohva project. * * 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 ...
gnieh/sohva
src/test/scala/gnieh/sohva/test/TestBasic.scala
Scala
apache-2.0
3,881
package io.circe import cats.data.Validated /** * [[Decoder]] and [[Encoder]] instances for disjunction types with reasonable names for the sides. */ object disjunctionCodecs { private[this] final val leftKey: String = "Left" private[this] final val rightKey: String = "Right" private[this] final val failureKe...
travisbrown/circe
modules/core/shared/src/main/scala/io/circe/disjunctionCodecs.scala
Scala
apache-2.0
1,086
/** * 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...
geeag/kafka
core/src/test/scala/unit/kafka/server/KafkaConfigTest.scala
Scala
apache-2.0
30,238
package skuber.examples.guestbook import skuber._ import skuber.json.format._ import akka.actor.{Actor, ActorRef, ActorLogging} import akka.actor.Props import akka.event.{LoggingReceive} import akka.pattern.pipe import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicits.global import scala.ut...
minatjanster/skuber
examples/src/main/scala/skuber/examples/guestbook/KubernetesProxyActor.scala
Scala
apache-2.0
6,191
/* * Copyright 2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicab...
arkadius/akka-ljug
src/test/scala/org/github/arkadius/ljugakka/Utils.scala
Scala
apache-2.0
846
package controllers.Post import controllers.{Secured} import models.Post.ModelComment import org.joda.time.DateTime import play.api.mvc.{Action, Controller} import play.modules.reactivemongo.MongoController import reactivemongo.api.collections.default.BSONCollection import reactivemongo.bson.{BSONDocument, BSONObjectI...
mawentao007/Mongo-play-angular
app/controllers/Post/Comment.scala
Scala
apache-2.0
1,762
/* * 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-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/rules/logical/subquery/FlinkRewriteSubQueryRuleTest.scala
Scala
apache-2.0
8,003
import java.io.{BufferedReader, InputStreamReader} import java.net.URL import sun.net.www.protocol.http.HttpURLConnection abstract class RequestResult case class DocExists(url: String) extends RequestResult case class OK(url: String) extends RequestResult object PostRequest { def send(url: String, json: String) = {...
abtv/personal-aggregator
rss-loader/src/main/scala/PostRequest.scala
Scala
mit
1,849
package com.twitter.finagle.httpx case class Status(code: Int) object Status { val Continue = Status(100) val SwitchingProtocols = Status(101) val Processing = Status(102) val Ok = Status(200) val Created = Status(201) val Accepted = Status(202) val NonAuthoritativeInformation = Status(203) val NoCont...
kristofa/finagle
finagle-httpx/src/main/scala/com/twitter/finagle/httpx/Status.scala
Scala
apache-2.0
3,617
package api import play.api.data.validation.ValidationError import play.api.libs.json._ /** * Error from an Api call. */ case class ApiError(error: String, details: Option[JsObject] = None) object ApiError { def apply(error: String, details: JsObject): ApiError = new ApiError(error, Some(details)) def a...
Blotre/blotre
app/api/Api.scala
Scala
mit
1,761
/* * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ package play.api.libs import java.util.Locale /** * MIME type utilities. */ object MimeTypes { /** * Retrieves the usual MIME type for a given extension. * * @param ext the file extension, e.g. `txt` * @return the MIME type, if...
jyotikamboj/container
pf-framework/src/play/src/main/scala/play/api/libs/MimeTypes.scala
Scala
mit
20,497
/* * 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/core/src/main/scala/org/apache/spark/sql/execution/joins/SortMergeJoin.scala
Scala
apache-2.0
14,588
package edu.gemini.pit.ui package object action { type ShellAction[A] = edu.gemini.pit.ui.util.ShellAction[A] }
arturog8m/ocs
bundle/edu.gemini.pit/src/main/scala/edu/gemini/pit/ui/action/package.scala
Scala
bsd-3-clause
120
package com.ximalaya.ratel.server import com.esotericsoftware.kryo.Kryo import com.esotericsoftware.kryo.io.Output import com.ximalaya.ratel.common.{MessageType, RpcRequest, RpcResponse} import com.ximalaya.ratel.interfaces.RpcTrait import com.ximalaya.ratel.serializer.{RpcRequestSerializer, RpcResponseSerializer} imp...
dongjiaqiang/Ratel
ratel-rpc/src/test/scala/com.ximalaya.ratel/server/RequestDecoderTest.scala
Scala
mit
6,047
package collins.solr import java.util.Date import scala.concurrent.Await import scala.concurrent.duration.Duration import Solr._ import org.specs2._ import collins.models.Asset import collins.models.AssetFinder import collins.models.AssetType import collins.models.AssetMeta import collins.models.AssetSearchParameter...
funzoneq/collins
test/collins/util/SolrSpec.scala
Scala
apache-2.0
36,619
package com.szadowsz.spark.ml import org.apache.spark.sql.DataFrame import org.apache.spark.sql.types.{StructField, StructType} /** * Created on 29/04/2016. */ package object expr { implicit class SchemaUtil(val schema: StructType) { def fieldIndexOf(col : String):Int = schema.fieldNames.indexOf(col) ...
zakski/project-cadisainmduit
module/spark/src/main/scala/com/szadowsz/spark/ml/expr/expr.scala
Scala
apache-2.0
1,694
/* * Copyright 2016 rdbc contributors * * 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...
rdbc-io/rdbc-pgsql
rdbc-pgsql-core/src/main/scala/io/rdbc/pgsql/core/internal/fsm/streaming/StrmWaitingForDescribe.scala
Scala
apache-2.0
3,775
package epfl class LabeledGraph extends Graph { class Node(label: String) extends BaseNode { def getLabel: String = label def self: Node = this } }
ashawley/odersky-zenger-2005
src/main/scala/epfl/LabeledGraph.scala
Scala
cc0-1.0
161
package mesosphere.marathon.integration.setup import mesosphere.marathon.integration.facades.MarathonFacade import org.scalatest.{ ConfigMap, Suite } import org.slf4j.LoggerFactory object MarathonClusterIntegrationTest { private val log = LoggerFactory.getLogger(getClass) } /** * Convenient trait to test against...
ss75710541/marathon
src/test/scala/mesosphere/marathon/integration/setup/MarathonClusterIntegrationTest.scala
Scala
apache-2.0
947
import java.io.IOException import java.util.Scanner object App { private val EXIT: String = "exit" private val POLL: String = "poll" @throws[IOException] def main(args: Array[String]) { lazy val sensors = List(new FireSensor, new SmokeSensor) lazy val controlUnit: ControlUnit = new ControlUnit(sensor...
BBK-PiJ-2015-67/sdp-portfolio
exercises/week02/alarmsystem-scala/src/App.scala
Scala
unlicense
618
/* * 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
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/DriverKubernetesCredentialsFeatureStepSuite.scala
Scala
apache-2.0
7,821
/* * 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-di/src/main/scala/wvlet/airframe/Binder.scala
Scala
apache-2.0
6,996
package org.everpeace.scalamata object CompositionExample extends App { import org.everpeace.scalamata._ sealed abstract class S case object S0 extends S case object S1 extends S case object S2 extends S case object Sink extends S def σ(c: Char) = (s: S, x: Char) => (s, x) match { case (S0, _c) ...
everpeace/scalamata
examples/src/main/scala/org/everpeace/scalamata/CompositionExample.scala
Scala
mit
2,055
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.proxy.DifferenceConf import com.twitter.diffy.thriftscala._ import com.twitter.finagle.tracing.Trace import co...
ljbx/diffy
src/main/scala/com/twitter/diffy/analysis/DifferenceCollector.scala
Scala
apache-2.0
4,105
/* * Copyright (C) 2016 University of Basel, Graphics and Vision Research Group * * 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) an...
unibas-gravis/scalismo-ui
src/main/scala/scalismo/ui/resources/icons/FontIcon.scala
Scala
gpl-3.0
5,122
package me.frmr.stripe import net.liftweb.common._ import net.liftweb.json._ import JsonDSL._ import Extraction._ import net.liftweb.util.Helpers._ import dispatch._, Defaults._ case class Coupon( id: String, livemode: Boolean, created: Long, duration: String, amountOff: Option[Long], currency: Optio...
farmdawgnation/streifen
src/main/scala/me/frmr/stripe/Coupon.scala
Scala
apache-2.0
2,068
/* * 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...
Myllyenko/incubator-toree
communication/src/main/scala/org/apache/toree/communication/security/SignatureCheckerActor.scala
Scala
apache-2.0
1,863
package pl.touk.nussknacker.engine.avro.source import cats.data.Validated.Valid import org.apache.avro.specific.SpecificRecord import pl.touk.nussknacker.engine.api.context.ValidationContext import pl.touk.nussknacker.engine.api.context.transformation.{DefinedEagerParameter, NodeDependencyValue} import pl.touk.nusskna...
TouK/nussknacker
utils/avro-components-utils/src/main/scala/pl/touk/nussknacker/engine/avro/source/SpecificRecordKafkaAvroSourceFactory.scala
Scala
apache-2.0
2,113
// // Logger.scala -- Scala object Logger // Project OrcScala // // $Id: Logger.scala 2933 2011-12-15 16:26:02Z jthywissen $ // // Created by jthywiss on Aug 21, 2010. // // Copyright (c) 2011 The University of Texas at Austin. All rights reserved. // // Use and redistribution of this file is governed by the license te...
laurenyew/cOrcS
src/orc/script/Logger.scala
Scala
bsd-3-clause
605
package com.twitter.finagle.protobuf.rpc.channel class ServerSideDecoder(val repo: MethodLookup, val service: Service) extends FrameDecoder with ProtobufDecoder { @throws(classOf[Exception]) def decode(ctx: ChannelHandlerContext, channel: Channel, buf: ChannelBuffer): Object = { decode(ctx, channel, buf, rep...
jamescway/finagle
finagle-protobuf/src/main/scala/com/twitter/finagle/protobuf/rpc/channel/ServerSideDecoder.scala
Scala
apache-2.0
493
package com.thetestpeople.trt.analysis import org.junit.runner.RunWith import org.scalatest._ import org.scalatest.junit.JUnitRunner import com.thetestpeople.trt.model._ import com.thetestpeople.trt.model.impl.DummyData import com.github.nscala_time.time.Imports._ object QuickTestAnalyserTest { val Tolerance = 0.0...
thetestpeople/trt
test/com/thetestpeople/trt/analysis/QuickTestAnalyserTest.scala
Scala
mit
2,003
package stepping import debug.Helper._ object AnonFunOnListInt { def main(args: Array[String]) { val l = List(1, 2, 4, 8) l.foreach(noop(_)) l.find(_ == 3) l.map(ret(_)) l.foldLeft(0)(_ + ret(_)) l foreach { i => noop(i) } } } class AnonFunOnListInt {}
espinhogr/ensime-server
testing/debug/src/main/scala/stepping/AnonFunOnListInt.scala
Scala
gpl-3.0
302
package hyperion import io.restassured.RestAssured.given import org.hamcrest.Matchers._ class HistorySpec extends BaseIntegrationSpec { "The History API" should { "expose meter readings by date" should { "return meter reading if data is present" in { given(). port(port). when()....
mthmulders/hyperion
integration-test/src/test/scala/hyperion/HistorySpec.scala
Scala
mit
1,500
/* Copyright 2012 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
twitter/scalding
scalding-core/src/main/scala/com/twitter/scalding/Tracing.scala
Scala
apache-2.0
3,732
package uk.gov.gds.ier.model case class Rank( serviceNumber: Option[String], rank: Option[String]) { def toApiMap = serviceNumber.map(serviceNumber => Map("servno" -> serviceNumber.toString)).getOrElse(Map.empty) ++ rank.map(rank => Map("rank" -> rank.toString)).getOrElse(Map.empty) }
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/model/Rank.scala
Scala
mit
306
package game.commanders.unite import android.os.Bundle import com.badlogic.gdx.backends.android._ class Main extends AndroidApplication { override def onCreate(savedInstanceState: Bundle) { super.onCreate(savedInstanceState) val config = new AndroidApplicationConfiguration config.useAccelerometer = fals...
tommyettinger/CommandersUnite
commanders-unite/android/src/main/scala/Main.scala
Scala
mit
499
package almond.kernel import java.nio.charset.StandardCharsets.UTF_8 import java.nio.file.{Files, Path, Paths} import java.util.UUID import almond.channels.zeromq.ZeromqThreads import almond.channels.{Channel, ConnectionParameters, Message => RawMessage} import almond.interpreter.{IOInterpreter, Interpreter, Interpre...
alexarchambault/jupyter-scala
modules/shared/kernel/src/main/scala/almond/kernel/Kernel.scala
Scala
apache-2.0
9,980
/* * 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
sql/core/src/test/scala/org/apache/spark/sql/SparkSessionBuilderSuite.scala
Scala
apache-2.0
10,952
package com.phasmid.hedge_fund.rules /** * @author robinhillyard */ case class Rule(predicate: Predicate) extends Predicate { // TODO don't think we need to override this here def apply(candidate: Candidate): Either[Throwable, Boolean] = predicate.apply(candidate) } object Rule { // Note that this expression ...
rchillyard/Scalaprof
hedge-fund/src/main/scala/com/phasmid/hedge_fund/rules/Rule.scala
Scala
gpl-2.0
1,191
package org.jetbrains.jps.incremental.scala package local package zinc import java.io.{PrintWriter, StringWriter} import java.util.ServiceLoader import org.jetbrains.jps.incremental.messages.BuildMessage.Kind import org.jetbrains.jps.incremental.scala.data.CompilationData import sbt.internal.inc.Analysis import xsbti...
triplequote/intellij-scala
scala/compiler-jps/src/org/jetbrains/jps/incremental/scala/local/zinc/CompilationMetadata.scala
Scala
apache-2.0
3,941
package scryetek.vecmath final class Mat2( var m00: Float, var m01: Float, var m10: Float, var m11: Float) { @inline def set( m00: Float = this.m00, m01: Float = this.m01, m10: Float = this.m10, m11: Float = this.m11): Mat2 = { this.m00 = m00; this.m01 = m01 this.m10 = m10; this.m11 = m11 t...
mseddon/vecmath
shared/src/main/scala/scryetek/vecmath/Mat2.scala
Scala
bsd-3-clause
4,491
object Test extends Function0[Int] { // this and v resolve to Test.this, Test.v not A.this, A.v class A(x: Function0[Int] = this)(val a: Int = v, val b: Int = v * x()) extends Function0[Int] { val v = 3 override def toString = x.toString +", "+ a +", "+ b // ordinary instance scope def m(i: Int = v...
martijnhoekstra/scala
test/files/run/t5543.scala
Scala
apache-2.0
1,306
/* NSC -- new Scala compiler * Copyright 2005-2013 LAMP/EPFL * @author Martin Odersky */ package scala.tools.nsc.ast.parser abstract class Change case class Insertion(text: String) extends Change case class Deletion(nchars: Int) extends Change
felixmulder/scala
src/compiler/scala/tools/nsc/ast/parser/Change.scala
Scala
bsd-3-clause
250
package com.frenchcoder.sip import akka.actor.ActorRef import javax.sip._ class SipEventForwarder(client: ActorRef) extends SipListener { def processRequest(event: RequestEvent): Unit = { } def processResponse(event: ResponseEvent): Unit = { } def processDialogTerminated(event: DialogTerminatedEvent): ...
jpthomasset/alfred
src/main/scala/com/frenchcoder/sip/SipEventForwarder.scala
Scala
apache-2.0
564
package neverlink class A
bazelbuild/rules_scala
test/src/main/scala/scalarules/test/neverlink/A.scala
Scala
apache-2.0
26
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
wangmiao1981/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/BloomFilterBenchmark.scala
Scala
apache-2.0
3,110
/* * 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...
jenniew/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/torch/CSubTableSpec.scala
Scala
apache-2.0
2,289
package no.antares.dbunit.converters /* CamelNameConverter.scala Copyright 2011 Tommy Skodje (http://www.antares.no) 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.a...
2my/test-data-control
src/main/scala/no/antares/dbunit/converters/CamelNameConverter.scala
Scala
apache-2.0
1,483
package org.jetbrains.bsp.protocol import java.io.File import java.net.URI import ch.epfl.scala.bsp.InitializeBuildParams import monix.eval.Task import org.jetbrains.bsp.{BspError, BspErrorMessage} import org.jetbrains.bsp.protocol.BspServerConnector.BspConnectionMethod abstract class BspServerConnector(initParams:...
jastice/intellij-scala
bsp/src/org/jetbrains/bsp/protocol/bspConnector.scala
Scala
apache-2.0
1,341
package integrationtest import model._ import controller.Controllers import skinny.test.{ FactoryGirl, SkinnyFlatSpec } class ProgrammersControllerSpec extends SkinnyFlatSpec with unit.SkinnyTesting { addFilter(Controllers.programmers, "/*") def skill = Skill.findAllWithLimitOffset(1, 0).headOption.getOrElse { ...
skinny-framework/skinny-framework
example/src/test/scala/integrationtest/ProgrammersControllerSpec.scala
Scala
mit
5,909
package text.normalizer import java.nio.charset.{CodingErrorAction, StandardCharsets} import java.nio.file.{Path, Paths} import text.{StringNone, StringOption} import util.Config import scala.collection.mutable import scala.collection.mutable.ListBuffer import scala.sys.process.Process import scala.util.matching.Reg...
ktr-skmt/FelisCatusZero
src/main/scala/text/normalizer/DictionaryBasedNormalizer.scala
Scala
apache-2.0
3,216
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
witgo/spark
sql/core/src/test/scala/org/apache/spark/sql/sources/CreateTableAsSelectSuite.scala
Scala
apache-2.0
8,938
package com.chriswk.bnet.wow.model case class Item(armor: Long, baseArmor: Long, bonusStats: List[StatHolder], buyPrice: Long, containerSlots: Long, descrription: String, disenchantingSkillRank: Long, displayInfoId: Long, equippable: Boolean, hasSockets: ...
chriswk/sbnetapi
src/main/scala/com/chriswk/bnet/wow/model/Item.scala
Scala
mit
453
object Macros { def foo1[T]: Unit = macro Impls.fooNullary[T] def foo2[T](): Unit = macro Impls.fooEmpty[T] def bar1[T](x: Int): Unit = macro Impls.barNullary[T] def bar2[T](x: Int)(): Unit = macro Impls.barEmpty[T] } object Test extends dotty.runtime.LegacyApp { Macros.foo1[Int] Macros.foo2[Int] Macros....
yusuke2255/dotty
tests/disabled/macro/run/macro-expand-nullary-generic/Macros_Test_2.scala
Scala
bsd-3-clause
403
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
tkunicki/geomesa
geomesa-features/geomesa-feature-kryo/src/test/scala/org/locationtech/geomesa/features/kryo/KryoGeometrySerializerTest.scala
Scala
apache-2.0
4,635
package lila.security import com.github.blemale.scaffeine.Cache import org.joda.time.Instant import scala.concurrent.duration.FiniteDuration import lila.common.base.Levenshtein.isLevenshteinDistanceLessThan import lila.user.User final class Flood(duration: FiniteDuration) { import Flood._ private val floodNumb...
luanlv/lila
modules/security/src/main/Flood.scala
Scala
mit
1,630
import i9916b.T trait Test { def foo: T }
dotty-staging/dotty
sbt-test/scala2-compat/i9916b/main/i9916b-test.scala
Scala
apache-2.0
45
/* __ *\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2013, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\___/_/ |_/...
felixmulder/scala
src/library/scala/runtime/AbstractFunction7.scala
Scala
bsd-3-clause
742
package org.apache.spark.ml.parity.feature import org.apache.spark.ml.parity.SparkParityBase import org.apache.spark.ml.feature.{PolynomialExpansion, VectorAssembler} import org.apache.spark.ml.{Pipeline, Transformer} import org.apache.spark.sql.DataFrame /** * Created by hollinwilkins on 10/30/16. */ class Polyn...
combust/mleap
mleap-spark/src/test/scala/org/apache/spark/ml/parity/feature/PolynomialExpansionParitySpec.scala
Scala
apache-2.0
752
package test.dao import com.typesafe.scalalogging.LazyLogging import wow.dto.WowCharacter import org.specs2.mutable.{BeforeAfter, Specification} import org.specs2.specification.Scope import reactivemongo.bson.{BSONDocument, BSONDocumentReader, Macros} import scala.concurrent.ExecutionContext.Implicits.global import o...
MeMpy/wow-characters
src/test/scala/test/dao/WowCharacterServiceSpecs.scala
Scala
gpl-3.0
2,452
/** * Copyright 2015 Otto (GmbH & Co KG) * * 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...
hpzorn/schedoscope
schedoscope-core/src/test/scala/org/schedoscope/test/HiveTestFrameworkTest.scala
Scala
apache-2.0
2,024
package com.gmail.at.pukanito.model.attributes /** * Exception thrown when an attribute definition is added to a model with an already existing id. * * @constructor Create a duplicate attribute definition exception. * @param value The item that failed to added. */ class DuplicateAttributeDefinitionException(value...
pukanito/bigdatanalysis
src/main/scala/com/gmail/at/pukanito/model/attributes/AttributeModel.scala
Scala
gpl-3.0
8,130
package edu.gemini.model.p1.visibility import edu.gemini.model.p1.immutable._ import edu.gemini.model.p1.immutable.SemesterOption.{A, B} import edu.gemini.model.p1.mutable.Band.BAND_1_2 import edu.gemini.model.p1.mutable.GnirsFilter.ORDER_3 import edu.gemini.spModel.core.{Declination, Angle, RightAscension, Coordinate...
spakzad/ocs
bundle/edu.gemini.model.p1/src/test/scala/edu/gemini/model/p1/visibility/TestTargetVisibilityTest.scala
Scala
bsd-3-clause
14,301
package demo import Config._ import slick.sql.SqlProfile.ColumnOption import scala.concurrent.duration._ import scala.concurrent.Await /** * This customizes the Slick code generator. We only do simple name mappings. * For a more advanced example see https://github.com/cvogt/slick-presentation/tree/scal...
tminglei/slick-pg
examples/codegen-customization/codegen/src/main/scala/demo/CustomizedCodeGenerator.scala
Scala
bsd-2-clause
3,726
package jigg.pipeline /* Copyright 2013-2016 Hiroshi Noji Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
mynlp/jigg
src/main/scala/jigg/pipeline/SpaceTokenizerAnnotator.scala
Scala
apache-2.0
1,886
package io.github.shogowada.scalajs.history import scala.scalajs.js import scala.scalajs.js.annotation.JSImport @js.native trait History extends js.Object { def push(url: String): Unit = js.native def replace(url: String): Unit = js.native def go(delta: Int): Unit = js.native def goBack(): Unit = js.native ...
shogowada/scalajs-reactjs
history/src/main/scala/io/github/shogowada/scalajs/history/History.scala
Scala
mit
593
package shardakka.keyvalue import akka.actor._ import akka.contrib.pattern.{ ClusterSingletonProxy, ClusterSingletonManager } import akka.pattern.ask import akka.util.Timeout import im.actor.server.commons.serialization.ActorSerializer import shardakka.{ StringCodec, Codec, ShardakkaExtension } import scala.collectio...
winiceo/actor-platform
actor-server/shardakka/src/main/scala/shardakka/keyvalue/SimpleKeyValue.scala
Scala
mit
3,173
/* Copyright (c) 2009-2012, The Regents of the University of California All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this lis...
cdlib/weari
src/main/scala/org/cdlib/was/weari/CachingIterator.scala
Scala
bsd-3-clause
2,246
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
wangmiao1981/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormatWriter.scala
Scala
apache-2.0
15,496
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
jooooooon/rudder
rudder-web/src/main/scala/com/normation/rudder/web/snippet/node/SearchNodes.scala
Scala
agpl-3.0
10,937
package com.ebay.neutrino import com.ebay.neutrino.config.{NeutrinoSettings, VirtualPool} import org.scalatest.{FlatSpec, Matchers} class NeutrinoPoolsTest extends FlatSpec with Matchers with NeutrinoTestSupport { implicit val core = new NeutrinoCore(NeutrinoSettings.Empty) def startCore() = false it shoul...
eBay/Neutrino
src/test/scala/com/ebay/neutrino/NeutrinoPoolsTest.scala
Scala
apache-2.0
2,399
package org.eichelberger.sfc.utils import org.eichelberger.sfc.SpaceFillingCurve._ case class LocalityResult( locality: Double, normalizedLocality: Double, localityInverse: Double, normalizedLocalityInverse: Double, sampleSize: Int, coverage: Double) object LocalityEstimator { val maxEvaluations = 1L <...
cne1x/sfseize
src/main/scala/org/eichelberger/sfc/utils/LocalityEstimator.scala
Scala
apache-2.0
4,021
package com.googlecode.kanbanik.commands import com.googlecode.kanbanik.model.Permission import com.googlecode.kanbanik.dtos.PermissionType import org.junit.runner.RunWith import org.scalatest.FlatSpec import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class EditUserCommandTest extends FlatSpec { ...
kanbanik/kanbanik
kanbanik-server/src/test/scala/com/googlecode/kanbanik/commands/EditUserCommandTest.scala
Scala
apache-2.0
3,491
package io.github.daviddenton.finagle.aws import java.nio.charset.StandardCharsets import javax.crypto.Mac import javax.crypto.spec.SecretKeySpec import aws.Hex object AwsHmacSha256 { def hash(payload: String): String = hash(payload.getBytes(StandardCharsets.UTF_8)) def hash(payload: Array[Byte]): String = Dige...
daviddenton/finagle-aws
src/main/scala/io/github/daviddenton/finagle/aws/AwsHmacSha256.scala
Scala
apache-2.0
660
/* * Copyright (c) 2016-2019 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
RetentionGrid/snowplow
3-enrich/scala-common-enrich/src/main/scala/com.snowplowanalytics.snowplow.enrich/common/adapters/registry/StatusGatorAdapter.scala
Scala
apache-2.0
4,393
package pme.connect4.gui import scalafx.scene.Node trait ChipView extends Node { }
pme123/scala-connect4
src/main/scala/pme/connect4/gui/ChipView.scala
Scala
mit
87
class Foo(foo: String) { def bar() = println(foo) }
AtomLinter/linter-scalac
spec/fixtures/project2/src/main/scala/Foo.scala
Scala
mit
54
package com.goticks import akka.actor._ import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server._ import akka.pattern.ask import akka.util.Timeout import scala.concurrent.ExecutionCont...
RayRoestenburg/akka-in-action
chapter-up-and-running/src/main/scala/com/goticks/RestApi.scala
Scala
mit
3,021
/* * Copyright 2009-2016 DigitalGlobe, 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 ag...
akarmas/mrgeo
mrgeo-core/src/main/scala/org/mrgeo/data/rdd/AutoPersister.scala
Scala
apache-2.0
2,216
package io.iohk.ethereum.metrics import java.util.concurrent.atomic.AtomicReference import io.micrometer.core.instrument._ import io.micrometer.core.instrument.simple.SimpleMeterRegistry import io.prometheus.client.exporter.HTTPServer import io.prometheus.client.hotspot.DefaultExports import scala.util.Try case clas...
input-output-hk/etc-client
src/main/scala/io/iohk/ethereum/metrics/Metrics.scala
Scala
mit
3,135
object A { def foo[T <: List[String]](x : T) : T = x def bar(f: { def foo[T <: List[S]](x : T) : T } forSome { type S }) = 1 def bar(s: String) = "text" /*start*/bar(A)/*end*/ } //Int
ilinum/intellij-scala
testdata/typeInference/bugs5/SCL3354.scala
Scala
apache-2.0
192
/* * 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 ...
Aegeaner/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilterSuite.scala
Scala
apache-2.0
20,052
package org.infinispan.spark.suites import org.infinispan.spark.domain.User import org.infinispan.spark.test._ import org.scalatest.{DoNotDiscover, FunSuite, Matchers} @DoNotDiscover class DatasetWithScalaEntitySuite extends FunSuite with UsersCache with Spark with MultipleServers with Matchers with DatasetAssertio...
infinispan/infinispan-spark
src/test/scala/org/infinispan/spark/suites/DatasetWithScalaEntitySuite.scala
Scala
apache-2.0
925
// -*- mode: Scala;-*- // Filename: search.scala // Authors: luciusmeredith // Creation: Wed Feb 1 09:12:45 2017 // Copyright: See site license // Description: // ------------------------------------------------------------------------ package coop....
rchain/Rholang
src/main/scala/lib/zipper/search.scala
Scala
mit
432
package controllers import play.api._ import play.api.mvc._ import play.api.data._ import play.api.data.Forms._ import play.api.libs.json.Json import play.api.libs.json._ import Play.current // you need this import to have combinators import play.api.libs.functional.syntax._ import play.api.templates._ import models...
olegsmetanin/playapingmod
app/controllers/APIv1.scala
Scala
mit
4,990
package com.lookout.borderpatrol package object routers { }
maheshkelkar/borderpatrol
server/src/main/scala/com/lookout/borderpatrol/routers/package.scala
Scala
mit
62
package com.twitter.concurrent import org.junit.runner.RunWith import org.scalatest.WordSpec import org.scalatest.junit.JUnitRunner import com.twitter.util.Return @RunWith(classOf[JUnitRunner]) class TxTest extends WordSpec { "Tx.twoParty" should { "commit when everything goes dandy" in { val (stx, rtx)...
BuoyantIO/twitter-util
util-core/src/test/scala/com/twitter/concurrent/TxTest.scala
Scala
apache-2.0
1,858
package ar.com.crypticmind.swagger.modelgen import com.wordnik.swagger.model.ModelProperty import reflect.macros.whitebox.Context class WordnikModelPropertyMapping[C <: Context](val c: C) { import c.universe._ abstract class ModelPropertyGenerator { def toModelProperty: c.Expr[ModelProperty] def dependen...
swagger-api/scala-swagger-modelgen
macros/src/main/scala_2.11/ar/com/crypticmind/swagger/modelgen/WordnikModelPropertyMapping.scala
Scala
mit
4,524
package org.denigma.drugage package object domain { type DrugId = String }
denigma/drugage
app/jvm/src/main/scala/org.denigma.drugage/domain/package.scala
Scala
mpl-2.0
80