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 de.frosner.broccoli.models
import de.frosner.broccoli.auth.Role
import play.api.libs.json.{Json, Reads, Writes}
case class AboutInfo(project: AboutProject, scala: AboutScala, sbt: AboutSbt, auth: AboutAuth, services: AboutServices)
case class AboutProject(name: String, version: String)
case class AboutScala... | FRosner/cluster-broccoli | server/src/main/scala/de/frosner/broccoli/models/AboutInfo.scala | Scala | apache-2.0 | 2,018 |
/*
* 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... | psyyz10/BigDL | spark/dl/src/test/scala/com/intel/analytics/bigdl/python/api/PythonSpec.scala | Scala | apache-2.0 | 8,165 |
package org.jetbrains.plugins.scala
package codeInspection
package methodSignature
import com.intellij.codeInspection.LocalInspectionTool
import com.intellij.testFramework.EditorTestUtil
import com.intellij.testFramework.fixtures.CodeInsightTestFixture
/**
* Nikolay.Tropin
* 6/25/13
*/
class UnitMethodProcedura... | jastice/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/codeInspection/methodSignature/UnitMethodProceduralDefinitionInspectionTest.scala | Scala | apache-2.0 | 2,108 |
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs
// License: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.core
import java.io.File
import java.util.jar.JarFile
import org.ensime.api.EnsimeConfig
import org.ensime.util.io._
trait DocJarReading {
def docJarContent(filename:... | pascr/ensime-server | core/src/main/scala/org/ensime/core/DocJarReading.scala | Scala | gpl-3.0 | 847 |
package dk.tennis.dbn
import scala.collection.mutable.ListBuffer
import scala.collection._
import dk.bayes.clustergraph._
import dk.bayes.factor.Factor._
import ClusterGraph._
import dk.bayes.factor._
import org.joda.time.DateTime
import org.joda.time.Duration
import dk.bayes.infer.LoopyBP
import dk.tennis.... | danielkorzekwa/tennis-rating-dbn-em-scala | src/main/scala/dk/tennis/dbn/GenericTennisDBN.scala | Scala | bsd-2-clause | 5,092 |
package com.github.neysofu.tyche
import scala.util.Random
/** A wrapper class for [[com.github.neysofu.tyche.ContinuousGen]].
*/
case class ContinuousDistribution(f: () => Double) extends ContinuousGen[Double] {
def get = f()
}
object ContinuousDistribution {
/** Returns a normal distribution.
*
* @par... | neysofu/tyche | src/main/scala/com/github/neysofu/tyche/ContinuousDistribution.scala | Scala | mit | 1,253 |
package demo.components
import chandu0101.macros.tojs.GhPagesMacros
import chandu0101.scalajs.react.components.ReactInfinite
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.html_<^._
import scalacss.ScalaCssReact._
object ReactInfiniteDemo {
val cssSettings = scalacss.devOrProdDefaults
import... | rleibman/scalajs-react-components | demo/src/main/scala/demo/components/ReactInfiniteDemo.scala | Scala | apache-2.0 | 1,716 |
package org.scalacheck.time
/** Stub trait since ScalaJs does not have native support for java.time types. */
private[scalacheck] trait JavaTimeArbitrary
| rickynils/scalacheck | js/src/main/scala/org/scalacheck/time/JavaTimeArbitrary.scala | Scala | bsd-3-clause | 155 |
package org.jetbrains.plugins.scala
package codeInsight.generation
import com.intellij.lang.LanguageCodeInsightActionHandler
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.Project
import com.intellij.psi.PsiFile
import org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil
import org.jetbrain... | triggerNZ/intellij-scala | src/org/jetbrains/plugins/scala/codeInsight/generation/ScalaGeneratePropertyHandler.scala | Scala | apache-2.0 | 2,582 |
/*
* CoCo Json - Copyright (C) 2014 Ruud Vlaming
*
* This file is part of the CoCo Json Library.
*
* 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, version 3 of the License.
*
* This pro... | devlaam/coco | shared/src/main/scala/devlaam/coco/JsonFuture.scala | Scala | gpl-3.0 | 19,240 |
package at.logic.gapt.examples.tip.prod
import at.logic.gapt.expr._
import at.logic.gapt.formats.ClasspathInputFile
import at.logic.gapt.formats.tip.TipSmtParser
import at.logic.gapt.proofs.gaptic._
import at.logic.gapt.proofs.{ Ant, Sequent }
import at.logic.gapt.provers.viper.aip.AnalyticInductionProver
object prop... | gebner/gapt | examples/tip/prod/prop_08.scala | Scala | gpl-3.0 | 2,124 |
package io.eels.component.parquet
import java.util.UUID
import io.eels.component.avro.AvroSchemaFns
import io.eels.component.parquet.avro.AvroParquetReaderFn
import io.eels.schema.{DoubleType, Field, LongType, StructType}
import org.apache.avro.SchemaBuilder
import org.apache.avro.generic.{GenericData, GenericRecord}... | sksamuel/hadoop-streams | eel-core/src/test/scala/io/eels/component/parquet/AvroParquetReaderFnTest.scala | Scala | apache-2.0 | 2,791 |
package org.buttercoin.common.models
import java.util.Date
import scalaz._
import Scalaz._
package object audit {
case class AuditEvent[T](evt: T, timestamp: Long = new Date().getTime)
trait Audit[TSubject, TEvt] {
type This
val subject: TSubject
val events: List[AuditEvent[TEvt]]
protected def ... | buttercoin/engine | common/src/main/scala/models/Audit.scala | Scala | mit | 357 |
/*
* Created on 2010/10/14
* Copyright (c) 2010-2014, Wei-ju Wu.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, ... | weiju/zmpp2 | zmpp-tads3/src/main/scala/org/zmpp/tads3/TadsFile.scala | Scala | bsd-3-clause | 5,350 |
/*
* sbt
* Copyright 2011 - 2018, Lightbend, Inc.
* Copyright 2008 - 2010, Mark Harrah
* Licensed under Apache License 2.0 (see LICENSE)
*/
package sbt
package compiler
import scala.collection.mutable.ListBuffer
import scala.tools.nsc.{ ast, io, reporters, CompilerCommand, Global, Phase, Settings }
import io.{ A... | xuwei-k/xsbt | main-actions/src/main/scala/sbt/compiler/Eval.scala | Scala | apache-2.0 | 23,721 |
package nest.sparkle.util
import java.nio.ByteBuffer
import spray.json._
object SparkleJsonProtocol extends DefaultJsonProtocol {
/** For json formatting a ByteBuffer */
implicit def byteBufferFormat = new RootJsonFormat[ByteBuffer] {
def write(buf: ByteBuffer) = {
JsArray(buf.array().map(_.toJson):_*... | mighdoll/sparkle | util/src/main/scala/nest/sparkle/util/SparkleJsonProtocol.scala | Scala | apache-2.0 | 575 |
/*
* 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... | liquidarmour/ct-calculations | src/main/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC7210A.scala | Scala | apache-2.0 | 1,408 |
package net.sansa_stack.owl.spark.writers
import java.io.{ByteArrayOutputStream, OutputStreamWriter}
import java.util.Collections
import net.sansa_stack.owl.spark.rdd.OWLAxiomsRDD
import org.semanticweb.owlapi.apibinding.OWLManager
import org.semanticweb.owlapi.formats.ManchesterSyntaxDocumentFormat
import org.semant... | SANSA-Stack/SANSA-RDF | sansa-owl/sansa-owl-spark/src/main/scala/net/sansa_stack/owl/spark/writers/ManchesterOWLSyntaxWriter.scala | Scala | apache-2.0 | 1,837 |
package com.twitter.finagle.stats
/**
* A StatsReceiver receiver proxy that translates all counter, stat, and gauge
* names according to a `translate` function.
*
* @param self The underlying StatsReceiver to which translated `MetricBuilder`s are passed
*/
abstract class TranslatingStatsReceiver(
protected val ... | twitter/util | util-stats/src/main/scala/com/twitter/finagle/stats/TranslatingStatsReceiver.scala | Scala | apache-2.0 | 836 |
package test_data
import scala.xml.Elem
case class SectionAboutSelfEmployment(xml: Elem) {
val rootPath = xml \\\\ "DWPCATransaction" \\\\ "DWPCAClaim"
val haveBeenSelfEmployedQuestion = rootPath \\\\ "SelfEmployed" \\\\ "QuestionLabel"
val haveBeenSelfEmployedAnswer = rootPath \\\\ "SelfEmployed" \\\\ "Answe... | Department-for-Work-and-Pensions/RenderingService | test/test_data/SectionAboutSelfEmployment.scala | Scala | mit | 3,308 |
package com.mothy.letsmod2.creativeTab
import com.mothy.letsmod2.init.ModItems
import com.mothy.letsmod2.reference.Reference
import cpw.mods.fml.relauncher.{Side, SideOnly}
import net.minecraft.creativetab.CreativeTabs
import net.minecraft.item.Item
object CreativeTabLM2 {
class CreativeTabsLM2 extends CreativeTa... | mothy1313/letsmod2 | src/main/scala/com/mothy/letsmod2/creativeTab/CreativeTabLM2.scala | Scala | gpl-3.0 | 532 |
package lib
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
case class FutureO[T](futureOption: Future[Option[T]]) {
def flatMap[S](f: T => FutureO[S]): FutureO[S] = {
FutureO(futureOption.flatMap { optS =>
optS.map(f(_).futureOption).getOrElse(Future.successful(N... | guardian/status-app | app/lib/FutureO.scala | Scala | apache-2.0 | 589 |
/**
* Copyright 2014 Andrea Esposito <and1989@gmail.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 applica... | roy20021/ONJAG | src/it/unipi/thesis/andrea/esposito/normalization/Normalizer.scala | Scala | apache-2.0 | 3,243 |
package tk.monnef.mcrconlib
import scala.util.Random
import java.net.{UnknownHostException, Socket}
import java.io.{IOException, OutputStream, InputStream}
import java.nio.charset.StandardCharsets
import java.nio.{ByteOrder, ByteBuffer}
/**
* @author monnef
* @note Based on vincent's code - https://code.google.com/... | mnn/McRConLib | src/tk/monnef/mcrconlib/RCon.scala | Scala | gpl-3.0 | 4,412 |
package counter.http
import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport
import akka.http.scaladsl.model.StatusCodes._
import counter.manager.Counter.CounterDetails
import counter.operation.OperationReceiver.{CounterNotFound, Success}
import scala.concurrent.Future
class CounterRouteSpec extends BaseSpe... | grzesiekw/counter | counter-app/src/test/scala/counter/http/CounterRouteSpec.scala | Scala | apache-2.0 | 2,206 |
/*
* 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 ... | ueshin/apache-spark | sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/CreateTableExec.scala | Scala | apache-2.0 | 2,334 |
package com.netscout.aion2.resources
import com.google.inject.Guice
import com.netscout.aion2.ResourceConfigUtils
import com.netscout.aion2.inject._
import com.netscout.aion2.model._
import javax.ws.rs.core.Response
import javax.ws.rs.core.MediaType._
import org.glassfish.jersey.server.ResourceConfig
import org.glas... | FlukeNetworks/aion | src/test/scala/com/netscout/aion2/resources/SchemaResourceSpec.scala | Scala | apache-2.0 | 3,206 |
package com.daodecode.scalax.collection
import scala.annotation.nowarn
import scala.collection.immutable.SeqOps
import scala.collection.{BuildFrom, IterableOps, MapOps, View, immutable, mutable}
package object extensions {
/**
* @define coll sequence
*/
implicit class SeqOpsExtension[A, C](val seqOps: Se... | jozic/scalax-collection | src/main/scala-2.13/com/daodecode/scalax/collection/extensions/package.scala | Scala | bsd-3-clause | 16,577 |
/*
* Copyright 2020 Precog Data
*
* 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 ... | mossprescott/slamengine-pathy | argonaut/src/main/scala/pathy/argonaut/PosixCodecJson.scala | Scala | agpl-3.0 | 2,140 |
/*
* 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/amls-frontend | test/controllers/businessdetails/ActivityStartDateControllerSpec.scala | Scala | apache-2.0 | 7,356 |
/*
* Copyright 2012 Eike Kettner
*
* 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... | eikek/publet | webeditor/src/main/scala/org/eknet/publet/webeditor/EditorPaths.scala | Scala | apache-2.0 | 1,214 |
package demo
import com.amazonaws.services.lambda.runtime.Context
import io.github.jousby.lambda.http.HttpRequestStreamHandler
import io.github.jousby.lambda.http.model.{HttpRequest, HttpResponse}
import scala.util.Try
class RequestEcho extends HttpRequestStreamHandler {
def handleHttpRequest(request: HttpRequest,... | jousby/scala-aws-lambda | demo/src/main/scala/demo/RequestEcho.scala | Scala | mit | 407 |
package me.rexim.issuestant
import io.circe._
import io.circe.generic.auto._
import io.circe.parser._
import io.circe.syntax._
import org.http4s._
import org.http4s.dsl._
import org.http4s.circe._
object HelloService {
case class Message(message: String)
implicit val encodeMessageCirce: Encoder[Message] =
E... | tsoding/Issuestant | src/main/scala/me/rexim/issuestant/HelloService.scala | Scala | mit | 676 |
package com.github.sweb.potter_kata
import org.scalatest.FlatSpec
/**
* Created by Florian on 18.10.2014.
*/
class BookCartSpec extends FlatSpec{
"A BookCart" should "oder books into sets" in {
val nums = List(1,1,2,2,3,3,4,5)
val books = nums.map(x => Book(x))
val bc = BookCart(books)
val res = S... | sweb/scala_potter_kata | src/test/scala/com/github/sweb/potter_kata/BookCartSpec.scala | Scala | mit | 935 |
/***********************************************************************
* 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-index-api/src/main/scala/org/locationtech/geomesa/index/index/s2/package.scala | Scala | apache-2.0 | 814 |
package com.cloudray.scalapress.plugin.disqus
import org.scalatest.{OneInstancePerTest, FunSuite}
import org.scalatest.mock.MockitoSugar
import org.mockito.Mockito
import com.cloudray.scalapress.item.Item
import com.cloudray.scalapress.folder.Folder
import com.cloudray.scalapress.settings.Installation
import com.cloud... | vidyacraghav/scalapress | src/test/scala/com/cloudray/scalapress/plugin/disqus/DisqusSectionTest.scala | Scala | apache-2.0 | 3,336 |
package util
import scala.io.Source
/**
* Created by hsslbch on 20.04.16.
*/
object Resource {
def readLines(path: String): Iterator[String] =
try {
Source.fromInputStream(
getClass.getResourceAsStream(path)
).getLines()
} catch {
case e: NullPointerException => throw new Error... | klpx/akka-streams-postgresql-copy | src/test/scala/util/Resource.scala | Scala | apache-2.0 | 465 |
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs
// Licence: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.indexer
import akka.actor.Actor
import akka.event.slf4j.SLF4JLogging
import org.apache.commons.vfs2._
import org.apache.commons.vfs2.impl.DefaultFileMonitor
import org.en... | d1egoaz/ensime-sbt | src/sbt-test/sbt-ensime/ensime-server/core/src/main/scala/org/ensime/indexer/FileWatchers.scala | Scala | apache-2.0 | 11,355 |
package cs220
import scala.util.Try
import scala.concurrent.future
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.duration._
import scala.util.Random
object Coffee02 {
type CoffeeBeans = String
type GroundCoffee = String
type Milk = String
ty... | umass-cs-220/week-11-parallel | code/futures/src/main/scala/cs220/Futures02.scala | Scala | apache-2.0 | 4,586 |
package org.apache.predictionio.examples.pfriendrecommendation
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.apache.spark.SparkContext._
import org.apache.spark.graphx._
import org.apache.spark.rdd.RDD
import scala.collection.mutable.ListBuffer
import scala.collection.mutable.... | alex9311/PredictionIO | examples/experimental/scala-parallel-friend-recommendation/src/main/scala/DeltaSimRankRDD.scala | Scala | apache-2.0 | 4,470 |
package ca.uwaterloo.cs.bigdata2016w.andi1400.bestXStreamRating
/**
* Created by ajauch on 05.03.16.
*/
trait SentimentAnalyzeHelperTrait {
/**
* Analyze a twitter post text for sentiment by one of the provided methods:
* a) StanfordNLP
* b) static dictionary
*
* @param post The tweet text to analy... | andi1400/bestXStreamRating | bestXStreamRatingUtils/src/main/scala/ca/uwaterloo/cs/bigdata2016w/andi1400/bestXStreamRating/SentimentAnalyzeHelperTrait.scala | Scala | gpl-3.0 | 4,404 |
package com.karasiq.bootstrap4.modal
import com.karasiq.bootstrap.components.BootstrapComponents
import com.karasiq.bootstrap.context.{ClassModifiers, RenderingContext}
import com.karasiq.bootstrap4.buttons.Buttons
import com.karasiq.bootstrap4.utils.Utils
trait Modals extends ModalStyles { self: RenderingContext wit... | Karasiq/scalajs-bootstrap | library-v4/shared/src/main/scala/com/karasiq/bootstrap4/modal/Modals.scala | Scala | mit | 1,380 |
package de.mineformers.core.client.ui.util
import de.mineformers.core.client.ui.util.font.Font
import de.mineformers.core.client.util.Color
trait Shadow {
def draw(text: String, x: Int, y: Int, z: Int, font: Font, textColor: Color): Unit
}
object Shadow {
def seq(shadows: Shadow*): Shadow = new SeqImpl(shadows)
... | MineFormers/MFCore | src/main/scala/de/mineformers/core/client/ui/util/Shadow.scala | Scala | mit | 840 |
/*
* Scala.js (https://www.scala-js.org/)
*
* Copyright EPFL.
*
* Licensed under Apache License 2.0
* (https://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package java.nio.charset
import scala.annotat... | scala-js/scala-js | javalib/src/main/scala/java/nio/charset/CharsetDecoder.scala | Scala | apache-2.0 | 6,215 |
package com.metl.snippet
import com.metl.data._
import com.metl.utils._
import com.metl.model._
import scala.xml._
import net.liftweb.http.SHtml._
import net.liftweb.http.S
import net.liftweb.util.Helpers._
import java.util.Date
object GlobalsSnippet {
def currentUser = Text(Globals.currentUser.is match {
case... | StackableRegiments/analyticalmetlx | src/main/scala/com/metl/snippet/Globals.scala | Scala | apache-2.0 | 395 |
/*
* Copyright 2015 LG CNS.
*
* 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... | sncap/scouter | scouter.server/src/scouter/server/db/io/RealDataFile.scala | Scala | apache-2.0 | 2,029 |
/*
* Copyright 2017 Datamountaineer.
*
* 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... | CodeSmell/stream-reactor | kafka-connect-influxdb/src/main/scala/com/datamountaineer/streamreactor/connect/influx/writers/WriterFactoryFn.scala | Scala | apache-2.0 | 1,171 |
package org.grimrose.sqlap22.domain.scala
import scalikejdbc._
case class Account(accountId: Long, accountName: Option[String] = None)
object Account extends SQLSyntaxSupport[Account] {
override val tableName = "Accounts"
def apply(a: SyntaxProvider[Account])(rs: WrappedResultSet): Account = apply(a.resultName)... | grimrose/SQL-Antipatterns-22 | src/main/scala/org/grimrose/sqlap22/domain/scala/Account.scala | Scala | mit | 695 |
/*
* 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 ... | guoxiaolongzte/spark | resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/security/YARNHadoopDelegationTokenManager.scala | Scala | apache-2.0 | 2,985 |
package scabot
package jenkins
import spray.http.BasicHttpCredentials
import scala.concurrent.Future
import scala.util.Try
trait JenkinsApi extends JenkinsApiTypes with JenkinsJsonProtocol with JenkinsApiActions { self: core.Core with core.Configuration with core.HttpClient => }
trait JenkinsApiTypes { self: core.C... | SethTisue/scabot | jenkins/src/main/scala/scabot/jenkins/JenkinsAPI.scala | Scala | bsd-3-clause | 7,815 |
import moe.infl.randbot.Roll
import org.scalatest._
import org.apache.commons.math3.random._
class RollSpec extends FlatSpec with Matchers {
"roll" should "have tests" in {
val roll = new Roll(2, 3, 5, new MersenneTwister)
roll.dice should be (2)
roll.face should be (3)
roll.bonus should be (5)
... | inflation/RandBot | src/test/scala/RollSpec.scala | Scala | mit | 503 |
/*
* TypesSpec.scala
*
* Copyright (c) 2013 Lonnie Pryor III
*
* 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... | lpryor/fulcrum-spike | code-tests/src/test/scala/fulcrum/code/TypesSpec.scala | Scala | apache-2.0 | 1,192 |
/*
* 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 ... | aokolnychyi/spark | streaming/src/main/scala/org/apache/spark/streaming/ui/BatchPage.scala | Scala | apache-2.0 | 14,724 |
package org.jetbrains.plugins.scala
package codeInspection.booleans
import com.intellij.codeInspection.{ProblemHighlightType, ProblemsHolder}
import com.intellij.openapi.project.Project
import com.intellij.psi.PsiElement
import org.jetbrains.plugins.scala.codeInspection.{AbstractFixOnPsiElement, AbstractInspection}
im... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/codeInspection/booleans/SimplifyBooleanInspection.scala | Scala | apache-2.0 | 6,188 |
package redmine4s.api.resource
import play.api.libs.json._
import redmine4s.api.model.Role
/**
* Roles
* http://www.redmine.org/projects/redmine/wiki/Rest_Roles
*/
trait RoleResource extends BaseResource {
/** Returns the list of roles. */
def listRoles(): Iterable[Role] = {
import redmine4s.api.json.Js... | tomingtoming/redmine4s | src/main/scala/redmine4s/api/resource/RoleResource.scala | Scala | apache-2.0 | 669 |
/*
* 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 ... | pronix/spark | core/src/main/scala/org/apache/spark/api/python/PythonHadoopUtil.scala | Scala | apache-2.0 | 6,929 |
/*
* Copyright 2009-2010 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... | lift/framework | core/json/src/test/scala/net/liftweb/json/JsonPrintingSpec.scala | Scala | apache-2.0 | 3,470 |
package org.apache.spark.mllib.recommendation
// This must be the same package as Spark's MatrixFactorizationModel because
// MatrixFactorizationModel's constructor is private and we are using
// its constructor in order to save and load the model
import org.jblas.DoubleMatrix
import org.template.recommendation.ALSAlg... | ch33hau/PredictionIO | examples/scala-parallel-recommendation/filter-by-category/src/main/scala/ALSModel.scala | Scala | apache-2.0 | 3,458 |
import scala.collection.mutable.ArrayBuffer
class Expression {
var coa = new ArrayBuffer[CasObj]
}
| Tombert/CASOT | Expression.scala | Scala | bsd-2-clause | 102 |
package persistence.entities
import java.sql.Timestamp
case class OAuthAccessToken( id: Long,
accountId: Long,
oauthClientId: Long,
accessToken: String,
refreshToken: String,
... | cdiniz/slick-akka-http-oauth2 | src/main/scala/persistence/entities/OAuthAccessToken.scala | Scala | apache-2.0 | 390 |
/* ___ _ ___ _ _ *\\
** / __| |/ (_) | | The SKilL Generator **
** \\__ \\ ' <| | | |__ (c) 2013 University of Stuttgart **
** |___/_|\\_\\_|_|____| see LICENSE ... | XyzNobody/skill | src/main/scala/de/ust/skill/generator/ada/api/internal/ByteWriterSpecMaker.scala | Scala | bsd-3-clause | 2,616 |
package springnz.sparkplug
import akka.actor._
import akka.testkit.TestKitBase
import springnz.sparkplug.core.{ Configurer, LocalConfigurer }
import springnz.sparkplug.executor.ExecutorService
import springnz.sparkplug.executor.MessageTypes._
import scala.concurrent.Promise
trait ExecutorServiceBase { self: TestKitB... | springnz/sparkplug | sparkplug-executor/src/test/scala/springnz/sparkplug/ExecutorServiceBase.scala | Scala | mit | 967 |
package no.skytteren.elasticala.bulk
import com.typesafe.scalalogging.StrictLogging
import no.skytteren.elasticala._
import no.skytteren.elasticala.api._
import org.elasticsearch.action.bulk.{BulkItemResponse, BulkRequest => EsBulkRequest, BulkRequestBuilder, BulkResponse => EsBulkResponse}
import org.elasticsearch.ac... | skytteren/elasticala | src/main/scala/no/skytteren/elasticala/bulk/package.scala | Scala | apache-2.0 | 3,793 |
/**
* Copyright 2013, 2016 Gianluca Amato <gianluca.amato@unich.it>
*
* This file is part of JANDOM: JVM-based Analyzer for Numerical DOMains
* JANDOM 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, eith... | amato-gianluca/Jandom | core/src/main/ppl/it/unich/jandom/domains/numerical/ppl/PPLBoxDoubleDomain.scala | Scala | lgpl-3.0 | 2,312 |
package examples.util
import artie.Read
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.model._
import akka.http.scaladsl.server.{Directives, ExceptionHandler}
import akka.stream.ActorMaterializer
import play.api.libs.json._
import de.heikoseeberger.akkahttpplayjson.PlayJsonSupp... | pheymann/artie | examples/src/main/scala/examples/util/TestService.scala | Scala | mit | 4,201 |
package net.spals.leagur.store.migration
import scala.annotation.StaticAnnotation
/**
* @author tkral
*/
case class Migration(num: Int, description: String) extends StaticAnnotation
| spals/leagur | store/src/main/scala/net/spals/leagur/store/migration/Migration.scala | Scala | bsd-3-clause | 187 |
object templateParents {
// traits do not call a constructor
class C[+T](val x: T)
trait D extends C[String]
trait E extends C[Int]
class F extends C[Boolean](true) {
def foo = x
}
val cd = new C("abc") with D
cd.x
}
object templateParents1 {
// tests inference of synthesized class type
class... | yusuke2255/dotty | tests/pickling/templateParents.scala | Scala | bsd-3-clause | 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 ... | windeye/spark | core/src/main/scala/org/apache/spark/rdd/BlockRDD.scala | Scala | apache-2.0 | 2,007 |
package foo
class B | ilinum/intellij-scala | testdata/move/scl4619/before/foo/B.scala | Scala | apache-2.0 | 20 |
package pgep
import List.map2
object Genotype {
def apply(gp: GenotypeParameters) = {
val genes = (0 until gp.nrGenes) map (i => Gene(gp.geneParameters(i))) toArray;
new Genotype(gp, genes)
}
def copyLinearStructure(src: Genotype, dst: Genotype, geneStart: Int, symbolStart: Int, geneEnd: Int, sym... | khernyo/PGEP | src/pgep/Genotype.scala | Scala | gpl-3.0 | 3,238 |
package controllers
import play.api.mvc._
import org.slf4j.LoggerFactory
import com.typesafe.scalalogging.Logger
object RequestActivityUpdater extends SessionConfig{
val logger = Logger(LoggerFactory.getLogger(this.getClass))
def updateLastActivityTime(session:Session):Session = {
require(session != null)
... | richardchankiyin/sysdashboard | Portal/app/controllers/RequestActivityUpdater.scala | Scala | gpl-3.0 | 1,099 |
package com.rasterfoundry.lambda.overviews
import java.util.UUID
import com.rasterfoundry.datamodel._
import com.rasterfoundry.datamodel.auth.{AuthorizedToken, RefreshToken}
import com.softwaremill.sttp._
import com.softwaremill.sttp.circe._
import scala.annotation.tailrec
/**
* HTTP client for interacting with Ra... | azavea/raster-foundry | app-backend/lambda-overviews/src/main/scala/com/rasterfoundry/lambda/overviews/HttpClient.scala | Scala | apache-2.0 | 3,405 |
/*
* 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 ... | WeichenXu123/spark | sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala | Scala | apache-2.0 | 18,383 |
/**
* 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... | jack6215/kafka | core/src/test/scala/integration/kafka/api/PlaintextConsumerTest.scala | Scala | apache-2.0 | 14,252 |
package org.chronos.wikiparsing
import akka.actor.{ActorSystem, Actor, Props}
import org.chronos.wikiparsing.workers.{MergeActor, TaskSeparator, PageExtractor}
import org.chronos.wikiparsing.messages.StartExtractor
object Main extends App {
val system = ActorSystem("WikiParser")
val actor = system.actorOf(Props[P... | MaikelH/WikiParser | src/main/scala/org/chronos/wikiparsing/Main.scala | Scala | lgpl-3.0 | 539 |
package edu.osu.cse.groenkeb.logic.proof.rules.core
import edu.osu.cse.groenkeb.logic._
import edu.osu.cse.groenkeb.logic.dsl._
import edu.osu.cse.groenkeb.logic.proof._
import edu.osu.cse.groenkeb.logic.proof.rules._
import edu.osu.cse.groenkeb.logic.utils.Only
case object NegationElimination extends BaseRule {
de... | bgroenks96/AutoMoL | core/src/main/scala/edu/osu/cse/groenkeb/logic/proof/rules/core/elimRules.scala | Scala | mit | 5,495 |
// 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 unde... | cloudant-labs/clouseau | src/test/scala/com/cloudant/clouseau/ClouseauQueryParserSpec.scala | Scala | apache-2.0 | 2,433 |
/*
* Prover for theories modulo equality.
*
*/
package at.logic.gapt.provers.eqProver
import at.logic.gapt.provers.Prover
import at.logic.gapt.provers.prover9._
import at.logic.gapt.provers.veriT._
import at.logic.gapt.proofs.lk.base.FSequent
class EquationalProver extends Prover {
// Use prover9 to get LK pro... | gisellemnr/gapt | src/main/scala/at/logic/gapt/provers/eqProver/EquationalProver.scala | Scala | gpl-3.0 | 564 |
package scribe.message
import scribe.output.LogOutput
import scala.language.implicitConversions
trait LoggableMessage {
def logOutput: LogOutput
}
object LoggableMessage {
implicit def string2Message(s: String): LoggableMessage = Message.static(s)
implicit def stringList2Messages(list: List[String]): List[Log... | outr/scribe | core/shared/src/main/scala/scribe/message/LoggableMessage.scala | Scala | mit | 576 |
package scala.meta
package intellij
import org.jetbrains.plugins.scala.NlsString
import org.jetbrains.plugins.scala.caches.BlockModificationTracker
import org.jetbrains.plugins.scala.lang.psi.api.base.{ScAnnotation, ScAnnotationsHolder, ScPrimaryConstructor}
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typ... | JetBrains/intellij-scala | scala/scala-impl/src/scala/meta/intellij/psi/package.scala | Scala | apache-2.0 | 3,027 |
/**
* This file is part of the TA Buddy project.
* Copyright (c) 2013-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... | digimead/digi-TABuddy-desktop | part-view-modification/src/main/scala/org/digimead/tabuddy/desktop/view/modification/ui/dialog/sorted/ColumnDirection.scala | Scala | agpl-3.0 | 5,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 ... | ueshin/apache-spark | project/MimaBuild.scala | Scala | apache-2.0 | 3,940 |
/*
* Copyright 2014 Pascal Voitot (@mandubian)
*
*/
import scalaz._
import Scalaz._
/** Portage of @runorama code sample https://gist.github.com/runarorama/a8fab38e473fafa0921d to pure Scalaz */
object Injective {
/** extends Natural Trans with "or" for composite interpreter */
implicit class RichNat[F[_],G[_]... | mandubian/injective | src/main/scala/injective.scala | Scala | apache-2.0 | 3,911 |
/***********************************************************************
* Copyright (c) 2013-2022 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... | locationtech/geomesa | geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/conf/ConfConversions.scala | Scala | apache-2.0 | 2,512 |
/**
* 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"); yo... | sebadiaz/kafka | core/src/test/scala/integration/kafka/api/DelegationTokenEndToEndAuthorizationTest.scala | Scala | apache-2.0 | 4,241 |
package fpinscala.parallelism
import java.util.concurrent._
object Par {
type Par[A] = ExecutorService => Future[A]
def run[A](s: ExecutorService)(a: Par[A]): Future[A] = a(s)
/*
The implementation of `unit` does not use the `ExecutorService`, it simply returns a `Future` directly.
*/
def unit[A](a:... | fpinscala-muc/fpinscala-LithiumTD | chaptercode/src/main/scala/fpinscala/parallelism/Par.scala | Scala | mit | 4,121 |
package me.lightspeed7.parsers.simple1
import scala.util.parsing.combinator.syntactical.StandardTokenParsers
//
// Initial Example Taken From Blog Post By - Daniel Spiewak
//
// http://www.codecommit.com/blog/scala/formal-language-processing-in-scala
//
// ////////////////////////////////////////////////////////////... | dbuschman7/collection-of-things | parsers/src/main/scala/me/lightspeed7/parsers/simple1/SimpleTalk1.scala | Scala | apache-2.0 | 2,169 |
package excavators.odesk.apps.searcher
import excavators.odesk.ui.{ExcavatorUI, Browser}
/**
* Component watch work process and print metrics to status bar.
* Created by CAB on 23.10.2014.
*/
class Watcher(browser:Browser, worker:Worker, ui:ExcavatorUI) {
//Parameters
val updateTimeOut = 1000
val stopTimeout =... | AlexCAB/FreelanceAnalytics | src/excavators/odesk/apps/searcher/Watcher.scala | Scala | mit | 1,099 |
package com.ringcentral.gatling.mongo.response
trait MongoResponse
case class MongoStringResponse(response: String) extends MongoResponse
case class MongoCountResponse(count: Int) extends MongoResponse {
def value: Int = count
}
| RC-Platform-Disco-Team/gatling-mongodb-protocol | src/main/scala/com/ringcentral/gatling/mongo/response/MongoResponse.scala | Scala | mit | 235 |
package uk.ac.ncl.openlab.intake24.services.fooddb.user
import uk.ac.ncl.openlab.intake24.api.data.{PortionSizeMethod, UserFoodHeader}
import uk.ac.ncl.openlab.intake24.errors.LocalLookupError
case class ResolvedFoodData(code: String, englishDescription: String, localDescription: String, groupCode: Int,
... | digitalinteraction/intake24 | FoodDataServices/src/main/scala/uk/ac/ncl/openlab/intake24/services/fooddb/user/FoodDataService.scala | Scala | apache-2.0 | 758 |
/*
* 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 ... | zcan/samza | samza-yarn/src/main/scala/org/apache/samza/webapp/ApplicationMasterRestServlet.scala | Scala | apache-2.0 | 3,959 |
package org.jetbrains.plugins.scala.dfa
package cfg
package impl
private abstract class ValueImpl[Info] extends NodeImpl[Info] { this: Value =>
final var _valueId: Int = -1
override def valueId: Int = _valueId
}
| JetBrains/intellij-scala | scala/dfa/src/org/jetbrains/plugins/scala/dfa/cfg/impl/ValueImpl.scala | Scala | apache-2.0 | 218 |
/*
* 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 ... | bravo-zhang/spark | examples/src/main/scala/org/apache/spark/examples/sql/streaming/StructuredNetworkWordCount.scala | Scala | apache-2.0 | 2,435 |
/*
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... | twitter/algebird | algebird-util/src/main/scala/com/twitter/algebird/util/summer/AsyncSummer.scala | Scala | apache-2.0 | 2,587 |
/***********************************************************************
* 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... | boundlessgeo/geomesa | geomesa-index-api/src/main/scala/org/locationtech/geomesa/index/index/z3/XZ3Index.scala | Scala | apache-2.0 | 1,601 |
package org.scalacoin.marshallers.script
import org.scalacoin.marshallers.RawBitcoinSerializer
import org.scalacoin.protocol.script._
import org.scalacoin.script.constant.{ScriptConstant, ScriptToken}
import org.scalacoin.script.crypto.{OP_CHECKMULTISIGVERIFY, OP_CHECKMULTISIG}
import org.scalacoin.util.{BitcoinSLogge... | TomMcCabe/scalacoin | src/main/scala/org/scalacoin/marshallers/script/RawScriptSignatureParser.scala | Scala | mit | 893 |
/*
* Copyright 2016 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... | ahudspith-equalexperts/ct-calculations | src/test/scala/uk/gov/hmrc/ct/computations/calculations/AdjustedTradingProfitOrLossCalculatorSpec.scala | Scala | apache-2.0 | 3,236 |
package net.truerss.services
import org.specs2.mock.Mockito
import org.specs2.mutable.Specification
import org.specs2.specification.Scope
import truerss.db.{DbLayer, UserSettingsDao}
import truerss.dto.{AvailableSelect, AvailableSetup, CurrentValue, NewSetup}
import truerss.services.SettingsService
import truerss.util... | truerss/truerss | src/test/scala/net/truerss/services/SettingsServiceTests.scala | Scala | mit | 3,083 |
package reactivemongo
import _root_.play.api.libs.json.{
JsArray,
JsNull,
JsObject,
JsString,
JsNumber,
JsValue
}
import reactivemongo.api.bson.{
BSONArray,
BSONBinary,
BSONBoolean,
BSONDateTime,
BSONDecimal,
BSONDocument,
BSONDouble,
BSONInteger,
BSONJavaScript,
BSONJavaScriptWS,
BS... | ReactiveMongo/Reactivemongo-Play-Json | compat/src/test/scala/ExtendedJsonFixtures.scala | Scala | apache-2.0 | 3,595 |
package com.temportalist.weepingangels.common.entity
import java.util
import com.temportalist.origin.api.common.lib.V3O
import com.temportalist.origin.api.common.utility.{Teleport, Stacks, WorldHelper}
import com.temportalist.origin.internal.common.extended.ExtendedEntityHandler
import com.temportalist.weepingangels.... | TheTemportalist/WeepingAngels | src/main/scala/com/temportalist/weepingangels/common/entity/EntityAngel.scala | Scala | apache-2.0 | 17,934 |
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.