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
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/library/scala/collection/mutable/ArrayStack.scala
Scala
bsd-3-clause
7,282
/* * Copyright 2012-2014 Comcast Cable Communications Management, 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 * * Unl...
weggert/sirius
src/main/scala/com/comcast/xfinity/sirius/uberstore/segmented/SegmentedCompactor.scala
Scala
apache-2.0
6,342
package japgolly.scalajs.benchmark.client /** * This tests usage from a library-consumer's point-of-view. * * Imports are used as advertised. * If the imports, implicits, and expectations all pass compilation, then test is a success. */ class UsageTest { object BMs { import japgolly.scalajs.benchmark....
japgolly/scalajs-benchmark
benchmark/src/test/scala/japgolly/scalajs/benchmark/client/UsageTest.scala
Scala
apache-2.0
1,424
package lila.tournament package arena import lila.common.Maths import lila.tournament.{ Score => AbstractScore } import lila.tournament.{ ScoringSystem => AbstractScoringSystem } object ScoringSystem extends AbstractScoringSystem { sealed abstract class Flag(val id: Int) case object Double extends Flag(3) case ...
JimmyMow/lila
modules/tournament/src/main/arena/ScoringSystem.scala
Scala
mit
2,175
/* * Copyright 2015 PayPal * * 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 ...
keshin/squbs
squbs-pattern/src/main/scala/org/squbs/pattern/timeoutpolicy/MathUtil.scala
Scala
apache-2.0
4,315
package latis.reader.tsml import latis.reader.tsml.ml.Tsml import latis.dm._ import latis.util.DataMapUtils import latis.data.seq.DataSeq import latis.data.Data import java.util.NoSuchElementException import latis.data.set.IndexSet import latis.data.value.DoubleValue import latis.data.value.LongValue /** * Construct...
dlindhol/LaTiS
src/main/scala/latis/reader/tsml/MockAdapter.scala
Scala
epl-1.0
2,514
/* * * 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 * "Licens...
Sotera/distributed-graph-analytics
dga-graphx/src/main/scala/com/soteradefense/dga/graphx/neighboringcommunity/wcc/NeighboringCommunityWCCRunner.scala
Scala
apache-2.0
1,491
package io.scalac.rabbit import scala.concurrent.ExecutionContext import akka.stream.scaladsl.Flow import akka.util.ByteString import com.typesafe.scalalogging.slf4j.LazyLogging import io.scalac.amqp.{Delivery, Message, Routed} import io.scalac.rabbit.RabbitRegistry._ /** * This is our flow factory. * * Here...
Ralph-Zitz/rabbitmq_akka
src/main/scala/io/scalac/rabbit/FlowFactory.scala
Scala
apache-2.0
1,485
/* * 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 * distributed...
asual/summer
samples/scala/src/main/scala/com/asual/summer/sample/convert/MultipartFileToImageConverter.scala
Scala
apache-2.0
1,495
package controllers import java.util.UUID import javax.inject.Inject import com.mohiva.play.silhouette.api._ import com.mohiva.play.silhouette.api.repositories.AuthInfoRepository import com.mohiva.play.silhouette.api.util.{ PasswordHasherRegistry, PasswordInfo } import com.mohiva.play.silhouette.impl.providers.Creden...
serversideapps/silhmojs
server/app/controllers/ResetPasswordController.scala
Scala
apache-2.0
2,393
/* * 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...
qiuxin2012/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/ops/Compare.scala
Scala
apache-2.0
3,134
package net.snowflake.spark.snowflake.pushdowns.querygeneration import net.snowflake.spark.snowflake.{ ConstantString, LongVariable, SnowflakeSQLStatement } import org.apache.spark.sql.catalyst.expressions.{ Abs, Acos, Asin, Atan, Attribute, Ceil, CheckOverflow, Cos, Cosh, Exp, Expression, ...
snowflakedb/spark-snowflakedb
src/main/scala/net/snowflake/spark/snowflake/pushdowns/querygeneration/NumericStatement.scala
Scala
apache-2.0
2,791
package pl.pholda.malpompaaligxilo.form import pl.pholda.malpompaaligxilo.form.errors.RequiredError import pl.pholda.malpompaaligxilo.form.field.{SuccessFieldValidation, FieldValidationResult, ComputeField} import pl.pholda.malpompaaligxilo.i18n.I18nableString case class Field[T]( name: FieldName, caption: I18nab...
pholda/MalpompaAligxilo
core/shared/src/main/scala/pl/pholda/malpompaaligxilo/form/Field.scala
Scala
gpl-3.0
1,626
package scala.scalanative package nir import util.unsupported sealed abstract class Type { def elemty(path: Seq[Val]): Type = (this, path) match { case (_, Seq()) => this case (Type.Struct(_, tys), Val.I32(idx) +: rest) => tys(idx).elemty(rest) case (Type.Array(ty, n), idx +: rest) => ...
phdoerfler/scala-native
nir/src/main/scala/scala/scalanative/nir/Types.scala
Scala
bsd-3-clause
1,578
package model import skinny.orm._, feature._ import scalikejdbc._ import org.joda.time._ case class Pref( id: Long, name: Option[String] = None ) object Pref extends SkinnyCRUDMapper[Pref] { override lazy val tableName = "pref" override lazy val defaultAlias = createAlias("p") override def extract(rs: Wra...
yoshitakes/skinny-task-example
src/main/scala/model/Pref.scala
Scala
mit
399
/* * Copyright (c) 2021, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ package com.krux.hyperion.activity case class RedshiftCopyOption(repr: Seq[String]) objec...
realstraw/hyperion
core/src/main/scala/com/krux/hyperion/activity/RedshiftCopyOption.scala
Scala
bsd-3-clause
2,345
package com.nthportal.euler package h0.t1 object Problem13 extends ProjectEulerProblem { private val numStr = "37107287533902102798797998220837590246510135740250\n46376937677490009712648124896970078050417018260538" + "\n74324986199524741059474233309513058123726617309629\n91942213363574161572522430563301811...
NthPortal/euler-n-scala
src/main/scala/com/nthportal/euler/h0/t1/Problem13.scala
Scala
mit
6,012
/* 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...
patverga/factorie
src/main/scala/cc/factorie/app/nlp/coref/MentionPairLabel.scala
Scala
apache-2.0
16,706
package s99 import org.scalatest.FunSuite import org.scalatest.prop.Checkers import org.scalacheck.Arbitrary._ import org.scalacheck.Prop._ import scala.util.Try class P01Test extends FunSuite with Checkers { import P01._ test("list last check") { check { (a: List[AnyVal]) => if (a.isEmpty) { ass...
hzwuhao8/S99
src/test/scala/s99/P01Test.scala
Scala
apache-2.0
466
package com.twitter.finagle.mux.lease.exp import com.twitter.util.Local import org.scalatest.concurrent.Eventually import org.scalatest.FunSuite trait ExecElsewhere extends FunSuite with Eventually { def exec(setup: () => Unit, nexts: () => Unit*) { val saved = Local.save() val runnable = new Runnable { ...
yancl/finagle-6.22.0
finagle-mux/src/test/scala/com/twitter/finagle/mux/lease/exp/ExecElsewhere.scala
Scala
apache-2.0
626
/* * Copyright (C) 2017 Stratio (http://stratio.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
compae/tiki-takka
discovery/src/main/scala/com/stratio/tikitakka/columbus/consul/ConsulComponent.scala
Scala
apache-2.0
3,727
package be.objectify.deadbolt.scala /** * Indicates the point at which a constraint is applied. See [[DeadboltHandler.onAuthSuccess()]]. * * @author Steve Chaloner (steve@objectify.be) * @since 2.5.1 */ object ConstraintPoint extends Enumeration { type ConstraintPoint = Value val CONTROLLER, FILTER, TEM...
schaloner/deadbolt-2-scala
code/app/be/objectify/deadbolt/scala/ConstraintPoint.scala
Scala
apache-2.0
336
package com.github.rzykov.fastml4j.regression import com.github.rzykov.fastml4j.regression.LinearRegression import org.scalatest._ import com.github.rzykov.fastml4j.util.Implicits._ import org.nd4j.linalg.api.ndarray.INDArray import org.nd4j.linalg.dataset.DataSet import org.scalatest.Matchers._ import org.nd4j.linalg...
rzykov/fastml4j
src/test/scala/com/github/rzykov/fastml4j/regression/LinearRegressionSuite.scala
Scala
apache-2.0
1,972
package org.apache.mesos.chronos import mesosphere.chaos.http.HttpConf import org.apache.mesos.chronos.scheduler.config.SchedulerConfiguration import org.rogach.scallop.ScallopConf object ChronosTestHelper { def makeConfig(args: String*): SchedulerConfiguration with HttpConf = { val opts = new ScallopConf(args)...
rapidoo/chronos
src/test/scala/org/apache/mesos/chronos/ChronosTestHelper.scala
Scala
apache-2.0
513
/** * 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...
sslavic/kafka
core/src/test/scala/unit/kafka/server/ReplicaFetchTest.scala
Scala
apache-2.0
3,010
package gie import net.liftweb.common.{Loggable} import org.bouncycastle.openssl import net.liftweb.util.Props import java.io._ import org.bouncycastle.jce.provider.{X509CertificateObject, BouncyCastleProvider} import java.security.{Signature, MessageDigest} import javax.mail.internet.{MimeMultipart, MimeMessage} impo...
igorge/gbb
src/main/scala/code/gie_security.scala
Scala
gpl-2.0
1,498
/* * Copyright (c) 2017 Lucas Satabin * * 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 writi...
satabin/toolxit-ng
core/src/main/scala/toolxit/util/TrieNode.scala
Scala
apache-2.0
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 ...
techaddict/spark
mllib/src/main/scala/org/apache/spark/ml/feature/Imputer.scala
Scala
apache-2.0
10,377
package com.twitter.diffy.proxy import java.net.InetSocketAddress import com.twitter.app.Flaggable import com.twitter.util.{Duration, Try} case class Settings( datacenter: String, servicePort:InetSocketAddress, candidate: Target, primary: Target, secondary: Target, protocol: String, clientId: String, ...
twitter/diffy
src/main/scala/com/twitter/diffy/proxy/Settings.scala
Scala
apache-2.0
1,662
package gsd.linux.stats import gsd.linux.Combinations object Intersection { /** * @param in An array of n sets * @return An n x n array of sets such that the A[i][j] is the intersection of the ith and jth sets. */ def calculatePairWise[T](in: Array[Set[T]]): Array[Array[Set[T]]] = { val result = Arr...
scas-mdd/linux-variability-analysis-tools
src/main/scala/gsd/linux/stats/Intersection.scala
Scala
gpl-3.0
2,649
package scalamachine.core import scalaz.effect.IO import scalaz.iteratee.{IterateeT, Input, StepT, EnumeratorT} case class MediaInfo(mediaRange: ContentType, qVal: Double, acceptParams: List[(String,String)]) case class ContentType(mediaType: String, params: Map[String, Stri...
stackmob/scalamachine
core/src/main/scala/scalamachine/core/Http.scala
Scala
apache-2.0
10,119
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.testsuite.utils /* This f...
scala-js/scala-js
test-suite/js/src/main/scala-ide-stubs/org/scalajs/testsuite/utils/BuildInfo.scala
Scala
apache-2.0
929
/** * Copyright (C) 2017 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 p...
orbeon/orbeon-forms
form-runner/shared/src/main/scala/org/orbeon/oxf/fr/NodeInfoCell.scala
Scala
lgpl-2.1
5,493
package no.vestein.purplerain.screens import com.badlogic.gdx.utils.Disposable import com.badlogic.gdx.{Game, Screen} abstract class AbstractScreen(protected var game: Game) extends Screen with Disposable { def render(deltaTime: Float) def resize(width: Int, height: Int) def show() def hide() def pause() ...
WoodStone/PurpleRain
core/src/main/scala/no/vestein/purplerain/screens/AbstractScreen.scala
Scala
gpl-3.0
353
package dokutoku.golden_thumb.crop import cpw.mods.fml.relauncher.Side import cpw.mods.fml.relauncher.SideOnly import dokutoku.golden_thumb.lib.WorldType.Nether import dokutoku.golden_thumb.lib.Rarity.Rare import dokutoku.golden_thumb.FX.Effects.metalFXEffect import net.minecraft.world.World import java.util.Random c...
AtomFusion/GoldenThumb
dokutoku/golden_thumb/crop/GlowstoneCrop.scala
Scala
mit
694
package services import models.entities.Zone import models.repositories.ZoneRepositoryComponent import models.tables.Schemas import scala.concurrent.Future trait ZoneServiceComponent extends ZoneRepositoryComponent with Schemas with DBConnection { val zoneService: ZoneService = new ZoneService val zoneRepositor...
wassemgtk/refugeesbook
refugeesbook/app/services/ZoneService.scala
Scala
gpl-3.0
844
package me.m1key.audioliciousmigration.repository import com.google.inject.Inject import me.m1key.audioliciousmigration.persistence.AudioliciousPersistenceProvider import me.m1key.audioliciousmigration.to.SongTo import java.util.ArrayList import scala.collection.mutable.MutableList class PersistenceSongRepository @In...
m1key/audiolicious-migration
src/main/scala/me/m1key/audioliciousmigration/repository/PersistenceSongRepository.scala
Scala
gpl-3.0
2,094
/* * 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 ...
hengyicai/OnlineAggregationUCAS
core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala
Scala
apache-2.0
19,908
import scala.compiletime.ops.any.* object Test { val t32: 1 == 1 = true val t33: 0 == false = false val t34: 10 == "5" = true // error val t35: 10 == 10 = false // error val t35string: "10" == "10" = true val t36: 1 != 1 = false val t37: 0 != 1 = true val t38: false != 5 = false // error val t39: 10...
dotty-staging/dotty
tests/neg/singleton-ops-any.scala
Scala
apache-2.0
1,178
package org.openurp.edu.eams.teach.grade.lesson.web.action class IndexAction
openurp/edu-eams-webapp
grade/src/main/scala/org/openurp/edu/eams/teach/grade/lesson/web/action/IndexAction.scala
Scala
gpl-3.0
81
/** * 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 * dist...
DigitalAssetCom/hlp-candidate
server/pbft/src/main/scala/org/hyperledger/pbft/streams/VerifySignatureStage.scala
Scala
apache-2.0
1,598
package controllers.c4 import play.api.mvc._ import scala.concurrent.Future /** * Created by trydofor on 7/8/15. * @see https://playframework.com/documentation/2.4.x/ScalaCsrf * @see https://github.com/playframework/playframework/blob/2.4.x/documentation/manual/working/scalaGuide/main/forms/code/ScalaCsrf.scala ...
moilioncircle/playframework-2.4.x-scala
app/controllers/c4/S2ScalaCsrf.scala
Scala
apache-2.0
1,661
/* * Versions.scala * * Updated: Sep 19, 2014 * * Copyright (c) 2014, CodeMettle */ object Versions { val akka = "2.5.23" val akkaHttp = "10.1.8" val ficus = "1.4.7" val logback = "1.1.2" val scalaTest = "3.0.8" val slf4j = "1.7.25" val solr = "7.2.1" }
CodeMettle/akka-solr
project/Versions.scala
Scala
apache-2.0
289
package org.villane.shttpc import xml._ import xml.factory._ import org.xml.sax.InputSource object NekoHTML extends XMLLoader[Elem] { def nekoParser = { val parser = new org.cyberneko.html.parsers.SAXParser parser.setProperty("http://cyberneko.org/html/properties/names/elems", "lower") parse...
Villane/shttpc
src/main/java/org/villane/shttpc/NekoHTML.scala
Scala
mit
824
package edu.arizona.sista.discourse.rstparser import edu.arizona.sista.struct.Counter import scala.collection.mutable /** * Scores predicted structures against a gold tree * User: mihais * Date: 5/24/14 */ class DiscourseScorer { def score(sys:DiscourseTree, gold:DiscourseTree, score:Di...
michaelcapizzi/processors
src/main/scala/edu/arizona/sista/discourse/rstparser/DiscourseScorer.scala
Scala
apache-2.0
4,766
package utils.pageobjects import scala.collection.mutable /** * To be used to declare a form field. It is injected into Page class, so the fields of an html form can be declared * in a page object. * @author Jorge Migueis * Date: 03/08/2013 */ trait FormFields { protected val fields = mutable.ArrayBuf...
Department-for-Work-and-Pensions/ClaimCapture
c3/test/utils/pageobjects/formFields.scala
Scala
mit
2,978
package com.github.jpmossin.charjump import java.awt.event.{KeyAdapter, KeyEvent, KeyListener} import com.github.jpmossin.charjump.config.CharJumpConfigVariables import com.intellij.openapi.editor.Editor /** * The highlevel flow and logic of a single CharJump activation. */ class CharJumpRunner(typingCanceller:...
jpmossin/CharJump
src/main/scala/com/github/jpmossin/charjump/CharJumpRunner.scala
Scala
mit
3,023
package com.geeksville.aserial import com.hoho.android.usbserial.driver.UsbSerialDriver import scala.collection.mutable.ListBuffer import android.hardware.usb.UsbRequest import java.nio.ByteBuffer import com.ridemission.scandroid.AndroidLogger import java.io.IOException import scala.collection.mutable.HashSet import j...
geeksville/arduleader
andropilot/src/main/scala/com/geeksville/aserial/AsyncSerial.scala
Scala
gpl-3.0
5,109
package com.danielasfregola.twitter4s.http.clients.rest.statuses.parameters import com.danielasfregola.twitter4s.entities.enums.TweetMode.TweetMode import com.danielasfregola.twitter4s.http.marshalling.Parameters private[twitter4s] final case class RetweetsOfMeParameters(count: Int, ...
DanielaSfregola/twitter4s
src/main/scala/com/danielasfregola/twitter4s/http/clients/rest/statuses/parameters/RetweetsOfMeParameters.scala
Scala
apache-2.0
894
package fpinscala.datastructures sealed trait List[+A] // `List` data type case object Nil extends List[Nothing] // data constructor for `List` case class Cons[+A](head: A, tail: List[A]) extends List[A] object List { // `List` companion object def sum(ints: List[Int]): Int = ints match { // Pattern matching exampl...
galarragas/FpInScala
answers/src/main/scala/fpinscala/datastructures/List.scala
Scala
mit
13,508
package ilc package feature package abelianGroups trait ToScala extends base.ToScala with Syntax { addLibrary("abelianGroups") override def toScala(tau: Type): String = tau match { case AbelianGroupType(e) => s"AbelianGroup[${toScala(e)}]" case _ => super.toScala(tau) } override def toUn...
inc-lc/ilc-scala
src/main/scala/ilc/feature/abelianGroups/ToScala.scala
Scala
mit
826
/** * MIT License * * Copyright (c) 2016-2018 James Sherwood-Jones <james.sherwoodjones@gmail.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, includi...
jSherz/lsd-members
backend/src/test/scala/com/jsherz/luskydive/apis/TextMessageApiSpec.scala
Scala
mit
9,811
/* * Copyright 2009 Robey Pointer <robeypointer@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 required by a...
yuyunliuhen/js_server
gatling-charts-highcharts-2.0.0-RC1/user-files/simulations/json/extensions.scala
Scala
mit
4,972
package im.actor.server.api.rpc.service import akka.contrib.pattern.DistributedPubSubMediator import akka.testkit.TestProbe import im.actor.api.rpc.Implicits._ import im.actor.api.rpc._ import im.actor.api.rpc.counters.UpdateCountersChanged import im.actor.api.rpc.files.ApiFileLocation import im.actor.api.rpc.messagin...
yangchenghu/actor-platform
actor-server/actor-tests/src/test/scala/im/actor/server/api/rpc/service/MessagingServiceSpec.scala
Scala
mit
12,723
package chandu0101.scalajs.react.components.demo.components.materialui import chandu0101.scalajs.react.components.demo.components.CodeExample import chandu0101.scalajs.react.components.materialui.{MuiSlider, MuiAppBar} import japgolly.scalajs.react.ReactComponentB import japgolly.scalajs.react.vdom.prefix_<^._ object...
mproch/scalajs-react-components
demo/src/main/scala/chandu0101/scalajs/react/components/demo/components/materialui/MuiSliderDemo.scala
Scala
apache-2.0
897
package models import play.api.db.DB import anorm.SqlParser._ import anorm._ import java.util.Date import util.diff.Same import util.diff.Subtract import util.diff.Diffable import util.diff.Add case class Episode(number: Int, title: String, filename: String, created: Date,id:Long=0L,watched:Boolean = fal...
PaulKeeble/TVTracker
app/models/Library.scala
Scala
gpl-2.0
2,302
package io.iohk.ethereum.network import java.net.InetSocketAddress import akka.actor.ActorRef import akka.util.ByteString case class ConnectedPeers( private val incomingPendingPeers: Map[PeerId, Peer], private val outgoingPendingPeers: Map[PeerId, Peer], private val handshakedPeers: Map[PeerId, Peer] ) {...
input-output-hk/etc-client
src/main/scala/io/iohk/ethereum/network/ConnectedPeers.scala
Scala
mit
3,211
/* * 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 ...
shenbaise/mltoy
src/main/scala/org/apache/spark/examples/streaming/clickstream/PageViewStream.scala
Scala
apache-2.0
4,768
package com.jarodl.scala_ci import org.specs.Specification import org.specs.mock.{ClassMocker, JMocker} object SampleSpec extends Specification with JMocker with ClassMocker { "Sample" should { "run a test" in { 23 mustEqual 23 } } }
jarodl/scala_ci
src/test/scala/com/jarodl/scala_ci/SampleSpec.scala
Scala
apache-2.0
255
/* * 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-jms/src/main/scala/io/gatling/jms/request/JmsDslBuilder.scala
Scala
apache-2.0
6,075
package org.scalarules.dsl.core.operators import org.scalarules.dsl.core.types.AddableValues import scala.annotation.implicitNotFound /** * This type class allows values of different types to be added in the DSL. * * @tparam A type of the left hand side of the adding operation * @tparam B type of the right h...
scala-rules/rule-engine
engine/src/main/scala/org/scalarules/dsl/core/operators/Addable.scala
Scala
mit
2,036
package org.bidpulse.ui import org.bidpulse.domain.ProjectUpdate import scala.language.existentials object ClientFeedback { // TODO decice, maybe it is worth implementing both ClientFeedback and ClientPublisher as one actor sealed trait Event // TODO this event is a dto coming from websocket and it is ok to ...
EugenyLoy/BidPulse
src/main/scala/org/bidpulse/ui/ClientFeedback.scala
Scala
mit
436
/** * Copyright (C) 2012 Typesafe, Inc. <http://www.typesafe.com> */ package org.pantsbuild.zinc.extractor import java.io.File import org.pantsbuild.zinc.options.OptionSet import org.pantsbuild.zinc.analysis.AnalysisOptions /** * All parsed command-line options. */ case class Settings( help: Boolean ...
fkorotkov/pants
src/scala/org/pantsbuild/zinc/extractor/Settings.scala
Scala
apache-2.0
1,625
import scala.tools.partest._ import java.io.File object Test extends StoreReporterDirectTest { def code = ??? def compileCode(code: String) = { val classpath = List(sys.props("partest.lib"), testOutput.path) mkString sys.props("path.separator") compileString(newCompiler("-cp", classpath, "-d", testOutput....
martijnhoekstra/scala
test/files/run/t8907.scala
Scala
apache-2.0
1,009
package nl.rabobank.oss.rules.engine import nl.rabobank.oss.rules.facts.{ListFact, SingularFact} object FactEngineTestGlossary { val Costs = SingularFact[BigDecimal]("Costsp") val EstimatedNewValue = SingularFact[BigDecimal]("EstimatedNewValue") val EstimatedValue = SingularFact[BigDecimal]("EstimatedValue") ...
scala-rules/scala-rules
engine-core/src/test/scala/nl/rabobank/oss/rules/engine/FactEngineTestGlossary.scala
Scala
mit
1,859
package mesosphere.marathon.integration import java.io.File import mesosphere.marathon.integration.setup._ import org.scalatest.{ BeforeAndAfter, GivenWhenThen, Matchers } class MarathonStartupIntegrationTest extends IntegrationFunSuite with SingleMarathonIntegrationTest with Matchers with BeforeAndAfter...
pgkelley4/marathon
src/test/scala/mesosphere/marathon/integration/MarathonStartupIntegrationTest.scala
Scala
apache-2.0
1,022
package com.lorandszakacs.sg import com.lorandszakacs.sg.model.Name /** * * @author Lorand Szakacs, lorand.szakacs@busymachines, lsz@lorandszakacs.com * @since 12 Jul 2016 * */ object Favorites { // format: off private lazy val _names = List( "adeli", "adorn", "aeluna", "aemelia", "aerie", "a...
lorandszakacs/sg-downloader
sg-harvester/src/main/scala/com/lorandszakacs/sg/Favorites.scala
Scala
apache-2.0
7,367
package com.countrygamer.attackdummy.client import com.countrygamer.attackdummy.client.render.models.RenderDummy import com.countrygamer.attackdummy.common.CommonProxy import com.countrygamer.attackdummy.common.entity.EntityDummy import cpw.mods.fml.client.registry.RenderingRegistry import net.minecraft.entity.player....
TheTemportalist/AttackDummy
src/main/scala/com/countrygamer/attackdummy/client/ClientProxy.scala
Scala
apache-2.0
951
package com.itszuvalex.itszulib.util import java.util.Comparator import com.itszuvalex.itszulib.implicits.IDImplicits._ import com.itszuvalex.itszulib.util.Comparators.NBT.CompoundSizeComparator import net.minecraft.item.ItemStack import net.minecraft.nbt.NBTTagCompound import net.minecraftforge.fluids.FluidStack imp...
BlockWorker/ItszuLib
src/main/scala/com/itszuvalex/itszulib/util/Comparators.scala
Scala
gpl-2.0
4,072
/* * 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/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/StringUtilsSuite.scala
Scala
apache-2.0
1,509
package net.moioli.dependencywalker import java.awt.EventQueue import scala.actors.Actor import scala.collection.JavaConversions.collectionAsScalaIterable import scala.swing.Button import edu.uci.ics.jung.algorithms.layout.ISOMLayout import edu.uci.ics.jung.graph.Graph import edu.uci.ics.jung.visualization.BasicVisu...
moio/dependency-walker
src/main/scala/net/moioli/dependencywalker/GUIUpdaterActor.scala
Scala
gpl-3.0
1,411
package com.olegych.scastie.web.routes import com.olegych.scastie.balancer.DownloadSnippet import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server.Route import akka.actor.ActorRef import akka.pattern.ask import java.nio.file.Path import akka.util.Timeout import scala.concurrent.duration.Dura...
OlegYch/scastie
server/src/main/scala/com.olegych.scastie.web/routes/DownloadRoutes.scala
Scala
apache-2.0
853
package unfiltered.server import unfiltered.spec.SecureClient import org.specs2.mutable._ object SslServerSpec extends Specification with unfiltered.specs2.Hosted with SecureClient { import unfiltered.response._ import unfiltered.request._ import unfiltered.request.{Path => UFPath} import unfiltered.jetty.Se...
beni55/unfiltered
filter/src/test/scala/SslServerSpec.scala
Scala
mit
1,980
package opennlp.scalabha.util final class MutableDouble(private var value: Double) extends Ordered[MutableDouble] { def +[N](other: N)(implicit num: Numeric[N]) = value + num.toDouble(other) def -[N](other: N)(implicit num: Numeric[N]) = value - num.toDouble(other) def *[N](other: N)(implicit num: Numeric[N]) = ...
eponvert/Scalabha
src/main/scala/opennlp/scalabha/util/MutableNumber.scala
Scala
apache-2.0
3,188
import scala.math._ class Fraction(n: Int, d: Int) { private val num: Int = if (d == 0) 1 else n * sign(d) / gcd(n, d); private val den: Int = if (d == 0) 0 else d * sign(d) / gcd(n, d); override def toString = num + "/" + den def sign(a: Int) = if (a > 0) 1 else if (a < 0) -1 else 0 def gcd(a: Int, b: Int):...
yeahnoob/scala-impatient-2e-code
src/ch11/sec07/Fraction.scala
Scala
gpl-3.0
607
package io.github.andrebeat.pool import scala.annotation.tailrec /** * A simple object pool that creates the objects as needed until a maximum number of objects has * been created. */ class SimplePool[A <: AnyRef]( capacity: Int, referenceType: ReferenceType, _factory: () => A, _reset: A => Unit...
andrebeat/scala-pool
src/main/scala/io/github/andrebeat/pool/SimplePool.scala
Scala
mit
1,365
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package assets.controllers import java.io.File import javax.inject.Inject import play.api.mvc._ class RangeRequestController @Inject() (c: ControllerComponents) extends AbstractController(c) { // #range-request def video(videoId: Long) = Action ...
benmccann/playframework
documentation/manual/working/commonGuide/assets/code/assets/controllers/RangeRequestController.scala
Scala
apache-2.0
558
package com.github.dronegator.nlp.component.phrase_detector import com.github.dronegator.nlp.component.ComponentMap import com.github.dronegator.nlp.component.tokenizer.Tokenizer import com.github.dronegator.nlp.component.tokenizer.Tokenizer.Token import com.github.dronegator.nlp.component.tokenizer.Tokenizer.TokenPre...
dronegator/nlp
wordmetrix/src/main/scala/com/github/dronegator/nlp/component/phrase_detector/PhraseDetector.scala
Scala
apache-2.0
1,361
package org.scalawiki.bots import java.time.{ZoneOffset, ZonedDateTime} import org.scalawiki.MwBot import org.scalawiki.dto.{SulAccount, User} import org.scalawiki.query.QueryLibrary import org.scalawiki.time.TimeRange import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future class Gl...
intracer/scalawiki
scalawiki-bots/src/main/scala/org/scalawiki/bots/GlobalContrib.scala
Scala
apache-2.0
2,074
package com.dojo.silhouette.silhouette import org.scalatest.{FunSuite, _} import scala.annotation.tailrec import scala.io.Source class Test extends FunSuite with Matchers { test("verify algorithms") { val is = getClass.getResourceAsStream("/input.txt") val edif = Skyline.parse(Source.fromInputStream(is, ...
rdllopes/skyline
src/test/scala/com/dojo/silhouette/silhouette/Test.scala
Scala
apache-2.0
796
/* * Copyright ActionML, LLC under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * ActionML licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except...
actionml/harness
rest-server/engines/src/main/scala/com/actionml/engines/scaffold/ScaffoldDataset.scala
Scala
apache-2.0
3,114
package mesosphere.marathon.stream import akka.stream.{ Attributes, Inlet, SinkShape } import akka.stream.stage.{ GraphStageLogic, GraphStageWithMaterializedValue, InHandler } import scala.collection.mutable import scala.concurrent.{ Future, Promise } /** * Akka Streaming Graph Stage that collects a set of values ...
timcharper/marathon
src/main/scala/mesosphere/marathon/stream/CollectionStage.scala
Scala
apache-2.0
1,434
package org.jboss.perf import java.util.UUID import scala.concurrent.forkjoin.ThreadLocalRandom import scala.util.Random /** * @author Radim Vansa &lt;rvansa@redhat.com&gt; */ object Util { val random = new Random(1234); // keep fixed seed def randomString(length: Int, rand: Random = ThreadLocalRandom.curre...
rvansa/keycloak-benchmark
src/test/scala/org/jboss/perf/Util.scala
Scala
apache-2.0
609
/* * 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 ...
jianran/spark
sql/hive/src/test/scala/org/apache/spark/sql/execution/benchmark/ObjectHashAggregateExecBenchmark.scala
Scala
apache-2.0
9,747
package akka.message /** * Created by C.J.YOU on 2016/8/18. */ class Word(val word:String, val count: Int)
bgfurfeature/Akka
src/main/scala/akka/message/word.scala
Scala
apache-2.0
113
package com.despegar.soffheap.util trait Managed { def close():Unit } object Managed { implicit def close2Managed[A <: {def close():Any}](c:A):Managed = Managed(c.close()) def apply(closeResource: => Unit) = new Managed { def close(): Unit = closeResource } def managed[A <% Managed](res: => A) = new T...
despegar/soffheap
src/main/scala/com/despegar/soffheap/util/Managed.scala
Scala
bsd-2-clause
492
/** * (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-express
kiji-express/src/main/scala/org/kiji/express/flow/KeyValueStore.scala
Scala
apache-2.0
15,926
/* * 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 ...
himanshudhami/PredictionIO
core/src/main/scala/org/apache/predictionio/controller/Engine.scala
Scala
apache-2.0
29,792
/* * Copyright (C) 2014 - 2017 Contributors as noted in the AUTHORS.md file * * This program 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 Foundation, either version 3 of the * License, or (at your option)...
Tensei-Data/tensei-agent
src/test/scala/com/wegtam/tensei/agent/processor/FetcherWorkerTest.scala
Scala
agpl-3.0
4,349
package mesosphere.marathon.api import java.io.ByteArrayOutputStream import java.util import javax.servlet.{ ServletConfig, ServletContext, ServletOutputStream, WriteListener } import javax.servlet.http.{ HttpServletRequest, HttpServletResponse } import mesosphere.marathon.test.{ MarathonSpec, Mockito } import org.sc...
timcharper/marathon
src/test/scala/mesosphere/marathon/api/WebJarServletTest.scala
Scala
apache-2.0
3,381
package scala.slick.profile import scala.language.higherKinds import scala.slick.action._ import scala.slick.ast.{TableNode, Symbol, SymbolNamer, Node, ColumnOption} import scala.slick.lifted.AbstractTable import scala.slick.util.DumpInfo /** Basic profile for SQL-based drivers. */ trait SqlProfile extends Relational...
nuodb/slick
src/main/scala/scala/slick/profile/SqlProfile.scala
Scala
bsd-2-clause
6,172
package api_client import io.circe.generic.semiauto._ import io.circe.{Decoder, Encoder} case class MediaServiceGetResponse(rid: String, rval: Option[MediaServicePage], errors: Option[Seq[Option[Error]]]) object MediaServiceGetResponse { implicit val encoder: Encoder[MediaServiceGetResponse] = deriveEncoder impl...
t-mochizuki/scala-study
yahoo/ads-display-api/api-client/src/main/scala/api_client/MediaServiceGetResponse.scala
Scala
mit
389
/* * 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 ...
jkbradley/spark
sql/core/src/main/scala/org/apache/spark/sql/dynamicpruning/PartitionPruning.scala
Scala
apache-2.0
11,042
package battle import battle.Equippable._ import scala.util.DynamicVariable trait Equippable { var adjustments: List[Adjustment] = Nil private val dynamicDefender = new DynamicVariable[Gladiator](null) private val dynamicAttacker = new DynamicVariable[Gladiator](null) def defender = dynamicDefender.value ...
bbalser/gladiator-actors
src/main/scala/battle/Equippable.scala
Scala
cc0-1.0
1,794
package ir import ir.ast._ import opencl.ir.pattern._ class Context extends Cloneable { var mapDepth : Int = 0 var inMapGlb = Seq(false, false, false) var inMapWrg = Seq(false, false, false) var inMapLcl = Seq(false, false, false) var inMapWarp = false var inMapLane = false var inMapSeq = false v...
lift-project/lift
src/main/ir/Context.scala
Scala
mit
2,787
package me.benetis.visual import me.benetis.{LifeState, Point} object Utils { // def debug(state: LifeState): Unit = { // // if (state.isEmpty) // println(s"Given state is empty: ${state.toString()}") // else { // // val minX = state.minBy(_.x).x // val maxX = state.maxBy(_.x).x // // val ...
benetis/didactic-computing-machine
software-and-math-exercises/game-of-life/src/main/scala/me/benetis/visual/Utils.scala
Scala
agpl-3.0
2,075
/* * 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-test/src/test/scala/org/scalatest/time/SpanSpec.scala
Scala
apache-2.0
56,201
package models.service.analysis import models.database.alias.Artist import models.database.facade.service.SpotifyArtistFacade import models.service.api.SpotifyApiFacade import models.service.api.refresh.SpotifyRefresh import models.service.oauth.SpotifyService import models.util.Constants import play.api.Play.current ...
haffla/stream-compare
app/models/service/analysis/SpotifyAnalysis.scala
Scala
gpl-3.0
2,908
/* * 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 ...
MLnick/spark
core/src/main/scala/org/apache/spark/rdd/RDD.scala
Scala
apache-2.0
78,203
import sbt._ import sbt.Keys._ import xerial.sbt.Sonatype._ import SonatypeKeys._ object Publishing { lazy val publishingSettings = Seq( homepage := Some(url("https://github.com/scalapenos/stamina")), pomExtra := ( <developers> <developer> <id>agemooij</id> <name>Age Mooij</...
scalapenos/stamina
project/Publishing.scala
Scala
mit
728