code stringlengths 5 1M | repo_name stringlengths 5 109 | path stringlengths 6 208 | language stringclasses 1
value | license stringclasses 15
values | size int64 5 1M |
|---|---|---|---|---|---|
/***********************************************************************
* Copyright (c) 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-fs/geomesa-fs-storage/geomesa-fs-storage-convert/src/main/scala/org/locationtech/geomesa/fs/storage/converter/ConverterStorageFactory.scala | Scala | apache-2.0 | 4,170 |
import engine.WorkflowDefinition
package object definitions {
val availableWorkflowDefinitions: List[WorkflowDefinition] = List(Demo, ExampleWorkflow, RandomWorkflow)
}
| mpod/scala-workflow | backend/src/main/scala/definitions/package.scala | Scala | gpl-3.0 | 174 |
package com.dt.scala.dataset
/**
* Author: Wang Jialin
* Contact Information:
* WeChat: 18610086859
* QQ: 1740415547
* Email: 18610086859@126.com
* Tel: 18610086859
*/
object HelloList {
def main(args: Array[String]) {
val bigData = List("Hadoop", "Spark")
val data = List(1, 2, 3)... | slieer/scala-tutorials | src/main/scala/com/dt/scala/dataset/HelloList.scala | Scala | apache-2.0 | 1,151 |
package com.github.agourlay.cornichon.core
case class FeatureDef(name: String, scenarios: List[Scenario], ignored: Option[String] = None) {
require(
scenarios.map(s => s.name).distinct.length == scenarios.length,
s"Scenarios name must be unique within a Feature - error caused by duplicated declaration of sce... | agourlay/cornichon | cornichon-core/src/main/scala/com/github/agourlay/cornichon/core/Models.scala | Scala | apache-2.0 | 687 |
package org.opencompare.experimental.io.wikipedia.parser
import java.io.StringReader
import de.fau.cs.osr.ptk.common.AstVisitor
import org.ccil.cowan.tagsoup.jaxp.SAXFactoryImpl
import org.xml.sax.InputSource
import scala.xml.Node
import scala.xml.parsing.NoBindingFactoryAdapter
import scalaj.http.{Http, HttpOptions... | OpenCompare/sandbox | experimental/src/main/scala/org/opencompare/experimental/io/wikipedia/parser/PreprocessVisitor.scala | Scala | apache-2.0 | 7,220 |
package de.hpi.asg.breezetestgen
import baseclasses.UnitTest
import de.hpi.asg.breezetestgen.domain.{Constant, DataAcknowledge, Request, Signal}
import de.hpi.asg.breezetestgen.fixtures.GCDTest
import de.hpi.asg.breezetestgen.testing.{IOEvent, JsonFromTo}
class TestJsonSpec extends UnitTest {
private val (ain, bin,... | 0x203/BreezeTestGen | src/test/scala/de/hpi/asg/breezetestgen/TestJsonSpec.scala | Scala | mit | 937 |
package com.keba.scala.bank.transactions
import java.util.Date
import com.keba.scala.bank.money.Money
/**
* Entry in transaction history of a bank account that describes a
* deposit of foreign currency to the bank account.
*
* @author alexp
*/
class ForeignCurrencyDepositTransactionHistoryEntry(override va... | alexp82/ddd-banking-system | src/main/scala/com/keba/scala/bank/transactions/ForeignCurrencyDepositTransactionHistoryEntry.scala | Scala | apache-2.0 | 762 |
/**
* Copyright (C) 2009-2011 Scalable Solutions AB <http://scalablesolutions.se>
*/
package akka.util
import java.util.concurrent.locks.{ ReentrantReadWriteLock, ReentrantLock }
import java.util.concurrent.atomic.{ AtomicBoolean }
import akka.event.EventHandler
/**
* @author <a href="http://jonasboner.com">Jonas... | felixmulder/scala | test/disabled/presentation/akka/src/akka/util/LockUtil.scala | Scala | bsd-3-clause | 4,115 |
package com.twitter.finagle.netty4
import com.twitter.io.Buf
import com.twitter.io.Buf.ByteArray
import io.netty.buffer._
private[finagle] object ByteBufAsBuf {
object Owned {
/**
* Construct a [[Buf]] wrapper for ``ByteBuf``.
*
* @note this wrapper does not support ref-counting and therefore sh... | sveinnfannar/finagle | finagle-netty4/src/main/scala/com/twitter/finagle/netty4/ByteBufAsBuf.scala | Scala | apache-2.0 | 2,726 |
package foo
object Compile {
def main(args: Array[String]): Unit = {
println("hello world")
}
}
| xuwei-k/xsbt | sbt-app/src/sbt-test/project/semanticdb/src/main/scala/foo/Compile.scala | Scala | apache-2.0 | 105 |
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.BucketedRandomProjectionLSHModel
import ml.combust.mleap.runtime.MleapContext
import ml.c... | combust/mleap | mleap-runtime/src/main/scala/ml/combust/mleap/bundle/ops/feature/BucketedRandomProjectionLSHOp.scala | Scala | apache-2.0 | 1,953 |
package com.example.tictactoe.baseboard
import com.example.tictactoe.InvalidPositionException
import com.example.tictactoe.player.PlayerMark
import com.example.tictactoe.baseboard.Board.Position
/**
* @author s.a.ramamuniappa
*/
case class Square (val position: Position, marking: PlayerMark) {
require(isValidPosi... | ayyappanramamuniappa/tic-tac-toe | src/com/example/tictactoe/baseboard/Square.scala | Scala | apache-2.0 | 339 |
/*
* 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
* distribute... | wvlet/airframe | airframe-codec/.jvm/src/main/scala-3/wvlet/airframe/codec/CompatBase.scala | Scala | apache-2.0 | 1,101 |
/**
*
*/
package helpers.common
import play.api.templates.Html
/**
* @author Stefan Illgen
*
*/
object repeatWithIndex {
import play.api.data.Field
def apply(field: play.api.data.Field, min: Int = 1)(f: (Field,Int) => Html) = {
(0 until math.max(if (field.indexes.isEmpty) 0 else field.indexes.max +... | stefanil/play2-prototypen | forms/repeatWithIndex.scala | Scala | apache-2.0 | 373 |
/*
* Copyright 2013 http4s.org
*
* 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 i... | rossabaker/http4s | core/shared/src/main/scala/org/http4s/syntax/package.scala | Scala | apache-2.0 | 880 |
package `object`.foo
class SourceObjectPackage | ilinum/intellij-scala | testdata/autoImport/all/object/foo/SourceObjectPackage.scala | Scala | apache-2.0 | 47 |
/**
* 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... | jmandawg/camel | components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SInterceptSendToEndpointDefinition.scala | Scala | apache-2.0 | 1,425 |
/*
* Copyright (c) 2012-2014 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.apach... | pkallos/snowplow | 3-enrich/scala-hadoop-enrich/src/test/scala/com.snowplowanalytics.snowplow.enrich.hadoop/good/StructEventCfLineSpec.scala | Scala | apache-2.0 | 5,205 |
package euler
package til110
import euler.Utils.withResource
import scala.collection.BitSet
/**
*
* Let S(A) represent the sum of elements in set A of size n. We shall call it a special sum set if
* for any two non-empty disjoint subsets, B and C, the following properties are true:
* S(B) ≠ S(C); that is, su... | TrustNoOne/Euler | scala/src/main/scala/euler/til110/Euler105.scala | Scala | mit | 1,772 |
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package scaps.eclipse.ui.search
import org.eclipse.core.runtime.IProgressMonitor
import org.eclipse.core.runtime.... | flomerz/scala-ide-scaps | scala-ide-scaps-plugin/src/main/scala/scaps/eclipse/ui/search/ScapsSearchQuery.scala | Scala | mpl-2.0 | 990 |
package wow.auth
import wow.auth.protocol.RealmFlags
import wow.auth.protocol.packets.ServerRealmlistEntry
import wow.realm.RealmServerConfiguration
/**
* Information about realm (from the point of view of the authserver)
*/
case class RealmInfo(
id: Int,
realmConfig: RealmServerConfiguration,
var flags: Re... | SKNZ/SpinaciCore | wow/core/src/main/scala/wow/auth/RealmInfo.scala | Scala | mit | 1,346 |
package sangria.execution.deferred
import java.util.concurrent.atomic.AtomicInteger
import sangria.ast
import sangria.execution.Executor
import sangria.macros._
import sangria.schema._
import sangria.util.{FutureResultSupport, Pos}
import sangria.util.SimpleGraphQlSupport._
import scala.concurrent.{ExecutionContext,... | sangria-graphql/sangria | modules/core/src/test/scala/sangria/execution/deferred/FetcherSpec.scala | Scala | apache-2.0 | 32,218 |
package kafka.common
import kafka.cluster.{Partition, Replica}
import kafka.utils.Json
import org.apache.kafka.common.TopicPartition
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional informatio... | wangcy6/storm_app | frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/main/scala/kafka/common/TopicAndPartition.scala | Scala | apache-2.0 | 1,483 |
/*
* 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/plan/rules/logical/RewriteMinusAllRuleTest.scala | Scala | apache-2.0 | 2,533 |
package com.hyenawarrior.OldNorseGrammar.grammar.adjectival
import com.hyenawarrior.OldNorseGrammar.grammar.adjectival.enums.AdjectiveType
import com.hyenawarrior.OldNorseGrammar.grammar.adjectival.enums.AdjectiveType._
import com.hyenawarrior.OldNorseGrammar.grammar.enums.Case._
import com.hyenawarrior.OldNorseGramma... | HyenaSoftware/IG-Dictionary | OldNorseGrammarEngine/src/main/scala/com/hyenawarrior/OldNorseGrammar/grammar/adjectival/core.scala | Scala | lgpl-3.0 | 1,697 |
/*
* Copyright 2001-2014 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | dotty-staging/scalatest | scalatest-test/src/test/scala/org/scalatest/StreamlinedXmlNormMethodsSpec.scala | Scala | apache-2.0 | 3,657 |
package org.holmesprocessing.totem.types
import org.holmesprocessing.totem.util.DownloadSettings
/**
* Create() case class. Used between the ConsumerActor and the WorkGroup.
* @param config: DownloadSettings => The configuration options for downloading an object
* @param key: Long => The message key associated wit... | webstergd/Holmes-Totem | src/main/scala/org/holmesprocessing/totem/types/CommandTypes.scala | Scala | apache-2.0 | 3,997 |
package battle.classes
object Fighter extends GladiatorClass {
attack + 1
hitpoints + 5
}
| bbalser/gladiator-actors | src/main/scala/battle/classes/Fighter.scala | Scala | cc0-1.0 | 97 |
package com.github.gdefacci.raz
import shapeless._
trait ToPathCodec[H, TD, TE, S <: PathPosition, E <: PathPosition] {
def apply(h: H): PathCodec[TD, TE, S, E]
}
object ToPathCodec {
implicit def fromDecoderAndEncoder[H <: HList, TD, TE, S <: PathPosition, E <: PathPosition](
implicit topd: ToPathDecoder[H... | gdefacci/raz | raz/src/main/scala/com/github/gdefacci/raz/ToPathCodec.scala | Scala | mit | 946 |
class Foo(a: Foo#A) {
type A = Int
}
| som-snytt/dotty | tests/pos/i2949.scala | Scala | apache-2.0 | 39 |
/*
* Copyright (c) 2014 Roberto Tyley
*
* This file is part of 'scala-textmatching'.
*
* scala-textmatching is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at you... | rtyley/scala-textmatching | src/main/scala/com/madgag/textmatching/TextMatcherType.scala | Scala | gpl-3.0 | 2,486 |
package com.twitter.finatra.thrift.tests
import com.twitter.converter.thriftscala.Converter
import com.twitter.converter.thriftscala.Converter.Uppercase
import com.twitter.finagle.{Filter, Service}
import com.twitter.finatra.thrift.{Controller, _}
import com.twitter.finatra.thrift.filters.{AccessLoggingFilter, Excepti... | twitter/finatra | thrift/src/test/scala/com/twitter/finatra/thrift/tests/EmbeddedThriftServerControllerFeatureTest.scala | Scala | apache-2.0 | 4,904 |
package org.scalatest.examples.wordspec.oneargtest
import org.scalatest.fixture
import java.io._
class ExampleSpec extends fixture.WordSpec {
case class FixtureParam(file: File, writer: FileWriter)
def withFixture(test: OneArgTest) = {
// create the fixture
val file = File.createTempFile("hello", "worl... | svn2github/scalatest | examples/src/main/scala/org/scalatest/examples/wordspec/oneargtest/ExampleSpec.scala | Scala | apache-2.0 | 886 |
/*
* 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 ... | Intel-bigdata/OAP | oap-native-sql/core/src/test/scala/org/apache/spark/sql/RowSuite.scala | Scala | apache-2.0 | 4,908 |
import sbt._
import Keys._
object MultiPublishTest extends Build
{
override lazy val settings = super.settings ++ Seq(
organization := "A",
version := "1.0",
ivyPaths <<= baseDirectory( dir => new IvyPaths(dir, Some(dir / "ivy" / "cache")) ),
externalResolvers <<= baseDirectory map { base => Resolver.file("... | niktrop/sbt | sbt/src/sbt-test/dependency-management/publish-local/changes/RetrieveTest.scala | Scala | bsd-3-clause | 1,032 |
package org.jetbrains.plugins.scala.lang.resolve
import org.jetbrains.plugins.scala.base.ScalaLightCodeInsightFixtureTestAdapter
/**
* @author Roman.Shein
* @since 28.03.2016.
*/
class TypeVisibilityTest extends ScalaLightCodeInsightFixtureTestAdapter {
def testSCL13138(): Unit = {
val text =
"""
... | JetBrains/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/lang/resolve/TypeVisibilityTest.scala | Scala | apache-2.0 | 460 |
/*
* Copyright 2015-2016 IBM Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | nwspeete-ibm/openwhisk | tests/src/whisk/core/container/test/ContainerPoolTests.scala | Scala | apache-2.0 | 9,528 |
package models.provider
import org.specs2.mutable._
import models.provider._
import play.api.test._
import play.api.test.Helpers._
import java.net.URI
object ProviderSpecs extends Specification {
"PathProvider" should {
"deconstruct simple path" in {
val testPath = "/AMDA-NG/data/WSRESULT/getObsDataTre... | FlorianTopf/impex-portal | test/models/provider/ProviderSpecs.scala | Scala | gpl-2.0 | 1,957 |
package org.skycastle.core.design
/**
* A part that maps directly to an entity.
*/
class ConcretePart extends Part {
def anchorPos = null
def occupiedCells = null
def outerBounds = null
def gridSize = null
} | zzorn/skycastle | src/main/scala/org/skycastle/core/design/ConcretePart.scala | Scala | gpl-2.0 | 218 |
package at.logic.gapt.proofs.drup
import at.logic.gapt.expr.{ Formula, Polarity }
import at.logic.gapt.proofs._
import at.logic.gapt.proofs.resolution._
import cats.{ Eval, Later, Now }
import scala.collection.mutable
sealed abstract class DrupProofLine extends Product {
def clause: HOLClause
override def toStri... | gebner/gapt | core/src/main/scala/at/logic/gapt/proofs/drup/DrupProof.scala | Scala | gpl-3.0 | 5,372 |
/*
* Copyright (c) 2014 Alvaro Agea.
*
* 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 ... | aagea/rogerfs | rogerfs-core/src/test/scala/org/rogerfs/core/api/RogerInputStreamSpec.scala | Scala | apache-2.0 | 2,289 |
/*
* 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 ... | andrewor14/iolap | core/src/test/scala/org/apache/spark/deploy/IvyTestUtils.scala | Scala | apache-2.0 | 14,222 |
package s3.website
import s3.website.ErrorReport._
import s3.website.model.{FileUpdate, Config}
import com.amazonaws.services.cloudfront.{AmazonCloudFrontClient, AmazonCloudFront}
import com.amazonaws.services.cloudfront.model.{TooManyInvalidationsInProgressException, Paths, InvalidationBatch, CreateInvalidationReques... | pathawks/s3_website | src/main/scala/s3/website/CloudFront.scala | Scala | mit | 6,716 |
/*
* Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com>
*/
package play.it.http
import java.io.IOException
import play.api.mvc._
import play.api.test._
import play.api.libs.ws._
import play.api.libs.iteratee._
import play.it._
import scala.util.{ Failure, Success, Try }
import play.api.libs.concurrent.... | jyotikamboj/container | pf-framework/src/play-integration-test/src/test/scala/play/it/http/ScalaResultsHandlingSpec.scala | Scala | mit | 10,568 |
package lila.relay
import akka.actor.{ Actor, ActorRef, Props }
import akka.io.{ IO, Tcp }
import akka.util.ByteString
import java.net.InetSocketAddress
private[relay] final class Telnet(
remote: InetSocketAddress,
listener: ActorRef) extends Actor {
import Tcp._
import context.system
IO(Tcp) ! Connec... | Enigmahack/lila | modules/relay/src/main/Telnet.scala | Scala | mit | 1,967 |
package uk.gov.dvla.vehicles.presentation.common.models
import play.api.data.Forms.{mapping, nonEmptyText}
case class ValtechInputDigitsModel(mileage: String)
object ValtechInputDigitsModel {
object Form {
final val MileageId = "mileage"
final val Mapping = mapping(
MileageId -> nonEmptyText()
... | dvla/vehicles-presentation-common | common-test/app/uk/gov/dvla/vehicles/presentation/common/models/ValtechInputDigitsModel.scala | Scala | mit | 393 |
package sampler.aggr.emp
import delta.util.ReflectiveDecoder
import sampler._
import scuff.Codec
import scuff.json._, JsVal._
trait JsonCodec
extends EmpEventHandler {
this: ReflectiveDecoder[_, String] =>
type Return = JSON
private val IsoDate = """(\\d{4})-(\\d{2})-(\\d{2})""".r
private val EmployeeReg... | nilskp/delta | src/test/scala/sampler/aggr/emp/JsonCodec.scala | Scala | mit | 1,734 |
import sbt._
import sbt.Keys._
import bintray.Plugin._
import bintray.Keys._
object Build extends Build {
val customBintraySettings = bintrayPublishSettings ++ Seq(
packageLabels in bintray := Seq("json"),
bintrayOrganization in bintray := Some("blackboxsociety"),
repository in bintray :... | blackboxsociety/blackbox-json | project/Build.scala | Scala | mit | 1,094 |
package scwilio
import op._
import xml._
import dispatch._
object Twilio {
var accountSid = System.getenv("SCWILIO_ACCOUNT_SID")
var authToken = System.getenv("SCWILIO_AUTH_TOKEN")
val API_VERSION = "2010-04-01"
lazy val restClient = new RestClient(accountSid, authToken)
lazy val client = new TwilioClient... | daggerrz/Scwilio | core/src/main/scala/scwilio/twilio.scala | Scala | mit | 3,093 |
package scala.actors.io
import org.testng.annotations.{Test, BeforeMethod}
import org.scalatest.testng.TestNGSuite
import org.scalatest.prop.Checkers
import org.scalacheck.Arbitrary
import org.scalacheck.Arbitrary._
import org.scalacheck.Gen
import org.scalacheck.Prop._
import org.scalatest._
import scala.actors.cont... | bingoyang/scala-otp | io/src/test/scala/scala/actors/io/IoSuite.scala | Scala | bsd-3-clause | 2,122 |
/* *\\
** Squants **
** **
** Scala Quantities and Units of Measure Library and DSL **
** (c) 2013-2015, G... | garyKeorkunian/squants | shared/src/main/scala/squants/AbstractQuantityNumeric.scala | Scala | apache-2.0 | 2,047 |
/*
* 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 ... | mbode/flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/nodes/datastream/DataStreamPythonCalc.scala | Scala | apache-2.0 | 6,401 |
sealed trait JState
trait Start extends JState
trait Complete extends JState
trait OpenArray[E <: JState] extends JState
trait OpenObject[E <: JState] extends JState
| arnolddevos/phantom_types | json1.scala | Scala | mit | 167 |
package leo
package datastructures
package blackboard.scheduler
import leo.datastructures.blackboard._
import leo.datastructures.context.Context
import leo.modules.output.{SZS_Theorem, StatusSZS}
import scala.collection.mutable
import java.util.concurrent.Executors
/**
* Singleton Scheduler
*/
object Scheduler {
... | cbenzmueller/LeoPARD | src/main/scala/leo/datastructures/blackboard/scheduler/Scheduler.scala | Scala | bsd-3-clause | 10,103 |
// Copyright (C) 2014 - 2016 ENSIME Contributors
// Licence: Apache-2.0
package org.ensime
import scala.util.Properties.{versionNumberString => sbtScalaVersion}
import CoursierHelper._
import EnsimeCoursierKeys._
import EnsimeKeys._
import sbt._
import sbt.Keys._
object EnsimeCoursierKeys {
// can't include Coursi... | ensime/ensime-sbt | src/main/scala/EnsimeCoursierPlugin.scala | Scala | apache-2.0 | 1,956 |
package br.unb.cic.tp1.mh.ast
import org.scalatest._
import br.unb.cic.tp1.exceptions.VariavelNaoDeclaradaException
class TesteExpLambda extends FlatSpec with Matchers {
behavior of "a lambda expression"
it should "be evaluated to Closure(x, x+1) when (x) -> x + 1" in {
val inc = new ExpLambda("x", TInt(),... | PeterTowers/TP1-022017 | mhs/src/test/scala/br/unb/cic/tp1/mh/ast/TesteExpLambda.scala | Scala | mit | 533 |
/*
* Copyright 2014 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... | bpburns/spark-kernel | protocol/src/main/scala/com/ibm/spark/kernel/protocol/v5/content/HistoryReply.scala | Scala | apache-2.0 | 1,254 |
/*
* The block under qual$1 must be owned by it.
* In the sample bug, the first default arg generates x$4,
* the second default arg generates qual$1, hence the maximal
* minimization.
*
<method> <triedcooking> def model: C.this.M = {
val qual$1: C.this.M = scala.Option.apply[C.this.M]({
val x$1: lang.... | loskutov/intellij-scala | testdata/scalacTests/pos/t5720-ownerous.scala | Scala | apache-2.0 | 1,830 |
package GUI
import GUIAbstractComponent._
abstract class GUIAbstractGeneratorToolkit {
type ImplFrame
var mainFrame : ImplFrame
protected def init(frame : Frame)
final def generateFrame(frame : Frame) : ImplFrame = {
init(frame)
return mainFrame
}
} | DoumbiaAmadou/FrameworkVote | src/GUI/GUIAbstractGeneratorToolkit.scala | Scala | mit | 275 |
import sbt._
import com.typesafe.config._
object BuildConf extends Plugin {
lazy val conf = ConfigFactory.parseFile(new File("conf/application.conf"))
def getString(key: String) = conf.getString(key)
}
| moatra/playground | project/BuildConf.scala | Scala | mit | 208 |
/**
* 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... | winlinvip/kafka | core/src/test/scala/unit/kafka/log/LogSegmentTest.scala | Scala | apache-2.0 | 10,008 |
/*
* Copyright 2013 Maurício Linhares
*
* Maurício Linhares licenses this file to you 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 ... | dripower/postgresql-async | db-async-common/src/main/scala/com/github/mauricio/async/db/ResultSet.scala | Scala | apache-2.0 | 1,112 |
/***********************************************************************
* Copyright (c) 2013-2020 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... | aheyne/geomesa | geomesa-index-api/src/main/scala/org/locationtech/geomesa/index/api/IndexKeySpace.scala | Scala | apache-2.0 | 3,941 |
package org.json4s.scalaz
import scalaz._
import scalaz.syntax.apply0._
import scalaz.syntax.bind0._
import scalaz.syntax.traverse._
import scalaz.std.list._
import scalaz.syntax.validation._
import JsonScalaz._
import org.json4s._
import org.scalatest.wordspec.AnyWordSpec
class ValidationExample extends AnyWordSpec... | json4s/json4s | scalaz/shared/src/test/scala/org/json4s/scalaz/ValidationExample.scala | Scala | apache-2.0 | 2,508 |
package me.breidenbach
import akka.actor.ActorRef
import me.breidenbach.footrade.OrderType.OrderType
import me.breidenbach.footrade.TradeDirection.TradeDirection
import java.time.Instant
/**
* Date: 3/11/15
* Time: 10:13 PM
* Copyright 2015 Kevin E. Breidenbach
* @author Kevin E. Breidenbach
*/
package object fo... | kbreidenbach/fooexchange | src/main/scala/me/breidenbach/footrade/package.scala | Scala | mit | 1,285 |
package org.jetbrains.plugins.scala
package lang.psi.api.expr
import com.intellij.openapi.util.Key
import com.intellij.psi.{PsiElement, PsiNamedElement}
import org.jetbrains.plugins.scala.extensions._
import org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil._
import org.jetbrains.plugins.scala.lang.psi.api.InferUtil
i... | LPTK/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/api/expr/MethodInvocation.scala | Scala | apache-2.0 | 14,937 |
/*
* SimpleFOLParser.scala
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package at.logic.gapt.formats.language.simple
import at.logic.gapt.formats.simple.SimpleFOLParser
import org.specs2.mutable._
import at.logic.gapt.expr._
import at.logic.gapt.language... | gisellemnr/gapt | src/test/scala/at/logic/gapt/formats/language/simple/SimpleFOLParserTest.scala | Scala | gpl-3.0 | 2,815 |
/*
* Copyright (C) 2015 Holmes Team at HUAWEI Noah's Ark Lab.
*
* 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 ap... | gosubpl/akka-online | src/main/scala/org/apache/spark/streamdm/classifiers/trees/SplitCriterion.scala | Scala | apache-2.0 | 7,631 |
package org.igye.learnpl2
import java.util.Random
import scala.collection.mutable.ListBuffer
class Rnd {
private val rnd = new Random()
private val buf = ListBuffer[Int]()
private var lastBound = -1
def nextInt(bound: Int) = {
// val pr = println(_:Any)
// pr(s"buf.size = ${buf.size}, ... | Igorocky/learnpl2 | src/main/scala/org/igye/learnpl2/Rnd.scala | Scala | mit | 922 |
/* Copyright 2009-2016 EPFL, Lausanne */
object Nested5 {
def foo(a: Int): Int = {
require(a >= 0)
def bar(b: Int): Int = {
require(b > 0)
b + 3
} ensuring(a >= 0 && _ == b + 3)
bar(2)
} ensuring(a >= 0 && _ == 5)
}
| regb/leon | src/test/resources/regression/verification/purescala/valid/Nested5.scala | Scala | gpl-3.0 | 251 |
package email
import models.{BusinessDetailsModel, ConfirmFormModel, EligibilityModel}
import play.api.i18n.Lang
import play.twirl.api.HtmlFormat
import uk.gov.dvla.vehicles.presentation.common.clientsidesession.TrackingId
import uk.gov.dvla.vehicles.presentation.common.model.VehicleAndKeeperDetailsModel
import uk.gov... | dvla/vrm-retention-online | app/email/RetainEmailService.scala | Scala | mit | 1,482 |
/**
* Copyright 2015 Thomson Reuters
*
* 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 ag... | hochgi/CM-Well | server/cmwell-it/src/it/scala/cmwell/it/OWTests.scala | Scala | apache-2.0 | 6,930 |
package scala.in.programming.function_and_closure
/**
* @author loustler
* @since 02/04/2017 11:34
*/
object SimpleFunctionLiteral extends App {
val someNumbers = List(-11, -10, -5, 0, 5, 10)
println("--------- example 1 -------------")
// This method use method reference.
someNumbers.foreach(println)
... | loustler/scala | src/main/scala/scala/in/programming/function_and_closure/SimpleFunctionLiteral.scala | Scala | mit | 1,527 |
package org.jetbrains.plugins.scala
package lang
package psi
package api
package base
package patterns
import org.jetbrains.plugins.scala.lang.psi.ScalaPsiElement
/**
* @author Alexander Podkhalyuzin
* Date: 28.02.2008
*/
trait ScCaseClauses extends ScalaPsiElement {
def caseClause = findChildByClassScala(classOf... | consulo/consulo-scala | src/org/jetbrains/plugins/scala/lang/psi/api/base/patterns/ScCaseClauses.scala | Scala | apache-2.0 | 460 |
/**
* 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... | chirino/activemq-apollo | apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/transport/VMTransport.scala | Scala | apache-2.0 | 5,268 |
package com.alexitc.coinalerts.core
import com.alexitc.playsonify.models.WrappedString
case class FilterQuery(string: String) extends AnyVal with WrappedString
| AlexITC/crypto-coin-alerts | alerts-server/app/com/alexitc/coinalerts/core/FilterQuery.scala | Scala | gpl-3.0 | 162 |
package controllers.conservation
import com.google.inject.{Inject, Singleton}
import no.uio.musit.security.Authenticator
import no.uio.musit.service.MusitController
import play.api.Logger
import play.api.mvc.ControllerComponents
import services.conservation.HseRiskAssessmentService
@Singleton
class HseRiskAssessmentCo... | MUSIT-Norway/musit | service_backend/app/controllers/conservation/HseRiskAssessmentController.scala | Scala | gpl-2.0 | 561 |
package wvlet.airframe.surface.reflect
import wvlet.log.LogSupport
import wvlet.airframe.surface.AirSpecBridge
case class Person(id: Int, name: String) {
def hello: String = "hello"
}
class TastySurfaceFactoryTest extends munit.FunSuite with AirSpecBridge with LogSupport {
test("of[A]") {
val s = TastySurfa... | wvlet/airframe | airframe-surface/.jvm/src/test/scala-3/wvlet/airframe/surface/reflect/TastySurfaceFactoryTest.scala | Scala | apache-2.0 | 711 |
package service
import model._
import scala.slick.driver.H2Driver.simple._
import Database.threadLocalSession
trait SshKeyService {
def addPublicKey(userName: String, title: String, publicKey: String): Unit =
SshKeys.ins insert (userName, title, publicKey)
def getPublicKeys(userName: String): List[SshKey] =... | Muscipular/gitbucket | src/main/scala/service/SshKeyService.scala | Scala | apache-2.0 | 531 |
/*
* 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 ... | bdrillard/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala | Scala | apache-2.0 | 13,282 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | tejasapatil/spark | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ArithmeticExpressionSuite.scala | Scala | apache-2.0 | 16,429 |
/*
* 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 ... | aniketadnaik/carbondataStreamIngest | integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/dataload/TestLoadDataWithYarnLocalDirs.scala | Scala | apache-2.0 | 3,770 |
package cgta.otest
package runner
import sbt.testing.{Fingerprint, Selector, TaskDef, Status, OptionalThrowable}
//////////////////////////////////////////////////////////////
// Copyright (c) 2014 Ben Jackman, Jeff Gomberg
// All Rights Reserved
// please contact ben@jackman.biz or jeff@cgtanalytics.com
// for lice... | cgta/otest | otest/shared/src/main/scala/cgta/otest/runner/TestResults.scala | Scala | mit | 3,170 |
package justin.db.replica.write
import justin.db.Data
import justin.db.actors.protocol.{StorageNodeConflictedWrite, StorageNodeFailedWrite, StorageNodeSuccessfulWrite, StorageNodeWriteResponse}
import justin.db.replica.IsPrimaryOrReplica
import justin.db.storage.PluggableStorageProtocol.StorageGetData
import justin.db... | speedcom/JustinDB | justin-core/src/main/scala/justin/db/replica/write/ReplicaLocalWriter.scala | Scala | apache-2.0 | 1,832 |
package akashic.storage.admin
import akashic.storage.server
import akka.http.scaladsl.model.{HttpEntity, StatusCodes}
import akka.http.scaladsl.server.Directives._
import scala.util.{Failure, Success, Try}
import scala.xml.XML
object Update {
val matcher =
put &
path("admin" / "user" / Segment) &
entit... | akiradeveloper/fss3 | src/main/scala/akashic/storage/admin/Update.scala | Scala | apache-2.0 | 977 |
package dotty.tools
package dotc
package core
import annotation.tailrec
import Symbols._
import Contexts._, Names._, Phases._, printing.Texts._, printing.Printer
import util.Spans.Span, util.SourcePosition
import collection.mutable.ListBuffer
import dotty.tools.dotc.transform.MegaPhase
import ast.tpd._
import scala.la... | som-snytt/dotty | compiler/src/dotty/tools/dotc/core/Decorators.scala | Scala | apache-2.0 | 8,177 |
package chrome.downloads.bindings
sealed trait DangerType
object DangerType {
val file: DangerType = "file".asInstanceOf[DangerType]
val url: DangerType = "url".asInstanceOf[DangerType]
val content: DangerType = "content".asInstanceOf[DangerType]
val uncommon: DangerType = "uncommon".asInstanceOf[DangerType]
... | lucidd/scala-js-chrome | bindings/src/main/scala/chrome/downloads/bindings/DangerType.scala | Scala | mit | 565 |
/***********************************************************************
* Copyright (c) 2013-2019 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | elahrvivaz/geomesa | geomesa-spark/geomesa-spark-jts/src/main/scala/org/locationtech/geomesa/spark/jts/package.scala | Scala | apache-2.0 | 1,729 |
package dotty.tools.backend.jvm
import dotty.tools.dotc.ast.tpd
import dotty.tools.dotc.core.Contexts._
import dotty.tools.dotc.core.Phases._
import dotty.tools.dotc.core.Symbols._
import dotty.tools.dotc.core.Flags.Trait
import dotty.tools.dotc.transform.MegaPhase.MiniPhase
/** Collect all super calls to trait membe... | dotty-staging/dotty | compiler/src/dotty/tools/backend/jvm/CollectSuperCalls.scala | Scala | apache-2.0 | 1,644 |
/*
Copyright 2012 Twitter, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distr... | nkhuyu/algebird | algebird-core/src/main/scala/com/twitter/algebird/DecayedValue.scala | Scala | apache-2.0 | 3,761 |
package tmp
import java.io.FileInputStream
import java.io.IOException
import java.util.Properties
import jadeutils.xmpp.model._
import jadeutils.xmpp.utils._
object chatter {
// val prop: Properties = new Properties()
// prop.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("connect.propertie... | Jade-Shan/Jade-XMPP | src/main/scala/tmp.scala | Scala | gpl-3.0 | 628 |
import org.scalatest._
import Matchers._
import com.jeffharwell.commoncrawl.warcparser.WARCRecord
import com.jeffharwell.commoncrawl.warcparser.WARCInfo
import com.jeffharwell.commoncrawl.warcparser.WARCRecordTypeException
import com.jeffharwell.commoncrawl.warcparser.WARCConversion
import com.jeffharwell.commoncrawl.w... | jeffharwell/CommonCrawlScalaTools | warcparser/src/test/scala/WARCConversionSpec.scala | Scala | mit | 17,239 |
/*
* Copyright 2013 Marek Radonsky
*
* 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 ... | radonsky/Taurus | app/models/ModelEntity.scala | Scala | apache-2.0 | 675 |
package scredis.commands
import scala.language.postfixOps
import scredis.io.NonBlockingConnection
import scredis.protocol.AuthConfig
import scredis.protocol.requests.KeyRequests._
import scredis.serialization.{Reader, Writer}
import scala.concurrent.Future
import scala.concurrent.duration._
/**
* This trait impleme... | scredis/scredis | src/main/scala/scredis/commands/KeyCommands.scala | Scala | apache-2.0 | 13,912 |
/*
* Scala (https://www.scala-lang.org)
*
* Copyright EPFL and Lightbend, Inc.
*
* Licensed under Apache License 2.0
* (http://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package scala.reflect.macros
p... | scala/scala | src/compiler/scala/reflect/macros/contexts/Enclosures.scala | Scala | apache-2.0 | 2,929 |
/*
* Copyright 2014-2022 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... | Netflix-Skunkworks/iep-apps | atlas-druid/src/main/scala/com/netflix/atlas/druid/DruidFilter.scala | Scala | apache-2.0 | 3,689 |
package com.cds.learnscala.chapter.chap13
import scala.collection.immutable.SortedSet
import scala.collection.mutable
object Main {
def mapStringIndex(str: String) = {
var indexMap = new mutable.HashMap[Char, SortedSet[Int]]()
var i = 0
str.toCharArray.foreach {
c => indexMap.get(c) match {
... | anancds/scala-project | learn-scala/src/main/scala/com/cds/learnscala/chapter/chap13/Main.scala | Scala | mit | 1,139 |
package de.fosd.typechef.typesystem.linker
import de.fosd.typechef.typesystem.CType
import de.fosd.typechef.featureexpr.FeatureExpr
import de.fosd.typechef.error.Position
/**
* signature with name type and condition. the position is only stored for debugging purposes and has no further
* relevance.
* it... | ckaestne/TypeChef | CTypeChecker/src/main/scala/de/fosd/typechef/typesystem/linker/CSignature.scala | Scala | lgpl-3.0 | 1,353 |
package frdomain.ch5
package domain
package service
package interpreter
import java.util.{ Date, Calendar }
import scalaz._
import Scalaz._
import \\/._
import Kleisli._
import model.{ Account, Balance }
import model.common._
import repository.AccountRepository
class AccountServiceInterpreter extends AccountService... | debasishg/frdomain | src/main/scala/frdomain/ch5/domain/service/interpreter/AccountService.scala | Scala | apache-2.0 | 2,444 |
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may... | cran/rkafkajars | java/kafka/metrics/KafkaMetricsGroup.scala | Scala | apache-2.0 | 9,741 |
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.