code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
package com.sdc.play.module.plausc.controllers; import play.api.mvc._ import com.sdc.play.module.plausc.PlayAuthenticate object Authenticate extends Controller { import ControllerHelpers._ import com.sdc.play.module.plausc.user.AuthUser private val PAYLOAD_KEY = "p" def noCache(result: PlainResult) = { ...
eschreiner/play2-scala-auth
code/app/com/sdc/play/module/plausc/controllers/Authenticate.scala
Scala
apache-2.0
1,084
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.tools.nsc packag...
martijnhoekstra/scala
src/compiler/scala/tools/nsc/backend/jvm/opt/InlinerHeuristics.scala
Scala
apache-2.0
25,263
/* * Copyright 2012 OneCalendar * * 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 w...
OneCalendar/OneCalendar
test/service/LoadEventbriteTest.scala
Scala
apache-2.0
1,934
package lila.insight import lila.game.{ Game, GameRepo, Pov } import lila.user.User import org.joda.time.DateTime final class InsightApi( storage: Storage, pipeline: AggregationPipeline, insightUserApi: InsightUserApi, gameRepo: GameRepo, indexer: InsightIndexer )(implicit ec: scala.concurrent.Exe...
luanlv/lila
modules/insight/src/main/InsightApi.scala
Scala
mit
2,570
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.internal.persistence.jdbc import akka.Done import akka.actor.CoordinatedShutdown import play.api.db.Databases import scala.concurrent.ExecutionContext import scala.concurrent.Future import scala.util.Random obje...
ignasi35/lagom
persistence-jdbc/core/src/test/scala/com/lightbend/lagom/internal/persistence/jdbc/SlickDbTestProvider.scala
Scala
apache-2.0
1,254
package bifrost.api.http.swagger import akka.actor.ActorSystem import akka.stream.ActorMaterializer import com.github.swagger.akka.model.{Contact, Info, License} import com.github.swagger.akka.{HasActorSystem, SwaggerHttpService} import io.swagger.models.Swagger import bifrost.settings.Settings import scala....
Topl/Project-Bifrost
src/main/scala/bifrost/api/http/swagger/SwaggerDocService.scala
Scala
mpl-2.0
1,303
/* * 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 ...
RSulzmann/openwhisk
tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreCRUDBehaviors.scala
Scala
apache-2.0
7,042
package daos.doobie import doobie.specs2.imports.AnalysisSpec import org.specs2.mutable.Specification import testutil.TestUtil /** Pruebas de SubjectDaoDoobie */ object SubjectDaoDoobieSpec extends Specification with AnalysisSpec { val transactor = TestUtil.transactor() check(SubjectDaoDoobie.subjectQuery("")) }...
kdoomsday/kaminalapp
test/daos/doobie/SubjectDaoDoobieSpec.scala
Scala
mit
321
package unfiltered.response import java.io.OutputStream import java.util.zip.{GZIPOutputStream => GZOS} /** Enclose the response's output stream in another stream, * typically a subclass of java.io.FilterOutputStream */ object ResponseFilter { trait Filtering[S <: OutputStream] extends ResponseFunction[Any] { ...
omarkilani/unfiltered
library/src/main/scala/response/filtering.scala
Scala
mit
620
package kuaixue.scala.book.chapter_13.mutable /** * Arrays are mutable, indexed collections of values. */ object Ch04_1_Arr extends App { def printArgs(args: Array[String]): Unit = { for (arg <- args) print(arg) } def printArgs_1(args: Array[String]): Unit = { args.foreach(print) ...
slieer/scala-tutorials
src/main/scala/kuaixue/scala/book/chapter_13/mutable/ArrTest.scala
Scala
apache-2.0
958
import Name.{T => Name} import java.lang.StringBuilder import scala.collection.mutable // ResultGraph: small, immutable graph indexed by IDs only. // Used as a return type from computations and searches. // No optimizations for fast Queries, since it's intended for small graphs. class ResultGraph[NodeT <: Node, Ed...
michaelochurch/ScalaGraph
src/main/scala/ResultGraph.scala
Scala
mit
5,937
/* Copyright 2014 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
twitter/summingbird
summingbird-core/src/main/scala/com/twitter/summingbird/Stats.scala
Scala
apache-2.0
4,010
package cmwell.analytics.util import java.net.URI import com.fasterxml.jackson.databind.JsonNode import scala.collection.JavaConverters._ import scala.util.Try // TODO: These s/b `Uri`s? case class ContactPoints(cassandra: String, es: String) object FindContactPoints { /** Given a CM-We...
bryaakov/CM-Well
tools/dataConsistencyTool/cmwell-spark-analysis/src/main/scala/cmwell/analytics/util/FindContactPoints.scala
Scala
apache-2.0
3,598
package subscrobbler import com.typesafe.config._ import java.awt.Desktop import java.net.URI object Application extends App { LastFmConnection.init() var u: UserData = new UserData(Conf.user) var r: Recommendation = u.getRecommendation //r.toStdOut() val htmlFileName = Conf.user + ".html" r....
sentenzo/sub-scrobbler
src/main/scala/subscrobbler/Application.scala
Scala
mit
855
/* * Copyright (C) 2005, The Beangle Software. * * 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 3 of the License, or * (at your option) any later version. * * This...
beangle/commons
core/src/main/scala/org/beangle/commons/script/JSR223ExpressionEvaluator.scala
Scala
lgpl-3.0
1,549
package $package$.first import com.typesafe.scalalogging.Logger import pureconfig._ import pureconfig.generic.auto._ object First { val config = ConfigSource.default.at("first").load[FirstConfig].getOrElse(FirstConfig("undefined")) val logger = Logger(getClass) def main(args: Array[String]): Unit = logger.in...
MateuszKubuszok/SBTScalaMultiproject2.g8
src/main/g8/modules/first/src/main/scala/$package$/first/First.scala
Scala
mit
370
import scala.reflect.{OptManifest, ClassTag} object Ref { object Sentinel def makeWithArr[A: OptManifest]: String = optManifest[A] match { case m: ClassTag[_] => m.newArray(0).asInstanceOf[AnyRef] match { // these can be reordered, so long as Unit comes before AnyRef case _: Array[Boolean] => "bo...
dotty-staging/dotty
tests/run/i9482.scala
Scala
apache-2.0
2,710
package com.twitter.finagle.http.filter import com.twitter.finagle.Service import com.twitter.finagle.http.{Request, Response} import com.twitter.finagle.stats.InMemoryStatsReceiver import com.twitter.util.{Await, Future, Time} import org.specs.SpecificationWithJUnit class StatsFilterSpec extends SpecificationWithJU...
firebase/finagle
finagle-http/src/test/scala/com/twitter/finagle/http/filter/StatsFilterSpec.scala
Scala
apache-2.0
1,179
import org.coursera.naptime.NaptimeModule import org.coursera.naptime.ari.EngineApi import org.coursera.naptime.ari.FetcherApi import org.coursera.naptime.ari.LocalSchemaProvider import org.coursera.naptime.ari.SchemaProvider import org.coursera.naptime.ari.engine.EngineImpl import org.coursera.naptime.ari.engine.Engin...
saeta/naptime
examples/src/main/scala/ResourceModule.scala
Scala
apache-2.0
1,491
/* * 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 ...
andrewor14/iolap
core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala
Scala
apache-2.0
13,993
/* * 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/test/scala/ai/h2o/sparkling/backend/utils/RestApiUtilsTestSuite.scala
Scala
apache-2.0
2,363
package chapter17 /** * 17.4 컬렉션 초기화 * * 컬렉션을 초기화하고 생성하는 일반적인 방법은 초기 원소를 컬렉션 동반 객체의 팩토리 메소드에 * 넘기는 것이다. */ object c17_i04 extends App { import scala.collection.mutable val stuff = mutable.Set(42) // 타입추론 //stuff += "abracadabra" //type mismatch; found : String("abracadabra") required: Int val stuff2 ...
seraekim/srkim-lang-scala
src/main/java/chapter17/c17_i04.scala
Scala
bsd-3-clause
1,491
package monocle.state import monocle.Getter import cats.data.State trait StateGetterSyntax { implicit def toStateGetterOps[S, A](getter: Getter[S, A]): StateGetterOps[S, A] = new StateGetterOps[S, A](getter) } final class StateGetterOps[S, A](private val getter: Getter[S, A]) extends AnyVal { /** transform...
aoiroaoino/Monocle
state/src/main/scala/monocle/state/StateGetterSyntax.scala
Scala
mit
715
package org.openurp.edu.eams.teach.grade.lesson.web.action import java.util.Date import org.beangle.commons.lang.Strings import org.beangle.commons.bean.comparators.PropertyComparator import org.beangle.commons.collection.Collections import org.beangle.commons.collection.Order import org.beangle.commons.collection.p...
openurp/edu-eams-webapp
grade/src/main/scala/org/openurp/edu/eams/teach/grade/lesson/web/action/RetakeAction.scala
Scala
gpl-3.0
8,154
package de.frosner.ddq.constraints import org.scalatest.{FlatSpec, Matchers} import scala.util.{Failure, Success} class ConstraintUtilTest extends FlatSpec with Matchers { "tryToStatus" should "return success if the condition is met and the try was a success" in { val tryObject = Success(5) ConstraintUtil...
FRosner/drunken-data-quality
src/test/scala/de/frosner/ddq/constraints/ConstraintUtilTest.scala
Scala
apache-2.0
869
/* * Copyright 2012-2016 Steve Chaloner * * 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...
schaloner/deadbolt-2-scala
code/test/be/objectify/deadbolt/scala/composite/CompositeConstraintsTest.scala
Scala
apache-2.0
14,929
package slamdata.engine.physical.mongodb import slamdata.Predef._ import org.specs2.execute.{Result} import org.specs2.scalaz.DisjunctionMatchers import scalaz.concurrent._ import scalaz.stream._ import slamdata.engine._ import slamdata.engine.fp._ import slamdata.engine.fs._; import Path._ class FileSystemSpecs e...
wemrysi/quasar
it/src/test/scala/slamdata/engine/fs/filesystem.scala
Scala
apache-2.0
16,635
/* * 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
streaming/src/main/scala/org/apache/spark/streaming/scheduler/ExecutorAllocationManager.scala
Scala
apache-2.0
9,186
/** * Intel Intrinsics for Lightweight Modular Staging Framework * https://github.com/ivtoskov/lms-intrinsics * Department of Computer Science, ETH Zurich, Switzerland * __ _ __ _ _ * / /____ ___ _____ (_)____ / /_ _____ (_)____ __...
ivtoskov/lms-intrinsics
src/main/scala/ch/ethz/acl/intrinsics/AVX512020.scala
Scala
apache-2.0
27,610
package assigner.search import assigner._ import assigner.model._ import scala.collection.SortedSet /** Random starting point generator. */ object StartingPoint { def apply(course: Course): Assignment = { val studentMap = course.studentMap.sorted mapValues { _ => default.queueId } val groupMap = ...
joroKr21/IoS-Algorithm
src/main/scala/assigner/search/StartingPoint.scala
Scala
mit
1,201
/* * Copyright (c) 2016. Fengguo (Hugo) Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Detailed co...
arguslab/argus-cit-intellij
src/main/scala/org/argus/cit/intellij/jawa/compiler/JcCompileServerLauncher.scala
Scala
epl-1.0
9,837
package game.commanders.unite import com.badlogic.gdx.backends.lwjgl._ object DesktopMain extends App { val cfg = new LwjglApplicationConfiguration cfg.title = "Commanders Unite" cfg.height = 720 cfg.width = 1280 cfg.forceExit = true new LwjglApplication(new CommandersUnite, cfg) }
tommyettinger/CommandersUnite
commanders-unite/desktop/src/main/scala/DesktopMain.scala
Scala
mit
309
/* * 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 ...
yu-iskw/gihyo-spark-book-example
src/test/scala/jp/gihyo/spark/ch06/gihyo_6_3_ReduceSuite.scala
Scala
apache-2.0
1,424
package kata.scala import scala.collection.mutable class Graph { private val edges = mutable.Map[Int, mutable.ArrayBuffer[Int]]() def adjacentTo(vertex: Int): Iterator[Int] = { edges(vertex).iterator } def contains(vertex: Int): Boolean = edges.contains(vertex) def addEdge(from: Int, to...
Alex-Diez/Scala-TDD-Katas
old-katas/graph-search-kata/day-9/src/main/scala/kata/scala/Graph.scala
Scala
mit
606
/* * This file is part of Kiama. * * Copyright (C) 2009-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/lambda2/Reduce.scala
Scala
gpl-3.0
1,703
package spark import org.apache.hadoop.fs.Path import org.apache.hadoop.conf.Configuration import rdd.{CheckpointRDD, CoalescedRDD} import scheduler.{ResultTask, ShuffleMapTask} /** * Enumeration to manage state transitions of an RDD through checkpointing * [ Initialized --> marked for checkpointing --> checkpointi...
prabeesh/Spark-Kestrel
core/src/main/scala/spark/RDDCheckpointData.scala
Scala
bsd-3-clause
3,688
object eq extends testing.Benchmark { def eqtest[T](creator: Int => T, n: Int): Int = { val elems = Array.tabulate[AnyRef](n)(i => creator(i % 2).asInstanceOf[AnyRef]) var sum = 0 var i = 0 while (i < n) { var j = 0 while (j < n) { if (elems(i) eq elems(j)) sum += 1 j += ...
felixmulder/scala
test/files/bench/equality/eq.scala
Scala
bsd-3-clause
795
package se.gigurra.leavu3.datamodel import com.github.gigurra.heisenberg.MapData._ import com.github.gigurra.heisenberg.{Schema, Parsed} case class Dlz(source: SourceData = Map.empty) extends SafeParsed[Dlz.type] { val rAero = parse(schema.rAero) val rMin = parse(schema.rMin) val rPi = parse(schema.rPi) va...
GiGurra/leavu3
src/main/scala/se/gigurra/leavu3/datamodel/Dlz.scala
Scala
mit
589
/* * Copyright (C) 2015 Stratio (http://stratio.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 required by app...
fjsc/sparta
sdk/src/main/scala/com/stratio/sparta/sdk/pipeline/autoCalculations/FromFixedValue.scala
Scala
apache-2.0
735
package com.gx.decorator /** * Copyright 2017 josephguan * * 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 ...
josephguan/scala-design-patterns
structural/decorator/src/main/scala/com/gx/decorator/App.scala
Scala
apache-2.0
785
/* * 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 ...
openwhisk/openwhisk
tests/src/test/scala/limits/ThrottleTests.scala
Scala
apache-2.0
19,503
package com.ubirch.user.core.actor import com.ubirch.user.core.manager.UserManager import com.ubirch.user.model.db.{Activate, Deactivate, User} import com.ubirch.user.model.rest.ActivationUpdate import com.ubirch.user.model.rest.ActivationUpdate._ import com.ubirch.util.date.DateUtil import com.ubirch.util.mongo.conne...
ubirch/ubirch-user-service
core/src/main/scala/com/ubirch/user/core/actor/UserActorLogic.scala
Scala
apache-2.0
2,935
package ch.epfl.performanceNetwork import ch.epfl.performanceNetwork.printers.DataPrinter import ch.epfl.performanceNetwork.printers.SingleFileWritter import org.eclipse.jgit.api.Git import scala.collection.JavaConverters._ import org.eclipse.jgit.api.ListBranchCommand.ListMode import ch.epfl.performanceNetwork.gitInt...
ThibaultUrien/SemesterProject
jvm/src/main/scala/ch/epfl/performanceNetwork/Main.scala
Scala
bsd-3-clause
4,202
/* * Copyright (c) 2015 Miles Sabin * * 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...
ceedubs/kittens
src/test/scala/cats/derived/iterable.scala
Scala
apache-2.0
2,298
package com.lateralthoughts.points import com.lateralthoughts.points.repositories.{RewardingActionCategoryRepository, RewardingActionRepository} import com.lateralthoughts.points.services.{RewardingActionCategoryService, RewardingActionService} /** * Contains the injected beans of application */ object PointsConf...
vincentdoba/points
points-server/src/main/scala/com/lateralthoughts/points/PointsConfig.scala
Scala
mit
630
package com.alexitc.coinalerts.errors import com.alexitc.playsonify.models.{ConflictError, FieldValidationError, NotFoundError, PublicError} import play.api.i18n.{Lang, MessagesApi} sealed trait NewCurrencyAlertError case object RepeatedExchangeError extends NewCurrencyAlertError with ConflictError { override def...
AlexITC/crypto-coin-alerts
alerts-server/app/com/alexitc/coinalerts/errors/newCurrencyAlertErrors.scala
Scala
gpl-3.0
905
package examples import java.security.{KeyPairGenerator, SecureRandom} import java.util.Base64 object KeyGenApp extends App { val (publicKey, privateKey) = { val generator: KeyPairGenerator = KeyPairGenerator.getInstance("RSA") generator.initialize(2048, new SecureRandom()) val pair = generator.generat...
adilakhter/scalaznoob
src/main/scala/examples/KeyGenApp.scala
Scala
apache-2.0
509
package org.jetbrains.plugins.scala package project import com.intellij.openapi.roots.libraries.PersistentLibraryKind /** * @author Pavel Fatin */ object ScalaLibraryKind extends PersistentLibraryKind[ScalaLibraryProperties]("Scala") with ScalaLibraryKind trait ScalaLibraryKind extends PersistentLibraryKind[ScalaL...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/project/ScalaLibraryKind.scala
Scala
apache-2.0
413
/*********************************************************************** * 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-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/iterators/KryoLazyStatsIterator.scala
Scala
apache-2.0
5,247
/* * Artificial Intelligence for Humans * Volume 2: Nature Inspired Algorithms * Java Version * http://www.aifh.org * http://www.jeffheaton.com * * Code repository: * https://github.com/jeffheaton/aifh * * Copyright 2014 by Jeff Heaton * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not us...
PeterLauris/aifh
vol2/vol2-scala-examples/src/main/scala/com/heatonresearch/aifh/error/AbstractErrorCalculation.scala
Scala
apache-2.0
1,832
/* * Copyright 2014-2022 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 agr...
Netflix/atlas
atlas-jmh/src/main/scala/com/netflix/atlas/core/model/KeyValueQuery.scala
Scala
apache-2.0
2,420
package suiryc.scala.javafx.scene.control import com.typesafe.scalalogging.LazyLogging import javafx.scene.control.SplitPane /** Pane helpers. */ object Panes extends LazyLogging { /** Encode SplitPane divider positions into a String. */ def encodeDividerPositions(pane: SplitPane): String = { pane.getDivider...
suiryc/suiryc-scala
javafx/src/main/scala/suiryc/scala/javafx/scene/control/Panes.scala
Scala
gpl-3.0
768
/* * 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/scalactic/ConversionCheckedTripleEqualsExplicitlySpec.scala
Scala
apache-2.0
3,182
package com.twitter.finagle.http2 import com.twitter.finagle.Stack import com.twitter.finagle.http2.transport.H2ServerFilter import com.twitter.finagle.netty4.http.handler.UriValidatorHandler import com.twitter.finagle.param.Timer import io.netty.channel.ChannelHandlerContext import io.netty.handler.codec.http2.Http2M...
luciferous/finagle
finagle-http2/src/main/scala/com/twitter/finagle/http2/Http2PipelineInitializer.scala
Scala
apache-2.0
1,032
/* * Pubsub envelope subscriber * * @author Giovanni Ruggiero * @email [email protected] */ import org.zeromq.ZMQ object psenvsub { def main(args : Array[String]) { // Prepare our context and subscriber val context = ZMQ.context(1) val subscriber = context.socket(ZMQ.SUB) subscriber.connect...
soscpd/bee
root/tests/zguide/examples/Scala/psenvsub.scala
Scala
mit
607
package be.angelcorp.glsl.glsl330 import be.angelcorp.glsl._ @Glsl trait FS330Core extends Glsl330 { "#version 330" // in @GlslSymbolOnly def gl_FragCoord: vec4 = ??? @GlslSymbolOnly def gl_FrontFacing: bool = ??? @GlslSymbolOnly def gl_ClipDistance: Array[float] = ??? @GlslSymbolOnly def gl_PointCoord: ...
AODtorusan/scala-glsl
core/src/main/scala/be/angelcorp/glsl/glsl330/FS330Core.scala
Scala
mit
590
package io.scalajs.nodejs.util import org.scalatest.FunSpec import scala.scalajs.js /** * Util Tests * @author [email protected] */ class UtilTest extends FunSpec { describe("Util") { it("supports isPrimitive(5)") { assert(Util.isPrimitive(5)) // Returns: true } it("supports isP...
scalajs-io/nodejs
app/common/src/test/scala/io/scalajs/nodejs/util/UtilTest.scala
Scala
apache-2.0
1,184
package slick.jdbc import java.sql.ResultSet import slick.dbio.{Effect, NoStream, SynchronousDatabaseAction} import slick.basic.BasicStreamingAction import slick.util.CloseableIterator /** An invoker which calls a function to retrieve a ResultSet. This can be used * for reading information from a java.sql.DatabaseM...
AtkinsChang/slick
slick/src/main/scala/slick/jdbc/ResultSetInvoker.scala
Scala
bsd-2-clause
1,793
/* * Copyright (C) 2010 Lalit Pant <[email protected]> * * The contents of this file are subject to the GNU General Public License * Version 3 (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.gnu.org/copyleft/gpl.html * *...
vnkmr7620/kojo
KojoEnv/src/net/kogics/kojo/mathworld/MathWorld.scala
Scala
gpl-3.0
5,487
/* * 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/test/scala/org/apache/spark/ml/feature/ImputerSuite.scala
Scala
apache-2.0
19,475
import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers import ru.makkarpov.scalingua.{Language, LanguageId, Messages, TaggedLanguage} import ru.makkarpov.scalingua.I18n._ import ru.makkarpov.scalingua.{CompiledLanguage, PluralFunction, TaggedLanguage} import some.test.pkg._ class Test ...
makkarpov/scalingua
sbt-plugin/src/sbt-test/main/load-in-runtime/src/test/scala/Test.scala
Scala
apache-2.0
2,925
package io.github.datamoth.dm.imp.oozie import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File import java.nio.file.Files import org.apache.commons.io.FileUtils import org.apache.commons.io.FilenameUtils import scala.collection.JavaConverters._ object Client { case class Config( user: Str...
datamoth/datamoth
datamot/src/main/scala/io/github/datamoth/dm/imp/oozie/Client.scala
Scala
apache-2.0
5,722
package com.avsystem.commons package jiop trait JavaInterop extends AnyRef with JBasicUtils with JCollectionUtils with CompatAsJavaScalaExtensions with Java8CollectionUtils with JFunctionUtils with JStreamUtils with JOptionalUtils with JavaTimeInterop object JavaInterop extends JavaInterop
AVSystem/scala-commons
commons-core/jvm/src/main/scala/com/avsystem/commons/jiop/JavaInterop.scala
Scala
mit
309
/* ************************************************************************************* * Copyright 2013 Normation SAS ************************************************************************************* * * This file is part of Rudder. * * Rudder is free software: you can redistribute it and/or modify * it under the...
bmwjanos/rudder
rudder-core/src/main/scala/com/normation/rudder/domain/eventlog/ParameterEventLog.scala
Scala
gpl-3.0
3,535
/* * 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 ...
sparkfy/sparkfy
sparkfy-common/src/main/scala/com/github/sparkfy/Logging.scala
Scala
apache-2.0
5,566
/* * Copyright 2014 Andrey Kutyrev * * Licensed under the the GNU Public License v3.0; * You may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.gnu.org/licenses/gpl.html * * Unless required by applicable law or agreed to in writing, softwar...
squ1b3r/Thingummies
src/main/scala/squ1b3r/thingummies/items/ModItems.scala
Scala
gpl-3.0
1,023
package com.datastax.spark.connector.util import scala.collection.concurrent.TrieMap import scala.reflect.runtime.universe._ import scala.util.{Try, Success, Failure} object ReflectionUtil { private val rm = runtimeMirror(getClass.getClassLoader) private val singletonCache = TrieMap[String, Any]() private def ...
nvoron23/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/util/ReflectionUtil.scala
Scala
apache-2.0
4,504
/* * Copyright 2015 ligaDATA * * 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 ...
traytonwhite/Kamanja
trunk/MetadataAPI/src/main/scala/com/ligadata/MetadataAPI/Utility/DumpService.scala
Scala
apache-2.0
2,200
package com.sopranoworks.bolt.values import com.sopranoworks.bolt._ import com.google.cloud.spanner.{ResultSet, ResultSets, Struct, Type, Value=>SValue, Database => SDatabase} import org.specs2.mutable.Specification import scala.collection.JavaConversions._ class ResultIndexValueTest extends Specification { class...
OsamuTakahashi/bolt
src/test/scala/com/sopranoworks/bolt/values/ResultIndexValueTest.scala
Scala
mit
3,675
package almond.input import almond.api.JupyterApi final class Input private ( val prompt: String, val password: Boolean ) { private def copy( prompt: String = prompt, password: Boolean = password ): Input = new Input(prompt, password) def withPrompt(prompt: String): Input = copy(prompt = p...
alexarchambault/jupyter-scala
modules/scala/jupyter-api/src/main/scala/almond/input/Input.scala
Scala
apache-2.0
894
package ohnosequences.cosas.types import ohnosequences.cosas._, fns._, klists._ /* This is a parser for a particular _single_ denotation */ // TODO: update to DepFns trait AnyDenotationParser { type Type <: AnyType val tpe: Type /* This is normally `tpe.label`, but it's left free so that you can parse type l...
ohnosequences/cosas
src/main/scala/cosas/types/parsing.scala
Scala
agpl-3.0
3,513
package org.workcraft.pluginmanager import org.scalatest.Spec import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import java.util.UUID @RunWith(classOf[JUnitRunner]) class PluginManifestTest extends Spec { def correct(list: Traversable[String]) = { val l = list.toIndexedSeq ...
tuura/workcraft-2.2
PluginManager/src/test/scala/org/workcraft/pluginmanager/PluginManifestTest.scala
Scala
gpl-3.0
2,721
/* * Sonar Scoverage Plugin * Copyright (C) 2013 Rado Buransky * [email protected] * * 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 3 of the License, or (at...
scoverage/sonar-scoverage-plugin
plugin/src/main/scala/com/buransky/plugins/scoverage/resource/SingleDirectory.scala
Scala
lgpl-3.0
1,648
package spire package math.extras.interval import spire.algebra.{Bool, Eq, Order} import spire.math._ import spire.math.interval._ import scala.annotation.tailrec import scala.language.implicitConversions sealed abstract class IntervalTrie[T] extends IntervalSet[T, IntervalTrie[T]] object IntervalTrie { implicit...
adampingel/spire
extras/src/main/scala/spire/math/extras/interval/IntervalTrie.scala
Scala
mit
15,198
package spider package database import slick.jdbc.JdbcBackend._ import slick.jdbc.MySQLProfile.api.{ Database ⇒ _, DBIOAction ⇒ _, _ } import slick.dbio.DBIO import slick.dbio._ import scala.concurrent.{ Await, ExecutionContext } import scala.concurrent.duration.Duration.Inf import com.typesafe.scalalogging.Logger ...
VinaLx/farm-spider
src/main/scala/spider/database/database.scala
Scala
mit
1,821
package cvx import breeze.linalg.{DenseMatrix, DenseVector, _} /** * Created by oar on 12/1/16. * * Class computes the affine space of all solutions x to a linear equation Ax=b, where A * is an mxn matrix with m<n of full rank (hence the system Ax=b is underdetermined). * * The rank condition will not be...
spyqqqdia/cvx
src/main/scala/cvx/SolutionSpace.scala
Scala
mit
1,302
/* * Copyright 2016 Dennis Vriend * * 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...
dnvriend/study-category-theory
scalaz-test/src/test/com/github/dnvriend/scalaz/KleisliTest.scala
Scala
apache-2.0
3,843
/* * Copyright (C) 2017. RandomCoder <[email protected]> * * 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) any la...
randomcoder/gherkin-converter
src/main/scala/uk/co/randomcoding/cucumber/generator/gherkin/GherkinComponentIdentifier.scala
Scala
agpl-3.0
1,244
package reactivemongo import reactivemongo.bson.{ BSONBinary, BSONDocument } import reactivemongo.api.{ BSONSerializationPack, NodeSetSession, SessionTransaction, WriteConcern } import reactivemongo.api.commands.{ InsertCommand, ResolvedCollectionCommand, WriteConcern => WC } final class InsertCommand...
ornicar/ReactiveMongo
driver/src/test/scala/InsertCommandSpec.scala
Scala
apache-2.0
2,482
package frmr.scyig.db import slick.jdbc.MySQLProfile.api._ import net.liftweb.util.{BCrypt => _, _} import org.mindrot.jbcrypt.BCrypt case class User( id: Option[Int], email: String, passwordHash: String, name: String, superuser: Boolean ) { val userId = id.getOrElse(0) def checkpw(candidatePassword: S...
farmdawgnation/scyig-judicial
src/main/scala/frmr/scyig/db/Users.scala
Scala
apache-2.0
1,369
package com.sksamuel.elastic4s.requests.searches.aggs.pipeline import com.sksamuel.elastic4s.requests.searches.aggs.AggMetaDataFn import com.sksamuel.elastic4s.json.{XContentBuilder, XContentFactory} object AvgBucketPipelineAggBuilder { def apply(agg: AvgBucketPipelineAgg): XContentBuilder = { val builder = XCo...
stringbean/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/AvgBucketPipelineAggBuilder.scala
Scala
apache-2.0
672
// // Codex - a multi-language code indexer and grokker // http://github.com/samskivert/codex package codex.extract import java.io.{File, StringReader} import org.junit.Assert._ import org.junit._ import codex._ class ExtractorTest { import ExtractorTest._ @Test def testJarReading { val buf = new StringBui...
samskivert/codex
src/test/scala/codex/extract/ExtractorTest.scala
Scala
bsd-3-clause
1,257
package ru.pavkin.todoist.api.dispatch.core import dispatch.{Req, url} import ru.pavkin.todoist.api import ru.pavkin.todoist.api.{RawRequest, Token} import ru.pavkin.todoist.api.core.AuthorizedRequestFactory case class DispatchAuthorizedRequestFactory(token: Token) extends AuthorizedRequestFactory[RawRequest, Req] { ...
vpavkin/todoist-api-scala
dispatch/src/main/scala/ru/pavkin/todoist/api/dispatch/core/DispatchAuthorizedRequestFactory.scala
Scala
mit
550
package filodb.memory.format.vectors import java.nio.ByteBuffer import debox.Buffer import spire.syntax.cfor._ import filodb.memory.{BinaryRegion, MemFactory} import filodb.memory.format._ import filodb.memory.format.BinaryVector.BinaryVectorPtr import filodb.memory.format.Encodings._ import filodb.memory.format.Mem...
filodb/FiloDB
memory/src/main/scala/filodb.memory/format/vectors/IntBinaryVector.scala
Scala
apache-2.0
22,391
/** * 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...
SumoLogic/sumobot
src/main/scala/com/sumologic/sumobot/http_frontend/SumoBotHttpServer.scala
Scala
apache-2.0
5,935
/* * 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 ...
tysonnorris/openwhisk
tests/src/test/scala/common/WskTestHelpers.scala
Scala
apache-2.0
11,330
package circumflex package security import java.io.Serializable /*! # Principal The `Principal` trait should be implemented in your application by the `User` class (or whatever abstraction you use for authentication). Typically you would use an ORM library to provide methods for storing and retrieving users, but yo...
inca/circumflex
security/src/main/scala/principal.scala
Scala
bsd-2-clause
1,288
/* * * Copyright 2014 Commonwealth Computer Research, 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 ...
mmatz-ccri/geomesa
geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/stats/MethodProfiling.scala
Scala
apache-2.0
4,850
package BIDMach import BIDMat.{Mat,SBMat,CMat,DMat,FMat,IMat,HMat,GDMat,GLMat,GMat,GIMat,GSDMat,GSMat,LMat,SMat,SDMat} import BIDMat.MatFunctions._ import BIDMat.SciFunctions._ import BIDMat.Plotting._ import BIDMat.about import BIDMat.MatIOtrait import BIDMach.models._ import BIDMach.updaters._ import BIDMach...
jamesjia94/BIDMach
src/main/scala/BIDMach/Learner.scala
Scala
bsd-3-clause
27,291
/* * Copyright 2014–2017 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
drostron/quasar
connector/src/test/scala/quasar/qscript/analysis/OutlineSpec.scala
Scala
apache-2.0
11,109
package gpio4s import akka.actor.{ActorContext, ActorRef, ActorSystem} import akka.testkit.{ImplicitSender, TestKit, TestProbe} import gpio4s.GpioInfo.PiBrev2 import gpio4s.gpiocfg.CfgDSL._ import gpio4s.gpiocfg.CfgIO.RichPins import org.scalamock.scalatest.MockFactory import org.scalatest.{Matchers, WordSpecLike} c...
jw3/gpio4s
src/test/scala/gpio4s/GpioSetupSpec.scala
Scala
apache-2.0
1,663
package controllers import javax.inject.Inject import com.mohiva.play.silhouette.api.{ Environment, LogoutEvent, Silhouette } import com.mohiva.play.silhouette.impl.authenticators.SessionAuthenticator import controllers.headers.ProvidesHeader import models.audit.{NewTask, AuditTaskTable} import models.user.User impor...
danZzyy/SidewalkWebpage
sidewalk-webpage/app/controllers/MapController.scala
Scala
mit
932
package com.cleawing.docker import akka.actor.ActorSystem import akka.testkit.TestKit import com.cleawing.docker.api.{RemoteClient, Data} import org.scalatest._ import org.scalatest.concurrent.ScalaFutures import org.scalatest.time.{Millis, Seconds, Span} class RemoteClientSpec(_system: ActorSystem) extends TestKit(_...
Cleawing/akka-docker
src/test/scala/com/cleawing/docker/RemoteClientSpec.scala
Scala
apache-2.0
1,383
package breeze.linalg import breeze.linalg.support._ /** * TODO * * @author dlwh **/ trait Broadcasted[+T, B] extends NumericOps[Broadcasted[T, B]] { def underlying: T } trait BroadcastedLike[T, B, Self <: Broadcasted[T, B]] extends Broadcasted[T, B] with NumericOps[Self] { def map[U, Res](f: B=>U)(implicit ...
chen0031/breeze
math/src/main/scala/breeze/linalg/Broadcasted.scala
Scala
apache-2.0
2,416
/* * Copyright (C) 2005, The Beangle Software. * * 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 3 of the License, or * (at your option) any later version. * * This...
beangle/cdi
api/src/main/scala/org/beangle/cdi/container.scala
Scala
lgpl-3.0
1,695
package sigmastate.serialization.transformers import org.ergoplatform.ErgoBox import org.ergoplatform.ErgoBox.RegisterId import sigmastate.{ArgInfo, SType} import sigmastate.Values.{Value, SValue} import sigmastate.serialization.ValueSerializer import ValueSerializer._ import sigmastate.Operations.DeserializeRegisterI...
ScorexFoundation/sigmastate-interpreter
sigmastate/src/main/scala/sigmastate/serialization/transformers/DeserializeRegisterSerializer.scala
Scala
mit
1,362
/** * Copyright (C) 2009-2017 Lightbend Inc. <http://www.lightbend.com> */ package akka.actor import language.implicitConversions import scala.concurrent.duration.Duration import scala.collection.mutable import akka.routing.{ Deafen, Listen, Listeners } import scala.concurrent.duration.FiniteDuration import scala.co...
rorygraves/perf_tester
corpus/akka/akka-actor/src/main/scala/akka/actor/FSM.scala
Scala
apache-2.0
28,391
package com.scalaAsm.x86 package Instructions package General // Description: Clear Carry Flag // Category: general/flgctrl trait CLC extends InstructionDefinition { val mnemonic = "CLC" } object CLC extends ZeroOperands[CLC] with CLCImpl trait CLCImpl extends CLC { implicit object _0 extends NoOp{ val opco...
bdwashbu/scala-x86-inst
src/main/scala/com/scalaAsm/x86/Instructions/General/CLC.scala
Scala
apache-2.0
351
package mismatch.geohash.console import scala.util.control.Exception.allCatch import unfiltered.request._ import unfiltered.response._ import unfiltered.directives._, Directives._ import unfiltered.filter.Plan import org.json4s.JValue import org.json4s.JsonDSL._ import ch.hsr.geohash.GeoHash class GeohashDebugCons...
mismatch/geohash-debug-console
src/main/scala/GeohashDebugConsole.scala
Scala
mit
2,782
package com.scalaAsm.x86 package Instructions package x87 // Description: Reverse Divide // Category: general/arith trait FIDIVR extends InstructionDefinition { val mnemonic = "FIDIVR" } object FIDIVR extends OneOperand[FIDIVR] with FIDIVRImpl trait FIDIVRImpl extends FIDIVR { implicit object _0 extends OneOp[m...
bdwashbu/scala-x86-inst
src/main/scala/com/scalaAsm/x86/Instructions/x87/FIDIVR.scala
Scala
apache-2.0
593