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 ly.stealth.testing import java.util.Properties import org.apache.kafka.clients.producer.ProducerConfig import org.apache.kafka.clients.producer.{KafkaProducer => NewKafkaProducer} trait BaseSpec { def createNewKafkaProducer(brokerList: String, acks: Int = -1, ...
amorfis/reactive-kafka
src/test/scala/ly/stealth/testing/BaseSpec.scala
Scala
apache-2.0
1,296
package com.gshakhn.privatewiki.client.components import com.gshakhn.privatewiki.client.LockedBinder import com.gshakhn.privatewiki.client.components.testutil.{PrivateWikiBaseSpec, PageInteractions} import PageInteractions._ import com.gshakhn.privatewiki.shared.{NoEncryption, AuthenticationRequest, BinderLoaded, Wron...
gshakhn/private-wiki
client/src/test/scala/com/gshakhn/privatewiki/client/components/LoadingBindersSpec.scala
Scala
apache-2.0
3,977
package satisfaction package engine package actors import akka.actor.ActorRef case class CheckEvidence( val evidencdId : String,w : Witness ) case class EvidenceCheckResult(val evidenceId : String, w: Witness, val isAlreadySatisfied : Boolean) case class JobRunSuccess( val result : ExecutionResult ) case class JobRu...
jeromebanks/satisfaction
modules/engine/src/main/scala/satisfaction/engine/actors/Messages.scala
Scala
apache-2.0
1,603
/* Facsimile: A Discrete-Event Simulation Library Copyright © 2004-2020, Michael J Allen. This file is part of Facsimile. Facsimile 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 ...
MichaelJAllen/facsimile
core/src/main/scala/org/facsim/anim/cell/Triad.scala
Scala
lgpl-3.0
3,256
/******************************************************************************* * 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/typer/TreeInfo.scala
Scala
mpl-2.0
778
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v2/B31.scala
Scala
apache-2.0
942
/* * 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/executionplan/PlanBuilder.scala
Scala
apache-2.0
1,957
package chana.serializer import akka.actor.ExtendedActorSystem import akka.serialization.{ Serializer } import akka.util.ByteString import chana.PutSchema import java.nio.ByteOrder import java.util.concurrent.TimeUnit import scala.concurrent.duration.Duration import scala.concurrent.duration.FiniteDuration final clas...
matthewtt/chana
src/main/scala/chana/serializer/SchemaEventSerializer.scala
Scala
apache-2.0
1,999
/* * 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 ...
witgo/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/dynamicpruning/PartitionPruning.scala
Scala
apache-2.0
11,033
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
tophua/spark1.52
mllib/src/test/scala/org/apache/spark/mllib/feature/Word2VecSuite.scala
Scala
apache-2.0
5,634
package blended.updater.config case class ServiceInfo( name: String, serviceType: String, timestampMsec: Long, lifetimeMsec: Long, props: Map[String, String] ) { def isOutdatedAt(refTimeStampMsec: Long): Boolean = refTimeStampMsec > (math.min(0L, timestampMsec) + math.min(0, lifetimeMsec)) ...
woq-blended/blended
blended.updater.config/shared/src/main/scala/blended/updater/config/ServiceInfo.scala
Scala
apache-2.0
643
package scdbpf import java.nio.ByteBuffer import DbpfUtil._ sealed trait LText extends DbpfType { val text: String } object LText { def apply(text: String): LText = new FreeLText(text) implicit val converter = new Converter[DbpfType, LText] { def apply(from: DbpfType): LText = { new BufferedLText(...
memo33/scdbpf
src/main/scala/scdbpf/LText.scala
Scala
mit
1,507
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
tophua/spark1.52
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveStrategies.scala
Scala
apache-2.0
4,899
package net.danielkza.http2.hpack.coders import scalaz.\\/- import org.specs2.matcher.DataTables import org.specs2.mutable.Specification import net.danielkza.http2.TestHelpers import net.danielkza.http2.hpack.HeaderRepr._ class HeaderCoderTest extends Specification with DataTables with TestHelpers { val plainCoder ...
danielkza/h2scala
core/src/test/scala/net/danielkza/http2/hpack/coders/HeaderCoderTest.scala
Scala
apache-2.0
2,357
package com.sksamuel.elastic4s.alias import com.sksamuel.elastic4s.searches.QueryDefinition import com.sksamuel.elastic4s.searches.queries.QueryStringQueryDefinition import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest.Alias...
ulric260/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/alias/RemoveAliasActionDefinition.scala
Scala
apache-2.0
1,810
package planck /** Based on * http://graphics.cs.williams.edu/courses/cs371/s07/reading/quaternions.pdf * * @param entriesSeq A sequence of entries, (w,x,y,z) */ case class Quaterniond(entriesSeq: Seq[Double]) { if(entriesSeq.size != 4) throw new SizeMismatchException val entries = Vecd(entriesSeq) ...
noryb009/planck
src/planck/Quaterniond.scala
Scala
mit
2,473
package edu.cornell.cdm89.scalaspec.domain import akka.actor.{Actor, ActorLogging, ActorRef} import edu.cornell.cdm89.scalaspec.pde.LaxFriedrichsFlux import LaxFriedrichsFlux.BoundaryValues class InternalBoundaryActor(x: Double) extends Actor with ActorLogging { //override def preStart(): Unit = log.info(s"Startin...
cdmuhlb/DGenerate
src/main/scala/edu/cornell/cdm89/scalaspec/domain/InternalBoundaryActor.scala
Scala
mit
866
package us.feliscat.ner import us.feliscat.text.StringOption import us.feliscat.time.TimeTmp /** * @author K.Sakamoto * Created on 2015/11/26 */ object NamedEntity { def apply(textOpt: StringOption, time: TimeTmp, indexOffset: Range, metaInfoOpt: StringOption, ...
ktr-skmt/FelisCatusZero-multilingual
libraries/src/main/scala/us/feliscat/ner/NamedEntity.scala
Scala
apache-2.0
1,009
import java.util.concurrent.TimeUnit import cats.effect.IO import com.codahale.metrics.graphite.{Graphite, GraphiteReporter} import com.codahale.metrics.{ConsoleReporter, MetricRegistry} import org.http4s.server.blaze.BlazeBuilder import scopt.OptionParser import cats._ import cats.implicits._ import cats.data._ impor...
xxpizzaxx/timerboard-net-backend-esi
src/main/scala/Main.scala
Scala
mit
2,982
/* * Copyright 2018 Analytics Zoo 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...
intel-analytics/analytics-zoo
zoo/src/test/scala/com/intel/analytics/zoo/feature/FeatureSpec.scala
Scala
apache-2.0
8,436
package com.metl.utils import java.math._ import java.security._ import java.security.interfaces._ import java.security.spec._ import javax.crypto._ import javax.crypto.spec._ import net.liftweb.common._ import scala.xml._ object CryptoTester extends Logger { val seeds = List("hello all","8charact","16characterslo...
StackableRegiments/analyticalmetlx
src/main/scala/com/metl/utils/Crypto.scala
Scala
apache-2.0
11,499
/* * 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-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateWithIndexOperator.scala
Scala
apache-2.0
2,173
/* * Copyright 2014–2018 SlamData 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 agr...
slamdata/slamengine
impl/src/main/scala/quasar/impl/datasources/DefaultDatasourceErrors.scala
Scala
apache-2.0
1,742
/*********************************************************************** * Copyright (c) 2013-2018 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...
ddseapy/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/stats/EnumerationStatTest.scala
Scala
apache-2.0
21,587
/* * 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
examples/spark/src/main/scala/org/apache/carbondata/examples/CustomCompactionExample.scala
Scala
apache-2.0
3,417
final class A { private var x1 = false var x2 = false // manipulates private var @inline private def wrapper1[T](body: => T): T = { val saved = x1 x1 = true try body finally x1 = saved } // manipulates public var @inline private def wrapper2[T](body: => T): T = { val saved = x2 x...
dotty-staging/dotty
tests/pending/run/private-inline.scala
Scala
apache-2.0
1,078
/* * 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 ...
zhangjunfang/eclipse-dir
spark/core/src/main/scala/org/apache/spark/ui/jobs/JobProgressPage.scala
Scala
bsd-2-clause
3,886
package immortan import java.util.concurrent.atomic.AtomicLong import akka.actor.{ActorRef, ActorSystem, PoisonPill, Props} import akka.util.Timeout import com.softwaremill.quicklens._ import fr.acinq.bitcoin.Crypto.{PrivateKey, PublicKey} import fr.acinq.bitcoin._ import fr.acinq.eclair.Features._ import fr.acinq.ec...
btcontract/wallet
app/src/main/java/immortan/LNParams.scala
Scala
apache-2.0
19,625
package Impl import akka.actor.ActorSystem import akka.actor.Props import akka.actor.actorRef2Scala import java.util.logging.SimpleFormatter import java.util.logging.FileHandler import java.util.logging.Logger /** * I make this main class to test the paxos behavior, once users run this class, it set up a * paxos s...
allenfromu/Single-Decree-Paxos
src/main/scala/Impl/Main.scala
Scala
mit
2,438
package im.actor.server.util import scala.concurrent.ExecutionContext import slick.dbio.Effect.Read import slick.dbio.{ DBIO, DBIOAction, NoStream } import im.actor.api.rpc.AuthorizedClientData import im.actor.api.rpc.groups.{ Group, Member } import im.actor.api.rpc.pubgroups.PublicGroup import im.actor.server.{ mod...
zomeelee/actor-platform
actor-server/actor-utils/src/main/scala/im/actor/server/util/GroupUtils.scala
Scala
mit
3,935
package dotty.tools package dotc package typer import core._ import ast._ import Trees._, Constants._, StdNames._, Scopes._, Denotations._ import Contexts._, Symbols._, Types._, SymDenotations._, Names._, NameOps._, Flags._, Decorators._ import ast.desugar, ast.desugar._ import ProtoTypes._ import util.Positions._ imp...
yusuke2255/dotty
src/dotty/tools/dotc/typer/Namer.scala
Scala
bsd-3-clause
33,445
// Copyright (c) 2015 Ben Zimmer. All rights reserved. // Secondary project build.scala file import sbt._ import Keys._ case class JvmSettings(javacSource: String, javacTarget: String, scalacTarget: String)
bdzimmer/secondary
project/build.scala
Scala
bsd-3-clause
209
package ir import ir.ast._ object GenerateIR{ // 0 -> f, 1 -> Map(f), 2 -> Map(Map(f)), ... def wrapInMaps(f: => Lambda, count: Int): Lambda = { if(count < 1) f else Map(wrapInMaps(f, count-1)) } // creates Map(...(Map(f)...) o ... o Map(f) o f def applyInEveryDimUntilDim(f: => Lambda, dim: Int): ...
lift-project/lift
src/main/ir/GenerateIR.scala
Scala
mit
1,582
package com.chrisomeara.pillar class IrreversibleMigrationException(migration: IrreversibleMigration) extends RuntimeException(s"Migration ${migration.authoredAt.getTime}: ${migration.description} is not reversible")
smr-co-uk/pillar
src/main/scala/com/chrisomeara/pillar/IrreversibleMigrationException.scala
Scala
mit
219
package asobu.distributed import akka.actor._ import akka.cluster.{Member, MemberStatus, Cluster} import akka.cluster.ddata.{LWWMap, LWWMapKey, DistributedData} import akka.cluster.ddata.Replicator._ import asobu.distributed.EndpointsRegistry.DocDataType import asobu.distributed.gateway.enricher.Interpreter import aso...
iheartradio/asobu
distributed/src/main/scala/asobu/distributed/EndpointsRegistry.scala
Scala
apache-2.0
4,195
/* * Copyright 2014-2022 Netflix, 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 agr...
Netflix/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/util/LongHashSetSuite.scala
Scala
apache-2.0
3,588
package org.bitcoins.core.protocol.transaction import org.bitcoins.core.number.UInt32 import org.bitcoins.core.util.TestUtil import org.scalatest.{FlatSpec, MustMatchers} /** * Created by chris on 3/30/16. */ class TransactionOutPointFactoryTest extends FlatSpec with MustMatchers { "TransactionOutPointFactory" ...
SuredBits/bitcoin-s-sidechains
src/test/scala/org/bitcoins/core/protocol/transaction/TransactionOutPointFactoryTest.scala
Scala
mit
847
import com.jme3.material.Material import com.jme3.math.ColorRGBA import com.jme3.scene.Geometry /** * Created by shinmox on 01/04/14. */ class Minion(Geometry: Geometry, _modele: Modele, Nom: String, _material: Material) extends Personnage(Geometry, _modele, Nom) { Force = 1 PointVie = 3 override de...
shinmox/shinFPS
shinFPS/src/Minion.scala
Scala
apache-2.0
490
/* * Copyright (c) 2014-2019 by The Minitest Project Developers. * Some 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...
monifu/minitest
shared/src/main/scala/minitest/TestSuite.scala
Scala
apache-2.0
1,890
/* * 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 ...
mahak/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/UnivocityGenerator.scala
Scala
apache-2.0
4,182
package net.scalax.cpoi.utils.compat object CollectionCompat { type LazyList[T] = scala.collection.immutable.LazyList[T] def seqToLazyList[T](seq: Seq[T]): LazyList[T] = seq.to(LazyList) def mapFromMutable[T1, T2](map: scala.collection.mutable.Map[T1, T2]): Map[T1, T2] = map.to(Map...
scalax/poi-collection
src/main/scala-2.13/CollectionCompat.scala
Scala
mit
478
package com.eevolution.context.dictionary.infrastructure.repository import com.eevolution.context.dictionary.domain.model.Find import com.eevolution.context.dictionary.infrastructure.db.DbContext._ /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This program is free soft...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/repository/FindMapping.scala
Scala
gpl-3.0
1,676
/* * 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...
VlachJosef/bforms-frontend
app/uk/gov/hmrc/bforms/models/FieldId.scala
Scala
apache-2.0
992
package com.iheart.playSwagger import com.iheart.playSwagger.OutputTransformer.SimpleOutputTransformer import org.specs2.mutable.Specification import play.api.libs.json._ import scala.util.{ Failure, Success } class OutputTransformerSpec extends Specification { "OutputTransformer.traverseTransformer" >> { "tr...
iheartradio/play-swagger
core/src/test/scala/com/iheart/playSwagger/OutputTransformerSpec.scala
Scala
apache-2.0
5,320
package js.hw3 import scala.util.parsing.combinator._ import scala.util.parsing.combinator.lexical._ import scala.util.parsing.combinator.token._ import scala.util.parsing.combinator.syntactical._ import scala.util.parsing.input._ import ast._ object parse extends JavaTokenParsers { val reserved: Set[String] = ...
mpgarate/ProgLang-Assignments
HW3/src/main/scala/js/hw3/parse.scala
Scala
mit
5,402
package de.htwg.scala.person import com.github.nscala_time.time.Imports.DateTime object Today { def now = DateTime.now def year = now.getYear def month = now.getMonthOfYear() def day = now.getDayOfMonth() def date = new Date(year, month, day) } trait Ordered[A] { def compare(that: A): Int def <(that: A...
markoboger/de.htwg.scala.inAction
src/main/scala/de/htwg/scala/person/Date.scala
Scala
mit
1,193
/* * Copyright (C) 2009 Lalit Pant <pant.lalit@gmail.com> * * The contents of this file are subject to the GNU General Public License * Version 3 (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.gnu.org/copyleft/gpl.html * *...
richardfontana/fontana2007-t
KojoEnv/test/unit/src/net/kogics/kojo/staging/TimekeepingTest.scala
Scala
gpl-3.0
2,658
import leon.lang._ object NestedFunctinAliasing1 { def f(a: Array(1,2,3,4)): Int = { def g(b: Array[Int]): Unit = { require(b.length > 0 && a.length > 0) b(0) = 10 a(0) = 17 } ensuring(_ => b(0) == 10) g(a) a(0) } ensuring(_ == 10) }
epfl-lara/leon
src/test/resources/regression/xlang/error/NestedFunctionAliasing2.scala
Scala
gpl-3.0
277
/* * Copyright (C) 2014-2015 by Nokia. * See the LICENCE.txt file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy o...
elyast/wookie
examples/src/main/scala/wookie/yql/news/NewsCollector.scala
Scala
apache-2.0
896
package filodb.query.exec import scala.collection.mutable import monix.eval.Task import monix.reactive.Observable import filodb.core.query._ import filodb.memory.format.RowReader import filodb.query._ import filodb.query.Query.qLogger object StitchRvsExec { def merge(vectors: Seq[RangeVectorCursor]): RangeVector...
tuplejump/FiloDB
query/src/main/scala/filodb/query/exec/StitchRvsExec.scala
Scala
apache-2.0
4,009
/* * This file is part of the Kompics component model runtime. * * Copyright (C) 2009 Swedish Institute of Computer Science (SICS) * Copyright (C) 2009 Royal Institute of Technology (KTH) * * Kompics is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License *...
kompics/kompics-scala
core/src/test/scala/se/sics/kompics/MatcherTestScala.scala
Scala
gpl-2.0
3,267
/** * Global Sensor Networks (GSN) Source Code * Copyright (c) 2006-2016, Ecole Polytechnique Federale de Lausanne (EPFL) * * This file is part of GSN. * * GSN is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation,...
LSIR/gsn
gsn-tools/src/main/scala/ch/epfl/gsn/data/format/TimeFormats.scala
Scala
gpl-3.0
1,863
/* *\\ ** \\ \\ / _) \\ \\ / \\ | ** ** \\ \\ / | __ \\ _ \\ __| \\ \\ / |\\/ | ** ** \\ \\ / | | | __/ | \\ \\ / | | ** ** \\_/ _| .__/ \\___| _| \\_/ _| _| ** ** _| ...
hsyl20/Scala_ViperVM
src/main/scala/org/vipervm/platform/opencl/Program.scala
Scala
gpl-3.0
2,306
package com.softwaremill.codebrag.rest import com.softwaremill.codebrag.finders.browsingcontext.UserBrowsingContextFinder import com.softwaremill.codebrag.service.user.Authenticator import com.softwaremill.codebrag.usecases.{UpdateUserBrowsingContextForm, UpdateUserBrowsingContextUseCase} class BrowsingContextServlet...
softwaremill/codebrag
codebrag-rest/src/main/scala/com/softwaremill/codebrag/rest/BrowsingContextServlet.scala
Scala
agpl-3.0
949
package truerss.db.driver import java.time.{Instant, LocalDateTime, ZoneId, ZoneOffset, ZonedDateTime} import java.util.Date import slick.jdbc.{JdbcProfile, JdbcType} import slick.sql.SqlProfile.ColumnOption.{NotNull, Nullable, SqlType} import play.api.libs.json._ import slick.ast.BaseTypedType import truerss.db._ /...
truerss/truerss
src/main/scala/truerss/db/driver/CurrentDriver.scala
Scala
mit
8,046
package main.scala.overlapping.containers import org.apache.spark.rdd.RDD import org.joda.time.DateTime import scala.math.Ordering import scala.reflect.ClassTag /** * Created by Francois Belletti on 8/6/15. * * This class samples out from an RDD and computes the approximate intervals * that should be used for an...
bellettif/sparkGeoTS
sparkTS/src/main/scala/overlapping/containers/IntervalSampler.scala
Scala
bsd-3-clause
1,598
/* * 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...
CodeSmell/stream-reactor
kafka-connect-azure-documentdb/src/main/scala/com/datamountaineer/streamreactor/connect/azure/documentdb/DocumentClientProvider.scala
Scala
apache-2.0
1,255
package com.twitter.finatra.http.internal.request import com.twitter.finagle.http.{ParamMap, Request, RequestProxy} private[http] class RequestWithRouteParams( wrapped: Request, incomingParams: Map[String, String]) extends RequestProxy { override lazy val params: ParamMap = { new RouteParamMap( sup...
syamantm/finatra
http/src/main/scala/com/twitter/finatra/http/internal/request/RequestWithRouteParams.scala
Scala
apache-2.0
393
package io.ubiqesh.uplink.disruptor.translator import io.ubiqesh.uplink.vertx.event.StateChangeEvent import scala.reflect.BeanProperty import org.vertx.java.core.json.JsonObject class UbiqeshEventTranslator(private var stateChangeEvent: StateChangeEvent) extends com.lmax.disruptor.EventTranslator[StateChangeEvent] { ...
ubiqesh/ubiqesh
uplink/src/main/scala/io/ubiqesh/uplink/disruptor/translator/UbiqeshEventTranslator.scala
Scala
apache-2.0
580
/* * Copyright (c) 2014-2021 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...
monix/monix
monix-execution/shared/src/main/scala/monix/execution/internal/GenericSemaphore.scala
Scala
apache-2.0
9,023
/* * Copyright 2015 Webtrends (http://www.webtrends.com) * * See the LICENCE.txt file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
mjwallin1/wookiee-spray
example-rest/src/main/scala/com/webtrends/service/rest/Read.scala
Scala
apache-2.0
3,119
import stainless.lang.StaticChecks._ object StaticChecks2 { def add(n: BigInt, m: BigInt): BigInt = { require(n >= 0 && m >= 0) var res = if(m == 0) n else add(n, m-1) + 1 assert(res >= 0) res } ensuring((res: BigInt) => res >= 0) }
epfl-lara/stainless
frontends/benchmarks/verification/valid/MicroTests/StaticChecks2.scala
Scala
apache-2.0
257
package $basePackageName$; import io.skysail.server.restlet.resources.EntityServerResource import io.skysail.domain.GenericIdentifiable import org.slf4j.LoggerFactory class OAuth2CallbackResource extends EntityServerResource[GenericIdentifiable] { val log = LoggerFactory.getLogger(classOf[OAuth2CallbackResource]) ...
evandor/skysail
skysail.oauth.clientapp.scala.template/resources/template/$srcDir$/$basePackageDir$/OAuth2CallbackResource.scala
Scala
apache-2.0
1,330
package org.opennetworkinsight /** * Parses arguments for the suspicious connections analysis. */ object SuspiciousConnectsArgumentParser { case class SuspiciousConnectsConfig(analysis: String = "", inputPath: String = "", scoresFile: ...
Open-Network-Insight/oni-ml
src/main/scala/org/opennetworkinsight/SuspiciousConnectsArgumentParser.scala
Scala
apache-2.0
4,694
/* * 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 ...
map222/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/JavaTypeInference.scala
Scala
apache-2.0
18,154
package uk.gov.dvla.vehicles.presentation.common.views import org.scalatest.AppendedClues import org.scalatest.selenium.WebBrowser.click import org.scalatest.selenium.WebBrowser.go import org.scalatest.selenium.WebBrowser.pageTitle import play.api.i18n.Messages import play.api.libs.json.Json import uk.gov.dvla.vehicle...
dvla/vehicles-presentation-common
common-test/test/uk/gov/dvla/vehicles/presentation/common/views/AddressPickerSpec.scala
Scala
mit
15,676
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
goldmedal/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateOrdering.scala
Scala
apache-2.0
7,291
package com.github.mmolimar.ksql.jdbc import java.sql.{Connection, Driver, DriverPropertyInfo} import java.util.Properties import java.util.logging.Logger import com.github.mmolimar.ksql.jdbc.Exceptions._ import scala.util.matching.Regex object KsqlDriver { val ksqlName = "ksqlDB" val ksqlPrefix = "jdbc:ksql:/...
mmolimar/ksql-jdbc-driver
src/main/scala/com/github/mmolimar/ksql/jdbc/KsqlDriver.scala
Scala
apache-2.0
2,376
package io.catbird.util import cats.{ CoflatMap, Comonad, Eq, Monad, Monoid, Semigroup } import com.twitter.util.Var import scala.Boolean import scala.util.{ Either, Left, Right } trait VarInstances extends VarInstances1 { implicit final val twitterVarInstance: Monad[Var] with CoflatMap[Var] = new VarCoflatMap ...
travisbrown/catbird
util/src/main/scala/io/catbird/util/var.scala
Scala
apache-2.0
1,896
package com.pharmpress.common.model.dmd /** * Record a trade family (from the SNOMED CT UK drug extension). * * Created by jonathan stott on 05/05/2015. */ case class TradeFamily( id: String, name: String, groupId: Option[String] ) extends DmdIdentifiable
pharmpress/DmdBrowserScalaJs
jvm/app/com/pharmpress/common/model/dmd/TradeFamily.scala
Scala
apache-2.0
267
/* * Copyright 2001-2008 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this apple 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...
kevinwright/scalatest
src/test/scala/org/scalatest/matchers/ShouldBeAnSymbolSpec.scala
Scala
apache-2.0
13,540
/** * 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...
ollie314/kafka
core/src/main/scala/kafka/tools/ConsoleConsumer.scala
Scala
apache-2.0
25,137
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
WangTaoTheTonic/flink
flink-scala/src/main/scala/org/apache/flink/api/scala/typeutils/EnumValueSerializer.scala
Scala
apache-2.0
6,349
/** * For copyright information see the LICENSE document. */ package entice.server.world.systems import entice.server._ import entice.server.world._ import entice.server.utils._ import entice.protocol._ import akka.actor._ import shapeless._ import scala.concurrent.duration._ import scala.language.postfixOps /** ...
entice/old-server
src/main/scala/entice/server/world/systems/GroupSystem.scala
Scala
bsd-3-clause
9,257
package sigmastate import org.ergoplatform.SigmaConstants.ScriptCostLimit import org.ergoplatform.validation.ValidationRules import org.ergoplatform.{ErgoBox, ErgoLikeContext} import scorex.crypto.authds.avltree.batch.Lookup import scorex.crypto.authds.{ADDigest, ADKey} import scorex.crypto.hash.Blake2b256 import sigm...
ScorexFoundation/sigmastate-interpreter
sigmastate/src/test/scala/sigmastate/CostingSpecification.scala
Scala
mit
22,905
package breeze.optimize /* Copyright 2009 David Hall, Daniel Ramage 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 applicab...
chen0031/breeze
math/src/test/scala/breeze/optimize/StochasticAveragedGradientTest.scala
Scala
apache-2.0
3,216
package com.twitter.finagle.memcached import com.twitter.io.Buf import com.twitter.util._ import _root_.java.util.concurrent.Executors import scala.collection.mutable.ArrayBuffer import _root_.java.util.Random /** * This class is designed to support replicated memcached setups. It supports a limited * subset of op...
twitter/finagle
finagle-memcached/src/main/scala/com/twitter/finagle/memcached/PoolingReadRepairClient.scala
Scala
apache-2.0
3,281
/* * 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/main/scala/uk/gov/hmrc/ct/ct600e/v3/E175.scala
Scala
apache-2.0
1,061
package com.github.agourlay.cornichon.core import cats.syntax.monoid._ case class RunState( session: Session, logs: Vector[LogInstruction], depth: Int, cleanupSteps: List[Step] ) { lazy val goDeeper = copy(depth = depth + 1) lazy val resetLogs = copy(logs = Vector.empty) // Helper fct to setup...
OlegIlyenko/cornichon
cornichon-core/src/main/scala/com/github/agourlay/cornichon/core/RunState.scala
Scala
apache-2.0
2,284
/* * 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/main/scala/uk/gov/hmrc/ct/ct600j/v2/retriever/CT600JBoxRetriever.scala
Scala
apache-2.0
809
package slick.codegen import java.net.URI import scala.concurrent.{ExecutionContext, Await} import scala.concurrent.duration.Duration import scala.util.Try import slick.basic.DatabaseConfig import slick.{model => m} import slick.jdbc.JdbcProfile import slick.util.ConfigExtensionMethods.configExtensionMethods /** *...
AtkinsChang/slick
slick-codegen/src/main/scala/slick/codegen/SourceCodeGenerator.scala
Scala
bsd-2-clause
6,136
package rescala.api import rescala.core.{CreationTicket, Engine, Struct} import rescala.meta._ import rescala.reactives.Signals import scala.language.higherKinds trait Api { type Signal[+A] type Event[+A] type Var[A] <: Signal[A] type Evt[A] <: Event[A] def Evt[A](): Evt[A] def Var[A](v: A): Var[A] d...
guidosalva/REScala
Historical/Meta/src/main/scala/rescala/api/Api.scala
Scala
apache-2.0
6,601
package pl.project13.scala.akka.raft.config import akka.actor.{ExtendedActorSystem, ExtensionIdProvider, ExtensionId} object RaftConfiguration extends ExtensionId[RaftConfig] with ExtensionIdProvider { def lookup() = RaftConfiguration def createExtension(system: ExtendedActorSystem): RaftConfig = new RaftConfig...
ktoso/akka-raft
src/main/scala/pl/project13/scala/akka/raft/config/RaftConfiguration.scala
Scala
apache-2.0
347
/* * 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 ...
big-pegasus/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala
Scala
apache-2.0
36,192
/* 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/app/nlp/pos/PosTag.scala
Scala
apache-2.0
8,186
package org.http4s.parser import org.http4s.{Header, ParseResult} trait HeaderParserHelper[H <: Header] { def hparse(value: String): ParseResult[H] // Also checks to make sure whitespace doesn't effect the outcome protected def parse(value: String): H = { val a = hparse(value).fold(err => sys.error(...
reactormonk/http4s
tests/src/test/scala/org/http4s/parser/HeaderParserHelper.scala
Scala
apache-2.0
557
/** * Copyright (C) 2011 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...
evlist/orbeon-forms
src/main/scala/org/orbeon/oxf/xforms/analysis/Metadata.scala
Scala
lgpl-2.1
6,058
/* * Copyright 2014 DataGenerator Contributors * * 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...
Brijeshrpatel9/SingleThreaderProcessingDG
dg-common/src/main/code/org/finra/datagenerator/common/NodeData/DisplayableData.scala
Scala
apache-2.0
2,375
object Test { def testPermutations1(num: Int, stream: LazyList[Int]): Unit = { val perm = stream.permutations print(num) while(perm.hasNext) { print(" " + perm.next().toList) } println() } def testPermutations2(num: Int, stream: List[Int]): Unit = { val perm = stream.permutations ...
lampepfl/dotty
tests/run/t5377.scala
Scala
apache-2.0
1,209
// // DOrcExecution.scala -- Scala classes DOrcExecution, DOrcLeaderExecution, and DOrcFollowerExecution // Project OrcScala // // Created by jthywiss on Dec 29, 2015. // // Copyright (c) 2019 The University of Texas at Austin. All rights reserved. // // Use and redistribution of this file is governed by the license te...
orc-lang/orc
OrcScala/src/orc/run/distrib/token/DOrcExecution.scala
Scala
bsd-3-clause
4,810
/******************************************************************************* * Copyright (C) 2012 Łukasz Szpakowski. * * This library 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 ver...
luckboy/LkbGraph
src/test/org/lkbgraph/immutable/spec/AdjListGraphSpec.scala
Scala
lgpl-3.0
1,328
package jp.rotaryo.whitespace protected[whitespace] object RetrieveOperation extends Operation { override def getSource(): String = { return heapAccess + "\t" } override def getParameter(): Option[Parameter] = { return None } override def preRun(container: Container, index: Int): Unit = { } o...
rotary-o/scala2ws
src/main/scala/jp/rotaryo/whitespace/RetrieveOperation.scala
Scala
mit
472
package yuuto.enhancedinventories.tile.base import yuuto.yuutolib.tile.traits.TTileRotatableMachine import yuuto.enhancedinventories.tile.traits.TDecorativeInventoryConnective import yuuto.enhancedinventories.tile.traits.TInventoryConnectiveUpgradeable import yuuto.enhancedinventories.tile.traits.TInventorySecurable i...
Joccob/EnhancedInventories
src/main/scala/yuuto/enhancedinventories/tile/base/TileConnectiveUpgradeable.scala
Scala
gpl-2.0
701
package scadla.backends import eu.mihosoft.jcsg.{Cube => JCube, Sphere => JSphere, Cylinder => JCylinder, Polyhedron => JPolyhedron, _} import eu.mihosoft.vvecmath.{Vector3d, Transform, Plane} import scadla._ import InlineOps._ import java.util.ArrayList import squants.space.{Length, Millimeters, LengthUnit} //backen...
dzufferey/scadla
src/main/scala/scadla/backends/JCSG.scala
Scala
apache-2.0
4,948
/* * Copyright 2007-2011 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
lzpfmh/framework-2
core/util/src/main/scala/net/liftweb/util/CurrencyZone.scala
Scala
apache-2.0
5,452
import scalaz._ object Vec { implicit object VecEqual extends Equal[Vec] { def equal(v1: Vec, v2: Vec): Boolean = v1 == v2 } implicit object VecMonoid extends Monoid[Vec] { def zero: Vec = Vec(0, 0) def append(v1: Vec, v2: => Vec): Vec = Vec(v1.x + v2.x, v1.y + v2.y) } } case class Vec(x: Int, y:...
debasishg/proptest
src/main/scala/net/debasishg/prop/vec.scala
Scala
apache-2.0
326
/* * Copyright (c) 2015 Daniel Higuero. * * 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...
dhiguero/scala-exercises
src/main/scala/org/scala/exercises/Exercise3.scala
Scala
apache-2.0
760
object HelloWorld { def hello() = "Hello, World!" def hello(name: String) = s"Hello, $name!" }
nlochschmidt/xscala
hello-world/example.scala
Scala
mit
100
/** * Graph class, which is used to search the shorted path between * source/destination stations. * * Be CAREFUL about the relation of different "infinities". * Here we set the infinity of a vertex as 999999, the guard value * to find the vertex with the smallest dist metric as 99999999, * and the penalty val...
whily/scasci
src/main/scala/collection/Graph.scala
Scala
gpl-2.0
5,248
package com.github.jeroenr.tepkin.protocol.exception import com.github.jeroenr.tepkin.protocol.result.WriteConcernError case class WriteConcernException(writeConcernError: WriteConcernError) extends TepkinException
jeroenr/tepkin
tepkin/src/main/scala/com/github/jeroenr/tepkin/protocol/exception/WriteConcernException.scala
Scala
apache-2.0
217