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 workflow /** * Represents a DAG transformation rule: A transformation from one DAG * to a differently-executed but logically equivalent DAG. * * A rule must also produce execution state for * the new DAG, logically equivalent to the execution state * attached to the old DAG. */ abstract class Rule { /...
tomerk/keystone
src/main/scala/workflow/Rule.scala
Scala
apache-2.0
617
/* * Copyright 2015 Andrei Heidelbacher <andrei.heidelbacher@gmail.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 ...
andrei-heidelbacher/HHBot
src/main/scala/hhbot/crawler/Crawler.scala
Scala
apache-2.0
3,760
/* * 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 ...
Flipkart/zipkin
zipkin-common/src/test/scala/com/twitter/zipkin/common/SpanTest.scala
Scala
apache-2.0
4,277
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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 b...
hpe-cct/cct-tutorial
src/main/scala/tutorial/libcog/operators/Indexing.scala
Scala
apache-2.0
1,850
package com.holdenkarau.spark.testing import org.scalatest.FunSuiteLike import scala.reflect.ClassTag trait TestSuite extends TestSuiteLike with FunSuiteLike { override def assertEmpty[U](arr: Array[U])(implicit CT: ClassTag[U]) = org.scalatest.Assertions.assert(arr.isEmpty) override def assert[U](expected...
mahmoudhanafy/spark-testing-base
src/main/1.3/scala/com/holdenkarau/spark/testing/TestSuite.scala
Scala
apache-2.0
1,543
/** * Copyright (c) 2013, Regents of the University of California * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, ...
andyk/cluster-scheduler-simulator
src/main/scala/Workloads.scala
Scala
bsd-3-clause
6,832
package vexriscv.demo import spinal.core._ import vexriscv.plugin._ import vexriscv.{VexRiscv, VexRiscvConfig, plugin} /** * Created by spinalvm on 15.06.17. */ object GenSmallAndProductiveVfu extends App{ def cpu() = new VexRiscv( config = VexRiscvConfig( plugins = List( new IBusSimplePlugin( ...
SpinalHDL/VexRiscv
src/main/scala/vexriscv/demo/GenSmallAndProductiveVfu.scala
Scala
mit
1,724
/* * 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 * distribute...
wvlet/wvlet
wvlet-core/src/main/scala/wvlet/workflow/macros/LazyF0.scala
Scala
apache-2.0
2,123
package part3 case class 左正(tail: NumL) extends NumL { override def 入队(num: NumL): NumL = 左正(tail.入队(num)) override def methodR(num: NumR): Result = num.methodL(tail) }
djx314/ubw
a50-指对2/src/main/scala/part3/左正.scala
Scala
bsd-3-clause
197
package robot sealed trait Direction object Direction { type South = South.type type East = East.type type North = North.type type West = West.type } case object South extends Direction case object East extends Direction case object North extends Direction case object West extends Direction
memoizr/robot-tlp
src/main/scala/robot/directions.scala
Scala
mit
304
/* * 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 ...
maropu/spark
graphx/src/main/scala/org/apache/spark/graphx/impl/GraphImpl.scala
Scala
apache-2.0
15,219
/* * Copyright 2014, by Benjamin Bertin and Contributors. * * This file is part of CarbonDB-UI project <http://www.carbondb.org> * * CarbonDB-UI 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, either ve...
myclabs/CarbonDB-UI
app/controllers/Security.scala
Scala
gpl-3.0
1,277
package com.nutomic.ensichat.core.messages import java.io.ByteArrayInputStream import com.nutomic.ensichat.core import com.nutomic.ensichat.core.messages import com.nutomic.ensichat.core.messages.body.{Text, ConnectionInfo, ConnectionInfoTest} import com.nutomic.ensichat.core.messages.header.ContentHeaderTest._ impor...
Nutomic/ensichat
core/src/test/scala/com/nutomic/ensichat/core/messages/MessageTest.scala
Scala
mpl-2.0
2,257
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
kimihe/Swallow
swallow-benchmark/HiBench-master/sparkbench/ml/src/main/scala/com/intel/sparkbench/ml/SVDExample.scala
Scala
apache-2.0
3,483
package org.typedsolutions.aws.kinesis import java.util.concurrent.{Future => JFuture} import com.amazonaws.AmazonWebServiceRequest import com.amazonaws.auth.BasicAWSCredentials import com.amazonaws.internal.StaticCredentialsProvider import org.mockito.invocation.InvocationOnMock import org.mockito.stubbing.Answer im...
mattroberts297/akka-kinesis
src/test/scala/org/typedsolutions/aws/kinesis/AmazonKinesisClientSpec.scala
Scala
mit
13,589
import cats.effect._ import monix.eval._ object Launcher extends TaskApp { def run(args: List[String]): Task[ExitCode] = args.toList match { case List("EchoBot", token) => new EchoBot(token).run().as(ExitCode.Success) case List(name, _) => Task.raiseError(new Exception(s"Unknown bot ...
mukel/telegrambot4s
examples/src-monix/Launcher.scala
Scala
apache-2.0
428
package com.sk.app.proxmock.application.domain.conditions import com.jayway.restassured.RestAssured._ import com.sk.app.proxmock.BaseIntegrationTest import org.hamcrest.Matchers._ /** * Created by szymo on 25/11/2016. */ class AlwaysTrueConditionTest extends BaseIntegrationTest("/mock") { val expectedBody = "al...
szymonkudzia/proxmock
sources/src/test/scala/com/sk/app/proxmock/application/domain/conditions/AlwaysTrueConditionTest.scala
Scala
mit
908
package org.atnos.eff.macros import scala.annotation.{StaticAnnotation, compileTimeOnly} import scala.reflect.api.Trees import scala.reflect.macros.blackbox @compileTimeOnly("enable macro paradise to expand macro annotations") class eff extends StaticAnnotation { def macroTransform(annottees: Any*): Any = macro Eff...
atnos-org/eff-cats
macros/src/main/scala/org/atnos/eff/macros/EffMacros.scala
Scala
mit
15,464
/* * Copyright 2019 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-examples/src/main/scala/com/spotify/scio/examples/extra/AvroExample.scala
Scala
apache-2.0
4,823
package korolev.blazeServer /** * @author Aleksey Fomkin <aleksey.fomkin@gmail.com> */ import org.http4s.blaze.pipeline._ import org.http4s.blaze.util.Execution.trampoline import org.http4s.blaze.pipeline.stages.SerializingStage import org.http4s.websocket.WebsocketBits.WebSocketFrame import scala.util.Failure im...
PhilAndrew/JumpMicro
JMCloner/src/main/scala/korolev/blazeServer/WebSocketStage.scala
Scala
mit
1,474
/* * 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 ...
jackylk/incubator-carbondata
integration/spark/src/test/scala/org/apache/spark/carbondata/restructure/vectorreader/ChangeDataTypeTestCases.scala
Scala
apache-2.0
8,557
import leon.lang._ object ArrayAliasing5 { def f1(a: Array[BigInt], b: Array[BigInt]): Unit = { require(a.length > 0 && b.length > 0) a(0) = 10 b(0) = 20 } ensuring(_ => a(0) == 10 && b(0) == 20) def callWithAliases(): Unit = { val a = Array[BigInt](0,0,0,0) f1(a, a) } }
regb/leon
src/test/resources/regression/xlang/error/ArrayAliasing5.scala
Scala
gpl-3.0
306
/* * 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 * *...
vnkmr7620/kojo
KojoEnv/src/net/kogics/kojo/core/Turtle.scala
Scala
gpl-3.0
707
/* * 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...
jedesah/Quasar
core/src/test/scala/quasar/fs/mount/MountConfigSpec.scala
Scala
apache-2.0
3,020
// // CellType.scala -- Scala object CellType // Project OrcScala // // Created by dkitchin on Dec 1, 2010. // // Copyright (c) 2018 The University of Texas at Austin. All rights reserved. // // Use and redistribution of this file is governed by the license terms in // the LICENSE file found in the project's top-level ...
orc-lang/orc
OrcScala/src/orc/lib/state/types/CellType.scala
Scala
bsd-3-clause
984
package shared import diode.Action case class Model(tree: Tree) { } case class Tree(children: Seq[Elem]) { override def toString: String = { if (children.size == 1 && !children.head.isRelation) children.head.toString else { children.map(_.toString).toString.replace("List", "").replace("Vector...
reqT/reqT-webapp
shared/src/main/scala/shared/AppModel.scala
Scala
apache-2.0
5,586
package scalaoauth2.provider class ProtectedResourceRequest(headers: Map[String, Seq[String]], params: Map[String, Seq[String]]) extends RequestBase(headers, params) { def oauthToken: Option[String] = param("oauth_token") def accessToken: Option[String] = param("access_token") def requireAccessToken: String =...
lifeway/scala-oauth2-provider
src/main/scala/scalaoauth2/provider/ProtectedResourceRequest.scala
Scala
mit
352
package at.vizu.s2n.types import at.vizu.s2n.error.TypeErrors import at.vizu.s2n.log.Profiler.profile import at.vizu.s2n.log.Trace import at.vizu.s2n.types.symbol._ import com.typesafe.scalalogging.LazyLogging import scala.reflect.runtime.universe._ /** * Phil on 20.11.15. */ object TypeInference extends LazyLog...
viZu/nasca
src/main/scala/at/vizu/s2n/types/TypeInference.scala
Scala
apache-2.0
6,196
/******************************************************************************* * 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://...
takezoux2/squeryl-experimental
src/main/scala/org/squeryl/internals/FieldTypeHandler.scala
Scala
apache-2.0
3,510
package models.reporting import play.api.libs.json.{Format, Json} case class KdReport( totalArea: Double, perimeterSecurity: Double, theftProtection: Double, fireProtection: Double, waterDamageAssessment: Double, routinesAndContingencyPlan: Double ) object KdReport { implicit val format: F...
MUSIT-Norway/musit
service_backend/app/models/reporting/KdReport.scala
Scala
gpl-2.0
366
package demy.util; object implicits { implicit class IterableUtil[T](val elems: Iterable[T]) { def topN(n:Int, smallest:(T, T) => Boolean) = { elems.toSeq.sortWith((a, b) => smallest(b, a)).take(n) } } implicit class IteratorToJava[T](it: Iterator[T]) { def toJavaEnumeration = EnumerationFro...
forchard-epi/demy
core/src/main/scala/util/implicits.scala
Scala
bsd-3-clause
340
package com.rossabaker.sbt.gpg import _root_.sbt._ import Process._ import scala.xml._ trait GpgPlugin extends BasicManagedProject { def gpgCommand: String = "gpg" lazy val skipGpgSign = systemOptional[Boolean]("gpg.skip", true).value lazy val sign = signAction val signaturesConfig = config("signatures") ...
rossabaker/sbt-gpg-plugin
src/main/scala/GpgPlugin.scala
Scala
bsd-3-clause
2,373
/* * This software is licensed under the GNU Affero General Public License, quoted below. * * This file is a part of PowerAPI. * * Copyright (C) 2011-2014 Inria, University of Lille 1. * * PowerAPI is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public Lice...
rouvoy/powerapi
powerapi-core/src/test/scala/org/powerapi/module/libpfm/cycles/LibpfmCoreCyclesFormulaSuite.scala
Scala
agpl-3.0
4,913
package editor import editor.model.Model import editor.gui.ResponseEditControl object ResponseEditor { def main(args: Array[String]) { val model = new Model new ResponseEditControl(model) } }
gregwk/clay-pot
Game_Editor/src/editor/ResponseEditor.scala
Scala
mit
205
package im.rore.zkms class ZkmsException(message: String, cause: Throwable) extends Exception(message, cause) { def this(message: String) = this(message, null) } class NoSubscribersException(val topic: String) extends ZkmsException("No subscribers for topic: " + topic) { } class AlreadySubscribedException(val topi...
rore/zkms
src/main/scala/im/rore/zkms/exceptions.scala
Scala
apache-2.0
398
/* * 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 ...
amirakhmedov/ignite
modules/spark/src/test/scala/org/apache/ignite/spark/IgniteDataFrameSchemaSpec.scala
Scala
apache-2.0
4,299
/* * 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
external/kafka/src/main/scala/org/apache/spark/streaming/kafka/KafkaRDDPartition.scala
Scala
apache-2.0
1,695
/* * Copyright (C) 2017 HAT Data Exchange Ltd * SPDX-License-Identifier: AGPL-3.0 * * This file is part of the Hub of All Things project (HAT). * * HAT is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License * as published by the Free Software Founda...
Hub-of-all-Things/HAT2.0
hat/app/org/hatdex/hat/utils/HatBodyParsers.scala
Scala
agpl-3.0
1,861
package leo.agents import leo.datastructures.Pretty import leo.datastructures.blackboard._ /** * Interface to any agent in the architecture. * Contains * <ul> * <li> Activation Controls, to enable / disable the agent </li> * <li> Offers an execution mechanism to the action of the agent </li> * <li> Support th...
lex-lex/Leo-III
oldsrc/main/scala/leo/datastructures/agents/Agent.scala
Scala
bsd-3-clause
6,177
package org.veripacks.data.t3.p32 class Class321
adamw/veripacks
verifier/src/test/scala/org/veripacks/data/t3/p32/Class321.scala
Scala
apache-2.0
50
package endpoints package documented package algebra import scala.language.higherKinds /** * Algebra interface for describing requests. * * This interface is modeled after [[endpoints.algebra.Requests]] but some * methods take additional parameters carrying documentation. */ trait Requests extends Urls with...
Krever/endpoints
openapi/openapi/src/main/scala/endpoints/documented/algebra/Requests.scala
Scala
mit
1,916
/******************************************************************************* * Copyright 2017 Capital One Services, LLC and Bitwise, 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...
capitalone/Hydrograph
hydrograph.engine/hydrograph.engine.spark/src/main/scala/hydrograph/engine/spark/components/adapter/ExecutionTrackingAdapter.scala
Scala
apache-2.0
1,999
package com.github.fellowship_of_the_bus package eshe package state package ui import org.newdawn.slick.{GameContainer, Graphics, Color, Input} import org.newdawn.slick.state.{StateBasedGame} import org.newdawn.slick.util.InputAdapter import game.GameObject import game.IDMap._ class ControllerInput(g: game.Game, gc...
Fellowship-of-the-Bus/Elder-Strolls-Hallows-Eve
src/main/scala/state/ui/ControllerInput.scala
Scala
apache-2.0
6,772
/* * 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 ...
wangmiao1981/spark
sql/core/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryManager.scala
Scala
apache-2.0
16,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 ...
h2oai/sparkling-water
scoring/src/main/scala/ai/h2o/sparkling/ml/models/H2OMOJOReader.scala
Scala
apache-2.0
1,986
package com.donniewest.titan.tent import com.donniewest.titan.tent.{Post, Authentication} object Client { def authenticateServer(entity: String) { // Uses chosen entity to authenticate with server Authentication.one_leg_login(entity) } def sendPost(content: String) { // sends simple status post gi...
DonnieWest/Titan
src/main/scala/com/donniewest/titan/tent/Client.scala
Scala
apache-2.0
469
/* * 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
sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala
Scala
apache-2.0
34,005
/* * Copyright 2014, by Vladimir Kostyukov and Contributors. * * This file is a part of a Finch library that may be found at * * https://github.com/finagle/finch * * Licensed under the Apache License, Version 2.0 (the "License"); * You may not use this file except in compliance with the License. * You may...
trane/finch
json/src/main/scala/io/finch/json/Json.scala
Scala
apache-2.0
8,450
package com.twitter.finagle.thrift import org.apache.thrift.TApplicationException import org.apache.thrift.protocol.{TMessageType, TProtocolFactory} import org.jboss.netty.buffer.{ChannelBuffer, ChannelBuffers} import org.jboss.netty.channel._ import org.jboss.netty.handler.codec.replay.{ReplayingDecoder, VoidEnum} ...
lysu/finagle
finagle-thrift/src/main/scala/com/twitter/finagle/thrift/legacy/ThriftClientCodec.scala
Scala
apache-2.0
2,802
/* * 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 ...
dbtsai/spark
sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala
Scala
apache-2.0
37,176
/* Copyright 2015 White Label Personal Clouds Pty Ltd * * 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...
welcomer/framework
src/main/scala/me/welcomer/framework/evented/EventedResultNg.scala
Scala
apache-2.0
10,459
package breeze.linalg import breeze.benchmark.{MyRunner, BreezeBenchmark} import spire.syntax.cfor._ /** * Created by dlwh on 8/14/15. */ class SqDistBenchmark extends BreezeBenchmark { assert(usingNatives) val x1, x2 = DenseMatrix.rand(20, 200) def timeCopying(reps: Int) = { cforRange(0 until reps) { i...
chen0031/breeze
benchmark/src/main/scala/breeze/linalg/SqDistBenchmark.scala
Scala
apache-2.0
2,909
/* * 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 ...
matthewfranglen/spark
sql/core/v1.2/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilters.scala
Scala
mit
12,462
/* * Copyright 2011-2018 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 applic...
wiacekm/gatling
gatling-commons/src/main/scala/io/gatling/commons/util/Collections.scala
Scala
apache-2.0
913
package org.jetbrains.plugins.scala package editor.smartEnter.fixers import com.intellij.openapi.editor.Editor import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.editor.smartEnter.ScalaSmartEnterProcessor /** * @author Ksenia.Sautina * @since 1/28/13 */ trait ScalaFixer { def apply(editor: Ed...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/editor/smartEnter/fixers/ScalaFixer.scala
Scala
apache-2.0
389
package org.joda.time.tz import java.util.Set import org.joda.time.DateTimeZone trait Provider { def getZone(id: String): DateTimeZone def getAvailableIDs(): Set[String] }
mdedetrich/soda-time
shared/src/main/scala/org/joda/time/tz/Provider.scala
Scala
bsd-2-clause
180
package main import utilities.{CubicCurve, MyMath} case class WidthCurve(curve: CubicCurve, widthFunc: Double => Double) object WidthCurve { def linearThickness(s: LetterSeg) = WidthCurve(s.curve, MyMath.linearInterpolate(s.startWidth, s.endWidth)) }
MrVPlusOne/Muse-CGH
src/main/WidthCurve.scala
Scala
mit
257
package sml.instructions import sml.Machine /** * Subtract the value at op2 from value at op1 and store the * result in specified register */ case class SubInstruction(label: String, opcode: String, result: Int, op1: Int, op2: Int) extends MathInstruction { /** * @see Instruction#execute(m: Machine) ...
BBK-PiJ-2015-67/sdp-portfolio
coursework/cw-one/src/main/scala/sml/instructions/SubInstruction.scala
Scala
unlicense
662
/* * 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 ...
caneGuy/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/DDLParserSuite.scala
Scala
apache-2.0
62,997
/* * 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 * distribute...
haghard/nosql-join-stream
src/test/scala/mongo/channel/test/join/AkkaJoinCassandraSpec.scala
Scala
apache-2.0
3,253
package ucesoft.cbm.formats.cart import ucesoft.cbm.{ChipID, Log} import ucesoft.cbm.cpu.Memory import ucesoft.cbm.formats.Cartridge import ucesoft.cbm.formats.ExpansionPortFactory.CartridgeExpansionPort import ucesoft.cbm.misc.M93C86 import java.io.{ObjectInputStream, ObjectOutputStream} import java.util.Properties ...
abbruzze/kernal64
Kernal64/src/ucesoft/cbm/formats/cart/GMOD2.scala
Scala
mit
2,106
package spider package spider3w3n import java.io._ import spider.Util.{ splitSeq, getStackTraceString } import spider.Util.DateTimeUtil.{ trivialInterval, toFormatString } import spider.database._ import spider.database.FarmDB._ import slick.jdbc.JdbcBackend._ import slick.dbio.DBIO import scala.concurrent.{ Fu...
VinaLx/farm-spider
src/main/scala/spider/spider3w3n/runner.scala
Scala
mit
3,583
package rumms package impl import scutil.core.implicits.* import scutil.lang.* import scutil.time.* import scutil.log.* import scjson.ast.* final class Conversation(val id:ConversationId, callbacks:RummsCallbacks) extends Logging { //------------------------------------------------------------------------------ //...
ritschwumm/rumms
src/main/scala/rumms/impl/Conversation.scala
Scala
bsd-2-clause
2,887
package com.twitter.finagle.http.filter import com.twitter.finagle.Service import com.twitter.finagle.http.{Method, Request, Response, Version} import com.twitter.logging.{BareFormatter, Logger, StringHandler} import com.twitter.util.{Await, Future, Time} import org.junit.runner.RunWith import org.scalatest.FunSuite i...
koshelev/finagle
finagle-http/src/test/scala/com/twitter/finagle/http/filter/LoggingFilterTest.scala
Scala
apache-2.0
5,095
package org.bitcoins.core.util import org.bitcoins.core.gen.{ CryptoGenerators, NumberGenerator, StringGenerators } import org.scalacheck.{ Gen, Prop, Properties } /** * Created by chris on 6/20/16. */ class BitcoinSUtilSpec extends Properties("BitcoinSUtilSpec") { property("Serialization symmetry for encodeHex &...
Christewart/bitcoin-s-core
src/test/scala/org/bitcoins/core/util/BitcoinSUtilSpec.scala
Scala
mit
1,115
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
erictu/adam
adam-core/src/test/scala/org/bdgenomics/adam/converters/VariantContextConverterSuite.scala
Scala
apache-2.0
9,882
class A class B def test(x: (A, B) | (B, A)) = x match { case (u: A, v) => (u, v) case (u: B, v) => (v, u) }
som-snytt/dotty
tests/patmat/i8690.scala
Scala
apache-2.0
114
package edu.gemini.qv.plugin.ui import scala.swing._ import scala.swing.Swing.EmptyBorder import scala.swing.GridBagPanel.Fill.{Both, Horizontal} import scala.swing.event.ButtonClicked import edu.gemini.shared.gui.monthview.{DateSelectionMode, MonthView} import edu.gemini.shared.gui.monthview.MonthView.Ymd class Cale...
arturog8m/ocs
bundle/edu.gemini.qv.plugin/src/main/scala/edu/gemini/qv/plugin/ui/CalendarDialog.scala
Scala
bsd-3-clause
2,312
package org.dsa.iot.rx.core import scala.concurrent.duration.{ Duration, DurationInt } import org.dsa.iot.rx.AbstractRxBlock import org.dsa.iot.scala.Having import rx.lang.scala.Observable /** * Emits 0L after the specified delay and completes. * * <img width="640" height="200" src="https://raw.githubusercontent...
IOT-DSA/dslink-scala-ignition
src/main/scala/org/dsa/iot/rx/core/Timer.scala
Scala
apache-2.0
950
/* * 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...
asorianostratio/incubator-toree
kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/relay/ExecuteRequestRelay.scala
Scala
apache-2.0
4,270
/* * 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 ...
irudyak/ignite
modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheResetLostPartitionsCommand.scala
Scala
apache-2.0
3,848
/* * 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/test/scala/uk/gov/hmrc/ct/accounts/frs102/calculations/BalanceSheetCreditorsCalculatorSpec.scala
Scala
apache-2.0
2,450
package renesca.schema // HyperRelations behave like Nodes and Relations at the same time. // This allows to create a Relation between a Node and a HyperRelation. import renesca.{graph => raw} //TODO: sealed trait Item and AbstractRelation? trait Item { def rawItem: raw.Item override def equals(other: Any): Boo...
renesca/renesca
shared/src/main/scala/renesca/schema/Item.scala
Scala
apache-2.0
5,647
package t12717 object Test: val x = X.doSomething("XXX") // error
dotty-staging/dotty
tests/neg-custom-args/hidden-type-errors/Test.scala
Scala
apache-2.0
72
/*********************************************************************** * Copyright (c) 2013-2019 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...
elahrvivaz/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/audit/AccumuloEventReader.scala
Scala
apache-2.0
2,009
package net.javachallenge.scene import net.javachallenge.entity.Game import net.javachallenge.printer.Printer import net.javachallenge.util.internationalization.I18n import net.javachallenge.entity.Material import net.javachallenge.util.misc.IntStr import net.javachallenge.util.misc.IndexStr import net.javachallenge.u...
AI-comp/JavaChallenge2012
src/main/scala/net/javachallenge/scene/MainScene.scala
Scala
apache-2.0
7,602
package com.twitter.inject.app.tests import com.twitter.inject.Logging import javax.inject.Inject class SampleManager @Inject()( sampleService: SampleService) extends Logging { def start() { info("SampleManager started") val response = sampleService.sayHi("yo") info("Service said " + response) } ...
tom-chan/finatra
inject/inject-app/src/test/scala/com/twitter/inject/app/tests/SampleManager.scala
Scala
apache-2.0
322
package org.tearne.crosser.config import org.scalatest.junit.AssertionsForJUnit import org.junit.Test import java.nio.file.Paths import org.scalatest.FreeSpec class ConfigFactoryTest extends FreeSpec { "ConfigFactory should" - { val expected = "MyCross" "parse a 'human' config without error" in { val path...
tearne/Crosser
src/test/scala/org/tearne/crosser/config/ConfigFactoryTest.scala
Scala
apache-2.0
664
package us.stivers.blue.codec import scala.annotation.{implicitNotFound} import scalax.util.{Try,Success,Failure} /** * Converts A to B. */ @implicitNotFound("Cannot find Converter for ${A} -> ${B} ") trait Converter[A,B] extends (A=>Try[B]) /** * Encodes A into B. Decodes A from B. */ @implicitNotFound("Cannot ...
cstivers78/blue
blue-core/src/main/scala/us/stivers/blue/codec/Codec.scala
Scala
apache-2.0
554
package im.actor.server.bot.services import akka.actor.ActorSystem import im.actor.api.rpc.PeersImplicits import im.actor.bots.BotMessages.BotError import im.actor.concurrent.FutureResult import im.actor.server.bot.{ BotServiceBase, BotToApiConversions } import im.actor.server.db.DbExtension import im.actor.server.dia...
EaglesoftZJ/actor-platform
actor-server/actor-bots/src/main/scala/im/actor/server/bot/services/MessagingBotService.scala
Scala
agpl-3.0
2,621
package tests.orm import org.scalatest._ import org.scalatest.matchers.ShouldMatchers import relational.orm._ class MappingTest extends WordSpec with tests.DatabaseSetup with ShouldMatchers { class Person(p: (Symbol, Any) *) extends Mapping { val mappings = Map(p: _*) val name = attr('name).as[Property, S...
mauricioszabo/relational-scala
src/test/scala/relational/orm/MappingTest.scala
Scala
artistic-2.0
890
package mesosphere.marathon package core.task.tracker.impl import akka.Done import akka.stream.scaladsl.Source import mesosphere.AkkaUnitTest import mesosphere.marathon.core.instance.{Instance, TestInstanceBuilder} import mesosphere.marathon.core.task.tracker.InstanceTracker import mesosphere.marathon.state.{AbsoluteP...
mesosphere/marathon
src/test/scala/mesosphere/marathon/core/task/tracker/impl/InstancesLoaderImplTest.scala
Scala
apache-2.0
7,111
/*********************************************************************** * Copyright (c) 2013-2020 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...
aheyne/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/filter/TestFilters.scala
Scala
apache-2.0
17,638
package org.denigma.kappa.notebook.views.visual.rules import org.denigma.kappa.notebook.graph.layouts.{Force, ForceLayout} import org.denigma.kappa.notebook.graph.layouts.LayoutMode.LayoutMode import rx._ import org.denigma.binding.extensions._ import org.denigma.kappa.notebook.graph.{ChangeableEdge, KappaEdge, KappaN...
antonkulaga/kappa-notebook
app/js/src/main/scala/org/denigma/kappa/notebook/views/visual/rules/RulesForceLayout.scala
Scala
mpl-2.0
825
/* * Copyright (C) 2016 Department for Business, Energy and Industrial Strategy * * This program 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, either version 3 of the License, or * (at your option) an...
UKGovernmentBEIS/rifs-frontend-play
src/main/scala/controllers/ApplicationData.scala
Scala
gpl-3.0
1,511
package scaffvis.client.util import org.scalajs.dom.{Blob, BlobPropertyBag, URL} import scala.scalajs.js import scala.scalajs.js.JSConverters._ import scala.scalajs.js.URIUtils import scala.scalajs.js.typedarray.Uint8Array object DataUrl { val contentType = "application/octet-stream" private val UTF8 = "UTF-8" ...
velkoborsky/scaffvis
client/src/main/scala/scaffvis/client/util/DataUrl.scala
Scala
gpl-3.0
736
import collection.immutable._ object Test { def main(args: Array[String]) { val treemap = TreeMap(1 -> 2, 3 -> 4) ++ TreeMap(5 -> 6) (treemap: TreeMap[Int, Int]) } }
loskutov/intellij-scala
testdata/scalacTests/pos/t4112.scala
Scala
apache-2.0
183
/* * Licensed to Intel Corporation under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * Intel Corporation licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use t...
dding3/BigDL
dl/src/main/scala/com/intel/analytics/bigdl/nn/L1Cost.scala
Scala
apache-2.0
2,107
package com.github.akileev.akka.serial.io import akka.actor._ import akka.util.ByteStringBuilder import com.github.akileev.akka.serial.io.Serial._ import jssc.{SerialPort, SerialPortEvent, SerialPortEventListener} private[io] class SerialOperator(port: SerialPort, handler: ActorRef) extends Actor { private case cla...
akileev/akka-serial-io
src/main/scala/com/github/akileev/akka/serial/io/SerialOperator.scala
Scala
apache-2.0
1,543
package org.moe.runtime import org.scalatest.FunSuite import org.scalatest.BeforeAndAfter class MoeMethodTestSuite extends FunSuite with BeforeAndAfter { var r : MoeRuntime = _ before { r = new MoeRuntime() r.bootstrap() } test("... basic method") { val env = r.getRootEnv val invocant ...
MoeOrganization/moe
src/test/scala/org/moe/runtime/MoeMethodTestSuite.scala
Scala
mit
552
package com.sdhu.elasticsearchprediction.spark import com.mahisoft.elasticsearchprediction._ import utils.DataProperties import classifier.GenericClassifier import plugin.engine.PredictorEngine class Spark_Trainer(dp: DataProperties) { def getSparkGenericTrainer: SparkGenericTrainer[_] = { val config = Spark...
sdhu/elasticsearch-prediction-spark
src/main/scala/SparkEntry.scala
Scala
apache-2.0
1,752
import scala.io.Source object Things { def loadFile(file:String) : (Array[String], Iterator[Array[String]]) = { val iter = Source.fromFile(file).getLines().map(_.split('\\t')) return (iter.next(), iter) } def getThings(file: String) : Map[String, Map[String, String]] = { val (fields, iter) = loadFil...
HokieGeek/catacombs
Things.scala
Scala
mit
2,207
/* * Copyright 2009-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 applicable law o...
geggo98/json4s
tests/src/test/scala/org/json4s/NullErrorHandlingSpec.scala
Scala
apache-2.0
2,260
import java.net.URLClassLoader import java.io.File import java.util.{EnumSet, Set, HashSet} import org.apache.logging.log4j.LogManager import xsbti._ import xsbti.api.ClassLike import xsbti.api.DependencyContext import xsbti.compile.DependencyChanges import sbt.internal.util.ManagedLogger import sbt.internal.inc.Fr...
dotty-staging/dotty
sbt-test/sbt-bridge/zinc-13-compat/src/main/scala/Main.scala
Scala
apache-2.0
2,360
package api import models._ import scala.concurrent.Future trait GamesService { def search(query: String): Future[List[Game]] def get(gameName: String): Future[Option[Game]] } trait UserService { def getByEmail(email: String): Future[Option[User]] def updateUser(newUser: User): Future[Boolean] def getU...
salceson/toik-games-price-comparator
app/api/Services.scala
Scala
mit
472
package edu.rit.csh.wikiData import org.apache.spark import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spark.SparkConf import scala.collection.mutable.ListBuffer import scala.collection.JavaConversions._ import java.util.Date import java.text.SimpleDateFormat /** * Finds...
JDrit/AnomalyDetection
src/main/scala/edu/rit/csh/wikiData/TotalViews.scala
Scala
apache-2.0
1,038
package code.model.repository import code.model.base.CrudExampleBaseRepository import org.crudible.core.model.TokenInputRepository import org.crudible.core.model.ModelWithRepresentationAndIdentity import scala.collection.JavaConversions._ import scala.collection.JavaConverters._ import org.jooq.impl.DSL._ import net.l...
rehei/crudible
crudible-lift-example/src/main/scala/code/model/repository/UserRepository.scala
Scala
apache-2.0
865
package code package snippet import net.liftmodules.extras.snippet._ object Notices extends BsAlerts
hacklabcbba/antipodiza.me
src/main/scala/code/snippet/Notices.scala
Scala
apache-2.0
103
/* * Copyright 2013 http4s.org * * 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 i...
http4s/http4s
tests/shared/src/test/scala/org/http4s/HttpVersionSuite.scala
Scala
apache-2.0
1,570
package org.scalamu.core.utils import java.io.{IOException, InputStream, OutputStream} import java.nio.charset.Charset import java.nio.file._ import java.nio.file.attribute.BasicFileAttributes import scala.collection.JavaConverters._ import scala.reflect.io.AbstractFile import scala.util.Try import scala.util.control...
sugakandrey/scalamu
core/src/main/scala/org/scalamu/core/utils/FileSystemUtils.scala
Scala
gpl-3.0
3,041