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 2016 Georges Lipka
#
# 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 wri... | glipka/Easy-React-With-ScalaJS | src/main/scala/com/glipka/easyReactJS/reactBootstrap/Panel.scala | Scala | apache-2.0 | 1,168 |
package com.ubirch.user.model.rest
import java.util.UUID
/**
* author: cvandrei
* since: 2017-03-29
*/
case class AllowedUsers(groupId: UUID,
allowedUsers: Set[UUID]
)
| ubirch/ubirch-user-service | model-rest/src/main/scala/com/ubirch/user/model/rest/AllowedUsers.scala | Scala | apache-2.0 | 223 |
import q._
package q.qq {
class C extends CC // ambiguous though same underlying
}
| martijnhoekstra/scala | test/files/neg/t2458b/test.scala | Scala | apache-2.0 | 89 |
package com.wavesplatform.settings
import com.typesafe.config.ConfigFactory
import com.wavesplatform.common.state.ByteStr
import com.wavesplatform.test.FlatSpec
import net.ceedubs.ficus.Ficus._
import net.ceedubs.ficus.readers.ArbitraryTypeReader._
class WalletSettingsSpecification extends FlatSpec {
"WalletSetting... | wavesplatform/Waves | node/src/test/scala/com/wavesplatform/settings/WalletSettingsSpecification.scala | Scala | mit | 747 |
/*
* 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 ... | chenc10/Spark-PAF | core/src/main/scala/org/apache/spark/api/java/JavaPairRDD.scala | Scala | apache-2.0 | 46,160 |
/*
* Copyright (c) 2016 Webtrends (http://www.webtrends.com)
* See the LICENCE.txt 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.... | pcross616/wookiee | wookiee-core/src/test/scala/com/webtrends/harness/libs/iteratee/TestExecutionContext.scala | Scala | apache-2.0 | 2,298 |
package it.unich.jandom.domains.objects
import org.scalatest.FunSpec
import org.scalatest.prop.TableFor1
/**
* This suite implements tests for those object domain which precisely track
* definite nullness.
* Created by amato on 4/1/14.
*/
trait PreciseDefiniteNullness extends ObjectDomainSuite {
describe("The... | francescaScozzari/Jandom | core/src/test/scala/it/unich/jandom/domains/objects/PreciseDefiniteNullness.scala | Scala | lgpl-3.0 | 1,289 |
package sledtr.section
import sledtr.plugin._
import sledtr.shelf._
import sledtr.MyPreDef._
abstract class SectionCompanion extends SelectedCompanion[Section] {
def apply(title: String, chapter: Chapter, url_list: List[String], map: ConfigMap): Section
def canFormat(url: String): Boolean
} | K2Da/sledtr | src/main/scala/sledtr/section/FormatterCompanion.scala | Scala | gpl-3.0 | 296 |
class Hello {
type T = String
val hello: String = "Hello"
var name: T = "John"
def greet: String =
hello + " " + name
}
| grzegorzbalcerek/scala-book-examples | examples/ClassMembers1.scala | Scala | mit | 132 |
/*
* Copyright 2007-2008 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 applicab... | beni55/liftweb | lift-util/src/test/scala/net/liftweb/util/ActorPingUnit.scala | Scala | apache-2.0 | 1,489 |
package objsets
import org.junit._
import org.junit.Assert.assertEquals
class TweetSetSuite {
trait TestSets {
val set1 = new Empty
val set2 = set1.incl(new Tweet("a", "a body", 20))
val set3 = set2.incl(new Tweet("b", "b body", 20))
val c = new Tweet("c", "c body", 7)
val d = new Tweet("d", "d ... | rusucosmin/courses | fp/4-object-oriented-sets-rusucosmin/src/test/scala/objsets/TweetSetSuite.scala | Scala | mit | 3,902 |
package com.twitter.finagle.exp.swift
import com.facebook.swift.service.{ThriftException, ThriftMethod, ThriftService}
import com.twitter.util.Future
import scala.beans.BeanProperty
import scala.annotation.meta._
@ThriftStruct
case class Test1Exc(
@ThriftField(1) @BeanProperty var m: String,
@ThriftField(2) @Bean... | finagle/finagle-swift | core/src/test/scala/com/twitter/finagle/swift/ifaces.scala | Scala | apache-2.0 | 738 |
package org.jetbrains.plugins.scala.lang.psi.stubs.index
import com.intellij.psi.stubs.StringStubIndexExtension
import com.intellij.psi.PsiClass
/**
* User: Alefas
* Date: 10.02.12
*/
class ScAllClassNamesIndex extends StringStubIndexExtension[PsiClass] {
def getKey = ScAllClassNamesIndex.KEY
}
object ScAllCla... | consulo/consulo-scala | src/org/jetbrains/plugins/scala/lang/psi/stubs/index/ScAllClassNamesIndex.scala | Scala | apache-2.0 | 380 |
package org.atmosphere.cpr
import java.util.UUID
import java.util.concurrent.ConcurrentHashMap
import akka.actor.ActorSystem
import grizzled.slf4j.Logger
import org.scalatra.atmosphere.{ ScalatraBroadcaster, WireFormat }
import scala.collection.JavaConverters._
import scala.collection.concurrent.{ Map => ConcurrentM... | 0xfaded/scalatra | atmosphere/src/main/scala/org/atmosphere/cpr/ScalatraBroadcasterFactory.scala | Scala | bsd-2-clause | 4,733 |
package com.twitter.gizzard
import com.twitter.ostrich.stats.{DevNullStats, StatsCollection, Stats => OStats, StatsSummary, StatsProvider, Counter, Metric}
import com.twitter.logging.Logger
import com.twitter.util.{Local, Time}
import scala.collection.mutable
import java.util.Random
class FilteredStatsProvider(defaul... | kmiku7/gizzard | src/main/scala/com/twitter/gizzard/Stats.scala | Scala | apache-2.0 | 6,456 |
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
*/
package scalaguide.ws.scalaopenid
import play.api.test._
import scala.concurrent.ExecutionContext
//#dependency
import javax.inject.Inject
import scala.concurrent.Future
import play.api._
import play.api.mvc._
import play.api.data._
import play.api... | benmccann/playframework | documentation/manual/working/scalaGuide/main/ws/code/ScalaOpenIdSpec.scala | Scala | apache-2.0 | 2,665 |
package com.twitter.finagle
import com.twitter.finagle.naming.{NameInterpreter, NamerExceededMaxDepthException, namerMaxDepth}
import com.twitter.util._
import scala.util.control.NonFatal
/**
* A namer is a context in which a [[com.twitter.finagle.NameTree
* NameTree]] is bound. The context is provided by the
* [[... | luciferous/finagle | finagle-core/src/main/scala/com/twitter/finagle/Namer.scala | Scala | apache-2.0 | 9,827 |
/*
* 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.xpath | core/src/main/scala/kantan/xpath/Query.scala | Scala | apache-2.0 | 1,844 |
/***********************************************************************
* Copyright (c) 2013-2016 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 is ... | mdzimmerman/geomesa | geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/index/Z3IdxStrategy.scala | Scala | apache-2.0 | 11,611 |
package im.actor.server
import akka.actor._
import akka.contrib.pattern.DistributedPubSubExtension
import akka.kernel.Bootable
import akka.stream.ActorMaterializer
import im.actor.server.activation.gate.{ GateCodeActivation, GateConfig }
import im.actor.server.activation.internal.{ ActivationConfig, InternalCodeActiva... | xiaotaijun/actor-platform | actor-server/actor-runner/src/main/scala/im/actor/server/Main.scala | Scala | mit | 6,062 |
package org.bitcoins.core.bloom
import org.bitcoins.core.gen.BloomFilterGenerator
import org.scalacheck.{Prop, Properties}
/**
* Created by chris on 8/3/16.
*/
class BloomFilterSpec extends Properties("BloomFilterSpec") {
property("Serialization symmetry") =
Prop.forAll(BloomFilterGenerator.bloomFilter) { ... | SuredBits/bitcoin-s-sidechains | src/test/scala/org/bitcoins/core/bloom/BloomFilterSpec.scala | Scala | mit | 683 |
package com.alexitc.coinalerts.services.validators
import com.alexitc.coinalerts.errors.{
InvalidEmailFormatError,
InvalidEmailLengthError,
InvalidPasswordLengthError,
UnsupportedLangError
}
import com.alexitc.coinalerts.models._
import com.alexitc.playsonify.core.ApplicationResult
import org.apache.commons.va... | AlexITC/crypto-coin-alerts | alerts-server/app/com/alexitc/coinalerts/services/validators/UserValidator.scala | Scala | gpl-3.0 | 1,853 |
import sbt._
import Keys._
import Import._
object build extends Build {
val defaultSettings = Seq(
libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-reflect" % _ ),
incOptions := incOptions.value.withNameHashing(true),
scalaVersion := "2.11.6"
)
lazy val root = Project(
base = file("."),
... | dansanduleac/sbt | sbt/src/sbt-test/source-dependencies/macro-arg-dep-nested-2-11/project/build.scala | Scala | bsd-3-clause | 801 |
import scala.sys.process._
import java.io._
case class Config(name: String, repo: String)
val samples = List(
Config("name", "repo.git"))
s"mkdir /home/chisun/clone".!
samples foreach { c =>
println("git clone ... " + c.name)
s"git clone ssh://chisun.joung@lgapps.lge.com:29427/${c.repo} -b LG_apps_master /hom... | agiledevteam/metr | scripts/run_clone.scala | Scala | mit | 365 |
/*
* 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 ... | bravo-zhang/spark | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/NonFoldableLiteral.scala | Scala | apache-2.0 | 1,922 |
package s {
sealed trait C[+A]
case class C00[+A]() extends C[A]
case class C10[+A](x: A) extends C[A]
case class C20[+A](x: A, y: A) extends C[A]
case class C01[+A](xs: A*) extends C[A]
case class C11[+A](x: A, ys: A*) extends C[A]
case class C21[+A](x: A, y: A, zs: A*) extends C[A]
object E00 { def ... | yusuke2255/dotty | tests/pending/run/patmat-behavior.scala | Scala | bsd-3-clause | 9,573 |
import java.io.File
import scalaxb.compiler.Config
import scalaxb.compiler.xsd.Driver
import scalaxb.compiler.ConfigEntry._
object XmlSchemaTest extends TestBase {
// override val module = new Driver with Verbose
val inFile = new File("integration/src/test/resources/XMLSchema.xsd")
val config = Config.default.... | briantopping/scalaxb | integration/src/test/scala/XmlSchemaTest.scala | Scala | mit | 2,011 |
/*
* 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 | streaming/src/test/scala/org/apache/spark/streaming/ReceivedBlockTrackerSuite.scala | Scala | apache-2.0 | 20,087 |
package org.jetbrains.sbt.annotator.dependency
import com.intellij.openapi.command.WriteCommandAction
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.text.StringUtil
import com.intellij.psi.util.PsiTreeUtil
import com.intellij.psi.{PsiElement, PsiFile}
import org.jetbrains.plugins.scala.ex... | jastice/intellij-scala | scala/scala-impl/src/org/jetbrains/sbt/annotator/dependency/AddSbtDependencyUtils.scala | Scala | apache-2.0 | 10,366 |
/******************************************************************************
* 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/model/ApplicationWatcher.scala | Scala | bsd-2-clause | 3,074 |
package database
import java.sql.{Date, Time, Timestamp}
import java.util.UUID
import models.{ReportCardRescheduled, UniqueDbEntity}
import org.joda.time.DateTime
import slick.jdbc.PostgresProfile.api._
import utils.date.DateTimeOps._
class ReportCardRescheduledTable(tag: Tag) extends Table[ReportCardRescheduledDb](... | THK-ADV/lwm-reloaded | app/database/ReportCardRescheduledTable.scala | Scala | mit | 1,511 |
package me.gregd.cineworld.integration.cineworld.raw
import java.time.LocalDate
import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import me.gregd.cineworld.domain.transformer.CineworldTransformer
import me.gregd.cineworld.integration.cineworld.CineworldIntegrationService
import me.gregd.cineworld.uti... | Grogs/cinema-service | domain/src/test/scala/me/gregd/cineworld/integration/cineworld/raw/CineworldRepositoryTest.scala | Scala | gpl-3.0 | 1,257 |
package rovak.steamkit.steam.msg
case class LogOnDetails(
username: String,
password: String,
/**
* Gets or sets the Steam Guard auth code used to login. This is the code sent to the user's email.
*/
authCode: String = "",
/**
* Gets or sets the sentry file hash for this logon attempt, or null if ... | Rovak/scala-steamkit | steam/src/main/scala/rovak/steamkit/steam/msg/LogOnDetails.scala | Scala | mit | 744 |
package com.mycompany.scalcium.sherlock
import java.util.Properties
import scala.collection.JavaConversions.asScalaBuffer
import scala.collection.JavaConversions.propertiesAsScalaMap
import scala.collection.mutable.Stack
import edu.stanford.nlp.ling.CoreAnnotations.SentencesAnnotation
import edu.stanford.nlp.ling.Co... | sujitpal/scalcium | src/main/scala/com/mycompany/scalcium/sherlock/NERFinder.scala | Scala | apache-2.0 | 2,421 |
package com.criteo.dev.cluster.aws
import com.criteo.dev.cluster._
import org.slf4j.LoggerFactory
import scala.collection.mutable
import scala.concurrent.duration.Duration
import scala.concurrent.{Await, Future}
import scala.concurrent.ExecutionContext.Implicits.global
/**
* Mounts unmounted disks.
*/
object Con... | szehonCriteo/berilia | src/main/scala/com/criteo/dev/cluster/aws/ConfigureDiskAction.scala | Scala | apache-2.0 | 2,022 |
/*
* Copyright (c) 2002-2018 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j 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 Foundatio... | HuangLS/neo4j | community/cypher/cypher-compiler-2.3/src/test/scala/org/neo4j/cypher/internal/compiler/v2_3/planner/logical/plans/rewriter/PredicateRemovalThroughJoinsTest.scala | Scala | apache-2.0 | 3,735 |
package ru.pavlenov.scala.homework.coursera
import ru.pavlenov.scala.libs.peptide.Peptide
import ru.pavlenov.scala.utils.File
/**
* ⓭ + 07
* Какой сам? by Pavlenov Semen 24.10.14.
* Implement Trim (reproduced below).
* https://stepic.org/lesson/CS-Trimming-the-Peptide-Leaderboard-4913/step/3?course=Bioinformatics... | laser13/rosalind | src/scala/ru/pavlenov/scala/homework/coursera/Step2_13_3.scala | Scala | apache-2.0 | 1,070 |
package x
object Main {
def main(args:Array[String]):Unit =
val arr = new MyArr[Int]()
val r = X.process{
arr.map1( zDebug =>
await(CBM.pure(1).map(a => zDebug + a))
)
}
println("r")
} | dotty-staging/dotty | tests/pos-macros/i9894/Test_2.scala | Scala | apache-2.0 | 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 may ... | goldmedal/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala | Scala | apache-2.0 | 27,322 |
/*
* Copyright (c) 2014 Contributor. All rights reserved.
*/
package org.scalaide.debug.internal
import org.eclipse.core.runtime.preferences.InstanceScope
import org.eclipse.debug.core.DebugPlugin
import org.eclipse.ui.preferences.ScopedPreferenceStore
trait ScalaDebugRunningTest {
// debug tests need this
dis... | andrey-ilinykh/scala-ide | org.scala-ide.sdt.debug.tests/src/org/scalaide/debug/internal/ScalaDebugRunningTest.scala | Scala | bsd-3-clause | 1,345 |
package com.overviewdocs.models
/** A page of search results from DocumentCloud.
*/
case class DocumentCloudImportIdList(
id: Int,
documentCloudImportId: Int,
/** 0-based page of search results. */
pageNumber: Int,
/** IDs from DocumentCloud: our to-fetch list, encoded as a String.
*
* It contain... | overview/overview-server | common/src/main/scala/com/overviewdocs/models/DocumentCloudImportIdList.scala | Scala | agpl-3.0 | 1,059 |
package com.twitter.finagle.netty4.param
import com.twitter.concurrent.NamedPoolThreadFactory
import com.twitter.finagle.Stack
import com.twitter.finagle.netty4.{nativeEpoll, numWorkers}
import com.twitter.finagle.util.BlockingTimeTrackingThreadFactory
import io.netty.channel.EventLoopGroup
import io.netty.channel.epo... | koshelev/finagle | finagle-netty4/src/main/scala/com/twitter/finagle/netty4/param/WorkerPool.scala | Scala | apache-2.0 | 1,872 |
/**
*
*/
package models
import java.net.URL
import java.util.Date
import java._
import play.api.templates.Html
import utils.Utils4Devel
import java.util.Calendar
/**
* @author stefan.illgen
*/
class Item {
// defaults
val HREF:URL = new URL("http://anonymous.org")
val IMG:URL = new URL("http://anonymous.... | stefanil/org.devel.skills.play2 | app/models/Item.scala | Scala | apache-2.0 | 1,660 |
/* *\\
** Squants **
** **
** Scala Quantities and Units of Measure Library and DSL **
** (c) 2015-2017, C... | underscorenico/squants | shared/src/main/scala/squants/electro/Permeability.scala | Scala | apache-2.0 | 2,442 |
package scalariform.formatter
import preferences.FormattingPreferences._
import scalariform.formatter.preferences._
import scalariform.parser._
import scalariform.formatter._
// format: OFF
class CompactControlReadabilityTest extends AbstractExpressionFormatterTest {
implicit val formattingPreferences = Formatting... | yu-iskw/scalariform | scalariform/src/test/scala/scalariform/formatter/CompactControlReadabilityTest.scala | Scala | mit | 1,490 |
package org.fiware.cosmos.orion.flink.connector.tests
import java.net.InetSocketAddress
import io.netty.buffer.Unpooled
import io.netty.channel.ChannelHandlerContext
import io.netty.handler.codec.http.{DefaultFullHttpRequest, HttpMethod, HttpVersion}
import io.netty.util.CharsetUtil
import org.apache.http.client.meth... | Fiware/context.Cosmos | src/test/scala/org.fiware.cosmos.orion.flink.connector.tests/OrionConnectorTestLD.scala | Scala | agpl-3.0 | 7,262 |
package com.github.gigurra.math
import org.scalatest._
import org.scalatest.mock._
import scala.language.postfixOps
class Tuple2VecSpec
extends WordSpec
with MockitoSugar
with Matchers
with OneInstancePerTest {
"Tuple2Vec" should {
"Convert tuple2 to vec2" in {
val v2: Vec2 = (1.0f, 2.0f)
... | GiGurra/scala-libgurra | src/test/scala/com/github/gigurra/math/Tuple2VecSpec.scala | Scala | mit | 619 |
/* Copyright 2014 Ireneusz Stawarczyk
*
* This file is part of scala-fractals.
*
* scala-fractals 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 your option) ... | irek-stawarczyk/scala-fractals | src/main/scala/edu/scala/fractal/mandelbrot/ColoringAlgorithm.scala | Scala | gpl-3.0 | 1,996 |
/**
* © 2019 Refinitiv. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | dudi3001/CM-Well | server/cmwell-ws/app/filters/TrafficShapingFilter.scala | Scala | apache-2.0 | 3,555 |
/*
* 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 ... | wgpshashank/spark | streaming/src/main/scala/spark/streaming/dstream/FlatMapValuedDStream.scala | Scala | apache-2.0 | 1,404 |
/*
* 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... | dotty-staging/scalatest | scalatest-test/src/test/scala/org/scalatest/time/DurationSpec.scala | Scala | apache-2.0 | 2,014 |
package com.originate.scalypher
import com.originate.scalypher.util.Exceptions.CharacterNotAllowedInLabel
import scala.language.implicitConversions
case class Label(name: String) {
def toQuery: String =
s":$name"
def escapedName: String =
if (name contains "`") throw new CharacterNotAllowedInLabel('`', ... | Originate/scalypher | src/main/scala/Label.scala | Scala | mit | 475 |
package com.dwolla.cloudflare.domain.model
import com.dwolla.cloudflare.domain.dto.ResponseInfoDTO
import org.http4s.Status
object Exceptions {
private def unexpectedCloudflareErrorExceptionMessage(errors: List[Error], messages: List[Message]): String = {
val base =
s"""An unexpected Cloudflare error occ... | Dwolla/scala-cloudflare | client/src/main/scala/com/dwolla/cloudflare/domain/model/Exceptions.scala | Scala | mit | 1,479 |
class T8679 {
def foo1(): Int = 3
def foo2(): Int = 4
def foo3(): Int = 5
def foo4(): Int = 6
def foo5(): Int = 7
def foo6(): Int = 8
def foo7(): Int = 9
def foo8(): Int = 10
def foo9(): Int = 11
def foo10(): Int = 12
def foo11(): Int = 13
def foo12(): Int = 14
def foo13(): Int = 15
def foo1... | felixmulder/scala | test/files/scalap/t8679.scala | Scala | bsd-3-clause | 95,808 |
package springnz.sparkplug.util
import com.typesafe.scalalogging.{ LazyLogging, Logger }
private[sparkplug] trait Logging extends LazyLogging {
implicit lazy val log: Logger = logger
}
| springnz/sparkplug | sparkplug-core/src/main/scala/springnz/sparkplug/util/Logging.scala | Scala | mit | 189 |
package models
case class ScreencastResource(title: String, description: String, tags: String) {
}
| CraigGiles/scalacasts | presentation/app/models/ScreencastResource.scala | Scala | mit | 100 |
package com.programmaticallyspeaking.ncd.nashorn
import com.programmaticallyspeaking.ncd.host._
import com.programmaticallyspeaking.ncd.host.types.{ExceptionData, Undefined}
import com.programmaticallyspeaking.ncd.infra.{ErrorUtils, IdGenerator}
import com.programmaticallyspeaking.ncd.nashorn.NashornDebuggerHost.Objec... | provegard/ncdbg | src/main/scala/com/programmaticallyspeaking/ncd/nashorn/Marshaller.scala | Scala | bsd-3-clause | 21,181 |
/*
* 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 ... | tophua/spark1.52 | core/src/main/scala/org/apache/spark/storage/StorageStatusListener.scala | Scala | apache-2.0 | 3,803 |
// Copyright 2013 trananh
//
// 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,... | matiasmolinas/channelorganizer | src/word2vec/src/Word2Vec.scala | Scala | apache-2.0 | 15,052 |
package com.omegaup.grader.drivers
import com.omegaup._
import com.omegaup.data._
import com.omegaup.grader._
trait Driver {
def run(run: Run)(implicit ctx: RunContext): Run
def validateOutput(run: Run)(implicit ctx: RunContext): Run
def setLogs(run: Run, logs: String)(implicit ctx: RunContext): Unit
def cleanR... | omegaup/backend | grader/src/main/scala/com/omegaup/grader/drivers/Driver.scala | Scala | bsd-2-clause | 400 |
/* scala-stm - (c) 2009-2010, Stanford University, PPL */
package scala.concurrent.stm
package skel
import scala.collection.{immutable, mutable}
private[stm] object TMapViaClone {
class FrozenMutableMap[A, B](self: mutable.Map[A, B]) extends immutable.Map[A, B] {
override def isEmpty: Boolean = self.isEmpty
... | djspiewak/scala-stm | src/main/scala/scala/concurrent/stm/skel/TMapViaClone.scala | Scala | bsd-3-clause | 2,277 |
package openstackApi.domain
case class Instance(name: String) {
}
| Spirals-Team/ermis | src/main/scala/openstackApi/domain/Instance.scala | Scala | agpl-3.0 | 68 |
package com.github.vooolll.client
import java.net.URL
import com.github.vooolll.base._
import com.github.vooolll.client.feed._
import cats.implicits._
import com.github.vooolll.domain.profile._
import com.github.vooolll.domain.oauth.FacebookError
import com.github.vooolll.domain.profile.FacebookUserAttribute.defaultA... | vooolll/facebook4s | src/test/scala/com/github/vooolll/client/UserSpec.scala | Scala | apache-2.0 | 2,080 |
/***********************************************************************
* 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-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/iterators/S2Iterator.scala | Scala | apache-2.0 | 1,212 |
/**
* Created by android on 22/2/15.
*/
import scala.slick.driver.DerbyDriver.simple._
object DBUtils {
def db = Database.forURL("jdbc:derby://localhost:1527/demo;create=true", driver = "org.apache.derby.jdbc.ClientDriver")
}
| pamu/Slick-Demos | src/main/scala/DBUtils.scala | Scala | apache-2.0 | 232 |
package com.markfeeney
package object circlet {
type Cont = Option[Response] => Sent.type
type Handler = Request => Cont => Sent.type
type Middleware = Handler => Handler
}
| overthink/circlet | src/main/scala/com/markfeeney/circlet/package.scala | Scala | mit | 180 |
/* ----------------- sse-breaker ----------------- *\\
* Licensed under the Apache License, Version 2.0. *
* Author: Spiros Tzavellas *
\\* ----------------------------------------------- */
package com.tzavellas.sse.breaker.extras
import java.util.Properties
import javax.mail.internet.{ Inter... | sptz45/sse-breaker | src/main/scala/com/tzavellas/sse/breaker/extras/EmailCircuitListener.scala | Scala | apache-2.0 | 1,996 |
package es.upm.oeg.epnoi.matching.metrics.similarity
import breeze.linalg.DenseVector
import es.upm.oeg.epnoi.matching.metrics.utils.SparkWrapper
import org.apache.spark.mllib.feature.Word2VecModel
import org.apache.spark.mllib.linalg.Vectors
/**
* Created by cbadenes on 20/07/15.
*/
object WordVecText8Example {
... | cbadenes/epnoi-matching-metrics | src/test/scala/es/upm/oeg/epnoi/matching/metrics/similarity/WordVecText8Example.scala | Scala | apache-2.0 | 2,502 |
/***********************************************************************
* 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-fs/geomesa-fs-storage/geomesa-fs-storage-parquet/src/main/scala/org/locationtech/geomesa/parquet/jobs/ParquetSimpleFeatureActionInputFormat.scala | Scala | apache-2.0 | 3,070 |
package io.peregrine
import com.twitter.logging._
import com.twitter.logging.Logging._
import java.util.{logging => javalog}
trait LoggerColors {
val ANSI_RESET = "\u001B[0m"
val ANSI_BLACK = "\u001B[30m"
val ANSI_RED = "\u001B[31m"
val ANSI_GREEN = "\u001B[32m"
val ANSI_YELLOW = "\u001B[33m"
val AN... | pairi/pairi | src/main/scala/io/peregrine/PeregrineLogger.scala | Scala | apache-2.0 | 1,427 |
/*
* 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 ... | aosagie/spark | core/src/main/scala/org/apache/spark/status/api/v1/api.scala | Scala | apache-2.0 | 13,248 |
package dotty.tools
package dottydoc
package core
import dotc.core.Contexts.Context
import transform.DocMiniPhase
import model._
import model.internal._
import model.comment._
import model.references._
import HtmlParsers._
import util.MemberLookup
import util.syntax._
class LinkReturnTypes extends DocMiniPhase with ... | som-snytt/dotty | doc-tool/src/dotty/tools/dottydoc/core/TypeLinkingPhases.scala | Scala | apache-2.0 | 4,555 |
package commons.mapper
import java.lang.reflect.Method
import java.util.UUID
import commons.mapper.utils.TypeUtils
import javassist.{ ClassClassPath, ClassPool, CtClass, CtConstructor, CtMethod, Modifier }
/**
* @author Kai Han
*/
private[mapper] trait MapToBeanMapper extends Mapper[java.util.Map[String, Any], Any... | hank-whu/common4s | src/main/scala/commons/mapper/MapToBeanMapper.scala | Scala | apache-2.0 | 7,637 |
package extruder.metrics.spectator
import com.netflix.spectator.api.{Registry, Spectator}
import extruder.metrics.dimensional.DimensionalMetricSettings
trait SpectatorMetricSettings extends DimensionalMetricSettings {
val registry: Registry = Spectator.globalRegistry()
}
| janstenpickle/extruder | metrics/spectator/src/main/scala/extruder/metrics/spectator/SpectatorMetricSettings.scala | Scala | mit | 276 |
package fpinscala.gettingstarted.samples
/**
* Created by younggi on 4/26/17.
*/
object GroupByCheck {
def main(args: Array[String]): Unit = {
val a = List("A", "B", "C", "D", "E", "F", "A")
println(a.groupBy(identity))
}
}
| younggi/books | functional_programming_in_scala/funpro_scala/src/main/scala/fpinscala/gettingstarted/samples/GroupByCheck.scala | Scala | mit | 242 |
package org.jetbrains.plugins.scala
package lang
package psi
package impl
package expr
import com.intellij.lang.ASTNode
import org.jetbrains.plugins.scala.lang.psi.api.expr._
import org.jetbrains.plugins.scala.lang.psi.types.result._
/**
* @author Alexander Podkhalyuzin
* Date: 06.03.2008
*/
class ScTypedStmtImpl... | triplequote/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScTypedStmtImpl.scala | Scala | apache-2.0 | 722 |
/*
* Licensed to STRATIO (C) under one or more contributor license agreements.
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. The STRATIO (C) licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file... | ccaballe/crossdata | crossdata-driver/src/main/scala/com/stratio/crossdata/driver/querybuilder/Selection.scala | Scala | apache-2.0 | 2,239 |
package code.facade
import code.model.UserSignUpVo
import code.model.OmegaDAO
import com.mongodb.casbah.Imports._
object ApiUserFacade {
def signUp(userSignUpVo: UserSignUpVo): Boolean = {
val userVoByEmail = OmegaDAO.findOne(MongoDBObject("email" -> userSignUpVo.email))
userVoByEmail match {
case Some(user... | f3r10/3dsquito | lift_basic/src/main/scala/code/facade/ApiUserFacade.scala | Scala | apache-2.0 | 667 |
package scavlink.connection
import akka.actor.{Actor, ActorLogging, ActorRef, Props}
import akka.util.ByteString
import scavlink.ScavlinkContext
import scavlink.connection.frame.{FrameError, FrameReceiver}
import scavlink.link._
import scavlink.log.{LinkLoggingActor, LogSettings}
import scavlink.message.common.{AuthKe... | nickolasrossi/scavlink | src/main/scala/scavlink/connection/PacketReceiver.scala | Scala | mit | 7,131 |
package dotGenerator
import java.io.File
import sys.process._
/**
* Created by snipy on 07.10.16.
*/
case class Dot2PdfGenerator(filepath: String)
{
def generatePdfFile(): Dot2PdfGenerator =
{
val file = new File(filepath)
if (file.exists())
{
val output = filepath.repl... | SnipyJulmy/MSE_1617_PA | AstGenerator/src/main/scala/dotGenerator/Dot2PdfGenerator.scala | Scala | gpl-2.0 | 757 |
// Copyright © 2011-2012, Jeremy Heiner (github.com/JHeiner).
// 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 source code must retain the above copyright notic... | JHeiner/Protractor | src/test/scala/protractor/gui/RangeDoodle.scala | Scala | bsd-3-clause | 2,758 |
package ghost.patmat
import stainless.lang._
import stainless.annotation.ghost
object GhostPatmat {
sealed trait GhostList
case class GhostCons(@ghost val head: BigInt, val tail: GhostList) extends GhostList
case class GhostNil() extends GhostList
def patmatch(): Unit = {
val x = GhostCons(BigInt(10), G... | epfl-lara/stainless | frontends/benchmarks/extraction/invalid/GhostPatmat.scala | Scala | apache-2.0 | 545 |
package core.schema
import akka.actor._
import scala.concurrent.duration._
import play.api.libs.concurrent.Execution.Implicits._
import akka.pattern.ask
import scala.concurrent.Await
import core.schema.SchemaProvider._
import core.SchemaService
import play.api.Play.current
import play.api.libs.concurrent._
import eu.d... | delving/culture-hub | web-core/app/core/schema/SchemaProvider.scala | Scala | apache-2.0 | 5,755 |
package spatutorial.client.services
import spatutorial.client.ukko.Dispatcher
object MainDispatcher extends Dispatcher {
// no need to define anything specific here, just basic Dispatcher functionality
}
| zoosky/eispoc | js/src/main/scala/spatutorial/client/services/MainDispatcher.scala | Scala | agpl-3.0 | 208 |
package gitbucket.core.service
import fr.brouillard.oss.security.xhub.XHub
import fr.brouillard.oss.security.xhub.XHub.{XHubConverter, XHubDigest}
import gitbucket.core.api._
import gitbucket.core.model.{Account, CommitComment, Issue, IssueComment, PullRequest, WebHook, WebHookEvent}
import gitbucket.core.model.Profil... | nobusugi246/gitbucket | src/main/scala/gitbucket/core/service/WebHookService.scala | Scala | apache-2.0 | 20,393 |
package io.mpjsons.impl.special
import io.mpjsons.impl.util.{Context, TypesUtil}
import io.mpjsons.impl.{DeserializerFactory, SerializerFactory, StringIterator}
import io.mpjsons.{JsonTypeDeserializer, JsonTypeSerializer}
import scala.reflect.runtime.universe._
object TypedConverter {
class TypedSerializer[T <: ... | marpiec/mpjsons | src/main/scala/io/mpjsons/impl/special/TypedConverter.scala | Scala | apache-2.0 | 2,568 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\\___/_/... | felixmulder/scala | src/library/scala/collection/parallel/TaskSupport.scala | Scala | bsd-3-clause | 3,753 |
package aecor.tests.e2e
import aecor.tests.e2e.TestCounterViewRepository.State
import cats.mtl.MonadState
import monocle.Lens
import aecor.testkit._
trait CounterViewRepository[F[_]] {
def getCounterState(id: CounterId): F[Option[Long]]
def setCounterState(id: CounterId, value: Long): F[Unit]
}
object TestCounte... | notxcain/aecor | modules/tests/src/main/scala/aecor/tests/e2e/CounterViewRepository.scala | Scala | mit | 1,230 |
/*
* 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... | cheeseng/scalatest | scalatest-test/src/test/scala/org/scalatest/InOrderElementsOfContainMatcherEqualitySpec.scala | Scala | apache-2.0 | 7,661 |
/*
* Copyright (c) 2012, The Broad Institute
*
* 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 use,
* copy, modify, me... | iontorrent/Torrent-Variant-Caller-stable | public/scala/src/org/broadinstitute/sting/queue/engine/gridengine/GridEngineJobRunner.scala | Scala | mit | 4,186 |
/*******************************************************************************
* Copyright (c) 2014 Łukasz Szpakowski.
*
* 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/MP... | luckboy/Purfuncor | src/main/scala/pl/luckboy/purfuncor/frontend/typer/TypeEnvironmentState.scala | Scala | mpl-2.0 | 873 |
package com.orendainx.trucking.storm.schemes
import java.nio.ByteBuffer
import org.apache.storm.tuple.{Fields, Values}
/**
* Scheme for parsing speed events.
*
* @author Edgar Orendain <edgar@orendainx.com>
*/
class BufferToStringScheme(dataType: String) extends DelimitedScheme("\\\\|") {
override def des... | orendain/trucking-iot | storm-topology/src/main/scala/com/orendainx/trucking/storm/schemes/BufferToStringScheme.scala | Scala | apache-2.0 | 482 |
package com.folio_sec.example.domain.issue003.scala_api
object ParentObjectService extends ParentObjectService
trait ParentObjectService extends ParentObjectServiceAbstract {}
| folio-sec/reladomo-scala | sample/src/main/scala/com/folio_sec/example/domain/issue003/scala_api/ParentObjectService.scala | Scala | apache-2.0 | 178 |
package charactor.core.model.objects.charactor.attributes
import charactor.core.model.objects.charactor.{ReversedLinearSpeed, Speed}
object PersistentAttribute
{
val MaximumSpeedModifier = 1.6;
val MinimumSpeedModifier = 1.4;
}
class PersistentAttribute extends Attribute(List(new ReversedLinearSpeed(Speed.DefaultM... | PiotrTrzpil/charactor | src/charactor/core/model/objects/charactor/attributes/PersistentAttribute.scala | Scala | apache-2.0 | 448 |
package cgta.oscala
package util
import cgta.otest.FunSuite
//////////////////////////////////////////////////////////////
// Copyright (c) 2013 Ben Jackman
// All Rights Reserved
// please contact ben@jackman.biz
// for licensing inquiries
// Created by pacifique @ 9/24/13 12:55 PM
//////////////////////////////////... | cgta/open | oscala/shared/src/test/scala/cgta/oscala/util/TestArrayHelp.scala | Scala | mit | 3,936 |
package one.murch.bitcoin.coinselection
class Transaction(val walletName: String, val target: Long, val change: Long, val fee: Long, val inputSet: Set[Utxo], val block: Int, val duration: Long) {
var inputsValue: Long = 0
inputSet.foreach(inputsValue += _.value)
var outputsValue: Long = 0
outputsValu... | Xekyo/CoinSelectionSimulator | src/main/scala/one/murch/bitcoin/coinselection/Transaction.scala | Scala | mit | 826 |
/*
* Copyright (C) 2014 - 2017 Contributors as noted in the AUTHORS.md file
*
* 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)... | Tensei-Data/tensei-agent | src/it/scala/databases/mysql/DatabaseWriterActorTest.scala | Scala | agpl-3.0 | 63,232 |
// allow supplementary chars in identifiers
class 𐐀 {
def 𐐀 = 42
// regression check: anything goes in strings
def x = "𐐀"
def y = s"$𐐀"
def w = s" 𐐀"
}
case class 𐐀𐐀(n: Int) {
def 𐐀𐐀 = n
def `𐐀𐐀1` = n + n
}
// uncontroversially, orphan surrogates may be introduced
// via unicode escape.
c... | scala/scala | test/files/pos/surrogates.scala | Scala | apache-2.0 | 549 |
package org.jobimtext.coref.berkeley.bansalklein
import java.io.{BufferedInputStream, FileInputStream}
import java.util.zip.GZIPInputStream
import edu.berkeley.nlp.coref.Mention
import edu.berkeley.nlp.coref.config.CorefSystemConfiguration
import edu.berkeley.nlp.futile.util.Logger
import scala.io.Source
/**
* Fea... | timfeu/berkeleycoref-thesaurus | src/main/java/org/jobimtext/coref/berkeley/bansalklein/PronounContext.scala | Scala | gpl-3.0 | 4,188 |
package fpinscala.datastructures
sealed trait Tree[+A]
case class Leaf[A](value: A) extends Tree[A]
case class Branch[A](left: Tree[A], right: Tree[A]) extends Tree[A]
object Tree {
def size[A](tree: Tree[A]): Int = tree match {
case Leaf(_) => 1
case Branch(l, r) => 1 + size(l) + size(r)
}
def max... | demonyangyue/fpinscala | exercises/src/main/scala/fpinscala/datastructures/Tree.scala | Scala | mit | 728 |
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.