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 util
import org.scalajs.dom.raw.Element
import scala.scalajs.js
import scala.scalajs.js.Object
import scala.scalajs.js.annotation.{JSName, ScalaJSDefined}
object termJs {
@JSName("Terminal")
@js.native
class Terminal(options: Object) extends Object {
def open(element: Element): Unit = js.native
... | felixgborrego/simple-docker-ui | src/main/scala/util/TermJs.scala | Scala | mit | 1,243 |
package aiouniya.spark
import java.io.File
import java.util.{Date, Properties}
import aiouniya.spark.util.DateUtil
import org.apache.spark.{SparkConf, SparkContext}
import scala.io.Source
/**
* Created by zstorm on 2017/11/22.
*/
trait AzSparkJob {
def main(args: Array[String]): Unit = {
... | 7u/spark-learning | aiouniya.spark/src/main/scala/aiouniya/spark/AzSparkJob.scala | Scala | apache-2.0 | 1,551 |
/**
* Copyright 2011-2016 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 appli... | thkluge/gatling | gatling-http/src/main/scala/io/gatling/http/check/async/package.scala | Scala | apache-2.0 | 784 |
package colang.ast.parsed
/**
* A trait that generalizes different applicable entities, providing some common behaviour
*/
trait Applicable {
def parameters: Seq[Variable]
/**
* Returns true if the object can be called with arguments of given types (this is, the arguments are
* implicitly convertible... | psenchanka/colang | src/main/scala/colang/ast/parsed/Applicable.scala | Scala | mit | 2,620 |
// Copyright 2012 by Christopher Brown - MIT Licensed
package timexla
import scala.collection.mutable.{ListBuffer,Map => MutableMap}
/**
* BIOMap is simply a way of aggregating BIOTags in one object, counting incoming tags,
* and initializing each key to an arbitrary type.
*/
case class BIOMap[A]() {
val interna... | scaling/timexla | src/main/scala/timexla/hmm.scala | Scala | mit | 7,482 |
/*
* Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com>
*/
package com.example.shoppingcart.impl
import java.time.Instant
import akka.Done
import slick.dbio.DBIO
import slick.jdbc.PostgresProfile.api._
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
/**
*... | ignasi35/lagom | dev/sbt-plugin/src/sbt-test/sbt-plugin/akka-persistence-typed-migration-scala/shopping-cart-lagom-persistence/src/main/scala/com/example/shoppingcart/impl/ShoppingCartReportRepository.scala | Scala | apache-2.0 | 2,158 |
package scala.scalajs.compiler.util
import language.implicitConversions
class ScopedVar[A](init: A) {
import ScopedVar.Assignment
private var value = init
def this()(implicit ev: Null <:< A) = this(ev(null))
def get: A = value
def :=(newValue: A): Assignment[A] = new Assignment(this, newValue)
}
object ... | swhgoon/scala-js | compiler/src/main/scala/scala/scalajs/compiler/util/ScopedVar.scala | Scala | bsd-3-clause | 950 |
/*
* 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 | mimir/src/test/scala/quasar/mimir/TypeInferencerSpecs.scala | Scala | apache-2.0 | 19,516 |
/***********************************************************************
* 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-web/geomesa-web-stats/src/main/scala/org/locationtech/geomesa/web/stats/GeoMesaStatsEndpoint.scala | Scala | apache-2.0 | 13,360 |
package bad.robot.temperature.server
import bad.robot.temperature._
import bad.robot.temperature.rrd.{Host, Seconds}
import bad.robot.temperature.server.Requests._
import bad.robot.temperature.test._
import cats.effect.IO
import fs2.Scheduler
import org.http4s.Method._
import org.http4s.Status.{NoContent, Ok}
import o... | tobyweston/temperature-machine | src/test/scala/bad/robot/temperature/server/TemperatureEndpointTest.scala | Scala | apache-2.0 | 11,799 |
/*
* Copyright 2022 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/iht-frontend | app/iht/controllers/application/assets/money/MoneyJointlyOwnedController.scala | Scala | apache-2.0 | 4,011 |
/***********************************************************************
* Copyright (c) 2013-2022 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... | locationtech/geomesa | geomesa-geojson/geomesa-geojson-rest/src/test/scala/org/locationtech/geomesa/geojson/servlet/GeoJsonServletTest.scala | Scala | apache-2.0 | 6,735 |
package formats.json
import play.api.libs.json.{JsPath, Json, Reads}
import play.api.libs.functional.syntax._
/**
* The client can submit various JSON payloads relating to computer vision ground truth audits. For example,
* a list of panoIds to be audited along with their lat/lng positions or a panoId that has be... | ProjectSidewalk/SidewalkWebpage | app/formats/json/CVGroundTruthSubmissionFormats.scala | Scala | mit | 1,306 |
package sbencoding
/**
* Provides additional BencodingFormats and helpers
*/
trait AdditionalFormats {
implicit object BcValueFormat extends BencodingFormat[BcValue] {
def write(value: BcValue) = value
def read(value: BcValue) = value
}
/**
* Constructs a BencodingFormat from its two parts, Bencod... | zhaoyao/sbencoding | src/main/scala/sbencoding/AdditionalFormats.scala | Scala | mit | 1,952 |
package controllers
import booli.{Configuration, Download}
import play.api.mvc._
class Application extends Controller {
def index = Action {
println("Environment")
println(sys.env.mkString("\n"))
Ok(views.html.Application.main())
}
def admin(key: String) = Action {
println(Configuration.admin... | lastsys/pricemap | server/app/controllers/Application.scala | Scala | bsd-3-clause | 613 |
/*
* Copyright 2022 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/vat-registration-frontend | app/services/S4LService.scala | Scala | apache-2.0 | 1,802 |
/* TestMemory: Units tests for tarski.Memory logging */
package tarski
import utility.Utility._
import com.amazonaws.AmazonServiceException
import com.amazonaws.AmazonServiceException.ErrorType
import scala.concurrent._
import scala.concurrent.duration._
import scala.concurrent.ExecutionContext.Implicits.global
impor... | eddysystems/eddy | tests/src/tarski/TestMemory.scala | Scala | bsd-2-clause | 1,499 |
/*
* 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 ... | hequn8128/flink | flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/codegen/agg/AggTestBase.scala | Scala | apache-2.0 | 5,562 |
package org.scalatra
package atmosphere
import java.nio.CharBuffer
import javax.servlet.http.{ HttpServletRequest, HttpSession }
import grizzled.slf4j.Logger
import org.atmosphere.cpr.AtmosphereResource.TRANSPORT._
import org.atmosphere.cpr._
import org.atmosphere.handler.AbstractReflectorAtmosphereHandler
import org... | lloydmeta/scalatra | atmosphere/src/main/scala/org/scalatra/atmosphere/ScalatraAtmosphereHandler.scala | Scala | bsd-2-clause | 7,353 |
package org.broadinstitute.dsde.workbench.sam.service
import java.net.URI
import java.util.UUID
import akka.http.scaladsl.model.headers.OAuth2BearerToken
import cats.effect.IO
import cats.implicits._
import com.unboundid.ldap.sdk.{LDAPConnection, LDAPConnectionPool}
import org.broadinstitute.dsde.workbench.model._
im... | broadinstitute/sam | src/test/scala/org/broadinstitute/dsde/workbench/sam/service/PolicyEvaluatorServiceSpec.scala | Scala | bsd-3-clause | 42,216 |
/*
* Copyright 2016 The BigDL Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | intel-analytics/BigDL | scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/nn/internal/SpatialDropout1D.scala | Scala | apache-2.0 | 2,548 |
package fs2.io
import java.net.{InetSocketAddress,NetworkInterface,ProtocolFamily,StandardSocketOptions}
import java.nio.channels.DatagramChannel
import fs2._
package object udp {
/**
* A single packet to send to the specified remote address or received from the specified address.
*
* @param remote rem... | japgolly/scalaz-stream | io/src/main/scala/fs2/io/udp/udp.scala | Scala | mit | 3,036 |
package carldata.sf.compiler
import carldata.sf.compiler.AST._
import carldata.sf.compiler.gen.{FlowScriptLexer, FlowScriptParser}
import carldata.sf.compiler.gen.FlowScriptParser._
import org.antlr.v4.runtime._
import scala.collection.JavaConverters._
/**
* Script parser.
* This parser uses ANTLR4 generated Par... | carldata/flow-script | src/main/scala/carldata/sf/compiler/Parser.scala | Scala | apache-2.0 | 5,961 |
/*
* 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 ... | zhangminglei/flink | flink-libraries/flink-table/src/test/scala/org/apache/flink/table/utils/MockTableEnvironment.scala | Scala | apache-2.0 | 2,252 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2015-2019 Helge Holzmann (Internet Archive) <helge@archive.org>
*
* 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, incl... | helgeho/ArchiveSpark | src/main/scala/org/archive/archivespark/dataspecs/access/ByteArrayAccessor.scala | Scala | mit | 1,996 |
import edu.uta.diql._
import org.apache.spark._
import org.apache.spark.rdd._
import org.apache.log4j._
import scala.util.Random
object Add {
def main ( args: Array[String] ) {
val repeats = args(0).toInt
val n = args(1).toInt
val m = args(2).toInt
val mm = m
val conf = new SparkConf().setAppN... | fegaras/DIQL | benchmarks/diablo/add.scala | Scala | apache-2.0 | 1,797 |
package org.scalajs.openui5.sap.m
import org.scalajs.openui5.util.{Settings, SettingsMap, noSettings}
import scala.scalajs.js
import scala.scalajs.js.annotation.{JSName, ScalaJSDefined}
@ScalaJSDefined
trait TableSettings extends ListBaseSettings
object TableSettings extends TableSettingsBuilder(noSettings)
class T... | lastsys/scalajs-openui5 | src/main/scala/org/scalajs/openui5/sap/m/Table.scala | Scala | mit | 1,525 |
/*
* 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... | JerryYanWan/BigDL | spark/dl/src/test/scala/com/intel/analytics/bigdl/nn/LinearSpec.scala | Scala | apache-2.0 | 12,701 |
/*
* ClassDependenceAnalyser - A tool for java classes dependence analysis
* Copyright (C) 2016 <chentaov5@gmail.com>
*
* 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 ... | JLLK/ClassDependenceAnalyser | src/main/scala/com/github/jllk/analyser/ProcessUtils.scala | Scala | gpl-2.0 | 3,252 |
import models.{Transformer, User}
import play.api.Logger
/**
* Author: matthijs
* Created on: 24 May 2014.
*
* Initial set of data to be loaded
*/
object InitialData {
def insert() {
// Create a default user
val defaultEmail : String = "sendr@localhost"
val defaultPassword : String = "klJJS13j#k"
... | plamola/sendR | app/InitialData.scala | Scala | gpl-2.0 | 2,019 |
package im.actor.server.presences
import scala.concurrent.ExecutionContext
import scala.concurrent.duration._
import akka.testkit.TestProbe
import akka.util.Timeout
import org.scalatest.time.{ Seconds, Span }
import im.actor.server.{ ActorSuite, KafkaSpec, SqlSpecHelpers }
class PresenceManagerSpec extends ActorSui... | boneyao/actor-platform | actor-server/actor-tests/src/test/scala/im/actor/server/presences/PresenceManagerSpec.scala | Scala | mit | 1,854 |
import scala.io.Source
var count: Int = 0
def isTr(a: Int, b: Int, c: Int): Boolean = (a + b) > c && (a + c) > b && (b + c) > a
for (l <- Source.fromFile("day03.input").getLines()) {
val t = l.split(" ")
.toList
.filter(_ != "")
.map(_.toInt)
if (isTr(t(0), t(1), t(2))) count += 1
}
println(count)... | mozartvn/adventofcode2016 | day03.scala | Scala | mit | 674 |
/*
* 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 | sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/ThriftServerSessionPage.scala | Scala | apache-2.0 | 4,242 |
package edu.osu.cse.groenkeb.logic.proof.engine
import scala.collection.immutable._
import edu.osu.cse.groenkeb.logic.proof.ProofContext
import edu.osu.cse.groenkeb.logic.proof.CompleteProof
sealed abstract class ProofResult extends Product with Serializable {
def context: ProofContext
}
final case class Failure(co... | bgroenks96/PropLogic | proof-engine/src/main/scala/edu/osu/cse/groenkeb/logic/proof/engine/proofResult.scala | Scala | mit | 714 |
/*
* Copyright 2011 Christos KK Loverdos
*
* 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 ... | loverdos/streamresource | src/main/scala/com/ckkloverdos/resource/StreamResource.scala | Scala | apache-2.0 | 2,743 |
package com.github.vooolll.client.feed
import com.github.vooolll.base.FacebookClientSupport
import cats.implicits._
import com.github.vooolll.domain.FacebookPaging
import com.github.vooolll.domain.likes.{FacebookLike, FacebookLikes, FacebookLikesSummary}
import com.github.vooolll.domain.profile.FacebookUserId
class L... | vooolll/facebook4s | src/test/scala/com/github/vooolll/client/feed/LikeSpec.scala | Scala | apache-2.0 | 1,407 |
package scalajs.antdesign
sealed abstract class SortOrder(val id: String)
object SortOrder {
case object Ascend extends SortOrder("ascend")
case object Descend extends SortOrder("descend")
}
| mdedetrich/scalajs-antdesign | src/main/scala/scalajs/antdesign/SortOrder.scala | Scala | bsd-3-clause | 198 |
package scala.xml
import scala.collection.Seq
import org.junit.Assert.assertEquals
import org.junit.Test
class SerializationTest {
@Test
def xmlLiteral: Unit = {
val n = <node/>
assertEquals(n, JavaByteSerialization.roundTrip(n))
}
@Test
def empty: Unit = {
assertEquals(NodeSeq.Empty, JavaByteS... | scala/scala-xml | jvm/src/test/scala/scala/xml/SerializationTest.scala | Scala | apache-2.0 | 745 |
/*
* 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/main/scala/com/intel/analytics/zoo/models/python/PythonZooModel.scala | Scala | apache-2.0 | 16,969 |
package systems.opalia.commons.json
import play.api.libs.json._
import scala.collection.TraversableLike
import scala.util.matching.Regex
object ConstraintReadsExtension {
def max[T](maximum: T)(implicit reads: Reads[T], ord: Ordering[T]): Reads[T] =
Reads.filterNot[T](JsonValidationError("error.maximum", maxi... | OpaliaSystems/commons | src/main/scala/systems/opalia/commons/json/ConstraintReadsExtension.scala | Scala | apache-2.0 | 2,827 |
/*
* 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 ... | tzulitai/flink | flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/expressions/time.scala | Scala | apache-2.0 | 11,895 |
package fyrie
import net.fyrie.redis._
import akka.actor.{ ActorSystem, Actor, Props, ActorRef }
import akka.bita.{ RandomScheduleHelper, Scheduler }
import akka.bita.pattern.Patterns._
import akka.util.duration._
import akka.util.Timeout
import akka.dispatch.Await
import bita.util.{ FileHelper, TestHelper }
import... | Tjoene/thesis | benchmark/src/test/scala/fyrie/SyncInsertSpec.scala | Scala | gpl-2.0 | 1,865 |
object Test1 {
val macro = ???
}
object Test2 {
var macro = ???
}
object Test3 {
type macro = Int
}
package test4 {
class macro
}
object Test5 {
class macro
}
package test6 {
object macro
}
object Test7 {
object macro
}
package test8 {
trait macro
}
object Test9 {
trait macro
}
package macro ... | felixmulder/scala | test/files/neg/macro-deprecate-idents.scala | Scala | bsd-3-clause | 528 |
package org.killingbilling.junction
import java.io.{Reader, File}
import java.util.function.{Function => JFunction}
import java.util.{List => JList, ArrayList => JArrayList, Map => JMap, HashMap => JHashMap}
import javax.script.ScriptContext._
import javax.script._
import org.killingbilling.junction.utils._
import sca... | KillingBilling/junction | src/main/scala/org/killingbilling/junction/Module.scala | Scala | mit | 7,734 |
package org.jetbrains.plugins.scala.debugger.evaluation
import com.intellij.openapi.command.undo.{BasicUndoableAction, UndoManager}
import com.intellij.openapi.editor.Document
import com.intellij.openapi.project.Project
import com.intellij.psi.IntentionFilterOwner.IntentionActionsFilter
import com.intellij.psi.JavaCod... | LPTK/intellij-scala | src/org/jetbrains/plugins/scala/debugger/evaluation/ScalaCodeFragment.scala | Scala | apache-2.0 | 5,041 |
package name.denyago.yasc.chat
import akka.actor.{Actor, ActorRef, Terminated}
import name.denyago.yasc.chat.events.{MessagePosted, UserJoined}
/**
* Actor, representing Chat Room, where Users may join, leave and
* exchange messages.
*/
class ChatRoom extends Actor {
override def receive = withUsers(Map.empty... | denyago/yet-another-simple-chat | src/main/scala/name/denyago/yasc/chat/ChatRoom.scala | Scala | mit | 734 |
object query {
def run(fn: String) = {
val s = new Snippet()
s(fn)
}
def main(args: Array[String]): Unit = {
if (args.length != 1) {
println("usage: query <filename>")
} else {
run(args(0))
}
}
}
| RomanTsegelskyi/lms-truffle | src/out/query.scala | Scala | gpl-2.0 | 236 |
package dotty.tools.dotc
package transform
import TreeTransforms._
import core.Denotations._
import core.SymDenotations._
import core.Contexts._
import core.Types._
import ast.Trees._
import ast.tpd.{Apply, Tree, cpy}
import dotty.tools.dotc.ast.tpd
import scala.collection.mutable
import dotty.tools.dotc._
import core... | yusuke2255/dotty | src/dotty/tools/dotc/transform/InterceptedMethods.scala | Scala | bsd-3-clause | 5,275 |
package dotty.tools.dotc.decompiler
import java.nio.file.Files
import dotty.tools.dotc
import dotty.tools.dotc.core.Contexts._
/** Main class of the `dotc -decompiler` decompiler.
*
* @author Nicolas Stucki
*/
object Main extends dotc.Driver {
override protected def newCompiler(implicit ctx: Context): dotc.Comp... | som-snytt/dotty | compiler/src/dotty/tools/dotc/decompiler/Main.scala | Scala | apache-2.0 | 841 |
package org.photon.common.persist
import com.twitter.util.Future
import scala.collection.mutable
trait Caching[T <: Model] extends Cachable[T] {
val cache = mutable.Map.empty[T#PrimaryKey, T]
def hydrate(): Future[Unit] = all map { res =>
for (o <- res) cache(o.id) = o
}
def find(predicate: T => Boolean... | Blackrush/photon-persist | src/org/photon/common/persist/Caching.scala | Scala | mit | 974 |
package com.socrata.balboa.impl
import com.socrata.balboa.metrics.Metric.RecordType
import com.socrata.balboa.metrics.impl.JsonMessage
import com.socrata.balboa.metrics.measurements.combining._
import com.socrata.balboa.metrics.{Metric, Metrics}
import com.socrata.metrics.MetricQueue
import com.socrata.metrics.compone... | socrata-platform/balboa | balboa-client/src/main/scala/com/socrata/balboa/impl/HashMapBuffer.scala | Scala | apache-2.0 | 3,526 |
package app
import util.{LockUtil, CollaboratorsAuthenticator, JGitUtil, ReferrerAuthenticator, Notifier, Keys}
import util.Directory._
import util.Implicits._
import util.ControlUtil._
import service._
import org.eclipse.jgit.api.Git
import jp.sf.amateras.scalatra.forms._
import org.eclipse.jgit.transport.RefSpec
imp... | Muscipular/gitbucket | src/main/scala/app/PullRequestsController.scala | Scala | apache-2.0 | 21,563 |
package org.hotsextra.matchmaking
package webinterface
package servestrings
import org.http4s.headers.`Content-Type`
import org.http4s.MediaType
import org.http4s.EntityEncoder._
object Css {
val site = """
|body {
| color: #666;
| font-family: "Open Sans", sans-serif;
| font-size: 14px;
| line-height... | martijnhoekstra/hotsextra-matchmaker | src/main/scala/org/hotsextra/matchmaking/webinterface/servestrings/Css.scala | Scala | agpl-3.0 | 691 |
package io.gatling.tcp
import java.nio.charset.Charset
case object TcpProtocolBuilderAddressStep {
def address(address: String) = TcpProtocolBuilderPortStep(address)
}
case class TcpProtocolBuilderPortStep(address: String) {
def port(port: Int) = TcpProtocolBuilder(address, port, None)
}
case class TcpProtocolBui... | snripa/gatling-tcp-extensions | src/main/scala/io/gatling/tcp/TcpProtocolBuilder.scala | Scala | mit | 1,076 |
/*
* Copyright © 2014 TU Berlin (emma@dima.tu-berlin.de)
*
* 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... | emmalanguage/emma | emma-lib/src/main/scala/org/emmalanguage/lib/ml/optimization/loss/hinge.scala | Scala | apache-2.0 | 942 |
/*
* The MIT License
*
* Copyright 2016 @claydonkey (Anthony Campbell).
*
* 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, including without limitation the rights
... | claydonkey/breeze | math/src/test/scala/breeze/linalg/functions/schurTest.scala | Scala | apache-2.0 | 2,225 |
import org.specs2.mutable._
import org.specs2.runner._
import org.junit.runner._
import play.api.Play
import play.api.test._
import play.api.test.Helpers._
object authUtility {
private def makeDigest: String = {
val login = Play.current.configuration.getString("auth.username").getOrElse("admin")
val passw... | Rydgel/Shorty | test/ApplicationSpec.scala | Scala | mit | 1,758 |
package repositories.general
import models.Club
trait BaseClubRepository extends BaseRepository[Club] {
}
| Tannheuser/DeutschAktiv | app/repositories/general/BaseClubRepository.scala | Scala | mit | 109 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | goldmedal/spark | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/ResolveHintsSuite.scala | Scala | apache-2.0 | 9,279 |
package grid.engine
object Environment extends Environment
trait Environment {
def SGE_ROOT: String = sys.env("SGE_ROOT")
def SGE_CELL: String = sys.env("SGE_CELL")
def SGE_QMASTER_PORT: String = sys.env("SGE_QMASTER_PORT")
}
| idiv-biodiversity/grid-engine-tools | src/main/scala/Environment.scala | Scala | unlicense | 235 |
/*
* 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 ... | ajbozarth/incubator-livy | core/src/main/scala/org/apache/livy/sessions/SessionState.scala | Scala | apache-2.0 | 2,495 |
/**
* Copyright 2013 Alex Jones
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with work for additional information
* regarding copyright ownership. The ASF licenses file
* to you under the Apache License, Version 2.0 (... | unclealex72/west-ham-calendar | app/controllers/Etag.scala | Scala | apache-2.0 | 2,189 |
package ecommerce.invoicing.app
import akka.cluster.Cluster
import akka.kernel.Bootable
import ecommerce.invoicing.{Department, Invoice}
import pl.newicom.dddd.cluster._
import pl.newicom.dddd.office.OfficeFactory.office
import pl.newicom.dddd.process.CommandReceptorSupport.{CommandReception, receptor}
class Invoicin... | pawelkaczor/ddd-leaven-akka-v2 | invoicing/write-back/src/main/scala/ecommerce/invoicing/app/InvoicingBackendApp.scala | Scala | mit | 556 |
package com.hackfmi.askthor.domain
import spray.http.{StatusCodes, StatusCode}
/**
* Service failure description.
*
* @param message error message
* @param errorType error type
*/
case class Failure(message: String, errorType: FailureType.Value) {
/**
* Return corresponding HTTP status code for failure s... | jorshua/ActionRestService | askthor/src/main/scala/com/hackfmi/askthor/domain/Failure.scala | Scala | mit | 1,097 |
/*
* sbt
* Copyright 2011 - 2018, Lightbend, Inc.
* Copyright 2008 - 2010, Mark Harrah
* Licensed under Apache License 2.0 (see LICENSE)
*/
package sbt
package plugins
import Def.Setting
import Keys._
import librarymanagement._
/**
* An experimental plugin that adds the ability for Giter8 templates to be resol... | sbt/sbt | main/src/main/scala/sbt/plugins/Giter8TemplatePlugin.scala | Scala | apache-2.0 | 815 |
package com.nulabinc.backlog.migration.common.service
import javax.inject.Inject
import com.nulabinc.backlog.migration.common.client.BacklogAPIClient
import com.nulabinc.backlog4j.Resolution
import scala.jdk.CollectionConverters._
/**
* @author
* uchida
*/
class ResolutionServiceImpl @Inject() (backlog: Backlo... | nulab/backlog-migration-common | core/src/main/scala/com/nulabinc/backlog/migration/common/service/ResolutionServiceImpl.scala | Scala | mit | 456 |
/*
* 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 ... | bOOm-X/spark | sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQueryManagerSuite.scala | Scala | apache-2.0 | 12,360 |
package models
import slick.session.Database
import slick.driver.ExtendedProfile
import play.api.db.DB
import play.api.Application
import fixtures._
import play.Logger.{ debug, info, warn, error }
/**
* Use Cake pattern to inject proper database driver
*/
class DAL(override val profile: ExtendedProfile)
extends P... | soupytwist/knit | app/models/DAL.scala | Scala | gpl-3.0 | 1,299 |
package de.berlin.arzt.ml
import java.io.IOException
import java.nio.file.Paths
import org.apache.spark.{ SparkContext, SparkConf }
import scala.io.Codec
import scala.util.{ Try, Success }
import MovieLens._
/**
* Created by realdocx on 18.11.15.
*/
object Main {
val pre = "http://files.grouplens.org/datasets/m... | arzt/ml-stuff | src/main/scala/de/berlin/arzt/ml/Main.scala | Scala | gpl-2.0 | 3,825 |
package feh.tec.rubik
import org.scalacheck.Arbitrary
object Arbitraries {
Arbitrary
}
| fehu/int-sis--AStar | rubik/src/test/scala/feh/tec/rubik/Arbitraries.scala | Scala | mit | 95 |
/*
* ____ ____ _____ ____ ___ ____
* | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R)
* | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data
* | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In... | precog/platform | common/src/test/scala/com/precog/common/ingest/ArchiveSpecs.scala | Scala | agpl-3.0 | 3,961 |
package org.jetbrains.plugins.scala.lang.formatting.settings
import java.awt.BorderLayout
import java.awt.event.ActionEvent
import com.intellij.application.options.codeStyle.OptionTreeWithPreviewPanel
import com.intellij.openapi.fileTypes.FileType
import com.intellij.openapi.ui.OnePixelDivider
import com.intellij.psi... | JetBrains/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/formatting/settings/ScalaDocFormattingPanel.scala | Scala | apache-2.0 | 6,056 |
package net.sansa_stack.query.spark.semantic.utils
import java.util.concurrent.TimeUnit
import scala.collection.mutable.ArrayBuffer
/*
* Helplers
*/
object Helpers {
/*
* fetchTriplesSPO - fetch SUBJECT, PREDICATE and OBJECT
*/
def fetchTripleSPO(triple: String, symbol: Map[String, String]): ArrayBuffer... | SANSA-Stack/SANSA-RDF | sansa-query/sansa-query-spark/src/main/scala/net/sansa_stack/query/spark/semantic/utils/Helpers.scala | Scala | apache-2.0 | 2,949 |
package com.geteit.rcouch.actors
import org.scalatest._
import akka.actor.{ActorRef, ActorSystem}
import akka.testkit.{ImplicitSender, TestKit}
import com.geteit.rcouch.Settings.ClusterSettings
import com.geteit.rcouch.memcached.Memcached
import akka.util.{Timeout, ByteString}
import com.geteit.rcouch.memcached.Memcac... | zbsz/reactive-couch | src/it/scala/com/geteit/rcouch/actors/ClusterActorSpec.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 ... | sgururajshetty/carbondata | integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/CarbonDataMapShowCommand.scala | Scala | apache-2.0 | 4,198 |
/*
* Copyright 2017 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | liquidarmour/ct-calculations | src/test/scala/uk/gov/hmrc/ct/ct600/v2/validation/RSQ7MutuallyExclusiveWithRSQ8Spec.scala | Scala | apache-2.0 | 2,446 |
import scala.compiletime.{erasedValue, summonFrom}
import scala.deriving._
import scala.quoted._
trait Lft[T]:
def toExpr(x: T)(using Type[T], Quotes): Expr[T] // TODO remove `Type[T]`
object Lft {
given Lft[Int] with
def toExpr(x: Int)(using Type[Int], Quotes) = Expr(x)
inline given derived[T](using inlin... | dotty-staging/dotty | tests/run-macros/quoted-liftable-derivation-macro/Derivation_1.scala | Scala | apache-2.0 | 2,821 |
package com.nekogata.backlogger.js_exports.events
import scala.scalajs.js
import scala.scalajs.js.annotation.{JSExport, JSExportTopLevel}
@JSExportTopLevel("SettingEvents")
object SettingEvents {
@JSExport val saved = new Event {
@JSExport override def subscribe(f: js.Function): Subscription = super.subscribe(f... | Shinpeim/BackLogger | scala/src/main/scala/com/nekogata/backlogger/js_exports/events/SettingEvents.scala | Scala | mit | 476 |
object classtut{
def main(args: Array[String]){
var ram=new Student
ram.setName("Ram")
ram.setStandard("XI")
println(ram.toString())
} //end of main
class Student(var name: String,var standard: String){
this.setName(name)
val id=Student.newIdNum
def getName(): String=name
def ge... | Jargon4072/DS-ALGO_implementations | scala/classtut.scala | Scala | gpl-3.0 | 967 |
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs
// Licence: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.server
import akka.actor._
import akka.http.scaladsl.model.ws._
import akka.pattern.pipe
import akka.stream._
import akka.stream.scaladsl._
import akka.testkit._
import ak... | d1egoaz/ensime-sbt | src/sbt-test/sbt-ensime/ensime-server/server/src/test/scala/org/ensime/server/WebSocketBoilerplateSpec.scala | Scala | apache-2.0 | 3,393 |
class C {
val sa = s"""\\"""
val sb = s"""\\\\"""
val sc = s"""\\ """
val ra = raw"""\\"""
val rb = raw"""\\\\"""
val rc = raw"""\\ """
}
| lrytz/scala | test/files/neg/t6476b.scala | Scala | apache-2.0 | 142 |
package au.com.intelix.rs.core.actors
import akka.actor.{Actor, ActorRef, Terminated}
import au.com.intelix.config.RootConfig
import au.com.intelix.evt.EvtContext
import au.com.intelix.rs.core.config.WithActorSystemConfig
trait BaseActor extends WithActorSystemConfig with ActorUtils with EvtContext {
import Common... | intelix/reactiveservices | platform/core/src/main/scala/au/com/intelix/rs/core/actors/BaseActor.scala | Scala | apache-2.0 | 2,796 |
package controllers
import play.api.mvc._
import play.api.libs.streams._
import javax.inject.Inject
import akka.actor._
import akka.stream.Materializer
import play.api.libs.json.JsValue
import models._
import models.BucketJsonWriterNoDb
import play.api.libs.json.Json
import play.api.libs.json.Writes
import play.api.Co... | alexanderfloh/dmpster | app/controllers/WebSocket.scala | Scala | mit | 2,296 |
/* __ *\\
** ________ ___ / / ___ __ ____ Scala.js API **
** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-lang.org/ **
** /____/\\___/... | jmnarloch/scala-js | library/src/main/scala/scala/scalajs/niocharset/StandardCharsets.scala | Scala | bsd-3-clause | 1,440 |
/*
* 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.typedarray
impo... | SebsLittleHelpers/scala-js | test-suite/js/src/test/scala/org/scalajs/testsuite/typedarray/ArrayBufferInputStreamTest.scala | Scala | apache-2.0 | 5,181 |
/*
* Copyright 2010 LinkedIn
*
* 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 w... | jinfei21/kafka | test/unit/kafka/producer/AsyncProducerTest.scala | Scala | apache-2.0 | 8,589 |
/*
* Copyright (c) 2014 Contributor. All rights reserved.
*/
package org.scalaide.debug.internal.expression.features
import org.junit.Test
import org.scalaide.debug.internal.expression.BaseIntegrationTest
import org.scalaide.debug.internal.expression.BaseIntegrationTestCompanion
import org.scalaide.debug.internal.ex... | stephenh/scala-ide | org.scala-ide.sdt.debug.expression.tests/src/org/scalaide/debug/internal/expression/features/ValAccessTest.scala | Scala | bsd-3-clause | 1,749 |
package com.geeksville.mavlink
import java.io._
import com.geeksville.akka.InstrumentedActor
import org.mavlink.messages.MAVLinkMessage
import com.geeksville.util.ThreadTools
import com.geeksville.util.Using._
import org.mavlink._
import com.geeksville.util.DebugInputStream
import com.geeksville.util.ByteOnlyInputStre... | geeksville/arduleader | common/src/main/scala/com/geeksville/mavlink/MavlinkStreamReceiver.scala | Scala | gpl-3.0 | 7,127 |
package ca.aretex.labs.data.jsonmodel
import org.junit.Test
/**
* Created by Choungmo Fofack on 5/4/17.
*/
class PersonTest {
@Test
def test() = {
val person = Person(9999, false, "John Williams", null, Array(Child(16, "Shirley"), Child(11, "Jessica")))
assert(
"Person(9999, false, John Williams, L... | nicaiseeric/lazy-json | src/test/scala/ca/aretex/labs/data/jsonmodel/PersonTest.scala | Scala | apache-2.0 | 429 |
/**
* 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 | deeplang/src/main/scala/io/deepsense/deeplang/params/wrappers/spark/StringParamWrapper.scala | Scala | apache-2.0 | 1,312 |
/**
* 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 ... | massie/adam | adam-cli/src/main/scala/org/bdgenomics/adam/cli/Vcf2ADAM.scala | Scala | apache-2.0 | 3,115 |
/*
* Copyright (c) 2013, Scodec
* All rights reserved.
*
* 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 a... | scodec/scodec | unitTests/src/test/scala/scodec/codecs/ByteAlignedCodecTest.scala | Scala | bsd-3-clause | 2,422 |
/*
Copyright 2012 Georgia Tech Research Institute
Author: lance.gatlin@gtri.gatech.edu
This file is part of org.gtri.util.iteratee library.
org.gtri.util.iteratee library is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
... | gtri-iead/org.gtri.util.iteratee | impl/src/main/scala/org/gtri/util/iteratee/impl/EnumeratorIterator.scala | Scala | gpl-3.0 | 1,367 |
/*
* Copyright 2013 - 2015, Daniel Krzywicki <daniel.krzywicki@agh.edu.pl>
*
* 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, including without limitation the rights
... | ros3n/IntOb | core/src/main/scala/pl/edu/agh/scalamas/random/RandomGeneratorComponent.scala | Scala | mit | 2,332 |
package mypipe.avro.schema
import org.apache.avro.repo.client.RESTRepositoryClient
import scala.collection.mutable
import java.util.logging.Logger
import org.apache.avro.repo.{ Repository, SchemaEntry, Subject }
import com.google.common.collect.{ HashBiMap, BiMap }
trait SchemaRepository[ID, SCHEMA] {
/** @param s... | Asana/mypipe | mypipe-avro/src/main/scala/mypipe/avro/schema/GenericSchemaRepository.scala | Scala | apache-2.0 | 9,729 |
/*
* 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/ct600e/v3/E60Spec.scala | Scala | apache-2.0 | 2,737 |
package com.geishatokyo.diffsql.diff
import org.scalatest.FlatSpec
import org.scalatest.Matchers
import com.geishatokyo.diffsql.ast._
import com.geishatokyo.diffsql.ast.DataType
import com.geishatokyo.diffsql.ast.Table
import com.geishatokyo.diffsql.ast.Column
/**
* Created by takeshita on 14/02/17.
*/
class Standa... | geishatokyo/diff-sql-table | parser/src/test/scala/com/geishatokyo/diffsql/diff/StandardDifferencerTest.scala | Scala | mit | 1,038 |
package de.tuberlin.uebb.sl2.modules
import java.io.File
trait Configs {
case class Config(
/**
* where to look for source files
*/
val sourcepath: File,
/**
* which source files at source path to compile
*/
val sources: List[String],
/**
* where to look for compiled ver... | mzuber/simple-language | src/main/scala/modules/Configs.scala | Scala | bsd-3-clause | 806 |
package engine
import engine.ActionResult.{JoinIsWaiting, No, Ok, Yes}
import engine.Task.TaskContext
abstract class TaskDefinition {
def action(implicit context: TaskContext): Option[ActionResult]
def name: String
}
object TaskDefinition {
class ProcessTaskDefinition(func: (TaskContext) => Unit) extends Task... | mpod/scala-workflow | backend/src/main/scala/engine/TaskDefinition.scala | Scala | gpl-3.0 | 3,136 |
package core
import akka.actor.{ Actor, ActorRefFactory, PoisonPill }
import com.typesafe.scalalogging.LazyLogging
import persistence.entities.{ TestsConfiguration, Project, PullRequestPayload }
import spray.client.pipelining._
import spray.http.{ BasicHttpCredentials, HttpRequest, _ }
import utils._
import scala.con... | ShiftForward/ridgeback | src/main/scala/core/CommentWriter.scala | Scala | mit | 2,842 |
Subsets and Splits
Filtered Scala Code Snippets
The query filters and retrieves a sample of code snippets that meet specific criteria, providing a basic overview of the dataset's content without revealing deeper insights.