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 gapt.formats.tptp
import gapt.expr._
import gapt.expr.formula.And
import gapt.expr.formula.Bottom
import gapt.expr.formula.Formula
import gapt.expr.formula.Imp
import gapt.expr.formula.Neg
import gapt.expr.formula.fol.FOLAtom
import gapt.expr.formula.fol.FOLConst
import gapt.expr.formula.fol.FOLFormula
import ... | gapt/gapt | core/src/main/scala/gapt/formats/tptp/TptpProofParser.scala | Scala | gpl-3.0 | 11,983 |
/*
* 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 ... | stillalex/bark-oak | src/main/scala/org/apache/jackrabbit/oak/bark/BarkApp.scala | Scala | apache-2.0 | 2,078 |
/*
* Copyright 2012-2014 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
*
* Unl... | Comcast/sirius | src/test/scala/com/comcast/xfinity/sirius/api/impl/paxos/LeaderWatcherTest.scala | Scala | apache-2.0 | 4,019 |
//======================================================================================================================
// Facsimile: A Discrete-Event Simulation Library
// Copyright © 2004-2020, Michael J Allen.
//
// This file is part of Facsimile.
//
// Facsimile is free software: you can redistribute it and/or mod... | Facsimile/facsimile | facsimile-simulation/src/main/scala/org/facsim/sim/model/Parameters.scala | Scala | lgpl-3.0 | 12,412 |
/******************************************************************************
Copyright (c) 2012-2014, KAIST, S-Core.
All rights reserved.
Use is subject to license terms.
This distribution may include materials developed by third parties.
***********************************************************... | darkrsw/safe | src/main/scala/kr/ac/kaist/jsaf/bug_detector/ExprDetect.scala | Scala | bsd-3-clause | 30,902 |
package ch.uzh.ifi.pdeboer.pplib.patterns
import ch.uzh.ifi.pdeboer.pplib.process.entities._
import ch.uzh.ifi.pdeboer.pplib.util.CollectionUtils._
import ch.uzh.ifi.pdeboer.pplib.util.LazyLogger
import scala.xml.NodeSeq
/**
* Created by pdeboer on 14/12/14.
*/
class FixPatchExecuter(@transient var driver: FixPatc... | uzh/PPLib | src/main/scala/ch/uzh/ifi/pdeboer/pplib/patterns/FixPatch.scala | Scala | mit | 3,945 |
package org.jetbrains.plugins.scala
package format
import org.jetbrains.plugins.scala.base.ScalaLightCodeInsightFixtureTestAdapter
import org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression
import org.jetbrains.plugins.scala.lang.psi.impl.ScalaPsiElementFactory.createExpressionFromText
import org.junit.Assert._... | JetBrains/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/format/InterpolatedStringFormatterTest.scala | Scala | apache-2.0 | 5,314 |
package filodb.coordinator.client
import scala.concurrent.{Await, Future}
import scala.concurrent.duration._
import scala.language.postfixOps
import scala.reflect.ClassTag
import akka.actor.{ActorRef, ActorSystem, Address}
import akka.pattern.ask
import akka.util.Timeout
import com.typesafe.scalalogging.StrictLogging... | filodb/FiloDB | coordinator/src/main/scala/filodb.coordinator/client/Client.scala | Scala | apache-2.0 | 6,208 |
package com.artclod.mathml
import org.junit.runner.RunWith
import org.specs2.runner.JUnitRunner
import scala.xml._
import play.api.test._
import play.api.test.Helpers._
import org.specs2.mutable._
import com.artclod.mathml.scalar._
import com.artclod.mathml.scalar.apply._
import com.artclod.mathml.scalar.apply.trig._
... | kristiankime/web-education-games | test/com/artclod/mathml/MathMLSpec.scala | Scala | mit | 5,123 |
package chat.tox.antox.av
import android.content.Context
import android.content.res.AssetFileDescriptor
import android.media.MediaPlayer.OnCompletionListener
import android.media.{AudioManager, MediaPlayer, RingtoneManager}
import chat.tox.antox.R
import chat.tox.antox.utils.MediaUtils
/**
* Attach to a call and ad... | wiiam/Antox | app/src/main/scala/chat/tox/antox/av/CallSounds.scala | Scala | gpl-3.0 | 2,485 |
object O {
def foo = {}
}
println(O /* */ foo)
println(O /* applicable: false */ foo())
println(O /* applicable: false */ foo 1)
println(O /* applicable: false */ foo (1))
println(O /* applicable: false */ foo (1, 2)) | ilinum/intellij-scala | testdata/resolve2/function/operator/ParametersNone.scala | Scala | apache-2.0 | 220 |
package BIDMat
import scala.collection.mutable.HashMap
import java.lang.ref._
import jcuda.NativePointerObject
class Mat(nr:Int, nc:Int) {
val nrows = nr
val ncols = nc
def dims:(Int, Int) = (nr, nc)
def length = nr*nc
def llength = 1L*nr*nc
private var _GUID = Mat.myrand.nextLong
... | codeaudit/BIDMat | src/main/scala/BIDMat/Mat.scala | Scala | bsd-3-clause | 34,640 |
package uk.gov.gds.ier.transaction.crown.contact
import uk.gov.gds.ier.validation.ErrorTransformForm
import uk.gov.gds.ier.step.StepTemplate
import uk.gov.gds.ier.transaction.crown.InprogressCrown
trait ContactMustache extends StepTemplate[InprogressCrown] {
case class ContactModel (
question:Question,
... | alphagov/ier-frontend | app/uk/gov/gds/ier/transaction/crown/contact/ContactMustache.scala | Scala | mit | 2,114 |
package jp.co.cyberagent.aeromock.template.thymeleaf
import jp.co.cyberagent.aeromock.config.TemplateConfig
/**
* Configuration of class for thymeleaf.
* @author stormcat24
*/
case class ThymeleafConfig(
suffix: Option[String],
characterEncoding: Option[String],
templateAliases: Option[Map[String, String]],
... | CyberAgent/aeromock | aeromock-thymeleaf/src/main/scala/jp/co/cyberagent/aeromock/template/thymeleaf/ThymeleafConfig.scala | Scala | mit | 643 |
package pl.touk.nussknacker.restmodel
import io.circe.Decoder
import io.circe.generic.JsonCodec
import io.circe.generic.extras.semiauto.deriveConfiguredDecoder
import pl.touk.nussknacker.engine.api.CirceUtil._
import pl.touk.nussknacker.engine.api.component.ComponentType.ComponentType
import pl.touk.nussknacker.engine... | TouK/nussknacker | ui/restmodel/src/main/scala/pl/touk/nussknacker/restmodel/definition/package.scala | Scala | apache-2.0 | 6,098 |
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO2
package com.google.protobuf.descriptor
/** Describes a method of a service.
*
* @param inputType
* Input and output type names. These are resolved in the same way as
* FieldDescriptorProto.ty... | dotty-staging/ScalaPB | scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/MethodDescriptorProto.scala | Scala | apache-2.0 | 16,815 |
/*
* 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 ... | sachintyagi22/spark | sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveSchemaInferenceSuite.scala | Scala | apache-2.0 | 12,976 |
/**
* 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... | MykolaB/gatling | gatling-commons/src/main/scala/io/gatling/commons/util/Retry.scala | Scala | apache-2.0 | 1,357 |
package rodinia
import ir.ast._
import ir.{ArrayTypeWSWC, TupleType}
import lift.arithmetic.SizeVar
import opencl.executor._
import opencl.ir._
import opencl.ir.pattern._
import org.junit.Assert._
import org.junit.Test
object Kmeans extends TestWithExecutor {
val P = SizeVar("P") // number of points
val C = Size... | lift-project/lift | src/test/rodinia/Kmeans.scala | Scala | mit | 6,254 |
package chana.avro
import java.io.ByteArrayOutputStream
import java.io.IOException
import java.io.StringWriter
import org.apache.avro.Schema
import org.apache.avro.Schema.Type
import org.apache.avro.generic.GenericDatumWriter
import org.apache.avro.generic.GenericEnumSymbol
import org.apache.avro.generic.IndexedRecord... | matthewtt/chana | avpath/src/main/scala/chana/avro/ToJson.scala | Scala | apache-2.0 | 8,419 |
package probability
private[probability] object Utils {
def block1[A](x:A)(blk: A => Unit) = {blk(x); x}
def K[A](value:A)(tmp:A) = value
}
| urso/scala_mprob | src/main/scala/probability/Utils.scala | Scala | bsd-3-clause | 152 |
package mesosphere.util.state
import scala.language.implicitConversions
import org.apache.curator.framework.CuratorFramework
package object zk {
implicit def toRichCurator(client: CuratorFramework): RichCuratorFramework = new RichCuratorFramework(client)
}
| yp-engineering/marathon | src/main/scala/mesosphere/util/state/zk/package.scala | Scala | apache-2.0 | 261 |
package com.lunatic.mlx.cuisines.mllib.trainers
import com.lunatic.mlx.cuisines.mllib.FlowData
import com.lunatic.mlx.cuisines.{Configuration, printEvaluationMetrix}
import com.lunatic.mlx.removeHdfsFile
import org.apache.spark.mllib.classification.{NaiveBayes, NaiveBayesModel}
import org.apache.spark.{SparkConf, Spar... | tupol/sparx-mllib | src/main/scala/com/lunatic/mlx/cuisines/mllib/trainers/NaiveBayesTrainer.scala | Scala | apache-2.0 | 1,345 |
package models
import akka.actor._
import play.api.Play.current
import play.api.libs.concurrent.Akka
import play.api.libs.mailer._
object EMailActor {
val actor = Akka.system.actorOf(Props[EmailActor])
}
class EmailActor extends Actor {
def receive = {
case m: BidToppedMessage => sendEmail(m, views.html.emai... | aspectcg15/play-app | app/models/EmailActor.scala | Scala | gpl-3.0 | 1,111 |
package com.twitter.querulous.async
import java.sql.ResultSet
import com.twitter.util.Future
import com.twitter.querulous.query.{QueryClass, QueryFactory}
import com.twitter.querulous.evaluator.{Transaction, ParamsApplier}
class StandardAsyncQueryEvaluatorFactory(
databaseFactory: AsyncDatabaseFactory,
queryFact... | twitter/querulous | querulous-core/src/main/scala/com/twitter/querulous/async/StandardAsyncQueryEvaluator.scala | Scala | apache-2.0 | 2,784 |
package scala.pickling.pickler
import org.scalatest.FunSuite
/**
* Tests Either picklers
*/
class EitherPicklerTest extends FunSuite {
import scala.pickling._, Defaults._, static._, json._
test("pickle Left") {
val l: Left[Int, String] = Left(1)
val up = l.pickle.unpickle[Left[Int,String]]
assert(l ... | beni55/pickling | core/src/test/scala/scala/pickling/pickler/EitherPicklerTest.scala | Scala | bsd-3-clause | 871 |
import scala.collection.JavaConversions._
import tw.com.ehanlin.mde.MongoEmbedder
class DbActionIndexTest extends ReadmeExampleTest {def is = s2"""
test $test
"""
def test = {
val dsl =
"""
|@find <db=game coll=game query={ team : "zebra" } projection={ _id : 0 } index=[ { team : 1 } , { _id :... | eHanlin/mongodb-dbobject-embedder | src/test/scala/DbActionIndexTest.scala | Scala | mit | 802 |
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs
// License: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.lsp.core
import java.io.{ InputStream, OutputStream }
import akka.event.slf4j.SLF4JLogging
import org.ensime.lsp.api.commands._
import org.ensime.lsp.api.methods.Notifica... | fommil/ensime-server | lsp/src/main/scala/org/ensime/lsp/core/Connection.scala | Scala | gpl-3.0 | 5,181 |
package theia
import java.io.File
import st.sparse.sundry._
import com.sksamuel.scrimage._
import java.nio.file.Files
import st.sparse.sundry._
import scala.pickling._
import scala.pickling.binary._
import scala.util.Random
import theia.mitsuba.Render
trait TestingUtil extends Logging {
lazy val configureLogger = {... | emchristiansen/Theia | src/test/scala/theia/TestingUtil.scala | Scala | unlicense | 1,071 |
/*
* 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 ... | OpenChaiSpark/OCspark | tcpclient/src/main/scala/com/pointr/tcp/rpc/SolverServerIf.scala | Scala | apache-2.0 | 3,100 |
/*
* Copyright 2015 the original author or authors.
* @https://github.com/scouter-project/scouter
*
* 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/... | yuyupapa/OpenSource | scouter.server/src/scouter/server/core/cache/AlertCache.scala | Scala | apache-2.0 | 1,182 |
package com.tardis.common
import java.util.UUID
import com.temportalist.origin.api.common.lib.LogHelper
import com.temportalist.origin.api.common.utility.WorldHelper
import com.temportalist.origin.foundation.common.extended.ExtendedEntity
import com.temportalist.origin.foundation.common.network.PacketExtendedSync
imp... | TheTemportalist/Tardis | src/main/scala/com/tardis/common/PlayerTardis.scala | Scala | apache-2.0 | 2,489 |
package info.glennengstrand.perf3
import org.apache.kafka.clients.consumer.{KafkaConsumer, ConsumerRecord, ConsumerRecords}
import java.util.Properties
import scala.collection.JavaConversions._
import java.util.logging.{Logger, Level}
/** consumes the stream of messages from the feed topic in kafka and processes them... | gengstrand/clojure-news-feed | client/perf3/src/main/scala/info/glennengstrand/perf3/PerformanceMetricConsumer.scala | Scala | epl-1.0 | 1,788 |
/*
* 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 ... | haohui/flink | flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/batch/sql/SingleRowJoinTest.scala | Scala | apache-2.0 | 11,701 |
/*
* 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 ... | saltstar/spark | sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala | Scala | apache-2.0 | 42,782 |
package glasskey.spray.resource
import org.specs2.mutable.Specification
import spray.http.StatusCodes._
import spray.routing.HttpService
import spray.testkit.Specs2RouteTest
class HelloWorldResourceServiceSpec extends Specification with Specs2RouteTest with HttpService {
def actorRefFactory = system
val service =... | MonsantoCo/glass-key | samples/glass-key-spray-resource/src/test/scala/glasskey/spray/resource/HelloWorldResourceServiceSpec.scala | Scala | bsd-3-clause | 1,000 |
trait I[F[_], A]
def magic[F[_], A](in: I[F, A]): F[A] =
val deps: Vector[I[F, _]] = ???
val xx = deps.map(i => magic(i))
val y: Vector[F[Any]] = xx // error
???
| lampepfl/dotty | tests/neg/i12284.scala | Scala | apache-2.0 | 171 |
/**
* Copyright 2009 Google 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 to... | masterx2/noop | core/src/main/scala/noop/model/ABlock.scala | Scala | apache-2.0 | 1,368 |
/*
* 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.typedarray
impo... | scala-js/scala-js | test-suite/js/src/test/scala/org/scalajs/testsuite/typedarray/TypedArrayConversionTest.scala | Scala | apache-2.0 | 5,038 |
/**
* Determine if a string is a palindrome.
*/
object isPalindrome {
def apply(s: String): Boolean = {
val i:Int = 0
for (i <- 0 until s.length - i - 1) {
if (s.charAt(i) != s.charAt(s.length - i - 1)) {
return false
}
}
true
}
def main(args: Array[String]) {
print("isP... | grant/interview-questions | scala/src/isPalindrome.scala | Scala | mit | 491 |
class A {
var s = "
}
object Main { def main(args: Array[String]) { } }
| tobast/compil-petitscala | tests/syntax/bad/testfile-unclosed_string-1.scala | Scala | gpl-3.0 | 81 |
package com.sksamuel.elastic4s.searches
import com.sksamuel.elastic4s.IndexesAndTypes
import com.sksamuel.elastic4s.script.ScriptFieldDefinition
import com.sksamuel.elastic4s.searches.aggs.AbstractAggregation
import com.sksamuel.elastic4s.searches.collapse.CollapseDefinition
import com.sksamuel.elastic4s.searches.quer... | aroundus-inc/elastic4s | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/searches/SearchDefinition.scala | Scala | apache-2.0 | 14,114 |
package org.jetbrains.plugins.scala
package lang
package structureView
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef._
import org.jetbrains.plugins.scala.lang.psi.api.statements._
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.packaging._
import com.intellij.psi._
import org.jetbrains.plug... | consulo/consulo-scala | src/org/jetbrains/plugins/scala/lang/structureView/ScalaElementPresentation.scala | Scala | apache-2.0 | 3,567 |
object Test extends App {
42 match {
case Extractor(x) => println(x)
case x => throw new MatchError(x)
}
}
| lrytz/scala | test/files/run/macro-whitebox-extractor/Test_2.scala | Scala | apache-2.0 | 119 |
/*
* Copyright (c) 2014-2021 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... | monixio/monix | monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestInlineMacros.scala | Scala | apache-2.0 | 6,150 |
package com.sageserpent.plutonium.javaApi
import java.time.Instant
import java.util.function.{BiConsumer, Consumer}
import com.sageserpent.americium.Unbounded
import com.sageserpent.plutonium.{typeTagForClass, Change => ScalaChange}
object Change {
def forOneItem[Item](when: Unbounded[Instant],
... | sageserpent-open/open-plutonium | src/main/scala/com/sageserpent/plutonium/javaApi/Change.scala | Scala | mit | 2,364 |
package mesosphere.marathon
package core.task.termination.impl
import java.util.UUID
import akka.Done
import akka.actor.{PoisonPill, Terminated}
import akka.stream.scaladsl.Source
import akka.testkit.{TestActorRef, TestProbe}
import com.typesafe.scalalogging.StrictLogging
import mesosphere.AkkaUnitTest
import mesosph... | mesosphere/marathon | src/test/scala/mesosphere/marathon/core/task/termination/impl/KillServiceActorTest.scala | Scala | apache-2.0 | 19,147 |
package com.teambytes.inflatable.raft
import com.teambytes.inflatable.raft.protocol._
import akka.testkit.{ImplicitSender, TestProbe, TestFSMRef}
import org.scalatest.{OneInstancePerTest, BeforeAndAfterEach}
import concurrent.duration._
import scala.collection.immutable
import com.teambytes.inflatable.raft.example.Wor... | grahamar/inflatable | src/test/scala/com/teambytes/inflatable/raft/FollowerTest.scala | Scala | apache-2.0 | 2,597 |
package com.twitter.finagle.mux
import com.twitter.concurrent.AsyncQueue
import com.twitter.conversions.time._
import com.twitter.finagle.context.{Contexts, RemoteInfo}
import com.twitter.finagle.mux.lease.exp.{Lessor, nackOnExpiredLease}
import com.twitter.finagle.mux.transport.Message
import com.twitter.finagle.stat... | adriancole/finagle | finagle-mux/src/test/scala/com/twitter/finagle/mux/ServerTest.scala | Scala | apache-2.0 | 13,276 |
package filodb.core.memstore.ratelimit
import org.scalatest.funspec.AnyFunSpec
import org.scalatest.matchers.should.Matchers
import filodb.core.MachineMetricsData
import filodb.core.memstore.ratelimit.RocksDbCardinalityStore._
class RocksDbCardinalityStoreMemoryCapSpec extends AnyFunSpec with Matchers {
val ref ... | filodb/FiloDB | core/src/test/scala/filodb.core/memstore/ratelimit/RocksDbCardinalityStoreMemoryCapSpec.scala | Scala | apache-2.0 | 1,861 |
package de.tu_berlin.formic.datastructure.linear.client
import akka.actor.ActorSystem
import akka.testkit.TestKit
import de.tu_berlin.formic.common.json.FormicJsonProtocol
import de.tu_berlin.formic.datastructure.linear.LinearFormicJsonDataStructureProtocol
import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLi... | rbraeunlich/formic | linear/shared/src/test/scala/de/tu_berlin/formic/datastructure/linear/client/LinearClientDataStructureProviderSpec.scala | Scala | apache-2.0 | 2,370 |
package ohnosequences.loquat
import utils._, files._
import ohnosequences.statika._
import ohnosequences.awstools._, s3._, ec2._, sns._, regions._
import com.typesafe.scalalogging.LazyLogging
import scala.concurrent._, duration._
import scala.util.Try
case class LogUploaderBundle(
val config: AnyLoquatConfig,
val... | ohnosequences/loquat | src/main/scala/ohnosequences/loquat/logger.scala | Scala | agpl-3.0 | 1,718 |
/*
* Copyright 2009-2010 LinkedIn, 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 ... | linkedin/norbert | cluster/src/test/scala/com/linkedin/norbert/cluster/common/ClusterNotificationManagerComponentSpec.scala | Scala | apache-2.0 | 8,344 |
/*
* 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 ... | BryanCutler/spark | sql/core/src/main/scala/org/apache/spark/sql/Column.scala | Scala | apache-2.0 | 44,332 |
package com.twitter.finagle.service
import com.twitter.conversions.time._
import com.twitter.finagle.stats.{NullStatsReceiver, InMemoryStatsReceiver}
import com.twitter.finagle.{Status, MockTimer, ServiceFactory, Service}
import com.twitter.util._
import java.util.concurrent.TimeUnit
import org.junit.runner.RunWith
im... | cogitate/twitter-finagle-uuid | finagle-core/src/test/scala/com/twitter/finagle/service/FailureAccrualFactoryTest.scala | Scala | apache-2.0 | 10,312 |
package chrome.contextMenus.bindings
import chrome.events.bindings.Event
import chrome.tabs.bindings.Tab
import scala.scalajs.js
import scala.scalajs.js.annotation.{JSName, ScalaJSDefined}
import scala.scalajs.js.|
object MenuContexts {
val ALL = "all"
val PAGE = "page"
val FRAME = "frame"
val SELECTION = "s... | antonkulaga/bio-nlp | chrome-bio/src/main/scala/chrome/contextMenus/bindings/ContextMenus.scala | Scala | mpl-2.0 | 3,157 |
package com.sksamuel.avro4s.record.decoder
import com.sksamuel.avro4s._
import org.apache.avro.generic.GenericData
import org.apache.avro.{Conversions, LogicalTypes, SchemaBuilder}
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers
case class WithBigDecimal(decimal: BigDecimal)
ca... | sksamuel/avro4s | avro4s-core/src/test/scala/com/sksamuel/avro4s/record/decoder/BigDecimalDecoderTest.scala | Scala | apache-2.0 | 3,093 |
package pairs
import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}
//
// Various approaches to choosing a distinguished record within groups,
// based on various approaches from PairRDDFunctions
//
object ChooseWithinGroups {
case class Cust(id: Integer, name: String, sales: Double, dis... | chocolateBlack/LearningSpark | src/main/scala/pairs/ChooseWithinGroups.scala | Scala | mit | 2,292 |
/**
* Created on: Dec 7, 2013
*/
package com.iteamsolutions.angular.services
package atom
import scala.concurrent.{
ExecutionContext,
Future
}
import scalaz.{
Failure => _,
Success => _,
_
}
import scalaz.contrib.std._
import akka.actor.ActorSystem
import akka.pattern._
import akka.util._
import com.iteam... | osxhacker/angular-codegen | src/main/scala/com/iteamsolutions/angular/services/atom/FeedOperations.scala | Scala | bsd-2-clause | 926 |
package plugin
import app.Context
import scala.collection.mutable.ListBuffer
import plugin.PluginSystem.{Action, GlobalMenu, RepositoryMenu}
import javax.servlet.http.{HttpServletResponse, HttpServletRequest}
// TODO This is a sample implementation for Scala based plug-ins.
class ScalaPlugin(val id: String, val versi... | campolake/gitbucketV2.1 | src/main/scala/plugin/ScalaPlugin.scala | Scala | apache-2.0 | 1,674 |
package com.imaifactory.sparkplayground
/**
* Created by yimai on 2016/05/11.
*/
object Iterate {
def main(args: Array[String]): Unit = {
println("test")
val it2 = Iterator(1,2,3,4)
}
}
| imaifactory/Spark-Playground | src/main/scala/com/imaifactory/sparkplayground/Iterate.scala | Scala | mit | 203 |
package org.kduda.greedy.spark.reader.mongo
import java.io.{File, IOException}
import java.util
import com.mongodb.gridfs.GridFSDBFile
import org.apache.spark.sql.{Dataset, Row, DataFrame}
import org.kduda.greedy.service.storage.FileStorageService
import org.kduda.greedy.spark.reader.csv.SparkCsvReader
import org.slf... | DudaKamil/greedy | src/main/scala/org/kduda/greedy/spark/reader/mongo/SparkMongo.scala | Scala | agpl-3.0 | 2,048 |
package Client
import scala.collection.mutable
object ProfileMap {
val obj = mutable.HashMap[Int, Boolean]()
}
| Nirespire/SecureFacebookAPI | src/main/scala/Client/ProfileMap.scala | Scala | mit | 115 |
package controllers
import play.api._
import play.api.libs.json.Json
import play.api.mvc._
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
import services.TopicService
class Api extends Controller {
def check(url: String) = Action.async { req =>
req.getQueryString("res... | dohzya/desinthoax | app/controllers/Api.scala | Scala | agpl-3.0 | 660 |
object Test {
import Macro.*
def main(args: Array[String]): Unit = {
println(ff"Hello World ${1}!")
}
} | dotty-staging/dotty | tests/run-macros/i5119/Main_2.scala | Scala | apache-2.0 | 115 |
/*
* 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 ... | shaneknapp/spark | sql/core/src/test/scala/org/apache/spark/sql/StatisticsCollectionSuite.scala | Scala | apache-2.0 | 29,219 |
package mesosphere.marathon.state
import java.io.{ ByteArrayInputStream, ByteArrayOutputStream, ObjectInputStream, ObjectOutputStream }
import javax.inject.Inject
import mesosphere.marathon.Protos.StorageVersion
import mesosphere.marathon.state.PathId._
import mesosphere.marathon.state.StorageVersions._
import mesosp... | tnachen/marathon | src/main/scala/mesosphere/marathon/state/Migration.scala | Scala | apache-2.0 | 6,438 |
package plantae.citrus.mqtt.actors.topic
import akka.actor._
import plantae.citrus.mqtt.actors.session.PublishMessage
import scodec.bits.ByteVector
import scala.collection.mutable.Map
import scala.util.Random
case class TopicSubscribe(session: ActorRef, qos: Short, reply: Boolean = true)
case class TopicSubscribed(... | sureddy/mqttd | src/main/scala-2.11/plantae/citrus/mqtt/actors/topic/Ntopic.scala | Scala | mit | 6,969 |
package im.actor.server.api.rpc.service.webhooks
import akka.actor.ActorSystem
import akka.http.scaladsl.util.FastFuture
import akka.util.Timeout
import im.actor.api.rpc.PeerHelpers._
import im.actor.api.rpc._
import im.actor.api.rpc.integrations.{ IntegrationsService, ResponseIntegrationToken }
import im.actor.api.rp... | EaglesoftZJ/actor-platform | actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/webhooks/IntegrationsServiceImpl.scala | Scala | agpl-3.0 | 2,680 |
// scalac: -opt:l:inline -opt-inline-from:**
class C {
def t(a: A): AnyRef = {
// a.a is inlined, resulting in a.b, which has return type B
var foo: AnyRef = if (hashCode == 0) a.a else this
if (foo == null)
foo = this
// at the merge point, the stack map frame calculation needs the LUB of (B, C... | lrytz/scala | test/files/run/inline-stack-map-frames/Test_2.scala | Scala | apache-2.0 | 459 |
package devnull.storage
import java.util.UUID
import doobie.postgres.pgtypes._
import doobie.hi
import doobie.imports._
class PaperFeedbackRepository {
val uuidType = UuidType
object Queries {
def insert(fb: PaperFeedback): Update0 = {
sql"""
INSERT INTO paper_feedback (
created,
... | javaBin/devnull | src/main/scala/devnull/storage/PaperFeedbackRepository.scala | Scala | apache-2.0 | 1,987 |
/**
* Copyright 2015 Thomson Reuters
*
* 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... | TRnonodename/CM-Well | server/cmwell-stortill/src/main/scala/cmwell/stortill/Operations.scala | Scala | apache-2.0 | 26,033 |
package sharry.store.doobie
import java.time.format.DateTimeFormatter
import java.time.{Instant, LocalDate}
import sharry.common._
import sharry.common.syntax.all._
import doobie._
import doobie.implicits.legacy.instant._
import doobie.util.log.Success
import io.circe.{Decoder, Encoder}
import scodec.bits.ByteVector... | eikek/sharry | modules/store/src/main/scala/sharry/store/doobie/DoobieMeta.scala | Scala | gpl-3.0 | 2,221 |
/*
* Copyright 2013-2015 Websudos, Limited.
*
* 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 of c... | levinson/phantom | phantom-dsl/src/test/scala/com/websudos/phantom/builder/query/db/specialized/EnumColumnTest.scala | Scala | bsd-2-clause | 4,290 |
/*
Copyright 2017-2020 Erik Erlandson
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | erikerlandson/coulomb | coulomb/shared/src/main/scala/coulomb/infra/unitstring.scala | Scala | apache-2.0 | 3,984 |
package sexamples.helloworld;
import se.sics.kompics.sl._
object Main {
def main(args: Array[String]): Unit = {
Kompics.createAndStart(classOf[HelloComponent]);
Kompics.waitForTermination();
}
}
| kompics/kompics-scala | docs/src/main/scala/sexamples/helloworld/Main.scala | Scala | gpl-2.0 | 209 |
/*
* 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 ... | tysonnorris/openwhisk | tests/src/test/scala/whisk/core/limits/MaxActionDurationTests.scala | Scala | apache-2.0 | 3,089 |
package com.twitter.zipkin.storage.mongodb
import java.nio.ByteBuffer
import java.util.Date
import java.util.concurrent.TimeUnit
import java.util.concurrent.atomic.AtomicBoolean
import com.mongodb.casbah.Imports._
import com.mongodb.casbah.commons.conversions.scala._
import com.twitter.finagle.jsr166y.ForkJoinPool
im... | travisbrown/zipkin | zipkin-mongodb/src/main/scala/com/twitter/zipkin/storage/mongodb/MongoDBSpanStore.scala | Scala | apache-2.0 | 14,389 |
package controllers
import javax.inject.Inject
import akka.actor._
import akka.stream.Materializer
import play.api.mvc._
import play.api.libs.streams._
import autowire._
import upickle.default._
import shared.api.{Api, WSRequest, WSResponse}
import scala.concurrent.ExecutionContext.Implicits.global
class WebSocket... | OmarCastro/ShellHive-scala | server/app/controllers/WebsocketCtrl.scala | Scala | mit | 1,256 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2007-2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\\___/_/... | SethTisue/scala-swing | src/main/scala/scala/swing/event/SelectionEvent.scala | Scala | bsd-3-clause | 1,236 |
// scalac -deprecation Misc.scala
import scala.annotation.unchecked._
import java.awt.Font
import java.awt.Font._
object Misc {
@deprecated(message = "Use factorial(n: BigInt) instead")
def factorial(n: Int): Int = if (n <= 0) 1 else n * factorial(n - 1)
// Recursive call causes a deprecation warning
def d... | yeahnoob/scala-impatient-2e-code | src/ch15/sec07/Misc.scala | Scala | gpl-3.0 | 652 |
package hclu.hreg.api
import java.util.UUID
import javax.servlet.http.HttpServletRequest
import hclu.hreg.BaseServletSpec
import hclu.hreg.dao.{ContactDao, UserDao}
import hclu.hreg.domain.Contact
import hclu.hreg.service.contact.ContactService
import hclu.hreg.service.email.DummyEmailService
import hclu.hreg.service... | tsechov/hclu-registry | backend/src/test/scala/hclu/hreg/api/ContactsServletSpec.scala | Scala | apache-2.0 | 3,715 |
/*
* Copyright 2011 Hui Wen Han, 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... | huiwenhan/PrefStore | src/main/scala/me/huiwen/prefz/Page.scala | Scala | apache-2.0 | 671 |
package model.dtos
case class OrganizationStatsGrouped( val orderId:Int, val category:String, stats:List[OrganizationStats])
| scify/DemocracIT-Web | app/model/dtos/OrganizationStatsGrouped.scala | Scala | apache-2.0 | 126 |
/*
* 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 ... | shaneknapp/spark | sql/catalyst/src/test/scala/org/apache/spark/sql/util/ArrowUtilsSuite.scala | Scala | apache-2.0 | 3,397 |
//: ----------------------------------------------------------------------------
//: Copyright (C) 2015 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... | neigor/funnel | chemist-aws/src/main/scala/DefaultClassifier.scala | Scala | apache-2.0 | 2,221 |
package no.nr.edvard.osiris.model
import no.nr.edvard.osiris.util.multireduce.Reducer
import util.Random
import collection.{immutable, mutable}
class MethodCorpus(
private val store: Set[JavaMethod] = Set[JavaMethod]()
) extends Traversable[JavaMethod] {
def +(jm: JavaMethod) = new MethodCorpus(store + jm)
def ... | edwkar/edwbsc | projects/Osiris/src/main/scala/no/nr/edvard/osiris/model/MethodCorpus.scala | Scala | gpl-2.0 | 2,184 |
/*
* Copyright (C) 2011 Romain Reuillon
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This progra... | openmole/openmole | openmole/third-parties/org.openmole.tool.lock/src/main/scala/org/openmole/tool/lock/LockRepository.scala | Scala | agpl-3.0 | 1,866 |
package com.atomist.rug.test.gherkin.handler.event
import com.atomist.source.StringFileArtifact
object EventHandlerTestTargets {
val Feature1 =
"""
|Feature: Australian political history
| This is a test
| to demonstrate that the Gherkin DSL
| is a good fit for Rug BDD testing
|
... | atomist/rug | src/test/scala/com/atomist/rug/test/gherkin/handler/event/EventHandlerTestTargets.scala | Scala | gpl-3.0 | 954 |
/*
* Code Pulse: A real-time code coverage testing tool. For more information
* see http://code-pulse.com
*
* Copyright (C) 2014 Applied Visions - http://securedecisions.avi.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
... | secdec/codepulse | codepulse/src/main/scala/com/secdec/codepulse/data/MethodSignatureParser.scala | Scala | apache-2.0 | 3,679 |
package uk.gov.gds.ier.transaction.overseas.dateLeftSpecial
import play.api.data.Forms._
import uk.gov.gds.ier.validation.{ErrorTransformForm, ErrorMessages, FormKeys}
import uk.gov.gds.ier.model.{DateLeft}
import uk.gov.gds.ier.validation.constraints.overseas.DateLeftSpecialConstraints
import uk.gov.gds.ier.model.Las... | alphagov/ier-frontend | app/uk/gov/gds/ier/transaction/overseas/dateLeftSpecial/DateLeftSpecialForms.scala | Scala | mit | 1,696 |
/*
* 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-tail/shared/src/main/scala/monix/tail/batches/ArrayBatch.scala | Scala | apache-2.0 | 2,321 |
/*
* Derived from https://github.com/spray/spray/blob/v1.1-M7/spray-http/src/main/scala/spray/http/parser/AuthorizationHeader.scala
*
* Copyright (C) 2011-2012 spray.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... | ChristopherDavenport/http4s | core/src/main/scala/org/http4s/parser/AuthorizationHeader.scala | Scala | apache-2.0 | 2,608 |
package zzb.srvdemo.entites
import org.squeryl.KeyedEntity
import java.sql.Timestamp
import spray.json._
/**
* Created with IntelliJ IDEA.
* User: Simon Xiao
* Date: 13-8-20
* Time: 下午4:58
* Copyright baoxian.com 2012~2020
*/
class BaseEntity extends KeyedEntity[Long] {
val id:Long = 0
var lastModified = ... | xiefeifeihu/zzb | examples/srvbox-demoService/src/main/scala/zzb/srvdemo/entites/Entites.scala | Scala | mit | 1,581 |
/**
* Copyright 2009 Google 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 to... | SeaUrchinBot/noop | core/src/main/scala/noop/model/ConditionalOrExpression.scala | Scala | apache-2.0 | 924 |
// Copyright 2017 EPFL DATA Lab (data.epfl.ch)
//
// 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... | epfldata/squid | src/test/scala/squid/feature/Antiquotation.scala | Scala | apache-2.0 | 4,418 |
package com.atomist.project.common.template
object MustacheSamples {
val First =
"""Hello {{name}}
|You have just won {{value}} dollars!
|{{#in_ca}}
|Well, {{taxed_value}} dollars, after taxes.{{/in_ca}}""".stripMargin
val FirstContext = MergeContext(Map(
"name" -> "Chris",
"value" ... | atomist/rug | src/test/scala/com/atomist/project/common/template/MustacheSamples.scala | Scala | gpl-3.0 | 585 |
/*
* Copyright 2015 eleflow.com.br.
*
* 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 ... | eleflow/uberdata | iuberdata_core/src/main/scala/com/cloudera/sparkts/models/UberArimaModel.scala | Scala | apache-2.0 | 1,632 |
package com.omega.repository
import java.util.{ List => JList }
import com.omega.domain.Book
import com.omega.util.BeanLifeCycle
import javax.persistence.EntityManager
import javax.persistence.PersistenceContext
class BookDaoJpaImpl extends BookDao with BeanLifeCycle {
@PersistenceContext(unitName = "Omega... | milind-chawla/Omega | src/main/scala/com/omega/repository/BookDaoJpaImpl.scala | Scala | mit | 763 |
package scala.quoted
package runtime.impl.printers
import scala.annotation.switch
/** Printer for fully elaborated representation of the source code */
object SourceCode {
def showTree(using Quotes)(tree: quotes.reflect.Tree)(syntaxHighlight: SyntaxHighlight, fullNames: Boolean): String =
new SourceCodePrinter... | dotty-staging/dotty | compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala | Scala | apache-2.0 | 52,087 |
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.