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
trait X trait Y object test: def f(using x: X) = ??? object instances { given y: Y = ??? } locally { given xFromY(using y: Y): X = ??? f(using xFromY) // error } locally { object instances2 { given xFromY(using Y): X = ??? } f // error }
dotty-staging/dotty
tests/neg/missing-implicit2.scala
Scala
apache-2.0
282
package deburnat.transade.core.admins import io.Source.fromFile import sys.process.{ProcessLogger, Process} import java.io.{FileWriter, IOException, File} import CoreAdmin._ /** * An algorithm for dynamic programming. It uses internally a two-dimensional * matrix to store the previous results. * Project name: de...
deburnatshazem/deburnat
core/src/main/scala/deburnat/transade/core/admins/FileAdmin.scala
Scala
apache-2.0
4,628
/* * Copyright 2019 Databricks * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
databricks/spark-xml
src/main/scala/com/databricks/spark/xml/XmlDataToCatalyst.scala
Scala
apache-2.0
2,316
package library import play.Play import java.io.File object Util { // this function is obsolete and will be removed later (because it's migrated from webnikki.jp) def getUnameFromSubdomain(subdomain: String) = subdomain.split('.')(0) def getUnameFromPath(path: String) = path.indexOf("/", 1) match { c...
mahata/webnikki
src/app/library/Util.scala
Scala
mit
2,008
/* * Licensed to Cloudera, Inc. under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Cloudera, Inc. licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use thi...
kalahbrown/HueBigSQL
apps/spark/java/livy-server/src/main/scala/com/cloudera/hue/livy/server/batch/BatchSessionProcess.scala
Scala
apache-2.0
3,196
package org.elinker.core.api.service import org.elinker.core.api.auth.TokenAuthentication import scala.concurrent.ExecutionContext.Implicits.global /** * Created by nilesh on 16/12/2014. */ trait ApiService extends MentionApiService with TokenAuthentication { val apiRoute = pathPrefix("api") { authentic...
nilesh-c/elinker
src/main/scala/org/elinker/core/api/service/ApiService.scala
Scala
apache-2.0
406
package com.szadowsz.gospel.core.engine.subgoal.tree import com.szadowsz.gospel.core.data.Term private[core] class SubGoalLeaf(t: Term) extends SubGoalNode { private val _term: Term = t def getValue: Term = _term def isLeaf: Boolean = true def isRoot: Boolean = false override def toString: String = _...
zakski/project-soisceal
scala-core/src/main/scala/com/szadowsz/gospel/core/engine/subgoal/tree/SubGoalLeaf.scala
Scala
lgpl-3.0
335
/* * 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 ...
jinglining/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/table/GroupWindowTableAggregateITCase.scala
Scala
apache-2.0
14,164
/* * Copyright (c) 2014-2018 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
Wogan/monix
monix-execution/shared/src/main/scala/monix/execution/internal/collection/ConcurrentQueue.scala
Scala
apache-2.0
1,005
/* * 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 ...
bOOm-X/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
Scala
apache-2.0
38,840
object Solution { def insertionSort(nums: Array[Int]) { val n = nums.size var numOfShifts = 0 for (i <- 1 until n) { var j = i while (j >= 1 && nums(j) < nums(j - 1)) { numOfShifts += 1 val temp = nums(j) nums(j) = nums(j - 1) nums(j - 1) = temp j -= 1 ...
advancedxy/hackerrank
algorithms/arraysandsorting/RunningTimeOfAlgorithms.scala
Scala
mit
497
/* * Copyright (c) 2017 sadikovi * * 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, copy, modify, merge, publish, d...
sadikovi/riff
format/src/test/scala/com/github/sadikovi/riff/tree/rule/IndexFieldsExtractSuite.scala
Scala
mit
4,207
package com.hacktheburgh.commlog.actors.messages import play.api.libs.json.Json /** * Container for a single repository commit. * * @author Arkan <arkan@drakon.io> */ class Commit(val msg:String, val repo:String, val committer:String) { val data = Map("msg" -> msg, "repo" -> repo, "committer" -> committer) v...
compsoc-edinburgh/Commlogs
app/com/hacktheburgh/commlog/actors/messages/Commit.scala
Scala
mit
428
/* * Copyright 2014 Xored Software, 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...
Aste88/scala-js-react
scalajs-react/src/main/scala/com/xored/scalajs/react/TypedReactSpec.scala
Scala
apache-2.0
2,953
/* * This software is licensed under the GNU Affero General Public License, quoted below. * * This file is a part of PowerAPI. * * Copyright (C) 2011-2014 Inria, University of Lille 1. * * PowerAPI is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public Lice...
rouvoy/powerapi
powerapi-sampling/src/main/scala/org/powerapi/sampling/SamplingConfiguration.scala
Scala
agpl-3.0
3,771
/* * 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 ...
hongyuhong/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/ProcTimeSortProcessFunction.scala
Scala
apache-2.0
3,171
package ucesoft.cbm.peripheral.rs232 import java.io.OutputStream import java.io.InputStream import ucesoft.cbm.Log import ucesoft.cbm.Clock import ucesoft.cbm.ClockEvent abstract class StreamRS232 extends AbstractRS232 { override def hangUp : Unit = { disconnect } override protected def disconnect: Unit =...
abbruzze/kernal64
Kernal64/src/ucesoft/cbm/peripheral/rs232/StreamRS232.scala
Scala
mit
678
package net.liftweb.mocks import _root_.scala.collection.mutable.HashMap import _root_.java.io.PrintWriter import _root_.java.io.StringReader import _root_.java.io.BufferedReader import _root_.java.io.ByteArrayOutputStream import _root_.java.io.ByteArrayInputStream import _root_.java.io.FileInputStream import _root_.j...
andreum/liftweb
lift-testkit/src/main/scala/net/liftweb/mocks/MockHttpServletResponse.scala
Scala
apache-2.0
3,455
package bifrost.forging trait ForgingConstants { lazy val MaxTarget = BigInt(1, Array.fill(32)(Byte.MinValue)) lazy val Difficulty = BigInt("50") lazy val GenesisParentId: Array[Byte] = Array.fill(32)(1: Byte) }
Topl/Project-Bifrost
src/main/scala/bifrost/forging/ForgingConstants.scala
Scala
mpl-2.0
221
/*********************************************************************** * 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-features/geomesa-feature-avro/src/main/scala/org/locationtech/geomesa/features/avro/AvroDataFileWriter.scala
Scala
apache-2.0
2,136
/* * Copyright 2011-2019 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 ...
ueshin/asakusafw-spark
tools/asm4s/src/main/scala/com/asakusafw/spark/tools/asm4s/Mixing.scala
Scala
apache-2.0
5,897
/* * 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 ...
apache/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/batch/sql/BatchFileSystemITCaseBase.scala
Scala
apache-2.0
1,972
/* * Copyright 2019 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-google-cloud-platform/src/main/scala/com/spotify/scio/bigquery/types/TypeProvider.scala
Scala
apache-2.0
23,688
/* * Copyright 2007-2010 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...
jeppenejsum/liftweb
examples/example/src/main/scala/net/liftweb/example/comet/Clock.scala
Scala
apache-2.0
1,338
package io.github.meln1k.vkApi.models.wall import play.api.libs.json.Json /** PostSource class contains information how (using site interface, widget, etc.) post was added to the wall. * With data from this field you can use additional data on how the post was created on the wall in your application. * * @param...
meln1k/vk-scala-api
src/main/scala/io/github/meln1k/vkApi/models/wall/PostSource.scala
Scala
apache-2.0
1,538
/* * Happy Melly Teller * Copyright (C) 2013 - 2016, Happy Melly http://www.happymelly.com * * This file is part of the Happy Melly Teller. * * Happy Melly Teller 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 Fo...
HappyMelly/teller
app/models/repository/core/payment/CustomerRepository.scala
Scala
gpl-3.0
3,374
class A(s: String) { def foo(x: A) = x } class isString(s: String) class Test { def x[A](a: Any): A = ??? def test: Unit = { val a = Array[A]() a.update(0, x[A]({new isString(true)})) // !!! allowed // boils down to class X { def m(p: Any): Unit = {} } implicit class XOps(x: X) ...
scala/scala
test/files/neg/t8675.scala
Scala
apache-2.0
422
import scala.Predef.Set // unimport Predef.wrapRefArray import java.nio.file.Paths class i4785 { def bar(xs: String*) = xs.length def test(xs: Seq[String], ys: Array[String]) = { Paths.get("Hello", xs: _*) Paths.get("Hello", ys: _*) bar(xs: _*) bar(ys: _*) } }
som-snytt/dotty
tests/pos/i4785.scala
Scala
apache-2.0
287
package semighini.tdc.modelo /** * Created by dirceu on 8/7/14. */ case class Empresa(nome:String,CNPJ:String,nomeFantasia:String)
dirceusemighini/tdc2014
src/main/scala/semighini/tdc/modelo/Empresa.scala
Scala
apache-2.0
133
package client.css import scalacss.Defaults._ object WorkContractCSS { object Style extends StyleSheet.Inline { import dsl._ /* val borderInitiating = style ( borderBottom(2.px , solid, black) )*/ val marginLeftRight = style( marginLeft(15.px), marginRight(15.px), padding(4...
LivelyGig/ProductWebUI
client/src/main/scala/client/css/WorkContractCSS.scala
Scala
apache-2.0
2,400
/*********************************************************************** * Copyright (c) 2013-2018 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...
ddseapy/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/util/AccumuloSchemaBuilderTest.scala
Scala
apache-2.0
1,092
/* * 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 ...
bravo-zhang/spark
mllib/src/main/scala/org/apache/spark/ml/feature/StopWordsRemover.scala
Scala
apache-2.0
6,099
package test import org.specs2.mutable._ import play.api.test._ import play.api.test.Helpers._ /** * Add your spec here. * You can mock out a whole application including requests, plugins etc. * For more information, consult the wiki. */ class ApplicationSpec extends Specification { "Application" should { ...
brendanobra/haproxy-rest-config
test/ApplicationSpec.scala
Scala
mit
783
package net.chrisloy.json import org.scalatest.{MustMatchers, FlatSpec} class JsonValueSpec extends FlatSpec with MustMatchers { "/" should "find JsonUndefined for non-matching object" in { Json("b" -> 123) / "a" mustBe JsonUndefined } it should "find JsonUndefined for a JsonArray" in { Json("a" :: 12...
chrisloy/simple-json
src/test/scala/net/chrisloy/json/JsonValueSpec.scala
Scala
gpl-3.0
1,041
package diode.dev import org.scalajs.dom import org.scalajs.dom.{Event, IDBDatabase, IDBObjectStore, IDBTransactionMode} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent._ import scala.scalajs.js class PersistStateIDB[M <: AnyRef, P <: js.Any](pickleF: M => P, unpickleF: P => M) exte...
ochrons/diode
diode-devtools/js/src/main/scala/diode/dev/PersistStateIDB.scala
Scala
mit
2,266
/* * 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/logging/js/src/test/scala/tagless/LoggingTests.scala
Scala
apache-2.0
2,948
package com.twitter.finagle.exception import com.twitter.streamyj.Streamy import com.twitter.util.{GZIPStringEncoder, Time} import java.lang.{Throwable, StackTraceElement => javaSTE} import java.net.{SocketAddress, InetSocketAddress, InetAddress} import org.junit.runner.RunWith import org.scalatest.FunSuite import org...
firebase/finagle
finagle-exception/src/test/scala/com/twitter/finagle/exception/ServiceExceptionTest.scala
Scala
apache-2.0
7,021
package net.benmur.riemann.client import scala.collection.JavaConversions.asJavaIterable import org.scalatest.FunSuite import org.scalatest.Matchers import com.aphyr.riemann.Proto import testingsupport.SerializersFixture.event1 import testingsupport.SerializersFixture.event2 import testingsupport.SerializersFixture...
mallman/riemann-scala-client
src/test/scala/net/benmur/riemann/client/SerializersTest.scala
Scala
mit
8,779
/* * This file is part of Apparat. * * Copyright (C) 2010 Joa Ebert * http://www.joa-ebert.com/ * * This library 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 Lice...
joa/apparat
apparat-anttasks/src/main/scala/apparat/embedding/ant/concrete/ConcreteTask.scala
Scala
lgpl-2.1
1,037
/* * Copyright 2016 Dennis Vriend * * 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...
gavares/akka-persistence-jdbc
src/main/scala/akka/persistence/jdbc/util/SlickDatabase.scala
Scala
apache-2.0
3,602
/*-------------------------------------------------------------------------*\\ ** ScalaCheck ** ** Copyright (c) 2007-2014 Rickard Nilsson. All rights reserved. ** ** http://www.scalacheck.org ** ** ...
slothspot/scala
src/partest-extras/scala/org/scalacheck/Commands.scala
Scala
bsd-3-clause
5,912
/* * Copyright (C) 24/10/13 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 pr...
openmole/openmole
openmole/plugins/org.openmole.plugin.domain.range/src/main/scala/org/openmole/plugin/domain/range/SizeRangeDomain.scala
Scala
agpl-3.0
2,130
/* Copyright (C) 2008-2016 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
strubell/factorie
src/main/scala/cc/factorie/app/nlp/Sentence.scala
Scala
apache-2.0
4,712
package scala.generator import lib.Text case class ScalaEnums( ssd: ScalaService, enum: ScalaEnum ) { private[this] val unions = ssd.unionsForEnum(enum) def build(): String = { import lib.Text._ Seq( enum.description.map { desc => ScalaUtil.textToComment(desc) + "\\n" }.getOrElse("") + s...
krschultz/apidoc-generator
scala-generator/src/main/scala/models/generator/ScalaEnums.scala
Scala
mit
2,209
package ch.epfl.scala.index package server package routes package api import ch.epfl.scala.index.api.Autocompletion import model.misc.SearchParams import model._, release._ import ch.megard.akka.http.cors.CorsDirectives._ import akka.http.scaladsl._ import server.Directives._ import model.StatusCodes._ import upic...
adamwy/scaladex
server/src/main/scala/ch.epfl.scala.index.server/routes/api/SearchApi.scala
Scala
bsd-3-clause
4,328
package actors.websocket import actors.websocket.WebSocketActor.{SendMessageToWebSockets, DeregisterWebSocket, RegisterWebSocket} import akka.actor.{ActorRef, Actor} /** * Created by becker on 2/5/15. */ class WebSocketRegistry extends Actor { var webSockets = Set[ActorRef]() def receive = { case Registe...
dockarium-io/dockarium-io
server/app/actors/websocket/WebSocketRegistry.scala
Scala
apache-2.0
531
/* /* * Copyright 2014 DataGenerator Contributors * * 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 applicabl...
shraddha-patel/DGWithSpark
dg-spark/src/main/code/org/finra/datagenerator/SparkDistributor.scala
Scala
apache-2.0
5,204
package com.seanshubin.http.values.domain abstract class Route(val name: String, val receiver: Receiver) { def accept(request: RequestValue): Boolean }
SeanShubin/http-values
domain/src/main/scala/com/seanshubin/http/values/domain/Route.scala
Scala
unlicense
155
/* * 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 ...
tophua/spark1.52
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
Scala
apache-2.0
17,211
package org.deepdive.udf.nlp import scala.io.Source import java.util.Properties object Main extends App { // Parse command line options case class Config(maxSentenceLength: String) val parser = new scopt.OptionParser[Config]("run.sh") { head("DocumentParser for TSV Extractors", "0.1") head("Input: a T...
sai16vicky/deepdive
examples/nlp_extractor_tsv/src/main/scala/Main.scala
Scala
apache-2.0
2,256
/* * Copyright 2011 TomTom International BV * * 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 o...
ebowman/mavenizer
src/main/scala/com/tomtom/dps/mavenizer/dependency/PomGenerator.scala
Scala
apache-2.0
7,197
package com.github.mdr.mash.ns.core.stringClass import com.github.mdr.mash.functions.{ BoundParams, MashMethod, Parameter, ParameterModel } import com.github.mdr.mash.ns.core.BooleanClass import com.github.mdr.mash.runtime.{ MashBoolean, MashString, MashValue } object EndsWithMethod extends MashMethod("endsWith") { ...
mdr/mash
src/main/scala/com/github/mdr/mash/ns/core/stringClass/EndsWithMethod.scala
Scala
mit
860
package org.jetbrains.plugins.scala package lang.resolve2 /** * @author Alefas * @since 26.08.13 */ class PackageLocalTest extends ResolveTestBase { override def folderPath: String = { super.folderPath + "element/packagelocalclash/" } def testC() = doTest() }
LPTK/intellij-scala
test/org/jetbrains/plugins/scala/lang/resolve2/PackageLocalTest.scala
Scala
apache-2.0
275
package filodb.query.exec import kamon.Kamon import monix.eval.Task import monix.execution.Scheduler import monix.reactive.Observable import filodb.core.{DatasetRef, Types} import filodb.core.memstore.PartLookupResult import filodb.core.metadata.Schemas import filodb.core.query.{EmptyQueryConfig, QueryConfig, QuerySe...
tuplejump/FiloDB
query/src/main/scala/filodb/query/exec/InProcessPlanDispatcher.scala
Scala
apache-2.0
3,230
package com.wavesplatform.api.http.requests import com.wavesplatform.transaction.assets.IssueTransaction import play.api.libs.json.{Format, JsNumber, JsObject, Json} case class IssueV2Request( sender: String, name: String, description: String, quantity: Long, decimals: Byte, reissuable: Boolea...
wavesplatform/Waves
node/src/test/scala/com/wavesplatform/api/http/requests/IssueV2Request.scala
Scala
mit
688
package pl.touk.nussknacker.ui.process import com.typesafe.config.{Config, ConfigFactory} import org.scalatest.{FlatSpec, Matchers} import pl.touk.nussknacker.engine.util.UriUtils import pl.touk.nussknacker.restmodel.process.ProcessingType import pl.touk.nussknacker.restmodel.processdetails.BaseProcessDetails import p...
TouK/nussknacker
ui/server/src/test/scala/pl/touk/nussknacker/ui/process/ConfigProcessToolbarServiceSpec.scala
Scala
apache-2.0
19,712
/* * 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 ...
adrian-ionescu/apache-spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ArithmeticExpressionSuite.scala
Scala
apache-2.0
15,376
package com.lucius.shu.util.mail import com.lucius.shu.base.Props class Mail(var privateContext: String, var subject: String = Props.get("mail_subject"), var to: String = Props.get("mail_to")) { //发件箱 var from = Props.get("mail_from") //发件箱的密码 var password = Props.get("mail_password") //简单邮件传送协议服务器 var sm...
zj-lingxin/spark_hbase_shu
src/main/scala/com/lucius/shu/util/mail/Mail.scala
Scala
mit
1,962
/* * 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 ...
foryou2030/incubator-carbondata
examples/src/main/scala/org/apache/carbondata/examples/DataFrameAPIExample.scala
Scala
apache-2.0
1,744
/* * 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/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/xml/xpath.scala
Scala
apache-2.0
8,379
package breeze.linalg /* Copyright 2012 David Hall 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...
tjhunter/scalanlp-core
math/src/test/scala/breeze/linalg/Counter2Test.scala
Scala
apache-2.0
4,451
package tk.monnef.mcmapper.test import org.scalatest.{Matchers, FlatSpec} class SrgTests extends FlatSpec with Matchers { import TestHelper._ "SrgReader" should "read empty file" in { val r = readSrgFile("empty") r.size shouldBe 0 } it should "read a file with one line" in { val r = readSrgFile...
mnn/mcMapperLib
src/test/scala/tk/monnef/mcmapper/test/SrgTests.scala
Scala
apache-2.0
906
class Wrapper[X](x: X) class C { def a(w: Wrapper[Array[Int]]) = 0 def b(w: Wrapper[Int]) = 0 } object Test { def main(args: Array[String]): Unit = { val c = new C c.a(new Wrapper(Array(1, 2))) c.b(new Wrapper(1)) val methods = classOf[C].getDeclaredMethods.sortBy(_.getName) println("= Java...
felixmulder/scala
test/files/run/t7521b.scala
Scala
bsd-3-clause
489
package scala.test.twitter_scrooge import scala.test.twitter_scrooge.thrift.thrift2.thrift3.Struct3 object Twodeep { val classes = Seq( classOf[Struct3], JustScrooge3.getClass ) def main(args: Array[String]) { classes foreach println } }
sdtwigg/rules_scala
test/src/main/scala/scala/test/twitter_scrooge/Twodeep.scala
Scala
apache-2.0
271
package com.donoroncall.server.rest.undertow import com.donoroncall.server.rest.ServerInterface import com.google.inject.Inject import com.typesafe.config.Config import io.undertow.Undertow import org.slf4j.{LoggerFactory, Logger} /** * Created by vishnu on 20/1/16. */ class UndertowApiServer @Inject()(config: Co...
donorcall01/DonorOnCall_Server
src/main/scala/com/donoroncall/server/rest/undertow/UndertowApiServer.scala
Scala
apache-2.0
1,544
package com.imageintelligence.pix.core import java.util.UUID import com.imageintelligence.pix.api.http.domain.ImageRetrieveQueryRequestDto sealed trait ImageServiceError case class ImageInvalidUrlError(url: String) extends ImageServiceError case class ImageNotFoundError(url: String) extends ImageServiceError case cl...
ImageIntelligence/pix-api
src/main/scala/com/imageintelligence/pix/core/ImageServiceError.scala
Scala
mit
2,554
/* * @author Philip Stutz * * Copyright 2011 University of Zurich * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * U...
danihegglin/DynDCO
src/main/scala/com/signalcollect/nodeprovisioning/Job.scala
Scala
apache-2.0
846
package shredzzz.kirkwood.scalatest.tests.vector.floats import shredzzz.kirkwood.scalatest._ import shredzzz.kirkwood.cumath.tensor.CuVector import shredzzz.kirkwood.cumath.{Sentinel, CuValue} import breeze.linalg.DenseVector import breeze.numerics.pow import shredzzz.kirkwood.scalatest.tests.vector.FloatCuVectorTeste...
shredzzz/kirkwood
src/test/scala/shredzzz/kirkwood/scalatest/tests/vector/floats/ArithmeticOpsTest.scala
Scala
apache-2.0
26,761
package sbtmoe import sbt._ object MOEPlugin extends AutoPlugin { val autoImport = Keys override def projectSettings: Seq[Def.Setting[_]] = Keys.defaultSettings ++ inConfig(Keys.IOS)( Tasks .moeGenTasks ) ++ inConfig(Keys.IOSSimDebug)(Tasks.moeBuildTasks) ++ inConfig(Keys.IOSSimRelease)(Tasks.moe...
HevyLight/sbt-moe
src/main/scala/sbtmoe/Plugin.scala
Scala
apache-2.0
628
package io.vamp.model.reader import java.time.OffsetDateTime import io.vamp.model.event.{ Aggregator, Event, EventQuery, TimeRange } import io.vamp.model.notification.{ EventTimestampError, UnsupportedAggregatorError } import io.vamp.model.reader.YamlSourceReader._ import io.vamp.model.validator.EventValidator objec...
dragoslav/vamp
model/src/main/scala/io/vamp/model/reader/EventReader.scala
Scala
apache-2.0
2,427
package org.improving.scalify import Scalify._ import Bindings._ import org.eclipse.jdt.core._ import org.eclipse.jdt.core.dom // // Keep all the implicits in one place to minimize surprises // trait Implicits extends SafeImplicits with WrapperImplicits { // Pimping Emits and Emissions to enable custom operators ...
mbana/scalify
src/main/core/Implicits.scala
Scala
isc
3,184
package sp.domain.testing { import org.scalatest.FreeSpec import scala.util.Try import sp.domain._ import Logic._ import shapeless.Lazy import play.api.libs.json._ import julienrf.json.derived._ trait TestingDerived { val derive: Json.type = Json def deriveCaseObject[A](implicit derivedRead...
sequenceplanner/sp-domain
src/test/scala/sp/domain/testing/TestingAPITest.scala
Scala
mit
1,331
package uima.cr import java.io.{File, IOException} import java.nio.file.Paths import java.util.Locale import modules.util.ModulesConfig import org.apache.uima.cas.{CAS, CASException} import org.apache.uima.collection.{CollectionException, CollectionReader_ImplBase} import org.apache.uima.resource.ResourceInitializati...
ktr-skmt/FelisCatusZero-multilingual
src/main/scala/uima/cr/QuestionReader.scala
Scala
apache-2.0
2,730
/* * Copyright 2001-2015 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
dotty-staging/scalatest
scalatest-test/src/test/scala/org/scalatest/expectations/ExpectationsSpec.scala
Scala
apache-2.0
30,381
/** * Copyright: Copyright (C) 2016, Jaguar Land Rover * License: MPL-2.0 */ package org.genivi.sota.resolver.test import java.time.Instant import akka.http.scaladsl.model.{StatusCodes, Uri} import eu.timepit.refined.api.Refined import io.circe.generic.auto._ import org.genivi.sota.data._ import org.genivi.sota.ma...
PDXostc/rvi_sota_server
external-resolver/src/test/scala/org/genivi/sota/resolver/test/DevicesResourceSpec.scala
Scala
mpl-2.0
8,800
/** * Copyright (C) 2010-2011 LShift Ltd. * * 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...
aprescott/diffa
kernel/src/main/scala/net/lshift/diffa/kernel/matching/MatchingManager.scala
Scala
apache-2.0
1,481
package com.ubirch.client.storage import com.typesafe.scalalogging.LazyLogging import com.ubirch.backend.chain.model._ import com.ubirch.backend.storage.services.{ChainStorageElastic, ChainStorageNeo4J, ExplorerStorage, MinerStorage} import scala.concurrent.Future /** * Created by derMicha on 13/08/16. */ object...
ubirch/ubirch-storage-service
client/src/main/scala/com/ubirch/client/storage/ChainStorageServiceClient.scala
Scala
apache-2.0
4,111
package edu.cmu.dynet /** Contains methods for initializing DyNet */ object Initialize { private def initialize(params: internal.DynetParams): Unit = { internal.dynet_swig.initialize(params) } /** Initializes DyNet using the specified args * * @param args a Map of key-value pairs indicating any args...
Abasyoni/dynet
contrib/swig/src/main/scala/edu/cmu/dynet/Initialize.scala
Scala
apache-2.0
1,106
package yiris.objects.pretreatment.screens import yiris.core.calculations.Calculations import yiris.core.fluent.Fluent import yiris.core.ratios.Ratios import yiris.core.removals.Removals /** * An object to represents screens. */ object Screens extends Calculations with Fluent with Ratios with Removals { /** *...
kasonchan/yiris
objects/src/main/scala/yiris/objects/pretreatment/screens/Screens.scala
Scala
apache-2.0
999
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
tdanford/bdg-utils
utils-metrics/src/test/scala/org/bdgenomics/utils/instrumentation/InstrumentationTestingUtil.scala
Scala
apache-2.0
3,502
/*********************************************************************** * Copyright (c) 2013-2020 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...
aheyne/geomesa
geomesa-process/geomesa-process-vector/src/main/scala/org/locationtech/geomesa/process/transform/DateOffsetProcess.scala
Scala
apache-2.0
2,570
val DEBUG = false val vPr = Var("pr") val vTa = Var("tas") val dPr = Dim(vPr, "time") val dTa = Dim(vTa, "time") val dimLat = Dim(vPr, "lat") val speed = UserValue("speed", 1).kr val tPr = dPr.play(speed) val tTa = dTa.play(speed) val pr = vPr.play(tPr) val ta = vTa.play(tTa) val lat = pr.axis(dimLat).values ...
iem-projects/sysson
sketches/pr_tas_anorm.scala
Scala
gpl-3.0
3,062
package agilesites.web import java.io.File import agilesites.Utils import sbt.Keys._ import sbt._ import scala.util.matching.Regex trait WebSettings extends Utils with WebUtil { this: AutoPlugin => import AgileSitesWebKeys._ import agilesites.config.AgileSitesConfigKeys._ def fingerPrintMap(staticPrefix: S...
agilesites/agilesites2-build
src/main/scala/agilesites/web/WebSettings.scala
Scala
mit
2,726
/* * 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...
SRGOM/scalatest
scalatest-test/src/test/scala/org/scalatest/AllSuiteProp.scala
Scala
apache-2.0
1,191
/* * Copyright 2001-2008 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
yyuu/scalatest
src/main/scala/org/scalatest/FunSuite.scala
Scala
apache-2.0
53,476
/* * 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-rasterizevector/src/main/scala/org/mrgeo/mapalgebra/RasterizeVectorMapOp.scala
Scala
apache-2.0
6,973
package predict4s package conjunction import spire.math._ import predict4s.coord.SGP72Constants import predict4s.sgp._ import predict4s.sgp.ref.SGP4Vallado import predict4s.coord.SGPElemsConversions import predict4s.coord.SpecialPolarNodal // the idea is to find out algorithms that give interesting propagation times...
pleira/SGP4Extensions
tests/src/main/scala/predict4s/conjunction/conjunction1.scala
Scala
apache-2.0
3,076
package org.broadinstitute.dsde.workbench.sam.api import akka.http.scaladsl.server import akka.http.scaladsl.server.Directives._ import org.broadinstitute.dsde.workbench.sam.service.StatusService import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ import akka.http.scaladsl.model.StatusCodes import spray...
broadinstitute/sam
src/main/scala/org/broadinstitute/dsde/workbench/sam/api/StatusRoutes.scala
Scala
bsd-3-clause
1,347
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala package reflect ...
scala/scala
src/reflect/scala/reflect/io/NoAbstractFile.scala
Scala
apache-2.0
1,275
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * 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 * * https://www.apache.org/licenses/LICENSE...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/feats/FastMovementBarbarian.scala
Scala
apache-2.0
1,610
/* * Copyright 2016 rdbc contributors * * 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...
rdbc-io/rdbc-pgsql
rdbc-pgsql-core/src/main/scala/io/rdbc/pgsql/core/internal/protocol/messages/backend/RowDescription.scala
Scala
apache-2.0
872
package argonaut import org.scalacheck.Prop._ import org.scalacheck.Properties import Data._ import Json._ import org.specs2._, org.specs2.specification._ import org.specs2.matcher._ import scalaz._ import Scalaz._ object JsonSpecification extends Specification with ScalaCheck { // NOTE: List[Json] should be JsonAr...
julien-truffaut/argonaut
src/test/scala/argonaut/JsonSpecification.scala
Scala
bsd-3-clause
3,431
/*********************************************************************** * Copyright (c) 2013-2018 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...
ddseapy/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/data/AccumuloDataStoreFilterTest.scala
Scala
apache-2.0
2,374
/** * This file is part of the TA Buddy project. * Copyright (c) 2014 Alexey Aksenov ezh@ezh.msk.ru * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Global License version 3 * as published by the Free Software Foundation with the addition of t...
digimead/digi-TABuddy-desktop
part-core-keyring/src/main/scala/org/digimead/tabuddy/desktop/core/keyring/storage/Storage.scala
Scala
agpl-3.0
11,589
package scife.enumeration package memoization import scala.collection.mutable._ import scife.util._ import scala.reflect._ // TODO maybe later trait MemoizedStaticBoolSet[T] extends Enum[T] with Memoizable with HasLogger { implicit val classTagT: ClassTag[T]// = implicitly[ClassTag[T]] assert(classTagT != nu...
kaptoxic/SciFe
src/main/scala/scife/enumeration/memoization/MemoizedStaticBoolSet.scala
Scala
gpl-2.0
1,111
/* * Copyright (C) 2017. RandomCoder <randomcoder@randomcoding.co.uk> * * 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 la...
randomcoder/gherkin-converter
src/main/scala/uk/co/randomcoding/cucumber/generator/reader/FeatureReader.scala
Scala
agpl-3.0
8,127
package com.tam.cobol_interpreter.context import java.io.InputStream /** * Created by tamn on 1/13/15. */ object ParseContextFactory { def createParseContext(is:InputStream):ParseContext = { val byteData = new Array[Byte](is.available()) is.read(byteData) new ParseContext(byteData) } }
tamsanh/scala-cobol-interpreter
src/main/scala/com/tam/cobol_interpreter/context/ParseContextFactory.scala
Scala
apache-2.0
307
package applicant.ml.rnn import java.io.{BufferedReader, InputStreamReader} import scopt.OptionParser /** * Tests a TextNet model. */ object TextNetTest { // Command line arguments case class Command(json: String = "", coefficients: String = "") /** * Builds a TextNet network and generates text s...
dataworks/internship-2016
etl/src/scala/applicant/ml/rnn/TextNetTest.scala
Scala
apache-2.0
1,710
/* * 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 ...
ArvinDevel/onlineAggregationOnSparkV2
repl/src/test/scala/org/apache/spark/repl/ExecutorClassLoaderSuite.scala
Scala
apache-2.0
6,052
/** * 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...
tnachen/kafka
core/src/test/scala/unit/kafka/javaapi/consumer/ZookeeperConsumerConnectorTest.scala
Scala
apache-2.0
5,115