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 nicol package renderer import opengl.GLUtils import geom.{Shape, Quad, AABox, Circle, Line, Curve} import GLUtils._ trait StandardGeometryRenderer { implicit object ShapeRenderer extends Renderer[Shape] { private val sections = 24 private val angles = for (a <- 0 until sections) yield a * ((2 * sca...
scan/Nicol
core/src/main/scala/nicol/renderer/StandardGeometryRenderer.scala
Scala
bsd-3-clause
3,871
package osiris.infrastructure /** * Provides configuration constants for other tasks. * * User: Stefan Reichel * Date: 26.07.12 * Time: 14:04 */ object OsirisConfiguration { val SHADERPATH = "public/shaders/" val SCENEPATH = "public/scenes/" }
Bomret/osiris
app/osiris/infrastructure/OsirisConfiguration.scala
Scala
mit
255
package de.unifreiburg.cs.proglang.jgs.signatures import de.unifreiburg.cs.proglang.jgs.constraints.TypeViews.TypeView /** * JGS Symbols that occur in method signatures. * They correspond to Jimple's Parameters, @return, or literal security levels */ sealed trait Symbol[Level] sealed case class Param[Level] (p...
luminousfennell/jgs
GradualConstraints/src/main/java/de/unifreiburg/cs/proglang/jgs/signatures/Symbol.scala
Scala
bsd-3-clause
965
package org.cloudio.morpheus.mail.traditional /** * Created by zslajchrt on 24/08/15. */ trait VirusDetector extends UserMail { private var virusCounter: Int = 0 def virusesFound = virusCounter abstract override def validateEmail(message: Message): Unit = { validateAttachments(message) super.validat...
zslajchrt/morpheus-tutor
src/main/scala/org/cloudio/morpheus/mail/traditional/VirusDetector.scala
Scala
apache-2.0
784
package com.twitter.finagle.http import com.twitter.finagle.benchmark.StdBenchAnnotations import org.openjdk.jmh.annotations._ import org.openjdk.jmh.infra.Blackhole import scala.util.Random @State(Scope.Benchmark) abstract class HeaderMapBenchmark extends StdBenchAnnotations { protected def newMap(): HeaderMap ...
luciferous/finagle
finagle-benchmark/src/main/scala/com/twitter/finagle/http/HeaderMapBenchmark.scala
Scala
apache-2.0
1,381
package fi.pelam.actorutil import akka.actor.{FSM, OneForOneStrategy, SupervisorStrategy} import grizzled.slf4j.Logging /** * Derived version of FSM belonging to Akka. This version behaves "offensively" * instead of defensively. * * It crashes hard instead of just maybe logging a warning. * * This offensi...
pelamfi/pelam-scala-incubator
src/main/scala/fi/pelam/actorutil/OffensiveFsm.scala
Scala
apache-2.0
2,287
package monocle.function import monocle.Traversal import scala.annotation.implicitNotFound import scalaz.syntax.traverse._ import scalaz.{Applicative, Traverse} @implicitNotFound("Could not find an instance of FilterIndex[${S},${I},${A}], please check Monocle instance location policy to " + "find out which import ...
CapeSepias/Monocle
core/src/main/scala/monocle/function/FilterIndex.scala
Scala
mit
1,174
/* * Copyright (c) 2013 koiroha.org. * All sources and related resources are available under Apache License 2.0. * http://www.apache.org/licenses/LICENSE-2.0.html */ package com.kazzla.asterisk import org.slf4j.LoggerFactory import scala.collection.JavaConversions._ // +++++++++++++++++++++++++++++++++++++++++++++...
torao/asterisque
core-scala/src_back/main/scala/com/kazzla/asterisk/TypeMapper.scala
Scala
apache-2.0
6,055
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
nagavallia/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/data/ZIntervalTest.scala
Scala
apache-2.0
3,735
/*********************************************************************** * 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-redis/geomesa-redis-tools/src/main/scala/org/locationtech/geomesa/redis/tools/schema/RedisUpdateSchemaCommand.scala
Scala
apache-2.0
1,364
package com.github.pheymann.rrt import akka.http.scaladsl.model.HttpResponse import akka.stream.ActorMaterializer import com.github.pheymann.rrt.util.{BodyAsStringComparison, RandomUtil} import com.github.pheymann.rrt.util.ResponseComparator.{ComparisonResult, FailureWithValues} import org.specs2.mutable.Specification...
pheymann/rest-refactoring-test
core/src/test/scala/com/github/pheymann/rrt/TestRunnerSpec.scala
Scala
mit
2,175
package snakesladders.domain.services import akka.actor.ActorSystem import akka.testkit.{ImplicitSender, TestFSMRef, TestKit} import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike} import snakesladders.domain.events._ import snakesladders.domain.models.GameDefinitions._ import snakesladders.domain.models.Gam...
sibex/snakes-and-ladders
src/test/scala/snakesladders/domain/services/GameStateMachineSpecs.scala
Scala
mit
11,508
/* * 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 ...
manuzhang/incubator-gearpump
project/BuildExternals.scala
Scala
apache-2.0
5,835
/* * 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 ...
manishgupta88/incubator-carbondata
integration/spark-common-cluster-test/src/test/scala/org/apache/carbondata/cluster/sdv/suite/SDVSuites.scala
Scala
apache-2.0
8,478
/* * Copyright 2011-2018 Chris de Vreeze * * 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...
dvreeze/nta
src/main/scala/eu/cdevreeze/nta/ntarule/rules_2_02/Validator_2_02_00_05.scala
Scala
apache-2.0
3,016
object O { // This compiles val a: { type T } = null; val b: Any { type T } = null; // This doesn't: // found : Null // required: AnyRef{T} val c: AnyRef { type T } = null; class A class B val d: A & B = null val e: A | B = null val f: (A & B) { def toString: String } = null val g: (A | ...
AlexSikia/dotty
tests/pos/i262-null-subtyping.scala
Scala
bsd-3-clause
357
package org.questions.arrays import org.specs2.matcher.Matcher import org.specs2.mutable.Specification import org.specs2.specification.Scope /** * @author maximn * @since 30-Oct-2015 */ class TwoSumTest extends Specification { class Context extends Scope { val arrayUtils = new TwoSum def sumTo(sum: Int...
maximn/coding-interview-questions-scala
src/test/scala/org/questions/arrays/TwoSumTest.scala
Scala
apache-2.0
1,015
/* * Copyright 2013-2016 Tsukasa Kitachi * * 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...
kxbmap/configs
core/src/main/scala/configs/package.scala
Scala
apache-2.0
1,316
import scala.reflect.runtime.universe._ import scala.reflect.runtime.{currentMirror => cm} import scala.tools.reflect.ToolBox object Test extends dotty.runtime.LegacyApp { val tb = cm.mkToolBox() val tree = tb.parse("x") println(tree.pos) println(tree.pos.source.content.length) }
folone/dotty
tests/pending/run/t7331a.scala
Scala
bsd-3-clause
290
/** * 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...
TiVo/kafka
core/src/test/scala/unit/kafka/server/ConfigAdminManagerTest.scala
Scala
apache-2.0
22,087
package org.elasticsearch.action.deletebyquery object DeleteByQueryImplicits { implicit class DeleteByQueryRequestOps(val that: DeleteByQueryRequest) extends AnyVal { //import scala.collection.JavaConversions._ def typeList: List[String] = that.types.toList def queryString: String = that.source().toUtf8...
fmasion/playLastik
project-code/app/Implicits/DeleteByQueryImplicits.scala
Scala
apache-2.0
330
// Copyright: 2010 - 2018 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/lgpl-3.0.en.html package spray.json import annotation.implicitNotFound import shapeless._ /** * Provides the JSON deserialization for type T. */ @implicitNotFound( msg = "Cannot find JsonReader or Json...
yyadavalli/ensime-server
json/src/main/scala/spray/json/JsonFormat.scala
Scala
gpl-3.0
2,166
package org.scalatest /** * Trait that causes <code>StackDepth</code> exceptions thrown by a running test (such as <code>TestFailedException</code>s) to have * the exception's stack trace severed at the stack depth. Because the stack depth indicates the exact line of code that caused * the exception to be thrown, t...
yyuu/scalatest
src/main/scala/org/scalatest/SeveredStackTraces.scala
Scala
apache-2.0
864
package parsing import parsing.Tokens.{Token, Atom, Context, EmptyContext} import interpreter.{LispInterpreterParser, LispMachine} import interpreter.LispInterpreterParser.buildContextFrom class UniversalLispFunction extends FlatSpecForParsers with MetaLanguageParsers { implicit val parserToTest = funOrSexp // N...
cdegroot/Parens
src/test/scala/parsing/UniversalLispFunction.scala
Scala
unlicense
2,856
package com.sksamuel.elastic4s.handlers.script import com.sksamuel.elastic4s.json.{XContentBuilder, XContentFactory} import com.sksamuel.elastic4s.requests.script.{Script, ScriptType} object ScriptBuilderFn { def apply(script: Script): XContentBuilder = { val builder = XContentFactory.jsonBuilder() scrip...
sksamuel/elastic4s
elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/handlers/script/ScriptBuilderFn.scala
Scala
apache-2.0
1,060
// Copyright (C) 2011-2012 the original author or authors. // See the LICENCE.txt file distributed with this work for additional // information regarding copyright ownership. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You ...
asaitov/scalastyle
src/test/scala/org/scalastyle/scalariform/NoCloneCheckerTest.scala
Scala
apache-2.0
1,987
/* * 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 ...
WangTaoTheTonic/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/types/CRow.scala
Scala
apache-2.0
1,657
import scala.concurrent.duration._ import org.powerapi.PowerMeter import org.powerapi.core.target._ import org.powerapi.module.cpu.simple.ProcFSCpuSimpleModule import org.powerapi.reporter.ConsoleDisplay object CPUMonitorExample extends App { val cpu = PowerMeter.loadModule(ProcFSCpuSimpleModule()) val console = ...
Spirals-Team/powerapi
powerapi-powermeter/CPUMonitorProcFS/src/main/scala/CPUMonitorExample.scala
Scala
agpl-3.0
471
/* * Copyright 2011-2018 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 applic...
wiacekm/gatling
gatling-core/src/main/scala/io/gatling/core/check/extractor/css/NodeConverter.scala
Scala
apache-2.0
1,822
package net.chwthewke.passman import cats.Eq import org.scalactic.Equivalence import org.scalactic.TypeCheckedTripleEquals trait CatsTripleEquals extends TypeCheckedTripleEquals { implicit def catsTripleEqualsEquivalence[A](implicit E: Eq[A]): Equivalence[A] = (left: A, right: A) => E.eqv(left, right) }
chwthewke/passman
passman-core/src/test/scala/net/chwthewke/passman/CatsTripleEquals.scala
Scala
bsd-3-clause
313
package com.twitter.finagle.service import com.twitter.util.{Await, Future} import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.junit.runner.RunWith import org.scalatest.mock.MockitoSugar import org.mockito.Mockito.{times, verify, when} import org.mockito.Matchers._ import com.twitter.hashi...
yancl/finagle-6.22.0
finagle-core/src/test/scala/com/twitter/finagle/service/ShardingServiceTest.scala
Scala
apache-2.0
2,589
package com.sandinh.couchbase import java.lang import javax.inject.{Inject, Singleton} import play.api.inject.ApplicationLifecycle import scala.concurrent.duration._ import com.sandinh.rx.Implicits._ import com.typesafe.config.Config import scala.concurrent.Future @Singleton class PlayCBCluster @Inject() (cfg: Con...
giabao/couchbase-scala
play/src/main/scala/com/sandinh/couchbase/PlayCBCluster.scala
Scala
apache-2.0
667
package io.github.quark.route import io.github.quark.action.ServiceAction.Service import io.github.quark.dsl.DSL._ import io.github.quark.testutils._ import org.scalatest.FunSuite import shapeless._ class RouteBuilderTest extends FunSuite { test("Builder should take an HList of services and return HList of Routes")...
burakkose/Quark
src/test/scala/io/github/quark/route/RouteBuilderTest.scala
Scala
apache-2.0
560
/* * 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 ...
icexelloss/spark
core/src/main/scala/org/apache/spark/BarrierTaskContext.scala
Scala
apache-2.0
8,908
package com.airbnb.scheduler.api import com.fasterxml.jackson.databind.{SerializerProvider, JsonSerializer} import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics import com.fasterxml.jackson.core.JsonGenerator /** * Serializes a subset of the fields of DescriptiveStatistics * @author Florian Leiber...
meelapshah/chronos
src/main/scala/com/airbnb/scheduler/api/DescriptiveStatisticsSerializer.scala
Scala
apache-2.0
1,184
/* * 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 ...
lhfei/spark-in-action
spark-3.x/src/main/scala/org/apache/spark/examples/streaming/RawNetworkGrep.scala
Scala
apache-2.0
2,670
package mqfiletransferagent.messages import org.scalatest.WordSpecLike import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.WordSpec import org.scalatest.Matchers @RunWith(classOf[JUnitRunner]) class CommandMessageSpec extends WordSpec with Matchers { val validMessage = "<mess...
antongerbracht/MQFileTransfer
MQFileTransferAgent/src/test/scala/mqfiletransferagent/messages/CommandMessageSpec.scala
Scala
apache-2.0
707
package cmwell.analytics.main import java.nio.file.Paths import akka.actor.ActorSystem import akka.stream.ActorMaterializer import cmwell.analytics.data.{DataWriterFactory, IndexWithUuidOnly} import cmwell.analytics.downloader.PartitionedDownloader import cmwell.analytics.util.{DiscoverEsTopology, FindContactPoints} ...
bryaakov/CM-Well
tools/dataConsistencyTool/extract-index-from-es/src/main/scala/cmwell/analytics/main/DumpUuidOnlyFromEs.scala
Scala
apache-2.0
3,644
package db import io.apibuilder.api.v0.models.{Attribute, AttributeSummary, AttributeValue, AttributeValueForm, Organization, User} import io.apibuilder.common.v0.models.Audit import io.flow.postgresql.Query import lib.Validation import anorm._ import javax.inject.{Inject, Singleton} import play.api.db._ import play.a...
apicollective/apibuilder
api/app/db/OrganizationAttributeValuesDao.scala
Scala
mit
5,506
/* * 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 ...
shuangshuangwang/spark
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetTypeInfoOperation.scala
Scala
apache-2.0
4,118
val t = 200 val coins = Array(1,2,5,10,20,50,100,200) def change_combinations(target: Int, coin_array: Array[Int]) : Int = { if (coin_array.length == 1) { if (target % coin_array(0) == 0) 1 else 0 } else { val current_coin = coin_array.last val max_num_of_current_coin = target / current_coin (0 to...
logical42/algorithms
scala/coin.scala
Scala
mit
491
/** * Taken from https://github.com/scalatra/rl/blob/v0.4.10/core/src/main/scala/rl/UrlCodingUtils.scala * Copyright (c) 2011 Mojolly Ltd. */ package org.http4s.util import java.nio.{ByteBuffer, CharBuffer} import java.nio.charset.Charset import java.nio.charset.StandardCharsets.UTF_8 import java.util.Locale impor...
hvesalai/http4s
core/src/main/scala/org/http4s/util/UrlCoding.scala
Scala
apache-2.0
4,563
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
tkunicki/geomesa
geomesa-hbase/geomesa-hbase-tools/src/main/scala/org/locationtech/geomesa/hbase/tools/HBaseRunner.scala
Scala
apache-2.0
2,597
/* Copyright 2014 MentalArray, 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 applicable law or agreed to in writing, softw...
antagonist112358/tomahawk
workflow-engine/src/net/mentalarray/doozie/TaskRunners/SparkTaskRunner.scala
Scala
apache-2.0
1,253
package service.reflection import org.scalamock.scalatest.MockFactory import org.scalatest.{FlatSpec, Matchers, Suite} import service.StringBuilderRunner import service._ import scala.concurrent.ExecutionContext.Implicits.global abstract class PositiveOutput extends FlatSpec with Matchers with MockFactory { def su...
DmytroOrlov/devgym
server/test/service/reflection/PositiveOutput.scala
Scala
apache-2.0
541
package picasso.utils.report //define the basic CSS style for a report object Style { val CSS = { """<style type="text/css"> </style>""" } }
dzufferey/picasso
core/src/main/scala/picasso/utils/report/Style.scala
Scala
bsd-2-clause
148
/** * Copyright 2015, deepsense.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 applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
deeplang/src/main/scala/io/deepsense/deeplang/doperables/spark/wrappers/models/ALSModel.scala
Scala
apache-2.0
2,057
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
tophua/spark1.52
mllib/src/test/scala/org/apache/spark/mllib/regression/LabeledPointSuite.scala
Scala
apache-2.0
2,670
/* * 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 ...
bowenli86/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/batch/BatchExecUnion.scala
Scala
apache-2.0
4,968
package com.lyrx.text import java.io.File import java.nio.charset.Charset /** * Created by extawe on 11/4/16. */ trait StringCollector extends Collector[String] { def stripSuffix(aSuffix:String) def content():StringGenerator }
lyrx/lyrxgenerator
src/main/scala/com/lyrx/text/StringCollector.scala
Scala
gpl-3.0
244
/* * This file is part of Kiama. * * Copyright (C) 2013-2015 Anthony M Sloane, Macquarie University. * * Kiama is free software: you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the * Free Software Foundation, either version 3 of the License, or ...
solomono/kiama
library/src/org/kiama/example/grammar/SymbolTable.scala
Scala
gpl-3.0
1,280
/** * Copyright 2013-2015, AlwaysResolve Project (alwaysresolve.org), MOYD.CO LTD * This file incorporates work covered by the following copyright and permission notice: * * Copyright 2012 silenteh * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complianc...
Moydco/AlwaysResolveDNS
src/main/scala/records/PTR.scala
Scala
apache-2.0
1,678
/* * 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-test/src/test/scala/org/scalatest/suiteprop/PathListBufferExamples.scala
Scala
apache-2.0
48,549
package com.twitter.finagle.loadbalancer import com.twitter.app.GlobalFlag /** * NOTE: using any of these flags is generally not encouraged as Finagle processes * contain many clients and these configure clients globally per-process. It's * encouraged to configure clients individually. */ /** * A [[GlobalFlag]] ...
twitter/finagle
finagle-core/src/main/scala/com/twitter/finagle/loadbalancer/flags.scala
Scala
apache-2.0
2,809
/* * Copyright (C) 2016 Christopher Batey and Dogan Narinc * * 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...
mikefero/cpp-driver
gtests/src/integration/scassandra/server/server/src/test/scala/org/scassandra/server/e2e/query/PatternMatchingTest.scala
Scala
apache-2.0
1,228
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
bOOm-X/spark
core/src/main/scala/org/apache/spark/deploy/master/Master.scala
Scala
apache-2.0
43,215
package t1000670_2 abstract class Bar extends B with A
Kwestor/scala-ide
org.scala-ide.sdt.core.tests/test-workspace/jcompiler/src/t1000670_2/Bar.scala
Scala
bsd-3-clause
55
/* * 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 ...
mrchristine/spark-examples-dbc
src/main/scala/org/apache/spark/examples/mllib/StandardScalerExample.scala
Scala
apache-2.0
2,324
package de.frosner.broccoli.instances.storage.filesystem import java.nio.file.Path /** * Configuration for FileSystemInstanceStorage * * @param path location on the filesystem to store the instance information */ final case class FileSystemConfiguration(path: Path)
FRosner/cluster-broccoli
server/src/main/scala/de/frosner/broccoli/instances/storage/filesystem/FileSystemConfiguration.scala
Scala
apache-2.0
276
package services.application import models._ import javax.inject.Singleton import scala.collection.JavaConverters._ import controllers.input.ConfigurationEntryInput @Singleton class ConfigurationService { def getAll():List[ConfigurationEntry] = { ConfigurationEntry.finder.all().asScala.toList } def update(entr...
marcin-lawrowski/felicia
app/services/application/ConfigurationService.scala
Scala
gpl-3.0
988
package org.openguard.core.models import java.sql.Timestamp case class ImageRef(imgPath: String,thumbnailPath: String, uploadTime: Timestamp, year: Int, month: Int, day: Int, hour: Int,mediatype: String)
pbolle/openvideoguard
core/src/main/scala/org/openguard/core/models/ImageRef.scala
Scala
apache-2.0
205
/** * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com> */ package akka.actor import akka.dispatch.sysmsg._ import akka.dispatch.{ UnboundedMessageQueueSemantics, RequiresMessageQueue } import akka.routing._ import akka.event._ import akka.util.{ Switch, Helpers } import akka.japi.Util.immutableSeq im...
Fincore/org.spark-project.akka
actor/src/main/scala/akka/actor/ActorRefProvider.scala
Scala
mit
29,666
package com.rainysoft.bayesian.inference import com.rainysoft.bayesian.network.{Network, NetworkNode} import org.scalatest._ /** Tests enumeration ask algorithm. * * Uses the sample bayesian network provided in "Artificial Intelligence: A Modern Approach (3e)" by * Russel, Stuart and Norvig, Peter on page 512. ...
MikaelUmaN/BayesianNetwork
src/test/scala/com/rainysoft/bayesian/inference/EnumerateTest.scala
Scala
mit
2,924
/* * Copyright 2017 Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags. * * 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.ap...
Jiri-Kremser/bitcoin-insights
parquet-converter/src/main/scala/io/radanalytics/bitcoin/ParquetConverterNewArch.scala
Scala
apache-2.0
7,909
package metal import metal.mutable.{HashMap => MHashMap} import metal.syntax._ class MapOpsSuite extends MetalSuite { def testMap = MHashMap(1 -> 2, 2 -> 4, 3 -> 6, 4 -> 8) // SearchableOps test("contains") { val mII = testMap assert(mII.contains(3)) assert(!mII.contains(6)) } // RemovableSea...
denisrosset/ptrcoll
library/src/test/scala/metal/MapOpsSuite.scala
Scala
mit
1,368
class t9151 { abstract class Foo extends Ordered[Foo] val seq: Seq[Int] = null val set: Set[Int] = null val map: Map[Int, Int] = null val values: Map[Int, Set[Foo]] = null map ++ set.map(_ -> "") values ++ seq.groupBy(_ / 2).toSeq.map({ case (key, group) => key -> (values(key) ++ group.map(_ ...
scala/scala
test/files/pos/t9151.scala
Scala
apache-2.0
335
/** * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * to You under the Apache License, Version 2.0 (the "License"); you may not...
noslowerdna/kafka
core/src/test/scala/unit/kafka/admin/ReassignPartitionsClusterTest.scala
Scala
apache-2.0
60,656
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
tkunicki/geomesa
geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/data/RemoveSchemaCommand.scala
Scala
apache-2.0
2,693
package io.makana.hexwar.engine.domain.game import io.makana.hexwar.engine.domain.model._ import io.makana.hexwar.engine.domain.vector.Vectr import org.scalatest.{FlatSpec, Matchers} class GameEngineTest extends FlatSpec with Matchers { val gameEngine = new GameEngine() it should "advance the game turn counter wh...
brmakana/hexwar
src/test/scala/io/makana/hexwar/engine/domain/game/GameEngineTest.scala
Scala
apache-2.0
2,053
/* * 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-2.0 * ...
adarro/ddo-calc
subprojects/common/ddo-util/src/main/scala/io/truthencode/ddo/support/matching/MatchStrategy.scala
Scala
apache-2.0
709
package weatherApp.components import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.html_<^._ import scalajs.js.Date import weatherApp.models.ForecastWeather object WeatherForecastBox { case class Props(forecast: ForecastWeather) val Component = ScalaFnComponent[Props](props => { val forecast = ...
malaman/scala-weather-app
frontend/src/main/scala/weatherApp/components/WeatherForecastBox.scala
Scala
mit
934
package entitytled.profile import entitytled.Entitytled import slick.driver.DerbyDriver trait DerbyProfile extends Entitytled { val driver: DerbyDriver = DerbyDriver } object DerbyProfile extends DerbyProfile
RSSchermer/entitytled
core/src/main/scala/entitytled/profile/DerbyProfile.scala
Scala
mit
214
/* * Copyright (c) 2011, Daniel Spiewak * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of cond...
djspiewak/anti-xml
src/test/scala/com/codecommit/antixml/XMLSerializerSpecs.scala
Scala
bsd-3-clause
2,153
package scala.pickling import scala.pickling.internal._ import ir._ trait TypeAnalysis extends Macro { import c.universe._ def isCaseClass(sym: TypeSymbol): Boolean = sym.isClass && sym.asClass.isCaseClass def isClosed(sym: TypeSymbol): Boolean = whyNotClosed(sym).isEmpty def whyNotClosed(sym: Typ...
eed3si9n/pickling-historical
core/src/main/scala/pickling/Macros.scala
Scala
bsd-3-clause
34,295
package scuff.reflect import org.junit._ import org.junit.Assert._ class TestSurgeon { @Test def foo(): Unit = { class Foo(ctor: String) { private[this] val foo: String = ctor } class Bar(ctor: String) extends Foo("foo") { private[this] val foo: String = ctor private[this] val bar: ...
nilskp/scuff
src/test/scala/scuff/reflect/TestSurgeon.scala
Scala
mit
1,066
/* * 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
external/kafka-0-8/src/test/scala/org/apache/spark/streaming/kafka/ReliableKafkaStreamSuite.scala
Scala
apache-2.0
5,477
/* The Computer Language Benchmarks Game http://shootout.alioth.debian.org/ contributed by Eric Willigers based on Java version by The Anh Tran */ object spectralnorm { val nthread = Runtime.getRuntime.availableProcessors val barrier = new java.util.concurrent.CyclicBarrier(nthread) def m...
kragen/shootout
bench/spectralnorm/spectralnorm.scala-2.scala
Scala
bsd-3-clause
2,515
/* * 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 ...
zuotingbing/spark
core/src/main/scala/org/apache/spark/ui/UIUtils.scala
Scala
apache-2.0
26,573
package org.foundator.link import java.io._ import HttpMethod._ import java.net.{URI, URL} import scala.Some import org.eclipse.jetty.server.handler.{ContextHandler, ResourceHandler, AbstractHandler} import javax.servlet.http.{HttpServletResponse, HttpServletRequest} import org.eclipse.jetty.server import org.json4s.{...
foundator/link
src/main/scala/org/foundator/link/UrlMapper.scala
Scala
mit
8,764
package skinny.activeimplicits /** * ActiveSupport-ish implicit conversions. */ object AllImplicits extends AllImplicits trait AllImplicits extends NumberImplicits with StringImplicits
Kuchitama/skinny-framework
common/src/main/scala/skinny/activeimplicits/AllImplicits.scala
Scala
mit
193
/* * 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 ...
goldmedal/spark
mllib/src/test/scala/org/apache/spark/ml/feature/HashingTFSuite.scala
Scala
apache-2.0
4,377
/** * Created by kirill on 16.02.2017. */ package eldis.react.mdl.components import eldis.react._ import eldis.react.mdl._ import eldis.react.util.ElementBuilder import eldis.react.vdom._ import eldis.react.vdom.prefix_<^.< import scala.scalajs.js import scala.scalajs.js.annotation.JSImport import js.JSConverters....
eldis/scalajs-react-mdl
src/main/scala/components/Menu.scala
Scala
mit
3,081
package monocle.function import monocle.{Iso, Lens} import scala.annotation.implicitNotFound /** * Typeclass that defines a [[Lens]] from an `S` to an optional `A` at an index `I` * @tparam S source of [[Lens]] * @tparam I index * @tparam A target of [[Lens]], `A` is supposed to be unique for a given pair `(S, I...
NightRa/Monocle
core/src/main/scala/monocle/function/At.scala
Scala
mit
943
class C { def foo[T: scala.reflect.ClassTag](xs: T*): Array[T] = ??? foo() }
AlexSikia/dotty
tests/untried/pos/t5692c.scala
Scala
bsd-3-clause
81
package bynull.algorithms.sort.bubble /** * Created by null on 8/8/16. */ object BubbleSort extends App { println(bubbleSimple(Seq(8, 7, 6, 5, 4, 3, 2, 1))) def bubbleSimple(source: Seq[Int]): Seq[Int] = { println(s"Bubble sort: $source") source match { case current :: next :: tail if current ...
xnull/insight
scala/src/main/scala/bynull/algorithms/sort/bubble/BubbleSort.scala
Scala
apache-2.0
1,427
import sbt._ object Dependencies { lazy val configManagement = "com.typesafe" % "config" % "1.3.1" }
YannickMeeus/me.meeus.spikes.configuration
project/Dependencies.scala
Scala
mit
104
/* * The MIT License (MIT) * * Copyright (c) 2013 Association du Paris Java User Group. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitat...
dadoonet/cfp-devoxx
app/controllers/SchedullingController.scala
Scala
mit
8,968
/* * FILE: UdtRegistrator.scala * Copyright (c) 2015 - 2019 GeoSpark Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2....
Sarwat/GeoSpark
viz/src/main/scala/org/datasyslab/geosparkviz/sql/UDT/UdtRegistrator.scala
Scala
mit
865
package clasp.core.remoting import java.io.BufferedWriter import java.io.File import java.io.FileWriter import java.text.SimpleDateFormat import java.util.Calendar import scala.collection._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ import scala.util.Failure import sca...
hamiltont/clasp
src/clasp/core/remoting/ws_api.scala
Scala
mit
17,664
package com.karasiq.mapdb import java.io.Closeable import java.nio.file.{Files, Path} import java.util.concurrent.TimeUnit import com.karasiq.mapdb.transaction.TransactionScheduler import org.mapdb.DBMaker.Maker import org.mapdb._ import scala.collection.concurrent.TrieMap /** * MapDB file wrapper */ sealed abstr...
Karasiq/mapdbutils
src/main/scala/com/karasiq/mapdb/MapDbFileProducer.scala
Scala
mit
2,433
/** * 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/licensing/ui/content/MainContentContainer.scala
Scala
gpl-3.0
2,274
/* * Copyright (c) 2011 Belmont Technology Pty Ltd. 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...
GrahamLea/SodaTest
sodatest-runtime/src/test/scala/org/sodatest/runtime/processing/running/SodaFolderRunnerTest.scala
Scala
apache-2.0
1,935
import scala.quoted.{ Quotes, Expr } def h(m: Expr[Foo])(using Quotes): Expr[Any] = g(m)
dotty-staging/dotty
tests/pos-macros/i7342/Macro_2.scala
Scala
apache-2.0
90
/* Copyright (C) 2008-2014 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...
iesl/fuse_ttl
src/factorie-factorie_2.11-1.1/src/main/scala/cc/factorie/directed/Mixture.scala
Scala
apache-2.0
6,658
package com.rumblesan.scalaglitch.util import com.rumblesan.scalaglitch.types._ import java.awt.image.BufferedImage import javax.imageio.ImageIO import java.io.{ByteArrayOutputStream, FileOutputStream, BufferedOutputStream} import java.io.{File, IOException} object FileOps { def glitchedImageToByteArray(image: ...
rumblesan/cuttr
scala-glitch/src/main/scala/util/FileOps.scala
Scala
bsd-2-clause
1,717
/** * Copyright 2016, deepsense.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 applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
commons/src/test/scala/io/deepsense/commons/utils/DirectoryListFileFinderSpec.scala
Scala
apache-2.0
2,664
/** * 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...
MykolaB/gatling
gatling-core/src/main/scala/io/gatling/core/akka/BaseActor.scala
Scala
apache-2.0
1,477
package cmwell.analytics.main import java.nio.file.Paths import akka.actor.ActorSystem import akka.stream.ActorMaterializer import cmwell.analytics.data.{DataWriterFactory, IndexWithCompleteDocument} import cmwell.analytics.downloader.PartitionedDownloader import cmwell.analytics.util.{DiscoverEsTopology, FindContact...
bryaakov/CM-Well
tools/dataConsistencyTool/extract-index-from-es/src/main/scala/cmwell/analytics/main/DumpCompleteDocumentFromEs.scala
Scala
apache-2.0
3,402
import org.nlogo.core.LogoList import org.nlogo.api._ import org.nlogo.core.Syntax._ import org.nlogo.api.ScalaConversions._ class HelloScalaExtension extends DefaultClassManager { def load(manager: PrimitiveManager) { manager.addPrimitive("hello", new HelloString) manager.addPrimitive("wiggle", new Wiggle) ...
NetLogo/netlogo-extension-activator
src/main/Hello.scala
Scala
cc0-1.0
1,761
package com.pharmpress.common.model.dmd import scala.scalajs.js.annotation.JSExportAll /** * Created by jimbo on 15/09/16. */ @JSExportAll case class IdTitle(id: String, title: String)
pharmpress/DmdBrowserScalaJs
shared/src/main/scala/com/pharmpress/common/model/dmd/IdTitle.scala
Scala
apache-2.0
191