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 synereo.client.facades
import scala.scalajs.js
import scala.scalajs.js.annotation.JSName
@js.native
@JSName("SRPClient")
class SRPClient(username: String, password: String) extends js.Object {
def getAHex(): String = js.native
def getMHex(BHex: String, saltHex: String): String = js.native
def getVerifie... | LivelyGig/ProductWebUI | sclient/src/main/scala/synereo/client/facades/SRPClient.scala | Scala | apache-2.0 | 414 |
/*
* Copyright 2014-16 Intelix Pty Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | intelix/reactiveservices | platform/core/src/main/scala/au/com/intelix/rs/core/stream/SetStreamState.scala | Scala | apache-2.0 | 5,245 |
import _root_.io.gatling.core.scenario.Simulation
import ch.qos.logback.classic.{Level, LoggerContext}
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import org.slf4j.LoggerFactory
import scala.concurrent.duration._
/**
* Performance test for the UserGroup entity.
*/
class UserGroupGatlingTest exte... | gcorreageek/noctem | src/test/gatling/simulations/UserGroupGatlingTest.scala | Scala | mit | 3,327 |
/*
* 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 ... | aljoscha/flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/nodes/CommonPythonBase.scala | Scala | apache-2.0 | 7,127 |
/*
* 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 | mllib/src/test/scala/org/apache/spark/ml/clustering/GaussianMixtureSuite.scala | Scala | apache-2.0 | 12,953 |
package com.twitter.gizzard.nameserver
import com.twitter.gizzard.shards.ShardId
case class Forwarding(tableId: Int, baseId: Long, shardId: ShardId)
| kmiku7/gizzard | src/main/scala/com/twitter/gizzard/nameserver/Forwarding.scala | Scala | apache-2.0 | 152 |
package io.youi.server.validation
import io.youi.http.{HttpConnection, HttpStatus}
import io.youi.net.IP
import scala.concurrent.Future
class IPAddressValidator(allow: Set[IP], reject: Set[IP], defaultAllow: Boolean) extends Validator {
override def validate(connection: HttpConnection): Future[ValidationResult] = ... | outr/youi | server/src/main/scala/io/youi/server/validation/IPAddressValidator.scala | Scala | mit | 819 |
package logging
import com.twitter.zipkin.gen.{zipkinCoreConstants, Endpoint, Annotation, Span}
import scala.util.Random
import java.net.InetAddress
import java.nio.ByteBuffer
import com.github.kristofa.brave.SpanCollector
trait TraceData {
def traceId: Long
def spanId: Long
def parentSpanId: Option[Long]
... | leanovate/microzon-web | app/logging/TraceData.scala | Scala | mit | 2,562 |
/*
* 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/keras/objectives/RankHinge.scala | Scala | apache-2.0 | 2,040 |
package vultura.util.graph
import vultura.util.{SIIndex, Index}
import scala.collection.mutable
/** An efficient directed graph implementation that uses one array per node for representing its children. */
class LabeledGraph[N] protected[LabeledGraph](val index: Index[N], protected val childs: Array[Array[Int]])
e... | ziggystar/vultura-factor | util/src/main/scala/vultura/util/graph/LabeledGraph.scala | Scala | mit | 5,576 |
package com.wavesplatform.common
import java.util.concurrent.TimeUnit
import com.wavesplatform.common.ArrayCompareBenchmark.BytesSt
import org.openjdk.jmh.annotations._
import org.openjdk.jmh.infra.Blackhole
import scala.util.Random
//noinspection ScalaStyle
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@BenchmarkMode(Arr... | wavesplatform/Waves | benchmark/src/test/scala/com/wavesplatform/common/ArrayCompareBenchmark.scala | Scala | mit | 925 |
/*
* 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 ... | style95/openwhisk | tests/src/test/scala/org/apache/openwhisk/core/containerpool/v2/test/ActivationClientProxyTests.scala | Scala | apache-2.0 | 17,116 |
package ua.kata
import org.scalatest.{FunSuite, Matchers}
class BinaryTreeTest extends FunSuite with Matchers {
private val tree: Tree[Int] = Tree[Int]()
test("create an empty tree") {
tree.size shouldBe 0
}
test("add single item to a tree") {
(tree + 10).size shouldBe 1
}
test("add many items ... | Alex-Diez/Scala-TDD-Katas | binary_tree_kata/iteration_02/binary_tree_day_03/src/test/scala/ua/kata/BinaryTreeTest.scala | Scala | mit | 1,468 |
/*******************************************************************************
* Copyright (c) 2016 Andreas Wagner.
* 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
* ht... | MultiDeviceCTT/MCTT | MCTT-Translator/src/main/scala/mctt/preprocessing/TreePreparator.scala | Scala | epl-1.0 | 8,433 |
package scala.xml.quote
class NamespaceSuite extends XmlQuoteSuite {
test("reconstruct not prefixed namespaced elem") {
assert(xml"""<foo xmlns="uri"/>""" ≈ <foo xmlns="uri"/>)
}
test("reconstruct namespaced elem") {
assert(xml"""<foo xmlns:pre="uri"/>""" ≈ <foo xmlns:pre="uri"/>)
}
test("reconstr... | densh/scala-xml-quote | src/test/scala/scala/xml/quote/NamespaceSuite.scala | Scala | bsd-3-clause | 1,425 |
package model
import io.circe.{Decoder, Encoder}
import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder}
case class PublicAppConfig(googleClientId: String)
object PublicAppConfig {
implicit val appConfigDecoder: Decoder[PublicAppConfig] = deriveDecoder
implicit val appConfigEncoder: Encoder[PublicAppConfi... | Leonti/receipts-rest-service | app/src/main/scala/model/Models.scala | Scala | mit | 1,054 |
package com.sksamuel.scapegoat.inspections.collections
import com.sksamuel.scapegoat.PluginRunner
import org.scalatest.{ FreeSpec, Matchers, OneInstancePerTest }
/** @author Stephen Samuel */
class PredefSeqIsMutableTest extends FreeSpec with Matchers with PluginRunner with OneInstancePerTest {
override val inspe... | pwwpche/scalac-scapegoat-plugin | src/test/scala/com/sksamuel/scapegoat/inspections/collections/PredefSeqIsMutableTest.scala | Scala | apache-2.0 | 2,052 |
object SCL9429 {
case class UnneccessarillyGiantCaseClass23(
val a1: Int,
val b2: Int,
val c3: Int,
val d4: Int,
... | ilinum/intellij-scala | testdata/typeInference/bugs211/SCL9429.scala | Scala | apache-2.0 | 2,045 |
package io.getquill.quotation
import scala.annotation.StaticAnnotation
import scala.reflect.ClassTag
import scala.reflect.macros.whitebox.Context
import io.getquill.ast._
import io.getquill.util.MacroContextExt._
import io.getquill.norm.BetaReduction
import io.getquill.util.Messages.TraceType
import io.getquill.util.{... | getquill/quill | quill-core/src/main/scala/io/getquill/quotation/Quotation.scala | Scala | apache-2.0 | 2,601 |
package clean.tex
import clean.lib._
import ml.classifiers.NoLearner
object tabMetaLeasConfia extends App with StratsTrait with LearnerTrait with CM {
Global.debug = 0
val context = this.getClass.getName
val ls = (args(0).split(",") map str2learner()).map(_.limp).toBuffer
val db = new Db("metanew", true)
va... | active-learning/active-learning-scala | src/main/scala/clean/tex/tabMetaLeasConfia.scala | Scala | gpl-2.0 | 2,323 |
package dhg.ccg.parse.pcfg.mcmc
import org.junit.Test
import org.junit.Assert._
import dhg.ccg.cat._
import dhg.ccg.prob._
import dhg.ccg.parse._
import dhg.ccg.parse.pcfg._
import dhg.ccg.tagdict.SimpleTagDictionary
import dhg.util._
import scala.collection.immutable.ListMap
class ScgInsideChartTests {
val S = ca... | dhgarrette/2015-ccg-parsing | src/test/scala/dhg/ccg/parse/scg/mcmc/ScgInsideChartTests.scala | Scala | apache-2.0 | 8,773 |
package com.madsen.xcs.core.genetic
import java.nio.ByteBuffer
import com.madsen.xsc.interop.ParameterDto
/**
* Created by erikmadsen2 on 15/05/15.
*/
object Gene {
val GeneLength = 4098
val SizeOfInt = 8
val SizeOfFloat = 8
val SizeOfHeaders = SizeOfInt + 1 + 1
def byteToBooleans(byte: Byte): Seq[Boo... | beatmadsen/xcs-main | src/main/scala/com/madsen/xcs/core/genetic/Gene.scala | Scala | mit | 1,934 |
import squants.time.Frequency
/* *\\
** Squants **
** **
** Scala Quantities and Units of Measure Library and DSL ... | underscorenico/squants | shared/src/main/scala/squants/package.scala | Scala | apache-2.0 | 4,129 |
package bootstrap.liftweb
import _root_.net.liftweb.util._
import _root_.net.liftweb.http._
import _root_.net.liftweb.sitemap._
import _root_.net.liftweb.sitemap.Loc._
import Helpers._
/**
* A class that's instantiated early and run. It allows the application
* to modify lift's environment
*/
class Boot {
de... | scalatest/scalatest-maven-plugin | src/it/lift/src/main/scala/bootstrap/liftweb/Boot.scala | Scala | apache-2.0 | 548 |
/*
* Copyright ixias.net All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license
* For the full copyright and license information,
* please view the LICENSE file that was distributed with this source code.
*/
package ixias.play.api.mvc
import play.api.mvc._
import cats.data.EitherT
... | sp1rytus/ixias | framework/ixias-play-core/src/main/scala/ixias/play/api/mvc/BaseExtensionMethods.scala | Scala | mit | 1,670 |
package com.github.diegopacheco.scala.playground.spring
import scala.beans.BeanProperty
class SoccerTeam(@BeanProperty var address:String = "") extends Team {
def this() = this(address = "")
override def toString():String = {
val s:String = s" name: ${name} Adress: ${this.address} "
return s
}
} | diegopacheco/scala-playground | scala-2.10-spring-3.2-playground/src/main/scala/com/github/diegopacheco/scala/playground/spring/SoccerTeam.scala | Scala | unlicense | 312 |
package slamdata.engine.analysis
import slamdata.engine.fp._
import scalaz.{Tree => ZTree, Node => _, _}
import Scalaz._
import Id.Id
import slamdata.engine.{RenderTree, Terminal, NonTerminal}
sealed trait term {
case class Term[F[_]](unFix: F[Term[F]]) {
def cofree(implicit f: Functor[F]): Cofree[F, Unit] =... | mossprescott/slamengine | src/main/scala/slamdata/engine/analysis/fixplate.scala | Scala | agpl-3.0 | 28,925 |
/***********************************************************************
* 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/uuid/FeatureIdGenerator.scala | Scala | apache-2.0 | 804 |
package bad.robot.radiate.ui
import java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment
trait FrameFactory {
def create: List[StatusFrame]
}
object FrameFactory {
def fullScreen = new FrameFactory {
def create = {
val screens = getLocalGraphicsEnvironment.getScreenDevices
val frames = (0 un... | tobyweston/radiate | src/main/scala/bad/robot/radiate/ui/FrameFactory.scala | Scala | apache-2.0 | 738 |
package com.arcusys.valamis.oauth
import java.io.Closeable
import java.net.URL
import net.oauth.client.httpclient4.HttpClientPool
import org.apache.http.client.HttpClient
import org.apache.http.impl.client.HttpClientBuilder
/**
* Created by mminin on 09.07.15.
*/
class HttpClientPoolImpl extends HttpClientPool wit... | igor-borisov/valamis | valamis-lrssupport/src/main/scala/com/arcusys/valamis/oauth/HttpClientPoolImpl.scala | Scala | gpl-3.0 | 514 |
package com.seanshubin.uptodate.logic
import scala.collection.mutable.ArrayBuffer
import scala.util.matching.Regex
object DurationFormat {
object MillisecondsFormat extends TimeUnitFormat(TimeUnitAndQuantity.MillisecondToDay)
object NanosecondsFormat extends TimeUnitFormat(TimeUnitAndQuantity.NanosecondToDay)
... | SeanShubin/up-to-date | logic/src/main/scala/com/seanshubin/uptodate/logic/DurationFormat.scala | Scala | unlicense | 6,378 |
/**
* Copyright (c) 2012-2013, Tomasz Kaczmarzyk.
*
* This file is part of BeanDiff.
*
* BeanDiff 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 License, or
* (at your o... | tkaczmarzyk/beandiff | src/main/scala/org/beandiff/core/DeleteInsertMerger.scala | Scala | lgpl-3.0 | 874 |
/* Copyright 2009-2021 EPFL, Lausanne */
package stainless
package termination
import scala.collection.mutable.{Map => MutableMap, HashSet => MutableSet, ListBuffer => MutableList}
object DebugSectionMeasureInference extends inox.DebugSection("measure-inference")
class MeasureInference(override val s: Trees, overri... | epfl-lara/stainless | core/src/main/scala/stainless/termination/MeasureInference.scala | Scala | apache-2.0 | 9,995 |
/*
* 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 ... | alexzaitzev/ignite | modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheClearCommandSpec.scala | Scala | apache-2.0 | 3,155 |
/**
* Created on February 17, 2011
* Copyright (c) 2011, Wei-ju Wu
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* ... | weiju/adf-tools | adf-core/src/test/scala/org/dmpp/adf/app/UserVolumeFactoryTest.scala | Scala | bsd-3-clause | 2,399 |
/**
* Copyright 2015 Thomson Reuters
*
* 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 ag... | hochgi/CM-Well | server/cmwell-ws/app/ld/cmw/PassiveFieldTypesCache.scala | Scala | apache-2.0 | 14,367 |
/*
* 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/pbik-frontend | app/models/MandatoryRadioButton.scala | Scala | apache-2.0 | 860 |
/***********************************************************************
* Copyright (c) 2013-2020 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | aheyne/geomesa | geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/stats/StatsHistogramCommand.scala | Scala | apache-2.0 | 17,931 |
import java.io.IOException;
import java.util.Arrays;
import javax.jms.Connection;
import javax.jms.DeliveryMode;
import javax.jms.Destination;
import javax.jms.ExceptionListener;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageListener;
import javax.j... | fmarani/riddance | src/main/scala/MessageBridge.scala | Scala | lgpl-3.0 | 1,351 |
package Integrals
object DoubleIntegral{
def leftRect(f:Double=>Double, a:Double, b:Double)=f(a)
//> leftRect: (f: Double => Double, a: Double, b: Double)Double
def midRect(f:Double=>Double, a:Double, b:Double)=f((a+b)/2)
... | HaprianVlad/miniboxing-experiments | components/example/src/Integrals/DoubleIntegral.scala | Scala | bsd-3-clause | 2,580 |
/*
* Copyright 2012-2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unl... | weggert/sirius | src/main/scala/com/comcast/xfinity/sirius/api/impl/state/StateSup.scala | Scala | apache-2.0 | 5,616 |
/*
* Copyright (c) 2015 Mind Eratosthenes Kft.
* License: AGPL v3
*/
package com.mind_era.zizized.util
import spire.math.UInt
import spire.math.ULong
/**
* various hashing methods for primitives & strings
*
* @author Szabolcs Ivan
* @since 1.0
*/
object Hash {
private def mix(a: UInt, b: UInt, c: UInt, da: ... | mind-era/zizized | src/main/scala/com/mind_era/zizized/util/Hash.scala | Scala | agpl-3.0 | 3,317 |
/*
* 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 ... | csantanapr/incubator-openwhisk | tests/src/test/scala/org/apache/openwhisk/core/containerpool/test/ContainerArgsConfigTest.scala | Scala | apache-2.0 | 3,068 |
package org.http4s.util
object string extends CaseInsensitiveStringSyntax
| hvesalai/http4s | core/src/main/scala/org/http4s/util/String.scala | Scala | apache-2.0 | 75 |
val x = play {
RandSeed.ir(trig = 1, seed = 56789.0)
val lFDNoise3_0 = LFDNoise3.ar(0.93811005)
val in_0 = LeakDC.ar(0.93811005, coeff = 0.995)
val twoZero_0 = TwoZero.ar(in_0, freq = 10.0, radius = 1.0)
val sqrsum = twoZero_0 sqrsum 0.93811005
val in_1 = LeakDC.ar(0... | Sciss/AnemoneActiniaria | kubus/DS_IO_iter20_no356.scala | Scala | gpl-3.0 | 5,452 |
/*
* Copyright 2001-2013 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | travisbrown/scalatest | src/main/scala/org/scalatest/testng/TestNGWrapperSuite.scala | Scala | apache-2.0 | 5,128 |
/*
* Copyright 2013 Twitter Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed t... | rajatdutta/zipkin | zipkin-anormdb/src/main/scala/com/twitter/zipkin/storage/anormdb/AnormStorage.scala | Scala | apache-2.0 | 9,180 |
package enumeratum.values
/** Created by Lloyd on 4/13/16.
*
* Copyright 2016
*/
sealed abstract class JsonDrinks(val value: Short, name: String) extends ShortEnumEntry
case object JsonDrinks extends ShortEnum[JsonDrinks] with ShortPlayJsonValueEnum[JsonDrinks] {
case object OrangeJuice extends JsonDrinks(va... | lloydmeta/enumeratum | enumeratum-play-json/src/test/scala/enumeratum/values/JsonDrinks.scala | Scala | mit | 583 |
package com.greencatsoft.angularjs.core
import scala.concurrent.Future
import scala.language.implicitConversions
import scala.scalajs.js
import scala.scalajs.js.Any.{ fromFunction1, fromFunction5 }
import scala.scalajs.js.UndefOr
import scala.scalajs.js.UndefOr.undefOr2ops
import scala.scalajs.js.annotation.JSExportAl... | svenwiegand/scalajs-angular | src/main/scala/com/greencatsoft/angularjs/core/Http.scala | Scala | apache-2.0 | 8,291 |
package com.cloudray.scalapress.plugin.variations
import org.scalatest.{OneInstancePerTest, FlatSpec}
import org.scalatest.mock.MockitoSugar
import com.cloudray.scalapress.item.{Item, ItemType}
import com.cloudray.scalapress.plugin.variations.controller.DimensionEditController
/** @author Stephen Samuel */
class Dime... | vidyacraghav/scalapress | src/test/scala/com/cloudray/scalapress/plugin/variations/DimensionEditControllerTest.scala | Scala | apache-2.0 | 882 |
package com.airbnb.scheduler.jobs
/**
* A stream of schedules.
* Calling tail will return a clipped schedule.
* The schedule consists of a string representation of an ISO8601 expression as well as a BaseJob.
* @author Florian Leibert (flo@leibert.de)
*/
class ScheduleStream(val schedule: String, val jobName: Stri... | snegi/chronos | src/main/scala/com/airbnb/scheduler/jobs/ScheduleStream.scala | Scala | apache-2.0 | 913 |
/***********************************************************************
* Copyright (c) 2013-2016 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 is ... | tkunicki/geomesa | geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/collection/MaybeSynchronized.scala | Scala | apache-2.0 | 2,506 |
package com.socrata.datacoordinator
package secondary
import com.socrata.datacoordinator.id.DatasetId
import com.socrata.datacoordinator.secondary.Secondary.Cookie
import com.socrata.datacoordinator.truth.metadata
import scala.concurrent.duration.FiniteDuration
import java.util.UUID
import org.joda.time.DateTime
ca... | socrata-platform/data-coordinator | coordinatorlib/src/main/scala/com/socrata/datacoordinator/secondary/SecondaryManifest.scala | Scala | apache-2.0 | 2,805 |
package com.imaginea.activegrid.core.models
/**
* Created by sivag on 28/10/16.
*/
trait ViewFilter[T <: BaseEntity] {
def filterInstance(t: T, viewLevel: ViewLevel): T
}
| eklavya/activeGrid | src/main/scala/com/imaginea/activegrid/core/models/ViewFilter.scala | Scala | apache-2.0 | 179 |
package com.wincom.dcim.sharded
import akka.actor.{Actor, ActorLogging, ActorRef, Props}
import akka.cluster.sharding.{ClusterSharding, ClusterShardingSettings}
import com.wincom.dcim.domain.Settings
import com.wincom.dcim.message.common.Command
import com.wincom.dcim.message.signal._
import com.wincom.dcim.signal.Fun... | xtwxy/mysc | dcim-cluster/cluster/src/main/scala/com/wincom/dcim/sharded/ShardedSignals.scala | Scala | apache-2.0 | 1,583 |
package com.sksamuel.elastic4s.requests.mappings
import com.sksamuel.elastic4s.fields.builders.ElasticFieldBuilderFn
import com.sksamuel.elastic4s.json.{XContentBuilder, XContentFactory}
import com.sksamuel.elastic4s.requests.mappings.dynamictemplate.{DynamicMapping, DynamicTemplateBodyFn}
object MappingBuilderFn {
... | stringbean/elastic4s | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/mappings/MappingBuilderFn.scala | Scala | apache-2.0 | 4,170 |
package com.countrygamer.arcanacraft.common
import com.countrygamer.arcanacraft.client.KeyHandler
import com.countrygamer.arcanacraft.common.extended.ArcanePlayer
import com.countrygamer.arcanacraft.common.init.{Quoms, ACBlocks, ACItems}
import com.countrygamer.arcanacraft.common.network.PacketKeyPress
import com.coun... | TheTemportalist/ArcanaCraft | src/main/scala/com/countrygamer/arcanacraft/common/ArcanaCraft.scala | Scala | apache-2.0 | 2,041 |
package xyz.discretezoo.web.db.v1
import java.util.UUID
import xyz.discretezoo.web.db.ZooPostgresProfile.api._
case class GraphTypes(
isBipartite: Boolean,
// isCartesianProduct: Option[Boolean],
// isChordal: Option[Boolean],
// ... | DiscreteZOO/DiscreteZOO-web | src/main/scala/xyz/discretezoo/web/db/v1/Graph.scala | Scala | mit | 9,202 |
package poker.core
/**
* Cards that do not themselves take part in determining the rank of the hand,
* but that may be used to break ties between hands of the same rank
*/
final case class Kickers(cs: Traversable[Card]) extends Ordered[Kickers] {
/** Compare the strongest of the kickers */
// TODO Do we need... | kyuksel/poker | src/main/scala/poker/core/Kickers.scala | Scala | mit | 818 |
package com.etsy.conjecture.scalding
import org.apache.commons.math3.linear._
import cascading.pipe.Pipe
import cascading.pipe.joiner.InnerJoin
import cascading.tuple.Fields
import scala.util.Random
object SVD extends Serializable {
import com.twitter.scalding.Dsl._
/**
* based on http://amath.colorado.edu/fa... | zviri/Conjecture | src/main/scala/com/etsy/conjecture/scalding/SVD.scala | Scala | mit | 5,647 |
/*
* 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 ... | Intel-bigdata/OAP | oap-native-sql/core/src/test/scala/org/apache/spark/sql/sources/CreateTableAsSelectSuite.scala | Scala | apache-2.0 | 9,923 |
package akka.persistence.cassandra.journal
import scala.concurrent.duration._
import akka.actor._
import akka.persistence._
import akka.persistence.cassandra.CassandraLifecycle
import akka.testkit._
import com.typesafe.config.ConfigFactory
import org.scalatest._
object CassandraIntegrationSpec {
val config = Con... | bjgbeelen/AkkaPersistenceCassandraWithAkka2.4 | src/test/scala/akka/persistence/cassandra/journal/CassandraIntegrationSpec.scala | Scala | apache-2.0 | 11,017 |
package pl.touk.nussknacker.engine.lite.kafka
import com.typesafe.scalalogging.LazyLogging
import org.apache.commons.lang3.concurrent.BasicThreadFactory
import org.apache.kafka.common.errors.InterruptException
import pl.touk.nussknacker.engine.lite.kafka.TaskStatus.{DuringDeploy, Restarting, Running, TaskStatus}
impo... | TouK/nussknacker | engine/lite/kafka/runtime/src/main/scala/pl/touk/nussknacker/engine/lite/kafka/LoopUntilClosed.scala | Scala | apache-2.0 | 6,285 |
package org.openapitools.models
import io.circe._
import io.finch.circe._
import io.circe.generic.semiauto._
import io.circe.java8.time._
import org.openapitools._
import org.openapitools.models.FavoriteImpllinks
import org.openapitools.models.PipelineImpl
/**
*
* @param Underscoreclass
* @param Underscorelinks ... | cliffano/swaggy-jenkins | clients/scala-finch/generated/src/main/scala/org/openapitools/models/FavoriteImpl.scala | Scala | mit | 765 |
/*
* Exceptions.scala
*
* Updated: Dec 3, 2014
*
* Copyright (c) 2014, CodeMettle
*/
package com.codemettle.akkasnmp4j.transport
import java.net.InetSocketAddress
import scala.util.control.NoStackTrace
/**
* @author steven
*
*/
case class BindFailedException(bindAddr: InetSocketAddress)
extends Exceptio... | CodeMettle/akka-snmp4j | src/main/scala/com/codemettle/akkasnmp4j/transport/Exceptions.scala | Scala | apache-2.0 | 591 |
/**
* 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/master/Scheduler.scala | Scala | apache-2.0 | 1,005 |
package com.rydgel.scalagram.responses
import play.api.libs.json.Json
/** Cause Instagram is returning a String for the Id in some endpoint... */
case class LocationSearch(id: Option[String], latitude: Option[Double], longitude: Option[Double], name: Option[String])
object LocationSearch {
implicit val LocationSear... | Rydgel/scalagram | src/main/scala/com/rydgel/scalagram/responses/LocationSearch.scala | Scala | mit | 425 |
package com.kodekutters.collector
import akka.actor.{ActorLogging, Actor}
import scala.xml.PrettyPrinter
import com.scalakml.io.KmlPrintWriter
import com.scalakml.kml._
import com.kodekutters.gpsd4scala.collector.Collector
import com.kodekutters.gpsd4scala.protocol.{TPV, Report}
import com.kodekutters.gpsd4scala.messa... | workingDog/Gpsd4Scala | src/main/scala/com/kodekutters/gpsd4scala/collector/GoogleEarthCollector.scala | Scala | bsd-3-clause | 2,064 |
/*
* Copyright 2016 The BigDL Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | qiuxin2012/BigDL | spark/spark-version/2.0/src/main/scala/org/apache/spark/ml/DLTransformerBase.scala | Scala | apache-2.0 | 1,379 |
package io.kaitai.struct.format
import io.kaitai.struct.{JavaScriptImporter, Main, RuntimeConfig}
import scala.concurrent.Future
import scala.scalajs.js
import scala.concurrent.ExecutionContext.Implicits.global
object JavaScriptKSYParser {
/**
* Converts first YAML (given as JavaScript object) to the ClassSpec... | kaitai-io/kaitai_struct_compiler | js/src/main/scala/io/kaitai/struct/format/JavaScriptKSYParser.scala | Scala | gpl-3.0 | 1,162 |
package outer
package inner
object Foo {
// val a: Int = 1
}
| som-snytt/dotty | tests/pos/false-companion/01_outerinnerFoo_2.scala | Scala | apache-2.0 | 63 |
package com.antiparagon.cvexperimenter.chessscanner
import java.awt.Rectangle
import java.util
import com.typesafe.scalalogging.Logger
import org.opencv.core._
import org.opencv.imgcodecs.Imgcodecs
import org.opencv.imgproc.Imgproc
import org.slf4j.LoggerFactory
import scala.collection.mutable
import scala.collectio... | antiparagon/CVExperimenter | src/main/scala/com/antiparagon/cvexperimenter/chessscanner/ChessboardFinderContoursAlgorithm.scala | Scala | mit | 6,780 |
package com.supergloo.ml.streaming
import org.apache.spark._
import org.apache.spark.sql.SQLContext
import org.apache.spark.sql.types._
import org.apache.spark.sql.functions._
import org.apache.spark.sql._
import org.apache.spark.ml.feature.VectorAssembler
import org.apache.spark.ml.clustering.KMeans
/**
* Refacto... | tmcgrath/spark-2-streaming | src/main/scala/com/supergloo/ml/streaming/UberTrain.scala | Scala | apache-2.0 | 3,569 |
/**
* 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/kafka | core/src/main/scala/kafka/server/KafkaServer.scala | Scala | apache-2.0 | 4,354 |
/* Copyright (C) 2008-2016 University of Massachusetts Amherst.
This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible)
http://factorie.cs.umass.edu, http://github.com/factorie
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with... | Craigacp/factorie | src/test/scala/cc/factorie/model/TestTemplates.scala | Scala | apache-2.0 | 6,959 |
/**
* Copyright 2011-2012 eBusiness Information, Groupe Excilys (www.excilys.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
*
*... | Tjoene/thesis | Case_Programs/gatling-1.4.0/gatling-core/src/main/scala/com/excilys/ebi/gatling/core/result/reader/DataReader.scala | Scala | gpl-2.0 | 2,751 |
/*
* Copyright 2009-2011 WorldWide Conferencing, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | pbrant/framework | core/json/src/test/scala/net/liftweb/json/SerializationBugs.scala | Scala | apache-2.0 | 6,557 |
/*
* 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.linker
import scala.concu... | scala-js/scala-js | linker/shared/src/test/scala/org/scalajs/linker/BackwardsCompatTest.scala | Scala | apache-2.0 | 2,699 |
package com.clank.tests
import org.scalacheck._
import Gen._
import Arbitrary.arbitrary
import com.clank.spellers._
object Helper {
class DumbSpeller(val words: List[String]) extends Speller {
def spell(word: String): List[String] = words
override def toString = "DumbSpeller(" + words.mkString(", ") + ")"
... | brx/clank | src/test/scala/Helper.scala | Scala | gpl-3.0 | 1,437 |
/*
* 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/models/des/ihtReturn/TransferOfNilRateBand.scala | Scala | apache-2.0 | 920 |
package blended.streams.jms
import java.util.concurrent.atomic.{AtomicLong, AtomicReference}
import akka.actor.ActorSystem
import akka.pattern.after
import akka.stream.stage.{AsyncCallback, TimerGraphStageLogic}
import blended.jms.utils.{IdAwareConnectionFactory, JmsSession}
import blended.util.logging.Logger
import ... | lefou/blended | blended.streams/src/main/scala/blended/streams/jms/JMSConnector.scala | Scala | apache-2.0 | 6,860 |
package com.komanov.mysql.streaming.tests
import com.komanov.mysql.streaming._
import org.specs2.mutable.SpecificationWithJUnit
import org.specs2.specification.Scope
import org.specs2.specification.core.Fragments
import scala.collection.mutable
class QueryTest extends SpecificationWithJUnit {
sequential
MysqlR... | dkomanov/stuff | src/com/komanov/mysql/streaming/tests/QueryTest.scala | Scala | mit | 1,072 |
package org.workcraft
package object services {
type Model = ModelServiceProvider
type ModelService[T] = Service[ModelScope, T]
type GlobalService[T] = Service[GlobalScope, T]
}
| tuura/workcraft-2.2 | Core/src/main/scala/org/workcraft/services/Model.scala | Scala | gpl-3.0 | 184 |
/*-
* #%L
* FWAPP Framework
* %%
* Copyright (C) 2016 - 2017 Open Design Flow
* %%
* 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) a... | opendesignflow/fwapp | src/main/scala/org/odfi/wsb/fwapp/lib/chart/plotly/PlotlyView.scala | Scala | agpl-3.0 | 5,173 |
object test {
class annot extends scala.annotation.Annotation
def foo = {
def bar(i: Int): Int = i
@annot class Silly {} // used to be: not found, but now ok after backing out of 2b12868070be50fb70
bar(5)
}
}
| som-snytt/dotty | tests/pos/i3702.scala | Scala | apache-2.0 | 227 |
package one.murch.bitcoin.coinselection
/**
* Created by murch on 31.12.16.
*/
object Simulation {
def main(args: Array[String]) = {
//
// val testCases4 = new Simulator(TestCase500Euler.startingUtxoSet, TestCase500Euler.operations, TestCase500Euler.descriptor)
// val testCases5 = new Simulator(T... | Xekyo/CoinSelectionSimulator | src/main/scala/one/murch/bitcoin/coinselection/Simulation.scala | Scala | mit | 6,550 |
/*
* Copyright 2017-2022 John Snow Labs
*
* 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... | JohnSnowLabs/spark-nlp | src/main/scala/com/johnsnowlabs/nlp/annotators/common/SentenceSplit.scala | Scala | apache-2.0 | 2,549 |
package loader.core.context
import scala.collection.mutable.HashMap
import utils.RegexMap
/** Tag manager.
* It behaves roughly like a map.
*/
trait TagMap {
def fetch(name: String): Option[loader.core.context.Context#FieldMapping]
def put(mapping:(String,loader.core.context.Context#FieldMapping)):Un... | Y-P-/data-processing-binding | Core/src/loader/core/context/TagMap.scala | Scala | gpl-3.0 | 1,588 |
/**
* Copyright (C) 2014 Reactibility Inc. <http://www.reactibility.com>
*/
package garde.security
import akka.actor._
import akka.persistence.{RecoveryCompleted, Recover, PersistentActor, SnapshotOffer}
import akka.util.Timeout
import scalaz._
import Scalaz._
/**
* Persistent actor representing an active module.... | reactibility/garde | garde-security/src/main/scala/garde/security/Module.scala | Scala | apache-2.0 | 7,572 |
package doc.jockey.horse
import org.scalatest.WordSpec
class StringsInPatternMatchingSpec extends WordSpec {
implicit class PatternMatchableUrlAdapter(val sc: StringContext) {
val url = sc.parts.mkString("(.+)").r
}
"We can pattern match in interpolated Strings" in {
def matcher: PartialFunction[Strin... | agmenc/doc-jockey | src/test/scala/doc/jockey/horse/StringsInPatternMatchingSpec.scala | Scala | mit | 1,091 |
package com.github.romangrebennikov.columnize.protocol.cql.types
import java.math.{BigDecimal, BigInteger}
import java.net.InetAddress
import java.nio.ByteBuffer
import java.util.{UUID, Date}
import com.datastax.driver.core.DataType
import com.datastax.driver.core.exceptions.InvalidTypeException
import com.datastax.d... | shuttie/columnize | src/main/scala/com/github/romangrebennikov/columnize/protocol/cql/types/CQL.scala | Scala | bsd-2-clause | 615 |
/*
* 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 ... | adrian-ionescu/apache-spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeCreator.scala | Scala | apache-2.0 | 16,474 |
package com.rxbytes.splitpal.providers.events
/**
* Created by pnagarjuna on 18/12/15.
*/
case class EventEntity(id: Int,
name: String)
| pamu/split-pal | src/main/scala/com/rxbytes/splitpal/providers/events/EventEntity.scala | Scala | apache-2.0 | 164 |
/*
* Copyright (C) 2007-2008 Artima, Inc. All rights reserved.
*
* 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 requir... | peachyy/scalastu | concurrency/ParallelSimulation.scala | Scala | apache-2.0 | 3,266 |
package reactor.core.scala.publisher
import org.reactivestreams.Subscription
import reactor.core.{Scannable, publisher}
import reactor.core.publisher.{UnicastProcessor => JUnicastProcessor}
/**
* A Processor implementation that takes a custom queue and allows
* only a single subscriber.
*
* <p>
* The implem... | reactor/reactor-scala-extensions | src/main/scala/reactor/core/scala/publisher/UnicastProcessor.scala | Scala | apache-2.0 | 1,481 |
package scalaz.stream.merge
import scala.collection.immutable.Queue
import scalaz.\\/._
import scalaz.stream.Process._
import scalaz.stream.async.mutable.Signal
import scalaz.stream.merge.Junction._
import scalaz.stream.process1
import scalaz.{\\/, -\\/}
protected[stream] object JunctionStrategies {
/** Typed cons... | doctau/scalaz-stream | src/main/scala/scalaz/stream/merge/JunctionStrategies.scala | Scala | mit | 8,506 |
package io.chymyst.benchmark
import java.time.LocalDateTime
import java.time.temporal.ChronoUnit
object Common {
val warmupTimeMs = 50L
def elapsed(initTime: LocalDateTime): Long = initTime.until(LocalDateTime.now, ChronoUnit.MILLIS)
def elapsed(initTime: Long): Long = System.currentTimeMillis() - initTime
... | Chymyst/chymyst-core | benchmark/src/main/scala/io/chymyst/benchmark/Common.scala | Scala | apache-2.0 | 713 |
package raft
import scala.language.higherKinds
import akka.actor.ActorRef
case class Term(current: Int) extends Ordered[Term] {
def nextTerm: Term = this.copy(current = current + 1)
def compare(that: Term) = current.compare(that.current)
}
object Term {
def max(t1: Term, t2: Term): Term =
if (t1 > t2) t1
... | archie/raft | src/main/scala/raft/State.scala | Scala | mit | 1,705 |
package models.product
import play.api.libs.json.Json
case class Products(activeProducts: Seq[ActiveProduct])
object Products {
implicit val jsonReads = Json.reads[Products]
}
| leanovate/microzon-web | app/models/product/Products.scala | Scala | mit | 181 |
package functionalops.systemz
import scalaz._
import Scalaz._
package object core extends CoreFunctions
| functionalops/systemz | core/src/main/scala/functionalops/package.scala | Scala | bsd-3-clause | 106 |
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.