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
import org.apache.spark.sql.{DataFrame, SparkSession} /** * Simple case class */ case class Tweet() class SparkAnalysis() { var session: SparkSession = null /** * Creates a Spark session * * @return SparkSession */ private def createSession(): SparkSession = { val session = SparkSessio...
Qathom/wsa-extract
src/main/scala/SparkAnalysis.scala
Scala
apache-2.0
4,209
/* * La Trobe University - Distributed Deep Learning System * Copyright 2014 Matthias Langer (t3l@threelights.de) * * 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.apa...
bashimao/ltudl
base/src/main/scala/edu/latrobe/kernels/Kernel4.scala
Scala
apache-2.0
22,379
/** * Copyright (C) 2015-2016 Philipp Haller */ package lacasa.neg import org.junit.runner.RunWith import org.junit.runners.JUnit4 import org.junit.Test import lacasa.util._ @RunWith(classOf[JUnit4]) class ControlThrowableSpec { @Test def test1() { println(s"ControlThrowableSpec.test1") expectError("pr...
phaller/lacasa
plugin/src/test/scala/lacasa/neg/ControlThrowable.scala
Scala
bsd-3-clause
1,725
/** * Copyright 2014 Dropbox, 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...
Bennyyyy/djinni
src/source/meta.scala
Scala
apache-2.0
2,703
class A { def m(x: Int, y: Int, z: Int, y: Int, t: Int) { } } object Main { def main(args: Array[String]) { } }
tobast/compil-petitscala
tests/typing/bad/testfile-multiple_parameters1-1.scala
Scala
gpl-3.0
116
import sbt._ import Keys._ import sbtrelease._ import com.typesafe.sbt.SbtSite.SiteKeys._ import com.typesafe.sbt.SbtGhPages.GhPagesKeys._ object Build extends Build { def executeTask(task: TaskKey[_], info: String): State => State = (st: State) => { st.log.info(info) val extracted = Project.extract(st) ...
derrickburns/generalized-kmeans-clustering
project/Build.scala
Scala
apache-2.0
629
/** Copyright 2015 TappingStone, 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 ...
adamharish/PredictionIO
core/src/main/scala/io/prediction/workflow/EngineServerPluginsActor.scala
Scala
apache-2.0
1,611
package com.twitter.finagle.client.utils import com.twitter.finagle.client.{StackClient, StdStackClient, Transporter} import com.twitter.finagle.dispatch.SerialClientDispatcher import com.twitter.finagle.netty4.Netty4Transporter import com.twitter.finagle.param.ProtocolLibrary import com.twitter.finagle.stats.NullStat...
twitter/finagle
finagle-core/src/test/scala/com/twitter/finagle/client/utils/StringClient.scala
Scala
apache-2.0
3,167
/* * Some of the traits, objects and classes are based on the source code from Functional Programming in Scala. * The original source code from Functional Programming in Scala can be found at https://github.com/fpinscala/fpinscala. * These code sections are copyrighted by Manning Publications, Co: * * * Copyright...
enil/fpis-exercises
src/main/scala/io/github/enil/chapter05/ch05.scala
Scala
mit
15,175
/** * */ package io.sipstack.application import akka.actor.Actor import akka.actor.Props import io.sipstack.netty.codec.sip.SipMessageEvent import akka.actor.ActorRef import akka.actor.Terminated import io.sipstack.transport.FlowActor.IncomingMessage import io.sipstack.transport.FlowActor.Message object Applicatio...
jonbo372/sipstack
sipstack-transaction/src/main/scala/io/sipstack/application/ApplicationSupervisor.scala
Scala
mit
1,032
package scala.meta.internal.semanticdb.javac import com.sun.source.tree.{ClassTree, CompilationUnitTree} import com.sun.source.util.{TaskEvent, TaskListener, TreePath, Trees} import java.nio.file.{Path, Paths} import javax.lang.model.element.TypeElement import javax.tools.JavaFileObject import scala.collection.mutable...
olafurpg/scalameta
semanticdb/javac/src/main/scala/scala/meta/internal/semanticdb/javac/SemanticdbListener.scala
Scala
bsd-3-clause
2,004
package fuel.func import fuel.util.Options import fuel.core.StatePop import fuel.util.Counter object Termination { object MaxTime { def apply(opt: Options): Any => Boolean = apply(opt.paramInt("maxTime", 86400000, _ > 0)) def apply(maxMillisec: Int): Any => Boolean = { val startTime = System.currentT...
kkrawiec/fuel
src/main/scala/fuel/func/Termination.scala
Scala
mit
1,258
package com.robot.command object CommandExecutor { def execute[T](item: T, commands: Seq[Command[T]]) = commands.foldLeft(item)((z, c) => c.execute(z)) }
ratheeshmohan/robotappscala
src/main/scala/com/robot/command/commandexecutor.scala
Scala
apache-2.0
179
package org.webant.worker import akka.actor._ import akka.routing.RoundRobinPool import org.apache.commons.lang3.StringUtils import org.apache.log4j.LogManager import org.webant.commons.entity.{HttpDataEntity, Link} import org.webant.worker.config.ConfigManager import org.webant.worker.http.HttpResponse sealed trait...
sutine/webant
webant-worker/src/main/scala/org/webant/worker/WorkerReactor.scala
Scala
apache-2.0
3,129
/** * 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"); yo...
gf53520/kafka
core/src/test/scala/unit/kafka/log/LogCleanerIntegrationTest.scala
Scala
apache-2.0
4,169
/* * Copyright (C) 2005, The Beangle Software. * * This program 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 * (at your option) any later version. * * This...
beangle/commons
core/src/test/scala/org/beangle/commons/lang/TypeTest.scala
Scala
lgpl-3.0
1,053
object Run extends App{ def funcionEjemplo() ={ println("Hola") } }
jaimeguzman/learning
test_list.scala
Scala
apache-2.0
81
/* * Copyright (c) 2009, Ken Faulkner * 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 conditions ...
kpfaulkner/farq
src/farq/utils/bulksetdata.scala
Scala
bsd-3-clause
2,467
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html /* * This file contains derivative works that require the following * header to be displayed: * * Copyright 2002-2014 EPFL. * Copyright 2011-2014 Typesafe, Inc. * All rights reserved. ...
VlachJosef/ensime-server
core/src/main/scala/org/ensime/core/DocFinding.scala
Scala
gpl-3.0
5,366
/* * 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...
hmrc/frontend-bootstrap
src/main/scala/uk/gov/hmrc/play/frontend/controller/Actions.scala
Scala
apache-2.0
2,455
package org.akoshterek.backgammon.nn.encog.activation import org.encog.engine.network.activation.ActivationFunction import org.encog.mathutil.BoundNumbers import org.encog.util.obj.ActivationUtil /** * Created by Alex on 20-05-17. */ @SerialVersionUID(1L) class ActivationSoftplus extends ActivationFunction { pr...
akoshterek/MultiGammonJava
multi-gammon-core/src/main/java/org/akoshterek/backgammon/nn/encog/activation/ActivationSoftplus.scala
Scala
gpl-3.0
1,171
package scala.reflect.internal import org.junit.Assert._ import org.junit.{After, Assert, Before, Test} import org.junit.runner.RunWith import org.junit.runners.JUnit4 import scala.collection.mutable import scala.tools.nsc.settings.ScalaVersion import scala.tools.nsc.symtab.SymbolTableForUnitTesting import language.hi...
martijnhoekstra/scala
test/junit/scala/reflect/internal/TypesTest.scala
Scala
apache-2.0
14,428
package com.insweat.hssd.lib.util.logging abstract class Handler(protected var _level: Int) extends FilteredObject { def level: Int = _level def level_=(l: Int): Unit = _level = l def handle(record: Record): Boolean = { val rv = filter(record) if(rv) { emit(record) ...
insweat/hssd
com.insweat.hssd.lib/src/com/insweat/hssd/lib/util/logging/Handler.scala
Scala
lgpl-3.0
1,212
package com.eevolution.context.dictionary.infrastructure.repository import java.util.UUID import com.eevolution.context.dictionary.domain._ import com.eevolution.context.dictionary.domain.model.ViewTrl import com.eevolution.context.dictionary.infrastructure.db.DbContext._ import com.eevolution.utils.PaginatedSequence...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/repository/ViewTrlRepository.scala
Scala
gpl-3.0
2,802
package controllers.your_income import org.specs2.mutable._ import utils.WithApplication class GStatutoryMaternityPaternityAdoptionPayFormSpec extends Specification { section ("unit", models.domain.StatutoryMaternityPaternityAdoptionPay.id) "Statutory Maternity Paternity Adoption Pay Form" should { val whoPay...
Department-for-Work-and-Pensions/ClaimCapture
c3/test/controllers/your_income/GStatutoryMaternityPaternityAdoptionPayFormSpec.scala
Scala
mit
3,787
package org.scaladebugger.api.profiles.java.info import com.sun.jdi._ import org.scaladebugger.api.profiles.traits.info._ import org.scaladebugger.api.virtualmachines.ScalaVirtualMachine import org.scaladebugger.test.helpers.ParallelMockFunSpec import org.scalamock.scalatest.MockFactory import org.scalatest.{FunSpec, ...
ensime/scala-debugger
scala-debugger-api/src/test/scala/org/scaladebugger/api/profiles/java/info/JavaValueInfoSpec.scala
Scala
apache-2.0
28,014
package com.pwootage.metroidprime.formats.dgrp import com.pwootage.metroidprime.formats.BinarySerializable import com.pwootage.metroidprime.formats.io.PrimeDataFile import com.pwootage.metroidprime.utils.DataTypeConversion class Resource extends BinarySerializable{ var typ: Int = -1 var id: Int = -1 override d...
Pwootage/prime-patcher
src/main/scala/com/pwootage/metroidprime/formats/dgrp/Resource.scala
Scala
gpl-3.0
605
package org.bste.euler.problems import org.bste.euler.Problem class P1_MultiplesThreeAndFive(limit: Int = 1000) extends Problem { val title = "Problem 1 - Multiples of 3 and 5" val description = """|If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. |The sum of the...
benjstephenson/upschema
src/main/scala/org/bste/euler/problems/P1_MultiplesThreeAndFive.scala
Scala
gpl-2.0
545
// Copyright 2017,2018,2019,2020 Commonwealth Bank of Australia // // 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 a...
CommBank/grimlock
grimlock-core/src/main/scala/commbank/grimlock/framework/Implicits.scala
Scala
apache-2.0
35,922
/* * Copyright 2016 okumin * * 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 wr...
okumin/influent
influent-java/src/test/scala/influent/internal/msgpack/MsgpackIncrementalUnpackerSpec.scala
Scala
apache-2.0
2,194
package org.hrscala.sbt import java.util.Properties object ProjectInformation { lazy val properties = { val tmp = new Properties() tmp.load(getClass.getResourceAsStream("project.properties")) tmp } lazy val version = properties.getProperty("version") lazy val buildDate = properties.getProperty("b...
HRScala/its-so-sbt
50-recursion/src/main/scala/org/hrscala/sbt/ProjectInformation.scala
Scala
unlicense
334
/* * Copyright (C) 2015 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...
Frannie-Ludmilla/sparta
plugins/src/main/scala/com/stratio/sparta/plugin/input/fileSystem/FileSystemInput.scala
Scala
apache-2.0
1,432
package org.jetbrains.plugins.scala package lang package psi package impl package expr import com.intellij.lang.ASTNode import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.psi.api.expr._ /** * Author: Alexander Podkhalyuzin * Date...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScCatchBlockImpl.scala
Scala
apache-2.0
816
package lang.lambdaref import name.Gensym import name.Identifier.ID import ref.{Declaration, RefGraph, Reference, Structural} case class App(e1: Exp, e2: Exp) extends Exp { override def retarget(retargeting: Map[Reference, Option[Declaration]]): Exp = App(e1.retarget(retargeting), e2.retarget(retargeting)) ...
seba--/hygienic-transformations
scala/src/main/scala/lang/lambdaref/App.scala
Scala
lgpl-3.0
937
/** * Copyright (c) 2013 Saddle 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.0 * * Unless required by applicable ...
jyt109/saddle
saddle-core/src/main/scala/org/saddle/Frame.scala
Scala
apache-2.0
64,094
import stainless.lang._ object ObjectParamMutation9 { case class A(var x: Int) def foo(y: Int, a: A): Unit = { a.x = y } def update(a: A): Unit = { foo(10, a) } ensuring(_ => a.x == 10) }
epfl-lara/stainless
frontends/benchmarks/imperative/valid/ObjectParamMutation9.scala
Scala
apache-2.0
211
package com.es.scala.chapter06 import org.specs2.mutable.Specification class SetTest6 extends Specification { "com.es.scala.chapter06.IntSet6" should { "verify that no element belongs to EmptySet" in { new EmptySet6().contains(1) must beFalse } "verify that correct elements belong to NonEmptySet" ...
elephantscale/learning-scala
ScalaByExample/src/test/scala/com/es/scala/chapter06/SetTest6.scala
Scala
apache-2.0
1,436
/* * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com> */ package play.core.server.common import play.api._ import play.api.mvc._ import play.api.http.HeaderNames._ import play.api.libs.iteratee._ import scala.concurrent.{ Future, Promise } object ServerResultUtils { /** Save allocation by caching ...
jyotikamboj/container
pf-framework/src/play-server/src/main/scala/play/core/server/common/ServerResultUtils.scala
Scala
mit
5,705
/* * JBoss, Home of Professional Open Source * Copyright 2010 Red Hat Inc. and/or its affiliates and other * contributors as indicated by the @author tags. All rights reserved. * See the copyright.txt in the distribution for a full listing of * individual contributors. * * This is free software; you can redistri...
nmldiegues/stibt
infinispan/server/core/src/test/scala/org/infinispan/server/core/AbstractProtocolServerTest.scala
Scala
apache-2.0
9,267
/* * 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 l...
MansurAshraf/storehaus
storehaus-kafka/src/main/scala/com/twitter/storehaus/kafka/package.scala
Scala
apache-2.0
879
package com.karasiq.shadowcloud.actors.utils import akka.actor.ActorRef sealed trait ActorState { def isActive: Boolean } object ActorState { final case class Active(dispatcher: ActorRef) extends ActorState { override def isActive: Boolean = true } case object Suspended extends ActorState { override ...
Karasiq/shadowcloud
utils/.jvm/src/main/scala/com/karasiq/shadowcloud/actors/utils/ActorState.scala
Scala
apache-2.0
549
/* * 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 ...
mike0sv/spark
core/src/main/scala/org/apache/spark/memory/UnifiedMemoryManager.scala
Scala
apache-2.0
10,490
/* * 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...
kapil-malik/incubator-toree
kernel/src/main/scala/org/apache/toree/kernel/api/DisplayMethods.scala
Scala
apache-2.0
2,195
package org.sisioh.aws4s.dynamodb.document import com.amazonaws.services.dynamodbv2.document.{ PrimaryKey, TableKeysAndAttributes } import org.sisioh.aws4s.PimpedType import scala.collection.JavaConverters._ object TableKeysAndAttributeFactory { def apply(tableName: String): TableKeysAndAttributes = new TableKeys...
everpeace/aws4s
aws4s-dynamodb/src/main/scala/org/sisioh/aws4s/dynamodb/document/RichTableKeysAndAttributes.scala
Scala
mit
1,089
package java.util.regex trait MatchResult { def groupCount(): Int def start(): Int def end(): Int def group(): String def start(group: Int): Int def end(group: Int): Int def group(group: Int): String }
jmnarloch/scala-js
javalib/src/main/scala/java/util/regex/MatchResult.scala
Scala
bsd-3-clause
219
import com.danielasfregola.twitter4s.TwitterRestClient import scala.concurrent.ExecutionContext.Implicits.global object RestExample extends App { // Make sure to define the following env variables: // TWITTER_CONSUMER_TOKEN_KEY and TWITTER_CONSUMER_TOKEN_SECRET // TWITTER_ACCESS_TOKEN_KEY and TWITTER_ACCESS_TO...
DanielaSfregola/twitter4s.g8
src/main/g8/src/main/scala/RestExample.scala
Scala
apache-2.0
506
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
dotty-staging/scalatest
scalatest/src/main/scala/org/scalatest/fixture/NoArg.scala
Scala
apache-2.0
9,536
/** * Generated by Scrooge * version: 4.7.0 * rev: d9d56174937f524a1981b38ebd6280eef7eeda4a * built at: 20160427-121531 */ package com.komanov.serialization.domain.thriftscala import com.twitter.scrooge.{ LazyTProtocol, TFieldBlob, ThriftException, ThriftStruct, ThriftStructCodec3, ThriftStructFieldInfo...
dkomanov/scala-serialization
scala-serialization/src/main/scala/com/komanov/serialization/domain/thriftscala/PageAddedPb.scala
Scala
mit
13,073
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.testsuite.javalib.util im...
scala-js/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/util/RandomTest.scala
Scala
apache-2.0
8,178
package com.datastax.spark.connector.rdd.partitioner import java.net.InetAddress import com.datastax.spark.connector.rdd.partitioner.dht.{CassandraNode, LongToken} import org.junit.Assert._ import org.junit.Test class TokenRangeClustererTest { type TokenRange = com.datastax.spark.connector.rdd.partitioner.dht.Tok...
brkyvz/spark-cassandra-connector
spark-cassandra-connector/src/test/scala/com/datastax/spark/connector/rdd/partitioner/TokenRangeClustererTest.scala
Scala
apache-2.0
4,167
package sttp.client3.curl import sttp.client3.curl.CurlApi.SlistHandle class CurlList(val ptr: SlistHandle) extends AnyVal {}
softwaremill/sttp
core/src/main/scalanative/sttp/client3/curl/CurlList.scala
Scala
apache-2.0
128
/* * 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 ...
holdenk/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/FileMetadataStructSuite.scala
Scala
apache-2.0
14,975
/* * Copyright (c) 2014-2020 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
alexandru/monifu
monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentAsyncSubjectSuite.scala
Scala
apache-2.0
3,971
package com.github.suzuki0keiichi.nomorescript.trees case class NoMoreScriptSelect(name: String, child: NoMoreScriptTree) extends NoMoreScriptTree { override def toJs(terminate: Boolean) = { val childJs = child.toJs(false) if (name == "<init>") { if (terminate) Util.addLast(childJs, ";") else childJs ...
suzuki0keiichi/nomorescript
nomorescript-plugin/src/main/scala/com/github/suzuki0keiichi/nomorescript/trees/NoMoreScriptSelect.scala
Scala
mit
497
package mesosphere.marathon package api.v2 import mesosphere.UnitTest import mesosphere.marathon.api.{ JsonTestHelper, TaskKiller, TestAuthFixture } import mesosphere.marathon.core.async.ExecutionContexts.global import mesosphere.marathon.core.group.GroupManager import mesosphere.marathon.core.health.HealthCheckManage...
janisz/marathon
src/test/scala/mesosphere/marathon/api/v2/SpecInstancesResourceTest.scala
Scala
apache-2.0
20,296
package com.jetyun.ansj import org.apache.spark.SparkConf import org.apache.spark.SparkContext import org.apache.spark.mllib.feature.HashingTF import org.apache.spark.mllib.feature.IDF import org.apache.spark.mllib.linalg.Vector import org.apache.spark.rdd.RDD object SimpleTFIDF { def main(args: Array[String]) {...
seraph115/ansj4s
src/main/scala-2.11/com/jetyun/ansj/SimpleTFIDF.scala
Scala
apache-2.0
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 ...
yu-iskw/gihyo-spark-book-example
src/test/scala/jp/gihyo/spark/ch03/pairrdd_action/CollectAsMapExampleSuite.scala
Scala
apache-2.0
1,035
package scala.slick.test.jdbc import scala.language.higherKinds import scala.slick.testutil._ import scala.slick.testutil.TestDBs._ import com.typesafe.slick.testkit.util.JdbcTestDB object ExecutorTest extends DBTestObject() class ExecutorTest(val tdb: JdbcTestDB) extends DBTest { import tdb.profile.backend.Databas...
dvinokurov/slick
slick-testkit/src/test/scala/scala/slick/test/jdbc/ExecutorTest.scala
Scala
bsd-2-clause
498
package xyztr /** * Represents an audio file */ case class AudioData(name: String, data: Array[Byte])
matshenricson/xyztr
src/main/scala/xyztr/AudioData.scala
Scala
gpl-3.0
107
package io.kaitai.struct.format import java.nio.charset.Charset import io.kaitai.struct.Utils import io.kaitai.struct.datatype.DataType import io.kaitai.struct.datatype.DataType._ import io.kaitai.struct.exprlang.Ast.expr import io.kaitai.struct.exprlang.{Ast, Expressions} import io.kaitai.struct.problems.KSYParseErro...
kaitai-io/kaitai_struct_compiler
shared/src/main/scala/io/kaitai/struct/format/AttrSpec.scala
Scala
gpl-3.0
10,063
/* * Copyright 2015 eleflow.com.br. * * 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 ...
eleflow/uberdata
iuberdata_core/src/main/scala/eleflow/uberdata/ForecastPredictor.scala
Scala
apache-2.0
23,526
package dotty.tools.dotc package transform import MegaPhase._ import core.DenotTransformers._ import core.Symbols._ import core.Contexts._ import core.Types._ import core.Flags._ import core.Decorators._ import core.NameKinds.LiftedTreeName import NonLocalReturns._ import util.Store /** Lifts try's that might be exec...
dotty-staging/dotty
compiler/src/dotty/tools/dotc/transform/LiftTry.scala
Scala
apache-2.0
3,210
/* NSC -- new Scala compiler * Copyright 2005-2013 LAMP/EPFL * @author Martin Odersky */ package dotty.tools.io import scala.language.unsafeNulls import java.io.{ IOException, InputStream, OutputStream, BufferedOutputStream, ByteArrayOutputStream } import java.net.URL import java.nio.file.{FileAlreadyExistsE...
dotty-staging/dotty
compiler/src/dotty/tools/io/AbstractFile.scala
Scala
apache-2.0
10,418
/* * Copyright (c) 2015 Alexandros Pappas p_alx hotmail 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 * * Unle...
gnostix/freeswitch-monitoring
src/main/scala/gr/gnostix/freeswitch/actors/CallRouter.scala
Scala
apache-2.0
7,554
package scala.meta package internal package quasiquotes import scala.compat.Platform.EOL import scala.language.experimental.macros import scala.reflect.macros.whitebox.Context import scala.meta.internal.trees.{Reflection => AstReflection} // NOTE: we don't have the signature as [O, I] to keep symmetry with Unlift obj...
scalameta/scalameta
scalameta/quasiquotes/shared/src/main/scala/scala/meta/internal/quasiquotes/ConversionMacros.scala
Scala
bsd-3-clause
3,499
package org.locationtech.geomesa.plugin import org.apache.wicket.behavior.SimpleAttributeModifier import org.apache.wicket.markup.html.form.{Form, FormComponent} import org.apache.wicket.markup.html.panel.Panel import org.apache.wicket.model.{IModel, ResourceModel} import org.geoserver.web.data.store.StoreEditPanel im...
mmatz-ccri/geomesa
geomesa-plugin/src/main/scala/org/locationtech/geomesa/plugin/GeoMesaStoreEditPanel.scala
Scala
apache-2.0
2,641
/* * Copyright (c) 2013-2014 Telefónica Investigación y Desarrollo S.A.U. * * 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 * * Unles...
telefonicaid/fiware-cosmos-platform
service-manager/src/main/scala/es/tid/cosmos/servicemanager/services/Service.scala
Scala
apache-2.0
1,781
import sbt._ import Keys._ import play.Project._ object ApplicationBuild extends Build { val appName = "websocket-chat" val appVersion = "1.0" val mandubianRepo = Seq( "Mandubian repository snapshots" at "https://github.com/mandubian/mandubian-mvn/raw/master/snapshots/", "Mandubian repository...
atrout/hackday-websocket-chat
samples/websocket-chat/project/Build.scala
Scala
apache-2.0
595
package io.jvm.uuid package bench import java.util.Locale import java.util.concurrent.TimeUnit import org.openjdk.jmh.annotations._ @State(Scope.Thread) @BenchmarkMode(Array(Mode.AverageTime)) @OutputTimeUnit(TimeUnit.NANOSECONDS) class ToStringBenchmark { var randomUUID: UUID = _ @Setup(Level.Invocation) def...
melezov/scala-uuid
bench/src/main/scala/io/jvm/uuid/bench/ToStringBenchmark.scala
Scala
bsd-3-clause
702
import scala.reflect.TypeTest object Test { def test[S, T](using TypeTest[S, T]): Unit = () val a: A = ??? test[Any, Any] test[Int, Int] test[Int, Any] test[String, Any] test[String, AnyRef] test[Any, Int] test[Any, String] test[Any, Some[_]] test[Any, Array[Int]] test[Seq[Int], List[Int]] ...
lampepfl/dotty
tests/neg-custom-args/fatal-warnings/type-test-syntesize.scala
Scala
apache-2.0
443
package scala.virtualization.lms package epfl package test5 import common._ import test1._ import java.io.PrintWriter import java.io.FileOutputStream trait JSGenFunctions extends JSGenEffect with BaseGenFunctions { import IR._ override def emitNode(sym: Sym[Any], rhs: Def[Any]) = rhs match { case Lambda(fun...
afernandez90/virtualization-lms-core
test-src/epfl/test5-js/TestFunctions.scala
Scala
bsd-3-clause
9,699
package com.equalinformation.carapi.scala.test /** * Created by bpupadhyaya on 3/27/17. */ class Test4 { //TODO clean up later }
bpupadhyaya/CodingChallenge
CarAPIV1/src/test/scala/com/equalinformation/carapi/scala/test/Test4.scala
Scala
mit
137
package controllers.s_self_employment import controllers.mappings.Mappings import org.specs2.mutable._ import utils.WithApplication class GAboutSelfEmploymentFormSpec extends Specification { section("unit", models.domain.SelfEmployment.id) "About Self Employment - About Self Employment Form" should { val type...
Department-for-Work-and-Pensions/ClaimCapture
c3/test/controllers/s_self_employment/GAboutSelfEmploymentFormSpec.scala
Scala
mit
1,903
/* * 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 ...
chenc10/Spark-PAF
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveShim.scala
Scala
apache-2.0
9,671
package foo class Foo extends Top(Bar.vvvv)
Kwestor/scala-ide
org.scala-ide.sdt.core.tests/test-workspace/find-references/super/src/foo/Foo.scala
Scala
bsd-3-clause
44
import scala.util.parsing.combinator.JavaTokenParsers class TestParsers extends JavaTokenParsers { /*start*/floatingPointNumber ^^ { _.toDouble }/*end*/ } //TestParsers.this.Parser[Double]
ilinum/intellij-scala
testdata/typeInference/bugs5/SCL3076.scala
Scala
apache-2.0
191
/* * Copyright 2013 - 2015, Daniel Krzywicki <daniel.krzywicki@agh.edu.pl> * * 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 limitation the rights ...
ros3n/IntOb
examples/src/main/scala/pl/edu/agh/scalamas/examples/EmasApp.scala
Scala
mit
1,631
package org.mrgeo.spark import com.esotericsoftware.kryo.io.{Input, Output} import com.esotericsoftware.kryo.{Kryo, Serializer} import org.mrgeo.data.raster.RasterWritable import org.mrgeo.utils.Bounds class Serializers { } class RasterWritableSerializer extends Serializer[RasterWritable] { override def write(kry...
tjkrell/MrGEO
mrgeo-core/src/main/scala/org/mrgeo/spark/Serializers.scala
Scala
apache-2.0
1,224
package system.s3upload import fly.play.s3.{BucketFilePart, BucketFilePartUploadTicket} import play.api.Logger import play.api.libs.iteratee.{Cont, Input, Iteratee, Done} import scala.concurrent.{Await, Future, ExecutionContext} import scala.concurrent.duration._ import scala.util.{Failure, Success} class MultipartU...
WiredThing/hither
app/system/s3upload/MultipartUploadIteratee.scala
Scala
mit
3,767
package org.cloudfun.framework.scheduler.single import _root_.org.cloudfun.framework.time.{Clock, Time} import org.cloudfun.framework.scheduler.{Task, Scheduler} import java.util.PriorityQueue /** * Simple single-threaded scheduler that can be advanced by calling an update function. * Useful for integrating in a r...
zzorn/cloudfun
src/main/scala/org/cloudfun/framework/scheduler/single/SingleThreadedScheduler.scala
Scala
lgpl-3.0
1,859
import java.io.{File} object PurchaseOrderTest extends TestBase { val inFile = new File("integration/src/test/resources/ipo.xsd") val usageFile = new File(tmp, "PurchaseOrderUsage.scala") copyFileFromResource("PurchaseOrderUsage.scala", usageFile) // override val module = new scalaxb.compiler.xsd.Driver wi...
justjoheinz/scalaxb
integration/src/test/scala/PurchaseOrderTest.scala
Scala
mit
819
package org.jetbrains.plugins.scala package lang package parser package parsing package top import com.intellij.psi.tree.IElementType import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.parser.parsing.base.Modifier import org.jetbrains.plugins.scala.lang.parser.parsing...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/parser/parsing/top/TmplDef.scala
Scala
apache-2.0
2,697
package com.featurefm.riversong.routes /** * Created by yardena on 1/4/16. */ trait RiverSongRouting { def routes: akka.http.scaladsl.server.Route }
ListnPlay/RiverSong
src/main/scala/com/featurefm/riversong/routes/RiverSongRouting.scala
Scala
mit
154
/* * Copyright 2017 Datamountaineer. * * 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...
datamountaineer/stream-reactor
kafka-connect-mongodb/src/test/scala/com/datamountaineer/streamreactor/connect/mongodb/sink/MongoWriterTest.scala
Scala
apache-2.0
27,094
package epic.framework import breeze.linalg._ import breeze.stats.distributions.Rand import scala.collection.mutable.ArrayBuffer import scala.collection.GenTraversableOnce import breeze.util.SerializableLogging /* class StructSVM[Datum](val model: Model[Datum], maxIter: Int = 100, ...
langkilde/epic
src/main/scala/epic/framework/StructSVM.scala
Scala
apache-2.0
5,155
/* * Copyright 2012 Comcast Cable Communications Management, 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 require...
Comcast/money
money-http-client/src/main/scala/com/comcast/money/http/client/HttpTraceConfig.scala
Scala
apache-2.0
993
/******************************************************************************* * Copyright (c) 2014 Łukasz Szpakowski. * * 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/MP...
luckboy/Purfuncor
src/main/scala/pl/luckboy/purfuncor/frontend/instant/BuiltinInstanceTree.scala
Scala
mpl-2.0
3,391
package blanky import blanky.domain.{SignUpUserDto, User} import spray.json.DefaultJsonProtocol object AppJsonProtocol extends DefaultJsonProtocol { implicit val userFormat = jsonFormat3(User) implicit val signUpUserDtoFormat = jsonFormat4(SignUpUserDto) }
vadim-shb/blanky
server/src/main/scala/blanky/AppJsonProtocol.scala
Scala
mit
264
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package docs.home.scaladsl.serialization.v1 //#add-optional case class ItemAdded(shoppingCartId: String, productId: String, quantity: Int) //#add-optional
rcavalcanti/lagom
docs/manual/scala/guide/cluster/code/docs/home/scaladsl/serialization/v1/ItemAdded.scala
Scala
apache-2.0
234
/* * Copyright (c) 2010-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 * * U...
GrahamLea/SodaTest
sodatest-runtime/src/test/scala/org/sodatest/runtime/processing/running/testFixtures/GoodTestFixture.scala
Scala
apache-2.0
865
package io.github.oxlade39.storrent.core import java.io.File import akka.util.ByteString import java.net.URI import scala.io.Source import java.security.MessageDigest import java.util.Date object Torrent { val extension = ".torrent" val mediaType = "application/x-bittorrent" val encoding = "ISO-8859-1" def...
oxlade39/STorrent
src/main/scala/io/github/oxlade39/storrent/core/Torrent.scala
Scala
apache-2.0
3,782
/* * Exposure.scala * (Eisenerz) * * Copyright (c) 2016 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU General Public License v2+ * * * For further information, please contact Hanns Holger Rutz at * contact@sciss.de */ package de.sciss.eisenerz import com.hopding...
Sciss/Eisenerz
exposure/src/main/scala/de/sciss/eisenerz/Exposure.scala
Scala
gpl-2.0
3,992
package notebook.client import java.io.File import akka.actor.{Actor, ActorRef, Props} import notebook.OutputTypes._ import notebook.PresentationCompiler import notebook.kernel._ import notebook.JobTracking import notebook.kernel.repl.common.ReplT import org.joda.time.LocalDateTime import com.datafellas.utils.{Custo...
antonkulaga/spark-notebook
modules/kernel/src/main/scala-2.10/notebook/ReplCalculator.scala
Scala
apache-2.0
15,000
/* * Copyright 2017 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...
pncampbell/ct-calculations
src/test/scala/uk/gov/hmrc/ct/computations/CPQ18Spec.scala
Scala
apache-2.0
11,808
package adtoyou.spark.streamming /** * Created by qiyu.wang on 2017/10/12. */ import java.util.Calendar import kafka.serializer.StringDecoder import org.apache.spark.SparkConf import org.apache.spark.sql.hive.HiveContext import org.apache.spark.streaming._ import org.apache.spark.streaming.kafka._ ...
7u/spark-learning
spark.learning/spark_test/src/main/scala/adtoyou/spark/streamming/ASOStreaming_1.scala
Scala
apache-2.0
5,887
object Solution { def gcd(x: Int, y: Int): Int = { // You only need to fill up this function // To return the value of the GCD of x and y if (x % y == 0) { return y } else if (y % x == 0) { return x } else if (x > y) { return gcd(y, x % y) ...
franklingu/HackerRank
functional-programming/recursion/computing-the-gcd/computing_the_gcd.scala
Scala
mit
765
package com.monsanto.stats.tables.clustering import com.monsanto.stats.tables.utils.ProfileUtils import scala.util.Random import scala.collection.parallel.immutable.ParVector import scala.annotation.elidable import elidable._ import ProfileUtils.time import scala.annotation.tailrec class CRP(params: ModelParams, all...
MonsantoCo/chinese-restaurant-process
src/main/scala/com/monsanto/stats/tables/clustering/CRP.scala
Scala
bsd-3-clause
27,762
package cmdreader.std import cmdreader.Command import types._ import run._ class Disassembly extends Command { override def getName(): String = "dsa" override def isValidArg0(n: Int): Boolean = n == 1 override def apply(args: Array[Type]): Type = { args(0) match { case f: TBinFunc => new TString(Disas...
bluebear94/bag
src/main/scala/cmdreader/std/Disassembly.scala
Scala
gpl-3.0
396
package com.twitter.finatra.http.benchmarks import com.twitter.inject.Test class FinagleRequestScopeBenchmarkTest extends Test { "test" in { val benchmark = new FinagleRequestScopeBenchmark() benchmark.timeServiceWithRequestScopeFilter() } }
syamantm/finatra
benchmarks/src/test/scala/com/twitter/finatra/http/benchmarks/FinagleRequestScopeBenchmarkTest.scala
Scala
apache-2.0
257
package glaux.interfaces.akka package service import akka.actor.{Props, Actor, ActorLogging} import Protocols.{Response, Confirmed} import glaux.interfaces.api.domain.{SessionId, ProfileId, Reading} import Protocols.Agent._ import glaux.interfaces.api.persistence.SessionPersistence import glaux.reinforcementlearning._...
typeAI/glaux
akka-interface-service/src/main/scala/glaux/interfaces.akka/service/AgentForUser.scala
Scala
apache-2.0
3,043