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 2009-2016 EPFL, Lausanne */
package leon
package synthesis
import purescala.Path
import purescala.Expressions._
import purescala.ExprOps._
import purescala.Types._
import purescala.Common._
import purescala.Constructors._
import purescala.Extractors._
import purescala.Definitions.FunDef
import Witnesses.... | epfl-lara/leon | src/main/scala/leon/synthesis/Problem.scala | Scala | gpl-3.0 | 3,762 |
package scala.quoted
import scala.quoted.show.SyntaxHighlight
/** Quoted type (or kind) `T` */
class Type[T <: AnyKind] private[scala] {
type `$splice` = T
/** Show a source code like representation of this type without syntax highlight */
def show(using qctx: QuoteContext): String =
this.unseal.showWith(S... | som-snytt/dotty | library/src/scala/quoted/Type.scala | Scala | apache-2.0 | 1,951 |
///////////////////////////////////////////////////////////////////////////////
// WikipediaDoc.scala
//
// Copyright (C) 2010-2014 Ben Wing, 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.
//... | utcompling/textgrounder | src/main/scala/opennlp/textgrounder/geolocate/WikipediaDoc.scala | Scala | apache-2.0 | 5,053 |
/*
* 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 ... | brad-kaiser/spark | mllib/src/main/scala/org/apache/spark/ml/param/params.scala | Scala | apache-2.0 | 35,275 |
package utils
import play.api.Logger
import play.api.db.Database
import scala.concurrent.ExecutionContext.Implicits.global
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.Future
import sys.process._
/**
* Operations related to BAM files, such as inv
*/
object BamUtils {
val stdout = new St... | chuv-ssrc/bam-server-scala | app/utils/BamUtils.scala | Scala | gpl-3.0 | 1,653 |
/***********************************************************************
* 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... | jahhulbert-ccri/geomesa | geomesa-hbase/geomesa-hbase-datastore/src/test/scala/org/locationtech/geomesa/hbase/data/HBaseStatsAggregatorTest.scala | Scala | apache-2.0 | 9,359 |
package controllers
import play.api._
import play.api.mvc._
object Application extends Controller {
def index = Action {
Ok(views.html.index("Your new application is ready."))
}
def square = Action {
Ok(views.html.square("Square it!"))
}
}
| HenryHarper/Acquire-Reboot | gradle/samples/play/advanced/app/controllers/Application.scala | Scala | mit | 261 |
/*
* Copyright (c) 2013 Curry Order System authors.
* This file is part of Curry Order System. Please refer to the NOTICE.txt file for license details.
*/
package code.model
import _root_.net.liftweb.mapper._
import _root_.net.liftweb.util._
import _root_.net.liftweb.common._
import java.math.MathContext
class Cu... | scott-abernethy/curry-order-system | src/main/scala/code/model/Curry.scala | Scala | gpl-3.0 | 792 |
package ejemplos.interfaces
class Perro extends Mamifero with PuedeHacerRuido {
def mover(): String = "Yo camino y corro"
def hacerRuido(): String = "Guau"
}
| MontealegreLuis/programacion2 | src/main/scala/ejemplos/interfaces/Perro.scala | Scala | mit | 164 |
/*
* 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... | ioana-delaney/spark | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/complexTypesSuite.scala | Scala | apache-2.0 | 13,414 |
/******************************************************************************
* Copyright (c) 2014, Equal Experts Ltd
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of ... | EqualExperts/Midas | src/main/scala/com/ee/midas/transform/DocumentOperations.scala | Scala | bsd-2-clause | 8,557 |
/* Copyright 2009-2016 EPFL, Lausanne */
object Array2 {
def foo(): Int = {
val a = Array.fill(5)(0)
a(2) = 3
a.length
} ensuring(_ == 4)
}
| regb/leon | src/test/resources/regression/verification/xlang/invalid/Array2.scala | Scala | gpl-3.0 | 159 |
/*
* Copyright (C) 24/10/13 Romain Reuillon
*
* This program 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 later version.
*
* This pr... | ISCPIF/PSEExperiments | openmole-src/openmole/plugins/org.openmole.plugin.domain.range/src/main/scala/org/openmole/plugin/domain/range/SizeRange.scala | Scala | agpl-3.0 | 1,591 |
object Test {
def testMethodLocalCaseClass {
object MethodLocalWide
case class MethodLocalWide(
f01: Int, f02: Int, f03: Int, f04: Int, f05: Int, f06: Int, f07: Int, f08: Int, f09: Int, f10: Int,
f11: Int, f12: Int, f13: Int, f14: Int, f15: Int, ... | felixmulder/scala | test/files/run/t9567b.scala | Scala | bsd-3-clause | 795 |
/*
* Copyright 2016 The BigDL Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | jenniew/BigDL | spark/dl/src/test/scala/com/intel/analytics/bigdl/nn/LinearSpec.scala | Scala | apache-2.0 | 12,688 |
package com.github.mijicd.waes.domain
case class DiffResult(status: Status, differences: Option[Seq[Int]] = None)
object DiffResult {
val forEqual: DiffResult = DiffResult(Equal)
val forDifferentLengths: DiffResult = DiffResult(DifferentLength)
def forDifferences(differences: Seq[Int]): DiffResult =
DiffR... | mijicd/spray-json-diff | src/main/scala/com/github/mijicd/waes/domain/DiffResult.scala | Scala | mit | 360 |
/*
* Copyright 2016 The BigDL Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | intel-analytics/BigDL | scala/orca/src/main/scala/com/intel/analytics/bigdl/orca/net/TorchLoss.scala | Scala | apache-2.0 | 3,480 |
/*
* 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 ... | ron8hu/spark | sql/core/src/test/scala/org/apache/spark/sql/test/DataFrameReaderWriterSuite.scala | Scala | apache-2.0 | 32,217 |
package bio.populator
import bio.core.BioUnitSpec
class KmerAnalyzerSpec extends BioUnitSpec {
describe("patternCount") {
it("should have size 0") {
val subject = KmerAnalyzer(NucleobaseSequence(""))
assert(subject.patternCount(NucleobaseSequence("")) == 0)
}
it("is simple count") {
v... | leoromanovsky/bioinformatics-coursera | populator/src/test/scala/bio/populator/KmerAnalyzerSpec.scala | Scala | apache-2.0 | 1,452 |
package se.ramn.sorting
import org.scalatest.FunSuite
import org.scalatest.FunSpec
//import org.scalameter.api._
class RadixLSDSortTest extends FunSpec {
describe("RadixLSDSort.apply") {
it("should sort strings") {
assertResult(Seq("aa", "ab", "ba", "bb", "cb")) {
RadixLSDSort(
Seq("ab"... | ramn/allehanda | src/test/scala/sorting/RadixLSDSortTest.scala | Scala | apache-2.0 | 1,685 |
package cms.dto
object EntryType extends Enumeration {
val Message = Value(1, "Message")
val HTML = Value(2, "HTML")
}
case class Entry(key: String, entryType: EntryType.Value, contents: List[Content])
case class Content(lang: String, value: String) | lukaszbudnik/hackaton-portal | app/cms/dto/Entry.scala | Scala | apache-2.0 | 256 |
/* sbt -- Simple Build Tool
* Copyright 2008, 2009, 2010 Mark Harrah
*/
package sbt
import java.io.File
import java.util.concurrent.Callable
import CommandSupport.{FailureWall, logger}
/**
Data structure representing all command execution information.
@param `configuration` provides access to the launcher envi... | kuochaoyi/xsbt | main/State.scala | Scala | bsd-3-clause | 9,757 |
/*
* 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... | brharrington/atlas | atlas-module-akka/src/test/scala/com/netflix/atlas/akka/AkkaModuleSuite.scala | Scala | apache-2.0 | 1,819 |
import org.apache.kafka.clients.consumer.ConsumerRecord
import org.apache.kafka.common.serialization.StringDeserializer
import org.apache.spark.streaming.kafka010._
import org.apache.spark.streaming.kafka010.LocationStrategies.PreferConsistent
import org.apache.spark.streaming.kafka010.ConsumerStrategies.Subscribe
impo... | imarios/spark-steaming-with-kafka | scripts/streaming.scala | Scala | apache-2.0 | 1,038 |
/*
* Copyright 2014 Ralf Steuerwald
*
* 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... | rsteuerw/ifmaps | src/main/scala/ifmaps/identifier.scala | Scala | apache-2.0 | 2,093 |
package template.server
object Index {
def apply(cacheBreaker: String, environment: Environment) = {
val mainScript = environment match {
case Environment.Dev => "client-fastopt.js"
case Environment.Prod => "client-opt.js"
}
s"""<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
... | markschaake/akka-http-scalajs | server/src/main/scala/server/Index.scala | Scala | mit | 854 |
package breeze.stats
import breeze.generic.UFunc
import breeze.linalg._
import breeze.linalg.support.CanTraverseValues.ValuesVisitor
import breeze.linalg.support.CanZipAndTraverseValues.PairValuesVisitor
import breeze.linalg.support.{CanTraverseValues, CanZipAndTraverseValues}
import breeze.stats.hist.Impl3
import bre... | scalanlp/breeze | math/src/main/scala/breeze/stats/hist.scala | Scala | apache-2.0 | 4,799 |
package breeze.util
/**Base class for all option case classes in breeze
* @author ktakagaki
* @date 04/16/2014.
*/
abstract class Opt
| chen0031/breeze | math/src/main/scala/breeze/util/Opt.scala | Scala | apache-2.0 | 138 |
/**
* IUPAC Nucleotide Sequence represents a Sequence that uses the
* ambiguous code:
*
* Symbol Meaning Nucleic Acid
* ------------------------------------------
* A A Adenine
* C C Cytosine
* G G Guanine
* T T ... | bioscala/bioscala | src/main/scala/bio/sequence/iupacsequence.scala | Scala | bsd-2-clause | 4,357 |
/*
* Copyright 2007-2010 WorldWide Conferencing, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | jeppenejsum/liftweb | framework/lift-modules/lift-widgets/src/main/scala/net/liftweb/widgets/calendars/CalendarUtils.scala | Scala | apache-2.0 | 2,678 |
/*
* 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... | travisbrown/scalatest | src/test/scala/org/scalatest/UnitSpec.scala | Scala | apache-2.0 | 668 |
package stats
import java.nio.channels.DatagramChannel
import scala.concurrent.{ ExecutionContext, Future }
import scala.util.control.NoStackTrace
import java.net.InetSocketAddress
import java.nio.ByteBuffer
trait Transport {
def send(stats: Seq[Stat]): Future[(Seq[Stat], Boolean)]
def close()
}
object Transport... | softprops/stats | src/main/scala/Transport.scala | Scala | mit | 1,530 |
package org.sisioh.aws4s.s3
import java.io.{ File, InputStream }
import java.net.URL
import java.util.Date
import com.amazonaws.services.s3.model._
import com.amazonaws.services.s3.{ AmazonS3Client, S3ResponseMetadata }
import com.amazonaws.{ AmazonWebServiceRequest, HttpMethod }
import org.sisioh.aws4s.PimpedType
i... | everpeace/aws4s | aws4s-s3/src/main/scala/org/sisioh/aws4s/s3/RichAmazonS3Client.scala | Scala | mit | 17,183 |
/*
* 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 ... | mrchristine/spark-examples-dbc | src/main/scala/org/apache/spark/examples/ml/Word2VecExample.scala | Scala | apache-2.0 | 1,872 |
package com.gl.barbell.lotteries.redballs
import com.gl.barbell.core.{FalseRationality, NumberBasedLottery, Rule}
import com.gl.barbell.lotteries.UniqueRandomNumberLotteryShaker
import com.gl.barbell.presenters.{ConsolePresenter, FilePresenter, TaobaoFormatter}
import com.gl.barbell.rules._
object RedBallsApp extends... | ajaxchelsea/barbell | src/main/scala/com/gl/barbell/lotteries/redballs/RedBallsApp.scala | Scala | gpl-2.0 | 1,238 |
package io.buoyant.router
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.twitter.conversions.DurationOps._
import com.twitter.finagle.{ServiceFactory, Stack}
import com.twitter.finagle.service.{Retries, RetryBudget}
import com.twitter.finagle.Backoff
import com.twitter.util.Duration
objec... | linkerd/linkerd | router/core/src/main/scala/io/buoyant/router/RetryBudgetModule.scala | Scala | apache-2.0 | 1,637 |
package Actors
import helper.ActorHelper
/**
* Name used on the event bus to identify stream like objects.
*/
case class StreamTopic private(value: String)
object StreamTopic
{
/**
* Get topic of already validated string path.
*/
private def forString(path: String): StreamTopic =
StreamTopic(path.to... | mattbierner/blotre | app/Actors/StreamTopic.scala | Scala | mit | 870 |
/*
* The MIT License
*
* Copyright (c) 2016 Fulcrum Genomics LLC
*
* 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... | fulcrumgenomics/dagr | tasks/src/main/scala/dagr/tasks/gatk/Mutect1.scala | Scala | mit | 3,342 |
package org.jetbrains.plugins.scala.codeInspection.unused.testingFrameworks
import org.jetbrains.plugins.scala.DependencyManagerBase.RichStr
import org.jetbrains.plugins.scala.base.LibrariesOwner
import org.jetbrains.plugins.scala.base.libraryLoaders.{IvyManagedLoader, LibraryLoader}
import org.jetbrains.plugins.scala... | JetBrains/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/codeInspection/unused/testingFrameworks/Specs2Test.scala | Scala | apache-2.0 | 806 |
package timeusage
import org.apache.spark.sql.{ColumnName, DataFrame, Row}
import org.apache.spark.sql.types.{
DoubleType,
StringType,
StructField,
StructType
}
import org.apache.spark.sql.functions._
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatest.{BeforeAndAfterAll... | jeffreylloydbrown/classwork | BigDataAndSpark/timeusage/src/test/scala/timeusage/TimeUsageSuite.scala | Scala | unlicense | 8,308 |
/*
* Copyright (C) 2011 Mathias Doenitz
*
* 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... | spray/spray-json | src/test/scala/spray/json/JsonParserSpec.scala | Scala | apache-2.0 | 7,933 |
/*
* 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/CorrelateITCase.scala | Scala | apache-2.0 | 12,588 |
package services.comment
import services.auth.providers.Facebook
object FacebookCommenter extends GenericCommenter {
override val authProvider = Facebook
override def urlToComment(comment: models.Comment) =
"https://graph.facebook.com/" + comment.providerId + "/comments"
override def commentParams(i... | Froggies/Skimbo | app/services/comment/FacebookCommenter.scala | Scala | agpl-3.0 | 431 |
/*
* Copyright 2010-2011 WorldWide Conferencing, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | lzpfmh/framework-2 | core/common/src/test/scala/net/liftweb/common/ConversionsSpec.scala | Scala | apache-2.0 | 2,690 |
/**
* *****************************************************************************
* Copyright 2014 Katja Hahn
*
* 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... | katjahahn/PortEx | src/main/java/com/github/katjahahn/parser/sections/edata/ExportSection.scala | Scala | apache-2.0 | 16,621 |
package sigmastate
import special.collections.BenchmarkGens
import org.scalameter.api.Bench
import sigmastate.Values.{SValue, IntConstant, Constant}
import sigmastate.serialization.OpCodes.PlusCode
import spire.syntax.all.cfor
object ErgoTreeBenchmarks extends Bench.LocalTime with BenchmarkGens { suite: Bench[Double]... | ScorexFoundation/sigmastate-interpreter | sigmastate/src/test/scala/sigmastate/ErgoTreeBenchmarks.scala | Scala | mit | 1,874 |
package controllers
import play.api.mvc._
import models.AthleteFactory
import models.RaceFactory
import models.Race
import models.livetiming.LiveTiming
import play.api.Play.current
import play.api.Logger
import play.api.libs.ws._
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
... | saine1a/IMDRaces | app/controllers/Application.scala | Scala | mit | 3,472 |
package com.neilconcepts
import io.finch._
import com.twitter.finagle.Http
import com.twitter.util.Await
object Server extends App {
val api: Endpoint[String] = get("hello") { Ok("Hello, World!") }
Await.ready(Http.serve(":8080", api.toService))
}
| bneil/fcs_boilerplate | src/main/scala/com/neilconcepts/Server.scala | Scala | mit | 255 |
/*
* Copyright (C) 2007 Lalit Pant <pant.lalit@gmail.com>
*
* The contents of this file are subject to the GNU General Public License
* Version 3 (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.gnu.org/copyleft/gpl.html
*
... | litan/jiva-ng | src/main/scala/net/kogics/jiva/evolution/GenerationalReplacer.scala | Scala | gpl-3.0 | 800 |
package cn.dunn.util
import cn.dunn.message.{GroupMessage, ChatMessage}
import org.json4s.ShortTypeHints
import org.json4s.native.Serialization
/**
* 转换json工具类
*/
object JSONObject {
implicit val formats = Serialization.formats(
ShortTypeHints(
List(
classOf[ChatMessage],
classOf[Group... | weimeittx/IM | util/src/main/scala/cn/dunn/util/JSONObject.scala | Scala | apache-2.0 | 443 |
package com.vivint.ceph.orchestrator
import com.vivint.ceph.JobsState
object Orchestrator {
/**
* Bootstraps the orchestrator
*/
def run(jobs: JobsState): Unit = {
val orchestratorFSM = new OrchestratorFSM(Bootstrap.Start, jobs)
jobs.addSubscriber(orchestratorFSM.update)
}
}
| vivint-smarthome/ceph-on-mesos | src/main/scala/com/vivint/ceph/orchestrator/Orchestrator.scala | Scala | apache-2.0 | 300 |
import com.mongodb._
/**
*
* @param host
* @param port
*/
class MongoClient(val host: String, val port: Int) {
require(host != null, "You have to provide a host name")
private val underlying = new Mongo(host, port)
def this() = this("127.0.0.1", 27017)
def version = underlying.getVersion
def dropDB(na... | ScalaPlayAkka/ScalaSimple | src/MongoClient.scala | Scala | apache-2.0 | 477 |
package gov.uk.hmrc.cafe
/**
* Created by ashwini on 07/02/17.
*/
case class Item(price: Double, name: String) | ashwinirudrappa/Cafe | src/main/scala/gov/uk/hmrc/cafe/Item.scala | Scala | mit | 115 |
/**
* @author e.e d3si9n
*/
import scalaxb._
import anycontent._
object AnyUsage {
def main(args: Array[String]): Unit = {
allTests
}
def allTests = {
testAny
testAny2
testAny3
true
}
def testAny = {
val subject = <foo xmlns="http://www.example.com/any"
xmlns:xs="http:... | eed3si9n/scalaxb | integration/src/test/resources/AnyUsage.scala | Scala | mit | 8,196 |
package io.waylay.influxdb
import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import com.spotify.docker.client.DefaultDockerClient
import com.typesafe.config.ConfigFactory
import com.whisk.docker.testkit.{
Container, ContainerCommandExecutor, ContainerSpec, DockerContainerManager, DockerReadyChecker,... | waylayio/influxdb-scala | src/it/scala/io/waylay/influxdb/IntegrationSpec.scala | Scala | mit | 2,836 |
package daos
import scala.concurrent.Future
import play.api.Play._
import play.api.libs.json._
import playground.log._
import playground.models._
import reactivemongo.core.commands.LastError
import reactivemongo.bson._
import play.modules.reactivemongo.ReactiveMongoPlugin
import play.modules.reactivemongo.json.coll... | ybr/PlayBootstrap | app/daos/UserMongoDAO.scala | Scala | mit | 2,174 |
package io.buoyant.namerd.iface
import com.twitter.conversions.time._
import com.twitter.finagle._
import com.twitter.finagle.naming.NameInterpreter
import com.twitter.finagle.stats.NullStatsReceiver
import com.twitter.util.{Activity, Await, Duration, Var}
import io.buoyant.namer.{Metadata, DelegateTree, Delegator}
im... | denverwilliams/linkerd | namerd/iface/interpreter-thrift/src/test/scala/io/buoyant/namerd/iface/ThriftNamerInterfaceTest.scala | Scala | apache-2.0 | 9,800 |
/**
* Ahis file is part of the AABuddy project.
* Copyright (c) 2012-2013 Alexey Aksenov ezh@ezh.msk.ru
*
* Ahis program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Global License version 3
* as published by the Free Software Foundation with the addition ... | digimead/digi-TABuddy-desktop | part-core/src/main/scala/org/digimead/tabuddy/desktop/core/support/WritableValue.scala | Scala | agpl-3.0 | 5,298 |
package org.jetbrains.plugins.scala
package debugger.evaluateExpression
import org.jetbrains.plugins.scala.debugger._
import org.junit.experimental.categories.Category
/**
* Nikolay.Tropin
* 12/9/13
*/
@Category(Array(classOf[DebuggerTests], classOf[SlowTests]))
class ScalaImportedEvaluationTest extends ScalaIm... | triplequote/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/debugger/evaluateExpression/ScalaImportedEvaluationTest.scala | Scala | apache-2.0 | 7,967 |
package models
import animatedPotato.protocol.protocol.IdType
import core.BaseModel
case class Category(id: Option[IdType], category: String) extends BaseModel
| fikrimuhal/animated-potato | backend/AnimatedPotatoBackend/app/models/Category.scala | Scala | gpl-3.0 | 162 |
package io.github.binaryfoo.lagotto.shell
import java.io.{File, FileOutputStream, FileWriter, PrintStream, PrintWriter}
import java.net.{HttpURLConnection, Socket, URL}
import io.github.binaryfoo.lagotto._
import io.github.binaryfoo.lagotto.output.{GnuplotOptions, GnuplotScriptWriter}
import io.github.binaryfoo.lagot... | binaryfoo/lagotto | src/main/scala/io/github/binaryfoo/lagotto/shell/Sink.scala | Scala | mit | 9,379 |
package be.wegenenverkeer.atomium.server.play
import be.wegenenverkeer.atomium.format.Feed
trait FeedMarshaller[T] {
/** The content type */
type ContentType = String
/**
* Serializes a `Feed` to `Array[Byte]` format
*
* @return a tuple of `ContentType` (ie: String) indicating the serialized format a... | joachimvda/atomium | modules/server-play/src/main/scala/be/wegenenverkeer/atomium/server/play/FeedMarshaller.scala | Scala | mit | 441 |
/**
* MIT License
*
* Copyright (c) 2016-2018 James Sherwood-Jones <james.sherwoodjones@gmail.com>
*
* 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, includi... | jSherz/lsd-members | backend/src/test/scala/com/jsherz/luskydive/apis/CoursesGetApiSpec.scala | Scala | mit | 3,602 |
/*
* Copyright 2016 Nicolas Rinaudo
*
* 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... | nrinaudo/kantan.codecs | refined/core/jvm/src/test/scala/kantan/codecs/refined/SerializationTests.scala | Scala | apache-2.0 | 1,140 |
package io.buoyant.linkerd
import com.twitter.finagle.param
import com.twitter.finagle.stats.InMemoryStatsReceiver
import com.twitter.finagle.tracing._
import io.buoyant.config.{ConflictingLabels, ConflictingPorts, ConflictingSubtypes}
import io.buoyant.namer.Param.Namers
import io.buoyant.namer.{ConflictingNamerIniti... | hhtpcd/linkerd | linkerd/core/src/test/scala/io/buoyant/linkerd/LinkerTest.scala | Scala | apache-2.0 | 8,278 |
package org.jetbrains.plugins.dotty.lang.parser
import org.jetbrains.plugins.dotty.lang.parser.parsing.Program
import org.jetbrains.plugins.dotty.lang.parser.parsing.expressions.BlockExpr
import org.jetbrains.plugins.scala.lang.parser.ScalaParser
/**
* @author adkozlov
*/
class DottyParser extends ScalaParser {
... | whorbowicz/intellij-scala | src/org/jetbrains/plugins/dotty/lang/parser/DottyParser.scala | Scala | apache-2.0 | 411 |
package com.etsy.sbt
case class Test(x: Int)
| etsy/sbt-compile-quick-plugin | src/sbt-test-1.0/compile-quick/compile-quick/src/test/scala/com/etsy/sbt/Test.scala | Scala | mit | 46 |
/*
* Copyright 2001-2009 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... | kevinwright/scalatest | src/main/scala/org/scalatest/verb/StringVerbBlockRegistration.scala | Scala | apache-2.0 | 2,500 |
package controllers
import db.{Authorization, MembershipsDao}
import io.flow.common.v0.models.UserReference
import io.flow.dependency.v0.models.json._
import io.flow.dependency.v0.models.{Membership, MembershipForm, Role}
import io.flow.error.v0.models.json._
import io.flow.play.controllers.FlowControllerComponents
im... | flowcommerce/dependency | api/app/controllers/Memberships.scala | Scala | mit | 2,530 |
package org.jetbrains.plugins.scala.testingSupport.scalatest.staticStringTest
import org.jetbrains.plugins.scala.testingSupport.scalatest.ScalaTestTestCase
/**
* @author Roman.Shein
* @since 26.06.2015.
*/
trait WordSpecStaticStringTest extends ScalaTestTestCase {
val wordSpecClassName = "WordSpecStringTest"
... | double-y/translation-idea-plugin | test/org/jetbrains/plugins/scala/testingSupport/scalatest/staticStringTest/WordSpecStaticStringTest.scala | Scala | apache-2.0 | 1,857 |
package org.jetbrains.plugins.scala
package codeInsight
import com.intellij.codeInsight.completion.{CodeCompletionHandlerBase, CompletionType}
import com.intellij.codeInsight.lookup.impl.LookupImpl
import com.intellij.codeInsight.lookup.{LookupElement, LookupManager}
import com.intellij.openapi.actionSystem.IdeActions... | ilinum/intellij-scala | test/org/jetbrains/plugins/scala/codeInsight/ScalaCodeInsightTestBase.scala | Scala | apache-2.0 | 2,513 |
package org.wartremover
package contrib.warts
object SymbolicName extends WartTraverser {
private val validChars = "[a-zA-Z_]+".r
def apply(u: WartUniverse): u.Traverser = {
import u.universe._
def isSymbolic(name: String) = validChars.replaceAllIn(name, "").length > 2
new u.Traverser {
overr... | tim-zh/wartremover-contrib | core/src/main/scala/wartremover/contrib/warts/SymbolicName.scala | Scala | apache-2.0 | 717 |
package scala.meta.tests.metacp
import coursier._
import coursier.util.Gather
import coursier.util.Task
import java.io.OutputStreamWriter
import java.io.PrintStream
import scala.concurrent.ExecutionContext.Implicits.global
import scala.meta.AbsolutePath
case class ModuleID(organization: String, name: String, version:... | MasseGuillaume/scalameta | tests/jvm/src/main/scala/scala/meta/tests/metacp/Jars.scala | Scala | bsd-3-clause | 2,685 |
package com.oomagnitude.metrics.model
case class ExperimentRunId(experimentId: ExperimentId, date: String) {
val experiment = experimentId.experiment
override def toString: String = experimentId.toString + "/" + date
} | oomagnitude/metrics-shared | metrics/shared/src/main/scala/com/oomagnitude/metrics/model/ExperimentRunId.scala | Scala | apache-2.0 | 224 |
/**
* Copyright (C) 2014 TU Berlin (peel@dima.tu-berlin.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.apache.org/licenses/LICENSE-2.0
*
* Unless required... | peelframework/peel | peel-core/src/main/scala/org/peelframework/core/cli/command/db/Import.scala | Scala | apache-2.0 | 5,408 |
package scalariform.lexer
object NoHiddenTokens extends HiddenTokens(Nil)
case class HiddenTokens(tokens: List[HiddenToken]) extends Iterable[HiddenToken] {
def removeInitialWhitespace = HiddenTokens(tokens.dropWhile(_.isInstanceOf[Whitespace]))
override def iterator: Iterator[HiddenToken] = tokens.iterator
... | mdr/scalariform | scalariform/src/main/scala/scalariform/lexer/HiddenTokens.scala | Scala | mit | 1,362 |
package com.twitter.finagle.mux.lease
import com.twitter.finagle.{Service, ServiceFactory}
import com.twitter.finagle.stats.StatsReceiver
import com.twitter.finagle.transport.Transport
import com.twitter.util.Future
import java.net.SocketAddress
private[finagle] trait Acting {
def isActive: Boolean
}
private[finag... | JustinTulloss/finagle | finagle-mux/src/main/scala/com/twitter/finagle/mux/lease/LeasedBridge.scala | Scala | apache-2.0 | 995 |
package com.karasiq.bootstrap4.table
import rx.Rx
import com.karasiq.bootstrap.components.BootstrapComponents
import com.karasiq.bootstrap.context.RenderingContext
trait UniversalTables { self: RenderingContext with BootstrapComponents with Tables ⇒
import scalaTags.all._
type Table = UniversalTable
object Ta... | Karasiq/scalajs-bootstrap | library-v4/shared/src/main/scala/com/karasiq/bootstrap4/table/UniversalTables.scala | Scala | mit | 1,244 |
package elcurto99.scalaquestrade.models
import elcurto99.scalaquestrade.models.Currency.Currency
/**
* Models the response from an Account Balances request
*
* @see http://www.questrade.com/api/documentation/rest-operations/account-calls/accounts-id-balances
*/
case class BalancesResponse (
perCurrencyBalan... | elcurto99/scala-questrade | src/main/scala/elcurto99/scalaquestrade/models/Balance.scala | Scala | mit | 636 |
/*
* Copyright (c) 2012 SnowPlow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org... | abhibond/scalding-template | project/Dependencies.scala | Scala | apache-2.0 | 2,498 |
/**
* (c) Copyright 2013 WibiData, Inc.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of... | kijiproject/kiji-express | kiji-express/src/test/scala/org/kiji/express/flow/framework/serialization/KryoKijiSuite.scala | Scala | apache-2.0 | 5,312 |
package opennlp.scalabha.tag.support
import opennlp.scalabha.util.CollectionUtils._
import opennlp.scalabha.util.LogNum
import opennlp.scalabha.util.LogNum._
import org.apache.commons.logging.LogFactory
/**
* Utilities for frequency distributions: functions to probabilities: P(B).
*/
object FreqDist {
/**
* R... | dhgarrette/type-supervised-tagging-2012emnlp | src/main/scala/opennlp/scalabha/tag/support/FreqDist.scala | Scala | apache-2.0 | 3,476 |
package com.edinhodzic.service.controller
import javax.ws.rs.core.Response.Status._
import com.edinhodzic.service.Paginated
import com.edinhodzic.service.domain.Resource
import com.edinhodzic.service.repository.{AbstractPartialCrudRepository, PartialUpdates, Queryable}
import org.specs2.mock.Mockito
import scala.uti... | edinhodzic/jersey-rest-service | src/test/scala/com/edinhodzic/service/controller/QueryableRestControllerWithPartialUpdatesSpec.scala | Scala | apache-2.0 | 2,423 |
package com.datawizards.sparklocal.session
import com.datawizards.sparklocal.SparkLocalBaseTest
import com.datawizards.sparklocal.TestModel._
import com.datawizards.sparklocal.datastore.{CSVDataStore, JsonDataStore}
import com.datawizards.sparklocal.implicits._
import org.junit.runner.RunWith
import org.scalatest.juni... | piotr-kalanski/spark-local | src/test/scala/com/datawizards/sparklocal/session/ReadFileTest.scala | Scala | apache-2.0 | 1,944 |
package appcache
import scala.util.matching.Regex
import java.io.{ File, FileNotFoundException }
import java.net.URL
import play.api._
import play.api.Play.current
object Resource {
private val HTTP_SCHEME_REG = """(^https?://.+)""".r
private val IGNORE_REG = """.*~$""".r
private val ASSET_REG = """^@(.*)""... | hnakagawa/play2-appcache | project-code/app/appcache/Resource.scala | Scala | apache-2.0 | 2,250 |
/**
* ____ __ ____ ____ ____,,___ ____ __ __ ____
* ( _ \\ /__\\ (_ )(_ _)( ___)/ __) ( _ \\( )( )( _ \\ Read
* ) / /(__)\\ / /_ _)(_ )__) \\__ \\ )___/ )(__)( ) _ < README.txt
* (_)\\_)(__)(__)(____)(____)(____)(___/ (__) (______)(____/ LICENSE.txt
*/
... | razie/wikireactor | diesel/src/main/scala/razie/tconf/parser/parser.scala | Scala | apache-2.0 | 773 |
/*
* Copyright 2011 University of Wisconsin, Milwaukee
*
* 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... | djspiewak/scala-bison | src/edu/uwm/cs/scalabison/ErrorAction.scala | Scala | apache-2.0 | 758 |
/**
* Copyright 2015 ICT.
*
* 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
... | DataSysLab/netflow | common/src/main/scala/cn/ac/ict/acs/netflow/ha/RecoveryModeFactory.scala | Scala | apache-2.0 | 1,494 |
/*
* Copyright 2013 Stephane Godbillon
* @sgodbillon
*
* 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 applicab... | reactific/ReactiveMongo | bson/src/test/scala/Handlers.scala | Scala | apache-2.0 | 6,965 |
package angulate.ionic
import scala.scalajs.js
trait Platform extends js.Object {
/**
* Whether the device is ready
*/
val isReady: Boolean = js.native
/**
* Whether the device is full screen.
*/
val isFullScreen: Boolean = js.native
/**
* An array of all platforms found.
*/
val platf... | ludovicc/scalajs-ionic | src/main/scala/angulate/ionic/Platform.scala | Scala | mit | 3,221 |
package ml.combust.mleap.bundle.ops.feature
import ml.combust.bundle.BundleContext
import ml.combust.bundle.dsl._
import ml.combust.bundle.op.OpModel
import ml.combust.mleap.bundle.ops.MleapOp
import ml.combust.mleap.core.feature.NGramModel
import ml.combust.mleap.runtime.MleapContext
import ml.combust.mleap.runtime.t... | combust/mleap | mleap-runtime/src/main/scala/ml/combust/mleap/bundle/ops/feature/NGramOp.scala | Scala | apache-2.0 | 1,105 |
package com.mindcandy.waterfall.io
import com.mindcandy.waterfall.PlainTextFormat
import com.mindcandy.waterfall.intermediate.MemoryIntermediate
import org.junit.runner.RunWith
import org.specs2.Specification
import org.specs2.runner.JUnitRunner
import scala.io.Source
@RunWith(classOf[JUnitRunner])
class S3IOSpec ex... | mindcandy/waterfall | src/it/scala/com/mindcandy/waterfall/io/S3IOSpec.scala | Scala | mit | 1,224 |
/*
* 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/runtime/harness/StateCleaningCountTriggerHarnessTest.scala | Scala | apache-2.0 | 5,845 |
package com.fhuertas.string.comparator.web
import com.fhuertas.string.comparator.conf.Configuration
import com.fhuertas.string.comparator.model.imp.ParsedStringDouble
import play.api.libs.json.Json
import spray.http.StatusCodes.BadRequest
import spray.routing.{HttpService, Route}
import scala.util.Try
trait ParserDo... | fhuertas/scala-exercice | src/main/scala/com/fhuertas/string/comparator/web/ParserDoubleService.scala | Scala | apache-2.0 | 994 |
/* __ *\\
** ________ ___ / / ___ __ ____ Scala.js Test Suite **
** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ **
** /____/\\___/... | matthughes/scala-js | test-suite/src/test/scala/org/scalajs/testsuite/compiler/OptimizerTest.scala | Scala | bsd-3-clause | 2,281 |
package smtlib
package theories
import parser.Terms._
object ArraysEx {
object ArraySort {
def apply(from: Sort, to: Sort): Sort = Sort(Identifier(SSymbol("Array")), Seq(from, to))
def unapply(sort: Sort): Option[(Sort, Sort)] = sort match {
case Sort(Identifier(SSymbol("Array"), Seq()), Seq(from,... | colder/scala-smtlib | src/main/scala/smtlib/theories/ArraysEx.scala | Scala | mit | 1,309 |
/*
* 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 ... | fhueske/flink | flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamExecWindowJoin.scala | Scala | apache-2.0 | 13,627 |
/*
* This file is part of the regex project.
*
* 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 ... | gnieh/regex | src/main/scala/gnieh/regex/util/RangeSet.scala | Scala | apache-2.0 | 3,270 |
package com.twitter.streaming
import com.twitter.finatra.http.test.{EmbeddedHttpServer, HttpTest}
import com.twitter.finatra.httpclient.RequestBuilder
import com.twitter.inject.server.FeatureTest
class StreamingServerFeatureTest extends FeatureTest with HttpTest {
override val server = new EmbeddedHttpServer(
... | joecwu/finatra | examples/streaming-example/src/test/scala/com/twitter/streaming/StreamingServerFeatureTest.scala | Scala | apache-2.0 | 760 |
/*
* 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 ... | spark0001/spark2.1.1 | sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/BroadcastExchangeExec.scala | Scala | apache-2.0 | 5,677 |
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.