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.cloudray.scalapress.payments
import javax.persistence.{JoinColumn, GenerationType, GeneratedValue, Id, Column, Table, Entity}
import org.joda.time.{DateTimeZone, DateTime}
import scala.beans.BeanProperty
/** @author Stephen Samuel */
@Table(name = "payments")
@Entity
class Transaction {
@Id
@Generate... | vidyacraghav/scalapress | src/main/scala/com/cloudray/scalapress/payments/Transaction.scala | Scala | apache-2.0 | 3,686 |
package akka.rtcweb.protocol.srtpoverdtls
import scodec._
import scodec.codecs._
import scodec.bits._
sealed trait SRTPProtectionProfile
object SRTPProtectionProfile {
case object SRTP_AES128_CM_HMAC_SHA1_80 extends SRTPProtectionProfile
case object SRTP_AES128_CM_HMAC_SHA1_32 extends SRTPProtectionProfile
cas... | danielwegener/akka-rtcweb | src/main/scala/akka/rtcweb/protocol/srtpoverdtls/SRTPProtectionProfile.scala | Scala | apache-2.0 | 740 |
package cromwell.services.metadata
import java.time.OffsetDateTime
import cats.data.NonEmptyList
import cromwell.core.WorkflowId
import org.slf4j.{Logger, LoggerFactory}
import wom.values._
case class MetadataJobKey(callFqn: String, index: Option[Int], attempt: Int)
case class MetadataKey private (workflowId: Workf... | ohsu-comp-bio/cromwell | services/src/main/scala/cromwell/services/metadata/MetadataQuery.scala | Scala | bsd-3-clause | 4,881 |
/*
* Copyright (c) 2019. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
* Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
* Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
* Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagi... | BiyuHuang/CodePrototypesDemo | demo/ScalaDemo/src/main/scala/com/wallace/demo/app/redisclient/RedisClientDemo.scala | Scala | apache-2.0 | 980 |
package com.karasiq.shadowcloud.config
import com.typesafe.config.Config
import com.karasiq.common.configs.ConfigImplicits
import com.karasiq.shadowcloud.metadata.MetadataProvider
case class MetadataConfig(rootConfig: Config, fileSizeLimit: Long,
mimeProbeSize: Int, providers: ProvidersConf... | Karasiq/shadowcloud | core/src/main/scala/com/karasiq/shadowcloud/config/MetadataConfig.scala | Scala | apache-2.0 | 715 |
/*
* 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 ... | haohui/flink | flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/batch/table/CorrelateTest.scala | Scala | apache-2.0 | 4,378 |
package org.scalafmt.benchmarks
import java.io.File
import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations.Benchmark
import org.openjdk.jmh.annotations.BenchmarkMode
import org.openjdk.jmh.annotations.Measurement
import org.openjdk.jmh.annotations.Mode
import org.openjdk.jmh.annotations.OutputTimeUni... | olafurpg/scalafmt | scalafmt-benchmarks/src/main/scala/org/scalafmt/benchmarks/MicroBenchmark.scala | Scala | apache-2.0 | 2,910 |
package com.aylasoftware.bendaroni.example
import java.awt.Color
import java.awt.Dimension
import java.awt.Graphics2D
import scala.swing.MainFrame
import scala.swing.Panel
import scala.swing.SimpleSwingApplication
import com.github.fommil.netlib.BLAS
import scala.swing.event._
import javax.swing.SwingUtilities
import ... | harveywi/bend-a-roni | examples/src/main/scala/com/aylasoftware/bendaroni/example/Demo.scala | Scala | mit | 4,415 |
package com.insweat.hssd.lib.essence.thypes
import scala.ref.WeakReference
import com.insweat.hssd.lib.essence.CollectionThypeLike
import com.insweat.hssd.lib.essence.DynamicThypeCompanion
import com.insweat.hssd.lib.essence.PatternedThypeCompanion
import com.insweat.hssd.lib.essence.SchemaLike
import com.inswe... | insweat/hssd | com.insweat.hssd.lib/src/com/insweat/hssd/lib/essence/thypes/CollectionThypes.scala | Scala | lgpl-3.0 | 3,038 |
/*
* 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/src/main/scala/org/apache/flink/table/api/scala/DataStreamConversions.scala | Scala | apache-2.0 | 2,376 |
package com.outr.arango.api.model
import io.circe.Json
case class PostAPIIndexHash(`type`: String,
deduplicate: Option[Boolean] = None,
fields: Option[List[String]] = None,
sparse: Option[Boolean] = None,
... | outr/arangodb-scala | api/src/main/scala/com/outr/arango/api/model/PostAPIIndexHash.scala | Scala | mit | 351 |
// Copyright (c) 2011 Thomas Suckow
// 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/legal/epl-v10.html
package net.codingwell.weave
impo... | codingwell/Weave | core-api/src/main/scala/net/codingwell/weave/Symbols.scala | Scala | epl-1.0 | 3,363 |
import sbt._
object Dependencies {
/**************************/
/** Compile dependencies **/
/**************************/
private def scalaReflect(version: String) = "org.scala-lang" % "scala-reflect" % version
private val scalaSwing = "org.scala-... | MykolaB/gatling | project/Dependencies.scala | Scala | apache-2.0 | 7,617 |
package drt.client.services.handlers
import diode._
import diode.data.Pot
import drt.client.actions.Actions._
import drt.client.services.JSDateConversions.SDate
import drt.client.services.ViewMode
import drt.shared.CrunchApi.MillisSinceEpoch
import drt.shared.{PortState, SDateLike}
import scala.concurrent.ExecutionCo... | UKHomeOffice/drt-scalajs-spa-exploration | client/src/main/scala/drt/client/services/handlers/ViewModeHandler.scala | Scala | apache-2.0 | 1,264 |
package ir.xamin.processors
import ir.xamin.Processor
import ir.xamin.packet.receive.{MarketInstall, MarketRemove}
import org.jivesoftware.smack.XMPPConnection
import com.redis._
import com.github.seratch.scalikesolr._
import org.jivesoftware.smack.PacketListener
import org.jivesoftware.smack.packet.{IQ, Packet}
impor... | XaminProject/peace | src/main/scala/ir/xamin/processors/MarketProcessor.scala | Scala | mit | 2,319 |
package temportalist.esotericraft.emulation.common
import net.minecraft.entity.EntityLivingBase
import net.minecraft.nbt.NBTTagCompound
import net.minecraft.world.World
import net.minecraftforge.common.util.INBTSerializable
/**
*
* Based HEAVILY on [[https://github.com/iChun/Morph/blob/master/src/main/java/morph/... | TheTemportalist/EsoTeriCraft | src/main/scala/temportalist/esotericraft/emulation/common/EntityState.scala | Scala | apache-2.0 | 1,999 |
package com.twitter.finagle.stats
import com.twitter.common.metrics._
import com.twitter.common.stats.{Statistics, ApproximateHistogram}
import com.twitter.util.events.Sink
object ImmediateMetricsStatsReceiver {
def newHistogramInterface(name: String): HistogramInterface = {
new HistogramInterface {
priva... | jpederzolli/finagle | finagle-stats/src/main/scala/com/twitter/finagle/stats/ImmediateMetricsStatsReceiver.scala | Scala | apache-2.0 | 1,793 |
import akka.actor.{ActorSystem, Props}
import akka.testkit.{ImplicitSender, TestActorRef, TestKit}
import org.glotaran.core.events.{GlotaranEvent, GlotaranEventSubscription}
import org.glotaran.kernel.analysisworker.AnalysisWorker
import org.glotaran.kernel.supervisor.KernelSupervisor
import org.glotaran.kernel.types.e... | glotaran/glotaran-kernel | glotaran-kernel-supervisor/src/test/scala/TestKernelBehavior.scala | Scala | gpl-3.0 | 2,698 |
package functions
import com.google.cloud.functions.{HttpFunction, HttpRequest, HttpResponse}
// [START functions_helloworld_get]
class ScalaHelloWorld extends HttpFunction {
override def service(httpRequest: HttpRequest, httpResponse: HttpResponse): Unit = {
httpResponse.getWriter.write("Hello World!")
}
}
/... | GoogleCloudPlatform/java-docs-samples | functions/helloworld/scala-helloworld/src/main/scala/functions/ScalaHelloWorld.scala | Scala | apache-2.0 | 352 |
package io.skysail.server.persistence.orientdb
import domino.DominoActivator
import io.skysail.api.persistence.DbService
import org.slf4j.LoggerFactory
class Activator extends DominoActivator {
private var log = LoggerFactory.getLogger(this.getClass)
whenBundleActive({
log info s"OrientDbGraphService Bundle... | evandor/skysail-core | skysail.server.persistence.orientdb/src/io/skysail/server/persistence/orientdb/Activator.scala | Scala | apache-2.0 | 953 |
package views.html
import play.templates._
import play.templates.TemplateMagic._
import play.api.templates._
import play.api.templates.PlayMagic._
import models._
import controllers._
import play.api.i18n._
import play.api.mvc._
import play.api.data._
import views.html._
/**/
object main extends BaseScalaTemplate[pl... | valliappanr/Spellings | target/scala-2.10/src_managed/main/views/html/main.template.scala | Scala | apache-2.0 | 5,067 |
/*
* 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/SparkSessionExtensions.scala | Scala | apache-2.0 | 8,492 |
package com.ajjpj.adiagram_.ui.mouse
import com.ajjpj.adiagram_.ui.AScreenPos
import com.ajjpj.adiagram_.geometry.APoint
import com.ajjpj.adiagram_.model.diagram.AShapeSpec
import com.ajjpj.adiagram_.ui.fw.Command
/**
* This state allows selecting a shape. It is intended to be used as a mix-in stackable trait.
*
*... | arnohaase/a-diagram | src/main/scala-old/com/ajjpj/adiagram_/ui/mouse/SelectableMouseTrackerState.scala | Scala | apache-2.0 | 1,357 |
package mesosphere.marathon
package core.leadership.impl
import akka.actor.{ Actor, ActorLogging, ActorRef, PoisonPill, Props, Stash, Status, Terminated }
import akka.event.LoggingReceive
import mesosphere.marathon.core.leadership.PreparationMessages.{ PrepareForStart, Prepared }
import mesosphere.marathon.core.leader... | natemurthy/marathon | src/main/scala/mesosphere/marathon/core/leadership/impl/WhenLeaderActor.scala | Scala | apache-2.0 | 2,664 |
package com.mz.training.domains.item
import com.mz.training.domains.EntityId
import spray.json.DefaultJsonProtocol._
/**
* Created by zemi on 10/08/16.
*/
case class Item(id:Long, name:String, description: String) extends EntityId
object Item {
implicit val format = jsonFormat3(Item.apply)
}
| michalzeman/angular2-training | akka-http-server/src/main/scala/com/mz/training/domains/item/Item.scala | Scala | mit | 302 |
package us.my_family.metrics.test
import org.scalamock.scalatest.MockFactory
import us.my_family.metrics.TagMap
import us.my_family.metrics.client.MetricsClient
trait MetricsClientFixture extends MockFactory {
lazy val counter = mockFunction[String, Long, TagMap, Double, Unit]
lazy val gauge = mockFunction[String... | thrykol/metrics-client | client/src/test/scala/us/my_family/metrics/test/MetricsClientFixture.scala | Scala | gpl-3.0 | 979 |
package dotty.tools
package dotc
package semanticdb
import scala.language.unsafeNulls
import core._
import Phases._
import ast.tpd._
import ast.Trees.{mods, WithEndMarker}
import Contexts._
import Symbols._
import Flags._
import Names.Name
import StdNames.nme
import NameOps._
import Denotations.StaleSymbol
import uti... | dotty-staging/dotty | compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala | Scala | apache-2.0 | 20,562 |
package org.wquery.lang
import org.wquery.model._
trait WTupleParsers extends WTokenParsers {
val DefaultSeparator = "\\t"
def parse(wordNet: WordNet, value: String, sep: String = DefaultSeparator) = {
value.split(sep).map { elem =>
parseAll(tokenLit, elem) match {
case Success((SynsetType, (wo... | marekkubis/wquery | src/main/scala/org/wquery/lang/WTupleParsers.scala | Scala | bsd-3-clause | 939 |
// 7. Solve the preceding exercise without writing a loop. (Hint: Look at the StringOps Scaladoc.)
"Hello".foldLeft(1L)((a, b) => a * b) | P7h/ScalaPlayground | Scala for the Impatient/exercises/org/p7h/scala/impatient/chapter02/07.scala | Scala | apache-2.0 | 139 |
package sml.instructions
import sml.Machine
/**
* Divide the value at op1 by op2 and store
* result in specified register
*/
case class DivInstruction(label: String, opcode: String, result: Int, op1: Int, op2: Int) extends MathInstruction {
/**
* @see Instruction#execute(m: Machine)
*/
override def... | BBK-PiJ-2015-67/sdp-portfolio | coursework/cw-one/src/main/scala/sml/instructions/DivInstruction.scala | Scala | unlicense | 692 |
class A[B[_] <: Long]
| som-snytt/dotty | tests/fuzzy/IAE-4a69457e1319217c3bac170110ea4ba58dca11a6.scala | Scala | apache-2.0 | 22 |
// Equites, a Scala chess playground
// Copyright © 2013-2015 Frank S. Thomas <frank@timepit.eu>
//
// 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 ... | equites-chess/equites-core | src/main/scala/eu/timepit/equites/util/GenericParsers.scala | Scala | gpl-3.0 | 1,998 |
/*
* Copyright (C) 2017 LREN CHUV for Human Brain Project
*
* 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) any later version... | LREN-CHUV/workflow | src/main/scala/ch/chuv/lren/woken/core/model/jobs/JobResult.scala | Scala | apache-2.0 | 16,213 |
package sbt
package logic
import scala.annotation.tailrec
import Formula.{ And, True }
/*
Defines a propositional logic with negation as failure and only allows stratified rule sets (negation must be acyclic) in order to have a unique minimal model.
For example, this is not allowed:
+ p :- not q
+ q :- not p
but... | pdalpra/sbt | util/logic/src/main/scala/sbt/logic/Logic.scala | Scala | bsd-3-clause | 13,910 |
/*
* 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 ... | jiangxb1987/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AnsiTypeCoercion.scala | Scala | apache-2.0 | 15,804 |
/*
* 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 ... | ksimar/incubator-carbondata | integration/spark2/src/test/scala/org/apache/spark/carbondata/query/SubQueryTestSuite.scala | Scala | apache-2.0 | 2,598 |
package amailp.intellij.robot.extensions
import com.intellij.lang.annotation.{AnnotationHolder, HighlightSeverity}
import com.intellij.psi.PsiElement
import amailp.intellij.robot.psi._
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors
import DefaultLanguageHighlighterColors._
import com.intellij.open... | AmailP/robot-plugin | src/main/scala/amailp/intellij/robot/extensions/Annotator.scala | Scala | gpl-3.0 | 952 |
/**
* Copyright (C) 2010 Orbeon, Inc.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) any later version.
*
* This program i... | martinluther/orbeon-forms | src/main/scala/org/orbeon/oxf/xforms/action/actions/XFormsSendAction.scala | Scala | lgpl-2.1 | 2,906 |
/*
* Copyright 2009-2010 LinkedIn, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | linkedin/norbert | network/src/main/scala/com/linkedin/norbert/network/netty/NettyNetworkServer.scala | Scala | apache-2.0 | 9,631 |
package clustering
import java.io.{FileOutputStream, PrintStream}
import breeze.linalg.{DenseMatrix => BDenseMatrix, DenseVector => BDenseVector, SparseVector => BSparseVector}
import org.apache.log4j.{Level, Logger}
import org.apache.spark.mllib.linalg._
import org.apache.spark.mllib.linalg.distributed.RowMatrix
imp... | chanjin/NRFAnalysis | src/main/scala/clustering/NRFSVDMain.scala | Scala | apache-2.0 | 11,147 |
package io.coral.api
import com.typesafe.config.Config
import io.coral.actors.ActorPropFactory
import scaldi.Module
import scala.collection.JavaConversions._
import io.coral.actors.DefaultActorPropFactory
class DefaultModule(config: Config) extends Module {
private val ActorPropFactoriesConfigPath = "injections.act... | daishichao/coral | runtime-api/src/main/scala/io/coral/api/DefaultModule.scala | Scala | apache-2.0 | 887 |
/* PrintEventsWithWriter.scala
*
* Copyright (c) 2013-2014 linkedin.com
* Copyright (c) 2013-2015 zman.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.o... | zmanio/atmos | src/main/scala/atmos/monitor/PrintEventsWithWriter.scala | Scala | apache-2.0 | 3,233 |
package bbc.locator
import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
class TravelNewsFilter extends Simulation {
val httpProtocol = http
.baseURL("https://api.stage.bbc.co.uk")
.acceptHeader("application/xml")
val domesticGeonames = csv("locator/ds_001-... | bestscarper/gatling-load-tests | src/test/scala/bbc/locator/TravelNewsFilter.scala | Scala | apache-2.0 | 710 |
/*
* 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 ... | gengliangwang/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StateSchemaCompatibilityChecker.scala | Scala | apache-2.0 | 4,947 |
/**
* Copyright (c) 2012, www.quartzsource.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... | cyberspinach/meutrino | src/test/scala/org/quartzsource/meutrino/client/ChangeContextTest.scala | Scala | apache-2.0 | 3,831 |
/*
* 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 | yggdrasil/src/test/scala/quasar/yggdrasil/bytecode/RandomLibrary.scala | Scala | apache-2.0 | 3,990 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | apache/flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/rules/logical/JoinConditionTypeCoerceRule.scala | Scala | apache-2.0 | 4,780 |
package scife.enumeration
package lzy
package breadth
import combinators._
import scala.collection.mutable
import scala.reflect.ClassTag
import scife.util._
object ConcatFinite {
def apply[T](left: Finite[T], right: Finite[T]) /*(implicit ct: ClassTag[T])*/ =
if (left.size == right.size)
new ConcatFini... | kaptoxic/SciFe | src/main/scala/scife/enumeration/lzy/breadth/ConcatFinite.scala | Scala | gpl-2.0 | 5,326 |
/*
* 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... | Comcast/sirius | src/main/scala/com/comcast/xfinity/sirius/api/impl/paxos/LeaderWatcher.scala | Scala | apache-2.0 | 4,608 |
package com.khivi.collection
import scala.collection.{Map, MapLike}
trait MultiValueMapLike[K, +V, +This <: MultiValueMapLike[K, V, This] with Map[K, Iterable[V]]] extends MapLike[K, Iterable[V], This]
{
def +[V1 >: V](key: K, value : V1): This = this+(key, Iterable[V1](value))
def +[V1 >: V](key: K, values :Iter... | khivi/scala-multivalue-map | src/main/scala/multi.scala | Scala | mit | 468 |
package org.jetbrains.plugins.scala.lang.resolve2
/**
* Pavel.Fatin, 02.02.2010
*/
class InheritanceSuperSingleTest extends ResolveTestBase {
override def folderPath: String = {
super.folderPath + "inheritance/super/single/"
}
def testClashClass(): Unit = doTest()
def testClashObject(): Unit = doTest(... | JetBrains/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/lang/resolve2/InheritanceSuperSingleTest.scala | Scala | apache-2.0 | 469 |
package se.lu.nateko.cp.meta.services.upload
import java.net.URI
import java.time.Instant
import org.eclipse.rdf4j.model.IRI
import org.eclipse.rdf4j.model.Statement
import org.eclipse.rdf4j.model.Value
import org.eclipse.rdf4j.model.vocabulary.RDF
import org.eclipse.rdf4j.model.vocabulary.RDFS
import org.eclipse.rdf... | ICOS-Carbon-Portal/meta | src/main/scala/se/lu/nateko/cp/meta/services/upload/StatementsProducer.scala | Scala | gpl-3.0 | 10,280 |
package com.bwsw.tstreamstransactionserver.netty.server.transactionMetadataService
import java.util.concurrent.Executors
import java.util.concurrent.atomic.AtomicLong
import com.bwsw.tstreamstransactionserver.netty.server.streamService.StreamCRUD
import com.bwsw.tstreamstransactionserver.rpc.ProducerTransaction
impo... | bwsw/tstreams-transaction-server | src/main/scala/com/bwsw/tstreamstransactionserver/netty/server/transactionMetadataService/ProducerTransactionStateNotifier.scala | Scala | apache-2.0 | 1,965 |
/*******************************************************************************
* Copyright 2010 Maxime Lévesque
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apa... | xuwei-k/Squeryl | src/main/scala/org/squeryl/dsl/ast/ExpressionNode.scala | Scala | apache-2.0 | 18,476 |
package org.orbeon.dom
import java.{util => ju}
import org.orbeon.dom.tree.AbstractBranch
object Document {
def apply(): Document =
new Document
def apply(rootElementName: String): Document =
apply(Element(QName(rootElementName)))
def apply(rootElement: Element): Document = {
val newDoc = new Do... | orbeon/orbeon-forms | dom/src/main/scala/org/orbeon/dom/Document.scala | Scala | lgpl-2.1 | 4,303 |
/**
* 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... | geeag/kafka | core/src/main/scala/kafka/log/Log.scala | Scala | apache-2.0 | 47,352 |
/***********************************************************************
* 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-tools/src/main/scala/org/locationtech/geomesa/tools/CommonParams.scala | Scala | apache-2.0 | 10,311 |
package org.denigma.drugage.domain
case class OrganismSpecification(specie: Option[String] = None, strain: Option[String] = None,
gender: Option[Gender] = None) {
def satisfiedBy(o: Organism): Boolean = Seq(
specie.map(_ == o.specie),
for {s <- strain; os <- o.strain} yield s == os,
for {g <- gender; ... | rmihael/drugage | frontend/jvm/src/main/scala/org.denigma.drugage/domain/OrganismSpecification.scala | Scala | mpl-2.0 | 382 |
package hulk.http
import akka.actor.ActorRef
import akka.http.scaladsl.model.ws.{TextMessage, Message}
import akka.stream.scaladsl.Source
import hulk.filtering.Filter
import hulk.filtering.Filter.Next
import org.specs2.mock.Mockito
import org.specs2.mutable.Specification
import scala.concurrent.duration._
import scal... | reneweb/hulk | framework/src/test/scala/hulk/http/ActionTest.scala | Scala | apache-2.0 | 3,536 |
package persistence.dal
import java.util.UUID
import com.typesafe.scalalogging.LazyLogging
import persistence.entities.{Survey, Surveys}
import slick.driver.JdbcProfile
import utils.DbModule
import scala.concurrent.Future
trait SurveysDal {
def save(sup: Survey) : Future[Int]
def getSurveyById(id: String) : Fu... | thoeni/pulse-spray | src/main/scala/persistence/dal/SurveysDal.scala | Scala | apache-2.0 | 981 |
println('something') // TODO: mix styles
| apiology/punchlist | feature/samples/scala_file_to_be_ignored/lib/bar.scala | Scala | mit | 41 |
/*
* (c) Copyright 2016 Hewlett Packard Enterprise Development LP
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | hpe-cct/cct-core | src/main/scala/cogx/utilities/Scalar.scala | Scala | apache-2.0 | 2,227 |
package net.opentsdb.proxy
import org.slf4j.LoggerFactory
import java.io.{FileInputStream, BufferedInputStream, File}
import java.util.Properties
import com.google.inject.Guice
import net.opentsdb.proxy.modules.ProxyModule
import net.opentsdb.proxy.netty.NettyServer
class ProxyServer{}
object ProxyServer {
private... | nikore/opentsdb-contrib | opentsdb-proxy/src/main/scala/net/opentsdb/proxy/ProxyServer.scala | Scala | apache-2.0 | 1,113 |
// Copyright (C) 2015 ENSIME Authors
// License: GPL 3.0
package org.ensime.util
import Predef.{ any2stringadd => _, _ => _ }
import org.scalatest._
class ListSpec extends FlatSpec with Matchers {
import list._
"list._" should "provide initLast" in {
List(1).initLast shouldBe ((Nil, 1))
List(1, 2, 3, 4)... | eddsteel/ensime | util/src/test/scala/org/ensime/util/ListSpec.scala | Scala | gpl-3.0 | 612 |
package com.wavesplatform.matcher.model
import com.wavesplatform.matcher.model.MatcherModel.Price
import play.api.libs.json.{JsValue, Json}
import scorex.transaction.assets.exchange.{AssetPair, Order, OrderType}
object MatcherModel {
type Price = Long
type Level[+A] = Vector[A]
type OrderId = String
}
case cla... | B83YPoj/Waves | src/main/scala/com/wavesplatform/matcher/model/MatcherModel.scala | Scala | apache-2.0 | 2,944 |
package com.twitter.finagle.util
// This is a purpose-built data structure to use with Drv construction.
// It's core optimization is that we know the small and large sets, at their
// peak size, have the same number of total elements as weights in the Drv
// so we can pre-allocate an array to back this. This avoids t... | twitter/finagle | finagle-core/src/main/scala/com/twitter/finagle/util/DrvSmallLargeSets.scala | Scala | apache-2.0 | 1,740 |
package io.getquill.quotation
import io.getquill.Spec
import io.getquill.testContext._
import io.getquill.testContext
class RebindSpec extends Spec {
"rebinds non-arg function" in {
implicit class ReturnId[T](action: Action[T]) {
def returnId = quote(infix"$action RETURNING ID".as[Action[T]])
}
v... | mentegy/quill | quill-core/src/test/scala/io/getquill/quotation/RebindSpec.scala | Scala | apache-2.0 | 1,693 |
/*
* 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/test/scala/org/apache/spark/sql/DatasetSuite.scala | Scala | apache-2.0 | 70,079 |
/***********************************************************************
* 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... | jahhulbert-ccri/geomesa | geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/io/fs/FileSystemDelegate.scala | Scala | apache-2.0 | 976 |
package me.yingrui.segment.tools
import java.io.{BufferedReader, _}
import me.yingrui.segment.concept.Concept
import me.yingrui.segment.core.SegmentResult
import me.yingrui.segment.dict.{DictionaryFactory, IDictionary, POSUtil}
import scala.collection.mutable._
class CorpusLoader {
private var reader: BufferedRe... | yingrui/mahjong | lib-segment/src/main/scala/me/yingrui/segment/tools/CorpusLoader.scala | Scala | gpl-3.0 | 5,041 |
package mesosphere.marathon.state
import mesosphere.marathon.Protos.GroupDefinition
import mesosphere.marathon.state.Group._
import mesosphere.marathon.state.PathId._
import org.jgrapht.DirectedGraph
import org.jgrapht.alg.CycleDetector
import org.jgrapht.graph._
import scala.collection.JavaConversions._
case class ... | Kosta-Github/marathon | src/main/scala/mesosphere/marathon/state/Group.scala | Scala | apache-2.0 | 7,938 |
package net.debasishg.domain.trade
package model
trait RefModel extends Serializable {
type Instrument = String
type Account = String
type NetAmount = BigDecimal
type Customer = String
type Broker = String
sealed trait Market
case object HongKong extends Market
case object Singapore ex... | Tjoene/thesis | benchmark/src/main/scala/cqrs/RefModel.scala | Scala | gpl-2.0 | 676 |
/**
* 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/test/scala/io/deepsense/deeplang/params/choice/ChoiceParamSpec.scala | Scala | apache-2.0 | 2,589 |
package com.softwaremill.macwire
import scala.quoted.*
package object internals {
def showTypeName[T: Type](using q: Quotes): String = showTypeName(using q)(q.reflect.TypeRepr.of[T])
def showTypeName(using q: Quotes)(t: q.reflect.TypeRepr): String = t.typeSymbol.name
}
| adamw/macwire | macros/src/main/scala-3/com/softwaremill/macwire/internals/package.scala | Scala | apache-2.0 | 276 |
/*
* 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/FileStreamSinkSuite.scala | Scala | apache-2.0 | 11,675 |
package byteR
import toplev.GenericPrintable
object JVMClassRef {
def classRefFor(name: String): JVMCustomClassRef = {
new JVMCustomClassRef(name)
}
}
sealed trait JVMClassRef extends GenericPrintable
sealed trait JVMBoxedRef extends JVMClassRef
sealed trait JVMCMLCLibRef extends JVMClassRef
case class JV... | j-c-w/mlc | src/main/scala/byteR/JVMClassRef.scala | Scala | gpl-3.0 | 2,432 |
/*
* Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com>
*/
package com.lightbend.lagom.internal.scaladsl.server
import com.lightbend.lagom.internal.scaladsl.client.ScaladslClientMacroImpl
import com.lightbend.lagom.scaladsl.api.Descriptor
import com.lightbend.lagom.scaladsl.api.Service
import com.li... | rcavalcanti/lagom | service/scaladsl/server/src/main/scala/com/lightbend/lagom/internal/scaladsl/server/ScaladslServerMacroImpl.scala | Scala | apache-2.0 | 2,242 |
package com.github.mdr.folderclasspathcontainer
import org.eclipse.jdt.core.IClasspathEntry
import org.eclipse.jdt.core.IJavaProject
import org.eclipse.jdt.ui.wizards.IClasspathContainerPage
import org.eclipse.jdt.ui.wizards.IClasspathContainerPageExtension
import org.eclipse.jface.wizard.WizardPage
import org.eclipse... | mdr/folderclasspathcontainer | folder-classpath-container/src/com/github/mdr/folderclasspathcontainer/FolderClasspathContainerPage.scala | Scala | mit | 3,829 |
/**
* 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... | tnachen/mesos-kafka | src/test/ly/stealth/mesos/kafka/BrokerTest.scala | Scala | apache-2.0 | 11,610 |
package week4
trait List[T] {
def isEmpty: Boolean
def head: T
def tail: List[T]
}
class Cons[T](val head: T, val tail: List[T]) extends List[T] {
def isEmpty: Boolean = false
}
class Nil[T] extends List[T] {
def isEmpty: Boolean = true
def head: Nothing = throw new NoSuchElementException("Nil.head")
... | pacomendes/scala | progfun/src/week4/List.scala | Scala | mit | 388 |
class AddClauseConstructorVararg(b: Boolean)(x: Int, i: Int*) {
new AddClauseConstructorVararg(true)(10)
new AddClauseConstructorVararg(true)(10, 0, 1, 2)
new AddClauseConstructorVararg(b = true)(10)
new AddClauseConstructorVararg(b = true)(10, 0, 1)
}
| ilinum/intellij-scala | testdata/changeSignature/inScala/AddClauseConstructorVararg_after.scala | Scala | apache-2.0 | 261 |
abstract class Food(val name: String) {
override def toString = name
}
object Apple extends Food("Apple")
object Orange extends Food("Orange")
object Cream extends Food("Cream")
object Sugar extends Food("Sugar")
class Recipe(
val name: String,
val ingredients: List[Food],
val instructions: String
) {
overr... | machristie/ProgrammingInScala | ch29/cakepattern.scala | Scala | unlicense | 2,519 |
object Test extends App {
println(Macros.foo1.x)
println(Macros.foo2.x)
println(Macros.foo3.x)
} | lampepfl/dotty | tests/disabled/macro/run/t8048b/Test_2.scala | Scala | apache-2.0 | 102 |
/*
* Copyright (c) 2002-2018 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundatio... | HuangLS/neo4j | community/cypher/cypher-compiler-2.3/src/main/scala/org/neo4j/cypher/internal/compiler/v2_3/commands/expressions/Subtract.scala | Scala | apache-2.0 | 1,169 |
package test
import com.sksamuel.elastic4s.ElasticDsl._
import org.elasticsearch.index.query.FilterBuilders
import org.junit.runner._
import org.specs2.mutable._
import org.specs2.runner._
import play.api.Logger
import play.api.libs.json.Json
import play.api.test.{WithApplication, _}
import playlastik._
import scala.... | fmasion/playLastik | project-code/test/test/AliasSpec.scala | Scala | apache-2.0 | 7,684 |
/*
* 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 | streaming/src/test/scala/org/apache/spark/streaming/WindowOperationsSuite.scala | Scala | apache-2.0 | 13,175 |
/**
* Copyright 2014-2015 Martin Cooper
*
* 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 ... | martincooper/scala-datatable | src/main/scala/com/github/martincooper/datatable/IndexedSeqExtensions.scala | Scala | apache-2.0 | 2,522 |
/*
* Copyright 2015 Scopely
*
* 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... | scopely/affqis | src/main/scala/com/scopely/affqis/SqlParams.scala | Scala | apache-2.0 | 2,139 |
object Test {
type LeafElem[X] = X match {
case String => Char
case Array[t] => LeafElem[t]
case Iterable[t] => LeafElem[t]
case AnyVal => X
}
}
| lampepfl/dotty | tests/pos/6362.scala | Scala | apache-2.0 | 165 |
package com.emajliramokade
package services
import org.zeromq.ZMQ
import scala.concurrent.Future
trait RemotingZeroMQ[T] extends Remoting[T] {
def send(
serviceUrl: String
, request: Array[Byte]
, headers: Map[String, String] = Map.empty
): Future[Array[Byte]] =
Future {
val socket = ne... | element-doo/ekade | code/scala/Services/src/main/scala/com/emajliramokade/services/RemotingZeroMQ.scala | Scala | bsd-3-clause | 920 |
/**
* Copyright (C) 2011 Orbeon, Inc.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) any later version.
*
* This program i... | wesley1001/orbeon-forms | src/test/scala/org/orbeon/oxf/cache/MemoryCacheTest.scala | Scala | lgpl-2.1 | 5,686 |
class L {
val List(v:Int, 2) = List(2, v:Int)
val (a:Int, b:Int) = (1, a)
}
| yusuke2255/dotty | tests/pos/t122.scala | Scala | bsd-3-clause | 80 |
package com.appliedscala.generator.configuration
import play.api.libs.json.{Json, Reads}
case class ApplicationConfiguration(directories: Directories, templates: Templates, site: Site, server: HttpServer)
object ApplicationConfiguration {
implicit val reads: Reads[ApplicationConfiguration] = Json.reads[Application... | denisftw/s2gen | src/main/scala/com/appliedscala/generator/configuration/ApplicationConfiguration.scala | Scala | mit | 337 |
package com.ytsebro.nlp
import com.ytsebro.beans.Word
import edu.stanford.nlp.simple.Document
import scala.collection.JavaConversions._
/**
* Created by yegor on 8/21/16.
*/
class Parser {
/*
*Default arrays of POS'es which we suppose to be nodes or edges
*/
val nodePos = Array("NN", "PRP", "JJ", "DT", "... | egorsz/textview | src/main/scala/com/ytsebro/nlp/Parser.scala | Scala | gpl-3.0 | 1,419 |
package com.github.okapies.finagle.gntp
object Header {
// Response-* header
val RESPONSE_ACTION = "Response-Action"
// Application-* headers
val APPLICATION_NAME = "Application-Name"
val APPLICATION_ICON = "Application-Icon"
// Notification-* headers
val NOTIFICATIONS_COUNT = "Notifications-Count... | okapies/finagle-gntp | src/main/scala/com/github/okapies/finagle/gntp/Header.scala | Scala | bsd-2-clause | 2,321 |
package com.lateralthoughts.points
import com.lateralthoughts.points.controllers.{RewardingActionCategoryController, RewardingActionController}
import com.lateralthoughts.points.services.{RewardingActionCategoryService, RewardingActionService}
class PointsServlet(env: {
val rewardingActionService: RewardingActionSe... | vincentdoba/points | points-server/src/main/scala/com/lateralthoughts/points/PointsServlet.scala | Scala | mit | 658 |
package app.metrics
trait Metrics {
/**
* Entry point to metrics/stats collection for the system.
*
* Basic stats receiver, use `StatsReceiver.scope` to customise. Use this for creating stats instances for things
* like downstream services:
*
* {{{
* Metrics.baseMetrics.scope("clnt", "my-client"... | PScopelliti/ProjectTracker | note-service/src/main/scala/app/metrics/Metrics.scala | Scala | apache-2.0 | 1,567 |
// @GENERATOR:play-routes-compiler
// @SOURCE:C:/Git/Bigsby/PoC/java/sbting/first-play/conf/routes
// @DATE:Fri Aug 03 14:51:23 BST 2018
package router
import play.core.routing._
import play.core.routing.HandlerInvokerFactory._
import play.api.mvc._
import _root_.controllers.Assets.Asset
import _root_.play.libs.F
... | Bigsby/PoC | java/sbting/first-play/target/scala-2.12/routes/main/router/Routes.scala | Scala | apache-2.0 | 5,037 |
package scalajsclient
import org.scalajs.dom
import scala.scalajs.js
import scala.scalajs.js.timers._
import scala.scalajs.js.Dynamic.global
import org.singlespaced.d3js.d3
import org.singlespaced.d3js.Ops._
import smartchess._
import ScalaJSUtils._
import shared._
import shared.SharedSettings._
object WebBoardGlo... | serversideapps/silhmojs | client/src/main/scala/scalajsclient/webboard/WebBoardGlobals.scala | Scala | apache-2.0 | 5,231 |
// Copyright 2014 Commonwealth Bank of Australia
//
// 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 ap... | toddmowen/maestro | maestro-core/src/main/scala/au/com/cba/omnia/maestro/core/upload/Input.scala | Scala | apache-2.0 | 2,312 |
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.