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.twitter.finagle.partitioning import com.twitter.conversions.DurationOps._ import com.twitter.finagle import com.twitter.finagle.addr.WeightedAddress import com.twitter.finagle.loadbalancer.LoadBalancerFactory import com.twitter.finagle.partitioning.PartitionNodeManager.NoPartitionException import com.twitt...
twitter/finagle
finagle-partitioning/src/test/scala/com/twitter/finagle/partitioning/PartitionNodeManagerTest.scala
Scala
apache-2.0
15,020
/* * This file is part of eCobertura. * * Copyright (c) 2009, 2010 Joachim Hofer * All rights reserved. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/le...
jmhofer/eCobertura
ecobertura.core/src/test/scala/ecobertura/core/log/EclipseLoggerTest.scala
Scala
epl-1.0
2,991
/** * For copyright information see the LICENSE document. */ package entice.server.world import entice.server.utils._ import entice.protocol._ import scala.concurrent.duration._ sealed trait Event extends Typeable // concerning scheduling: // tick is server internal, push update is for the server-gamestate updat...
entice/old-server
src/main/scala/entice/server/world/Events.scala
Scala
bsd-3-clause
1,840
/* * 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 ...
ptkool/spark
core/src/main/scala/org/apache/spark/resource/ResourceProfile.scala
Scala
apache-2.0
6,646
package scala.collection import scala.collection.generic.{CanBuildFrom, Subtractable} import scala.collection.immutable.RedBlackTree /** A template trait for bag collections of type `Bag[A]`. * * Note: This trait replaces every method that uses `break` in * `TraversableLike` by an iterator version. * * @a...
sageserpent-open/multisets
src/main/scala/scala/collection/BagLike.scala
Scala
bsd-3-clause
7,939
package com.twitter.io import com.twitter.concurrent.AsyncMutex import com.twitter.util.{Closable, CloseAwaitably, Future, FuturePool, Time} import java.io.InputStream /** * Provides the Reader API for an InputStream */ class InputStreamReader(inputStream: InputStream, maxBufferSize: Int) extends Reader with Cl...
mosesn/util
util-core/src/main/scala/com/twitter/io/InputStreamReader.scala
Scala
apache-2.0
2,005
/** * 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...
wangcy6/storm_app
frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/test/scala/unit/kafka/security/auth/PermissionTypeTest.scala
Scala
apache-2.0
1,849
/* * 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 ...
mars/incubator-predictionio
storage/jdbc/src/main/scala/org/apache/predictionio/data/storage/jdbc/JDBCPEvents.scala
Scala
apache-2.0
7,054
/* * 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 ...
jongwook/incubator-s2graph
s2core/src/main/scala/org/apache/s2graph/core/mysqls/Label.scala
Scala
apache-2.0
16,580
package com.sksamuel.elastic4s.requests.searches import com.sksamuel.elastic4s.{ElasticError, HitReader} import scala.util.Try case class MultisearchResponseItem(index: Int, status: Int, response: Either[ElasticError, SearchResponse]) case class MultiSearchResponse(items: Seq[MultisearchResponseItem]) { def siz...
stringbean/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/MultiSearchResponse.scala
Scala
apache-2.0
837
package pokescala.model import java.time.LocalDateTime class Move( val name : String, val description : String, val power : Int, val accuracy : Int, val category : String, val pp : Int, val id : Int, val resourceURI : String, val created : LocalDateTime, val modified : LocalDat...
haferflocken/PokeScala
PokeScala/src/pokescala/model/Move.scala
Scala
apache-2.0
922
/*********************************************************************** * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
ddseapy/geomesa
geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/io/ByteBuffers.scala
Scala
apache-2.0
4,130
/** * 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...
tc-dc/kafka-mesos
src/test/ly/stealth/mesos/kafka/SchedulerTest.scala
Scala
apache-2.0
20,260
package com.zobot.client.packet.definitions.clientbound.play import com.zobot.client.packet.Packet case class EntityMetadata(entityId: Int, metadata: Any) extends Packet { override lazy val packetId = 0x3C override lazy val packetData: Array[Byte] = fromVarInt(entityId) ++ fromAny(metadata) }
BecauseNoReason/zobot
src/main/scala/com/zobot/client/packet/definitions/clientbound/play/EntityMetadata.scala
Scala
mit
309
/** * Copyright (C) 2013 Carnegie Mellon University * * 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...
twmarshall/tdb
core/src/main/scala/tdb/stats/Stats.scala
Scala
apache-2.0
4,317
package synereo.client.modalpopups import diode.{ModelR, ModelRO} import japgolly.scalajs.react.vdom.prefix_<^._ import synereo.client.components.GlobalStyles import synereo.client.css.SynereoCommanStylesCSS import scala.language.reflectiveCalls import scalacss.ScalaCssReact._ import japgolly.scalajs.react._ import s...
LivelyGig/ProductWebUI
sclient/src/main/scala/synereo/client/modalpopups/LoginErrorModal.scala
Scala
apache-2.0
2,983
package scala.forthe.impatient.ch7 /* Scala for the Impatient chapter 7. Packages and Imports exercise 9. Write a program that imports the java.lang.System class, reads the user name from the user.name system property, reads a password from the Console object, and prints a message to the standard error stream if the p...
vasnake/scala-for-the-impatient
src/main/scala/worksheets_1st_edition/scalaImpatient7_9.scala
Scala
gpl-3.0
1,242
/* * Copyright 2013 - 2017 Outworkers 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 applicable law or...
websudos/morpheus
morpheus-dsl/src/test/scala/com/outworkers/morpheus/schema/ZeroFillColumnsSerialisationTest.scala
Scala
bsd-2-clause
1,305
package org.automanlang.core.policy.timeout import org.automanlang.core.question.Question import org.automanlang.core.scheduler.Task class FixedTimeoutPolicy(question: Question) extends TimeoutPolicy(question) { /** * Calculate the task timeout given a question and the * worker timeout. * @param worker_tim...
dbarowy/AutoMan
libautoman/src/main/scala/org/automanlang/core/policy/timeout/FixedTimeoutPolicy.scala
Scala
gpl-2.0
924
/////////////////////////////////////////////////////////////// // © ООО «Праймтолк», 2011-2013 // // Все права принадлежат компании ООО «Праймтолк». // /////////////////////////////////////////////////////////////// /** * SynapseGrid * © Primetalk Ltd., 2013. * All rights rese...
GitOutATown/SynapseGrid
synapse-grid-core/src/main/scala/ru/primetalk/synapse/core/components/Components.scala
Scala
bsd-2-clause
3,336
package com.stellmangreene.pbprdf import org.eclipse.rdf4j.model._ import org.eclipse.rdf4j.model.vocabulary._ import org.eclipse.rdf4j.repository.Repository import better.files._ import com.stellmangreene.pbprdf.model.EntityIriFactory import com.stellmangreene.pbprdf.model.Ontology import com.stellmangreene.pbprdf....
andrewstellman/pbprdf
src/main/scala/com/stellmangreene/pbprdf/Event.scala
Scala
mit
9,638
package com.landoop.streamreactor.connect.hive.formats import com.landoop.streamreactor.connect.hive.parquet.ParquetSinkConfig import com.landoop.streamreactor.connect.hive.Serde import com.typesafe.scalalogging.slf4j.StrictLogging import org.apache.hadoop.fs.{FileSystem, Path} import org.apache.kafka.connect.data.{Sc...
CodeSmell/stream-reactor
kafka-connect-hive/connector/src/main/scala/com/landoop/streamreactor/connect/hive/formats/ParquetHiveFormat.scala
Scala
apache-2.0
1,859
package net.particlez.gui import java.awt.image.BufferedImage import java.awt.Color import java.awt.Dimension import java.awt.Graphics2D import scala.swing.event.MouseClicked import scala.swing.Panel import net.particlez.Pos import net.particlez.PosConfiguration import scala.swing.event.Event class DrawingPanel(val pm...
bbiletskyy/particlez
src/main/scala/net/particlez/gui/DrawingPanel.scala
Scala
apache-2.0
1,530
package mesosphere.marathon.io import java.net.URL import java.util.UUID import mesosphere.marathon.CanceledActionException import mesosphere.marathon.io.storage.StorageProvider import mesosphere.util.{ Logging, ThreadPoolContext } import scala.concurrent.Future /** * Download given url to given path of given sto...
ss75710541/marathon
src/main/scala/mesosphere/marathon/io/CancelableDownload.scala
Scala
apache-2.0
1,741
package houseprices.search import org.scalatest.Matchers import org.scalatest.WordSpec import akka.actor.ActorSystem import akka.http.scaladsl.testkit.ScalatestRouteTest import akka.http.scaladsl.model.HttpMethods import akka.http.scaladsl.model.HttpRequest import akka.http.scaladsl.model.HttpEntity import akka.http.s...
ayubmalik/houseprices
houseprices-rest-api/src/test/scala/houseprices/search/HousePriceSearchServerSpec.scala
Scala
mit
1,356
/* * 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 ...
arjunmantri/killrweather
project/Settings.scala
Scala
apache-2.0
3,612
package eu.ace_design.island.game.actions /** * Keywords to be used in JSON actions */ object Actions { final val LAND = "land" final val EXPLORE = "explore" final val MOVE_TO = "move_to" final val SCOUT = "scout" final val EXPLOIT = "exploit" final val STOP = "stop" final val GLIMP...
ace-design/island
engine/src/main/scala/eu/ace_design/island/game/actions/Actions.scala
Scala
lgpl-3.0
501
/** * Copyright 2015, deepsense.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 applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
workflowexecutor/src/main/scala/io/deepsense/workflowexecutor/partialexecution/Execution.scala
Scala
apache-2.0
9,489
package edu.umass.cs.iesl.scalacommons import collection.mutable import java.util.Locale import java.text.DateFormatSymbols import org.joda.time.DateTime import org.joda.time.format.DateTimeFormat object DateUtils { lazy val zeroBasedMonthsByName: Map[String, Int] = { val result: mutable.Map[String, Int] = mut...
iesl/scalacommons
src/main/scala/edu/umass/cs/iesl/scalacommons/DateUtils.scala
Scala
apache-2.0
2,617
package scorex.crypto.authds import com.google.common.primitives.Longs import scorex.crypto.TestingCommons import scorex.crypto.authds.avltree.batch.{Modification, Update} import scorex.crypto.hash.Digest import scala.util.Success trait TwoPartyTests extends TestingCommons { def genUpd(key: ADKey) = Update(key, ...
ScorexProject/scrypto
src/test/scala/scorex/crypto/authds/TwoPartyTests.scala
Scala
cc0-1.0
2,117
package julienrf.forms.presenters import julienrf.forms._ import julienrf.forms.codecs.Codec import julienrf.forms.codecs.Codec._ import julienrf.forms.codecs.Constraint.{Constrainable, And, GreaterOrEqual} /** * Defines common HTML controls (input and select). */ abstract class Control[Out] { def input[A : Mand...
julienrf/play-forms
play-forms/src/main/scala/julienrf/forms/presenters/Control.scala
Scala
mit
1,852
/* * Copyright 2014 Frugal Mechanic (http://frugalmechanic.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
frugalmechanic/fm-http
src/main/scala/fm/http/PostData.scala
Scala
apache-2.0
4,696
package skinny.micro import skinny.micro.async.{ AsyncBeforeAfterDsl, AsyncSupport } import skinny.micro.routing.AsyncRoutingDsl /** * Built-in features in SkinnyMicroFilter/SkinnyMicroServlet. * These traits should not be mixed in SkinnyMicroBase. */ trait AsyncFeatures extends AsyncSupport with AsyncRout...
xerial/skinny-micro
micro/src/main/scala/skinny/micro/AsyncFeatures.scala
Scala
bsd-2-clause
386
//package io.skysail.restlet // //import org.restlet.resource.ServerResource //import io.skysail.core.app.SkysailApplication //import io.skysail.core.utils.ReflectionUtils // //abstract class SkysailServerResource extends ServerResource { // // // DateTimeConverter dateConverter = new DateConverter(null); // // ...
evandor/skysail
skysail.restlet/src/io/skysail/restlet/SkysailServerResource.scala
Scala
apache-2.0
996
/* * Copyright 2015 Webtrends (http://www.webtrends.com) * * See the LICENCE.txt file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
Webtrends/wookiee-spray
src/test/scala/com/webtrends/harness/component/spray/directive/CIDRDirectiveSpec.scala
Scala
apache-2.0
4,835
package scalaDemo.threadConcurrency import java.util.{Timer, TimerTask} import scala.concurrent._ /** Create Future[T] instances which will be completed after a delay. * 建模异步事件 */ object TimedEvent { //Scala 代码使用一个 java.util.Timer 来安排 java.util.TimerTask 在一个延迟之后执行 val timer = new Timer /** * delayedSuccess ...
tophua/spark1.52
examples/src/main/scala/scalaDemo/threadConcurrency/TimedEvent.scala
Scala
apache-2.0
2,012
package pureconfig.module.joda import org.joda.time._ import org.joda.time.format.{DateTimeFormat, DateTimeFormatter} import pureconfig.BaseSuite import pureconfig.module.joda.arbitrary._ class JodaSuite extends BaseSuite { checkArbitrary[Instant] checkArbitrary[Interval] checkArbitrary[Duration] checkAr...
pureconfig/pureconfig
modules/joda/src/test/scala/pureconfig/module/joda/JodaSuite.scala
Scala
mpl-2.0
483
/** * Copyright 2016 Confluent 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 agree...
randyzingle/tools
gradle-streams/src/test/scala/io/confluent/examples/streams/WordCountScalaIntegrationTest.scala
Scala
apache-2.0
6,541
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * 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 * * https://www.apache.org/licenses/LICENSE...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/feats/EntropicWard.scala
Scala
apache-2.0
1,330
package picfg import java.net.{DatagramPacket, DatagramSocket, InetSocketAddress} import sodium.StreamSink import scala.concurrent.duration._ import scala.concurrent.{ExecutionContext, Future} trait Scanner { val findings = new StreamSink[Pi] def scanNetwork(port: Int, timeout: Duration)(implicit ec: Execution...
j-keck/picfg
src/main/scala/picfg/Scanner.scala
Scala
mit
1,167
package psyco.scala.basic /** * Created by lipeng on 15/8/6. */ object Curry extends App { /** * high level function */ def sum(f: Int => Int)(a: Int)(b: Int): Int = if (a > b) 0 else f(a) + sum(f)(a + 1)(b) println(sum(x => x * x * x)(1)(10)) println(sum(x => x)(1)(10)) }
psyco4j/projects
src/main/scala/psyco/scala/basic/Curry.scala
Scala
mit
296
package org.jetbrains.plugins.scala.testingSupport.specs2.specs2_2_11_2_4_15 import org.jetbrains.plugins.scala.testingSupport.specs2.Specs2RegExpTestNameTest /** * @author Roman.Shein * @since 03.07.2015. */ class Specs2_2_11_2_4_15_RegExpTest extends Specs2RegExpTestNameTest with Specs2_2_11_2_4_15_Base { }...
katejim/intellij-scala
test/org/jetbrains/plugins/scala/testingSupport/specs2/specs2_2_11_2_4_15/Specs2_2_11_2_4_15_RegExpTest.scala
Scala
apache-2.0
321
/* sbt -- Simple Build Tool * Copyright 2009 Mark Harrah */ package sbt.classfile import sbt._ import scala.collection.mutable import mutable.{ArrayBuffer, Buffer} import java.io.File private[sbt] object Analyze { def apply[T](basePath: Path, outputDirectory: Path, sources: Iterable[Path], roots: Iterable[Path], l...
matheshar/simple-build-tool
src/main/scala/sbt/classfile/Analyze.scala
Scala
bsd-3-clause
4,183
/** * 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...
patricklucas/kafka-manager
app/kafka/manager/utils/AdminUtils.scala
Scala
apache-2.0
7,423
package main.importedjs import scala.scalajs.js package object Meter extends js.GlobalScope { def onVolumeChanged(volume: Int): Nothing = js.native }
jaapmengers/OneMinuteChanges
src/main/scala/main/importedjs/VolumeMeter.scala
Scala
apache-2.0
154
package scala.models import io.apibuilder.generator.v0.models.{File, InvocationForm} import io.apibuilder.spec.v0.models.Service import models.TestHelper._ import scala.util.matching.Regex import org.scalatest.funspec.AnyFunSpec import org.scalatest.matchers.should.Matchers class ScalaCheckGeneratorSpec extends AnyFu...
mbryzek/apidoc-generator
scala-generator/src/test/scala/models/ScalaCheckGeneratorSpec.scala
Scala
mit
2,116
/* * Copyright 2014–2017 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...
drostron/quasar
blueeyes/src/test/scala/quasar/blueeyes/CacheDirectiveSpec.scala
Scala
apache-2.0
1,443
package gplume.scala.context import java.nio.charset.Charset import java.util.{Date, Calendar, TimeZone} import com.caibowen.gplume.context.{XMLAssembler, IBeanAssembler} import com.caibowen.gplume.event.Broadcaster /** * @author BowenCai * @since 12/12/2014. */ object AppContext { object defaults { var time...
xkommando/Gplume
gplume-scala/src/main/scala/gplume/scala/context/AppContext.scala
Scala
apache-2.0
1,029
package io.github.tailhq.dynaml.tensorflow.dynamics import io.github.tailhq.dynaml.pipes._ import io.github.tailhq.dynaml.DynaMLPipe._ import io.github.tailhq.dynaml.tensorflow.models.TFModel import io.github.tailhq.dynaml.tensorflow._ import io.github.tailhq.dynaml.tensorflow.layers.{ PDEQuadrature, Regularizatio...
mandar2812/DynaML
dynaml-tensorflow/src/main/scala/io/github/tailhq/dynaml/tensorflow/dynamics/PDESystem.scala
Scala
apache-2.0
11,529
/** * Copyright (C) 2011 Typesafe Inc. <http://typesafe.com> */ package com.typesafe.config.impl import org.junit.Assert._ import org.junit._ import com.typesafe.config.ConfigValue import com.typesafe.config.ConfigException import com.typesafe.config.ConfigResolveOptions import com.typesafe.config.Config import co...
zeq9069/config
config/src/test/scala/com/typesafe/config/impl/ConfigSubstitutionTest.scala
Scala
apache-2.0
39,188
/* Copyright (c) 2016, Rice University Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2....
agrippa/spark-swat
functional-tests/pagerank/src/main/scala/sparkpagerank/GenerateInput.scala
Scala
bsd-3-clause
3,522
package com.twitter import com.twitter.app.GlobalFlag import com.twitter.finagle.{Addr, Dtab, NameTree, Namer, Resolver, Path, Name} import com.twitter.util.{Var, Activity} object newZk extends GlobalFlag( true, "If set to true, the new zk2 com.twitter.finagle.Resolver is used. Otherwise, " + "an older, less re...
lysu/finagle
finagle-serversets/src/main/scala/com/twitter/serverset.scala
Scala
apache-2.0
3,518
package io.github.finagle.smtp import java.io.File import java.nio.charset.Charset import org.jboss.netty.util.CharsetUtil /** * A trait for general MIME messages. */ sealed trait Mime{ val version = "1.0" /** * Headers not including MIME-Version. */ val headers: Map[String, String] /** * Gets all...
finagle/finagle-smtp
src/main/scala/io/github/finagle/smtp/Mime.scala
Scala
apache-2.0
9,958
/* Facsimile: A Discrete-Event Simulation Library Copyright © 2004-2020, Michael J Allen. This file is part of Facsimile. Facsimile is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the ...
MichaelJAllen/facsimile
core/src/main/scala/org/facsim/anim/cell/ConicFrustum.scala
Scala
lgpl-3.0
4,183
/* * Copyright 2018 Analytics Zoo Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
intel-analytics/analytics-zoo
zoo/src/test/scala/com/intel/analytics/zoo/serving/http/ServingFrontendSerializerSpec.scala
Scala
apache-2.0
2,771
package de.flapdoodle.server.stats import de.flapdoodle.server.Instrumented import java.lang.management.ManagementFactory import org.json4s.JsonAST.JObject import scala.util.Try import java.lang.reflect.Method /** * JVM Stats * -> taken from https://github.com/twitter/twitter-server */ protected[server] object Jv...
flapdoodle-oss/de.flapdoodle.server
src/main/scala/de.flapdoodle.server/stats/JvmStats.scala
Scala
apache-2.0
4,935
package controller import skinny._ import skinny.filter.TxPerRequestFilter import model.Company import org.joda.time.DateTime object ErrorController extends ApplicationController with TxPerRequestFilter with Routes { def runtime = { throw new RuntimeException } val runtimeUrl = get("/error/runtime")(runti...
skinny-framework/skinny-framework
example/src/main/scala/controller/ErrorController.scala
Scala
mit
591
/* Compile with dotc implicits2.scala -Xprint:typer -Xprint-types -verbose and verify that the inserted wrapString comes from Predef. You should see val x: <root>.scala.collection.immutable.WrappedString = < <scala.Predef.wrapString: ((s: java.lang.String)scala.collection.immutabl...
dotty-staging/dotty
tests/pos/test-implicits2.scala
Scala
apache-2.0
673
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
slamdata/slamengine
qsu/src/main/scala/quasar/qsu/QScriptUniform.scala
Scala
apache-2.0
29,125
import stainless.lang._ import stainless.annotation._ object MutateInside13 { case class Mut[@mutable T](var t: T) case class Thing[@mutable T](var field: T) def change_thing[@mutable T](mut: Mut[Thing[T]], v: T) = { mut.t = Thing(freshCopy(v)) } def main() = { val thing = Thing(123) { v...
epfl-lara/stainless
frontends/benchmarks/extraction/invalid/MutateInside13.scala
Scala
apache-2.0
437
/* * sbt * Copyright 2011 - 2018, Lightbend, Inc. * Copyright 2008 - 2010, Mark Harrah * Licensed under Apache License 2.0 (see LICENSE) */ package sbt.internal.util package complete import jline.console.ConsoleReader import jline.console.completer.{ Completer, CompletionHandler } import scala.annotation.tailrec...
sbt/sbt
internal/util-complete/src/main/scala/sbt/internal/util/complete/JLineCompletion.scala
Scala
apache-2.0
5,914
/* * sbt * Copyright 2011 - 2018, Lightbend, Inc. * Copyright 2008 - 2010, Mark Harrah * Licensed under Apache License 2.0 (see LICENSE) */ package sbt.internal.util package appmacro import scala.reflect._ import macros._ import ContextUtil.{ DynamicDependencyError, DynamicReferenceError } object ContextUtil { ...
sbt/sbt
core-macros/src/main/scala/sbt/internal/util/appmacro/ContextUtil.scala
Scala
apache-2.0
13,019
package com.twitter.cache.guava import com.google.common.cache.{CacheLoader, CacheBuilder} import com.twitter.cache.AbstractFutureCacheTest import com.twitter.util.{Future, Promise} import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class GuavaCacheTest extends Abstr...
travisbrown/util
util-cache/src/test/scala/com/twitter/cache/guava/GuavaCacheTest.scala
Scala
apache-2.0
1,298
/* * 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 ...
manuzhang/incubator-gearpump
experiments/akkastream/src/main/scala/org/apache/gearpump/akkastream/example/Test.scala
Scala
apache-2.0
2,226
package http sealed trait GeneralHeader { val asString: String } /** * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">§</a> */ final case object CacheControl extends GeneralHeader { /** * A string representation of this general header. */ override val asString = "Cache-Cont...
gpampara/scalaz-http-client
src/main/scala/http/GeneralHeader.scala
Scala
bsd-3-clause
2,766
package controllers import java.util.Date import play.api.libs.ws.WS import play.api.mvc._ import play.api.libs.json._ import play.modules.reactivemongo._ import play.api.libs.concurrent.Execution.Implicits.defaultContext import play.modules.reactivemongo.json.collection.JSONCollection import plex.API import security...
tomasharkema/Plex.Scala
app/controllers/MovieController.scala
Scala
mit
2,135
/* * 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 ...
ueshin/apache-spark
sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableAddColumnsSuiteBase.scala
Scala
apache-2.0
2,291
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
goldmedal/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala
Scala
apache-2.0
9,890
package com.gilt.gfc.time import collection.mutable.ArrayBuffer import org.scalatest.{FunSuite, Matchers} import scala.concurrent.duration._ import scala.concurrent.{Promise, Await, Future} import java.util.concurrent.atomic.AtomicInteger /** * Tests the Timer trait & object. */ class TimerTest extends FunSuite wi...
gilt/gfc-time
src/test/scala/com/gilt/gfc/time/TimerTest.scala
Scala
apache-2.0
4,949
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
zhangjunfang/eclipse-dir
spark/examples/src/main/scala/org/apache/spark/streaming/examples/TwitterPopularTags.scala
Scala
bsd-2-clause
2,879
package geotrellis.vectortile import collection.mutable.ListBuffer import geotrellis.vector._ /** Interprets the commands from a VectorTile and converts them into * Geometries. */ object Command { val MoveTo: Int = 1 val LineTo: Int = 2 val ClosePath: Int = 7 type GeomType = VectorTile.GeomType...
geotrellis/geotrellis-osm-elevation
scala-vector-tile/src/main/scala/geotrellis/vectortile/Command.scala
Scala
apache-2.0
5,562
package dbpedia.destinations /** * The quads generated by the DBpedia framework are organized in a number of datasets. * TODO: remove this class? It has no real purpose, it's a just a string holder. */ class Dataset(val name: String, val description: String) { def this(name: String) { this(name, null) } ...
FnOio/dbpedia-parsing-functions-scala
src/main/scala/dbpedia/destinations/Dataset.scala
Scala
gpl-2.0
523
package com.overviewdocs.csv import java.nio.{ByteBuffer,CharBuffer} import java.nio.charset.{CharsetDecoder,CoderResult,CodingErrorAction} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import com.overviewdocs.database.{HasDatabase,LargeObject,TreeIdGenerator} import com.ove...
overview/overview-server
worker/src/main/scala/com/overviewdocs/csv/CsvImporter.scala
Scala
agpl-3.0
8,159
/* * 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 ...
spark-test/spark
sql/core/src/test/scala/org/apache/spark/sql/DataFrameFunctionsSuite.scala
Scala
apache-2.0
120,068
package org.http4s package client import cats.effect._ import cats.implicits._ import fs2._ import java.net.InetSocketAddress import javax.servlet.ServletOutputStream import javax.servlet.http.{HttpServlet, HttpServletRequest, HttpServletResponse} import org.http4s.client.testroutes.GetRoutes import org.http4s.client....
reactormonk/http4s
client/src/test/scala/org/http4s/client/ClientRouteTestBattery.scala
Scala
apache-2.0
4,446
package provingground import HoTT._ object MereProposition { def isPropn[U <: Term with Subs[U]](typ: Typ[U]) = { val x = typ.Var val y = typ.Var pi(x)(pi(y)(x =:= y)) } // Should refine to type of unit case class Truncation[U <: Term with Subs[U]](base: Typ[U]) extends Typ[Term] { lazy...
siddhartha-gadgil/ProvingGround
core/src/main/scala/provingground/MereProposition.scala
Scala
mit
1,735
/* * 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 ...
gioenn/xSpark
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala
Scala
apache-2.0
14,160
package forms import javax.inject.Inject import models.{Boards} import play.api.data.validation.Constraints._ import play.api.data.validation.{Constraint, Invalid, Valid} import scala.concurrent.Await import scala.concurrent.duration.Duration import play.api.data.{Form, Mapping} import play.api.data.Forms._ case cl...
ygpark2/play-ain-board
app/forms/Board.scala
Scala
bsd-3-clause
792
package cs220.queue3 /** A "faster" functional queue. * * This functional queue uses a functional [List] as its internal * implementation of a queue. * * In this impementation we keep two lists: one for the leading * elements that we will dequeue from and trailing elements which * represent the end of th...
umass-cs-220/week-09-libraries
code/types/src/main/scala/cs220/queue3/FasterQueue.scala
Scala
apache-2.0
2,687
/* Copyright (C) 2016 Mauricio Bustos (m@bustos.org) & 338.oakland creations 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) ...
338oaklandcreations-fabric/machinery
src/main/scala/com/338oaklandcreations/fabric/machinery/WindflowersPlacement.scala
Scala
gpl-3.0
2,739
/* * 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/ui/jobs/JobProgressListener.scala
Scala
apache-2.0
20,456
package play.api.libs.concurrent import org.specs2.mutable._ import scala.concurrent.ExecutionContext.Implicits.global object PromiseSpec extends Specification { "A Promise" should { "recover after an exception using recover" in { val promise = Promise[Int]() promise.redeem(6/0) promise...
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/play/src/test/scala/play/api/PromiseSpec.scala
Scala
mit
420
package mesosphere.marathon.core.history.impl import akka.actor.{ ActorRef, Props } import akka.testkit.{ ImplicitSender, TestActorRef } import mesosphere.marathon.core.event.{ MesosStatusUpdateEvent, UnhealthyTaskKillEvent } import mesosphere.marathon.core.task.Task import mesosphere.marathon.state.PathId._ import me...
timcharper/marathon
src/test/scala/mesosphere/marathon/core/history/impl/HistoryActorTest.scala
Scala
apache-2.0
3,462
package com.holdenkarau.spark.testing import org.apache.spark.api.java.JavaRDD object JavaRDDComparisons extends JavaTestSuite { /** * Asserts two RDDs are equal (with the same order). * If they are equal assertion succeeds, otherwise assertion fails. */ def assertRDDEqualsWithOrder[T](expected: JavaRDD...
mahmoudhanafy/spark-testing-base
src/main/1.3/scala/com/holdenkarau/spark/testing/JavaRDDComparisons.scala
Scala
apache-2.0
1,756
package models.relations /** * Created by ruraj on 7/17/14. */ case class DealerProduct(dealerId: Long = 0, products: Set[models.Product])
ruraj/stock-manager
app/models/relations/DealerProduct.scala
Scala
bsd-3-clause
143
package slick.jdbc import java.sql.ResultSet /** Represents a result set type. */ sealed abstract class ResultSetType(val intValue: Int) { self => /** Return this `ResultSetType`, unless it is `Auto` in which case * the specified result set type is returned instead. */ def withDefault(r: ResultSetType) = this...
jkutner/slick
slick/src/main/scala/slick/jdbc/ResultSetType.scala
Scala
bsd-2-clause
1,242
package sbtavro package filesorter import filesorter.TypeComparator.strContainsType import java.io.File import scala.collection.mutable import scala.io.Source /** * The order in which avsc files are compiled depends on the underlying file * system (under OSX its is alphabetical, under some linux distros it's no...
julianpeeters/sbt-avro
src/main/scala/sbtavro/filesorter/AVSCFileSorter.scala
Scala
bsd-3-clause
2,213
package com.twitter.finatra.filters import com.twitter.finagle.{Filter, Service} import com.twitter.util.Future class MergedFilter[Req, Resp]( filters: Filter[Req, Resp, Req, Resp]*) extends Filter[Req, Resp, Req, Resp] { private val CombinedFilter = filters reduceLeft {_ andThen _} def apply(request: Req, ...
tom-chan/finatra
utils/src/main/scala/com/twitter/finatra/filters/MergedFilter.scala
Scala
apache-2.0
410
package repositories import repositories.UserAccountRepo.UserAccount import scala.concurrent.ExecutionContext class UserAccountRepo { def findByUserNameO(userName: String)(implicit executor: ExecutionContext): Option[UserAccount] = { if (userName == "user") Some(UserAccount(userName, "user", userName)) ...
tolomaus/languagedetector_ui
app/repositories/UserAccountRepo.scala
Scala
mit
453
package codesniffer.decard.test import java.lang.instrument.Instrumentation /** * Created by Bowen Cai on 1/16/2016. */ //object Simple extends App { // for (i <- 0 until 5) // println(i) // // val arr = Array(1, 3, 5, 8, 10) // for (i <- arr) { // println(i) // } //} object Simplee { ...
xkommando/CodeSniffer
core/src/test/scala/codesniffer/decard/test/Simple.scala
Scala
lgpl-3.0
839
package test.scala.models import models.AppScanSourceXmlParser import main.ParsedAppScanSourceXmlData import models.wrappers.{ SystemEvents, EventReader } import org.scalatest.FunSpec import org.mockito.Mockito._ import org.mockito.{Mockito, Matchers} import org.scalatest.junit.JUnitRunner import org.junit.runner.Run...
blackboard/appscan-source-parser
src/test/scala/models/AppScanSourceXmlParserSpec.scala
Scala
bsd-3-clause
28,177
package tests.admission import sisdn.admission.{AdmissionUser, Student} import akka.actor import akka.actor.{Props, ActorSystem} import akka.testkit._ import org.scalatest.{BeforeAndAfterAll, Matchers, FlatSpecLike} import AdmissionUser.{AdmissionStatusUpdateEvt, Admit} import sisdn.common.User import scala.concurrent...
mhashimm/backend
src/test/scala/tests/admission/UserActorSpecs.scala
Scala
agpl-3.0
1,608
package mapmartadero package model /** * Created by j2 on 12-08-14. */ import scala.xml._ import net.liftweb._ import common._ import record._ import record.field._ import net.liftweb.mongodb.record.field.DateField import net.liftweb.mongodb.record.field.{MongoCaseClassField, ObjectIdPk} import net.liftweb.mongodb...
jgenso/mapamartadero
src/main/scala/mapmartadero/model/GeneralEvent.scala
Scala
apache-2.0
2,475
package com.example.recommender import com.example.math.MyMath class MyRecommender { def recommend() = { MyMath.nextInt() } }
fkautz/gradle-recipes
multiproject/recommender/src/main/scala/com/example/recommender/Recommender.scala
Scala
apache-2.0
136
package controllers import com.google.inject.Inject import models.JwtEnvironment import play.api.i18n.MessagesApi import play.api.mvc.Controller import utils.JwtAuthentication class LogoutController @Inject()(implicit val messagesApi: MessagesApi, implicit val jwtEnvironment: JwtEnvir...
GMadorell/play-jwt
app/controllers/LogoutController.scala
Scala
mit
489
/* * 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 ...
ueshin/apache-flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/nodes/logical/FlinkLogicalSort.scala
Scala
apache-2.0
4,309
// Minimized from scala.collection.generic.GenTraversableFactory plus dependencies import scala.annotation.unchecked.uncheckedVariance trait GT[A] extends GTT[A, GT] trait HNB[B] trait GTT[+C, DD[X] <: GT[X]] extends HNB[DD[C] @uncheckedVariance] // Can be any annotation and still crash class GTF[EE[X] <: GT[X] with...
densh/dotty
tests/pos/hk-deep-subtype.scala
Scala
bsd-3-clause
435
package controllers.builder import controllers.BaseAuthConfig import play.api.mvc.RequestHeader import play.api.mvc.Results._ import scala.concurrent.{Future, ExecutionContext} trait AuthConfigImpl extends BaseAuthConfig { def loginSucceeded(request: RequestHeader)(implicit ctx: ExecutionContext) = Future.success...
indykish/play2-auth
sample/app/controllers/builder/AuthConfigImpl.scala
Scala
apache-2.0
627
package by.pavelverk.hardwrite.core.feature import by.pavelverk.hardwrite.core.{InMemoryStorage, Features} import by.pavelverk.hardwrite.utils.db.DatabaseConnector import scala.concurrent.{ExecutionContext, Future} sealed trait FeaturesStorage { def getFeatures(id: String): Future[Option[Features]] def saveFea...
VerkhovtsovPavel/BSUIR_Labs
Master/back/akka-http-rest-master/src/main/scala/by/pavelverk/hardwrite/core/feature/FeatureStorage.scala
Scala
mit
1,086
package com.github.challenge import akka.actor._ import akka.pattern.ask import akka.util.Timeout import scala.concurrent.Await import scala.concurrent.duration._ class ProblemSolver[A <: problem.Problem](workers: Int, autoDie: Boolean, name: String) { /** * Bring up the actor system */ val system = ActorSy...
challenge-helper/challenge-helper
src/main/scala/com/github/challenge/ProblemSolver.scala
Scala
apache-2.0
899