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 may... | tnachen/mesos-kafka | src/scala/ly/stealth/mesos/kafka/Config.scala | Scala | apache-2.0 | 2,194 |
package systems.adaptix.bling.data
import org.specs2.mutable.Specification
/**
* Created by nkashyap on 6/5/15.
*/
class IdTableTemplateSpecification extends Specification {
"An IdTableTemplate represents a table which consists of a single column and which stores automatically generated IDs." >> {
val idTable... | nkashy1/bling | src/test/scala/systems/adaptix/bling/data/IdTableTemplateSpecification.scala | Scala | mit | 548 |
package com.lvxingpai.model.poi
import com.lvxingpai.model.geo._
import com.lvxingpai.model.misc.Contact
import com.lvxingpai.model.mixin._
import org.hibernate.validator.constraints.NotBlank
import java.util.{ List => JList, Map => JMap }
import scala.beans.{ BeanProperty, BooleanBeanProperty }
/**
* Created by pen... | Lvxingpai/core-model | src/main/scala/com/lvxingpai/model/poi/AbstractPOI.scala | Scala | apache-2.0 | 2,185 |
/*
* Copyright (c) 2014-2020 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* 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... | alexandru/monifu | monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest6Observable.scala | Scala | apache-2.0 | 8,023 |
/*
* La Trobe University - Distributed Deep Learning System
* Copyright 2016 Matthias Langer (t3l@threelights.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apa... | bashimao/ltudl | blaze/src/main/scala/edu/latrobe/blaze/sinks/ShowoffSink.scala | Scala | apache-2.0 | 5,676 |
/*
* 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 ... | wzhfy/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala | Scala | apache-2.0 | 156,988 |
// scalac: -Yrangepos:false -deprecation
//
import scala.language.dynamics
import scala.reflect.{ ClassTag, classTag }
object Util {
def show[T](x: T): T = { println(x) ; x }
def mkArgs(xs: Any*) = xs.map { case ((k, v)) => s"$k=$v" ; case x => "" + x }.mkString("(", ", ", ")")
}
import Util._
abstract class Mono... | scala/scala | test/files/run/t6731.scala | Scala | apache-2.0 | 4,019 |
/*
* (c) Copyright 2016 Hewlett Packard Enterprise Development LP
*
* 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 b... | hpe-cct/cct-core | src/main/scala/cogx/compiler/codegenerator/opencl/hyperkernels/TensorDotHyperKernel.scala | Scala | apache-2.0 | 4,044 |
/*
* Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com>
*/
package play.it.test
import okhttp3.{ Protocol, Response }
import play.api.mvc._
import play.api.mvc.request.RequestAttrKey
import play.api.test.PlaySpecification
/**
* Tests that the [[EndpointIntegrationSpecification]] works properly.
*/... | Shruti9520/playframework | framework/src/play-integration-test/src/test/scala/play/it/test/EndpointIntegrationSpecificationSpec.scala | Scala | apache-2.0 | 1,564 |
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
/** @author John Miller
* @builder scalation.linalgebra.bld.BldBidMatrix
* @version 1.2
* @date Mon May 19 15:52:24 EDT 2014
* @see LICENSE (MIT style license file).
*/
package scalation.linalgebra
import io.Source.from... | mvnural/scalation | src/main/scala/scalation/linalgebra/BidMatrixQ.scala | Scala | mit | 38,639 |
/*
* 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 ... | davidzchen/samza | samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala | Scala | apache-2.0 | 6,619 |
/*
* Copyright 2014 websudos ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | zarthross/reactiveneo | reactiveneo-dsl/src/test/scala/com/websudos/reactiveneo/dsl/PatternTest.scala | Scala | gpl-2.0 | 2,689 |
package com.aesireanempire.eplus.gui.elements
class ListItemString(data: String, x: Int, y: Int, width: Int, height: Int, box: ListBoxInfo) extends
ListItem(data, x, y, width, height, box) {
override def getString: String = data
override def update(): Unit = {}
override def drawExtras(): Unit = {}
... | Epoxide-MC/EnchantingPlus-Scala | src/main/scala/com/aesireanempire/eplus/gui/elements/ListItemString.scala | Scala | lgpl-3.0 | 465 |
/*
* This file is part of the "silex" library of helpers for Apache Spark.
*
* Copyright (c) 2015 Red Hat, 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.... | erikerlandson/silex | src/test/scala/com/redhat/et/silex/rdd/drop/drop.scala | Scala | apache-2.0 | 3,506 |
/*
* 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/tools/MemoryReporterSuite.scala | Scala | apache-2.0 | 6,874 |
package score.money
import java.math.{BigDecimal => JBigDecimal}
import java.math.{MathContext => JMathContext}
import java.math.{RoundingMode => JRoundingMode}
import scala.math.BigDecimal.RoundingMode
import scala.math.BigDecimal.RoundingMode.RoundingMode
import java.math.RoundingMode.{DOWN => JDOWN}
import java.mat... | idonnie/SCore | src/score/money/Currency.scala | Scala | mit | 5,594 |
/*
* 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 ... | jatin9896/incubator-carbondata | integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/flatfolder/FlatFolderTableLoadingTestCase.scala | Scala | apache-2.0 | 6,453 |
/*
* Copyright 2014 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 l... | sdjamaa/storehaus | storehaus-elasticsearch/src/test/scala/com/twitter/storehaus/elasticsearch/DefaultElasticContext.scala | Scala | apache-2.0 | 2,501 |
/*
* 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 | examples/src/main/scala/org/apache/spark/examples/mllib/StreamingLogisticRegression.scala | Scala | apache-2.0 | 3,731 |
import org.scalacheck.Properties
import org.scalacheck.Prop.forAll
object StringSpecification extends Properties("String") {
property("startsWith") = forAll { (a: String, b: String) => (a+b).startsWith(a) }
property("concatenate") = forAll { (a: String, b: String) => (a+b).length > a.length && (a+b).length > b.l... | StigLau/QuickCheckTest | src/test/scala/StringSpecification.scala | Scala | apache-2.0 | 894 |
package tscfg.example
final case class ScalaIssue54cCfg(
)
object ScalaIssue54cCfg {
final case class Tree(
left : java.lang.String,
right : java.lang.String,
value : java.lang.String
)
object Tree {
def apply(c: com.typesafe.config.Config, parentPath: java.lang.String, $tsCfgValidator: $TsCf... | carueda/tscfg | src/test/scala/tscfg/example/ScalaIssue54cCfg.scala | Scala | apache-2.0 | 1,997 |
package main.scala.overlapping.timeSeriesOld.secondOrder.univariate.Procedures
import breeze.linalg._
import main.scala.overlapping.timeSeries._
import main.scala.overlapping.timeSeriesOld.SecondOrderSignature
/**
* Created by Francois Belletti on 7/14/15.
*/
object InnovationAlgo extends Serializable{
/*
Th... | bellettif/sparkGeoTS | sparkTS/src/main/scala/overlapping/timeSeriesOld/secondOrder/univariate/Procedures/InnovationAlgo.scala | Scala | bsd-3-clause | 1,484 |
package mesosphere.marathon.state
import java.util.concurrent.atomic.AtomicInteger
import javax.validation.ConstraintViolationException
import akka.actor.ActorSystem
import akka.event.EventStream
import akka.testkit.TestKit
import mesosphere.marathon.io.storage.StorageProvider
import mesosphere.marathon.state.PathId.... | sepiroth887/marathon | src/test/scala/mesosphere/marathon/state/GroupManagerTest.scala | Scala | apache-2.0 | 6,585 |
/*
* 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... | scalatest/scalatest | jvm/scalactic-test/src/test/scala/org/scalactic/TypeCheckedTripleEqualsExplicitlySpec.scala | Scala | apache-2.0 | 3,225 |
package controllers
import scala.util.{ Success, Failure }
import akka.pattern.ask
import play.api.http.ContentTypes
import play.api.mvc._
import play.twirl.api.Html
import lila.analyse.{ Analysis, TimeChart, AdvantageChart, Accuracy }
import lila.api.Context
import lila.app._
import lila.common.HTTPRequest
import l... | Happy0/lila | app/controllers/Analyse.scala | Scala | mit | 4,030 |
import sbt._
object Dependencies {
lazy val finagleVersion = "17.10.0"
lazy val finchVersion = "0.15.1"
lazy val circeVersion = "0.8.0"
lazy val twitterServerVersion = "17.10.0"
lazy val typesafeConfigVersion = "1.3.0"
lazy val logbackVersion = "1.2.3"
lazy val scalatestVersion = "3.0.4"
lazy val scal... | PScopelliti/ProjectTracker | project/Dependencies.scala | Scala | apache-2.0 | 2,259 |
package com.outr.arango.api
import com.outr.arango.api.model._
import io.youi.client.HttpClient
import io.youi.http.HttpMethod
import io.youi.net._
import io.circe.Json
import scala.concurrent.{ExecutionContext, Future}
object APIUserUserDatabaseDbname {
def delete(client: HttpClient, user: String, dbname: S... | outr/arangodb-scala | api/src/main/scala/com/outr/arango/api/APIUserUserDatabaseDbname.scala | Scala | mit | 904 |
/*
* 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 ... | aokolnychyi/spark | core/src/main/java/org/apache/spark/api/java/function/package.scala | Scala | apache-2.0 | 1,108 |
/**
* This file is part of mycollab-scheduler.
*
* mycollab-scheduler 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.
*
* mycol... | uniteddiversity/mycollab | mycollab-scheduler/src/main/scala/com/esofthead/mycollab/schedule/email/MailContext.scala | Scala | agpl-3.0 | 1,978 |
package com.twitter.jvm
import com.twitter.conversions.storage._
import com.twitter.util.Time
object NilJvm extends Jvm {
val opts: Opts = new Opts {
def compileThresh = None
}
def forceGc(): Unit = System.gc()
val snapCounters: Map[String, String] = Map()
val snap: Snapshot = Snapshot(
Time.epoch,
... | edombowsky/util | util-jvm/src/main/scala/com/twitter/jvm/NilJvm.scala | Scala | apache-2.0 | 545 |
/*
* 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 | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SparkPartitionID.scala | Scala | apache-2.0 | 1,977 |
package com.peim.model
import com.peim.model.exception.IllegalTransferStatusException
import play.api.libs.json._
import slick.driver.H2Driver.api._
import scala.util.Try
sealed trait TransferStatus
case object Approved extends TransferStatus
case object Processing extends TransferStatus
case object Canceled extends... | peim/money-transfer-service | src/main/scala/com/peim/model/TransferStatus.scala | Scala | mit | 1,376 |
package ch.epfl.bbp.uima.topicmodels.annotators
import org.apache.uima.UimaContext
import org.apache.uima.fit.util.JCasUtil
import org.apache.uima.jcas.JCas
import scala.collection.immutable.HashSet
import org.apache.uima.analysis_component.JCasAnnotator_ImplBase
import de.julielab.jules.types.Token
import scala.collec... | BlueBrain/bluima | modules/bluima_topic_models/src/main/scala/ch/epfl/bbp/uima/topicmodels/annotators/IllegalCharacterSequenceAnnotator.scala | Scala | apache-2.0 | 2,094 |
package coursier.internal
import coursier.core.{ModuleName, Organization}
import coursier.{Dependency, Module}
object Typelevel {
val mainLineOrg = Organization("org.scala-lang")
val typelevelOrg = Organization("org.typelevel")
val modules = Set(
ModuleName("scala-compiler"),
ModuleName("scala-librar... | alexarchambault/coursier | modules/coursier/shared/src/main/scala/coursier/internal/Typelevel.scala | Scala | apache-2.0 | 751 |
package org.bitcoins.db
import org.slf4j.Logger
/** Exposes access to the database interaction logger */
private[bitcoins] trait DatabaseLogger {
private var _logger: Logger = _
protected[bitcoins] def logger(implicit config: AppConfig) = {
if (_logger == null) {
_logger = DatabaseLogger.getLogger
}... | bitcoin-s/bitcoin-s-core | db-commons/src/main/scala/org/bitcoins/db/DatabaseLogger.scala | Scala | mit | 554 |
class Coleccion[A](element : A) extends Traversable[A]{
// se pasa el tipo de parametro A a la clase base
def foreach[B](f:A => B) = f(element)
}
val col = new Coleccion("Elemento1","Elemento2")
// como extiende de Traversable podemos usar el el metodo foreach
col foreach println
println(col.head)
println(col.tail) | romanarranz/NTP | S3/clase_iterable.scala | Scala | mit | 320 |
package com.xgl.parser.elem
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatest.{FunSpec, FunSuite}
/**
* Created with IntelliJ IDEA.
* User: yt
* Date: 11/26/12
* Time: 3:08 PM
*/
@RunWith(classOf[JUnitRunner])
class NormalTest extends FunSpec {
describe("Normal parsin... | Uko/XGLparser | src/test/scala/com/xgl/parser/elem/NormalTest.scala | Scala | mit | 741 |
package org.alcaudon.api.serialization
import java.io.{DataInput, DataOutput}
import shapeless._
import shapeless.labelled._
import shapeless.ops.hlist.ToList
import shapeless.ops.record._
import scala.collection.GenTraversable
import scala.collection.generic.CanBuildFrom
import scala.collection.mutable.ArrayBuffer
... | fcofdez/alcaudon | src/main/scala/org/alcaudon/api/serialization/TypeInfo.scala | Scala | apache-2.0 | 5,206 |
package controllers
import controllers.helpers.CaveForms._
import controllers.helpers.{DeleteToken, CreateToken}
import play.api.Logger
import play.api.i18n.Messages
import play.api.mvc.{AnyContent, Request, Result}
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
class Tokens ... | gilt/cave | www/app/controllers/Tokens.scala | Scala | mit | 3,094 |
package org.jetbrains.plugins.scala.lang.macros.expansion
import java.io._
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.compiler.{CompilationStatusListener, CompileContext, CompilerManager}
import com.intellij.openapi.components.ProjectComponent
import com.intellij.openapi.project.P... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/lang/macros/expansion/ReflectExpansionsCollector.scala | Scala | apache-2.0 | 2,783 |
package japgolly.microlibs.types
import scala.annotation.nowarn
object NaturalComposition {
final case class Discardable[A](value: A) extends AnyVal
implicit val discardableUnit: Discardable[Unit] = Discardable(())
// ============================================================================================... | japgolly/microlibs-scala | types/shared/src/main/scala/japgolly/microlibs/types/NaturalComposition.scala | Scala | apache-2.0 | 2,135 |
import leon.annotation._
import leon.lang._
import leon.lang.synthesis._
object Complete {
sealed abstract class List
case class Cons(head: Int, tail: List) extends List
case object Nil extends List
def size(l: List) : Int = (l match {
case Nil => 0
case Cons(_, t) => 1 + size(t)
}) ensuring(res... | ericpony/scala-examples | testcases/synthesis/oopsla2013/SortedList/SortMerge.scala | Scala | mit | 3,106 |
/*
* Copyright (C) 2005, The Beangle Software.
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This... | beangle/commons | core/src/main/scala/org/beangle/commons/lang/reflect/BeanInfoDigger.scala | Scala | lgpl-3.0 | 10,742 |
package io.clouderite.commons.scala.berries.crypto
import java.util.Base64
import javax.crypto.Cipher
import javax.crypto.spec.{IvParameterSpec, SecretKeySpec}
class CryptoOperations(text: String) {
private val cipher = Cipher.getInstance("AES/CBC/PKCS5Padding")
def encrypt(key: String, iv: String): String = {
... | clouderite/scala-berries | src/main/scala/io/clouderite/commons/scala/berries/crypto/CryptoOperations.scala | Scala | mit | 905 |
package net.bhardy.braintree.scala.gw
case class Configuration(baseMerchantURL: String, publicKey: String, privateKey: String) {
}
object Configuration {
val apiVersion = "3"
}
| benhardy/braintree-scala | src/main/scala/gw/Configuration.scala | Scala | mit | 182 |
/**
* Copyright 2011-2017 GatlingCorp (http://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | timve/gatling | gatling-charts/src/main/scala/io/gatling/charts/stats/Records.scala | Scala | apache-2.0 | 3,720 |
import sbt._
import Keys._
import play.Project._
import com.typesafe.config._
object ApplicationBuild extends Build {
// We get the application.conf file to read some properties
val conf = ConfigFactory.parseFile(new File("conf/application.conf")).resolve()
val appName = conf.getString("app.name")
val app... | sqlilabs/WorkshopManager | project/Build.scala | Scala | apache-2.0 | 1,391 |
package com.datastax.spark.connector.sql
import scala.concurrent.Future
import org.apache.spark.sql.cassandra.CassandraSQLContext
import org.scalatest.ParallelTestExecution
import com.datastax.spark.connector.SparkCassandraITFlatSpecBase
import com.datastax.spark.connector.cql.CassandraConnector
import com.datastax.... | maasg/spark-cassandra-connector | spark-cassandra-connector/src/it/scala/com/datastax/spark/connector/sql/CassandraSQLSpec.scala | Scala | apache-2.0 | 24,025 |
package org.littlewings.infinispan.scattered
import java.util.concurrent.TimeUnit
import org.infinispan.Cache
import org.infinispan.commons.util.Util
import org.infinispan.distribution.group.impl.PartitionerConsistentHash
import org.infinispan.manager.{DefaultCacheManager, EmbeddedCacheManager}
import org.infinispan.... | kazuhira-r/infinispan-getting-started | embedded-scattered-cache/src/test/scala/org/littlewings/infinispan/scattered/ScatteredCacheSpec.scala | Scala | mit | 7,953 |
package scala.slick.jdbc.meta
import java.sql._
import scala.slick.jdbc.{ResultSetInvoker, UnitInvoker, JdbcType}
/**
* A wrapper for a row in the ResultSet returned by DatabaseMetaData.getBestRowIdentifier().
*/
case class MBestRowIdentifierColumn(
scope: MBestRowIdentifierColumn.Scope, column: String, sqlType: ... | boldradius/slick | src/main/scala/scala/slick/jdbc/meta/MBestRowIdentifierColumn.scala | Scala | bsd-2-clause | 1,605 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | fhueske/flink | flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/stream/sql/validation/InsertIntoValidationTest.scala | Scala | apache-2.0 | 3,620 |
package com.twitter.finagle
import java.net.{SocketAddress, InetSocketAddress}
/**
* A SocketAddress with a weight. `WeightedSocketAddress` can be nested.
*/
case class WeightedSocketAddress(addr: SocketAddress, weight: Double) extends SocketAddress
object WeightedSocketAddress {
/**
* Extract `SocketAddress`... | liamstewart/finagle | finagle-core/src/main/scala/com/twitter/finagle/WeightedSocketAddress.scala | Scala | apache-2.0 | 1,170 |
package com.twitter.finagle.builder
/**
* Used by builder to throw exceptions if the specification is incomplete.
* {{{
* if (!_codec.isDefined)
* throw new IncompleteSpecification("No codec was specified")
* }}}
*/
class IncompleteSpecification(message: String) extends Exception(message)
| Krasnyanskiy/finagle | finagle-core/src/main/scala/com/twitter/finagle/builder/Common.scala | Scala | apache-2.0 | 299 |
/*
* 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 ... | RSulzmann/openwhisk | tests/src/test/scala/invokerShoot/ShootInvokerTests.scala | Scala | apache-2.0 | 15,391 |
package com.ing.baker.il
import com.typesafe.config.Config
import com.typesafe.scalalogging.LazyLogging
import scala.collection.JavaConverters._
import scalax.collection.io.dot.implicits._
import scalax.collection.io.dot.{ DotAttr, DotAttrStmt, Elem }
object RecipeVisualStyle extends LazyLogging {
def default: Rec... | ing-bank/baker | core/intermediate-language/src/main/scala/com/ing/baker/il/RecipeVisualStyle.scala | Scala | mit | 5,716 |
package stasiak.karol.fimpp
/**
* Created with IntelliJ IDEA.
* User: karol
* Date: 06.10.12
* Time: 14:56
* To change this template use File | Settings | File Templates.
*/
object FimException {
}
class FimException(msg:String) extends Exception(msg) | KarolS/fimpp | src/stasiak/karol/fimpp/FimException.scala | Scala | gpl-3.0 | 260 |
/*
Copyright 2013, 2014 NICTA
This file is part of t3as (Text Analysis As A Service).
t3as 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... | NICTA/t3as-pat-clas | pat-clas-common/src/main/scala/org/t3as/patClas/common/search/Suggest.scala | Scala | gpl-3.0 | 2,540 |
/*
* Copyright 2015 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/tabulate | core/shared/src/main/scala/kantan/csv/engine/package.scala | Scala | mit | 1,090 |
package models.daos.drivers
import java.net.ConnectException
import javax.inject.Inject
import com.typesafe.config.ConfigFactory
import play.api.Configuration
import scalaj.http.Http
/**
* Checks if the database is connected during creation of the injector. The application will fail to start
* if the configuration ... | gitlinks/gitrank-web | app/models/daos/drivers/NeoChecker.scala | Scala | apache-2.0 | 1,263 |
/*******************************************************************************
* Copyright (c) 2019. Carl Minden
*
* 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 ... | carlminden/anathema-roguelike | src/com/anathema_roguelike/entities/characters/actions/attacks/BasicAttackPerk.scala | Scala | gpl-3.0 | 1,498 |
/*
*
* This file is part of BlueScale.
*
* BlueScale is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BlueScale is distrib... | BlueScale/BlueScale | src/test/scala/org/bluescale/telco/jainsip/unittest/CallHangup.scala | Scala | agpl-3.0 | 2,231 |
package com.twitter.finagle.kestrel.integration
import com.twitter.conversions.time._
import com.twitter.finagle.Service
import com.twitter.finagle.builder.ClientBuilder
import com.twitter.finagle.kestrel.Server
import com.twitter.finagle.kestrel.protocol._
import com.twitter.finagle.memcached.util.ChannelBufferUtils.... | yancl/finagle-6.22.0 | finagle-kestrel/src/test/scala/com/twitter/finagle/kestrel/integration/InterpreterServiceTest.scala | Scala | apache-2.0 | 1,977 |
/*
This file is part of Functional Data, experiments in Java
Copyright (C) 2014 Toby Thain, toby@telegraphics.com.au
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... | qu1j0t3/functional-data | src/test/scala/au/com/telegraphics/data/OptionSpec.scala | Scala | gpl-2.0 | 2,691 |
import scala.reflect.macros.blackbox.Context
object MacroImpls {
def getSrcLoc[T](c: Context)(expr: c.Expr[T]) = {
}
def getArgName[S, T](c: Context)(fun: c.Expr[S => T]): Option[String] = {
import c.universe._
fun.tree match {
// case Function(List(ValDef(mods, paramName, typ, _)), body) =>
// ... | Blaisorblade/hoas-with-names | macros/Macros.scala | Scala | apache-2.0 | 2,863 |
/*
* Copyright 2014–2020 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/quasar | run/src/main/scala/quasar/run/store/StoreCodec.scala | Scala | apache-2.0 | 2,356 |
package text.normalizer
import text.StringOption
/**
* @author ynupc
* Created on 2016/08/06
*/
object SentenceEndingNormalizer
extends DictionaryBasedNormalizer(
StringOption("sentence_ending_normalization.yml")) {
override def replaceAll(input: String, term: String, replacement: String): Strin... | ynupc/scalastringcourseday7 | src/main/scala/text/normalizer/SentenceEndingNormalizer.scala | Scala | apache-2.0 | 410 |
/*
* 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 ... | datalayer/zeppelin-datalayer | spark/spark-scala-parent/src/main/scala/org/apache/zeppelin/spark/BaseSparkScalaInterpreter.scala | Scala | apache-2.0 | 15,811 |
/* Copyright 2012 John Oliver
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 writin... | johnoliver/scala-fx-bytecode-viewer | src/main/scala/com/insightfullogic/oss/bytecode/Main.scala | Scala | apache-2.0 | 1,988 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | ueshin/apache-flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/sinks/BatchTableSink.scala | Scala | apache-2.0 | 1,204 |
// Copyright (c) 2011-2015 ScalaMock Contributors (https://github.com/paulbutcher/ScalaMock/graphs/contributors)
//
// 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, inc... | paulbutcher/ScalaMock | shared/src/main/scala/org/scalamock/package.scala | Scala | mit | 8,040 |
/*
* 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 ... | bryanmontesv/incubator-spot | spot-ml/src/test/scala/org/apache/spot/SpotLDAWrapperTest.scala | Scala | apache-2.0 | 7,291 |
import leon.lang._
object Ackermann {
def ackermann(m: BigInt, n: BigInt): BigInt = {
require(m >= 0 && n >= 0)
if (m == 0) n + 1
else if (n == 0) ackermann(m - 1, 1)
else ackermann(m - 1, ackermann(m, n - 1))
}
}
| epfl-lara/leon | src/test/resources/regression/termination/valid/Ackermann.scala | Scala | gpl-3.0 | 235 |
package org.denigma.codemirror.addons
import org.denigma.binding.extensions._
import org.denigma.codemirror._
import org.denigma.kappa.messages.WebSimMessages.WebSimError
import scala.scalajs.js
import scala.scalajs.js.annotation.{JSName, ScalaJSDefined}
import scala.scalajs.js.{Array, |}
package object hint {
... | antonkulaga/kappa-notebook | app/js/src/main/scala/org/denigma/codemirror/addons/hint/package.scala | Scala | mpl-2.0 | 803 |
package org.scalatest.examples
import org.scalactic.anyvals.PosZDouble
object Demo {
// Uses assume, ensuring, and ulp
def squareRootA(x: Double): Double = {
assume(x >= 0.0 && !x.isPosInfinity)
math.sqrt(x) ensuring { res =>
val tolerance = math.ulp(x) // Unit in the last place
(res * res - ... | bvenners/scalaX2016Demos | src/main/scala/org/scalatest/examples/Demo.scala | Scala | apache-2.0 | 1,354 |
package ch.wsl.box.model
import ch.wsl.box.rest.runtime.RegistryInstance
import scala.util.Try
object BoxRegistry {
val generated:Option[RegistryInstance] = Try(Class.forName("ch.wsl.box.generated.boxentities.GenRegistry")
.newInstance()
.asInstanceOf[RegistryInstance]).toOption
}
| Insubric/box | server/src/main/scala/ch/wsl/box/model/BoxRegistry.scala | Scala | apache-2.0 | 295 |
package com.mpakhomov
import java.net.InetSocketAddress
import akka.actor.ActorSystem
import com.mpakhomov.actors._
import com.typesafe.config.ConfigFactory
object ClientApp {
def main(args: Array[String]): Unit = {
val config = ConfigFactory.load()
val system = ActorSystem("akka-io-demo")
val inetSoc... | mpakhomov/akka-io-demo | src/main/scala/com/mpakhomov/ClientApp.scala | Scala | apache-2.0 | 514 |
/*
* Copyright 2012 Comcast Cable Communications Management, 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 require... | Comcast/money | money-core/src/test/scala/com/comcast/money/core/handlers/SpanLogFormatterSpec.scala | Scala | apache-2.0 | 6,925 |
package mesosphere.marathon
package storage.migration
import akka.Done
import akka.stream.scaladsl.Source
import com.typesafe.scalalogging.StrictLogging
import mesosphere.AkkaUnitTest
import mesosphere.marathon.core.condition.Condition
import mesosphere.marathon.core.instance.Instance
import mesosphere.marathon.core.s... | gsantovena/marathon | src/test/scala/mesosphere/marathon/storage/migration/MigrationTo18Test.scala | Scala | apache-2.0 | 5,181 |
package shorty
import java.util.Enumeration
import javax.servlet.http._
/**
* Parses the representation from the request.
* This could be either an explicit parameter or the
* Accept: header
*/
trait RepresentationParser extends Logs {
val ACCEPT_HEADER = "Accept"
val TYPE_PARAM = "_type"
val DEFAULT_T... | davetron5000/shorty | src/main/scala/shorty/RepresentationParser.scala | Scala | mit | 1,964 |
/******************************************************************************
* 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/interceptor/MongoHeader.scala | Scala | bsd-2-clause | 2,424 |
/*
* Copyright 2012-2013 Stephane Godbillon (@sgodbillon) and Zenexity
*
* 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... | ReactiveMongo/ReactiveMongo | driver/src/main/scala/util/DefaultSRVResolver.scala | Scala | apache-2.0 | 2,325 |
package mesosphere.marathon
package core.instance
import mesosphere.marathon.core.condition.Condition
import mesosphere.marathon.core.instance.Instance.{ AgentInfo, InstanceState, LegacyInstanceImprovement }
import mesosphere.marathon.core.instance.update.{ InstanceUpdateOperation, InstanceUpdater }
import mesosphere.... | natemurthy/marathon | src/test/scala/mesosphere/marathon/core/instance/TestInstanceBuilder.scala | Scala | apache-2.0 | 7,549 |
// Copyright: 2010 - 2018 https://github.com/ensime/ensime-server/graphs
// License: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.core
import akka.actor._
import scala.collection.immutable.ListSet
/**
* An actor that will forward all received messages onto actors that
* have registered to receive ... | yyadavalli/ensime-server | core/src/main/scala/org/ensime/core/Broadcaster.scala | Scala | gpl-3.0 | 2,205 |
package com.automatak.render.dnp3.enums.generators
import _root_.java.nio.file.Path
import com.automatak.render._
import com.automatak.render.cpp.CppIndentation
import com.automatak.render.java.EnumModelRenderer
object JavaEnumGenerator {
def apply(enums: List[EnumModel], packageLine: String, dir: Path): Unit = {... | thiagoralves/OpenPLC_v2 | dnp3/generation/dnp3/src/main/scala/com/automatak/render/dnp3/enums/generators/JavaEnumGenerator.scala | Scala | gpl-3.0 | 839 |
package engine.backend.io.filesystem.gcs
import java.nio.file.Path
import cromwell.engine.backend.io.filesystem.gcs.{GcsFileSystemProvider, NioGcsPath}
import org.scalatest.mock.MockitoSugar
import org.scalatest.prop.TableDrivenPropertyChecks._
import org.scalatest.prop.Tables.Table
import org.scalatest.{FlatSpec, Ma... | cowmoo/cromwell | engine/src/test/scala/cromwell/engine/backend/io/filesystem/gcs/NioGcsPathSpec.scala | Scala | bsd-3-clause | 11,793 |
package gs.nick
import gs.nick.server.definitions.WireSystem
import gs.nick.server.systems.{SystemsHandler, SystemsResource}
import collection.breakOut
import scala.concurrent.{ExecutionContext, Future}
class SystemsController(systemsDao: SystemsDaoTrait)(implicit val ec: ExecutionContext) extends SystemsHandler {
... | nickfun/api-games | src/main/scala/gs/nick/SystemsController.scala | Scala | gpl-3.0 | 1,369 |
/*
* Copyright 2014 Johannes Rudolph
*
* 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... | jrudolph/sbt-dependency-graph | src/main/scala/net/virtualvoid/sbt/graph/DependencyGraphKeys.scala | Scala | apache-2.0 | 5,367 |
package com.karasiq.nanoboard.frontend.utils
import java.io.{PrintWriter, StringWriter}
import org.scalajs.dom.console
// From proxychecker frontend
object Notifications {
import scala.scalajs.js.{Array ⇒ JsArray}
import scala.scalajs.js.Dynamic.{global ⇒ js, literal ⇒ lt}
private def defaultTimeout: Int = {
... | Karasiq/nanoboard | frontend/src/main/scala/com/karasiq/nanoboard/frontend/utils/Notifications.scala | Scala | apache-2.0 | 3,720 |
package com.advancedspark.serving.prediction.keyvalue
import com.netflix.hystrix.HystrixCommand
import com.netflix.hystrix.HystrixCommandGroupKey
import org.jblas.DoubleMatrix
import redis.clients.jedis._
import scala.util.parsing.json._
import collection.JavaConverters._
import scala.collection.immutable.List
cl... | Resly/pipeline | prediction.ml/keyvalue/src/main/scala/com/advancedspark/serving/prediction/keyvalue/ItemSimilarsCommand.scala | Scala | apache-2.0 | 1,156 |
package core
import component._
import akka.actor.ActorSelection
import akka.http.scaladsl.marshalling._
import akka.http.scaladsl.unmarshalling._
import akka.http.scaladsl.model.{HttpHeader, HttpMethod, MediaType, MediaTypes, Uri}
import akka.http.scaladsl.model.headers.{Accept, Link, LinkParams, LinkValue}
import a... | enpassant/james | src/main/scala/core/CommonDirectives.scala | Scala | apache-2.0 | 3,002 |
/*
* Created on 2010/04/01
* Copyright (c) 2010-2014, Wei-ju Wu.
* 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, ... | weiju/zmpp2 | zmpp-glulx/src/main/scala/org/zmpp/glulx/GlulxAccel.scala | Scala | bsd-3-clause | 10,873 |
package notebook.kernel.remote
import java.io.File
import java.util.concurrent.atomic.AtomicInteger
import akka.actor._
import akka.remote.RemoteScope
import com.typesafe.config.{Config, ConfigFactory}
import notebook.kernel.pfork.{BetterFork, ForkableProcess, ProcessInfo}
import org.apache.commons.io.FileUtils
impo... | andypetrella/spark-notebook | modules/subprocess/src/main/scala/notebook/kernel/remote/RemoteActorSystem.scala | Scala | apache-2.0 | 3,903 |
/*
* Copyright (C) 2009-2011 Mathias Doenitz
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | parboiled1/parboiled | parboiled-scala/src/test/scala/org/parboiled/scala/BugIn101Test.scala | Scala | apache-2.0 | 1,152 |
/*
* 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 ... | hequn8128/flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/rules/common/WindowAggregateReduceFunctionsRule.scala | Scala | apache-2.0 | 3,174 |
/**
* 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"); yo... | vkroz/kafka | core/src/test/scala/integration/kafka/api/SSLProducerSendTest.scala | Scala | apache-2.0 | 9,345 |
import sbt._
object Dependencies {
object Version {
val akka = "2.6.6"
val akkaHttp = "10.1.12"
val circe = "0.13.0"
val slf4j = "1.7.30"
val logback = "1.2.3"
}
val akkaStream = "com.typesafe.akka" %% "akka-stream" % Version.akka
val akkaHttp = "com.typesafe.akka" %% "akka-http" % Versi... | t-mochizuki/scala-study | docker-example/project/Dependencies.scala | Scala | mit | 1,020 |
/*
* Copyright (c) 2013-2014 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at http://www.apac... | RetentionGrid/kinesis-s3 | project/SnowplowS3SinkBuild.scala | Scala | apache-2.0 | 1,731 |
/*
* Copyright 2012 Twitter Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed t... | xujianhai/zipkin | zipkin-cassandra/src/main/scala/com/twitter/zipkin/cassandra/CassandraSpanStoreFactory.scala | Scala | apache-2.0 | 2,839 |
package io.skysail.server.demo
import akka.http.scaladsl.model.ContentTypes._
import akka.http.scaladsl.model.FormData
import akka.http.scaladsl.model.StatusCodes._
import io.skysail.server.demo.domain.Bookmark
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import io.skysail.server.demo.PostBoo... | evandor/skysail-server | skysail.server.demo/test/io/skysail/server/demo/PostBoorkmarkRoutesTest.scala | Scala | apache-2.0 | 2,435 |
package com.twitter.finagle.mdns
import com.twitter.finagle.{Announcer, Resolver, Addr}
import com.twitter.util.{Await, Var}
import java.net.{InetSocketAddress, InetAddress, Socket}
import org.junit.runner.RunWith
import org.scalatest.concurrent.{Eventually, IntegrationPatience}
import org.scalatest.concurrent.Timeout... | Krasnyanskiy/finagle | finagle-mdns/src/test/scala/com/twitter/finagle/mdns/MDNSTest.scala | Scala | apache-2.0 | 2,843 |
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.