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 com.ticketfly.play.liquibase import java.io.StringWriter import javax.inject.Singleton import liquibase.integration.commandline.CommandLineUtils import liquibase.resource.{ClassLoaderResourceAccessor, FileSystemResourceAccessor} import liquibase.{Contexts, LabelExpression, Liquibase} import play.api._ import ...
davidschneider/play-liquibase
src/main/scala/com/ticketfly/play/liquibase/PlayLiquibaseModule.scala
Scala
mit
4,930
/** * Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com> */ package akka.actor.dungeon import akka.actor.{ Terminated, InternalActorRef, ActorRef, ActorRefScope, ActorCell, Actor, Address } import akka.dispatch.sysmsg.{ DeathWatchNotification, Watch, Unwatch } import akka.event.Logging.{ Warning, Error...
jmnarloch/akka.js
akka-js-actor/jvm/src/main/scala/akka/actor/dungeon/DeathWatch.scala
Scala
bsd-3-clause
8,943
// Copyright: 2010 - 2018 https://github.com/ensime/ensime-server/graphs // License: http://www.apache.org/licenses/LICENSE-2.0 package org.ensime.api import java.io.File /** * There should be exactly one `RpcResponseEnvelope` in response to an * `RpcRequestEnvelope`. If the `callId` is empty, the response is * an...
yyadavalli/ensime-server
api/src/main/scala/org/ensime/api/outgoing.scala
Scala
gpl-3.0
16,244
package com.basho.riak.stub import java.nio.channels.AsynchronousSocketChannel object SocketUtils { def clientConnectionAsStr(sock: AsynchronousSocketChannel): String = connectionAsStr(sock, isClient = true) def serverConnectionAsStr(sock: AsynchronousSocketChannel): String = connectionAsStr(sock, isClient = fa...
basho/spark-riak-connector
test-utils/src/main/scala/com/basho/riak/stub/SocketUtils.scala
Scala
apache-2.0
669
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
OpenPOWER-BigData/HDP-kafka
core/src/main/scala/kafka/client/ClientUtils.scala
Scala
apache-2.0
9,154
package skinny.micro.constant /** * Scheme. */ sealed trait Scheme /** * HTTP */ case object Http extends Scheme /** * HTTPS */ case object Https extends Scheme
xerial/skinny-micro
micro/src/main/scala/skinny/micro/constant/Scheme.scala
Scala
bsd-2-clause
171
package pureconfig.data import pureconfig.ConfigConvert import pureconfig.error.{ CannotConvert, ConfigValueLocation } final case class Percentage(value: Int) { def toDoubleFraction: Double = value.toDouble / 100D def toFloatFraction: Float = value.toFloat / 100f } object Percentage { private val failConfigRea...
derekmorr/pureconfig
core/src/test/scala/pureconfig/data/Percentage.scala
Scala
mpl-2.0
652
/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package viper.silicon.interfaces.state import viper.silver.ast import viper.silicon.{Set, Map} import viper.s...
sccblom/vercors
viper/silicon/src/main/scala/interfaces/state/State.scala
Scala
mpl-2.0
1,515
package inscala sealed abstract class FizzBuzzADT(i: Int) { override def toString: String = i.toString } object FizzBuzzADT { def apply(i: Int): FizzBuzzADT = i match { case _ if i % 3 == 0 && i % 5 == 0 => FizzBuzz(i) case _ if i % 3 == 0 => Fizz(i) case _ if i % 5 == 0 =>...
MonsantoCo/algebraic-datatypes
src/main/scala/inscala/FizzBuzzADT.scala
Scala
bsd-3-clause
1,588
package services import javax.inject.Inject import javax.inject.Singleton import java.util.Calendar import akka.actor._ import scala.concurrent.duration._ import scala.concurrent.ExecutionContext.Implicits.global import play.api.libs.mailer._ import play.api.db.DBApi import play.api.Logger import anorm._ @Singleto...
ruimo/blog
app/services/SpamCommentRemover.scala
Scala
apache-2.0
664
package com.github.florinn.veryfay import scala.util.Try import scala.reflect.runtime.universe.Type private[veryfay] class ActivityRegistry { private val registeredPermissions = scala.collection.mutable.Map.empty[(Class[_ <: Activity[_]], Type), ActivityPermissionListType] def add[T <: Activity[_]](activity: T, ...
florinn/veryfay-scala
src/main/scala/com/github/florinn/veryfay/ActivityRegistry.scala
Scala
mit
1,251
package io.github.facaiy.fp.scala.c13 import org.scalatest.FunSuite /** * Created by facai on 6/15/17. */ class TailRecSuite extends FunSuite { } object ExampleSuite { }
ningchi/book_notes
Manning_Functional_Programming_in_Scala/src/test/scala/io/github/facaiy/fp/scala/c13/TailRecSuite.scala
Scala
cc0-1.0
176
package org.bitcoins.core.protocol.transaction import org.bitcoins.core.number.UInt32 import org.bitcoins.core.protocol.script.{EmptyScriptSignature, ScriptSignature} import org.bitcoins.core.serializers.transaction.RawTransactionInputParser import org.bitcoins.crypto.{DoubleSha256DigestBE, Factory, NetworkElement} im...
bitcoin-s/bitcoin-s
core/src/main/scala/org/bitcoins/core/protocol/transaction/TransactionInput.scala
Scala
mit
3,049
package au.com.agiledigital.toolform.model /** * Groups together components that will be built by a single pass of a docker builder. */ final case class ComponentGroup(id: String, path: String, subPath: String, name: String, builder: String) extends ProjectElement {}
agiledigital/toolform
src/main/scala/au/com/agiledigital/toolform/model/ComponentGroup.scala
Scala
apache-2.0
273
package com.github.diegopacheco.akka.vendingmachine import akka.actor.typed.scaladsl.{AbstractBehavior, ActorContext, Behaviors} import akka.actor.typed.{ActorRef, Behavior} object Actors { def fmt(context: ActorContext[_]): String = s"[${context.self.path.name}] " } import Actors._ object VendingMachineActor { ...
diegopacheco/scala-playground
akka-vending-machine/src/main/scala/com/github/diegopacheco/akka/vendingmachine/Actors.scala
Scala
unlicense
3,082
package org.eobjects.analyzer.beans.transform import org.eobjects.analyzer.beans.api.Transformer import org.eobjects.analyzer.beans.api.TransformerBean import org.eobjects.analyzer.beans.api.Description import org.eobjects.analyzer.beans.api.Categorized import org.eobjects.analyzer.beans.categories.StringManipulationC...
datacleaner/AnalyzerBeans
components/basic-transformers/src/main/scala/org/eobjects/analyzer/beans/transform/RemoveUnwantedCharsTransformer.scala
Scala
lgpl-3.0
2,127
package se.gigurra.gpt.displaysreceiver class TripleBuffer[T]( val buffers: Array[T], var newFrame: Boolean) { private def swap(i1: Int, i2: Int) { val t = buffers(i1) buffers(i1) = buffers(i2) buffers(i2) = t } def getFrontBuffer(): T = { synchronized { ...
GiGurra/gpt
gpt-displaysreceiver/src/main/scala/se/gigurra/gpt/displaysreceiver/TripleBuffer.scala
Scala
gpl-2.0
803
/* * * o o o o o * | o | |\\ /| | / * | o-o o--o o-o oo | | O | oo o-o OO o-o o o * | | | | | | | | | | | | | | | | \\ | | \\ / * O---oo-o o--O | o-o o-o-o o o o-o-o o o o-o o * | ...
anskarl/LoMRF
src/test/scala/lomrf/mln/model/builders/EvidenceBuilderSpecTest.scala
Scala
apache-2.0
23,647
/* * 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 ...
hannesstockner/samza
samza-core/src/main/scala/org/apache/samza/coordinator/server/JobServlet.scala
Scala
apache-2.0
1,144
import sbt._ object Dependencies { val sprayVersion = "1.2.1" val akkaVersion = "2.2.4" val resolutionRepos = Seq( "spray repo" at "http://repo.spray.io/", "spray nighties" at "http://nightlies.spray.io/", "typesafe repo" at "http://repo.typesafe.com/typesafe/releases", "Sonatype Snapshots" a...
gilt/nozzle
project/Dependencies.scala
Scala
apache-2.0
3,559
/* * MultiDecisionImportance.scala * Multi-decisions that use Importance Sampling * * Created By: Brian Ruttenberg (bruttenberg@cra.com) * Creation Date: Oct 1, 2012 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email figaro@cra.com for information. ...
jyuhuan/figaro
Figaro/src/main/scala/com/cra/figaro/algorithm/decision/MultiDecisionImportance.scala
Scala
bsd-3-clause
1,669
package scala import org.junit.Assert._ import org.junit.Test import scala.tools.testkit.RunTesting class OptionTest extends RunTesting { @Test def testSomeZipSome(): Unit = assertEquals(Some("foo") zip Some("bar"), Some(("foo", "bar"))) @Test def testSomeZipNone(): Unit = assertEquals(Some("foo") zip None, None...
scala/scala
test/junit/scala/OptionTest.scala
Scala
apache-2.0
1,599
package model import scala.slick.driver.MySQLDriver.simple._ import scala.slick.ast.ColumnOption.{Default, NotNull} /** * CREATE TABLE IF NOT EXISTS `wordnet31_snapshot`.`linktypes` ( `linkid` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', `link` VARCHAR(50) NULL DEFAULT NULL, `recurses` TINYINT(1) NOT NULL DEFAULT ...
gaoyike/WordNet-Scala-Slick-Model
src/main/scala/model/linktypes.scala
Scala
bsd-2-clause
879
package io.scarman.spotify.response case class Playlist(collaborative: Boolean, external_urls: ExternalUrl, href: String, id: String, images: List[SharedImage], name: String, owner: User, ...
hntd187/spotify
core/shared/src/main/scala/io/scarman/spotify/response/Playlist.scala
Scala
apache-2.0
500
/* * Copyright 2015 Imply Data, 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 agree...
implydata/wikiticker
src/test/scala/io/imply/wikiticker/MessageTest.scala
Scala
apache-2.0
2,811
/* * 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 ...
h2oai/sparkling-water
ml/src/main/scala/ai/h2o/sparkling/ml/params/HasUserPoints.scala
Scala
apache-2.0
1,827
package org.hammerlab.guacamole /** * Step through loci in the genome and at each step consider all the reads (or any object that implements the trait * [[org.hammerlab.genomics.reference.Region]]) that overlap the locus. */ package object windowing {}
hammerlab/guacamole
src/main/scala/org/hammerlab/guacamole/windowing/package.scala
Scala
apache-2.0
257
/* * 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 ...
spark0001/spark2.1.1
mllib/src/main/scala/org/apache/spark/ml/regression/AFTSurvivalRegression.scala
Scala
apache-2.0
22,982
package edu.gemini.spModel.target.env import edu.gemini.shared.util.immutable.ImList import edu.gemini.shared.util.immutable.ScalaConverters._ import edu.gemini.spModel.core.{Angle, Declination, RightAscension} import edu.gemini.spModel.guide.{GuideProbeMap, GuideProbe} import edu.gemini.spModel.target.SPTarget import...
spakzad/ocs
bundle/edu.gemini.pot/src/test/scala/edu/gemini/spModel/target/env/Arbitraries.scala
Scala
bsd-3-clause
4,380
package delta.mongo import scala.reflect.{ClassTag, classTag} import org.bson._, codecs._ class JavaEnumCodec[E <: java.lang.Enum[E]]()(implicit tag: ClassTag[E]) extends Codec[E] { def this(cls: Class[E]) = this()(ClassTag.apply[E](cls)) val getEncoderClass = classTag[E].runtimeClass.asInstanceOf[Class[E]] ...
nilskp/delta
delta-mongodb/src/main/scala/delta/mongo/JavaEnumCodec.scala
Scala
mit
790
package com.github.mogproject.redismock import com.redis.{Redis, PubOperations} trait MockPubOperations extends PubOperations { self: Redis => override def publish(channel: String, msg: String): Option[Long] = throw new UnsupportedOperationException("pub operation is not supported") }
mogproject/scala-redis-mock
src/main/scala/com/github/mogproject/redismock/MockPubOperations.scala
Scala
apache-2.0
298
package org.powlab.jeye.decode.corrector import org.powlab.jeye.core.Opcodes.OPCODE_ATHROW import org.powlab.jeye.core.Opcodes.USCODE_CATCH import org.powlab.jeye.core.Opcodes.USCODE_FINALLY import org.powlab.jeye.core.Opcodes.USCODE_TRY import org.powlab.jeye.decode.graph.OpcodeNode import org.powlab.jeye.decode.grap...
powlab/jeye
src/main/scala/org/powlab/jeye/decode/corrector/TryCatchFinallyCorrector.scala
Scala
apache-2.0
7,828
package mesosphere.marathon package core.launchqueue.impl import java.time.Clock import java.util.concurrent.TimeUnit import com.typesafe.scalalogging.StrictLogging import mesosphere.marathon.state.{RunSpec, RunSpecConfigRef, Timestamp} import mesosphere.util.DurationToHumanReadable import scala.concurrent.duration....
mesosphere/marathon
src/main/scala/mesosphere/marathon/core/launchqueue/impl/RateLimiter.scala
Scala
apache-2.0
3,787
package twitch import java.util.Optional import common.api.PermissionLevel import common.api.PermissionLevel.PermissionLevel import common.components.DaoComponents import common.models.{CustomCommand, FilterSettings} import common.ref.MtrConfigRef import javax.inject.{Inject, Provider} import net.engio.mbassy.listene...
Cobbleopolis/MonsterTruckBot
modules/twitch/app/twitch/TwitchBotEventListener.scala
Scala
mit
11,921
package com.evecentral.datainput import akka.actor.Actor import akka.dispatch.{RequiresMessageQueue, BoundedMessageQueueSemantics} import com.evecentral.dataaccess.StaticProvider import com.evecentral.{Database, PoisonCache, OrderCacheActor} import com.evecentral.util.ActorNames import org.slf4j.LoggerFactory import ...
theatrus/eve-central.com
core/src/main/scala/com/evecentral/datainput/UploadActors.scala
Scala
agpl-3.0
4,373
object Test { def main(args: Array[String]): Unit = { val is = List(1,2,3) is match { case List(1, _*} => } } }
lrytz/scala
test/files/neg/t5702-neg-bad-brace.scala
Scala
apache-2.0
136
package com.github.ben_horner.go_serialization.sgf.model object Number { val signChars = Set('+', '-') } case class Number(number: String) extends PropValue { require(number.forall(c => c.isDigit || Number.signChars.contains(c)), "attempted to create Number(" + number + ")") val toInt = number.toInt def toSGF...
ben-horner/go-serialization
src/main/scala/com/github/ben_horner/go_serialization/sgf/model/Number.scala
Scala
apache-2.0
340
/* 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/tutorial/UsersGuide030Overview.scala
Scala
apache-2.0
38,092
/* * 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 ...
haowu80s/spark
mllib/src/test/scala/org/apache/spark/ml/feature/StringIndexerSuite.scala
Scala
apache-2.0
8,545
/* * 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 ...
ioana-delaney/spark
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/steps/DriverKubernetesCredentialsStep.scala
Scala
apache-2.0
9,713
/* * Copyright 2017-2020 Aleksey Fomkin * * 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...
fomkin/korolev
interop/akka/src/main/scala/korolev/akka/util/LoggingReporter.scala
Scala
apache-2.0
1,685
/** * Examples from Chapter 8: Optimization Algorithms */ package com.heatonresearch.aifh.examples.optimization
HairyFotr/aifh
vol1/scala-examples/src/main/scala/com/heatonresearch/aifh/examples/optimization/package.scala
Scala
apache-2.0
114
package hr.element.etb.img.geom case class Point(x: Int, y: Int) case class Dim(w: Int, h: Int) object Rect { def apply(p: Point, d: Dim): Rect = { Rect(p.x, p.y, d.w, d.h) } def apply(p1: Point, p2: Point): Rect = { val (sx, ex) = if (p1.x <= p2.x) { (p1.x, p2.x) } else { (p2.x, p1.x) ...
melezov/etb
img/src/main/scala/hr/element/etb/img/geom.scala
Scala
unlicense
703
/* * 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 ...
bravo-zhang/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkPlanner.scala
Scala
apache-2.0
4,844
package spire package algebra import java.math.BigInteger import spire.implicits._ import org.scalatest.FunSuite class NRootTest extends FunSuite { def testIntegralNRoot[A: Ring: NRoot: ClassTag]: Unit = { val cls = implicitly[ClassTag[A]].runtimeClass.getSimpleName test("Integral NRoot (%s)" format cls) ...
tixxit/spire
tests/src/test/scala/spire/algebra/NRootTest.scala
Scala
mit
1,871
/* * Created on 2010/05/13 * Copyright (c) 2010-2014, Wei-ju Wu. * 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, ...
weiju/zmpp2
zmpp-zcode/src/main/scala/org/zmpp/zcode/Encoding.scala
Scala
bsd-3-clause
12,958
import com.typesafe.tools.mima.core._ object Mima { val ignoredABIProblems: Seq[ProblemFilter] = { // After v0.5, start running mima checks in CI and document breaking changes here. // See https://github.com/typesafehub/migration-manager/wiki/sbt-plugin#basic-usage Seq( // Essentially, only org.sca...
olafurpg/scalafmt
project/Mima.scala
Scala
apache-2.0
702
package io.bartholomews.spotify4s.core.entities import io.bartholomews.iso_country.CountryCodeAlpha2 import sttp.model.Uri /** * https://developer.spotify.com/documentation/web-api/reference/object-model/#user-object-private * * @param country The country of the user, as set in the user’s account profile. ...
bartholomews/spotify-scala-client
modules/core/src/main/scala/io/bartholomews/spotify4s/core/entities/PrivateUser.scala
Scala
mit
2,057
package org.jetbrains.plugins.scala package annotator import com.intellij.psi.{PsiErrorElement, PsiReference} import org.intellij.lang.annotations.Language import org.jetbrains.plugins.scala.base.SimpleTestCase import org.jetbrains.plugins.scala.extensions._ import org.jetbrains.plugins.scala.lang.psi.ScalaPsiElement ...
jastice/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/annotator/AnnotatorTestBase.scala
Scala
apache-2.0
1,484
package com.twitter.finagle.netty4.ssl.server import com.twitter.finagle.Stack import com.twitter.finagle.netty4.ssl.Netty4SslTestComponents import com.twitter.finagle.param.{OppTls, Stats} import com.twitter.finagle.ssl.OpportunisticTls import com.twitter.finagle.stats.{InMemoryStatsReceiver, StatsReceiver} import co...
twitter/finagle
finagle-netty4/src/test/scala/com/twitter/finagle/netty4/ssl/server/Netty4TlsSnoopingHandlerTest.scala
Scala
apache-2.0
4,427
package defibrillator // Read inputs from System.in, Write outputs to use print. // Your class name has to be Solution import math._ object Solution { def main(args: Array[String]) { // Lecture Coordonnées val coordT = (toDouble(readLine), toDouble(readLine)) // Lecture nombre de défibrillateurs val...
bvaudour/codingame
level1/Defibrillators.scala
Scala
gpl-2.0
845
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
zzcclp/carbondata
integration/spark/src/main/scala/org/apache/carbondata/events/CarbonInitEvents.scala
Scala
apache-2.0
1,334
package testvariant import htsjdk.variant.variantcontext.Allele import org.scalatest.FunSuite import variant.VariantContextUtil class VariantContextUtilSuite extends FunSuite { test("Samples with allele") { // Correctly identifies samples with allele and excludes samples without allele assert(VariantContex...
pamelarussell/sgxlib
src/test/scala/testvariant/VariantContextUtilSuite.scala
Scala
mit
673
package com.megafrock.actors.routes import akka.actor._ import com.megafrock.actors.ValyxServiceActor import spray.http._ trait FallbackRoute { this: Actor with ActorLogging => val fallbackRoute: Receive = { case unmatchedRequest @ HttpRequest(_, _, _, _, _) => { log.warning("got request that wasn't ma...
maxdeliso/Valyx
src/main/scala/com/megafrock/actors/routes/FallbackRoute.scala
Scala
mit
471
package com.twitter.finagle.filter import com.twitter.finagle._ import com.twitter.finagle.stats.StatsReceiver object DtabStatsFilter { val role = Stack.Role("DtabStats") /** * Creates a [[com.twitter.finagle.Stackable]] [[com.twitter.finagle.filter.DtabStatsFilter]]. */ def module[Req, Rep]: Stackable[S...
travisbrown/finagle
finagle-core/src/main/scala/com/twitter/finagle/filter/DtabStatsFilter.scala
Scala
apache-2.0
1,190
package org.apache.spark.ml.parity.regression import org.apache.spark.ml.feature.{OneHotEncoderEstimator, StringIndexer, VectorAssembler} import org.apache.spark.ml.{Pipeline, Transformer} import org.apache.spark.ml.parity.SparkParityBase import org.apache.spark.ml.regression.GeneralizedLinearRegression import org.apa...
combust-ml/mleap
mleap-spark/src/test/scala/org/apache/spark/ml/parity/regression/GeneralizedLinearRegressionParitySpec.scala
Scala
apache-2.0
1,284
package yang.notification import akka.actor.{Actor, ActorRef, Props, Status} import com.nsn.oss.nbi.fm.notification.EnrichedNotificationDTO import com.nsn.oss.nbi.interfaces.AlarmNotificationFlow import org.scalatest.OneInstancePerTest import org.springframework.context.annotation.AnnotationConfigApplicationContext i...
wjingyao2008/firsttry
NextGenAct/src/test/scala/yang/notification/NotificationCoreModuleTest.scala
Scala
apache-2.0
4,428
package controllers import play.api.libs.json._ import play.api.mvc._ import play.api.data._ import play.api.data.Forms._ import play.i18n.Messages case class CreateClientForm(name: String, uri: String, blurb: String) case class CreateRedirectForm(uri: String) object DeveloperController extends Controller { val...
Blotre/blotre
app/controllers/DeveloperController.scala
Scala
mit
3,757
object varargspos { def g(a: Int, x: Int*) = a + x.length g(1, 2, 3, 4) val xs = 1 :: 2 :: Nil val a = 8 val b = 7 g(5, xs: _*) g(3, Nil: _*) g(a, xs: _*) g(a, b, 2, 3) g(1) }
som-snytt/dotty
tests/pos/varargs-position.scala
Scala
apache-2.0
196
package net.shift.common object Validator { def apply[A, Env, Err](f: Env => Validation[A, Err]) = new Validator[A, Env, Err] { def validate = f } def apply[A, Env, Err](v: => A) = new Validator[A, Env, Err] { def validate = env => Valid(v) } } trait Validator[A, Env, Err] { me => type ValidationR...
mariusdanciu/shift
shift-common/src/main/scala/net/shift/common/Validation.scala
Scala
apache-2.0
1,328
package cromwell.database.sql import cromwell.database.sql.tables.SubWorkflowStoreEntry import scala.concurrent.{ExecutionContext, Future} trait SubWorkflowStoreSqlDatabase { this: SqlDatabase => def addSubWorkflowStoreEntry(rootWorkflowExecutionUuid: String, parentWorkflowExecuti...
ohsu-comp-bio/cromwell
database/sql/src/main/scala/cromwell/database/sql/SubWorkflowStoreSqlDatabase.scala
Scala
bsd-3-clause
929
class AA { def foo: AA = new AA def b(): BB = new BB } class BB extends AA { override def foo = { z.b() } def z = foo /*start*/foo/*end*/ } //BB
ilinum/intellij-scala
testdata/typeInference/bugs5/SCL3414E.scala
Scala
apache-2.0
164
package synthesis object APASynthesisExamples { import APASynthesis._ def O(name: String) = OutputVar(name) def I(name: String) = InputVar(name) implicit def OutputVarToPACombination(o: OutputVar):APACombination = APACombination(o) implicit def InputVarToPACombination(i: InputVar):APACombination = APACombina...
epfl-lara/comfusy
src/main/scala/APASynthesisExamples.scala
Scala
bsd-2-clause
10,129
import leon.lang._ import leon.lang.synthesis._ object ChoosePos { def c1(x: BigInt): BigInt = choose { (y: BigInt) => y > x } }
epfl-lara/leon
testcases/synthesis/archives/ChoosePos.scala
Scala
gpl-3.0
135
package idv.brianhsu.maidroid.plurk.activity import android.content.Context import android.content.DialogInterface import android.content.Intent import android.os.Bundle import android.support.v7.app.ActionBarActivity import android.view.Menu import android.view.MenuItem import idv.brianhsu.maidroid.plurk._ import idv...
brianhsu/MaidroidPlurk
src/main/scala/activity/UserTimelineActivity.scala
Scala
gpl-3.0
5,959
package spark.streaming import akka.actor.Actor import akka.actor.IO import akka.actor.IOManager import akka.actor.Props import akka.util.ByteString import dstream.SparkFlumeEvent import java.net.{InetSocketAddress, SocketException, Socket, ServerSocket} import java.io.{File, BufferedWriter, OutputStreamWriter} impor...
pxgao/spark-0.7.3
streaming/src/test/scala/spark/streaming/InputStreamsSuite.scala
Scala
bsd-3-clause
11,954
package com.temportalist.weepingangels.common.entity.ai import java.util.Calendar import net.minecraft.command.IEntitySelector import net.minecraft.entity.monster.IMob import net.minecraft.entity.player.EntityPlayer import net.minecraft.entity.{EntityLiving, EntityCreature, EntityLivingBase} /** * Created by TheTem...
TheTemportalist/WeepingAngels
src/main/scala/com/temportalist/weepingangels/common/entity/ai/EntityAIAngelAttackTarget.scala
Scala
apache-2.0
1,377
/** * anagram matcher * @param word - initial word to match with possible anagrams */ class Anagram(val word: String) { def matches(anagrams: Seq[String]): Seq[String] = { anagrams.filter(anagram => { anagram.toLowerCase != word.toLowerCase && anagram.toLowerCase.toCharArray.sorted.mkString == w...
tomave/exercism-io-solutions
scala/anagram/src/main/scala/Anagram.scala
Scala
agpl-3.0
377
package edu.gemini.spModel.gemini.gsaoi import edu.gemini.spModel.data.config.{DefaultParameter, IParameter} import edu.gemini.spModel.gemini.gsaoi.Gsaoi._ import edu.gemini.spModel.gemini.gsaoi.Gsaoi.Filter._ import edu.gemini.spModel.gemini.seqcomp.SeqRepeatOffset import edu.gemini.spModel.guide.DefaultGuideOptions ...
arturog8m/ocs
bundle/edu.gemini.pot/src/test/scala/edu/gemini/spModel/gemini/gsaoi/PlannedTimeTest.scala
Scala
bsd-3-clause
5,444
/*********************************************************************** * Copyright (c) 2013-2022 Commonwealth Computer Research, Inc. * Portions Crown Copyright (c) 2016-2022 Dstl * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version...
locationtech/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/iterators/KryoVisibilityRowEncoder.scala
Scala
apache-2.0
10,287
/* * 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 ...
lvdongr/spark
core/src/test/scala/org/apache/spark/util/collection/PrimitiveKeyOpenHashMapSuite.scala
Scala
apache-2.0
3,967
package grasshopper.geocoder.model import feature.FeatureCollection case class GeocodeStats(total: Int, parsed: Int, points: Int, census: Int, geocoded: Int, fc: FeatureCollection)
hkeeler/grasshopper
geocoder/src/main/scala/grasshopper/geocoder/model/GeocodeStats.scala
Scala
cc0-1.0
183
package spire.algebra import scala.{specialized => spec} import java.lang.Double.{ isInfinite, isNaN, doubleToLongBits } import java.lang.Long.{ numberOfTrailingZeros } trait Field[@spec(Byte, Short, Int, Long, Float, Double) A] extends EuclideanRing[A] with MultiplicativeAbGroup[A] { /** * This is implemented...
lrytz/spire
core/src/main/scala/spire/algebra/Field.scala
Scala
mit
1,444
package helper import play.modules.reactivemongo.ReactiveMongoPlugin import play.modules.reactivemongo.json.collection.JSONCollection import reactivemongo.api.indexes.{IndexType, Index} import play.api.Play.current /** * Created by dermicha on 12/06/14. */ object MongoDB { val mongoDBConnection = ReactiveMongoPl...
indarium/hbbTVPlugin
app/helper/MongoDB.scala
Scala
agpl-3.0
535
package de.choffmeister.secpwd.utils import org.specs2.mutable._ import org.specs2.runner.JUnitRunner import org.junit.runner.RunWith import java.util.{UUID, Date} import java.io.{ByteArrayInputStream, ByteArrayOutputStream, EOFException} import de.choffmeister.securestring.SecureString @RunWith(classOf[JUnitRunner])...
choffmeister/secpwd
src/test/scala/de/choffmeister/secpwd/utils/BinaryReaderWriterSpec.scala
Scala
apache-2.0
7,717
package chat.tox.antox.fragments import android.content.{Intent, SharedPreferences} import android.os.{Build, Bundle} import android.preference.PreferenceManager import android.support.design.widget.NavigationView import android.support.design.widget.NavigationView.OnNavigationItemSelectedListener import android.suppo...
wiiam/Antox
app/src/main/scala/chat/tox/antox/fragments/MainDrawerFragment.scala
Scala
gpl-3.0
6,310
package com.oaksoft.utils.mongodb import org.mongodb.scala.model.Filters._ import com.oaksoft.utils.mongodb.MongoDBCollection._ import scala.collection.JavaConverters._ import scala.collection.JavaConversions._ import org.bson.conversions.Bson import com.oaksoft.utils.mongodb.ObsHelper._ object MongoDbTool{ def...
dscodeongit/oaksoftScala
OakUtils/src/main/scala/com/oaksoft/utils/mongodb/MongoDbTool.scala
Scala
mit
480
/* * 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 * distribut...
copygrinder/copygrinder_server
src/main/scala/org/copygrinder/impure/copybean/persistence/CopybeanPersistenceService.scala
Scala
apache-2.0
10,780
package ru.pravo.qa.gatling.remote import java.io.File import ru.pravo.qa.gatling.remote.GatlingRemoteKeys.{gatlingAkkaConfigFilePath, gatlingConfigFilePath, gatlingRemoteConfigFilePath, logbackConfigFilePath} import sbt.{Configuration, Def, Task} object ConfigurationFiles { def defaultConfigurationFiles(config: C...
Pravoru/gatling-remote-sbt
src/main/scala/ru/pravo/qa/gatling/remote/ConfigurationFiles.scala
Scala
mit
1,055
package spatial.codegen.pirgen import java.io.PrintWriter import java.nio.file.{Files, Paths} import argon.core._ import scala.collection.mutable class PIRStats(implicit val codegen:PIRCodegen) extends PIRTraversal { override val name = "PIR CU Stats" override val recurse = Always var IR = codegen.IR overr...
stanford-ppl/spatial-lang
spatial/core/src/spatial/codegen/pirgen/PIRStats.scala
Scala
mit
1,412
package org.jetbrains.plugins.scala.codeInsight.template.macros import com.intellij.codeInsight.CodeInsightBundle import com.intellij.codeInsight.template._ import com.intellij.psi.PsiClass import com.intellij.psi.util.PsiTreeUtil import org.jetbrains.plugins.scala.codeInsight.template.impl.ScalaCodeContextType import...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/codeInsight/template/macros/ScalaClassNameMacro.scala
Scala
apache-2.0
1,227
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
fusepoolP3/p3-silk
silk-workbench-outdated/src/main/scala/de/fuberlin/wiwiss/silk/workbench/learning/CurrentValidationLinks.scala
Scala
apache-2.0
784
package com.datastax.spark.connector.rdd.partitioner import java.net.InetAddress import Ordering.Implicits._ import com.datastax.spark.connector.rdd.partitioner.dht.{Token, TokenRange} import scala.annotation.tailrec /** Divides a set of token ranges into groups containing not more than `maxRowCountPerGroup` rows ...
debasish83/cassandra-driver-spark
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/rdd/partitioner/TokenRangeClusterer.scala
Scala
apache-2.0
2,711
package com.github.aoiroaoino.sandbox import scala.concurrent.Future import scalaz.{ContT, Cont} package object zookeeper { type WatcherCont[A] = ContT[Future, Unit, A] object WatcherCont { def apply[A](f: (A => Future[Unit]) => Future[Unit]): WatcherCont[A] = ContT.apply[Future, Unit, A](f) } }
aoiroaoino/sandbox
sample/zookeeper/src/main/scala/com/github/aoiroaoino/sandbox/zookeeper/package.scala
Scala
mit
317
/* * 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.fun...
scala-js/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/util/function/PredicateTest.scala
Scala
apache-2.0
2,750
/* 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...
hlin117/factorie
src/main/scala/cc/factorie/util/RWLock.scala
Scala
apache-2.0
1,397
/* * 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 ...
rodzyn0688/zipkin
zipkin-common/src/test/scala/com/twitter/zipkin/common/AnnotationSpec.scala
Scala
apache-2.0
1,352
/** * Created by ahan on 10/05/2017. */ /** * 1、重写一个非抽象方法必须使用override修饰符。 2、只有主构造函数才可以往基类的构造函数里写参数。 3、在子类中重写超类的抽象方法时,你不需要使用override关键字。 http://www.runoob.com/scala/scala-classes-objects.html * @param xc * @param yc */ class Point(val xc: Int, val yc: Int) { var x: Int = xc var y: Int = yc def...
AmeryHan/amery_base_java
scala/src/main/scala/advanced/Test.scala
Scala
apache-2.0
1,620
/** * Copyright (C) 2012 Orbeon, Inc. * * 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 * 2.1 of the License, or (at your option) any later version. * * This program is ...
martinluther/orbeon-forms
src/main/scala/org/orbeon/oxf/xforms/state/XFormsProtocols.scala
Scala
lgpl-2.1
10,106
package part3 import films.{Director, Film} object Exercise22Sorting { def filmsSortedByImdb(films: List[Film]): List[Film] = { ??? } def filmsByDirectorSortedByImdb(director: Director): List[Film] = { ??? } def filmsByAllDirectorsSortedByImdb(directors: List[Director]): List[Film] = { ??? }...
underscoreio/essential-scala-code
src/main/scala/part3/Exercise22Sorting.scala
Scala
apache-2.0
1,465
package haru.action import xitrum.annotation.CacheActionMinute import xitrum.annotation.POST import haru.dao.SchemaDao import xitrum.annotation.GET import xitrum.hazelcast.Cache @POST("data/class") class GetDataBrowserClasses extends Api2 { def execute() { val appid = param("appid") val classes = SchemaDao....
haruio/haru-admin
src/main/scala/haru/action/DatabrowserController.scala
Scala
mit
1,167
package com.itszuvalex.itszulib.core.traits.tile import com.itszuvalex.itszulib.api.core.Saveable import com.itszuvalex.itszulib.core.{BaseInventory, TileEntityBase} import net.minecraft.entity.player.EntityPlayer import net.minecraft.inventory.ISidedInventory import net.minecraft.item.ItemStack /** * Created by Chr...
BlockWorker/ItszuLib
src/main/scala/com/itszuvalex/itszulib/core/traits/tile/TileInventory.scala
Scala
gpl-2.0
1,921
/*** * Copyright 2014 Rackspace US, 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 applica...
rackerlabs/api-checker
core/src/test/scala/com/rackspace/com/papi/components/checker/handler/DelegationHandlerTest.scala
Scala
apache-2.0
2,982
package com.github.sonenko.elastichelper.migration import com.sksamuel.elastic4s.ElasticClient trait Migration { def migrate(client: ElasticClient): Unit }
sonenko/elastic-helper
helper/src/main/scala/com/github/sonenko/elastichelper/migration/Migration.scala
Scala
apache-2.0
160
package com.eevolution.context.dictionary.domain.api.service import com.eevolution.context.dictionary.api import com.eevolution.context.dictionary.domain.model.Form /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This program is free software: you can redistribute it and...
adempiere/ADReactiveSystem
dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/api/service/FormService.scala
Scala
gpl-3.0
1,196
package jp.co.cyberagent.aeromock.template.jade4j import jp.co.cyberagent.aeromock.test.SpecSupport import jp.co.cyberagent.aeromock.helper._ import org.specs2.mutable.{Tables, Specification} /** * * @author stormcat24 */ class Jade4jBootstrapSpec extends Specification with Tables with SpecSupport { "Jade4jBoot...
CyberAgent/aeromock
aeromock-jade4j/src/test/scala/jp/co/cyberagent/aeromock/template/jade4j/Jade4jBootstrapSpec.scala
Scala
mit
424
package com.rikmuld.camping.features.blocks.tent import com.rikmuld.corerm.network.packets.PacketBasic import net.minecraft.entity.player.EntityPlayer import net.minecraft.network.PacketBuffer import net.minecraft.util.math.BlockPos import net.minecraftforge.fml.common.network.simpleimpl.MessageContext class PacketSl...
Rikmuld/MC-Camping
scala/com/rikmuld/camping/features/blocks/tent/PacketSleepInTent.scala
Scala
gpl-3.0
848
package controllers.capp import play.api.mvc._ import play.api.data._ import play.api.data.Forms._ import views._ import controllers._ import loom.models._ import loom.models.app._ /** * * @author chaosky */ object Apps extends Controller with BaseController with Secured { def appsAndUser(ids: List[Long]): Lis...
chaosky/loom
app/controllers/capp/Apps.scala
Scala
mit
1,749
/* * 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 ...
WeichenXu123/spark
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesDriverBuilder.scala
Scala
apache-2.0
2,983
package org.scalawebtest.integration.aem import org.scalawebtest.aem.PageProperties import org.scalawebtest.core.gauge.HtmlGauge.fits import org.scalawebtest.integration.extensions.aem.AemModuleScalaWebTestBaseSpec import play.api.libs.json.{JsObject, JsValue} import dotty.xml.interpolator.* class FindByResourceTypeS...
unic/ScalaWebTest
scalawebtest-integration/src/it/scala/org/scalawebtest/integration/aem/FindByResourceTypeSpec.scala
Scala
apache-2.0
981