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 |
|---|---|---|---|---|---|
package org.ai4fm.proofprocess.zeves.core.analysis
import scala.collection.JavaConverters._
import net.sourceforge.czt.base.{ast => z}
import net.sourceforge.czt.z.ast._
import net.sourceforge.czt.zeves.util.Factory
/**
* Sub-term computation utilities for CZT terms.
*
* @author Andrius Velykis
*/
object CztSu... | andriusvelykis/proofprocess | org.ai4fm.proofprocess.zeves.core/src/org/ai4fm/proofprocess/zeves/core/analysis/CztSubTerms.scala | Scala | epl-1.0 | 7,320 |
/*
* 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 ... | hengyicai/OnlineAggregationUCAS | core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala | Scala | apache-2.0 | 31,905 |
/***********************************************************************
* Copyright (c) 2013-2015 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 ... | drackaer/geomesa | geomesa-raster/src/main/scala/org/locationtech/geomesa/raster/data/AccumuloRasterStore.scala | Scala | apache-2.0 | 15,921 |
package org.jetbrains.sbt
package annotator
import java.io.File
import com.intellij.openapi.util.io.FileUtil
import com.intellij.openapi.util.text.StringUtil
import com.intellij.openapi.vfs.{CharsetToolkit, LocalFileSystem}
import com.intellij.psi.PsiFileFactory
import com.intellij.testFramework.PlatformTestCase
impo... | jastice/intellij-scala | scala/scala-impl/test/org/jetbrains/sbt/annotator/AnnotatorTestBase.scala | Scala | apache-2.0 | 1,194 |
/***********************************************************************
* 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-geojson/geomesa-geojson-api/src/main/scala/org/locationtech/geomesa/geojson/GeoJsonIndex.scala | Scala | apache-2.0 | 3,204 |
/******************************************************************************
* Copyright © 2016 Maxim Karpov *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
... | makkarpov/scalingua | scalingua/shared/src/main/scala/ru/makkarpov/scalingua/Macros.scala | Scala | apache-2.0 | 21,449 |
package net.wrap_trap.goju
import com.typesafe.config.Config
import com.typesafe.config.ConfigException
import com.typesafe.config.ConfigFactory
/**
* goju-to: HanoiDB(LSM-trees (Log-Structured Merge Trees) Indexed Storage) clone
* Copyright (c) 2016 Masayuki Takahashi
* This software is released unde... | masayuki038/goju | src/main/scala/net/wrap_trap/goju/Settings.scala | Scala | mit | 1,394 |
package nozzle.logging
import ingredients.logging._
import scala.language.experimental.macros
trait Logging {
def logger(name: String): Logger
def plainOldLogger(name: String): PlainOldLogger
def nameOf[T]: String = macro Logger.nameOf[T]
}
| utaal/nozzle | src/main/scala/logging/Logging.scala | Scala | mit | 249 |
// 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 ducttape.exec
import java.io.File
import collection._
import ducttape.util.Files
import ducttape.util.OrderedSet... | jhclark/ducttape | src/main/scala/ducttape/exec/CompletionChecker.scala | Scala | mpl-2.0 | 7,311 |
package com.github.bepcyc
import org.apache.spark.sql.types.StructField
import org.apache.spark.sql.{Column, DataFrame, DataFrameWriter, SQLContext}
import scala.util.{Failure, Success, Try}
object SparkTools {
implicit class DataFrameOps(df: DataFrame) {
def createTable(name: String, partitions: Seq[String] ... | bepcyc/spark-tools | src/main/scala/com/github/bepcyc/SparkTools.scala | Scala | apache-2.0 | 5,070 |
/*
* Copyright 2017 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | liquidarmour/ct-calculations | src/main/scala/uk/gov/hmrc/ct/accounts/frsse2008/boxes/micro/AC420.scala | Scala | apache-2.0 | 1,163 |
package scredis.protocol.requests
import scredis.protocol._
import scredis.serialization.{ Reader, Writer }
import scala.collection.generic.CanBuildFrom
import scala.collection.mutable.ListBuffer
import scala.concurrent.duration.FiniteDuration
object KeyRequests {
import scredis.serialization.Implicits.stringRe... | Livestream/scredis | src/main/scala/scredis/protocol/requests/KeyRequests.scala | Scala | apache-2.0 | 8,589 |
package edu.gemini.phase2.template.factory
import edu.gemini.pot.sp.{ISPObservation, ISPGroup}
import edu.gemini.spModel.rich.pot.sp._
import scala.collection.JavaConverters._
import edu.gemini.spModel.data.config.{DefaultParameter, IParameter, ISysConfig}
package object impl {
type Maybe[A] = Either[String,A]
... | arturog8m/ocs | bundle/edu.gemini.phase2.skeleton.servlet/src/main/scala/edu/gemini/phase2/template/factory/impl/package.scala | Scala | bsd-3-clause | 3,164 |
package mqfiletransferagent.actors
import akka.camel.Consumer
import akka.camel.CamelMessage
import akka.actor.ActorLogging
import akka.event.LoggingReceive
import scala.xml.XML
import mqfiletransferagent.messages._
import akka.actor.ActorRef
class DataQueueConsumer(dataQueue: String, agentCoordinator: ActorRef) exte... | antongerbracht/MQFileTransfer | MQFileTransferAgent/src/main/scala/mqfiletransferagent/actors/DataQueueConsumer.scala | Scala | apache-2.0 | 683 |
package backend.data.mongodb.service
import backend.data.mongodb.dao.UserDaoComponentMongo
import backend.data.service.UserDataService
import model.blog.User
/**
* The UserDataService using MongoDB
*
* @author Stefan Bleibinhaus
*
*/
object UserDataServiceMongo extends UserDataService with UserDaoComponentM... | ExNexu/scablo | app/backend/data/mongodb/service/UserDataServiceMongo.scala | Scala | bsd-2-clause | 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 ... | shaoxuan-wang/flink | flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/metadata/FlinkDefaultRelMetadataProvider.scala | Scala | apache-2.0 | 1,950 |
/**
* Copyright (C) 2015 DANS - Data Archiving and Networked Services (info@dans.knaw.nl)
*
* 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... | DANS-KNAW/easy-stage-dataset | command/src/test/scala/nl.knaw.dans.easy.stage.command/fileitem/FileItemConfSpec.scala | Scala | apache-2.0 | 2,058 |
package akka.pattern
import language.implicitConversions
import scala.concurrent.{ Future, ExecutionContext }
import scala.util.{ Failure, Success }
import akka.actor._
trait PipeToSupport {
final class PipeableFuture[T](val future: Future[T])(implicit executionContext: ExecutionContext) {
def pipeTo(recipie... | simonlischka/scala-js-actors | actors/src/main/scala/akka/pattern/PipeTo.scala | Scala | bsd-3-clause | 1,865 |
// #Sireum
/*
Copyright (c) 2017-2021, Robby, Kansas State University
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 notice, this
... | sireum/v3-logika-runtime | library/shared/src/main/scala/org/sireum/Either.scala | Scala | bsd-2-clause | 3,173 |
/**
* This file is part of the TA Buddy project.
* Copyright (c) 2012-2014 Alexey Aksenov ezh@ezh.msk.ru
*
* This 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-logic/src/main/scala/org/digimead/tabuddy/desktop/logic/operation/view/OperationModifySorting.scala | Scala | agpl-3.0 | 5,108 |
/*
* Copyright (C) 2012 The Regents of The University California.
* 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/LICENS... | vax11780/shark | src/main/scala/shark/execution/TableScanOperator.scala | Scala | apache-2.0 | 12,661 |
package hello
import org.springframework.web.bind.annotation.{RequestMapping, RestController}
@RestController
class PingResource {
@RequestMapping(path = Array("/ping"))
def ping(): String = "pong"
} | shekhargulati/52-technologies-in-2016 | 37-spring-boot-scala/gs-rest-service/src/main/scala/hello/PingController.scala | Scala | mit | 207 |
package example
final class Baz {
val name = "baz"
def hello = s"Hello, $name"
}
| t-mochizuki/scala-study | mockito-example/src/main/scala/Baz.scala | Scala | mit | 86 |
package io.github.shogowada.scala.jsonrpc.example.e2e.websocket
import io.github.shogowada.scala.jsonrpc.DisposableFunction1
import scala.concurrent.Future
case class Todo(id: String, description: String)
object TodoEventTypes {
val Add = "Add"
val Remove = "Remove"
}
case class TodoEvent(todo: Todo, eventTy... | shogowada/scala-json-rpc | examples/e2e-web-socket/shared/src/main/scala/io/github/shogowada/scala/jsonrpc/example/e2e/websocket/API.scala | Scala | mit | 587 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 MineFormers
*
* 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, ... | MineFormers/Kybology | src/main/scala/de/mineformers/kybology/core/init/CoreItems.scala | Scala | mit | 1,683 |
/* sbt -- Simple Build Tool
* Copyright 2009,2010 Mark Harrah
*/
package sbt
package impl
import StringUtilities.nonEmpty
trait DependencyBuilders
{
final implicit def toGroupID(groupID: String): GroupID =
{
nonEmpty(groupID, "Group ID")
new GroupID(groupID)
}
final implicit def toRepositoryName(name: Stri... | harrah/xsbt | ivy/src/main/scala/sbt/impl/DependencyBuilders.scala | Scala | bsd-3-clause | 2,262 |
package core
import com.bryzek.apidoc.spec.v0.models.ParameterLocation
import org.scalatest.{FunSpec, Matchers}
class ServiceValidatorSpec extends FunSpec with Matchers {
it("should detect empty inputs") {
val validator = TestHelper.serviceValidatorFromApiJson("")
validator.errors.mkString should be("No Da... | movio/apidoc | core/src/test/scala/core/ServiceValidatorSpec.scala | Scala | mit | 15,049 |
package com.sksamuel.elastic4s.validate
import com.sksamuel.elastic4s.IndexesAndTypes
import com.sksamuel.elastic4s.searches.queries.QueryDefinition
trait ValidateApi {
def validateIn(indexesAndTypes: IndexesAndTypes): ValidateExpectsQuery = new ValidateExpectsQuery(indexesAndTypes)
class ValidateExpectsQuery(in... | aroundus-inc/elastic4s | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/validate/ValidateApi.scala | Scala | apache-2.0 | 463 |
package com.mentatlabs.nsa
package scalac
package options
/* -Ynooptimise
* ============
* 2.11.0 - 2.11.8: Clears all the flags set by -optimise. Useful for testing optimizations in isolation.
* 2.12.0: !! missing !!
*/
case object ScalacYNooptimise
extends ScalacOptionBoolean("-Ynooptimise", Sca... | mentat-labs/sbt-nsa | nsa-core/src/main/scala/com/mentatlabs/nsa/scalac/options/private/ScalacYNooptimise.scala | Scala | bsd-3-clause | 342 |
package vultura.util
import org.specs2.Specification
/**
* @author Thomas Geier <thomas.geier@uni-ulm.de>
*/
class packageTest extends Specification {
override def is =
s2"tests for disjoint set of sets" ^
(Set(Set(1),Set(2)).isPairwiseDisjoint must beTrue) ^
(Set(Set(1,2),Set(2)).isPairwiseDisjoi... | ziggystar/vultura-factor | util/src/test/scala/vultura/util/packageTest.scala | Scala | mit | 652 |
/*
* Copyright 2015 LG CNS.
*
* 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 t... | jahnaviancha/scouter | scouter.server/src/scouter/server/db/xlog/XLogIndex.scala | Scala | apache-2.0 | 4,917 |
// Copyright (C) 2011-2012 the original author or authors.
// 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.
// You ... | scalastyle/scalastyle | src/main/scala/org/scalastyle/scalariform/SimplifyBooleanExpressionChecker.scala | Scala | apache-2.0 | 3,428 |
/**
* 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... | sslavic/kafka | core/src/main/scala/kafka/security/auth/Resource.scala | Scala | apache-2.0 | 3,636 |
package net.codejitsu.tasks.dsl
import java.io.File
import java.util.UUID
import org.scalatest.{FlatSpec, Matchers}
/**
* RmTask tests.
*/
class RmTest extends FlatSpec with Matchers {
import scala.concurrent.duration._
import net.codejitsu.tasks._
import net.codejitsu.tasks.dsl.Tasks._
implicit val timeou... | codejitsu/tasks | tasks-dsl/src/test/scala/RmTest.scala | Scala | apache-2.0 | 2,977 |
package arqbrowser.lib
import java.io.IOException
import java.io.DataInput
class ArqCommit(val treeHash: Hash) {
}
object ArqCommit {
def read(stream: DataInput): ArqCommit = {
{
val a = stream.readInt();
val b = stream.readShort();
val c = stream.readByte();
if (a != 0x436f6d6d ||
... | pauldoo/scratch | ArqBrowser/src/arqbrowser/lib/ArqCommit.scala | Scala | isc | 1,058 |
package net.sansa_stack.rdf.common.partition.schema
/**
* Created by Simon Bin on 09/06/17.
*/
case class SchemaStringStringLang(s: String, o: String, l: String)
| SANSA-Stack/SANSA-RDF | sansa-rdf/sansa-rdf-common/src/main/scala/net/sansa_stack/rdf/common/partition/schema/SchemaStringStringLang.scala | Scala | apache-2.0 | 165 |
package zooowner
package test
import org.apache.zookeeper.ZooKeeper
import org.apache.zookeeper.Watcher.Event.KeeperState
import scala.concurrent.duration._
class ZKConnectionMock(
override val client: ZooKeeper,
connectionWatcher: ZKConnectionWatcher)
extends impl.ZKConnectionImpl("", 1.second, connection... | ataraxer/zooowner | zooowner-core/src/main/scala/test/ZKConnectionMock.scala | Scala | mit | 418 |
package typelevelcourse.scalaz
import java.net.URI
import scalaz.{\\/, Applicative, Foldable, Functor, IList, State, Traverse}
// Add a phantom tparam to this class.
sealed abstract class IntOrString[A]
final case class IOSInt[A](x: Int) extends IntOrString[A]
final case class IOSString[A](x: String) extends IntOrSt... | AEtherSurfer/typelevel-course | exercises/src/main/scala/scalaz/Functor.scala | Scala | apache-2.0 | 1,698 |
/**
* 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... | KevinLiLu/kafka | core/src/test/scala/unit/kafka/tools/ConsoleConsumerTest.scala | Scala | apache-2.0 | 16,592 |
/*
* 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 ... | csantanapr/incubator-openwhisk | core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerClientWithFileAccess.scala | Scala | apache-2.0 | 6,864 |
package com.hyenawarrior.OldNorseGrammar.grammar.nominal
import com.hyenawarrior.OldNorseGrammar.grammar.adjectival.AdjectiveTraits
import com.hyenawarrior.OldNorseGrammar.grammar.adjectival.core.AdjectiveFormType
import com.hyenawarrior.OldNorseGrammar.grammar.calcinfra.Stage
import com.hyenawarrior.OldNorseGrammar.g... | HyenaSoftware/IG-Dictionary | OldNorseGrammarEngine/src/main/scala/com/hyenawarrior/OldNorseGrammar/grammar/nominal/SyncopeWordCalculator.scala | Scala | lgpl-3.0 | 3,708 |
package uk.co.sprily
package btf.web
package plugins
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.concurrent.blocking
import scala.concurrent.Future
import com.github.kxbmap.configs._
import com.typesafe.scalalogging.LazyLogging
import play.api.Application
import play.api.Play
impor... | sprily/brush-training | on-site/app/plugins/MqttPublisher.scala | Scala | gpl-3.0 | 3,176 |
/**
* Copyright 2015 Eric Loots
*
* 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 w... | eloots/ScalaTestSas | src/main/scala/com/sequoia/sastest/DelimitedFileRW.scala | Scala | apache-2.0 | 1,786 |
package views.util
import models.PaperSizeAndWhiteSpace
object Calc {
def labelWidth(paper: PaperSizeAndWhiteSpace, cols: Int): Double = {
(paper.width - 2 * paper.margin - (cols - 1) * paper.interLabelGutter) / cols.toDouble
}
def labelHeight(paper: PaperSizeAndWhiteSpace, rows: Int): Double = {
(pap... | dmanchester/playfop | sample-scala/app/views/util/Calc.scala | Scala | apache-2.0 | 410 |
package Chapter2
class uncurryTest {
}
| aromine2/fpinscala | src/test/scala/Chapter2/uncurryTest.scala | Scala | mit | 41 |
/**
* Copyright 2013 Alex Jones
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with work for additional information
* regarding copyright ownership. The ASF licenses file
* to you under the Apache License, Version 2.0 (... | unclealex72/west-ham-calendar | app/controllers/Update.scala | Scala | apache-2.0 | 3,400 |
package org.jetbrains.plugins.dotty.lang.parser.parsing.types
import org.jetbrains.plugins.dotty.lang.parser.DottyElementTypes._
import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder
import org.jetbrains.plugins.scala.lang.parser.parsing.types.Refinement
/**
* @author adkozlov
*/
/*
* R... | jastice/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/dotty/lang/parser/parsing/types/RefinedType.scala | Scala | apache-2.0 | 922 |
package pl.abankowski.ws
import play.api.libs.iteratee._
import play.api.libs.iteratee.Input._
import play.api.libs.ws.{ WS => PlayWS }
class WSImpl extends WS {
override def client = PlayWS.client(play.api.Play.current)
override def url(url: String) = client.url(url)
override def canonizeUrl(url: String) = u... | abankowski/musicbrainz-scala-client | src/main/scala/pl/abankowski/ws/WSImpl.scala | Scala | mit | 418 |
package testsequencing
import java.io.File
import feature._
import htsjdk.samtools.SAMRecord
import org.scalatest.FunSuite
import sequencing.SamReader
import shared.GTF22Data._
/**
* Created by prussell on 2/8/17.
*/
class SamReaderSuite extends FunSuite {
def makeRecordIter(reader: SamReader, feat: Feature):... | pamelarussell/sgxlib | src/test/scala/testsequencing/SamReaderSuite.scala | Scala | mit | 17,283 |
package scalation
/** The `activity` package contains classes, traits and objects for
* activity-oriented simulation models (for example, Petri Nets).
*/
package object activity { }
| scalation/fda | scalation_1.3/scalation_modeling/src/main/scala/scalation/activity/package.scala | Scala | mit | 189 |
/*
* Copyright (C) 2012 Romain Reuillon
*
* This program 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) any later version.
*
* This program is di... | openmole/openmole | openmole/plugins/org.openmole.plugin.environment.ssh/src/main/scala/org/openmole/plugin/environment/ssh/SSHAuthentication.scala | Scala | agpl-3.0 | 4,422 |
/*
* 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 ... | darionyaphet/spark | core/src/main/scala/org/apache/spark/resource/ExecutorResourceRequests.scala | Scala | apache-2.0 | 4,748 |
package com.ing.baker.test.scaladsl
import com.ing.baker.runtime.scaladsl.EventInstance
import com.ing.baker.test.RecipeAssert
import com.ing.baker.test.recipe.WebshopBaker._
import com.ing.baker.test.recipe.WebshopRecipe
import com.ing.baker.test.recipe.WebshopRecipe.{ItemsReserved, OrderPlaced}
import com.typesafe.s... | ing-bank/baker | core/baker-test/src/test/scala/com/ing/baker/test/scaladsl/RecipeAssertTest.scala | Scala | mit | 3,207 |
package com.socrata.datacoordinator.resources
import javax.servlet.http.HttpServletResponse
import com.rojoma.json.v3.ast.JArray
import com.rojoma.json.v3.util.ArrayIteratorEncode
import com.socrata.datacoordinator.id.DatasetId
import com.socrata.datacoordinator.truth.loader.{MissingVersion, Delogger}
import com.socr... | socrata-platform/data-coordinator | coordinator/src/main/scala/com/socrata/datacoordinator/resources/DatasetLogResource.scala | Scala | apache-2.0 | 1,187 |
package com.tsukaby.bean_validation_scala
import java.util.{Calendar, Date}
import javax.validation.constraints.Past
import javax.validation.{ConstraintValidator, ConstraintValidatorContext}
import org.hibernate.validator.internal.constraintvalidators.bv.past.{PastValidatorForReadablePartial, PastValidatorForReadable... | bean-validation-scala/bean-validation-scala | src/main/scala/com/tsukaby/bean_validation_scala/PastValidatorForOption.scala | Scala | mit | 1,635 |
package com.inocybe.odlexplorer
import akka.actor.{Actor, ActorRef, Props}
object StepParent {
case class SendToChild(msg: Any)
}
class StepParent(childProps: Props, fwd: ActorRef) extends Actor {
import StepParent._
val child = context.actorOf(childProps, "child")
def receive = {
case SendToChild(msg) =>... | jshamash/odl-project-explorer | src/test/scala/com/inocybe/odlexplorer/StepParent.scala | Scala | mit | 371 |
package com.varunvats.practice.graph
import scala.collection.mutable
object RouteBetweenNodes {
def apply[T](graph: Map[T, Seq[T]], start: T, goal: T): Boolean =
apply(graph, start, goal, mutable.Set(start))
private def apply[T](graph: Map[T, Seq[T]], start: T, goal: T, visited: mutable.Set[T]): Boolean = {... | varunvats/practice | jvm/src/main/scala/com/varunvats/practice/graph/RouteBetweenNodes.scala | Scala | mit | 520 |
package core.collection
/**
* Collection that belongs to an organization
*
* @author Manuel Bernhardt <bernhardt.manuel@gmail.com>
*/
abstract class OrganizationCollection extends Collection {
val ownerType: OwnerType.OwnerType = OwnerType.ORGANIZATION
} | delving/culture-hub | web-core/app/core/collection/OrganizationCollection.scala | Scala | apache-2.0 | 262 |
/***********************************************************************
* Copyright (c) 2013-2017 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | ronq/geomesa | geomesa-cassandra/geomesa-cassandra-tools/src/main/scala/org/locationtech/geomesa/cassandra/tools/commands/CassandraDeleteFeaturesCommand.scala | Scala | apache-2.0 | 1,459 |
/***********************************************************************
* 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-sql/src/main/scala/org/locationtech/geomesa/spark/RelationUtils.scala | Scala | apache-2.0 | 7,863 |
package com.github.jefersonm.sandbox.scala.learnscala
import java.util.{Date, Locale}
import java.text.DateFormat._
object InteroperateExample {
def main(args: Array[String]){
val now = new Date
val df = getDateInstance(LONG, Locale.GERMAN)
println(df format now)
println(df.format(now))
}
} | jefersonm/sandbox | languages/scala/LearnScala/src/com/github/jefersonm/sandbox/scala/learnscala/InteroperateExample.scala | Scala | mit | 305 |
package org.deeplearning4s.nn.conf.layers
import org.deeplearning4j.nn.conf.Updater
import org.deeplearning4j.nn.conf.distribution.Distribution
import org.deeplearning4j.nn.conf.layers.AutoEncoder.Builder
import org.deeplearning4j.nn.weights.WeightInit
import org.deeplearning4s.nn.conf.ActivationFunction
case class A... | everpeace/deeplearning4s | src/main/scala/org/deeplearning4s/nn/conf/layers/AutoEncoder.scala | Scala | apache-2.0 | 1,211 |
/***********************************************************************
* 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 ... | nagavallia/geomesa | geomesa-accumulo/geomesa-accumulo-tools/src/main/scala/org/locationtech/geomesa/accumulo/tools/data/AccumuloDeleteCatalogCommand.scala | Scala | apache-2.0 | 1,031 |
package spmd
object Util {
def spawnDaemon(f: => Any) {
val t = new Thread(new Runnable {
def run {
f
}
})
t.setDaemon(true)
t.start
}
}
trait Log {
def debug(msg: String) {
if (System.getProperty("spmd.debug") != null) println(msg)
}
}
| jonifreeman/spmd | src/main/scala/spmd/util.scala | Scala | apache-2.0 | 287 |
import sbt._
import sbt.Process._
/**
* Includes the <code>testng</code> task into the project, which depends upon the
* testng.xml file in the current working directory.
*
* Note that this continues to have problems when finding files out on the class path.
*/
trait TestNGTestingProject extends DefaultProject
{... | emarsys/dyson | project/build/TestNGTestingProject.scala | Scala | gpl-3.0 | 1,559 |
package kamon.test
import akka.actor.{ ActorSystem, Actor, Props }
object SimpleApp extends App {
val system = ActorSystem("test-app")
val testActor = system.actorOf(Props[TestActor], "test-actor")
for(_ <- 1 to 10) {
testActor ! "hello"
}
}
class TestActor extends Actor {
def receive = {
case x ... | ivantopo/sam-serpoosh-kamon-example | src/main/scala/kamon/test/SimpleApp.scala | Scala | apache-2.0 | 340 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2002-2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\\___/_/... | felixmulder/scala | src/library/scala/runtime/RichDouble.scala | Scala | bsd-3-clause | 2,806 |
/**
* Copyright 2014-2015 Martin Cooper
*
* 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 ... | martincooper/scala-datatable | src/test/scala/com/github/martincooper/datatable/examples/DataColumnModificationExamples.scala | Scala | apache-2.0 | 2,732 |
package scalalab.gui
import javax.swing._
import java.awt.{Color, Font, Dimension, BorderLayout}
import scala.actors._
import Actor._
import scalalab.utils._
import scalalab.core.InterpreterMessages._
import scalalab.core.UserMessages._
import scalaExec.Interpreter._
// p is the processing actor
class ScalalabFram... | scalalab/scalalab | source/src/main/scala/scalalab/gui/ScalaideFrame.scala | Scala | mit | 4,092 |
package io.mashin.rich.spark
import org.apache.spark.{SparkConf, SparkContext}
import org.scalatest.{FunSuite, ShouldMatchers}
abstract class RichSparkTestSuite extends FunSuite with ShouldMatchers {
protected def sparkContext(name: String): SparkContext = {
new SparkContext(new SparkConf().setAppName(name).se... | mashin-io/rich-spark | main/src/test/scala/io/mashin/rich/spark/RichSparkTestSuite.scala | Scala | apache-2.0 | 1,062 |
final class NonNullChar(val get: Char) extends AnyVal {
def isEmpty = get == 0.toChar
override def toString = if (isEmpty) "NoChar" else s"'$get'"
}
object NonNullChar {
@inline final val None = new NonNullChar(0.toChar)
}
final class SomeProduct extends Product3[String, Int, List[String]] {
def canEqual(x: An... | yusuke2255/dotty | tests/run/value-class-extractor.scala | Scala | bsd-3-clause | 3,337 |
package org.qirx.cms.metadata.dsl
import scala.collection.immutable.ListMap
import org.qirx.cms.metadata.DefaultDocumentIdGenerator
import org.qirx.cms.metadata.DocumentMetadata
import org.qirx.cms.evolution.Evolution
import org.qirx.cms.evolution.Evolutions
import org.qirx.cms.metadata.PropertyMetadata
import play.ap... | EECOLOR/play-cms | cms/src/main/scala/org/qirx/cms/metadata/dsl/Document.scala | Scala | mit | 1,275 |
package view
import org.specs2.mutable._
class GitBucketHtmlSerializerSpec extends Specification {
import GitBucketHtmlSerializer._
"generateAnchorName" should {
"convert whitespace characters to hyphens" in {
val before = "foo bar baz"
val after = generateAnchorName(before)
after mustEqua... | Muscipular/gitbucket | src/test/scala/view/GitBucketHtmlSerializerSpec.scala | Scala | apache-2.0 | 721 |
/*
This file is part of Intake24.
Copyright 2015, 2016 Newcastle University.
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 appl... | digitalinteraction/intake24 | FoodDataServices/src/main/scala/uk/ac/ncl/openlab/intake24/services/foodindex/FoodIndex.scala | Scala | apache-2.0 | 1,291 |
package com.softwaremill.play24.modules
import com.softwaremill.play24.dao.{CoffeeDao, SupplierDao}
import org.specs2.mock.Mockito
trait MockDaoModule extends Mockito {
lazy val coffeeDao = mock[CoffeeDao]
lazy val supplierDao = mock[SupplierDao]
}
| adamw/macwire | examples/play24/test/com/softwaremill/play24/modules/MockDaoModule.scala | Scala | apache-2.0 | 255 |
package org.deepdive.inference
case class Factor(id: Long, factorFunction: String, weightId: Long,
variables: List[FactorVariable]) extends CSVFormattable {
def toCSVRow = Array(id.toString, weightId.toString, factorFunction.toString)
}
case class FactorVariable(factorId: Long, position: Long, positive: Boolean,... | feiranwang/deepdive | src/main/scala/org/deepdive/inference/models/Factor.scala | Scala | apache-2.0 | 472 |
package com.googlecode.kanbanik.commands
import com.googlecode.kanbanik.model.Project
import com.googlecode.kanbanik.builders.ProjectBuilder
import com.googlecode.kanbanik.dtos._
import com.googlecode.kanbanik.dtos.ListDto
import com.googlecode.kanbanik.dtos.ProjectDto
import com.googlecode.kanbanik.dtos.EmptyDto
clas... | nagyistoce/kanbanik | kanbanik-server/src/main/scala/com/googlecode/kanbanik/commands/GetAllProjectsCommand.scala | Scala | apache-2.0 | 609 |
package org.freetrm.eventstore.http
import java.net.URLDecoder
import java.util.concurrent.atomic.AtomicReference
import akka.NotUsed
import akka.actor.{ActorLogging, Actor, Props, ActorSystem}
import akka.http.scaladsl.coding.{NoCoding, Gzip}
import akka.http.scaladsl.model.StatusCodes._
import akka.http.scaladsl.mo... | freetrm/eventstore | base/src/org/freetrm/eventstore/http/EventStoreHttpServer.scala | Scala | apache-2.0 | 8,183 |
/*
* DialogSource.scala
* (Desktop)
*
* Copyright (c) 2013-2021 Hanns Holger Rutz. All rights reserved.
*
* This software is published under the GNU Lesser General Public License v2.1+
*
*
* For further information, please contact Hanns Holger Rutz at
* contact@sciss.de
*/
package de.sciss
package deskto... | Sciss/Desktop | core/src/main/scala/de/sciss/desktop/DialogSource.scala | Scala | lgpl-2.1 | 1,419 |
/*
* Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com>
*/
package play.api.libs
import akka.actor.ActorSystem
import akka.stream.scaladsl._
import akka.stream.{ ActorMaterializer, Materializer }
import akka.util.{ ByteString, Timeout }
import org.specs2.mutable._
import play.api.PlayCoreTestApplicat... | aradchykov/playframework | framework/src/play/src/test/scala/play/api/libs/CometSpec.scala | Scala | apache-2.0 | 3,495 |
package com.twitter.finatra.json.internal.caseclass.jackson
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.core.ObjectCodec
import com.fasterxml.jackson.databind._
import com.fasterxml.jackson.databind.`type`.TypeFactory
import com.fasterxml.jackson.databind.annotation.JsonDeserializ... | jaume-pinyol/finatra | jackson/src/main/scala/com/twitter/finatra/json/internal/caseclass/jackson/CaseClassField.scala | Scala | apache-2.0 | 6,459 |
/*
* Copyright 2017 Datamountaineer.
*
* 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... | datamountaineer/stream-reactor | kafka-connect-common/src/test/scala/com/datamountaineer/streamreactor/common/config/KcqlSettingsTest.scala | Scala | apache-2.0 | 3,091 |
package com.xenopsconsulting.gamedayapi
import org.scalatest.junit.AssertionsForJUnit
import org.junit.Test
import org.junit.Assert._
import org.junit.Before
import java.text.SimpleDateFormat
import java.util.Date
class LineScoreInningTest extends AssertionsForJUnit {
var game: Game = _
var lineScoreInning: LineS... | ecopony/scala-gameday-api | src/test/scala/com/xenopsconsulting/gamedayapi/LineScoreInningTest.scala | Scala | mit | 912 |
/*
* 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 ... | yu-iskw/gihyo-spark-book-example | src/main/scala/jp/gihyo/spark/ch06/gihyo_6_3_TwitterStream.scala | Scala | apache-2.0 | 3,869 |
package tuner.gui.util
import scala.collection.immutable.SortedMap
import tuner.Table
object Histogram {
private def countData(values:Iterable[Float], numBreaks:Int) = {
// Make sure we have enough values for the histogram
if(values.isEmpty || values.tail.isEmpty) {
throw new IllegalArgumentException... | gabysbrain/tuner | src/main/scala/tuner/gui/util/Histogram.scala | Scala | mit | 1,583 |
/**
* Copyright (C) 2010 Orbeon, Inc.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) any later version.
*
* This program i... | joansmith/orbeon-forms | src/main/scala/org/orbeon/oxf/xforms/event/events/XFormsUIEvent.scala | Scala | lgpl-2.1 | 2,809 |
package com.github.aselab.activerecord.validations
import com.github.aselab.activerecord._
import inner._
class ValidatableSpec extends DatabaseSpecification {
class SaveableImpl extends Saveable {
var calledMethods = List[String]()
override def save() = {
calledMethods :+= "save"
true
}
... | aselab/scala-activerecord | activerecord/src/test/scala/validations/ValidatableSpec.scala | Scala | mit | 3,170 |
/*
* Copyright 2013 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 t... | Flipkart/zipkin | zipkin-anormdb/src/main/scala/com/twitter/zipkin/storage/anormdb/DBPool.scala | Scala | apache-2.0 | 1,726 |
package io.cosmicteapot
import java.nio.ByteOrder
/**
* Created by michael on 15/10/2015.
*/
object Colour {
type ColourI = Int
def r(c:ColourI) : Int = c & 0xff
def g(c:ColourI) : Int = (c >>> 8) & 0xff
def b(c:ColourI) : Int = (c >>> 16) & 0xff
def a(c:ColourI) : Int = (c >>> 24) & 0xff
def rf(c... | MichaelShaw/gridme | src/main/scala/io/cosmicteapot/Colour.scala | Scala | mit | 1,510 |
package main.scala
import java.io.FileReader
import scala.util.parsing.combinator._
object TestParser {
def foo(args : Array[String]) {
val parser = GraphParser
val reader = new FileReader("test.graph")
parser.parseAll(parser.graph, reader)
println("Got a graph named: " + parser.net.name)
pri... | dbigelow/activation_network | src/main/scala/TestParser.scala | Scala | bsd-2-clause | 429 |
package org.scalamu.core.testapi
package junit
import _root_.junit.framework.TestCase
import org.junit.Test
import org.junit.runner.{Result, RunWith}
class JUnitFramework(override val arguments: String) extends TestingFramework {
type R = Result
override def name: String = "JUnit"
override def runner:... | sugakandrey/scalamu | core/src/main/scala/org/scalamu/core/testapi/junit/JUnitFramework.scala | Scala | gpl-3.0 | 841 |
package com.datastax.spark.connector.rdd.typeTests
import com.datastax.oss.driver.api.core.cql.Row
import com.datastax.spark.connector.cluster.DefaultCluster
class AsciiTypeTest extends AbstractTypeTest[String, String] with DefaultCluster {
override val typeName = "ascii"
override val typeData: Seq[String] = Seq... | datastax/spark-cassandra-connector | connector/src/it/scala/com/datastax/spark/connector/rdd/typeTests/AsciiTypeTest.scala | Scala | apache-2.0 | 550 |
package com.avsystem.commons
package spring
import java.{util => ju}
import com.avsystem.commons.spring.AttrNames._
import scala.annotation.nowarn
import com.typesafe.config._
import org.springframework.beans.factory.annotation.Qualifier
import org.springframework.beans.factory.config.ConstructorArgumentValues.ValueH... | AVSystem/scala-commons | commons-spring/src/main/scala/com/avsystem/commons/spring/HoconBeanDefinitionReader.scala | Scala | mit | 15,364 |
/*
* Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com>
*/
package play.api.libs.crypto
import org.specs2.mutable.Specification
import play.api.http.SecretConfiguration
class CookieSignerSpec extends Specification {
"signer.sign" should {
"be able to sign input using HMAC-SHA1 using the con... | ktoso/playframework | framework/src/play/src/test/scala/play/api/libs/crypto/CookieSignerSpec.scala | Scala | apache-2.0 | 1,428 |
/*
* Copyright (c) 2017 Magomed Abdurakhmanov, Hypertino
* 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 com.hypertino.hyperbus.model
object Method ... | hypertino/hyperbus | hyperbus/src/main/scala/com/hypertino/hyperbus/model/Method.scala | Scala | mpl-2.0 | 638 |
/*
* 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... | Myllyenko/incubator-toree | plugins/src/test/scala/org/apache/toree/plugins/dependencies/DependencyManagerSpec.scala | Scala | apache-2.0 | 19,184 |
package eu.liderproject.jsonld
sealed trait Json {
def toObj : Object
}
object Json {
def apply(objs : (String, Json)*) = JsonObject(objs.
map({case (x, y) => JsonField(x, y)}).iterator)
def apply(objs : Json*) = JsonArray(objs.iterator)
}
case class JsonArray(val values : Iterator[Json]) extends Json {
... | jmccrae/codegen | src/main/scala/lider/jsonld/json.scala | Scala | apache-2.0 | 1,266 |
package io.itdraft.levenshteinautomaton.description.nonparametric
/*
* 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 requir... | itdraft/levenshtein-automaton | src/test/scala-2.11/io/itdraft/levenshteinautomaton/description/nonparametric/ElementaryTransitionSpec.scala | Scala | apache-2.0 | 2,882 |
package io.finch.petstore
import argonaut.CodecJson
import argonaut.Argonaut._
/**
* Represents the current state of the Petstore and how many pets are currently of which [[Status]].
*/
case class Inventory(available: Int, pending: Int, adopted: Int)
/**
* Provides a codec for encoding and decoding [[Inventory]] ... | peel/finch | petstore/src/main/scala/io/finch/petstore/inventory.scala | Scala | apache-2.0 | 770 |
/*
* Copyright (c) 2015 Alexandros Pappas p_alx hotmail com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unle... | gnostix/freeswitch-monitoring | src/main/scala/gr/gnostix/freeswitch/model/SecureClient.scala | Scala | apache-2.0 | 1,289 |
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.