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 ch.epfl.lamp.slick.direct
import ch.epfl.directembedding.DirectEmbeddingUtils
import ch.epfl.yinyang.transformers.{ PostProcessing, PreProcessing }
import scala.reflect.macros.blackbox.Context
class ProjectionProcessing[C <: Context](ctx: C) extends PreProcessing(ctx)(Nil) {
import c.universe._
override... | olafurpg/slick-direct | slick-direct/src/main/scala/ch/epfl/lamp/slick/direct/ProjectionProcessing.scala | Scala | bsd-3-clause | 1,762 |
package chandu0101.scalajs.react.components.util
import chandu0101.scalajs.react.components.models.{RElementPosition, RPoint}
import japgolly.scalajs.react.{ReactEventH, ReactEventI}
import org.scalajs.dom.Event
import scala.scalajs.js.Date
trait MTypes {
type REventIBooleanUnit = (ReactEventI, Boolean) => Unit
... | mproch/scalajs-react-components | core/src/main/scala/chandu0101/scalajs/react/components/util/MTypes.scala | Scala | apache-2.0 | 1,474 |
package scalastudy.concurrent.wordstat
import akka.actor.Actor
import akka.event.Logging
import scala.collection.immutable.List
import scala.collection.mutable.{HashMap, Map}
import scalastudy.concurrent.ActorTerminationMsg
/**
* Created by lovesqcc on 16-4-2.
*/
object StatWordActor {
var stat:Map[String,Int] =... | shuqin/ALLIN | src/main/java/scalastudy/concurrent/wordstat/StatWordActor.scala | Scala | gpl-3.0 | 1,285 |
package unluac.decompile.target
import unluac.decompile.Output
case class UpvalueTarget(name:String) extends Target {
def print(out: Output) {
out.print(name)
}
def printMethod(out: Output) {
throw new IllegalStateException
}
} | danielwegener/unluac-scala | shared/src/main/scala/unluac/decompile/target/UpvalueTarget.scala | Scala | mit | 247 |
/*
* 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 ... | aokolnychyi/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/conditionalExpressions.scala | Scala | apache-2.0 | 12,188 |
object Test extends App {
class A { class V }
abstract class B[S] {
def foo(t: S, a: A)(v: a.V): Unit
}
val b1 = new B[String] {
def foo(t: String, a: A)(v: a.V) = () // Bridge method required here!
}
b1.foo("", null)(null)
}
| lampepfl/dotty | tests/pending/run/t6135.scala | Scala | apache-2.0 | 249 |
/**
* Copyright 2015 Zaradai
*
* 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 writ... | zaradai/lattrac | src/main/scala/com/zaradai/lattrac/analytics/EventListener.scala | Scala | apache-2.0 | 747 |
/*
* Copyright (c) 2010-2011 Belmont Technology Pty Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* U... | GrahamLea/SodaTest | sodatest-runtime/src/main/scala/org/sodatest/runtime/data/results/ReportBlockResult.scala | Scala | apache-2.0 | 3,295 |
/*
* 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/nn/AddSpec.scala | Scala | apache-2.0 | 1,880 |
package d2
import scala.language.{implicitConversions, higherKinds}
import scalaz.Monad
trait Directives1Interop[F[+_]] {
implicit def fromUnfilteredDirective[T, L, R](d1: unfiltered.directives.Directive[T, L, R])(implicit F: Monad[F]): d2.Directive[T, F, L, R] = {
import unfiltered.directives.{Result => Res}
... | shiplog/directives2 | src/main/scala/d2/Directives1Interop.scala | Scala | mit | 740 |
package pl.writeonly.son2.json.glue
import pl.writeonly.son2.apis.config.RWTConfig
import pl.writeonly.son2.funs.glue.CreatorConverterOr
class CreatorConverterOrJson
extends CreatorConverterOr(
new ChainNotationConfigJson().get,
new ChainNotationRWTJson()
) {
override def configOpt(s: String): O... | writeonly/son2 | scallions-impl/scallions-json/src/main/scala/pl/writeonly/son2/json/glue/CreatorConverterOrJson.scala | Scala | apache-2.0 | 379 |
/*
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | planet42/Laika | core/shared/src/main/scala/laika/markdown/ast/elements.scala | Scala | apache-2.0 | 4,325 |
package org.embulk.input.dynamodb
import java.io.File
import java.{util => JUtil}
import com.amazonaws.services.dynamodbv2.model.AttributeValue
import com.fasterxml.jackson.databind.ObjectMapper
import org.embulk.input.dynamodb.deprecated.AttributeValueHelper._
import org.hamcrest.CoreMatchers._
import org.hamcrest.M... | lulichn/embulk-input-dynamodb | src/test/scala/org/embulk/input/dynamodb/AttributeValueHelperTest.scala | Scala | mit | 9,725 |
package ui.scene
trait SceneModule {
def initSceneModule(scene: Scene): Unit = {}
def sceneDraw(scene: Scene): Unit = {}
def sceneItemDraw(scene: Scene, sceneItem: SceneItem): Unit = {}
}
| gvatn/play-scalajs-webgl-spark | client/src/main/scala/ui/scene/SceneModule.scala | Scala | mit | 202 |
/*
* 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 ... | techaddict/spark | external/avro/src/main/scala/org/apache/spark/sql/v2/avro/AvroScanBuilder.scala | Scala | apache-2.0 | 1,575 |
package com.twitter.finagle.toggle
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.core.JsonFactory
import com.fasterxml.jackson.core.util.{DefaultIndenter, DefaultPrettyPrinter}
import com.fasterxml.jackson.databind.{MappingJsonFactory, ObjectMapper}
import com.fasterxml.jackson.modu... | koshelev/finagle | finagle-toggle/src/main/scala/com/twitter/finagle/toggle/JsonToggleMap.scala | Scala | apache-2.0 | 7,524 |
package io.zengin.telegrambot
import io.zengin.telegrambot.types.requests._
import io.zengin.telegrambot.types._
import io.zengin.telegrambot.types.requests.RequestsJsonSupport._
import scala.util.{ Success, Failure }
import scala.concurrent.Future
import akka.actor.ActorSystem
import spray.client.pipelining._
impor... | hzengin/telegrambot | src/main/scala/io/zengin/telegrambot/TelegramApi.scala | Scala | mit | 10,668 |
package org.jetbrains.plugins.scala
package annotator.createFromUsage
import com.intellij.codeInsight.template.TemplateBuilder
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.fileEditor.{FileEditorManager, OpenFileDescriptor}
import com.intellij.psi.util.PsiTreeUtil
import com.intellij.psi.{PsiCl... | LPTK/intellij-scala | src/org/jetbrains/plugins/scala/annotator/createFromUsage/CreateFromUsageUtil.scala | Scala | apache-2.0 | 6,157 |
package org.openmole.site
import java.util.UUID
import scalatags.Text.TypedTag
import scalatags.generic.StylePair
/*
* Copyright (C) 01/04/16 // mathieu.leclaire@openmole.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as ... | openmole/openmole | openmole/bin/org.openmole.site/jvm/src/main/scala/org/openmole/site/tools.scala | Scala | agpl-3.0 | 9,618 |
package skinny.exception
/**
* Represents view template issue.
*
* @param message message
* @param cause cause
*/
case class ViewTemplateNotFoundException(message: String, cause: Throwable = null)
extends RuntimeException(message, cause)
| skinny-framework/skinny-framework | framework/src/main/scala/skinny/exception/ViewTemplateNotFoundException.scala | Scala | mit | 253 |
package com.maxmind.gatling.simulation
import ammonite.ops._
import io.gatling.app.GatlingStatusCodes._
import java.util.Date
import scala.collection.immutable.HashMap
import scala.sys.process._
import scalaz.Scalaz._
import scalaz._
import com.maxmind.gatling.simulation.RunnerConfig.{Quiet, Verbose, Verbosity}
/**
... | maxmind/gatling-gen | src/main/scala/com/maxmind/gatling/simulation/Runner.scala | Scala | apache-2.0 | 3,604 |
package com.mogproject.mogami.core.io.sfen
import com.mogproject.mogami.core.Square
import com.mogproject.mogami.core.game.Game.{HistoryHash, Position}
import com.mogproject.mogami.core.game.{Branch, Game}
import com.mogproject.mogami.core.io.RecordFormatException
import com.mogproject.mogami.core.move.{Move, MoveBuil... | mogproject/mog-core-scala | shared/src/main/scala/com/mogproject/mogami/core/io/sfen/SfenGameIO.scala | Scala | apache-2.0 | 6,751 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | hequn8128/flink | flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/stream/table/TableSourceTest.scala | Scala | apache-2.0 | 15,474 |
package com.tribbloids.spookystuff
import java.util.UUID
import java.util.concurrent.TimeUnit
import com.esotericsoftware.kryo.Kryo
import com.tribbloids.spookystuff.conf.{DirConf, SpookyConf}
import com.tribbloids.spookystuff.dsl._
import com.tribbloids.spookystuff.doc._
import com.tribbloids.spookystuff.metrics.Spo... | tribbloid/spookystuff | core/src/main/scala/com/tribbloids/spookystuff/SpookyKryoRegistrator.scala | Scala | apache-2.0 | 1,658 |
/*
* 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/test/scala/org/apache/spark/sql/execution/TungstenSortSuite.scala | Scala | apache-2.0 | 3,681 |
package onion.compiler.tools
import onion.tools.Shell
class DecrementSpec extends AbstractShellSpec {
describe("Decrement class") {
it("demonstrate decrement(--) feature") {
val result = shell.run(
"""
| class Decrement {
| public:
| static def main(args: String[]):... | kmizu/onion | src/test/scala/onion/compiler/tools/DecrementSpec.scala | Scala | bsd-3-clause | 563 |
package io.scalac.slack.websockets
import akka.actor.{Actor, Props}
import akka.io.IO
import io.scalac.slack._
import spray.can.Http
import spray.can.server.UHttp
import spray.can.websocket.WebSocketClientWorker
import spray.can.websocket.frame.{CloseFrame, StatusCode, TextFrame}
import spray.http.{HttpHeaders, HttpMe... | adhoclabs/scala-slack-bot-core | src/main/scala/io/scalac/slack/websockets/WSActor.scala | Scala | mit | 2,372 |
import Macro._
object Test extends App {
new StringContext().f3() // error
}
| som-snytt/dotty | tests/neg-macros/tasty-string-interpolator-position-b/Test_2.scala | Scala | apache-2.0 | 83 |
package ch.wsl.fireindices.app
import ch.wsl.fireindices.app.ui.App
object LauncherApp {
def main(args: Array[String]){
if (args.length == 0)
App.main(args)
else
ConsoleApp.main(args)
}
}
| Insubric/fire-calculator | Launcher.scala | Scala | gpl-2.0 | 213 |
package edu.jingw.raytracer
import org.scalatest.FlatSpec
class RaySpec extends FlatSpec {
"toString" should "give direction and start" in {
assert(Ray(Vector.I, Vector.J).toString == "x = <1.0, 0.0> + <0.0, 1.0>t")
}
}
| jingw/raytracer | src/test/scala/edu/jingw/raytracer/RaySpec.scala | Scala | mit | 230 |
/*
* Copyright (c) 2014 Dufresne Management Consulting LLC.
*/
package com.nickelsoftware.bettercare4me.hedis.hedis2014
import scala.util.Random
import org.joda.time.DateTime
import org.joda.time.Interval
import com.nickelsoftware.bettercare4me.hedis.HEDISRule
import com.nickelsoftware.bettercare4me.hedis.Scorecar... | reactivecore01/bettercare4.me | play/app/com/nickelsoftware/bettercare4me/hedis/hedis2014/CIS_HB_Rule.scala | Scala | apache-2.0 | 5,912 |
/*
* 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 ... | icexelloss/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/objects.scala | Scala | apache-2.0 | 24,374 |
package org.jetbrains.plugins.scala
package lang
package parser
package parsing
package base
import org.jetbrains.plugins.scala.lang.lexer.{ScalaTokenType, ScalaTokenTypes}
import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder
object End {
private val isAllowedEndToken = Set(
ScalaToken... | JetBrains/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/parser/parsing/base/End.scala | Scala | apache-2.0 | 1,592 |
package gapt.expr
import gapt.expr.ty.Ty
trait VarOrConst extends Expr {
def name: String
}
/**
* Matches constants and variables, but nothing else.
*/
object VarOrConst {
def unapply( e: VarOrConst ): Some[( String, Ty, List[Ty] )] =
e match {
case Const( n, t, p ) => Some( n, t, p )
case Var(... | gapt/gapt | core/src/main/scala/gapt/expr/VarOrConst.scala | Scala | gpl-3.0 | 361 |
package org.ensime.util
import scala.collection.mutable.{ Set => MutableSet }
import scala.collection.mutable.{ HashMap, HashSet }
import org.objectweb.asm.FieldVisitor;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.commons.EmptyVisitor;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm... | tbje/ensime | src/main/scala/org/ensime/util/ClassIterator.scala | Scala | gpl-3.0 | 4,285 |
package org.openeyes.api.controllers
import org.json4s.mongo.ObjectIdSerializer
import org.json4s.{DefaultFormats, FullTypeHints}
import org.openeyes.api.forms.EncounterForm
import org.openeyes.api.models.{Element, Encounter}
import org.openeyes.api.services.EncounterService
import org.openeyes.api.stacks.ApiStack
imp... | openeyes/poc-backend | src/main/scala/org/openeyes/api/controllers/EncounterController.scala | Scala | gpl-3.0 | 2,330 |
/*
* 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 ... | rmetzger/flink | flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/physical/stream/StreamPhysicalWindowTableFunctionRule.scala | Scala | apache-2.0 | 2,664 |
/*
* Copyright (c) 2015 Goldman Sachs.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompany this distribution.
* The Eclipse Public License is available at http://www.ecli... | g-votte/eclipse-collections | scala-unit-tests/src/test/scala/org/eclipse/collections/impl/map/mutable/UnmodifiableMutableMapScalaTest.scala | Scala | bsd-3-clause | 935 |
package uk.gov.dvla.vehicles.presentation.common.controllers
import play.api.test.FakeRequest
import play.api.test.Helpers.{OK, contentAsString, defaultAwaitTimeout}
import uk.gov.dvla.vehicles.presentation.common.TestWithApplication
import uk.gov.dvla.vehicles.presentation.common.helpers.{CookieFactoryForUnitSpecs, U... | dvla/vehicles-presentation-common | common-test/test/uk/gov/dvla/vehicles/presentation/common/controllers/ValtechSelectControllerUnitSpec.scala | Scala | mit | 2,088 |
/*
* ControlPlatform.scala
* (FScape)
*
* Copyright (c) 2001-2022 Hanns Holger Rutz. All rights reserved.
*
* This software is published under the GNU Affero General Public License v3+
*
*
* For further information, please contact Hanns Holger Rutz at
* contact@sciss.de
*/
package de.sciss.fscape.stre... | Sciss/FScape-next | core/jvm/src/main/scala/de/sciss/fscape/stream/ControlPlatform.scala | Scala | agpl-3.0 | 1,050 |
class ScalaFile1 {
val value = "value"
def function: Unit = {
println("function called.")
}
}
| Sagacify/sonar-scala | src/test/resources/ScalaFile1.scala | Scala | lgpl-3.0 | 105 |
/*
* Copyright (c) 2014 Alvaro Agea.
*
* 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... | aagea/rogerfs | project/Build.scala | Scala | apache-2.0 | 1,601 |
object Test {
trait A[+X] {
protected[this] def f(x: X): X = x
}
trait B extends A[B] {
def kaboom = f(new B {})
}
// protected[this] disables variance checking
// of the signature of `f`.
//
// C's parent list unifies A[B] with A[C]
//
// The protected[this] loophole is widely used
// in the collect... | yusuke2255/dotty | tests/pos/t7093.scala | Scala | bsd-3-clause | 583 |
package dk.gp.cogp.svi
import breeze.linalg.DenseMatrix
import breeze.linalg.inv
import breeze.linalg.InjectNumericOps
import breeze.linalg.cholesky
import dk.gp.math.invchol
import dk.gp.cogp.lb.LowerBound
import dk.gp.cogp.lb.grad.calcLBGradVEta1
import dk.gp.cogp.lb.grad.calcLBGradVEta2
import dk.gp.cogp.model.Cogp... | danielkorzekwa/bayes-scala-gp | src/main/scala/dk/gp/cogp/svi/stochasticUpdateV.scala | Scala | bsd-2-clause | 1,538 |
package common.runner
import cucumber.api.CucumberOptions
import cucumber.api.junit.Cucumber
import org.junit.runner.RunWith
@RunWith(classOf[Cucumber])
@CucumberOptions(
features = Array("src/test/resources/features/"),
glue = Array("common.stepDefs"),
tags = Array("@suite"),
plugin = Array("pretty", "html:t... | avinash-anand/CucumberScala1 | src/test/scala/common/runner/RunSuite.scala | Scala | gpl-2.0 | 382 |
/*
* 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... | vivosys/scalatest | src/test/scala/org/scalatest/FunSpecSuite.scala | Scala | apache-2.0 | 55,571 |
package com.ometer.mongo
import com.ometer.ClassAnalysis
import com.ometer.bson.BsonAST.BObject
import com.mongodb.DBObject
import org.bson.types.ObjectId
/**
* Trait typically added to the companion object for an entity case class.
* This trait's interface supports operations on the collection itself.
* Here, the... | havocp/mongo-scala-thingy | src/main/scala/com/ometer/mongo/CollectionOperations.scala | Scala | apache-2.0 | 2,010 |
package com.overviewdocs.models.tables
import com.overviewdocs.database.Slick.api._
import com.overviewdocs.models.UploadedFile
import java.sql.Timestamp
class UploadedFilesImpl(tag: Tag) extends Table[UploadedFile](tag, "uploaded_file") {
def id = column[Long]("id", O.PrimaryKey)
def contentDisposition = column... | overview/overview-server | common/src/main/scala/com/overviewdocs/models/tables/UploadedFiles.scala | Scala | agpl-3.0 | 979 |
package geotrellis.config.json
import geotrellis.config._
import geotrellis.spark.etl.config.BackendProfile
import geotrellis.spark.etl.config.json._
import spray.json.RootJsonFormat
import spray.json._
import spray.json.DefaultJsonProtocol._
import java.time.{LocalDate, ZoneOffset, ZonedDateTime}
trait ConfigForma... | geotrellis/geotrellis-integration-tests-tool | src/main/scala/geotrellis/config/json/ConfigFormats.scala | Scala | apache-2.0 | 2,911 |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
* @ @ *
* # # # # (c) 2017 CAB *
* # # # # # # ... | AlexCAB/MathAct | mathact_tools/src/main/scala/mathact/tools/EmptyBlock.scala | Scala | mit | 1,887 |
/*
* 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 ... | indhub/mxnet | scala-package/examples/src/main/scala/org/apache/mxnetexamples/visualization/LeNet.scala | Scala | apache-2.0 | 2,230 |
package utils.credentials
trait SaltGenerator {
def generateSalt(): String
}
object SaltGeneratorUUID extends SaltGenerator {
def generateSalt = java.util.UUID.randomUUID.toString
}
| ybr/PlayBootstrap | app/utils/credentials/SaltGenerator.scala | Scala | mit | 188 |
package org.jetbrains.plugins.scala.annotator.gutter
/**
* Pavel.Fatin, 21.01.2010
*/
class PrefaceImportContainerTest extends LineMarkerTestBase {
protected override def getBasePath = super.getBasePath + "/preface/import/container/"
def testBlock(): Unit = doTest()
def testClass(): Unit = doTest()
def tes... | JetBrains/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/annotator/gutter/PrefaceImportContainerTest.scala | Scala | apache-2.0 | 477 |
/*
* Copyright (c) 2014-2020 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* 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... | alexandru/monifu | monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeOneSuite.scala | Scala | apache-2.0 | 5,739 |
package sbtappengine
import java.util.Properties
import sbt._
import spray.revolver.RevolverPlugin
import sbtappengine.Compat.{Process, _}
@deprecated("will be removed. use enablePlugins(AppenginePlugin)", "0.7.0")
object Plugin {
val AppengineKeys = AppenginePlugin.autoImport.AppengineKeys
val appengineSettings... | sbt/sbt-appengine | src/main/scala/AppenginePlugin.scala | Scala | mit | 19,521 |
package io.github.suitougreentea.VariousMinos.rule
import io.github.suitougreentea.VariousMinos.Field
class RotationSystemClassic extends RotationSystem {
var offsetCW44 = Array((-1, 0), (0, 1), (1, 0), (0, -1))
var offsetCCW44 = Array((0, 1), (1, 0), (0, -1), (-1, 0))
override def rotateCW(field: Field): Bo... | suitougreentea/VariousMinos2 | src/main/scala/io/github/suitougreentea/VariousMinos/rule/RotationSystemClassic.scala | Scala | mit | 1,322 |
package com.twitter.zipkin.collector.processor
/*
* 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
*... | lanrion/zipkin | zipkin-server/src/main/scala/com/twitter/zipkin/collector/processor/Processor.scala | Scala | apache-2.0 | 1,418 |
/*
* ScalaRay - Ray tracer based on pbrt (see http://pbrt.org) written in Scala
* Copyright (C) 2009, 2010, 2011 Jesper de Jong
*
* 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 ve... | jesperdj/scalaray | src/main/scala/org/jesperdj/scalaray/material/MatteMaterial.scala | Scala | gpl-3.0 | 1,494 |
/*
* Copyright 2016 Guy Van den Broeck and Wannes Meert (UCLA and KU Leuven)
*
* 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
*
* Un... | UCLA-StarAI/Forclift | src/test/scala/edu/ucla/cs/starai/forclift/bugs/TestBug12.scala | Scala | apache-2.0 | 1,992 |
/*
* Copyright 2016 sadikovi
*
* 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 ... | sadikovi/spark-netflow | src/test/scala/com/github/sadikovi/spark/netflow/NetFlowOptionsSuite.scala | Scala | apache-2.0 | 3,481 |
package co.s4n.template
case class RestMessage(val id: String)
case class ResponseMessage(val id: String) | juanrubiano/actorPerRequest | ms-service/src/main/scala/co/s4n/template/Domain.scala | Scala | mit | 107 |
/*
* 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... | intel-analytics/BigDL | scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/nn/tf/ReluGradSpec.scala | Scala | apache-2.0 | 1,166 |
package dotty.tools.dotc
package transform
import TreeTransforms._
import core.DenotTransformers._
import core.Denotations._
import core.SymDenotations._
import core.Contexts._
import core.Symbols._
import core.Types._
import core.Flags._
import core.Constants._
import core.StdNames._
import core.Decorators._
import c... | AlexSikia/dotty | src/dotty/tools/dotc/transform/TreeChecker.scala | Scala | bsd-3-clause | 10,503 |
// 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 may obtain a copy of the License at
//
// http://www.apache... | scray/scray | scray-hdfs/modules/scray-hdfs-writer/src/main/scala/scray/hdfs/io/index/format/sequence/mapping/SequenceKeyValuePair.scala | Scala | apache-2.0 | 990 |
/*
* 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/src/test/scala/org/apache/flink/table/api/stream/table/stringexpr/SetOperatorsStringExpressionTest.scala | Scala | apache-2.0 | 1,905 |
/*
* Copyright 2013 - 2020 Outworkers Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... | outworkers/phantom | phantom-example/src/main/scala/com/outworkers/phantom/example/advanced/RecipesDatabase.scala | Scala | apache-2.0 | 3,445 |
package io.iohk.ethereum.vm
import akka.util.ByteString
import akka.util.ByteString.{empty => bEmpty}
import io.iohk.ethereum.crypto.kec256
import io.iohk.ethereum.domain.{Account, Address, UInt256}
import io.iohk.ethereum.Fixtures.{Blocks => BlockFixtures}
import io.iohk.ethereum.vm.Fixtures.blockchainConfig
import i... | input-output-hk/etc-client | src/test/scala/io/iohk/ethereum/vm/ShiftingOpCodeSpec.scala | Scala | mit | 10,354 |
package co.verdigris.spark.connector.cql
import com.datastax.driver.core.Cluster
class AwsS3USWest1ConnectionFactoryTest extends ConnectionFactorySpec {
override def beforeAll {
super.beforeAll
factory = AwsS3USWest1ConnectionFactory
}
describe(".clusterBuilder") {
it("should return a new Cluster.... | VerdigrisTech/spark-cassandra-connection-factory | src/test/scala/co/verdigris/spark/connector/cql/AwsS3USWest1ConnectionFactoryTest.scala | Scala | apache-2.0 | 581 |
/*
* SPDX-License-Identifier: Apache-2.0
* Copyright 2016-2020 Daniel Urban and contributors listed in NOTICE.txt
*
* 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.ap... | durban/exp-reagents | core/src/test/scala/dev/tauri/choam/kcas/kcasSpec.scala | Scala | apache-2.0 | 5,523 |
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
/** @author John Miller
* @version 1.3
* @date Mon Sep 9 13:30:41 EDT 2013
* @see LICENSE (MIT style license file).
* @see http://en.wikipedia.org/wiki/Perceptron
* @see hebb.mit.edu/courses/9.641/2002/lectures/... | NBKlepp/fda | scalation_1.3/scalation_modeling/src/main/scala/scalation/analytics/Perceptron.scala | Scala | mit | 6,507 |
package com.twitter.bijection.macros.impl
import scala.collection.mutable.{Map => MMap}
import scala.reflect.macros.Context
class TupleUtils[C <: Context](val c: C) {
import c.universe._
private[this] val tupleCaseClassCache = MMap.empty[Type, Tree]
// Takes a case class and generates the equiv tuple to it
d... | twitter/bijection | bijection-macros/src/main/scala/com/twitter/bijection/macros/impl/TupleUtils.scala | Scala | apache-2.0 | 877 |
/*
* Copyright 2013-2015 Websudos, Limited.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of c... | analytically/phantom | phantom-udt/src/test/scala/com/websudos/phantom/udt/UDTSerialisationTest.scala | Scala | bsd-2-clause | 1,705 |
package uk.me.chrs.inflect
import org.scalatest.FunSuite
import Inflect_EN.Builder._
class BuilderTest extends FunSuite {
test("builder can do count and some") {
assert("I see " + using(0)(count("person"),q(" with "),some("opinion")) === "I see 0 people with no opinions")
assert("I see " + using(1)(count("... | nespera/inflect | src/test/scala/uk/me/chrs/inflect/BuilderTest.scala | Scala | apache-2.0 | 983 |
/*
* 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 ... | tlby/mxnet | scala-package/spark/src/main/scala/org/apache/mxnet/spark/MXNDArray.scala | Scala | apache-2.0 | 1,389 |
package week5
object ListHighOrderFun {
val nums = List(2, -4, 5, 7, 1)
val fruits = List("apples", "pineapple", "orange", "banana")
nums filter (x => x > 0)
nums filterNot (x => x > 0)
nums partition (x => x > 0)
nums takeWhile (x => x > 0)
nums dropWhile (x => x > 0)
nums span (x => x > 0)
val d... | M4573R/playground-notes | functional-programming-principles-in-scala/week5/ListHighOrderFun.scala | Scala | mit | 697 |
package com.arcusys.learn.liferay.update.version250.slide
import com.arcusys.valamis.persistence.common.DbNameUtils._
import com.arcusys.valamis.persistence.common.SlickProfile
import scala.slick.driver.JdbcProfile
trait SlideTableComponent {
protected val driver: JdbcProfile
import driver.simple._
case class... | igor-borisov/valamis | learn-portlet/src/main/scala/com/arcusys/learn/liferay/update/version250/slide/SlideTableComponent.scala | Scala | gpl-3.0 | 7,218 |
/*
* Copyright 2017-2018 47 Degrees, LLC. <http://www.47deg.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | frees-io/freestyle | modules/cache/shared/src/main/scala/free/cache.scala | Scala | apache-2.0 | 5,515 |
package net.liftweb.test
package snippet
import lib._
import scala.xml.{NodeSeq, Text}
import net.liftweb.util._
import net.liftweb.common._
import java.util.Date
import Helpers._
class HelloWorld {
lazy val date: Box[Date] = DependencyFactory.inject[Date] // inject the date
// replace the contents of the eleme... | joescii/lift-test | src/main/scala/net/liftweb/test/snippet/HelloWorld.scala | Scala | apache-2.0 | 542 |
/*
* Copyright (C) 2014 - 2017 Contributors as noted in the AUTHORS.md file
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option)... | Tensei-Data/tensei-agent | src/main/scala/com/wegtam/tensei/agent/helpers/ExcelToCSVConverter.scala | Scala | agpl-3.0 | 16,286 |
package com.twitter.finagle.service
import com.twitter.conversions.DurationOps._
import com.twitter.finagle.stats.InMemoryStatsReceiver
import com.twitter.finagle.{FailedFastException, Failure, FailureFlags, Service, WriteException}
import com.twitter.util._
import org.mockito.Matchers.anyObject
import org.mockito.Moc... | luciferous/finagle | finagle-core/src/test/scala/com/twitter/finagle/service/RetryFilterTest.scala | Scala | apache-2.0 | 16,533 |
package edu.berkeley.nlp.entity.coref
import scala.collection.JavaConverters.asScalaBufferConverter
import edu.berkeley.nlp.entity.Chunk
import edu.berkeley.nlp.entity.Driver;
import scala.collection.mutable.HashSet
import scala.collection.mutable.ArrayBuffer
import edu.berkeley.nlp.entity.lang.CorefLanguagePack
import... | matthewfl/berkeley-entity | src/main/java/edu/berkeley/nlp/entity/coref/CorefDocAssembler.scala | Scala | gpl-3.0 | 34,005 |
package com.meetup.iap.receipt
import java.text.SimpleDateFormat
import com.meetup.iap.AppleApi
import AppleApi.{ReceiptResponse, ReceiptInfo}
import java.util.{Date, TimeZone}
import org.json4s.JsonDSL._
import org.json4s.native.JsonMethods._
import org.json4s.JsonAST.JValue
import org.slf4j.LoggerFactory
object ... | meetup/apple-of-my-iap | iap-service/src/main/scala/com/meetup/iap/receipt/ReceiptRenderer.scala | Scala | mit | 2,321 |
/*
* 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 ... | yanboliang/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/continuous/ContinuousTrigger.scala | Scala | apache-2.0 | 2,429 |
package me.gregd.cineworld.integration.cineworld
import java.time.LocalDate
import com.typesafe.scalalogging.LazyLogging
import me.gregd.cineworld.util.Clock
import me.gregd.cineworld.config.CineworldConfig
import play.api.libs.json.Json
import play.api.libs.ws._
import scalacache.ScalaCache
import scalacache.memoiza... | Grogs/cinema-service | domain/src/main/scala/me/gregd/cineworld/integration/cineworld/CineworldIntegrationService.scala | Scala | gpl-3.0 | 2,269 |
package mvgk.db
import java.util.Properties
import scala.slick.jdbc.StaticQuery
import scala.util.Try
import mvgk.config.Config
import mvgk.db.MyPostgresDriver.simple._
import Database.dynamicSession
import mvgk.db.model.Tables._
import mvgk.util._
/**
* @author Got Hug
*/
object DB {
val driver = "org.postgresql... | gothug/movie-geek | src/main/scala/mvgk/db/DB.scala | Scala | apache-2.0 | 1,961 |
package controllers
import play.api.http.HeaderNames
import play.api.mvc._
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
object Application extends Controller {
def index = Action {
Ok
}
def options(path: String) = CorsAction {
Action { request =>
Ok.wi... | douglasbolis/hackdetran | CrawlerDetran/app/controllers/Application.scala | Scala | gpl-3.0 | 966 |
/*
* 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 ... | darionyaphet/flink | flink-streaming-scala/src/test/scala/org/apache/flink/streaming/api/scala/StreamingScalaAPICompletenessTest.scala | Scala | apache-2.0 | 6,434 |
/* NEST (New Scala Test)
* Copyright 2007-2013 LAMP/EPFL
* @author Paul Phillips
*/
package scala.tools
package cmd
import scala.collection.mutable.ListBuffer
trait CommandLineConfig {
def enforceArity: Boolean = true
def onlyKnownOptions: Boolean = true
}
/** An instance of a command line, parsed according ... | felixmulder/scala | src/compiler/scala/tools/cmd/CommandLine.scala | Scala | bsd-3-clause | 3,154 |
import sbt._
import Keys._
import play.Project._
object ApplicationBuild extends Build {
val appName = "WeFarm"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
// Add your project dependencies here,
javaCore,
javaJdbc,
javaEbean,
"mysql" % "mysql-connector-java" % "5... | wepay/WeFarm-Java | project/Build.scala | Scala | mit | 501 |
/*
* 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 ... | zimmermatt/flink | flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/validation/TableSchemaValidationTest.scala | Scala | apache-2.0 | 2,178 |
/*
* Copyright 2012 Eike Kettner
*
* 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... | eikek/publet | ext/src/main/scala/org/eknet/publet/ext/MyDataScript.scala | Scala | apache-2.0 | 3,272 |
/*
* Copyright (c) 2014-2020 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* 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... | alexandru/monifu | monix-execution/shared/src/test/scala/monix/execution/TestUtils.scala | Scala | apache-2.0 | 2,100 |
/* *\\
** Squants **
** **
** Scala Quantities and Units of Measure Library and DSL **
** (c) 2013-2015, G... | rmihael/squants | shared/src/main/scala/squants/photo/Luminance.scala | Scala | apache-2.0 | 1,855 |
package com.twitter.inject.server
import com.twitter.concurrent.exp.AsyncStream
import com.twitter.io.{Buf, Reader}
object AsyncStreamUtils {
def readerToAsyncStream(reader: Reader): AsyncStream[Buf] = {
for {
optBuf <- AsyncStream.fromFuture(reader.read(Int.MaxValue))
result <- optBuf match {
... | nkhuyu/finatra | inject/inject-server/src/main/scala/com/twitter/inject/server/AsyncStreamUtils.scala | Scala | apache-2.0 | 466 |
/*
* Copyright 2012 Twitter Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | cogitate/twitter-zipkin-uuid | zipkin-collector-scribe/src/main/scala/com/twitter/zipkin/collector/ResilientZKNode.scala | Scala | apache-2.0 | 4,418 |
package org.workcraft.gui.modeleditor.sim
import java.util.TimerTask
import javax.swing.SwingUtilities
import org.workcraft.scala.effects.IO._
import org.workcraft.scala.Expressions._
import java.awt.geom.Point2D
import java.awt.Color
import org.workcraft.graphics.Colorisation
import org.workcraft.graphics.To... | tuura/workcraft-2.2 | ScalaGraphEditorUtil/src/main/scala/org/workcraft/gui/modeleditor/sim/GenericSimulationTool.scala | Scala | gpl-3.0 | 5,767 |
package ru.pavkin.todoist.api.core.decoder
import cats.{Apply, Functor}
import shapeless.{HNil, ::, HList}
import cats.syntax.apply._
import cats.syntax.functor._
trait MultipleResponseDecoder[F[_], Base, Out <: HList] extends ResponseDecoder[F, Base, Out] {self =>
def combine[Out2](other: ResponseDecoder[F, Base,... | vpavkin/scalist | core/src/main/scala/ru/pavkin/todoist/api/core/decoder/MultipleResponseDecoder.scala | Scala | mit | 1,585 |
// Copyright 2010 Twitter, Inc.
package com.twitter.concurrent
import org.junit.runner.RunWith
import org.scalatest.WordSpec
import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
class ConcurrentMultiMapTest extends WordSpec {
"behave like a multimap" in {
val map = new ConcurrentMultiMap[Int, ... | travisbrown/util | util-core/src/test/scala/com/twitter/concurrent/ConcurrentMultiMapTest.scala | Scala | apache-2.0 | 775 |
/*
* 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 ... | ptkool/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveCatalogs.scala | Scala | apache-2.0 | 8,962 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\\___/_/... | biswanaths/scala-xml | src/main/scala/scala/xml/parsing/MarkupParser.scala | Scala | bsd-3-clause | 24,186 |
Subsets and Splits
Filtered Scala Code Snippets
The query filters and retrieves a sample of code snippets that meet specific criteria, providing a basic overview of the dataset's content without revealing deeper insights.