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 code
package service
import code.commons.TimeUtils
import code.model.{Task, User}
import code.service.TaskItemService.{IntervalQuery, getTaskItems}
import code.util.ListToReducedMap._
import com.github.nscala_time.time.Imports._
import net.liftweb.common._
import net.liftweb.mapper.By
import org.joda.time.{Dat... | dodie/time-admin | src/main/scala/code/service/ReportService.scala | Scala | apache-2.0 | 5,230 |
trait X[R <: Z, Z >: X[R, R] <: X[R, R]] // error // error
class Z extends X[Z, Z]
| som-snytt/dotty | tests/neg/i4369b.scala | Scala | apache-2.0 | 83 |
/**
* Copyright (C) 2010 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 program i... | orbeon/orbeon-forms | src/main/scala/org/orbeon/oxf/common/PEVersion.scala | Scala | lgpl-2.1 | 8,732 |
/*
* Copyright (c) 2014-2021 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... | monifu/monifu | monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskSuite.scala | Scala | apache-2.0 | 2,115 |
object A:
import scala.quoted.Type.valueOfTuple
object B:
import scala.quoted.Type.*
object C:
import Tuple.canEqualTuple
object D:
import Tuple.given
object E:
import Selectable.WithoutPreciseParameterTypes
| dotty-staging/dotty | tests/run/forwardCompat-unusedImport/Imports_1_r3.0.scala | Scala | apache-2.0 | 222 |
/*
* Copyright 2014–2018 SlamData Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | slamdata/slamengine | api/src/test/scala/quasar/api/datasource/DatasourceTypeGenerator.scala | Scala | apache-2.0 | 1,479 |
package org.smartnut
import org.apache.spark._
import org.apache.spark.SparkContext._
import org.apache.spark.scheduler.{SplitInfo, StatsReportListener}
import org.apache.spark.{AccumulatorParam, Logging, SparkConf, SparkContext}
object SparkQuery extends Logging{
var sparkContext: SparkContext = _
def init()... | smartnut007/SparkPlayApp | SparkQueryLibrary/src/main/scala/com/smartnut/SparkQuery.scala | Scala | apache-2.0 | 1,348 |
/*
* Copyright 2014–2018 SlamData Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | jedesah/Quasar | marklogic/src/main/scala/quasar/physical/marklogic/xquery/NamespaceDecl.scala | Scala | apache-2.0 | 1,148 |
/*
* Copyright 2014–2017 SlamData Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | drostron/quasar | mimir/src/test/scala/quasar/mimir/EvaluatorSpecs.scala | Scala | apache-2.0 | 4,152 |
package ml.combust.mleap.core.feature
import ml.combust.mleap.core.Model
import ml.combust.mleap.core.types.{BasicType, ListType, ScalarType, StructType}
import scala.util.matching.Regex
case class RegexTokenizerModel(regex: Regex, matchGaps: Boolean = true, tokenMinLength: Int = 1, lowercaseText: Boolean = true) ex... | combust/mleap | mleap-core/src/main/scala/ml/combust/mleap/core/feature/RegexTokenizerModel.scala | Scala | apache-2.0 | 774 |
package org.modelfun
import paths.{UnitPath, Path}
/**
*
*/
case class Extrusion(path: Parameters=>Path = UnitPath, outline: Parameters=>Path) extends Model
| zzorn/modelfun | src/main/scala/org/modelfun/models/Extrusion.scala | Scala | lgpl-3.0 | 163 |
package com.rasterfoundry.database
import com.rasterfoundry.common.Generators.Implicits._
import com.rasterfoundry.datamodel.PageRequest
import com.rasterfoundry.datamodel._
import cats.implicits._
import doobie.implicits._
import org.scalacheck.Prop.forAll
import org.scalatestplus.scalacheck.Checkers
import org.sca... | raster-foundry/raster-foundry | app-backend/db/src/test/scala/com/azavea/rf/database/ProjectLayerScenesDaoSpec.scala | Scala | apache-2.0 | 5,349 |
package actors
import models._
import daos.Store
import serializers.SerializerComponent
import akka.actor._
import akka.event.Logging
import akka.routing.SmallestMailboxRouter
trait CheckerComponent {
this:Store with BestPricerComponent with ComponentSystem=>
val checkerActorRef = system.actorOf(Props(new Che... | soulofpeace/FareHound | app/actors/CheckerComponent.scala | Scala | apache-2.0 | 1,100 |
package jerimum
import br.edu.ifrn.potigol.Potigolutil.{ Inteiro, Real, Texto }
import java.awt.Font
object Fonte {
}
case class Fonte(tamanho: Inteiro) {
private[this] val font = new Font("Dialog", Font.BOLD, tamanho);
def desenhe_centralizado(msg: Texto, x: Real, y: Real, z: Inteiro, cor: Cor = C... | potigol/Jerimum | src/main/scala/jerimum/Fonte.scala | Scala | mit | 832 |
package neuroflow.nets.cpu
import breeze.linalg._
import breeze.stats._
import neuroflow.core.Network._
import neuroflow.core.WaypointLogic.NoOp
import neuroflow.core.{CanProduce, _}
import neuroflow.dsl._
import scala.annotation.tailrec
import scala.collection.Seq
import scala.collection.mutable.ArrayBuffer
import s... | zenecture/neuroflow | core/src/main/scala/neuroflow/nets/cpu/ConvNetwork.scala | Scala | apache-2.0 | 20,369 |
/* *\\
** \\ \\ / _) \\ \\ / \\ | **
** \\ \\ / | __ \\ _ \\ __| \\ \\ / |\\/ | **
** \\ \\ / | | | __/ | \\ \\ / | | **
** \\_/ _| .__/ \\___| _| \\_/ _| _| **
** _| ... | hsyl20/Scala_ViperVM | src/main/scala/org/vipervm/runtime/data/RawData.scala | Scala | gpl-3.0 | 967 |
package de.uni_potsdam.hpi.coheel.programs
import de.uni_potsdam.hpi.coheel.Params
import de.uni_potsdam.hpi.coheel.programs.DataClasses.InputDocument
import de.uni_potsdam.hpi.coheel.util.Util
import de.uni_potsdam.hpi.coheel.wiki.TokenizerHelper
import org.apache.flink.api.common.functions.RichFlatMapFunction
import... | stratosphere/coheel | src/main/scala/de/uni_potsdam/hpi/coheel/programs/InputDocumentDistributorFlatMap.scala | Scala | apache-2.0 | 2,370 |
/*
* 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 ... | sahilTakiar/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/ApproximatePercentile.scala | Scala | apache-2.0 | 12,863 |
package org.qirx.cms.execution
import scala.concurrent.ExecutionContext
import scala.concurrent.Future
import org.qirx.cms.construction.GetMessages
import org.qirx.cms.construction.Metadata
import org.qirx.cms.construction.Store
import org.qirx.cms.construction.Validate
import org.qirx.cms.machinery.BuildTools
import ... | EECOLOR/play-cms | cms/src/main/scala/org/qirx/cms/execution/DocumentValidator.scala | Scala | mit | 1,836 |
/*
* 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-http/src/main/scala/io/gatling/http/action/sse/fsm/SetCheck.scala | Scala | apache-2.0 | 861 |
/*
* Copyright (c) 2015, streamdrill UG (haftungsbeschränkt)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, th... | streamdrill/streamdrill-core | src/main/scala/streamdrill/core/ExpDecayTrend.scala | Scala | bsd-2-clause | 13,838 |
package com.github.jparkie.spark.cassandra
import com.datastax.spark.connector.mapper.ColumnMapper
import org.apache.spark.rdd.RDD
import scala.reflect.runtime.universe._
package object rdd {
/**
* Implicitly lift a [[RDD]] with [[SparkCassRDDFunctions]].
*
* @param rdd A [[RDD]] to lift.
* @return Enr... | jparkie/Spark2Cassandra | src/main/scala/com/github/jparkie/spark/cassandra/rdd/package.scala | Scala | apache-2.0 | 522 |
/**
* Copyright (C) 2013 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 program i... | martinluther/orbeon-forms | src/main/scala/org/orbeon/oxf/portlet/liferay/LiferaySupport.scala | Scala | lgpl-2.1 | 2,106 |
package io.eels.util
import org.apache.hadoop.fs.{FileSystem, Path}
object HdfsMkdir {
def apply(path: Path, inheritPermissionsDefault: Boolean)(implicit fs: FileSystem): Unit = {
if (!fs.exists(path)) {
// iterate through the parents until we hit a parent that exists, then take that, which will give
... | eel-lib/eel | eel-core/src/main/scala/io/eels/util/HdfsMkdir.scala | Scala | mit | 706 |
/*
* Copyright 2019 Spotify AB.
*
* 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 ... | spotify/scio | scio-test/src/test/scala/com/spotify/scio/testing/SCollectionMatchersTest.scala | Scala | apache-2.0 | 22,815 |
package com.verisign.hadoopio.integration
import java.io.File
import java.nio.file.Paths
import com.verisign.hadoopio.logging.LazyLogging
import com.verisign.hadoopio.testing.Testing
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.{FileSystem, FileUtil, Path}
import org.apache.hadoop.hdfs.{DFS... | verisign/hadoopio | src/test/scala/com/verisign/hadoopio/integration/HdfsSpec.scala | Scala | apache-2.0 | 2,149 |
package scala.scalanative
package util
import language.implicitConversions
class ScopedVar[A] {
import ScopedVar.Assignment
private var init = false
private var value: A = _
def get: A = if (!init) throw ScopedVar.Unitialized() else value
def :=(newValue: A): Assignment[A] = ne... | cedricviaccoz/scala-native | util/src/main/scala/scala/scalanative/util/ScopedVar.scala | Scala | bsd-3-clause | 1,192 |
/*
* Copyright (c) 2014 - 2015 Contributor. All rights reserved.
*/
package org.scalaide.debug.internal.expression
import scala.reflect.runtime.universe
import scala.runtime.RichBoolean
import scala.runtime.RichByte
import scala.runtime.RichChar
import scala.runtime.RichDouble
import scala.runtime.RichFloat
import s... | andrey-ilinykh/scala-ide | org.scala-ide.sdt.debug.expression/src/org/scalaide/debug/internal/expression/Names.scala | Scala | bsd-3-clause | 8,812 |
/**
* 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-split-multi-deposit | src/main/scala/nl.knaw.dans.easy.multideposit/model/DcType.scala | Scala | apache-2.0 | 1,567 |
/*
* Wire
* Copyright (C) 2016 Wire Swiss GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This progr... | wireapp/wire-android-sync-engine | zmessaging/src/main/scala/com/waz/utils/EventProcessingQueue.scala | Scala | gpl-3.0 | 5,805 |
package akka.ainterface.test.arbitrary
import java.util.concurrent.TimeUnit
import org.scalacheck.{Arbitrary, Gen}
import scala.concurrent.duration.FiniteDuration
trait DurationArbitrary {
implicit val arbFiniteDuration: Arbitrary[FiniteDuration] = Arbitrary(genFiniteDuration())
def genFiniteDuration(minMillis: ... | ainterface/ainterface | ainterface/src/test/scala/akka/ainterface/test/arbitrary/DurationArbitrary.scala | Scala | apache-2.0 | 477 |
package scalax.collection.io.json
package imp
import net.liftweb.json._
import scalax.collection.GraphEdge.{EdgeLike, EdgeCompanionBase}
import error.JsonGraphError._, descriptor._, descriptor.Defaults._
// ---------------------------- data structures representing the parse result
protected[json]
sealed a... | opyate/scala-graph | json/src/main/scala/scalax/collection/io/json/imp/Parser.scala | Scala | bsd-3-clause | 2,693 |
package org.jetbrains.plugins.scala
package lang
package psi
package api
package expr
import com.intellij.lang.ASTNode
import com.intellij.psi.scope.PsiScopeProcessor
import com.intellij.psi.tree.TokenSet
import com.intellij.psi.util.PsiTreeUtil
import com.intellij.psi.{PsiElement, ResolveState}
import org.jetbrains.p... | JetBrains/intellij-scala-historical | src/org/jetbrains/plugins/scala/lang/psi/api/expr/ScBlock.scala | Scala | apache-2.0 | 10,172 |
package antonkulaga.projects
import akka.actor._
import akka.http.scaladsl.Http.{IncomingConnection, ServerBinding}
import akka.http.scaladsl.{Http, _}
import akka.stream.ActorMaterializer
import akka.stream.scaladsl.Source
import scala.concurrent.Future
/**
* Main actor that encapsulates main application logic and... | antonkulaga/personal | app/jvm/src/main/scala/antonkulaga/projects/MainActor.scala | Scala | mpl-2.0 | 1,112 |
package models
import java.util.UUID
import com.vividsolutions.jts.geom.Geometry
import com.trifectalabs.roadquality.v0.models.{PathType, SurfaceType}
case class MiniSegment(id: UUID, trafficRating: Double, surfaceRating: Double, surface: SurfaceType, pathType: PathType, path: String)
case class MiniSegmentToSegmen... | trifectalabs/roadquality | api/app/models/MiniSegment.scala | Scala | bsd-3-clause | 546 |
/*
* Copyright (c) 2017 Minkyu Cho
*
* 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, copy, modify, merge, publish,... | Pitzcarraldo/spring-node-view | src/main/scala/com/github/pitzcarraldo/spring/view/node/NodeView.scala | Scala | mit | 2,653 |
/*
* 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 ... | starpit/openwhisk | common/scala/src/main/scala/org/apache/openwhisk/core/entity/Subject.scala | Scala | apache-2.0 | 2,317 |
/*
* 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.compat.java8
pa... | scala/scala-java8-compat | src/main/scala-2.13+/scala/compat/java8/collectionImpl/package.scala | Scala | apache-2.0 | 1,255 |
/*
* Copyright 1998-2016 Linux.org.ru
* 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... | kloun/lorsource | src/test/scala/ru/org/linux/util/bbcode/UrlWithParamTagSpec.scala | Scala | apache-2.0 | 1,277 |
/*
* ScalaRay - Ray tracer based on pbrt (see http://pbrt.org) written in Scala
* Copyright (C) 2009, 2010, 2011 Jesper de Jong
*
* 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 ve... | jesperdj/scalaray | src/main/scala/org/jesperdj/scalaray/vecmath/Intersectable.scala | Scala | gpl-3.0 | 1,188 |
object Test extends scala.tools.partest.StubErrorMessageTest {
def codeA = """
package stuberrors
class A[T]
"""
def codeB = """
package stuberrors
class B[T: A](val t: T)
"""
def userCode = """
package stuberrors
// Here we want a stub error not an implicit not found error
class... | scala/scala | test/files/run/StubErrorTypeclass.scala | Scala | apache-2.0 | 439 |
/**
* Copyright (C) 2009-2017 Lightbend Inc. <http://www.lightbend.com>
*/
package akka.event
import java.util.concurrent.TimeoutException
import java.util.concurrent.atomic.AtomicInteger
import akka.actor.ActorSystem.Settings
import akka.actor._
import akka.annotation.{ DoNotInherit, InternalApi }
import akka.disp... | rorygraves/perf_tester | corpus/akka/akka-actor/src/main/scala/akka/event/Logging.scala | Scala | apache-2.0 | 73,779 |
package adt.bson.mongo.async.client
import adt.bson.mongo.async.MongoSingleCallback
import com.mongodb.async.SingleResultCallback
import play.api.libs.functional.syntax._
import scala.concurrent.{Future, Promise}
/**
* Module for converting [[SingleResultCallback]]s to [[Future]]s.
*/
object MongoAsyncConverters {... | jeffmay/bson-adt | bson-adt-mongo3-async/src/main/scala/adt/bson/mongo/async/client/MongoAsyncConverters.scala | Scala | apache-2.0 | 1,209 |
package ml
abstract class Estimator extends Identifiable with Params {
def fit(dataset: Dataset, paramMap: ParamMap): Transformer
def fit(dataset: Dataset, paramMaps: Array[ParamMap]): Array[Transformer] = {
paramMaps.map(fit(dataset, _))
}
/**
* Parameter for the output model.
*/
def model: Par... | mengxr/spark-ml | src/main/scala/ml/Estimator.scala | Scala | apache-2.0 | 341 |
/* Copyright 2009-2016 EPFL, Lausanne */
package leon.utils
trait IncrementalState {
def push(): Unit
def pop(): Unit
final def pop(lvl: Int): Unit = List.range(0, lvl).foreach(_ => pop())
def clear(): Unit
def reset(): Unit
}
| regb/leon | src/main/scala/leon/utils/IncrementalState.scala | Scala | gpl-3.0 | 241 |
package de.choffmeister.microserviceutils.auth
import java.time.Instant
import akka.http.scaladsl.model.DateTime
import akka.http.scaladsl.model.headers.{Cookie, HttpCookie, HttpCookiePair}
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server.{Directive0, Directive1, StandardRoute}
import de... | choffmeister/microservice-utils | microservice-utils-auth/src/main/scala/de/choffmeister/microserviceutils/auth/CookieAuthProvider.scala | Scala | mit | 7,341 |
/*
* 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 ... | dotty-staging/scalatest | project/GenRegularTestBase.scala | Scala | apache-2.0 | 3,440 |
package uk.co.sprily.dh
package scheduling
import scala.concurrent.duration._
case class Take(schedule: Schedule, n: Long) extends Schedule {
case class Target(
val initiateAt: Deadline,
val timeoutAt: Deadline,
val numLeft: Long,
val underlying: schedule.Target) extends TargetLike
obje... | sprily/datahopper | scheduling/src/main/scala/take.scala | Scala | gpl-3.0 | 1,238 |
package com.soundcloud.spdt
import play.api.libs.json._
object Feature {
trait Type
object Boolean extends Type
object RealValued extends Type
}
//// sample
////
// @param features: analogous to a sparse vector for sample features
// @param label: optional class label of the sample
case class Sample(features: ... | soundcloud/spdt | compute/src/main/scala/com.soundcloud.spdt/Sample.scala | Scala | mit | 1,633 |
package me.hawkweisman.alexandria
package controllers
import me.hawkweisman.util.RichException.makeRich
import me.hawkweisman.util.concurrent.tryToFuture
import responses.{ ModelResponseMessage, ErrorModel, BookSerializer, AuthorSerializer }
import model.Tables._
import model.{ ISBN, Book, Author }
import org.scalat... | alexandrialibrary/Alexandria | src/main/scala/me/hawkweisman/alexandria/controllers/APIController.scala | Scala | mit | 10,723 |
/*
* Copyright (C) 2011 Mikołaj Sochacki mikolajsochacki AT gmail.com
* This file is part of VRegister (Virtual Register - Wirtualny Dziennik)
*
* VRegister is free software: you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENS Version 3
* as published by th... | mikolajs/osp | src/main/scala/eu/brosbit/opos/model/UserChangeList.scala | Scala | agpl-3.0 | 1,431 |
/**
* Copyright (c) 2014-2016 Snowplow Analytics Ltd.
* All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache
* License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at
... | TimothyKlim/snowplow | 4-storage/kafka-elasticsearch-sink/src/main/scala/com/snowplowanalytics/snowplow/storage/JsonRecord.scala | Scala | apache-2.0 | 1,027 |
/*
* 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 t... | devcamcar/zipkin | zipkin-hadoop/src/test/scala/com/twitter/zipkin/hadoop/PopularAnnotationsSpec.scala | Scala | apache-2.0 | 2,802 |
package mesosphere.mesos.simulation
import java.util
import akka.actor.{ ActorRef, ActorSystem, Props }
import com.typesafe.config.{ Config, ConfigFactory }
import org.apache.mesos.Protos._
import org.apache.mesos.SchedulerDriver
import org.slf4j.LoggerFactory
import scala.collection.JavaConversions._
/**
* The f... | bsideup/marathon | mesos-simulation/src/main/scala/mesosphere/mesos/simulation/SimulatedDriver.scala | Scala | apache-2.0 | 3,862 |
package controllers
import play.api.data.Form
import play.api.data.Forms._
import play.api.libs.json._
import play.api.mvc._
import scala.concurrent.duration._
import views._
import lila.api.Context
import lila.app._
import lila.common.config.MaxPerSecond
import lila.team.{ Requesting, Team => TeamModel }
import lila... | luanlv/lila | app/controllers/Team.scala | Scala | mit | 19,388 |
/*
* 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 ... | GJL/flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/runtime/CRowKeySelector.scala | Scala | apache-2.0 | 1,658 |
// copied from LMS to avoid depending on tests
// Apply any changes made there! To check:
// git log v0.9.0..HEAD test-src/epfl/test7-analysis/TestFusion.scala
// Don't forget to update the command after applying changes
package scalan.compilation.lms.arrays
import scala.lms.common.{IfThenElseFatExp, LoopFusionOpt, Sc... | PCMNN/scalan-ce | lms-backend/core/src/main/scala/scalan/compilation/lms/arrays/ScalaGenFatArrayLoopsFusionOpt.scala | Scala | apache-2.0 | 1,469 |
// Copyright (C) 2011-2012 the original author or authors.
// See the LICENCE.txt file distributed with this work for additional
// information regarding copyright ownership.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You ... | scalastyle/scalastyle | src/test/scala/org/scalastyle/scalariform/SpaceAfterCommentStartCheckerTest.scala | Scala | apache-2.0 | 2,769 |
package org.bitcoins.core.protocol.blockchain
import org.bitcoins.core.consensus.Merkle
import org.bitcoins.core.crypto.DoubleSha256Digest
import org.bitcoins.core.currency.{CurrencyUnit, Satoshis}
import org.bitcoins.core.number.{Int64, UInt32, UInt64}
import org.bitcoins.core.protocol.CompactSizeUInt
import org.bitc... | SuredBits/bitcoin-s-sidechains | src/main/scala/org/bitcoins/core/protocol/blockchain/ChainParams.scala | Scala | mit | 7,439 |
/*
* 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 ... | pgandhi999/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/CheckpointFileManager.scala | Scala | apache-2.0 | 13,503 |
package skychat
import java.util.UUID
import net.milkbowl.vault.chat.Chat
import org.bukkit.{Bukkit, OfflinePlayer}
import org.bukkit.command.{Command, CommandSender}
import org.bukkit.plugin.java.JavaPlugin
import skychat.irc.SkyChatIrc
class SkyChat extends JavaPlugin {
override def onEnable(): Unit = {
if (... | robotbrain/skychat | src/main/scala/skychat/SkyChat.scala | Scala | apache-2.0 | 2,593 |
package com.datastax.spark.connector.cql
import java.net.InetAddress
import scala.concurrent.duration._
import scala.language.postfixOps
import scala.util.Try
import scala.util.control.NonFatal
import org.apache.spark.{Logging, SparkConf}
import com.datastax.driver.core.{ProtocolOptions, SSLOptions}
import com.data... | EchoSYSU/spark-cassandra-connector | spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/cql/CassandraConnectorConf.scala | Scala | apache-2.0 | 10,964 |
package antonkulaga.projects.templates
import scalacss.Defaults._
object MyStyles extends StyleSheet.Standalone {
/* "#container" - (
width(1024 px),
height(768 px)
)
*/
} | antonkulaga/personal | app/jvm/src/main/scala/antonkulaga/projects/templates/MyStyles.scala | Scala | mpl-2.0 | 187 |
package com.viaden.crm.spark.experiments
import java.util.Date
import org.joda.time.format.DateTimeFormat
/**
* Created by remeniuk on 28.12.14.
*/
object Convertions {
private val MillisInDay = 86400000
val dateFormat = DateTimeFormat.forPattern("YYYY-MM-DD HH:mm:ss")
def dateToTimestamp(date: String) = da... | remeniuk/spark-experiments | src/main/scala/com/viaden/crm/spark/experiments/Convertions.scala | Scala | mit | 1,163 |
package com.twitter.finagle.mux.transport
import com.twitter.finagle.{Failure, FailureFlags}
import com.twitter.finagle.util.BufWriter
import com.twitter.io.Buf
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
class MuxFailureTest exte... | spockz/finagle | finagle-mux/src/test/scala/com/twitter/finagle/mux/transport/MuxFailureTest.scala | Scala | apache-2.0 | 1,659 |
object Test:
@annotation.tailrec
def sum(n: Int, acc: Int = 0): Int =
if n != 0 then return sum(n - 1, acc + n)
acc
@annotation.tailrec
def isEven(n: Int): Boolean =
if n != 0 && n != 1 then return isEven(n - 2)
if n == 1 then return false
true
@annotation.tailrec
def isEvenApply(n: I... | dotty-staging/dotty | tests/run/tailrec-return.scala | Scala | apache-2.0 | 1,753 |
/*
* 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 ... | aosagie/spark | sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingJoinSuite.scala | Scala | apache-2.0 | 30,132 |
/**
* Copyright 2013 Gianluca Amato <gamato@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, either version 3 o... | rubino22/JDBeta | core/src/main/scala/it/unich/jandom/ui/ObjectDomains.scala | Scala | lgpl-3.0 | 1,527 |
/**
* Licensed to Gravity.com under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Gravity.com licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this fil... | raisercostin/goose | src/main/scala/com/gravity/goose/text/StopWords.scala | Scala | apache-2.0 | 4,930 |
/*
* 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 ... | tejasapatil/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/Encoder.scala | Scala | apache-2.0 | 2,990 |
/***********************************************************************
* Copyright (c) 2013-2016 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is ... | mdzimmerman/geomesa | geomesa-convert/geomesa-convert-text/src/test/scala/org/locationtech/geomesa/convert/text/DelimitedTextConverterTest.scala | Scala | apache-2.0 | 16,615 |
/*
* Copyright 2016 University of Basel, Graphics and Vision Research Group
*
* 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
*
* Un... | unibas-gravis/scalismo-faces | src/main/scala/scalismo/faces/image/ImageBuffer.scala | Scala | apache-2.0 | 4,988 |
package net.magik6k.jliblxc.natives
import java.io.FileDescriptor
import net.magik6k.jliblxc.{Snapshot, BdevSpecs}
private[jliblxc] class NativeLxcContainerStatic {
@native def list(lxcpath: String): Array[String]
@native def listActive(lxcpath: String): Array[String]
@native def open(name: String, configPath:... | magik6k/jLibLXC | src/main/scala/net/magik6k/jliblxc/natives/NativeLxcContainer.scala | Scala | mit | 8,756 |
package com.twitter.finatra.kafkastreams.query
import com.twitter.finatra.kafkastreams.transformer.stores.internal.FinatraStoresGlobalManager
import com.twitter.finatra.streams.queryable.thrift.domain.ServiceShardId
import com.twitter.finatra.streams.queryable.thrift.partitioning.KafkaPartitioner
import com.twitter.fi... | twitter/finatra | kafka-streams/kafka-streams/src/main/scala/com/twitter/finatra/kafkastreams/query/QueryableFinatraKeyValueStore.scala | Scala | apache-2.0 | 2,835 |
/*
* 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 ... | wangmiao1981/spark | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/IntervalUtilsSuite.scala | Scala | apache-2.0 | 31,570 |
package io.flow.lint
import io.apibuilder.spec.v0.models._
import org.scalatest.funspec.AnyFunSpec
import org.scalatest.matchers.should.Matchers
class EventModelsSpec extends AnyFunSpec with Matchers {
private[this] val linter = linters.EventModels
private[this] def buildService(
fields: Seq[String],
at... | flowcommerce/api-lint | src/test/scala/io/flow/lint/EventModelsSpec.scala | Scala | mit | 3,313 |
/*
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... | zirpins/scalding | scalding-core/src/main/scala/com/twitter/scalding/Operations.scala | Scala | apache-2.0 | 19,140 |
package cz.kamenitxan.jakon.utils.security.oauth
import cz.kamenitxan.jakon.core.dynamic.{Get, Pagelet}
import cz.kamenitxan.jakon.logging.Logger
import cz.kamenitxan.jakon.utils.PageContext
import cz.kamenitxan.jakon.utils.Utils._
import cz.kamenitxan.jakon.webui.controller.pagelets.AbstractAdminPagelet
import cz.kam... | kamenitxan/Jakon | modules/backend/src/main/scala/cz/kamenitxan/jakon/utils/security/oauth/OauthLoginRouter.scala | Scala | bsd-3-clause | 1,184 |
package wakfutcp.protocol.messages.client
import wakfutcp.protocol.{ClientMessage, Codec}
final case class DeleteItemRequestMessage(
itemId: Long
) extends ClientMessage {
override val id = 5261
override val arch = 3
}
object DeleteItemRequestMessage {
import Codec._
import cats.syntax.invariant._
impli... | OpenWakfu/wakfutcp | protocol/src/main/scala/wakfutcp/protocol/messages/client/DeleteItemRequestMessage.scala | Scala | mit | 418 |
package com.github.distributed_stumps.stumps.message.provider
import akka.actor.ActorRef
import com.github.distributed_stumps.stumps.message.common._
case class Register(location: Location, resource: Resource, heartBeatListener: ActorRef)
| distributed-stumps/stumps-messages | src/main/scala/com/github/distributed_stumps/stumps/message/provider/Register.scala | Scala | apache-2.0 | 241 |
// Code generated by sbt-mavgen. Manual edits will be overwritten
package scavlink.message.ASLUAV
import scavlink.message._
import scavlink.message.enums._
/**
* Voltage and current sensor data
* @param adc121VspbVolt Power board voltage sensor reading in volts
* @param adc121CspbAmp Power board current sensor rea... | nickolasrossi/scavlink | src/main/scala/scavlink/message/ASLUAV/Messages.scala | Scala | mit | 5,696 |
/*§
===========================================================================
Chronos
===========================================================================
Copyright (C) 2015-2016 Gianluca Costa
===========================================================================
Licensed under the Apache Lic... | giancosta86/Chronos | src/main/scala/info/gianlucacosta/chronos/interpreter/io/BasicInput.scala | Scala | apache-2.0 | 2,194 |
package com.twitter.inject.internal
import scala.collection.generic.CanBuildFrom
import scala.collection.mutable.{HashSet => MutableHashSet}
import scala.language.higherKinds
private[inject] object iterable {
implicit class RichIterable[Elem, From[Elem] <: Iterable[Elem]](val self: From[Elem])
extends AnyVal... | twitter/util | util-inject/src/main/scala/com/twitter/util/inject/internal/iterable.scala | Scala | apache-2.0 | 912 |
package com.github.j5ik2o.spetstore
import akka.actor.{ ActorPath, ActorSystem }
import akka.http.scaladsl.Http
import akka.http.scaladsl.server.Directives._
import akka.stream.{ ActorMaterializer, Materializer }
import akka.util.Timeout
import com.github.j5ik2o.spetstore.adaptor.aggregate.{ CustomerMessageBroker, Ite... | j5ik2o/spetstore-cqrs-es-akka | akka-http-application/src/main/scala/com/github/j5ik2o/spetstore/Main.scala | Scala | mit | 1,815 |
/*
* Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com>
*/
package play.it.action
import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import play.api.mvc._
import play.api.test.{ FakeRequest, PlaySpecification }
import scala.concurrent.Future
class ContentNegotiationSpec extends Play... | Shruti9520/playframework | framework/src/play-integration-test/src/test/scala/play/it/action/ContentNegotiationSpec.scala | Scala | apache-2.0 | 1,250 |
/*
* 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 ... | jinglining/flink | flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/runtime/aggfunctions/MaxWithRetractAggFunctionTest.scala | Scala | apache-2.0 | 8,670 |
package com.twitter.finagle.exp.zookeeper.session
import com.twitter.finagle.exp.zookeeper.client.ZkClient
import com.twitter.finagle.exp.zookeeper.session.Session.{PingSender, States}
import com.twitter.finagle.exp.zookeeper.{ConnectRequest, ConnectResponse, ReplyHeader, WatchEvent}
import com.twitter.util.{Duration,... | yonglehou/finagle-zookeeper | core/src/main/scala/com/twitter/finagle/exp/zookeeper/session/SessionManager.scala | Scala | apache-2.0 | 5,557 |
/**
* Swaggy Jenkins
* Jenkins API clients generated from Swagger / Open API specification
*
* The version of the OpenAPI document: 1.1.2-pre.0
* Contact: blah@cliffano.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*/
package... | cliffano/swaggy-jenkins | clients/scalatra/generated/src/main/scala/org/openapitools/server/model/PipelineRunNode.scala | Scala | mit | 628 |
package core.authentication
import akka.util.ByteString
import redis.ByteStringFormatter
object UserSerializer {
implicit val byteStringFormatter = new ByteStringFormatter[Identity.User] {
def serialize(data: Identity.User): ByteString = {
ByteString(
data.id + "|" + data.role
)
}
d... | piobab/akka-http-rest-api | src/main/scala/core/authentication/UserSerializer.scala | Scala | mit | 473 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | goldmedal/spark | sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcQuerySuite.scala | Scala | apache-2.0 | 26,625 |
package com.payalabs.scalajs.react.bridge.elements
import com.payalabs.scalajs.react.bridge.ReactBridgeComponent
import japgolly.scalajs.react.Callback
import scala.scalajs.js
/**
* Bridge to [ReactMediumEditor](https://github.com/wangzuo/react-medium-editor)'s component
*/
case class ReactMediumEditor(id: js.Unde... | payalabs/scalajs-react-bridge-example | src/main/scala/com/payalabs/scalajs/react/bridge/elements/ReactMediumEditor.scala | Scala | mit | 771 |
package scala.reflect.macros
package contexts
import scala.tools.nsc.reporters.StoreReporter
trait Parsers {
self: Context =>
import global._
def parse(code: String) = {
val sreporter = new StoreReporter()
val oldReporter = global.reporter
try {
global.reporter = sreporter
val parser = ... | felixmulder/scala | src/compiler/scala/reflect/macros/contexts/Parsers.scala | Scala | bsd-3-clause | 661 |
package teststate.external
import teststate.Exports._
case class X1(i: Int)
case class X2(i: Int)
case class X3(i: Int)
object X3 {
implicit def displayX3: Display[X3] = Display("X3=" + _.i)
}
| japgolly/test-state | core/shared/src/test/scala/teststate/external/Xs.scala | Scala | apache-2.0 | 198 |
package scala.offheap
import scala.language.experimental.{macros => canMacro}
import offheap.internal.macros
import offheap.internal.Sanitizer
import offheap.internal.Checked
/** Family of scoped memory allocators. Allocated memory
* is available as long as execution is still in given
* region scope and is cleane... | ignasi35/scala-offheap | core/src/main/scala/offheap/Region.scala | Scala | bsd-3-clause | 1,702 |
/******************************************************************************************************************\\
* Rapture Core, version 2.0.0. Copyright 2010-2015 Jon Pretty, Propensive Ltd. *
* ... | utaal/rapture-core | src/core.scala | Scala | apache-2.0 | 2,140 |
/*
* Copyright (C) 2017 Radicalbit
*
* This file is part of flink-JPMML
*
* flink-JPMML is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) an... | francescofrontera/flink-jpmml | flink-jpmml-examples/src/main/scala/io/radicalbit/examples/util/DynamicParams.scala | Scala | agpl-3.0 | 2,465 |
/*
* 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/frsse2008/boxes/ACQ8999.scala | Scala | apache-2.0 | 824 |
/*
* 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 ... | starpit/openwhisk | tests/src/test/scala/org/apache/openwhisk/core/database/memory/MemoryArtifactStoreTests.scala | Scala | apache-2.0 | 1,177 |
package net.sansa_stack.rdf.flink.io
import org.apache.flink.api.scala.ExecutionEnvironment
import org.apache.jena.riot.Lang
import org.scalatest.FunSuite
class FlinkRDFLoadingTests extends FunSuite {
val env = ExecutionEnvironment.getExecutionEnvironment
test("loading N-Triples file into DataSet should match")... | SANSA-Stack/Spark-RDF | sansa-rdf-flink/src/test/scala/net/sansa_stack/rdf/flink/io/FlinkRDFLoadingTests.scala | Scala | gpl-3.0 | 1,009 |
/**
* Created on: Feb 22, 2013
*/
package com.tubros.constraints.core.internal
package tree
import Predef.{
any2stringadd => _,
_
}
import scalaz._
import org.junit.runner.RunWith
import org.scalatest._
import org.scalatest.junit.JUnitRunner
import com.tubros.constraints.api._
import com.tubros.constraints.api... | osxhacker/smocs | smocs-core/src/test/scala/com/tubros/constraints/core/internal/tree/TreeFiniteDomainSolverSpec.scala | Scala | bsd-3-clause | 4,959 |
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.