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
/* * 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 ...
hequn8128/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/DataStreamConversions.scala
Scala
apache-2.0
8,522
package reftree.svg.api import monocle._ import reftree.geometry._ import reftree.util.Optics import zipper.Unzip /** * SVG API sufficient to implement animations */ abstract class BaseSvgApi[Svg] { /* Basic element properties and selection */ def elementName: Getter[Svg, String] def elementId: Getter[Svg, O...
stanch/reftree
core/shared/src/main/scala/reftree/svg/api/BaseSvgApi.scala
Scala
gpl-3.0
2,868
/** * 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...
cexbrayat/camel
components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/IdempotentConsumerTest.scala
Scala
apache-2.0
3,564
case class A(x: Int)
som-snytt/dotty
tests/pos/simpleCaseClass-2.scala
Scala
apache-2.0
21
type Id = String enum Kind { case Type } enum Term[T <: Term[T, K], K] { case Wrap(t: T) case Fun(id: Id, tag: K, ret: Term[T, K]) } enum Type { case Var(id: Id) } val tExp: Term[Type, Kind] = Term.Fun("x", Kind.Type, Term.Wrap(Type.Var("x"))) // error def main(args: Array[String...
som-snytt/dotty
tests/neg-custom-args/allow-deep-subtypes/i8464a.scala
Scala
apache-2.0
334
/* * 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/fset-faststream
app/config/microserviceGlobal.scala
Scala
apache-2.0
2,406
/*********************************************************************** * 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-index-api/src/test/scala/org/locationtech/geomesa/index/planning/InMemoryQueryRunnerTest.scala
Scala
apache-2.0
4,758
/* * 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 ...
sjtu-iiot/graphx-algorithm
src/main/scala/org/apache/spark/graphx/lib/ConnectedComponents.scala
Scala
gpl-2.0
2,237
package de.hpi.asg.breezetestgen.testgeneration import de.hpi.asg.breezetestgen.testing.TestEvent sealed trait TestOp case class Follow(after: TestEvent) extends TestOp case class Merge(after: Set[TestEvent]) extends TestOp
0x203/BreezeTestGen
src/main/scala/de/hpi/asg/breezetestgen/testgeneration/TestOp.scala
Scala
mit
226
package gitbucket.core.controller.api import gitbucket.core.api.{ApiBranchCommit, ApiBranchForHeadCommit, ApiCommits, JsonFormat} import gitbucket.core.controller.ControllerBase import gitbucket.core.model.Account import gitbucket.core.service.{AccountService, CommitsService, ProtectedBranchService} import gitbucket.co...
imeszaros/gitbucket
src/main/scala/gitbucket/core/controller/api/ApiRepositoryCommitControllerBase.scala
Scala
apache-2.0
5,162
import scala.tasty.Reflection import scala.tasty.inspector._ object Test { def main(args: Array[String]): Unit = { new DBInspector().inspect("", List("Foo")) } } class DBInspector extends TastyInspector { protected def processCompilationUnit(reflect: Reflection)(root: reflect.Tree): Unit = { import ref...
som-snytt/dotty
tests/run-custom-args/tasty-inspector/tasty-inspector/Test.scala
Scala
apache-2.0
711
package com.pedrorijo91.yo.model case class Location(private val latitude: String, private val longitude: String) { def value: String = s"$latitude,$longitude" }
pedrorijo91/yo-scala-client
src/main/scala/com/pedrorijo91/yo/model/Location.scala
Scala
mit
165
/* * Tests if two lambdas defined in the same class do not lead to * name clashes. */ object Test { def takeLambda(f: Int => Int ): Int = f(12) def main(args: Array[String]): Unit = { println(takeLambda(x => x+1)) println(takeLambda(x => x*2)) } }
yusuke2255/dotty
tests/run/delambdafy-two-lambdas.scala
Scala
bsd-3-clause
259
package org.mbari.smith import vars.annotation.ui.{StateLookup, ToolBelt} import com.google.inject.Injector import scala.collection.JavaConverters._ import vars.annotation.VideoFrame import org.slf4j.LoggerFactory import java.net.URL /** * * @author Brian Schlining * @since 2013-01-29 */ object CoverageEstimato...
hohonuuli/vars
vars-standalone/src/main/scala/org/mbari/smith/CoverageEstimator.scala
Scala
lgpl-2.1
2,819
package org.scalatra package oauth2 package service import scala.util.control.Exception.allCatch import commands._ import model._ import scalaz._ import Scalaz._ import akka.actor.ActorSystem import org.scalatra.validation.{ ValidationError, UnknownError, NotImplemented } trait CommandHandler { self: Logging β‡’ def ...
scalatra/oauth2-server
src/main/scala/org/scalatra/oauth2/service/AuthenticationService.scala
Scala
mit
3,245
/* * 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 n...
gf53520/kafka
core/src/test/scala/unit/kafka/coordinator/transaction/TransactionMarkerRequestCompletionHandlerTest.scala
Scala
apache-2.0
9,877
package com.arcusys.learn.liferay.update.version270 import com.arcusys.learn.liferay.LiferayClasses.LUpgradeProcess import com.arcusys.learn.liferay.update.version240.file.FileTableComponent import com.arcusys.learn.liferay.update.version270.migrations.PackageMigrationBase import com.arcusys.valamis.lesson.scorm.stora...
igor-borisov/valamis
learn-portlet/src/main/scala/com/arcusys/learn/liferay/update/version270/DBUpdater2713.scala
Scala
gpl-3.0
1,657
/* * Copyright (c) 2013-2014 Snowplow Analytics Ltd. * All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache * License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at * http://...
pkallos/snowplow
3-enrich/scala-kinesis-enrich/src/main/scala/com.snowplowanalytics.snowplow.enrich.kinesis/sinks/KinesisSink.scala
Scala
apache-2.0
4,235
/* * Copyright (c) 2014-2019 by The Minitest Project Developers. * Some rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE...
monifu/minitest
shared/src/main/scala/minitest/api/SourceLocation.scala
Scala
apache-2.0
1,894
package com.github.gluthra.fitnessz.app import com.github.gluthra.fitnessz.app.models.{FitnessEventQueryParams, FitnessEventDAO, FitnessEvent} import com.github.gluthra.fitnessz.app.models.FitnessEventConversions._ import org.joda.time.DateTime class EventService { def getEventsForUser(userId: String): List[Fitnes...
gsluthra/fitnessz
src/main/scala/com/github/gluthra/fitnessz/app/EventService.scala
Scala
apache-2.0
726
package org.broadinstitute.dsde.workbench.sam.dataAccess object ConnectionType extends Enumeration { type ConnectionType = Value val LDAP, Postgres = Value }
broadinstitute/sam
src/main/scala/org/broadinstitute/dsde/workbench/sam/dataAccess/ConnectionType.scala
Scala
bsd-3-clause
163
package org.jetbrains.plugins.scala.extensions.implementation.iterator import com.intellij.psi.PsiElement import scala.collection.mutable /** * Pavel.Fatin, 09.05.2010 */ class DepthFirstIterator(element: PsiElement, predicate: PsiElement => Boolean) extends Iterator[PsiElement] { private val stack: mutable.Sta...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/extensions/implementation/iterator/DepthFirstIterator.scala
Scala
apache-2.0
765
package universe /** Helper class to do simple arithmetic on (Int, Int) tuples */ case class Pos(x: Int, y: Int) { def distance(other: Pos): Double = (other - this).euclidianNorm def directionTo(target: Pos): Pos = (target - this).normalize def -(other: Pos): Pos = this + (other.unary_-) def +(othe...
guidosalva/REScala
Code/Examples/Universe/src/main/scala/universe/Pos.scala
Scala
apache-2.0
690
package edu.gemini.pit.ui.action import edu.gemini.model.p1.immutable.ProposalIo import edu.gemini.pit.model.Model import edu.gemini.ui.workspace.scala.RichShell import swing.Dialog /** * Validate the proposal upon demand. */ class ValidateAction(shell: RichShell[Model]) extends ShellAction(shell, "Validate Propos...
spakzad/ocs
bundle/edu.gemini.pit/src/main/scala/edu/gemini/pit/ui/action/ValidateAction.scala
Scala
bsd-3-clause
718
/* 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/test/scala/cc/factorie/optimize/TestSampleRank.scala
Scala
apache-2.0
5,384
package org.hablapps.meetup package funmonad package logic import common.logic.Domain._ sealed abstract class StoreProgram[A] case class PutUser(user: User) extends StoreProgram[Int] case class PutGroup(group: Group) extends StoreProgram[Int] case class GetUser(uid: Int) extends StoreProgram[User] case class GetGroup...
hablapps/meetapp
app/funMonad/logic/DeepStore.scala
Scala
apache-2.0
1,429
/* * 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 ...
Intel-bigdata/OAP
oap-native-sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcV2SchemaPruningSuite.scala
Scala
apache-2.0
3,433
package unfiltered.filter.util object IteratorConversions { import org.apache.commons.{fileupload => fu} import fu.{FileItemIterator, FileItemStream} import java.util.{Iterator => JIterator} /** convert java iterator to scala iterator */ implicit final class JIteratorWrapper[A](i: JIterator[A]) extends Iter...
unfiltered/unfiltered
filter-uploads/src/main/scala/request/conversions.scala
Scala
mit
643
package org.jetbrains.plugins.scala.testingSupport.scalatest.singleTest import org.jetbrains.plugins.scala.testingSupport.scalatest.generators.FunSpecGenerator /** * @author Roman.Shein * @since 20.01.2015. */ trait FunSpecSingleTestTest extends FunSpecGenerator { val funSpecTestPath = List("[root]", "FunSpecTes...
triggerNZ/intellij-scala
test/org/jetbrains/plugins/scala/testingSupport/scalatest/singleTest/FunSpecSingleTestTest.scala
Scala
apache-2.0
735
/* * 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...
lhfei/spark-in-action
spark-2.x/src/main/scala/org/apache/spark/examples/mllib/DenseKMeans.scala
Scala
apache-2.0
3,643
package whilelang object Main { def main(args : Array[String]) : Unit = { if(args.length != 1) { Error("Please provide an input file.") } import java.io.{FileInputStream,IOException} val parser = new Parser try { val in = new FileInputStream(args(0)) val parsed = parser.parse...
sana/WorkAtEPFL
WhiteLanguageProgramVerifier/compiler/src/whilelang/Main.scala
Scala
gpl-3.0
1,473
/*********************************************************************** * 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-convert/geomesa-convert-common/src/main/scala/org/locationtech/geomesa/convert2/transforms/StringFunctionFactory.scala
Scala
apache-2.0
3,825
package edu.gemini.qv.plugin.filter.core import edu.gemini.pot.sp.SPComponentType import edu.gemini.qv.plugin.QvStore import edu.gemini.qv.plugin.QvStore.{BarChart, Histogram, Table} import edu.gemini.qv.plugin.chart.Axis import edu.gemini.qv.plugin.filter.core.Filter._ import scala.xml.Node object FilterXMLFormatte...
arturog8m/ocs
bundle/edu.gemini.qv.plugin/src/main/scala/edu/gemini/qv/plugin/filter/core/FilterXMLFormatter.scala
Scala
bsd-3-clause
11,969
package im.actor.server.api.rpc.calls import java.math.BigInteger import java.security.MessageDigest import scala.concurrent.{ ExecutionContext, Future } import akka.actor.ActorSystem import slick.driver.PostgresDriver.api._ import im.actor.api.rpc._ import im.actor.api.rpc.calls.{ CallsService, ResponseGetVoxUser,...
boneyao/actor-platform
actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/calls/CallsServiceImpl.scala
Scala
mit
2,717
/* * 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 ...
szhem/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/UnivocityParser.scala
Scala
apache-2.0
11,048
package dotty.tools.dotc package core import Types._, Symbols._, Contexts._ import printing.Printer import printing.Texts.Text object Constants { final val NoTag = 0 final val UnitTag = 1 final val BooleanTag = 2 final val ByteTag = 3 final val ShortTag = 4 final val CharTag = 5 final v...
som-snytt/dotty
compiler/src/dotty/tools/dotc/core/Constants.scala
Scala
apache-2.0
10,851
package com.judopay.connect.statsd.config import com.judopay.connect.statsd.ConnectorParser.{ComparisonContext, LhsContext, RhsContext, StattypeContext} import com.judopay.connect.statsd.{ConnectorLexer, ConnectorParser, ConnectorParserBaseListener, StatType} import org.antlr.v4.runtime._ import org.apache.kafka.conne...
mtranter/kafka-connect-statsd
kafka-connect-statsd/src/main/scala/com/judopay/connect/statsd/config/ExtractorParser.scala
Scala
mit
5,061
package com.nekopiano.scala.processing.sandbox.poc.physics import com.nekopiano.scala.processing._ import com.typesafe.scalalogging.LazyLogging /** * Created on 09/08/2016. */ class BouncyBubblesIn3DWSoundApp extends ThreeDimensionalCameraPApp with LazyLogging { implicit val sp5 = this val numBalls = 32 v...
lamusique/ScalaProcessing
samples/src/test/scala/com/nekopiano/scala/processing/sandbox/poc/physics/BouncyBubblesIn3DWSound.scala
Scala
apache-2.0
4,248
package squants.electro import org.scalatest.{FlatSpec, Matchers} import squants.QuantityParseException import squants.space.Meters /** * @author Nicolas Vinuesa * @since 1.4 * */ class MagneticFieldStrengthSpec extends FlatSpec with Matchers { behavior of "MagneticFieldStrength and its Units of Measure" ...
underscorenico/squants
shared/src/test/scala/squants/electro/MagneticFieldStrengthSpec.scala
Scala
apache-2.0
1,900
package fpgatidbits.regfile import Chisel._ // command bundle for read/writes to AEG/CSR registers class RegCommand(idBits: Int, dataBits: Int) extends Bundle { val regID = UInt(width = idBits) val read = Bool() val write = Bool() val writeData = UInt(width = dataBits) override def clone = { n...
maltanar/fpga-tidbits
src/main/scala/fpgatidbits/regfile/RegFile.scala
Scala
bsd-2-clause
2,908
package io.taig.android.widget import android.content.Context import android.util.AttributeSet import android.view.MotionEvent /** * Advanced [[android.support.v4.view.ViewPager]] that allows to toggle swiping */ class ViewPager(context: Context, attributes: AttributeSet) extends android.support.v4.view.ViewP...
Taig/Toolbelt
widget/src/main/scala/io/taig/android/widget/ViewPager.scala
Scala
mit
872
package fpinscala.parallelism import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.{Callable, ExecutorService, Executors, ThreadFactory, TimeUnit, TimeoutException, Future => JFuture} import scala.concurrent.{Future => SFuture} import scala.concurrent.ExecutionContext.Implicits.global import f...
benen/fpinscala
exercises/src/test/scala/fpinscala/parallelism/ParSpec.scala
Scala
mit
6,604
package controllers import contexts.{CreateInventoryContext, DeleteInventoryContext} import jsons.InventoryJson import models.Inventory import play.api.data.Forms._ import play.api.data._ import play.api.libs.concurrent.Execution.Implicits.defaultContext import utils.exceptions.InvalidRequest object InventoriesContro...
KIWIKIGMBH/kiwierp
kiwierp-backend/app/controllers/InventoriesController.scala
Scala
mpl-2.0
2,104
package org.jetbrains.plugins.scala package lang package psi package impl package base package types import com.intellij.lang.ASTNode import org.jetbrains.plugins.scala.lang.psi.api.ScalaElementVisitor import org.jetbrains.plugins.scala.lang.psi.api.base.types._ /** * @author ilyas, Alexander Podkhalyuzin */ class...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/base/types/ScFunctionalTypeElementImpl.scala
Scala
apache-2.0
556
package almhirt.akkax import scala.concurrent.ExecutionContext import scala.concurrent.duration._ import almhirt.common._ import akka.event.LoggingAdapter import akka.actor._ import akka.pattern._ import almhirt.context.HasAlmhirtContext object FusedActor { def wrap(fusedActor: ActorRef)(timeout: FiniteDuration)(im...
chridou/almhirt
almhirt-core/src/main/scala/almhirt/akkax/FusedActor.scala
Scala
apache-2.0
17,002
package com.github.mdr.mash.ns.os.pathClass import java.nio.file.Files import java.nio.file.attribute.PosixFilePermission import com.github.mdr.mash.functions._ import com.github.mdr.mash.ns.core.NoArgFunction import com.github.mdr.mash.ns.core.NoArgFunction.NoArgValue import com.github.mdr.mash.ns.os.PermissionsClas...
mdr/mash
src/main/scala/com/github/mdr/mash/ns/os/pathClass/SetExecutableMethod.scala
Scala
mit
4,443
package org.openmole.site /* * Copyright (C) 2015 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...
openmole/openmole
openmole/bin/org.openmole.site/jvm/src/main/scala/org/openmole/site/Config.scala
Scala
agpl-3.0
1,352
/* * 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...
minixalpha/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/ColumnarBatchScan.scala
Scala
apache-2.0
5,924
package org.jetbrains.plugins.scala.debugger.evaluateExpression import org.jetbrains.plugins.scala.debugger.ScalaDebuggerTestCase /** * User: Alefas * Date: 15.10.11 */ class ScalaLocalMethodEvaluationTest extends ScalaDebuggerTestCase { def testSimple() { addFileToProject("Sample.scala", """ |o...
consulo/consulo-scala
test/org/jetbrains/plugins/scala/debugger/evaluateExpression/ScalaLocalMethodEvaluationTest.scala
Scala
apache-2.0
7,776
/** * Copyright 2011-2017 GatlingCorp (http://gatling.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.org/licenses/LICENSE-2.0 * * Unless required by appli...
timve/gatling
gatling-jms/src/main/scala/io/gatling/jms/check/JmsSimpleCheck.scala
Scala
apache-2.0
1,188
/* * 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...
dotty-staging/scalatest
scalatest/src/main/scala/org/scalatest/concurrent/JavaFutures.scala
Scala
apache-2.0
5,843
package org.deepdive.extraction.datastore import org.deepdive.Logging import scala.collection.mutable.{Map => MMap, ArrayBuffer} import play.api.libs.json._ /* Stores Extraction Results */ trait MemoryExtractionDataStoreComponent extends ExtractionDataStoreComponent{ val dataStore = new MemoryExtractionDataStore ...
feiranwang/deepdive
src/main/scala/org/deepdive/extraction/datastore/MemoryExtractionDataStore.scala
Scala
apache-2.0
1,522
/* * Copyright (c) 2016 SnappyData, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
vjr/snappydata
core/src/main/scala/org/apache/spark/sql/streaming/MappedDStream.scala
Scala
apache-2.0
1,275
package drt.shared import drt.shared.Terminals._ import drt.shared.TimeUtil._ import drt.shared.api.{TerminalWalkTimes, WalkTime, WalkTimes} import org.specs2.mutable.Specification class WalkTimesSpec extends Specification { "When formatting a walk time as minutes and seconds" >> { "Given a round minute I shou...
UKHomeOffice/drt-scalajs-spa-exploration
server/src/test/scala/drt/shared/WalkTimesSpec.scala
Scala
apache-2.0
3,903
package com.socrata.http.server.util object PreconditionRenderer extends (Precondition => Seq[(String, String)]) { def apply(precondition: Precondition): Seq[(String, String)] = precondition match { case IfDoesNotExist => List("If-None-Match" -> "*") case IfExists => List("If-Match" -> "*") case IfAnyOf(...
socrata-platform/socrata-http
socrata-http-server/src/main/scala/com/socrata/http/server/util/PreconditionRenderer.scala
Scala
apache-2.0
581
/* * Copyright 2015 Roberto Tyley * * 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...
rtyley/play-git-hub
src/test/scala/com/madgag/rfc5988link/LinkParserTest.scala
Scala
gpl-3.0
1,841
package inloopio.util.pinyin import java.io.UnsupportedEncodingException import inloopio.util.pinyin.format.HanyuPinyinCaseType import inloopio.util.pinyin.format.HanyuPinyinOutputFormat import inloopio.util.pinyin.format.HanyuPinyinToneType import inloopio.util.pinyin.format.HanyuPinyinVCharType object PinYin { pr...
dcaoyuan/inloopio-libs
inloopio-util/src/main/scala/inloopio/util/pinyin/PinYin.scala
Scala
bsd-3-clause
3,367
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013-2015, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
CapeSepias/scala-js
test-suite/src/test/scala/org/scalajs/testsuite/library/UseAsTest.scala
Scala
bsd-3-clause
16,342
import sbt._ import Keys._ // import com.typesafe.sbtosgi.OsgiPlugin._ object ConfigBuild extends Build { val unpublished = Seq( // no artifacts in this project publishArtifact := false, // make-pom has a more specific publishArtifact setting already // so needs specific override ...
Kaliber/config-ordered
project/Build.scala
Scala
apache-2.0
4,697
import com.cave.metrics.data.Role import data.UserData import org.joda.time.DateTime import org.mockito.{Matchers, Mockito} import org.mockito.Mockito._ import play.api.libs.json.Json import play.api.mvc.Results import play.api.test.{FakeHeaders, FakeRequest, PlaySpecification} import scala.concurrent.{ExecutionContex...
gilt/cave
api/test/AddOrganizationUserApiSpec.scala
Scala
mit
13,100
package org.broadinstitute.dsde.firecloud.test.analysis import org.broadinstitute.dsde.firecloud.fixture.UserFixtures import org.broadinstitute.dsde.workbench.auth.AuthToken import org.broadinstitute.dsde.workbench.config.UserPool import org.broadinstitute.dsde.workbench.fixture._ import org.broadinstitute.dsde.workbe...
broadinstitute/firecloud-ui
automation/src/test/scala/org/broadinstitute/dsde/firecloud/test/analysis/MethodImportSpec.scala
Scala
bsd-3-clause
3,432
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package java.lang class StringBuilder ext...
nicolasstucki/scala-js
javalanglib/src/main/scala/java/lang/StringBuilder.scala
Scala
apache-2.0
7,018
package nasa.nccs.edas.portal import java.io.File import java.lang.management.ManagementFactory import java.nio.file.{Files, Path, Paths} import java.sql.{Date, Timestamp} import scala.xml import scala.collection.JavaConversions._ import scala.collection.JavaConverters._ import nasa.nccs.cdapi.data.{FastMaskedArray, He...
nasa-nccs-cds/EDAS
src/main/scala/nasa/nccs/edas/portal/application.scala
Scala
gpl-2.0
16,685
package com.campudus.tableaux.router import java.util.UUID import com.campudus.tableaux.controller.TableauxController import com.campudus.tableaux.database.domain.{CellAnnotationType, Pagination} import com.campudus.tableaux.helper.JsonUtils._ import com.campudus.tableaux.{InvalidJsonException, NoJsonFoundException, ...
campudus/tableaux
src/main/scala/com/campudus/tableaux/router/TableauxRouter.scala
Scala
apache-2.0
22,352
package example import scalaz.syntax.foldable._ import scalaz.std.list._ import scalaz.syntax.foldable._ import scalaz.std.math.bigDecimal._ import scalaz.std.anyVal._ import monocle.macros._ @Lenses("_") case class Person(name: String, firstName : Option[String], firstAddress : Address , addresses : List[Address], ac...
inoio/monocle-example
src/main/scala/example/entities.scala
Scala
gpl-2.0
739
/* * 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 ...
aosagie/spark
core/src/main/scala/org/apache/spark/util/ThreadUtils.scala
Scala
apache-2.0
11,963
/************************************************************************\\ ** Project ** ** ______ ______ __ ______ ____ ** ** / ____/ / __ / / / / __ / / __/ (c) 2011-2014 ** ** / /__ / /_...
AlecZorab/spire
core/src/main/scala/spire/random/rng/Well44497a.scala
Scala
mit
5,341
package eu.execom.FabutPresentation.persistence trait Enum { def name: String } case class SortOrder(name: String) extends Enum object SortOrder { val ASC = SortOrder("ASC") val DESC = SortOrder("DESC") val values: List[SortOrder] = ASC :: DESC :: Nil def withName(name:String):SortOrder = values.find(_....
idostanic/FabutPresentation
src/main/scala/eu/execom/FabutPresentation/persistence/Enums.scala
Scala
apache-2.0
1,040
package jp.sf.amateras.solr.scala import org.apache.solr.common._ import org.apache.solr.common.util._ import org.apache.solr.client.solrj._ import org.apache.solr.client.solrj.impl.HttpSolrServer import org.apache.http.impl.client.DefaultHttpClient import org.apache.http.auth.AuthScope import org.apache.http....
matthewchartier/solr-scala-client
src/main/scala/jp/sf/amateras/solr/scala/SolrServerFactory.scala
Scala
apache-2.0
1,773
/* * 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 ...
SparklineData/spark-druid-olap
src/main/scala/org/sparklinedata/druid/jscodegen/JSCast.scala
Scala
apache-2.0
6,099
package lodo import japgolly.scalajs.react.ReactComponentB import japgolly.scalajs.react.vdom.prefix_<^._ object Header { case class Props(b: Dashboard.Backend, isShowSidebar: Boolean, isHideComplete: Boolean, isQuickAdd: Boolean) val header = ReactComponentB[Props]("Header") .render(P => { <.nav(^.cls...
k3d3/lodo
lodo/js/src/main/scala/components/Header.scala
Scala
agpl-3.0
3,274
/* * 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...
rorygraves/perf_tester
corpus/shapeless/src/test/scala/shapeless/coproduct.scala
Scala
apache-2.0
60,283
/* * A real-time collaborative tool to develop files over the network. * Copyright (C) 2010 Mauro Ciancio and Leandro Gilioli * {maurociancio,legilioli} at gmail dot com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Publi...
maurociancio/parallel-editor
src/parallel-editor-kernel/src/main/scala/ar/noxit/paralleleditor/kernel/exceptions/UsernameAlreadyExistsException.scala
Scala
gpl-3.0
1,003
/* * 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 ...
ibmsoe/spark-bench
Terasort/src/main/scala/terasortApp.scala
Scala
apache-2.0
2,221
package io.taig.android.util.syntax trait all extends bitmap with bundle with `class` with file with string object all extends all
Taig/Toolbelt
util/src/main/scala/io/taig/android/util/syntax/all.scala
Scala
mit
133
/* * 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 ...
csantanapr/incubator-openwhisk
tests/src/test/scala/org/apache/openwhisk/core/loadBalancer/test/ShardingContainerPoolBalancerTests.scala
Scala
apache-2.0
22,042
package fpinscala.ch03datastructures sealed trait List[+A] // `List` data type, parameterized on a type, `A` case object Nil extends List[Nothing] // A `List` data constructor representing the empty list /* Another data constructor, representing nonempty lists. Note that `tail` is another `List[A]`, which may be `Nil`...
hugocf/fpinscala
src/main/scala/fpinscala/ch03datastructures/List.scala
Scala
mit
5,311
package com.saikocat.meownificent import akka.actor.{ActorSystem, Props} import akka.event.Logging import akka.io.IO import spray.can.Http import com.saikocat.meownificent.configuration.Settings import com.saikocat.meownificent.service.RootServiceActor object Boot extends App { implicit val system = ActorSystem("m...
saikocat/meownificent
rest/src/main/scala/com/saikocat/meownificent/Boot.scala
Scala
mit
647
//: ---------------------------------------------------------------------------- //: 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...
neigor/funnel
chemist/src/main/scala/flask.scala
Scala
apache-2.0
3,896
package opennlp.scalabha.tag.support import opennlp.scalabha.util.CollectionUtils._ import opennlp.scalabha.util.CollectionUtil._ import opennlp.scalabha.util.LogNum import opennlp.scalabha.util.LogNum._ class BinomialFreqDist[T](label0: T, label1: T, firstProb: LogNum) extends MultinomialFreqDist(Map(label0 -> fir...
eponvert/Scalabha
src/main/scala/opennlp/scalabha/tag/support/BinomialFreqDist.scala
Scala
apache-2.0
1,363
package biz.k11i.xgboost.spark.util import biz.k11i.xgboost.util.FVec import org.apache.spark.ml.linalg.{DenseVector, SparseVector, Vector} object FVecMLVector { /** * Transform feature vector from spark.ml's [[Vector]] to [[FVec]]. * * @param vector feature vector represented by [[Vector]] * @return [[...
komiya-atsushi/xgboost-predictor-java
xgboost-predictor-spark/src/main/scala/biz/k11i/xgboost/spark/util/FVecMLVector.scala
Scala
apache-2.0
1,427
package com.overviewdocs.clustering import java.io.{BufferedWriter,OutputStream,OutputStreamWriter} import java.nio.charset.StandardCharsets import com.overviewdocs.database.HasBlockingDatabase import com.overviewdocs.models.Document import com.overviewdocs.models.tables.{DocumentTags,Documents} /** Iterates over Do...
overview/overview-server
worker/src/main/scala/com/overviewdocs/clustering/CatDocuments.scala
Scala
agpl-3.0
1,717
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // Licence: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.core.javac import akka.event.slf4j.SLF4JLogging import com.sun.source.tree.Tree import javax.lang.model.element.Element import com.sun.tools.javac.tree.JCTree import com....
j-mckitrick/ensime-sbt
src/sbt-test/ensime-sbt/ensime-server/core/src/main/scala/org/ensime/core/javac/UnsafeHelpers.scala
Scala
apache-2.0
1,694
package myorg import io.prediction.controller.Engine import io.prediction.controller.IEngineFactory import io.prediction.engines.itemrec.EventsDataSource import io.prediction.engines.itemrec.ItemRecPreparator import io.prediction.engines.itemrec.NCItemBasedAlgorithm object TempFilterEngine extends IEngineFactory { ...
ch33hau/PredictionIO
examples/experimental/scala-local-movielens-filtering/src/main/scala/Engine.scala
Scala
apache-2.0
522
package definiti.common.utils import definiti.common.ast._ object ASTUtils { def root(namespaces: Namespace*): Root = { Root(namespaces) } def root(namespaceElements: NamespaceElement*)(implicit dummyImplicit: DummyImplicit): Root = { Root(Seq(Namespace("", "", namespaceElements))) } def namespace...
definiti/definiti-core
src/main/scala/definiti/common/utils/ASTUtils.scala
Scala
mit
2,112
/*********************************************************************** * Copyright (c) 2013-2019 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
elahrvivaz/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/process/analytic/UniqueProcessTest.scala
Scala
apache-2.0
8,856
/* * Author: Pablo Lalloni <[email protected]> * Created: 24/05/2011 13:48:43 */ package org.retistruen.instrument import org.scalatest.FunSpec import org.scalatest.matchers.ShouldMatchers class SlidingMaxSpec extends FunSpec with ShouldMatchers { def newFixture = { val emt = new SourceEmitter[Int]("emitte...
plalloni/retistruen
src/test/scala/org/retistruen/instrument/SlidingMaxSpec.scala
Scala
mit
1,156
/* * Copyright 2015 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
keithhall/ct-calculations
src/main/scala/uk/gov/hmrc/ct/version/HmrcVersions.scala
Scala
apache-2.0
1,263
/* * Copyright 2014 porter <https://github.com/eikek/porter> * * 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...
eikek/porter
openid/src/main/scala/porter/app/openid/OpenIdServiceSettings.scala
Scala
apache-2.0
2,624
package at.logic.gapt.proofs.lk.base import at.logic.gapt.algorithms.rewriting.NameReplacement import at.logic.gapt.language.hol.{ HOLPosition, HOLOrdering } import at.logic.gapt.proofs.occurrences._ import at.logic.gapt.proofs.proofs._ import at.logic.gapt.expr._ import at.logic.gapt.utils.ds.trees._ /** * A sequen...
gisellemnr/gapt
src/main/scala/at/logic/gapt/proofs/lk/base.scala
Scala
gpl-3.0
11,328
/* * 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 ...
memsql/streamliner-examples
src/test/scala/test/util/LocalSparkContext.scala
Scala
apache-2.0
1,955
package model case class LoginUserInput(usernameOrEmail: String, password: String)
sysgears/apollo-universal-starter-kit
modules/user/server-scala/src/main/scala/model/LoginUserInput.scala
Scala
mit
84
/* Copyright 2009-2016 EPFL, Lausanne */ import leon.lang._ object Postconditions { def failling_1(f: BigInt => BigInt) = { require(forall((a: BigInt) => a > 0 ==> f(a) > 0)) f(10) } ensuring { res => forall((a: BigInt) => res > f(a)) } def failling_2(f: BigInt => BigInt, x: BigInt) = { require(x >...
epfl-lara/leon
src/test/resources/regression/verification/purescala/invalid/Postcondition.scala
Scala
gpl-3.0
437
/* * Copyright 2010 Michael Fortin <[email protected]> * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this * file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable la...
m410/brzy
src/main/scala/org/brzy/webapp/BrzyServlet.scala
Scala
apache-2.0
1,660
trait A[+_X] { protected[this] type X = _X // error: variance def f: X } trait B extends A[B] { def f: X = new B {} } class C extends B with A[C] { // should be required because the inherited f is of type B, not C // override def f: X = new C } object Test extends App { val c1 = new C val c2: C = c1.f ...
som-snytt/dotty
tests/neg/i3989d.scala
Scala
apache-2.0
322
/* * Copyright (c) 2014-2020 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
alexandru/monifu
monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SampleRepeatedSuite.scala
Scala
apache-2.0
1,558
package scala.lms package common import java.io.PrintWriter import internal._ import scala.reflect.SourceContext trait ExceptionOps extends Variables { // TODO: support virtualization of try-catch-finally blocks // for now, we only allow fatal errors (the exception will never be caught in generated code) def...
scalan/virtualization-lms-core
src/common/ExceptionOps.scala
Scala
bsd-3-clause
2,114
/* * 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 ...
zentol/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/utils/TableTestBase.scala
Scala
apache-2.0
64,123
package com.karasiq.nanoboard import scala.language.postfixOps package object model extends Tables with ConfigQueries with PostQueries with ContainerQueries
Karasiq/nanoboard
src/main/scala/com/karasiq/nanoboard/model/package.scala
Scala
apache-2.0
158
package lila package object evaluation extends PackageObject
luanlv/lila
modules/evaluation/src/main/package.scala
Scala
mit
62