code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
package commons.repositories.mappings.columnOptions import slick.ast.ColumnOption case object Unique extends ColumnOption[Nothing]
Dasiu/play-framework-test-project
app/commons/repositories/mappings/columnOptions/Unique.scala
Scala
mit
133
package com.github.sorhus.webalytics.akka.document import akka.actor.{ActorRef, Props} import akka.persistence._ import com.github.sorhus.webalytics.akka.event._ import org.slf4j.LoggerFactory class DocumentIdActor(audienceActor: ActorRef, domainActor: ActorRef) extends PersistentActor { val log = LoggerFactory.ge...
sorhus/webalytics
service/src/main/scala/com/github/sorhus/webalytics/akka/document/DocumentIdActor.scala
Scala
gpl-3.0
2,434
package scsvlog import java.awt import scala.language.{reflectiveCalls,existentials} import javax.swing.border.{TitledBorder,LineBorder,EtchedBorder} import java.util.concurrent.atomic import scl.SwUtil import javax.servlet.http.{HttpServletRequest, HttpServletResponse}, org.eclipse.{jetty} object ScsvLog extends swi...
tardigrade888/scsvlog
repo/src/scsvlog/ScsvLog.scala
Scala
mit
45,619
package leo.datastructures.blackboard.impl import leo.agents.{Agent, Task} import leo.datastructures.blackboard.{LockSet, TaskSet} /** * Implements a fifo order on the tasks. * * TODO Locks currently do not delete tasks */ class FifoTaskSet extends TaskSet { private val agents : scala.collection.concurrent...
lex-lex/Leo-III
oldsrc/main/scala/leo/datastructures/blackboard/impl/FifoTaskSet.scala
Scala
bsd-3-clause
4,745
package org.reactivecouchbase.client import play.api.libs.json._ import scala.concurrent.{ExecutionContext, Future} import play.api.libs.iteratee.{Enumeratee, Iteratee, Enumerator} import com.couchbase.client.protocol.views._ import org.reactivecouchbase.{Timeout, Couchbase, CouchbaseBucket} import java.util.concurren...
en-japan/ReactiveCouchbase-core
driver/src/main/scala/org/reactivecouchbase/client/Queries.scala
Scala
apache-2.0
19,975
package builder.api_json import org.scalatest.{FunSpec, Matchers} class InternalDatatypeSpec extends FunSpec with Matchers { it("label") { Seq("string", "uuid", "[string]", "[uuid]", "map[string]", "map[uuid]").foreach { name => val dt = InternalDatatype(name) dt.label should be(name) dt.requ...
Seanstoppable/apidoc
core/src/test/scala/core/builder/api_json/InternalDatatypeSpec.scala
Scala
mit
820
/* Copyright 2016-17, Hasso-Plattner-Institut fuer Softwaresystemtechnik GmbH 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 applicab...
bpn1/ingestion
src/main/scala/de/hpi/ingestion/textmining/models/ParsedWikipediaEntry.scala
Scala
apache-2.0
9,371
/* * 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/test/scala/io/truthencode/ddo/model/effect/EffTest.scala
Scala
apache-2.0
3,065
/* * Copyright 2012 Jonathan Anderson * * 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...
nasrallahmounir/Footlights
Client/Core/src/main/scala/me/footlights/core/users/users.scala
Scala
apache-2.0
3,000
/* * 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 ...
starpit/openwhisk
core/controller/src/main/scala/org/apache/openwhisk/core/controller/Backend.scala
Scala
apache-2.0
1,591
class A class B trait Foo { def foo: A ?=> B ?=> Int } class Foo1 extends Foo { def foo: A ?=> B ?=> Int = 1 } class Foo2 extends Foo1 { override def foo: A ?=> B ?=> Int = 2 } trait Foo3 extends Foo { override def foo: A ?=> B ?=> Int = 3 } class Bar[T] { def bar: A ?=> T = null.asInstanceOf[T] } class...
som-snytt/dotty
tests/run/implicitFuns2.scala
Scala
apache-2.0
804
/** * Magmanics Licensing. This web application allows for centralized control * of client application activation, with optional configuration parameters * to control licensable features, and storage of supplementary information * about the client machine. Client applications may interface with this * central serv...
manicmonkey/licensing
Licensing-UI-Vaadin/src/main/scala/com/magmanics/vaadin/MaintenanceModeFilter.scala
Scala
gpl-3.0
1,716
/* scala-stm - (c) 2009-2012, Stanford University, PPL */ package scala.concurrent.stm.ccstm import collection.mutable.ArrayBuffer private[ccstm] object Stats { val Enabled: Boolean = "yYtT1".indexOf((System.getProperty("ccstm.stats", "") + "0").charAt(0)) >= 0 class LazyCounterMap[A] { import scala.collec...
nbronson/scala-stm
src/main/scala/scala/concurrent/stm/ccstm/Stats.scala
Scala
bsd-3-clause
3,972
package grammar.adminmode import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.all.dangerouslySetInnerHtml import japgolly.scalajs.react.vdom.prefix_<^._ import org.scalajs.jquery.{jQuery => $} import scala.scalajs.js /** * Created by Mikael on 10.08.2015. */ object AdminMode { val fieldInputKey =...
epfl-lara/grammar-web
js/src/main/scala/grammar/adminmode/AdminMode.scala
Scala
mit
337
package controllers.backend import com.google.re2j.Pattern import org.specs2.mutable.Specification import play.api.libs.json.Json import com.overviewdocs.models.{PdfNote,PdfNoteCollection} import com.overviewdocs.query.{Field,Query,AndQuery,OrQuery,NotQuery,RegexQuery,PhraseQuery} import com.overviewdocs.test.factori...
overview/overview-server
web/test/controllers/backend/DocumentSelectionBackendSpec.scala
Scala
agpl-3.0
5,825
import scala.quoted.* inline def rewrite[T](inline x: Any): Any = ${ stringRewriter('x) } private def stringRewriter(e: Expr[Any])(using Quotes): Expr[Any] = StringRewriter.transform(e) private object StringRewriter extends ExprMap { def transform[T](e: Expr[T])(using Type[T])(using Quotes): Expr[T] = e match ...
dotty-staging/dotty
tests/run-macros/expr-map-3/Macro_1.scala
Scala
apache-2.0
463
package org.eichelberger.sfc.study.locality import org.eichelberger.sfc.examples.composition.contrast.FactoryXYZT import org.eichelberger.sfc.study.{ColumnSpec, OutputMetadata, MirroredTSV} import org.eichelberger.sfc.{ComposedCurve, CompactHilbertCurve, ZCurve, RowMajorCurve} import org.eichelberger.sfc.SpaceFillingC...
cne1x/sfseize
src/main/scala/org/eichelberger/sfc/study/locality/LocalityEstimatorStudy.scala
Scala
apache-2.0
1,925
package mesosphere.marathon package core.check import com.wix.accord._ import mesosphere.marathon.Protos.CheckDefinition.Protocol import mesosphere.marathon.state._ import org.apache.mesos.{Protos => MesosProtos} import scala.concurrent.duration._ /** * Check is a Type to help with type conversions to and from di...
mesosphere/marathon
src/main/scala/mesosphere/marathon/core/check/Check.scala
Scala
apache-2.0
8,788
package mesosphere.elasticsearch import java.util import org.apache.mesos.Protos._ import org.apache.mesos.{Protos, MesosSchedulerDriver, SchedulerDriver, Scheduler} import scala.collection.JavaConverters._ import scala.collection.mutable import java.util.concurrent.CountDownLatch import java.text.SimpleDateFormat imp...
mesosphere/elasticsearch-mesos
src/main/scala/mesosphere/elasticsearch/ElasticSearchScheduler.scala
Scala
apache-2.0
6,919
/* * 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 ...
gioenn/xSpark
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/ColumnAccessor.scala
Scala
apache-2.0
5,938
/* * 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/js/src/main/scala/monix/execution/atomic/AtomicLong.scala
Scala
apache-2.0
4,776
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/utils/TestUtils.scala
Scala
apache-2.0
4,923
/** * 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...
unix1986/universe
tool/kafka-0.8.1.1-src/core/src/main/scala/kafka/api/FetchRequest.scala
Scala
bsd-2-clause
7,653
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/test/scala/org/neo4j/cypher/internal/compiler/v2_3/planner/logical/UnionPlanningIntegrationTest.scala
Scala
apache-2.0
2,971
package net.kwas.impatient.ch1 object Exercises extends App { import math.sqrt import math.pow import math.BigInt // --- Exercise 1 // Lots of stuff. // See the Int Scaladoc. // --- Exercise 2 // Rounding error val notReallyThree = pow(sqrt(3),2) println(s"Not Quite Three: ${notReallyThree}")...
dkwasny/ScalaImpatient
src/main/scala/net/kwas/impatient/ch1/Exercises.scala
Scala
mit
1,637
/* * 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 ...
WindCanDie/spark
core/src/main/scala/org/apache/spark/deploy/history/HistoryAppStatusStore.scala
Scala
apache-2.0
5,635
package lila.report import akka.actor._ import com.typesafe.config.Config import lila.common.PimpedConfig._ final class Env( config: Config, db: lila.db.Env, isOnline: lila.user.User.ID => Boolean, noteApi: lila.user.NoteApi, system: ActorSystem, hub: lila.hub.Env) { private val Collection...
clarkerubber/lila
modules/report/src/main/Env.scala
Scala
agpl-3.0
1,681
package mathParser.algebra.compile import mathParser.SomeFunctions.someFunctions import mathParser.algebra.{SpireBinaryOperator, SpireLanguage, SpireUnitaryOperator} import mathParser.implicits._ import mathParser.{Compiler, LiteralParser, MathParser} import org.scalatest.{Assertion, FunSuite, Matchers} import spire.a...
gregor-i/mathParser
math-parser-compile-jvm/src/test/scala/mathParser/algebra/compile/CompileSpec.scala
Scala
mit
1,530
/* * 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 ...
Sephiroth-Lin/incubator-carbondata
examples/spark2/src/main/scala/org/apache/carbondata/examples/SparkSessionExample.scala
Scala
apache-2.0
5,710
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common * Development and Distribution License("CDDL") (colle...
richardfontana/fontana2007-t
ScalaEditorLite/src/org/netbeans/api/language/util/lex/LexUtil.scala
Scala
gpl-3.0
41,018
/* * 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 ...
Quantiply/samza
samza-core/src/test/scala/org/apache/samza/coordinator/TestJobCoordinator.scala
Scala
apache-2.0
12,974
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
travisbrown/scalatest
src/test/scala/org/scalatest/fixture/FreeSpecSpec.scala
Scala
apache-2.0
67,742
/* * 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 ...
pronix/spark
core/src/main/scala/org/apache/spark/rdd/PairRDDFunctions.scala
Scala
apache-2.0
56,093
// Copyright (C) 2015 ENSIME Authors // License: GPL 3.0 package org.ensime.core import Predef.{any2stringadd => _} import scala.reflect.internal.util.Position /** * Simulate methods that were added in later versions of the scalac * API, or to generate fake methods that we can use in both versions. */ trait Prese...
jacobono/ensime-server
core/src/main/scala-2.11/org/ensime/core/PresentationCompilerBackCompat.scala
Scala
gpl-3.0
554
/* * Copyright 2014 IBM Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
bpburns/spark-kernel
protocol/src/main/scala/com/ibm/spark/kernel/protocol/v5/content/ConnectReply.scala
Scala
apache-2.0
1,114
package net.kwas.impatient.ch5 import org.scalatest._ class CounterSpec extends FlatSpec with Matchers { behavior of "A Counter" it should "should initalize to zero" in { val counter = new Counter counter.current() should be (0) } it should "be one after increment" in { val counter = new Count...
dkwasny/ScalaImpatient
src/test/scala/net/kwas/impatient/ch5/CounterSpec.scala
Scala
mit
599
/* * Copyright 2014–2020 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
slamdata/quasar
run/src/main/scala/quasar/run/QuasarError.scala
Scala
apache-2.0
3,410
package com.wavesplatform.http import akka.http.scaladsl.model.{ContentTypes, HttpEntity, StatusCodes} import com.wavesplatform.account.Alias import com.wavesplatform.api.common.CommonTransactionsApi import com.wavesplatform.api.common.CommonTransactionsApi.TransactionMeta import com.wavesplatform.api.http.ApiError.Ap...
wavesplatform/Waves
node/src/test/scala/com/wavesplatform/http/DebugApiRouteSpec.scala
Scala
mit
46,464
/** * 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...
OpenPOWER-BigData/HDP-kafka
core/src/main/scala/kafka/producer/SyncProducerConfig.scala
Scala
apache-2.0
3,627
package org.odfi.indesign.core.module.webdraw.superchart.formats import java.net.URL import scala.io.Source import java.net.URI import scala.collection.mutable.ArrayBuffer class CSVFormat(var source: URI) { var series = new scala.collection.mutable.ArrayBuffer[(String, scala.collection.mutable.ArrayBuffer[Double])...
opendesignflow/indesign
indesign-webdraw/src/main/scala/org/odfi/indesign/core/module/webdraw/superchart/formats/CSVFormat.scala
Scala
gpl-3.0
5,079
package com.s21g.rubyist import java.security.MessageDigest object Digest { object MD5 { // code is derived from // http://code-redefined.blogspot.com/2009/05/md5-sum-in-scala.html def hexdigest(str:String): String = { val md5 = MessageDigest.getInstance("MD5") md5.reset() md5.update(s...
s21g/rubyist
src/main/scala/com/s21g/rubyist/Digest.scala
Scala
mit
430
package org.jetbrains.plugins.scala package codeInspection package suppression import java.util import com.intellij.codeInsight.daemon.HighlightDisplayKey import com.intellij.codeInsight.daemon.impl.actions.SuppressByCommentFix import com.intellij.codeInspection.{InspectionsBundle, SuppressionUtil, SuppressionUtilCor...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/codeInspection/suppression/ScalaSuppressForStatementFix.scala
Scala
apache-2.0
3,862
package exercises.ch03 object Ex14 { def append[A](as: List[A], x: A): List[A] = List.foldRight(as, List(x))((a,b) => Cons(a, b)) def main(args: Array[String]): Unit = { println(append(List(), 1)) println(append(List(1), 2)) println(append(List(1,2), 3)) println(append(List(1,2,3), 4)) } }
VladMinzatu/fpinscala-exercises
src/main/scala/exercises/ch03/Ex14.scala
Scala
mit
316
package model.dto import model.Sponsor import model.Resource import org.squeryl.dsl.ast.LogicalBoolean import org.squeryl.PrimitiveTypeMode._ case class SponsorWithLogo(sponsor: Sponsor, logo: Option[Resource]) { def this() = this(new Sponsor(), None) } object SponsorWithLogo { private def sponsorsWithLogo(wher...
lukaszbudnik/hackaton-portal
app/model/dto/SponsorWithLogo.scala
Scala
apache-2.0
1,021
package com.rainm.scanote.ui import android.os.Bundle import android.support.v7.app.AppCompatActivity import android.text.{Editable, TextWatcher} import android.view.{MenuItem, Menu, View} import android.view.View.OnClickListener import android.widget.ListView import com.rainm.scanote.db.DBManager import com.rainm.sca...
hackeris/ScaNote
src/main/scala/com/rainm/scanote/ui/SearchActivity.scala
Scala
apache-2.0
2,173
/* * 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/plan/logical/groupWindows.scala
Scala
apache-2.0
7,117
/** * Copyright (C) 2012 - 101loops.com <[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 appli...
crashnote/crashnote-java
modules/web/src/test/scala/com/crashnote/test/web/defs/TargetMockSpec.scala
Scala
apache-2.0
2,289
package org.jetbrains.plugins.scala package lang package parser package parsing package xml import com.intellij.psi.xml.XmlTokenType import org.jetbrains.plugins.scala.lang.lexer.ScalaXmlTokenTypes import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder /** * @author Alexander Podkhalyuzin * Da...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/parser/parsing/xml/STag.scala
Scala
apache-2.0
1,250
/* * Copyright 2012 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...
cogitate/twitter-zipkin-uuid
zipkin-common/src/main/scala/com/twitter/zipkin/storage/Storage.scala
Scala
apache-2.0
2,006
package play.api.libs.iteratee import play.api.libs.iteratee.Execution.Implicits.{ defaultExecutionContext => dec } import play.api.libs.iteratee.internal.{ executeIteratee, executeFuture } import scala.language.reflectiveCalls import scala.concurrent.{ ExecutionContext, Future } /** * Combines the roles of an Itera...
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/iteratees/src/main/scala/play/api/libs/iteratee/Enumeratee.scala
Scala
mit
26,884
/* * Copyright Β© 2015-2019 the contributors (see Contributors.md). * * This file is part of Knora. * * Knora 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 *...
musicEnfanthen/Knora
webapi/src/main/scala/org/knora/webapi/twirl/SearchCriterion.scala
Scala
agpl-3.0
2,227
/* 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 distributed u...
Guavus/phoenix
phoenix-spark/src/main/scala/org/apache/phoenix/spark/ProductRDDFunctions.scala
Scala
apache-2.0
2,225
package ex021 class Queens(val n: Int) { def check(r: Int, c: Int, pat: List[(Int, Int)]): Boolean = { // check placements whether overlap pat.forall(p => c != p._2 && r-p._1 != math.abs(c-p._2)) } def queen(r: Int): List[List[(Int, Int)]] = { // placements list if (r==0) List(Ni...
0shimax/learn-ai-algo
scala/Queens.scala
Scala
mit
623
package org.apache.spark.ml.feature import org.apache.spark.sql.{DataFrame, SQLContext} import org.junit.runner.RunWith import org.scalatest.{BeforeAndAfterAll, FunSuite} import org.scalatest.junit.JUnitRunner import TestHelper._ /** * Test information theoretic feature selection on datasets from Peng's webpage ...
sramirez/spark-infotheoretic-feature-selection
src/test/scala/org/apache/spark/ml/feature/ITSelectorSuite.scala
Scala
apache-2.0
3,024
/* * 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 ...
CodingCat/spark-eventhubs
examples/src/main/scala/com/microsoft/spark/streaming/examples/directdstream/MultiStreamsJoin.scala
Scala
apache-2.0
3,734
package xyz.hyperreal.dal import xyz.hyperreal.numbers.BigDecimalMath import xyz.hyperreal.numbers.BigDecimalMath.decimal128._ import java.{lang => boxed} import scala.math.{BigInt, pow} object ComplexDAL extends DAL { special(DoubleType, ComplexBigIntType, ComplexDoubleType) special(BigDecType, ComplexBigIntTy...
edadma/funl
dal/src/main/scala/xyz/hyperreal/dal/ComplexDAL.scala
Scala
mit
13,748
// code-examples/TypeLessDoMore/string-util.scala object StringUtil { def joiner(strings: List[String]) = strings.mkString(" ") def joiner(strings: String*):String = joiner(strings.toList) def toCollection(string: String) = string.split(' ') }
XClouded/t4f-core
scala/src/tmp/TypeLessDoMore/string-util.scala
Scala
apache-2.0
254
// #4608 object Test { def main(args: Array[String]) { ((1 to 100) sliding 10).toList.par.map{_.map{i => i * i}}.flatten } }
felixmulder/scala
test/files/run/t4608.scala
Scala
bsd-3-clause
135
package cqrs.publicserver import endpoints.documented.openapi.model.OpenApi import endpoints.play.server.circe.JsonEntities import endpoints.play.server.{Assets, Endpoints, PlayComponents} import play.api.routing.{Router => PlayRouter} import play.twirl.api.{Html, StringInterpolation} /** * These endpoints serve th...
Krever/endpoints
documentation/examples/cqrs/public-server/src/main/scala/cqrs/publicserver/BootstrapEndpoints.scala
Scala
mit
1,312
package org.http4s import cats.implicits._ import cats.kernel.laws.discipline.OrderTests import org.http4s.laws.discipline.HttpCodecTests class QValueSpec extends Http4sSpec { import QValue._ checkAll("Order[QValue]", OrderTests[QValue].order) checkAll("HttpCodec[QValue]", HttpCodecTests[QValue].httpCodec) ...
ChristopherDavenport/http4s
tests/src/test/scala/org/http4s/QValueSpec.scala
Scala
apache-2.0
1,824
package de.ust.skill.scala.generic import java.io.ByteArrayOutputStream import java.io.File import java.nio.ByteBuffer import java.nio.channels.FileChannel import java.nio.file.Files import java.nio.file.Path import java.nio.file.StandardOpenOption import scala.collection.mutable.HashMap /** * The interface to fully...
lordd/ScalaTFGenericBinding
src/de/ust/skill/scala/generic/State.scala
Scala
bsd-3-clause
6,557
package net.itadinanta.rnkr.engine import scala.concurrent.Future import scala.concurrent.Promise import akka.actor._ import akka.pattern._ import net.itadinanta.rnkr.backend._ import Leaderboard._ import net.itadinanta.rnkr.core.arbiter.Gate import scala.concurrent.ExecutionContext import net.itadinanta.rnkr.util.Set...
itadinanta/rnkr
rnkr-engine/src/main/scala/net/itadinanta/rnkr/engine/PersistentLeaderboard.scala
Scala
gpl-2.0
4,941
/* * 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 ...
yew1eb/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/ScalarFunction.scala
Scala
apache-2.0
4,631
package debop4s.redis.spring import debop4s.redis.model.User import org.slf4j.LoggerFactory import org.springframework.cache.annotation.{ CacheEvict, Cacheable } import org.springframework.stereotype.Repository /** * debop4s.redis.spring.UserRepository * * @author λ°°μ„±ν˜ [email protected] * @since 2014. 2. 24...
debop/debop4s
debop4s-redis/src/test/scala/debop4s/redis/spring/UserRepository.scala
Scala
apache-2.0
994
/* * 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 ...
bwsw/t-streams
src/main/scala/com/bwsw/tstreams/agents/consumer/TransactionOperator.scala
Scala
apache-2.0
1,783
package org.scalaide.core.internal import scala.collection.mutable import scala.collection.mutable.ListBuffer import scala.tools.nsc.settings.ScalaVersion import org.eclipse.core.resources.IFile import org.eclipse.core.resources.IProject import org.eclipse.core.resources.IResourceChangeEvent import org.eclipse.core.r...
Kwestor/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/core/internal/ScalaPlugin.scala
Scala
bsd-3-clause
13,198
package io.sweetheart.examples.pis.abstractMembers object Misc { object Obj1 { trait RationalTrait { val numerArg: Int val denomArg: Int } new RationalTrait { val numerArg = 1 val denomArg = 2 } val expr1 = 1 val expr2 = 2 new RationalTrait { val numerArg ...
zzragida/ScalaExamples
ProgrammingInScala/src/io/sweetheart/examples/pis/abstractMembers/Misc.scala
Scala
apache-2.0
4,089
package org.tuubes.core.entities import org.tuubes.core.{Type, TypeRegistry} /** * A type of entity. * * @author TheElectronWill */ abstract class EntityType(n: String) extends Type[EntityType](n, EntityType) {} /** * Companion object and registry of entity types. */ object EntityType extends TypeRegistry[Enti...
mcphoton/Photon-Server
core/src/main/scala/org/tuubes/core/entities/EntityType.scala
Scala
lgpl-3.0
331
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
shaoxuan-wang/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/schema/IntermediateRelTable.scala
Scala
apache-2.0
2,208
import language.experimental.fewerBraces val xs = List(1, 2, 3) val ys = xs.map x => x + 1 val x = ys.foldLeft(0) (x, y) => x + y val y = ys.foldLeft(0) (x: Int, y: Int) => val z = x + y z * z val as: Int = xs .map x => x * x .filter y => y > 0 (0)
dotty-staging/dotty
tests/pos/closure-args.scala
Scala
apache-2.0
272
package com.github.mrpowers.spark.daria.sql import org.apache.spark.sql.DataFrame /** * spark-daria can be used as a lightweight framework for running ETL analyses in Spark. * * You can define `EtlDefinitions`, group them in a collection, and run the etls via jobs. * * '''Components of an ETL''' * * An ETL sta...
MrPowers/spark-daria
src/main/scala/com/github/mrpowers/spark/daria/sql/EtlDefinition.scala
Scala
mit
1,716
/* Copyright 2013 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-test/src/test/scala/com/twitter/algebird/QTreeTest.scala
Scala
apache-2.0
4,257
/* * Copyright 2016 sadikovi * * 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 ...
sadikovi/spark-netflow
src/main/scala/com/github/sadikovi/spark/benchmark/NetFlowReadBenchmark.scala
Scala
apache-2.0
6,090
/* * ____ ____ _____ ____ ___ ____ * | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R) * | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data * | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In...
precog/platform
performance/src/test/scala/com/precog/performance/PerformanceSpec.scala
Scala
agpl-3.0
2,302
package scalaz.stream import scalaz.{Equal, Nondeterminism} import scalaz.syntax.equal._ import scalaz.std.anyVal._ import scalaz.std.list._ import scalaz.std.list.listSyntax._ import org.scalacheck._ import Prop._ import scalaz.concurrent.Task object AsyncSpec extends Properties("async") { property("queue") =...
bmjames/scalaz-stream
src/test/scala/scalaz/stream/AsyncSpec.scala
Scala
mit
862
package models /** * Author: matthijs * Created on: 29 Dec 2013. */ import java.security.MessageDigest import play.api.db.DB import play.api.Play.current import anorm._ import anorm.SqlParser._ import models.util.AnormExtension._ import anorm.~ import play.Logger case class Account(id: Long, firstname: String, ...
plamola/FeedR-V1
app/models/Account.scala
Scala
gpl-2.0
3,755
/** * CPNetSolver * Copyright (C) 2013 Francesco Burato, Simone Carriero * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any lat...
fburato/CPNetSolver
CPNetSolver/src/gui/GraphPanel.scala
Scala
gpl-3.0
4,169
/* * 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/main/scala/com/intel/analytics/bigdl/models/lenet/Train.scala
Scala
apache-2.0
3,322
/* * 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/ChildOfTheUndyingCourt.scala
Scala
apache-2.0
1,187
/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package swave.core.impl.util import scala.annotation.tailrec import org.jctools.util.UnsafeAccess.UNSAFE impo...
sirthias/swave
core/src/main/scala/swave/core/impl/util/RingBuffer.scala
Scala
mpl-2.0
4,225
package com.atanana.checkers import java.time.{LocalDateTime, ZoneId} import com.atanana.data.{Requisition, RequisitionData, RequisitionsCheckResult} class RequisitionsChecker { def check(oldRequisitions: Set[Requisition], newRequisitions: Set[RequisitionData]): RequisitionsCheckResult = { RequisitionsCheckRes...
atanana/rating-bot
src/main/scala/com/atanana/checkers/RequisitionsChecker.scala
Scala
mit
1,255
// // Scaled - a scalable editor extensible via JVM languages // http://github.com/scaled/scaled/blob/master/LICENSE package scaled.code import org.junit.Assert._ import org.junit._ import scaled._ class CommenterTest { import CodeConfig._ def toLine (syntax :Syntax)(tup :(String,Int)) = { val (tx, ci) = tu...
swhgoon/scaled
api/src/test/scala/scaled/code/CommenterTest.scala
Scala
bsd-3-clause
2,401
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/amls-frontend
app/models/tradingpremises/TradingPremisesMsbServices.scala
Scala
apache-2.0
6,190
/* * FirmsTest.scala * Firms examples tests. * * Created By: Avi Pfeffer ([email protected]) * Creation Date: Jan 1, 2009 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email [email protected] for information. * * See http://www.github.com/p2t2/figaro for ...
agarbuno/figaro
Figaro/src/test/scala/com/cra/figaro/test/example/FirmsTest.scala
Scala
bsd-3-clause
3,100
package util.testkit import engine.api.MapReduce /** * Used for testing the MapReduce Interface Unit */ class WordCountMapReduceTest extends MapReduce[None.type, String, String, Int, String, Int, (String, Int)] { override def map(k: None.type, v: String): Iterable[(String, Int)] = { v.split(" ").map((_, 1))...
filipegmiranda/typed-mapreduce
src/test/scala/util/testkit/WordCountMapReduceTest.scala
Scala
apache-2.0
438
/** * 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...
unix1986/universe
tool/kafka-0.8.1.1-src/core/src/main/scala/kafka/common/NotLeaderForPartitionException.scala
Scala
bsd-2-clause
1,049
package net.sansa_stack.owl.flink.dataset import de.javakaffee.kryoserializers.UnmodifiableCollectionsSerializer import org.apache.flink.api.scala.ExecutionEnvironment import org.scalatest.FunSuite import org.semanticweb.owlapi.model.{OWLAsymmetricObjectPropertyAxiom, OWLDataPropertyAssertionAxiom, OWLDisjointObjectPr...
SANSA-Stack/SANSA-RDF
sansa-owl/sansa-owl-flink/src/test/scala/net/sansa_stack/owl/flink/dataset/FunctionalSyntaxOWLAxiomsDataSetBuilderTest.scala
Scala
apache-2.0
17,789
package mesosphere.marathon.metrics import java.util.concurrent.TimeUnit import com.codahale.metrics.{ ExponentiallyDecayingReservoir, MetricRegistry } import com.google.inject.{ Guice, AbstractModule } import com.google.inject.matcher.{ AbstractMatcher, Matchers } import mesosphere.marathon.MarathonSpec import mesos...
EasonYi/marathon
src/test/scala/mesosphere/marathon/metrics/MetricsTest.scala
Scala
apache-2.0
3,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 ...
ddna1021/spark
core/src/test/scala/org/apache/spark/deploy/SparkSubmitUtilsSuite.scala
Scala
apache-2.0
10,902
package actors import actors.persistent.staffing.{AddStaffMovements, AddStaffMovementsAck, GetState, RemoveStaffMovements, RemoveStaffMovementsAck, StaffMovementsActorBase, StaffMovementsReadActor} import java.util.UUID import akka.actor.{PoisonPill, Props} import akka.testkit.ImplicitSender import drt.shared.Termin...
UKHomeOffice/drt-scalajs-spa-exploration
server/src/test/scala/actors/StaffMovementsActorSpec.scala
Scala
apache-2.0
12,379
/* * Copyright 2015-2016 IBM 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...
CrowdFlower/incubator-openwhisk
tests/src/test/scala/system/basic/WskActionTests.scala
Scala
apache-2.0
15,611
import scala.tools.partest._ import java.io.{Console => _, _} object Test extends DirectTest { override def extraSettings: String = "-usejavacp -Xprint:uncurry -Ydelambdafy:method -Ystop-after:uncurry -d " + testOutput.path override def code = """class Foo { | def bar(x: => String) = x ...
felixmulder/scala
test/files/run/delambdafy_uncurry_byname_method.scala
Scala
bsd-3-clause
560
/** * Copyright 2015 Thomson Reuters * * 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...
nruppin/CM-Well
server/cmwell-ws/app/security/Operation.scala
Scala
apache-2.0
1,064
package com.sksamuel.elastic4s.requests.searches.aggs import com.sksamuel.elastic4s.requests.common.RefreshPolicy import com.sksamuel.elastic4s.requests.searches.DateHistogramInterval import com.sksamuel.elastic4s.testkit.DockerTests import org.scalatest.freespec.AnyFreeSpec import org.scalatest.matchers.should.Matche...
stringbean/elastic4s
elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/requests/searches/aggs/ExtendedStatsBucketPipelineAggHttpTest.scala
Scala
apache-2.0
2,445
package au.com.dius.pact.server import io.netty.channel.ChannelHandler.Sharable import unfiltered.netty.ReceivedMessage import unfiltered.netty.ServerErrorResponse import unfiltered.netty.cycle import unfiltered.request.HttpRequest import unfiltered.response.ResponseFunction import scala.collection.immutable.Map clas...
DiUS/pact-jvm
pact-jvm-server/src/main/scala/au/com/dius/pact/server/RequestHandler.scala
Scala
apache-2.0
1,059
package BIDMat import java.io.Closeable case class CLHandle(context: org.jocl.cl_context, queue: org.jocl.cl_command_queue) { def free():Unit = { CLKernelCache.free() org.jocl.CL.clReleaseCommandQueue(queue) org.jocl.CL.clReleaseContext(context) } } object CLHandle { def apply():CLHandle = { va...
phlip9/BIDMat
src/main/scala/BIDMat/CLHandle.scala
Scala
bsd-3-clause
2,391
/* * 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 ...
indhub/mxnet
scala-package/core/src/main/scala/org/apache/mxnet/module/BucketingModule.scala
Scala
apache-2.0
16,772
/* * 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/test/scala/laika/parse/hocon/HoconErrorSpec.scala
Scala
apache-2.0
13,852
package com.kpbochenek.mieszkania import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.stream.ActorMaterializer import com.typesafe.scalalogging.LazyLogging import akka.http.scaladsl.model._ import akka.http.scaladsl.server.Directives._ /** Created by kpbochenek on 8/4/16. */ object MieszkaniaApp...
kpbochenek/mieszkania
src/main/scala/com/kpbochenek/mieszkania/MieszkaniaApp.scala
Scala
apache-2.0
912
/* * 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...
ahudspith-equalexperts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/calculations/AccountingPeriodHelper.scala
Scala
apache-2.0
2,975