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.jsuereth.pgp
import org.bouncycastle._
import java.io._
import java.io.File
import java.math.BigInteger
import java.security.{SecureRandom,Security,KeyPairGenerator,KeyPair}
import java.util.Date
import org.bouncycastle.bcpg._
import org.bouncycastle.jce.provider.BouncyCastleProvider
import org.bouncycast... | voetha/sbt-pgp | gpg-library/src/main/scala/com/jsuereth/pgp/SecretKeyRingCollection.scala | Scala | bsd-3-clause | 2,487 |
package com.karasiq.shadowcloud.webapp.components.folder
import com.karasiq.shadowcloud.model.utils.IndexScope
import com.karasiq.shadowcloud.model.{File, Path}
import com.karasiq.shadowcloud.webapp.components.common.{AppIcons, Toastr}
import com.karasiq.shadowcloud.webapp.context.AppContext.BootstrapContext._
import ... | Karasiq/shadowcloud | server/webapp/src/main/scala/com/karasiq/shadowcloud/webapp/components/folder/FolderTree.scala | Scala | apache-2.0 | 7,506 |
// scalac: -Xsource:2.12
//
// This test case was extracted from `names-defaults-neg.scala`
// It pinpoints an improvement an error message that results from
// a type inference failure
object Test extends App {
test4(test4$default$1)
def test4[T[P]](x: T[T[List[T[X forSome { type X }]]]]) = ???
def test4$defaul... | martijnhoekstra/scala | test/files/neg/t8237-default-212.scala | Scala | apache-2.0 | 992 |
package juju.kernel.frontend
import akka.actor._
import akka.http.scaladsl.model.{HttpEntity, MediaTypes, StatusCodes}
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.testkit.ScalatestRouteTest
import akka.stream.ActorMaterializer
import juju.infrastructure.CommandProxyFactory
import juju.kerne... | brokersquare/juju | juju-http/src/test/scala/juju/kernel/frontend/FrontendServiceSpec.scala | Scala | apache-2.0 | 6,187 |
package org.tmoerman.plongeur.test
import org.apache.commons.lang.StringUtils._
import org.apache.spark.mllib.linalg.Vectors._
import org.tmoerman.plongeur.tda.Model._
import scala.io.Source
/**
* @author Thomas Moerman
*/
trait FileResources {
val wd = "src/test/resources/data/"
val heuristicFile = wd + "... | tmoerman/plongeur | scala/plongeur-spark/src/test/scala/org/tmoerman/plongeur/test/FileResources.scala | Scala | mit | 750 |
package splash
import core.spatial.{Viewable, Zone}
class SquareZone(var x :Double, var y: Double, var w : Double, var h : Double) extends Zone{
override def contains(e : Viewable) = e match {
case e:Element =>
(e.x <= x + w) && (x<=e.x )&& (e.y <= y + h) && (y<=e.y)
case _ => false
}
override de... | DeltaIMT/Delta | splash_server/src/main/scala/splash/SquareZone.scala | Scala | mit | 1,501 |
package services
import com.google.inject.Inject
import daos.LaNacionNewsDao
import models.News
import org.mongodb.scala.Completed
import org.mongodb.scala.result.UpdateResult
import scala.concurrent.Future
/**
* Created by Ignacio Vazquez on 19/09/2016.
*/
class LaNacionNewsService @Inject()(laNacionNewsDao: LaN... | TVilaboa/Egresados | app/services/LaNacionNewsService.scala | Scala | gpl-3.0 | 1,283 |
/*
* Copyright 2012 Atlassian PTY LTD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | simpleenergy/kadai | concurrent/src/main/scala/kadai/concurrent/Gate.scala | Scala | apache-2.0 | 1,652 |
package io.udash.i18n
import io.udash.logging.CrossLogging
trait FrontendTranslationProvider extends TranslationProvider with CrossLogging {
protected def handleMixedPlaceholders(template: String): Unit =
logger.warn(s"""Indexed and unindexed placeholders in "$template"!""")
}
| UdashFramework/udash-core | i18n/.js/src/main/scala/io/udash/i18n/FrontendTranslationProvider.scala | Scala | apache-2.0 | 286 |
/*
* Copyright (c) 2014-2020 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache... | alexandru/monifu | monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WithLatestFromObservable.scala | Scala | apache-2.0 | 3,326 |
/*
* 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... | quipo/kafka | core/src/main/scala/kafka/api/OffsetRequest.scala | Scala | apache-2.0 | 3,123 |
/*
* Copyright (c) 2015 Andreas Wolf
*
* See te LICENSE file in the project root for further copyright information.
*/
package info.andreaswolf.roadhopper.server
import javax.servlet.http.{HttpServletResponse, HttpServlet}
import info.andreaswolf.roadhopper.simulation.{VehicleState, SimulationResult}
import org.... | andreaswolf/roadhopper | src/main/java/info/andreaswolf/roadhopper/server/BaseServlet.scala | Scala | mit | 1,193 |
package com.lynbrookrobotics.potassium.commons.drivetrain.twoSided
import com.lynbrookrobotics.potassium.commons.drivetrain.unicycle.UnicycleHardware
import com.lynbrookrobotics.potassium.streams.Stream
import squants.motion.{AngularVelocity, RadiansPerSecond}
import squants.space.Radians
import squants.time.Seconds
i... | Team846/potassium | commons/src/main/scala/com/lynbrookrobotics/potassium/commons/drivetrain/twoSided/TwoSidedDriveHardware.scala | Scala | mit | 1,107 |
/*
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
distributed u... | RCheungIT/phoenix | phoenix-spark/src/main/scala/org/apache/phoenix/spark/ConfigurationUtil.scala | Scala | apache-2.0 | 3,281 |
/*
* 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 ... | jnhagelberg/incubator-atlas | repository/src/main/scala/org/apache/atlas/query/Resolver.scala | Scala | apache-2.0 | 7,387 |
package example
import example.ScalaJSCode._
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.all._
import org.scalajs.dom.html._
object GothshildTestEn {
private val question = getElementById[Div]("gothshild-test-en")
private val instruction = getElementById[Div]("instruction")
def doTest()... | MysterionRise/psycho-test-framework | psycho-test-client/src/main/scala/example/GothshildTestEn.scala | Scala | mit | 3,950 |
package artisanal.pickle.maker
import models._
import parser._
import org.specs2._
import mutable._
import specification._
import scala.reflect.internal.pickling.ByteCodecs
import scala.tools.scalap.scalax.rules.scalasig._
import com.novus.salat.annotations.util._
import scala.reflect.ScalaSignature
class UserDe... | julianpeeters/artisanal-pickle-maker | src/test/scala/doubleValueMember/userDefinedSpecs/UserDefinedUserDefinedTypeSpec.scala | Scala | apache-2.0 | 936 |
package com.catinthedark.shapeshift.network
import java.net.URI
import com.badlogic.gdx.math.Vector2
import com.catinthedark.lib.network.IMessageBus.Callback
import com.catinthedark.lib.network.messages.{DisconnectedMessage, GameStartedMessage}
import com.catinthedark.lib.network.{JacksonConverterScala, MessageBus, S... | cat-in-the-dark/old48_35_game | src/main/scala/com/catinthedark/shapeshift/network/NetworkWSControl.scala | Scala | mit | 3,274 |
trait Eater {
type Food[T]
}
trait Fruit {
type Seed
}
trait PipExtractor {
def extract(a: Fruit)(b: Eater): b.Food[a.Seed]
}
trait LaserGuidedPipExtractor extends PipExtractor {
def extract(f: Fruit)(g: Eater): g.Food[f.Seed]
}
| AlexSikia/dotty | tests/untried/pos/t5033.scala | Scala | bsd-3-clause | 240 |
package pl.writeonly.son2.apis.core
import pl.writeonly.son2.apis.config.Format
trait Formats {
val OBJECT = Format('object)
val CSV = Format('csv)
val XML = Format('xml)
val PROPERTIES = Format('properties)
val JAVA_PROPS = Format('javaprops)
val ALL = List(OBJECT, XML, CSV, PROPERTIES, JAVA_PROPS)
}
... | writeonly/son2 | scallions-core/scallions-apis/src/main/scala/pl/writeonly/son2/apis/core/Formats.scala | Scala | apache-2.0 | 351 |
/*
* 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 ... | caneGuy/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/types/DataType.scala | Scala | apache-2.0 | 18,246 |
package subcut.loadmodule
class SharedBetweenSteps {
private var visited = false
def visit()={
visited = true
}
def isVisited()=visited
} | VivaceVivo/cucumber-mod-DI | subcut/src/test/scala/subcut/loadmodule/SharedBetweenSteps.scala | Scala | mit | 149 |
package edu.cmu.lti.oaqa.bagpipes.space.test
import net.liftweb.json.JsonAST._
import net.liftweb.json.Extraction._
import net.liftweb.json.Printer._
import scala.collection.JavaConversions._
import scala.collection.JavaConverters._
import net.liftweb.json.parse
import net.liftweb.json.DefaultFormats
import net.liftweb... | oaqa/bagpipes | src/test/scala/edu/cmu/lti/oaqa/bagpipes/space/test/ConfigurationSpaceSpec.scala | Scala | apache-2.0 | 2,425 |
package nodescala
import com.sun.net.httpserver._
import scala.concurrent._
import scala.concurrent.duration._
import ExecutionContext.Implicits.global
import scala.async.Async.{ async, await }
import scala.collection._
import scala.collection.JavaConversions._
import java.util.concurrent.{ Executor, ThreadPoolExecuto... | elkorn/MOOCs | scala2/progfun-nodescala/src/main/scala/nodescala/nodescala.scala | Scala | mit | 5,687 |
/*
* 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/vat-registration-frontend | app/models/external/BusinessVerificationStatus.scala | Scala | apache-2.0 | 1,816 |
package com.bob.scala.webapi.exception
/**
* Created by bob on 16/3/2.
*/
case class ClientException(errMessage: String, status: Int = 400) extends Exception(errMessage) {
def this() {
this("", 400)
}
}
case class ServerException(errMessage: String, status: Int = 500) extends Exception(errMessage) {
def t... | sevenz/springboot-scala-withswagger | webapi/src/main/scala/com/bob/scala/webapi/exception/Exceptions.scala | Scala | apache-2.0 | 351 |
import leon.lang._
import leon.lang.synthesis._
import leon.annotation._
object Complete {
sealed abstract class List
case class Cons(head: BigInt, tail: List) extends List
case object Nil extends List
def size(l: List) : BigInt = (l match {
case Nil => BigInt(0)
case Cons(_, t) => 1 + size(t)
}) en... | ericpony/scala-examples | testcases/web/synthesis/10_SortedList_Insert2.scala | Scala | mit | 875 |
package controllers
import javax.inject._
import com.github.kaeluka.spencer.PostgresSpencerDB
import play.api.cache.Cached
import play.api.i18n.MessagesApi
import play.api.inject.ApplicationLifecycle
import play.api.mvc._
import scala.concurrent.Future
/**
* This controller creates an `Action` to handle HTTP requ... | kaeluka/spencer-ui | app/controllers/MainController.scala | Scala | mit | 1,644 |
package org.jetbrains.plugins.scala
package lang.completion
import com.intellij.codeInsight.completion._
import com.intellij.codeInsight.lookup.{LookupElement, LookupElementBuilder}
import com.intellij.patterns.PlatformPatterns
import com.intellij.psi.util.PsiTreeUtil
import com.intellij.psi.{PsiClass, PsiMethod, PsiP... | whorbowicz/intellij-scala | src/org/jetbrains/plugins/scala/lang/completion/SameSignatureCallParametersProvider.scala | Scala | apache-2.0 | 9,125 |
package opendataflow
import sbt._
import Keys._
object Dependencies {
lazy val scalaTestVersion = settingKey[String]("The version of ScalaTest to use.")
lazy val scalaStmVersion = settingKey[String]("The version of ScalaSTM to use.")
lazy val scalaCheckVersion = settingKey[String]("The version of ScalaCheck to ... | opendataflow/opendataflow | project/Dependencies.scala | Scala | apache-2.0 | 4,400 |
package ucesoft.cbm.game
import javax.swing._
import javax.swing.table.AbstractTableModel
import javax.swing.event.ListSelectionListener
import java.awt.Dimension
import java.awt.event.MouseEvent
import javax.swing.event.DocumentListener
import javax.swing.event.DocumentEvent
import java.awt.FlowLayout
import java.awt... | abbruzze/kernal64 | Kernal64/src/ucesoft/cbm/game/GameUI.scala | Scala | mit | 20,792 |
package org.killbill.billing.client.actor
import java.util.UUID
import akka.actor.{Actor, ActorRef}
import akka.event.Logging
import org.killbill.billing.client.model._
import spray.client.pipelining._
import spray.http.HttpHeader
import spray.httpx.SprayJsonSupport
import scala.util.{Failure, Success}
/**
* Crea... | jgomez-vp/killbill-client-scala | src/main/scala/org/killbill/billing/client/actor/TagActor.scala | Scala | apache-2.0 | 12,802 |
/***********************************************************************
* Copyright (c) 2013-2019 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... | elahrvivaz/geomesa | geomesa-redis/geomesa-redis-tools/src/main/scala/org/locationtech/geomesa/redis/tools/export/RedisExportCommand.scala | Scala | apache-2.0 | 1,414 |
/*
* 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/main/scala/uk/gov/hmrc/ct/ct600a/v2/A5.scala | Scala | apache-2.0 | 1,323 |
package net.fluxo.blue
import org.apache.log4j.{Logger, Level}
/**
* Created with IntelliJ IDEA.
* User: Ronald Kurniawan (viper)
* Date: 7/12/13
* Time: 1:49 PM
*
*/
class SMTPMonitor extends Runnable {
private val _smtpHost = Processes.getConfiguration.MailHost.getOrElse("")
@volatile
private var _isRunni... | fluxodesign/FluxoBlue | src/main/scala/net/fluxo/blue/SMTPMonitor.scala | Scala | lgpl-3.0 | 2,292 |
// Project: surfice-docdb
// Module: pouchdb
// Description: Implementation of DBService for PouchDB
// Copyright (c) 2016. Distributed under the MIT License (see included LICENSE file).
package surfice.docdb.pouchdb
import surfice.docdb.DBService.{DocList, Props, DBHandle, Doc}
import surfice.docdb.{Diction... | jokade/surfice-docdb | pouchdb/src/main/scala/surfice/docdb/pouchdb/PouchDBService.scala | Scala | mit | 3,647 |
package tests
import java.lang.System.exit
object Main {
def main(args: Array[String]): Unit = {
// tests.Discover object is code-generated in the sbt build
val suites = tests.Discover.suites
var failed = false
suites.foreach { suite =>
val result = suite.run()
failed = failed || result
... | cedricviaccoz/scala-native | unit-tests/src/main/scala/tests/Main.scala | Scala | bsd-3-clause | 363 |
package com.sksamuel.elastic4s.searches.aggs
import com.sksamuel.elastic4s.ScriptBuilder
import com.sksamuel.elastic4s.searches.aggs.pipeline.PipelineAggregationBuilderFn
import org.elasticsearch.search.aggregations.AggregationBuilders
import org.elasticsearch.search.aggregations.metrics.cardinality.CardinalityAggrega... | tyth/elastic4s | elastic4s-tcp/src/main/scala/com/sksamuel/elastic4s/searches/aggs/CardinalityAggregationBuilder.scala | Scala | apache-2.0 | 1,023 |
package vn.myfeed.parser.util
import org.jsoup.nodes.Element
/**
* The Class DirtyElementPattern.
*
* @author Nguyen Duc Dung
* @since 12/29/12 5:54 PM
*
*/
object DirtyElementPattern extends FilePattern {
val regexFile = "filter/remove.lst"
override val start = ""
override val end = ""
override val ne... | SunriseSoftVN/hayhayblog | parser/app/vn/myfeed/parser/util/DirtyElementPattern.scala | Scala | gpl-2.0 | 470 |
package lila.study
import scala.util.chaining._
import chess.format.FEN
import chess.format.pgn.Parser
import lila.game.{ Game, Namer }
import lila.tree.Node.Comment
final private class ExplorerGame(
importer: lila.explorer.ExplorerImporter,
lightUserApi: lila.user.LightUserApi,
net: lila.common.config.N... | luanlv/lila | modules/study/src/main/ExplorerGame.scala | Scala | mit | 3,131 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | StephanEwen/incubator-flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/utils/aggregation.scala | Scala | apache-2.0 | 5,189 |
package org.scalgebra
import org.scalatest._
import org.scalatest.prop._
import org.scalacheck.Prop.BooleanOperators
import algebra.instances.int._
import org.scalgebra.generation.DenseMatrixGen._
/**
* @author Daniyar Itegulov
*/
class DenseMatrixProps extends PropSpec with Matchers with GeneratorDrivenProperty... | itegulov/scalgebra | src/test/scala/org/scalgebra/DenseMatrixProps.scala | Scala | mit | 2,653 |
/***********************************************************************
* Copyright (c) 2013-2018 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | ddseapy/geomesa | geomesa-fs/geomesa-fs-storage/geomesa-fs-storage-orc/src/main/scala/org/locationtech/geomesa/fs/storage/orc/utils/OrcInputFormatReader.scala | Scala | apache-2.0 | 18,425 |
/*
* bytefrog: a tracing framework for the JVM. For more information
* see http://code-pulse.com/bytefrog
*
* Copyright (C) 2014 Applied Visions - http://securedecisions.avi.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
... | secdec/bytefrog-clients | javafx-ui/src/main/scala/com/secdec/bytefrog/clients/javafxui/util/AgentConfiguration.scala | Scala | apache-2.0 | 2,009 |
package com.vivint.ceph
package model
import org.apache.mesos.Protos
import scala.collection.breakOut
object TaskState extends lib.Enum {
sealed trait EnumVal extends Value {
val id: Int
}
sealed trait Active extends EnumVal
sealed trait Limbo extends EnumVal
sealed trait Terminal extends EnumVal
ca... | vivint-smarthome/ceph-on-mesos | src/main/scala/com/vivint/ceph/model/TaskState.scala | Scala | apache-2.0 | 1,736 |
package com.twitter.finagle
import com.twitter.io.Buf
import scala.collection.mutable.{ArrayBuffer, Buffer}
private[finagle] object NameTreeParsers {
def parsePath(str: String): Path = new NameTreeParsers(str).parseAllPath()
def parseNameTree(str: String): NameTree[Path] = new NameTreeParsers(str).parseAllNameTre... | yancl/finagle-6.22.0 | finagle-core/src/main/scala/com/twitter/finagle/NameTreeParsers.scala | Scala | apache-2.0 | 5,139 |
package net.ultrametrics.math
/**
* A complex number
*/
class Complex(val re: Double, val im: Double) extends Serializable {
def + (that: Complex) =
new Complex(re + that.re, im + that.im)
def - (that: Complex) =
new Complex(re - that.re, im - that.im)
def * (that: Complex) =
new Complex(re * that.... | pchuck/fractactor | src/main/scala/net/ultrametrics/math/Complex.scala | Scala | bsd-2-clause | 1,080 |
/*
* Copyright (C) 2016 DANS - Data Archiving and Networked Services (info@dans.knaw.nl)
*
* 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
... | DANS-KNAW/easy-process-sip | src/test/scala/nl.knaw.dans.easy.multideposit/actions/AddFileMetadataToDepositSpec.scala | Scala | apache-2.0 | 5,775 |
/*
* 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.tasty
imp... | scala/scala | src/compiler/scala/tools/tasty/TastyName.scala | Scala | apache-2.0 | 10,038 |
import leon.lang._
/* The calculus of Computation textbook */
object LinearSearch {
def linearSearch(a: Array[Int], c: Int): Boolean = ({
require(a.length >= 0)
var i = 0
var found = false
(while(i < a.length) {
if(a(i) == c)
found = true
i = i + 1
}) invariant(
i <... | epfl-lara/leon | testcases/verification/xlang/arrays/ArrayLinearSearchNoQuantifier.scala | Scala | gpl-3.0 | 964 |
/*
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... | tglstory/scalding | scalding-date/src/main/scala/com/twitter/scalding/Globifier.scala | Scala | apache-2.0 | 4,809 |
package mimir.ctables
import mimir.algebra._
import mimir.algebra.Type._
import mimir.Database
import mimir.util.ListUtils
abstract class Model {
def varTypes: List[Type.T]
def mostLikelyValue (idx: Int, args: List[PrimitiveValue]): PrimitiveValue
def lowerBound (idx: Int, args: List[PrimitiveValue])... | sophieyoung717/mimir | src/main/scala/mimir/ctables/CTables.scala | Scala | apache-2.0 | 2,608 |
/*
* Copyright ActionML, LLC under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* ActionML licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except... | heshamMassoud/RouteMe-API | PredictionIOEngine/src/main/scala/DataSource.scala | Scala | apache-2.0 | 4,181 |
import sbt.{CrossVersion, ModuleID}
/*
* BuildUtil.scala
*
* Updated: Oct 7, 2014
*
* Copyright (c) 2014, CodeMettle
*/
object BuildUtil {
implicit class ExcludeModId(val u: ModuleID) extends AnyVal {
def excludeCross(group: String, art: String, scalaVersion: String) = {
val suff = Cross... | CodeMettle/akka-solr | project/BuildUtil.scala | Scala | apache-2.0 | 601 |
package debop4s.data.slick3.tests
import debop4s.data.slick3.AbstractSlickFunSuite
import debop4s.data.slick3.TestDatabase._
import debop4s.data.slick3.TestDatabase.driver.api._
/**
* PagingFunSuite
* @author sunghyouk.bae@gmail.com
*/
class PagingFunSuite extends AbstractSlickFunSuite {
class IDs(tag: Tag, nam... | debop/debop4s | debop4s-data-slick3/src/test/scala/debop4s/data/slick3/tests/PagingFunSuite.scala | Scala | apache-2.0 | 1,960 |
package pages
import org.scalatest.selenium.WebBrowser.{className, cssSelector, currentUrl, Element, find, findAll, pageSource}
import pages.vrm_assign.VehicleLookupFailurePage.url
import uk.gov.dvla.vehicles.presentation.common.helpers.webbrowser.WebBrowserDriver
import uk.gov.dvla.vehicles.presentation.common.views.... | dvla/vrm-assign-online | acceptance-tests/src/test/scala/pages/VehicleNotFoundPageSteps.scala | Scala | mit | 3,614 |
package br.com.xdevel.crawlerdetran.models
import br.com.xdevel.crawlerdetran.integrator.Crawler
import org.joda.time.DateTime
/**
* Created by clayton on 22/06/15.
*
*/
class CrawlerModel (placa: String,renavam: String) {
private val crawler = new Crawler(placa,renavam)
val tbServico02 = _getProp
va... | douglasbolis/hackdetran | CrawlerDetran/integrator/src/main/scala/br/com/xdevel/crawlerdetran/models/CrawlerModel.scala | Scala | gpl-3.0 | 1,953 |
package kata.scala
import scala.collection.mutable
class EdgeWeightedGraph[V] {
private val edges = mutable.Map[V, mutable.ArrayBuffer[WeightedEdge[V]]]()
def startingVertex: V = {
edges.keys.iterator.next()
}
def adjacentTo(vertex: V): Iterator[WeightedEdge[V]] = {
edges(vertex).it... | Alex-Diez/Scala-TDD-Katas | old-katas/minimum-spanning-tree-kata/day-2/src/main/scala/kata/scala/EdgeWeightedGraph.scala | Scala | mit | 1,561 |
/*
* SolrQueryStringBuilder.scala
*
* Updated: Oct 14, 2014
*
* Copyright (c) 2014, CodeMettle
*/
package com.codemettle.akkasolr.querybuilder
import com.codemettle.akkasolr.Solr
import akka.actor.ActorRefFactory
/**
* @author steven
*
*/
object SolrQueryStringBuilder {
type FieldValueType = Any
se... | CodeMettle/akka-solr | src/main/scala/com/codemettle/akkasolr/querybuilder/SolrQueryStringBuilder.scala | Scala | apache-2.0 | 4,662 |
package models.events
import scalaz._
import Scalaz._
import scalaz.effect.IO
import scalaz.Validation
import scalaz.Validation.FlatMap._
import scalaz.NonEmptyList._
import scalaz.syntax.SemigroupOps
import cache._
import db._
import models.tosca._
import models.json.tosca._
import models.Constants._
import io.megam... | indykish/verticegateway | app/models/events/EventsContainer.scala | Scala | mit | 8,906 |
package com.seanshubin.utility.collection
object LexicographicalCompare {
private def isDigit(x: Char): Boolean = !(x < '0' || x > '9')
private def buildParts(soFar: Seq[String], remain: String, currentWord: String, isDigits: Boolean): Seq[String] = {
if (remain.isEmpty) {
soFar :+ currentWord
} els... | SeanShubin/utility | compare/src/main/scala/com/seanshubin/utility/collection/LexicographicalCompare.scala | Scala | unlicense | 2,786 |
package structures
import simulacrum.typeclass
@typeclass trait Foldable[F[_]] extends Any { self =>
def foldLeft[A, B](fa: F[A], initial: B)(f: (B, A) => B): B
def foldRight[A, B](fa: F[A], initial: B)(f: (A, B) => B): B
def foldMap[A, B](fa: F[A])(f: A => B)(implicit mb: Monoid[B]): B =
foldLeft(fa, mb... | mpilquist/Structures | core/shared/src/main/scala/structures/Foldable.scala | Scala | bsd-3-clause | 2,685 |
/*
* 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... | yiheng/BigDL | spark/dl/src/main/scala/com/intel/analytics/bigdl/utils/tf/loaders/Utils.scala | Scala | apache-2.0 | 3,959 |
package circumflex
package scalaconsole
import core._, web._
import tools.nsc._, interpreter._
import java.io._
class StringBucket extends StringWriter with Serializable
class ScalaConsole(val bucketFunc: () => StringBucket)
extends Serializable {
val settings = new Settings()
settings.classpath.value +=
... | inca/circumflex | scalaconsole/src/main/scala/console.scala | Scala | bsd-2-clause | 1,430 |
package com.avsystem.commons
package redis
import java.io.Closeable
import com.avsystem.commons.redis.config.ExecutionConfig
/**
* Base trait for Redis clients with ability to execute [[RedisBatch]]es.
*/
trait RedisExecutor {
implicit def executionContext: ExecutionContext
/**
* Executes a [[RedisBatch]... | AVSystem/scala-commons | commons-redis/src/main/scala/com/avsystem/commons/redis/RedisExecutor.scala | Scala | mit | 2,747 |
/**
* Copyright (C) 2011 Orbeon, Inc.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) any later version.
*
* This prog... | brunobuzzi/orbeon-forms | xforms/jvm/src/test/scala/org/orbeon/oxf/xforms/analysis/ComplexContentDependenciesTest.scala | Scala | lgpl-2.1 | 4,108 |
/**
* Copyright (C) 2010-2012 LShift Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... | aprescott/diffa | agent/src/test/scala/net/lshift/diffa/agent/itest/config/UsersScanningTest.scala | Scala | apache-2.0 | 1,616 |
package de.christofreichardt.scala.ellipticcurve
package affine {
import de.christofreichardt.scala.diagnosis.Tracing
import scala.util.Random
import scala.annotation.tailrec
import de.christofreichardt.diagnosis.AbstractTracer
import de.christofreichardt.diagnosis.TracerFactory
import java.math.MathConte... | chr78rm/jca-provider | elliptic-curve-arithmetic/src/main/scala/de/christofreichardt/scala/ellipticcurve/GroupOrderCalculus.scala | Scala | gpl-3.0 | 3,275 |
package slogger.services.processing.aggregation.aggregators
import slogger.services.processing.aggregation.Aggregator
import play.api.libs.json.JsObject
import slogger.model.processing.SliceResult
import slogger.model.processing.Slice
import slogger.utils.IterateeUtils
import scala.concurrent.ExecutionContext
import s... | IvanMykhailov/stats-logger | core/src/main/scala/slogger/services/processing/aggregation/aggregators/FoldAggregator.scala | Scala | mit | 995 |
package com.trafficland.augmentsbt.releasemanagement
import sbt.SettingKey
import com.trafficland.augmentsbt.versionmanagement.SemanticVersion
import com.trafficland.augmentsbt.versionmanagement.VersionManagementPlugin.autoImport._
case class SnapshotRelease() extends ReleaseType() {
protected val appReleaseTasks:... | ereichert/augment-sbt | src/main/scala/com/trafficland/augmentsbt/releasemanagement/SnapshotRelease.scala | Scala | apache-2.0 | 793 |
/*******************************************************************************
* Copyright (c) 2019. Carl Minden
*
* 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 ... | carlminden/anathema-roguelike | src/com/anathema_roguelike/entities/characters/perks/requirements/ResourceRequirement.scala | Scala | gpl-3.0 | 1,554 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | hequn8128/flink | flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/runtime/batch/table/CorrelateITCase.scala | Scala | apache-2.0 | 14,668 |
package com.blogspot.nhu313.tictactoe
class Board(val size: Int) {
val squares = Array.fill(size*size){Marker.NONE}
private val last_square = squares.length - 1
private val last_column = size - 1
override def clone(): Board = {
val board = new Board(size)
copySquareValues(board)
return board
}
... | nhu313/tic_tac_toe_scala | src/main/scala/tictactoe/Board.scala | Scala | apache-2.0 | 1,591 |
package com.lucidchart.piezo.admin.utils
import org.quartz.JobDetail
object JobUtils {
def cleanup(job: JobDetail): JobDetail = {
if (job.getJobDataMap.containsKey("")) {
job.getJobDataMap.remove("")
}
job
}
}
| lucidsoftware/piezo | admin/app/com/lucidchart/piezo/admin/utils/JobUtils.scala | Scala | apache-2.0 | 236 |
/**
* Copyright 2011-2016 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... | GabrielPlassard/gatling | gatling-core/src/main/scala/io/gatling/core/Predef.scala | Scala | apache-2.0 | 3,042 |
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
package ducttape.exec
import java.io.File
import collection._
import ducttape.syntax.AbstractSyntaxTree._
import ducttape.... | jhclark/ducttape | src/main/scala/ducttape/exec/PidWriter.scala | Scala | mpl-2.0 | 1,678 |
/*
* 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/core/src/main/scala/org/apache/spark/sql/execution/commands.scala | Scala | apache-2.0 | 14,558 |
package circuitsimulator.editor
import javafx.application.Application
import circuitsimulator.core.CoreSettings
import circuitsimulator.core.CoreSettings._
object main {
def main(): Unit = {
}
}
| colonlc/CircuitSimulator | editor/src/main/scala/circuitsimulator/editor/main.scala | Scala | mit | 202 |
package java.util.concurrent
import java.lang.{reflect => jlr}
import scala.annotation.tailrec
import scala.collection.JavaConversions._
import scala.scalajs._
import java.util._
class CopyOnWriteArrayList[E <: AnyRef] private (private var inner: js.Array[E])
extends List[E] with RandomAccess with Cloneable wi... | jasonchaffee/scala-js | javalib/src/main/scala/java/util/concurrent/CopyOnWriteArrayList.scala | Scala | bsd-3-clause | 8,526 |
package edu.osu.cse.groenkeb.logic.parse
import edu.osu.cse.groenkeb.logic.Operator
trait OperatorMatcher {
def opFor(str: String): Operator
def nameFor(op: Operator): String
}
| bgroenks96/AutoMoL | core/src/main/scala/edu/osu/cse/groenkeb/logic/parse/OperatorMatcher.scala | Scala | mit | 183 |
/*
* 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... | diegohurtado/sparta | driver/src/main/scala/com/stratio/sparta/driver/utils/LocalListenerUtils.scala | Scala | apache-2.0 | 2,171 |
def lotto(num: Int, maxVal: Int, hist: Map[Int,Boolean] = Map()): List[Int] = {
if (num < 0) throw new IllegalArgumentException("num is invalid")
if (num == 0) {
List()
} else {
val randVal = (new scala.util.Random).nextInt(maxVal) + 1
if (!hist.getOrElse(randVal, false))
randVal :: lotto(num-1,... | zuqqhi2/s-99 | p24.scala | Scala | bsd-3-clause | 1,098 |
package app
import util._
import service._
import jp.sf.amateras.scalatra.forms._
class IndexController extends IndexControllerBase
with RepositoryService with ActivityService with AccountService with UsersAuthenticator
trait IndexControllerBase extends ControllerBase {
self: RepositoryService with Ac... | oho-sugu/gitbucket | src/main/scala/app/IndexController.scala | Scala | apache-2.0 | 2,228 |
package squants
object Platform {
/**
* Helper function to achieve uniform Double formatting over JVM, JS, and native platforms.
* Simple Double.toString will format 1.0 as "1.0" on JVM and as "1" on JS
* @param d Double number to be formatted
* @return
*/
private[squants] def crossFormat(d: Double)... | typelevel/squants | native/src/main/scala/squants/Platform.scala | Scala | apache-2.0 | 474 |
/*
* OpenURP, Open University Resouce Planning
*
* Copyright (c) 2013-2014, OpenURP Software.
*
* OpenURP 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 ... | openurp/edu-attendance-core | attendance/src/main/scala/org/openurp/ws/services/teach/attendance/web/util/Render.scala | Scala | gpl-3.0 | 1,371 |
/**
* The MIT License
*
* Copyright (c) 2011 Benjamin Klum
*
* 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 the Software without restriction, including without limitation the rights
* to use, cop... | helgoboss/commons-scala | src/main/scala/org/helgoboss/commons_scala/PatternCriteria.scala | Scala | mit | 7,145 |
/*
* 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 | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/DecimalPrecisionSuite.scala | Scala | apache-2.0 | 5,444 |
/*
* Copyright 2015 the original author or authors.
* @https://github.com/scouter-project/scouter
*
* 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/... | scouter-project/scouter | scouter.server/src/main/scala/scouter/server/netio/service/handle/GroupService.scala | Scala | apache-2.0 | 2,477 |
package slinky.docs.homepage //nodisplay
import slinky.core.{Component, StatelessComponent, SyntheticEvent} //nodisplay
import slinky.core.annotations.react //nodisplay
import slinky.web.html._ //nodisplay
import org.scalajs.dom.{html, Event} //nodisplay
import scala.scalajs.js.Date //nodisplay
case class TodoItem(... | shadaj/slinky | docs/src/main/scala/slinky/docs/homepage/TodoApp.scala | Scala | mit | 1,626 |
package org.jetbrains.plugins.scala
package lang
package psi
package api
package toplevel
package imports
import com.intellij.psi.PsiElement
/**
* @author Alexander Podkhalyuzin
* Date: 20.02.2008
*/
trait ScImportSelectors extends ScalaPsiElement {
def selectors: Seq[ScImportSelector]
def hasWildcard : Boolea... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/api/toplevel/imports/ScImportSelectors.scala | Scala | apache-2.0 | 366 |
/*
* 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... | wangyixiaohuihui/spark2-annotation | mllib/src/test/scala/org/apache/spark/mllib/rdd/MLPairRDDFunctionsSuite.scala | Scala | apache-2.0 | 1,448 |
/**
* Copyright (c) 2012-2013, Tomasz Kaczmarzyk.
*
* This file is part of BeanDiff.
*
* BeanDiff 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 o... | tkaczmarzyk/beandiff | src/main/scala/org/beandiff/core/ObjectTransformer.scala | Scala | lgpl-3.0 | 904 |
/*
* 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 applica... | jnh5y/geomesa | geomesa-core/src/test/scala/org/locationtech/geomesa/core/iterators/RowOnlyIteratorTest.scala | Scala | apache-2.0 | 2,150 |
package domala.tests.entity
import domala._
import domala.jdbc.Config
import domala.jdbc.Result
import domala.tests.TestConfig
import org.scalatest.{BeforeAndAfter, FunSuite}
import org.seasar.doma.jdbc.entity._
//noinspection SpellCheckingInspection
class GenericEntityListenerTestSuite extends FunSuite with BeforeAn... | bakenezumi/domala | paradise/src/test/scala/domala/tests/entity/GenericEntityListenerTestSuite.scala | Scala | apache-2.0 | 5,036 |
import info.fotm.clustering._
import info.fotm.domain.LadderUpdate
import info.fotm.util.MathVector
import org.scalatest._
import scala.collection.immutable.Iterable
class ClusteringEvaluatorSpec extends FlatSpec with Matchers with ClusteringEvaluatorSpecBase {
import gen._
"evaluateStep" should "return correct ... | Groz/fotm-info | core/src/test/scala/ClusteringEvaluatorSpec.scala | Scala | mit | 3,912 |
/*
* Copyright 2001-2014 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 agreed to in writ... | cheeseng/scalatest | scalactic-test/src/test/scala/org/scalactic/anyvals/GuessANumberSpec.scala | Scala | apache-2.0 | 4,982 |
/**
* 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... | wangcy6/storm_app | frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/test/scala/unit/kafka/javaapi/consumer/ZookeeperConsumerConnectorTest.scala | Scala | apache-2.0 | 4,932 |
/**
* SparklineData, Inc. -- http://www.sparklinedata.com/
*
* Scala based Audience Behavior APIs
*
* Copyright 2014-2015 SparklineData, 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 Lice... | cubefyre/audience-behavior-semantic-etl | etl/src/main/scala/org/sparkline/etl/geoip/IpLocation.scala | Scala | apache-2.0 | 2,279 |
/*
* Copyright (c) 2014-2015 by its authors. Some rights reserved.
* See the project homepage at: http://www.monifu.org
*
* 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://... | virtualirfan/monifu | monifu/js/src/main/scala/org/reactivestreams/Publisher.scala | Scala | apache-2.0 | 1,798 |
package leo.datastructures.impl
import scala.collection.immutable.{BitSet, HashMap, IntMap}
import leo.datastructures.{Signature, Kind, Type, Term}
import leo.modules.HOLSignature
/**
* Implementation of the Leo III signature table. When created with `Signature.createWithHOL`
* it contains some predefined symbols ... | lex-lex/Leo-III | src/main/scala/leo/datastructures/impl/SignatureImpl.scala | Scala | bsd-3-clause | 10,011 |
Subsets and Splits
Filtered Scala Code Snippets
The query filters and retrieves a sample of code snippets that meet specific criteria, providing a basic overview of the dataset's content without revealing deeper insights.