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 (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
benchmarks/shared/src/main/scala/monix/benchmarks/TaskMapCallsBenchmark.scala
Scala
apache-2.0
2,090
/* * 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 ...
tzulitai/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/logical/PushProjectIntoLegacyTableSourceScanRule.scala
Scala
apache-2.0
5,220
package scala.slick.memory import scala.language.{implicitConversions, existentials} import scala.collection.mutable.Builder import scala.reflect.ClassTag import scala.util.control.NonFatal import scala.slick.action._ import scala.slick.ast._ import TypeUtil._ import scala.slick.compiler._ import scala.slick.profile....
nuodb/slick
src/main/scala/scala/slick/memory/MemoryProfile.scala
Scala
bsd-2-clause
11,736
trait ExplodeWhenLowEnergy extends Strategy { val InterestingCells = Cell.NonEmptyTypes - MyMiniBot - Wall - Toxifera - Snorg val LowEnergyThreshold = 80 def interestingCellsInNeighbourhood(view: View) = for { cellType <- InterestingCells cell <- view.allOfType(cellType) } yield cell override def reac...
nurkiewicz/scalatron-bot
src/main/scala/ExplodeWhenLowEnergy.scala
Scala
apache-2.0
507
package com.lynbrookrobotics.potassium.frc import edu.wpi.first.wpilibj.AnalogInput import org.scalacheck.Prop.forAll import org.scalatest.FunSuite import org.scalatest.prop.Checkers._ import org.mockito.Mockito._ import org.scalatest.mockito.MockitoSugar import Implicits._ import squants.electro.Volts class Interfac...
Team846/potassium
frc/jvm/src/test/scala/com/lynbrookrobotics/potassium/frc/InterfaceSignalsTest.scala
Scala
mit
859
package jp.mwsoft.r2c.aozora import java.io.BufferedWriter import java.io.File import java.io.FileWriter import java.io.IOException import java.io.InputStream import java.util.zip.ZipFile import scala.collection.JavaConversions._ import scala.collection.mutable.ArrayBuffer import scala.io.Codec.string2codec import sca...
mwsoft/resource2text
src/main/scala/jp/mwsoft/r2c/aozora/Aozora2Text.scala
Scala
mit
3,306
/* * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * 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 Fou...
TiarkRompf/lancet
src/main/scala/generated/scala/DoubleDenseMatrix.scala
Scala
agpl-3.0
1,490
package com.sksamuel.elastic4s.get import com.sksamuel.elastic4s.RefreshPolicy import com.sksamuel.elastic4s.testkit.DockerTests import org.scalatest.FlatSpec import org.scalatest.Matchers._ import org.scalatest.mockito.MockitoSugar import scala.util.Try class MultiGetTest extends FlatSpec with MockitoSugar with Doc...
Tecsisa/elastic4s
elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/get/MultiGetTest.scala
Scala
apache-2.0
2,835
package smartupedit package build import sbt._ import Keys._ object EditorProject { def apply(name: String, path: String): Project = ( Project(name, file(path)) settings(commonSettings: _*) ) }
wookietreiber/smartupedit
project/project.scala
Scala
gpl-3.0
208
/* * 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 ...
Dax1n/spark-core
core/src/test/scala/org/apache/spark/util/MutableURLClassLoaderSuite.scala
Scala
apache-2.0
4,111
/* * 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 ...
aokolnychyi/spark
core/src/test/scala/org/apache/spark/scheduler/SparkListenerWithClusterSuite.scala
Scala
apache-2.0
2,445
package dao import javax.inject.Inject import models.{Label, LabelThing, Thing} import play.api.db.slick.{DatabaseConfigProvider, HasDatabaseConfigProvider} import slick.jdbc.JdbcProfile import scala.concurrent.{ExecutionContext, Future} class LabelDAO @Inject()(protected val dbConfigProvider: DatabaseConfigProvide...
MarekSuchanek/Inventory
app/dao/LabelDAO.scala
Scala
mit
2,728
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/geotools/GeoMesaParamTest.scala
Scala
apache-2.0
10,029
/* * Copyright 2012 Tumblr 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...
knowledgehacker/zipkin
zipkin-redis/src/main/scala/com/twitter/zipkin/storage/redis/RedisSortedSetMap.scala
Scala
apache-2.0
2,060
package uk.gov.dvla.vehicles.presentation.common.controllers import com.google.inject.Inject import play.api.mvc.{Action, Controller} import uk.gov.dvla.vehicles.presentation.common.clientsidesession.ClientSideSessionFactory import uk.gov.dvla.vehicles.presentation.common.model.CookieReport import uk.gov.dvla.vehicles...
dvla/vehicles-presentation-common
common-test/app/uk/gov/dvla/vehicles/presentation/common/controllers/CookiePolicyController.scala
Scala
mit
916
/* ,i::, :;;;;;;; ;:,,::;. 1ft1;::;1tL t1;::;1, :;::; _____ __ ___ __ fCLff ;:: tfLLC / ___/ / |/ /____ _ _____ / /_ CLft11 :,, i1tffLi \\__ \\ ____ / /|_/ ...
S-Mach/effectful
src/main/scala/effectful/LiftService.scala
Scala
mit
1,598
/* * 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 ...
style95/openwhisk
tests/src/test/scala/org/apache/openwhisk/core/entity/test/ExecTests.scala
Scala
apache-2.0
11,292
import scala.reflect.runtime.universe._ import scala.reflect.runtime.{currentMirror => cm} object Test extends dotty.runtime.LegacyApp { class A1 { def foo = ??? } val c1 = cm.classSymbol(classOf[A1]) println(c1) println(c1.fullName) println(c1.info) new Test } class Test { class A2 { def foo = ??? } ...
yusuke2255/dotty
tests/pending/run/t5256f.scala
Scala
bsd-3-clause
418
package edison.model.serialization import edison.model.domain.SampleData import edison.search.serialization.{ JsonSerialization, JsonSerializer } import edison.util.SmartSpec class ModelSerializationTest extends SmartSpec with SampleData { import edison.model.serialization.DefaultSerializers._ def serialize[T](o...
pawel-wiejacha/edison
core/src/test/scala/edison/model/serialization/ModelSerializationTest.scala
Scala
mit
1,036
package fpinscala.errorhandling import scala.{Option => _, Either => _, Left => _, Right => _, _} // hide std library `Option` and `Either`, since we are writing our own in this chapter sealed trait Either[+E,+A] { def map[B](f: A => B): Either[E, B] = this match { case Left(x) => Left(x) case Right(x) => Rig...
724399396/function-programming-in-scala
exercises/src/main/scala/fpinscala/errorhandling/Either.scala
Scala
mit
1,528
package com.datastax.spark.connector.rdd.reader import com.datastax.driver.core.Row import com.datastax.spark.connector.{CassandraRowMetadata, ColumnRef, ColumnSelector} import com.datastax.spark.connector.cql.TableDef private[connector] class KeyValueRowReaderFactory[K, V]( keySelection: ColumnSelector, keyR...
ponkin/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/rdd/reader/KeyValueRowReader.scala
Scala
apache-2.0
1,319
/*********************************************************************** * Copyright (c) 2013-2017 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...
ronq/geomesa
geomesa-process/geomesa-process-vector/src/test/scala/org/locationtech/geomesa/process/transform/BinConversionProcessTest.scala
Scala
apache-2.0
3,991
package dotty.tools.dotc package transform import core._ import Names._ import StdNames.nme import Types._ import dotty.tools.dotc.transform.TreeTransforms.{AnnotationTransformer, TransformerInfo, MiniPhaseTransform, TreeTransformer} import ast.Trees._ import Flags._ import Contexts.Context import Symbols._ import Con...
yusuke2255/dotty
src/dotty/tools/dotc/transform/ElimRepeated.scala
Scala
bsd-3-clause
5,311
package controllers import io.apibuilder.api.v0.models.{ApplicationForm, AppSortBy, MoveForm, SortOrder} import io.apibuilder.api.v0.models.json._ import db._ import javax.inject.{Inject, Singleton} import lib.Validation import play.api.mvc._ import play.api.libs.json._ import java.util.UUID @Singleton class Applica...
gheine/apidoc
api/app/controllers/Applications.scala
Scala
mit
5,457
/******************************************************************************* * Copyright (c) 2019. Carl Minden * * 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 ...
carlminden/anathema-roguelike
src/com/anathema_roguelike/entities/characters/player/classes/Ranger.scala
Scala
gpl-3.0
3,578
package mockws import java.net.InetSocketAddress import java.util.concurrent.atomic.AtomicReference import mockws.MockWSHelpers._ import org.mockito.Mockito._ import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks import play.api.http.Status import play.api.libs.json.Json import play.api.libs.ws.WSAuthScheme im...
leanovate/play-mockws
src/test/scala/mockws/MockWSTest.scala
Scala
mit
10,861
/* * 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-execution/jvm/src/main/scala/monix/execution/misc/ThreadLocal.scala
Scala
apache-2.0
2,905
/*********************************************************************** * Copyright (c) 2013-2017 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...
ronq/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/stats/FrequencyTest.scala
Scala
apache-2.0
24,000
/* Lodo is a layered to-do list (Outliner) Copyright (C) 2015 Keith Morrow. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License v3 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, ...
k3d3/lodo
lodo/js/src/main/scala/components/BtnGroup.scala
Scala
agpl-3.0
2,358
/* * 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 ...
MLnick/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala
Scala
apache-2.0
13,677
/* * 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 ...
JingchengDu/hbase
hbase-spark/src/main/scala/org/apache/hadoop/hbase/spark/BulkLoadPartitioner.scala
Scala
apache-2.0
2,134
package com.github.tminglei.slickpg package json import slick.ast.TypedType import slick.ast.Library.{SqlFunction, SqlOperator} import slick.lifted.{ExtensionMethods} import slick.driver.{JdbcTypesComponent, PostgresDriver} import slick.jdbc.JdbcType trait PgJsonExtensions extends JdbcTypesComponent { driver: Postgre...
enragedginger/slick-pg
core/src/main/scala/com/github/tminglei/slickpg/json/PgJsonExtensions.scala
Scala
bsd-2-clause
5,635
/* * Copyright 2016 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...
andywhardy/address-reputation-ingester
app/config/ConfigHelper.scala
Scala
apache-2.0
2,200
def f() = {} println(/* offset: 4, applicable: false */ f(_: Int))
ilinum/intellij-scala
testdata/resolve2/function/partial/OneToNone.scala
Scala
apache-2.0
67
/* * 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...
jenniew/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/torch/SelectTableSpec.scala
Scala
apache-2.0
4,954
package com.szadowsz.starform.profile.accrete import com.szadowsz.starform.model.accrete.AccreteProfile import com.szadowsz.starform.model.accrete.calc.collision.{CollisionCalc, DoleCollCalc} import com.szadowsz.starform.model.accrete.calc.insert.{AccreteInsertStrat, RandInsertStrat} import com.szadowsz.starform.model...
zakski/accrete-starform-stargen
recreations/composite/src/main/scala/com/szadowsz/starform/profile/accrete/GilhamProfile.scala
Scala
apache-2.0
992
package com.konfliktriends.camel import org.apache.camel.main.Main import org.apache.camel.builder.RouteBuilder /** * @author Andreas C. Osowski */ class KafkaStreamRoute extends RouteBuilder { override def configure(): Unit = from("kafka:localhost?zookeeperHost=localhost&groupId=defaultz&topic=websocket") .t...
th0br0/konfliktriends
backend-camel/src/main/scala/com/konfliktriends/camel/Main.scala
Scala
gpl-2.0
849
/* * Copyright 2012-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
planet42/Laika
core/shared/src/main/scala/laika/parse/code/languages/CSSSyntax.scala
Scala
apache-2.0
3,801
/* * 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 ...
zzcclp/carbondata
integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/optimizer/CarbonSecondaryIndexOptimizer.scala
Scala
apache-2.0
45,054
package controllers import com.bryzek.apidoc.api.v0.models.{Publication, Subscription, SubscriptionForm} import com.bryzek.apidoc.api.v0.errors.{ErrorsResponse, FailedRequest, UnitResponse} import java.util.UUID import play.api.test._ import play.api.test.Helpers._ class SubscriptionsSpec extends BaseSpec { impor...
Seanstoppable/apidoc
api/test/controllers/SubscriptionsSpec.scala
Scala
mit
6,197
object Solution { def main(args: Array[String]) { var N = readLine().toInt var matrix = Array.ofDim[Long](N,N) var sol = Array.ofDim[Long](N,N) // Read matrix for(i <- 0 to N-1 ){ matrix(i) = readLine().split(" ")map(_.toLong) } // Initializes solution matrix ...
andreshp/Algorithms
Problems/Hackerrank/ProjectEuler/83.scala
Scala
gpl-2.0
1,135
/** * 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...
Mszak/kafka
core/src/main/scala/kafka/common/Topic.scala
Scala
apache-2.0
2,835
package utils /** This object contains new string contextes for specific uses. */ object stringContextes { implicit class RegexPattern(val pattern:java.util.regex.Pattern) extends AnyVal { def unapply(s:String):Boolean = pattern.matcher(s).matches } //use r"" to build the corresponding regex ...
Y-P-/data-processing-binding
Utils/src/utils/stringContextes.scala
Scala
gpl-3.0
910
import scala.language.higherKinds trait Request[F[_]] trait Context { type F[_] } final case class AuthedRequest[F[_], A](authInfo: A, req: Request[F]) final case class HttpRequestContext[C <: Context, Ctx](request: AuthedRequest[C#F, Ctx], context: Ctx)
scala/scala
test/files/pos/t11239.scala
Scala
apache-2.0
256
/* * 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 ...
jasonpet/openwhisk
common/scala/src/main/scala/org/apache/openwhisk/core/entity/FullyQualifiedEntityName.scala
Scala
apache-2.0
6,265
package com.trafficland.augmentsbt.rpm import sbt._ import sbt.Keys._ import com.typesafe.sbt.packager.Keys._ import com.typesafe.sbt.packager.archetypes.ServerLoader import com.typesafe.sbt.SbtNativePackager.Rpm import com.trafficland.augmentsbt.distribute.StartupScriptPlugin import scala.collection.Seq import com.t...
ereichert/augment-sbt
src/main/scala/com/trafficland/augmentsbt/rpm/CentOSRPMPlugin.scala
Scala
apache-2.0
945
/* * Copyright 2014 Alan Rodas Bonjour * * 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 ...
alanrodas/scaland
cli/src/main/scala/com/alanrodas/scaland/cli/CLIApp.scala
Scala
apache-2.0
4,401
package io.buoyant.namer.serversets import com.twitter.finagle._ import com.twitter.util.{Activity, Var} import io.buoyant.namer.NamerTestUtil import java.net.{InetAddress, InetSocketAddress} import org.scalatest.FunSuite class ServersetNamerTest extends FunSuite with NamerTestUtil { val prefix = Path.read("/#/some...
denverwilliams/linkerd
namer/serversets/src/test/scala/io/buoyant/namer/serversets/ServersetNamerTest.scala
Scala
apache-2.0
2,586
package dbpedia.config object GeoCoordinateParserConfig { //make them language-specifig? might be redundant val coordTemplateNames = Set("coord", "coor dms", "coor dm", "coor", "location", "geocoordinate", "coords", "coordenadas") //"coor title dms", "coor title d", "coor titl...
FnOio/dbpedia-parsing-functions-scala
src/main/scala/dbpedia/config/GeoCoordinateParserConfig.scala
Scala
gpl-2.0
1,142
package nvim final case class Position(row: Int, col: Int) { override def toString = s"[row=$row,col=$col]" }
sschaef/scalajs-test
nvim/src/main/scala/nvim/Position.scala
Scala
mit
113
package breeze.linalg.support /* 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 agr...
wstcpyt/breeze
math/src/main/scala/breeze/linalg/support/CanTraverseKeyValuePairs.scala
Scala
apache-2.0
2,374
package core object Player { def apply(name: String)(implicit cardlib: CardLibrary): Player = { val deck = util.Random.shuffle(Seq.fill(3)(cardlib.estate) ++ Seq.fill(7)(cardlib.copper)) new Player(name, deck = deck.drop(5).toVector, hand = deck.take(5).toVector ++ Vector(cardlib.remodel, cardlib...
whence/powerlife
scala/powercards_future/core/Player.scala
Scala
mit
1,149
package scala.collection.parallel.ops import scala.collection.parallel._ trait IntOperators extends Operators[Int] { def reduceOperators = List(_ + _, _ * _, math.min(_, _), math.max(_, _), _ ^ _) def countPredicates = List( x => true, _ >= 0, _ < 0, _ < 50, _ < 500, _ < 5000, _ < 50000, _ % 2 == 0, _ =...
felixmulder/scala
test/files/scalacheck/parallel-collections/IntOperators.scala
Scala
bsd-3-clause
3,638
package s99.p17 // P17 (*) Split a list into two parts. // The length of the first part is given. Use a Tuple for your result. // // Example: // scala> split(3, List('a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k)) // res0: (List[Symbol], List[Symbol]) = (List('a, 'b, 'c),List('d, 'e, 'f, 'g, 'h, 'i, 'j, ...
izmailoff/scala-s-99
src/main/scala/s99/p17/P17Answer.scala
Scala
apache-2.0
1,271
package com.typesafe.sbt package packager package rpm import linux._ import sbt._ /** RPM Specific keys. */ trait RpmKeys { // METADATA keys. val rpmVendor = SettingKey[String]("rpm-vendor", "Name of the vendor for this RPM.") val rpmOs = SettingKey[String]("rpm-os", "Name of the os for this RPM.") val rpmRel...
schon/sbt-native-packager
src/main/scala/com/typesafe/sbt/packager/rpm/Keys.scala
Scala
bsd-2-clause
3,838
package gremlin.scala import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph import org.scalatest.wordspec.AnyWordSpec import org.scalatest.matchers.should.Matchers class ArrowSyntaxSpec extends AnyWordSpec with Matchers { "A --> B creates an edge".which { "has a label" in new Fixture { p...
mpollmeier/gremlin-scala
gremlin-scala/src/test/scala/gremlin/scala/ArrowSyntaxSpec.scala
Scala
apache-2.0
5,817
package io.evolutionary.twin import java.util.concurrent.TimeUnit import com.codahale.metrics.MetricRegistry import com.codahale.metrics.json.MetricsModule import com.fasterxml.jackson.databind.ObjectMapper import com.typesafe.config.{ConfigFactory, Config} import org.apache.log4j.BasicConfigurator import org.http4s....
edmundnoble/Twin
src/main/scala/io/evolutionary/twin/Main.scala
Scala
apache-2.0
1,813
package nl.dennislaumen.scalify import java.net.URL import xml.XML class Track private[scalify] (val uri: String, val name: String, val artist: Artist, val album: Album, val ids: Map[String, String], val discNumber: Option[Int], val trackNumber: Int, val length: Float, val popularity: Float) { private[scalify]...
dennislaumen/Scalify
src/main/scala/nl/dennislaumen/scalify/Track.scala
Scala
mit
1,731
package edu.berkeley.nlp.entity import java.io.PrintWriter import scala.collection.mutable.HashMap import scala.collection.mutable.ArrayBuffer import edu.berkeley.nlp.entity.preprocess.PreprocessingDriver import edu.berkeley.nlp.futile.syntax.Tree import scala.collection.mutable.HashSet import scala.collection.JavaCon...
matthewfl/berkeley-entity
src/main/java/edu/berkeley/nlp/entity/ConllDocWriter.scala
Scala
gpl-3.0
13,908
/* * Copyright (c) 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://www.apache.org...
jramos/snowplow
4-storage/kinesis-elasticsearch-sink/project/BuildSettings.scala
Scala
apache-2.0
2,626
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/utils/tf/BigDLToTensorflow.scala
Scala
apache-2.0
20,995
package com.twitter.bijection /** * Type tag used to indicate that an instance of a type such as String contains a valid * representation of another type, such as Int or URL. */ trait Rep[A] /** * Useful HasRep */ object Rep { implicit def toRepOpsEnrichment[A](a: A) = new ToRepOps(a) /** * Adds to...
twitter/bijection
bijection-core/src/main/scala/com/twitter/bijection/Rep.scala
Scala
apache-2.0
770
/* * 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/model/report/OnlineTestPassMarkReportItem.scala
Scala
apache-2.0
1,084
import sbt._ import sbt.Keys._ import sbtassembly._ import sbtassembly.AssemblyKeys._ import spray.revolver.RevolverPlugin._ object CurioDB extends Build { val scalaV = "2.11.7" val akkaV = "2.4.11" val sprayV = "1.3.4" val curiodbV = "0.0.1" val dependencies = Seq( "com.typesafe.akka" %% "akk...
stephenmcd/curiodb
project/Build.scala
Scala
bsd-2-clause
2,140
package edu.rice.habanero.benchmarks.fjcreate import edu.rice.habanero.actors.{ScalaActor, ScalaActorState} import edu.rice.habanero.benchmarks.{Benchmark, BenchmarkRunner} /** * * @author <a href="http://shams.web.rice.edu/">Shams Imam</a> ([email protected]) */ object ForkJoinScalaActorBenchmark { def main(args:...
shamsmahmood/savina
src/main/scala/edu/rice/habanero/benchmarks/fjcreate/ForkJoinScalaActorBenchmark.scala
Scala
gpl-2.0
1,175
package org.apache.spark.sql.snowflake import org.apache.spark.sql.DataFrame import org.apache.spark.sql.test.SQLTestData import org.apache.spark.sql.test.SQLTestData._ /** * Most test data in SQLTestData invokes RDD API, which is not supported by TS yet. * Please override all test data used by TS test suites in th...
snowflakedb/spark-snowflakedb
src/it/scala/org/apache/spark/sql/snowflake/SFTestData.scala
Scala
apache-2.0
3,027
/* * 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 ...
michalsenkyr/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/PlannerSuite.scala
Scala
apache-2.0
33,626
/* * Copyright 2013 Bruno Bieth * * 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 ...
backuity/matchete
core/src/main/scala/org/backuity/matchete/OrderedMatchers.scala
Scala
apache-2.0
1,416
/* * 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 ...
aokolnychyi/spark
external/kafka-0-8/src/main/scala/org/apache/spark/streaming/kafka/KafkaCluster.scala
Scala
apache-2.0
15,803
package com.hj.examples import com.hj.constant.Const import org.apache.spark.{SparkConf, SparkContext} object RDFS9 { def main(args: Array[String]): Unit = { val conf = new SparkConf().setAppName("RDFS9.in").setMaster("local[2]") val sc = new SparkContext(conf) val lines = sc.textFile("input/RDFS9.in")...
huangjuegeek/SparkSRE
src/main/scala/com/hj/examples/RDFS9.scala
Scala
apache-2.0
864
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs/contributors // License: http://www.gnu.org/licenses/lgpl-3.0.en.html package org.ensime.api import java.io.File import scalaz.deriving import scalaz.std.either._ import scalaz.std.list._ import scalaz.std.option._ import spray.json.{ JsReader...
ensime/ensime-server
api/src/main/scala/org/ensime/api/incoming.scala
Scala
gpl-3.0
9,040
import org.junit.runner.RunWith import org.sarrufat.sudoku.Board import org.scalatest.FlatSpec import org.scalatest.junit.JUnitRunner trait Output { def print(s: String) = Console.println(s) } @RunWith(classOf[JUnitRunner]) class TestLS extends FlatSpec with Output { val board = Board.mainBoard("Sudoku...
sarrufat/ScalaSudoku
src/test/scala/TestLS.scala
Scala
gpl-3.0
574
package scorex.transaction import java.util import com.google.common.primitives.{Bytes, Ints, Longs} import play.api.libs.json.{JsObject, Json} import scorex.account.{Account, PrivateKeyAccount, PublicKeyAccount} import scorex.crypto.EllipticCurveImpl import scorex.crypto.encode.Base58 import scorex.serialization.Des...
alexeykiselev/WavesScorex
scorex-transaction/src/main/scala/scorex/transaction/PaymentTransaction.scala
Scala
cc0-1.0
5,672
package domala.tests.entity.noanno import java.time.{LocalDate, LocalDateTime} import domala._ import domala.jdbc.{BatchResult, Config, Result} import domala.tests.H2TestConfigTemplate import org.scalatest.{BeforeAndAfter, FunSuite} import org.seasar.doma.BatchInsert class EmbeddedTestSuite extends FunSuite with Bef...
bakenezumi/domala
paradise/src/test/scala/domala/tests/entity/noanno/EmbeddedTestSuite.scala
Scala
apache-2.0
7,081
package org.dbpedia.spotlight.db import io._ import java.io.{FileOutputStream, FileInputStream, File} import org.dbpedia.spotlight.db.memory.{MemoryQuantizedCountStore, MemoryStore} import model.{TextTokenizer, StringTokenizer, Stemmer} import org.dbpedia.spotlight.log.SpotlightLog import scala.io.Source import org.ta...
Skunnyk/dbpedia-spotlight-model
index/src/main/scala/org/dbpedia/spotlight/db/CreateSpotlightModel.scala
Scala
apache-2.0
10,387
import sbt._ import Keys._ object Dispatch extends Build { val shared = Defaults.defaultSettings ++ ls.Plugin.lsSettings ++ Seq( organization := "net.databinder", version := "0.8.10", scalaVersion := "2.10.4", parallelExecution in Test := false, testOptions in Test += Tests.Argument(TestFramework...
dispatch/dispatch
project/build.scala
Scala
lgpl-2.1
7,516
object Implicits { import language.implicitConversions implicit class Any2some[T](x: T) { def some: Option[T] = Some(x) } implicit class int2factorial(n: Int) { def ! = (1 to n).product } implicit class int2times(n: Int) { def times(block: => Unit) = for (j <- 1 to n) block } }
grzegorzbalcerek/scala-exercises
Implicits/solutionImplicits.scala
Scala
bsd-2-clause
305
package scala.meta.tests package semanticdb import org.scalatest._ import scala.meta._ import scala.meta.internal.semanticdb.{vfs => v} import scala.meta.internal.semanticdb.{schema => s} trait BaseSemanticSuite extends FunSuiteLike { val sourcepath = Sourcepath(BuildInfo.databaseSourcepath) val classpath = Class...
DavidDudson/scalameta
tests/shared/src/test/scala/scala/meta/tests/semanticdb/MirrorConstructionSuite.scala
Scala
bsd-3-clause
1,263
// 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...
helifu/kudu
java/kudu-spark/src/test/scala/org/apache/kudu/spark/kudu/StreamingTest.scala
Scala
apache-2.0
2,397
/* * Copyright (c) 2011-14 Miles Sabin * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
liff/shapeless
core/src/test/scala/shapeless/hlist.scala
Scala
apache-2.0
109,979
package alexsmirnov.pbconsole import org.scalatest.FlatSpec import org.scalatest.Matchers class MacroTest extends FlatSpec with Matchers { "Empty string" should "prepared as empty iterator" in { val m = Macro("foo","","") Macro.prepare("", new Settings) shouldBe empty } "Single line string" should "prep...
alexsmirnov/printrbot-g2-console
src/test/scala/alexsmirnov/pbconsole/MacroTest.scala
Scala
bsd-3-clause
1,013
// Copyright (C) 2015, codejitsu. package net.codejitsu.tasks.dsl abstract class Stage { def name: String override def toString: String = name } final class Dev extends Stage { override val name: String = "Development" } final class Test extends Stage { override val name: String = "Test" } final class QA e...
codejitsu/tasks
tasks-dsl/src/main/scala/net/codejitsu/tasks/dsl/Stage.scala
Scala
apache-2.0
571
package com.nrinaudo.fetch import java.io._ import java.nio.charset.Charset trait RequestEntityLike[+Self <: RequestEntityLike[Self]] { this: Self => /** Length, in bytes, of the request entity. * * Note that this is different from the [[contentLength content length]], which represents the number of byte...
nrinaudo/fetch
core/src/main/scala/com/nrinaudo/fetch/RequestEntity.scala
Scala
mit
6,322
/* * 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 ...
jrshust/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/GroupStateImpl.scala
Scala
apache-2.0
8,205
import sbt._ import Keys._ import org.scalatra.sbt._ import play.twirl.sbt.SbtTwirl import play.twirl.sbt.Import.TwirlKeys._ import sbtassembly._ import sbtassembly.AssemblyKeys._ object MyBuild extends Build { val Organization = "gitbucket" val Name = "gitbucket" val Version = "3.9.0" val ScalaVersion = "2.11...
swaldman/gitbucket
project/build.scala
Scala
apache-2.0
3,358
package com.sg.pnx.math import Ordering.Implicits._ /** * Created by bodie on 7/19/14. */ object Math { val PI = 3.141592f val TWO_PI = PI*2.0f val HALF_PI = PI*0.5f val QUARTER_PI = PI*0.25f // Every 15 degrees or pi/12 radians val sinValues = List( 0.0f, 0.258819f, 0.5f, 0.707107f, 0.866025f, 0.9659...
synapse-garden/phoenix
src/main/scala/com/sg/pnx/math/Math.scala
Scala
mit
2,253
/* * Copyright 2016 Actian Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
ActianCorp/spark-vector
src/main/scala/com/actian/spark_vector/sql/TableRef.scala
Scala
apache-2.0
1,915
package webapp import org.scalajs.dom import org.scalajs.dom.raw.HTMLImageElement import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scala.scalajs.js.JSApp import ApiController._ import org.scalajs.dom.html.{Div, Title} import scala.scalajs.js.annotation.JSExportTopLevel ...
pikkle/FoodMatch
client/src/main/scala/webapp/FoodMatchApp.scala
Scala
apache-2.0
3,217
package com.github.opengrabeso.mixtio import java.time.temporal.ChronoUnit import com.garmin.fit import com.garmin.fit.{Event => FitEvent, _} import Main.ActivityEvents import common.Util._ import common.model._ import java.time.ZonedDateTime object FitExport { type Encoder = MesgListener with MesgDefinitionListen...
OndrejSpanel/Stravamat
backend/src/main/scala/com/github/opengrabeso/mixtio/FitExport.scala
Scala
gpl-2.0
7,592
/* * Copyright 2009-2011 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
wsaccaco/lift
framework/lift-base/lift-webkit/src/main/scala/net/liftweb/http/provider/servlet/ServletFilterProvider.scala
Scala
apache-2.0
2,196
/* Copyright 2009-2018 EPFL, Lausanne */ package inox package solvers package unrolling class FunctionEqualitySuite extends SolvingTestSuite with DatastructureUtils { import inox.trees._ import dsl._ val f = FreshIdentifier("f") val mmapID = FreshIdentifier("MMap") val mmapConsID = mmapID.freshen val mma...
romac/inox
src/it/scala/inox/solvers/unrolling/FunctionEqualitySuite.scala
Scala
apache-2.0
2,601
package eu.inn.binders import eu.inn.binders.value.internal.DynamicMacro import scala.language.experimental.macros package object value { implicit class ValueReader(val value: Value) { def fromValue[O]: O = macro DynamicMacro.fromValue[O] } implicit class ValueGenerator[O](val obj: O) { def toValue: V...
InnovaCo/binders
src/main/scala/eu/inn/binders/value/package.scala
Scala
bsd-3-clause
834
/* * 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 /** This class ...
martijnhoekstra/scala
src/library/scala/Symbol.scala
Scala
apache-2.0
2,929
import scala.compiletime._ // works val a = { given Int = 0 summon[Int] } // doesn't inline def summonInt = { given Int = 0 summonInline[Int] } val b = summonInt
lampepfl/dotty
tests/pos/i12997.scala
Scala
apache-2.0
181
package eu.semberal.dbstress.config import java.io.{BufferedReader, InputStreamReader} import better.files._ import org.scalatest.flatspec.AnyFlatSpec class ConfigParserTest extends AnyFlatSpec { "ConfigParser" should "correctly reject an unit with non-alphanumeric characters in the name" in { val stream = ...
semberal/dbstress
src/test/scala/eu/semberal/dbstress/config/ConfigParserTest.scala
Scala
apache-2.0
664
/* * 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 ...
Lewuathe/neurallib
src/main/scala/com/lewuathe/dllib/example/MNISTApp.scala
Scala
mit
3,126
/* Copyright 2014 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
nevillelyh/algebird
algebird-core/src/main/scala/com/twitter/algebird/statistics/IterCallStatistics.scala
Scala
apache-2.0
2,821
/* * 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 ...
spotify/scio
scio-core/src/main/scala/com/spotify/scio/util/FunctionsWithWindowedValue.scala
Scala
apache-2.0
2,381
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this fi...
elastic/elasticsearch-hadoop
spark/sql-13/src/main/scala/org/elasticsearch/spark/sql/DataFrameValueWriter.scala
Scala
apache-2.0
10,903
package org.helianto.ingress.controller import org.springframework.security.oauth2.provider.OAuth2Authentication /** * Mix-in to implicitly extract entity or identity from the principal. */ trait AuthorityExtractor { def _entityId(implicit principal: OAuth2Authentication) = id(principal, "ENTITY_ID_") def _...
iservport/helianto-spring
src/main/scala/org/helianto/ingress/controller/AuthorityExtractor.scala
Scala
apache-2.0
765