code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Panos-Bletsos/spark-cost-model-optimizer
testing-cost-model/src/main/scala/gr/ionio/p11blet/Database.scala
Scala
apache-2.0
1,485
import codemodels.incrementalparsers.javaip.{PapaCarloUnitSpec, JavaIP} import name.lakhin.eliah.projects.papacarlo.syntax.Node import name.lakhin.eliah.projects.papacarlo.test.utils.ErrorMonitor import scala.collection.JavaConversions._ import java.io.File class javaip_codebase_test extends PapaCarloUnitSpec { de...
ftomassetti/JavaIncrementalParser
src/test/scala/javaip_codebase_test.scala
Scala
apache-2.0
4,069
/** * Copyright (C) 2009-2017 Lightbend Inc. <http://www.lightbend.com> */ package akka import akka.actor.ActorSystem import akka.actor.ExtendedActorSystem import akka.actor.Actor import akka.actor.Terminated import akka.actor.ActorLogging import akka.actor.Props import akka.actor.ActorRef import scala.util.control...
rorygraves/perf_tester
corpus/akka/akka-actor/src/main/scala/akka/Main.scala
Scala
apache-2.0
1,474
package com.nicta package rng import scalaz._, Scalaz._, Validation._, effect._ import Rng._ case class Balance(amount: Balance.ErrorMessage \\?/ Int) object Balance { type ErrorMessage = String val randomBalance = string(3) \\?/ positiveint map (Balance(_)) implicit val ShowBalance: Show[Balance] = ...
NICTA/rng
examples/src/main/scala/com/nicta/rng/Account.scala
Scala
bsd-3-clause
1,828
/* * Copyright 2015 Avira Operations 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 applicable law or agre...
Avira/sparser
core/src/main/scala/com/avira/ds/sparser/ParseResult.scala
Scala
apache-2.0
7,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 ...
pgandhi999/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/udaf.scala
Scala
apache-2.0
15,038
package uk.org.nbn.nbnv.importer.validation import uk.org.nbn.nbnv.importer.records.NbnRecord class Nbnv56Validator { def validate(record: NbnRecord) = { val validator = new NullFieldValidator validator.validate("NBNV-56", record.taxonVersionKey, "TaxonVersionKey") } }
JNCC-dev-team/nbn-importer
importer/src/main/scala/uk/org/nbn/nbnv/importer/validation/Nbnv56Validator.scala
Scala
apache-2.0
294
package com.github.ponkin.bloom import org.apache.commons.lang3.StringUtils import scala.util.Random import org.scalatest.FunSuite // scalastyle:ignore funsuite class PartitionedBloomFilterSuite extends FunSuite { // scalastyle:ignore funsuite private final val EPSILON = 0.01 private final val numItems = 100000 ...
ponkin/bloom
core/src/test/scala/com/github/ponkin/bloom/PartitionedBloomFilterSuite.scala
Scala
apache-2.0
2,501
/* Copyright 2011 Ben Biddington 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 d...
ben-biddington/Coriander.OAuth
test/org/coriander/unit/tests/OptionsCompanionTest.scala
Scala
apache-2.0
1,000
package gie.utils package object ImplicitPipe { implicit final class Pipe[T](val t:T) extends AnyVal{ @inline def |%>[X, U](f: X=>U)(implicit ev: T=>X) = f(t) @inline def |>[U](f: T=>U) = f(t) } }
igorge/ggdrive
src/main/scala/gie/utils/pipe.scala
Scala
gpl-2.0
211
package org.quantintel.ql.time.daycounters import org.scalatest.{FlatSpec, Matchers} /** * * Created by Paul Bernard on 8/2/14. * * 30/360 * * 30-day months, end of month adjustments * * 1. 01/31/94 - 03/16/94 * 2. 01/01/93 - 02/21/93 * 3. 02/01/93 - 03/01/93 * 4. 01/01/93 - 01/01/94 * 5. 01/01/93 -...
quantintel/spectrum
financial/src/test/scala/org/quantintel/ql/time/daycounters/Thirty360Test.scala
Scala
apache-2.0
10,374
package geek.lawsof.physics.lib.machine.metallic import geek.lawsof.physics.lib.block.te.TileEntityBase import geek.lawsof.physics.lib.materials.metals.MetalBlock /** * Created by anshuman on 23-07-2014. */ trait IMetallicMachine { self: TileEntityBase => def properties = { val block = coord.getBlockAt(worl...
GeckoTheGeek42/TheLawsOfPhysics
src/main/scala/geek/lawsof/physics/lib/machine/metallic/IMetallicMachine.scala
Scala
mit
433
/* * 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
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala
Scala
apache-2.0
91,863
/** * Copyright © 2012 Gustav van der Merwe * * 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 later version. * * This program i...
gvdm/proof-system
src/Syntax.scala
Scala
gpl-3.0
988
package org.jetbrains.plugins.scala.lang.typeConformance package generated class TypeConformanceCompoundTest extends TypeConformanceTestBase { //This class was generated by build script, please don't change this override def folderPath: String = super.folderPath + "compound/" def testAWithB() {doTest()} def ...
loskutov/intellij-scala
test/org/jetbrains/plugins/scala/lang/typeConformance/generated/TypeConformanceCompoundTest.scala
Scala
apache-2.0
1,079
/* * 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/controllers/responsiblepeople/address/TimeAtAdditionalExtraAddressController.scala
Scala
apache-2.0
4,648
/******************************************************************************* Copyright (c) 2012-2014, KAIST, S-Core. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. **********************************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/nodes_util/IRFactory.scala
Scala
bsd-3-clause
19,240
package rumms package impl import scutil.core.implicits.* import scutil.jdk.implicits.* import scutil.lang.* import scutil.log.* import scjson.ast.* import scjson.ast.JsonNavigation.* import scjson.codec.* import scjson.converter.* import scjson.converter.syntax.* import scwebapp.* import scwebapp.instances.* import...
ritschwumm/rumms
src/main/scala/rumms/impl/RummsHandler.scala
Scala
bsd-2-clause
8,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...
Digsolab/kafka
core/src/main/scala/kafka/consumer/SimpleConsumer.scala
Scala
apache-2.0
5,412
package recfun import org.scalatest.FunSuite import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class CountChangeSuite extends FunSuite { import Main.countChange test("countChange: example given in instructions") { assert(countChange(4,List(1,2)) === 3) }...
giovannidoni/Scala-course-1
week1/src/test/scala/recfun/CountChangeSuite.scala
Scala
gpl-3.0
647
package de.kaufhof.hajobs import java.util.UUID import play.api.Logger import play.api.libs.concurrent.Execution.Implicits.defaultContext import play.api.libs.json.Json.toJsFieldJsValueWrapper import play.api.libs.json._ import play.api.mvc._ import scala.concurrent.Future import scala.language.postfixOps import sca...
MarcoPriebe/ha-jobs
ha-jobs-play/src/main/scala/de/kaufhof/hajobs/JobsController.scala
Scala
apache-2.0
3,815
package name.abhijitsarkar.scauth.model case class TwitterUser(name: String, screenName: String, location: String, numFollowers: Long)
asarkar/akka
scauth/src/test/scala/name/abhijitsarkar/scauth/model/TwitterUser.scala
Scala
gpl-3.0
135
/* * Copyright 2015 Andrew Gibson * * 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 ...
andrewresearch/metacognitive_reflection
src/main/scala/net/andrewresearch/Data.scala
Scala
apache-2.0
3,447
/* sbt -- Simple Build Tool * Copyright 2008, 2009 Mark Harrah */ package sbt import jline.console.ConsoleReader import jline.console.history.{ FileHistory, MemoryHistory } import java.io.{ File, InputStream, PrintWriter } import complete.Parser import java.util.concurrent.atomic.AtomicBoolean abstract class JLine...
pdalpra/sbt
util/complete/src/main/scala/sbt/LineReader.scala
Scala
bsd-3-clause
4,765
package actors import akka.actor._ import akka.event.Logging import akka.routing.SmallestMailboxRouter import models._ trait NotificatorComponent{ this:ComponentSystem => val notificatorActorRef = system.actorOf(Props(new NotificatorActor).withRouter( SmallestMailboxRouter(nrOfInstances = 2))) class Not...
soulofpeace/FareHound
app/actors/NotificatorComponent.scala
Scala
apache-2.0
1,113
package chapter.twentyone import ExerciseSeven._ import org.scalatest._ import org.scalatest.junit.JUnitRunner import org.junit.runner.RunWith @RunWith(classOf[JUnitRunner]) class ExerciseSevenSpec extends FlatSpec with Matchers { "function" should "" in { } }
deekim/impatient-scala
src/test/scala/chapter/twentyone/ExerciseSevenSpec.scala
Scala
apache-2.0
269
package models.attribute import controllers.helper.GoogleMapsHelper import models.label._ import models.region.{Region, RegionTable} import models.street.{OsmWayStreetEdgeTable} import models.street.{StreetEdgeTable} import models.utils.MyPostgresDriver.simple._ import play.api.Play.current import play.api.db.slick im...
ProjectSidewalk/SidewalkWebpage
app/models/attribute/GlobalAttributeTable.scala
Scala
mit
14,403
/** * Encrypts and returns the input string using the famous BKK cryptographic method. * * @param input - String to be encoded. * @return The encoded string. */ object BKKCrypt { def encode(input: String): String = { input } }
moszinet/BKKCrypt
Scala/BKKCrypt.scala
Scala
mit
240
/** * Created by peter_v on 08/23/15. */ package csv import java.util.UUID import base._ import common._ import scala.io.BufferedSource object FactsReader { // reading from a CSV with structure (basic Fact, 10 fields, last field no newlines) // timestamp // uuid // context // subject // predicate ...
petervandenabeele/AllMyData
src/main/scala/csv/FactsReader.scala
Scala
mit
1,447
/* * Shapes.scala * (SysSon) * * Copyright (c) 2013-2017 Institute of Electronic Music and Acoustics, Graz. * Copyright (c) 2014-2019 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU General Public License v3+ * * * For further information, please contact Hanns Holger R...
iem-projects/sysson
src/main/scala/at/iem/sysson/gui/Shapes.scala
Scala
gpl-3.0
1,884
package recursion_analysis import def_finder.DefFinder import exceptions.ICE import tir._ object RecursionIdentifier { def hasRecursion(env: TTypeEnv, program: TProgram, name: TNamedIdent): Boolean = { val (_, funDef) = DefFinder.getSingleDefOrFail(env, program, name) hasRecursion(name, f...
j-c-w/mlc
src/main/scala/recursion_analysis/RecursionIdentifier.scala
Scala
gpl-3.0
446
package com.crobox.clickhouse.dsl.language import com.crobox.clickhouse.dsl._ trait IPFunctionTokenizer { self: ClickhouseTokenizerModule => def tokenizeIPFunction(col: IPFunction[_])(implicit ctx: TokenizeContext): String = col match { case IPv4NumToString(col: NumericCol[_]) => s"IPv4NumToString(${to...
crobox/clickhouse-scala-client
dsl/src/main/scala/com.crobox.clickhouse/dsl/language/IPFunctionTokenizer.scala
Scala
lgpl-3.0
777
/* sbt -- Simple Build Tool * Copyright 2009 Mark Harrah */ package xsbt.boot import Pre._ import java.io.File import java.net.URI import scala.collection.immutable.List object Find { def apply(config: LaunchConfiguration, currentDirectory: File) = (new Find(config))(currentDirectory) } class Find(config: LaunchCon...
olove/xsbt
launch/src/main/scala/xsbt/boot/Find.scala
Scala
bsd-3-clause
1,951
package com.danielwestheide.kontextfrei import scala.collection.immutable.Seq import scala.reflect.ClassTag private[kontextfrei] trait DCollectionConstructors[DCollection[_]] { def unit[A: ClassTag](as: Seq[A]): DCollection[A] def empty[A: ClassTag]: DCollection[A] }
dwestheide/kontextfrei
core/src/main/scala/com/danielwestheide/kontextfrei/DCollectionConstructors.scala
Scala
apache-2.0
274
package org.mozartoz.bootcompiler.fastparse import java.io.File import org.mozartoz.bootcompiler.fastparse.Tokens.PreprocessorDirective import org.mozartoz.bootcompiler.fastparse.Tokens.PreprocessorDirectiveWithArg import org.mozartoz.bootcompiler.fastparse.Tokens.Token import com.oracle.truffle.api.source.Source impo...
mistasse/mozart-graal
bootcompiler/src/main/scala/org/mozartoz/bootcompiler/fastparse/Preprocessor.scala
Scala
bsd-2-clause
4,217
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
tophua/spark1.52
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/DriverWrapper.scala
Scala
apache-2.0
1,994
package com.sksamuel.elastic4s.requests.searches.aggs import com.sksamuel.elastic4s.requests.searches.aggs.pipeline.PipelineAgg import com.sksamuel.elastic4s.ext.OptionImplicits._ case class VariableWidthAggregation(name: String, field: String, ...
sksamuel/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/VariableWidthAggregation.scala
Scala
apache-2.0
1,331
/* * 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/tools/scalasbt/NotASuite.scala
Scala
apache-2.0
786
package com.ebay.neutrino.config import java.net.InetSocketAddress import com.ebay.neutrino.PoolResolver import com.ebay.neutrino.config.Configuration._ import com.typesafe.config.Config import io.netty.channel.ChannelHandler import scala.concurrent.duration.Duration /** * An individual listener/port/transport tup...
eBay/Neutrino
src/main/scala/com/ebay/neutrino/config/ListenerAddress.scala
Scala
apache-2.0
3,232
/* * Copyright (c) 2014, Brook 'redattack34' Heisler * 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, t...
Redattack34/ModularRayguns
src/main/scala/com/castlebravostudios/rayguns/items/misc/RadiantDust.scala
Scala
bsd-3-clause
1,952
/** * algorithms-lab * * Copyright 2016 juanitodread * * 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...
juanitodread/algorithms-lab
algorithms-lab/scala/src/main/scala/org/juanitodread/algorithmslab/sorting/AbstractSort.scala
Scala
apache-2.0
1,218
/* * Copyright (C) 2014 - 2017 Contributors as noted in the AUTHORS.md file * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option)...
Tensei-Data/tensei-agent
src/test/scala/com/wegtam/tensei/agent/parsers/FileParsers/Email/EmailTest.scala
Scala
agpl-3.0
2,805
package com.cj.messagestreaming import org.scalatest.{FlatSpec, Matchers} import scala.concurrent.duration._ import scala.concurrent.{Await, Future} import scala.language.postfixOps class PublicationTest extends FlatSpec with Matchers { private implicit lazy val ec = scala.concurrent.ExecutionContext.Implicits.gl...
cjdev/message-streaming
src/test/scala/com/cj/messagestreaming/PublicationTest.scala
Scala
mit
5,067
/* * This file is part of eCobertura. * * Copyright (c) 2010 Joachim Hofer * All rights reserved. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/ep...
jmhofer/eCobertura
ecobertura.ui/src/main/scala/ecobertura/ui/launching/config/filters/IncludeExcludeClassesGroupBuilder.scala
Scala
epl-1.0
5,011
import org.apache.spark.SparkConf import org.apache.spark.SparkContext import org.apache.spark.rdd.RDD object Histogram{ def main(args:Array[String]){ val conf:SparkConf = new SparkConf().setAppName("Histogram").setMaster("local") val sc:SparkContext = new SparkContext(conf) val dataset1:RDD[String] = sc.textFi...
malli3131/SparkApps
histogram/Histogram.scala
Scala
apache-2.0
707
/* * 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/main/scala/org/apache/spark/scheduler/local/LocalBackend.scala
Scala
apache-2.0
4,585
/* * 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 ...
chbatey/killrweather
killrweather-app/src/main/scala/com/datastax/killrweather/WeatherStationActor.scala
Scala
apache-2.0
2,594
package io.vamp.pulse.notification import akka.actor.{ Actor, ActorSystem } import io.vamp.common.NamespaceProvider import io.vamp.common.akka.{ CommonActorLogging, IoC } import io.vamp.common.notification.{ ErrorNotification, Notification } import io.vamp.common.util.TextUtil import io.vamp.model.event.Event import i...
magneticio/vamp
pulse/src/main/scala/io/vamp/pulse/notification/PulseFailureNotifier.scala
Scala
apache-2.0
1,854
/** * Copyright 2011-2016 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...
thkluge/gatling
gatling-jms/src/main/scala/io/gatling/jms/request/JmsRequestBuilder.scala
Scala
apache-2.0
5,127
/*********************************************************************** * 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/iterators/AttributeIndexFilteringIteratorTest.scala
Scala
apache-2.0
5,383
/* * Copyright 2019 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...
nicf82/play-ui
src/main/scala/uk/gov/hmrc/play/binders/Origin.scala
Scala
apache-2.0
1,460
package circumflex package web import core._ import matchers._ import java.io.File import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.matchers.MustMatchers import org.scalatest._ class MockRouter extends Router { get("/") = "preved" post("/") = "preved from POST" get(...
inca/circumflex
web/src/test/scala/specs.scala
Scala
bsd-2-clause
5,672
package models.daoapriori.apriori import models.MyPostgresDriver.simple._ import models.DataRule.SetBarang import models.daoapriori.DBTableDefinitions._ import models.daoapriori.SupKonDAOSlick import play.api.db.slick._ import scala.concurrent.Future class SetBarangDAOSlick extends SetBarangDAO { import play.api.P...
ibnuda/hasembuh
app/models/daoapriori/apriori/SetBarangDAOSlick.scala
Scala
apache-2.0
2,635
package pep_075 object Wip { // http://en.wikipedia.org/wiki/Pythagorean_triple // a * a + b * b = c * c // p = a + b + c // p is always even // a < b < c // a < p / 3 def isPerimiterOfHowManyRightAngleTriangle(p: Int): Long = { if (p % 2 == 0) { val n = for { a <- 2 until p / 3 ...
filippovitale/pe
pe-solution/src/main/scala/pep_075/Wip.scala
Scala
mit
956
import org.apache.log4j.{Level, Logger} import org.apache.spark.graphx._ import org.apache.spark.graphx.util.GraphGenerators import org.apache.spark.rdd.RDD import org.apache.spark.{SparkConf, SparkContext} object KDD14_MRV03Dimitris { def main(args: Array[String]) = { Logger.getLogger("org").setLevel(Level.WAR...
anadim/clusterWild
src/main/scalaPre20150324/KDD14_MRV03Dimitris.scala
Scala
apache-2.0
5,166
/*********************************************************************** * 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/main/scala/org/locationtech/geomesa/utils/stats/StatSerializer.scala
Scala
apache-2.0
23,294
/** * Created by Roni A. Koitermaa on 24.11.2015. */ package Game import scala.collection.mutable class World { var areas = mutable.Buffer[Area]() var currentArea = 0 var player = new Player() var action = new Action() createNewArea("Forest", 0, "res/forest", "It's a forest") def createNewArea(name: ...
Ronin748/Herbert_Prelude
src/World.scala
Scala
gpl-2.0
562
package io.react2.scalata.translation import io.react2.scalata.generators.Generator /** * @author dbalduini */ sealed abstract class DataStructure { def name: String } case class Root(name: String, repeat: Int, fields: List[FieldGen]) extends DataStructure { override def toString: String = "Root fields: " + (f...
React2/scalata
src/main/scala/io/react2/scalata/translation/DataStructure.scala
Scala
apache-2.0
518
/* * 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 ...
ericvandenbergfb/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/SortMergeJoinExec.scala
Scala
apache-2.0
44,291
package com.olivergg.starttabs import scala.scalajs.js.JSConverters.array2JSRichGenTrav import scala.scalajs.js.JSApp import scala.scalajs.js.annotation.JSExport import com.greencatsoft.angularjs.Module import com.olivergg.starttabs.controller.DashController import com.olivergg.starttabs.controller.FriendsController i...
olivergg/scalajs-ionic-starttabs
app-js/src/main/scala/com/olivergg/starttabs/IonicStartTabsApp.scala
Scala
gpl-2.0
1,861
package domino.bundle_watching import org.osgi.framework.Bundle /** * Super class for bundle watcher events. The possible events are defined in the companion object. * * @param bundle Bundle affected by the state transition * @param context Additional event data */ abstract sealed class BundleWatcherEvent(bundle...
helgoboss/domino
src/main/scala/domino/bundle_watching/BundleWatcherEvent.scala
Scala
mit
1,017
package microtools.decorators import akka.actor.Scheduler import akka.pattern.after import microtools.BusinessTry import microtools.logging.{ContextAwareLogger, LoggingContext} import microtools.models.Problem import scala.concurrent.duration.FiniteDuration import scala.concurrent.{ExecutionContext, Future} import sc...
21re/play-micro-tools
src/main/scala/microtools/decorators/Retries.scala
Scala
mit
2,752
package scalaoauth2.provider import org.scalatest._ import org.scalatest.Matchers._ class AuthorizationCodeSpec extends FlatSpec { it should "handle request" in { val authorizationCode = new AuthorizationCode(new MockClientCredentialFetcher()) val request = AuthorizationRequest(Map(), Map("code" -> Seq("co...
centraldesktop/scala-oauth2-provider
scala-oauth2-core/src/test/scala/scalaoauth2/provider/AuthorizationCodeSpec.scala
Scala
mit
2,455
package pbdirect import shapeless.{:+:, CNil, Coproduct, Generic, Witness} object Enum { def values[T](implicit v: Values[T], ord: Ordering[T]): Seq[T] = v.apply.sorted def fromInt[T](index: Int)(implicit v: Values[T], ord: Ordering[T]): T = values.apply(index) def toInt[T](a: T)(implicit v: Values[T], ord: Ord...
btlines/pbdirect
shared/src/main/scala/pbdirect/Enum.scala
Scala
mit
932
import org.apache.spark._ import org.apache.spark.SparkContext._ import org.apache.spark.rdd.RDD import scala.io.Source._ import org.apache.spark.mllib.classification.{LogisticRegressionWithLBFGS, LogisticRegressionModel} import org.apache.spark.mllib.evaluation.MulticlassMetrics import org.apache.spark.mllib.evaluat...
bjvanov/sparkler
src/main/scala/QueryClassifier.scala
Scala
apache-2.0
2,822
import sys.process.Process import java.io.File val sqlDir = new File("./sql/") val host = "192.168.33.10" val user = "locest" val database = "locest" val password = System.console.readPassword("%s", "Password:").mkString("") println(password) sqlDir.listFiles.foreach { file => println(file) Process(s"psql -h ${h...
morikuni/locest
setup/area/scripts/exec_sql.scala
Scala
mit
416
package uk.gov.gds.location.importer.model /** * Representation of various enum style address base data types */ object CodeLists { object BlpuStateCode extends Enumeration { type BlpuStateCode = Value val underConstruction, inUse, unoccupied, noLongerExists, planningPermissionGranted = Value def for...
alphagov/location-data-importer
src/main/scala/uk/gov/gds/location/importer/model/CodeLists.scala
Scala
mit
2,716
/* * Copyright (C) 2014 Stratio (http://stratio.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
adelapena/cassandra-lucene-index
plugin/src/test/scala/com/stratio/cassandra/lucene/column/ColumnsTest.scala
Scala
apache-2.0
3,710
package im.actor.server import akka.actor.ActorSystem import com.amazonaws.auth.EnvironmentVariableCredentialsProvider import slick.driver.PostgresDriver.api.Database import im.actor.server.util.{ FileStorageAdapter, S3StorageAdapterConfig, S3StorageAdapter } trait ImplicitFileStorageAdapter { protected implicit v...
v2tmobile/actor-platform
actor-server/actor-tests/src/test/scala/im/actor/server/ImplicitFileStorageAdapter.scala
Scala
mit
666
/* * sbt * Copyright 2011 - 2018, Lightbend, Inc. * Copyright 2008 - 2010, Mark Harrah * Licensed under Apache License 2.0 (see LICENSE) */ package sbt package internal import Def._ /** * This trait injected to `Def` object to provide `sequential` functions for tasks. */ trait TaskSequential { def sequentia...
xuwei-k/xsbt
main/src/main/scala/sbt/internal/TaskSequential.scala
Scala
apache-2.0
20,819
/* * 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...
wangyixiaohuihui/spark2-annotation
mllib/src/test/scala/org/apache/spark/mllib/stat/KernelDensitySuite.scala
Scala
apache-2.0
2,171
package akka.persistence.pg.testkit import akka.persistence.CapabilityFlag import akka.persistence.journal.JournalSpec import akka.persistence.pg.journal.JournalTable import akka.persistence.pg.util.{CreateTables, RecreateSchema} import akka.persistence.pg.{PgConfig, PgExtension} import com.typesafe.config.ConfigFacto...
WegenenVerkeer/akka-persistence-postgresql
modules/akka-persistence-pg/src/test/scala/akka/persistence/pg/testkit/PgAsyncJournalSpec.scala
Scala
mit
1,316
/* * 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/SparkTC.scala
Scala
apache-2.0
2,554
package com.twitter.finagle.httpx import org.jboss.netty.handler.codec.http.{HttpHeaders, CookieDecoder => NettyCookieDecoder, CookieEncoder => NettyCookieEncoder} import scala.collection.mutable import scala.collection.JavaConverters._ /** * Adapt cookies of a Message to a mutable Map where cookies are indexed by...
LithiumTD/finagle
finagle-httpx/src/main/scala/com/twitter/finagle/httpx/CookieMap.scala
Scala
apache-2.0
3,451
package com.arcusys.learn.liferay.update.version250 import com.arcusys.learn.liferay.LiferayClasses.LUpgradeProcess import com.arcusys.learn.liferay.update.version250.slide.SlideTableComponent import com.arcusys.valamis.persistence.common.SlickDBInfo import com.arcusys.valamis.web.configuration.ioc.Configuration impor...
igor-borisov/valamis
learn-portlet/src/main/scala/com/arcusys/learn/liferay/update/version250/DBUpdater2419.scala
Scala
gpl-3.0
1,554
package skinny.controller import skinny.engine.SkinnyEngineFilter /** * SkinnyController as a Servlet for REST APIs. * * NOTICE: If you'd like to disable Set-Cookie header for session id, configure in web.xml */ trait SkinnyApiController extends SkinnyControllerBase with SkinnyEngineFilter
holycattle/skinny-framework
framework/src/main/scala/skinny/controller/SkinnyApiController.scala
Scala
mit
300
package so.eval.languages import so.eval.{ EvaluationRequest, SandboxedLanguage } case class C(evaluation: EvaluationRequest) extends SandboxedLanguage { val extension = "c" val allFiles = filename :: evaluation.files.map { _.keys.filter(f => f.endsWith(".c")).toList }.getOrElse(List()) override val compil...
eval-so/minibcs
src/main/scala/languages/C.scala
Scala
apache-2.0
402
/* - Coeus web framework ------------------------- * * Licensed under the Apache License, Version 2.0. * * Author: Spiros Tzavellas */ package com.tzavellas.coeus.core.config import scala.collection.mutable.{ Builder, ListBuffer } import com.tzavellas.coeus.core.interception._ /** * A trait to register <code>In...
sptz45/coeus
src/main/scala/com/tzavellas/coeus/core/config/InterceptorRegistry.scala
Scala
apache-2.0
928
package foo class Bar { } package object Bar { }
felixmulder/scala
test/pending/pos/t4695/T_2.scala
Scala
bsd-3-clause
50
/** * 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...
Chasego/kafka
core/src/main/scala/kafka/server/RaftReplicaChangeDelegate.scala
Scala
apache-2.0
12,671
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.3 * @date Sun May 17 15:07:22 EDT 2015 * @see LICENSE (MIT style license file) * Also see Oracle Copyright below * * Translated to Scala from MoleculeSampleApp * @see http...
NBKlepp/fda
scalation_1.3/scalation_modeling/src/main/scala/scalation/moleculesampleapp/MoleculeScalaApp.scala
Scala
mit
12,597
/* * File Plugin.scala is part of JsonRecipes. * JsonRecipes is opensource Minecraft mod(released under LGPLv3), created by anti344. * Full licence information can be found in LICENCE and LICENCE.LESSER files in jar-file of the mod. * Copyright © 2014, anti344 */ package net.anti344.jsonrecipes.plugins import ne...
mc-anti344/JsonRecipes
src/main/scala/net/anti344/jsonrecipes/plugins/Plugin.scala
Scala
gpl-3.0
792
package com.github.davidkellis.query // see https://github.com/antlr/grammars-v4/blob/master/sqlite/SQLite.g4:312 sealed trait Predicate { def or(op: Predicate): Predicate = Or(this, op) def and(op: Predicate): Predicate = And(this, op) } case class Eq(lhs: Expr, rhs: Expr) extends Predicate case class Neq(lhs: Ex...
davidkellis/query
src/main/scala/Query.scala
Scala
mit
3,743
/** ******************************************************************************************** * Testing * Version 0.1 * * The primary distribution site is * * http://scalavcs.alanrodas.com * * Copyright 2014 alanrodas * * Licensed under the Apache License, Version 2.0 (the "License"); you may not...
alanrodas/Fronttier
core/src/main/scala/com/alanrodas/fronttier/parsers/XmlAttrConfigParser.scala
Scala
apache-2.0
1,863
/** * 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-controller/src/main/scala/cmwell/ctrl/checkers/KafkaChecker.scala
Scala
apache-2.0
1,033
package org.pgscala.converters import scala.xml.Elem /** Do not edit - generated in Builder / PGElemConverterBuilder.scala */ object PGOptionElemConverter extends PGConverter[Option[Elem]] { val PGType = PGElemConverter.PGType def toPGString(oe: Option[Elem]): String = oe match { case None => nu...
melezov/pgscala
converters-scala/src/generated/scala/org/pgscala/converters/option/PGOptionElemConverter.scala
Scala
bsd-3-clause
559
package mesosphere.marathon.core.launchqueue.impl import mesosphere.marathon.Protos.MarathonTask import mesosphere.marathon.core.base.{ Clock, ShutdownHooks } import mesosphere.marathon.core.launchqueue.{ LaunchQueueConfig, LaunchQueueModule } import mesosphere.marathon.core.leadership.AlwaysElectedLeadershipModule im...
EasonYi/marathon
src/test/scala/mesosphere/marathon/core/launchqueue/impl/LaunchQueueModuleTest.scala
Scala
apache-2.0
7,565
package com.azavea.rasterfoundry import geotrellis.vector._ object TileMath { val TILE_DIM = 256 val BAND_COUNT = 3 def getUpperLeft(zoom: Int, col: Int, row: Int) = { val n = math.pow(2, zoom) val long = ((col / n) * 360.0) - 180.0 val lat = math.toDegrees(math.atan(math.sinh(math.Pi * (1 - 2 * ro...
kdeloach/raster-foundry-tiler
mosaic/src/main/scala/com/azavea/rasterfoundry/TileMath.scala
Scala
apache-2.0
555
/* * 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/compatibility-suite/src/test/scala/cypher/cucumber/db/DatabaseArchive.scala
Scala
apache-2.0
3,105
package me.lachlanap.oldtoby.server import me.lachlanap.oldtoby.server.helpers.{Generators, ServerInterface} import org.scalatest._ import org.scalatest.concurrent.ScalaFutures /** * Base test class for tests. */ abstract class UnitSpec extends FlatSpec with Matchers ...
thorinii/oldtoby-server
acceptance/src/test/scala/me/lachlanap/oldtoby/server/UnitSpec.scala
Scala
mit
1,016
/* * scala-swing (https://www.scala-lang.org) * * Copyright EPFL, Lightbend, Inc., contributors * * 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...
scala/scala-swing
examples/src/main/scala/scala/swing/examples/Dialogs.scala
Scala
apache-2.0
6,595
package codebook.runtime.server import akka.actor.{ActorRef, Props} import codebook.runtime.protocol.Decoder import codebook.runtime.test.AkkaTestkitSpecs2Support import org.specs2.mutable.Specification class ApiHandlerSetterTest extends Specification { object TestStates extends Enumeration { val Running = Valu...
RustyRaven/CodebookRuntime
scala/src/test/scala/codebook/runtime/server/ApiHandlerSetterTest.scala
Scala
mit
1,081
/* * Copyright (c) 2014 Paul Bernard * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
quantintel/spectrum
financial/src/main/scala/org/quantintel/ql/termstructures/AbstractTermStructure.scala
Scala
apache-2.0
3,375
package scala.in.programming.abstract_internal_control /** * Call by name paraemter. * Not ambiguous with named parameter. * * @author loustler * @since 02/26/2017 18:14 */ object ByNameParameter { val assertionEnabled: Boolean = true /** * This function use closure from field in this object. ...
loustler/scala
src/main/scala/scala/in/programming/abstract_internal_control/ByNameParameter.scala
Scala
mit
1,532
package ru.maizy.ambient7.mt8057agent.tests /** * Copyright (c) Nikita Kovaliov, maizy.ru, 2015-2017 * See LICENSE.txt for details. */ import java.text.SimpleDateFormat import java.util.Date import org.scalatest.{ FlatSpec, Matchers } import ru.maizy.ambient7.mt8057agent.{ Event, Writer } abstract class AbstractB...
maizy/ambient7
mt8057-agent/src/test/scala/ru/maizy/ambient7/mt8057agent/tests/AbstractBaseSpec.scala
Scala
apache-2.0
1,097
package java.util.regex import scala.language.implicitConversions import scala.annotation.switch import scala.scalajs.js final class Matcher private[regex] ( private var pattern0: Pattern, private var input0: CharSequence, private var regionStart0: Int, private var regionEnd0: Int) extends AnyRef with M...
matthughes/scala-js
javalib/src/main/scala/java/util/regex/Matcher.scala
Scala
bsd-3-clause
6,746
/** * 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/doperations/spark/wrappers/estimators/CreateKMeans.scala
Scala
apache-2.0
1,422
/* * 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 t...
davidbernick/zipkin
zipkin-hadoop/src/main/scala/com/twitter/zipkin/hadoop/WhaleReport.scala
Scala
apache-2.0
2,569
package io.getquill.context.jdbc.oracle import io.getquill.Spec class JdbcContextSpec extends Spec { import testContext._ val badEntity = quote { querySchema[TestEntity]("TestEntity", _.s -> "a", _.i -> "i", _.l -> "l", _.o -> "o") } "probes sqls" in { val p = testContext.probe("DELETE FROM TestEnt...
getquill/quill
quill-jdbc/src/test/scala/io/getquill/context/jdbc/oracle/JdbcContextSpec.scala
Scala
apache-2.0
3,700
package mesosphere.marathon.core.task.tracker.impl import akka.actor.{ Actor, ActorLogging, Cancellable, Props } import mesosphere.marathon.MarathonSchedulerDriverHolder import mesosphere.marathon.tasks.TaskTracker import mesosphere.mesos.protos.TaskID import scala.concurrent.duration._ private[tracker] object KillO...
MrMarvin/marathon
src/main/scala/mesosphere/marathon/core/task/tracker/impl/KillOverdueStagedTasksActor.scala
Scala
apache-2.0
1,430