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 org.tensorframes
import org.apache.spark.sql.types._
import org.tensorframes.impl.{ScalarType, SupportedOperations}
class ColumnInformation private (
val field: StructField,
val stf: Option[SparkTFColInfo]) extends Serializable {
import MetadataConstants._
def columnName: String = field.na... | databricks/tensorframes | src/main/scala/org/tensorframes/ColumnInformation.scala | Scala | apache-2.0 | 4,125 |
/**
* 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... | jhspaybar/kafka | core/src/test/scala/unit/kafka/server/LogRecoveryTest.scala | Scala | apache-2.0 | 9,013 |
package org.jetbrains.plugins.scala.failed.annotator
import org.jetbrains.plugins.scala.PerfCycleTests
import org.jetbrains.plugins.scala.javaHighlighting.JavaHighlitghtingTestBase
import org.junit.experimental.categories.Category
/**
* @author Alefas
* @since 23/03/16
*/
@Category(Array(classOf[PerfCycleTests]... | katejim/intellij-scala | test/org/jetbrains/plugins/scala/failed/annotator/JavaHighlightingTest.scala | Scala | apache-2.0 | 9,273 |
package report.donut.transformers.cucumber
import java.io.File
import org.json4s.DefaultFormats
import org.scalatest.{FlatSpec, Matchers}
import report.donut.DonutTestData
import report.donut.gherkin.model
import report.donut.gherkin.processors.JSONProcessor
import scala.collection.mutable.ListBuffer
class GroupByF... | MagenTys/donut | src/test/scala/report/donut/transformers/cucumber/GroupByFeatureNameTest.scala | Scala | mit | 4,205 |
/*
* Copyright 2014 Kevin Herron
*
* 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 ... | digitalpetri/scala-ethernet-ip | enip-core/src/main/scala/com/digitalpetri/ethernetip/cip/structs/MessageRouter.scala | Scala | apache-2.0 | 3,436 |
// scalac: -Xasync
import scala.concurrent._
import ExecutionContext.Implicits.global
import scala.tools.testkit.async.Async._
import scala.concurrent.duration.Duration
case class FixedFoo(foo: Int)
class Foobar(val foo: Int, val bar: Double) {
def getValue = async { 4.2 }
def func(f: Any) = async {
new Foo... | lrytz/scala | test/async/jvm/concurrent_NegativeArraySizeExceptionFine1.scala | Scala | apache-2.0 | 552 |
package breeze.integrate.quasimontecarlo
/*
Copyright 2016 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 appli... | crealytics/breeze | math/src/main/scala/breeze/integrate/quasimontecarlo/Halton.scala | Scala | apache-2.0 | 4,465 |
/*
* Copyright 2013 TeamNexus
*
* TeamNexus Licenses this file to you under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://opensource.org/licenses/mit-license.php
*
* Unless required by applicable law ... | crvidya/nexus-scala | src/main/scala/com/nexus/traits/TLoader.scala | Scala | mit | 664 |
/*
* 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 ... | ConeyLiu/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InsertIntoHadoopFsRelationCommand.scala | Scala | apache-2.0 | 11,580 |
/*
* 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 ... | jkbradley/spark | mllib/src/test/scala/org/apache/spark/mllib/regression/StreamingLinearRegressionSuite.scala | Scala | apache-2.0 | 7,502 |
package pattern
/*
+1>> This source code is licensed as GPLv3 if not stated otherwise.
>> NO responsibility taken for ANY harm, damage done
>> to you, your data, animals, etc.
>>
+2>>
>> Last modified: 2013-10-29 :: 20:37
>> Origin: patterns
>>
+3>>
>> Copyright (c) 2013:
>... | lodsb/patterns | src/main/scala/pattern/MusicalTime.scala | Scala | gpl-3.0 | 2,835 |
package jwtyped
import io.circe.generic.semiauto._
case class Payload(sub: String, name: String, admin: Boolean)
object Payload {
import io.circe.{Decoder, Encoder}
implicit val decoder: Decoder[Payload] = deriveDecoder
implicit val encoder: Encoder[Payload] = deriveEncoder
}
| etaty/jwtyped | src/test/scala/jwtyped/Payload.scala | Scala | apache-2.0 | 288 |
/*
* 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 ... | wgpshashank/spark | core/src/main/scala/spark/scheduler/cluster/StandaloneSchedulerBackend.scala | Scala | apache-2.0 | 7,423 |
/*
* Copyright 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 applica... | Hocdoc/sandoc | src/main/scala/laika/parse/rst/ReStructuredText.scala | Scala | apache-2.0 | 6,203 |
/*
* 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 ... | oscarceballos/flink-1.3.2 | flink-runtime/src/test/scala/org/apache/flink/runtime/testingUtils/TestingJobManagerLike.scala | Scala | apache-2.0 | 17,793 |
package com.lyrx.text
import scala.collection.immutable.HashMap
import scala.util.matching.Regex
/**
* Created by extawe on 4/5/17.
*/
object TextTypes {
type Par = Seq[String]
type Pars = Seq[Par]
type Replacement[S] = (String,S)
type Replacements[S] = Map[String,S]
type Replacer[S] = String => S
ty... | lyrx/lyrxgenerator | src/main/scala/com/lyrx/text/TextTypes.scala | Scala | gpl-3.0 | 453 |
/*
* Copyright 2011-2021 Asakusa Framework Team.
*
* 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 ... | asakusafw/asakusafw-spark | compiler/src/main/scala/com/asakusafw/spark/compiler/graph/CacheStrategy.scala | Scala | apache-2.0 | 1,893 |
trait Bippy[@specialized(
scala.Char, scala.Boolean, scala.Byte,
scala.Short, scala.Int, scala.Long,
scala.Float, scala.Double, scala.Unit,
scala.AnyRef) T] { }
trait Bippy2[@specialized(Char, Boolean, Byte, Short, Int, Long, Float, Double, Unit, AnyRef) T] { }
| yusuke2255/dotty | tests/untried/pos/specialize10.scala | Scala | bsd-3-clause | 271 |
package org.mdpeg
import org.mdpeg.ast._
import org.mdpeg.parsers.{MultilineTablesRules, PrimitiveRules}
import org.parboiled2.{ParseError, Parser, ParserInput}
import org.scalatest.{FlatSpec, Matchers}
class MultilineTablesRulesSpec extends FlatSpec with Matchers {
class MultilineTablesRulesTestSpec(val input: Pa... | DRouh/mdpeg | src/test/scala/MultilineTablesRulesSpec.scala | Scala | apache-2.0 | 17,881 |
package actors
import actors.LunchbotActor.OutboundMessage
import akka.testkit.TestKitBase
import model.Statuses
import model.Statuses.Status
import org.scalatest.{Assertion, MustMatchers}
import scala.concurrent.duration._
import scala.reflect.ClassTag
trait MessageAssertions {
self: TestKitBase
with MustMat... | mturlo/lunchbot | src/test/scala/actors/MessageAssertions.scala | Scala | mit | 714 |
/*
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
distributed under the License is di... | twitter/bijection | bijection-avro/src/test/scala/com/twitter/bijection/avro/GenericAvroCodecLaws.scala | Scala | apache-2.0 | 3,625 |
package reactivemongo.api.commands.bson
import reactivemongo.api.commands.{
MongodProcess,
ServerProcess,
ServerStatus,
ServerStatusAsserts,
ServerStatusBackgroundFlushing,
ServerStatusConnections,
ServerStatusExtraInfo,
ServerStatusGlobalLock,
ServerStatusJournaling,
ServerStatusJournalingTime,
... | cchantep/ReactiveMongo | driver/src/main/scala/api/commands/bson/serverstatus.scala | Scala | apache-2.0 | 8,276 |
package scala.slick.examples.test
class PlainSQLTest extends RecordedDoctest {
def run = scala.slick.examples.jdbc.PlainSQL.main(null)
}
| boldradius/slick | slick-testkit/src/doctest/scala/PlainSQLTest.scala | Scala | bsd-2-clause | 140 |
package com.typesafe.slick.testkit.tests
import scala.language.higherKinds
import com.typesafe.slick.testkit.util.{RelationalTestDB, AsyncTest}
class RelationalMiscTest extends AsyncTest[RelationalTestDB] {
import tdb.profile.api._
def isNotAndOrTest = {
class T(tag: Tag) extends Table[(String, String)](tag... | kwark/slick | slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/RelationalMiscTest.scala | Scala | bsd-2-clause | 6,537 |
package scala
package reflect
package internal
package tpe
private[internal] trait CommonOwners {
self: SymbolTable =>
/** The most deeply nested owner that contains all the symbols
* of thistype or prefixless typerefs/singletype occurrences in given type.
*/
protected[internal] def commonOwner(t: Type... | felixmulder/scala | src/reflect/scala/reflect/internal/tpe/CommonOwners.scala | Scala | bsd-3-clause | 1,680 |
/**
* 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... | SumoLogic/elasticsearch-client | elasticsearch-core/src/test/scala/com/sumologic/elasticsearch/restlastic/RestlasticSearchClient2Test.scala | Scala | apache-2.0 | 1,941 |
/*
* 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 ... | mahak/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CurrentUserContext.scala | Scala | apache-2.0 | 1,022 |
package provingground.interface
import provingground.{Context, _}
import translation._
import Translator.unmatched
import upickle.default._
import cats._
import cats.implicits._
import provingground.induction.{ExstInducDefn, ExstInducStrucs}
import provingground.scalahott.NatRing
import scala.util.matching.Regex
tr... | siddhartha-gadgil/ProvingGround | core/src/main/scala/provingground/interface/JsFunc.scala | Scala | mit | 31,216 |
package controllers
import com.bryzek.apidoc.api.v0.Client
import com.bryzek.apidoc.generator.v0.models.File
import scala.concurrent.ExecutionContext.Implicits.global
import javax.inject.Inject
import play.api.i18n.{MessagesApi, I18nSupport}
import play.api.mvc.{Action, Controller, Result}
class Code @Inject() (val m... | Seanstoppable/apidoc | www/app/controllers/Code.scala | Scala | mit | 3,274 |
/*
* 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 ... | akopich/spark | graphx/src/main/scala/org/apache/spark/graphx/impl/EdgePartition.scala | Scala | apache-2.0 | 20,304 |
package com.alvrod.cryptopals.breakers
object FrequencyScore {
val frequencyMap = Map[Char, Double] (
'a' -> 8.167,
'b' -> 1.492,
'c' -> 2.782,
'd' -> 4.253,
'e' -> 13.0001,
'f' -> 2.228,
'g' -> 2.015,
'h' -> 6.094,
'i' -> 6.966,
'j' -> 0.153,
'k' -> 0.772,
'l' -> 4.02... | alvrod/cryptopals | src/com/alvrod/cryptopals/breakers/FrequencyScore.scala | Scala | gpl-2.0 | 871 |
/*
* 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... | JerryYanWan/BigDL | spark/dl/src/main/scala/com/intel/analytics/bigdl/optim/LocalOptimizer.scala | Scala | apache-2.0 | 8,793 |
package com.xta.spark.color.converter
/**
* Created by Rex on 7/25/16.
*/
class Hex(v: String) {
val value = v
def red: String = rgb._1
def green: String = rgb._2
def blue: String = rgb._3
private def rgb: (String, String, String) = {
val startIndex = if (value.startsWith("#")) 1 else 0
val re... | xta/spark-color-converter | src/main/scala/com/xta/spark/color/converter/Hex.scala | Scala | mit | 849 |
package models
import java.util.UUID
import utils.Global._
import utils.semantic.Vocabulary.{ owl, lwm, rdf }
import utils.semantic._
import scala.concurrent.{ Promise, Future }
case class ApplicationToken(student: Resource, labwork: Resource)
object ApplicationTokens {
import scala.concurrent.ExecutionContext.I... | FHK-ADV/lwm | app/models/ApplicationTokens.scala | Scala | mit | 1,435 |
/***********************************************************************
* Copyright (c) 2013-2017 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... | ronq/geomesa | geomesa-features/geomesa-feature-common/src/main/scala/org/locationtech/geomesa/features/serialization/GeometrySerialization.scala | Scala | apache-2.0 | 7,568 |
package postoffice
import java.time.LocalDateTime
import akka.actor.{ActorSystem, Props}
import akkaviz.serialization.{AkkaVizSerializer, SerializationContext}
import upickle.Js
import upickle.Js.Value
import scala.util.Random
case class Parcel(source: City, destination: City, weight: Weight)
case class PostOffice... | blstream/akka-viz | demo/src/main/scala/postoffice/postoffice.scala | Scala | mit | 2,249 |
/*
* Copyright 2014 Commonwealth Computer Research, 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 applica... | jnh5y/geomesa | geomesa-feature/src/test/scala/org/locationtech/geomesa/feature/AvroSimpleFeatureWriterTest.scala | Scala | apache-2.0 | 8,103 |
package io.opencensus.scala.http4s
import cats.effect.Effect
import io.opencensus.trace.Span
import org.http4s.client.Client
object implicits {
implicit class ClientWithTracing[F[_]: Effect](client: Client[F]) {
/**
* Enriches the `Client[F]` by tracing and propagation of the SpanContext via http header... | census-ecosystem/opencensus-scala | http4s/src/main/scala/io/opencensus/scala/http4s/implicits.scala | Scala | apache-2.0 | 717 |
package at.logic.gapt.examples
import at.logic.gapt.expr._
import at.logic.gapt.expr.hol.CNFp
import at.logic.gapt.proofs.{ Context, Sequent }
import at.logic.gapt.proofs.gaptic._
import at.logic.gapt.proofs.lk.LKProofSchemata
object tautSchema extends TacticsProof {
ctx += Context.Sort( "i" )
ctx += hoc"P: i>o"
... | gebner/gapt | examples/schema/TestSchema.scala | Scala | gpl-3.0 | 1,474 |
/*
* Copyright 2016 The BigDL Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | intel-analytics/BigDL | scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/keras/layers/InternalERF.scala | Scala | apache-2.0 | 1,545 |
package barstools.macros
import mdf.macrolib
class SRAMCompiler extends MacroCompilerSpec with HasSRAMGenerator with HasSimpleWidthTestGenerator {
val compiler: macrolib.SRAMCompiler = generateSRAMCompiler("awesome", "A")
val verilog = s"v-SRAMCompiler.v"
override lazy val depth = BigInt(16)
override lazy val... | ucb-bar/barstools | src/test/scala/barstools/macros/SRAMCompiler.scala | Scala | bsd-3-clause | 718 |
package org.apache.spark.mllib.generators
/**
* Abstract class for a Decision Tree
*/
sealed abstract class DecisionTree extends Serializable {
def decide(data: Array[Double]): Int
def stats: DTStats
}
/**
* Discriminative node
*/
case class Decider(
variable: Int,
threshold: Double,
leftDec... | sramirez/spark-experiments | src/main/scala/org/apache/spark/mllib/generators/DecisionTree.scala | Scala | apache-2.0 | 1,474 |
package com.cloudera.hue.livy.repl.scala
import com.cloudera.hue.livy.repl.Session
import com.cloudera.hue.livy.repl.scala.interpreter._
import org.json4s.jackson.JsonMethods._
import org.json4s.jackson.Serialization.write
import org.json4s.{JValue, _}
import scala.collection.mutable
import scala.concurrent.{Executio... | erickt/hue | apps/spark/java/livy-repl/src/main/scala/com/cloudera/hue/livy/repl/scala/SparkSession.scala | Scala | apache-2.0 | 2,332 |
/*
* 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 ... | shuangshuangwang/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/subquery.scala | Scala | apache-2.0 | 7,705 |
package ch.uzh.ifi.pdeboer.pplib.process.recombination
import ch.uzh.ifi.pdeboer.pplib.hcomp.{HComp, HCompPortalAdapter}
import ch.uzh.ifi.pdeboer.pplib.process.entities._
import ch.uzh.ifi.pdeboer.pplib.process.stdlib._
import ch.uzh.ifi.pdeboer.pplib.util.TestUtils
import org.junit.{Assert, Test}
import scala.refle... | uzh/PPLib | src/test/scala/ch/uzh/ifi/pdeboer/pplib/process/recombination/TypeRecombinatorTest.scala | Scala | mit | 5,890 |
/**
* FILE: OwnedResourceTest.scala
* PERCORSO /Codice/sgad/servertier/src/test/scala/sgad/servertier/dataaccess/data/userdata
* DATA CREAZIONE: 20 Febbraio 2014
* AUTORE: ProTech
* EMAIL: protech.unipd@gmail.com
*
* Questo file è proprietà del gruppo ProTech, viene rilasciato sotto licenza Apache v2.
*
* DIAR... | protechunipd/SGAD | Codice/sgad/servertier/src/test/scala/sgad/servertier/dataaccess/data/userdata/OwnedResourceTest.scala | Scala | apache-2.0 | 2,695 |
package com.twitter.finagle.memcached.stress
import com.twitter.conversions.DurationOps._
import com.twitter.finagle.Address
import com.twitter.finagle.Memcached
import com.twitter.finagle.Name
import com.twitter.finagle.Service
import com.twitter.finagle.memcached.integration.external.InProcessMemcached
import com.tw... | twitter/finagle | finagle-memcached/src/test/scala/com/twitter/finagle/memcached/stress/InterpreterServiceTest.scala | Scala | apache-2.0 | 1,755 |
package org.jetbrains.plugins.scala
package lang.psi.types.nonvalue
import com.intellij.openapi.project.Project
import com.intellij.psi.search.GlobalSearchScope
import com.intellij.psi.{PsiParameter, PsiTypeParameter}
import org.jetbrains.plugins.scala.extensions.PsiParameterExt
import org.jetbrains.plugins.scala.lang... | LPTK/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/types/nonvalue/ScMethodType.scala | Scala | apache-2.0 | 14,441 |
/*
* 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... | lhfei/spark-in-action | spark-2.x/src/main/scala/org/apache/spark/examples/LocalFileLR.scala | Scala | apache-2.0 | 2,530 |
package requests
import play.api.data.Form
import play.api.data.Forms._
case class SearchRecipeForm(elems: Seq[Long])
object SearchRecipeForm {
val form = Form(
mapping(
"elem" -> seq(longNumber(min = 0L))
)(SearchRecipeForm.apply)(SearchRecipeForm.unapply)
)
}
| ponkotuy/FactorioRecipe | app/requests/SearchRecipeForm.scala | Scala | apache-2.0 | 282 |
package reactivemongo.api.commands.bson
import reactivemongo.api.BSONSerializationPack
import reactivemongo.api.commands._
import reactivemongo.bson._
object BSONFindAndModifyCommand extends FindAndModifyCommand[BSONSerializationPack.type] {
val pack: BSONSerializationPack.type = BSONSerializationPack
}
object BSO... | reactific/ReactiveMongo | driver/src/main/scala/api/commands/bson/findandmodify.scala | Scala | apache-2.0 | 1,726 |
package com.bigchange.basic
import breeze.linalg
import org.apache.spark.graphx._
import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}
case class Person(name: String, occupation: String, age: Int)
/**
* Created by C.J.YOU on 2016/5/3.
* 该示例展示了图的一些基本用法,包括图的创建,图的一些基本操作等。
*/
object Gra... | bigchange/AI | src/main/scala/com/bigchange/basic/GraphOperation.scala | Scala | apache-2.0 | 8,769 |
package org.jetbrains.plugins.scala
package lang
package parser
package parsing
package types
import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes
import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder
/**
* @author Alexander Podkhalyuzin
*/
/*
* Types ::= Type {',' Type}
*/
obje... | double-y/translation-idea-plugin | src/org/jetbrains/plugins/scala/lang/parser/parsing/types/Types.scala | Scala | apache-2.0 | 1,164 |
package org.http4s
package object booPickle extends BooPickleInstances
| ChristopherDavenport/http4s | boopickle/src/main/scala/org/http4s/booPickle/package.scala | Scala | apache-2.0 | 72 |
package crudex.web
import scalaz._, Scalaz._
import scalaz.concurrent.Task
import org.http4s._, org.http4s.dsl._
import org.http4s.circe._
import crudex.persist.stm.ThingStm._
import io.circe._
import io.circe.syntax._
import crudex.web.Common._
import crudex.app.Common._
import io.circe.Encoder
/**
* Generic CRU... | rpeszek/crud-ex-backent-http4s | src/main/scala/crudex/web/CrudHandler.scala | Scala | mit | 1,911 |
package net.fwbrasil.bond
trait False
case object False extends Validator[Boolean, False] {
def isValid(v: Boolean) =
v == false
}
trait True
case object True extends Validator[Boolean, True] {
def isValid(v: Boolean) =
v == true
} | fwbrasil/bond | src/main/scala/net/fwbrasil/bond/Booleans.scala | Scala | lgpl-2.1 | 245 |
package controllers
import java.nio.ByteBuffer
import upickle.default
import play.api.mvc._
import services.ApiService
import shared.Api
import javax.inject.Inject
import scala.concurrent.ExecutionContext.Implicits.global
import slick.driver._
object Router extends autowire.Server[String, default.Reader, default.W... | mitchdzugan/PSPSjsAR-stack-template | server/src/main/scala/controllers/Application.scala | Scala | apache-2.0 | 1,273 |
package com.wangc.fast.p9
/**
* Created by wangchao on 2017/6/20.
*/
object Study9_10_Reg {
def main(args: Array[String]): Unit = {
val p = """[0-9]""".r
// val p2 = "\s" //因为这种情况,所以推荐使用三个双引号
val target = "23kdf3hj6"
for (matchStr <- p.findAllIn(target)){
println( matchStr )
}... | wang153723482/HelloWorld_my | HelloWorld_scala/src/com/wangc/fast/p9/Study9_10_Reg.scala | Scala | apache-2.0 | 364 |
package ps.tricerato.pureimage.filter
import ps.tricerato.pureimage._
object Lanczos {
val a = 2
import math._
private def L(x: Float):Float= if (x == 0F) {
1F
} else if (abs(x) > a) {
0F
} else {
sinc(x) * sinc(x / a)
}
private def sinc(x: Float) = (sin(Pi * x) / (Pi * x)).toFloat
val... | non/pureimage | src/main/scala/ps/tricerato/pureimage/filter/Lanczos.scala | Scala | mit | 1,646 |
package ycf.web
import akka.actor._
import akka.io.IO
import akka.pattern.ask
import akka.util.Timeout
import spray.can.Http
import spray.routing.HttpService
import scala.concurrent.duration._
import scala.language.postfixOps
object BusAlertApp extends App {
implicit val system = ActorSystem("on-spray-can")
va... | frosforever/spray-bus-alerter | src/main/scala/ycf/web/BusAlertApp.scala | Scala | mit | 1,788 |
/*
* Copyright (c) 2014-2020 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache... | alexandru/monifu | monix-catnap/shared/src/main/scala/monix/execution/package.scala | Scala | apache-2.0 | 1,826 |
/*
* 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/template/DefaultLayout.scala | Scala | apache-2.0 | 4,199 |
package rpgboss.model
trait RpgEnum extends Enumeration {
def get(v: Int) = apply(v)
def findOrDefault(s: String) = {
values.find(_.toString == s).getOrElse(default)
}
def default: Value
}
trait BooleanRpgEnum extends RpgEnum {
def fromBoolean(x: Boolean): Value
def toBoolean(id: Int): Boolean
}
obj... | DrDub/rpgboss | core/src/main/scala/rpgboss/model/Constants.scala | Scala | agpl-3.0 | 2,278 |
/*
* Copyright 2011-2022 GatlingCorp (https://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... | gatling/gatling | gatling-test-framework/src/main/scala/io/gatling/sbt/GatlingRunner.scala | Scala | apache-2.0 | 1,314 |
/*
* Copyright 2001-2015 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | scalatest/scalatest | project/GenScalacticJS.scala | Scala | apache-2.0 | 5,869 |
package client.handler
import client.rootmodel.SearchesRootModel
import client.modules.AppModule
import client.services.{CoreApi, LGCircuit}
import client.utils.PrologParser
import diode.{ActionHandler, ActionResult, ModelRW}
import shared.models.Label
import scala.scalajs.js.JSConverters._
import scala.scalajs.js.JS... | LivelyGig/ProductWebUI | client/src/main/scala/client/handler/SearchesHandler.scala | Scala | apache-2.0 | 2,849 |
/*
* 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 not u... | tromika/sparkling-water | core/src/main/scala/org/apache/spark/h2o/H2OConf.scala | Scala | apache-2.0 | 8,055 |
package org.jetbrains.bsp.project.importing.setup
import com.intellij.notification.{Notification, NotificationType}
import com.intellij.openapi.actionSystem.{AnAction, AnActionEvent}
import com.intellij.openapi.application.{ApplicationManager, ModalityState}
import com.intellij.openapi.diagnostic.Logger
import com.inte... | JetBrains/intellij-scala | bsp/src/org/jetbrains/bsp/project/importing/setup/FastpassConfigSetup.scala | Scala | apache-2.0 | 5,664 |
package io.eels.component.hbase
import io.eels._
import io.eels.schema.{DataType, StructType}
import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp
import org.apache.hadoop.hbase.filter._
import org.apache.hadoop.hbase.util.Bytes
import scala.collection.JavaConversions._
// These are simply marker predicates... | sksamuel/hadoop-streams | eel-hbase/src/main/scala/io/eels/component/hbase/HbasePredicate.scala | Scala | apache-2.0 | 5,053 |
/*
* 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 ... | chuckchen/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/parquet/ParquetWrite.scala | Scala | apache-2.0 | 4,941 |
package com.olaq.sbt
import java.util.Properties
import org.sonarsource.scanner.api.{EmbeddedScanner, LogOutput}
import sbt.{Def, _}
import Keys._
import scala.collection.JavaConverters._
object SonarScannerPlugin extends AutoPlugin {
object autoImport {
val sonar: TaskKey[Unit] = taskKey[Unit]("Runs sonar-s... | olaq/sbt-sonar-scanner-plugin | src/main/scala/com/olaq/sbt/SonarScannerPlugin.scala | Scala | mit | 2,700 |
/*
* Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com>
*/
package play.api.mvc.request
import javax.inject.Inject
import play.api.http.{ HttpConfiguration, SecretConfiguration }
import play.api.libs.crypto.CookieSignerProvider
import play.api.libs.typedmap.TypedMap
import play.api.mvc._
import play... | Shruti9520/playframework | framework/src/play/src/main/scala/play/api/mvc/request/RequestFactory.scala | Scala | apache-2.0 | 4,231 |
import org.apache.hadoop.conf.Configuration
import org.apache.spark.{SparkContext, SparkConf}
import org.apache.spark.rdd.RDD
import org.bson.BSONObject
import com.mongodb.hadoop.{
MongoInputFormat, MongoOutputFormat,
BSONFileInputFormat, BSONFileOutputFormat}
import com.mongodb.hadoop.io.MongoUpdateWritable
impo... | StatisticalProject/CORDIR | sparkBrief.scala | Scala | apache-2.0 | 4,942 |
/*
* Copyright 2014–2018 SlamData Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | jedesah/Quasar | foundation/src/main/scala/quasar/contrib/scalaz/catchable.scala | Scala | apache-2.0 | 4,281 |
package com.pktippa
object StringMingling {
def main(args: Array[String]) {
// Read Pawel String from command line
var pawelString = readLine();
// Read Shaka String from command line
var shakaString = readLine();
// Mingled String
var mingledString = getMingledString(pawelString,shakaStr... | pk-hackerrank/hr-funcprog | recursion/string-mingling/scala/src/com/pktippa/StringMingling.scala | Scala | mit | 910 |
package com.twitter.server.filters
import com.twitter.concurrent.NamedPoolThreadFactory
import com.twitter.finagle.Service
import com.twitter.finagle.filter.OffloadFilter
import com.twitter.finagle.http.{Request, Response}
import com.twitter.server.AdminHttpServer.Route
import com.twitter.util.{ExecutorServiceFuturePo... | twitter/twitter-server | server/src/main/scala/com/twitter/server/filters/AdminThreadPoolFilter.scala | Scala | apache-2.0 | 1,080 |
/*
* Copyright 2020 Precog Data
*
* 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 ... | quasar-analytics/quasar | qsu/src/main/scala/quasar/qsu/mra/Provenance.scala | Scala | apache-2.0 | 6,804 |
/*
* 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 ... | dbtsai/spark | sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveUDFs.scala | Scala | apache-2.0 | 21,353 |
package io.questions.model.questionnaire
import java.time._
import cats.implicits._
import cats.{ Eq, Show }
import io.circe.{ Decoder, Encoder }
import io.circe.java8.time._
import io.questions.model._
import io.questions.util._
sealed trait PrimitiveAnswer extends Product with Serializable {
def blank: Primitive... | channingwalton/qanda | questionnaire/src/main/scala/io/questions/model/questionnaire/PrimitiveAnswer.scala | Scala | mit | 5,474 |
package org.jetbrains.sbt.runner
import java.io.File
import java.util
import java.util.jar.JarFile
import com.intellij.execution.Executor
import com.intellij.execution.configuration.EnvironmentVariablesComponent
import com.intellij.execution.configurations._
import com.intellij.execution.filters.TextConsoleBuilderFac... | triplequote/intellij-scala | scala/scala-impl/src/org/jetbrains/sbt/runner/SbtRunConfiguration.scala | Scala | apache-2.0 | 5,318 |
package io.youi.stream.watcher
import java.nio.file.Path
case class PathEvent(path: Path, directory: Path, kinds: Set[EventKind], lastModified: Long) {
override def toString: String = s"PathEvent(path: $path, directory: $directory, kinds: $kinds, lastModified: $lastModified)"
} | outr/youi | core/jvm/src/main/scala/io/youi/stream/watcher/PathEvent.scala | Scala | mit | 282 |
/**
* 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... | WillCh/cs286A | dataMover/kafka/core/src/test/scala/unit/kafka/server/KafkaConfigConfigDefTest.scala | Scala | bsd-2-clause | 29,344 |
/*
* 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... | pncampbell/ct-calculations | src/main/scala/uk/gov/hmrc/ct/accounts/approval/retriever/CoHoAccountsApprovalBoxRetriever.scala | Scala | apache-2.0 | 1,080 |
package org.joda.time
import java.io.Serializable
import org.joda.time.base.BaseInterval
import org.joda.time.chrono.ISOChronology
object Interval {
def parse(str: String): Interval = new Interval(str)
}
@SerialVersionUID(4922451897541386752L)
class Interval extends BaseInterval with ReadableInterval with Seriali... | mdedetrich/soda-time | shared/src/main/scala/org/joda/time/Interval.scala | Scala | bsd-2-clause | 5,120 |
package de.windelknecht.stup.utils.io
import java.io.{OutputStream, InputStream}
import java.nio.channels.{Channels, WritableByteChannel, ReadableByteChannel}
import java.nio.ByteBuffer
object ChannelTools {
/**
* Copies the content of the src channel into the dest channel.
*/
def fastChannelCopy(
size:... | windelknecht/stup-utils | src/main/scala/de/windelknecht/stup/utils/io/ChannelTools.scala | Scala | mit | 2,340 |
package breeze.optimize
/*
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 applicab... | ktakagaki/breeze | src/test/scala/breeze/optimize/AdaptiveGradientTest.scala | Scala | apache-2.0 | 2,679 |
/*
* Copyright 2001-2008 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | epishkin/scalatest-google-code | src/main/scala/org/scalatest/events/Event.scala | Scala | apache-2.0 | 180,277 |
package socialnetwork.server
import akka.actor._
import akka.io.IO
import akka.routing.{RoundRobinPool, FromConfig}
import com.typesafe.config.ConfigFactory
import org.mashupbots.socko.handlers.{StaticResourceRequest, StaticFileRequest, StaticContentHandlerConfig, StaticContentHandler}
import org.mashupbots.socko.rout... | TheHipbot/SocialNetwork | src/main/scala/socialnetwork/server/Server.scala | Scala | mit | 3,666 |
/*
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 not use this f... | transcendent-ai-labs/DynaML | dynaml-core/src/main/scala/io/github/mandar2812/dynaml/kernels/LocalScalarKernel.scala | Scala | apache-2.0 | 8,250 |
package test
object logTest extends App{
def f() = {
println(log.currentFileName)
println(log.currentLine)
println(log.currentPackage)
println(log.currentClassName)
println(log.currentFuncName)
}
f()
} | seraekim/srkim-lang-scala | src/main/java/test/logTest.scala | Scala | bsd-3-clause | 228 |
/*
* Copyright 2017 PayPal
*
* 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 ... | akara/squbs | squbs-ext/src/test/scala/org/squbs/resolver/DummyEndpointResolver.scala | Scala | apache-2.0 | 1,575 |
/*
* Skylark
* http://skylark.io
*
* Copyright 2012-2017 Quantarray, 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... | quantarray/skylark | skylark-measure/src/main/scala/com/quantarray/skylark/measure/Measure.scala | Scala | apache-2.0 | 9,138 |
package scalan.primitives
import scalan._
import scala.reflect.runtime.universe._
import scalan.util.CollectionUtil._
import scalan.common.OverloadHack._
import scalan.compilation.{GraphVizConfig, GraphVizExport}
import scalan.staged.Expressions
/**
The code is inspired by LMS structs and is used in Scalan with the ... | PCMNN/scalan-ce | core/src/main/scala/scalan/primitives/Structs.scala | Scala | apache-2.0 | 25,849 |
package uk.gov.gds.ier.validation.constraints
import uk.gov.gds.ier.validation.{FormKeys, ErrorMessages, Key}
import uk.gov.gds.ier.model.{OverseasParentName, Name, PreviousName}
import play.api.data.validation.{Invalid, Valid, Constraint}
import play.api.data.Mapping
import play.api.data.Forms._
import play.api.Logge... | alphagov/ier-frontend | app/uk/gov/gds/ier/validation/constraints/ParentNameConstraints.scala | Scala | mit | 5,075 |
package com.outr.arango.api.model
import io.circe.Json
case class PutAPISimpleReplaceByExample(collection: String,
example: Option[String] = None,
newValue: Option[String] = None,
options: Option[P... | outr/arangodb-scala | api/src/main/scala/com/outr/arango/api/model/PutAPISimpleReplaceByExample.scala | Scala | mit | 363 |
object Test extends Application {
class A
class B extends A
def foo(x: A, y: B) = print(1)
def foo(x: A, y: A) = print(2)
/* line: 4 */foo(new B, new B)
} | LPTK/intellij-scala | testdata/resolve2/overloading/MoreSpecificRight.scala | Scala | apache-2.0 | 165 |
package lila.monitor
package actorApi
import lila.socket.SocketMember
case class Member(channel: JsChannel) extends SocketMember {
val userId = none
val troll = false
}
case object GetNbMoves
case object GetMoveLatency
case class Join(uid: String)
case class MonitorData(data: List[String])
| bjhaid/lila | modules/monitor/src/main/actorApi.scala | Scala | mit | 299 |
package org.scalatra.ssgi.servlet
import javax.servlet.ServletOutputStream
import java.io.ByteArrayOutputStream
class ByteArrayServletOutputStream(bufSize: Int) extends ServletOutputStream {
def this() = this(32)
val internal = new ByteArrayOutputStream
def toByteArray = internal.toByteArray
override de... | scalatra/ssgi | servlet/src/main/scala/org/scalatra/ssgi/servlet/ByteArrayServletOutputStream.scala | Scala | bsd-2-clause | 705 |
package com.github.libsml.aggregation.optimization
/**
* Created by huangyu on 15/9/5.
*/
object OptimizationMode extends Enumeration {
type Mode = Value
val SPARK, LOCAL = Value
}
| libsml/libsml | aggregation/src/main/scala/com/github/libsml/aggregation/optimization/OptimizationMode.scala | Scala | apache-2.0 | 189 |
package konstructs.protocol
import scala.collection.JavaConverters._
import akka.actor.{Actor, Props, ActorRef, Stash, PoisonPill}
import akka.io.Tcp
import akka.util.{ByteString, ByteStringBuilder}
import konstructs.{PlayerActor, UniverseActor, DbActor}
import konstructs.api._
import konstructs.api.messages.Said
impo... | konstructs/server | src/main/scala/konstructs/protocol/client.scala | Scala | mit | 8,961 |
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.