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.geishatokyo.tezcatlipoca.assign import com.geishatokyo.tezcatlipoca.description.ClassDesc /** * * User: takeshita * Create: 12/07/01 19:10 */ trait AssignTemplateBuilder { def buildAssignTemplate( from : ClassDesc[_], to : ClassDesc[_]) : AssignTemplate[_,_] }
takezoux2/tezcatlipoca
src/main/scala/com/geishatokyo/tezcatlipoca/assign/AssignTemplateBuilder.scala
Scala
mit
284
package sclib.ops import org.scalatest.{FunSuite, Matchers} import sclib.ops.list._ class ListOpsSuite extends FunSuite with Matchers { test("unfoldRight") { ListOps.unfoldRight(0) { i => if (i > 5) None else Some((i, i + 1)) } should be(List(0, 1, 2, 3, 4, 5)) } test("unfoldLeft") { ListOps...
j-keck/sclib
src/test/scala/sclib/ops/ListOpsSuite.scala
Scala
mit
432
package epic.sequences import java.io._ import breeze.config.{Configuration, CommandLineParser} import epic.ontonotes.{NerType, ConllOntoReader} import collection.mutable.ArrayBuffer import breeze.linalg.DenseVector import epic.framework.{Example, ModelObjective} import breeze.optimize._ import breeze.util.Encoder imp...
jovilius/epic
src/main/scala/epic/sequences/SemiNERPipeline.scala
Scala
apache-2.0
6,560
package de.kaufhof.hajobs import java.util.concurrent.CountDownLatch import akka.actor.ActorSystem import de.kaufhof.hajobs.testutils.CassandraSpec import org.quartz.Scheduler import org.scalatest.mock.MockitoSugar import play.api.test._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurre...
bryanriddle/ha-jobs
ha-jobs-core/src/test/scala/de/kaufhof/hajobs/JobManagerIntegrationSpec.scala
Scala
apache-2.0
2,446
/* * 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 ...
zimmermatt/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/runtime/stream/table/TableSourceITCase.scala
Scala
apache-2.0
27,793
/* * Copyright (C) 2010 Romain Reuillon * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This progra...
openmole/openmole
openmole/third-parties/org.openmole.tool.cache/src/main/scala/org/openmole/tool/cache/AssociativeCache.scala
Scala
agpl-3.0
1,912
/* * Copyright 2015-2020 Noel Welsh * * 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...
underscoreio/doodle
java2d/src/main/scala/doodle/java2d/effect/Java2DPanel.scala
Scala
apache-2.0
5,705
/* * Copyright (c) 2010 Thorsten Berger <berger@informatik.uni-leipzig.de> * * 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 late...
ckaestne/KBuildMiner
src/test/scala/gsd/buildanalysis/linux/test/FuzzyParserTest.scala
Scala
gpl-3.0
1,017
package no.skytteren.elasticala.index import scala.concurrent.ExecutionContext import scala.concurrent.Future import scala.concurrent.Promise import org.elasticsearch.action.ActionListener import org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsRequestBuilder import org.elasticsearch.action.admin.in...
skytteren/elasticala
src/main/scala/no/skytteren/elasticala/index/Exists.scala
Scala
apache-2.0
1,336
/* * Copyright 2014–2017 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...
drostron/quasar
web/src/test/scala/quasar/api/AsPathSpec.scala
Scala
apache-2.0
1,510
package coursier.graph import coursier.core.{Module, Parse, Resolution, Version, VersionConstraint, VersionInterval} import coursier.util.Print.Colors import coursier.util.{Print, Tree} import coursier.util.Print.compatibleVersions import dataclass.data @data class Conflict( module: Module, version: String, wan...
alexarchambault/coursier
modules/core/shared/src/main/scala/coursier/graph/Conflict.scala
Scala
apache-2.0
4,005
/* * 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...
fusepoolP3/p3-silk
silk-core/src/main/scala/de/fuberlin/wiwiss/silk/plugins/transformer/substring/SubstringTransformer.scala
Scala
apache-2.0
1,434
/* * 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 ...
maropu/spark
mllib/src/test/scala/org/apache/spark/mllib/evaluation/BinaryClassificationMetricsSuite.scala
Scala
apache-2.0
8,240
package com.imaginea.activegrid.core.models /** * Created by nagulmeeras on 04/01/17. */ case class WorkflowContext(workflow: Workflow, currentStep: Option[Step], stepContextMap: Option[Map[Step, StepExecutonContext]], workFlowExecuti...
eklavya/activeGrid
src/main/scala/com/imaginea/activegrid/core/models/WorkflowContext.scala
Scala
apache-2.0
514
//macros import scala.quoted._ object Macros { //a specialization of the `findOwner` function from `sourcecode` for our purposes private def firstNonSyntheticOwner(using Quotes)(s: quotes.reflect.Symbol): quotes.reflect.Symbol = { import quotes.reflect._ if (s.flags.is(Flags.Synthetic)) firstNonSyntheticOw...
dotty-staging/dotty
tests/run-macros/i8877/Macros_1.scala
Scala
apache-2.0
569
package fpinscala.testing import fpinscala.laziness.Stream import fpinscala.state._ import fpinscala.parallelism._ import fpinscala.parallelism.Par.Par import fpinscala.monads.Functor import fpinscala.monads.Monad import Gen._ import Prop._ import fpinscala.laziness.Stream import java.util.concurrent.{Executors,Execut...
peterbecich/fpinscala
exercises/src/main/scala/fpinscala/testing/Gen.scala
Scala
mit
14,667
/* * Copyright (c) 2017 Magomed Abdurakhmanov, Hypertino * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * */ package com.hypertino.facade.workers import akka.ac...
hypertino/hyperfacade
src/main/scala/com/hypertino/facade/workers/NoMoreConnectionsWorker.scala
Scala
mpl-2.0
1,151
package org.hashids import scala.annotation.tailrec class Hashids( salt: String = "", minHashLength: Int = 0, alphabet: String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" ) { require(alphabet.length == alphabet.toSet.size , "check your alphabet for duplicates") require(alphabet.lengt...
ancane/hashids.scala
src/main/scala/org/hashids/Hashids.scala
Scala
mit
7,783
/* * 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 * distrib...
fusepoolP3/p3-silk
silk-server/src/main/scala/de/fuberlin/wiwiss/silk/server/model/NopDataSource.scala
Scala
apache-2.0
1,594
package play.boilerplate.parser.model object HttpMethod extends Enumeration { val Get = Value("GET") val Put = Value("PUT") val Post = Value("POST") val Head = Value("HEAD") val Delete = Value("DELETE") val Patch = Value("PATCH") val Options = Value("OPTIONS") }
Romastyi/sbt-play-boilerplate
sbt-plugin/lib/src/main/scala/play/boilerplate/parser/model/HttpMethod.scala
Scala
apache-2.0
278
/** * Copyright (C) 2016 Hurence (support@hurence.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 by a...
Hurence/log-island
logisland-components/logisland-processors/logisland-processor-botsearch/src/main/scala/com/hurence/botsearch/analytics/BatchTracesIndexer.scala
Scala
apache-2.0
9,976
/* * 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 ...
icexelloss/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/python/ExtractPythonUDFsSuite.scala
Scala
apache-2.0
5,185
package cassandra.cql sealed trait CqlDataType { def name:String } abstract class BaseDataType(val name: String) extends CqlDataType case class ListDt(subType: CqlDataType) extends BaseDataType(s"list<${subType.name}>") case class SetDt(subType: CqlDataType) extends BaseDataType(s"set<${subType.name}>") case class...
fabianmurariu/cassandra-scala-nuveau-driver
cql/lib/src/main/scala/cassandra/cql/CqlDataType.scala
Scala
apache-2.0
1,097
class Y[T](val i: Option[T]) extends AnyVal { def q: List[T] = { lazy val e: List[T] = i.toList e } }
AlexSikia/dotty
tests/untried/pos/t6358_2.scala
Scala
bsd-3-clause
120
package com.chrisrebert.lmvtfy import java.nio.charset.Charset import scala.collection.mutable import scala.util.Try import akka.util.ByteString import spray.http.{Uri, ContentType, MediaTypes, HttpCharsets, HttpEntity, HttpResponse} package object util { private val utf8name = "UTF-8" private val utf8Charset = C...
cvrebert/lmvtfy
src/main/scala/com/chrisrebert/lmvtfy/util/package.scala
Scala
mit
2,756
package info.cmlubinski.newslearning.web // Based off https://github.com/unfiltered/unfiltered-scalate.g8/blob/master/src/main/g8/src/main/scala/Scalate.scala import scala.collection.JavaConversions._ import de.neuland.jade4j.Jade4J import unfiltered.request.HttpRequest import unfiltered.response.{HtmlContent, Respons...
cmc333333/news-learning
src/main/scala/web/Jade.scala
Scala
mit
614
package scala.collection.scalameter.mutable.HashBag import org.scalameter.api._ object HashBag_forall extends HashBagBenchmark { def sizes = Gen.range("size")(20000, 200000, 20000) def funName: String = "forall{result:=true}" def fun(bag: Bag[BigInt]): Unit = bag.forall(_ => true) def listFun(list: List[B...
nicolasstucki/multisets
src/test/scala/scala/collection/scalameter/mutable/HashBag/HashBag_forall.scala
Scala
bsd-3-clause
379
package test import org.specs2.mutable.Specification import org.specs2.specification.Scope import solicitor.backend.HTTP import solicitor.Client class HTTPSpec extends Specification { sequential "HTTP Backend" should { "handle 200" in new httpBin { val res = client.getString("foo/bar") res mus...
gphat/solicitor
http/src/test/scala/HTTPSpec.scala
Scala
mit
822
import sbt._ class Plugins(info: ProjectInfo) extends PluginDefinition(info) { val scriptedDep = "org.scala-tools.sbt" % "scripted" % "0.7.4" val databinder_repo = Resolver.url("Databinder Repository", new java.net.URL("http://databinder.net/repo"))(Resolver.ivyStylePatterns) }
rubbish/cuke4duke-sbt-plugin
project/plugins/Plugins.scala
Scala
mit
284
/* * 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 la...
hubertp/scalatest
src/main/scala/org/scalatest/tools/PrintReporter.scala
Scala
apache-2.0
8,698
/* * Copyright (c) 2021 Couchbase, 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...
couchbaselabs/couchbase-spark-connector
src/main/scala/com/couchbase/spark/query/QueryRDD.scala
Scala
apache-2.0
3,923
package shred.man.cuda.cumath.tensor.matrix import jcuda.jcublas.JCublas2 import shred.man.cuda.cumath.CuValue import shred.man.cuda.cumath.tensor.vector.CuVector import shred.man.cuda.driver.CuContext import shred.man.cuda.utils.cuBlas._ //trait CublasMatrix //{ // def copy(x: CuMatrix, res: CuMatrix)(implicit ctx:...
shredzzz/shredman
cuda/src/main/scala/shred/man/cuda/cumath/tensor/matrix/CublasMatrix.scala
Scala
apache-2.0
3,777
package notebook.util import play.api.libs.json._ /** * Pluggable interface for completing Strings. */ case class Match(matchedValue: String, metadata: Map[String, String]) { def toJson = JsString(matchedValue) def toJsonWithDescription = { JsObject( Seq( ("value", JsString(matchedValue)), ...
radek1st/spark-notebook
modules/common/src/main/scala/notebook/util/StringCompletor.scala
Scala
apache-2.0
597
/* * Copyright 2020 Spotify AB. * * 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 ...
regadas/scio
scio-redis/src/main/scala/com/spotify/scio/redis/RedisMutator.scala
Scala
apache-2.0
9,317
package nest.sparkle.util import java.io.Closeable /** A simple managed resource. Use it safely like this: * for { * resource <- GetResource() * } { * useResource(resource) * } * * The resource will be close()d after it's used. */ object Managed { // LATER which SCALA ARM library to use? object...
mighdoll/sparkle
util/src/main/scala/nest/sparkle/util/Managed.scala
Scala
apache-2.0
621
/* * 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...
psyyz10/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/tensor/Convertable.scala
Scala
apache-2.0
3,438
package io.circe.generic import cats.data.Xor import io.circe.{ Decoder, Encoder, Json } import io.circe.generic.semiauto._ import io.circe.test.{ CodecTests, CirceSuite } import org.scalacheck.Prop.forAll import shapeless.CNil class SemiautoCodecTests extends CirceSuite with Examples { implicit def decodeQux[A: De...
groz/circe
generic/shared/src/test/scala/io/circe/generic/SemiautoCodecTests.scala
Scala
apache-2.0
1,231
package glasskey.resource import glasskey.config.OAuthConfig import glasskey.model.fetchers.Cookie import glasskey.model.{ValidatedToken, OAuthAccessToken} trait ProtectedResource { import glasskey.model.fetchers.{AuthHeader, RequestParameter} import glasskey.model.{InvalidRequest, InvalidToken, ValidatedData, P...
MonsantoCo/glass-key
glass-key-common/src/main/scala/glasskey/resource/ProtectedResource.scala
Scala
bsd-3-clause
1,896
package au.com.dius.pact.model import au.com.dius.pact.model.Fixtures._ import org.junit.runner.RunWith import org.specs2.mutable.Specification import org.specs2.runner.JUnitRunner @RunWith(classOf[JUnitRunner]) class MatchingSpec extends Specification { "Matching" should { import au.com.dius.pact.model.Matchin...
sangohan/pact-jvm
pact-jvm-matchers/src/test/scala/au/com/dius/pact/model/MatchingSpec.scala
Scala
apache-2.0
4,281
package org.flowpaint.pixelprocessors import org.flowpaint.pixelprocessor.SingleFunctionPixelProcessor /** * * * @author Hans Haggstrom */ class OneOver extends SingleFunctionPixelProcessor( "1f / " )
zzorn/flowpaint
src/main/scala/org/flowpaint/pixelprocessors/OneOver.scala
Scala
gpl-2.0
207
package net.scalytica.symbiotic.core.http import org.scalajs.dom import scala.scalajs.js.{Date, URIUtils} object Cookies { def set(cookieName: String, args: Map[String, String]): Unit = { val expiresAt = new Date(year = 9999, month = 12).toUTCString() val argStr = args.toList.map(kv => s"${kv._1}=$...
kpmeen/symbiotic
examples/symbiotic-client/src/main/scala/net/scalytica/symbiotic/core/http/Cookies.scala
Scala
apache-2.0
1,316
package scalaz.contrib package validator import java.text.SimpleDateFormat import java.util.UUID import scalaz._ import Scalaz._ import org.specs2.mutable.Specification class StringValidationSpec extends Specification { import string._ val errorMessage = "Generic Error Message" "match pattern" should { ...
non/scalaz-contrib
validation-ext/test/scala/validator/StringValidationSpec.scala
Scala
mit
2,635
//: ---------------------------------------------------------------------------- //: Copyright (C) 2015 Verizon. All Rights Reserved. //: //: Licensed under the Apache License, Version 2.0 (the "License"); //: you may not use this file except in compliance with the License. //: You may obtain a copy of the Licen...
runarorama/knobs
typesafe/src/main/scala/knobs/Typesafe.scala
Scala
apache-2.0
2,981
package demo import javax.servlet.http.HttpServletRequest import javax.ws.rs.core.Response import javax.ws.rs.{GET, Path, DefaultValue, QueryParam} import javax.ws.rs.core.{Response, Context} // import core geotrellis types import geotrellis._ // import some useful operations import geotrellis.raster.op._ import geo...
Tjoene/thesis
Case_Programs/geotrellis-0.7.0/demo/src/main/scala/demo/Demo.scala
Scala
gpl-2.0
5,024
package scalaprops abstract class Choose[A] { def withBoundaries(from: A, to: A): Gen[A] def choose(from: A, to: A): Gen[A] } object Choose { def apply[A](implicit A: Choose[A]): Choose[A] = A implicit val intChoose: Choose[Int] = new Choose[Int] { override def withBoundaries(from: Int, to: Int) = ...
scalaprops/scalaprops
gen/src/main/scala/scalaprops/Choose.scala
Scala
mit
2,438
package com.github.xubo245.gcdss.disease import java.text.SimpleDateFormat import java.util.Date import com.github.xubo245.gcdss.utils.Constants import org.apache.spark.{SparkConf, SparkContext} import org.bdgenomics.adam.rdd.ADAMContext import org.bdgenomics.adam.rdd.ADAMContext._ /** * Created by xubo on 2017/4/...
xubo245/GCDSS
src/main/scala/com/github/xubo245/gcdss/disease/CallDiseaseFromGenotype.scala
Scala
gpl-2.0
2,612
/* * Copyright 2013-2016 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 ap...
amuramatsu/Laika
core/src/main/scala/laika/io/IO.scala
Scala
apache-2.0
2,818
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
nagavallia/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/geotools/SftBuilderTest.scala
Scala
apache-2.0
7,272
package dk.bayes.math.discretise /** * This class represents histogram. http://en.wikipedia.org/wiki/Histogram * * @author korzekwad */ case class Histogram(startValue: Double, endValue: Double, binsNum: Int) { private val interval = (endValue - startValue) / (binsNum - 1) /** * Returns values for all bin...
danielkorzekwa/bayes-scala
src/main/scala/dk/bayes/math/discretise/Histogram.scala
Scala
bsd-2-clause
1,325
import scala.language.existentials object Test { def f() = { case class Bar(x: Int); Bar } def g() = { case class Bar(x: Int); Bar(5) } def h() = { case object Bar ; Bar } val f1 = f() val g1 = g() val h1 = h() def m[T: Manifest](x: T) = println(manifest[T]) def main(args: Array[String]): Unit = { ...
dotty-staging/dotty
tests/pending/run/t1195-old.scala
Scala
apache-2.0
487
package org.usagram.clarify.error import org.usagram.clarify.{ Indefinite, Tags } import org.scalatest._ class OutOfRangeSpec extends FunSpec { import Matchers._ describe("#message") { val error = OutOfRange(10, 100, isInclusive = true) describe("when Tags#label is Some(string)") { val tags = Tag...
takkkun/clarify
core/src/test/scala/org/usagram/clarify/error/OutOfRangeSpec.scala
Scala
mit
1,020
package scalaoauth2.provider import java.net.URLDecoder case class FetchResult(token: String, params: Map[String, String]) trait AccessTokenFetcher { def matches(request: ProtectedResourceRequest): Boolean def fetch(request: ProtectedResourceRequest): FetchResult } object RequestParameter extends AccessToken...
centraldesktop/scala-oauth2-provider
scala-oauth2-core/src/main/scala/scalaoauth2/provider/AccessTokenFetcher.scala
Scala
mit
2,086
package org.apache.flink.contrib.tensorflow.models import java.io.Serializable /** * Represents a TensorFlow model. * * A model is a self-contained, hermetic graph with associated assets * and well-defined run methods. * * A model encapsulates state (a graph) and the means to persist it (checkpointing). ...
cookieai/flink-tensorflow
flink-tensorflow/src/main/scala/org/apache/flink/contrib/tensorflow/models/Model.scala
Scala
apache-2.0
1,324
/* * Copyright (c) 2013 Miles Sabin * * 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...
mandubian/shapeless
core/src/main/scala/shapeless/syntax/std/functions.scala
Scala
apache-2.0
1,422
package com.twitter.util.jackson import com.fasterxml.jackson.annotation.JsonInclude import com.fasterxml.jackson.annotation.JsonInclude.Include import com.fasterxml.jackson.core.json.JsonWriteFeature import com.fasterxml.jackson.core.util.DefaultIndenter import com.fasterxml.jackson.core.util.DefaultPrettyPrinter imp...
twitter/util
util-jackson/src/main/scala/com/twitter/util/jackson/ScalaObjectMapper.scala
Scala
apache-2.0
27,658
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
shaneknapp/spark
mllib/src/test/scala/org/apache/spark/ml/clustering/BisectingKMeansSuite.scala
Scala
apache-2.0
13,244
package br.unb.cic.poo.gol /* Parte do padrao de projeto Memento. Cria o "memento", a restauracao fica por conta do CareTaker. */ object Originator { /* Metodo para criar o memento. */ def createMemento(currentGen: Array[Array[Cell]], revivedCells: Int, killedCells: Int): Memento = { val generation = new Meme...
PeterTowers/TP1-022017
GoLScala/GoLScala_UN/src/br/unb/cic/poo/gol/Originator.scala
Scala
mit
431
package roc package postgresql package transport import java.nio.ByteOrder import java.nio.charset.Charset import org.jboss.netty.buffer.{ChannelBuffer, ChannelBuffers} object Buffer { val NullLength = -1 // denotes a SQL NULL value when reading a length coded binary. val EmptyString = new String /** * Calc...
penland365/roc
core/src/main/scala/roc/postgresql/transport/Buffer.scala
Scala
bsd-3-clause
10,253
import sbt._ class Plugins(info: ProjectInfo) extends PluginDefinition(info) { val sbtIdeaRepo = "sbt-idea-repo" at "http://mpeltonen.github.com/maven/" val sbtIdea = "com.github.mpeltonen" % "sbt-idea-plugin" % "0.4.0" } // vim: set ts=4 sw=4 et:
masayukig/sb
project/plugins/Plugins.scala
Scala
apache-2.0
263
package org.jetbrains.plugins.scala package codeInsight package intention package controlFlow import com.intellij.testFramework.EditorTestUtil /** * @author Ksenia.Sautina * @since 6/6/12 */ class InvertIfConditionIntentionTest extends intentions.ScalaIntentionTestBase { import EditorTestUtil.{CARET_TAG => C...
JetBrains/intellij-scala
scala/codeInsight/test/org/jetbrains/plugins/scala/codeInsight/intention/controlFlow/InvertIfConditionIntentionTest.scala
Scala
apache-2.0
8,919
import scala.language.experimental.macros object Test extends App { def foo[U]: Unit = macro Impls.foo[U] foo[Int] }
scala/scala
test/files/run/macro-impl-tparam-typetag-is-optional/Macros_Test_2.scala
Scala
apache-2.0
121
/** A package whose purpose is used to * 1. Compare several trivial Fibonacci sequence implementations. * 2. Practice writing package level code off the top of my head. * 3. Reacquaint myself with Scala after doing Haskell for a while. * 4. Learn how to do generate nice docs from docstrings. */ package fibcomp...
grscheller/scheller-linux-archive
grok/Scala2/learnScala/fib/fibcompare.scala
Scala
bsd-3-clause
1,853
package edu.uw.at.iroberts.wirefugue.pcap import java.nio.ByteOrder import java.nio.ByteOrder.{BIG_ENDIAN, LITTLE_ENDIAN} import scala.collection.generic.CanBuildFrom import scala.collection.mutable import scala.collection.mutable.ArrayBuffer /** Operations to extract from any IndexedSeq[Byte] (which includes * a...
robertson-tech/wirefugue
sensor/src/main/scala/edu/uw/at/iroberts/wirefugue/pcap/ByteSeqOps.scala
Scala
gpl-3.0
3,958
package com.brkyvz.spark.linalg import java.lang.reflect.InvocationTargetException import java.lang.{Double => JavaDouble} import org.apache.spark.mllib.linalg._ /** Util methods that use reflection to call into MLlib's private BLAS methods. */ object BLASUtils { @transient private lazy val clazz: Class[_] = Clas...
brkyvz/lazy-linalg
src/main/scala/com/brkyvz/spark/linalg/BLASUtils.scala
Scala
apache-2.0
9,418
/* * The MIT License * * Copyright (c) 2021 Fulcrum Genomics * * 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...
fulcrumgenomics/commons
src/test/scala/com/fulcrumgenomics/commons/collection/LeastRecentlyUsedCacheTest.scala
Scala
mit
3,583
/* * 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
core/src/main/scala/quasar/fs/constantPlans.scala
Scala
apache-2.0
3,106
/** * 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...
CiscoCloud/exhibitor-mesos-framework
src/main/test/ly/stealth/mesos/exhibitor/HttpServerTest.scala
Scala
apache-2.0
4,273
/* * 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 ...
cbickel/openwhisk
tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/BlockingInvokeOneActionSimulation.scala
Scala
apache-2.0
3,674
package com.seanshubin.templater.domain class CommandExecutorImpl(fileSystem: FileSystem, textReplacements: Map[String, String]) extends CommandExecutor { override def execute(command: CopyFileCommand): Unit = { if (!fileSystem.isDirectory(command.origin)) { val contents = fileSystem.loadFileIntoString(com...
SeanShubin/generate-from-template
domain/src/main/scala/com/seanshubin/templater/domain/CommandExecutorImpl.scala
Scala
unlicense
669
package chess case class Piece(color: Color, role: Role) { def is(c: Color) = c == color def is(r: Role) = r == role def isNot(r: Role) = r != role def oneOf(rs: Set[Role]) = rs(role) def isMinor = oneOf(Set(Knight, Bishop)) def isMajor = oneOf(Set(Queen, Rook)) def forsyth: Char = if (color == ...
niklasf/scalachess
src/main/scala/Piece.scala
Scala
mit
1,640
/* * 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 ...
prateekm/samza
samza-core/src/main/scala/org/apache/samza/config/factories/PropertiesConfigFactory.scala
Scala
apache-2.0
1,740
package debop4s.core.utils import java.util import debop4s.core.{AbstractCoreFunSuite, ValueObject} import scala.collection.immutable.IndexedSeq import scala.concurrent.Await import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ import scala.util.{Failure, Success} /** * debo...
debop/debop4s
debop4s-core/src/test/scala/debop4s/core/utils/MappersFunSuite.scala
Scala
apache-2.0
4,361
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.3 * @date Wed Aug 26 18:41:26 EDT 2009 * @see LICENSE (MIT style license file). */ package scalation.linalgebra.gen import scala.Numeric._ import scala.collection.Traversable import sc...
NBKlepp/fda
scalation_1.3/scalation_mathstat/src/main/scala/scalation/linalgebra/gen/VectorN.scala
Scala
mit
33,968
/* * 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 ...
h2oai/sparkling-water
scoring/src/main/scala/ai/h2o/sparkling/ml/params/H2OAutoEncoderExtraParams.scala
Scala
apache-2.0
4,879
/* * Copyright (c) 2013-14 Miles Sabin * * 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...
mandubian/shapeless
core/src/main/scala/shapeless/singletons.scala
Scala
apache-2.0
6,439
// Copyright 2016 zakski. // 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 may obtain a copy of the License ...
zakski/project-maeve
src/main/scala/com/szadowsz/maeve/core/browser/MaeveConf.scala
Scala
apache-2.0
7,721
package org.jetbrains.plugins.dotty.lang.psi.types import com.intellij.psi._ import org.jetbrains.plugins.scala.extensions.PsiClassExt import org.jetbrains.plugins.scala.lang.psi.api.statements.ScTypeAliasDefinition import org.jetbrains.plugins.scala.lang.psi.types._ import org.jetbrains.plugins.scala.lang.psi.types.a...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/dotty/lang/psi/types/DottyPsiTypeBridge.scala
Scala
apache-2.0
2,499
package org.phenoscape.scowl.ofn import org.semanticweb.owlapi.apibinding.OWLManager import org.semanticweb.owlapi.model._ import scala.jdk.CollectionConverters._ trait ClassAxioms { private val factory = OWLManager.getOWLDataFactory object SubClassOf { def apply(annotations: Set[OWLAnnotation], subClass:...
phenoscape/scowl
src/main/scala/org/phenoscape/scowl/ofn/ClassAxioms.scala
Scala
mit
4,440
package pages.theme import net.liftweb.http.js.JsCmds._ import net.liftweb.util.Helpers trait BWAUtils { def timeFrom(ts: Long) = { val id = Helpers.nextFuncName <span id={id}></span> ++ Script(Run(s"$$('#$id').text(moment.unix(${ts/1000}).fromNow());")) } }
slynx-fw/slynx-demo
app/pages/theme/utils.scala
Scala
apache-2.0
274
/* * 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
yggdrasil/src/test/scala/quasar/yggdrasil/table/BlockSortSpec.scala
Scala
apache-2.0
14,976
package com.twitter.zipkin.storage.hbase.mapping import com.twitter.zipkin.storage.hbase.utils.{HBaseTable, IDGenerator} import org.apache.hadoop.hbase.util.Bytes case class ServiceMapping(id: Long, value: Array[Byte], mappingTable: HBaseTable, idGen: IDGenerator) extends Mapping { val parent: Option[Mapping] = Non...
pteichman/zipkin
zipkin-hbase/src/main/scala/com/twitter/zipkin/storage/hbase/mapping/ServiceMapping.scala
Scala
apache-2.0
465
package org.http4s package headers class ContentTypeHeaderSpec extends HeaderLaws { checkAll("Content-Type", headerLaws(`Content-Type`)) }
aeons/http4s
tests/src/test/scala/org/http4s/headers/ContentTypeHeaderSpec.scala
Scala
apache-2.0
142
package at.logic.gapt.integration_tests import at.logic.gapt.examples.LinearExampleProof import at.logic.gapt.expr._ import at.logic.gapt.expr.fol.Utils import at.logic.gapt.expr.hol.containsQuantifier import at.logic.gapt.proofs.{ Sequent, Ant } import at.logic.gapt.proofs.expansionTrees.FOLInstanceTermEncoding impor...
loewenheim/gapt
src/test/scala/at/logic/gapt/integration_tests/CutIntroTest.scala
Scala
gpl-3.0
2,783
package play.api.libs.json import org.specs2.mutable._ import play.api.libs.json._ import play.api.libs.json.Json._ import play.api.libs.functional.syntax._ import scala.util.control.Exception._ import java.text.ParseException import play.api.data.validation.ValidationError object JsonSpec extends Specification {...
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/play-json/src/test/scala/play/api/libs/json/JsonSpec.scala
Scala
mit
8,943
package com.cloudray.scalapress.search /** @author Stephen Samuel */ case class SearchResult(refs: Seq[ItemRef] = Nil, facets: Seq[Facet] = Nil, count: Long = 0) case class ItemRef(id: Long, itemType: Long, name: String, ...
vidyacraghav/scalapress
src/main/scala/com/cloudray/scalapress/search/SearchResult.scala
Scala
apache-2.0
529
package org.apache.spark.ml.parity.clustering import org.apache.spark.ml.parity.SparkParityBase import org.apache.spark.ml.clustering.KMeans import org.apache.spark.ml.feature.{StringIndexer, VectorAssembler} import org.apache.spark.ml.{Pipeline, Transformer} import org.apache.spark.sql.DataFrame /** * Created by h...
combust-ml/mleap
mleap-spark/src/test/scala/org/apache/spark/ml/parity/clustering/KMeansParitySpec.scala
Scala
apache-2.0
1,002
package angular import com.greencatsoft.angularjs._ import com.greencatsoft.angularjs.core.Scope import com.greencatsoft.angularjs.internal.ServiceProxy import scala.language.experimental.macros import scala.scalajs.js import scala.scalajs.js.annotation.JSExportDescendentClasses import scalatags.Text trai...
tmonney/scalajs-ionic
scalajs/src/main/scala/angular/BaseDirective.scala
Scala
mit
922
package health import akka.actor.{ActorSystem, Props} import akka.io.IO import spray.can.Http import akka.pattern.ask import akka.util.Timeout object Boot extends App { implicit val system = ActorSystem("healt-check") val service = system.actorOf(Props[CheckerActor], "checker-service") implicit val timeout = ...
ExpatConnect/health
src/main/scala/health/Boot.scala
Scala
mit
433
/** * Copyright (C) 2007 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 prog...
brunobuzzi/orbeon-forms
xforms/jvm/src/main/scala/org/orbeon/oxf/xforms/model/XFormsModelAction.scala
Scala
lgpl-2.1
2,161
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/amls-frontend
test/utils/StatusMocks.scala
Scala
apache-2.0
1,140
/* * Copyright 2001-2014 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...
dotty-staging/scalatest
scalatest-test/src/test/scala/org/scalatest/AsyncFlatSpecSpec.scala
Scala
apache-2.0
27,935
package io.youi.path object ClosePath extends PathAction { override def draw(context: Context, x: Double, y: Double, scaleX: Double, scaleY: Double): Unit = context.close() override def toString: String = "ClosePath" }
outr/youi
ui/js/src/main/scala/io/youi/path/ClosePath.scala
Scala
mit
225
package views.html.helper import play.api.templates.Html import play.api.mvc.{Call} import play.api.{Play, Mode} import controllers.routes /** Make the app explicit for testing */ trait RequiresApp { implicit val app = play.api.Play.current } /** * Resolves the path to a script depending on the current environmen...
myclabs/CarbonDB-UI
app/views/mainScriptSrc.scala
Scala
gpl-3.0
661
package mesosphere.marathon package integration import mesosphere.AkkaIntegrationTest import mesosphere.marathon.integration.facades.ITEnrichedTask import mesosphere.marathon.integration.facades.MarathonFacade._ import mesosphere.marathon.integration.facades.MesosFacade.{ ITMesosState, ITResources } import mesosphere....
guenter/marathon
src/test/scala/mesosphere/marathon/integration/ResidentTaskIntegrationTest.scala
Scala
apache-2.0
10,976
package com.gu.notificationschedule.notifications import com.gu.notificationschedule.NotificationScheduleConfig import com.gu.notificationschedule.cloudwatch.CloudWatchMetrics import com.gu.notificationschedule.dynamo.NotificationsScheduleEntry import okhttp3._ import org.apache.http.client.utils.URIBuilder import org...
guardian/mobile-n10n
schedulelambda/src/main/scala/com/gu/notificationschedule/notifications/RequestNotification.scala
Scala
apache-2.0
2,864
/* * Copyright 2015 Otto (GmbH & Co KG) * * 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...
ottogroup/flink-spector
flinkspector-datastream/src/test/scala/io/flinkspector/datastream/functions/ParallelFromStreamRecordsFunctionSpec.scala
Scala
apache-2.0
6,274
/* * Copyright 2007-2011 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
lift/framework
persistence/record/src/main/scala/net/liftweb/record/field/EmailField.scala
Scala
apache-2.0
1,793
/* * Copyright 2017-2018 47 Degrees, LLC. <http://www.47deg.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 require...
frees-io/freestyle
modules/integrations/fs2/shared/src/main/scala/free/fs2.scala
Scala
apache-2.0
3,242
package controllers import akka.stream.scaladsl.{Source,Sink} import akka.util.ByteString import org.specs2.mock.Mockito import org.specs2.specification.Scope import scala.concurrent.Future import com.overviewdocs.blobstorage.BlobStorage import com.overviewdocs.models.BlobStorageRef import com.overviewdocs.test.facto...
overview/overview-server
web/test/controllers/DocumentSetFileControllerSpec.scala
Scala
agpl-3.0
2,831
/* * Copyright (c) 2014. Regents of the University of California * * 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 require...
fnothaft/avocado
avocado-core/src/main/scala/edu/berkeley/cs/amplab/avocado/preprocessing/MarkDuplicates.scala
Scala
apache-2.0
1,153