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
import sbt._ import Keys._ object FPInScalaBuild extends Build { val dependencies = Seq( "org.scalatest" % "scalatest_2.11" % "2.2.4", "junit" % "junit" % "4.12" ) val opts = Project.defaultSettings ++ Seq( name := "fpinscala" , version := "0.1", scalaVersion := "2.11.6", scalacOptions...
sarbo/fpinscala
project/Build.scala
Scala
mit
1,815
/** * This file is part of the TA Buddy project. * Copyright (c) 2014 Alexey Aksenov ezh@ezh.msk.ru * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Global License version 3 * as published by the Free Software Foundation with the addition of t...
digimead/digi-TABuddy-desktop
part-model-editor/src/main/scala/org/digimead/tabuddy/desktop/model/editor/ui/view/editor/bar/EditorBar.scala
Scala
agpl-3.0
3,750
package org.jetbrains.plugins.scala.lang.refactoring.util import com.intellij.lang.ASTNode import java.util.Map import com.intellij.psi.impl.source.tree.{CompositeElement, TreeElement, TreeCopyHandler} import org.jetbrains.plugins.scala.lang.parser.ScalaElementTypes import com.intellij.psi.impl.source.SourceTreeToPsiM...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/refactoring/util/ScalaChangeUtilSupport.scala
Scala
apache-2.0
3,013
/* * 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/org/apache/openwhisk/core/database/s3/CloudFrontSignerTests.scala
Scala
apache-2.0
3,208
package com.toscaruntime.it import com.toscaruntime.it.TestConstant._ import com.toscaruntime.it.steps.CsarsSteps._ import com.toscaruntime.it.steps.DeploymentsSteps._ import org.scalatest.MustMatchers /** * Deployment images specs * * @author Minh Khang VU */ class DeploymentsSpec extends AbstractSpec with M...
vuminhkh/tosca-runtime
test/src/it/scala/com/toscaruntime/it/DeploymentsSpec.scala
Scala
mit
2,092
package org.hammerlab.bam.check import hammerlab.iterator._ import hammerlab.path._ import magic_rdds.zip._ import org.apache.spark.rdd.RDD import org.hammerlab.bam.check import org.hammerlab.bam.check.Checker.MakeChecker import org.hammerlab.bam.check.full.error.Flags import org.hammerlab.bam.check.indexed.BlocksAndI...
ryan-williams/spark-bam
cli/src/main/scala/org/hammerlab/bam/check/CallPartition.scala
Scala
apache-2.0
1,962
package test002 import scalikejdbc._ import skinny.dbmigration.DBSeeds trait CreateTables extends DBSeeds { self: Connection => override val dbSeedsAutoSession = NamedAutoSession('test002) addSeedSQL( sql""" create table account ( name varchar(128) not null) """ ) runIfFailed(sql"select count(1) from ...
seratch/skinny-framework
orm/src/test/scala/test002/CreateTables.scala
Scala
mit
332
package com.sksamuel.elastic4s.indexes import com.sksamuel.elastic4s.testkit.DockerTests import org.scalatest.{Matchers, WordSpec} import scala.util.Try class FlushIndexRequestTest extends WordSpec with Matchers with DockerTests { private val indexname = "flushindextest" Try { client.execute { delete...
Tecsisa/elastic4s
elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/indexes/FlushIndexRequestTest.scala
Scala
apache-2.0
656
/*********************************************************************** * 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...
jahhulbert-ccri/geomesa
geomesa-process/geomesa-process-vector/src/main/scala/org/locationtech/geomesa/process/analytic/MinMaxProcess.scala
Scala
apache-2.0
4,235
package hu.frankdavid.diss.actor import hu.frankdavid.diss.expression._ import scala.collection.mutable import hu.frankdavid.diss.util.JobList import hu.frankdavid.diss.DataTable import hu.frankdavid.diss.DataTable.UpdateResult import hu.frankdavid.diss.expression.Cell import hu.frankdavid.diss.network.NetworkHandler ...
frankdavid/diss
src/main/scala/hu/frankdavid/diss/actor/CalculatorManager.scala
Scala
apache-2.0
5,245
class Foo { def foo[@specialized(Int) T](x: T) = new Object { private final val myEdges = List(1, 2 , 3) def boo: Unit = { myEdges } } }
yusuke2255/dotty
tests/untried/pos/spec-private.scala
Scala
bsd-3-clause
161
/* * 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...
wzhongyuan/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/utils/tf/TensorflowLoaderSpec.scala
Scala
apache-2.0
26,782
import org.junit.runner._ import org.openqa.selenium.phantomjs.PhantomJSDriver import org.specs2.mutable._ import org.specs2.runner._ import play.api.test._ /** * add your integration spec here. * An integration test will fire up a whole play application in a real (or headless) browser */ @RunWith(classOf[JUnitRunn...
saturday06/github-scouter.net
test/IntegrationSpec.scala
Scala
mit
593
/* * 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 ...
jatin9896/incubator-carbondata
integration/spark-common/src/main/scala/org/apache/spark/util/PartitionUtils.scala
Scala
apache-2.0
15,096
package springnz.sparkplug.executor import akka.actor.ActorRef import springnz.sparkplug.executor.MessageTypes.JobRequest import springnz.sparkplug.core.SparkOperation object MessageTypes { case object ClientReady case object ServerReady case object ShutDown case object CancelAllJobs case class ServerErro...
springnz/sparkplug
sparkplug-executor/src/main/scala/springnz/sparkplug/executor/MessageTypes.scala
Scala
mit
728
package pep_094 object Solution { val MAX = 1000000000 val ats = for { a <- Iterator.from(3, 2).takeWhile(_ < MAX / 3).map(_.toLong) b <- Iterator(a - 1, a + 1) b2 = b / 2 hh = a * a - b2 * b2 h = math.sqrt(hh) if h.isWhole() if h.toLong * h.toLong == hh // NEVER trust a Double with mo...
filippovitale/pe
pe-solution/src/main/scala/pep_094/Solution.scala
Scala
mit
404
package nasa.nccs.utilities import java.util.jar.JarFile import com.joestelmach.natty import ucar.nc2.time.CalendarDate import scala.collection.JavaConversions._ import scala.collection.JavaConverters._ import scala.collection.mutable import org.slf4j.Logger object cdsutils { def flatlist[T]( values: Option[T]* )...
nasa-nccs-cds/esgfWpsApi
src/main/scala/nasa/nccs/utilities/generic.scala
Scala
gpl-2.0
3,405
package sangria.util import language.postfixOps import scala.concurrent.{Await, Future} import scala.concurrent.duration._ trait AwaitSupport { implicit class WithAwait[T](f: Future[T]) { def await = Await.result(f, 2 seconds) } }
narahari92/sangria
src/test/scala/sangria/util/AwaitSupport.scala
Scala
apache-2.0
242
/* * 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...
SRGOM/scalatest
scalatest-test/src/test/scala/org/scalatest/EveryShouldContainSpec.scala
Scala
apache-2.0
28,885
package com.giyeok.jparser.study.parsergen import com.giyeok.jparser.NGrammar import com.giyeok.jparser.examples.metalang.SimpleGrammars import com.giyeok.jparser.metalang.MetaGrammar import com.giyeok.jparser.parsergen.deprecated.{SimpleGen, SimpleGenGen} import com.giyeok.jparser.utils.{AbstractEdge, AbstractGraph} ...
Joonsoo/moon-parser
study/src/main/scala/com/giyeok/jparser/study/parsergen/TopologyViewer.scala
Scala
mit
4,751
package com.bgfurfeature.config import scala.collection.mutable.ArrayBuffer /** * com.bgfurfeature.config * Created by C.J.YOU on 2019/12/13. */ object Conf { // parameters configuration val nGram = 3 val updateFreq = 300000 // 5min // api configuration val segmentorHost = "http://localhost:8282" ...
bgfurfeature/AI
src/main/scala/com/bgfurfeature/config/Conf.scala
Scala
apache-2.0
1,532
/* Copyright 2015 Matt Silbernagel * * 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...
silbermm/proximal
app/services/AssessmentActor.scala
Scala
apache-2.0
9,888
package software.egger.jirapaymosync import com.atlassian.jira.rest.client.api.domain.Issue import software.egger.jirapaymosync.paymo.Task class TaskListMatcher(jiraIssues: Iterable[Issue]) { def matchWith(paymoTasks: Iterable[Task]): Iterable[TaskMatch] = { val matching = for (issue <- jiraIssues) yield ...
eggeral/jira-paymo-sync
src/main/scala/software/egger/jirapaymosync/TaskListMatcher.scala
Scala
apache-2.0
662
package com.enkidu.lignum.parsers.commons import org.parboiled2 import org.parboiled2.{ CharPredicate, Rule0 } import scala.language.implicitConversions trait AbstractParser extends parboiled2.Parser with SpecialCharacters with Keywords{ protected implicit def str2Rule(s: String): Rule0 = if (s.endsWith(" ")...
marek1840/java-parser
src/main/scala/com/enkidu/lignum/parsers/commons/AbstractParser.scala
Scala
mit
1,955
/* * Copyright © 2014 Teo Klestrup, Carl Dybdahl * * This file is part of Republix. * * Republix 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 op...
teozkr/republix-online
republix/src/main/scala/republix/ui/package.scala
Scala
agpl-3.0
1,356
package models import fr.njin.playoauth.common.OAuth import fr.njin.playoauth.common.domain.OauthClient import org.joda.time._ import scalikejdbc._ import scalikejdbc.async._ import scala.concurrent.Future import java.util.UUID /** * User: bathily * Date: 01/10/13 */ case class App(pid: Long, owne...
njin-fr/play-oauth
play-oauth-server/app/models/App.scala
Scala
apache-2.0
5,336
package org.bitcoins.wallet import org.bitcoins.asyncutil.AsyncUtil import org.bitcoins.core.currency._ import org.bitcoins.server.BitcoindRpcBackendUtil import org.bitcoins.testkit.wallet.{ BitcoinSWalletTest, WalletAppConfigWithBitcoindNewestFixtures } import org.bitcoins.testkitcore.util.TestUtil.bech32Address ...
bitcoin-s/bitcoin-s
wallet-test/src/test/scala/org/bitcoins/wallet/BitcoindBlockPollingTest.scala
Scala
mit
2,086
class t5054_q2 { /** * A simple comment * * @param lost a lost parameter * @usecase def test(): Int */ final def test(implicit lost: Int): Int = lost }
lrytz/scala
test/scaladoc/resources/t5054_q2.scala
Scala
apache-2.0
178
package dockarium.controller import com.greencatsoft.angularjs.Controller /** * Created by becker on 2/19/15. */ object ServerVersionCtrl extends Controller { override def initialize(): Unit = { super.initialize() } }
dockarium-io/dockarium-io
client/src/main/scala/dockarium/controller/ServerVersionCtrl.scala
Scala
apache-2.0
230
package edu.gemini.ags.gems.mascot.util import breeze.linalg._ import edu.gemini.ags.gems.mascot.util.MatrixUtil._ import YUtils.{dif, abs, divide, digitize} import YUtils.{cosh, sinh, add, grow} import YUtils.pcen /* * Cubic spline interpolator. * * Ported from the Yorick original: * Copyright (c) 2005, The Reg...
fnussber/ocs
bundle/edu.gemini.ags/src/main/scala/edu/gemini/ags/gems/mascot/util/Spline.scala
Scala
bsd-3-clause
18,979
package cs4r.labs.learningscala.adventofcode object AdventOfCode16 extends App { val puzzleInput = """Sue 1: cars: 9, akitas: 3, goldfish: 0 |Sue 2: akitas: 9, children: 3, samoyeds: 9 |Sue 3: trees: 6, cars: 6, children: 4 |Sue 4: trees: 4, vizslas: 4, goldfish: 9 |Sue 5: akitas: 9, vi...
Cs4r/AdventOfCode
src/main/scala/cs4r/labs/learningscala/adventofcode/AdventOfCode16.scala
Scala
gpl-3.0
26,997
package demo.components.reactsplitpane import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.html_<^._ object ReactSplitPaneInfo { val component = ScalaComponent .builder[Unit]("ReactSplitPaneInfo") .render(P => { <.div(^.cls := "full-width-section")( <.h3("React Split Pane :"), ...
chandu0101/scalajs-react-components
demo/src/main/scala/demo/components/reactsplitpane/ReactSplitPaneInfo.scala
Scala
apache-2.0
572
package com.twitter.finagle.mysql.integration import com.twitter.finagle.Mysql import com.twitter.finagle.param import com.twitter.finagle.tracing._ import com.twitter.util.Await import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class M...
koshelev/finagle
finagle-mysql/src/test/scala/com/twitter/finagle/mysql/integration/MysqlBuilderTest.scala
Scala
apache-2.0
1,633
/******************************************************************************* Copyright (c) 2013-2014, S-Core, KAIST. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. *********************************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/analysis/typing/models/Tizen/TIZENseService.scala
Scala
bsd-3-clause
32,598
package diameter.Dictionary /** * Created by edzmbuh on 21/03/2016. */ abstract class GenericDictionary extends Iterable[DictionaryObject] //trait AvpDictionary extends DictionaryBase with Iterable[AvpHeader] //trait VendorDictionary extends DictionaryBase with Iterable[DictionaryVendor] //trait CommandDictionary ...
dbuhryk/DiameterCoder
Diameter/src/main/scala/diameter/Dictionary/GenericDictionary.scala
Scala
mit
460
package org.keycloak.gatling import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.{Executors, ThreadFactory} import io.gatling.core.akka.GatlingActorSystem import io.gatling.core.validation.Success /** * @author Radim Vansa &lt;rvansa@redhat.com&gt; */ object Blocking { GatlingActorSyst...
keycloak/keycloak
testsuite/performance/tests/src/main/scala/org/keycloak/gatling/Blocking.scala
Scala
apache-2.0
816
package typeclasses trait Show { def show: String } object Show { implicit class ShowInt(x: Int) extends Show { lazy val show: String = x.toString } }
earldouglas/xsbt-web-plugin
src/sbt-test/container/multi-module-single-webapp/typeclasses/src/main/scala/show.scala
Scala
bsd-3-clause
165
package bad.robot.temperature import io.circe._ object SensorReading { implicit def jsonEncoder: Encoder[SensorReading] = new Encoder[SensorReading] { def apply(sensor: SensorReading): Json = Json.obj( ("name", Json.fromString(sensor.name)), ("temperature", Temperature.encoder(sensor.temperature)) ...
tobyweston/temperature-machine
src/main/scala/bad/robot/temperature/SensorReading.scala
Scala
apache-2.0
1,051
package org.bitcoins.wallet.models import org.bitcoins.core.api.wallet.db.{ AddressRecord, ScriptPubKeyDb, SegWitAddressDb } import org.bitcoins.core.hd.SegWitHDPath import org.bitcoins.core.protocol.Bech32Address import org.bitcoins.core.protocol.script.{ EmptyScriptWitness, P2WPKHWitnessSPKV0 } import org....
bitcoin-s/bitcoin-s
wallet-test/src/test/scala/org/bitcoins/wallet/models/AddressDAOTest.scala
Scala
mit
5,853
/** * Name: JsonRender.scala * Creation: 25.11.2015 * Author: Mikael Mayer (mikael.mayer@epfl.ch) * Comments: Json specifications */ import leon.lang._ import leon.annotation._ import leon.collection._ import leon.collection.ListOps._ import leon.lang.synthesis._ object JsonRender { abstract class ...
epfl-lara/leon
testcases/web/synthesis/27_String_Json.scala
Scala
gpl-3.0
1,033
/* * 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-cache/oap/src/main/scala/org/apache/spark/sql/oap/adapter/SqlConfAdapter.scala
Scala
apache-2.0
1,039
package chandu0101.scalajs.rn import chandu0101.scalajs.rn.apis._ import japgolly.scalajs.react._ import scala.scalajs.js import scala.scalajs.js.Object trait ReactNative extends js.Object { //components val Text: js.Object = js.native val View: js.Object = js.native val TextInput: js.Object = js.native ...
beni55/scalajs-react-native
core/src/main/scala/chandu0101/scalajs/rn/ReactNative.scala
Scala
apache-2.0
2,581
package masterleague4s package codec import io.circe.parser.decode import org.specs2._ import masterleague4s.data._ import Serialized._ import FDecoders._ class TournamentResultDecoderSpec extends Specification { def is = s2""" The TournamentResult decoder should parse page 1 $parse35 """ def ...
martijnhoekstra/masterleague4s
src/test/scala/TournamentResultDecoder.scala
Scala
gpl-3.0
7,733
package pl.touk.nussknacker.engine.definition import pl.touk.nussknacker.engine.ModelData object SignalDispatcher { def dispatchSignal(modelData: ModelData)(signalType: String, processId: String, parameters: Map[String, AnyRef]): Option[Unit] = { modelData.processWithObjectsDefinition.signalsWithTransformers.g...
TouK/nussknacker
interpreter/src/main/scala/pl/touk/nussknacker/engine/definition/SignalDispatcher.scala
Scala
apache-2.0
513
/* * 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 ...
bowenli86/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/catalog/CatalogTableITCase.scala
Scala
apache-2.0
28,734
/* * 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 ...
mike0sv/spark
sql/core/src/test/scala/org/apache/spark/sql/MiscFunctionsSuite.scala
Scala
apache-2.0
1,387
package at.logic.gapt.examples import org.specs2.mutable.Specification class SimpleTest extends Specification { "fol1" in { fol1.ctx.check( fol1.proof ); ok } }
gebner/gapt
tests/src/test/scala/at/logic/gapt/examples/SimpleTest.scala
Scala
gpl-3.0
165
package wp.pigeonapp1 object PigeonModel { sealed trait Status case object Landing extends Status case object Starting extends Status case class Flying(action: Action) extends Status case class Standing(action: Action) extends Status sealed trait Action case object Pecking extends Action //dziobać ca...
jawp/wicked-playground
modules/frontend/src/main/scala/wp/pigeonapp1/PigeonModel.scala
Scala
mit
924
/* * 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 ...
chuckchen/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoderSuite.scala
Scala
apache-2.0
29,775
package reader.connectors import reader.data.FeedStore import reader.data.XmlParser import reader.network.Fetcher import reader.network.UrlChecker import rescala._ trait EventMediator { def mediate(fetcher: Fetcher, parser: XmlParser, store: FeedStore, checker: UrlChecker)...
volkc/REScala
Examples/RSSReader/ReactiveScalaReader.Reactive/src/main/scala/reader/connectors/EventMediators.scala
Scala
apache-2.0
1,622
import scala.reflect.runtime.universe._ import scala.reflect.macros.blackbox.Context object Macros { def impl[T: c.WeakTypeTag](c: Context)(foo: c.Expr[T]): c.Expr[Unit] = { import c.universe._ reify { println(c.Expr[String](Literal(Constant(implicitly[c.WeakTypeTag[T]].toString))).splice) } } def foo[T...
yusuke2255/dotty
tests/disabled/macro/run/macro-undetparams-macroitself/Impls_Macros_1.scala
Scala
bsd-3-clause
347
// Databricks notebook source exported at Fri, 3 Jul 2015 23:14:51 UTC 1 - 1 + 3 // COMMAND ---------- lala
brkyvz/git-rest-api
notebooks/name with space.scala
Scala
apache-2.0
109
/* * Copyright (C) 2017 HAT Data Exchange Ltd * SPDX-License-Identifier: AGPL-3.0 * * This file is part of the Hub of All Things project (HAT). * * HAT 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 Founda...
Hub-of-all-Things/HAT2.0
hat/app/org/hatdex/hat/api/service/monitoring/EndpointSubscriberService.scala
Scala
agpl-3.0
5,218
package drt.client.components import diode.data.Pot import drt.client.actions.Actions._ import drt.client.components.FixedPoints._ import drt.client.logger.{Logger, LoggerFactory} import drt.client.modules.GoogleEventTracker import drt.client.services.JSDateConversions._ import drt.client.services._ import drt.shared....
UKHomeOffice/drt-scalajs-spa-exploration
client/src/main/scala/drt/client/components/TerminalStaffing.scala
Scala
apache-2.0
12,547
/* * Copyright 2021 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/ct-calculations
src/test/scala/uk/gov/hmrc/ct/computations/CP19Spec.scala
Scala
apache-2.0
1,065
trait Monoid[M] { def combine(m1: M, m2: M): M def empty: M }
hmemcpy/milewski-ctfp-pdf
src/content/1.3/code/scala/snippet01.scala
Scala
gpl-3.0
65
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.internal.testkit import java.util import java.util.Collections import akka.annotation.InternalApi import com.google.inject.Binder import com.google.inject.Module import com.google.inject.TypeLiteral import com.li...
rcavalcanti/lagom
testkit/javadsl/src/main/scala/com/lightbend/lagom/internal/testkit/EmptyAdditionalRoutersModule.scala
Scala
apache-2.0
960
package component.security.crypto class CryptoService(private val encryptor: Encryptor, private val decryptor: Decryptor, private val crypto: Crypto) { def sign(message: String): String = crypto.sign(message) def generateRandomUUID = crypto.generateRandomUUID def encryptAndSignData(data: String): String = { ...
onurzdg/spray-app
src/main/scala/component/security/crypto/CryptoService.scala
Scala
apache-2.0
987
package views.html.team import controllers.routes import play.api.data.Form import lila.api.Context import lila.app.templating.Environment._ import lila.app.ui.ScalatagsTemplate._ import lila.common.String.html.richText object request { import trans.team._ def requestForm(t: lila.team.Team, form: Form[_])(impl...
luanlv/lila
app/views/team/request.scala
Scala
mit
2,835
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distribute...
wvlet/airframe
airframe-di/src/test/scala-2/wvlet/airframe/legacy/lifecycle/LifeCycleManagerTest.scala
Scala
apache-2.0
7,127
package org.scaladebugger.language.interpreters import org.parboiled2.ParseError import org.scaladebugger.language.models import scala.util.{Failure, Success, Try} /** * Contains built-in functions for the debugger interpreter. */ trait DebuggerInterpreterBuiltins { this: DebuggerInterpreter => /** Mark paramete...
ensime/scala-debugger
scala-debugger-language/src/main/scala/org/scaladebugger/language/interpreters/DebuggerInterpreterBuiltins.scala
Scala
apache-2.0
4,017
/* * 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"); * y...
PeterLauris/aifh
vol2/vol2-scala-examples/src/main/scala/com/heatonresearch/aifh/AIFH.scala
Scala
apache-2.0
1,114
package test import ildl._ object GCDTest { object IntPairAsLong extends RigidTransformationDescription { type High = (Int, Int) type Repr = Long def toRepr(pair: (Int, Int)): Long @high = ??? def toHigh(l: Long @high): (Int, Int) = ??? } object LongAsFloat extends RigidTransformationDescripti...
miniboxing/ildl-plugin
tests/correctness/resources/tests/scopes-conflicting-cascade.scala
Scala
bsd-3-clause
664
package com.softwaremill.scalaval object Validation { type Errors = Map[String, Seq[String]] def rule(field: String, haltOnFail: Boolean = false)(checkFn: => (Boolean, String)) = new RuleDefinition(field, haltOnFail, checkFn) def validate(rules: RuleDefinition*): Result = validate(rules.toSeq) def valida...
mostr/scalaval
src/main/scala/com/softwaremill/scalaval/Validation.scala
Scala
apache-2.0
1,034
package org.sgine.ui import style.Stylized import org.powerscala.event.ActionEvent import org.sgine.input.event.{KeyDownEvent, MousePressEvent} import org.sgine.input.Key /** * @author Matt Hicks <mhicks@sgine.org> */ class Button extends AbstractContainer with Stylized with Focusable { def this(text: String) = {...
Axiometry/sgine
ui/src/main/scala/org/sgine/ui/Button.scala
Scala
bsd-3-clause
1,050
class B extends A { override def f = 2 } trait T extends A class C1 extends B with T { def t1 = super[T].f def t2 = super[B].f def t3 = super.f } trait U1 extends A trait U2 extends A class C2 extends U1 with U2 { def t = super.f } object Test extends App { val c1 = new C1 assert(c1.t1 == 1) assert(c1.t2...
scala/scala
test/files/run/sd143/Test.scala
Scala
apache-2.0
410
package bylt.core import org.scalacheck.Gen /** * Created by attila on 4/14/2016. */ object ArbitraryType { // Types def lambdaTypeGen (depth : Int) : Gen [LambdaType] = for { arg <- typeExprGen (depth) ret <- typeExprGen (depth) } yield LambdaType (arg, ret) ...
ozmi/bylt
src/test/scala/bylt/core/ArbitraryType.scala
Scala
mit
3,117
package drainprocessor.processor.kinesis import java.net.InetAddress import java.util.UUID import java.util.concurrent.TimeUnit import akka.actor.{ActorContext, ActorRef} import akka.routing.ConsistentHashingRouter.ConsistentHashableEnvelope import com.amazonaws.auth.AWSCredentials import com.amazonaws.services.kines...
vonnagy/drain-processor
src/main/scala/drainprocessor/processor/kinesis/StreamReader.scala
Scala
apache-2.0
6,378
package net.liftmodules.foboajs.lib import net.liftweb.util._ /** * ==Angular Material Design Script Helper== * * Angular Material Design script helper is a helper class that implements some commonly * used material design component script functions. * */ class AJSMaterialSH extends ScriptHelper { //du...
karma4u101/FoBo
Angular/AngularJS-API/src/main/scala/net/liftmodules/foboajs/lib/AJSMaterialSH.scala
Scala
apache-2.0
6,205
/* * 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 ...
ajbozarth/incubator-livy
core/src/test/scala/org/apache/livy/EOLUtilsSuite.scala
Scala
apache-2.0
2,006
/* * 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 ...
practice-vishnoi/dev-spark-1
graphx/src/main/scala/org/apache/spark/graphx/lib/ShortestPaths.scala
Scala
apache-2.0
2,786
/** * * AndroidKeystore * Ledger wallet * * Created by Pierre Pollastri on 11/09/15. * * The MIT License (MIT) * * Copyright (c) 2015 Ledger * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in ...
LedgerHQ/ledger-wallet-android
app/src/main/scala/co/ledger/wallet/core/security/AndroidKeystore.scala
Scala
mit
2,587
/* * 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
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
Scala
apache-2.0
47,914
/*********************************************************************** * Copyright (c) 2013-2020 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...
aheyne/geomesa
geomesa-tools/src/test/scala/org/locationtech/geomesa/tools/export/ExportCommandTest.scala
Scala
apache-2.0
12,362
package fr.janalyse.ssh import java.io._ import com.jcraft.jsch.ChannelShell import java.util.concurrent.ArrayBlockingQueue class SSHPowerShell(implicit ssh: SSH) extends PowerShellOperations { override def execute(cmd: SSHCommand): String = { synchronized { sendCommand(cmd.cmd.replace('\\n',' ')) ...
dacr/jassh
src/main/scala/fr/janalyse/ssh/SSHPowerShell.scala
Scala
apache-2.0
3,945
/** * 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/pipes/matching/PatternElement.scala
Scala
gpl-3.0
1,394
/* Copyright 2012 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
abhibond/scalding-template
src/main/scala/Tutorial0.scala
Scala
apache-2.0
2,413
package com.twitter.finagle.builder import com.twitter.concurrent.Spool import com.twitter.finagle.stats.{StatsReceiver, NullStatsReceiver} import com.twitter.util.Future /** * A Cluster implementation that guarantees a minimum set while allowing you * to specify a Cluster to supplement the initial static set. All ...
lysu/finagle
finagle-core/src/main/scala/com/twitter/finagle/builder/MinimumSetCluster.scala
Scala
apache-2.0
1,668
/* * ------------------------------------------------------------------------------------------------- * - Project: Objectify - * - Copyright: ©2014 Matygo Educational Incorporated operating as Learndot - * - Author: ...
learndot/Objectify.scala
src/main/scala/org/objectify/resolvers/BodyResolver.scala
Scala
mit
880
package org.sandbox.chat.cluster import scala.annotation.migration import scala.util.Random import org.sandbox.chat.cluster.ChatClusterRole.roleToString import akka.actor.ActorContext import akka.actor.ActorRef import akka.cluster.Member import akka.event.LoggingAdapter import akka.util.Timeout class ChatClusterAct...
hustbill/ScalaDemo
src/main/scala/org/sandbox/chat/cluster/ChatClusterActors.scala
Scala
gpl-2.0
1,173
/* * Copyright 2010 LinkedIn * * 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...
jinfei21/kafka
src/kafka/utils/KafkaScheduler.scala
Scala
apache-2.0
1,600
package org.sofi.deadman.load import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent._ import scala.concurrent.duration._ // Complete some tasks in the deadman switch service object Complete extends App with Profile { // Complete tasks for the given aggregate private def completeTasks(...
SocialFinance/deadman-switch
load/src/main/scala/org/sofi/deadman/load/Complete.scala
Scala
bsd-3-clause
1,144
package fr.janalyse.wmirp import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import java.lang.management.ManagementFactory import org.scalatest.matchers.ShouldMatchers import org.scalatest.BeforeAndAfterAll import scala.concurrent._ import scala.concurrent.duration._ import com.jacob.activeX.ActiveX...
dacr/wmirp
src/test/scala/fr/janalyse/wmirp/WMITest.scala
Scala
apache-2.0
4,096
package scala.slick.lifted import scala.language.{implicitConversions, higherKinds} import scala.slick.ast._ import FunctionSymbolExtensionMethods._ import ScalaBaseType._ import scala.slick.SlickException trait ExtensionMethods[B1, P1] extends Any { def c: Column[P1] @inline def n = c.toNode @inline implicit d...
dvinokurov/slick
src/main/scala/scala/slick/lifted/ExtensionMethods.scala
Scala
bsd-2-clause
9,471
package fpinscala.errorhandling import scala.{Option => _, Either => _, Left => _, Right => _, _} // hide std library `Option` and `Either`, since we are writing our own in this chapter sealed trait Either[+E,+A] { def map[B](f: A => B): Either[E, B] = this match { case Left(e) => Left(e) case Right(a) => Rig...
mikemole/fpinscala
exercises/src/main/scala/fpinscala/errorhandling/Either.scala
Scala
mit
2,361
/* biojava-adam BioJava and ADAM integration. Copyright (c) 2017-2022 held jointly by the individual authors. This library 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 versi...
heuermh/biojava-adam
scripts/loadGenbankProteinFeatures.scala
Scala
lgpl-3.0
1,829
package com.github.tyang513.batch.demo import scala.collection.GenSeq /** * Hello world! * */ object App { def main(args: Array[String]): Unit = { println("x") println(2.to(10)) val m = Array(1, 2, 3, 4, 5, 6) val m1 = m.map(x => x + 1) m1.foreach(println) val l = List(4)...
tyang513/spark-batch-example
src/main/scala/com/github/tyang513/batch/demo/App.scala
Scala
gpl-3.0
2,450
package uk.co.morleydev.ghosthunt.model.component.game import uk.co.morleydev.ghosthunt.model.net.ClientId /** * A remote entity is an entity that is somehow controlled by a remote player, * so is any actor that is not the local actor (and every actor on the server) * * @param id */ case class Remote(id : Client...
MorleyDev/GhostHunt
src/main/scala/uk/co/morleydev/ghosthunt/model/component/game/Remote.scala
Scala
mit
324
package org.scalaide.ui.wizards import scala.util.{ Try, Success, Failure } import org.eclipse.core.resources.IContainer import org.eclipse.core.resources.IFile import org.eclipse.core.resources.IResource import org.eclipse.core.runtime.IPath import org.eclipse.core.runtime.Path import org.scalaide.core.IScalaPlugin ...
scala-ide/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/ui/wizards/ScalaFileCreator.scala
Scala
bsd-3-clause
6,158
package io.youi.app.screen import org.scalajs.dom.html import org.scalajs.dom.html.Element import scala.concurrent.Future /** * Preloads Screen element from Scala.js usually through Template */ trait PreloadedContentScreen extends ContentScreen { protected def preloadScreen: html.Element override protected ...
outr/youi
app/js/src/main/scala/io/youi/app/screen/PreloadedContentScreen.scala
Scala
mit
405
package processors import com.typesafe.scalalogging.LazyLogging import org.clulab.odin.Mention import org.clulab.processors.{ Document, Sentence } import org.clulab.serialization.json.JSONSerializer import org.clulab.serialization.json._ import org.clulab.odin.serialization.json.{ JSONSerializer => _, _ } import org.j...
myedibleenso/processors-server
src/main/scala/processors/ConverterUtils.scala
Scala
apache-2.0
1,461
/** * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com> */ package akka.testkit import language.postfixOps import java.lang.ref.WeakReference import java.util.concurrent.locks.ReentrantLock import scala.annotation.tailrec import com.typesafe.config.Config import akka.actor.{ ActorInitializationExcepti...
Fincore/org.spark-project.akka
testkit/src/main/scala/akka/testkit/CallingThreadDispatcher.scala
Scala
mit
13,164
package one.lockstep.multilock.protocol import scodec.Codec sealed trait Party case object Client extends Party //there is always a single client in the context of a session case class Server(id: String) extends Party object Party { implicit lazy val codec: Codec[Party] = ??? }
lockstep-one/vault
vault-common/src/main/scala/one/lockstep/multilock/protocol/Party.scala
Scala
agpl-3.0
285
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2014, G...
non/squants
src/test/scala/squants/photo/LuminousFluxSpec.scala
Scala
apache-2.0
2,777
package com.github.gdefacci.raz import scalaz.{ -\\/, \\/, \\/- } import java.net.URLDecoder private[raz] object DecodeUtils { private val percentTripletSize = 3 private val hexadecimal = 16 def replacePercentTriplets(s: String): String = { var needToChange = false; val encoding: String = "UTF-8" ...
gdefacci/raz
raz/src/main/scala/com/github/gdefacci/raz/DecodeUtils.scala
Scala
mit
4,803
/* * Copyright (c) 2011-2017 Interfaculty Department of Geoinformatics, University of * Salzburg (Z_GIS) & Institute of Geological and Nuclear Sciences Limited (GNS Science) * in the SMART Aquifer Characterisation (SAC) programme funded by the New Zealand * Ministry of Business, Innovation and Employment (MBIE) * ...
ZGIS/smart-portal-backend
test/ValidValuesSpec.scala
Scala
apache-2.0
3,112
package shopScala.queries import java.util.concurrent.CountDownLatch import org.mongodb.scala._ import org.mongodb.scala.model.Filters import org.reactivestreams.Publisher import rx.lang.scala.{JavaConversions, Observable} import shopScala.util.Constants._ import shopScala.util.Util._ import shopScala.util._ import s...
hermannhueck/reactive-mongo-access
src/main/scala/shopScala/queries/QueryS08SDriverRxStreamsWithObservables.scala
Scala
apache-2.0
3,304
package net.liftmodules import _root_.net.liftweb._ import util.{Props} import http._ /** * ==FoBo Bootstrap 3 Resource Module== * * This resource module provides Bootstrap resource components to the FoBo Bootstrap 3 Toolkit module, * but can also be used as-is, see below for setup information. * * If you...
karma4u101/FoBo
Bootstrap/Bootstrap3/TwBs-Bootstrap3-Res/src/main/scala/net/liftmodules/fobobs/fobobsres.scala
Scala
apache-2.0
8,114
package ch.fhnw.imvs.trails import org.scalatest.FunSuite class TrailsTest extends FunSuite { object T extends Trails import T._ test("seq") { val t0 = seq(success[Null,Null,String]("fst"), success[Null,Null,String]("snd")) val res0 = t0(null)(null) assert(res0.size === 1) val (_, fst ~ snd) ...
danielkroeni/trails
core/src/test/scala/ch/fhnw/imvs/trails/TrailsTest.scala
Scala
mit
2,290
/* * 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-recorder/src/main/scala/io/gatling/recorder/config/RecorderMode.scala
Scala
apache-2.0
1,245