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.catinthedark.ld36 import java.net.URI import com.badlogic.gdx.{Gdx, Input, InputAdapter} import com.catinthedark.lib.YieldUnit class ConnectState(address: String) extends YieldUnit[String, Shared0] { var shared0: Shared0 = _ var hardSkip: Boolean = false override def onActivate(data: String): Unit...
cat-in-the-dark/old48_36_game
client/src/main/scala/com/catinthedark/ld36/ConnectState.scala
Scala
mit
1,184
package byte_walk import byteR._ import byteR.cfg._ import exceptions._ import scala.collection.mutable.{HashMap,HashSet,Map} object CFGWalk { def apply(instructions: List[JVMInstruction]): JVMCFG = { // This represents the CFG. It goes from source locations // that are at the start of a basic block to sou...
j-c-w/mlc
src/main/scala/byte_walk/CFGWalk.scala
Scala
gpl-3.0
4,422
/* * 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/. */ /* Copyright (c) 2007-2016, Rickard Nilsson All rights reserved. Redistribution and use in source and binar...
sirthias/swave
core/src/test/scala/org/scalacheck/util/FreqMap.scala
Scala
mpl-2.0
3,486
package spire.math import spire.math.ArbitrarySupport.{Positive, NonNegative} import scala.util.Try import org.scalatest.FunSuite import spire.implicits.{eqOps => _, _} import spire.laws.arb.{interval => interval_, rational} import spire.random.{Uniform, Dist} import org.scalatest.Matchers import org.scalacheck.Arb...
JackSullivan/spire
tests/src/test/scala/spire/math/IntervalTest.scala
Scala
mit
19,334
package almhirt.domain import scala.language.postfixOps import java.time.{ ZonedDateTime, LocalDateTime } import scala.concurrent._ import scala.concurrent.duration._ import org.reactivestreams.Subscriber import akka.actor._ import almhirt.common._ import almhirt.streaming._ import akka.stream.scaladsl._ im...
chridou/almhirt
almhirt-core/src/test/scala/almhirt/domain/AggregateRootNexusTests.scala
Scala
apache-2.0
13,517
object Test { def main(args: Array[String]): Unit = { println(sum(1, 2, 3)) } inline def sum(inline i: Int, inline j: Int, inline k: Int): Int = ${ Macros.sum('i, 'j, 'k) } }
som-snytt/dotty
tests/run-macros/inline-varargs-1/Main_2.scala
Scala
apache-2.0
188
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
dotty-staging/scalatest
scalatest/src/main/scala/org/scalatest/tools/ConcurrentDistributor.scala
Scala
apache-2.0
1,597
package rere.ql.queries import rere.ql.options.all._ import rere.ql.options.{ComposableOptions, Options} import rere.ql.ql2.Term.TermType import rere.ql.typeclasses.{DatumSelector, Transmuter} import rere.ql.types._ trait JoinQueries { // inner_join trait InnerJoinInfiniteStreamLikeQuery[T <: ReqlDatum] extends ...
pbaun/rere
modules/ql/src/main/scala/rere/ql/queries/JoinQueries.scala
Scala
apache-2.0
8,283
/* * 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...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/utils/tf/loaders/TruncateDiv.scala
Scala
apache-2.0
1,468
package com.softwaremill.macwire.dependencyLookup import com.softwaremill.macwire.{PositionUtil, Debug, TypeCheckUtil} import scala.annotation.tailrec import scala.reflect.macros.blackbox.Context private[dependencyLookup] class ValuesOfTypeInParentsFinder[C <: Context](val c: C, debug: Debug) { import c.universe._...
rcirka/macwire
macros/src/main/scala/com/softwaremill/macwire/dependencyLookup/ValuesOfTypeInParentsFinder.scala
Scala
apache-2.0
3,171
import collection.immutable._ // ticket #3508 object Test { def main(args: Array[String]) { assert(Stream.tabulate(123)(_ + 1).toList == List.tabulate(123)(_ + 1)) } }
felixmulder/scala
test/files/run/t3508.scala
Scala
bsd-3-clause
180
package com.github.vitalsoftware.scalaredox.models import java.time.LocalDate import com.github.vitalsoftware.macros.jsonDefaults import com.github.vitalsoftware.util.RobustPrimitives import com.github.vitalsoftware.util.JsonImplicits.jodaISO8601Format import org.joda.time.DateTime import play.api.libs.json._ /** *...
vital-software/scala-redox
src/main/scala/com/github/vitalsoftware/scalaredox/models/Order.scala
Scala
mit
5,526
/* * 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...
monifu/monifu
monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapEffectSuite.scala
Scala
apache-2.0
2,376
package models import slick.driver.MySQLDriver.api._ package object school { /** * Table queries for school models */ object tableQueries { /** * The [[TableQuery]] for [[school.Topics]] */ val topics = TableQuery[school.Topics] /** * The [[TableQuery]] for [[school....
Xanho/xanho-api
app/models/school/package.scala
Scala
apache-2.0
1,338
package org.gbougeard.model.projects /** * Created with IntelliJ IDEA. * User: gbougeard * Date: 13/07/13 * Time: 19:07 * To change this template use File | Settings | File Templates. */ case class DashboardInput(id: Option[String], commit_message: Option[String]) object DashboardInput...
gbougeard/gas
src/main/scala/org/gbougeard/model/projects/DashboardInput.scala
Scala
apache-2.0
455
package ca.pgx.rest.service package com.eventhub.rest.service import akka.actor.{ActorLogging, Actor, ActorSystem, Props} import akka.io.IO import ca.pgx.common.communication.email.SmtpMailer import spray.can.Http import net.liftweb.util.{Props => LiftProps} import scala.reflect.ClassTag import scala.sys.SystemProper...
pgxcentre/eventhub
rest/src/main/scala/ca/pgx/rest/service/Boot.scala
Scala
apache-2.0
3,658
package org.jetbrains.jps.incremental.scala package data import java.io.File import org.jetbrains.jps.ModuleChunk import org.jetbrains.jps.builders.java.JavaBuilderUtil import org.jetbrains.jps.incremental.CompileContext import org.jetbrains.jps.incremental.scala._ import org.jetbrains.jps.incremental.scala.model.{In...
triplequote/intellij-scala
scala/compiler-jps/src/org/jetbrains/jps/incremental/scala/data/CompilerData.scala
Scala
apache-2.0
7,447
object Test { def main(args: Array[String]): Unit = { { (erased x: Int) => 42 } println("ok") } }
som-snytt/dotty
tests/run-custom-args/erased/erased-19.scala
Scala
apache-2.0
122
package ua.t3hnar.plugins.cmdsupport.lang.parser import com.intellij.openapi.project.Project import com.intellij.lang.{ASTNode, ParserDefinition} import com.intellij.psi.tree.IFileElementType import com.intellij.psi.util.PsiUtilCore import com.intellij.psi.FileViewProvider import ua.t3hnar.plugins.cmdsupport.lang.lexe...
t3hnar/CmdSupport
src/ua/t3hnar/plugins/cmdsupport/lang/parser/CmdParserDefinition.scala
Scala
apache-2.0
1,124
package model import scala.slick.lifted.{TableQuery, AbstractTable} import Database.profile.simple._ trait CrudSupport[T <: AbstractTable[_], K] extends Insertable[T] with Searchable[T, K] with Updatable[T, K] with Removable[T, K] with Selectable[T, K] sealed trait Requestable[T <: AbstractTable[_]] extends ...
evancasey/tinder-bandits
src/main/scala/model/CrudSupport.scala
Scala
mit
1,883
/*********************************************************************** * 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-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/index/TemporalIndexCheckTest.scala
Scala
apache-2.0
5,000
/* * Copyright 2015 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/http-verbs
src/main/scala/uk/gov/hmrc/play/http/ws/WSPatch.scala
Scala
apache-2.0
1,123
package scalautils import scalautils.Bash._ /** * @author Holger Brandl */ object BashTest extends App { // import scalautils.Bash Bash.eval("""cd ~/unit_tests echo baum > baum.txt echo haus > haus.txt""") Bash.eval("cd ~/unit_tests\\n echo baum > baum2.txt\\necho haus > haus2.txt") val jobCmed = ...
holgerbrandl/scalautils
src/test/scala/scalautils/BashTest.scala
Scala
bsd-2-clause
1,659
/* 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 to in writing, software distr...
nevillelyh/algebird
algebird-util/src/main/scala/com/twitter/algebird/util/summer/SyncSummingQueue.scala
Scala
apache-2.0
3,638
/******************************************************************************* * Copyright 2010 Maxime LΓ©vesque * * 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://...
Krasnyanskiy/squeryl
src/main/scala/org/squeryl/dsl/Group.scala
Scala
apache-2.0
1,324
/* * 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 ...
yzhou2001/HSpark
src/test/scala/org/apache/spark/sql/hbase/HBaseTpcStringFormatMiniTestSuite.scala
Scala
apache-2.0
25,394
package scavlink.link.nav import org.scalatest.{Matchers, WordSpec} import scavlink.coord.NED import scavlink.link.mission.MissionTestData import scavlink.message.{SystemId, VehicleId} import scavlink.state.LocationState import scala.concurrent.duration._ class GotoLocationsSpec extends WordSpec with Matchers with M...
nickolasrossi/scavlink
src/test/scala/scavlink/link/nav/GotoLocationsSpec.scala
Scala
mit
6,125
/** * 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...
ijuma/kafka
core/src/main/scala/kafka/tools/VerifyConsumerRebalance.scala
Scala
apache-2.0
5,627
package java.time private[time] object Preconditions { // Like scala.Predef.require, but throws a DateTimeException. def requireDateTime(requirement: Boolean, message: => Any): Unit = { if (!requirement) throw new DateTimeException(message.toString) } }
jasonchaffee/scala-js
javalib/src/main/scala/java/time/Preconditions.scala
Scala
bsd-3-clause
271
package com.seremis.geninfusion.registry import com.seremis.geninfusion.api.GIApiInterface.IDataTypeRegistry import com.seremis.geninfusion.api.util.{DataType, INBTTagable} import net.minecraft.nbt.NBTTagCompound import scala.collection.mutable.HashMap class DataTypeRegistry extends IDataTypeRegistry { private ...
Seremis/Genetic-Infusion
src/main/scala/com/seremis/geninfusion/registry/DataTypeRegistry.scala
Scala
gpl-3.0
1,894
package vuescale package scaladsl import scala.scalajs.js import scala.scalajs.js.annotation._ import vuescale.facade.CreateElement import vuescale.facade.Vue trait DataOptions[V] extends js.Object { def data: js.UndefOr[js.Function0[js.Object]] = js.undefined def props: js.UndefOr[js.Object] = js.undefined de...
lettenj61/vuescale
vuescale-core/src/main/scala/vuescale/scaladsl/Component.scala
Scala
mit
3,853
package fr.laas.fape.anml import fr.laas.fape.anml.model.AnmlProblem object Parsing extends App { val repetitions = 10 val file = if(args.size == 0) "resources/test.anml" else args(0) println("Parsing: "+file) for(i <- 0 until repetitions) { val start = System.currentTimeMillis() ...
athy/fape
anml-parser/src/main/scala/fr/laas/fape/anml/Parsing.scala
Scala
bsd-2-clause
581
/* * 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 ...
apache/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/RowTypeTest.scala
Scala
apache-2.0
4,016
package org.sparklinedata.hive.hook import org.junit.{Before, Test} class BasicTest { /* * to get a plan file, in hive debugger break in Driver.execute, and execute: * org.apache.commons.io.FileUtils.writeStringToFile(new java.io.File("/tmp/q1.plan"), Utilities.serializeObject(this.plan)) */ @Test d...
hbutani/hive-lineage
hivehook/src/test/scala/org/sparklinedata/hive/hook/BasicTest.scala
Scala
apache-2.0
839
package org.qi4j.sample.scala import org.qi4j.library.constraints.annotation.MaxLength trait HelloWorldMixin2 { def sayHello(@MaxLength(10) name: String ): String = "Hello " + name }
joobn72/qi4j-sdk
libraries/lang-scala/src/test/scala/org/qi4j/sample/scala/HelloWorldMixin2.scala
Scala
apache-2.0
186
package gsd.linux.cnf import gsd.linux._ import org.kiama.rewriting.Rewriter._ import org.kiama.rewriting.Strategy import collection.mutable.HashMap object IdMap { def apply(es: Iterable[BExpr]): Map[String, Int] = { val map = new HashMap[String, Int] es foreach { e => e.identifiers filter { !map.cont...
matachi/linux-variability-analysis-tools.fm-translation
src/main/scala/gsd/linux/cnf/CNF.scala
Scala
gpl-3.0
1,778
/** * Copyright (C) 2020 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...
orbeon/orbeon-forms
src/main/scala/org/orbeon/oxf/xml/dom/Converter.scala
Scala
lgpl-2.1
909
package com.faacets.qalg package syntax package algos trait AllSyntax extends CatSyntax with DeterminantSyntax with FactorySyntax with GramSchmidtSyntax with KronSyntax with LUSyntax with PrimeSyntax with RankSyntax with RrefSyntax with ShiftSyntax with TraceSyntax
denisrosset/qalg
core/src/main/scala/qalg/syntax/algos/AllSyntax.scala
Scala
mit
311
package mesosphere.marathon.api import javax.ws.rs.WebApplicationException import javax.ws.rs.core.Response.Status import javax.ws.rs.core.{ MediaType, Response } import javax.ws.rs.ext.{ ExceptionMapper, Provider } import com.fasterxml.jackson.core.JsonParseException import com.fasterxml.jackson.databind.JsonMapping...
timcharper/marathon
src/main/scala/mesosphere/marathon/api/MarathonExceptionMapper.scala
Scala
apache-2.0
3,467
/* * Copyright 2022 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/iht-frontend
test/iht/views/application/tnrb/TnrbOverviewTableRowViewTest.scala
Scala
apache-2.0
3,795
/* * 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
external/avro/src/main/scala/org/apache/spark/sql/avro/AvroUtils.scala
Scala
apache-2.0
13,500
/** * (c) Copyright 2013 WibiData, Inc. * * See the NOTICE 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 of...
kijiproject/kiji-schema-shell
src/main/scala/org/kiji/schema/shell/ddl/DDLCommand.scala
Scala
apache-2.0
7,179
/* * 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 ...
apache/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/calls/CurrentTimePointCallGen.scala
Scala
apache-2.0
3,618
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js API ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-lang.org/ ** ** /____/\\___/...
swhgoon/scala-js
library/src/main/scala/scala/scalajs/js/Dictionary.scala
Scala
bsd-3-clause
2,025
package ammonite import ammonite.runtime.{History, Storage} import ammonite.interp.Interpreter import ammonite.main.Defaults import ammonite.ops._ import ammonite.runtime.tools.DependencyConstructor._ import ammonite.TestUtils._ import utest._ object CachingTests extends TestSuite{ val tests = TestSuite{ printl...
alexarchambault/ammonium
amm/src/test/scala/ammonite/CachingTests.scala
Scala
mit
6,429
/* * Copyright 2011-2019 Asakusa Framework Team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
ueshin/asakusafw-spark
compiler/src/main/scala/com/asakusafw/spark/compiler/operator/ViewFields.scala
Scala
apache-2.0
4,050
package com.github.saurfang.parquet.proto.spark.sql import com.google.protobuf.{ByteString, AbstractMessage} import com.google.protobuf.Descriptors.{EnumValueDescriptor, FieldDescriptor} import com.google.protobuf.Descriptors.FieldDescriptor.JavaType._ import org.apache.spark.sql.Row object ProtoRDDConversions { de...
saurfang/sparksql-protobuf
src/main/scala/com/github/saurfang/parquet/proto/spark/sql/ProtoRDDConversions.scala
Scala
apache-2.0
1,270
/* * Copyright 2015 LG CNS. * * 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 ...
jhshin9/scouter
scouter.server/src/scouter/server/db/TextRD.scala
Scala
apache-2.0
1,477
/* * Copyright (c) 2014 the original author or 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 appl...
zeddius1983/transformations
transformations-core/src/test/scala/org/mercuree/transformations/core/TransformationsSpec.scala
Scala
apache-2.0
7,040
/* * This file is part of the \\BlueLaTeX project. * * 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 ...
tdurieux/bluelatex
blue-core/src/main/scala/gnieh/blue/core/impl/paper/ModifyPaperLet.scala
Scala
apache-2.0
3,778
package com.seanshubin.todo.application.domain class RedirectHandlerRequest(redirects: Map[String, String]) extends RequestValueHandler { override def handle(request: RequestValue): Option[ResponseValue] = { redirects.get(request.uri.path).map { destination => val response = ResponseValue.redirect(...
SeanShubin/todo-application
domain/src/main/scala/com/seanshubin/todo/application/domain/RedirectHandlerRequest.scala
Scala
unlicense
362
package waldap.core.model import org.apache.directory.api.ldap.model.name.Dn trait Account { val userName: String val isAdmin: Boolean } case class AdminAccount(username: String) extends Account { override val userName: String = username override val isAdmin: Boolean = true } case class UserAccount(username...
kounoike/waldap
src/main/scala/waldap/core/model/Account.scala
Scala
apache-2.0
441
/* * 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 ...
akopich/spark
core/src/main/scala/org/apache/spark/ui/jobs/AllStagesPage.scala
Scala
apache-2.0
5,492
package com.ebay.neutrino.handler.ops import java.util import com.ebay.neutrino.NeutrinoRequest import com.ebay.neutrino.channel.NeutrinoEvent import com.ebay.neutrino.util.Utilities import com.typesafe.scalalogging.slf4j.StrictLogging import io.netty.buffer.{ByteBuf, ByteBufHolder} import io.netty.channel.ChannelHan...
eBay/Neutrino
src/main/scala/com/ebay/neutrino/handler/ops/NeutrinoAuditHandler.scala
Scala
apache-2.0
8,389
/** * Copyright (C) 2016 DANS - Data Archiving and Networked Services (info@dans.knaw.nl) * * 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...
DANS-KNAW/easy-split-multi-deposit
src/test/scala/nl.knaw.dans.easy.multideposit/parser/ProfileParserSpec.scala
Scala
apache-2.0
9,408
package chapter.eight object ExerciseEight extends App { class Person(val name: String) { override def toString = s"""${getClass.getName} [name="${name}"]""" } class SecretAgent(codename: String) extends Person(codename) { override val name = "secret" override val toString = "secret" } }
deekim/impatient-scala
src/main/scala/chapter/eight/ExerciseEight.scala
Scala
apache-2.0
313
import ammonite.ops._ import ammonite.shell._ import ammonite.ops.ImplicitWd._ /* TODO: * add syntax for custom operators * file atomicity * stronger type-checking (e.g. `write` should only accept `Path` * the results list in runMap could keep metadata info for each target that's been added to it (or each rule ...
averagehat/scala-make
graph.scala
Scala
bsd-3-clause
3,877
/* * 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/test/scala/org/neo4j/cypher/internal/compiler/v2_3/tracing/rewriters/RewriterStepSequencerTest.scala
Scala
apache-2.0
3,502
package com.twitter.finagle.netty4.channel import com.twitter.finagle.Stack import com.twitter.finagle.param.Stats import com.twitter.finagle.stats.InMemoryStatsReceiver import io.netty.channel._ import io.netty.channel.embedded.EmbeddedChannel import io.netty.channel.nio.NioEventLoopGroup import java.net.SocketAddres...
twitter/finagle
finagle-netty4/src/test/scala/com/twitter/finagle/netty4/channel/HandlerEventTest.scala
Scala
apache-2.0
7,958
package com.twitter.scrooge.frontend class ParseException(reason: String, cause: Throwable) extends Exception(reason, cause) { def this(reason: String) = this(reason, null) } // severe errors class NegativeFieldIdException(name: String) extends ParseException("Negative user-provided id in field " + name) class D...
nshkrob/scrooge
scrooge-generator/src/main/scala/com/twitter/scrooge/frontend/ParseException.scala
Scala
apache-2.0
1,922
package ru.wordmetrix.vector import org.scalacheck.{Arbitrary, Gen} object CheckVectorList extends TestVector { val empty: Vector[Int] = VectorList.empty[Int] implicit def VS = Arbitrary[Vector[Int]](for { keys <- Gen.containerOf[List, Int](for { k <- Gen.choose(0, 10) } yield (k)) map (_.distinct....
electricmind/utils
src/test/scala/ru/wordmetrix/vector/CheckVectorList.scala
Scala
apache-2.0
556
package mesosphere.marathon.io.storage import java.io._ /** * The local file system implementation. * * @param file the underlying file * @param path the relative path, this item is identified with. */ case class FileStorageItem(file: File, basePath: File, path: String, baseUrl: String) extends StorageItem ...
14Zen/marathon
src/main/scala/mesosphere/marathon/io/storage/FileStorageProvider.scala
Scala
apache-2.0
1,791
package com.expedia.gps.geo.reactive101.client.scala import com.codahale.metrics.Timer.Context import com.codahale.metrics._ import com.expedia.gps.geo.reactive101.scala.client._ import org.json4s._ import org.json4s.jackson.JsonMethods._ import scala.concurrent.Future /** * * @author olmartin@expedia.com * @sinc...
olmartinATexpedia/reactive101
src/test/scala/com/expedia/gps/geo/reactive101/client/scala/BasicScalaTest.scala
Scala
apache-2.0
1,732
package io.scalajs.nodejs.path import scala.scalajs.js /** * Path Object * @author lawrence.daniels@gmail.com */ class PathObject(val root: js.UndefOr[String] = js.undefined, val dir: js.UndefOr[String] = js.undefined, val base: js.UndefOr[String] = js.undefined, ...
scalajs-io/nodejs
app/common/src/main/scala/io/scalajs/nodejs/path/PathObject.scala
Scala
apache-2.0
453
package org.scalaperf package statistics import scala.annotation.tailrec import Statistics.arrayOfDoubleToStatsArrayOfDouble import scala.math.{sqrt, round, min} case class Outliers(median: Double, iqr: Double, lowExtreme: List[(Double, Int)], ...
tonymagne/scalaperf
src/main/scala/org/scalaperf/statistics/Diagnostics.scala
Scala
lgpl-3.0
8,641
/* * Copyright 2016 Nicolas Rinaudo * * 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...
nrinaudo/kantan.regex
scalaz/shared/src/test/scala/kantan/regex/scalaz/MaybeDecoderTests.scala
Scala
apache-2.0
1,450
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
holdenk/spark-testing-base
src/main/2.0/scala/org/apache/spark/Logging.scala
Scala
apache-2.0
973
import scala.quoted._ object Macros { inline def blackbox: Int = ${one} transparent inline def whitebox: Int = ${one} private def one(using Quotes): Expr[Int] = Expr(1) }
dotty-staging/dotty
tests/run-macros/whitebox-inline-macro/Macro_1.scala
Scala
apache-2.0
182
package base.utils import java.text.SimpleDateFormat import java.util.{Date, TimeZone} import base.controllers.EnvironmentAll import base.MyConfigImplicit._ import org.apache.commons.lang3.StringEscapeUtils import play.twirl.api.{Html, JavaScript} object Formatter { def date(d: Date, format: String = "MM/dd/yyyy h...
tarasbilinsky/tam
app/base/utils/Formatter.scala
Scala
apache-2.0
1,709
/** * ____ __ ____ ____ ____,,___ ____ __ __ ____ * ( _ \ /__\ (_ )(_ _)( ___)/ __) ( _ \( )( )( _ \ Read * ) / /(__)\ / /_ _)(_ )__) \__ \ )___/ )(__)( ) _ < README.txt * (_)\_)(__)(__)(____)(____)(____)(___/ (__) (______)(____/ LICENSE.txt */ package ...
razie/diesel-hydra
diesel/src/main/scala/razie/hosting/WikiReactors.scala
Scala
apache-2.0
11,766
/** * This file is part of the TA Buddy project. * Copyright (c) 2014 Alexey Aksenov ezh@ezh.msk.ru * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Global License version 3 * as published by the Free Software Foundation with the addition of t...
digimead/digi-TABuddy-desktop
part-logic/src/main/scala/org/digimead/tabuddy/desktop/logic/script/Cache.scala
Scala
agpl-3.0
5,297
package me.archdev.restapi package object core { type UserId = String type AuthToken = String final case class AuthTokenContent(userId: UserId) final case class AuthData(id: UserId, username: String, email: String, password: String) { require(id.nonEmpty, "id.empty") require(username.nonEmpty, "u...
ArchDev/akka-http-rest
src/main/scala/me/archdev/restapi/core/package.scala
Scala
mit
936
package dotty.tools package dotc package core package tasty import Contexts._, Symbols._, Types._, Scopes._, SymDenotations._, Names._, NameOps._ import StdNames._, Denotations._, Flags._, Constants._, Annotations._ import util.Positions._ import ast.{tpd, Trees, untpd} import Trees._ import Decorators._ import TastyU...
densh/dotty
src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
Scala
bsd-3-clause
35,421
package slinky.native import slinky.core.ExternalComponent import slinky.core.annotations.react import scala.scalajs.js import scala.scalajs.js.annotation.JSImport @react object SafeAreaView extends ExternalComponent { case class Props(style: js.UndefOr[js.Object] = js.undefined) @js.native @JSImport("react-n...
shadaj/slinky
native/src/main/scala/slinky/native/SafeAreaView.scala
Scala
mit
421
/* * 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.nscplugin.test import org...
scala-js/scala-js
compiler/src/test/scala/org/scalajs/nscplugin/test/BinaryCompatTest.scala
Scala
apache-2.0
1,568
import _root_.io.gatling.core.scenario.Simulation import ch.qos.logback.classic.{Level, LoggerContext} import io.gatling.core.Predef._ import io.gatling.http.Predef._ import org.slf4j.LoggerFactory import scala.concurrent.duration._ /** * Performance test for the Measurement entity. */ class MeasurementGatlingTest ...
poolebu/healthlog
src/test/gatling/simulations/MeasurementGatlingTest.scala
Scala
mit
3,454
package com.technophobia.substeps.domain.events /** * @author rbarefield */ class DomainEventPublisher { def publish(event: SubstepsDomainEvent) { DomainEventPublisher.subscribers.get().foreach(_.handle(event)) } def subscribe(subscriber: DomainEventSubscriber) { val subscribers = DomainEventPublis...
G2G3Digital/substeps-scala-core
src/main/scala/com/technophobia/substeps/domain/events/DomainEventPublisher.scala
Scala
lgpl-3.0
671
package leibniz import leibniz.inhabitance.Proposition import leibniz.internal.Unsafe import leibniz.variance.{Contravariant, Covariant} sealed abstract class As1[A, B] { ab => type Upper >: A type Lower <: (B with Upper) def lower: A === Lower def upper: B === Upper def loosen: A <~< B = { type f1[x]...
alexknvl/leibniz
src/main/scala/leibniz/As1.scala
Scala
mit
1,779
package com.sksamuel.elastic4s import org.elasticsearch.action.termvector.{TermVectorRequestBuilder, TermVectorResponse} import org.elasticsearch.client.Client import scala.concurrent.Future trait TermVectorDsl { def termVector(index: String, `type`: String, id: String) = TermVectorDefinition(index, `type`, id) ...
ExNexu/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/TermVectorDsl.scala
Scala
apache-2.0
2,577
/* ___ _ ___ _ _ *\\ ** / __| |/ (_) | | Your SKilL scala Binding ** ** \\__ \\ ' <| | | |__ generated: 01.02.2019 ...
skill-lang/skill
src/main/scala/de/ust/skill/sir/api/internal/F_CustomFieldOption_name.scala
Scala
bsd-3-clause
5,845
/** * CopyrightΒ (c)Β 2016 IntelΒ CorporationΒ  * * 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Β applicabl...
aayushidwivedi01/spark-tk
sparktk-core/src/test/scala/org/trustedanalytics/sparktk/frame/internal/rdd/FrameRddTest.scala
Scala
apache-2.0
4,762
package com.ing.baker.il import com.ing.baker.compiler.RecipeCompiler import com.ing.baker.recipe.TestRecipe._ import com.ing.baker.recipe.scaladsl.Recipe import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpecLike import scala.language.postfixOps class RecipeVisualizerSpec extends An...
ing-bank/baker
core/akka-runtime/src/test/scala/com/ing/baker/il/RecipeVisualizerSpec.scala
Scala
mit
2,131
/* * Copyright (C) 2005, The Beangle Software. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
beangle/data
orm/src/main/scala/org/beangle/data/orm/Naming.scala
Scala
lgpl-3.0
1,491
/* * Copyright 2022 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/vat-registration-frontend
app/controllers/registration/returns/SendEUGoodsController.scala
Scala
apache-2.0
3,015
package se.digiplant.imagemagick.plugin import org.specs2.mutable.Around import org.specs2.specification.Scope import org.specs2.execute.{AsResult, Result} import play.api.test._ import play.api.test.Helpers._ import java.io.File import org.apache.commons.io.FileUtils import util.Random trait ScalrContext extends Aro...
digiPlant/play-imagemagick
test/se/digiplant/imagemagick/plugin/Spec.scala
Scala
mit
1,561
package lila.study import scala.util.chaining._ import chess.format.pgn.{ Tag, TagType, Tags } object PgnTags { def apply(tags: Tags): Tags = tags pipe filterRelevant pipe removeContradictingTermination pipe sort def setRootClockFromTags(c: Chapter): Option[Chapter] = c.updateRoot { _.setClockAt(c.tags...
luanlv/lila
modules/study/src/main/PgnTags.scala
Scala
mit
1,487
import com.google.inject.AbstractModule import services._ /** * This class is a Guice module that tells Guice how to bind several * different types. This Guice module is created when the Play * application starts. * Play will automatically use any class called `Module` that is in * the root package. You ca...
alexandremenif/tal-gantt
app/Module.scala
Scala
mit
599
/** * This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]]. */ // DO NOT EDIT MANUALLY package sbt.protocol.testing /** Called for each class or equivalent grouping. */ final class StartTestGroupEvent private ( val name: String) extends sbt.protocol.testing.TestMessage() with Serial...
Duhemm/sbt
testing/src/main/contraband-scala/sbt/protocol/testing/StartTestGroupEvent.scala
Scala
bsd-3-clause
951
// Copyright (c) 2013-2020 Rob Norris and Contributors // This software is licensed under the MIT License (MIT). // For more information see LICENSE or https://opensource.org/licenses/MIT package doobie.postgres import cats.effect.IO import cats.implicits.catsSyntaxApplicativeId import doobie.ConnectionIO import doob...
tpolecat/doobie
modules/postgres/src/test/scala/doobie/postgres/Issue1512.scala
Scala
mit
2,698
package im.mange.flyby import im.mange.common.{OnShutdown, ProcessRunner} import im.mange.driveby.DriveByConfig object FlyServer { DriveByConfig.flyBinary match { case Some(fly) => { val flyProcess = new ProcessRunner("Fly", fly) flyProcess.start() OnShutdown.execute("Stop Fly", () => flyProce...
alltonp/driveby
src/main/scala/im/mange/flyby/FlyServer.scala
Scala
apache-2.0
1,730
/* * 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-commons/src/test/scala/io/gatling/BaseSpec.scala
Scala
apache-2.0
952
package com.sksamuel.elastic4s.streams import akka.actor.ActorSystem import com.sksamuel.elastic4s.jackson.ElasticJackson import com.sksamuel.elastic4s.searches.RichSearchHit import com.sksamuel.elastic4s.testkit.{AbstractElasticSugar, ClassLocalNodeProvider, ElasticSugar} import org.reactivestreams.Publisher import o...
ulric260/elastic4s
elastic4s-streams/src/test/scala/com/sksamuel/elastic4s/streams/ScrollPublisherVerificationTest.scala
Scala
apache-2.0
2,495
package com.twitter.finagle.memcachedx.integration import _root_.java.lang.{Boolean => JBoolean} import java.net.{SocketAddress, InetSocketAddress} import org.jboss.netty.buffer.ChannelBuffers import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.{BeforeAndAfter, FunSuite} impor...
yancl/finagle-6.22.0
finagle-memcachedx/src/test/scala/com/twitter/finagle/memcachedx/integration/KetamaClientTest.scala
Scala
apache-2.0
3,400
package org.eigengo.scalalp.streams import akka.actor.ActorSystem import akka.stream.scaladsl.Flow import akka.stream.{FlowMaterializer, MaterializerSettings} import nak.core.{FeaturizedClassifier, IndexedClassifier} import scala.io.{Codec, Source} object TwentyNewsGroups { import nak.NakContext._ /** * Hol...
eigengo/scala-launchpad
src/main/scala/org/eigengo/scalalp/streams/TwentyNewsGroups.scala
Scala
apache-2.0
4,441
package TutorialSolutions import Chisel._ import scala.collection.mutable.HashMap import scala.util.Random class Parity extends Component { val io = new Bundle { val in = Bool(INPUT) val out = Bool(OUTPUT) } val s_even :: s_odd :: Nil = Enum(2){ UFix() } val state = Reg(resetVal = s_even) when (io.i...
seyedmaysamlavasani/GorillaPP
chisel/chisel-tutorial/src/solutions/Parity.scala
Scala
bsd-3-clause
940
/* * 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-core/src/main/scala/io/gatling/core/action/builder/GroupBuilder.scala
Scala
apache-2.0
1,089
/* * Copyright 2016-2017 original author or 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 applicab...
uts-cic/tap
src/main/scala/tap/message/Exception.scala
Scala
apache-2.0
797
package org.jetbrains.plugins.scala.codeInspection.cast import com.intellij.codeInspection.LocalInspectionTool import org.jetbrains.plugins.scala.codeInspection.ScalaQuickFixTestBase class ScalaRedundantConversionInspectionTest extends ScalaQuickFixTestBase { override protected val classOfInspection: Class[_ <: Loc...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/codeInspection/cast/ScalaRedundantConversionInspectionTest.scala
Scala
apache-2.0
2,611
/* * Derived from https://github.com/spray/spray/blob/v1.1-M7/spray-http/src/main/scala/spray/http/parser/CacheControlHeader.scala * * Copyright (C) 2011-2012 spray.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 ...
hvesalai/http4s
core/src/main/scala/org/http4s/parser/CacheControlHeader.scala
Scala
apache-2.0
2,780
/* * 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/calculations/AccountingPeriodHelper.scala
Scala
apache-2.0
3,270