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 |
|---|---|---|---|---|---|
import scala.tools.partest.ParserTest
object Test extends ParserTest {
override def code = """
trait X {
// error: in XML literal: name expected, but char '!' cannot start a name
def x = <![CDATA[hi & bye]]> <![CDATA[red & black]]>
}
trait Y {
def y = <a><b/>start<![CDATA[hi & bye]]><c/>world<d/... | felixmulder/scala | test/files/run/t3368.scala | Scala | bsd-3-clause | 872 |
package org.netology.spray.rest.oauth2.utils
import spray.routing._
import spray.http._
import java.net.URLEncoder
trait CustomRejectionHandler extends HttpService {
implicit val myRejectionHandler = RejectionHandler {
case SecurePageRejection(uri) :: _ => redirectWithUri(uri)
//case _ => complete(StatusCod... | hasanozgan/spray-oauth | samples/inmemory-webapp/src/main/scala/com/hasanozgan/demo/inmemory/oauth2/utils/CustomRejectionHandler.scala | Scala | apache-2.0 | 591 |
/*******************************************************************************
Copyright (c) 2013, S-Core, KAIST.
All rights reserved.
Use is subject to license terms.
This distribution may include materials developed by third parties.
***************************************************************... | daejunpark/jsaf | src/kr/ac/kaist/jsaf/analysis/typing/models/DOMCore/DOMError.scala | Scala | bsd-3-clause | 2,818 |
/**
* Copyright 2014-2015 Martin Cooper
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ... | martincooper/scala-datatable | src/main/scala/com/github/martincooper/datatable/DataColumnCollection.scala | Scala | apache-2.0 | 7,560 |
/**
* @author Yuuto
*/
package yuuto.inventorytools.client.gui.button
import net.minecraft.client.gui.GuiButton
import net.minecraft.item.ItemStack
import net.minecraft.client.gui.FontRenderer
import net.minecraft.client.renderer.entity.RenderItem
import net.minecraft.client.Minecraft
import org.lwjgl.opengl.GL11
im... | AnimeniacYuuto/InventoryTools | src/main/scala/yuuto/inventorytools/client/gui/button/GuiButtonItem.scala | Scala | gpl-3.0 | 2,593 |
/*
* 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 ... | ueshin/apache-spark | external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaSourceProvider.scala | Scala | apache-2.0 | 33,255 |
/*
* Copyright 2015 Dennis Vriend
*
* 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... | dnvriend/reactive-programming | src/test/scala/com/test/week1/MonadTest.scala | Scala | apache-2.0 | 4,024 |
package com.tierline.scala.activemodel.multitenant.shared
import com.tierline.scala.activemodel.ActiveModelSchema
case class SharedActiveModelSchema() extends ActiveModelSchema {
}
| tierline/scala-activemodel | src/test/scala/com/tierline/scala/activemodel/multitenant/shared/SharedActiveModelSchema.scala | Scala | mit | 185 |
/***********************************************************************
* Copyright (c) 2013-2019 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | elahrvivaz/geomesa | geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/audit/AccumuloEventWriter.scala | Scala | apache-2.0 | 3,054 |
/*
* Copyright (c) 2015 Robert Conrad - All Rights Reserved.
* Unauthorized copying of this file, via any medium is strictly prohibited.
* This file is proprietary and confidential.
* Last modified by rconrad, 1/4/15 4:11 PM
*/
package base.entity.service
import base.common.service.{ Services, ServicesBootstrap ... | robconrad/base-api | project-entity/src/main/scala/base/entity/service/EntityServicesBootstrap.scala | Scala | mit | 1,800 |
package com.lucidchart.open
/**
* Created by thayne on 2/2/15.
*/
package object xtract {
/**
* Alias for the root [[XPath]]
*/
val __ = XPath
}
| lucidsoftware/xtract | xtract-core/src/main/scala/com/lucidchart/open/xtract/package.scala | Scala | apache-2.0 | 159 |
object Test {
class E[@specialized(Int) A](var f: A => Boolean) {
def this() = this(null)
println("hello?")
if (f == null) f = { _ => false }
}
def main(args: Array[String]) {
new E[Int]
println("goodbye")
println(runtime.BoxesRunTime.integerBoxCount)
}
}
| felixmulder/scala | test/files/specialized/spec-constr.scala | Scala | bsd-3-clause | 291 |
/*
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 to in writing, software
distr... | MansurAshraf/chill | chill-scala/src/test/scala/com/twitter/chill/config/ReflectingInstantiatorTest.scala | Scala | apache-2.0 | 3,781 |
/**
* Copyright (C) 2013 Orbeon, Inc.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) any later version.
*
* This program i... | evlist/orbeon-forms | src/main/scala/org/orbeon/oxf/fr/FormRunnerSummary.scala | Scala | lgpl-2.1 | 1,167 |
package com.karasiq.shadowcloud.crypto.libsodium.internal
import org.abstractj.kalium.NaCl
import scala.util.control.{Exception => ExcControl}
private[libsodium] object LSUtils {
type LSRandom = org.abstractj.kalium.crypto.Random
private[this] lazy val sodiumInstance = ExcControl.allCatch.opt {
val sodium ... | Karasiq/shadowcloud | crypto/libsodium/src/main/scala/com/karasiq/shadowcloud/crypto/libsodium/internal/LSUtils.scala | Scala | apache-2.0 | 649 |
/*
* 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 ... | foryou2030/incubator-carbondata | integration/spark/src/main/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtil.scala | Scala | apache-2.0 | 34,992 |
package hello
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
@SpringBootApplication
class Application {
}
object Application extends App {
SpringApplication.run(classOf[Application], args:_*)
}
| BernhardWenzel/spring-scala-examples | gs-accessing-data-rest/complete-scala/src/main/scala/hello/Application.scala | Scala | apache-2.0 | 269 |
package sri.mobile.components
import sri.core.{React, ReactNode}
import sri.mobile._
import scala.scalajs.js
case class TouchableNativeFeedback(key: U[String] = undefined,
style: U[js.Any] = undefined,
ref: U[TouchableNativeFeedbackM => _] = unde... | chandu0101/sri | mobile/src/main/scala/sri/mobile/components/TouchableNativeFeedback.scala | Scala | apache-2.0 | 2,263 |
/***********************************************************************
* Copyright (c) 2013-2020 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | aheyne/geomesa | geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/stats/CountingInputStream.scala | Scala | apache-2.0 | 2,230 |
package com.scalegun.aws.autoscaling
| scalegun/aws-utils | src/main/scala/com/scalegun/aws/autoscaling/package.scala | Scala | mit | 39 |
package net.tomasherman.specus.common.api.net.session
/**
* This file is part of Specus.
*
* Specus 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)... | tomasherman/specus | common_api/src/main/scala/net/session/SessionID.scala | Scala | gpl-3.0 | 936 |
// Copyright 2014 Commonwealth Bank of Australia
//
// 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 ap... | shyam334/ebenezer | compat/src/test/scala/au/com/cba/omnia/ebenezer/compat/CompatibilitySpec.scala | Scala | apache-2.0 | 6,323 |
/*
* 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 ... | ashokblend/incubator-carbondata | integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala | Scala | apache-2.0 | 36,394 |
package provingground.library
import provingground._
import HoTT._
import induction._
object iff$refl {
lazy val value = lambda("'g_269551690" :: Prop)(
"_" :: ("iff" :: FuncTyp(Prop, FuncTyp(Prop, Prop)))(
"'g_269551690" :: Prop)("'g_269551690" :: Prop))
}
| siddhartha-gadgil/ProvingGround | leanlib/src/main/scala/provingground/library/definitions/iff.refl.scala | Scala | mit | 270 |
/*
* 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/amls-frontend | test/models/tcsp/ProvidedServicesSpec.scala | Scala | apache-2.0 | 6,977 |
package adventofcode2016
import org.scalatest.FunSuite
import org.scalatest.Matchers._
class Day01Suite extends FunSuite {
import Day01._
import Direction._
import TurnDirection._
test("parseDirection, right") {
assert(parseDirection("R2") == Right)
}
test("parseDirection, left") {
assert(parse... | rhietala/adventofcode2016 | src/test/scala/day01/Day01Suite.scala | Scala | mit | 1,426 |
package com.twitter.finagle.builder
import com.twitter.util
import com.twitter.concurrent.AsyncSemaphore
import com.twitter.finagle.{Server => FinagleServer, _}
import com.twitter.finagle.filter.{MaskCancelFilter, RequestSemaphoreFilter, ServerAdmissionControl}
import com.twitter.finagle.netty3.Netty3Listener
import c... | BuoyantIO/finagle | finagle-core/src/main/scala/com/twitter/finagle/builder/ServerBuilder.scala | Scala | apache-2.0 | 26,959 |
/**
* Copyright (C) 2017 Orbeon, Inc.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) any later version.
*
* This p... | brunobuzzi/orbeon-forms | xforms/shared/src/test/scala/org/orbeon/xforms/XFormsIdTest.scala | Scala | lgpl-2.1 | 1,476 |
package nest.sparkle.store.cassandra
import scala.collection.JavaConverters._
import scala.concurrent.{Future, ExecutionContext}
import scala.language.existentials
import scala.util.{Try, Failure, Success}
import com.datastax.driver.core.{Session, PreparedStatement}
import com.typesafe.config.Config
import spray.cac... | mighdoll/sparkle | store/src/main/scala/nest/sparkle/store/cassandra/EntityCatalog.scala | Scala | apache-2.0 | 4,331 |
package org.jetbrains.plugins.scala
package lang
package autoImport
import java.io.File
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.io.FileUtil
import com.intellij.openapi.util.text.StringUtil
import com.intellij.openapi.vfs.{CharsetToolkit, LocalFileSystem}
import com.intellij.psi.Sm... | jastice/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/lang/autoImport/AutoImportTestBase.scala | Scala | apache-2.0 | 3,773 |
/***********************************************************************
* Copyright (c) 2013-2019 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | elahrvivaz/geomesa | geomesa-lambda/geomesa-lambda-datastore/src/test/scala/org/locationtech/geomesa/lambda/LambdaTestRunnerTest.scala | Scala | apache-2.0 | 3,186 |
package threesixty.visualizer.util
import threesixty.visualizer.Renderable
import scala.xml.Elem
/**
* @author Thomas Engel, Thomas Weber
*/
object Grid {
implicit def toXML(grid: Grid): Elem = grid.toSVG
}
case class Grid(
x: Int,
y: Int,
width: Int,
height: Int,
xPositions: Seq[Int],
... | elordin/threesixty | src/main/scala/threesixty/visualizer/util/Grid.scala | Scala | mit | 1,910 |
package com.scalaAsm.x86
package Instructions
package General
// Description: Input from Port to String
// Category: general/inoutstring
trait INSD extends InstructionDefinition {
val mnemonic = "INSD"
}
object INSD extends ZeroOperands[INSD] with INSDImpl
trait INSDImpl extends INSD {
implicit object _0 extend... | bdwashbu/scala-x86-inst | src/main/scala/com/scalaAsm/x86/Instructions/General/INSD.scala | Scala | apache-2.0 | 414 |
package com.twitter.finagle.tracing
import com.twitter.conversions.DurationOps._
import com.twitter.finagle.builder.{ClientBuilder, ServerBuilder}
import com.twitter.finagle.client.utils.StringClient
import com.twitter.finagle.server.utils.StringServer
import com.twitter.finagle.{param => fparam, _}
import com.twitter... | luciferous/finagle | finagle-core/src/test/scala/com/twitter/finagle/tracing/DefaultTracingTest.scala | Scala | apache-2.0 | 5,618 |
package util
import scala.util.matching.Regex
import scala.util.control.Exception._
import slick.jdbc.JdbcBackend
import servlet.Database
import javax.servlet.http.{HttpSession, HttpServletRequest}
/**
* Provides some usable implicit conversions.
*/
object Implicits {
// Convert to slick session.
implicit def ... | mqshen/gitbucketTest | src/main/scala/util/Implicits.scala | Scala | apache-2.0 | 2,293 |
// Find the last but one element of a list.
// Example:
// scala> penultimate(List(1, 1, 2, 3, 5, 8))
// res0: Int = 5
object P02 {
def penultimate[A](items: List[A]): A = items match {
case h :: _ :: Nil => h
case _ :: tail => penultimate(tail)
case _ => throw new NoSuchElementExcepti... | pilu/scala99 | src/main/scala/P02.scala | Scala | mit | 330 |
package org.psliwa.idea.composerJson.json
import scala.language.implicitConversions
object SchemaConversions {
implicit def stringProp(s: String): (String, Property) = (s, Property(SString(AnyFormat), required = false, ""))
implicit def schemaToProperty(s: Schema): Property = Property(s, required = false, "")
}
| psliwa/idea-composer-plugin | src/test/scala/org/psliwa/idea/composerJson/json/SchemaConversions.scala | Scala | mit | 319 |
package chrome.system.network
import chrome.ChromeAPI
import chrome.permissions.APIPermission
import utils.ErrorHandling.lastErrorOrValue
import scala.concurrent.{Future, Promise}
import scala.scalajs.js
object Network extends ChromeAPI {
val requiredPermissions: Set[APIPermission] = Set(APIPermission.System.Netw... | amsayk/scala-js-chrome | bindings/src/main/scala/chrome/system/network/Network.scala | Scala | mit | 837 |
package com.bot4s.telegram.methods
import com.bot4s.telegram.models.ChatId
/**
* Use this method to get the number of members in a chat. Returns Int on success.
*
* @param chatId Integer or String Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)... | mukel/telegrambot4s | core/src/com/bot4s/telegram/methods/GetChatMembersCount.scala | Scala | apache-2.0 | 397 |
package lib
import org.specs2.mutable._
import java.util.zip.ZipOutputStream
import java.io.FileOutputStream
import java.io.File
import java.io.ByteArrayOutputStream
import java.util.zip.ZipEntry
import java.util.zip.ZipInputStream
import java.io.ByteArrayInputStream
class UnzipperSpec extends Specification {
"Unz... | hema-tournament-manager/htm | play/htm-viewer-play/test/lib/UnzipperSpec.scala | Scala | apache-2.0 | 1,347 |
/*
* Copyright 2017 TWO SIGMA OPEN SOURCE, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | jpallas/beakerx | kernel/scala/src/main/scala/com/twosigma/beakerx/scala/chart/xychart/plotitem/XYStacker.scala | Scala | apache-2.0 | 967 |
package com.cloudray.scalapress.payments
import javax.servlet.http.HttpServletRequest
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import scala.collection.JavaConverters._
import com.cloudray.scalapress.framework.{Logging, ScalapressContext, ComponentCla... | vidyacraghav/scalapress | src/main/scala/com/cloudray/scalapress/payments/PaymentCallbackService.scala | Scala | apache-2.0 | 1,883 |
/*
* Copyright (C) 2016 Christopher Batey and Dogan Narinc
*
* 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... | mikefero/cpp-driver | gtests/src/integration/scassandra/server/server/src/test/scala/org/scassandra/server/actors/BatchHandlerTest.scala | Scala | apache-2.0 | 5,068 |
(* t-compile: *)
(* t-run: pass *)
fun f x = 2 * x + 1
fun g x = x
val x = (g f) 1
val _ = if (x = 3) then print(g "pass") else print(g "fail")
| j-c-w/mlc | test/lower_tir/simple_funs.scala | Scala | gpl-3.0 | 147 |
package com.temportalist.morphadditions.common
import java.util
import com.temportalist.morphadditions.api.AbilityAction
import com.temportalist.morphadditions.common.init.Abilities
import morph.api.Ability
import net.minecraft.entity.EntityLivingBase
/**
*
*
* @author TheTemportalist
*/
object ApiHelper {
def... | TheTemportalist/MorphAdditions | src/main/scala/com/temportalist/morphadditions/common/ApiHelper.scala | Scala | apache-2.0 | 2,400 |
package tshrdlu.twitter
import twitter4j.Status
import nak.cluster._
import nak.util.CollectionUtil._
import tshrdlu.util.SimpleTokenizer
import tshrdlu.util.English._
/**
* This is a wrapper class for k-means that will compute
* clusters for a given sequence of Status instances and
* return the sequence of cluste... | utcompling/tshrdlu | src/main/scala/tshrdlu/twitter/Clustering.scala | Scala | apache-2.0 | 2,482 |
/*
* 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 ... | aljoscha/flink | flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/IntervalJoinITCase.scala | Scala | apache-2.0 | 33,050 |
package com.nischal.exceptions
/**
* Created by nbasnet on 6/4/17.
*/
class ModelNotFound(message: String) extends Exception(message)
{
}
object ModelNotFound
{
def apply(table: String, primaryKey: String, primaryId: String): ModelNotFound =
{
new ModelNotFound(s"No record found for $table with $primaryK... | nischalbasnet/play-scalikejdbc | app/com/nischal/exceptions/ModelNotFound.scala | Scala | apache-2.0 | 344 |
package org.jetbrains.plugins.scala.lang.completion.statistician
import com.intellij.codeInsight.completion.{CompletionLocation, CompletionStatistician}
import com.intellij.codeInsight.lookup.{LookupItem, LookupElement}
import com.intellij.psi.{PsiMember, PsiNamedElement}
import com.intellij.psi.statistics.StatisticsI... | igrocki/intellij-scala | src/org/jetbrains/plugins/scala/lang/completion/statistician/ScalaCompletionStatistician.scala | Scala | apache-2.0 | 1,630 |
package net.sf.latexdraw.instruments
import java.awt.geom.Point2D
import java.awt.geom.Rectangle2D
import java.awt.BasicStroke
import java.awt.Color
import java.awt.Cursor
import java.awt.Graphics2D
import scala.collection.mutable.ListBuffer
import org.malai.instrument.Link
import org.malai.instrument.Instrument
impor... | arnobl/latexdraw-mutants | GUImutants/mutant9/net.sf.latexdraw.mutant9/src/main/net/sf/latexdraw/instruments/Border.scala | Scala | gpl-2.0 | 24,163 |
/*
* Copyright 2014-2022 Netflix, 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... | Netflix/atlas | atlas-jmh/src/main/scala/com/netflix/atlas/core/index/QueryIndexMatching.scala | Scala | apache-2.0 | 4,984 |
package info.mukel.telegrambot4s.methods
/** Base type for multipart API requests (for file uploads)
*
* @tparam R Expected result type.
*
* Request will be serialized as multipart/form-data
*/
trait ApiRequestMultipart[R] extends ApiRequest[R] with Product
| hugemane/telegrambot4s | src/main/scala/info/mukel/telegrambot4s/methods/ApiRequestMultipart.scala | Scala | apache-2.0 | 269 |
package nak.inference
import breeze.linalg._
import breeze.numerics._
import breeze.stats.distributions.{Dirichlet, Bernoulli, Gaussian}
/**
*
* @author dlwh
*/
class ExpectationPropagation[F,Q](project: (Q,F)=>(Q,Double), criterion: Double = 1E-4)(implicit qFactor: Q <:<Factor[Q]) {
case class State(f_~ : Inde... | seanlgoldberg/nak | src/main/scala/nak/inference/ExpectationPropagation.scala | Scala | apache-2.0 | 3,443 |
package akka.persistence.hazelcast.util
import akka.persistence.PersistentRepr
import com.hazelcast.mapreduce.aggregation.PropertyExtractor
/**
* @author Igor Sorokin
*/
@SerialVersionUID(1L)
private[hazelcast] object LongExtractor extends PropertyExtractor[PersistentRepr, java.lang.Long] {
override def extrac... | sorokinigor/akka-persistence-hazelcast | src/main/scala/akka/persistence/hazelcast/util/LongExtractor.scala | Scala | apache-2.0 | 383 |
/*
* 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 ... | rednaxelafx/apache-spark | sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/ObjectHashAggregateExec.scala | Scala | apache-2.0 | 5,916 |
/*******************************************************************************
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/analysis/typing/models/DOMHtml/HTMLTableElement.scala | Scala | bsd-3-clause | 10,453 |
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2006-2013, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/... | slothspot/scala | src/library/scala/collection/SortedSet.scala | Scala | bsd-3-clause | 1,404 |
/*
* Copyright (c) 2014-2019 Israel Herraiz <isra@herraiz.org>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, c... | iht/fpinscala | src/test/scala/chap03/ex02Spec.scala | Scala | mit | 1,650 |
package org.jetbrains.plugins.scala.lang.psi.impl
import com.intellij.openapi.project.Project
import com.intellij.psi.{PsiManager, JVMElementFactory, JVMElementFactoryProvider}
/**
* @author Alefas
* @since 15.05.12
*/
class ScalaFactoryProvider extends JVMElementFactoryProvider {
def getFactory(project: Project... | consulo/consulo-scala | src/org/jetbrains/plugins/scala/lang/psi/impl/ScalaFactoryProvider.scala | Scala | apache-2.0 | 409 |
package dk.gp.gp
import breeze.linalg.DenseMatrix
import breeze.linalg.DenseVector
import breeze.linalg.cholesky
import breeze.linalg.inv
import dk.bayes.dsl.infer
import dk.bayes.dsl.variable.Gaussian
import dk.bayes.dsl.variable.gaussian.multivariate.MultivariateGaussian
import dk.gp.cov.CovFunc
import dk.gp.math.in... | danielkorzekwa/bayes-scala-gp | src/main/scala/dk/gp/gp/gpPredict.scala | Scala | bsd-2-clause | 1,463 |
package com.codexica.s3crate.filetree.local
import java.io.File
import org.apache.commons.io.FileUtils
import scala.concurrent.ExecutionContext
import com.codexica.s3crate.filetree._
import java.nio.file.{Paths, Files}
import com.codexica.s3crate.filetree.FileType
import com.codexica.s3crate.filetree.FolderType
import... | joshalbrecht/s3crate | src/test/scala/com/codexica/s3crate/filetree/local/LinuxFileTreeSpec.scala | Scala | mit | 5,891 |
import com.bryzek.apidoc.generator.v0.models.json._
import play.api.http.HttpErrorHandler
import play.api.mvc._
import play.api.mvc.Results._
import scala.concurrent._
import lib.Validation
import play.api.libs.json._
import play.api._
class ErrorHandler extends HttpErrorHandler {
def onClientError(request: Request... | movio/apidoc-generator | generator/app/ErrorHandler.scala | Scala | mit | 643 |
package org.jetbrains.plugins.scala
package testingSupport.test.scalatest
import com.intellij.execution.configurations.{ConfigurationType, RunConfiguration}
import com.intellij.openapi.project.Project
import org.jetbrains.plugins.scala.testingSupport.test.AbstractTestRunConfigurationFactory
/**
* User: Alexander Pod... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/testingSupport/test/scalatest/ScalaTestRunConfigurationFactory.scala | Scala | apache-2.0 | 659 |
package concrete.generator.cspompatterns
import concrete.CSPOMDriver.CSPOMIntExpressionOperations
import cspom.{CSPOM, CSPOMConstraint}
import cspom.compiler._
import cspom.variable.{CSPOMConstant, IntExpression}
object MulToSum extends ConstraintCompilerNoData {
override def functions = Functions("mul")
def mat... | concrete-cp/concrete | src/main/scala/concrete/generator/cspompatterns/MulToSum.scala | Scala | lgpl-2.1 | 945 |
def f(seq: Seq[Int]) = for (y <- seq) yield y
/*start*/f(Array(1,2,3))/*end*/
//Seq[Int] | katejim/intellij-scala | testdata/typeInference/bugs2/SCL2288.scala | Scala | apache-2.0 | 88 |
/*
* 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 ... | minixalpha/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala | Scala | apache-2.0 | 12,017 |
/*
* 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 ... | Intel-bigdata/OAP | oap-cache/oap/src/main/scala/org/apache/spark/sql/execution/datasources/OapFilePartition.scala | Scala | apache-2.0 | 4,134 |
package sttp.client3
import sttp.capabilities.{Effect, Streams, WebSockets}
import sttp.client3.internal._
import sttp.model.{ResponseMetadata, StatusCode}
import sttp.model.internal.Rfc3986
import sttp.ws.{WebSocket, WebSocketFrame}
import scala.collection.immutable.Seq
import scala.util.{Failure, Success, Try}
/**... | softwaremill/sttp | core/src/main/scala/sttp/client3/ResponseAs.scala | Scala | apache-2.0 | 10,759 |
/**
* 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 ... | timodonnell/sparkbox | src/main/scala/org/bdgenomics/sparkbox/DelayedMessages.scala | Scala | apache-2.0 | 2,120 |
import akka.actor.{ActorRef, Actor}
import scala.util.Random
/**
* User: Björn Reimer
* Date: 04.04.14
* Time: 13:11
*/
case class StartConversation(replyTo: ActorRef, requestRouter: ActorRef, userTokens: Seq[TokenCreated], numberOrMessages: Int)
case class NextMessage(tokenIndex: Int)
case class ConversationCre... | memoConnect/cameoLoadTest | src/main/scala/ConversationActor.scala | Scala | agpl-3.0 | 1,813 |
package io.github.morgaroth.tester
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.client.RequestBuilding._
import akka.http.scaladsl.model.Multipart.FormData
import akka.http.scaladsl.model.{ContentTypes, HttpEntity}
import akka.stream.ActorMaterializer
import akka.util.ByteStri... | Morgaroth/events_manager | src/main/scala/io/github/morgaroth/tester/Tester.scala | Scala | apache-2.0 | 2,549 |
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.internal.bsp
/** Dependency Sources Request */
final class DependencySourcesParams private (
val targets: Vector[sbt.internal.bsp.BuildTargetIdentifier]) extends Serializable {
... | sbt/sbt | protocol/src/main/contraband-scala/sbt/internal/bsp/DependencySourcesParams.scala | Scala | apache-2.0 | 1,183 |
package com.twitter.finagle.thrift
import com.twitter.finagle.stats.{Counter, DefaultStatsReceiver, StatsReceiver}
import com.twitter.logging.Logger
import java.nio.{ByteBuffer, CharBuffer}
import java.nio.charset.{CharsetEncoder, CoderResult, CodingErrorAction, StandardCharsets}
import java.security.{PrivilegedExcept... | mkhq/finagle | finagle-thrift/src/main/scala/com/twitter/finagle/thrift/Protocols.scala | Scala | apache-2.0 | 8,230 |
/*
* Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com>
*/
package play.it.http.parsing
import akka.stream.Materializer
import akka.stream.scaladsl.Source
import akka.util.ByteString
import play.api.test._
import play.api.mvc.{ BodyParser, BodyParsers }
import scala.xml.NodeSeq
import java.io.File
im... | aradchykov/playframework | framework/src/play-integration-test/src/test/scala/play/it/http/parsing/XmlBodyParserSpec.scala | Scala | apache-2.0 | 6,681 |
package advent.process
import org.scalatest.junit.AssertionsForJUnit
import org.junit.Assert._
import org.junit.Test
import org.junit.Before
import advent.store._
import advent.game.Base
import advent.data.Command
import advent.data.Action
class ParserTest {
// no variables
@Before def initialize() { /* do ... | gregwk/clay-pot | Adventure/test/advent/process/ParserTest.scala | Scala | mit | 7,990 |
object Test {
def walk(depth: Int, bias: String): LazyList[String] = {
if (depth == 0)
LazyList(bias)
else {
(LazyList.iterate(1, 99)(_+1).map((x: Int) => walk(depth-1, bias + x))).flatten
}
}
def main(args: Array[String]): Unit = {
if (scala.tools.partest.utils.Properties.isAvian) {
... | scala/scala | test/files/run/stream_length.scala | Scala | apache-2.0 | 484 |
package com.amichalo.smooolelo.actors
import akka.actor.{Props, Actor}
import com.amichalo.smooolelo.config.MoooleloServiceConfig
import com.amichalo.smooolelo.gateway.MoooleloServerGateway
import com.amichalo.smooolelo.gateway.MoooleloServerGateway.RegistrationRequest
import com.amichalo.smooolelo.providers.SMooolelo... | amichalo/smooolelo | src/main/scala/com/amichalo/smooolelo/actors/RegistrationActor.scala | Scala | apache-2.0 | 1,765 |
/**
* K means clustering with kernels
* @author cdgore
* 2013-06-01
* Refactored into rsml 2013-09-26
*/
package com.cdgore.mlspark
import java.io._
import java.util.Random
import java.util.Properties
import org.apache.spark
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.a... | cdgore/mlspark | src/main/scala/com/cdgore/mlspark/KMeans.scala | Scala | mit | 16,774 |
package io.getquill.context.async
import com.github.mauricio.async.db.RowData
import java.util.Date
import java.util.UUID
import org.joda.time.LocalDate
import org.joda.time.LocalDateTime
import scala.BigDecimal
import scala.reflect.ClassTag
import scala.reflect.classTag
import io.getquill.util.Messages.fail
trai... | jcranky/quill | quill-async/src/main/scala/io/getquill/context/async/Decoders.scala | Scala | apache-2.0 | 3,358 |
/**
* Copyright (C) 2014, George B. Norr, All Rights Reserved
* Date: 11/2/14
*/
package controllers.api
import org.specs2.execute.AsResult
import play.api.http.{MimeTypes, Writeable}
import play.api.libs.json.{JsValue, Json}
import play.api.mvc.{AnyContentAsEmpty, Call, Result}
import play.api.test.{FakeRequest, P... | gnorr/basic_play_scala | test/controllers/api/ItemControllerSpec.scala | Scala | apache-2.0 | 2,736 |
package controllers.analysis
import models.analysis.events.AnalysisExtras.ElementalICPAttributes.ICP_MS
import models.analysis.events.AnalysisExtras.TomographyAttributes.{
ComputerTomography,
NeutronTomography,
StructuredLight3DScan
}
import models.analysis.events.AnalysisExtras.{
ElementalICPAttributes,
Tom... | MUSIT-Norway/musit | service_backend/test/controllers/analysis/AnalysisControllerIntegrationSpec.scala | Scala | gpl-2.0 | 16,049 |
package pl.edu.agh.mplt.visitors.translator.latex
import pl.edu.agh.mplt.parser.declaration.{InvalidDeclaration, Declaration}
import pl.edu.agh.mplt.parser.declaration.assertion.Assertion
import pl.edu.agh.mplt.parser.declaration.constraint.ConstraintDeclaration
import pl.edu.agh.mplt.parser.declaration.data.Data... | marek1840/MPLT | src/main/scala/pl/edu/agh/mplt/visitors/translator/latex/LatexTranslator.scala | Scala | mit | 1,007 |
/*
*************************************************************************************
* Copyright 2011-2013 Normation SAS
*************************************************************************************
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affe... | jooooooon/rudder | rudder-web/src/main/scala/com/normation/rudder/web/snippet/administration/ChangeRequestDetails.scala | Scala | agpl-3.0 | 15,905 |
package org.scalameta.tql
import scala.reflect.macros.whitebox.Context
import org.scalameta.ast.{Reflection => AstReflection}
class TraverserBuilderMacros(val c: Context) extends AstReflection {
lazy val u: c.universe.type = c.universe
lazy val mirror: u.Mirror = c.mirror
import c.universe._
val XtensionQuasi... | mdemarne/scalameta | foundation/src/main/scala/org/scalameta/tql/TraverserBuilder.scala | Scala | bsd-3-clause | 6,398 |
/**
* 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... | dchenbecker/kafka-sbt | core/src/main/scala/kafka/log/OffsetIndex.scala | Scala | apache-2.0 | 10,140 |
package org.openurp.edu.eams.web.util
import java.io.PrintWriter
import org.beangle.commons.lang.Strings
import org.beangle.commons.text.i18n.TextResource
import org.slf4j.Logger
import org.slf4j.LoggerFactory
class OutputProcessObserver extends OutputObserver() {
protected var writer: PrintWriter = _
protect... | openurp/edu-eams-webapp | web/src/main/scala/org/openurp/edu/eams/web/util/OutputProcessObserver.scala | Scala | gpl-3.0 | 2,704 |
package net.sansa_stack.query.spark.ontop
import it.unibz.inf.ontop.com.google.common.base.Charsets
import it.unibz.inf.ontop.com.google.common.collect.{ImmutableMap, ImmutableSortedSet}
import it.unibz.inf.ontop.com.google.common.hash.Hashing
import it.unibz.inf.ontop.exception.{OBDASpecificationException, OntopRefor... | SANSA-Stack/SANSA-RDF | sansa-query/sansa-query-spark/src/main/scala/net/sansa_stack/query/spark/ontop/QueryEngineOntop.scala | Scala | apache-2.0 | 17,822 |
package ammonite
import java.io.{File, InputStream, OutputStream}
import ammonite.ops._
import ammonite.runtime.{History, Interpreter, Storage}
import ammonite.main.Defaults
import ammonite.repl.{Repl, ReplApiImpl, SessionApiImpl}
import ammonite.util._
import ammonite.util.Util.newLine
/**
* Contains the variou... | coderabhishek/Ammonite | amm/src/main/scala/ammonite/Main.scala | Scala | mit | 9,632 |
package reactivemongo.api.commands
import reactivemongo.util
import reactivemongo.api.SerializationPack
// See https://docs.mongodb.com/manual/reference/command/dbHash/
private[reactivemongo] final class DBHash(val collections: Seq[String])
extends Command with CommandWithResult[DBHashResult]
final case class DBHa... | ornicar/ReactiveMongo | driver/src/main/scala/api/commands/DBHash.scala | Scala | apache-2.0 | 1,827 |
package org.cakesolutions.akkapatterns.core.application
import org.cakesolutions.akkapatterns.core.{Started, Stop, Start}
import akka.actor.{Props, Actor}
import org.cakesolutions.akkapatterns.domain.Configured
import com.mongodb.casbah.MongoDB
case class GetImplementation()
case class Implementation(title: String, v... | anand-singh/akka-patterns | maven/core/src/main/scala/org/cakesolutions/akkapatterns/core/application/application.scala | Scala | apache-2.0 | 1,422 |
package com.orendainx.trucking.simulator.flows
import akka.actor.Actor
/**
* All implementations of this class should initiate termination of the Akka Actor System upon processing a
* [[FlowManager.ShutdownFlow]] message.
*
* @author Edgar Orendain <edgar@orendainx.com>
*/
object FlowManager {
case object... | orendain/trucking-iot | simulator/src/main/scala/com/orendainx/trucking/simulator/flows/FlowManager.scala | Scala | apache-2.0 | 369 |
package com.charlesahunt.proteus.models
final case class ArangoError(
code: Int,
error: Boolean,
errorMessage: String,
errorNum: Int
)
final case class ProteusError(
errorMessage: String,
) | CharlesAHunt/proteus | src/main/scala/com/charlesahunt/proteus/models/Error.scala | Scala | apache-2.0 | 202 |
package service
import model.Profile._
import profile.simple._
import model.Plugin
trait PluginService {
def getPlugins()(implicit s: Session): List[Plugin] =
Plugins.sortBy(_.pluginId).list
def registerPlugin(plugin: Plugin)(implicit s: Session): Unit =
Plugins.insert(plugin)
def updatePlugin(plugin... | tb280320889/TESTTB | src/main/scala/service/PluginService.scala | Scala | apache-2.0 | 714 |
package onextent.utils
import org.apache.spark.sql.DataFrame
import spray.json._
import DefaultJsonProtocol._
object Dataframe2Json {
def printToFile(content: String, location: String) =
Some(new java.io.PrintWriter(location)).foreach{f => try{f.write(content)}finally{f.close()}}
def apply(df: DataFrame): O... | navicore/Dataframe2Json | src/main/scala/onextent/utils/Dataframe2Json.scala | Scala | mit | 708 |
object ExtensionMethods extends App {
implicit class HelloInt(val self: Int) extends AnyVal {
def hello: String = "hello" * self
}
println(5.hello)
}
| jaceklaskowski/scala-workshop | src/main/scala/ExtensionMethods.scala | Scala | apache-2.0 | 161 |
/*
* 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 | core/src/main/scala/org/apache/spark/util/collection/OpenHashMap.scala | Scala | apache-2.0 | 6,232 |
/*
* Copyright 2014-2020 Rik van der Kleij
*
* 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... | rikvdkleij/intellij-haskell | src/main/scala/intellij/haskell/highlighter/HaskellSyntaxHighlighter.scala | Scala | apache-2.0 | 5,049 |
/***********************************************************************
* Copyright (c) 2013-2016 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is ... | mdzimmerman/geomesa | geomesa-features/geomesa-feature-common/src/main/scala/org/locationtech/geomesa/features/serialization/ObjectType.scala | Scala | apache-2.0 | 2,496 |
package org.skycastle.entity.script
import network.Message
import util.Parameters
/**
* Action invocation, without the target entity id.
*
* @author Hans Haggstrom
*/
@serializable
@SerialVersionUID( 1 )
final case class ActionCall( actionId : Symbol, parameters : Parameters ) {
def call( hostEntity : Entity... | weimingtom/skycastle | src/main/scala/org/skycastle/entity/script/ActionCall.scala | Scala | gpl-2.0 | 391 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | greghogan/flink | flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamExecSink.scala | Scala | apache-2.0 | 4,466 |
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.