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
// Copyright 2019 EPFL DATA Lab (data.epfl.ch) // // 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...
epfldata/squid
src/main/scala/squid/ir/ScalaTyping.scala
Scala
apache-2.0
14,932
package es.upm.fi.oeg.morph.tc import collection.JavaConversions._ class D006Test extends R2RMLTest("D006-1table1primarykey1column1row") { "TC0006a" should "gen 1 in NG" in{ val dg=generate("R2RMLTC0006a") dg.getGraph(dg.listGraphNodes.toList.head).size should be (1) } }
jpcik/morph
morph-r2rml-tc/src/test/scala/es/upm/fi/oeg/morph/tc/D006Test.scala
Scala
apache-2.0
282
package nexus.typelevel import nexus._ import org.scalatest._ import shapeless._ /** * @author Tongfei Chen */ class ToHListFromHListTest extends FunSuite { class a; val a = new a class b; val b = new b class c; val c = new c def toHList[A, Ah <: HList](a: A)(implicit t: ToHList.Aux[A, Ah]): Ah = t(a) ...
ctongfei/nexus
tensor/src/test/scala/nexus/typelevel/ToHListFromHListTest.scala
Scala
mit
895
import pl.project13.scala.sbt.JmhPlugin import sbt._ import sbt.Keys._ import sbtassembly.AssemblyKeys._ import sbtdocker.DockerKeys._ import sbtunidoc.Plugin._ import scoverage.ScoverageKeys._ object LinkerdBuild extends Base { import Base._ import Grpc._ val Bundle = config("bundle") val Dcos = config("dcos...
hhtpcd/linkerd
project/LinkerdBuild.scala
Scala
apache-2.0
23,268
/* * Copyright (c) <2015-2016>, see CONTRIBUTORS * 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 code must retain the above copyright * notice, this list...
amanjpro/languages-a-la-carte
brokenj/src/main/scala/typechecker/shapecheckers.scala
Scala
bsd-3-clause
2,834
package cobalt.parser.expression import cobalt.ast.AST._ import cobalt.parser.ExpressionParser import cobalt.utils.TestUtil import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.{FunSpec, Matchers} import scala.collection.mutable.ArrayBuffer @RunWith(classOf[JUnitRunner]) class ...
Michael2109/cobalt
src/test/scala/cobalt/parser/expression/ExpressionParserTest.scala
Scala
lgpl-3.0
1,022
package precogbuild import sbt._, Keys._ import scala._, Predef._ object Build { val BothScopes = "compile->compile;test->test" val warningOpts = Seq( //"-g:vars", //"-deprecation", //"-unchecked", //"-Ywarn-value-discard", //"-Ywarn-numeric-widen", //"-Ywarn-unused", "-Ywarn-unused-i...
drostron/quasar
project/Precog.scala
Scala
apache-2.0
3,191
package com.mizhi.nlp.stemmers.huskpaice import org.scalatest.mockito.MockitoSugar import org.scalatest.{FunSpec, Matchers} abstract class UnitSpec extends FunSpec with Matchers with MockitoSugar
mizhi/scala-stemmer
src/test/scala/com/mizhi/nlp/stemmers/huskpaice/UnitSpec.scala
Scala
mit
197
package org.jetbrains.plugins.scala package debugger import java.io._ import java.security.MessageDigest import java.util import com.intellij.execution.application.{ApplicationConfiguration, ApplicationConfigurationType} import com.intellij.ide.highlighter.{ModuleFileType, ProjectFileType} import com.intellij.openapi...
double-y/translation-idea-plugin
test/org/jetbrains/plugins/scala/debugger/ScalaDebuggerTestBase.scala
Scala
apache-2.0
7,836
/* * Copyright 2016-2018 SN127.fi * * 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...
jaa127/tackler
core/src/main/scala/fi/sn127/tackler/report/ExporterLike.scala
Scala
apache-2.0
764
package de.mineformers.visum.event /** * Event * * @author PaleoCrafter */ trait Event { private var _consumed = false def consumed = _consumed def consume() = _consumed = true }
MineFormers/Visum
src/main/scala/de.mineformers.visum/event/Event.scala
Scala
mit
192
package org.http4s package testing import cats._ import cats.data.NonEmptyList import cats.effect.{Effect, IO} import cats.effect.laws.discipline.arbitrary._ import cats.effect.laws.util.TestContext import cats.implicits.{catsSyntaxEither => _, _} import fs2.{Pure, Stream} import java.nio.charset.{Charset => NioCharse...
reactormonk/http4s
testing/src/main/scala/org/http4s/testing/ArbitraryInstances.scala
Scala
apache-2.0
24,110
package test.processing import slogger.services.processing.extraction.DataExtractorDaoMongo import slogger.services.processing.extraction.DataExtractorImpl import slogger.services.processing.extraction.DataExtractor import slogger.services.processing.extraction.DataExtractorDao import slogger.model.specification.extra...
IvanMykhailov/stats-logger
core/src/test/scala/test/processing/DataExtractorTest.scala
Scala
mit
1,009
package io.github.yzernik.bitcoinscodec.structures import io.github.yzernik.bitcoinscodec.CodecSuite import scodec.bits.{ByteVector, _} class TxInSpec extends CodecSuite { "TxIn codec" should { "roundtrip" in { roundtrip(TxIn( OutPoint( Hash(ByteVector.fill(32)(0x42)), 55555L...
yzernik/bitcoin-scodec
src/test/scala/io/github/yzernik/bitcoinscodec/structures/TxInSpec.scala
Scala
mit
1,762
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ueshin/apache-spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/HiveScriptTransformationExec.scala
Scala
apache-2.0
11,698
/* * This is free and unencumbered software released into the public domain. * * Anyone is free to copy, modify, publish, use, compile, sell, or * distribute this software, either in source code form or as a compiled * binary, for any purpose, commercial or non-commercial, and by any * means. * * In jurisdictio...
adamcin/vltpack-maven-plugin
src/main/scala/net/adamcin/vltpack/mojo/ITUploadTestsMojo.scala
Scala
unlicense
4,176
package views.vrm_retention import play.api.data.Forms.nonEmptyText import play.api.data.Mapping object KeeperConsent { def keeperConsent: Mapping[String] = nonEmptyText }
dvla/vrm-retention-online
app/views/vrm_retention/KeeperConsent.scala
Scala
mit
176
package io.vamp.model.resolver import io.vamp.common.notification.{ NotificationErrorException, NotificationProvider } import io.vamp.model.artifact._ import io.vamp.model.notification.ParserError import io.vamp.model.parser.Parser import scala.language.postfixOps trait ValueResolver { this: NotificationProvider ⇒...
dragoslav/vamp
model/src/main/scala/io/vamp/model/resolver/ValueResolver.scala
Scala
apache-2.0
1,596
package play.api.libs.ws.ahc import javax.inject.{ Inject, Provider, Singleton } import akka.stream.Materializer import com.typesafe.sslconfig.ssl.SystemConfiguration import com.typesafe.sslconfig.ssl.debug.DebugConfiguration import play.api.inject.ApplicationLifecycle import play.api.libs.ws.{ WSClient, WSClientConf...
aradchykov/playframework
framework/src/play-ahc-ws/src/main/scala/play/api/libs/ws/ahc/AhcWSClientProvider.scala
Scala
apache-2.0
2,307
package it.unipd.dei.diversity import java.util.concurrent.TimeUnit import it.unipd.dei.diversity.ExperimentUtil.{jMap, timed} import it.unipd.dei.diversity.matroid._ import it.unipd.dei.experiment.Experiment import org.apache.spark.SparkConf import org.apache.spark.sql.SparkSession import org.rogach.scallop.ScallopC...
Cecca/diversity-maximization
experiments/src/main/scala/it/unipd/dei/diversity/MainMatroid.scala
Scala
gpl-3.0
16,208
/* * Copyright 2022 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/self-assessment-api
test/config/ErrorHandlerSpec.scala
Scala
apache-2.0
9,039
package controllers import play.api.{ libs, mvc }, libs.json.Json.toJson, mvc.{ Controller, RequestHeader } import controllers.action.APIAction import models.util.{ NetUtil, ModelMapper } /** * Created by IntelliJ IDEA. * User: Jason * Date: 6/13/12 * Time: 3:43 PM */ object Models extends Contr...
NetLogo/SimServer
app/controllers/Models.scala
Scala
gpl-2.0
1,212
package jp.co.cyberagent.aeromock.cli import java.nio.file.Path import jp.co.cyberagent.aeromock.AeromockTestModule import jp.co.cyberagent.aeromock.cli.job.ValidationJob import jp.co.cyberagent.aeromock.cli.option.CliCommand import jp.co.cyberagent.aeromock.config.definition.ProjectDef import jp.co.cyberagent.aeromo...
CyberAgent/aeromock
aeromock-cli/src/test/scala/jp/co/cyberagent/aeromock/cli/CliJobSelectorSpec.scala
Scala
mit
942
/* * Copyright 2014 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
gorzell/archaius
archaius-scala/src/main/scala/com/netflix/config/scala/DynamicIntProperty.scala
Scala
apache-2.0
1,413
package me.ukl object DCT { //Table of values for c0/c1 for used in sumDCT and sumInverseDCT. private val cTable = (for (x <- 0 to 7; u <- 0 to 7) yield { Math.cos(((2 * x + 1) * u * Math.PI) / 16.0) }).toArray def applyFullDCT(xs: Array[Int], qMat: Array[Int]) = { val shifted = for (x <- xs) yie...
unknownloner/ImageCompress
src/me/ukl/DCT.scala
Scala
mit
2,647
package edu.berkeley.cs.succinct.sql.impl import edu.berkeley.cs.succinct.SuccinctTable import edu.berkeley.cs.succinct.SuccinctTable.QueryType import edu.berkeley.cs.succinct.sql._ import edu.berkeley.cs.succinct.util.SuccinctConstants import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.{FileSyste...
amplab/succinct
spark/src/main/scala/edu/berkeley/cs/succinct/sql/impl/SuccinctTableRDDImpl.scala
Scala
apache-2.0
12,364
package org.scalameter import org.scalameter.Measurer._ import org.scalameter.execution.invocation.InvocationCountMatcher import org.scalameter.execution.invocation.InvocationCountMatcher.{MethodMatcher, ClassMatcher} import org.scalameter.execution.invocation.instrumentation.MethodSignature import scala.util.Try c...
kjanosz/scalameter
src/test/scala/org/scalameter/InvocationCountTest.scala
Scala
bsd-3-clause
3,139
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
Kegeruneku/rudder
rudder-web/src/main/scala/com/normation/rudder/web/snippet/node/NodeHistoryViewer.scala
Scala
agpl-3.0
5,284
// See LICENSE.txt for license details. package examples import chisel3.iotesters.{ChiselFlatSpec, Driver, PeekPokeTester} class GCDTests(c: GCD) extends PeekPokeTester(c) { val inputs = List( (48, 32), (7, 3), (100, 10) ) val outputs = List( 16, 1, 10) var i = 0 do { poke(c.io.a, inputs(i)._1) poke(...
timtian090/Playground
chiselTutorial/src/test/scala/examples/GCDTests.scala
Scala
mit
850
object EmptyObject
som-snytt/dotty
tests/link/custom-lib/EmptyObject.scala
Scala
apache-2.0
19
package shred.man.cuda import breeze.linalg.{DenseVector, DenseMatrix} package object matchers { def approximately[A](expected: Array[A], delta: A)(implicit num: Numeric[A]) = new ApproximateNumericArrayMatcher[A](expected, delta, num) def approximately[A](expected: DenseMatrix[A], delta: A)(implicit num: N...
shredzzz/shredman
cuda/src/test/scala/shred/man/cuda/matchers/package.scala
Scala
apache-2.0
549
package dispatch.as.oauth import dispatch.oauth._ import com.ning.http.client.Response import com.ning.http.client.oauth._ object Token extends (Response => Either[String, RequestToken]) { def apply(res: Response) = tokenDecode(dispatch.as.String(res)) private def decode(str: String) = java.net.URLDecoder.decode(...
kkirsche/reboot
core/src/main/scala/as/oauth/token.scala
Scala
lgpl-3.0
819
package com.hyenawarrior.oldnorsedictionary.new_word.new_pos_helpers import android.app.Activity import android.content.Context import android.view.{LayoutInflater, View} import android.widget._ import com.hyenawarrior.OldNorseGrammar.grammar.enums.Case._ import com.hyenawarrior.OldNorseGrammar.grammar.enums.GNumber.{...
HyenaSoftware/IG-Dictionary
app/src/main/scala/com/hyenawarrior/oldnorsedictionary/new_word/new_pos_helpers/AddNewNounHelper.scala
Scala
lgpl-3.0
7,905
package mesosphere.elasticsearch import org.yaml.snakeyaml.Yaml import java.io.FileReader import java.util import scala.collection.JavaConverters._ import org.apache.commons.cli.MissingArgumentException import java.net.InetAddress import org.apache.log4j.{Level, BasicConfigurator} /** * ElasticSearch on Mesos * Tak...
mesosphere/elasticsearch-mesos
src/main/scala/mesosphere/elasticsearch/Main.scala
Scala
apache-2.0
2,320
/* * 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 ...
likelyzhao/mxnet
scala-package/examples/src/main/scala/ml/dmlc/mxnetexamples/rnn/LstmBucketing.scala
Scala
apache-2.0
4,534
package scala.tools.nsc.backend.jvm import org.junit.Assert._ import org.junit.Test import scala.collection.JavaConverters._ import scala.tools.asm.Handle import scala.tools.asm.tree.InvokeDynamicInsnNode import scala.tools.testing.BytecodeTesting class IndyLambdaTest extends BytecodeTesting { import compiler._ ...
felixmulder/scala
test/junit/scala/tools/nsc/backend/jvm/IndyLambdaTest.scala
Scala
bsd-3-clause
3,142
/* * 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/main/scala/org/scalatest/matchers/BePropertyMatcher.scala
Scala
apache-2.0
7,139
/* * Copyright (c) 2016 eBay Software Foundation. * * 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...
keshin/RTran
rtran-maven/src/test/scala/com/ebay/rtran/maven/MavenRemovePluginsRuleTest.scala
Scala
apache-2.0
4,672
/* * Copyright (c) 2013-16 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...
lukasz-golebiewski/shapeless
core/src/main/scala/shapeless/package.scala
Scala
apache-2.0
5,151
package com.stephentu.sql import scala.collection.mutable.{ArrayBuffer, HashMap} abstract trait Symbol { val ctx: Context } // a symbol corresponding to a reference to a column from a relation in this context. // note that this column is not necessarily projected in this context case class ColumnSymbol(relation: S...
debugger87/scala-sql-parser
src/main/scala/context.scala
Scala
mit
5,018
package collins.solr import java.util.Date import collins.models.Asset import collins.models.AssetMeta.ValueType.Boolean import collins.models.AssetMeta.ValueType.Double import collins.models.AssetMeta.ValueType.Integer import collins.models.AssetMeta.ValueType.String import collins.models.AssetMetaValue import colli...
box/collins
app/collins/solr/asset/AssetSerializer.scala
Scala
apache-2.0
4,419
/* * 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/expressions/utils/ArrayTypeTestBase.scala
Scala
apache-2.0
2,672
import FullBorderExtras._ import scala.util.Random import org.scalatest._ class FullBorderSpec extends FlatSpec with Matchers { "split171" should "split (1, ..., 9) correctly" in { val (l, mid, r) = (1 to 9).toArray.split171 assert(l==1 && mid.toList == List(2, 3, 4, 5, 6, 7, 8) && r == 9) } }
matiasdahl/Boundary-Sudoku
src/test/scala/FullBorderSpec.scala
Scala
mit
314
package models.join import models.db._ /** * * @author ponkotuy * Date: 14/10/22. */ case class SlotItemWithMaster(item: SlotItem, master: MasterSlotItem) { def slotitemId = master.id def name = master.name def category = master.category def iconType = master.iconType def alv = item.alv def colorClas...
nekoworkshop/MyFleetGirls
server/app/models/join/SlotItemWithMaster.scala
Scala
mit
1,245
package scan import java.nio.file._ import scala.compat.java8.StreamConverters._ import scala.collection.SortedSet import cats._ import cats.data._ import cats.implicits._ import mouse.all._ import org.atnos.eff._ import org.atnos.eff.all._ import org.atnos.eff.syntax.all._ import org.atnos.eff.addon.monix._ impo...
benhutchison/GettingWorkDoneWithExtensibleEffects
exerciseError/src/main/scala/scan/Scanner.scala
Scala
apache-2.0
5,250
/* * 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 ...
kl0u/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/sinks/TableSinkUtils.scala
Scala
apache-2.0
12,909
/* * Copyright 2012-2014 Comcast Cable Communications Management, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unl...
weggert/sirius
src/test/scala/com/comcast/xfinity/sirius/admin/SiriusMonitorReaderTest.scala
Scala
apache-2.0
3,497
/* * 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 ...
tejasapatil/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala
Scala
apache-2.0
27,881
/** * Copyright 2014 Dropbox, 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...
pwais/djinni
src/source/generator.scala
Scala
apache-2.0
13,606
/* * Copyright (c) 2017-2022 Lymia Alusyia <lymia@lymiahugs.com> * * 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,...
Lymia/PrincessEdit
modules/princess-edit/src/main/scala/moe/lymia/princess/views/exportcards/exportdialog.scala
Scala
mit
9,489
package cspom.compiler import cspom.CSPOM._ import cspom.util.IntInterval import cspom.variable.{CSPOMSeq, IntVariable, SimpleExpression} import cspom.{CSPOM, CSPOMConstraint} import org.scalatest.{FlatSpec, Matchers, TryValues} final class CompileTest extends FlatSpec with Matchers with TryValues { // "CSPOMComp...
concrete-cp/cspom
src/test/scala/cspom/compiler/CompileTest.scala
Scala
lgpl-2.1
3,086
package com.twitter.scalding.parquet.tuple.macros.impl import com.twitter.bijection.macros.impl.IsCaseClassImpl import com.twitter.scalding.parquet.tuple.scheme._ import scala.reflect.macros.Context object ParquetReadSupportProvider { private[this] sealed trait CollectionType private[this] case object NOT_A_COLL...
sriramkrishnan/scalding
scalding-parquet/src/main/scala/com/twitter/scalding/parquet/tuple/macros/impl/ParquetReadSupportProvider.scala
Scala
apache-2.0
10,168
/* * -╥⌐⌐⌐⌐ -⌐⌐⌐⌐- * ≡╢░░░░⌐\\░░░φ ╓╝░░░░⌐░░░░╪╕ * ╣╬░░` `░░░╢┘ φ▒╣╬╝╜ ░░╢╣Q * ║╣╬░⌐ ` ╤▒▒▒Å` ║╢╬╣ * ╚╣╬░⌐ ╔▒▒▒▒`«╕ ╢╢╣▒ * ╫╬░░╖ .░ ╙╨╨ ╣╣╬░φ ╓φ░╢╢Å * ╙╢░░░░⌐"░░░╜ ╙Å░░░░⌐░░░░╝` * ``˚¬ ⌐ ˚˚⌐´ * * ...
Flipkart/connekt
busybees/src/test/scala/com/flipkart/connekt/busybees/tests/streams/openweb/WebPushEncryptionTest.scala
Scala
mit
2,796
/* * Copyright (C) 2011 the original author or authors. * See the license.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 ma...
Frogurth/RCAP
src/de/fhworms/ztt/rcap/ClipboardListener.scala
Scala
apache-2.0
3,326
package org.elasticsearch.spark.sql import org.junit.Assert._ import org.junit.Test import scala.collection.mutable class DefaultSourceTest { @Test def parameters(): Unit = { val settings = new mutable.LinkedHashMap[String, String]() settings.put("path", "wrong") settings.put("resource", "wrong") ...
takezoe/elasticsearch-hadoop
spark/sql-20/src/test/scala/org/elasticsearch/spark/sql/DefaultSourceTest.scala
Scala
apache-2.0
568
package app.state import model.fighters.Fighter import scala.collection.mutable import scala.collection.mutable.ListBuffer class DuelState extends ArenaState { override def addFighter(fighter: Fighter) = { if(fighters.size == 2) throw new Exception("Два бойца уже выбрано.") super.addFighter(fighter)...
treble-snake/gladiators
src/main/scala/app/state/DuelState.scala
Scala
apache-2.0
1,099
/* * Copyright 2015 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
communication/src/main/scala/com/ibm/spark/communication/socket/PubSocketRunnable.scala
Scala
apache-2.0
1,295
package eve import eveapi.utils.Decoders._ import eveapi.errors.{EveApiError, EveApiStatusFailed} import java.time.Clock import scalaz.stream.async.mutable.Topic import scala.concurrent.duration.Duration import scala.collection.concurrent.TrieMap import scalaz.stream.{Exchange, Process, Sink, async} import scalaz.con...
reactormonk/fleet-buddy
server/src/main/scala/eve/topics.scala
Scala
agpl-3.0
1,522
/* * This file is part of pelam-scala-csv * * Copyright © Peter Lamberg 2015 (pelam-scala-csv@pelam.fi) * * 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/...
pelamfi/pelam-scala-csv
src/test/scala/fi/pelam/csv/table/TableReadingErrorTest.scala
Scala
apache-2.0
2,513
package com.etsy.sbt import java.util import sbt._ import sbt.internal.util.ManagedLogger import sjsonnew.BasicJsonProtocol import xsbti.{AnalysisCallback, Position, Severity, UseScope} import xsbti.api.{ClassLike, DependencyContext} import xsbti.compile.{Compilers, DependencyChanges, Inputs} private[sbt] object Com...
etsy/sbt-compile-quick-plugin
src/main/scala-sbt-1.0/com/etsy/sbt/Compatibility.scala
Scala
mit
2,600
package fr.acinq.eclair.db.migration import fr.acinq.eclair.db.jdbc.JdbcUtils.ExtendedResultSet._ import fr.acinq.eclair.db.migration.MigrateDb.{checkVersions, migrateTable} import java.sql.{Connection, PreparedStatement, ResultSet, Timestamp} import java.time.Instant object MigratePaymentsDb { private def migrat...
ACINQ/eclair
eclair-core/src/main/scala/fr/acinq/eclair/db/migration/MigratePaymentsDb.scala
Scala
apache-2.0
3,509
package models.analytics.subscription import akka.actor.ActorLogging import akka.contrib.pattern.ReceivePipeline import akka.contrib.pattern.ReceivePipeline.Inner import models.market.MarketEMACollection import models.market.MarketStructures.{Candles, ClosePrice, ExponentialMovingAverage, MarketMessage} /** * Creat...
asciiu/polo
app/models/analytics/subscription/ExponentialMovingAverages.scala
Scala
mit
2,676
package com.shocktrade.webapp.routes import com.shocktrade.common.forms.MaxResultsForm import com.shocktrade.common.models.EntitySearchResult import com.shocktrade.common.models.quote.ResearchQuote import com.shocktrade.common.models.user.User import com.shocktrade.server.dao.securities.SecuritiesDAO import com.shockt...
ldaniels528/shocktrade.js
app/server/webapp/src/main/scala/com/shocktrade/webapp/routes/SearchRoutes.scala
Scala
apache-2.0
4,282
package frameless package cats import _root_.cats._ import _root_.cats.kernel.{CommutativeMonoid, CommutativeSemigroup} import _root_.cats.implicits._ import alleycats.Empty import scala.reflect.ClassTag import org.apache.spark.rdd.RDD object implicits extends FramelessSyntax with SparkDelayInstances { implicit cl...
imarios/frameless
cats/src/main/scala/frameless/cats/implicits.scala
Scala
apache-2.0
2,471
/* * Copyright 2011-2021 Asakusa Framework Team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
asakusafw/asakusafw-spark
compiler/src/test/scala/com/asakusafw/spark/compiler/operator/user/CoGroupOperatorCompilerSpec.scala
Scala
apache-2.0
29,462
package de.tototec.sbuild import java.io.File trait ProjectReader { /** * Read a project file and create a configured Project instance associated by that file. * * If a projectPool is given, the newly created project will be added to that pool. * */ def readAndCreateProject(projectFile: File, prop...
SBuild-org/sbuild
de.tototec.sbuild/src/main/scala/de/tototec/sbuild/ProjectReader.scala
Scala
apache-2.0
426
package com.twitter.finagle.memcached.integration import com.twitter.finagle.Service import com.twitter.finagle.builder.ClientBuilder import com.twitter.finagle.memcached.protocol._ import com.twitter.finagle.memcached.protocol.text.Memcached import com.twitter.finagle.memcached.util.ChannelBufferUtils._ import com.tw...
kristofa/finagle
finagle-memcached/src/test/scala/com/twitter/finagle/memcached/integration/InterpreterServiceTest.scala
Scala
apache-2.0
1,526
package com.artclod.mathml.scalar.apply import org.specs2.runner.JUnitRunner import org.junit.runner.RunWith import org.junit.runner.RunWith import play.api.test._ import play.api.test.Helpers._ import org.specs2.mutable._ import com.artclod.mathml._ import com.artclod.mathml.scalar._ // LATER try out http://rlegendi...
kristiankime/web-education-games
test/com/artclod/mathml/scalar/apply/ApplyDivideSpec.scala
Scala
mit
2,611
/* * 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
sql/core/src/test/scala/org/apache/spark/sql/DataFrameJoinSuite.scala
Scala
apache-2.0
3,067
package jp.co.cyberagent.aeromock.core.bootstrap import org.apache.commons.lang3.ClassUtils import org.slf4j.LoggerFactory import jp.co.cyberagent.aeromock.helper._ /** * manager to control bootstrap. * @author stormcat24 */ object BootstrapManager { val LOG = LoggerFactory.getLogger(this.getClass()) def del...
CyberAgent/aeromock
aeromock-server/src/main/scala/jp/co/cyberagent/aeromock/core/bootstrap/BootstrapManager.scala
Scala
mit
1,542
package com.example.service import java.io.{File, FileOutputStream} import java.net.URI import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.http.scaladsl.model.{HttpRequest, StatusCodes} import akka.stream.Materializer import akka.stream.scaladsl.Sink import com.typesafe.scalalogging.Lo...
SakaiTakao/TwitterImageDownloader
src/main/scala/com/example/service/HttpServiceComponent.scala
Scala
bsd-2-clause
1,607
package mavigator.index import scala.language.implicitConversions import org.scalajs.dom.html import rx._ import scala.util.Try import scala.util.Success import scala.util.Failure import scalatags.JsDom.all._ object Util { /** * Copied from https://github.com/lihaoyi/workbench-example-app/blob/todomvc/src/m...
project-condor/mavigator
mavigator-cockpit/src/main/scala/mavigator/index/Util.scala
Scala
gpl-3.0
1,044
/* NSC -- new Scala compiler * Copyright 2005-2013 LAMP/EPFL * @author Martin Odersky */ package scala package reflect package internal import scala.language.implicitConversions import scala.io.Codec trait Names extends api.Names { private final val HASH_SIZE = 0x8000 private final val HASH_MASK = 0x7FFF ...
slothspot/scala
src/reflect/scala/reflect/internal/Names.scala
Scala
bsd-3-clause
23,688
object Test { trait Engine1 implicit class EngineTools1[Params, R](e: Engine1) { def asRequirement: Requirement1[Params, R] = ??? } trait Requirement1[Params, R] { def pathsIncludingSelf: Traversable[List[Reportable1[Params, R]]] } trait Reportable1[Params, R] // "missing parameter type" error w...
scala/scala
test/files/neg/t8675b.scala
Scala
apache-2.0
785
/* SimpleApp.scala */ import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spark.SparkConf import au.com.bytecode.opencsv.CSVParser import org.apache.spark.rdd.RDD object sparkP1 { def dropHeader(data: RDD[String]): RDD[String] = { data.mapPartitionsWithIndex((idx, line...
heygawau/Sparkinou
src/main/scala/sparkP1.scala
Scala
apache-2.0
1,291
package docs import java.nio.charset.StandardCharsets import mdoc.Reporter import mdoc.StringModifier import mdoc.internal.pos.PositionSyntax._ import scala.meta.inputs.Input import scala.meta.inputs.Position import scala.meta.internal.io.FileIO import scala.meta.internal.io.PathIO import scala.meta.io.AbsolutePath c...
scalameta/scalafmt
scalafmt-docs/src/main/scala/docs/FileModifier.scala
Scala
apache-2.0
1,064
/* * Copyright (c) 2013-2022 Erik van Oosten * * 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 ...
erikvanoosten/metrics-scala
metrics-scala/src/test/scala/nl/grons/metrics4/scala/CheckedBuilderSpec.scala
Scala
apache-2.0
10,635
package io.megl.scalajs import io.megl.scalajs.HTML2SJS.{HTMLOptions, convertToXML, validateI18n} import scala.collection.mutable.ListBuffer import scala.xml.{Node, XML} class HtmlTreeProcessor(htmlCode: String, option:HTMLOptions=HTMLOptions()) extends ConversionUtils { val root = { val xml=convertToXML(h...
aparo/scalajs-converter
html2sjs/src/main/scala/io/megl/scalajs/HtmlTreeProcessor.scala
Scala
apache-2.0
4,502
import sbt._ import EvaluateConfigurations._ import sbt.Build._ import sbt.Keys._ import com.olegych.scastie.{ScriptSecurityManager, SecuredRun} object ApplicationBuild extends Build { val runAll = TaskKey[Unit]("run-all") val rendererWorker = Project(id = "rendererWorker", base = file("."), settings = Defaul...
atamborrino/zen-coding-game
renderer-template/project/ApplicationBuild.scala
Scala
apache-2.0
2,610
// Copyright (C) 2009 The Android Open Source Project // // 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 ...
gkossakowski/gimd
src/main/scala/com/google/gimd/jgit/JGitDatabaseException.scala
Scala
apache-2.0
1,026
package org.jetbrains.plugins.scala package debugger import java.io.File import java.util.concurrent.atomic.AtomicReference import com.intellij.debugger.DebuggerManagerEx import com.intellij.debugger.engine._ import com.intellij.debugger.engine.evaluation._ import com.intellij.debugger.engine.evaluation.expression.Ev...
triggerNZ/intellij-scala
test/org/jetbrains/plugins/scala/debugger/ScalaDebuggerTestCase.scala
Scala
apache-2.0
8,440
package com.github.curzonj import org.json4s._ import java.util.UUID object JavaTypesSerializers { val all = List(UUIDSerializer) } case object UUIDSerializer extends CustomSerializer[UUID](format => ( { case JString(s) => UUID.fromString(s) case JNull => null }, { case x: UUID => JString(x.toStr...
curzonj/spacebox-scala-sim2
src/main/scala/com/github/curzonj/JavaTypeSerializers.scala
Scala
agpl-3.0
335
/* * 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/test/scala/com/intel/analytics/bigdl/dllib/nn/ScaleSpec.scala
Scala
apache-2.0
10,143
/* * Copyright (C) 2016 University of Basel, Graphics and Vision Research Group * * 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) an...
unibas-gravis/scalismo-ui
src/main/scala/scalismo/ui/view/action/ShowBackgroundColorDialogAction.scala
Scala
gpl-3.0
1,205
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
dbtsai/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveCommandSuite.scala
Scala
apache-2.0
18,361
package org.scaladebugger.api.lowlevel.threads import org.scaladebugger.api.lowlevel.requests.JDIRequestArgument import org.scaladebugger.api.utils.PendingActionManager import scala.util.{Success, Try} /** * Provides pending thread start capabilities to an existing * thread start manager. */ trait PendingThreadSt...
ensime/scala-debugger
scala-debugger-api/src/main/scala/org/scaladebugger/api/lowlevel/threads/PendingThreadStartSupport.scala
Scala
apache-2.0
2,685
package turkey.tasks import upickle.default._ trait ResponseReader[Request <: { type Response }] { def getReader(request: Request): Reader[request.Response] } trait ResponseWriter[Request <: { type Response }] { def getWriter(request: Request): Writer[request.Response] } trait ResponseRW[ Request <: { type Re...
julianmichael/turkey
turkey/shared/src/main/scala/turkey/tasks/ResponseRW.scala
Scala
mit
392
package algorithms.graphs.flow import internal.Preconditions import structures.graph.UnDirectedGraph import scala.collection.mutable import scala.collection.mutable.ArrayBuffer class FordFulkerson { private val NO_PREVIOUS_NODE_IN_FLOW = -1 def maxFlow(graph: UnDirectedGraph, source: Int, destination: Int): Int...
willb611/algorithms
src/main/scala/algorithms/graphs/flow/FordFulkerson.scala
Scala
apache-2.0
3,776
package com.gx.mediator /** * 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/mediator/src/main/scala/com/gx/mediator/App.scala
Scala
apache-2.0
874
package scala.macros.tests package scaladays import scala.macros._ import scala.language.experimental.macros class main extends MacroAnnotation { def apply(defn: Any): Any = macro { val q"..$mods object $name extends ..$inits { $self => ..$stats }" = defn val main = q"def main(args: Array[String]): Unit = {...
xeno-by/scalamacros
tests/macros/src/main/scala/scala/macros/tests/scaladays/main.scala
Scala
bsd-3-clause
402
package monocle import monocle.law.discipline.{SetterTests, TraversalTests} import org.scalacheck.Arbitrary import org.scalacheck.Arbitrary.arbitrary import cats.Eq import cats.arrow.{Category, Choice, Compose} import cats.data.{Chain, NonEmptyChain, NonEmptyList, NonEmptyVector} import cats.syntax.either._ import sc...
julien-truffaut/Monocle
test/shared/src/test/scala/monocle/TraversalSpec.scala
Scala
mit
12,892
package ohnosequences.cosas.types import ohnosequences.cosas.fns._ trait AnyFunctionType extends AnyType { type Domain <: AnyType val domain: Domain type Codomain <: AnyType val codomain: Codomain type Raw = AnyDepFn1 { type In1 = Domain#Raw; type Out = Codomain#Raw } } case class ==>[A <: AnyType, B <:...
ohnosequences/cosas
src/main/scala/cosas/types/functionTypes.scala
Scala
agpl-3.0
500
import reactivemongo.bson._ import org.specs2.mutable._ import reactivemongo.bson.exceptions.DocumentKeyNotFound import reactivemongo.bson.Macros.Annotations.Key class Macros extends Specification { type Handler[A] = BSONDocumentReader[A] with BSONDocumentWriter[A] with BSONHandler[BSONDocument, A] def roundtrip...
lunatech-labs/lunatech-reactivemongo
macros/src/test/scala/macrospec.scala
Scala
apache-2.0
11,310
package com.wavesplatform.features import com.wavesplatform.features.BlockchainFeatureStatus.{Activated, Approved, Undefined} import com.wavesplatform.features.api.NodeFeatureStatus.{Implemented, NotImplemented, Voted} import play.api.libs.json._ package object api { implicit val nodeFeatureStatusFormat: Format[Nod...
wavesplatform/Waves
node/src/main/scala/com/wavesplatform/features/api/package.scala
Scala
mit
2,158
package scala.collection package immutable import mutable.{Builder, StringBuilder} /** * This class serves as a wrapper augmenting `String`s with all the operations * found in indexed sequences. * * The difference between this class and `StringOps` is that calling transformer * methods such as `filter` ...
rorygraves/perf_tester
corpus/scala-library/src/main/scala/collection/immutable/WrappedString.scala
Scala
apache-2.0
1,907
/* * 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 ...
yelshater/hadoop-2.3.0
spark-core_2.10-1.0.0-cdh5.1.0/src/main/scala/org/apache/spark/broadcast/package.scala
Scala
apache-2.0
975
/* * 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...
scalatest/scalatest
jvm/wordspec-test/src/test/scala/org/scalatest/wordspec/AsyncWordSpecSpec.scala
Scala
apache-2.0
39,929
package root import sbt._ import Keys._ import com.typesafe.sbt.osgi.OsgiKeys import OsgiKeys._ import root.libraries._ import org.openmole.buildsystem.OMKeys._ import org.scalajs.sbtplugin.ScalaJSPlugin import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._ /** * Created with IntelliJ IDEA. * User: luft * Date: ...
ISCPIF/PSEExperiments
openmole-src/libraries/project/src/main/scala/OSGi.scala
Scala
agpl-3.0
12,644
package eu.brosbit.opos.snippet.view import _root_.net.liftweb.util._ import Helpers._ import net.liftweb.json.JsonDSL._ import eu.brosbit.opos.lib.Formater import java.util.Date import eu.brosbit.opos.model.edu._ import net.liftweb.http.{SHtml, S} import scala.xml.Unparsed import net.liftweb.json.DefaultFormats impo...
mikolajs/osp
src/main/scala/eu/brosbit/opos/snippet/view/PerformExamSn.scala
Scala
agpl-3.0
5,417
package org.nexbook.tools.fixordergenerator.app import java.util.concurrent.atomic.AtomicLong import akka.actor.{ActorSystem, Props} import com.typesafe.config.Config import org.joda.time.{DateTime, DateTimeZone} import org.nexbook.tools.fixordergenerator.fix.FixMessageSender.FixMessageWithSession import org.nexbook....
milczarekIT/fix-order-generator
src/main/scala/org/nexbook/tools/fixordergenerator/app/RunningStrategy.scala
Scala
apache-2.0
5,456