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
/* * This file is part of Beez. * * Copyright 2014 Zengularity * * Beez is free software: you can redistribute it and/or modify * it under the terms of the AFFERO GNU General Public License as published by * the Free Software Foundation. * * Beez is distributed "AS-IS" AND WITHOUT ANY WARRANTY OF ANY KIND, * ...
gre/beez
app/controllers/Application.scala
Scala
agpl-3.0
2,296
package scalarules.test.scalac.srcjars import org.scalatest.funsuite.AnyFunSuite import org.scalatest.matchers.must.Matchers._ import test.{A, ADuplicate} class DuplicatesTest extends AnyFunSuite { test("all classes from duplicated files are available") { noException should be thrownBy classOf[A] noExceptio...
bazelbuild/rules_scala
test/scalac/srcjars/DuplicatesTest.scala
Scala
apache-2.0
367
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.2 * @date Sat Jan 9 21:48:57 EST 2016 * @see LICENSE (MIT style license file). */ package scalation.analytics.classifier import scalation.linalgebra.{MatrixD, VectoD, VectorD, VectoI, V...
scalation/fda
scalation_1.2/src/main/scala/scalation/analytics/classifier/LDA.scala
Scala
mit
3,397
/* * Copyright 2016 rdbc contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
rdbc-io/rdbc-pgsql
rdbc-pgsql-core/src/main/scala/io/rdbc/pgsql/core/types/PgChar.scala
Scala
apache-2.0
879
package uk.ac.ncl.openlab.intake24.foodsql.user import javax.sql.DataSource import anorm.{Macro, SQL, SqlParser, sqlToSimple} import com.google.inject.name.Named import com.google.inject.{Inject, Singleton} import org.slf4j.LoggerFactory import uk.ac.ncl.openlab.intake24.errors.{FoodCompositionTableError, RecordNotFou...
digitalinteraction/intake24
FoodDataSQL/src/main/scala/uk/ac/ncl/openlab/intake24/foodsql/user/FoodCompositionServiceImpl.scala
Scala
apache-2.0
4,201
/* * Copyright (c) 2016. Y Experiment (yexperiment.com) MIT License */ package helpers import com.jme3.math.ColorRGBA object ColorPalette { // http://paletton.com/#uid=72R0X0kllllaFw0g0qFqFg0w0aF val MAIN_COLOR = new ColorRGBA(.173f, .518f, .216f, 1f) val MAIN_LIGHT = new ColorRGBA(.518f, .776f, .549f, 1f) ...
Y-Experiment/LW3D
src/main/scala/helpers/ColorPalette.scala
Scala
mit
888
package dk.itu.wsq.cases.spanningtree import dk.itu.wsq._ import scala.collection.mutable import java.util.concurrent.atomic.AtomicBoolean case class SpanningTreeNode(val id: Int) extends Node { private var _color: Option[Int] = None private def adopt(child: SpanningTreeNode): Unit = { child.parent = Some(th...
christianharrington/WorkStealingQueues
Scala/src/main/scala/dk/itu/wsq/cases/spanningtree/SpanningTreeNode.scala
Scala
unlicense
1,362
package kneelnrise.warp10scala.services import java.util.UUID import akka.NotUsed import akka.http.scaladsl.model._ import akka.stream.scaladsl.{Flow, Source} import akka.util.ByteString import kneelnrise.warp10scala.model.{FetchQuery, GTS} import scala.collection.immutable import scala.util.{Failure, Success} obje...
kneelnrise/warp10-scala
src/main/scala/kneelnrise/warp10scala/services/Warp10FetchClient.scala
Scala
mit
2,168
/* * 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...
lhfei/spark-in-action
spark-2.x/src/main/scala/org/apache/spark/examples/ml/MinHashLSHExample.scala
Scala
apache-2.0
3,513
/* * Copyright 2011-2017 Chris de Vreeze * * 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...
dvreeze/yaidom
jvm/src/test/scala/eu/cdevreeze/yaidom/blogcode/Blog2XbrlTest.scala
Scala
apache-2.0
17,627
package org.eso.ias.transfer.test.utilitymodule import org.eso.ias.tranfer.utlitymodule.StatusWord /** Build the status word with the desired bits set * * @param bitsSet the positions of the bits to set (first bit is in position 0) */ class StatusWordBuilder(bitsSet: List[Int]) { require(Option(bitsSet).isDef...
IntegratedAlarmSystem-Group/ias
TransferFunctions/src/test/scala/org/eso/ias/transfer/test/utilitymodule/StatusWordBuilder.scala
Scala
lgpl-3.0
907
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2007-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
benhutchison/scala-swing
src/main/scala/scala/swing/event/ActionEvent.scala
Scala
bsd-3-clause
726
package com.example.restapi import javax.ws.rs._ import javax.ws.rs.core._ import com.eptcomputing.neo4j.Neo4jServer import com.example.models.Moo /** * Example of a resource which uses a JAXB model object for the underlying logic and * defines its HTTP methods manually. It's only one of several possible ways of b...
ept/neo4j-scala-template
src/main/scala/com/example/restapi/MooResource.scala
Scala
mit
1,123
/** * Copyright: Copyright (C) 2016, ATS Advanced Telematic Systems GmbH * License: MPL-2.0 */ package org.genivi.sota.marshalling import scala.util.control.NoStackTrace /** * Sometimes validation (refinement) fails, see * RefinedMarshallingSupport.scala. */ case class RefinementError[T]( o: T, msg: String)...
PDXostc/rvi_sota_server
common/src/main/scala/org/genivi/sota/marshalling/RefinementError.scala
Scala
mpl-2.0
362
package org.locationtech.geomesa.stream.datastore import java.awt.RenderingHints import java.util.concurrent.{CopyOnWriteArrayList, Executors, TimeUnit} import java.util.logging.Level import java.{util => ju} import com.google.common.cache.{Cache, CacheBuilder, RemovalListener, RemovalNotification} import com.google....
jnh5y/geomesa
geomesa-stream/geomesa-stream-datastore/src/main/scala/org/locationtech/geomesa/stream/datastore/StreamDataStore.scala
Scala
apache-2.0
7,368
package one.lockstep.monolock.client.pipeline import java.io.IOException import java.security.cert.X509Certificate import java.util.concurrent.TimeUnit import one.lockstep.lock.client.transport.TransportProvider import one.lockstep.monolock.protocol._ import one.lockstep.util._ import one.lockstep.util.codec._ import...
lockstep-one/vault
vault-client/src/main/scala/one/lockstep/monolock/client/pipeline/Handshake.scala
Scala
agpl-3.0
2,437
/* * 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 ...
ddna1021/spark
sql/core/src/main/scala/org/apache/spark/sql/Column.scala
Scala
apache-2.0
36,793
package org.bitcoins.core.p2p import org.bitcoins.testkitcore.gen.p2p.DataMessageGenerator import org.bitcoins.testkitcore.util.BitcoinSUnitTest class TransactionMessageTest extends BitcoinSUnitTest { it must "have serialization symmetry" in { forAll(DataMessageGenerator.transactionMessage) { txMsg => as...
bitcoin-s/bitcoin-s
core-test/src/test/scala/org/bitcoins/core/p2p/TransactionMessageTest.scala
Scala
mit
546
/** * 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...
bbaugher/kafka
core/src/test/scala/unit/kafka/integration/UncleanLeaderElectionTest.scala
Scala
apache-2.0
12,081
/* * 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 ...
tophua/spark1.52
sql/hive/src/test/scala/org/apache/spark/sql/hive/UDFSuite.scala
Scala
apache-2.0
1,534
/** * Copyright 2011-2017 GatlingCorp (http://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...
MykolaB/gatling
gatling-charts/src/main/scala/io/gatling/charts/stats/buffers/SessionDeltaPerSecBuffers.scala
Scala
apache-2.0
4,389
import com.thesamet.proto.e2e.maps.{CustomMaps, MapsTest} import com.thesamet.proto.e2e.maps2.{MapsTest2, CustomMaps2} import com.thesamet.proto.e2e.repeatables.RepeatablesTest.Nested import com.thesamet.pb.{PersonId, Years} import org.scalacheck.{Arbitrary, Gen} import org.scalatest._ import org.scalatestplus.scalache...
dotty-staging/ScalaPB
e2e/src/test/scala/MapsSpec.scala
Scala
apache-2.0
6,262
package date import org.junit.Assert import java.util.Random import common.CommonTest import date.api.SkillFile import org.junit.runner.RunWith import de.ust.skill.common.scala.api.Read import de.ust.skill.common.scala.api.ReadOnly class DatesMakerTest extends CommonTest { def read(s : String) = SkillFile.open("src...
skill-lang/skillScalaTestSuite
src/test/scala/date/DatesMakerTest.scala
Scala
bsd-3-clause
3,617
/* * 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/akka-http-test
app/com/github/dnvriend/component/highlevelserver/dto/PersonWithId.scala
Scala
apache-2.0
739
package com.wavesplatform.it.sync import com.wavesplatform.account.KeyPair import com.wavesplatform.it.Node import com.wavesplatform.it.api.SyncHttpApi._ import com.wavesplatform.it.transactions.BaseTransactionSuite import com.wavesplatform.state.AssetDistributionPage import com.wavesplatform.transaction.transfer.Mass...
wavesplatform/Waves
node-it/src/test/scala/com/wavesplatform/it/sync/AssetDistributionSuite.scala
Scala
mit
5,008
package effechecka import java.net.{URI, URLEncoder, URL} import akka.http.scaladsl.model.headers.{Authorization, BasicHttpCredentials} import akka.http.scaladsl.model.{FormData, HttpMethods, HttpRequest} import HttpMethods._ import org.joda.time.format.ISODateTimeFormat object CsvUtils { def toOccurrenceRow(occu...
jhpoelen/effechecka
src/main/scala/effechecka/CsvUtils.scala
Scala
mit
1,511
package at.fh.swengb.resifoAndroid.db import scala.collection.mutable.ListBuffer import android.content.ContentValues import android.content.Context import android.database.sqlite.SQLiteOpenHelper import android.database.sqlite.SQLiteDatabase import at.fh.swengb.resifoAndroid.db.objects.FinalItem class DBHelper(val c...
Gulasch4ever/resifo-android
app/src/main/scala/at/fh/swengb/resifoAndroid/db/DBHelper.scala
Scala
gpl-3.0
31,380
package ee.cone.c4actor.rdb_impl import java.lang.Math.toIntExact import java.sql.{CallableStatement, Connection} import java.util.concurrent.CompletableFuture import com.typesafe.scalalogging.LazyLogging import ee.cone.c4actor._ class ExternalDBSyncClient( dbFactory: ExternalDBFactory, db: CompletableFuture[RCo...
wregs/c4proto
c4actor-rdb/src/main/scala/ee/cone/c4actor/rdb_impl/JDBCImpl.scala
Scala
apache-2.0
4,979
/** * 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...
stealthly/kafka
core/src/test/scala/integration/kafka/api/ProducerCompressionTest.scala
Scala
apache-2.0
4,177
package models import java.net.URLDecoder import java.util.UUID import com.hp.hpl.jena.query.{ QuerySolution, QueryExecutionFactory } import org.joda.time.{ LocalTime, LocalDate } import play.api.data.Form import play.api.data.Forms._ import utils.Global._ import utils.semantic.Vocabulary.{ lwm, owl, rdf, rdfs } impo...
FHK-ADV/lwm
app/models/ScheduleAssociations.scala
Scala
mit
11,402
package im.actor.server.util import im.actor.api.rpc.files import im.actor.api.rpc.messaging._ object GroupServiceMessages { def groupCreated = ServiceMessage("Group created", Some(ServiceExGroupCreated)) def userInvited(userId: Int) = ServiceMessage("User invited to the group", Some(ServiceExUserInvited(userId))...
v2tmobile/actor-platform
actor-server/actor-utils/src/main/scala/im/actor/server/util/GroupServiceMessages.scala
Scala
mit
1,158
package com.sksamuel.elastic4s.requests.searches.queries import com.sksamuel.elastic4s.handlers.searches.queries.term import com.sksamuel.elastic4s.requests.searches.term.TermQuery import org.scalatest.funsuite.AnyFunSuite import org.scalatest.matchers.should.Matchers class TermQueryBodyFnTest extends AnyFunSuite wit...
sksamuel/elastic4s
elastic4s-core/src/test/scala/com/sksamuel/elastic4s/requests/searches/queries/TermQueryBodyFnTest.scala
Scala
apache-2.0
667
/* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/nisp-frontend
test/uk/gov/hmrc/nisp/controllers/LandingControllerSpec.scala
Scala
apache-2.0
11,957
import org.scalatest.{ Matchers, FlatSpec } import bogo_sort._ class bogo_sort_test extends FlatSpec with Matchers { val values = Array(1, 17, -4, 2) "Bogo Sort" should "sort an array of Ints" in { val sorted = sort(values) sorted should contain inOrder (-4, 1, 2, 17) } "Bogo Sort V2" should "sort an...
Etiene/Algorithm-Implementations
Bogosort/Scala/lichtsprung/bogo_sort_test.scala
Scala
mit
498
package outer package nested val one: Int = 1 type Hi = Int object Hi { def hi: Hi = 2 }
som-snytt/dotty
tests/pos-special/sourcepath/outer/nested/toplevel1.scala
Scala
apache-2.0
93
package lila.evaluation case class PlayerFlags( suspiciousErrorRate: Boolean, alwaysHasAdvantage: Boolean, highBlurRate: Boolean, moderateBlurRate: Boolean, highlyConsistentMoveTimes: Boolean, moderatelyConsistentMoveTimes: Boolean, noFastMoves: Boolean, suspiciousHoldAlert: Boolean )
luanlv/lila
modules/evaluation/src/main/PlayerFlags.scala
Scala
mit
319
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
WindCanDie/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/orc/OrcScanBuilder.scala
Scala
apache-2.0
2,562
/* * * * 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 "L...
qinzhaokun/incubator-eagle
eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/AlertExecutorConsumerUtils.scala
Scala
apache-2.0
3,730
package chapter.one object ExerciseSix { val twoToThe1024: BigInt = { BigInt(2).pow(1024) } }
deekim/impatient-scala
src/main/scala/chapter/one/ExerciseSix.scala
Scala
apache-2.0
105
package zeroformatter import java.time._ import dog._ import dog.props._ import scalaprops._ import scalaz.std.anyVal._ import scalaz.std.string._ import scalaz.std.option._ object PrimitiveFormatterTest extends Base { implicit val boolCase = Gen.elements((true, Array(1).map(_.toByte)), (false, Array(0).map(_.toBy...
pocketberserker/scala-zero-formatter
zero-formatter/src/test/scala/zeroformatter/PrimitiveFormatterTest.scala
Scala
mit
4,574
package controller import console.model.World import me.mtrupkin.console.control.{Border, Composite} import me.mtrupkin.console.controller.ControllerStateMachine import me.mtrupkin.console.layout.{Pos, Layout, Orientation} import me.mtrupkin.console.screen.{ConsoleKeyModifier, ConsoleKey} import me.mtrupkin.geometry.P...
mtrupkin/console-lib
src/main/scala/controller/LoadGame.scala
Scala
mit
1,341
/* * 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 not u...
Panos-Bletsos/spark-cost-model-optimizer
sql/core/src/main/scala/org/apache/spark/sql/expressions/UserDefinedFunction.scala
Scala
apache-2.0
2,084
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
massie/adam
adam-core/src/test/scala/org/bdgenomics/adam/rdd/read/recalibration/RecalibrationTableSuite.scala
Scala
apache-2.0
1,531
package com.temerev.wontfix trait FixDictionary { def getTagsInGroup(msgType: String, groupTag: Int): Seq[Int] def getTagsInMessage(msgType: String): Seq[Int] }
atemerev/wontfix
src/main/scala/com/temerev/wontfix/FixDictionary.scala
Scala
bsd-2-clause
166
// 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-querying/modules/scray-querying/src/main/scala/scray/querying/source/queryDomainFilterSources.scala
Scala
apache-2.0
5,852
package no.uio.musit.healthcheck import no.uio.musit.test.MusitSpec class StopWatchSpec extends MusitSpec { class ListTicker(var values: List[Long]) extends Ticker { override def tick() = values match { case head :: Nil => head case head :: tail => values = tail head c...
MUSIT-Norway/musit
musit-service/src/test/scala/no/uio/musit/healthcheck/StopWatchSpec.scala
Scala
gpl-2.0
623
package chandu0101.scalajs.react.components.demo.pages import chandu0101.scalajs.react.components.demo.components.LeftNavPage import chandu0101.scalajs.react.components.demo.routes.{LeftRoute, MuiRouteModule} import japgolly.scalajs.react._ import japgolly.scalajs.react.extra.router2.RouterCtl import scala.scalajs.js...
coreyauger/scalajs-react-components
demo/src/main/scala/chandu0101/scalajs/react/components/demo/pages/MuiPage.scala
Scala
apache-2.0
760
package rml.args.arg.injector import java.io.File import rml.args.arg.Arg import rml.args.config.FullConfig import rml.args.util.CsvReader trait DataFromCsv extends Injector { val files: Arg[List[File]] override def inject(config: FullConfig, keyColumn: String, keyValue: String): FullConfig = { files.app...
rml/scala_args
src/main/scala/rml/args/arg/injector/DataFromCsv.scala
Scala
gpl-3.0
510
/* * 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 ...
Dax1n/spark-core
core/src/main/scala/org/apache/spark/deploy/master/ui/MasterWebUI.scala
Scala
apache-2.0
2,272
/* * 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 ...
stanzhai/spark
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQuerySuite.scala
Scala
apache-2.0
28,535
/** MACHINE-GENERATED FROM AVRO SCHEMA. DO NOT EDIT DIRECTLY */ package example.proto sealed trait EnumProtocol final object Suit extends Enumeration with EnumProtocol { type Suit = Value val SPADES, HEARTS, DIAMONDS, CLUBS = Value } final case class Card(suit: Suit.Value, number: Int) extends EnumProtocol
julianpeeters/avrohugger
avrohugger-core/src/test/expected/standard/example/proto/EnumProtocol.scala
Scala
apache-2.0
314
package ai.agnos.sparql.stream.client import ai.agnos.sparql._ import java.io.{StringReader, StringWriter} import java.net.URL import java.nio.file.Path import akka.NotUsed import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.http.scaladsl.model.headers.Accept import akka.http.scaladsl.model.{Htt...
modelfabric/reactive-sparql
src/main/scala/ai/agnos/sparql/stream/client/GraphStoreRequestFlowBuilder.scala
Scala
mit
8,899
/* * Copyright 2010-2011 WorldWide Conferencing, LLC * * 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 applica...
lzpfmh/framework-2
web/webkit/src/test/scala/net/liftweb/webapptest/OneShot.scala
Scala
apache-2.0
4,945
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
goldmedal/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/history/SQLLiveEntitiesEventFilterSuite.scala
Scala
apache-2.0
6,439
// A Spritz Cipher driver program to Encrypt/Decrypt files. // This implementation is copyright 2015 Richard Todd // The license in GPL, see license file in the repository. package rwt.spritz import com.waywardcode.crypto.{SpritzCipher, SpritzInputStream, SpritzOutputStream} import java.io.{File,FileInputStream,Fil...
rwtodd/spritz_cipher
scala_version/cmd/crypt.scala
Scala
gpl-2.0
4,526
package io.finch.oauth2 import com.twitter.finagle._ import com.twitter.finagle.oauth2.{AuthInfo, GrantHandlerResult} import com.twitter.util.Await import io.circe.generic.auto._ import io.finch._ import io.finch.circe._ /** * A simple example of finch-oauth2 usage * * Use the following sbt command to run the a...
travisbrown/finch
examples/src/main/scala/io/finch/oauth2/Main.scala
Scala
apache-2.0
1,696
package xsbt.boot import Pre._ object JAnsi { def uninstall(loader: ClassLoader): Unit = callJAnsi("systemUninstall", loader) def install(loader: ClassLoader): Unit = callJAnsi("systemInstall", loader) private[this] def callJAnsi(methodName: String, loader: ClassLoader): Unit = if (isWindows && !isCygwin) call...
xeno-by/old-scalameta-sbt
launch/src/main/scala/xsbt/boot/JAnsi.scala
Scala
bsd-3-clause
1,130
/** * @author ven */ package org.jetbrains.plugins.scala package lang package psi package impl package toplevel package typedef import com.intellij.openapi.progress.ProgressManager import com.intellij.openapi.project.Project import com.intellij.psi.search.GlobalSearchScope import com.intellij.psi.{PsiClass, PsiClassTy...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/toplevel/typedef/MixinNodes.scala
Scala
apache-2.0
22,369
package breeze.linalg.functions import breeze.generic.UFunc import breeze.linalg._ import breeze.linalg.eig.Eig import breeze.linalg.eigSym.{DenseEigSym, EigSym} import breeze.numerics._ import breeze.stats.distributions.Rand import spire.implicits.cforRange /** * Approximate truncated randomized EVD */ object ev...
claydonkey/breeze
math/src/main/scala/breeze/linalg/functions/evdr.scala
Scala
apache-2.0
3,943
package de.agilecoders.projects.scaspell.util import com.twitter.finagle.http.{Response, Request} import com.twitter.finagle.Service import com.twitter.finagle.http.service.RoutingService /** * TODO miha: document class purpose * * @author miha */ object RequestAwareRoutingService { def byRequest[REQUEST <: R...
l0rdn1kk0n/scaspell
scaspell-service/src/main/scala/de/agilecoders/projects/scaspell/util/RequestAwareRoutingService.scala
Scala
apache-2.0
651
package health import java.util import akka.actor.Actor import spray.routing._ import spray.http._ import spray.client.pipelining._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scala.util.{Success, Failure} class CheckerActor extends Actor with Checker { def acto...
ExpatConnect/health
src/main/scala/health/Checker.scala
Scala
mit
1,650
package org.orbeon.oxf.externalcontext import java.{util ⇒ ju} import org.orbeon.oxf.common.OXFException import org.orbeon.oxf.externalcontext.ExternalContext.{Session, SessionListener, SessionScope} import scala.collection.JavaConverters._ import scala.collection.{immutable ⇒ i} class SimpleSession(sessionId: Stri...
brunobuzzi/orbeon-forms
src/main/scala/org/orbeon/oxf/externalcontext/SimpleSession.scala
Scala
lgpl-2.1
1,992
package org.meritocracy.lib import scala.xml._ import net.liftweb._ import common._ import http.NoticeType import json._ import util.CssSel import util.Helpers._ import org.bson.types.ObjectId trait AppHelpers { /* * Allows for the following to be used when building snippets and it will handle * errors according t...
Rmanolis/meritocracy
src/main/scala/org/meritocracy/lib/AddHelpers.scala
Scala
apache-2.0
2,378
/* * 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 n...
MyPureCloud/kafka
core/src/main/scala/kafka/coordinator/group/GroupMetadata.scala
Scala
apache-2.0
20,071
/* * Copyright 2011 Red Hat, Inc. and/or its affiliates. * * This 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. * * ...
nmldiegues/stibt
infinispan/server/core/src/main/scala/org/infinispan/server/core/ServerCoreMetadataFileFinder.scala
Scala
apache-2.0
1,054
/* * Copyright 2014 IBM Corp. * * 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...
yeghishe/spark-kernel
kernel/src/test/scala/com/ibm/spark/global/ExecutionCounterSpec.scala
Scala
apache-2.0
1,095
package graphql.resolvers import java.nio.file.{Files, Path, Paths} import actors.FileActor import actors.FileActor.SaveFileMetadata import akka.actor.ActorRef import akka.http.scaladsl.model.Multipart.FormData import akka.stream.ActorMaterializer import akka.stream.scaladsl.{FileIO, Keep, Sink, Source} import com.by...
sysgears/apollo-universal-starter-kit
modules/upload/server-scala/src/main/scala/graphql/resolvers/FileUploadResolverImpl.scala
Scala
mit
3,138
package uk.gov.dvla.vehicles.presentation.common.model import play.api.data.Forms.mapping import play.api.libs.json.Json import uk.gov.dvla.vehicles.presentation.common.clientsidesession.CacheKey import uk.gov.dvla.vehicles.presentation.common.mappings.DropDown final case class NewKeeperChooseYourAddressFormModel(add...
dvla/vehicles-presentation-common
app/uk/gov/dvla/vehicles/presentation/common/model/NewKeeperChooseYourAddressFormModel.scala
Scala
mit
1,005
package net.sansa_stack.inference.spark.utils import org.apache.log4j.{Level, Logger} import org.apache.spark.{SparkConf, SparkContext} /** * @author Lorenz Buehmann */ object SparkManager { /** * Spark context */ private var context: SparkContext = null /** * Creates a new Spark context *...
SANSA-Stack/SANSA-RDF
sansa-inference/sansa-inference-spark/src/main/scala/net/sansa_stack/inference/spark/utils/SparkManager.scala
Scala
apache-2.0
1,705
/* * 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
core/src/main/scala/org/apache/spark/internal/config/package.scala
Scala
apache-2.0
57,215
package ch.epfl.lamp.odds import org.scalatest.FlatSpecLike import org.scalatest.Matchers import inference._ trait CListOddsLang extends OddsLang { import Rand.ToScalaMonadic // A list where the tail itself is a random var. sealed abstract class CList[+A] { def length: Rand[Int] = this match { case...
sstucki/odds
core/src/test/scala/odds/CMusicWarmUpModelTest.scala
Scala
bsd-3-clause
6,206
/* Copyright (c) 2016, Robby, Kansas State University All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of cond...
sireum/v3
pilar/js/src/test/scala/org/sireum/pilar/test/ast/AstJsTest.scala
Scala
bsd-2-clause
2,518
import org.scalatestplus.play._ import play.api.test._ import play.api.test.Helpers._ /** * Add your spec here. * You can mock out a whole application including requests, plugins etc. * For more information, consult the wiki. */ class ApplicationSpec extends PlaySpec with OneAppPerTest { "Routes" should { ...
eatcodenet/trainwatch
tw-webapp/_archived/test/ApplicationSpec.scala
Scala
mit
1,045
package nl.codecentric.assumption.dsl.core.definition import scala.concurrent.duration._ /** * Created by hylke on 06/07/15. */ class SampleDefinition extends BaseDefinition { "this is baseline" baseline (() => { println("x") }) "this is assume" assumes (() => { println("y") }) "this is failure...
craftsmenlabs/gareth-poc
dsl/core/src/test/scala/nl/codecentric/assumption/dsl/core/definition/SampleDefinition.scala
Scala
gpl-2.0
460
import scala.collection.mutable.Map // !< 可用Array类似的方式创建 val treasureMap = Map[Int, String]() treasureMap += (1 -> "Go to island") treasureMap += (2 -> "Find big X on ground") treasureMap += (3 -> "Dig.") println(treasureMap) // !< 也可以穷举创建! val romanNumeral = Map(1 -> "I", 2 -> "II", 3 -> "III", 4 -> "IV", 5 -> "V")
fangguanya/study
Java/scala_shell/scalamap.scala
Scala
mit
352
package com.googlecode.kanbanik.builders import org.bson.types.ObjectId import com.googlecode.kanbanik.model._ import com.googlecode.kanbanik.commands.TaskManipulation import com.googlecode.kanbanik.dtos.TaskDto class TaskBuilder extends TaskManipulation { lazy val classOfServiceBuilder = new ClassOfServiceBuilder ...
kanbanik/kanbanik
kanbanik-server/src/main/scala/com/googlecode/kanbanik/builders/TaskBuilder.scala
Scala
apache-2.0
2,492
package db import anorm._ import io.flow.common.v0.models.UserReference import io.flow.delta.v0.models.{Publication, Subscription, SubscriptionForm} import io.flow.postgresql.{OrderBy, Query} import io.flow.util.IdGenerator import play.api.db._ import scala.util.{Failure, Success, Try} @javax.inject.Singleton class ...
flowcommerce/delta
api/app/db/SubscriptionsDao.scala
Scala
mit
3,985
package usbinstall.controllers import java.net.URL import java.util.ResourceBundle import javafx.event.ActionEvent import javafx.fxml.{FXML, Initializable} import javafx.scene.control.{Button, ComboBox} import javafx.stage.{Stage, Window} import scala.annotation.unused import suiryc.scala.log.LogLevel import suiryc.sc...
suiryc/usbinstall
src/main/scala/usbinstall/controllers/OptionsController.scala
Scala
gpl-3.0
2,344
package com.googlecode.warikan.infrastructure.inject import com.google.inject._ /** * Injector. * * @author yukei */ object Injector { private var _config:AbstractModule = _ /** * Set configuration. * * @param config Configuration */ def config_= (config:AbstractModule) { _conf...
digitalsoul0124/warikan
src/main/scala/com/googlecode/warikan/infrastructure/inject/Injector.scala
Scala
mit
596
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2007-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
SethTisue/scala-swing
src/main/scala/scala/swing/SplitPane.scala
Scala
bsd-3-clause
2,973
package me.lachlanap.oldtoby.server.helpers import com.fasterxml.jackson.core.JsonProcessingException import com.ning.http.client.AsyncHttpClientConfig import org.scalatest.concurrent.ScalaFutures import org.scalatest.exceptions.TestFailedException import org.scalatest.time.SpanSugar._ import play.api.libs.json.{JsNul...
thorinii/oldtoby-server
acceptance/src/test/scala/me/lachlanap/oldtoby/server/helpers/ServerInterface.scala
Scala
mit
4,705
/* * Copyright 2010 Michael Fortin <[email protected]> * * 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 la...
m410/brzy
src/main/scala/org/brzy/webapp/action/args/UnknownActionArgException.scala
Scala
apache-2.0
772
package fbSpark import org.apache.spark.SparkConf import org.joda.time.format.DateTimeFormat import org.joda.time.format.DateTimeFormatter object Common{ val timeFormatter: DateTimeFormatter = DateTimeFormat .forPattern("yyyy-MM-dd HH:mm:ss.S") // Get default Spark configuration. def getSparkConf(appName...
PredictionIO/open-academy
MayuriSridhar/fb_spark/src/main/scala/fbSpark/Common.scala
Scala
apache-2.0
815
package org.example1_1.declaration.eta class EtaClass { }
JetBrains/intellij-scala
scala/scala-impl/testdata/move/allInOne_1_MoveXYZ/before/org/example1_1/declaration/eta/EtaClass.scala
Scala
apache-2.0
60
/* * Copyright (c) 2016 SnappyData, 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 by ap...
vjr/snappydata
cluster/src/test/scala/io/snappydata/benchmark/snappy/tpch/QueryExecutionJdbc.scala
Scala
apache-2.0
11,338
/* * Copyright (c) 2013-2014 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, and * you may not use this file except in compliance with the Apache License * Version 2.0. You may obtain a copy of the Apache License Version 2.0 at * http://www....
pkallos/snowplow
2-collectors/scala-stream-collector/src/main/scala/com.snowplowanalytics.snowplow.collectors.scalastream/ScalaCollectorApp.scala
Scala
apache-2.0
4,729
/* * (C) Copyright 2015 Atomic BITS (http://atomicbits.io). * * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Affero General Public License * (AGPL) version 3.0 which accompanies this distribution, and is available in * the LICENSE file or at http...
rcavalcanti/scraml
modules/scraml-test/src/test/scala/io/atomicbits/scraml/FooRamlModelGeneratorTest.scala
Scala
agpl-3.0
8,367
package example import common.messages.{WeatherResponse, Weather, User, UserResponse} import example.JsParser._ import org.scalajs.dom.ext.Ajax import org.scalajs.jquery.{jQuery => $} import upickle._ import scala.concurrent.Future import scala.scalajs.concurrent.JSExecutionContext.Implicits.runNow import scala.scala...
47deg/scalajs-intro
example-client/src/main/scala/example/ForComprehension.scala
Scala
apache-2.0
1,429
/** * Copyright © 2013-2015 Uncharted Software Inc. * * Property of Uncharted™, formerly Oculus Info Inc. * http://uncharted.software/ * * Released under the MIT License. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the...
unchartedsoftware/aperture-tiles
tile-generation/src/main/scala/com/oculusinfo/tilegen/datasets/ErrorAccumulator.scala
Scala
mit
4,833
package es.own3dh2so4 import java.io.ByteArrayInputStream import java.nio.charset.StandardCharsets import scala.io.Source /** * Created by david on 1/04/17. */ object Properties { def apply(): Properties = new Properties("/conf.properties") def apply(file : String): Properties = new Properties(file) } class...
own3dh2so4/spark2-fast-data-processing-book
src/main/scala/es/own3dh2so4/Properties.scala
Scala
apache-2.0
659
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
VlachJosef/bforms
app/uk/gov/hmrc/bforms/controllers/Forms.scala
Scala
apache-2.0
4,213
package net.sansa_stack.rdf.spark.model.ds import com.holdenkarau.spark.testing.{DataFrameSuiteBase, SharedSparkContext} import org.apache.jena.datatypes.xsd.impl.XSDDouble import org.apache.jena.graph.{Node, NodeFactory, Triple} import org.apache.jena.riot.Lang import org.apache.spark.sql.{Dataset, SparkSession} impo...
SANSA-Stack/SANSA-RDF
sansa-rdf/sansa-rdf-spark/src/test/scala/net/sansa_stack/rdf/spark/model/ds/DSTripleOpsTests.scala
Scala
apache-2.0
5,200
/* * 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 ...
minixalpha/spark
sql/core/src/test/scala/org/apache/spark/sql/streaming/EventTimeWatermarkSuite.scala
Scala
apache-2.0
19,767
package com.programmaticallyspeaking.ncd.e2e import java.util.concurrent.atomic.AtomicInteger import akka.actor.{Actor, ActorRef, Props} import com.programmaticallyspeaking.ncd.chrome.domains.Debugger.{CallFrame, PausedEventParams} import com.programmaticallyspeaking.ncd.chrome.domains.Messages import com.programmati...
provegard/ncdbg
src/test/scala/com/programmaticallyspeaking/ncd/e2e/E2ETestFixture.scala
Scala
bsd-3-clause
4,337
/* * 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/tensor/QuantizedTensorUnsupported.scala
Scala
apache-2.0
46,702
/* * Wire * Copyright (C) 2016 Wire Swiss GmbH * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This progr...
wireapp/wire-android-sync-engine
zmessaging/src/test/scala/org/robolectric/shadows/ShadowTransliterator.scala
Scala
gpl-3.0
1,220
package net.elodina.mesos.exhibitor import java.util import java.util.concurrent.TimeUnit import java.util.{Collections, Date} import net.elodina.mesos.util.Repr import com.google.protobuf.ByteString import net.elodina.mesos.exhibitor.Util.Str import net.elodina.mesos.exhibitor.exhibitorapi._ import org.apache.log4j....
elodina/exhibitor-mesos-framework
src/main/scala/net/elodina/mesos/exhibitor/Scheduler.scala
Scala
apache-2.0
22,079
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
geeag/kafka
core/src/main/scala/kafka/message/ByteBufferMessageSet.scala
Scala
apache-2.0
35,734
package im.actor.server.api.frontend import scala.annotation.tailrec import scala.collection.immutable import akka.actor._ import akka.stream.actor.ActorPublisher import akka.stream.actor.ActorPublisherMessage.{ Cancel, Request } import com.google.protobuf.ByteString import scodec.bits.BitVector import im.actor.serv...
v2tmobile/actor-platform
actor-server/actor-frontend/src/main/scala/im/actor/server/api/frontend/SessionClient.scala
Scala
mit
2,694
package com.kubukoz.adventofcode2016 import org.scalatest.{FlatSpec, Matchers} import Day10._ class Day10Tests extends FlatSpec with Matchers { "State transforming" should "work" in { val input = """value 5 goes to bot 2 |bot 2 gives low to bot 1 and high to bot 0 |value 3 go...
kubukoz/advent-of-code-2016
src/test/scala/com/kubukoz/adventofcode2016/Day10Tests.scala
Scala
apache-2.0
770