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 |
|---|---|---|---|---|---|
/*
* 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 ... | apache/flink | flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/batch/sql/join/JoinConditionTypeCoerceITCase.scala | Scala | apache-2.0 | 5,998 |
/**
* 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... | SumoLogic/elasticsearch-client | elasticsearch-core/src/main/scala/com/sumologic/elasticsearch/restlastic/dsl/CompletionDsl.scala | Scala | apache-2.0 | 3,359 |
package io.travisbrown.abstracted
/**
* Wraps a value but doesn't have any other methods.
*/
case class Empty[A](a: A)
private[abstracted] final object Empty {
implicit def convert[A, B](e: Empty[A])(implicit converter: Converter[A, B]): B = converter(e)
}
| travisbrown/abstracted | core/src/main/scala/io/travisbrown/abstracted/Empty.scala | Scala | apache-2.0 | 263 |
/*
* 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-tail/shared/src/test/scala/monix/tail/BatchCursorBuildersSuite.scala | Scala | apache-2.0 | 1,434 |
object Main {
def main(a: Array[String]) { }
}
| softprops/heroic | src/sbt-test/heroic/gen-deploy-artifacts/src/main/scala/Main.scala | Scala | mit | 49 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | windeye/spark | core/src/main/scala/org/apache/spark/deploy/master/ZooKeeperPersistenceEngine.scala | Scala | apache-2.0 | 2,916 |
package ru.dgolubets.reactjs.server.script
import java.io.{File, FileInputStream, InputStreamReader, Reader}
import java.nio.charset.{Charset, StandardCharsets}
case class FileScriptSource(file: File, charset: Charset = StandardCharsets.UTF_8) extends ScriptSource {
override def reader: Reader = {
val stream = ... | DGolubets/reactjs-server | src/main/scala/ru/dgolubets/reactjs/server/script/FileScriptSource.scala | Scala | mit | 395 |
package ru.wordmetrix.draw2dmap
import java.awt.{BasicStroke, Color, Graphics2D, Point}
import java.lang.Math.{max, sqrt}
import ru.wordmetrix.smartfile.SmartFile.fromString
import ru.wordmetrix.treeapproximator.TreeApproximator.{Leaf, Node, Tree}
import ru.wordmetrix.utils.{CFG, debug}
import ru.wordmetrix.vector.Ve... | electricmind/treeapproximator | draw2dmap/src/main/scala/ru/wordmetrix/draw2dmap/Draw2DMap.scala | Scala | apache-2.0 | 11,141 |
/*
Copyright (c) 2017 KAPSARC
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
dist... | EconomicSL/auctions | src/main/scala/org/economicsl/auctions/singleunit/orderbooks/SortedSingleUnitBids.scala | Scala | apache-2.0 | 6,150 |
import java.nio.file.Paths
import java.time.Instant
import java.util.concurrent.Executors
import cats.effect.{Blocker, ContextShift, IO}
import org.scalatest._
import rpm4s.data.Checksum.Sha256
import rpm4s.data._
import rpm4s.repo.data.{Bytes, Repomd}
import rpm4s.repo.data.Data.{Primary, UpdateInfo}
import rpm4s.repo... | lucidd/rpm4s | repo-utils/jvm/src/test/scala/RepomdSpec.scala | Scala | mit | 6,638 |
package msgpack4z
abstract class PackerUnpackerFactory {
def packer: MsgPacker
def unpacker(bytes: Array[Byte]): MsgUnpacker
}
| msgpack4z/msgpack4z-core | src/main/scala/msgpack4z/PackUnpackFactory.scala | Scala | mit | 132 |
import com.deductions.bankplus._
import org.scalatra._
import javax.servlet.ServletContext
class ScalatraBootstrap extends LifeCycle {
override def init(context: ServletContext) {
context.mount(new BankplusScalatraServlet, "/*")
}
}
| jmvanel/bankplus | src/main/scala/ScalatraBootstrap.scala | Scala | gpl-2.0 | 242 |
/*
* LazyList.scala
* A lazy list.
*
* Created By: Avi Pfeffer (apfeffer@cra.com)
* Creation Date: Feb 26, 2014
*
* Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc.
* See http://www.cra.com or email figaro@cra.com for information.
*
* See http://www.github.com/p2t2/figaro for a copy of... | agarbuno/figaro | FigaroExamples/src/main/scala/com/cra/figaro/example/LazyList.scala | Scala | bsd-3-clause | 1,625 |
package net.fehmicansaglam.bson.reader
import java.nio.ByteBuffer
import net.fehmicansaglam.bson.Implicits.BsonValueRegex
import net.fehmicansaglam.bson.element.BsonRegex
case class BsonRegexReader(buffer: ByteBuffer) extends Reader[BsonRegex] {
def read: Option[BsonRegex] = {
val name = readCString()
val... | danielwegener/tepkin | bson/src/main/scala/net/fehmicansaglam/bson/reader/BsonRegexReader.scala | Scala | apache-2.0 | 443 |
package breeze.linalg
import java.util
import breeze.linalg.operators.BitVectorOps
import breeze.linalg.support.CanTraverseValues.ValuesVisitor
import breeze.linalg.support._
import scala.reflect.ClassTag
/**
* TODO
*
* @param enforceLength if false, then the BitVector won't throw exceptions if it's used in
* ... | jaredk-porch/breeze | math/src/main/scala/breeze/linalg/BitVector.scala | Scala | apache-2.0 | 5,972 |
/**
* 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... | rhauch/kafka | core/src/test/scala/unit/kafka/server/BaseReplicaFetchTest.scala | Scala | apache-2.0 | 3,371 |
/*
* Copyright (C) 2015 Stratio (http://stratio.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | danielcsant/sparta | examples/output/src/test/scala/com/stratio/sparta/FileOutputIT.scala | Scala | apache-2.0 | 2,572 |
/*
* Scala.js (https://www.scala-js.org/)
*
* Copyright EPFL.
*
* Licensed under Apache License 2.0
* (https://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package org.scalajs.testsuite.javalib.util
im... | SebsLittleHelpers/scala-js | test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/util/AbstractMapTest.scala | Scala | apache-2.0 | 614 |
package waldap.core
package object model {
type Session = slick.jdbc.JdbcBackend#Session
}
| kounoike/waldap | src/main/scala/waldap/core/model/package.scala | Scala | apache-2.0 | 94 |
/*
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
package org.apache.spark.api.csharp
import java.io._
import java.nio.ByteBuffer
import java.nio.channels.{FileChannel, FileLock, OverlappingFileLockException}
i... | cyruszhang/SparkCLR | scala/src/main/org/apache/spark/api/csharp/CSharpRDD.scala | Scala | mit | 8,467 |
package slaq.test
import java.sql.Blob
import javax.sql.rowset.serial.SerialBlob
import org.junit.Test
import org.junit.Assert._
import slaq.ql._
import slaq.ql.Table
import slaq.test.util._
import slaq.test.util.TestDB._
import slaq.session.Session
object BlobTest extends DBTestObject(H2Mem, /* SQLiteMem, Postgres, ... | godenji/slaq | src/test/scala/slaq/scalaquery/test/BlobTest.scala | Scala | bsd-2-clause | 1,086 |
package im.mange.driveby.pool
trait ApplicationController {
val application: Application
def start()
def stop()
def hasStarted: Boolean
}
| alltonp/driveby | src/main/scala/im/mange/driveby/pool/ApplicationController.scala | Scala | apache-2.0 | 150 |
package com.geishatokyo.diffsql
import scala.language.implicitConversions
/**
* Created by takeshita on 14/02/17.
*/
case class Name(name: String) {
override def equals(x: Any) = x match {
case n: Name => name.equalsIgnoreCase(n.name)
case str : String => name.equalsIgnoreCase(str)
case _ => false
... | geishatokyo/diff-sql-table | parser/src/main/scala/com/geishatokyo/diffsql/Definition.scala | Scala | mit | 567 |
package test
import adapter._
import adapter.xpay.{PayD, PayDImpl, Xpay, XpayImpl}
/**
* @author lmignot
*/
class AdapterSpec extends BaseSpec {
final val CardNo = "0987234156782345"
final val CustName = "Logan"
final val ExpMonth = "11"
final val ExpYear = "15"
final val ExpDate = "11/15"
final val ... | BBK-PiJ-2015-67/sdp-portfolio | exercises/week07/src/test/scala/AdapterSpec.scala | Scala | unlicense | 2,254 |
package TAPLcomp.fullsimple
import scala.util.parsing.combinator.{ImplicitConversions, PackratParsers}
import scala.util.parsing.combinator.syntactical.StandardTokenParsers
sealed trait Ty
case class TyVar(i: String) extends Ty
case class TyArr(t1: Ty, t2: Ty) extends Ty
case object TyUnit extends Ty
case class T... | hy-zhang/parser | Scala/Parser/src/TAPLcomp/fullsimple/parser.scala | Scala | bsd-3-clause | 5,388 |
package com.sksamuel.elastic4s.anaylzers
trait TokenFilterDsl {
def commonGramsTokenFilter(name: String): CommonGramsTokenFilter = CommonGramsTokenFilter(name)
def ngramTokenFilter(name: String): NGramTokenFilter = NGramTokenFilter(name)
def edgeNGramTokenFilter(name: String): EdgeNGramTokenFilter = EdgeNGramTok... | beni55/elastic4s | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/anaylzers/TokenFilterDsl.scala | Scala | apache-2.0 | 777 |
package test_data.v24
import scala.xml.Elem
case class SectionPart2AboutYourPartner(xml: Elem) {
val rootPath = xml \\\\ "DWPCATransaction" \\\\ "DWPCAClaim" \\\\ "Partner"
val otherSurnameOrMaidenName = rootPath \\\\ "OtherSurnames"
val dateOfBirthQuestion = rootPath \\ "DateOfBirth" \\ "QuestionLabel"
... | Department-for-Work-and-Pensions/RenderingService | test/test_data/v24/SectionPart2AboutYourPartner.scala | Scala | mit | 1,928 |
package com.github.kliewkliew.salad.dressing
import akka.actor.ActorSystem
import akka.pattern.after
import com.github.kliewkliew.salad.api.{SaladHashCommands, SaladKeyCommands, SaladStringCommands}
import com.github.kliewkliew.salad.serde.Serde
import com.lambdaworks.redis.RedisURI
import com.typesafe.config.ConfigFa... | kliewkliew/salad | src/main/scala/com/github/kliewkliew/salad/dressing/SaladTimeoutAPI.scala | Scala | apache-2.0 | 4,487 |
package org.locationtech.geomesa.core.transform
import org.apache.accumulo.core.data.Value
import org.geotools.process.vector.TransformProcess
import org.locationtech.geomesa.core.data.{FeatureEncoding, SimpleFeatureEncoder}
import org.locationtech.geomesa.feature.{AvroSimpleFeature, AvroSimpleFeatureFactory}
import o... | nhambletCCRI/geomesa | geomesa-core/src/main/scala/org/locationtech/geomesa/core/transform/TransformCreator.scala | Scala | apache-2.0 | 1,528 |
package tu.model.knowledge.annotator
import tu.model.knowledge._
import domain.Concept
import scala.Some
import tu.exception.UnexpectedException
import tu.model.knowledge.KBMap._
import collection.mutable.ListBuffer
/**
* @author alex toschev
* Time stamp: 6/29/12 11:25 AM
*/
case class AnnotatedSentence(... | keskival/2 | model.knowledge/src/main/scala/tu/model/knowledge/annotator/AnnotatedSentence.scala | Scala | gpl-3.0 | 3,697 |
package org.scalajs.openui5.sap.ui.commons
import scala.scalajs.js
import scala.scalajs.js.annotation.JSName
@JSName("sap.ui.commons.LabelDesign")
@js.native
object LabelDesign extends js.Object {
val Bold: String /*LabelDesign*/ = js.native
val Standard: String /*LabelDesign*/ = js.native
}
| lastsys/scalajs-openui5 | src/main/scala/org/scalajs/openui5/sap/ui/commons/LabelDesign.scala | Scala | mit | 299 |
package controllers
import play.api.mvc._
import play.api.libs.concurrent._
import models.persistance._
import com.mongodb.casbah.Imports._
import com.novus.salat.dao.SalatMongoCursor
import play.api.libs.json._
import tp_utils.Tryer._
import play.api.Play.current
import play.api.libs.concurrent.Execution.Implicits._
... | TPTeam/mongo_views_plugin | app/controllers/helper/CRUDer.scala | Scala | gpl-2.0 | 3,676 |
package gapt.examples
import gapt.expr._
import gapt.proofs.Sequent
import gapt.proofs.context.update.InductiveType
import gapt.proofs.context.update.{ PrimitiveRecursiveFunction => PrimRecFun }
import gapt.proofs.context.update.ProofDefinitionDeclaration
import gapt.proofs.context.update.ProofNameDeclaration
import g... | gapt/gapt | examples/schema/NdiffSchema.scala | Scala | gpl-3.0 | 6,344 |
package mesosphere.marathon
import akka.event.EventStream
import mesosphere.marathon.core.base._
import mesosphere.marathon.core.event.{ SchedulerRegisteredEvent, _ }
import mesosphere.marathon.core.launcher.OfferProcessor
import mesosphere.marathon.core.task.update.TaskStatusUpdateProcessor
import mesosphere.marathon... | janisz/marathon | src/main/scala/mesosphere/marathon/MarathonScheduler.scala | Scala | apache-2.0 | 7,452 |
/***********************************************************************
* Copyright (c) 2013-2017 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... | ronq/geomesa | geomesa-web/geomesa-web-core/src/main/scala/org/locationtech/geomesa/web/core/GeoMesaSwagger.scala | Scala | apache-2.0 | 1,013 |
/*
* 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 ... | manuzhang/incubator-gearpump | external/kafka/src/test/scala/org/apache/gearpump/streaming/kafka/lib/util/KafkaClientSpec.scala | Scala | apache-2.0 | 5,687 |
/***
* Excerpted from "Seven Concurrency Models in Seven Weeks",
* published by The Pragmatic Bookshelf.
* Copyrights apply to this code. It may not be used to create training material,
* courses, books, articles, and the like. Contact us if you are in doubt.
* We make no guarantees that this code is fit for any ... | XBOOS/concurrency | code/ActorsScala/WordCountMultipleCounters/src/main/scala/com/paulbutcher/Master.scala | Scala | gpl-2.0 | 1,134 |
package handler
import scala.concurrent.ExecutionContext.Implicits.global
import akka.actor.ActorRef
import akka.actor.Props
import akka.actor.actorRef2Scala
import akka.io.Tcp.Write
import akka.util.ByteString
import api.Api
import play.api.libs.json.JsArray
import play.api.libs.json.JsObject
import play.api.libs.jso... | watson-song/SKPush-Server | src/main/scala/handler/TcpConnectionHandler.scala | Scala | mit | 4,927 |
package sampleclean.clean.extraction
import sampleclean.api.SampleCleanContext
import org.apache.spark.SparkContext._
import org.apache.spark.sql.SQLContext
import sampleclean.clean.algorithm.SampleCleanAlgorithm
import sampleclean.clean.algorithm.AlgorithmParameters
import org.apache.spark.rdd.RDD
import org.apache... | sjyk/sampleclean-async | src/main/scala/sampleclean/clean/extract/SplitExtraction.scala | Scala | apache-2.0 | 2,465 |
package uitest
import java.util.concurrent.TimeUnit
import hclu.hreg.dao.{SqlPasswordResetCodeSchema, SqlUserSchema}
import hclu.hreg.service.email.DummyEmailService
import hclu.hreg.{Beans, EmbeddedJetty, EmbeddedJettyConfig}
import com.typesafe.config.ConfigFactory
import org.eclipse.jetty.webapp.WebAppContext
impo... | tsechov/hclu-registry | ui-tests/src/test/scala/uitest/BaseUiSpec.scala | Scala | apache-2.0 | 3,179 |
import scala.annotation.tailrec
class Main{
/*
* Task 1. Write some basic functions to work with lists
* Use only head, tail and Nil.
*/
// Return element on position i in list: get(2, List(1,2,3,4))=3
def get(i:Int, l:List[Int]):Int = {
@tailrec def inner(current: Int, reduced: List[Int]): Int... | Meemaw/scalaProgramming | week3/src/main/scala/Main.scala | Scala | mit | 9,126 |
package org.scalatest.examples.flatspec.pending
import org.scalatest._
class SetSpec extends FlatSpec {
"An empty Set" should "have size 0" in (pending)
it should "produce NoSuchElementException when head is invoked" in {
intercept[NoSuchElementException] {
Set.empty.head
}
}
} | hubertp/scalatest | examples/src/main/scala/org/scalatest/examples/flatspec/pending/SetSpec.scala | Scala | apache-2.0 | 306 |
/*
* This file is part of CoAnSys project.
* Copyright (c) 2012-2015 ICM-UW
*
* CoAnSys 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) any ... | acz-icm/coansys | citation-matching/citation-matching-core-code/src/main/scala/pl/edu/icm/coansys/citations/hashers/HashGenerator.scala | Scala | agpl-3.0 | 1,007 |
// Comment before package
package com
// Comment before import
import org.B
// Comment before object
case class A(b: B) | JetBrains/intellij-scala | scala/scala-impl/testdata/move/caseClass/before/com/A.scala | Scala | apache-2.0 | 120 |
/*
* Copyright 2020 Precog Data
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | quasar-analytics/quasar | qsu/src/main/scala/quasar/qsu/MappableRegion.scala | Scala | apache-2.0 | 4,056 |
package net.maffoo.jsonquote.spray
import scala.util.Random
import spray.json._
// Sentinel values to mark splice points in the json AST.
// Because spray uses Map to represent json objects, we use unique
// random keys beginning with a known prefix to mark field splice points.
class Sentinel[A <: AnyRef](inst: A) {... | maffoo/jsonquote | spray/src/main/scala/net/maffoo/jsonquote/spray/Splice.scala | Scala | mit | 1,833 |
package dk.tennis.compare.rating.multiskill.infer.skills.giventrueskills
import dk.tennis.compare.rating.multiskill.infer.skills.InferSkill
import dk.tennis.compare.rating.multiskill.model.perfdiff.skillsfactor.cov.opponent.PlayerSkill
import dk.tennis.compare.rating.multiskill.model.perfdiff.Player
import dk.bayes.ma... | danielkorzekwa/tennis-player-compare | multiskill/src/main/scala/dk/tennis/compare/rating/multiskill/infer/skills/giventrueskills/InferSkillGivenTrueSkills.scala | Scala | bsd-2-clause | 537 |
package org.jetbrains.plugins.scala
package lang
package psi
package api
import com.intellij.psi.PsiElement
import com.intellij.psi.search.GlobalSearchScope
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.ScTypeDefinition
trait ScPackageLike extends PsiElement {
def findPackageObject(scope: GlobalS... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/api/ScPackageLike.scala | Scala | apache-2.0 | 408 |
package com.arcusys.valamis.web.servlet.transcript
import com.arcusys.learn.liferay.services.UserLocalServiceHelper
import com.arcusys.learn.liferay.util.PortletName
import com.arcusys.valamis.certificate.service.{CertificateUserService}
import com.arcusys.valamis.gradebook.service.LessonGradeService
import com.arcus... | arcusys/Valamis | valamis-portlets/src/main/scala/com/arcusys/valamis/web/servlet/transcript/TranscriptServlet.scala | Scala | gpl-3.0 | 4,252 |
package ca.uwo.eng.sel.cepsim.placement
import java.util.{List => JavaList, Set => JavaSet}
import ca.uwo.eng.sel.cepsim.query._
import scala.collection.JavaConversions._
import scala.collection.mutable
/** Companion Placement object */
object Placement {
// ----------------------- for java usage
def apply(vert... | virsox/cepsim | cepsim-core/src/main/scala/ca/uwo/eng/sel/cepsim/placement/Placement.scala | Scala | mit | 6,424 |
package org.elasticsearch.spark.sql
import java.sql.Timestamp
import scala.collection.mutable.LinkedHashMap
import scala.collection.mutable.Map
import org.elasticsearch.hadoop.serialization.FieldType
import org.elasticsearch.hadoop.serialization.Parser
import org.elasticsearch.hadoop.serialization.builder.ValueParsi... | pranavraman/elasticsearch-hadoop | spark/sql-13/src/main/scala/org/elasticsearch/spark/sql/ScalaEsRowValueReader.scala | Scala | apache-2.0 | 1,811 |
/*
* La Trobe University - Distributed Deep Learning System
* Copyright 2015 Matthias Langer (t3l@threelights.de)
*
* 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.apa... | bashimao/ltudl | blaze/src/main/scala/edu/latrobe/blaze/modules/Power.scala | Scala | apache-2.0 | 4,567 |
package de.tu_berlin.formic.datastructure.linear.client
import akka.actor.ActorRef
import de.tu_berlin.formic.common.datastructure.client.{ClientDataStructureEvent, DataStructureInitiator}
import de.tu_berlin.formic.common.{ClientId, DataStructureInstanceId}
import upickle.default._
import scala.scalajs.js.annotation... | rbraeunlich/formic | linear/shared/src/main/scala/de/tu_berlin/formic/datastructure/linear/client/FormicString.scala | Scala | apache-2.0 | 959 |
package org.typedsolutions.aws.handlers
import com.amazonaws.AmazonWebServiceRequest
class PromiseHandlerFactory {
def create[Request <: AmazonWebServiceRequest, Response](): PromiseHandler[Request, Response] = {
new PromiseHandler()
}
}
object PromiseHandlerFactory {
def apply(): PromiseHandlerFactory = {... | mattroberts297/akka-kinesis | src/main/scala/org/typedsolutions/aws/handlers/PromiseHandlerFactory.scala | Scala | mit | 357 |
/*
* 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 ... | ueshin/apache-flink | flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/stream/table/GroupWindowTest.scala | Scala | apache-2.0 | 23,070 |
/**
* Copyright 2011-2016 GatlingCorp (http://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | ryez/gatling | gatling-recorder/src/main/scala/io/gatling/recorder/http/handler/remote/RemoteHandler.scala | Scala | apache-2.0 | 4,368 |
package net.wrap_trap.goju
import akka.actor.Actor
import akka.actor.ActorRef
import akka.actor.Props
import akka.actor.Terminated
import akka.util.Timeout
import net.wrap_trap.goju.Constants._
import net.wrap_trap.goju.element.KeyValue
import scala.concurrent.duration._
import org.hashids.Hashids
import scala.langu... | masayuki038/goju | src/main/scala/net/wrap_trap/goju/FoldRangeCoordinator.scala | Scala | mit | 2,719 |
package bifrost.program
import bifrost.transaction.box.StateBox
import io.circe.{Decoder, Encoder, HCursor, Json}
import io.circe.syntax._
import scala.util.Try
/**
* @param core The JavaScript program split into state and functions
* @param terms An ExecutionBuilderTerms o... | Topl/Project-Bifrost | src/main/scala/bifrost/program/ExecutionBuilder.scala | Scala | mpl-2.0 | 1,400 |
package gapt.provers.maxsat
import gapt.expr._
import gapt.expr.formula.Formula
import gapt.expr.formula.hol._
import gapt.formats.dimacs._
import gapt.logic.hol.CNFp
import gapt.logic.hol.fastStructuralCNF
import gapt.models.PropositionalModel
import gapt.proofs.HOLClause
import gapt.utils.Logger
object MaxSATSolver... | gapt/gapt | core/src/main/scala/gapt/provers/maxsat/MaxSAT.scala | Scala | gpl-3.0 | 1,898 |
/*
* 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 ... | tony810430/flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/delegation/StreamPlanner.scala | Scala | apache-2.0 | 7,138 |
package test.scala
import org.specs.Specification
import com.protose.resque._
object PerformableSpec extends Specification {
}
// vim: set ts=4 sw=4 et:
| jamesgolick/scala-resque-worker | src/test/scala/PerformableSpec.scala | Scala | mit | 156 |
package gapt.examples
import gapt.expr._
import gapt.proofs.context.update.Sort
import gapt.proofs.gaptic._
object fol1 extends TacticsProof {
ctx += Sort( "i" )
ctx += hoc"P: i>i>o"
ctx += hoc"Q: i>i>o"
ctx += hoc"a: i"
ctx += hoc"b: i"
val proof = Lemma( hols"L: !x!y (P x y -> Q x y) :- R: ?x?y (-Q x y... | gapt/gapt | examples/simple/fol1.scala | Scala | gpl-3.0 | 697 |
package skinny.engine.implicits
import java.util.Date
/**
* Built-in TypeExtractor definitions.
*/
object TypeExtractors extends DefaultImplicits {
sealed abstract class TypeExtractorImpl[T](implicit val converter: TypeConverter[String, T]) extends TypeExtractor[T]
sealed case class DateExtractor(format: Stri... | holycattle/skinny-framework | engine/src/main/scala/skinny/engine/implicits/TypeExtractors.scala | Scala | mit | 964 |
package scala.xml
import scala.xml.transform._
import org.junit.Test
import org.junit.Assert.assertTrue
import org.junit.Assert.assertEquals
import org.junit.experimental.theories.Theories
import org.junit.experimental.theories.Theory
import org.junit.experimental.theories.DataPoints
import org.junit.runner.RunWith
/*... | biswanaths/scala-xml | src/test/scala/scala/xml/ReuseNodesTest.scala | Scala | bsd-3-clause | 3,562 |
package com.itszuvalex.femtocraft.configuration
import java.io.File
import java.util
import scala.xml.{PrettyPrinter, XML}
/**
* Created by Chris on 12/5/2014.
*/
abstract class XMLLoaderWriter[Type](file: File) {
val initialized: Boolean = file.exists
if (!initialized) {
XML.save(file.getPath, <xml></xml>... | Itszuvalex/Femtocraft-alpha-1 | src/main/java/com/itszuvalex/femtocraft/configuration/XMLLoaderWriter.scala | Scala | gpl-2.0 | 633 |
/*
* 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/test/scala/uk/gov/hmrc/ct/accounts/frs105/boxes/AC425Spec.scala | Scala | apache-2.0 | 994 |
import definiti.native._
import java.time.LocalDateTime
package object tst {
object AliasString {
val verification: Verification[String] = Verification.none[String]
}
} | definiti/definiti-scala-model | src/test/resources/samples/nominal/package/output.scala | Scala | mit | 177 |
package rere.sasl.scram.client
import rere.sasl.scram.messages.{ClientFinalMessage, ServerFinalMessage}
import rere.sasl.util.Base64String
trait ClientFinalStep {
def finalMessage: ClientFinalMessage
def process(serverFinalMessage: ServerFinalMessage): Either[AuthError, String]
def isValidServerSignature(server... | pbaun/rere | modules/sasl/src/main/scala/rere/sasl/scram/client/ClientFinalStep.scala | Scala | apache-2.0 | 356 |
/*
* 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 | core/src/test/scala/org/apache/spark/shuffle/sort/SortShuffleWriterSuite.scala | Scala | apache-2.0 | 4,105 |
/*
* Copyright 2011-2019 Asakusa Framework Team.
*
* 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 ... | ueshin/asakusafw-spark | runtime/src/main/scala/com/asakusafw/spark/runtime/graph/Job.scala | Scala | apache-2.0 | 1,227 |
/*
* Copyright 2013 Grégory Marti
*
* 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... | gmarti/recaptcha4s | src/main/scala/net/gsm/recaptcha/ReCaptchaUrls.scala | Scala | apache-2.0 | 791 |
package co.s4n
import org.scalatest.FunSuite
import shapeless._
import record._
import syntax.singleton._
class RecordTest extends FunSuite {
test("") {
val cars = ('make ->> Make("Tesla")) ::
('model ->> Model("S")) ::
('year ->> Year(2015)) :: HNil
assert(Make("Tesla") === cars('make))
a... | yujikiriki/shapeless-test | src/test/scala/co/s4n/4_RecordTest.scala | Scala | unlicense | 523 |
package scavlink.connection
import java.nio.ByteOrder
import akka.util.{ByteIterator, ByteStringBuilder}
import scavlink.message.enums.MavAutopilot
import scala.language.implicitConversions
/**
* Conversions between message fields and byte sequences.
*
* The method names and implicit parameters here make it easy... | nickolasrossi/scavlink | src/main/scala/scavlink/connection/marshal/package.scala | Scala | mit | 11,181 |
package japgolly.microlibs.compiletime
import scala.deriving.*
import scala.quoted.*
import MacroEnv.*
trait Field {
type Name
type Type
val idx: Int
val name: String
def showType: String
implicit val typeInstance: scala.quoted.Type[Type]
override def toString = s"[Field $idx] $name: $showType"
fin... | japgolly/microlibs-scala | compile-time/shared/src/main/scala-3/japgolly/microlibs/compiletime/Field.scala | Scala | apache-2.0 | 1,942 |
package com.overviewdocs.sort
import akka.stream.scaladsl.Source
import com.ibm.icu.text.{Collator,RawCollationKey}
import com.fasterxml.jackson.core.{JsonFactory,JsonToken,SerializableString}
import com.fasterxml.jackson.core.io.SerializedString
import java.util.{Arrays,Locale}
import scala.collection.immutable
impor... | overview/overview-server | worker/src/main/scala/com/overviewdocs/sort/DocumentSource.scala | Scala | agpl-3.0 | 3,409 |
/*
* 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 n... | TiVo/kafka | core/src/main/scala/kafka/controller/ControllerEventManager.scala | Scala | apache-2.0 | 5,136 |
package viscel.crawl
import java.util.concurrent.CancellationException
import viscel.narration.Narrator
import viscel.netzi.{VRequest, VResponse, WebRequestInterface}
import viscel.shared.{DataRow, Log}
import viscel.store.{BlobStore, Book, DescriptionCache, RowAppender, RowStoreV4}
import scala.concurrent.{Executio... | rmgk/viscel | code/jvm/src/main/scala/viscel/crawl/CrawlServices.scala | Scala | agpl-3.0 | 3,230 |
package fpinscala.laziness
import Stream._
trait Stream[+A] {
def foldRight[B](z: => B)(f: (A, => B) => B): B = // The arrow `=>` in front of the argument type `B` means that the function `f` takes its second argument by name and may choose not to evaluate it.
this match {
case Cons(h,t) => f(h(), t().fol... | benkio/fpinscala | exercises/src/main/scala/fpinscala/laziness/Stream.scala | Scala | mit | 6,264 |
package org.testobjects
import java.util.UUID
trait ATestString {
val decimal: String = "0.0"
val emailAddress: String = "mailbox@domain.com"
def nonEmpty: String = "nonEmpty"
val nonNull: String = ""
val integer: String = "0"
def ofLength(length: Int): String = Array.fill(length)("a").mkString
d... | test-objects/test-objects-for-scala-jvm1.7 | src/main/scala/org/testobjects/ATestString.scala | Scala | apache-2.0 | 472 |
import scala.tools.partest._
import java.io.{Console => _, _}
object Test extends DirectTest {
override def extraSettings: String = "-usejavacp -cp " + testOutput.path
override def code = ""
override def show(): Unit = {
val g = newCompiler()
withRun(g)(r => {
val c = g.rootMirror.getRequiredCla... | yusuke2255/dotty | tests/pending/run/t8708_b/Test_2.scala | Scala | bsd-3-clause | 583 |
package mesosphere.marathon
package core.plugin.impl
import java.net.{ URL, URLClassLoader }
import java.util.ServiceLoader
import mesosphere.marathon.core.plugin.impl.PluginManagerImpl._
import mesosphere.marathon.core.plugin.{ PluginDefinition, PluginDefinitions, PluginManager }
import mesosphere.marathon.io.IO
imp... | Caerostris/marathon | src/main/scala/mesosphere/marathon/core/plugin/impl/PluginManagerImpl.scala | Scala | apache-2.0 | 4,163 |
package mesosphere.marathon.api
import javax.inject.Inject
import mesosphere.marathon.Protos.MarathonTask
import mesosphere.marathon.state.{ AppDefinition, GroupManager, PathId, Timestamp }
import mesosphere.marathon.tasks.TaskTracker
import mesosphere.marathon.upgrade.DeploymentPlan
import mesosphere.marathon.{ Mara... | sledigabel/marathon | src/main/scala/mesosphere/marathon/api/TaskKiller.scala | Scala | apache-2.0 | 1,612 |
/*******************************************************************************
* Copyright 2017 Capital One Services, LLC and Bitwise, 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... | capitalone/Hydrograph | hydrograph.engine/hydrograph.engine.spark/src/main/scala/hydrograph/engine/spark/components/RemoveDupsComponent.scala | Scala | apache-2.0 | 7,270 |
package chandu0101.scalajs.react.components
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.html_<^._
import org.scalajs.dom
import org.scalajs.dom.html
object ReactPopOver {
import RCustomStyles._
object DomUtil {
def offset(element: html.Element) = {
val rect = element.getBou... | chandu0101/scalajs-react-components | core/src/main/scala/chandu0101/scalajs/react/components/ReactPopOver.scala | Scala | apache-2.0 | 7,619 |
/**
* Copyright 2015 Adrian Hurtado (adrianhurt)
*
* 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 l... | mkurz/play-bootstrap3 | play24-bootstrap4/sample/app/utils/BSVersion.scala | Scala | apache-2.0 | 986 |
// Copyright 2013 Foursquare Labs Inc. All Rights Reserved.
package io.fsq.spindle.codegen.parser
import io.fsq.spindle.__shaded_for_spindle_bootstrap__.descriptors.{
Annotation => ThriftAnnotation,
BaseType => ThriftBaseType,
Const => ThriftConst,
ContainerType => ThriftContainerType,
Enum => ThriftEnum,
... | foursquare/fsqio | src/jvm/io/fsq/spindle/codegen/parser/ThriftParser.scala | Scala | apache-2.0 | 22,494 |
package scalation
/** The `relalgebra` package contains classes, traits and objects for
* columnar relational algebra, where columns are vectors from
* the `linalgebra` package.
*/
package object relalgebra { }
| NBKlepp/fda | scalation_1.3/scalation_mathstat/src/main/scala/scalation/relalgebra/package.scala | Scala | mit | 220 |
import sbt._
import Keys._
import Settings._
import java.io.{File, IOException, FileInputStream}
import org.apache.commons.codec.binary.Base64
import scala.util.parsing.json.JSON
import scalaj.http._
import scala.util.{Try, Success, Failure}
case class MapMapString (val map: Map[String, Map[String, String]])
/**
... | jakdemir/fpps | patmat/project/StudentBuildLike.scala | Scala | gpl-3.0 | 9,492 |
/*
* 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 ... | spark-test/spark | mllib/src/main/scala/org/apache/spark/ml/classification/NaiveBayes.scala | Scala | apache-2.0 | 23,071 |
/*
* 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 n... | ravipesala/incubator-carbondata | integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/CompactionSupportSpecifiedSegmentsTest.scala | Scala | apache-2.0 | 4,600 |
package scala.collection
import org.scalacheck.Arbitrary._
import org.scalacheck.Prop.forAll
import org.scalacheck._
object MapViewProperties extends Properties("MapView") {
type K = Int
type V = Int
type T = (K, V)
val x = MapView.from(List(1 -> ""))
property("filter behaves like Map.filter") = forAll {... | lrytz/scala | test/scalacheck/scala/collection/MapViewProperties.scala | Scala | apache-2.0 | 1,439 |
object RoomType extends Enumeration {
type RoomType = Value
val Battle, Merchant, Healer, Passageway = Value
}
import RoomType._
object Setup extends App {
def roomsByType(roomType: RoomType, level: Int = -1) : Map[String, Map[String, String]] = {
roomType match {
case Battle => Things.filter(Things.fi... | HokieGeek/catacombs | Setup.scala | Scala | mit | 1,478 |
package scan
import java.nio.file._
import scala.compat.java8.StreamConverters._
import scala.collection.SortedSet
import cats._
import cats.data._
import cats.implicits._
import mouse.all._
import org.atnos.eff._
import org.atnos.eff.all._
import org.atnos.eff.syntax.all._
import org.atnos.eff.addon.monix._
impo... | benhutchison/GettingWorkDoneWithExtensibleEffects | exerciseWriter/src/main/scala/scan/Scanner.scala | Scala | apache-2.0 | 6,308 |
package fr.atelechev.chess.fen2cb.validator
import org.scalatest.FlatSpec
import org.scalatest.Matchers.convertToAnyShouldWrapper
import org.scalatest.Matchers.be
class StyleNameValidatorTestSuite extends FlatSpec {
"isStyleNameValid(String)" should "return false for null arg" in {
StyleNameValidator.isStyleNa... | atelechev/fen2chessboard | components/core/src/test/scala/fr/atelechev/chess/fen2cb/validator/StyleNameValidatorTestSuite.scala | Scala | mit | 891 |
package featurebee.json
import java.util.Locale
import featurebee.impl._
import spray.json._
import scala.util.matching.Regex
object FeatureJsonProtocol extends DefaultJsonProtocol {
implicit object ConditionJsonFormat extends RootJsonFormat[Condition] {
def mapLocale(localeAsString: String): Locale = {
... | AutoScout24/featurebee-scala | src/main/scala/featurebee/json/FeatureJsonProtocol.scala | Scala | mit | 3,682 |
package kidstravel.client.logger
import scala.annotation.elidable
import scala.annotation.elidable._
trait Logger {
/*
* Use @elidable annotation to completely exclude functions from the compiler generated byte-code based on
* the specified level. In a production build most logging functions will simply disap... | devkat/kidstravel | client/src/main/scala/kidstravel/client/logger/LoggerFactory.scala | Scala | apache-2.0 | 1,911 |
package ckite.kvstore
import java.nio.ByteBuffer
import ckite.statemachine.StateMachine
import ckite.util.Serializer
import scala.collection.mutable.Map
class KVStore extends StateMachine {
private var map = Map[String, String]()
private var lastIndex: Long = 0
def applyWrite = {
case (index, Put(key: S... | pablosmedina/kvstore | src/main/scala/ckite/kvstore/KVStore.scala | Scala | apache-2.0 | 734 |
/*
* Copyright 2016 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | ahudspith-equalexperts/ct-calculations | src/main/scala/uk/gov/hmrc/ct/ct600j/v3/J15A.scala | Scala | apache-2.0 | 1,013 |
package propagator.forwards
import IFDS.{KillGenInfo}
import taintanalysis.{Fact, MStmt, Taint}
import org.opalj.tac._
import propagator.MethodFilteringPropagator
import org.opalj.br.Method
import util.Util
class ShortcutPropagator extends MethodFilteringPropagator(???) {
override def handleMethodCall(t: Taint,... | packlnd/IFDS-RA | src/main/scala/propagator/forwards/ShortcutPropagator.scala | Scala | mit | 827 |
package $package$
import android.os.Bundle
import android.support.v7.app.ActionBarActivity
class MainActivity extends ActionBarActivity with TypedActivity {
/**
* Called when the activity is first created.
*/
override def onCreate(savedInstanceState: Bundle): Unit = {
super.onCreate(savedInstanceState)
... | ryanbrozo/android-sbt-starter.g8 | src/main/g8/src/main/scala/$package$/MainActivity.scala | Scala | mit | 418 |
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.