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 basic import io.gatling.core.Predef._ import io.gatling.http.Predef._ import scala.concurrent.duration._ class BasicExampleSimulationSucceeds extends Simulation { val httpProtocol = http .baseUrl("http://google.com") val scn = scenario("Scenario name") .exec( http("Get google") .ge...
Pravoru/gatling-remote-sbt
src/sbt-test/gatling-remote-sbt/runTests/src/test/scala/basic/BasicExampleSimulationSucceeds.scala
Scala
mit
487
package smtlib package theories import parser.Terms._ import Operations._ object Ints { object IntSort { def apply(): Sort = { Sort(Identifier(SSymbol("Int"))) } def unapply(sort: Sort): Boolean = sort match { case Sort(Identifier(SSymbol("Int"), Seq()), Seq()) => true case _ => fals...
manoskouk/scala-smtlib
src/main/scala/smtlib/theories/Ints.scala
Scala
mit
1,709
package models import play.api.db._ import anorm._ import anorm.SqlParser._ import play.api.Play.current import org.apache.commons.codec.digest.DigestUtils._ case class User(email: String, password: String) object User { val simple = { get[String]("user.email") ~ get[String]("user.password") map { c...
blendlabs/play20-stateless-auth
app/models/User.scala
Scala
apache-2.0
1,227
package lightning.model import argonaut.Argonaut.casecodec3 import scalaz.Equal.equalA case class Dependency(from: Node, to: Node, label: DependencyLabel) object Dependency { implicit val codec = casecodec3(Dependency.apply, Dependency.unapply)("from", "to", "label") implicit val equal = equalA[Dependency] }
lancewalton/lightning
model/src/main/scala/lightning/model/Dependency.scala
Scala
mit
317
package com.github.sebruck import java.io.IOException import java.net.ServerSocket import redis.embedded.RedisServer import scala.annotation.tailrec import scala.concurrent.{ExecutionContext, Future} import scala.util.{Failure, Success, Try} trait EmbeddedRedis { @tailrec private[sebruck] final def getFreePort:...
Sebruck/scalatest-embedded-redis
src/main/scala/com/github/sebruck/EmbeddedRedis.scala
Scala
mit
1,283
/*********************************************************************** * Copyright (c) 2013-2015 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 ...
vpipkt/geomesa
geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/commands/DescribeCommand.scala
Scala
apache-2.0
2,367
import octocatcher.gpodder.api.Directory._ import scala.concurrent.ExecutionContext.Implicits._ import org.specs2.mutable._ class DirectorySpec extends Specification { "Directory" should { "getTopTags" in { getTopTags(5).onSuccess { //case x => x case response => println(response) ...
fthomas/octo-catcher
src/test/scala/gpodder/api/DirectorySpec.scala
Scala
apache-2.0
360
package com.atomist.source.file import java.io.{ByteArrayInputStream, File} import java.nio.file.attribute.PosixFileAttributeView import java.nio.file.{FileSystems, Files, Paths} import com.atomist.source._ import com.atomist.source.file.ClassPathArtifactSource.{classPathResourceToFile, toArtifactSource} import com.a...
atomist/artifact-source
src/test/scala/com/atomist/source/file/FileSystemArtifactSourceTest.scala
Scala
gpl-3.0
10,192
package util import org.joda.time._ import org.joda.time.format._ import anorm._ // A custom class to support Anorm parsing of Joda DateTime. object AnormExtension { val dateFormatGeneration: DateTimeFormatter = DateTimeFormat.forPattern("yyyyMMddHHmmssSS"); implicit def rowToDateTime: Column[DateTime]...
Pooshlmer/scala-play-crud-example
app/util/AnormExtension.scala
Scala
apache-2.0
1,044
/* * This file is part of Kiama. * * Copyright (C) 2008-2015 Anthony M Sloane, Macquarie University. * * Kiama 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 3 of the License, or ...
adeze/kiama
library/src/org/kiama/example/picojava/TypeAnalyser.scala
Scala
gpl-3.0
7,388
/* * Accio is a platform to launch computer science experiments. * Copyright (C) 2016-2018 Vincent Primault <v.primault@ucl.ac.uk> * * Accio is free software: you can redistribute it and/or modify * it under the ter ms of the GNU General Public License as published by * the Free Software Foundation, either versio...
privamov/accio
accio/java/fr/cnrs/liris/lumos/server/ServerWarmupHandler.scala
Scala
gpl-3.0
2,068
/*********************************************************************** * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
ddseapy/geomesa
geomesa-fs/geomesa-fs-storage/geomesa-fs-storage-orc/src/main/scala/org/locationtech/geomesa/fs/storage/orc/utils/OrcAttributeWriter.scala
Scala
apache-2.0
26,019
package fpinscala.gettingstarted // A comment! /* Another comment */ /** A documentation comment */ object MyModule { def abs(n: Int): Int = if (n < 0) -n else n private def formatAbs(x: Int) = { val msg = "The absolute value of %d is %d" msg.format(x, abs(x)) } def main(args: Array[String]):...
fpinscala-muc/fpinscala-LithiumTD
answers/src/main/scala/fpinscala/gettingstarted/GettingStarted.scala
Scala
mit
5,605
/* * Copyright 2018 Akamai Technologies, Inc. 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 ...
akamai-open/edgegrid-auth-java
edgegrid-signer-gatling/src/main/scala/com/akamai/edgegrid/signer/gatling/OpenApiSimulation.scala
Scala
apache-2.0
1,130
/* * Copyright 2011-2022 GatlingCorp (https://gatling.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.org/licenses/LICENSE-2.0 * * Unless required by appli...
gatling/gatling
gatling-commons/src/test/scala/io/gatling/commons/util/FastByteArrayInputStreamSpec.scala
Scala
apache-2.0
1,273
println(List(1, 2) zip List(1, 2, 3)) println("あまりが消えました")
mactkg/learn-scala
getting_started/day1/myanswer/p6.scala
Scala
mit
77
package gpiocfg import com.typesafe.config.Config import gpiocfg.GpioCfg.Modes.{analog, digital, pwm} import gpiocfg.GpioCfg._ import net.ceedubs.ficus.Ficus._ import scala.collection.JavaConversions._ // todo use json4s object GpioCfgModels { /** * models a Pin from the config */ case class PinCfg(num: I...
jw3/gpiocfg
src/main/scala/gpiocfg/GpioCfgModels.scala
Scala
apache-2.0
1,843
package com.originate.scalypher.where import com.originate.scalypher.types.IdentifiableMap import com.originate.scalypher.types.Identifiable case class AndOrCondition(operator: BooleanOperator, condition: Condition) { def toQuery(identifiableMap: IdentifiableMap): String = Seq(operator.toQuery, condition.toQuer...
Originate/scalypher
src/main/scala/where/Where.scala
Scala
mit
1,099
package com.arcusys.valamis.lesson.scorm.service.sequencing import com.arcusys.valamis.lesson.scorm.model.manifest._ import com.arcusys.valamis.lesson.scorm.model.sequencing.{ SequencingRequestType, SequencingResponseDelivery, SequencingResponseInvalid } @org.junit.runner.RunWith(classOf[org.scalatest.junit.JUnitRunn...
igor-borisov/valamis
valamis-scorm-lesson/src/test/scala/com/arcusys/valamis/lesson/scorm/service/sequencing/ChoiceSequencingRequestTest.scala
Scala
gpl-3.0
11,243
package gitlog import java.io.{BufferedWriter, FileWriter, FileOutputStream, File} import config.Configuration import gitlog.ChangeType._ /** * Created by chanjinpark on 15. 4. 7.. */ class FileWiseChange(n: String) { val name = n var changes = List[(Int, Int, ChangeType)]() // order, amount, changetype, 언제, ...
chanjin/DesignEvolution
src/main/scala/gitlog/FileChangeData.scala
Scala
apache-2.0
5,272
// @SOURCE:D:/git/trask/glowroot/agent-parent/plugins/play-plugin/tmp-router-files/conf/routes // @HASH:bf7129340517c7ffddb4d1f70c86ba09e64cd48e // @DATE:Sat Apr 09 17:39:42 PDT 2016 import play.core._ import play.core.Router._ import play.core.j._ import play.api.mvc._ import Router.queryString object Routes ext...
trask/glowroot
agent/plugins/play-plugin/src/test/app-2.1.0-scala/scala/routes_routing.scala
Scala
apache-2.0
3,845
/* * 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
core/src/test/scala/org/apache/spark/ui/UISuite.scala
Scala
apache-2.0
17,338
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.2 * @date Tue May 13 16:18:42 EDT 2014 * @see LICENSE (MIT style license file). * * Intended to make switching GUI's easier. */ package scalation.scala2d //::::::::::::::::::::::::::...
mvnural/scalation
src/main/scala/scalation/scala2d/Widgets.scala
Scala
mit
1,169
package example class ForComprehension/*<=example.ForComprehension#*/ { for { a/*<=local0*/ <- List/*=>scala.collection.immutable.List.*/(1) b/*<=local1*/ <- List/*=>scala.collection.immutable.List.*/(1) if b/*=>local1*/ >/*=>scala.Int#`>`(+3).*/ 1 c/*<=local3*/ = a/*=>local0*/ +/*=>scala.Int#`+`(+4)...
scalameta/scalameta
tests/jvm/src/test/resources/example/ForComprehension.scala
Scala
bsd-3-clause
1,345
package net.yefremov.sleipnirsample import play.api.mvc._ /** * Controller for the index page. */ object IndexController extends Controller { def index = Action { Ok("Welcome to the Sleipnir sample app!") } }
dmitriy-yefremov/sleipnir-sample
app/net/yefremov/sleipnirsample/IndexController.scala
Scala
apache-2.0
223
package hanabi import scala.scalajs.js.annotation.JSExportAll // clues are used to record information given by hints trait Clue { val position: Int def update(newPos: Int): Clue def matches(c: Card): Boolean } @JSExportAll case class ColorClue(color: Color, position: Int) extends Clue { def matches(c: Card...
wl-seclin-hashcode/hanabi
src/main/scala/hanabi/Clue.scala
Scala
mit
570
/* * Copyright (C) 2016 Nikos Katzouris * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is d...
nkatzz/OLED
src/main/scala/oled/selftraining/DataBatch.scala
Scala
gpl-3.0
880
/* * Copyright 2015 Netflix, 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 t...
jasimmk/atlas
atlas-core/src/main/scala/com/netflix/atlas/core/index/LazyTagIndex.scala
Scala
apache-2.0
16,369
package breeze.linalg /** * Marker trait for exceptions thrown from the [[breeze.linalg]] package. */ trait LinearAlgebraException extends RuntimeException /** * Exception thrown if a routine has not converged. */ class NotConvergedException(val reason: NotConvergedException.Reason, msg: String = "") extends R...
wavelets/breeze
src/main/scala/breeze/linalg/LinearAlgebraException.scala
Scala
apache-2.0
1,069
package org.dohrm.toolkit.utils import com.github.tototoshi.slick.{PostgresJodaSupport, GenericJodaSupport} import org.dohrm.toolkit.actor.response.{InvalidRequestError, ExceptionError, Error} import org.dohrm.toolkit.context.{ConfigContext, JdbcConfig, JdbcContext} import org.postgresql.util.PSQLException import slic...
dohr-michael/storyline
src/main/scala/org/dohrm/toolkit/utils/PostgresSupport.scala
Scala
mit
1,574
package at.magiun.core.service import java.util.concurrent.atomic.AtomicInteger import at.magiun.core.model.BlockType.{AddColumn, DataSetReader, DatabaseReader, DropColumn, FileReader, FileWriter, LinearRegression} import at.magiun.core.model._ import org.apache.spark.sql.SparkSession import scala.concurrent.Executi...
Mihai238/magiun
core/src/main/scala/at/magiun/core/service/ExecutionService.scala
Scala
apache-2.0
2,956
class C0 trait T { self: C0 => def test = { object Local class C2 { class C1 { Local } T.this.toString new C1 } new C2() } } object Test extends C0 with T { def main(args: Array[String]): Unit = { test } }
felixmulder/scala
test/files/run/t9920c.scala
Scala
bsd-3-clause
268
object StaticQuery extends Query { import Database.FilterExpr def query(db: Seq[Product], projections: Seq[Int]=Seq.empty, filter: FilterExpr=null): Seq[Row] = db.flatMap { case (name: String, birthYear: Int, dissertation: String) => if (birthYear < 1910 && name != null) S...
devth/devth.github.com
_code/compiled-query/src/main/scala/StaticQuery.scala
Scala
mit
424
package macroHList import scala.language.experimental.macros import scala.language.implicitConversions import scala.language.existentials import scala.language.higherKinds import scala.reflect.macros.Context import scala.reflect.ClassTag import TypeOperators._ import Poly._ //object HList { trait HList { ...
leonardschneider/macroHList
src/main/scala/HList.scala
Scala
apache-2.0
41,129
package akka.persistence.pg.util import java.sql.Savepoint import java.util.concurrent.TimeUnit import akka.actor.ActorSystem import akka.testkit.TestProbe import akka.util.Timeout import com.typesafe.config.Config import org.scalatest._ import org.scalatest.funsuite.FixtureAnyFunSuiteLike import slick.jdbc.JdbcBacke...
WegenenVerkeer/akka-persistence-postgresql
modules/akka-persistence-pg/src/test/scala/akka/persistence/pg/util/PersistentActorTest.scala
Scala
mit
1,685
/* * 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
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesClientUtils.scala
Scala
apache-2.0
7,079
package quizleague.domain import java.util.Date import java.time.LocalDate import java.time.LocalTime import java.time.Duration import io.circe.generic._ import quizleague.util.json.codecs.ScalaTimeCodecs._ import quizleague.util.json.codecs.DomainCodecs._ @JsonCodec sealed trait Competition extends Entity { val ...
gumdrop/quizleague-maintain
shared/src/main/scala/quizleague/domain/Competition.scala
Scala
mit
2,017
/* * Copyright (c) 2013, Martin Zuber * 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 condi...
mzuber/fresh-scala
core/src/test/scala/SwappingSpec.scala
Scala
bsd-3-clause
2,919
package models.service.oauth import models.util.Constants import play.api.Play.current import play.api.libs.json.{JsValue, Json} import play.api.libs.ws.{WS, WSRequest, WSResponse} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future trait PlayListRetrieval { protected def play...
haffla/stream-compare
app/models/service/oauth/PlayListRetrieval.scala
Scala
gpl-3.0
1,780
package controllers import play.api._ import play.api.mvc._ import play.api.data._ import play.api.data.Forms._ import models._ object Application extends Controller { def index = Action { Redirect(routes.Quotes.list()) } }
dtinblack/Play-TestDB
app/controllers/Application.scala
Scala
mit
243
package org.jetbrains.sbt.settings import com.intellij.openapi.externalSystem.service.settings.AbstractExternalSystemConfigurable import com.intellij.openapi.project.Project import org.jetbrains.sbt.project.SbtProjectSystem import org.jetbrains.sbt.project.settings.Context.Configuration import org.jetbrains.sbt.projec...
triplequote/intellij-scala
scala/scala-impl/src/org/jetbrains/sbt/settings/SbtExternalSystemConfigurable.scala
Scala
apache-2.0
1,037
package org.genericConfig.admin.models.component import org.genericConfig.admin.controllers.websocket.WebClient import org.genericConfig.admin.models.logic.RidToHash import org.genericConfig.admin.models.persistence.orientdb.PropertyKeys import org.genericConfig.admin.models.{CommonFunction, common} import org.generic...
gennadij/admin
server/test/org/genericConfig/admin/models/component/ConnectComponentToStep.scala
Scala
apache-2.0
4,042
package sandbox.lift.hellodarwin; import _root_.junit.framework._; import Assert._; object AppTest { def suite: Test = { val suite = new TestSuite(classOf[AppTest]); suite } def main(args : Array[String]) { _root_.junit.textui.TestRunner.run(suite); } } /** * Unit test for s...
andreum/liftweb
sites/hellodarwin/src/test/scala/sandbox/lift/hellodarwin/AppTest.scala
Scala
apache-2.0
500
package com.faacets.qalg package algebra import scala.{specialized => sp} import scala.annotation.tailrec import spire.algebra._ import spire.syntax.cfor._ import spire.syntax.field._ import indup.algebra._ trait VecField[V, @sp(Double, Long) A] extends Any with VecRing[V, A] with InnerProductSpace[V, A] { self => ...
denisrosset/qalg
core/src/main/scala/qalg/algebra/VecField.scala
Scala
mit
645
package com.sksamuel.scrimage.filter import org.scalatest.{ OneInstancePerTest, BeforeAndAfter, FunSuite } import com.sksamuel.scrimage.Image /** @author Stephen Samuel */ class BrightnessFilterTest extends FunSuite with BeforeAndAfter with OneInstancePerTest { val original = Image(getClass.getResourceAsStream("/b...
carlosFattor/scrimage
scrimage-filters/src/test/scala/com/sksamuel/scrimage/filter/BrightnessFilterTest.scala
Scala
apache-2.0
564
package org.jetbrains.plugins.scala package annotator import com.intellij.lang.annotation.AnnotationHolder import org.jetbrains.plugins.scala.annotator.AnnotatorUtils._ import org.jetbrains.plugins.scala.extensions._ import org.jetbrains.plugins.scala.lang.psi.api.base.types.ScSimpleTypeElement import org.jetbrains.pl...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/annotator/PatternDefinitionAnnotator.scala
Scala
apache-2.0
800
package ml.combust.mleap.executor.service import akka.pattern.pipe import akka.actor.{Actor, Props, ReceiveTimeout, Status} import akka.stream.{DelayOverflowStrategy, Materializer, OverflowStrategy, QueueOfferResult} import akka.stream.scaladsl.{Flow, Keep, Sink, Source, SourceQueueWithComplete} import ml.combust.mlea...
combust/mleap
mleap-executor/src/main/scala/ml/combust/mleap/executor/service/FrameStreamActor.scala
Scala
apache-2.0
4,841
/** * 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...
themarkypantz/kafka
core/src/test/scala/unit/kafka/controller/ReplicaStateMachineTest.scala
Scala
apache-2.0
16,780
package net.fehmicansaglam.tepkin.protocol.command import net.fehmicansaglam.bson.BsonDocument import net.fehmicansaglam.bson.BsonDsl._ import net.fehmicansaglam.bson.util.Converters.md5Hex case class Authenticate(databaseName: String, username: String, password: String...
fehmicansaglam/tepkin
tepkin/src/main/scala/net/fehmicansaglam/tepkin/protocol/command/Authenticate.scala
Scala
apache-2.0
591
package mr.merc.ui.world import mr.merc.diplomacy.Claim import mr.merc.diplomacy.Claim.{StrongProvinceClaim, VassalizationClaim, WeakProvinceClaim} import mr.merc.economics.SeasonOfYear import mr.merc.local.Localization import mr.merc.politics.State import scalafx.scene.layout.FlowPane import scalafx.scene.text.Text ...
RenualdMarch/merc
src/main/scala/mr/merc/ui/world/ClaimReceivedDomesticMessagePane.scala
Scala
gpl-3.0
2,092
package cromwell.engine.db.slick import java.sql.{Clob, Timestamp} import java.util.{Date, UUID} import javax.sql.rowset.serial.SerialClob import _root_.slick.backend.DatabaseConfig import _root_.slick.driver.JdbcProfile import com.typesafe.config.{Config, ConfigFactory, ConfigValueFactory} import cromwell.engine.fin...
dgtester/cromwell
src/main/scala/cromwell/engine/db/slick/SlickDataAccess.scala
Scala
bsd-3-clause
37,668
package com.identityblitz.login.util import org.apache.commons.codec.binary.Base64 /** */ object Base64Util { def decode(base64: String) = Base64.decodeBase64(base64) def decodeAsString(base64: String) = new String(Base64.decodeBase64(base64), "UTF-8") def encode(source: Array[Byte]): String = Base64.encode...
brainysmith/login-framework
src/main/scala/com/identityblitz/login/util/Base64Util.scala
Scala
mit
436
/* * Author: Steffen Reith (Steffen.Reith@hs-rm.de) * * Create Date: Fri Jun 19 10:19:44 CEST 2020 * Module Name: J1DStack - The data stack * Project Name: J1Sc - A simple J1 implementation in Scala using Spinal HDL * */ import spinal.core._ case class J1DStack(cfg : J1Config) extends J1Stack(cfg.dataSt...
SteffenReith/J1Sc
src/main/scala/J1DStack.scala
Scala
bsd-3-clause
2,352
/* * 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 ...
maropu/spark
mllib/src/main/scala/org/apache/spark/ml/ann/Layer.scala
Scala
apache-2.0
26,291
/*********************************************************************** * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
ddseapy/geomesa
geomesa-features/geomesa-feature-nio/src/main/scala/org/locationtech/geomesa/features/nio/LazySimpleFeature.scala
Scala
apache-2.0
10,635
/* * Copyright (c) 2012 - 2020 Splice Machine, Inc. * * This file is part of Splice Machine. * Splice Machine 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, or (at your option) ...
splicemachine/spliceengine
splice_spark/src/main/scala/com/splicemachine/spark/splicemachine/SpliceJDBCOptions.scala
Scala
agpl-3.0
1,531
/* * 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 ...
narahari92/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala
Scala
apache-2.0
54,959
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
qiuxin2012/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/InitializationMethod.scala
Scala
apache-2.0
10,757
package p01regression import breeze.linalg._ import breeze.plot._ import breeze.stats.distributions._ object Data { /** * Given a vector of points generate the lower degree polynomial that passes through all of them. */ def polynomial1D(x: DenseVector[Double], y: DenseVector[Double]): DenseVector[...
vkubicki/Sernel
src/main/scala/p01regression/01 - Data.scala
Scala
bsd-3-clause
1,770
/** * Copyright (C) 2013 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...
evlist/orbeon-forms
src/test/scala/org/orbeon/oxf/client/XForms.scala
Scala
lgpl-2.1
3,386
package database // external import akka.actor.{Actor, ActorSystem, Props} import akka.contrib.pattern.ReceivePipeline import akka.stream.ActorMaterializer import akka.stream.scaladsl._ import models.analytics.theworks.KitchenSink import models.strategies.FirstCrossStrategy import org.scalatest._ import scala.concurr...
asciiu/polo
test/database/PoloniexTradeSpec.scala
Scala
mit
2,742
package com.atomist.project.common.yaml import java.util.regex.{Pattern, PatternSyntaxException} import com.atomist.param._ import com.atomist.project.common.template.{InvalidTemplateException, TemplateBasedProjectOperationInfo} import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.databin...
atomist/rug
src/main/scala/com/atomist/project/common/yaml/YamlProjectOperationInfoParser.scala
Scala
gpl-3.0
2,964
package sttp.client3.armeria.zio import sttp.capabilities.zio.ZioStreams import sttp.client3.SttpBackend import sttp.client3.impl.zio.{ZioServerSentEvents, ZioTestBase} import sttp.client3.internal._ import sttp.client3.testing.ConvertToFuture import sttp.client3.testing.streaming.StreamingTest import sttp.model.sse.S...
softwaremill/sttp
armeria-backend/zio/src/test/scala/sttp/client3/armeria/zio/ArmeriaZioStreamingTest.scala
Scala
apache-2.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 may ...
barbaragomes/incubator-iota
performers/stream/src/main/scala/org/apache/iota/fey/performer/Application.scala
Scala
apache-2.0
1,434
package com.websudos.phantom.db import com.websudos.phantom.dsl._ import com.websudos.phantom.testkit.suites.PhantomCassandraTestSuite import com.websudos.util.testing._ class DatabaseImplTest extends PhantomCassandraTestSuite { val db = new TestDatabase val db2 = new ValueInitDatabase it should "instantiate a...
analytically/phantom
phantom-dsl/src/test/scala/com/websudos/phantom/db/DatabaseImplTest.scala
Scala
bsd-2-clause
952
package pimpathon import pimpathon.multiMap.IgnoreFromCBF import scala.collection.generic.CanBuildFrom import scala.collection.{breakOut, mutable => M} import scala.collection.immutable.{Iterable, Map => ▶:} import pimpathon.builder.BuilderPimps import pimpathon.map.MapPimps object nestedMap { type NMCBF[K1, K2, ...
raymanoz/pimpathon
src/main/scala/pimpathon/nestedMap.scala
Scala
apache-2.0
2,412
package edu.gemini.pit.ui.util import java.awt import javax.swing import scala.swing._ import swing.text.JTextComponent import swing.{JCheckBox, JTextField, JComponent} /** * Modal editor for a value of type A, with standard footer buttons. */ abstract class StdModalEditor[A](theTitle: String) extends ModalEditor[A...
arturog8m/ocs
bundle/edu.gemini.pit/src/main/scala/edu/gemini/pit/ui/util/StdModalEditor.scala
Scala
bsd-3-clause
1,612
package info.drealm.s3pi object Test extends App { val exampleResourceType = new ResourceType(24) val exampleResource = WrapperDealer.createNewResource(exampleResourceType) println("WrapperDealer.createNewResource(new ResourceType(24)): " + exampleResource) val demoResourceType = new ResourceType(1234...
pljones/Reflection
src/scala/info/drealm/s3pi/Test.scala
Scala
gpl-3.0
706
/** * Copyright (c) 2002-2012 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundati...
dksaputra/community
cypher/src/main/scala/org/neo4j/cypher/internal/Comparer.scala
Scala
gpl-3.0
2,746
package com.twitter.finagle.exp import com.netflix.concurrency.limits.limit.VegasLimit import com.netflix.concurrency.limits.Limit import com.twitter.finagle._ import com.twitter.finagle.stats.{Counter, StatsReceiver} import com.twitter.logging.{HasLogLevel, Level} import com.twitter.util._ import java.util.concurrent...
twitter/finagle
finagle-exp/src/main/scala/com/twitter/finagle/exp/ConcurrencyLimitFilter.scala
Scala
apache-2.0
5,546
package org.http4s package server package middleware import scalaz.concurrent.Task /** Removes a trailing slash from [[Request]] path * * If a route exists with a file style [[Uri]], eg "/foo", * this middleware will cause [[Request]]s with uri = "/foo" and * uri = "/foo/" to match the route. */ object Auto...
hvesalai/http4s
server/src/main/scala/org/http4s/server/middleware/AutoSlash.scala
Scala
apache-2.0
795
val inBuf = Buffer.read(s, "/home/hhrutz/Documents/devel/MutagenTx/audio_work/mfcc_input.aif", startFrame = 0, numFrames = 1024) // inBuf.play() play { val fftBuf = LocalBuf(1024) val in = PlayBuf.ar(1, inBuf.id) val fft = FFT(buf = fftBuf, in = in, hop = 0.5, winType = -1) val mfcc = MFCC(cha...
Sciss/MutagenTx
notes/mfcc_supercollider.scala
Scala
gpl-3.0
729
/* * 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 ...
aliyun/aliyun-emapreduce-sdk
emr-datahub/src/main/scala/org/apache/spark/sql/aliyun/datahub/DatahubWriter.scala
Scala
artistic-2.0
1,922
/* * 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 ...
StephanEwen/incubator-flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/utils/ScanUtil.scala
Scala
apache-2.0
6,045
package org.scalacoin.crypto /** * The result type returned by checking a signature */ sealed trait TransactionSignatureCheckerResult { /** * Indicates if the transaction signature checker was successful or failed * @return */ def isValid : Boolean } /** * Represents the case that the signatures chec...
TomMcCabe/scalacoin
src/main/scala/org/scalacoin/crypto/TransactionSignatureCheckerResult.scala
Scala
mit
1,520
package services import core.{ HarvestCollectionLookupService, OrganizationCollectionLookupService } import core.collection.{ OrganizationCollection, Harvestable } import models.{ OrganizationConfiguration, RecordDefinition, DataSetState, DataSet } /** * * @author Manuel Bernhardt <bernhardt.manuel@gmail.com> */ ...
delving/culture-hub
modules/dataset/app/services/DataSetLookupService.scala
Scala
apache-2.0
1,340
package libs import org.im4java.core.{ ConvertCmd, IdentifyCmd, IMOperation, ImageCommand } import org.im4java.process.OutputConsumer import java.io.{ File, InputStreamReader, BufferedReader, InputStream } import play.api.{ Logger, Play } import org.apache.commons.io.FileUtils /** * Normalizes a TIF prior to tiling....
delving/culture-hub
modules/dos/app/libs/Normalizer.scala
Scala
apache-2.0
4,930
package dx.api object DxPath { val DX_URL_PREFIX = "dx://" case class DxPathComponents(name: String, folder: Option[String], projName: Option[String], objFullName: String, sourcePath: String) ...
dnanexus-rnd/dxWDL
src/main/scala/dx/api/DxPath.scala
Scala
apache-2.0
1,959
/* * 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 ma...
harperjiang/enc-selector
src/main/scala/edu/uchicago/cs/encsel/Config.scala
Scala
apache-2.0
1,937
package filodb.core.reprojector import com.typesafe.scalalogging.slf4j.StrictLogging import org.velvia.filo.RowReader import scala.concurrent.{ExecutionContext, Future} import filodb.core._ import filodb.core.columnstore.{ColumnStore, RowWriterSegment, Segment} import filodb.core.metadata.{Dataset, Column, RichProjec...
YanjieGao/FiloDB
core/src/main/scala/filodb.core/reprojector/Reprojector.scala
Scala
apache-2.0
5,240
/** * Copyright 2015 Peter Nerg * * 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...
pnerg/akka-persistence-mock
src/test/scala/org/dmonix/akka/persistence/PersistenceSuiteTrait.scala
Scala
apache-2.0
1,691
/* * 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 ...
h2oai/sparkling-water
core/src/main/scala/ai/h2o/sparkling/backend/SharedBackendConfExtensions.scala
Scala
apache-2.0
1,388
package lms import sql.Scanner import com.oracle.truffle.api._ import com.oracle.truffle.api.frame._ import com.oracle.truffle.api.nodes._ import com.oracle.truffle.api.nodes.Node._ import org.scalatest._ trait Types extends Base { implicit object unitTyp extends Typ[Unit]{ def slotKind = FrameSlotKind.Object ...
RomanTsegelskyi/lms-truffle
src/main/scala/lms/Types.scala
Scala
gpl-2.0
895
package com.karasiq.tls import java.nio.channels.SocketChannel import org.bouncycastle.crypto.tls.{AlertDescription, TlsFatalAlert} import scala.concurrent.Promise import scala.util.control.Exception trait TLSConnectionWrapper { protected val handshake: Promise[Boolean] = Promise() protected def onError(messag...
Karasiq/cryptoutils
src/main/scala/com/karasiq/tls/TLSConnectionWrapper.scala
Scala
mit
852
package coursier.publish import coursier.core.{Configuration, ModuleName, Organization, Type} import scala.collection.mutable import scala.xml.{Elem, Node, NodeSeq} object Pom { // TODO Check https://github.com/lihaoyi/mill/pull/144/files final case class License(name: String, url: String) object License { ...
alexarchambault/coursier
modules/publish/src/main/scala/coursier/publish/Pom.scala
Scala
apache-2.0
10,776
/* * Copyright 2001-2013 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...
travisbrown/scalatest
src/test/scala/org/scalatest/AllSuiteProp.scala
Scala
apache-2.0
1,224
package org.genivi.sota.resolver.test.random import akka.http.scaladsl.model.StatusCodes import cats.state.{State, StateT} import org.genivi.sota.resolver.resolve.ResolveFunctions import org.genivi.sota.resolver.filters.{And, FilterAST, True} import org.genivi.sota.resolver.filters.Filter import FilterAST._ import org...
PDXostc/rvi_sota_server
external-resolver/src/test/scala/org/genivi/sota/resolver/test/random/Query.scala
Scala
mpl-2.0
6,400
/*********************************************************************** * 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 ...
nagavallia/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/stats/Z3FrequencyTest.scala
Scala
apache-2.0
4,236
package codecheck.github package events import org.scalatest.FunSpec import org.scalatest.Inside import org.scalatest.Matchers class GitHubEventSpec extends FunSpec with Matchers with Inside with IssueEventJson with PullRequestEventJson with PullRequestReviewEventJson with PushEventJson { describe(...
code-check/github-api-scala
src/test/scala/events/GitHubEventSpec.scala
Scala
mit
9,950
/* * Copyright © 2015-2019 the contributors (see Contributors.md). * * This file is part of Knora. * * Knora 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 *...
musicEnfanthen/Knora
webapi/src/test/scala/org/knora/webapi/responders/admin/UsersResponderADMSpec.scala
Scala
agpl-3.0
33,935
package util.exception case class ContentRenderException(msg: String, e: Option[Exception] = None) extends Exception(msg, e.orNull)
metaxmx/pm15
app/util/exception/ContentRenderException.scala
Scala
apache-2.0
132
package epic.logo import scala.collection.JavaConversions._ import java.util.Arrays import breeze.linalg._ import breeze.math.MutableInnerProductModule class Weights[W](var underlying: W, var scale : Double = 1.0)(implicit space: MutableInnerProductModule[W, Double]) { import space._ var norm = calcNormSquared ...
langkilde/epic
src/main/scala/epic/logo/Weights.scala
Scala
apache-2.0
1,346
package org.joda.time.format import java.util.Collection import org.joda.time.DateTimeFieldType import scala.collection.JavaConversions._ object ISODateTimeFormat { def forFields(fields: Collection[DateTimeFieldType], extended: Boolean, strictISO: Boolean): DateTimeFormatter = { ...
mdedetrich/soda-time
js/src/main/scala/org/joda/time/format/ISODateTimeFormat.scala
Scala
bsd-2-clause
32,942
/* * 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 ...
Intel-bigdata/OAP
oap-native-sql/core/src/test/scala/org/apache/spark/sql/execution/joins/InnerJoinSuite.scala
Scala
apache-2.0
11,170
package com.box.castle.router.kafkadispatcher.cache import com.box.castle.router.mock.MockBatchTools import kafka.common.TopicAndPartition import org.specs2.mock.Mockito import org.specs2.mutable.Specification class FetchDataProcessorCacheTest extends Specification with Mockito with MockBatchTools { "DataFetchP...
Box-Castle/router
src/test/scala/com/box/castle/router/kafkadispatcher/cache/FetchDataProcessorCacheTest.scala
Scala
apache-2.0
7,496
package com.sclasen.sprack import org.scalatest.matchers.MustMatchers import org.scalatest.WordSpec import spray.http.{Uri, HttpRequest} import spray.http.HttpMethods._ class ChunkedSpec extends WordSpec with MustMatchers with SprackSpec { "Chunked" must { "do chunks" in { try { val app = rack...
sclasen/sprack
src/test/scala/com/sclasen/sprack/ChunkedSpec.scala
Scala
mit
640
/* * 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 ...
Panos-Bletsos/spark-cost-model-optimizer
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PartitioningAwareFileIndex.scala
Scala
apache-2.0
18,520
/* Copyright 2013 Stephen K Samuel 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 i...
carlosFattor/scrimage
scrimage-filters/src/main/scala/com/sksamuel/scrimage/filter/DiffuseFilter.scala
Scala
apache-2.0
980
package dsmoq.controllers.json /** * サジェスト系検索APIのリクエストに使用するJSON型のケースクラス * * 具体的には、以下のAPIで使用する。 * GET /api/suggests/users * GET /api/suggests/groups * GET /api/suggests/attributes * * @param query 検索文字列 * @param limit 検索件数上限 * @param offset 検索位置 */ case class SuggestApiParams( query: Option[String] = None,...
nkawa/dsmoq
server/apiServer/src/main/scala/dsmoq/controllers/json/SuggestApiParams.scala
Scala
apache-2.0
950
package com.betfair.robots.racing import akka.actor.Actor import com.betfair.domain.{LimitOrder, PersistenceType, PlaceInstruction, Side} import com.betfair.robots.{Direction, PriceFormat} import com.betfair.service.BetfairServiceNG import org.joda.time import org.joda.time.{DateTime, DateTimeZone} import scala.concu...
city81/betfair-service-ng
src/main/scala/com/betfair/robots/racing/MonitorInPlayWinScalp.scala
Scala
bsd-2-clause
17,276