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 |
|---|---|---|---|---|---|
/**
* Copyright (C) 2007 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... | ajw625/orbeon-forms | src/main/scala/org/orbeon/oxf/xforms/library/XFormsEnvFunctions.scala | Scala | lgpl-2.1 | 2,284 |
package com.lendap.spark.lsh
/**
* Created by maytekin on 06.08.2015.
*/
import org.apache.hadoop.fs.Path
import org.apache.spark.SparkContext
import org.apache.spark.mllib.linalg.SparseVector
import org.apache.spark.rdd.RDD
import scala.collection.mutable.ListBuffer
import org.apache.spark.mllib.util.Saveable
imp... | rayyildiz/lsh-spark | src/main/scala/com/lendap/spark/lsh/LSHModel.scala | Scala | apache-2.0 | 6,557 |
/*
* 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 ... | shaneknapp/spark | sql/core/src/test/scala/org/apache/spark/sql/execution/columnar/InMemoryColumnarQuerySuite.scala | Scala | apache-2.0 | 23,272 |
package filodb.prometheus.ast
import filodb.query.{Aggregate, AggregationOperator, PeriodicSeriesPlan}
trait Aggregates extends Vectors with TimeUnits with Base {
sealed trait AggregateGrouping {
def labels: Seq[String]
}
case class Without(labels: Seq[String]) extends AggregateGrouping
case class By(... | tuplejump/FiloDB | prometheus/src/main/scala/filodb/prometheus/ast/Aggregates.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 may ... | stanzhai/spark | resource-managers/mesos/src/main/scala/org/apache/spark/deploy/mesos/config.scala | Scala | apache-2.0 | 3,469 |
package com.twitter.finagle.scribe
import com.twitter.finagle.{Service, SimpleFilter}
import com.twitter.finagle.thrift.scribe.thriftscala.Scribe.Log
import com.twitter.util.Future
private[scribe] class ScribeMetricsFilter(stats: ScribeStats)
extends SimpleFilter[Log.Args, Log.SuccessType] {
def apply(
req:... | twitter/finagle | finagle-scribe/src/main/scala/com/twitter/finagle/scribe/ScribeMetricsFilter.scala | Scala | apache-2.0 | 444 |
/*
* 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 ... | haohui/flink | flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/dataset/DataSetCalc.scala | Scala | apache-2.0 | 4,162 |
package s99.p14
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import org.junit.runner.RunWith
import P14._
@RunWith(classOf[JUnitRunner])
class P14Suite extends FunSuite {
test("Duplicate on empty list returns empty list") {
val input = List()
val answer = input
assert(answer ===... | izmailoff/scala-s-99 | src/test/scala/s99/p14/P14Suite.scala | Scala | apache-2.0 | 1,015 |
package colossus
package controller
import akka.util.ByteString
import colossus.testkit._
import core._
import scala.util.{Try, Failure, Success}
class InputControllerSpec extends ColossusSpec with CallbackMatchers{
import TestController.createController
"Input Controller" must {
"decode a stream messag... | zgagnon/colossus | colossus-tests/src/test/scala/colossus/controller/InputControllerSpec.scala | Scala | apache-2.0 | 3,718 |
package com.sksamuel.elastic4s.testkit
import com.sksamuel.elastic4s.http.ElasticClient
trait ClientProvider {
def client: ElasticClient
}
| Tecsisa/elastic4s | elastic4s-testkit/src/main/scala/com/sksamuel/elastic4s/testkit/ClientProvider.scala | Scala | apache-2.0 | 143 |
package com.sfxcode.sapphire.extension.skin
import javafx.scene.control.SkinBase
import com.sfxcode.sapphire.core.control.FXListCellFactory
import com.sfxcode.sapphire.extension.control.DataListView
import javafx.scene.control._
import javafx.scene.layout.{ HBox, VBox }
class DataListViewSkin[S <: AnyRef](view: DataLi... | sfxcode/sapphire-extension | src/main/scala/com/sfxcode/sapphire/extension/skin/DataListViewSkin.scala | Scala | apache-2.0 | 1,696 |
/**
Copyright (C) 2011-2014 beamly Ltd. http://beamly.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... | beamly/beamly.core.lang | src/main/scala/beamly/core/lang/future/MaybeFuture.scala | Scala | apache-2.0 | 1,980 |
package com.ajjpj.adiagram_.ui.fw
trait Command {
def name: String
def isNop: Boolean
def undo(): Unit
def redo(): Unit
}
class UndoRedoStack {
private var undoStack: List[Command] = Nil
private var redoStack: List[Command] = Nil
def clear() {
undoStack = Nil
redoStack = Nil
}
def nextU... | arnohaase/a-diagram | src/main/scala-old/com/ajjpj/adiagram_/ui/fw/command.scala | Scala | apache-2.0 | 1,029 |
/*
* Copyright (c) 2017. Yuriy Stul
*/
package com.stulsoft.chart.util
import org.jfree.data.xy.XYSeries
import scala.util.Random
/**
* @author Yuriy Stul
*/
object DataGenerator {
/**
* Returns XYSeries
*
* @param key the series's key
* @param min minimal value
* @param max max... | ysden123/poc | charts/src/main/scala/com/stulsoft/chart/util/DataGenerator.scala | Scala | mit | 691 |
/*
* 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 ... | saturday-shi/spark | mllib/src/main/scala/org/apache/spark/ml/classification/OneVsRest.scala | Scala | apache-2.0 | 15,166 |
package com.ubirch.util.elasticsearch.client.binary.storage
import com.ubirch.util.elasticsearch.client.binary.storage.base.{ESClient, ESBulkStorageBase}
import org.elasticsearch.client.transport.TransportClient
/**
* author: cvandrei
* since: 2017-02-24
*/
trait ESBulkStorage extends ESBulkStorageBase {
ov... | ubirch/ubirch-scala-utils | elasticsearch-client-binary/src/main/scala/com/ubirch/util/elasticsearch/client/binary/storage/ESBulkStorage.scala | Scala | apache-2.0 | 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 ... | TiVo/samza | samza-core/src/main/scala/org/apache/samza/system/SystemConsumers.scala | Scala | apache-2.0 | 13,421 |
package playlastik.dslHelper
import com.sksamuel.elastic4s.ElasticDsl._
import com.sksamuel.elastic4s.Implicits._
import playlastik.method.Post
object SearchHelper {
val action = "_search"
def getRequestInfo(serviceUrl: String, req: SearchDefinition): RequestInfo = {
val indices = if (req.indices.isEmpty || ... | fmasion/playLastik | project-code/app/playlastik/dslHelper/SearchHelper.scala | Scala | apache-2.0 | 878 |
package hr.element.beepo
package Model.postgres
import hr.ngs.patterns._
import org.pgscala.converters._
import org.pgscala.util._
import hr.ngs.patterns._
object SmsIptRequestConverter {
private val logger = org.slf4j.LoggerFactory.getLogger(getClass)
def fromPGString(record: String, locator: IServiceLocator)... | element-doo/beepo | code/scala/model-services-generated/src/main/scala/hr/element/beepo/Model/postgres/SmsIptRequestConverter.scala | Scala | bsd-3-clause | 8,969 |
/* Code Pulse: a real-time code coverage tool, for more information, see <http://code-pulse.com/>
*
* Copyright (C) 2014-2017 Code Dx, Inc. <https://codedx.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 ... | secdec/codepulse | hq/src/main/scala/com/secdec/bytefrog/hq/monitor/HealthMonitor.scala | Scala | apache-2.0 | 3,750 |
package com.identityblitz.login
import com.identityblitz.login.FlowAttrName._
import com.identityblitz.login.Platform.Platform
import com.identityblitz.login.transport.{DiscardingCookie, OutboundTransport, Cookie, InboundTransport}
import org.scalatest.{FlatSpec, Matchers}
class LoginFlowTest extends FlatSpec with Ma... | brainysmith/login-framework | src/test/scala/com/identityblitz/login/LoginFlowTest.scala | Scala | mit | 2,185 |
package unfiltered
package specs2
import java.util.concurrent.{Executors, ThreadFactory}
import okhttp3._
import okio.ByteString
import org.specs2.specification.BeforeAfterAll
import unfiltered.request.Method
import scala.language.implicitConversions
trait Hosted extends BeforeAfterAll {
val port = unfiltered.uti... | omarkilani/unfiltered | specs2/src/main/scala/Hosted.scala | Scala | mit | 4,928 |
package com.twitter.finagle.filter
import com.twitter.finagle.Stack.{Module1, Role}
import com.twitter.finagle._
import com.twitter.finagle.param.Stats
import com.twitter.finagle.stats.{StatsReceiver, Verbosity}
import com.twitter.finagle.tracing.{Trace, Tracing}
import com.twitter.util.{Future, Return, Try}
/**
* A... | twitter/finagle | finagle-core/src/main/scala/com/twitter/finagle/filter/PayloadSizeFilter.scala | Scala | apache-2.0 | 3,174 |
package com.tomogle.fizzbuzz
object FizzBuzz {
def main(args: Array[String]) {
val fizzBuzzer = new BasicExtensibleFizzBuzzer(
Seq(Mappings.divisibleBy3And5, Mappings.divisibleBy3, Mappings.divisibleBy5),
_.toString
)
fizzBuzzer.run(1 to 100) foreach println
}
trait FizzBuzzer[A,B] {
... | tom-ogle/scala-scratch-code | src/main/scala/com/tomogle/fizzbuzz/FizzBuzz.scala | Scala | mit | 1,709 |
/*
* 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... | jfeltesse-mdsol/zipkin | zipkin-collector-service/src/main/scala/com/twitter/zipkin/collector/builder/ZipkinServerBuilder.scala | Scala | apache-2.0 | 2,585 |
package functional
import java.sql.Timestamp
import java.util.UUID
import com.mohiva.play.silhouette.api.LoginInfo
import com.mohiva.play.silhouette.impl.authenticators.CookieAuthenticator
import com.mohiva.play.silhouette.impl.providers.CredentialsProvider
import com.mohiva.play.silhouette.test.{FakeEnvironment, _}
... | BBK-SDP-2015-jtomli03/Morphidose2 | test/functional/PrescriptionControllerSpec.scala | Scala | apache-2.0 | 51,242 |
/*
* 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 ... | jongwook/incubator-s2graph | s2counter_loader/src/main/scala/org/apache/s2graph/counter/loader/core/CounterEtlFunctions.scala | Scala | apache-2.0 | 3,801 |
package com.sksamuel.elastic4s.http
import scala.concurrent.{ExecutionContext, Future, Promise}
import scala.language.higherKinds
trait Executor[F[_]] {
def exec(client: HttpClient, request: ElasticRequest): F[HttpResponse]
}
object Executor {
def apply[F[_]: Executor](): Executor[F] = implicitly[Executor[F]]
... | Tecsisa/elastic4s | elastic4s-http/src/main/scala/com/sksamuel/elastic4s/http/Executor.scala | Scala | apache-2.0 | 839 |
package org.mitre.mandolin.mx
import org.mitre.mandolin.optimize.{ Updater, LossGradient, TrainingUnitEvaluator }
import org.mitre.mandolin.mlp.MMLPFactor
import ml.dmlc.mxnet.{ EpochEndCallback, Uniform, Initializer, Xavier, Model, Shape, FeedForward,
Symbol, Context, Optimizer, NDArray, DataIter, DataBatch, Accur... | project-mandolin/mandolin | mandolin-mx/src/main/scala/org/mitre/mandolin/mx/MxNetEvaluator.scala | Scala | apache-2.0 | 6,833 |
package com.blogspot.nurkiewicz.akka.demo.fs
import java.nio.file._
import java.util.concurrent.TimeUnit
import akka.actor.{Props, ActorSystem}
import com.weiglewilczek.slf4s.Logging
/**
* @author Tomasz Nurkiewicz
* @since 3/30/13, 1:13 PM
*/
object WatchMain extends App with Logging {
val system = ActorSystem("... | nurkiewicz/learning-akka | src/main/scala/com/blogspot/nurkiewicz/akka/demo/fs/WatchMain.scala | Scala | apache-2.0 | 519 |
package me.fornever.platonus
import scala.util.Random
import scala.collection.mutable
object Network {
def apply(): Network = Network(1)
def apply(depth: Int): Network = Network(depth, mutable.Map[Vector[Word], mutable.Map[Word, Int]]())
def apply(depth: Int, data: mutable.Map[Vector[Word], mutable.Map[Word, In... | ForNeVeR/platonus | src/main/scala/me/fornever/platonus/Network.scala | Scala | mit | 3,421 |
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs
// License: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.server
import akka.actor._
import akka.event.LoggingReceive
import org.ensime.api._
import org.ensime.core._
//import shapeless._
/**
* Accepts RpcRequestEnvelope and re... | VC1995/ensime-server | server/src/main/scala/org/ensime/server/ConnectionHandler.scala | Scala | gpl-3.0 | 1,560 |
package models.quiz
import com.artclod.mathml.scalar.MathMLElem
import com.artclod.slick.NumericBoolean
import models.support.HasOrder
import models._
import play.twirl.api.Html
case class AnswerPartFunction(// =================== Ids ====================
id: AnswerPartId, answerSectionI... | kristiankime/calc-tutor | app/models/quiz/AnswerPartFunction.scala | Scala | mit | 717 |
/*
* 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... | Myllyenko/incubator-toree | communication/src/main/scala/org/apache/toree/communication/actors/DealerSocketActor.scala | Scala | apache-2.0 | 1,864 |
package com.mattwittmann.scabasic
class Interpreter {
def interpret(line: String): Unit = {
}
}
| matt-wittmann/sca_basic | src/main/scala/com/mattwittmann/scabasic/Interpreter.scala | Scala | mit | 101 |
import com.mojolly.scalate.ScalatePlugin.ScalateKeys._
import com.mojolly.scalate.ScalatePlugin._
import org.scalatra.sbt._
import sbt.Keys._
import sbt._
//noinspection ScalaFileName
object ScabBuild extends Build {
val Organization = "com.robbyp"
val Name = "scab"
val Version = "0.1.0-SNAPSHOT"
val ScalaVers... | robpurcell/scab | project/build.scala | Scala | apache-2.0 | 2,026 |
// Project: angulate2 (https://github.com/jokade/angulate2)
// Module: @angular/core/Renderer
// Copyright (c) 2016 Johannes.Kastner <[email protected]>
// Distributed under the MIT License (see included LICENSE file)
package angulate2.core
import scala.scalajs.js
import scala.scalajs.js.anno... | jokade/angulate2 | bindings/src/main/scala/angulate2/core/Renderer.scala | Scala | mit | 2,713 |
package org.jetbrains.plugins.scala.codeInsight.intention.format
import org.jetbrains.plugins.scala.format.{FormattedStringFormatter, StringConcatenationParser}
/**
* Pavel Fatin
*/
class ConvertStringConcatenationToFormattedString extends AbstractFormatConversionIntention(
"Convert to formatted string", StringC... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/codeInsight/intention/format/ConvertStringConcatenationToFormattedString.scala | Scala | apache-2.0 | 384 |
/*
* 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-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/JoinITCase.scala | Scala | apache-2.0 | 37,510 |
package com.scalableminds.webknossos.datastore.models
import com.github.ghik.silencer.silent
import com.scalableminds.util.geometry.{BoundingBox, Vec3Double, Vec3Int}
import com.scalableminds.webknossos.datastore.models.datasource.DataSetViewConfiguration.DataSetViewConfiguration
import com.scalableminds.webknossos.da... | scalableminds/webknossos | webknossos-datastore/app/com/scalableminds/webknossos/datastore/models/datasource/DataSource.scala | Scala | agpl-3.0 | 2,097 |
/**
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*... | SriramZafin/employee-service-server-client | src/main/scala/io/swagger/client/model/Employee.scala | Scala | apache-2.0 | 1,012 |
package controllers.security
import com.lvxingpai.yunkai.{ UserInfoProp, NotFoundException, UserInfo }
import Security.AuthInfo
import core.security.UserRole
import play.api.inject.BindingKey
import play.api.mvc.Request
import play.api.{ Configuration, Play }
import scala.collection.JavaConversions._
import scala.con... | Lvxingpai/Hanse | app/controllers/security/TokenAuthenticator.scala | Scala | apache-2.0 | 2,699 |
package edu.cmu.lti.oaqa.cse.scala.configuration
object Parameters {
sealed trait Parameter
case class IntegerParameter(value: Int) extends Parameter
case class StringParameter(value: String) extends Parameter
case class DoubleParameter(value: Double) extends Parameter
case class BooleanParameter(value: Boolean) exte... | oaqa/bagpipes-old | src/main/scala/edu/cmu/lti/oaqa/cse/scala/configuration/Parameters.scala | Scala | apache-2.0 | 904 |
/*
* Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com>
*/
import sbt._
import Keys._
import sbt.File
object Generators {
// Generates a scala file that contains the play version for use at runtime.
def PlayVersion(version: String, scalaVersion: String, sbtVersion: String, dir: File): Seq[File] = {
... | jyotikamboj/container | pf-framework/project/Tasks.scala | Scala | mit | 1,157 |
package io.skysail.server.app.events
import io.skysail.domain.RequestEvent
import io.skysail.domain.resources.ListResource
class EventsResource extends ListResource[EventApplication, Event] {
override def getList(requestEvent: RequestEvent): List[Event] = {
List()//getApplication().eventsService.list
}
}
| evandor/skysail-server | skysail.server.app.events/src/io/skysail/server/app/events/EventsResource.scala | Scala | apache-2.0 | 318 |
/***********************************************************************
* 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-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/process/knn/TouchingGeoHashesTest.scala | Scala | apache-2.0 | 2,539 |
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2015-2021 Andre White.
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
... | adarro/ddo-calc | subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/enhancement/enhancements/WeakeningMixtureCold.scala | Scala | apache-2.0 | 1,068 |
/* Copyright 2017-19, Emmanouil Antonios Platanios. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless ... | eaplatanios/tensorflow_scala | modules/api/src/main/scala/org/platanios/tensorflow/api/implicits/helpers/Zero.scala | Scala | apache-2.0 | 6,195 |
package creational
/**
* Lazy values in Scala can hold null values. Access to lazy value is thread-safe.
*
* @author Daniel Leon
*/
object LazyInit {
def main(args: Array[String]) {
lazy val x = {
print("(computing x in scala) ")
42
}
println(x)
}
}
| LeonDaniel/DesignPatterns | ScalaPatterns/src/main/scala/creational/LazyInit.scala | Scala | lgpl-3.0 | 285 |
//
// Copyright (c) 2014 Mirko Nasato
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... | mirkonasato/jersik | scala/jersik-scala-testservice/src/main/scala/io/encoded/jersik/testservice/TestServiceServlet.scala | Scala | apache-2.0 | 910 |
package org.clulab.utils
import scala.language.postfixOps
/**
* Created by dfried on 5/22/14
*/
object EvaluationStatistics {
case class Table(var tp: Int, var fp: Int, var tn: Int, var fn: Int) {
def accuracy = (tp + tn).toDouble / (tp + fp + tn + fn)
def precision = tp.toDouble / (tp + fp)
def re... | sistanlp/processors | main/src/main/scala/org/clulab/utils/EvaluationStatistics.scala | Scala | apache-2.0 | 6,702 |
// Project: surfice-docdb
// Module: common / js
// Description: A PropsDoc implementation based on a js.Dictionary
// Copyright (c) 2016. Distributed under the MIT License (see included LICENSE file).
package surfice.docdb
import scala.scalajs.js
/**
* A [[PropsDoc]] that wraps a [[js.Dictionary]].
*
* ... | jokade/surfice-docdb | js/src/main/scala/surfice/docdb/DictionaryPropsDoc.scala | Scala | mit | 862 |
/**
* Copyright (C) 2014 MediaMath <http://www.mediamath.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 b... | MediaMath/play-dynamodb | src/main/scala/play/api/libs/dynamodb/Reads.scala | Scala | apache-2.0 | 6,975 |
package polystyrene.core
class Coord{
def equals(c : Coord) : Boolean = {
true
}
def copy : Coord = {
println("Pouet")
new Coord
}
}
| HKervadec/Polystyrene | src/polystyrene/core/Coord.scala | Scala | gpl-2.0 | 146 |
/***********************************************************************
* 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-arrow/geomesa-arrow-gt/src/main/scala/org/locationtech/geomesa/arrow/vector/SimpleFeatureVector.scala | Scala | apache-2.0 | 11,027 |
package org.http4s
package headers
import cats.data.NonEmptyList
import org.http4s.parser.HttpHeaderParser
import org.http4s.util.{Renderable, Writer}
// See https://tools.ietf.org/html/rfc7233
object Range extends HeaderKey.Internal[Range] with HeaderKey.Singleton {
def apply(unit: RangeUnit, r1: SubRange, rs: S... | ZizhengTai/http4s | core/src/main/scala/org/http4s/headers/Range.scala | Scala | apache-2.0 | 1,465 |
import sbt._
object PreviousVersion {
val previousVersion = settingKey[String]("The previous version of the library, for mima checks")
}
| socrata-platform/socrata-curator-utils | project/PreviousVersion.scala | Scala | apache-2.0 | 140 |
/**
* This file is part of the TA Buddy project.
* Copyright (c) 2014 Alexey Aksenov [email protected]
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Global License version 3
* as published by the Free Software Foundation with the addition of t... | digimead/digi-TABuddy-desktop | part-logic/src/main/scala/org/digimead/tabuddy/desktop/logic/ui/support/encryption/BaseNNAdapter.scala | Scala | agpl-3.0 | 9,303 |
/**
* The MIT License (MIT)
* <p/>
* Copyright (c) 2016 ScalateKids
* <p/>
* 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 ... | ScalateKids/Actorbase-Client | src/main/scala/com/actorbase/cli/models/CommandReceiver.scala | Scala | mit | 20,465 |
/*
* Copyright © 2015 Reactific Software LLC. All Rights Reserved.
*
* 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 us... | reactific/RxMongo | messages/src/main/scala/rxmongo/messages/cmds/DatabaseCommands.scala | Scala | mit | 9,672 |
/*
* Copyright (c) 2015 Robert Conrad - All Rights Reserved.
* Unauthorized copying of this file, via any medium is strictly prohibited.
* This file is proprietary and confidential.
* Last modified by rconrad, 1/4/15 4:20 PM
*/
package base.socket.api.impl
import base.common.lib.{ Actors, Dispatchable }
import b... | robconrad/base-api | project-socket/src/test/scala/base/socket/api/impl/SocketApiServiceImplTest.scala | Scala | mit | 1,002 |
/**
* 扩展那个可序列化的Person类,让它能以一个集合保存某个人的朋友信息。
* 构造出一些Person对象,让他们中的一些人成为朋友,然后将Array[Person]保存到文件。将这个数组从文件中重新读出来,校验朋友关系是否完好
*/
import collection.mutable.ArrayBuffer
import java.io.{ObjectInputStream, FileOutputStream, FileInputStream, ObjectOutputStream}
class Person(var name:String) extends Serializable{
val friend... | vernonzheng/scala-for-the-Impatient | src/Chapter09/exercise10.scala | Scala | mit | 1,136 |
/**
* 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... | KevinLiLu/kafka | core/src/main/scala/kafka/common/UnexpectedAppendOffsetException.scala | Scala | apache-2.0 | 1,334 |
package com.joshcough.minecraft
import org.bukkit.Server
import org.bukkit.entity.Player
import org.bukkit.event.{Listener, Event}
import org.bukkit.plugin.java.JavaPlugin
import util.Try
import java.util.logging.{Level, Logger}
import javax.persistence.PersistenceException
/**
* The base class that helps make writi... | JunctionAt/JunctionAPI | src/main/scala/com/joshcough/minecraft/ScalaPlugin.scala | Scala | agpl-3.0 | 7,639 |
// lchannels - session programming in Scala
// Copyright (c) 2016, Alceste Scalas and Imperial College London
// 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 ... | scribble/scribble.github.io | src/main/jbake/assets/docs/lchannels/examples/src/main/scala/lchannels/examples/sleepingbarber/Demo.scala | Scala | apache-2.0 | 2,368 |
package im.actor.server.activation.gate
import scala.concurrent.{ ExecutionContext, Future }
import scalaz.{ -\/, \/, \/- }
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.HttpMethods.{ GET, POST }
import akka.http.scaladsl.model.{ HttpRequest, Uri }
import akka.http.scala... | JamesWatling/actor-platform | actor-server/actor-activation/src/main/scala/im/actor/server/activation/gate/GateCodeActivation.scala | Scala | mit | 2,749 |
package scalariform.lexer
sealed trait TagState
case object InStartTag extends TagState
case object InEndTag extends TagState
case object Normal extends TagState
| mdr/scalariform | scalariform/src/main/scala/scalariform/lexer/TagState.scala | Scala | mit | 164 |
package be.mygod.view
import android.animation.{Animator, AnimatorListenerAdapter}
import android.content.Context
import android.view.View
/**
* @author Mygod
*/
object AnimationHelper {
def crossFade(context: Context, from: View, to: View) {
def shortAnimTime = context.getResources.getInteger(android.R.integ... | Mygod/mygod-lib-android | src/main/scala/be/mygod/view/AnimationHelper.scala | Scala | gpl-3.0 | 655 |
/*
* Copyright (c) 2018. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
* Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
* Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
* Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagi... | BiyuHuang/CodePrototypesDemo | demo/ScalaDemo/src/main/scala/com/wallace/demo/app/utils/FtpUtils.scala | Scala | apache-2.0 | 2,620 |
/*
* Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com>
*/
package scalaguide.http.errorhandling
import play.api.inject.guice.GuiceApplicationBuilder
import play.api.mvc.Action
import play.api.test._
import scala.reflect.ClassTag
class ScalaErrorHandling extends PlaySpecification with WsTestClient ... | wsargent/playframework | documentation/manual/working/scalaGuide/main/http/code/ScalaErrorHandling.scala | Scala | apache-2.0 | 2,921 |
package com.rayrobdod.script
package parser
import java.io.{StringWriter, StringReader}
import scala.collection.immutable.{Seq, Set, Map}
import com.codecommit.antixml.{Elem, Selector, Text,
QName, Node, Attributes => XmlAttrs, XML}
import org.scalatest.{FunSuite, FunSpec}
import org.scalatest.prop.PropertyChecks
i... | rayrobdod/script | src/test/scala/com/rayrobdod/script/AggregateScriptFromXmlTest.scala | Scala | bsd-3-clause | 1,349 |
/*
* Copyright 2014 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... | bpburns/spark-kernel | kernel/src/test/scala/integration/security/SignatureManagerActorSpecForIntegration.scala | Scala | apache-2.0 | 3,978 |
package com.github.blemale.fuse
import java.time.temporal.ChronoUnit.SECONDS
import java.time.{ Duration, Instant, ZoneId }
import java.util.Optional
import java.util.concurrent.{ CompletableFuture, CountDownLatch, TimeUnit }
import java.util.function.Supplier
import com.github.blemale.fuse.CircuitBreaker.CircuitBrea... | blemale/fuse | core/src/test/scala/com/github/blemale/fuse/CircuitBreakerSpec.scala | Scala | apache-2.0 | 3,682 |
/*
* Copyright (c) 2014-2014 Erik van Oosten All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless req... | erikvanoosten/otagolog | src/main/scala/nl/grons/otagolog/shared/config/ConfigurationDefaults.scala | Scala | apache-2.0 | 822 |
package jp.kenkov.smt.ibmmodel
import scala.collection.mutable.{Map => MMap}
import jp.kenkov.smt.{_}
abstract class IBMModel {
// def train: MMap[(TargetWord, SourceWord), Double]
def sourceKeys(tCorpus: TokenizedCorpus): Set[SourceWord] = {
var fKeys: Set[SourceWord] = Set()
tCorpus.foreach {
ca... | kenkov/smtscala | src/main/scala/jp/kenkov/smt/ibmmodel/IBMModel.scala | Scala | mit | 9,690 |
package net.technowizardry.xmpp.auth
import net.technowizardry.xmpp.messages._
import net.technowizardry.xmpp.XmppConnection
class XmppAuthenticator(connection : XmppConnection, username : String, password : String) {
var authhandlers : Map[String, () => Unit] = Map()
var strategy : AuthStrategy = _
authha... | ajacques/XmppClient | SeniorProject/src/net/technowizardry/xmpp/auth/XmppAuthenticator.scala | Scala | mit | 1,258 |
/*
* 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/test/scala/org/apache/spark/rpc/netty/InboxSuite.scala | Scala | apache-2.0 | 4,764 |
import org.scalacheck.Gen
import org.scalacheck.Gen.{someOf, oneOf, const, resultOf, nonEmptyListOf,
identifier, frequency}
import org.scalacheck.Arbitrary.arbitrary
import org.scalacheck.commands.Commands
import scala.util.{Try, Success}
import scala.collection.immutable.Map
import com.redis.RedisClient
object C... | jedws/scalacheck | examples/commands-redis/src/test/scala/CommandsRedis.scala | Scala | bsd-3-clause | 5,540 |
///////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2010 Travis Brown, The University of Texas at Austin
//
// 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 ... | utcompling/fieldspring | src/main/scala/opennlp/fieldspring/tr/app/ReprocessTrApp.scala | Scala | apache-2.0 | 1,771 |
package net.scalaleafs.sample
import spray.json.{JsString, JsValue, RootJsonFormat, DefaultJsonProtocol}
import org.joda.time.DateTime
import org.joda.time.format.ISODateTimeFormat
object Calendar2JsonProtocol extends DefaultJsonProtocol {
implicit val eventFormat = jsonFormat7(Event)
implicit object JodaTimeJs... | scalastuff/scalaleafs | sample/src/main/scala/net/scalaleafs/sample/Calendar2JsonProtocol.scala | Scala | apache-2.0 | 583 |
package com.arcusys.valamis.certificate.service
import com.arcusys.valamis.certificate.model.{CertificateState, UserStatusHistory}
import com.arcusys.valamis.certificate.storage.schema.{CertificateHistoryTableComponent, UserStatusHistoryTableComponent}
import com.arcusys.valamis.persistence.common.SlickProfile
import ... | arcusys/Valamis | valamis-certificate/src/main/scala/com/arcusys/valamis/certificate/service/UserStatusHistoryServiceImpl.scala | Scala | gpl-3.0 | 2,769 |
package dk.tennisprob.set
import dk.tennisprob.TennisProbFormulaCalc
import dk.tennisprob.tiebreak.GenericTiebreakProb
import dk.tennisprob.game.GenericGameProb
import scala.annotation.tailrec
object GenericSetProb extends SetProb {
def prob(p1AceProb: Double, p1PointProb: Double, p2AceProb: Double, p2Poi... | danielkorzekwa/tennis-probability-calculator | src/main/scala/dk/tennisprob/set/GenericSetProb.scala | Scala | bsd-2-clause | 1,631 |
//package com.tribbloids.spookystuff.uav.planning
//
//import com.tribbloids.spookystuff.SpookyContext
//import com.tribbloids.spookystuff.actions.{Trace, TraceView}
//import com.tribbloids.spookystuff.execution.ExecutionContext
//import com.tribbloids.spookystuff.uav.UAVConf
//import com.tribbloids.spookystuff.uav.dsl... | tribbloid/spookystuff | uav/src/main/scala/com/tribbloids/spookystuff/uav/planning/VRPOptimizers/GA.scala | Scala | apache-2.0 | 11,556 |
package org.http4s
import java.time.{Instant, ZonedDateTime}
import org.http4s.parser.AdditionalRules
import org.http4s.util.{Renderable, Writer}
/**
* An HTTP-date value represents time as an instance of Coordinated Universal
* Time (UTC). It expresses time at a resolution of one second. By using it
* over ja... | reactormonk/http4s | core/src/main/scala/org/http4s/HttpDate.scala | Scala | apache-2.0 | 3,838 |
package com.plasmaconduit.fact.compiler.ast
sealed trait ParsedAST
case class TypeNode(name: String, parameters: Seq[TypeNode] = Seq())
case class TypeParameterNode(typeN: TypeNode, contexts: Seq[TypeNode])
case class EnumDefinitionNode(typeNode: TypeNode, cases: Seq[TypeNode]) extends ParsedAST
case class TypedValueP... | JosephMoniz/fact | src/main/scala/com/plasmaconduit/fact/compiler/ast/ParsedAST.scala | Scala | mit | 2,535 |
package concurrent_programming.data_parallel.smoothing
import scala.util.Random
object SmoothUtils {
type Type = Boolean
type Row = Array[Type]
type Image = Array[Row]
val BLACK = true
val WHITE = false
val dirs: Array[(Int, Int)] = Array.apply((-1, 0), (1, 0), (0, -1), (0, 1))
def generateEmptyImage... | AlexandruValeanu/Concurrent-Programming-in-Scala | src/concurrent_programming/data_parallel/smoothing/SmoothUtils.scala | Scala | gpl-3.0 | 1,745 |
/**
* 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... | unix1986/universe | tool/kafka-0.8.1.1-src/core/src/test/scala/unit/kafka/log4j/KafkaLog4jAppenderTest.scala | Scala | bsd-2-clause | 6,470 |
/*
* 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 ... | cloud-fan/spark | sql/core/src/main/scala/org/apache/spark/sql/expressions/CommandResult.scala | Scala | apache-2.0 | 1,929 |
/*
* 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/regression/LassoSuite.scala | Scala | apache-2.0 | 6,074 |
/*
* Task.scala
*
* Copyright (c) 2014 Ronald Kurniawan. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your op... | fluxodesign/DownloadDaemon | src/main/scala/net/fluxo/dd/dbo/Task.scala | Scala | gpl-2.0 | 3,259 |
/* Code Pulse: a real-time code coverage tool, for more information, see <http://code-pulse.com/>
*
* Copyright (C) 2014-2017 Code Dx, Inc. <https://codedx.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 ... | secdec/codepulse | agent/src/test/scala/com/secdec/bytefrog/agent/message/test/SenderManagerV1Spec.scala | Scala | apache-2.0 | 3,825 |
/*
* 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 | connector/src/main/scala/quasar/qscript/provenance/Dimension.scala | Scala | apache-2.0 | 3,807 |
/*
* Copyright 2001-2013 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | scalatest/scalatest | jvm/core/src/main/scala/org/scalatest/tools/SuiteDiscoveryHelper.scala | Scala | apache-2.0 | 10,815 |
package org.scalafmt.rewrite
import org.scalafmt.util.TokenOps
import scala.meta.tokens.Token.{
LF,
LeftBrace,
LeftParen,
RightBrace,
RightParen
}
import scala.meta.{Tree, _}
case object AvoidInfix extends Rewrite {
// In a perfect world, we could just use
// Tree.transform {
// case t: Term.ApplyI... | Daxten/scalafmt | core/src/main/scala/org/scalafmt/rewrite/AvoidInfix.scala | Scala | apache-2.0 | 2,462 |
package org.helgoboss.scala_osgi_metatype.interfaces
/**
* Provides access to metatypes. Interface modeled after [[org.osgi.service.metatype.MetaTypeProvider]].
*/
trait MetaTypeProvider {
/**
* Returns a list of available locales.
*/
def locales: Traversable[String]
/**
* Returns an object class de... | helgoboss/scala-osgi-metatype | src/main/scala/org/helgoboss/scala_osgi_metatype/interfaces/MetaTypeProvider.scala | Scala | mit | 484 |
package plugins.cloudimage
import org.specs2.mutable._
import play.api.Play.current
import play.api.test.Helpers.inMemoryDatabase
import play.api.test.Helpers.running
import play.api.test.FakeApplication
import plugins.use
import java.io.BufferedInputStream
import java.io.FileInputStream
class CloudinaryCloudImageSpe... | lukaszbudnik/play-cloud-plugins | test/plugins/cloudimage/CloudinaryCloudImageSpec.scala | Scala | apache-2.0 | 2,049 |
/*
* 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... | lresende/incubator-toree | protocol/src/test/scala/org/apache/toree/kernel/protocol/v5/content/CompleteRequestSpec.scala | Scala | apache-2.0 | 2,642 |
/**
* Licensed to Big Data Genomics (BDG) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The BDG licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use ... | heuermh/bdg-qc-metrics | quinine-core/src/main/scala/org/bdgenomics/quinine/rdd/variation/GenotypesSummary.scala | Scala | apache-2.0 | 14,147 |
/*
* Copyright 2014 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... | nkhuyu/scrooge | scrooge-linter/src/main/scala/com/twitter/scrooge/linter/Linter.scala | Scala | apache-2.0 | 12,770 |
package org.coursera.naptime.ari.graphql.controllers.filters
import javax.inject.Inject
import javax.inject.Singleton
import org.coursera.naptime.ari.engine.EngineMetricsCollector
import play.api.libs.json.Json
import scala.concurrent.ExecutionContext
@Singleton
class EngineMetricsFilter @Inject() (
metricsColl... | vkuo-coursera/naptime | naptime-graphql/src/main/scala/org/coursera/naptime/ari/graphql/controllers/filters/EngineMetricsFilter.scala | Scala | apache-2.0 | 961 |
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.