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 com.golmansax.app
import com.mongodb.casbah.Imports._
import org.scalatra.test.specs2._
// For more on Specs2, see http://etorreborre.github.com/specs2/guide/org.specs2.guide.QuickStart.html
class TodoAppServletSpec extends ScalatraSpec { def is = s2"""
GET / on TodoAppServlet
should return status 200 ... | golmansax/todo-app-in-scalatra | src/test/scala/com/golmansax/app/TodoAppServletSpec.scala | Scala | mit | 541 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 Algolia
* http://www.algolia.com/
*
* 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... | algolia/algoliasearch-client-scala | src/test/scala/algolia/AlgoliaClientTest.scala | Scala | mit | 22,345 |
package services.`export`
import actors.routing.minutes.MockMinutesLookup
import akka.NotUsed
import akka.stream.scaladsl.Source
import drt.shared.CrunchApi.{CrunchMinute, MinutesContainer, StaffMinute}
import drt.shared.Terminals.T1
import drt.shared.{Queues, SDateLike, TM, TQM}
import services.SDate
import services.... | UKHomeOffice/drt-scalajs-spa-exploration | server/src/test/scala/services/export/StreamingDesksBstExportSpec.scala | Scala | apache-2.0 | 8,058 |
package com.fabiooliveiracosta.highlight2pdf
import scala.collection.JavaConversions._
import java.awt.geom.Rectangle2D
import java.util.ArrayList
import java.util.{Map => JMap, List => JList,Iterator=>JIterator}
import org.pdfclown.documents.Pages
import org.pdfclown.documents.Page
import org.pdfclown.documents.con... | drFabio/highlight2pdf | src/main/scala/com/fabiooliveiracosta/highlight2pdf/PDFHighlightIntervalFilter.scala | Scala | mit | 2,442 |
/*
* Copyright (C) 2015 Stratio (http://stratio.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 required by app... | miguel0afd/crossdata | driver/src/main/scala/com/stratio/crossdata/driver/metadata/FieldMetadata.scala | Scala | apache-2.0 | 766 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | andrewor14/iolap | core/src/test/scala/org/apache/spark/ExecutorAllocationManagerSuite.scala | Scala | apache-2.0 | 35,005 |
/*
Copyright 2009 David Hall, Daniel Ramage
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 writi... | langkilde/epic | src/main/scala/epic/preprocess/WhitespaceTokenizer.scala | Scala | apache-2.0 | 966 |
/**
* Copyright 2015, deepsense.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 applicable law or agreed ... | deepsense-io/seahorse-workflow-executor | deeplang/src/it/scala/io/deepsense/deeplang/doperations/examples/NormalizeExample.scala | Scala | apache-2.0 | 1,582 |
package com.twitter.finagle.stats
import com.twitter.common.metrics.Metrics
import com.twitter.finagle.http._
import com.twitter.finagle.loadbalancer.perHostStats
import com.twitter.io.Buf
import com.twitter.util.Future
class MetricsHostStatsReceiver(val registry: Metrics) extends HostStatsReceiver {
def this() = t... | spockz/finagle | finagle-stats/src/main/scala/com/twitter/finagle/stats/MetricsHostStatsReceiver.scala | Scala | apache-2.0 | 1,375 |
package uk.gov.gds.ier.transaction.forces.applicationFormVote
import uk.gov.gds.ier.transaction.forces.ForcesControllers
import com.google.inject.{Inject, Singleton}
import uk.gov.gds.ier.serialiser.JsonSerialiser
import uk.gov.gds.ier.config.Config
import uk.gov.gds.ier.security.EncryptionService
import uk.gov.gds.ie... | michaeldfallen/ier-frontend | app/uk/gov/gds/ier/transaction/forces/applicationFormVote/PostalVoteStep.scala | Scala | mit | 1,161 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 Algolia
* http://www.algolia.com/
*
* 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... | algolia/algoliasearch-client-scala | src/main/scala/algolia/objects/Personalization.scala | Scala | mit | 1,468 |
package org.kimbasoft.specs2.contexts
import org.specs2.mutable.Specification
import org.specs2.specification.AfterEach
/**
* Missing documentation.
*
* @author <a href="steffen.krause@soabridge.com">Steffen Krause</a>
* @since 1.0
*/
class AfterEachContext extends Specification with AfterEach {
"Example 1 m... | kimba74/sandbox-scala | src/main/scala/org/kimbasoft/specs2/contexts/AfterEachContext.scala | Scala | gpl-3.0 | 510 |
/*
* FinPDF is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License version 3.
*
* FinPDF is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR P... | finpack/FinPDF | test/controllers/DocumentControllerSpec.scala | Scala | agpl-3.0 | 2,281 |
/*
* Copyright 2012 Eike Kettner
*
* 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... | eikek/publet | web/src/main/scala/org/eknet/publet/web/filter/PubletFilter.scala | Scala | apache-2.0 | 2,239 |
/**
* Copyright 2016, deepsense.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 applicable law or agreed ... | deepsense-io/seahorse-workflow-executor | sparkutils2.0.x/src/main/scala/io/deepsense/sparkutils/readwritedataframe/DataframeToDriverCsvFileWriter.scala | Scala | apache-2.0 | 2,222 |
package fly.play.s3
import java.util.Date
import scala.concurrent.{ ExecutionContext, Future }
import scala.xml.Elem
import fly.play.aws.policy.PolicyBuilder
import play.api.libs.ws.WSResponse
import fly.play.aws.acl.ACLList
import fly.play.aws.policy.Condition
/**
* Representation of a bucket
*
* @param name The ... | kaliber-scala/play-s3 | src/main/scala/fly/play/s3/Bucket.scala | Scala | mit | 10,777 |
/*
*
* 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
* "Licens... | atomicjets/distributed-graph-analytics | dga-graphx/src/main/scala/com/soteradefense/dga/graphx/hbse/HighBetweennessCore.scala | Scala | apache-2.0 | 28,114 |
/*
* Copyright © 2011-2012 Sattvik Software & Technology Resources, Ltd. Co.
* 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/licens... | sattvik/baitha | src/main/scala/com/sattvik/baitha/EnhancedIntent.scala | Scala | apache-2.0 | 9,831 |
/*
* Copyright 2021 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... | hmrc/play-ui | src/test/scala/uk/gov/hmrc/play/views/layouts/FooterSpec.scala | Scala | apache-2.0 | 1,342 |
package com.twitter.finagle.redis.integration
import com.twitter.finagle.redis.protocol.{Limit, ZInterval}
import com.twitter.finagle.redis.naggati.RedisClientTest
import com.twitter.finagle.redis.tags.{ClientTest, RedisTest}
import com.twitter.finagle.redis.util.{CBToString, StringToChannelBuffer}
import com.twitter.... | liamstewart/finagle | finagle-redis/src/test/scala/com/twitter/finagle/redis/commands/sorted-set/SortedSetClientIntegrationSuite.scala | Scala | apache-2.0 | 6,668 |
package sbt
import org.specs2._
import Scope.{ ThisScope, GlobalScope, parseScopedKey }
import java.net.URI
import sbt.internal.util.AttributeKey
/**
* http://www.scala-sbt.org/0.13/tutorial/Scopes.html
*/
class ScopedKeySpec extends Specification {
def is = s2"""
This is a specification to check the scoped ke... | mdedetrich/sbt | main/settings/src/test/scala/ScopedKeySpec.scala | Scala | bsd-3-clause | 1,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... | YMartsynkevych/camel | components/camel-swagger/src/main/scala/org/apache/camel/component/swagger/RestSwaggerApiDeclarationServlet.scala | Scala | apache-2.0 | 9,891 |
package io.prediction.examples.pfriendrecommendation
import io.prediction.controller.PDataSource
import io.prediction.controller.EmptyEvaluationInfo
import io.prediction.controller.EmptyActualResult
import io.prediction.controller.Params
import io.prediction.data.storage.Event
import io.prediction.data.storage.Storage... | wenaz/PredictionIO | examples/experimental/scala-parallel-friend-recommendation/src/main/scala/DataSource.scala | Scala | apache-2.0 | 2,516 |
package com.github.kafka_tools.logback
/**
* Based on from https://cwiki.apache.org/confluence/display/KAFKA/0.8.0+SimpleConsumer+Example
* Date: 10.09.14
*/
import com.github.kafka_tools.logback.serialize.LogbackProto
import kafka.api._
import kafka.common.{ErrorMapping, TopicAndPartition}
import kafka.consumer.S... | kafka-tools/kafka-logback-appender | kafka-logback-appender/src/test/scala/com/github/kafka_tools/logback/SimpleExample.scala | Scala | apache-2.0 | 8,595 |
package example
import io.circe.generic.semiauto._
import io.circe.{Decoder, Encoder, Json}
case class Error(code: String, message: String)
object Error {
implicit val encoder: Encoder[Error] = deriveEncoder
implicit val decoder: Decoder[Error] = deriveDecoder
}
| t-mochizuki/scala-study | how-to-handle-null-in-json/src/main/scala/Error.scala | Scala | mit | 270 |
/**
*
* TeeAPI
* Ledger wallet
*
* Created by Pierre Pollastri on 31/03/15.
*
* The MIT License (MIT)
*
* Copyright (c) 2015 Ledger
*
* 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 Softw... | LedgerHQ/ledger-wallet-android | app/src/main/scala/co/ledger/wallet/app/api/TeeAPI.scala | Scala | mit | 2,550 |
package edu.gemini.osgi.tools.app
import java.io.{File, PrintWriter, IOException}
import java.nio.file.{Files, SimpleFileVisitor, FileVisitResult, Path, FileSystems}
import java.nio.file.attribute.BasicFileAttributes
import edu.gemini.osgi.tools.app.{copy => recursivecopy}
import java.util.jar.Manifest
import scala... | fnussber/ocs | project/src/main/scala/edu/gemini/osgi/tools/app/MacDistHandler.scala | Scala | bsd-3-clause | 7,411 |
package org.rebeam.boxes.swing.views
import org.rebeam.boxes.core._
import org.rebeam.boxes.core.util._
import org.rebeam.boxes.swing.views._
import org.rebeam.boxes.swing._
import java.awt.Dimension
import javax.swing.JTextField
import java.awt.event.ActionListener
import java.awt.event.ActionEvent
import java.awt.ev... | trepidacious/boxes-swing | src/main/scala/org/rebeam/boxes/swing/views/NumberView.scala | Scala | gpl-2.0 | 4,916 |
/*
* Copyright (c) 2011-13 Miles Sabin
*
* 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... | rorygraves/shapeless | core/src/main/scala/shapeless/sized.scala | Scala | apache-2.0 | 7,859 |
/*
ASIB - A Scala IRC Bot
Copyright (C) 2012 Iain Cambridge
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.
... | icambridge-old/asib | src/main/scala/asib/util/regex/IrcRegex.scala | Scala | gpl-3.0 | 1,474 |
package org.eknet.publet.gitr.webui.scripts
import org.eknet.publet.engine.scala.ScalaScript
import GitrControl._
import org.eknet.publet.web.util.{PubletWeb, PubletWebContext}
import org.eknet.publet.gitr.auth.{GitPermissionBuilder, GitAction}
/**
* @author Eike Kettner eike.kettner@gmail.com
* @since 17.06.12 17:... | eikek/publet | gitr-web/src/main/scala/org/eknet/publet/gitr/webui/scripts/UpdateCollaborator.scala | Scala | apache-2.0 | 1,445 |
package io.udash.web.guide.demos.rpc
import io.udash.web.SeleniumTest
import org.scalatest.BeforeAndAfterEach
class RpcBackendTest extends SeleniumTest with BeforeAndAfterEach {
override protected final val url = "/rpc/client-server"
"RpcBackend view" should {
"receive ClientId in demo" in {
val callDe... | UdashFramework/udash-core | guide/selenium/src/test/scala/io/udash/web/guide/demos/rpc/RpcBackendTest.scala | Scala | apache-2.0 | 762 |
package models
import javax.inject.{Inject, Singleton}
import controllers.MovieData
import play.api.db.slick.DatabaseConfigProvider
import slick.driver.JdbcProfile
import scala.concurrent.Future
/**
* Created by pnagarjuna on 18/04/16.
*/
case class Movie (name: String, imdb: String, userId: Long, id: Option[Lo... | pamu/moviepod-backend | app/models/Movie.scala | Scala | apache-2.0 | 1,220 |
package me.yingrui.segment.core.disambiguation
import me.yingrui.segment.crf.{CRFCorpus, CRFModel}
object DisambiguationModelTrainingApp extends App {
if (args.isEmpty) {
println(
"""
|Usage:
| --train-file : input labeled disambiguation sentences
| --save-file : trained crf mode... | yingrui/mahjong | lib-segment-apps/src/main/scala/me/yingrui/segment/core/disambiguation/DisambiguationModelTrainingApp.scala | Scala | gpl-3.0 | 887 |
/* Title: Pure/Isar/line_structure.scala
Author: Makarius
Line-oriented document structure, e.g. for fold handling.
*/
package isabelle
object Line_Structure
{
val init = Line_Structure()
}
sealed case class Line_Structure(
improper: Boolean = true,
blank: Boolean = true,
command: Boolean = f... | larsrh/libisabelle | modules/pide/2019-RC4/src/main/scala/Isar/line_structure.scala | Scala | apache-2.0 | 2,479 |
package org.scalawebtest.core.gauge
import org.jsoup.nodes.{Element => JElement, Node => JNode, TextNode => JTextNode}
import scala.jdk.CollectionConverters._
object JNodePrettifier {
implicit class PrettyStringProvider(domNode: JNode) {
def prettyString: String = prettyString(0) + "\\n"
private def prettyStri... | unic/ScalaWebTest | scalawebtest-core/src/main/scala/org/scalawebtest/core/gauge/JNodePrettifier.scala | Scala | apache-2.0 | 767 |
/*
* 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... | yiheng/BigDL | spark/dl/src/main/scala/com/intel/analytics/bigdl/dlframes/DLEstimator.scala | Scala | apache-2.0 | 16,944 |
/*
* 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/frs102/boxes/AC32.scala | Scala | apache-2.0 | 1,275 |
/*
* 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... | zhangxiaoli73/BigDL | spark/dl/src/test/scala/com/intel/analytics/bigdl/integration/torch/NarrowTableSpec.scala | Scala | apache-2.0 | 3,978 |
package org.pico.statsd.syntax.event
import org.pico.disposal.std.autoCloseable._
import org.pico.disposal.{Auto, Disposable}
import org.pico.event.Bus
import org.pico.statsd._
import org.pico.statsd.datapoint._
import org.pico.statsd.impl.{StaticAddressResolution, UdpEmitter}
import scala.concurrent.duration.Deadlin... | pico-works/pico-statsd | pico-statsd/src/test/scala/org/pico/statsd/syntax/event/MetricPerformanceMain.scala | Scala | mit | 1,590 |
package crossdns
import com.sun.jna.Library
import com.sun.jna.Native
import java.util.concurrent.ArrayBlockingQueue
trait SyslogLibrary extends Library {
def openlog (ident : String, option : Int, facility : Int) : Unit
def syslog (priority : Int, message : String) : Unit
def closelog () : Unit
}
object... | rtreffer/crossdns | src/main/scala/crossdns/Syslog.scala | Scala | apache-2.0 | 2,612 |
package com.github.gigurra.math
/**
* Returns intersection point of two lines (endless), give the lines directs and a point on each line.
* If lines are parallel, None is returned.
*/
object LinesIntersectionPoint {
def apply(
point1: Vec2, directionVector1: Vec2,
point2: Vec2, directionVector2: Vec... | GiGurra/scala-libgurra | src/main/scala/com/github/gigurra/math/LinesIntersect.scala | Scala | mit | 4,376 |
package org.psliwa.idea.composerJson.composer.repository
import org.junit.Assert._
import org.junit.Test
import org.psliwa.idea.composerJson.composer.model.repository.{InMemoryRepository, Repository, RepositoryInfo}
import org.psliwa.idea.composerJson.composer.repository.DefaultRepositoryProviderTest.FakeRepositoryFac... | psliwa/idea-composer-plugin | src/test/scala/org/psliwa/idea/composerJson/composer/repository/DefaultRepositoryProviderTest.scala | Scala | mit | 5,742 |
/*
* Copyright (C) 2011 Lalit Pant <pant.lalit@gmail.com>
*
* The contents of this file are subject to the GNU General Public License
* Version 3 (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.gnu.org/copyleft/gpl.html
*
*... | vnkmr7620/kojo | KojoEnv/test/unit/src/net/kogics/kojo/xscala/CompilerAndRunnerTest.scala | Scala | gpl-3.0 | 773 |
/*
* Scala.js (https://www.scala-js.org/)
*
* Copyright EPFL.
*
* Licensed under Apache License 2.0
* (https://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package org.scalajs.testsuite.javalib.util.fun... | scala-js/scala-js | test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/util/function/DoublePredicateTest.scala | Scala | apache-2.0 | 2,332 |
package demo.components.elementalui
import chandu0101.macros.tojs.GhPagesMacros
import chandu0101.scalajs.react.components.elementalui._
import demo.components.CodeExample
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.html_<^._
import scala.scalajs.js.`|`
object EuiMiscDemo {
val code = GhPage... | chandu0101/scalajs-react-components | demo/src/main/scala/demo/components/elementalui/EuiMiscDemo.scala | Scala | apache-2.0 | 6,589 |
package wom.types
import spray.json.JsNull
import wom.values.{WomOptionalValue, WomValue}
import scala.util.Try
case class WomOptionalType(memberType: WomType) extends WomType {
/**
* Method to be overridden by implementation classes defining a partial function
* for the conversion of raw input values to s... | ohsu-comp-bio/cromwell | wom/src/main/scala/wom/types/WomOptionalType.scala | Scala | bsd-3-clause | 3,367 |
/**
* Exercise 2.1
*
* Write a recursive function to get the nth Fibonacci number, where the first
* two Fibonacci numbers are defined to be 0 and 1.
*
* Created by Brandon Morris on 2/14/16.
*/
object Ex2_1 {
/**
* Find the n'th Fibonacci number, where fib(1) is 0, fib(2) is 1, and
* fib(x) i... | BrandonLMorris/Scala-Fun | FPinScala/src/2-1.scala | Scala | mit | 940 |
import scala.tools.partest._
import java.io.{Console => _, _}
object Test extends DirectTest {
override def extraSettings: String = "-usejavacp -Xprint:specialize -Ydelambdafy:method -d " + testOutput.path
override def code = "class Foo { val f = (param: String) => param } "
override def show(): Unit = {
... | felixmulder/scala | test/files/run/delambdafy_t6555.scala | Scala | bsd-3-clause | 378 |
/*
* 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 | oberon0/src/main/scala/ast/trees.scala | Scala | bsd-3-clause | 3,454 |
/*
* 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 n... | patelh/kafka-manager | app/kafka/manager/utils/one10/GroupMetadataManager.scala | Scala | apache-2.0 | 37,865 |
package com.etsy.conjecture.scalding.train
import cascading.pipe.Pipe
import com.twitter.scalding._
import com.etsy.conjecture.data._
import com.etsy.conjecture.model._
import scala.collection.JavaConversions._
import java.io.File
import scala.io.Source
class ClusteringModelTrainer(args: Args, centers: Map[String, St... | codeaudit/Conjecture | src/main/scala/com/etsy/conjecture/scalding/train/ClusteringModelTrainer.scala | Scala | mit | 1,810 |
/*
* 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 ... | SnappyDataInc/spark | core/src/main/scala/org/apache/spark/metrics/MetricsSystem.scala | Scala | apache-2.0 | 10,130 |
package com.gilt.gfc.kinesis.publisher
import java.util.concurrent.{Future => JFuture}
import com.amazonaws.AmazonServiceException
import com.amazonaws.handlers.AsyncHandler
import com.amazonaws.services.kinesis.{AmazonKinesis, AmazonKinesisAsync}
import com.amazonaws.services.kinesis.model.{PutRecordRequest, PutRecor... | gilt/gfc-kinesis | src/test/scala/com/gilt/gfc/kinesis/publisher/RawKinesisStreamPublisherSpec.scala | Scala | apache-2.0 | 5,755 |
package tscfg.generators
import tscfg.model.ObjectType
/** Base generation class.
*
* @param genOpts
* Generation options
*/
abstract class Generator(genOpts: GenOpts) {
def generate(objectType: ObjectType): GenResult
protected val className: String = genOpts.className
protected val hasPath: String ... | carueda/tscfg | src/main/scala/tscfg/generators/Generator.scala | Scala | apache-2.0 | 1,211 |
/**
* 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... | unix1986/universe | tool/kafka-0.8.1.1-src/core/src/main/scala/kafka/log/Log.scala | Scala | bsd-2-clause | 29,090 |
/*
* @author Daniel Strebel
* @author Philip Stutz
*
* Copyright 2012 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.apa... | elaverman/cuilt | src/main/scala/com/signalcollect/dcop/evaluation/MySqlResultHandler.scala | Scala | apache-2.0 | 6,990 |
/*
* 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 ... | WangTaoTheTonic/flink | flink-scala/src/main/scala/org/apache/flink/api/scala/ClosureCleaner.scala | Scala | apache-2.0 | 10,833 |
import language.postfixOps
print("This is simple script")
if (args isEmpty)
println
else {
println(", with arguments")
var i = 0
while (i < args.length) {
println(args(i))
i += 1
}
}
args foreach println
for (arg <- args)
println(arg)
| MarekDudek/learning-scala | src/main/scripts/simple-script.scala | Scala | mit | 261 |
package nl.tno.hla.fom
import scala.xml._
/**
* Class for mapping the alternatives in VariantRecordData
*/
case class Alternative(alternative: Node) {
lazy val name = (alternative \\ "name" ).text
lazy val dataType = (alternative \\ "dataType" ).text
lazy val enumerator = (alternative \\ "enume... | TNOCS/HlaGateway | src/main/scala/nl/tno/hla/fom/VariantRecordData.scala | Scala | mit | 1,035 |
package org.scalatra
import scala.annotation.tailrec
import scala.collection.JavaConversions._
import scala.collection.immutable.HashSet
import scala.collection.mutable.ConcurrentMap
import java.util.concurrent.ConcurrentHashMap
class RouteRegistry {
private val _methodRoutes: ConcurrentMap[HttpMethod, Seq[Route]]... | louk/scalatra | core/src/main/scala/org/scalatra/RouteRegistry.scala | Scala | bsd-2-clause | 3,853 |
/*
* Copyright (c) 2014-2018 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... | Wogan/monix | monix-execution/shared/src/main/scala/monix/execution/Scheduler.scala | Scala | apache-2.0 | 17,752 |
package slick.jdbc
import scala.collection.mutable.Builder
import scala.language.{implicitConversions, higherKinds}
import slick.ast._
import slick.ast.TypeUtil.:@
import slick.compiler.{Phase, QueryCompiler, InsertCompiler}
import slick.lifted._
import slick.relational.{RelationalProfile, CompiledMapping}
import sli... | slick/slick | slick/src/main/scala/slick/jdbc/JdbcProfile.scala | Scala | bsd-2-clause | 4,440 |
/* Code Pulse: a real-time code coverage tool, for more information, see <http://code-pulse.com/>
*
* Copyright (C) 2014-2017 Code Dx, Inc. <https://codedx.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 ... | secdec/codepulse | shared/src/test/scala/com/secdec/bytefrog/common/message/test/MessageProtocolV1Suite.scala | Scala | apache-2.0 | 13,010 |
package com.sk.app.proxmock.application
import java.io.File
import java.nio.charset.StandardCharsets._
import java.util.concurrent.TimeUnit
import com.sk.app.proxmock.application.configuration.SpringArguments
import com.sk.app.proxmock.application.domain.Config
import com.sk.app.proxmock.toolset.network.Udp
import co... | szymonkudzia/proxmock | sources/src/main/scala/com/sk/app/proxmock/application/ProxmockApplication.scala | Scala | mit | 2,348 |
package com.github.gdefacci.briscola.spec
package tournament
import com.github.gdefacci.ddd.CommandRunner
import com.github.gdefacci.briscola.tournament._
import com.github.gdefacci.briscola.player._
import scalaz.{ -\\/, \\/, \\/- }
import com.github.gdefacci.bdd._
object TournamentCommandRunner {
def withPlayer... | gdefacci/briscola | ddd-briscola/src/test/scala/com/github/gdefacci/briscola/spec/tournament/TournamentSteps.scala | Scala | bsd-3-clause | 2,034 |
package io.eels.component.parquet
import com.sksamuel.exts.Logging
import io.eels.Row
import org.apache.hadoop.conf.Configuration
import org.apache.parquet.hadoop.api.WriteSupport
import org.apache.parquet.hadoop.api.WriteSupport.FinalizedWriteContext
import org.apache.parquet.io.api.RecordConsumer
import org.apache.p... | eel-lib/eel | eel-core/src/main/scala/io/eels/component/parquet/RowWriteSupport.scala | Scala | mit | 1,499 |
/**
* Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.serialization
import akka.actor.{ ActorSystem, ExtensionId, ExtensionIdProvider, ExtendedActorSystem }
/**
* SerializationExtension is an Akka Extension to interact with the Serialization
* that is built into Akka
*/
object Ser... | jmnarloch/akka.js | akka-js-actor/shared/src/main/scala/akka/serialization/SerializationExtension.scala | Scala | bsd-3-clause | 629 |
package io.youi.capacitor
import scala.scalajs.js
import scala.scalajs.js.Promise
import scala.scalajs.js.annotation.JSGlobal
@js.native
@JSGlobal("Capacitor")
object Capacitor extends js.Object {
def isNative: Boolean = js.native
def Plugins: Plugins = js.native
trait Plugins extends js.Object {
def Acces... | outr/youi | capacitor/src/main/scala/io/youi/capacitor/Capacitor.scala | Scala | mit | 10,148 |
package pl.jojczykp.pingpong.message
case class StopMessage()
| jojczykp/pingpong | src/main/scala/pl/jojczykp/pingpong/message/StopMessage.scala | Scala | gpl-3.0 | 63 |
package org.jetbrains.plugins.scala.codeInspection.collections
import com.intellij.codeInsight.PsiEquivalenceUtil
import org.jetbrains.plugins.scala.codeInspection.InspectionBundle
import org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression
/**
* @author Nikolay.Tropin
*/
class LastIndexToLastInspection exten... | double-y/translation-idea-plugin | src/org/jetbrains/plugins/scala/codeInspection/collections/LastIndexToLastInspection.scala | Scala | apache-2.0 | 953 |
/* Copyright (C) 2008-2014 University of Massachusetts Amherst.
This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible)
http://factorie.cs.umass.edu, http://github.com/factorie
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with... | asubbaswamy/factorie | src/main/scala/cc/factorie/variable/RefVariable.scala | Scala | apache-2.0 | 2,660 |
package fpinscala.monoids
import fpinscala.parallelism.Nonblocking._
import fpinscala.parallelism.Nonblocking.Par.toParOps
import fpinscala.testing.{Gen, Prop}
import scala.Option
// infix syntax for `Par.map`, `Par.flatMap`, etc
trait Monoid[A] {
def op(a1: A, a2: A): A
def zero: A
}
object Monoid {
val st... | RawToast/fpinscala | exercises/src/main/scala/fpinscala/monoids/Monoid.scala | Scala | mit | 9,457 |
package utils
import javax.crypto._
import javax.crypto.spec._
import java.util.Base64
import com.typesafe.config.ConfigFactory
object PBKDF2 {
private val algorithm = "PBKDF2WithHmacSHA1"
private val hashByteSize = 255
private val iterations = 1000
private val salt = ConfigFactory.load().getString("energiz... | Clemson-University-Energizer/energizer-api | app/utils/PBKDF2.scala | Scala | mit | 1,043 |
package ch.epfl.directembedding.transformers
import ch.epfl.directembedding.{ DirectEmbeddingModule, DirectEmbeddingUtils }
trait EndpointTransformation extends DirectEmbeddingModule with DirectEmbeddingUtils {
import c.universe._
def EndpointTransformer = new (Tree => Tree) {
// ${c.parse(dslEndpointMet... | directembedding/directembedding | directembedding/src/main/scala/ch/epfl/directembedding/transformers/EndpointTransformation.scala | Scala | bsd-3-clause | 437 |
import cats.effect.{ Concurrent, ContextShift }
import com.bot4s.telegram.cats.TelegramBot
import org.asynchttpclient.Dsl.asyncHttpClient
import sttp.client3.asynchttpclient.cats.AsyncHttpClientCatsBackend
abstract class ExampleBot[F[_]: ContextShift: Concurrent](val token: String)
extends TelegramBot[F](token, As... | mukel/telegrambot4s | examples/src-cats/ExampleBot.scala | Scala | apache-2.0 | 380 |
package org.jetbrains.plugins.scala.debugger.evaluation.util
import com.intellij.debugger.engine.{DebugProcess, DebugProcessImpl, JVMName, JVMNameUtil}
import com.intellij.debugger.jdi.VirtualMachineProxyImpl
import com.intellij.debugger.{DebuggerBundle, NoDataException, SourcePosition}
import com.intellij.lang.ASTNod... | LPTK/intellij-scala | src/org/jetbrains/plugins/scala/debugger/evaluation/util/DebuggerUtil.scala | Scala | apache-2.0 | 21,883 |
import scalaz.syntax.apply._
import scalaz._
class SCL6417_Performance {
def testValidation(): Unit = {
(validateOptionalX(Some(0)) |@| validateOptionalY(Some(1))
|@| validateOptionalY(Some(1)) |@| validateOptionalY(Some(1))
|@| validateOptionalY(Some(1)) |@| validateOptionalY(Some(1))
|@| val... | LPTK/intellij-scala | testdata/typeInference/scalaz/SCL6417_Performance.scala | Scala | apache-2.0 | 1,051 |
/**
* 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/payload/TemplatePropertyGroup.scala | Scala | agpl-3.0 | 3,075 |
package knot.core.stream.sinks
import java.util.concurrent.TimeUnit
import knot.core.Done
import knot.core.testKit.CellSpec
import org.scalatest.Matchers._
import scala.collection.mutable.ListBuffer
import scala.concurrent.Await
import scala.concurrent.duration.Duration
class SinksSpec extends CellSpec {
import ... | defvar/knot | knot-core/src/test/scala/knot/core/stream/sinks/SinksSpec.scala | Scala | mit | 1,095 |
/*
* 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 ... | tzulitai/flink | flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamExecCorrelateBase.scala | Scala | apache-2.0 | 3,568 |
package breeze.stats.mcmc
/*
Copyright 2014 Chris Stucchio
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... | crealytics/breeze | math/src/main/scala/breeze/stats/mcmc/MetropolisHastings.scala | Scala | apache-2.0 | 6,099 |
package scalaSci
import scalaSci.math.array.DoubleArray
import java.util._
import Jama._
import scalaSci.math.LinearAlgebra.LinearAlgebra
import JSci.maths.wavelet.Signal
import scalaExec.Interpreter.GlobalValues
import scalaSci.MTJ.MTJBandMat
import org.apache.commons.math.linear.RealMatrix
import org.apache.com... | scalalab/scalalab | source/src/main/scala/scalaSci/StaticScalaSciGlobal.scala | Scala | mit | 136,101 |
package com.twitter.finagle.thriftmux
import com.twitter.finagle.{Failure, mux, Dtab, ThriftMuxUtil}
import com.twitter.finagle.mux.{BadMessageException, Message}
import com.twitter.finagle.netty3.Conversions._
import com.twitter.finagle.stats.{NullStatsReceiver, StatsReceiver}
import com.twitter.finagle.thrift._
impo... | yancl/finagle-6.22.0 | finagle-thriftmux/src/main/scala/com/twitter/finagle/thriftmux/Netty3.scala | Scala | apache-2.0 | 13,091 |
/* Copyright 2009-2016 EPFL, Lausanne */
package leon
package grammars
import purescala.Expressions._
import purescala.Types.TypeTree
import purescala.ExprOps.collect
import purescala.Extractors.IsTyped
/** Generates constants found in an [[leon.purescala.Expressions.Expr]].
* Some constants that are generated by ... | regb/leon | src/main/scala/leon/grammars/Constants.scala | Scala | gpl-3.0 | 898 |
/*
* Copyright (C) 2017 Stratio (http://stratio.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 required by app... | compae/tiki-takka | core/src/main/scala/com/stratio/tikitakka/core/Dependencies.scala | Scala | apache-2.0 | 1,147 |
/*
* 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 ... | pronix/spark | sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveExplainSuite.scala | Scala | apache-2.0 | 4,108 |
/**
* Licensed to Big Data Genomics (BDG) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The BDG licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use ... | erictu/adam | adam-core/src/main/scala/org/bdgenomics/adam/converters/FragmentConverter.scala | Scala | apache-2.0 | 3,806 |
/*
* Copyright 2011-2013 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 app... | vert-x/mod-lang-scala | src/main/scala/org/vertx/scala/core/net/NetSocket.scala | Scala | apache-2.0 | 4,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 ... | tzulitai/flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/rules/common/WindowPropertiesRule.scala | Scala | apache-2.0 | 10,131 |
/**
* Copyright 2016, deepsense.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 applicable law or agreed ... | deepsense-io/seahorse-workflow-executor | deeplang/src/it/scala/io/deepsense/deeplang/InMemoryDataFrame.scala | Scala | apache-2.0 | 1,393 |
import org.junit.runner._
import org.specs2.mutable._
import org.specs2.runner._
import play.api.test.Helpers._
import play.api.test._
/**
* Add your spec here.
* You can mock out a whole application including requests, plugins etc.
* For more information, consult the wiki.
*/
@RunWith(classOf[JUnitRunner])
cl... | ig2/ig2 | test/ApplicationSpec.scala | Scala | gpl-3.0 | 793 |
/*
* Copyright © 2015-2019 the contributors (see Contributors.md).
*
* This file is part of Knora.
*
* Knora 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, o... | musicEnfanthen/Knora | webapi/src/main/scala/org/knora/webapi/store/iiif/IIIFManager.scala | Scala | agpl-3.0 | 1,915 |
package inverse_macros.lazys
import debug._
import org.junit.Assert._
import org.scalatest.FunSuite
import scala.language.implicitConversions
class LazyTest extends FunSuite {
def compare(s1: String)(s2: String) = {
val t1 = replaceFreshVariables(s1.replaceAll("\\\\s+", " "))
val t2 = replaceFreshVariables... | hiroshi-cl/InverseMacros | inverse_macros_libraries/src/test/scala/inverse_macros/lazys/LazyTest.scala | Scala | bsd-2-clause | 5,843 |
package scala.scalajs.runtime
import scala.scalajs.js
/** Information about link-time configuration of Scala.js. */
@js.native
trait LinkingInfo extends js.Object {
/** Semantics configuration. */
val semantics: LinkingInfo.Semantics = js.native
/** Whether we are assuming ECMAScript 6 support or not. */
val... | mdedetrich/scala-js | library/src/main/scala/scala/scalajs/runtime/LinkingInfo.scala | Scala | bsd-3-clause | 1,015 |
package org.opencommercesearch.api.service
/*
* Licensed to OpenCommerceSearch under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. OpenCommerceSearch licenses this
* file to you under the Apache License, Versio... | madickson/opencommercesearch | opencommercesearch-api/test/org/opencommercesearch/api/service/CategoryServiceSpec.scala | Scala | apache-2.0 | 20,461 |
package com.jeffharwell.commoncrawl.createcorpus
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.apache.spark.SparkConf
import com.datastax.spark.connector._
import com.datastax.spark.connector.writer._
import com.datastax.spark.connector.cql.CassandraConnector // needed to exec... | jeffharwell/CommonCrawlScalaTools | createcorpus/src/main/scala/com/jeffharwell/commoncrawl/createcorpus/loadwetpaths.scala | Scala | mit | 3,241 |
package com.crobox.clickhouse.dsl.column
import com.crobox.clickhouse.dsl._
import com.crobox.clickhouse.{DslIntegrationSpec, dsl => CHDsl}
class StringFunctionsTest extends DslIntegrationSpec {
it should "succeed for ScalaStringFunctions" in {
r(toStringRep(pi()).contains("159")) shouldBe "1"
}
it should... | crobox/clickhouse-scala-client | dsl/src/test/scala/com/crobox/clickhouse/dsl/column/StringFunctionsTest.scala | Scala | lgpl-3.0 | 3,297 |
package models
import play.api.libs.json._
case class Discussion(
key: String,
webUrl: String,
apiUrl: String,
title: String,
// commentCount: Int,
// topLevelCommentCount: Int,
// commenterCount: Int,
isClosedForComments: Boolean,
isClosedForRecommendation: Boolean
)
object Discussion {
implicit... | satterly/play-material-modtools | app/models/Comment.scala | Scala | mit | 1,281 |
/*
* 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 ... | ptkool/spark | mllib/src/main/scala/org/apache/spark/ml/tree/impl/GradientBoostedTrees.scala | Scala | apache-2.0 | 20,141 |
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.