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 motylwg.camusic.test
import org.scalatest.FunSuite
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import motylwg.camusic._
@RunWith(classOf[JUnitRunner])
class PlayerTest extends FunSuite {
test("readBytes") {
val data = List(
List(true, true, true, true, false, false, fa... | motylwg/CaMusic | src/test/scala/PlayerTest.scala | Scala | mit | 922 |
package hubcat
import dispatch._
import org.json4s.JsonDSL._
import org.json4s.native.Printer.compact
import org.json4s.native.JsonMethods.render
trait RepoPulls
extends Client.Completion { self: RepoRequests =>
private def base = apiHost / "repos" / user / repo / "pulls"
class Pulls extends Client.Completion {... | rintcius/hubcat | src/main/scala/pulls.scala | Scala | mit | 6,768 |
/*
* 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 ... | Sephiroth-Lin/incubator-carbondata | integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/CarbonHiveCommands.scala | Scala | apache-2.0 | 1,778 |
package org.automanlang.core.question
import org.automanlang.core.AutomanAdapter
import org.automanlang.core.answer.{Answer, ScalarOutcome, AbstractScalarAnswer}
import scala.concurrent.ExecutionContext.Implicits.global
abstract class DiscreteScalarQuestion extends Question {
type AA = AbstractScalarAnswer[A]
typ... | dbarowy/AutoMan | libautoman/src/main/scala/org/automanlang/core/question/DiscreteScalarQuestion.scala | Scala | gpl-2.0 | 1,193 |
/*
* Copyright (c) 2016 SnappyData, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You
* may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | vjr/snappydata | core/src/main/scala/org/apache/spark/sql/streaming/StreamSqlHelper.scala | Scala | apache-2.0 | 3,733 |
/*
* Copyright 2017-2022 John Snow Labs
*
* 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... | JohnSnowLabs/spark-nlp | src/main/scala/com/johnsnowlabs/nlp/HasMultipleInputAnnotationCols.scala | Scala | apache-2.0 | 1,271 |
package org.jetbrains.plugins.scala
package worksheet.processor
import com.intellij.openapi.vfs.newvfs.FileAttribute
import com.intellij.psi.PsiFile
/**
* User: Dmitry.Naydanov
* Date: 30.07.14.
*/
trait WorksheetPerFileConfig {
protected val enabled = "enabled"
protected val disabled = "disable"
def isEnab... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/worksheet/processor/WorksheetPerFileConfig.scala | Scala | apache-2.0 | 618 |
/*
* Copyright 2017 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | liquidarmour/ct-calculations | src/main/scala/uk/gov/hmrc/ct/accounts/frsse2008/calculations/PeriodCalculator.scala | Scala | apache-2.0 | 1,829 |
package com.cloudray.scalapress.search
import org.scalatest.{OneInstancePerTest, FunSuite}
import org.scalatest.mock.MockitoSugar
/** @author Stephen Samuel */
class FacetFieldTest extends FunSuite with MockitoSugar with OneInstancePerTest {
test("facet field apply") {
assert(TagsFacetField === FacetField("tag... | vidyacraghav/scalapress | src/test/scala/com/cloudray/scalapress/search/FacetFieldTest.scala | Scala | apache-2.0 | 447 |
package controllers.admin
import scalaz._
import Scalaz._
import scalaz.Validation
import scalaz.Validation.FlatMap._
import scalaz.NonEmptyList._
import net.liftweb.json._
import net.liftweb.json.JsonParser._
import io.megam.auth.funnel.{ FunnelResponse, FunnelResponses }
import io.megam.auth.funnel.FunnelErrors._
i... | indykish/vertice_gateway | app/controllers/admin/Balances.scala | Scala | mit | 2,186 |
/**
* Copyright 2015 Zaradai
*
* 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 writ... | zaradai/lattrac | src/main/scala/com/zaradai/lattrac/LatencyTracer.scala | Scala | apache-2.0 | 1,493 |
package com.ibm.spark.kernel.api
import java.io.{InputStream, PrintStream}
import com.ibm.spark.comm.CommManager
import com.ibm.spark.interpreter._
import com.ibm.spark.kernel.protocol.v5._
import com.ibm.spark.kernel.protocol.v5.kernel.ActorLoader
import com.ibm.spark.magic.MagicLoader
import com.typesafe.config.Con... | codeaudit/spark-kernel | kernel/src/test/scala/com/ibm/spark/kernel/api/KernelSpec.scala | Scala | apache-2.0 | 4,425 |
package com.xored.scalajs.react.examples.hello
import com.xored.scalajs.react._
object HelloMessage extends TypedReactSpec {
case class State()
case class Props(name: String)
def getInitialState(self: This) = State()
@scalax
def render(self: This) = {
<div>Hello {self.props.name}</div>
}
}
| Aste88/scala-js-react | scalajs-react-examples/src/main/scala/com/xored/scalajs/react/examples/hello/HelloMessage.scala | Scala | apache-2.0 | 312 |
package feature.format
import feature._
/** A record representing the information contained in one line of a file in GTF2.2 feature.format
* ([[http://mblab.wustl.edu/GTF22.html feature.format specification]])
*
* @param line String containing one valid GTF2.2 line with or without trailing newline character
*... | pamelarussell/sgxlib | src/main/scala/feature/format/GTF22Record.scala | Scala | mit | 11,045 |
package com.anchortab.snippet
import java.util.Locale
import scala.math._
import net.liftweb._
import common._
import http._
import LiftRules._
import rest._
import js._
import JE._
import JsExp._
import util._
import Helpers._
import json._
import Extraction._
import mongod... | farmdawgnation/anchortab | src/main/scala/com/anchortab/snippet/Api.scala | Scala | apache-2.0 | 8,963 |
/*
* Copyright 2013 http4s.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | http4s/http4s | tests/shared/src/test/scala/org/http4s/parser/OriginHeaderSuite.scala | Scala | apache-2.0 | 2,661 |
package com.clarifi.reporting.ermine
import com.clarifi.reporting.Supply
import com.clarifi.reporting.ermine.Kind.{ zipKinds, kindVars, subKind }
import com.clarifi.reporting.ermine.Type.{ typeVars, allTypeVars }
import scala.collection.immutable.List
/** A type annotation with possible (pseudo)-existential holes
*... | ermine-language/ermine-legacy | src/main/scala/com/clarifi/reporting/ermine/Annot.scala | Scala | bsd-2-clause | 1,718 |
/*
* 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 java.util
/** A subclass of `HashMap`... | scala-js/scala-js | javalib/src/main/scala/java/util/NullRejectingHashMap.scala | Scala | apache-2.0 | 3,925 |
package org.elasticmq
import org.joda.time.{Duration, DateTime}
case class QueueData(
name: String,
defaultVisibilityTimeout: MillisVisibilityTimeout,
delay: Duration,
receiveMessageWait: Duration,
created: DateTime,
lastModified: DateTime,
deadLettersQueue: Option[DeadLettersQueueData] = ... | adamw/elasticmq | core/src/main/scala/org/elasticmq/QueueData.scala | Scala | apache-2.0 | 617 |
/**
* 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 ... | ryan-williams/guacamole | src/test/scala/org/bdgenomics/guacamole/commands/SomaticPoCIndelCallerSuite.scala | Scala | apache-2.0 | 6,173 |
package leo.modules.agent.rules
package control_rules
import leo.Configuration
import leo.datastructures.{AnnotatedClause, Clause, Signature}
import leo.datastructures.blackboard.{DataType, Delta}
import leo.modules.GeneralState
/**
* This rule selects a clause from Unprocessed
* to be processed next.
*/
class S... | lex-lex/Leo-III | oldsrc/main/scala/leo/modules/agent/rules/control_rules/SelectionRule.scala | Scala | bsd-3-clause | 2,234 |
package com.harrys.hyppo.worker.actor.amqp
import java.util.UUID
import akka.testkit.TestActorRef
import com.harrys.hyppo.worker.actor.RabbitMQTests
import com.harrys.hyppo.worker.api.proto.CreateIngestionTasksRequest
import com.harrys.hyppo.worker.{TestConfig, TestObjects}
/**
* Created by jpetty on 9/17/15.
*/
c... | harrystech/hyppo-worker | worker/src/test/scala/com/harrys/hyppo/worker/actor/amqp/QueueProxyActorTests.scala | Scala | mit | 1,208 |
package emmy.distribution
import emmy.autodiff._
import scalaz.Scalaz.Id
trait NormalFactor[U[_], S] extends Factor with Node {
def mu: Expression[U, Double, S]
def sigma: Expression[U, Double, S]
def variable: Expression[U, Double, S]
override def parents = Seq(mu, sigma)
override lazy val logp: Expr... | fvlankvelt/emmy | src/main/scala/emmy/distribution/Normal.scala | Scala | apache-2.0 | 2,998 |
package org.leebli.parser.jar
import java.io.File
import java.io.FileInputStream
import org.junit.Test
import junit.framework.Assert
class JarParserTestCase {
@Test
def testParseJarOnly() {
val cl = ClassLoader.getSystemClassLoader();
val urls = System.getProperty("java.class.path").split(File.pathSep... | jonathan-macke/leebli | parsers/archive-parser/src/test/scala/org/leebli/parser/jar/JarParserTestCase.scala | Scala | apache-2.0 | 2,267 |
/*
* Copyright (c) 2014-2019 Israel Herraiz <[email protected]>
*
* 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/ex13Spec.scala | Scala | mit | 2,931 |
/*
* 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/ct-calculations | src/main/scala/uk/gov/hmrc/ct/ct600e/v2/E1033.scala | Scala | apache-2.0 | 1,226 |
package com.sksamuel.elastic4s
sealed trait Response[+U] {
/**
* Returns the http status code of the response.
*/
def status: Int
/**
* Returns the body included in the HTTP response or None if this response did not include a body.
*
* @return
*/
def body: Option[String]
/**
* ... | sksamuel/elastic4s | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/responses.scala | Scala | apache-2.0 | 2,921 |
/*******************************************************************************
* Copyright (c) 2019. Carl Minden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the ... | carlminden/anathema-roguelike | src/com/anathema_roguelike/fov/LightLevelShader.scala | Scala | gpl-3.0 | 1,114 |
package com.datawizards.dmg.customizations
import com.datawizards.dmg.TestModel._
import com.datawizards.dmg.dialects.{H2Dialect, HiveDialect, MySQLDialect, RedshiftDialect}
import com.datawizards.dmg.generator.HiveGenerator
import com.datawizards.dmg.{DataModelGenerator, DataModelGeneratorBaseTest}
import org.junit.r... | mateuszboryn/data-model-generator | src/test/scala/com/datawizards/dmg/customizations/UnderscoreConversionTest.scala | Scala | apache-2.0 | 1,935 |
package is.hail.utils.prettyPrint
import java.io.{StringWriter, Writer}
import java.util.ArrayDeque
import is.hail.utils.ArrayBuilder
import scala.annotation.tailrec
object Doc {
def render(doc: Doc, width: Int, ribbonWidth: Int, _maxLines: Int, out: Writer): Unit = {
// All groups whose formatting is still u... | danking/hail | hail/src/main/scala/is/hail/utils/prettyPrint/PrettyPrintWriter.scala | Scala | mit | 6,555 |
package recipestore.db.tinkerpop
import com.google.common.base.Strings
/**
* DSE as of when this class is created, still lacks Gremlin Fluent Api.Hence
* a bunch of helper classes for some common DSE Graph operations.
*
*/
object GremlinQueryFactory {
def addVertexScript(label: String, propertyMap: Map[Str... | prad-a-RuntimeException/semantic-store | src/main/scala/recipestore/db/tinkerpop/GremlinQueryFactory.scala | Scala | mit | 1,467 |
package com.sksamuel.avro4s.schemas
import com.sksamuel.avro4s.SchemaFor
import org.apache.avro.{Schema, SchemaBuilder}
import scala.quoted.Quotes
import scala.quoted.Expr
import scala.quoted.Type
object ScalaEnums:
inline def schema[T]: SchemaFor[T] = ${ schema }
def schema[T:Type](using quotes: Quotes): Expr[... | sksamuel/avro4s | avro4s-core/src/main/scala/com/sksamuel/avro4s/schemas/scalaenums.scala | Scala | apache-2.0 | 593 |
/*
* Copyright 2011-2018 Chris de Vreeze
*
* 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 agree... | dvreeze/nta | src/main/scala/eu/cdevreeze/nta/common/taxonomy/Taxonomy.scala | Scala | apache-2.0 | 3,958 |
package edu.cmu.lti.nlp.amr.ConceptInvoke
import edu.cmu.lti.nlp.amr._
import edu.cmu.lti.nlp.amr.Train._
import edu.cmu.lti.nlp.amr.BasicFeatureVector._
import java.io.File
import java.io.FileOutputStream
import java.io.PrintStream
import java.io.BufferedOutputStream
import java.io.OutputStreamWriter
import java.lang... | avikalpg/jamr | src/ConceptInvoke/Decoder.scala | Scala | bsd-2-clause | 848 |
/*
* Copyright 2015 Nicolas Rinaudo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed... | nrinaudo/scala-csv | laws/shared/src/main/scala-2.12/kantan/csv/laws/VersionSpecificReaderEngineLaws.scala | Scala | mit | 1,163 |
/***********************************************************************
* 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-fs/geomesa-fs-storage/geomesa-fs-storage-common/src/main/scala/org/locationtech/geomesa/fs/storage/common/partitions/FlatScheme.scala | Scala | apache-2.0 | 1,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 may ... | andrewor14/iolap | core/src/main/scala/org/apache/spark/deploy/master/ui/MasterWebUI.scala | Scala | apache-2.0 | 3,633 |
/*
* Grammar of Graphics in Scala
* Copyright (c) 2011, ggscala.org
*/
package org.ggscala.model
import org.scalatest._
import flatspec._
import matchers._
import org.ggscala.test.TestUtils
import org.ggscala.model.DataFrame._
class DataFrameSpec extends AnyFlatSpec with should.Matchers {
"A MemoryDataFrame" ... | drkeoni/ggscala | src/test/scala/org/ggscala/model/DataFrameSpec.scala | Scala | mit | 2,419 |
package org.jetbrains.plugins.scala
package lang
package references
import java.util
import java.util.Collections
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.module.{Module, ModuleUtilCore}
import com.intellij.openapi.roots.ModuleRootManager
import com.intellij.openapi.util.{Condition, T... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/lang/references/ScalaReferenceContributor.scala | Scala | apache-2.0 | 8,559 |
package org.jetbrains.plugins.scala
package codeInspection.typeChecking
import java.util.Comparator
import com.intellij.codeInsight.PsiEquivalenceUtil
import com.intellij.codeInspection.{ProblemHighlightType, ProblemsHolder}
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.projec... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/codeInspection/typeChecking/TypeCheckCanBeMatchInspection.scala | Scala | apache-2.0 | 16,207 |
/***********************************************************************
* 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-utils/src/test/scala/org/locationtech/geomesa/utils/stats/Z3FrequencyTest.scala | Scala | apache-2.0 | 4,307 |
/*
* 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 ... | brad-kaiser/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala | Scala | apache-2.0 | 36,094 |
package scodec.bits
import org.scalatest._
import org.scalatest.prop.GeneratorDrivenPropertyChecks
class BitsSuite extends FunSuite with Matchers with GeneratorDrivenPropertyChecks {
protected def serializationShouldRoundtrip[A](x: A): Unit = {
import java.io.{ ByteArrayInputStream, ByteArrayOutputStream, Obje... | aloiscochard/scodec-bits | core/src/test/scala/scodec/bits/BitsSuite.scala | Scala | bsd-3-clause | 645 |
package scray.hdfs
import scray.querying.queries.DomainQuery
import scray.querying.description.TableIdentifier
import com.twitter.util.FuturePool
import scray.querying.source.store.QueryableStoreSource
import scray.querying.description.Column
import HDFSQueryableSource._
import scray.querying.queries.KeyedQuery
import... | scray/scray | scray-hdfs/modules/scray-hdfs-service-adapter/src/main/scala/scray/hdfs/HDFSQueryableSource.scala | Scala | apache-2.0 | 3,699 |
/* PageLayout.scala
*
* Jim McBeath, November 3, 2005 (as PageLayout.java)
* converted to scala June 21, 2008
*/
package net.jimmc.mimprint
import net.jimmc.util.SResources
import java.awt.Dimension
import java.awt.Insets
import java.io.File
import java.io.PrintWriter
import java.text.MessageFormat
import java.u... | jimmc/mimprint | src/net/jimmc/mimprint/PageLayout.scala | Scala | gpl-2.0 | 10,365 |
/*
* 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 ... | sryza/spark | core/src/main/scala/org/apache/spark/scheduler/SchedulerBackend.scala | Scala | apache-2.0 | 1,330 |
/*
* 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 | external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaOffsetReader.scala | Scala | apache-2.0 | 19,511 |
package org.janzhou.native
import com.sun.jna._
trait libpmem extends Library {
def pmem_map(fd:Int):Pointer
def pmem_unmap(pmemaddr:Pointer, pmem_len:Long):Int
def pmem_is_pmem(pmemaddr:Pointer, pmem_len:Long):Int
def pmem_persist(addr:Pointer, len:Long):Unit
def pmem_msync(addr:Pointer, len:Long):Int
de... | janzhou/scala-native | src/main/scala/org/janzhou/native/libpmem.scala | Scala | apache-2.0 | 1,099 |
// lchannels - session programming in Scala
// Copyright (c) 2016, Alceste Scalas and Imperial College London
// 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 ... | scribble/scribble.github.io | src/main/jbake/assets/docs/lchannels/examples/src/main/scala/lchannels/examples/sleepingbarber/Customer.scala | Scala | apache-2.0 | 3,692 |
package io.taig.android.util.syntax
import android.graphics.Bitmap
import io.taig.android.util.operation
import scala.language.implicitConversions
trait bitmap {
implicit def utilBitmapSyntax(bitmap: Bitmap): operation.bitmap = {
new operation.bitmap(bitmap)
}
}
object bitmap extends bitmap
| Taig/Toolbelt | util/src/main/scala/io/taig/android/util/syntax/bitmap.scala | Scala | mit | 304 |
/*
* La Trobe University - Distributed Deep Learning System
* Copyright 2016 Matthias Langer ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apa... | bashimao/ltudl | blaze/src/main/scala/edu/latrobe/blaze/objectives/PeriodicTrigger.scala | Scala | apache-2.0 | 4,164 |
object Super {
class C { def ++=(x: Int) = () }
class D extends C { override def ++=(x: Int) = super.++=(x) }
class T1 { def foo: Int = ??? }
trait T2
new T1 with T2 {
override def foo: Int = super.foo
}
trait T3 { def foo: Unit }
trait T4 extends T3 {
this: C =>
abstract override def foo:... | mdemarne/scalahost | tests/src/test/resources/ScalaToMeta/Super/Original.scala | Scala | bsd-3-clause | 343 |
package com.campudus.tableaux.database.domain
import com.campudus.tableaux.database.model.TableauxModel._
import org.vertx.scala.core.json._
case class RawRow(
id: RowId,
rowLevelAnnotations: RowLevelAnnotations,
cellLevelAnnotations: CellLevelAnnotations,
values: Seq[_]
)
case class Row(
table: ... | campudus/tableaux | src/main/scala/com/campudus/tableaux/database/domain/row.scala | Scala | apache-2.0 | 1,558 |
package com.ignition.frame.mllib
import scala.xml.{ Elem, Node }
import org.apache.spark.mllib.stat.Statistics
import org.apache.spark.rdd.RDD.rddToPairRDDFunctions
import org.apache.spark.sql.{ DataFrame, Row }
import org.apache.spark.sql.types.StructType
import org.json4s.JValue
import org.json4s.JsonDSL._
import o... | uralian/ignition | src/main/scala/com/ignition/frame/mllib/ColumnStats.scala | Scala | apache-2.0 | 3,323 |
/*
* Copyright (c) 2014-2018 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache... | Wogan/monix | monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingSchedulerService.scala | Scala | apache-2.0 | 2,226 |
package com.thangiee.lolhangouts.ui.core
import android.content.Intent
trait TIntent {
implicit class IntentOp(i: Intent) {
def args(arguments: (String, Any)*): Intent = {
for ((k, v) ← arguments) {
v match {
case v: String => i.putExtra(k, v)
case v: Int => i... | Thangiee/LoL-Hangouts | src/com/thangiee/lolhangouts/ui/core/TIntent.scala | Scala | apache-2.0 | 586 |
// Copyright: 2010 - 2018 https://github.com/ensime/ensime-server/graphs
// License: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.util
import Predef.{ any2stringadd => _, _ => _ }
import scala.collection.{ Map, Set }
package object map {
implicit class RichMap[K, V](val map: Map[K, V]) extends Any... | yyadavalli/ensime-server | util/src/main/scala/org/ensime/util/map.scala | Scala | gpl-3.0 | 1,345 |
/*
* 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/internal/IterantHeadOptionL.scala | Scala | apache-2.0 | 3,302 |
package com.twitter.finagle
import com.twitter.finagle.util.LoadService
import com.twitter.util.{Closable, Future, Time}
import java.net.{InetSocketAddress, SocketAddress}
import java.util.logging.Logger
import scala.collection.mutable
/**
* Indicates that an [[com.twitter.finagle.Announcer]] was not found for the
... | travisbrown/finagle | finagle-core/src/main/scala/com/twitter/finagle/Announcer.scala | Scala | apache-2.0 | 3,701 |
/**
* Copyright 2013 Gianluca Amato <[email protected]>
*
* This file is part of JANDOM: JVM-based Analyzer for Numerical DOMains
* JANDOM 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 o... | rubino22/JDBeta | core/src/main/scala/it/unich/jandom/targets/jvmsoot/SootInterpretation.scala | Scala | lgpl-3.0 | 6,191 |
package sorm.test.general
import org.scalatest.{FunSuite, Matchers}
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import sorm._
import sorm.test.MultiInstanceSuite
@RunWith(classOf[JUnitRunner])
class TutorialSuite extends FunSuite with Matchers with MultiInstanceSuite {
import TutorialSu... | pjfanning/sorm | src/test/scala/sorm/test/general/TutorialSuite.scala | Scala | mit | 3,829 |
package org.locationtech.geomesa.plugin
import org.apache.wicket.behavior.SimpleAttributeModifier
import org.apache.wicket.markup.html.form.{Form, FormComponent}
import org.apache.wicket.markup.html.panel.Panel
import org.apache.wicket.model.{IModel, ResourceModel}
import org.geoserver.web.data.store.StoreEditPanel
im... | jwkessi/geomesa | geomesa-plugin/src/main/scala/org/locationtech/geomesa/plugin/GeoMesaStoreEditPanel.scala | Scala | apache-2.0 | 2,641 |
package wdl
import better.files.File
import org.scalatest.{FlatSpec, Matchers}
class WdlWorkflowImportsSpec extends FlatSpec with Matchers {
def addAndGetFile(name: String, source: String): String = {
val tempFile = File.newTemporaryFile(s"$name", ".wdl", Option(wdlDirectory)) write source
tempFile.name
... | ohsu-comp-bio/cromwell | wdl/src/test/scala/wdl/WdlWorkflowImportsSpec.scala | Scala | bsd-3-clause | 6,302 |
package eu.shiftforward.icfpc2015.model
import scala.collection.mutable
case class PowerPhrase(text: List[Char]) {
val movements = text.map(Command.char)
val length = text.length
}
object PowerPhrase {
def apply(text: String): PowerPhrase = new PowerPhrase(text.toList)
val knownPhrases = List(
PowerPhra... | ShiftForward/icfpc2015 | src/main/scala/eu/shiftforward/icfpc2015/model/PowerPhrase.scala | Scala | mit | 3,873 |
package com.example
object Decoration extends App {
trait Logger {
def debug(msg: String)
def error(msg: String)
}
def log[A, B](logger: Logger)(fn: A => B): A => B = {
input =>
try {
logger.debug(s"Start. <= $input")
val start = System.nanoTime
val output = fn(input)
... | enpassant/miniatures | src/main/scala/com/example/Composition.scala | Scala | apache-2.0 | 1,539 |
package com.gx.chain.oo
/**
* Copyright 2017 josephguan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | josephguan/scala-design-patterns | behavioral/chain-of-responsibility/src/main/scala/com/gx/chain/oo/RequestHandler.scala | Scala | apache-2.0 | 1,946 |
// Copyright (C) 2011-2012 the original author or authors.
// See the LICENCE.txt file distributed with this work for additional
// information regarding copyright ownership.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You ... | scalastyle/scalastyle | src/test/scala/org/scalastyle/CommentFilterDisabledTest.scala | Scala | apache-2.0 | 1,303 |
package com.airbnb.scheduler.api
import java.util.logging.{Level, Logger}
import javax.ws.rs._
import javax.ws.rs.core.{MediaType, Response}
import javax.ws.rs.core.Response.Status
import scala.Array
import com.airbnb.scheduler.config.SchedulerConfiguration
import scala.collection.mutable.ListBuffer
import com.airbnb... | doronin/chronos | src/main/scala/com/airbnb/scheduler/api/StatsResource.scala | Scala | apache-2.0 | 2,405 |
package org.igye.jfxutils.dialog
import org.junit.{Assert, Test}
class TextFieldVarNameAutocompleteTest {
@Test
def extractPartsAndFilterTest(): Unit = {
var res = TextFieldVarNameAutocomplete.extractPartsAndFilter("text1${varname}text2", 8)
Assert.assertEquals("text1${", res.left)
Ass... | Igorocky/jfxutils | src/test/scala/org/igye/jfxutils/dialog/TextFieldVarNameAutocompleteTest.scala | Scala | mit | 1,757 |
package grammarcomp
/**
* File: GrammarComparator.scala
* Date: 20/5/2013
* Author: Mikaël Mayer
* Purpose: Compares two grammars
*/
package repair
import grammar._
import CFGrammar._
import EBNFGrammar._
import generators._
import parsing._
import equivalence._
import utils._
import scala.collection.mutab... | epfl-lara/GrammarComparison | src/main/scala/grammarcomp/repair/RepairResult.scala | Scala | mit | 6,001 |
package org.knora.webapi.twirl
import org.knora.webapi.IRI
/**
* Represents a standoff datatype class of an XML tag.
*
* @param datatype the IRI of the standoff datatype class.
* @param attributeName the XML attribute that holds the typed value.
* @para... | musicEnfanthen/Knora | webapi/src/main/scala/org/knora/webapi/twirl/Mapping.scala | Scala | agpl-3.0 | 2,050 |
package com.outr.arango
import com.outr.arango.api.model.ArangoLinkFieldProperties
import scala.concurrent.{ExecutionContext, Future}
class View[D <: Document[D]](val name: String,
val includeAllFields: Boolean,
val fields: Map[Field[_], ArangoLinkFieldProper... | outr/arangodb-scala | driver/src/main/scala/com/outr/arango/View.scala | Scala | mit | 1,098 |
/*
* Copyright 2012 Twitter Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed t... | dmmata/zipkin | zipkin-web/src/main/scala/com/twitter/zipkin/web/Main.scala | Scala | apache-2.0 | 4,198 |
// src/main/scala/progscala2/traits/observer/Observer.scala
package progscala2.traits.observer
trait Observer[-State] { // <1>
def receiveUpdate(state: State): Unit
}
trait Subject[State] { // <2>
private var observers: List... | sunilrebel/programming-scala | examples/src/main/scala/progscala2/traits/observer/observer.scala | Scala | mpl-2.0 | 646 |
package com.sksamuel.elastic4s.requests.searches
import scala.language.implicitConversions
case class Highlight(options: HighlightOptions, fields: Iterable[HighlightField])
trait HighlightApi {
def highlightOptions(): HighlightOptions = HighlightOptions()
def highlight(field: String): HighlightField = HighlightF... | stringbean/elastic4s | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/HighlightApi.scala | Scala | apache-2.0 | 334 |
package io.skysail.api.ddd
/**
* DDD stands for the concepts of "Domain Driven Design".
*
* This sealed trait defines various elements to characterize
* these concepts.
*/
// tag::methods[]
sealed trait DddElement
// end::methods[]
/**
*
* @tparam T the type of the id attribute for this entity, e.g. Int... | evandor/skysail-server | skysail.api/src/io/skysail/api/ddd/ddd.scala | Scala | apache-2.0 | 822 |
/*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
... | deeplearning4j/deeplearning4j | scalnet/src/main/scala/org/deeplearning4j/scalnet/layers/core/ActivationLayer.scala | Scala | apache-2.0 | 1,859 |
package djinni
import djinni.ast._
import djinni.generatorTools._
import djinni.meta._
class JavaMarshal(spec: Spec) extends Marshal(spec) {
val javaNullableAnnotation = spec.javaNullableAnnotation.map(pkg => '@' + pkg.split("\\\\.").last)
val javaNonnullAnnotation = spec.javaNonnullAnnotation.map(pkg => '@' + p... | happybits/djinni | src/source/JavaMarshal.scala | Scala | apache-2.0 | 4,978 |
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); yo... | Chasego/kafka | core/src/test/scala/integration/kafka/api/SaslPlainSslEndToEndAuthorizationTest.scala | Scala | apache-2.0 | 7,758 |
package org.apache.spark.ml.util
import breeze.linalg._
import breeze.numerics._
import org.apache.spark.util.AccumulatorV2
import scala.collection.mutable.ArrayBuffer
/**
* @author sramirez
*/
class MatrixAccumulator(val rows: Int, val cols: Int, sparse: Boolean) extends AccumulatorV2[Matrix[Double], Matrix[Doubl... | sramirez/spark-RELIEFFC-fselection | src/main/scala/org/apache/spark/ml/util/MatrixAccumulator.scala | Scala | apache-2.0 | 1,536 |
/*
*
* * Copyright 2015 Skymind,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
* *
* * U... | phvu/nd4j | nd4j-scala-api/src/test/scala/org/nd4j/api/linalg/RichNDArraySpec.scala | Scala | apache-2.0 | 4,047 |
/*
Copyright 2013 Tomas Tauber
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
distri... | vidyar/twitterscalding | scalding-core/src/main/scala/com/twitter/scalding/mathematics/Matrix2.scala | Scala | apache-2.0 | 29,370 |
package org.apache.spark.streaming.flumedemo
import com.wallace.common.LogSupport
import org.apache.spark.SparkContext
import org.apache.spark.storage.StorageLevel
import org.apache.spark.streaming.dstream.ReceiverInputDStream
import org.apache.spark.streaming.flume.{FlumeUtils, SparkFlumeEvent}
import org.apac... | BiyuHuang/CodePrototypesDemo | demo/SparkDemo/src/main/scala/org/apache/spark/streaming/flumedemo/SparkStreamingFlumeDemo.scala | Scala | apache-2.0 | 2,056 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | tzulitai/flink | flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/runtime/batch/table/TableEnvironmentITCase.scala | Scala | apache-2.0 | 8,526 |
/*
* 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 ... | Aegeaner/spark | sql/core/src/test/scala/org/apache/spark/sql/sources/v2/DataSourceV2Suite.scala | Scala | apache-2.0 | 26,296 |
package scala.slick.driver
import java.util.UUID
import java.sql.{PreparedStatement, ResultSet}
import scala.slick.lifted._
import scala.slick.ast.{SequenceNode, Library, FieldSymbol, Node}
import scala.slick.util.MacroSupport.macroSupportInterpolation
import scala.slick.compiler.CompilerState
import scala.slick.jdbc.... | leithaus/strategies | slicktrix/src/main/scala/com/synereo/MyPostgresDriver.scala | Scala | cc0-1.0 | 4,827 |
import scala.tools.partest.JavapTest
object Test extends JavapTest {
def code = """
|case class Betty(i: Int) { def next = Betty(i+1) }
|:javap Betty
""".stripMargin
override def yah(res: Seq[String]) = {
def filtered = res filter (_ contains "public class Betty")
1 == filtered.size
}
}
| yusuke2255/dotty | tests/pending/run/repl-javap.scala | Scala | bsd-3-clause | 314 |
package org.denigma.nlp.pages
import akka.http.scaladsl.model._
import akka.http.scaladsl.server.{Directives, Route}
import scalacss.Defaults._
class Head extends Directives
{
lazy val webjarsPrefix = "lib"
lazy val resourcePrefix = "resources"
def mystyles = path("styles" / "mystyles.css"){
complete ... | antonkulaga/bio-nlp | app/jvm/src/main/scala/org/denigma/nlp/pages/Head.scala | Scala | mpl-2.0 | 706 |
package chandu0101.scalajs.react.components
package semanticui
import chandu0101.macros.tojs.JSMacro
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.VdomNode
import scala.scalajs.js
import scala.scalajs.js.`|`
/**
* This file is generated - submit issues instead of PR against it
*/
case class S... | rleibman/scalajs-react-components | core/src/main/scala/chandu0101/scalajs/react/components/semanticui/SuiListContent.scala | Scala | apache-2.0 | 1,028 |
package filodb.akkabootstrapper
import akka.actor.{ActorSystem, AddressFromURIString}
import akka.cluster.Cluster
import akka.testkit.{ImplicitSender, TestKit}
import com.typesafe.config.{Config, ConfigFactory}
import org.scalatest._
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSp... | filodb/FiloDB | akka-bootstrapper/src/test/scala/filodb/akkabootstrapper/SeedNodeDiscoverySpec.scala | Scala | apache-2.0 | 3,724 |
package com.github.mdr.mash.ns.view
import com.github.mdr.mash.functions.{ BoundParams, MashFunction, Parameter, ParameterModel }
import com.github.mdr.mash.runtime.MashObject
object PrintFunction extends MashFunction("view.print") {
object Params {
val Data = Parameter(
nameOpt = Some("data"),
sum... | mdr/mash | src/main/scala/com/github/mdr/mash/ns/view/PrintFunction.scala | Scala | mit | 648 |
/*
* Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the
* Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at
* http://www.apac... | snowplow/iglu | 0-common/scala-core/project/Json4sBuildSettings.scala | Scala | apache-2.0 | 1,032 |
/*
* 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 ... | jxw1102/Projet-merou | ModelChecker/src/ast/package.scala | Scala | apache-2.0 | 1,712 |
/*
* OpenVC, an open source VHDL compiler/simulator
* Copyright (C) 2010 Christian Reisinger
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the ... | chrreisinger/OpenVC | src/main/scala/at/jku/ssw/openvc/util/Position.scala | Scala | gpl-3.0 | 4,486 |
/*
* 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/ct-calculations | src/test/scala/uk/gov/hmrc/ct/accounts/validation/AC402Spec.scala | Scala | apache-2.0 | 2,216 |
/*
* Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* 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 Fou... | TiarkRompf/lancet | src/main/scala/generated/scala/IntStreamRow.scala | Scala | agpl-3.0 | 1,492 |
package io.github.dmitrib.elasticsearch.cli
import java.io.{InputStreamReader, BufferedReader, FileInputStream}
import java.util
import java.util.concurrent.{TimeUnit, ArrayBlockingQueue}
import com.beust.jcommander.{Parameter, Parameters}
import org.elasticsearch.action.ActionListener
import org.elasticsearch.action... | Digsolab/elasticsearch-cli | src/main/scala/io/github/dmitrib/elasticsearch/cli/MultiGetCommand.scala | Scala | apache-2.0 | 3,727 |
package com.karasiq.shadowcloud.webapp.components.common
import com.karasiq.bootstrap.Bootstrap.default._
import com.karasiq.shadowcloud.webapp.context.AppContext
import org.scalajs.dom
import rx.Var
import scalaTags.all._
import scala.scalajs.js
import scala.scalajs.js.annotation.JSGlobal
@js.native
@JSGlobal("pell... | Karasiq/shadowcloud | server/webapp/src/main/scala/com/karasiq/shadowcloud/webapp/components/common/Pell.scala | Scala | apache-2.0 | 1,812 |
/*
* Copyright 2015 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... | scottcutts/ct-calculations | src/main/scala/uk/gov/hmrc/ct/computations/CP19.scala | Scala | apache-2.0 | 904 |
package org.zouzias.spark.lucenerdd.examples.wikipedia
import org.apache.spark.sql.SparkSession
import org.apache.spark.SparkConf
import org.zouzias.spark.lucenerdd.LuceneRDD
import org.zouzias.spark.lucenerdd._
import org.zouzias.spark.lucenerdd.logging.Logging
/**
* Example that demonstrates how to search on a lis... | zouzias/spark-lucenerdd-examples | src/main/scala/org/zouzias/spark/lucenerdd/examples/wikipedia/CapitalsSearchExample.scala | Scala | apache-2.0 | 1,268 |
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.