code stringlengths 5 1M | repo_name stringlengths 5 109 | path stringlengths 6 208 | language stringclasses 1
value | license stringclasses 15
values | size int64 5 1M |
|---|---|---|---|---|---|
package com.badabum007.hell_guardians
object TestingWsheet {;import org.scalaide.worksheet.runtime.library.WorksheetSupport._; def main(args: Array[String])=$execute{;$skip(105);
println("Welcome to the Scala worksheet");$skip(119);
def fib1( n : Int) : Int = {
if (n < 2){
1
}
else {
... | badabum007/hell_guardians | .worksheet/src/com.badabum007.hell_guardians.TestingWsheet.scala | Scala | gpl-3.0 | 900 |
/*
* 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 ma... | harperjiang/enc-selector | src/main/scala/edu/uchicago/cs/encsel/classify/NeuralNetClassifier.scala | Scala | apache-2.0 | 3,373 |
package spire
package math
import spire.algebra._
import spire.syntax.field._
import spire.syntax.isReal._
import spire.syntax.nroot._
import spire.syntax.order._
import scala.math.{ScalaNumber, ScalaNumericConversions, ScalaNumericAnyConversions}
import java.lang.Math
object Complex extends ComplexInstances {
d... | rklaehn/spire | core/shared/src/main/scala/spire/math/Complex.scala | Scala | mit | 25,630 |
//package regolic.sat
//
//import regolic.asts.fol.Trees._
//import regolic.asts.core.Trees._
//
//import org.scalatest.FunSuite
//
//class ConjunctiveNormalFormSuite extends FunSuite {
//
// val q1 = freshPropositionalVariable("Q")
// val q2 = freshPropositionalVariable("Q")
// val q3 = freshPropositionalVariable("... | regb/cafesat | src/test/scala/cafesat/sat/ConjunctiveNormalFormSuite.scala | Scala | mit | 2,056 |
import sbt._
import Keys._
object Transform {
lazy val transformSources = TaskKey[Seq[File]]("transform-sources")
lazy val inputSourceDirectories = SettingKey[Seq[File]]("input-source-directories")
lazy val inputSourceDirectory = SettingKey[File]("input-source-directory")
lazy val inputSources = TaskKey[Seq[Fi... | xeno-by/old-scalameta-sbt | project/Transform.scala | Scala | bsd-3-clause | 4,763 |
import scala.quoted._
object scalatest {
inline def assert(condition: => Boolean): Unit = ${ assertImpl('condition) }
def assertImpl(cond: Expr[Boolean])(using qctx: QuoteContext) : Expr[Unit] = {
import qctx.tasty._
import util._
cond.unseal.underlyingArgument match {
case t @ Apply(TypeApply... | som-snytt/dotty | tests/run-macros/reflect-pos-fun/assert_1.scala | Scala | apache-2.0 | 622 |
package mesosphere.marathon.benchmarks.storage.zk
import java.nio.file.Files
import mesosphere.marathon.benchmarks.Benchmark
import mesosphere.marathon.integration.setup.ProcessKeeper
import mesosphere.marathon.test.zk.NoRetryPolicy
import mesosphere.util.PortAllocator
import mesosphere.util.state.zk.RichCuratorFrame... | yp-engineering/marathon | src/test/scala/mesosphere/marathon/benchmarks/storage/zk/ZkStorageBenchmark.scala | Scala | apache-2.0 | 5,900 |
/**
* Copyright (C) 2016 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... | orbeon/orbeon-forms | xforms/jvm/src/test/scala/org/orbeon/oxf/xforms/analysis/WhitespaceTest.scala | Scala | lgpl-2.1 | 2,515 |
/*
* 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/nn/PairwiseDistance.scala | Scala | apache-2.0 | 5,415 |
package lila.mod
import chess.{ Black, Color, White }
import org.joda.time.DateTime
import reactivemongo.api.bson._
import reactivemongo.api.ReadPreference
import lila.analyse.{ Analysis, AnalysisRepo }
import lila.common.ThreadLocalRandom
import lila.db.dsl._
import lila.evaluation.Statistics
import lila.evaluation.... | luanlv/lila | modules/mod/src/main/AssessApi.scala | Scala | mit | 10,162 |
/*
* 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 ... | quantiply-fork/samza | samza-core/src/main/scala/org/apache/samza/util/Util.scala | Scala | apache-2.0 | 10,346 |
package at.hazm.webserver.templates.xml
import java.util.ServiceLoader
import at.hazm.webserver.CustomTag
import org.slf4j.LoggerFactory
import org.w3c.dom.Element
import scala.collection.JavaConverters._
class CustomTagProcessor extends DocumentProcessor {
private[this] val logger = LoggerFactory.getLogger(getCl... | torao/hazmat-webserver | src/main/scala/at/hazm/webserver/templates/xml/CustomTagProcessor.scala | Scala | apache-2.0 | 1,511 |
package scala.pickling
package generator
import scala.collection.mutable
import HasCompat._
private[pickling] trait PicklingMacros
extends Macro with SourceGenerator with TypeAnalysis {
implicit val implContext = c
import c.universe._
import compat._
val symbols = new IrScalaSymbols[c.universe.type, c... | scala/pickling | core/src/main/scala/scala/pickling/generator/PicklingMacros.scala | Scala | bsd-3-clause | 4,076 |
/*
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... | twitter/tormenta | tormenta-avro/src/test/scala/com/twitter/tormenta/AvroTestHelper.scala | Scala | apache-2.0 | 2,871 |
/*
* Copyright 2009-2016 DigitalGlobe, 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 ag... | ttislerdg/mrgeo | mrgeo-mapalgebra/mrgeo-mapalgebra-rastermath/src/main/scala/org/mrgeo/mapalgebra/binarymath/AndMapOp.scala | Scala | apache-2.0 | 2,481 |
package com.github.diegopacheco.sandbox.scala.destructuring.bindings
import java.sql.Time
object DestructionApp extends App {
val tuple = ('a', 1)
val (char, digit) = tuple
case class Tweet(text:String,timestamp:Time)
val tweet = Tweet("just tweeting", Time.valueOf("12:00:00"))
val Tw... | diegopacheco/scala-playground | type-system-scala/src/main/scala/com/github/diegopacheco/sandbox/scala/destructuring/bindings/DestructionApp.scala | Scala | unlicense | 396 |
package net.sansa_stack.query.spark.gremlinator.utils
import org.apache.commons.configuration.BaseConfiguration
import org.apache.tinkerpop.gremlin.process.computer.GraphComputer
import org.apache.tinkerpop.gremlin.spark.process.computer.SparkGraphComputer
import org.apache.tinkerpop.gremlin.structure.Graph
object Co... | SANSA-Stack/SANSA-RDF | sansa-query/sansa-query-spark/src/main/scala/net/sansa_stack/query/spark/gremlinator/utils/Config.scala | Scala | apache-2.0 | 873 |
package dao
import javax.inject.{Inject, Singleton}
import models.User
import play.api.db.slick.{DatabaseConfigProvider, HasDatabaseConfigProvider}
import util.MyPostgresDriver
import scala.concurrent.Future
import scala.util.Try
@Singleton()
class UserDAO @Inject()(protected val dbConfigProvider: DatabaseConfigPro... | acrisci/hikerplaces.org | app/dao/UserDAO.scala | Scala | mit | 1,451 |
package com.twitter.finagle.ssl
import com.google.common.io.{Files => GuavaFiles, Resources}
import com.twitter.finagle.Service
import com.twitter.finagle.builder.{ClientBuilder, ServerBuilder}
import com.twitter.finagle.http._
import com.twitter.io.Buf
import com.twitter.util.{Await, Future, NonFatal}
import java.io.... | sveinnfannar/finagle | finagle-native/src/test/scala/com/twitter/finagle/ssl/SslTest.scala | Scala | apache-2.0 | 9,266 |
package com.twitter.finagle
import com.twitter.finagle.stats.DefaultStatsReceiver
import com.twitter.finagle.toggle.{StandardToggleMap, ToggleMap}
/**
* Package mux implements a generic RPC multiplexer with a rich protocol.
* Mux is itself encoding independent, so it is meant to use as the
* transport for other RP... | mkhq/finagle | finagle-mux/src/main/scala/com/twitter/finagle/mux/package.scala | Scala | apache-2.0 | 7,796 |
/**
* Copyright (C) 2009-2017 Lightbend Inc. <http://www.lightbend.com>
*/
package akka.routing
import scala.collection.immutable
import akka.actor.ActorRef
import akka.actor.ActorSelection
import akka.actor.InternalActorRef
import akka.japi.Util.immutableSeq
import akka.actor.NoSerializationVerificationNeeded
/**
... | rorygraves/perf_tester | corpus/akka/akka-actor/src/main/scala/akka/routing/Router.scala | Scala | apache-2.0 | 5,980 |
package abeel.genometools.gfa
import scala.collection.mutable.MutableList
case class Segment(val idx: Int, val sequenceLen: Int, val genomeIdx: List[Int], val incoming: MutableList[Int], val outgoing: MutableList[Int]) {
override def toString() = {
idx + "," + sequenceLen + "," + genomeIdx + "," + incoming + ",... | AbeelLab/genometools | scala/abeel/genometools/gfa/Segment.scala | Scala | gpl-3.0 | 338 |
package org.elastic.rest.scala.driver
import org.elastic.rest.scala.driver.RestBase._
import org.elastic.rest.scala.driver.RestBaseRuntimeTyped._
import org.elastic.rest.scala.driver.test_utils.SampleResources._
import org.elastic.rest.scala.driver.test_utils.SampleResourcesTyped._
import utest._
import scala... | Alex-At-Home/rest_client_library | rest_scala_core/jvm/src/test/scala/org/elastic/rest/scala/driver/RestResourcesTypedTests.scala | Scala | apache-2.0 | 2,578 |
package latis.ops
import latis.data.NumberData
import latis.dm._
import latis.util.LatisServiceException
import latis.util.StringUtils
import scala.math.BigDecimal.RoundingMode
class RoundWithPrecision(name: String, digits: Int) extends Operation {
override def applyToSample(sample: Sample): Option[Sample] = {
... | dlindhol/LaTiS | src/main/scala/latis/ops/RoundWithPrecision.scala | Scala | epl-1.0 | 1,550 |
package com.twitter.finagle.http.codec
import com.twitter.finagle.Failure
import com.twitter.finagle.dispatch.GenSerialClientDispatcher
import com.twitter.finagle.http.{Fields, Request, Response}
import com.twitter.finagle.http.exp.{Multi, StreamTransport}
import com.twitter.finagle.http.filter.HttpNackFilter
import c... | koshelev/finagle | finagle-http/src/main/scala/com/twitter/finagle/http/codec/HttpClientDispatcher.scala | Scala | apache-2.0 | 4,036 |
package org.nd4j.api
import org.nd4j.linalg.factory.NDArrayFactory
sealed trait NDOrdering {
val value:Char
}
object NDOrdering{
case object Fortran extends NDOrdering{
override val value: Char = NDArrayFactory.FORTRAN
}
case object C extends NDOrdering{
override val value: Char = NDArrayFactory.C
}... | taisukeoe/nd4s | src/main/scala/org/nd4j/api/NDOrdering.scala | Scala | apache-2.0 | 524 |
//======================================================================================================================
// Facsimile: A Discrete-Event Simulation Library
// Copyright © 2004-2020, Michael J Allen.
//
// This file is part of Facsimile.
//
// Facsimile is free software: you can redistribute it and/or mod... | MichaelJAllen/facsimile | facsimile-sfx/src/main/scala/org/facsim/sfx/package.scala | Scala | lgpl-3.0 | 2,052 |
package scala.lms
package common
import java.io.PrintWriter
import scala.reflect.SourceContext
trait FractionalOps extends ImplicitOps {
def infix_/[A,T](lhs: Rep[T], rhs: Rep[A])(implicit c: A => T, f: Fractional[T], mA: Typ[A], mT: Typ[T], pos: SourceContext) = fractional_divide(lhs,implicit_convert[A,T](rhs))
... | cedricbastin/copy-virtualization-lms-core | src/common/FractionalOps.scala | Scala | bsd-3-clause | 2,059 |
package org.scaladebugger.api.lowlevel.methods
import com.sun.jdi.request.{EventRequest, EventRequestManager, MethodEntryRequest}
import org.scalamock.scalatest.MockFactory
import org.scalatest.{FunSpec, Matchers, ParallelTestExecution}
import org.scaladebugger.api.lowlevel.DummyOperationException
import org.scaladebu... | ensime/scala-debugger | scala-debugger-api/src/test/scala/org/scaladebugger/api/lowlevel/methods/DummyMethodEntryManagerSpec.scala | Scala | apache-2.0 | 3,651 |
package be.selckin.apiwf.parser
import java.nio.file.{Paths, Files, Path}
import java.nio.charset.StandardCharsets
import scala.util.{Success, Failure}
import org.parboiled2.ParseError
import java.io.BufferedWriter
object RoundTripper extends App{
import Events._
val CHARSET = StandardCharsets.UTF_8
roundTri... | selckin/wow-combatlog-parser | parser/src/main/scala/be/selckin/apiwf/parser/RoundTripper.scala | Scala | apache-2.0 | 1,494 |
package object repos {
implicit class ApplyIfDefined[M](val obj: M) extends AnyVal {
/** Syntactic sugar to apply a function on an object only if an optional value is defined.
*
* If the optional value is None, the object returned as is, otherwise `f` is passed
* the value of the object and the... | trueaccord/repos | src/main/scala/repos/package.scala | Scala | apache-2.0 | 785 |
package net.rrm.ehour.ui.pm
import net.rrm.ehour.AbstractSpringWebAppSpec
import net.rrm.ehour.domain.{ProjectObjectMother, User}
import net.rrm.ehour.project.service.{ProjectAssignmentManagementService, ProjectAssignmentService, ProjectService}
import net.rrm.ehour.report.reports.ProjectManagerReport
import net.rrm.e... | momogentoo/ehour | eHour-wicketweb/src/test/scala/net/rrm/ehour/ui/pm/ProjectManagerPageSpec.scala | Scala | gpl-2.0 | 2,007 |
package io.buoyant.router.http
import com.twitter.finagle.Path
import com.twitter.finagle.buoyant.Dst
import com.twitter.finagle.http.Request
import io.buoyant.router.RoutingFactory.{UnidentifiedRequest, IdentifiedRequest}
import io.buoyant.test.{Awaits, Exceptions}
import org.scalatest.FunSuite
class PathIdentifierT... | linkerd/linkerd | router/http/src/test/scala/io/buoyant/router/http/PathIdentifierTest.scala | Scala | apache-2.0 | 5,238 |
package com.tdl.study.scala
/**
* 类
*/
object Func001 {
class Complex(real: Double, imaginary: Double) {
def re() = real
def im = imaginary
override def toString: String =
"" + re + (if (im < 0) "" else "+") + im + "i"
}
def main(args: Array[String]): Unit = {
val c = new Complex(3, ... | taideli/study-parent | study-scala/src/test/scala/com/tdl/study/scala/Func001.scala | Scala | gpl-3.0 | 403 |
package monocle.bench
import monocle.Iso
import monocle.bench.BenchModel._
import org.openjdk.jmh.annotations.{Benchmark, Scope, State}
@State(Scope.Benchmark)
class MonocleIsoBench extends IsoBench {
val w0_w1 = Iso[IntWrapper0, IntWrapper1](w => IntWrapper1(w.i))(w => IntWrapper0(w.i))
val w1_w2 = Iso[IntWrappe... | julien-truffaut/Monocle | bench/src/main/scala/monocle/bench/MonocleIsoBench.scala | Scala | mit | 1,933 |
package products
import enumspckg.MediaType.MediaType
import utils.{UserMetaData, DateMetaData}
/**
* Created by harsh on 10/8/14.
*/
sealed trait GlobalProducts{
def productId:Long
def upc:String
def name:String
def description:String
}
sealed trait Additional{
def isDiscountable:Boolean
def isSaleabl... | hardmettle/slick-postgress-samples | app/models/products/GlobalProducts.scala | Scala | apache-2.0 | 2,039 |
package dotty.tools.dotc
package transform
import scala.annotation.tailrec
import core._
import MegaPhase._
import collection.mutable
import Symbols._, Contexts._, Types._, StdNames._, NameOps._
import ast.Trees._
import util.Spans._
import typer.Applications.{isProductMatch, isGetMatch, isProductSeqMatch, productSele... | som-snytt/dotty | compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala | Scala | apache-2.0 | 38,842 |
/*
* 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 ... | jianran/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceStrategy.scala | Scala | apache-2.0 | 24,897 |
/*
* 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.nio.charset
private[charset] obj... | scala-js/scala-js | javalib/src/main/scala/java/nio/charset/UTF_16BE.scala | Scala | apache-2.0 | 493 |
/*
* Copyright 2001-2013 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... | travisbrown/scalatest | src/test/scala/org/scalatest/words/ResultOfATypeInvocationSpec.scala | Scala | apache-2.0 | 942 |
package example
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.PackageBase.VdomAttr
import japgolly.scalajs.react.vdom.{TagMod, TagOf}
import japgolly.scalajs.react.vdom.html_<^._
import org.scalajs.dom.html
import org.scalajs.dom.html.{Input, TableCell, TableHeaderCell}
case class ExcelDemoState(... | apantin/scala.js.test | client/src/main/scala/example/ExcelDemo.scala | Scala | apache-2.0 | 6,656 |
/*
* Copyright (c) 2015-2022 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.ap... | opencypher/openCypher | tools/tck-inspection/src/main/scala/org/opencypher/tools/tck/inspection/diff/GroupDiff.scala | Scala | apache-2.0 | 2,594 |
/*
* Copyright 2017 Datamountaineer.
*
* 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... | CodeSmell/stream-reactor | kafka-connect-azure-documentdb/src/main/scala/com/datamountaineer/streamreactor/connect/azure/documentdb/sink/DocumentDbWriter.scala | Scala | apache-2.0 | 4,562 |
/*
* 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 ... | sgururajshetty/carbondata | integration/spark-datasource/src/test/scala/org/apache/spark/sql/carbondata/datasource/TestUtil.scala | Scala | apache-2.0 | 5,366 |
package org.karps.grpc
import scala.concurrent.Future
import com.typesafe.scalalogging.slf4j.{StrictLogging => Logging}
import org.karps.Manager
import org.karps.structures.{ComputationId, _}
import org.karps.ops.{HdfsResourceResult, HdfsPath}
import karps.core.{interface => I}
import karps.core.{computation => C}... | tjhunter/karps | src/main/scala/org/karps/grpc/GrpcInternalManager.scala | Scala | apache-2.0 | 2,381 |
package xitrum.etag
import java.io.File
import java.security.MessageDigest
import io.netty.handler.codec.http.{HttpHeaders, HttpRequest, HttpResponse, HttpResponseStatus}
import HttpHeaders.Names._
import HttpResponseStatus._
import xitrum.{Action, Config}
import xitrum.util.{Gzip, Loader, LocalLruCache, Mime, SeriD... | georgeOsdDev/xitrum | src/main/scala/xitrum/etag/Etag.scala | Scala | mit | 4,201 |
package scalaz
trait Dual[A] {
val value : A
}
object Dual {
implicit def dual[A](a: A) = new Dual[A] {
val value = a
}
} | matheshar/simple-build-tool | src/sbt-test/java/separate/src/main/scala/Dual.scala | Scala | bsd-3-clause | 143 |
package data
import java.io.StringReader
import java.io.StringWriter
import scala.collection.JavaConverters._
import scala.collection.JavaConverters._
import org.apache.hadoop.io.IntWritable
import org.apache.hadoop.io.Text
import org.apache.spark.SparkConf
import org.apache.spark.SparkContext
import org.apache.spar... | suriarasai/HadoopShowcase | SimpleSparkExamples/src/data/Loading_SavingData.scala | Scala | cc0-1.0 | 2,707 |
/*
* 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 ... | gioenn/xSpark | core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosFineGrainedSchedulerBackend.scala | Scala | apache-2.0 | 17,406 |
package gitbucket.core.controller.api
import gitbucket.core.api.{AddACollaborator, ApiRepositoryCollaborator, ApiUser, JsonFormat}
import gitbucket.core.controller.ControllerBase
import gitbucket.core.service.{AccountService, RepositoryService}
import gitbucket.core.util.Implicits._
import gitbucket.core.util.{OwnerAut... | xuwei-k/gitbucket | src/main/scala/gitbucket/core/controller/api/ApiRepositoryCollaboratorControllerBase.scala | Scala | apache-2.0 | 3,052 |
import scala.io.Source._
/**
* http://rosalind.info/problems/gc/
*
* Created by oskiw on 26/11/2016.
*/
object GC extends App {
println(
fromFile("datasets/rosalind_gc.txt")
.mkString
.split(">")
.drop(1)
.map(_.split("\\\\r?\\\\n"))
.map(dna => (dna.head, dna.tail.mkString)... | oskiw/rosalind-solutions | src/GC.scala | Scala | apache-2.0 | 645 |
import org.junit.Test
import selfassembly.examples._
case class Person4(name: String, age: Int, pocket: Pocket)
case class Pocket(/*var */contents: Int)
final class D {
val x = 42
}
final class C {
val fld: D = new D
}
class ImmutableSpec {
@Test def test() {
val p = Person4("joe", 40, Pocket(10))
va... | phaller/selfassembly | src/test/scala/selfassembly/test4.scala | Scala | bsd-3-clause | 521 |
/*
* 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 ... | gioenn/xSpark | core/src/test/scala/org/apache/spark/util/TimeStampedHashMapSuite.scala | Scala | apache-2.0 | 6,032 |
import sbt._
import Keys._
import bintray.Plugin.bintrayPublishSettings
import bintray.Keys.{repository, bintrayOrganization, bintray}
import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
import com.typesafe.tools.mima.plugin.MimaKeys.{previousArtifact, binaryIssueFilters}
import java.io.{
Buffered... | matthughes/scala-js | project/Build.scala | Scala | bsd-3-clause | 38,225 |
package com.twitter.finagle.mysql
object Capability {
val LongPassword = 0x1 // new more secure passwords
val FoundRows = 0x2 // Found instead of affected rows
val LongFlag = 0x4 // Get all column flags
val ConnectWithDB = 0x8 // One can specify db on connect
val NoSchema = 0x10 // Don't allow database.table... | mkhq/finagle | finagle-mysql/src/main/scala/com/twitter/finagle/mysql/Capability.scala | Scala | apache-2.0 | 2,645 |
/**
* Copyright 2012 Filippo De Luca
*
* 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... | filosganga/fast-food | src/main/scala/org/filippodeluca/fastfood/Simulation.scala | Scala | apache-2.0 | 2,022 |
package controllers
import controllers.resource.MatchOverview
import controllers.resource.MatchResource
import models.db.retrieve.DbRetrieveMatch
import play.api.mvc.Controller
import play.api.libs.json.Json
import utils.rest.CORSAction
import utils.rest.CricStatAction
object MatchOutput extends Controller {
def... | ishakir/cric-stat | app/controllers/MatchOutput.scala | Scala | epl-1.0 | 1,567 |
/* ___ _ ___ _ _ *\
** / __| |/ (_) | | Your SKilL scala Binding **
** \__ \ ' <| | | |__ generated: 01.02.2019 ... | skill-lang/skill | src/main/scala/de/ust/skill/sir/api/internal/PoolBuiltinType.scala | Scala | bsd-3-clause | 4,607 |
/**
* Copyright (c) 2015, Cloudera, Inc. All Rights Reserved.
*
* Cloudera, Inc. licenses this file to you 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/LIC... | dougneedham/spark-timeseries | src/main/scala/com/cloudera/sparkts/DateTimeIndex.scala | Scala | apache-2.0 | 6,408 |
/**
* Copyright (C) 2014 MediaMath <http://www.mediamath.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | MediaMath/play-dynamodb | src/main/scala/play/api/libs/dynamodb/DdbValue.scala | Scala | apache-2.0 | 1,120 |
/*
* Copyright (c) 2011-2017 Interfaculty Department of Geoinformatics, University of
* Salzburg (Z_GIS) & Institute of Geological and Nuclear Sciences Limited (GNS Science)
* in the SMART Aquifer Characterisation (SAC) programme funded by the New Zealand
* Ministry of Business, Innovation and Employment (MBIE)
*
... | ZGIS/smart-portal-backend | app/controllers/csw/CswTransactions.scala | Scala | apache-2.0 | 4,472 |
/*
* 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/expressions/Expression.scala | Scala | apache-2.0 | 23,484 |
/*
* 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 ... | shaoxuan-wang/flink | flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/codegen/agg/AggsHandlerCodeGeneratorTest.scala | Scala | apache-2.0 | 3,987 |
package rpgboss.model
import rpgboss._
import rpgboss.lib._
import com.google.common.io.Files
import rpgboss.model.event.RpgEventState
import rpgboss.model.event.AddRemoveItem
import rpgboss.model.event.EventClass
import rpgboss.model.event.IntParameter
class ProjectSpec extends UnitSpec {
"ProjectDataStartup" shou... | DrDub/rpgboss | core/src/test/scala/rpgboss/model/ProjectSpec.scala | Scala | agpl-3.0 | 1,300 |
// ImportMultiple.scala
import util.Random
import util.Properties
val r = new Random
val p = Properties
| P7h/ScalaPlayground | Atomic Scala/atomic-scala-examples/examples/11_ImportsAndPackages-1stEdition/ImportMultiple.scala | Scala | apache-2.0 | 105 |
package org.helianto.core.service
import org.helianto.core.domain.State
import org.helianto.core.repository.StateRepository
import org.slf4j.{Logger, LoggerFactory}
import org.springframework.beans.factory.annotation.Value
import org.springframework.data.domain.Sort
import org.springframework.stereotype.Service
@Serv... | iservport/helianto-spring | src/main/scala/org/helianto/core/service/StateInstallService.scala | Scala | apache-2.0 | 1,169 |
package spinoco.protocol.mgcp
object ConnectionParameter {
case class PacketSent(value: Int) extends ConnectionParameter
case class OctetsSent(value: Int) extends ConnectionParameter
case class PacketReceived(value: Int) extends ConnectionParameter
case class OctetsReceived(value: Int) extends ConnectionParam... | Spinoco/protocol | mgcp/src/main/scala/spinoco/protocol/mgcp/ConnectionParameter.scala | Scala | mit | 550 |
package org.jetbrains.plugins.scala.codeInspection.unusedInspections
import com.intellij.codeHighlighting.{Pass, TextEditorHighlightingPass, TextEditorHighlightingPassFactory, TextEditorHighlightingPassRegistrar}
import com.intellij.openapi.components.ProjectComponent
import com.intellij.openapi.editor.Editor
import c... | jastice/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/codeInspection/unusedInspections/ScalaLocalVarCouldBeValPassFactory.scala | Scala | apache-2.0 | 1,095 |
package com.clemble.query.model
import org.specs2.mutable.Specification
class AndCompositionSpec extends Specification {
"exp and exp" in {
val fExp = Equals("A", "B")
val sExp = Equals("B", "C")
fExp and sExp shouldEqual And(fExp, sExp)
sExp and fExp shouldEqual And(sExp, fExp)
}
"And's compo... | clemble/scala-query-dsl | src/test/scala/com/clemble/query/model/AndCompositionSpec.scala | Scala | apache-2.0 | 804 |
package com.codahale.jerkson.deser
import org.codehaus.jackson.`type`.JavaType
import org.codehaus.jackson.map.{DeserializationContext, JsonDeserializer}
import org.codehaus.jackson.{JsonToken, JsonParser}
import org.codehaus.jackson.map.annotate.JsonCachable
@JsonCachable
class OptionDeserializer(elementType: JavaTy... | cphylabs/jerkson-old | src/main/scala/com/codahale/jerkson/deser/OptionDeserializer.scala | Scala | mit | 724 |
package org.bitcoins.core.crypto
import org.bitcoins.core.script.constant.ScriptToken
import org.bitcoins.core.script.crypto._
import org.bitcoins.core.script.flag.{ ScriptFlag, ScriptFlagUtil }
import org.bitcoins.core.script.result.ScriptErrorWitnessPubKeyType
import org.bitcoins.core.util.{ BitcoinSLogger, BitcoinS... | Christewart/bitcoin-s-core | src/main/scala/org/bitcoins/core/crypto/TransactionSignatureChecker.scala | Scala | mit | 8,785 |
/**
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.protocol
/** Status event. */
final class ExecStatusEvent private (
val status: String,
val channelName: Option[String],
val execId: Option[String],
val commandQueue: Vector[Stri... | Duhemm/sbt | protocol/src/main/contraband-scala/sbt/protocol/ExecStatusEvent.scala | Scala | bsd-3-clause | 2,220 |
/*
elm-scala: an implementation of ELM in Scala using MTJ
Copyright (C) 2014 Davi Pereira dos Santos
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at yo... | Crespo911/elm-scala | src/main/scala/ml/mtj/ResizableDenseVector.scala | Scala | gpl-3.0 | 918 |
/*
* 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/embeddings/XlnetEmbeddings.scala | Scala | apache-2.0 | 14,940 |
/**
* Copyright 2012-2014 Jorge Aliss (jaliss at gmail dot com) - twitter: @jaliss
*
* 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
*... | CryptArc/txbits | txbits/app/controllers/LoginPage.scala | Scala | agpl-3.0 | 2,991 |
/***********************************************************************
* Copyright (c) 2013-2015 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 ... | vpipkt/geomesa | geomesa-convert/geomesa-convert-avro/src/test/scala/org/locationtech/geomesa/convert/avro/AvroTransformersTest.scala | Scala | apache-2.0 | 1,446 |
/*
* Copyright 2014 IBM Corp.
*
* 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 ... | yeghishe/spark-kernel | client/src/test/scala/system/ClientCommSpecForSystem.scala | Scala | apache-2.0 | 13,266 |
package org.mbari.swing
import java.awt.image.BufferedImage
import javax.swing.{WindowConstants, JFrame}
/**
*
*
* @author Brian Schlining
* @since 2014-10-06T16:40:00
*/
object Swing {
/**
* Display an image in a named window
* @param name
* @param image
*/
def namedWindow(name: String, image: ... | hohonuuli/opencv-imgofinterest | src/main/scala/org/mbari/swing/Swing.scala | Scala | mit | 516 |
package org.flowpaint.util
import java.awt.event._
import javax.swing.JComponent
/**
* Mixin that provides a bit more sane mouse event listening.
*
* @author Hans Haggstrom
*/
trait MouseEventMixin extends JComponent {
addMouseWheelListener( new MouseAdapter() {
override def mouseWheelMoved(e: MouseWheel... | zzorn/flowpaint | src/main/scala/org/flowpaint/util/MouseEventMixin.scala | Scala | gpl-2.0 | 1,184 |
package org.sackfix.tester.tests
import org.sackfix.tester.simplefix.message.{MsgTypes, SessMessages}
/**
* Created by Jonathan during 2017.
*/
class T13_b_LogoutFromClient() extends SackFixTestSpec {
behavior of "Receive Logout message"
it should "ClientLogoutSequence" in {
val sess = new SessMessages(1... | PendaRed/sackfixtests | sf-fix-tester/src/test/scala/org/sackfix/tester/tests/T13_b_LogoutFromClient.scala | Scala | mit | 879 |
package edu.iitd.nlp.ListExtraction
import org.allenai.common.LoggingWithUncaughtExceptions
import org.scalatest._
import scala.collection.mutable
class TestMaxMatchScorer extends FlatSpec with LoggingWithUncaughtExceptions {
"MaxMatchScorer" should "not run correctly on a wrong match." in {
val scorer = new M... | satwantrana/list-extractor | src/test/scala/edu/iitd/nlp/ListExtraction/TestMaxMatchScorer.scala | Scala | mit | 1,482 |
package com.agoda.kafka.connector.jdbc.models
import com.agoda.kafka.connector.jdbc.models.Mode.{IncrementingMode, TimestampIncrementingMode, TimestampMode}
import org.scalatest.{Matchers, WordSpec}
class ModeTest extends WordSpec with Matchers {
"module" should {
"convert Mode to its string representation" in... | arpanchaudhury/kafka-jdbc-connector | src/test/scala/com/agoda/kafka/connector/jdbc/models/ModeTest.scala | Scala | apache-2.0 | 812 |
package com.guillaumemocquet
/**
* Bidding system
*/
class AuctionManager {
type Prices = Array[Float]
type Offers = Map[String, Prices]
/**
* Order Prices
*/
implicit object ArrayFloatOrdering extends Ordering[Prices] {
// In my case, the 1st element is the max ... | JimyRyan/Scala | TechnicalTest/AuctionManager/main.scala | Scala | mit | 3,143 |
package com.stellmangreene.pbprdf.plays
import org.eclipse.rdf4j.model.Resource
import org.eclipse.rdf4j.model.IRI
import org.eclipse.rdf4j.model.Value
import org.eclipse.rdf4j.model.vocabulary.RDF
import org.eclipse.rdf4j.repository.Repository
import com.stellmangreene.pbprdf.GamePeriodInfo
import com.stellmangreene... | andrewstellman/pbprdf | src/main/scala/com/stellmangreene/pbprdf/plays/ShotPlay.scala | Scala | mit | 3,948 |
/*
* 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-tail/shared/src/test/scala/monix/tail/IterantScanEvalSuite.scala | Scala | apache-2.0 | 3,854 |
package reswing
import scala.swing.{Color, Dimension, Font, Panel}
class RePanel(
background: ReSwingValue[Color] = (),
foreground: ReSwingValue[Color] = (),
font: ReSwingValue[Font] = (),
enabled: ReSwingValue[Boolean] = (),
minimumSize: ReSwingValue[Dimension] = (),
maximumSize: ReSwingValue... | guidosalva/REScala | Code/Extensions/RESwing/src/main/scala/reswing/RePanel.scala | Scala | apache-2.0 | 646 |
package net.liftmodules.fobohl.lib
import net.liftweb.http.js.JE.JsRaw
import net.liftweb.http.js.JsCmd
/**
* ==Angular Highlight Script Helper==
*
* Highlight script helper is a helper class that implements some commonly
* used highlight script functions.
*
*/
class HightlightSH() extends ScriptHelper {
... | karma4u101/FoBo | Highlight/HighlightJS-API/src/main/scala/net/liftmodules/fobohl/lib/HightlightSH.scala | Scala | apache-2.0 | 839 |
/**
* Copyright 2016, 2017, 2018 Gianluca Amato <gianluca.amato@unich.it>
*
* 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 Foun... | amato-gianluca/Jandom | extended/src/test/scala/it/unich/jandom/benchmarks/EQSLegacyFASTComparison.scala | Scala | lgpl-3.0 | 4,297 |
package api.auth
import org.http4s._
import org.http4s.dsl._
object AuthService {
val service = HttpService {
//case GET -> Root => Ok("user api")
case GET -> Root => Ok("user api")
case GET -> Root / name => Controller.index(name)
case POST -> Root/ name => Controller.addUser
//case GET -> Root... | andykais/telebum2 | services/web-api/src/main/scala/api/auth/Service.scala | Scala | mit | 412 |
package com.twitter.finagle.thrift.transport.netty3
import org.apache.thrift.protocol.{TProtocolFactory, TProtocolUtil, TType}
import org.apache.thrift.transport.TTransportException
import org.jboss.netty.buffer.ChannelBuffer
import org.jboss.netty.channel.{Channel, ChannelHandlerContext}
import org.jboss.netty.handle... | spockz/finagle | finagle-thrift/src/main/scala/com/twitter/finagle/thrift/transport/netty3/ThriftBufferedTransportDecoder.scala | Scala | apache-2.0 | 1,360 |
package dispatch.stream
import com.ning.http.client._
import com.ning.http.util.AsyncHttpProviderUtils.parseCharset
trait Strings[T] extends AsyncHandler[T] {
import AsyncHandler.STATE._
@volatile private var charset = "iso-8859-1"
@volatile private var state = CONTINUE
def onThrowable(t: Throwable) { }
d... | cb372/reboot | core/src/main/scala/stream/strings.scala | Scala | lgpl-3.0 | 1,256 |
/*
* Copyright (C) 2011 Thomas Amland
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is di... | tamland/qtjambi-for-scala | src/main/scala/com/trolltech/qt/QSignalEmitter.scala | Scala | gpl-3.0 | 6,347 |
/*
* Artificial Intelligence for Humans
* Volume 2: Nature Inspired Algorithms
* Java Version
* http://www.aifh.org
* http://www.jeffheaton.com
*
* Code repository:
* https://github.com/jeffheaton/aifh
*
* Copyright 2014 by Jeff Heaton
*
* Licensed under the Apache License, Version 2.0 (the "License");
* y... | PeterLauris/aifh | vol2/vol2-scala-examples/src/main/scala/com/heatonresearch/aifh/evolutionary/opp/selection/TruncationSelection.scala | Scala | apache-2.0 | 2,016 |
package com.zkay
import com.zkay.Listing1_2.Account
/*
* Repository interface for manipulating the DB (pg 13, listing 1.3)
*/
object Listing1_3 {
trait Criteria[T]
trait AccountRepository {
def query(accountNo: String): Option[Account]
def query(criteria: Criteria[Account]): Seq[Account]
def writ... | zkay/bookclub_notes | FunctionalAndReactiveDomainModeling/chapter1/src/main/scala/Listing1_3.scala | Scala | apache-2.0 | 402 |
package spire.math.prime
import spire.math.SafeLong
import org.scalatest.Matchers
import org.scalacheck.Arbitrary._
import org.scalatest._
import prop._
import org.scalacheck._
import Gen._
import Arbitrary.arbitrary
import spire.implicits._
import spire.math.ArbitrarySupport._
import Ordinal._
class FactorsCheck ... | lrytz/spire | tests/src/test/scala/spire/math/prime/FactorsCheck.scala | Scala | mit | 1,971 |
package edu.osu.cse.groenkeb.logic.parse.corepl
import scala.collection.mutable.Set
import edu.osu.cse.groenkeb.logic._
import edu.osu.cse.groenkeb.logic.proof._
import edu.osu.cse.groenkeb.logic.proof.rules._
import edu.osu.cse.groenkeb.logic.proof.rules.core._
import edu.osu.cse.groenkeb.logic.utils.StatefulGenerat... | bgroenks96/AutoMoL | parse-ext/src/main/scala/edu/osu/cse/groenkeb/logic/parse/corepl/CoreProofBuilder.scala | Scala | mit | 5,097 |
package org.webant.worker.console
import org.webant.commons.entity.{SiteConfig, TaskConfig}
import org.webant.commons.link.Progress
trait ConsoleOperationMBean {
def list(): Iterable[Iterable[String]]
def start(): Iterable[Iterable[String]]
def pause(): Iterable[Iterable[String]]
def stop(): Iterable[Iterable... | sutine/webant | webant-worker/src/main/scala/org/webant/worker/console/ConsoleOperationMBean.scala | Scala | apache-2.0 | 1,178 |
/**
* 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 ... | MyPureCloud/kafka | core/src/main/scala/kafka/controller/ControllerState.scala | Scala | apache-2.0 | 2,965 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 Enterprise Data Management Council
*
* 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... | edmcouncil/rdf-serializer | src/main/scala/org/edmcouncil/main/MainImpl.scala | Scala | mit | 2,107 |
package models.annotation
import com.scalableminds.util.enumeration.ExtendedEnumeration
object AnnotationVisibility extends ExtendedEnumeration {
type AnnotationVisibility = Value
val Private, Internal, Public = Value
}
| scalableminds/webknossos | app/models/annotation/AnnotationVisibility.scala | Scala | agpl-3.0 | 227 |
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.