code stringlengths 5 1M | repo_name stringlengths 5 109 | path stringlengths 6 208 | language stringclasses 1
value | license stringclasses 15
values | size int64 5 1M |
|---|---|---|---|---|---|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | asurve/arvind-sysml | src/test/scala/org/apache/sysml/api/ml/LogisticRegressionSuite.scala | Scala | apache-2.0 | 4,470 |
import sbt._
object ClientBuild extends Build {
lazy val common = ProjectRef(file("../common"), "common")
val client = Project("client", file(".")).dependsOn(common)
}
| art4ul/scrafty | client/project/ClientBuild.scala | Scala | apache-2.0 | 175 |
package model
import entitytled.Entitytled
import play.api.Play
import play.api.db.slick.DatabaseConfigProvider
import slick.driver.JdbcProfile
trait PIMAidDBContext extends Entitytled
with ConditionExpressionComponent
with DrugComponent
with DrugGroupComponent
with ExpressionTermComponent
with GenericTyp... | RSSchermer/pim-aid | app/model/PIMAidDBContext.scala | Scala | mit | 637 |
package io.getquill.context.sql.norm
import io.getquill.ast._
import io.getquill.norm.BetaReduction
import io.getquill.norm.Normalize
/**
* This phase expands inner joins adding the correct aliases so they will function. Unfortunately,
* since it introduces aliases into the clauses that don't actually exist in the ... | getquill/quill | quill-sql-portable/src/main/scala/io/getquill/sql/norm/ExpandJoin.scala | Scala | apache-2.0 | 2,277 |
/*
* Licensed to Intel Corporation under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* Intel Corporation licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use t... | dding3/BigDL | dl/src/main/scala/com/intel/analytics/bigdl/optim/DistriOptimizer.scala | Scala | apache-2.0 | 22,036 |
package io.vamp.operation.notification
import io.vamp.common.akka.RequestError
import io.vamp.common.notification.{ ErrorNotification, Notification }
import io.vamp.model.artifact._
case class InternalServerError(reason: Any) extends Notification with ErrorNotification
case class UnsupportedDeploymentRequest(request... | magneticio/vamp | operation/src/main/scala/io/vamp/operation/notification/OperationNotification.scala | Scala | apache-2.0 | 2,334 |
package scala.collection.immutable
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
@RunWith(classOf[JUnit4])
class ParallelConsistencyTest {
private val theSeq = Seq(1,2,3)
// This collection will throw an exception if you do anything but call .length or .seq
private val ... | felixmulder/scala | test/junit/scala/collection/ParallelConsistencyTest.scala | Scala | bsd-3-clause | 1,412 |
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs
// License: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.indexer
import org.ensime.fixture.SharedEnsimeVFSFixture
import org.ensime.util.EnsimeSpec
import org.ensime.vfs._
import scala.util.Try
class ClassfileDepicklerSpec ext... | ensime/ensime-server | core/src/test/scala/org/ensime/indexer/ClassfileDepicklerSpec.scala | Scala | gpl-3.0 | 1,725 |
package com.twitter.finagle.server
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
class ServerInfoTest extends FunSuite {
test("ServerInfo.Empty") {
assert(ServerInfo.Empty.environment.isEmpty)
}
}
| adriancole/finagle | finagle-toggle/src/test/scala/com/twitter/finagle/server/ServerInfoTest.scala | Scala | apache-2.0 | 295 |
package japgolly.scalajs.react.callback
import cats.effect._
import cats.effect.laws.AsyncTests
import cats.effect.testkit.TestInstances
import cats.kernel.Eq
import cats.tests.CatsSuite
import cats.{Id, Order, ~>}
import org.scalacheck._
import scala.concurrent.duration._
import scala.scalajs.js
final class AsyncTes... | japgolly/scalajs-react | callbackExtCatsEffect/src/test/scala/japgolly/scalajs/react/callback/AsyncTest.scala | Scala | apache-2.0 | 2,612 |
/***********************************************************************
* 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... | boundlessgeo/geomesa | geomesa-fs/geomesa-fs-datastore/src/main/scala/org/locationtech/geomesa/fs/FileSystemDataStore.scala | Scala | apache-2.0 | 4,733 |
/*
* Copyright 2014–2018 SlamData 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... | slamdata/slamengine | qsu/src/main/scala/quasar/qsu/LPtoQS.scala | Scala | apache-2.0 | 3,549 |
package org.adridadou.ethereum.propeller.converters.e2e
import java.math.BigInteger
import org.scalacheck.Arbitrary._
import org.scalacheck.Prop._
import org.scalatest.check.Checkers
import org.scalatest.{FlatSpec, Matchers}
/**
* Created by davidroon on 26.03.18.
* This code is released under Apache 2 license
... | adridadou/eth-propeller-core | src/test/scala/org/adridadou/ethereum/propeller/converters/e2e/ListTest.scala | Scala | apache-2.0 | 903 |
/*
* 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 ... | greghogan/flink | flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/metadata/FlinkRelMdColumnUniqueness.scala | Scala | apache-2.0 | 26,154 |
/*
* Copyright (c) <2015-2016>, see CONTRIBUTORS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list... | amanjpro/languages-a-la-carte | ooj/src/main/scala/errors/errorcodes.scala | Scala | bsd-3-clause | 7,810 |
package edu.stanford.graphics.shapenet.util
import com.jme3.math.ColorRGBA
import com.typesafe.config.{ConfigFactory, Config}
import edu.stanford.graphics.shapenet.Constants
import scala.collection.JavaConversions._
import joptsimple.{OptionException, OptionParser}
import java.io.File
/**
* Config helper
*
* @au... | ShapeNet/shapenet-viewer | src/main/scala/edu/stanford/graphics/shapenet/util/ConfigHelper.scala | Scala | mit | 7,495 |
/* Copyright 2014 UniCredit S.p.A.
*
* 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... | unicredit/hippodb | hbase-sync/src/main/scala/unicredit/hippo/source/TemplatedTextSequenceFile.scala | Scala | apache-2.0 | 1,020 |
/*
"Functional programs contain no assignment statements, so variables, once given a value, never change."
What is this property called?
*/
| agconti/scala-school | 03-intro-fp-scala/slides/slide003.scala | Scala | mit | 143 |
/*
* Copyright 2016 Renaud Bruneliere
*
* 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... | bruneli/scalaopt | core/src/main/scala/com/github/bruneli/scalaopt/core/function/ObjectiveFunctionWithGradient.scala | Scala | apache-2.0 | 1,707 |
import org.scalatest.{FlatSpec, Matchers}
class MethodTest extends FlatSpec with Matchers {
}
| oliverhaase/sai | src/test/scala/MethodTest.scala | Scala | mit | 96 |
package com.v_standard.vsp.compiler
import java.io.File
import org.scalatest.FunSpec
import org.scalatest.matchers.ShouldMatchers
import scala.io.Source
/**
* ScriptCompiler テストスペッククラス。
*/
class ScriptCompilerSpec extends FunSpec with ShouldMatchers {
describe("compile") {
describe("動的の場合") {
it("コンパイル済みスクリプ... | VanishStandard/vsp | src/test/scala/com/v_standard/vsp/compiler/ScriptCompilerSpec.scala | Scala | bsd-3-clause | 2,269 |
package drt.server.feeds.lcy
import akka.actor.{ActorSystem, Cancellable}
import akka.http.scaladsl.model.{ContentTypes, HttpEntity, HttpRequest, HttpResponse}
import akka.stream.Materializer
import akka.stream.scaladsl.{Sink, Source}
import drt.server.feeds.common.HttpClient
import drt.shared.FlightsApi.Flights
impor... | UKHomeOffice/drt-scalajs-spa-exploration | server/src/test/scala/drt/server/feeds/lcy/LCYFeedSpec.scala | Scala | apache-2.0 | 3,951 |
package sample.stream.akka_http
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.HttpRequest
import akka.stream.ActorMaterializer
import akka.stream.scaladsl.{ Sink, Source }
object ConnectionLevelExample {
def main(args: Array[String]) {
implicit val actorSystem = A... | pallavig/akka-examples | src/main/scala/sample/stream/akka_http/ConnectionLevelExample.scala | Scala | cc0-1.0 | 746 |
package systems.adaptix.bling.tags.graph
import org.specs2.mutable.Specification
import scala.collection.mutable
/**
* Created by nkashyap on 5/17/15.
*/
class DagVertexSpecification extends Specification {
"A DagVertex is instantiated with a string which serves as its label." >> {
val vertex = new DagVertex... | nkashy1/bling | src/test/scala/systems/adaptix/bling/tags/graph/DagVertexSpecification.scala | Scala | mit | 4,167 |
/*
* Copyright 2014–2018 SlamData 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... | jedesah/Quasar | core/src/main/scala/quasar/fs/mount/MountRequestHandler.scala | Scala | apache-2.0 | 3,923 |
package com.twitter.finagle.ssl.client
import com.twitter.finagle.Address
import com.twitter.finagle.ssl.{Engine, SslConfigurations}
import javax.net.ssl.SSLContext
/**
* This class provides an ability to use an initialized supplied
* `javax.net.ssl.SSLContext` as the basis for creating [[Engine Engines]].
*/
fina... | twitter/finagle | finagle-core/src/main/scala/com/twitter/finagle/ssl/client/SslContextClientEngineFactory.scala | Scala | apache-2.0 | 1,649 |
package code.model
import _root_.net.liftweb.mapper._
import _root_.net.liftweb.util._
import _root_.net.liftweb.common._
import _root_.net.liftweb.sitemap.Loc._
import _root_.net.liftweb.http._
import _root_.scala.xml.transform._
import _root_.net.liftweb.util.Helpers._
object Comment extends Comment with LongKeyed... | Cerovec/LiftSocial | src/main/scala/code/model/Comment.scala | Scala | apache-2.0 | 964 |
/*
* 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 ... | zohar-mizrahi/flink | flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/validation/TableEnvironmentValidationTest.scala | Scala | apache-2.0 | 8,277 |
package models
import java.io.ByteArrayInputStream
import com.amazonaws.services.s3.model.ObjectMetadata
import java.io.InputStream
import scala.io.Source
import play.api.Logger
import com.amazonaws.auth.BasicAWSCredentials
import com.amazonaws.services.s3.AmazonS3Client
import org.slf4j.LoggerFactory
import com.amazo... | saine1a/IMDRaces | app/models/S3Communicator.scala | Scala | mit | 2,147 |
package iot.pood.management.actor
import iot.pood.base.model.security.SecurityMessages.JwtToken
import iot.pood.management.actors.AuthenticatorService
import iot.pood.management.actors.AuthenticatorService._
import iot.pood.management.security.internal.JwtTokenService
import akka.pattern.ask
import com.typesafe.config... | rafajpet/iot-pood | iot-pood-management/src/test/scala/iot/pood/management/actor/AuthenticatorServiceTest.scala | Scala | mit | 3,772 |
package caustic.benchmark.runtime
import caustic.runtime._
import scala.util.Random
/**
* Benchmarks the throughput of the runtime under varying workloads. Adjusting the size of the key
* space and the relative proportion of keys that are read and written in each transaction
* implicitly changes the contention pr... | ashwin153/caustic | caustic-benchmark/src/main/scala/caustic/benchmark/runtime/ThroughputBenchmark.scala | Scala | apache-2.0 | 1,885 |
package org.jetbrains.plugins.dotty.lang.parser.parsing.params
/**
* @author adkozlov
*/
object ParamClause extends org.jetbrains.plugins.scala.lang.parser.parsing.params.ParamClause {
override protected val params = Params
}
| katejim/intellij-scala | src/org/jetbrains/plugins/dotty/lang/parser/parsing/params/ParamClause.scala | Scala | apache-2.0 | 233 |
package object regex {
val validChars = (' ' to '~').toSet
}
| dkesler/regex-crossword-solver | src/main/scala/regex/package.scala | Scala | mit | 63 |
package at.logic.gapt.prooftool
/**
* Created by IntelliJ IDEA.
* User: mrukhaia
* Date: 2/3/11
* Time: 4:25 PM
*/
import at.logic.gapt.language.hol.toPrettyString
import at.logic.gapt.proofs.lk.base.{ FSequent, Sequent }
import at.logic.gapt.expr._
import at.logic.gapt.proofs.occurrences.{ FormulaOccurrence, de... | gisellemnr/gapt | src/main/scala/at/logic/gapt/prooftool/DrawSequent.scala | Scala | gpl-3.0 | 14,902 |
package com.rasterfoundry.datamodel
import io.circe._
import cats.syntax.either._
sealed abstract class BandDataType(val repr: String) {
override def toString = repr
}
object BandDataType {
case object Diverging extends BandDataType("DIVERGING")
case object Sequential extends BandDataType("SEQUENTIAL")
case ... | aaronxsu/raster-foundry | app-backend/datamodel/src/main/scala/BandDataType.scala | Scala | apache-2.0 | 860 |
/*
* 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 ... | guoxiaolongzte/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashedRelation.scala | Scala | apache-2.0 | 26,710 |
package ch.uzh.ifi.pdeboer.pplib.hcomp
/**
* Created by pdeboer on 26/11/14.
*/
//TODO implement me
class CrowdWorker(val id: String) extends HCompPortalAdapter {
override def processQuery(query: HCompQuery, properties: HCompQueryProperties): Option[HCompAnswer] = ???
override def getDefaultPortalKey: String = ??... | uzh/PPLib | src/main/scala/ch/uzh/ifi/pdeboer/pplib/hcomp/CrowdWorker.scala | Scala | mit | 382 |
package com.wix.mysql.config
import java.util.TimeZone
import java.util.concurrent.TimeUnit
import com.wix.mysql.config.Charset.{LATIN1, defaults}
import com.wix.mysql.config.MysqldConfig.aMysqldConfig
import com.wix.mysql.distribution.Version._
import org.specs2.mutable.SpecWithJUnit
import scala.collection.JavaCon... | wix/wix-embedded-mysql | wix-embedded-mysql/src/test/scala/com/wix/mysql/config/MysqldConfigTest.scala | Scala | bsd-3-clause | 2,375 |
/**
* Copyright 2015 Mohiva Organisation (license at mohiva dot com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless req... | rfranco/play-silhouette | silhouette/test/com/mohiva/play/silhouette/impl/providers/SocialProviderRegistrySpec.scala | Scala | apache-2.0 | 2,571 |
/*
* Copyright 2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | krasserm/akka-stream-eventsourcing | src/test/scala/com/github/krasserm/ases/StreamSpec.scala | Scala | apache-2.0 | 1,584 |
package formless
package http4s
import org.http4s.server.blaze._
object Server {
val builder = BlazeBuilder.mountService(Service.view)
def serve() = builder.run.awaitShutdown()
}
| underscoreio/formless | http4s/src/main/scala/formless/http4s/Server.scala | Scala | apache-2.0 | 186 |
package com.pauldoo.euler.puzzle
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
class Puzzle1Test extends PuzzleTest {
def puzzle = Puzzle1;
def expectedAnswer = 233168;
} | pauldoo/projecteuler | test/com/pauldoo/euler/puzzle/Puzzle1Test.scala | Scala | isc | 231 |
package camel
import org.apache.camel.scala.dsl.builder.{RouteBuilderSupport, RouteBuilder}
import org.slf4j.LoggerFactory
import org.apache.camel.Exchange
import java.sql.Timestamp
import java.text.SimpleDateFormat
import scala.xml.Elem
import scala.util.{Try,Success,Failure}
/**
* Created by boris on 12/7/13.
*/
... | bs76/camel-scala | camel-scala-router/src/main/scala/camel/router.scala | Scala | apache-2.0 | 3,723 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 Helge Holzmann
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to us... | helgeho/Web2Warc | src/main/scala/de/l3s/web2warc/utils/SimpleHttpReader.scala | Scala | mit | 2,676 |
package de.berlin.arzt.math
object Complex {
def squaredAbs(a: Double, b: Double): Double = a * a + b * b
def im(a: Double, b: Double): Double = b
def re(a: Double, b: Double): Double = a
def prodRe(a1: Double, b1: Double, a2: Double, b2: Double): Double = a1 * a2 - b1 * b2
def prodIm(a1: Double, b1: Do... | arzt/type-neo | src/main/scala/de/berlin/arzt/math/Complex.scala | Scala | gpl-2.0 | 675 |
import java.io.File
import sbt._
import sbt.Keys._
object Benchmarks {
val libToTest = SettingKey[ModuleID]("libToTest")
val benchOutput = SettingKey[File]("benchOutput")
val produceBench = TaskKey[File]("produceBench")
val runBench = TaskKey[Unit]("runBench")
val enableScalacProfiler = SettingKey[Boolean]... | rorygraves/perf_tester | light/project/Benchmarks.scala | Scala | apache-2.0 | 3,506 |
/**
* Copyright (c) 2013, Regents of the University of California
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, ... | google/cluster-scheduler-simulator | src/main/scala/ExperimentRunner.scala | Scala | bsd-3-clause | 33,666 |
/*
* ******************************************************************************
* * Copyright (C) 2013 Christopher Harris (Itszuvalex)
* * Itszuvalex@gmail.com
* *
* * This program is free software; you can redistribute it and/or
* * modify it under the terms of the GNU General Public License
* * as p... | Itszuvalex/Femtocraft-alpha-1 | src/main/java/com/itszuvalex/femtocraft/power/blocks/BlockFemtoCable.scala | Scala | gpl-2.0 | 3,409 |
package com.goyeau.kubernetes.client.operation
import cats.effect.Async
import cats.syntax.either._
import com.goyeau.kubernetes.client.util.Uris.addLabels
import com.goyeau.kubernetes.client.{KubeConfig, WatchEvent}
import fs2.Stream
import io.circe.jawn.CirceSupportParser
import io.circe.{Decoder, Json}
import org.t... | joan38/kubernetes-client | kubernetes-client/src/com/goyeau/kubernetes/client/operation/Watchable.scala | Scala | apache-2.0 | 1,346 |
//: ----------------------------------------------------------------------------
//: Copyright (C) 2014 Verizon. 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 Licen... | lech-glowiak/remotely | core/src/test/scala/UberSpec.scala | Scala | apache-2.0 | 3,512 |
package workload.rampups
import io.gatling.core.Predef._
/**
* Created by ebour.
*/
class AtOnceRampup extends workload.rampups.Rampup {
val userCount = System.getProperty("userCount", "1").toInt
override def getRampup: io.gatling.core.controller.inject.InjectionStep = {
atOnceUsers(userCount)
}
over... | ebour/mytoolbox | gatling/src/test/scala/workload/rampups/AtOnceRampup.scala | Scala | mit | 407 |
/*
* 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 ... | GJL/flink | flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/batch/sql/PartitionableSinkTest.scala | Scala | apache-2.0 | 2,949 |
/*
* 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 ... | tillrohrmann/flink | flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/rules/logical/SimplifyFilterConditionRuleTest.scala | Scala | apache-2.0 | 4,066 |
package ir.web.bing
import java.net.URL
import ir.Query
import ir.web
/**
* <pre>
* Created on 6/1/15.
* </pre>
* @param searchedPages searched pages
* @param query query
* @param startIndex starting index
* @param currentUrl current URL
* @param nextUrl next URL
* @author K.Sakamoto
*/
class BingSearchedP... | ktr-skmt/FelisCatusZero | src/main/scala/ir/web/bing/BingSearchedPageList.scala | Scala | apache-2.0 | 686 |
/*
* Copyright 2013 TeamNexus
*
* TeamNexus Licenses this file to you under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://opensource.org/licenses/mit-license.php
*
* Unless required by applicable law ... | nailed/nailed-legacy | src/main/scala/com/nexus/data/json/JsonNumber.scala | Scala | unlicense | 1,287 |
package com.typesafe.sbt.packager.linux
import sbt._
trait LinuxMappingDSL {
/** DSL for packaging files into .deb */
def packageMapping(files: (File, String)*) = LinuxPackageMapping(files)
/**
* @param dir - use some directory, e.g. target.value
* @param files
*/
def packageTemplateMapping(file... | kodemaniak/sbt-native-packager | src/main/scala/com/typesafe/sbt/packager/linux/LinuxMappingDSL.scala | Scala | bsd-2-clause | 1,058 |
package instagram.api.yaml
import play.api.mvc.{Action, Controller}
import play.api.data.validation.Constraint
import de.zalando.play.controllers._
import PlayBodyParsing._
import PlayValidations._
import scala.math.BigInt
import scala.math.BigDecimal
// ----- constraints and wrapper validations -----
class MediaIdOpt... | zalando/play-swagger | play-scala-generator/src/test/resources/expected_results/validation/instagram_api_yaml.scala | Scala | mit | 15,965 |
/*
* Copyright 2009-2010 WorldWide Conferencing, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | wsaccaco/lift | framework/lift-base/lift-actor/src/main/scala/net/liftweb/actor/LiftActor.scala | Scala | apache-2.0 | 9,823 |
package com.coiney.akka.rabbit.protocol
sealed trait RabbitResponse
case class Success(request: RabbitRequest, result: Option[Any] = None) extends RabbitResponse
case class Failure(request: RabbitRequest, cause: Throwable) extends RabbitResponse
case class DisconnectedError(request: RabbitRequest) extends RabbitRespo... | Coiney/akka-rabbit | akka-rabbit-core/src/main/scala/com/coiney/akka/rabbit/protocol/RabbitResponseProtocol.scala | Scala | bsd-3-clause | 324 |
/*
* Copyright 2016 The BigDL Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | intel-analytics/BigDL | scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/nn/keras/nn/AveragePooling3DSpec.scala | Scala | apache-2.0 | 2,149 |
/*
* Copyright 2016 Nikolay Smelik
*
* 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 ... | kerzok/ScalaBot | BotApi/src/main/scala/scalabot/common/web/Webhook.scala | Scala | apache-2.0 | 2,619 |
package slick.migration.ast
import scala.slick.ast.FieldSymbol
/**
* Internal lightweight data structure, containing
* information for schema manipulation about an index
* @param table The Slick table object
* @param name The name of the index
* @param unique Whether the column can contain duplicates
* @param c... | itryapitsin/slick-migration | core/src/main/scala/slick/migration/ast/IndexInfo.scala | Scala | apache-2.0 | 536 |
package com.twitter.finatra.kafkastreams.config
import com.twitter.conversions.DurationOps._
import com.twitter.conversions.StorageUnitOps._
import java.util
import org.apache.kafka.common.config.TopicConfig.{
CLEANUP_POLICY_COMPACT,
CLEANUP_POLICY_CONFIG,
DELETE_RETENTION_MS_CONFIG,
SEGMENT_BYTES_CONFIG
}
imp... | twitter/finatra | kafka-streams/kafka-streams/src/main/scala/com/twitter/finatra/kafkastreams/config/DefaultTopicConfig.scala | Scala | apache-2.0 | 1,138 |
/*-
* #%L
* Core runtime for OOXOO
* %%
* Copyright (C) 2006 - 2017 Open Design Flow
* %%
* 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
* (a... | richnou/ooxoo-core | ooxoo-core/src/main/scala/com/idyria/osi/ooxoo/core/buffers/datatypes/hash/SHA256String.scala | Scala | agpl-3.0 | 1,574 |
package japgolly.scalajs
import japgolly.scalajs.react.util.DefaultEffects._
package object react
extends japgolly.scalajs.react.internal.CoreGeneralF[Sync]
with japgolly.scalajs.react.internal.ReactCallbackExtensions
with japgolly.scalajs.react.callback.Exports
with japgolly.scalajs.react.ReactCats
| japgolly/scalajs-react | coreBundleCBIO/src/main/scala/japgolly/scalajs/react/package.scala | Scala | apache-2.0 | 320 |
package chapter1
import org.scalatest.{FreeSpec, Matchers}
class Question4Spec extends FreeSpec with Matchers {
import Question4._
"Should be replaced" in {
replace("Mr John Smith ".toCharArray) shouldBe "Mr%20John%20Smith"
replace("Mr JohnSmith ".toCharArray) shouldBe "Mr%20%20JohnSmith"
repla... | alexandrnikitin/algorithm-sandbox | scala/src/test/scala/chapter1/Question4Spec.scala | Scala | mit | 391 |
package com.v_standard.vsp.compiler
import com.typesafe.scalalogging.slf4j.Logging
import com.v_standard.vsp.script.ScriptDefine
import com.v_standard.utils.ResourceUtil
import com.v_standard.utils.ResourceUtil.using
import java.io.File
/**
* トークントレイト。
*/
trait Token {
/** 文字列表現 */
protected val tokenStr = new... | VanishStandard/vsp | src/main/scala/com/v_standard/vsp/compiler/Token.scala | Scala | bsd-3-clause | 2,255 |
package logful.server
import java.util.concurrent.TimeUnit
import io.gatling.core.Predef._
import logful.server.config.LogFileReqConfig
import scala.concurrent.duration.FiniteDuration
class SmallLogRampUserPerSecSimulation extends Simulation {
val from = 100
val to = 1300
val time = 60
val during = new Fin... | foxundermoon/gatling-test | src/gatling/scala/logful/server/SmallLogRampUserPerSecSimulation.scala | Scala | mit | 550 |
package scalarules.test
object Exported {
def message: String = {
// terrible, don't do this in real code:
val msg = Class.forName("scalarules.test.Runtime")
.newInstance
.toString
"you all, everybody. " + msg
}
}
| bazelbuild/rules_scala | test_version/version_specific_tests_dir/Exported.scala | Scala | apache-2.0 | 243 |
/*
* Copyright 2017-2018 47 Degrees, LLC. <http://www.47deg.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | frees-io/freestyle | modules/logging/jvm/src/main/scala/free/log4s.scala | Scala | apache-2.0 | 739 |
/*
* Copyright 2013-2016 Tsukasa Kitachi
*
* 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... | kxbmap/configs | core/src/test/scala/configs/syntax/RichConfigObjectTest.scala | Scala | apache-2.0 | 2,612 |
package org.bitcoins.testkit
import akka.actor.ActorSystem
import com.typesafe.config._
import org.bitcoins.dlc.oracle.config.DLCOracleAppConfig
import org.bitcoins.server.BitcoinSAppConfig
import org.bitcoins.testkit.keymanager.KeyManagerTestUtil
import org.bitcoins.testkit.util.FileUtil
import org.bitcoins.testkit.u... | bitcoin-s/bitcoin-s | testkit/src/main/scala/org/bitcoins/testkit/BitcoinSTestAppConfig.scala | Scala | mit | 7,564 |
/**
* Author:
* Yujian Zhang <yujian{dot}zhang[at]gmail(dot)com>
* Description:
* Check for popCount.
* License:
* GNU General Public License v2
* http://www.gnu.org/licenses/gpl-2.0.html
* Copyright (C) 2010-2012 Yujian Zhang
*/
import org.scalatest.junit.JUnit3Suite
import org.scalatest.prop.Check... | whily/unichess | src/test/scala/net/whily/unichess/engine/PopCountCheck.scala | Scala | gpl-2.0 | 798 |
package week04
object session {
//Peano numbers
abstract class Nat {
def isZero: Boolean
def predecessor: Nat
def successor: Nat = new Succ(this)
def +(that: Nat): Nat
def -(that: Nat): Nat
def numerical: Integer
override def toString() = numerical.toString()
}
object Zero extends... | panga/progfun-assignments | progfun/.worksheet/src/week04.session.scala | Scala | mit | 1,921 |
package com.geeksville.dapi
import akka.actor.Actor
import akka.actor.ActorLogging
import com.geeksville.mavlink.TimestampedMessage
import com.geeksville.dapi.model.Vehicle
import akka.actor.Props
import com.geeksville.mavlink.LogBinaryMavlink
import akka.actor.ActorRef
import akka.actor.PoisonPill
import java.io.File... | dronekit/dronekit-server | src/main/scala/com/geeksville/dapi/LiveVehicleActor.scala | Scala | gpl-3.0 | 13,330 |
import sbt._
import org.scalajs.sbtplugin.cross.CrossType
/**
* ScalaJS CrossType that removed the project name from
* the default cross-build directory structure,
* creating the following layout:
*
* ```
* - root/
* - shared / src / {main,test} / scala
* - jvm / src / {main,test} / scala
* - ... | Angeldude/doodle | project/DoodleCrossType.scala | Scala | apache-2.0 | 681 |
package fm.common.test.classutil
trait TestTrait {
def foo: String
} | frugalmechanic/fm-common | jvm/src/test/scala/fm/common/test/classutil/TestTrait.scala | Scala | apache-2.0 | 71 |
package controllers
import play.api.mvc._
import play.api.libs
import play.api.libs.json._
import models._
// if one the method is not implemented just set it = TODO
// e.g. def detail = TODO
abstract class tControllerCRUD[V] extends Controller with Secured{
implicit val myJsonFormat:play.api.libs.json.OFormat[V]... | Nexysweb/play-helpers | traits/tController.scala | Scala | gpl-2.0 | 715 |
/*
* 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 ... | jnadler/spark-testing-base | src/main/1.3/scala/com/holdenkarau/spark/testing/DataFrameSuiteBase.scala | Scala | apache-2.0 | 5,568 |
package travelling
import java.util.Properties
import java.io._
import scala.collection.mutable.Map
import scala.collection.JavaConversions._
object Letter {
val letters: Map[String, Letter] = Map()
val DEFAULT_LETTER = new Letter("\u0000", new Polygon(List(Vec(0, 0), Vec(40, 0), Vec(40, 100), Vec(0, 100), Vec(0,... | fdb/travelling_letters | src/main/scala/travelling/Letter.scala | Scala | lgpl-3.0 | 3,187 |
/*
* 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 ... | jovigb/SparkOnHBase | src/main/scala/com/cloudera/spark/hbase/example/HBaseBulkPutExampleFromFile.scala | Scala | apache-2.0 | 2,700 |
/*
* @author Philip Stutz
*
* Copyright 2011 University of Zurich
*
* 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
*
* U... | danihegglin/DynDCO | src/main/scala/com/signalcollect/coordinator/DefaultWorkerApi.scala | Scala | apache-2.0 | 8,408 |
package libref
import leon.lang._
import leon.lang.synthesis.choose
import scala.language.postfixOps
import scala.language.implicitConversions
package object collection {
// implicit def setAsList[A] (set: Set[A]): List[A] = choose {
// (x: List[A]) => set == x.content
// }
case class SetOps[A] (set: S... | fmlab-iis/LibRef | collection/package.scala | Scala | gpl-3.0 | 713 |
package filodb.akkabootstrapper
import akka.cluster.Cluster
import com.typesafe.config.ConfigFactory
import org.scalatest.WordSpecLike
class ValidSeedValidatorSpec extends BaseSeedNodeDiscoverySpec(AbstractTestKit.head) {
"Valid WhitelistSeedValidator" must {
"return expected valid seed nodes for valid configur... | velvia/FiloDB | akka-bootstrapper/src/test/scala/filodb/akkabootstrapper/SeedValidatorSpec.scala | Scala | apache-2.0 | 1,564 |
package org.scalaide.core.lexical
import org.junit.Assert._
import org.junit.Test
import org.junit.Before
import org.eclipse.jface.text._
class ScalaDocumentPartitionerTest {
@Test
def no_partition_change(): Unit = {
// 000000000011111111112222222222333333333344444444445
// 012345678901234567... | Kwestor/scala-ide | org.scala-ide.sdt.core.tests/src/org/scalaide/core/lexical/ScalaDocumentPartitionerTest.scala | Scala | bsd-3-clause | 2,884 |
/*
* Copyright 2020 University of Basel, Graphics and Vision Research Group
*
* 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
*
* Unl... | unibas-gravis/scalismo | src/main/scala/scalismo/mesh/VertexColorMesh3D.scala | Scala | apache-2.0 | 1,135 |
package ru.finagram.api
/**
* This object represents an incoming callback query from a callback button in an inline keyboard.
* If the button that originated the query was attached to a message sent by the bot,
* the field message will be presented. If the button was attached to a message sent
* via the bot (in in... | finagram/finagram | src/main/scala/ru/finagram/api/CallbackQuery.scala | Scala | mit | 1,086 |
/*
* WindowMaxIndex.scala
* (FScape)
*
* Copyright (c) 2001-2022 Hanns Holger Rutz. All rights reserved.
*
* This software is published under the GNU Affero General Public License v3+
*
*
* For further information, please contact Hanns Holger Rutz at
* contact@sciss.de
*/
package de.sciss.fscape
packa... | Sciss/FScape-next | core/shared/src/main/scala/de/sciss/fscape/stream/WindowMaxIndex.scala | Scala | agpl-3.0 | 3,412 |
package org.jetbrains.plugins.scala.codeInsight.hints
import java.{util => ju}
import com.intellij.codeInsight.hints.settings.{InlayProviderSettingsModel, InlaySettingsProvider}
import com.intellij.lang.Language
import com.intellij.openapi.project.Project
import org.jetbrains.plugins.scala.ScalaLanguage
import org.jet... | JetBrains/intellij-scala | scala/codeInsight/src/org/jetbrains/plugins/scala/codeInsight/hints/ScalaTypeHintsSettingsProvider.scala | Scala | apache-2.0 | 1,282 |
package stormlantern.dockertestkit.orchestration
class Orchestration {
}
| dlouwers/reactive-consul | docker-testkit/src/main/scala/stormlantern/dockertestkit/orchestration/Orchestration.scala | Scala | mit | 75 |
/*
* 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... | wangyixiaohuihui/spark2-annotation | core/src/main/scala/org/apache/spark/api/python/SerDeUtil.scala | Scala | apache-2.0 | 8,899 |
package net.magik6k.lxcadmin
import net.magik6k.jwwf.core.{MainFrame, User}
import net.magik6k.lxcadmin.panel.MainPanel
class Client extends User {
override def initializeUser(rootFrame: MainFrame) {
try {
rootFrame.setTitle("LXC Admin")
rootFrame.put(new MainPanel(this))
} catch {
case e: Exception => ... | magik6k/LxcAdmin | src/main/scala/net/magik6k/lxcadmin/Client.scala | Scala | mit | 349 |
package timing
import scala.concurrent._
import scala.concurrent.ExecutionContext.Implicits.global
object Time {
def sync[A](name: String)(func: () => A): A = {
println(s"Started $name")
val start = System.currentTimeMillis
val answer = func()
val finish = System.currentTimeMillis
println(s"Fin... | underscoreio/essential-scala-code | src/main/scala/timing/Time.scala | Scala | apache-2.0 | 659 |
package grammarcomp
package benchmarks
import grammar._
import grammar.CFGrammar._
import java.io._
import generators.GrammarBoundingHelper
object AntlrJavascriptGrammar extends Benchmark {
import GrammarReaders._
def benchmarkName = "AntlrJSGrammar"
def benchmarkSource = "https://github.com/antlr/grammars-v... | epfl-lara/GrammarComparison | src/main/scala/grammarcomp/benchmarks/JavascriptGrammar3.scala | Scala | mit | 589 |
package fixtures
abstract class Fixture {
def createFixtures(): Unit
} | soupytwist/knit | app/fixtures/Fixture.scala | Scala | gpl-3.0 | 74 |
package at.logic.gapt.formats.leancop
import at.logic.gapt.formats.ClasspathInputFile
import at.logic.gapt.utils.SatMatchers
import org.specs2.mutable.Specification
class LeanCoPParserTest extends Specification with SatMatchers {
"irrationals" in {
LeanCoPParser.getExpansionProof( ClasspathInputFile( "irration... | gebner/gapt | tests/src/test/scala/at/logic/gapt/formats/leancop/LeanCoPParserTest.scala | Scala | gpl-3.0 | 442 |
/*
* 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 ... | shenbaise/mltoy | src/main/scala/org/apache/spark/examples/streaming/ActorWordCount.scala | Scala | apache-2.0 | 5,533 |
package com.github.jeanadrien.gatling.mqtt.client
import akka.actor.ActorRef
import com.github.jeanadrien.gatling.mqtt.client.MqttCommands.{ConnectAck, PublishAck, SubscribeAck}
import com.github.jeanadrien.gatling.mqtt.client.MqttQoS.MqttQoS
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence
import org.e... | jeanadrien/gatling-mqtt-protocol | src/main/scala/com/github/jeanadrien/gatling/mqtt/client/PahoMqttClient.scala | Scala | apache-2.0 | 2,831 |
package utils
import java.io.InputStream
import dispatch._
import Defaults._
import com.sksamuel.elastic4s._
import com.sksamuel.elastic4s.ElasticDsl._
import play.api.Logger
import scala.sys.process._
import scala.concurrent.Await
import scala.concurrent.duration._
import traits._
import scala.async.Async.{ async, awa... | adlnet/LR-Search | app/utils/ScreenshotUtils.scala | Scala | apache-2.0 | 1,763 |
package ${package}.conf
/**
* container class for configuration parameters.
*/
case class JobParameter(
param1: String = "192.0.2.1",
param2: Int = 2003
) | scray/scray-archetype | src/main/resources/archetype-resources/src/main/scala/conf/JobParameter.scala | Scala | apache-2.0 | 179 |
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.