repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
rluta/metorikku
src/main/scala/com/yotpo/metorikku/configuration/job/input/Kafka.scala
package com.yotpo.metorikku.configuration.job.input import com.yotpo.metorikku.configuration.job.InputConfig import com.yotpo.metorikku.input.Reader import com.yotpo.metorikku.input.readers.kafka.KafkaInput case class Kafka(servers: Seq[String], topic: Option[String], topicPattern: O...
rluta/metorikku
src/main/scala/com/yotpo/metorikku/configuration/job/input/JDBC.scala
<gh_stars>100-1000 package com.yotpo.metorikku.configuration.job.input import com.yotpo.metorikku.configuration.job.InputConfig import com.yotpo.metorikku.input.Reader import com.yotpo.metorikku.input.readers.jdbc.JDBCInput case class JDBC(connectionUrl: String, user: String, password:...
rluta/metorikku
src/main/scala/com/yotpo/metorikku/metric/stepActions/dataQuality/DataQualityCheckList.scala
package com.yotpo.metorikku.metric.stepActions.dataQuality case class DataQualityCheckList(checks: List[DataQualityCheck], level: Option[String], cacheDf: Option[Boolean], failedDfLocation: Option[String] = None) { def ru...
ThorsMjollnir/RosHTTP
js/src/main/scala/fr/hmil/roshttp/node/http/IncomingMessage.scala
<filename>js/src/main/scala/fr/hmil/roshttp/node/http/IncomingMessage.scala<gh_stars>100-1000 package fr.hmil.roshttp.node.http import fr.hmil.roshttp.node.events.EventEmitter import scala.scalajs.js import scala.scalajs.js.annotation.JSGlobal @js.native @JSGlobal private[roshttp] class IncomingMessage extends Event...
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/DriverTrait.scala
package fr.hmil.roshttp import fr.hmil.roshttp.response.{HttpResponse, HttpResponseFactory} import monix.execution.Scheduler import scala.concurrent.Future private trait DriverTrait { def send[T <: HttpResponse](req: HttpRequest, factory: HttpResponseFactory[T])(implicit scheduler: Scheduler): Future[T] }
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/util/Utils.scala
package fr.hmil.roshttp.util import java.nio.ByteBuffer import fr.hmil.roshttp.CrossPlatformUtils object Utils { /** * Extracts the charset from a content-type header string * @param input content-type header value * @return the charset contained in the content-type or the default * one-by...
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/response/HttpResponseFactory.scala
<filename>shared/src/main/scala/fr/hmil/roshttp/response/HttpResponseFactory.scala package fr.hmil.roshttp.response import java.nio.ByteBuffer import fr.hmil.roshttp.BackendConfig import fr.hmil.roshttp.util.HeaderMap import monix.execution.Scheduler import monix.reactive.Observable import scala.concurrent.Future p...
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/exceptions/HttpException.scala
<reponame>ThorsMjollnir/RosHTTP package fr.hmil.roshttp.exceptions import java.io.IOException import fr.hmil.roshttp.response.{HttpResponse, SimpleHttpResponse, StreamHttpResponse} /** Exception in the HTTP application layer. * * In other words, this exception occurs when a bad HTTP status code (>= 400) is recei...
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/response/HttpResponse.scala
<gh_stars>0 package fr.hmil.roshttp.response import fr.hmil.roshttp.util.HeaderMap private[roshttp] trait HttpResponse { val statusCode: Int val headers: HeaderMap[String] val body: Any }
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/exceptions/UploadStreamException.scala
package fr.hmil.roshttp.exceptions import java.io.IOException /** Captures errors in the request body stream. * * This exception means that the stream which feeds request body data into the request broke. */ case class UploadStreamException(cause: Throwable) extends IOException("An error occurred upstream whi...
ThorsMjollnir/RosHTTP
js/src/main/scala/fr/hmil/roshttp/NodeDriver.scala
package fr.hmil.roshttp import java.io.IOException import java.nio.ByteBuffer import fr.hmil.roshttp.ByteBufferQueue.Feeder import fr.hmil.roshttp.exceptions.{HttpException, RequestException, UploadStreamException} import fr.hmil.roshttp.node.Modules.{http, https} import fr.hmil.roshttp.node.buffer.Buffer import fr.h...
ThorsMjollnir/RosHTTP
build.sbt
<filename>build.sbt name := "RösHTTP root project" crossScalaVersions := Seq("2.10.6", "2.11.11", "2.12.2") lazy val root = project.in(file(".")). aggregate(scalaHttpJS, scalaHttpJVM) lazy val scalaHttp = crossProject.in(file(".")) //.configureCross(InBrowserTesting.cross) .settings( name := "roshttp", v...
ThorsMjollnir/RosHTTP
js/src/main/scala/fr/hmil/roshttp/node/http/Http.scala
package fr.hmil.roshttp.node.http import scala.scalajs.js import scala.scalajs.js.annotation.{JSGlobal, JSName} /** * The node http API. * * Server-related stuff not included. * createClient not included because it is deprecated. * * @see https://nodejs.org/api/http.html */ @js.native private[roshttp] t...
ThorsMjollnir/RosHTTP
js/src/main/scala/fr/hmil/roshttp/CrossPlatformUtils.scala
package fr.hmil.roshttp import scala.scalajs.js private object CrossPlatformUtils { def encodeURIComponent(query: String): String = js.URIUtils.encodeURIComponent(query) def decodeURIComponent(query: String): String = js.URIUtils.decodeURIComponent(query) }
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/body/PlainTextBody.scala
<gh_stars>0 package fr.hmil.roshttp.body import java.nio.ByteBuffer /** Plain text body sent as `text/plain` mime type. * * @param text The plain text to send * @param charset Charset used for encoded (defaults to utf-8) */ class PlainTextBody private( text: String, charset: String ) extends BulkBod...
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/body/BodyPart.scala
package fr.hmil.roshttp.body import java.nio.ByteBuffer import monix.reactive.Observable trait BodyPart { def contentType: String def content: Observable[ByteBuffer] }
ThorsMjollnir/RosHTTP
js/src/main/scala/fr/hmil/roshttp/node/http/ClientRequest.scala
package fr.hmil.roshttp.node.http import fr.hmil.roshttp.node.events.EventEmitter import fr.hmil.roshttp.node.buffer.Buffer import scala.scalajs.js /** * Complete nodejs http ClientRequest API facade */ @js.native private[roshttp] class ClientRequest extends EventEmitter { /** * Marks the request as abort...
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/Method.scala
<gh_stars>100-1000 package fr.hmil.roshttp /** Wraps HTTP method strings. */ final class Method private(private val name: String) { override def toString: String = name.toUpperCase override def equals(o: Any): Boolean = o match { case that: Method => that.name.equalsIgnoreCase(this.name) case _ => false ...
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/response/SimpleHttpResponse.scala
<reponame>ThorsMjollnir/RosHTTP package fr.hmil.roshttp.response import java.nio.ByteBuffer import fr.hmil.roshttp.BackendConfig import fr.hmil.roshttp.exceptions.ResponseException import fr.hmil.roshttp.util.{HeaderMap, Utils} import monix.execution.Scheduler import monix.reactive.Observable import scala.collection...
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/body/MultiPartBody.scala
<filename>shared/src/main/scala/fr/hmil/roshttp/body/MultiPartBody.scala package fr.hmil.roshttp.body import java.nio.ByteBuffer import monix.execution.Scheduler import monix.reactive.Observable import scala.util.Random /** A body made of multiple parts. * * <b>Usage:</b> A multipart body acts as a container fo...
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/exceptions/TimeoutException.scala
package fr.hmil.roshttp.exceptions import java.io.IOException import fr.hmil.roshttp.response.HttpResponseHeader /** Captures timeout exceptions occurring during an HTTP response. */ case class TimeoutException(header: Option[HttpResponseHeader] = None) extends IOException("HTTP response timed out.")
ThorsMjollnir/RosHTTP
js/src/main/scala/fr/hmil/roshttp/node/Helpers.scala
package fr.hmil.roshttp.node import scala.scalajs.js import scala.scalajs.js.JavaScriptException /** * collection of helper functions for nodejs related stuff */ private[roshttp] object Helpers { /** * Tests whether the current environment is commonjs-like * * @return true if the function "require" is...
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/body/BulkBodyPart.scala
package fr.hmil.roshttp.body import java.nio.ByteBuffer import monix.reactive.Observable abstract class BulkBodyPart extends BodyPart { override def content: Observable[ByteBuffer] = Observable.eval(contentData) def contentData: ByteBuffer }
ThorsMjollnir/RosHTTP
js/src/main/scala/fr/hmil/roshttp/node/Module.scala
<reponame>ThorsMjollnir/RosHTTP package fr.hmil.roshttp.node private[roshttp] abstract class Module[T](val name: String, val inst: T) { def isAvailable: Boolean = required.isDefined def required: Option[T] = Helpers.require(this) lazy val api = required.getOrElse(throw new ModuleNotFoundException(name)) } priv...
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/ByteBufferQueue.scala
<filename>shared/src/main/scala/fr/hmil/roshttp/ByteBufferQueue.scala package fr.hmil.roshttp import java.nio.ByteBuffer import fr.hmil.roshttp.ByteBufferQueue.Feeder import monix.execution.{Ack, Cancelable} import monix.execution.Ack.{Continue, Stop} import monix.reactive.Observable import monix.reactive.observers.S...
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/response/StreamHttpResponse.scala
package fr.hmil.roshttp.response import java.nio.ByteBuffer import fr.hmil.roshttp.BackendConfig import fr.hmil.roshttp.util.HeaderMap import monix.execution.Scheduler import monix.reactive.Observable import scala.concurrent.Future class StreamHttpResponse( val statusCode: Int, val headers: HeaderMap[Strin...
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/Protocol.scala
package fr.hmil.roshttp /** Defines the protocol used. * * When setting a protocol from a string, we want to preserve the initial case such as * not to alter the url. */ final case class Protocol private(private val name: String) { override implicit def toString: String = name override def equals(o: Any)...
ThorsMjollnir/RosHTTP
js/src/main/scala/fr/hmil/roshttp/HttpDriver.scala
<filename>js/src/main/scala/fr/hmil/roshttp/HttpDriver.scala<gh_stars>100-1000 package fr.hmil.roshttp import fr.hmil.roshttp.node.Modules.{HttpModule, HttpsModule} import fr.hmil.roshttp.response.{HttpResponse, HttpResponseFactory} import monix.execution.Scheduler import scala.concurrent.Future private object HttpD...
ThorsMjollnir/RosHTTP
jvm/src/main/scala/fr/hmil/roshttp/CrossPlatformUtils.scala
package fr.hmil.roshttp import java.net.{URLDecoder, URLEncoder} private object CrossPlatformUtils { def encodeURIComponent(query: String): String = { URLEncoder.encode(query, "UTF-8").replace("+", "%20") } def decodeURIComponent(query: String): String = URLDecoder.decode(query, "UTF-8") }
ThorsMjollnir/RosHTTP
js/src/main/scala/fr/hmil/roshttp/node/events/EventEmitter.scala
<reponame>ThorsMjollnir/RosHTTP package fr.hmil.roshttp.node.events import scala.scalajs.js @js.native private[roshttp] trait EventEmitter extends js.Object { def on(event: String, cb: js.Function1[js.Dynamic, Unit]): Unit = js.native }
ThorsMjollnir/RosHTTP
js/src/main/scala/fr/hmil/roshttp/node/http/RequestOptions.scala
<gh_stars>0 package fr.hmil.roshttp.node.http import scala.scalajs.js import scala.scalajs.js.annotation.ScalaJSDefined @ScalaJSDefined private[roshttp] trait RequestOptions extends js.Object { val protocol: String val host: String val hostname: String val family: Int val port: Int val localAddress: Str...
ThorsMjollnir/RosHTTP
js/src/main/scala/fr/hmil/roshttp/node/Modules.scala
<filename>js/src/main/scala/fr/hmil/roshttp/node/Modules.scala package fr.hmil.roshttp.node import fr.hmil.roshttp.node.http.{Http, Https} /** * This object allows to access nodejs builtin modules without explicitely calling require. * * If a browser shim is used and is accessible in the global context, it wil...
ThorsMjollnir/RosHTTP
js/src/main/scala/fr/hmil/roshttp/node/http/Https.scala
<gh_stars>0 package fr.hmil.roshttp.node.http import scala.scalajs.js import scala.scalajs.js.annotation.JSName /** * For our purposes, we can just pretend https has the same interface as http */ @js.native private[roshttp] trait Https extends Http @js.native @JSName("https") private[roshttp] object Https extend...
ThorsMjollnir/RosHTTP
js/src/main/scala/fr/hmil/roshttp/JsEnvUtils.scala
<filename>js/src/main/scala/fr/hmil/roshttp/JsEnvUtils.scala package fr.hmil.roshttp /* Taken from http://japgolly.blogspot.fr/2016/03/scalajs-firefox-chrome-sbt.html */ import scala.scalajs.js.Dynamic.global import scala.util.Try private object JsEnvUtils { /** Sample (real) values are: * - Mozilla/5.0 (U...
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/util/HeaderMap.scala
package fr.hmil.roshttp.util import fr.hmil.roshttp.util.HeaderMap.CaseInsensitiveString import scala.collection.immutable.MapLike /** A set of HTTP headers identified by case insensitive keys * * A Map[CaseInsensitiveString, String] would conform to the strict Map specification * but it would make the API ug...
ThorsMjollnir/RosHTTP
js/src/main/scala/fr/hmil/roshttp/node/http/Agent.scala
<reponame>ThorsMjollnir/RosHTTP package fr.hmil.roshttp.node.http import scala.scalajs.js import scala.scalajs.js.annotation.JSGlobal /** * node http agent API. * * This facade is not complete! */ @js.native @JSGlobal private[roshttp] class Agent extends js.Object { def this(options: AgentOptions) { t...
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/exceptions/ResponseException.scala
<filename>shared/src/main/scala/fr/hmil/roshttp/exceptions/ResponseException.scala package fr.hmil.roshttp.exceptions import java.io.IOException import fr.hmil.roshttp.response.HttpResponseHeader /** Captures network errors occurring during reception of an HTTP response body. * * When this exception occurs, HTTP...
ThorsMjollnir/RosHTTP
jvm/src/main/scala/fr/hmil/roshttp/JsEnvUtils.scala
<reponame>ThorsMjollnir/RosHTTP package fr.hmil.roshttp private object JsEnvUtils { val userAgent: String = "jvm" // Check each browser val isFirefox = false val isChrome = false val isRealBrowser = false // Or you can even just check if running in X val isRunningInX = false }
ThorsMjollnir/RosHTTP
shared/src/main/scala/fr/hmil/roshttp/body/StreamBody.scala
package fr.hmil.roshttp.body import java.nio.ByteBuffer import monix.reactive.Observable class StreamBody private( override val content: Observable[ByteBuffer], override val contentType: String ) extends BodyPart object StreamBody { def apply(data: Observable[ByteBuffer], contentType: String = "applicat...
ThorsMjollnir/RosHTTP
shared/src/test/scala/fr/hmil/roshttp/HttpRequestSpec.scala
<gh_stars>0 package fr.hmil.roshttp import java.nio.ByteBuffer import fr.hmil.roshttp.body.Implicits._ import fr.hmil.roshttp.body.JSONBody._ import fr.hmil.roshttp.body._ import fr.hmil.roshttp.exceptions._ import fr.hmil.roshttp.response.SimpleHttpResponse import monix.execution.Scheduler.Implicits.global import mo...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/util/ArrayHelperSuite.scala
<filename>atlas-core/src/test/scala/com/netflix/atlas/core/util/ArrayHelperSuite.scala /* * Copyright 2014-2021 Netflix, 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 * * ht...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/norm/RateValueFunctionSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-postgres/src/main/scala/com/netflix/atlas/postgres/CopyBuffer.scala
<gh_stars>1000+ /* * Copyright 2014-2021 Netflix, 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 appli...
dmuino/atlas
atlas-akka-testkit/src/main/scala/com/netflix/atlas/akka/testkit/MUnitRouteSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-core/src/main/scala/com/netflix/atlas/core/validation/HasKeyRule.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-core/src/main/scala/com/netflix/atlas/core/util/FastGzipOutputStream.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/util/CardinalityEstimatorSuite.scala
<filename>atlas-core/src/test/scala/com/netflix/atlas/core/util/CardinalityEstimatorSuite.scala /* * Copyright 2014-2021 Netflix, 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 * ...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/util/ByteBufferInputStreamSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/util/IdMapSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/model/NamedRewriteSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/validation/RuleSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-postgres/src/test/scala/com/netflix/atlas/postgres/TextCopyBufferSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/validation/ReservedKeyRuleSuite.scala
<reponame>dmuino/atlas /* * Copyright 2014-2021 Netflix, 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 b...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/norm/RollingValueFunctionSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/algorithm/OnlineRollingMeanSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/HostSourceSuite.scala
<reponame>dmuino/atlas<gh_stars>1000+ /* * Copyright 2014-2021 Netflix, 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 * * Un...
dmuino/atlas
atlas-akka/src/test/scala/com/netflix/atlas/akka/ConnectionContextFactorySuite.scala
<reponame>dmuino/atlas /* * Copyright 2014-2021 Netflix, 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 b...
dmuino/atlas
atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/EurekaGroupsLookupSuite.scala
<gh_stars>1000+ /* * Copyright 2014-2021 Netflix, 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 appli...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/stacklang/FreezeSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-postgres/src/main/scala/com/netflix/atlas/postgres/TextCopyBuffer.scala
<filename>atlas-postgres/src/main/scala/com/netflix/atlas/postgres/TextCopyBuffer.scala /* * Copyright 2014-2021 Netflix, 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 * * h...
dmuino/atlas
atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/StreamMetadata.scala
<reponame>dmuino/atlas<gh_stars>1000+ /* * Copyright 2014-2021 Netflix, 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 * * Un...
dmuino/atlas
atlas-jmh/src/main/scala/com/netflix/atlas/core/validation/TagRules.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/EvaluateApi.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/TimeGroupedSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-core/src/main/scala/com/netflix/atlas/core/util/CharBufferReader.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/util/CharBufferReaderSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/StreamsApi.scala
<filename>atlas-lwcapi/src/main/scala/com/netflix/atlas/lwcapi/StreamsApi.scala /* * Copyright 2014-2021 Netflix, 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://ww...
dmuino/atlas
atlas-webapi/src/test/scala/com/netflix/atlas/webapi/ExprApiSuite.scala
<reponame>dmuino/atlas /* * Copyright 2014-2021 Netflix, 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 b...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/stacklang/VocabularySuite.scala
<reponame>dmuino/atlas /* * Copyright 2014-2021 Netflix, 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 b...
dmuino/atlas
atlas-core/src/main/scala/com/netflix/atlas/core/norm/RollingValueFunction.scala
<gh_stars>1000+ /* * Copyright 2014-2021 Netflix, 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 appli...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/util/RefIntHashMapSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-chart/src/test/scala/com/netflix/atlas/chart/graphics/ScalesSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/norm/SumValueFunctionSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-webapi/src/test/scala/com/netflix/atlas/webapi/PublishApiJsonSuite.scala
<filename>atlas-webapi/src/test/scala/com/netflix/atlas/webapi/PublishApiJsonSuite.scala<gh_stars>0 /* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/LwcToAggrDatapoint.scala
<filename>atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/LwcToAggrDatapoint.scala /* * Copyright 2014-2021 Netflix, 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 * * ...
dmuino/atlas
atlas-eval/src/test/scala/com/netflix/atlas/eval/model/LwcMessagesSuite.scala
<gh_stars>1000+ /* * Copyright 2014-2021 Netflix, 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 appli...
dmuino/atlas
atlas-eval/src/test/scala/com/netflix/atlas/eval/util/HostRewriterSuite.scala
<filename>atlas-eval/src/test/scala/com/netflix/atlas/eval/util/HostRewriterSuite.scala /* * Copyright 2014-2021 Netflix, 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 * * h...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/model/VocabularySuite.scala
<reponame>dmuino/atlas /* * Copyright 2014-2021 Netflix, 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 b...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/model/BlockSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-eval/src/test/scala/com/netflix/atlas/eval/graph/SimpleLegendsSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/algorithm/OnlineIgnoreNSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/db/AggregateCollectorSuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-core/src/main/scala/com/netflix/atlas/core/model/MathVocabulary.scala
<filename>atlas-core/src/main/scala/com/netflix/atlas/core/model/MathVocabulary.scala /* * Copyright 2014-2021 Netflix, 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 * * htt...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/util/BoundedPriorityBufferSuite.scala
<filename>atlas-core/src/test/scala/com/netflix/atlas/core/util/BoundedPriorityBufferSuite.scala /* * Copyright 2014-2021 Netflix, 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 *...
dmuino/atlas
atlas-json/src/main/scala/com/netflix/atlas/json/Reflection.scala
<gh_stars>1000+ /* * Copyright 2014-2021 Netflix, 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 appli...
dmuino/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/model/StyleVocabularySuite.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-postgres/src/test/scala/com/netflix/atlas/postgres/PostgresCopyBufferSuite.scala
<gh_stars>1000+ /* * Copyright 2014-2021 Netflix, 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 appli...
dmuino/atlas
atlas-core/src/main/scala/com/netflix/atlas/core/db/BlockStore.scala
/* * Copyright 2014-2021 Netflix, 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...
dmuino/atlas
atlas-eval/src/main/scala/com/netflix/atlas/eval/model/LwcMessages.scala
<reponame>dmuino/atlas /* * Copyright 2014-2021 Netflix, 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 b...
MaksGovor/FP-labs
lab2_OOP/src/test/scala/objsets/PostSetSuite.scala
<gh_stars>0 package objsets import PostReader.allposts class PostSetSuite extends munit.FunSuite { val set1 = new Empty() val set2: PostSet = set1.incl(new Post("a", "a body", 20)) val set3: PostSet = set2.incl(new Post("b", "b body", 20)) val c = new Post("c", "c body", 7) val d = new Post("d", "d body", ...
MaksGovor/FP-labs
lab_recursion/src/test/scala/recfun/calcExpressionSuite.scala
<reponame>MaksGovor/FP-labs package recfun import org.scalatest.funsuite.AnyFunSuite import org.junit.runner.RunWith import org.scalatestplus.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class calcExpressionSuite extends AnyFunSuite { import Main.calcExpression test("calcExpression: x = 3") { assert(calc...
MaksGovor/FP-labs
quickcheck/build.sbt
name := "quickcheck" version := "0.1" scalaVersion := "2.13.6" scalacOptions ++= Seq("-language:implicitConversions", "-deprecation") libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.15.4" testOptions in Test += Tests.Argument(Test...
MaksGovor/FP-labs
codecs/project/buildSettings.sbt
<filename>codecs/project/buildSettings.sbt libraryDependencies += "com.typesafe.play" %% "play-json" % "2.7.4" libraryDependencies += "commons-codec" % "commons-codec" % "1.10"
MaksGovor/FP-labs
quickcheck/src/main/scala/quickcheck/QuickCheck.scala
package quickcheck import org.scalacheck._ import Arbitrary._ import Gen._ import Prop._ import scala.annotation.tailrec abstract class QuickCheckHeap extends Properties("Heap") with IntHeap { lazy val genHeap: Gen[H] = for { x <- arbitrary[A] heap <- oneOf(const(empty), genHeap) } yield insert(x, heap)...
MaksGovor/FP-labs
codecs/build.sbt
<reponame>MaksGovor/FP-labs scalaVersion := "2.13.1" scalacOptions ++= Seq("-deprecation") libraryDependencies ++= Seq( "org.typelevel" %% "jawn-parser" % "1.0.0", "org.scalacheck" %% "scalacheck" % "1.14.2" % Test, "com.novocode" % "junit-interface" % "0.11" % Test ) testOptions in Test += Tests.Argument(TestFr...
MaksGovor/FP-labs
codecs/project/plugins.sbt
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.28") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.7")
MaksGovor/FP-labs
lab_recursion/src/test/scala/recfun/PascalSuite.scala
package recfun import org.scalatest.funsuite.AnyFunSuite import org.junit.runner.RunWith import org.scalatestplus.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class PascalSuite extends AnyFunSuite { import Main.pascal test("pascal: col=0,row=2") { assert(pascal(0,2) === 1) } test("pascal: col=1...
MaksGovor/FP-labs
lab2_OOP/src/main/scala/objsets/PostSet.scala
<reponame>MaksGovor/FP-labs package objsets import PostReader.allposts import com.sun.org.apache.xpath.internal.compiler.Keywords /** * A class to represent posts. */ class Post(val user: String, val text: String, val likes: Int) { override def toString: String = "User: " + user + "\n" + "Text: " + text...
MaksGovor/FP-labs
streams/src/main/scala/streams/Solver.scala
<reponame>MaksGovor/FP-labs<filename>streams/src/main/scala/streams/Solver.scala<gh_stars>0 package streams /** * This component implements the solver for the Bloxorz game */ trait Solver extends GameDef { /** * Returns `true` if the block `b` is at the final position */ def done(b: Block): Boolean = b.b1 ...
MaksGovor/FP-labs
lab2_OOP/src/main/scala/objsets/PostSetInterface.scala
package objsets /**Do not change signatures*/ trait postsetInterface { def incl(post: Post): PostSet def remove(post: Post): PostSet def contains(post: Post): Boolean def foreach(f: Post => Unit): Unit def union(that: PostSet): PostSet def mostLiked: Post def descendingByLikes: PostList }