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 hulk.ratelimiting /** * Created by reweber on 31/01/2016 */ trait GlobalRateLimiting { def rateLimiter: RateLimiter }
reneweb/hulk
framework/src/main/scala/hulk/ratelimiting/GlobalRateLimiting.scala
Scala
apache-2.0
133
/*********************************************************************** * Copyright (c) 2013-2015 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 ...
drackaer/geomesa
geomesa-convert/geomesa-convert-text/src/test/scala/org/locationtech/geomesa/convert/text/CompositeTextConverterTest.scala
Scala
apache-2.0
3,238
package dao import javax.inject._ import dao.generic.GenericDaoImpl import scala.concurrent.Future import generated.Tables._ import play.api.db.slick.DatabaseConfigProvider import profile.api._ import scala.concurrent.ExecutionContext.Implicits.global @Singleton class CookieTokenSeriesDao @Inject()(protected val d...
bravegag/play-authenticate-usage-scala
app/dao/CookieTokenSeriesDao.scala
Scala
apache-2.0
1,771
package reactivemongo.api import scala.util.{ Failure, Success } import scala.concurrent.{ ExecutionContext, Future } import scala.concurrent.duration.{ FiniteDuration, SECONDS } import com.typesafe.config.Config import reactivemongo.core.nodeset.Authenticate /** * The asynchronous driver (see [[MongoConnection]]...
cchantep/ReactiveMongo
driver/src/main/scala/api/AsyncDriver.scala
Scala
apache-2.0
9,023
/* * Copyright (c) 2017 Magomed Abdurakhmanov, Hypertino * 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 com.hypertino.facade.filters.annotated impo...
hypertino/hyperfacade
src/main/scala/com/hypertino/facade/filters/annotated/SetFilterFactory.scala
Scala
mpl-2.0
1,745
/* Copyright (c) 2013-2016 Karol M. Stasiak 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 to use, copy, modify, merge, publish, distr...
KarolS/units
units/src/main/scala/io/github/karols/units/Information.scala
Scala
mit
11,809
package org.bitcoins.rpc.config import java.io.File import org.bitcoins.core.util.BitcoinSLogger import java.nio.file.Paths import org.bitcoins.core.config.TestNet3 import org.bitcoins.core.config.MainNet import org.bitcoins.core.config.RegTest import java.nio.file.Files import org.bitcoins.core.config.NetworkParamete...
bitcoin-s/bitcoin-s-core
bitcoind-rpc/src/main/scala/org/bitcoins/rpc/config/BitcoindAuthCredentials.scala
Scala
mit
3,090
package com.citypay.pan.search import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicInteger import com.citypay.pan.search.source.ScanSourceError import com.citypay.pan.search.util.Location import scala.collection.mutable import scala.collection.mutable.ListBuffer import scala.concurrent.dura...
citypay/citypay-pan-search
src/main/scala/com/citypay/pan/search/ScanReport.scala
Scala
mit
2,920
/* * Copyright 2013-, Björn Westlin (bwestlin at gmail dot com) - github: bwestlin * * 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 * * ...
bwestlin/su-lunch
app/Global.scala
Scala
apache-2.0
1,328
/** * Copyright (C) 2013 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 i...
brunobuzzi/orbeon-forms
xforms/jvm/src/main/scala/org/orbeon/oxf/xforms/function/xxforms/XXFormsAVTValue.scala
Scala
lgpl-2.1
1,698
/****************************************************************************** * Copyright (c) 2014, Equal Experts Ltd * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of ...
EqualExperts/Midas
src/main/scala/com/ee/midas/interceptor/BaseMongoHeader.scala
Scala
bsd-2-clause
3,954
/** * 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...
ryez/gatling
gatling-http/src/main/scala/io/gatling/http/action/sync/HttpRequestActionBuilder.scala
Scala
apache-2.0
1,423
package org.jetbrains.plugins.scala package testingSupport.test.scalatest import com.intellij.execution.configurations._ import com.intellij.openapi.project.Project import com.intellij.psi.search.ProjectScope import com.intellij.psi.{PsiClass, PsiModifier} import org.jetbrains.plugins.scala.extensions.{PsiElementExt, ...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/testingSupport/test/scalatest/ScalaTestRunConfiguration.scala
Scala
apache-2.0
3,884
/* * 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...
liquidarmour/ct-calculations
src/test/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC7100Spec.scala
Scala
apache-2.0
1,432
/** * 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...
chirino/activemq-apollo
apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Exit.scala
Scala
apache-2.0
1,262
/* * Copyright 2011-2022 GatlingCorp (https://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...
gatling/gatling
gatling-charts/src/main/scala/io/gatling/charts/component/Component.scala
Scala
apache-2.0
759
package org.vitrivr.adampro.query.distance import breeze.linalg.max import org.vitrivr.adampro.data.datatypes.vector.Vector._ import org.vitrivr.adampro.query.distance.Distance.Distance /** * adamtwo * * Ivan Giangreco * August 2015 */ object NormBasedDistance { def apply(n: Double) = n match { case x...
dbisUnibas/ADAMpro
src/main/scala/org/vitrivr/adampro/query/distance/NormBasedDistance.scala
Scala
mit
2,375
/* * 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 ...
zohar-mizrahi/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/batch/sql/CorrelateTest.scala
Scala
apache-2.0
7,404
package monocle import monocle.std.either.stdRight import monocle.function.Index.index final class CompositionGenericOpticsTest extends munit.FunSuite { test("compose with parametric optic") { val root = Iso.id[Either[String, Int]] compileErrors("root.andThen(stdRight)") root.andThen(stdRight[String, I...
julien-truffaut/Monocle
core/shared/src/test/scala/monocle/CompositionGenericOpticsTest.scala
Scala
mit
633
package entity import scala.language.implicitConversions /** * Samsara Aquarius * User row case class * * @author sczyh30 * @param uid user id * @param username username * @param password password of user * @param joinDate the join date * @param avatar avatar id * @param tips personal introduction...
sczyh30/samsara-aquarius
app/entity/User.scala
Scala
mit
1,109
/** * Copyright (C) 2016 Verizon. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
Verizon/trapezium
framework/src/main/scala/com/verizon/bda/trapezium/framework/kafka/KafkaSink.scala
Scala
apache-2.0
2,499
package com.danielasfregola.twitter4s.http.clients.rest.v2.users.deserialization.fixtures import com.danielasfregola.twitter4s.entities.v2.responses.UsersResponse import com.danielasfregola.twitter4s.entities.v2._ import java.time.Instant object UsersResponseFixture { val fixture: UsersResponse = UsersResponse( ...
DanielaSfregola/twitter4s
src/test/scala/com/danielasfregola/twitter4s/http/clients/rest/v2/users/deserialization/fixtures/UsersResponseFixture.scala
Scala
apache-2.0
5,255
package skinny.engine.async import javax.servlet.http.HttpServletRequest import skinny.engine.context.SkinnyEngineContext import scala.concurrent.duration.Duration import scala.concurrent.{ Await, Future, ExecutionContext } /** * Utility to build async operations. */ trait AsyncOperations { /** * Creates a ...
holycattle/skinny-framework
engine/src/main/scala/skinny/engine/async/AsyncOperations.scala
Scala
mit
1,524
package im.tox.antox.callbacks import android.content.Context import im.tox.antox.data.AntoxDB import im.tox.antox.tox.ToxSingleton import im.tox.antox.wrapper.AntoxFriend import im.tox.antox.wrapper.GroupPeer import im.tox.tox4j.core.callbacks.{GroupPeerJoinCallback, FriendNameCallback} import scala.None class Anto...
afkgeek/Antox
app/src/main/scala/im/tox/antox/callbacks/AntoxOnPeerJoinCallback.scala
Scala
gpl-3.0
607
package org.broadinstitute.clio.server.service import com.sksamuel.elastic4s.searches.queries.{BoolQuery, QueryStringQuery} import org.broadinstitute.clio.server.dataaccess.{PersistenceDAO, SearchDAO} import org.broadinstitute.clio.server.dataaccess.elasticsearch.ElasticsearchIndex import org.broadinstitute.clio.trans...
broadinstitute/clio
clio-server/src/test/scala/org/broadinstitute/clio/server/service/ArraysServiceSpec.scala
Scala
bsd-3-clause
1,966
package scalaxy.react package test import org.scalajs.dom import scala.scalajs.js import jsx._ // import org.scalajs.spickling.jsany._ // import org.scalajs.spickling._ // http://scala-js.github.io/scala-js-dom/ class JSXTest { def test { val props = Map("x" -> 10, "y" -> 12) val link = "http://goog.gl" ...
nativelibs4java/Scalaxy
Experiments/React/src/test/scala/JSXTest.scala
Scala
bsd-3-clause
508
package org.jetbrains.plugins.scala package lang package parser package parsing package xml.pattern import com.intellij.psi.xml.XmlTokenType import org.jetbrains.plugins.scala.lang.lexer.ScalaXmlTokenTypes import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder /** * @author Alexander Podkhalyu...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/parser/parsing/xml/pattern/ETagP.scala
Scala
apache-2.0
1,280
package wakfutcp.protocol.raw import wakfutcp.protocol.generic._ trait CharacterData extends RawData object CharacterData { final case class ActiveEquipmentSheet( index: Byte ) extends CharacterData final case class Appearance( sex: Byte, skinColorIndex: Byte, hairColorIndex: Byte, pupilCo...
OpenWakfu/wakfutcp
protocol/src/main/scala/wakfutcp/protocol/raw/CharacterData.scala
Scala
mit
16,610
/*********************************************************************** * 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-jobs/src/main/scala/org/locationtech/geomesa/jobs/JobUtils.scala
Scala
apache-2.0
1,540
// Copyright (C) 2016 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.core import scala.tools.nsc.interactive.Global /** * Type safety around Scala type names, scalac uses raw Strings. */ final class ScalaName(val underlying: String) extends ...
d1egoaz/ensime-sbt
src/sbt-test/sbt-ensime/ensime-server/core/src/main/scala/org/ensime/core/TypeToScalaName.scala
Scala
apache-2.0
2,377
package akka.persistence.hbase.common import com.twitter.util.Eval import javax.crypto.Cipher import javax.crypto.spec.SecretKeySpec import java.nio.ByteBuffer import akka.actor.{ Actor, ActorSystem } import akka.persistence.{ Persistent, PersistentRepr } import akka.serialization.{ SerializationExtension, Serializati...
hossx/akka-persistence-hbase
src/main/scala/akka/persistence/hbase/common/HBaseSerialization.scala
Scala
apache-2.0
2,755
/* * 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...
scalatest/scalatest
jvm/scalatest-test/src/test/scala/org/scalatest/fixture/TestDataFixtureSpec.scala
Scala
apache-2.0
1,426
package io.flow.lint.linters import io.flow.lint.Linter import io.apibuilder.spec.v0.models.{Method, Operation, Parameter, Resource, Service} /** * For well known parameters, enforce specific types, defaults, * minimums and maximums. Validates only GET operations. */ case object CommonParameterTypes extends Lin...
flowcommerce/api-lint
src/main/scala/io/flow/lint/linters/CommonParameterTypes.scala
Scala
mit
3,100
package helpers import scala.language.implicitConversions class UrlHelper(url: String) { def addParm(key: String, value: String): UrlHelper = new UrlHelper( url + (if (url.indexOf('?') != -1) '&' else '?') + key + '=' + value ) override def toString = url } object UrlHelper { implicit def fromString(fro...
ruimo/store2
test/helpers/UrlHelper.scala
Scala
apache-2.0
356
package spinoco.protocol.mgcp import shapeless.tag.@@ import spinoco.protocol.sdp.SessionDescription /** * MGCP Command Response */ case class MGCPResponse( code : MGCPResponseCode , txId : Int @@ MGCPTxId , packageName : Option[String] , responseString: Option[String] , params ...
Spinoco/protocol
mgcp/src/main/scala/spinoco/protocol/mgcp/MGCPResponse.scala
Scala
mit
395
package filodb.coordinator.client import scala.concurrent.duration._ import com.typesafe.scalalogging.StrictLogging import filodb.core._ import filodb.core.query.QueryContext import filodb.query.{LogicalPlan => LogicalPlan2, QueryResponse => QueryResponse2} trait QueryOps extends ClientBase with StrictLogging { i...
tuplejump/FiloDB
coordinator/src/main/scala/filodb.coordinator/client/QueryOps.scala
Scala
apache-2.0
3,018
/* * Copyright 2013 agwlvssainokuni * * 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...
agwlvssainokuni/lifelog
lifelog-admin/app/controllers/ActionBuilder.scala
Scala
apache-2.0
1,181
/* * 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 ...
1haodian/spark
core/src/main/scala/org/apache/spark/SparkContext.scala
Scala
apache-2.0
117,761
package naming.resolution import java.nio.file._ // Imports `Files` object Resolution { def gimmeFiles: Files = Files.list(Paths.get(".")) }
som-snytt/dotty
tests/pending/naming-resolution/callsite.scala
Scala
apache-2.0
145
/* * minitheta * a Scala library for doing symbolic computations with polynomials of Grassmann variables * * Author: Andrei Mikhailov <a.mkhlv@gmail.com> * * Copyright (C) 2012 * * This program is free software which I release under the GNU General Public * License. You may redistribute and/or modify this prog...
amkhlv/minitheta
com/andreimikhailov/minitheta/core/Matrices.scala
Scala
gpl-2.0
2,998
package com.evecentral.datainput import com.evecentral.dataaccess.StaticProvider import net.liftweb.json._ import org.joda.time.DateTime import org.joda.time.format.{ISODateTimeFormat} /** * Represents a single order upload message */ trait UploadMessage { def orders: Seq[UploadRecord] def typeId: Int def re...
theatrus/eve-central.com
core/src/main/scala/com/evecentral/datainput/UploadMessage.scala
Scala
agpl-3.0
6,044
package functional.exercises object Helpers { /** * Map Reduce Method For Product/Sum Simplification * @param f - Function To Apply * @param combine - Combine Function * @param zero - Zero value (Sum '0' vs Product '1') * @param a - Lower Bound * @param b - Upper Bound * @return */ def map...
iamchrismiller/scala-functional
src/main/scala/functional/exercises/Helpers.scala
Scala
mit
501
package com.example.http4s.blaze.demo.server import cats.data.OptionT import cats.effect._ import cats.syntax.semigroupk._ // For <+> import com.example.http4s.blaze.demo.server.endpoints._ import com.example.http4s.blaze.demo.server.endpoints.auth.{ BasicAuthHttpEndpoint, GitHubHttpEndpoint } import com.example.h...
aeons/http4s
examples/blaze/src/main/scala/com/example/http4s/blaze/demo/server/Module.scala
Scala
apache-2.0
2,057
package io.circe import scala.annotation.{ switch, tailrec } /** * A pretty-printer for JSON values. * * @author Travis Brown * @author Tony Morris * * @param indent The indentation to use if any format strings contain a new line. * @param lbraceLeft Spaces to insert to left of a left brace. * @param lbraceRi...
beni55/circe
core/shared/src/main/scala/io/circe/Printer.scala
Scala
apache-2.0
8,924
package net.kamekoopa.twitter_gazou_atsumeruyatsu import org.scalatest.FunSpec class HelloWorldSpec extends FunSpec { describe("Adding 1 to 1") { it("should equals 2"){ assert(1+1 == 2) } } }
kamekoopa/twitter_gazou_atsumeruyatsu
src/test/scala/HelloWorldSpec.scala
Scala
apache-2.0
213
package gh.test.gh2011.payload import gh2011.models.{GistEventPayload, IssuesEventPayload} import net.liftweb.json._ import org.scalatest.{FlatSpec, Matchers} class GistEventPayloadTest extends FlatSpec with Matchers { "A valid GistEvent payload" must "be correctly parsed" in { val json = parse( ""...
mgoeminne/github_etl
src/test/scala/gh/test/gh2011/payload/GistEventPayloadTest.scala
Scala
mit
775
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
WindCanDie/spark
mllib/src/main/scala/org/apache/spark/mllib/clustering/LDAModel.scala
Scala
apache-2.0
39,750
package com.twitter.finagle.integration import com.twitter.finagle.CancelledConnectionException import com.twitter.util.Await import org.jboss.netty.channel._ import org.mockito.ArgumentCaptor import org.scalatest.FunSuite import org.mockito.Mockito.{times, verify, when} import org.scalatest.junit.JUnitRunner import o...
JustinTulloss/finagle
finagle-core/src/test/scala/com/twitter/finagle/integration/CancellationTest.scala
Scala
apache-2.0
2,233
package io.github.hamsters import org.scalatest.{FlatSpec, Matchers} class ClazzSpec extends FlatSpec with Matchers { "Clazz.getSimpleName" should "works on case class" in { case class Foo(value : String) Clazz.getSimpleName[Foo] shouldBe "Foo" } "Clazz.getSimpleName" should "works on class" in { ...
scala-hamsters/hamsters
shared/src/test/scala/io/github/hamsters/ClazzSpec.scala
Scala
apache-2.0
524
package fuel.moves import fuel.util.TRandom abstract class VectorMoves[T](val numVars: Int)(rng: TRandom) extends AbstractVectorMoves[IndexedSeq[T]] { assert(numVars > 0) override def onePointCrossover = (p1: IndexedSeq[T], p2: IndexedSeq[T]) => { val cuttingPoint = rng.nextInt(numVars) val (myHead, ...
iwob/fuel
src/main/scala/fuel/moves/VectorMoves.scala
Scala
mit
893
package uk.gov.gds.ier.transaction.overseas.lastUkAddress import uk.gov.gds.ier.step.StepTemplate import uk.gov.gds.ier.transaction.overseas.{InprogressOverseas, WithOverseasControllers} trait LastUkAddressManualMustache extends StepTemplate[InprogressOverseas] { self: WithOverseasControllers => val title = "Wha...
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/transaction/overseas/lastUkAddress/LastUkAddressManualMustache.scala
Scala
mit
1,419
package controllers import play.api.mvc._ import shared.ChatMsg import play.api.libs.json.JsValue import org.scalajs.spickling._ import org.scalajs.spickling.playjson._ import play.api.libs.iteratee.{Enumeratee, Concurrent} import play.api.libs.EventSource import play.api.libs.concurrent.Execution.Implicits._ import I...
matthiasn/scalar-conf
scalajvm/app/controllers/ChatApplication.scala
Scala
apache-2.0
1,750
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/main/scala/org/neo4j/cypher/internal/compiler/v2_3/commands/expressions/Collect.scala
Scala
apache-2.0
1,432
class Simple { def addOne(x: Int) = x + 1 } val y = new Simple y.addOne(<caret>) //x: Int
ilinum/intellij-scala
testdata/parameterInfo/functionParameterInfo/simple/Simple.scala
Scala
apache-2.0
92
package net.itadinanta.rnkr.backend import net.itadinanta.rnkr.core.tree.Row import akka.actor.ActorRef import akka.pattern.pipe import akka.actor.Actor import scala.concurrent.Future import com.google.common.util.concurrent.Futures import com.google.common.util.concurrent.FutureCallback import scala.concurrent.Promis...
itadinanta/rnkr
rnkr-engine/src/main/scala/net/itadinanta/rnkr/backend/Storage.scala
Scala
gpl-2.0
4,945
package singleton.twoface import org.scalacheck.Properties import shapeless.test.illTyped import singleton.TestUtils._ import singleton.ops._ object CheckedLongSpec { object SmallerThan50 extends Checked0Param.Long { type Cond[T] = T < W.`50L`.T type Msg[T] = W.`"Failed Check"`.T } } class CheckedLongSpe...
soronpo/singleton-ops
src/test/scala/singleton/twoface/CheckedLongSpec.scala
Scala
apache-2.0
875
package memnets.utils import java.io._ /** * The <code>WavFile</code> class allows reading an audio file in WAVE format * The class extracts header information and provides it to the user in the * form of getters. * The class also allows to read the audio file frame by frame. * * The class supports 8, 16, 24 an...
MemoryNetworks/memnets
api/src/main/scala/memnets/utils/WavFile.scala
Scala
apache-2.0
15,610
package com.wavesplatform.database import com.google.common.primitives.{Ints, Longs} import com.wavesplatform.account.{Address, Alias} import com.wavesplatform.api.BlockMeta import com.wavesplatform.common.state.ByteStr import com.wavesplatform.common.utils.EitherExt2 import com.wavesplatform.database.protobuf.Transac...
wavesplatform/Waves
node/src/main/scala/com/wavesplatform/database/Keys.scala
Scala
mit
9,393
package controllers import javax.inject._ import play.api._ import play.api.mvc._ import play.api.data._ import play.api.data.Forms._ import scala.collection.mutable.Map case class Contato(nome: String, email: String, telefone: String) object Agenda { private var id = 0l private val contatos = Map[Long, Contato]...
lrlucena/webapp
exemplos/agenda/app/controllers/HomeController.scala
Scala
gpl-3.0
1,936
/* * Copyright 2013 Akiyoshi Sugiki, University of Tsukuba * * 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...
axi-sugiki/kumoi
src/kumoi/impl/os/HotMac.scala
Scala
apache-2.0
772
// P01 Find the last element of a list. // Predefined function def f0[T](list: List[T]): T = list.last // Tail recursion @annotation.tailrec def f1[T](list: List[T]): T = list match { case h :: Nil => h case _ :: t => f1(t) case _ => throw new NoSuchElementException("List is empty") } // Chained calls def f2[T...
pavelfatin/ninety-nine
scala/P01.scala
Scala
gpl-3.0
986
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
tkunicki/geomesa
geomesa-hbase/geomesa-hbase-tools/src/main/scala/org/locationtech/geomesa/hbase/tools/stats/HBaseStatsBoundsCommand.scala
Scala
apache-2.0
1,194
package edu.gemini.pit.ui.view.partner import edu.gemini.pit.model.Model import edu.gemini.pit.ui.util.gface.SimpleListViewer import edu.gemini.shared.gui.textComponent.TextRenderer import swing.BorderPanel.Position._ import swing.event.SelectionChanged import swing._ import Swing._ import scalaz._ import Scalaz._ im...
spakzad/ocs
bundle/edu.gemini.pit/src/main/scala/edu/gemini/pit/ui/view/partner/PartnerView.scala
Scala
bsd-3-clause
43,590
case class Log( timestamp: String, casename: String, entries: List[Entry] ) { def addEntry(timestamp: String, content: String): Log = this match { // initial case: return case Log( timestamp, casename, List(Entry("INIT", "INIT")) ) => Log(timestamp, casename, List(Entry(timestamp, ...
ckampfe/skipper
src/main/scala/Log.scala
Scala
mit
574
package org.mitre.mandolin.mselect import org.mitre.mandolin.mlp.MMLPFactor import org.mitre.mandolin.mlp.{MandolinMLPSettings, LType, SparseInputLType, InputLType, SoftMaxLType} import org.mitre.mandolin.mx.{MxModelSettings, MxNetSetup} import ml.dmlc.mxnet.{Uniform, Xavier, Context, Shape} import ml.dmlc.mxnet.opti...
project-mandolin/mandolin
mandolin-mx/src/main/scala/org/mitre/mandolin/mselect/MxLearnerFactory.scala
Scala
apache-2.0
7,014
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
wzhongyuan/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/nn/mkldnn/TopologySpec.scala
Scala
apache-2.0
34,363
package com.softwaremill.codebrag.cache import com.softwaremill.codebrag.domain.CommitLike import org.joda.time.DateTime case class BranchCommitCacheEntry(sha: String, authorName: String, authorEmail: String, commitDate: DateTime) object BranchCommitCacheEntry { implicit object CommitLikeCommitCacheEntry extends ...
frodejohansen/codebrag
codebrag-service/src/main/scala/com/softwaremill/codebrag/cache/BranchCommitCacheEntry.scala
Scala
agpl-3.0
524
/* * Copyright 2019 Frugal Mechanic (http://frugalmechanic.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...
frugalmechanic/fm-common
jvm/src/main/scala/fm/common/SevenZipUtils.scala
Scala
apache-2.0
5,243
package org.template.similarproduct import io.prediction.controller.PDataSource import io.prediction.controller.EmptyEvaluationInfo import io.prediction.controller.EmptyActualResult import io.prediction.controller.Params import io.prediction.data.storage.Event import io.prediction.data.storage.Storage import org.apac...
ch33hau/PredictionIO
examples/scala-parallel-similarproduct/add-rateevent/src/main/scala/DataSource.scala
Scala
apache-2.0
3,569
package dk.bayes.clustergraph.infer import org.junit._ import org.junit.Assert._ import dk.bayes.clustergraph.testutil._ import dk.bayes.clustergraph.testutil.AssertUtil._ import dk.bayes.clustergraph.testutil.SprinklerBN._ import Double._ import dk.bayes.clustergraph.factor.Factor import dk.bayes.clustergraph.infer.L...
danielkorzekwa/bayes-scala
src/test/scala/dk/bayes/clustergraph/infer/LoopyBPSprinklerTest.scala
Scala
bsd-2-clause
3,223
package mesosphere.marathon.core.launcher.impl import com.codahale.metrics.MetricRegistry import mesosphere.marathon.core.base.ConstantClock import mesosphere.marathon.core.launcher.{ TaskOp, OfferProcessor, OfferProcessorConfig, TaskLauncher } import mesosphere.marathon.core.matcher.base.OfferMatcher import mesospher...
yp-engineering/marathon
src/test/scala/mesosphere/marathon/core/launcher/impl/OfferProcessorImplTest.scala
Scala
apache-2.0
12,229
/** * License * ======= * * The MIT License (MIT) * * * Copyright (c) 2017 Antoine DOERAENE @sherpal * * 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 restrictio...
sherpal/scalajs-ui
src/main/scala/webglgraphics/Quad.scala
Scala
mit
1,357
/* * Copyright 2020 Spotify AB. * * 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 ...
regadas/scio
scio-parquet/src/main/scala/com/spotify/scio/parquet/tensorflow/ParquetExampleIO.scala
Scala
apache-2.0
5,330
package com.wavesplatform.lang import cats.kernel.Monoid import com.wavesplatform.common.utils._ import com.wavesplatform.lang.Common.multiplierFunction import com.wavesplatform.lang.directives.DirectiveSet import com.wavesplatform.lang.directives.values._ import com.wavesplatform.lang.v1.CTX import com.wavesplatform....
wavesplatform/Waves
lang/tests/src/test/scala/com/wavesplatform/lang/compiler/package.scala
Scala
mit
2,865
package cz.kamenitxan.jakon.webui.controller.impl import cz.kamenitxan.jakon.core.model.JakonUser import cz.kamenitxan.jakon.utils.{PageContext, Utils} import cz.kamenitxan.jakon.webui.Context import cz.kamenitxan.jakon.webui.conform.FieldConformer import cz.kamenitxan.jakon.webui.conform.FieldConformer._ import spark...
kamenitxan/Jakon
modules/backend/src/main/scala/cz/kamenitxan/jakon/webui/controller/impl/UserController.scala
Scala
bsd-3-clause
2,218
/*********************************************************************** * Copyright (c) 2013-2015 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 ...
giserh/geomesa
geomesa-compute/src/test/scala/org/locationtech/geomesa/compute/spark/GeoMesaSparkTest.scala
Scala
apache-2.0
5,760
package models.twitter import play.api.libs.functional.syntax._ import play.api.libs.json.{Reads, __} /** * Copyright (c) 2017 A. Roberto Fischer * * @author A. Roberto Fischer <a.robertofischer@gmail.com> on 5/2/2017 */ case class Symbol(text: String, startIndex: Int, endI...
Queendimimi/twitter_extractor
app/models/twitter/Symbol.scala
Scala
apache-2.0
536
package scavlink.link.command import scavlink.link._ import scavlink.link.command.CommandTestData.CommandResponses import akka.actor.Actor import scala.concurrent.duration.FiniteDuration /** * Treats the Command response handler as the only receive handler for an actor. */ trait CommandProtocolOnly extends MockCom...
nickolasrossi/scavlink
src/test/scala/scavlink/link/command/CommandResponders.scala
Scala
mit
1,708
/*********************************************************************** * 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 ...
mdzimmerman/geomesa
geomesa-features/geomesa-feature-kryo/src/main/scala/org/locationtech/geomesa/features/kryo/serialization/SimpleFeatureSerializer.scala
Scala
apache-2.0
6,166
package org.apache.spark.sql.execution import org.scalatest.FlatSpec import org.apache.spark.sql.catalyst.expressions.GenericRow import org.apache.spark.sql.Row import org.apache.spark.sql.catalyst.expressions.BoundReference import org.apache.spark.sql.types.IntegerType import org.apache.spark.sql.catalyst.expressions...
hvanhovell/spark-window
src/test/scala/org/apache/spark/sql/execution/WindowFunctionTests.scala
Scala
apache-2.0
2,879
/** * Copyright 2012 Jeffrey Cameron * * 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...
picklesdoc/pickles-jvm
core/src/main/scala/org/pickles/features/builder/StepBuilder.scala
Scala
apache-2.0
1,381
package com.github.chengpohi.config import java.util.Base64 import com.github.chengpohi.model.User import com.typesafe.config.{Config, ConfigFactory} import scala.collection.JavaConverters._ /** * fc * Created by chengpohi on 8/14/16. */ object Config { private[this] val loadConfig: Config = ConfigFactory.l...
chengpohi/secer
fb/src/main/scala/com/github/chengpohi/config/Config.scala
Scala
apache-2.0
584
/* * Copyright (c) 2013, Scodec * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions a...
scodec/scodec
shared/src/main/scala/scodec/codecs/FixedSizeStrictCodec.scala
Scala
bsd-3-clause
2,445
/* * Copyright (c) 2014-2018 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
Wogan/monix
monix-execution/shared/src/main/scala/monix/execution/internal/collection/DropHeadOnOverflowQueue.scala
Scala
apache-2.0
6,393
import org.scalatest.FeatureSpec import org.scalatest.GivenWhenThen import scala.collection.mutable.Stack class ExampleSpec extends FeatureSpec with GivenWhenThen { feature("The user can pop an element off the top of the stack") { info("As a programmer") info("I want to be able to pop items off the stac...
diegopacheco/scala-playground
scala-test/ExampleSuite.scala
Scala
unlicense
1,260
package equellatests.pages.viewitem import java.util.UUID import com.tle.webtests.framework.PageContext import equellatests.browserpage.WaitingBrowserPage import equellatests.domain.ItemId import equellatests.sections.wizard.WizardPageTab import org.http4s.Uri import org.openqa.selenium.By class SummaryPage(val ctx:...
equella/Equella
autotest/Tests/src/test/scala/equellatests/pages/viewitem/SummaryPage.scala
Scala
apache-2.0
1,089
trait A trait B extends A class C extends A with B object Test extends App { val c = classOf[C] println(c.getGenericInterfaces.toList) assert(c.getGenericInterfaces.length == c.getInterfaces.length, s"mismatch between ${c.getGenericInterfaces} and ${c.getInterfaces}") }
som-snytt/dotty
tests/run/t8931.scala
Scala
apache-2.0
287
package nl.anchormen.receiver import java.util import redis.clients.jedis.{HostAndPort, Jedis, JedisCluster} /** * Created by elsioufy on 13-1-16. */ object RedisProducer { /*This is a simple Redis Producer that * 1) connects to a RedisCluster with node @localhost:7000 and pushes data to lists @keys Key1, ...
Anchormen/spark-redis-connector
src/test/scala/nl/anchormen/receiver/RedisProducer.scala
Scala
apache-2.0
1,285
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-redis/geomesa-redis-tools/src/main/scala/org/locationtech/geomesa/redis/tools/schema/RedisCreateSchemaCommand.scala
Scala
apache-2.0
1,364
import sbt._ import Keys._ import play.Project._ object ApplicationBuild extends Build { val appName = "com_beligum_core" val appVersion = "0.1.0" val appDependencies = Seq( // Add your project dependencies here, javaCore, javaJdbc, javaEbean, "commons-io" % "commons-io" % "1.3...
beligum/com.beligum.core.play
project/Build.scala
Scala
apache-2.0
1,318
package org.jetbrains.plugins.scala package codeInspection package collections import com.intellij.testFramework.EditorTestUtil /** * Nikolay.Tropin * 2014-05-08 */ class MapGetGetTest extends OperationsOnCollectionInspectionTest { override val hint = ScalaInspectionBundle.message("get.get.hint") override val...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/codeInspection/collections/MapGetGetTest.scala
Scala
apache-2.0
1,627
package patmat import org.junit._ import org.junit.Assert.assertEquals class HuffmanSuite { import Huffman._ trait TestTrees { val t1 = Fork(Leaf('a',2), Leaf('b',3), List('a','b'), 5) val t2 = Fork(Fork(Leaf('a',2), Leaf('b',3), List('a','b'), 5), Leaf('d',4), List('a','b','d'), 9) } @Test def `we...
rusucosmin/courses
fp/5-huffman-coding-rusucosmin/src/test/scala/patmat/HuffmanSuite.scala
Scala
mit
2,618
import language.experimental.macros object Test extends App { val macros = new { def foo = macro Impls.foo } macros.foo }
felixmulder/scala
test/pending/run/macro-term-declared-in-anonymous-explicit-import/Macros_Test_2.scala
Scala
bsd-3-clause
126
package com.programmaticallyspeaking.ncd.host package object types { case object Undefined /** * Contains exception data. * * @param name the name of the exception/error type (e.g. TypeError for a JS type error) * @param message the exception message * @param lineNumberBase1 1-based line numbe...
provegard/ncdbg
src/main/scala/com/programmaticallyspeaking/ncd/host/types/package.scala
Scala
bsd-3-clause
2,411
package domain.views import actors.{ClientReceiver, ClientReceiverComponent} import akka.PersistentActorTestScope import akka.actor._ import akka.testkit._ import models._ import org.joda.time.{DateTime, Duration} import org.specs2.mutable._ import org.specs2.mock._ class CurrentUserTimeBookingsViewSpec extends Speci...
tegonal/lasius
test/domain/views/CurrentUserTimeBookingsViewSpec.scala
Scala
gpl-3.0
5,109
package de.mineformers.core.util.world /** * Coord3 * * @author PaleoCrafter */ abstract class Coord3[@specialized(Double, Int) N](implicit val numeric: Numeric[N]) { def x: N def y: N def z: N } trait Coord3Factory[N, C <: Coord3[N]] { def apply(x: N, y: N, z: N): C }
MineFormers/MFCore
src/main/scala/de/mineformers/core/util/world/Coord3.scala
Scala
mit
285
sealed trait S trait Trait extends S class Clazz extends S object Obj extends S trait T1 trait T2 class C1 class C2 class C3 class C4 class SubC1 extends C1 class SubSubC1 extends SubC1 class SubC2 extends C2 class SubSubC2 extends SubC2 trait Unrelated object Test { /* Note: error message on this suggests Obj...
lampepfl/dotty
tests/patmat/andtype-refinedtype-interaction.scala
Scala
apache-2.0
1,953
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
JerryYanWan/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/torch/VolumetricConvolutionSpec.scala
Scala
apache-2.0
11,604
/* * 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 ...
shaneknapp/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
Scala
apache-2.0
36,415
// Copyright (c) 2011-2015 ScalaMock Contributors (https://github.com/paulbutcher/ScalaMock/graphs/contributors) // // 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, inc...
paulbutcher/ScalaMock
shared/src/test/scala/org/scalamock/test/scalatest/BasicTest.scala
Scala
mit
2,239