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.mariotti.urlshortener.dao.persistence import com.mariotti.urlshortener.model.Stats object MapperWriterDB { def put(id:Int, value:String){ Persistence.put(id, value) } def putStats(id:Int, stats:Stats){ Persistence.putStats(id, stats) } }
LupoDiRoma/miscellanea
scala/url_shortener/src/main/scala/com/mariotti/urlshortener/dao/persistence/MapperWriterDB.scala
Scala
apache-2.0
267
package com.cloudray.scalapress.plugin.ecommerce.tag import org.scalatest.{OneInstancePerTest, FunSuite} import org.scalatest.mock.MockitoSugar import com.cloudray.scalapress.plugin.ecommerce.domain.Order import javax.servlet.http.HttpServletRequest import com.cloudray.scalapress.plugin.ecommerce.tags.InvoiceAccountNa...
vidyacraghav/scalapress
src/test/scala/com/cloudray/scalapress/plugin/ecommerce/tag/InvoiceAccountNameTagTest.scala
Scala
apache-2.0
1,109
package org.alitouka.spark.dbscan.spatial.rdd import org.apache.spark.rdd.{RDD, ShuffledRDD} import org.alitouka.spark.dbscan.spatial.{PointSortKey, BoxCalculator, Box, Point} import org.alitouka.spark.dbscan.PairOfAdjacentBoxIds /** * An RDD that stores points which are close to each other but * reside in differe...
isaacboucinha/CardioStream
web-app/src/main/scala/org/alitouka/spark/dbscan/spatial/rdd/PointsInAdjacentBoxesRDD.scala
Scala
apache-2.0
1,802
package com.plista.solrindexer.persistence case class SolrConfig(url: String, username: String, password: String, solr5url: String)
rvegas/solrindexer
src/main/scala/com/plista/solrindexer/persistence/SolrConfig.scala
Scala
unlicense
133
package de.htwg.zeta.persistence.actorCache import java.util.UUID import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration import scala.util.Failure import scala.util.Success import akka.actor.ActorRef import akka.actor.ActorSystem import...
Zeta-Project/zeta
api/persistence/src/main/scala/de/htwg/zeta/persistence/actorCache/ActorCacheEntityRepository.scala
Scala
bsd-2-clause
8,724
/** * Problem: http://www.codechef.com/SPT2015/problems/SPIT1 * GitHub: https://github.com/amezhenin/codechef_problems */ import scala.collection.mutable.ListBuffer object Main { /** * Checkout https://github.com/amezhenin/codechef_scala_template to test your solutions with sbt-doctest * {{{ * >>> Main...
amezhenin/codechef_problems
contests/SPT2015/spit1.scala
Scala
mit
1,063
/* 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...
strubell/factorie
src/main/scala/cc/factorie/app/bib/parser/Dom.scala
Scala
apache-2.0
5,095
package org.improving.fuse import com.sun.jna._ import jnajava.C._ import jnajava.Fuse._ import java.util.{ Map, HashMap } import jnajava.Fuse.Operations import java.{ lang => jl } import jl.reflect.{ Method, InvocationHandler } object Fuse { // fuse_main is implemented as a macro: // #define fuse_main(argc, ar...
tonosaman/jna-fuse-scala
src/scala/lib/Fuse.scala
Scala
isc
3,241
/* * 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 ...
jatin9896/incubator-carbondata
datamap/mv/core/src/main/scala/org/apache/carbondata/mv/datamap/MVAnalyzerRule.scala
Scala
apache-2.0
4,385
package com.twitter.finagle.cacheresolver import _root_.java.io.ByteArrayInputStream import _root_.java.net.{SocketAddress, InetSocketAddress} import com.google.gson.GsonBuilder import com.twitter.common.io.{Codec,JsonCodec} import com.twitter.common.zookeeper._ import com.twitter.concurrent.Spool import com.twitter.c...
jay-johnson/finagle
finagle-cacheresolver/src/main/scala/com/twitter/finagle/cacheresolver/CachePoolCluster.scala
Scala
apache-2.0
17,012
package org.lancegatlin import scala.language.higherKinds import scala.language.existentials object Try4b { case class Person(id: Int, name: String, age: Int) trait Schema[C] { class Field[A](val unapply: C => A) { self => def name: String = { // org.lancegatlin.Try1$PersonSchema$id$ va...
lancegatlin/caseclass_ql
src/main/scala/org/lancegatlin/Try4b.scala
Scala
mit
3,807
package com.github.j5ik2o.spetstore.adaptor.aggregate import akka.actor.Props import com.github.j5ik2o.spetstore.adaptor.eventbus.EventBus import com.github.j5ik2o.spetstore.domain.purchase.CartAggregateProtocol.Query.{ GetStateRequest, GetStateResponse } import com.github.j5ik2o.spetstore.domain.purchase.CartAggregat...
j5ik2o/spetstore-cqrs-es-akka
write-interface/src/main/scala/com/github/j5ik2o/spetstore/adaptor/aggregate/CartAggregate.scala
Scala
mit
2,781
/* * 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/utils/SessionHelper.scala
Scala
apache-2.0
1,362
/* Copyright 2011 Andrew Fowler <[email protected]> This file is part of Terinology2ODM Terminology2ODMConverter. Terminology2ODMConverter 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 v...
rwynne/ops-data-conversion
ODM_Converter/src/model/OIDEntity.scala
Scala
bsd-3-clause
853
/* * Copyright 2007-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
persistence/mapper/src/test/scala/net/liftweb/mapper/MapperSpec.scala
Scala
apache-2.0
13,422
package com.arcusys.valamis.gradebook.storage import com.arcusys.valamis.gradebook.model.PackageGrade trait PackageGradesStorage { def get(userId: Long, packageId: Long): Option[PackageGrade] def delete(userId: Long, packageId: Long): Unit def modify(entity: PackageGrade): PackageGrade def create(entity: P...
ViLPy/Valamis
valamis-gradebook/src/main/scala/com/arcusys/valamis/gradebook/storage/PackageGradesStorage.scala
Scala
lgpl-3.0
349
/* * 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
core/src/main/scala/org/apache/spark/shuffle/ShuffleManager.scala
Scala
apache-2.0
3,004
package xbee import akka.io._ import akka.util.ByteString import akka.actor.{Props, Actor, ActorRef} import com.github.jodersky.flow.Serial.Received import java.nio.ByteBuffer class LengthFieldFrame extends SymmetricPipelineStage[PipelineContext, ByteString, ByteString] { var buffer = None: Option[ByteString] val...
charroch/scala-bee
src/main/scala/xbee/Frame.scala
Scala
apache-2.0
3,352
/* * 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 ...
manishgupta88/carbondata
integration/spark-common/src/main/scala/org/apache/spark/sql/hive/DistributionUtil.scala
Scala
apache-2.0
11,268
package akka.persistence.jdbc.state import scala.concurrent.Future import akka.actor.ActorSystem import akka.Done import org.scalatest.concurrent.ScalaFutures import org.scalatest.matchers.should.Matchers object ScaladslSnippets extends ScalaFutures with Matchers { def create(): Unit = { // #create import ...
dnvriend/akka-persistence-jdbc
core/src/test/scala/akka/persistence/jdbc/state/ScaladslSnippets.scala
Scala
apache-2.0
4,446
package de.hpi.asg.breezetestgen import akka.actor.Props import de.hpi.asg.breezetestgen.actors.Simulator import Simulator.RunTest import de.hpi.asg.breezetestgen.testing.TestRunner.{TestFailed, TestResult, TestSucceeded} import fixtures.gcdNetlist /** tests a complete simulation run: providing it to a Simulator(-Act...
0x203/BreezeTestGen
src/test/scala/de/hpi/asg/breezetestgen/SimulationSpec.scala
Scala
mit
1,467
package jp.co.bizreach.elasticsearch4s import org.elasticsearch.action.search.SearchRequestBuilder import ESClient._ import org.slf4j.LoggerFactory import org.elasticsearch.client.support.AbstractClient import scala.reflect.ClassTag import scala.annotation.tailrec import com.ning.http.client.{AsyncHttpClient, AsyncHtt...
saito400/elastic-scala-httpclient
elastic-scala-httpclient/src/main/scala/jp/co/bizreach/elasticsearch4s/ESClient.scala
Scala
apache-2.0
15,350
package org.jetbrains.plugins.scala package codeInspection.booleans import com.intellij.codeInspection.{ProblemHighlightType, ProblemsHolder} import com.intellij.openapi.project.Project import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.codeInspection.{AbstractFixOnPsiElement, AbstractInspection} im...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/codeInspection/booleans/DoubleNegationInspection.scala
Scala
apache-2.0
3,550
package com.dwolla.cloudflare.domain.dto.accounts import io.circe.Codec import io.circe.generic.semiauto.deriveCodec case class NewAccountMemberDTO ( email: String, roles: Seq[String], status: Option[String] = None ) object NewAccountMemberDTO { implicit val newAccountMemberDTOCodec: Codec[NewAccountMemberDT...
Dwolla/scala-cloudflare
dto/src/main/scala/com/dwolla/cloudflare/domain/dto/accounts/NewAccountMemberDTO.scala
Scala
mit
339
package ps.tricerato.pureimage.test import org.specs2.mutable._ import ps.tricerato.pureimage._ /** * Created by michael.schiff on 6/12/14. */ class Output extends Specification { "RBG image output" in { val Right(RGBImage(image)) = Input(zardozJpeg) Output(image, PNG).length must_!= 0 } "Gray image ...
stephenjudkins/pureimage
src/test/scala/ps/tricerato/pureimage/test/Output.scala
Scala
mit
633
package com.holmesprocessing.analytics.actors import java.util.UUID import scala.concurrent.duration._ import akka.actor.{ Actor, ActorLogging, ActorRef, Props } import akka.util.Timeout import com.holmesprocessing.analytics.types.{AnalyticEngineProtocol, GenericAnalyticService} object Job { def props(id: UUID, ...
cynexit/Holmes-Analytics
src/main/scala/com/holmesprocessing/analytics/actors/Job.scala
Scala
apache-2.0
1,812
package pl.newicom.dddd.monitoring import akka.actor.Actor import pl.newicom.dddd.aggregate.BusinessEntity import pl.newicom.dddd.messaging.event.EventSourceProvider import pl.newicom.dddd.monitoring.Stage._ trait ReceptorMonitoring extends EventSourceProvider with TraceContextSupport { this: Actor => override a...
AndreyLadniy/akka-ddd
akka-ddd-monitoring/src/main/scala/pl/newicom/dddd/monitoring/ReceptorMonitoring.scala
Scala
mit
1,041
package im.actor.bots import derive.key import upickle.Js import upickle.default._ object BotMessages { sealed trait BotMessage sealed trait BotMessageIn extends BotMessage sealed trait BotMessageOut extends BotMessage object Services { val KeyValue = "keyvalue" val Messaging = "messaging" } ...
lzpfmh/actor-platform
actor-server/actor-bots-shared/src/main/scala/im/actor/bots/BotMessages.scala
Scala
mit
7,775
package builder.api_json import core.{Importer, TypeValidator, TypesProvider, TypesProviderEnum, TypesProviderField, TypesProviderModel, TypesProviderUnion} import lib.{DatatypeResolver, Kind} private[api_json] case class InternalServiceFormTypesProvider(internal: InternalServiceForm) extends TypesProvider { overr...
Seanstoppable/apidoc
core/src/main/scala/core/builder/api_json/Types.scala
Scala
mit
3,864
package ee.cone.c4gate import com.typesafe.scalalogging.LazyLogging import ee.cone.c4actor.{RawQSender, _} import ee.cone.c4assemble.Single import ee.cone.c4di.c4 import scala.annotation.tailrec import scala.collection.immutable.Seq class TestQRecordImpl(val topic: TxLogName, val value: Array[Byte], val headers: Se...
conecenter/c4proto
base_examples/src/main/scala/ee/cone/c4gate/KafkaLatTestApp.scala
Scala
apache-2.0
1,326
/* * Copyright 2012-2013 Stephane Godbillon (@sgodbillon) * * 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...
duncancrawford/Play-Json-ReactiveMongo
src/main/scala/play/modules/reactivemongo/jsoncommands.scala
Scala
apache-2.0
2,079
package io.viper.common import collection.mutable.ListBuffer import java.io.File import collection.mutable import org.clapper.classutil.{ClassFinder, ClassInfo} import io.viper.common.FileWalker.FileHandler import java.net.URLClassLoader class DynamicContainerApp(val port: Int = 80, val path: String = ".") extends Mu...
briangu/viper.io
core/src/main/scala/io/viper/common/DynamicContainerApp.scala
Scala
apache-2.0
3,152
package com.crobox.clickhouse.balancing import akka.http.scaladsl.model.Uri package object discovery { // TODO we might want to provide the ability to specify a different port when using the hostnames from the cluster table case class ConnectionConfig(host: Uri, cluster: String) }
crobox/clickhouse-scala-client
client/src/main/scala/com.crobox.clickhouse/balancing/discovery/package.scala
Scala
lgpl-3.0
289
/** * Copyright (C) 2013-2014 Typesafe Inc. <http://www.typesafe.com> */ package akka.testkit import org.scalatest.{ WordSpec, BeforeAndAfterAll } import org.scalatest.Matchers import akka.actor.ActorSystem // @note IMPLEMENT IN SCALA.JS @org.junit.runner.RunWith(classOf[org.scalatest.junit.JUnitRunner]) class Impl...
jmnarloch/akka.js
akka-js-testkit/js/src/test/scala/akka/testkit/ImplicitSenderSpec.scala
Scala
bsd-3-clause
646
package controllers import play.api.libs.json._ import play.api.mvc._ import lila.api.Context import lila.app._ import lila.common.{ LilaCookie, HTTPRequest } import views._ object Lobby extends LilaController { def home = Open { implicit ctx => negotiate( html = renderHome(Results.Ok).map(_.withHeaders...
danilovsergey/i-bur
app/controllers/Lobby.scala
Scala
mit
1,971
/*********************************************************************** * 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 ...
mdzimmerman/geomesa
geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/accumulo/commands/GetSftCommand.scala
Scala
apache-2.0
2,597
/* * The MIT License * * Copyright (c) 2011 John Svazic * * 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 * to u...
jboissard/GAHelloWorld
scala/src/test/scala/net/auxesia/PopulationSpec.scala
Scala
mit
4,073
/* * Copyright 2017 PayPal * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writin...
paypal/squbs
squbs-httpclient/src/test/scala/org/squbs/httpclient/ClientFlowPipelineSpec.scala
Scala
apache-2.0
7,448
package com.mind_era.optimization // Based on https://github.com/scalanlp/breeze/blob/releases/v0.13.1/math/src/main/scala/breeze/optimize/LBFGS.scala /* Copyright 2009 David Hall, Daniel Ramage Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the...
aborg0/arima
src/main/scala/com/mind_era/optimization/LBFGS.scala
Scala
agpl-3.0
5,811
import S99.P16._ import org.scalatest._ class P16Spec extends FlatSpec { "duplicateN()" should "duplicate the elements of a list a given number of times" in { assertResult(List('a, 'b, 'd, 'e, 'g, 'h, 'j, 'k)) { drop(3, List('a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k)) } assertResult(Nil) { ...
gcanti/S-99
src/test/scala/P16Spec.scala
Scala
mit
483
/* * 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 ...
mayunSaicmotor/incubator-carbondata
examples/spark/src/main/scala/org/apache/carbondata/examples/saic/SaicNoFilterDescOrderQuery.scala
Scala
apache-2.0
5,033
package org.jetbrains.plugins.scala package lang package psi package impl package expr import com.intellij.lang.ASTNode import com.intellij.psi.{PsiElementVisitor, PsiField, ResolveState} import org.jetbrains.plugins.scala.lang.psi.api.ScalaElementVisitor import org.jetbrains.plugins.scala.lang.psi.api.expr._ import o...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScAssignStmtImpl.scala
Scala
apache-2.0
4,875
package vggames.shared import br.com.caelum.vraptor.{Get, Resource, Result} import br.com.caelum.vraptor.ioc.Component import br.com.caelum.vraptor.view.Results import vggames.shared.player.PlayerSession import vggames.shared.vraptor.RequestData @Resource class GameLegacyUrls(data : RequestData, game : Game, result :...
vidageek/games
web/src/main/scala/vggames/shared/GameLegacyUrls.scala
Scala
gpl-3.0
1,273
package skinny.oauth2.client import org.apache.oltu.oauth2.common.message.types.{ GrantType => OltuGrantType } /** * Grant Type. */ case class GrantType(value: String) { def toOltuEnum(): OltuGrantType = value match { case v if v == OltuGrantType.AUTHORIZATION_CODE.name() => OltuGrantType.AUTHORIZATION_CODE ...
Kuchitama/skinny-framework
oauth2/src/main/scala/skinny/oauth2/client/GrantType.scala
Scala
mit
922
package special import org.apache.spark.{SparkContext, SparkConf} object BasicJoin { def main (args: Array[String]) { val conf = new SparkConf().setAppName("HashJoin").setMaster("local[4]") val sc = new SparkContext(conf) val smallRDD = sc.parallelize(Seq(("V1", '1'), ("V2", '2')), 4) val largeRD...
chocolateBlack/LearningSpark
src/main/scala/special/BasicJoin.scala
Scala
mit
501
package com.github.libsml.optimization import com.github.libsml.math.linalg.Vector import com.github.libsml.math.function.Function /** * Created by huangyu on 15/8/23. */ object OptimizerUtils { val shortFullMap: Map[String, String] = Map("tron" -> "com.github.libsml.optimization.liblinear.Tron", "Tron" -> ...
libsml/libsml
optimization/src/main/scala/com/github/libsml/optimization/OptimizerUtils.scala
Scala
apache-2.0
5,499
/* * 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/test/scala/com/intel/analytics/bigdl/dllib/nn/ops/Kv2TensorSpec.scala
Scala
apache-2.0
3,809
package io.swagger.client.model import org.joda.time.DateTime case class InputFile ( /* Unique identifier for the file. */ id: String, /* How the file has been generated. */ _type: String, /* The source of the file to be used that can be either, an external url. An identifier for an uploaded file to the s...
onlineconvert/onlineconvert-api-sdk-scala
src/main/scala/io/swagger/client/model/InputFile.scala
Scala
apache-2.0
637
/* * 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 ...
nickpan47/samza
samza-kafka/src/test/scala/org/apache/samza/checkpoint/kafka/TestKafkaCheckpointManager.scala
Scala
apache-2.0
10,708
/** * Copyright (c) 2002-2012 "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 Foundati...
dksaputra/community
cypher/src/test/scala/org/neo4j/cypher/GraphDatabaseTestBase.scala
Scala
gpl-3.0
4,307
/** * 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...
themarkypantz/kafka
core/src/test/scala/unit/kafka/javaapi/message/BaseMessageSetTestCases.scala
Scala
apache-2.0
2,579
/* * 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 ...
saltstar/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/SortMergeJoinExec.scala
Scala
apache-2.0
44,439
package com.twitter.server import com.twitter.util.logging.Logger import java.net.URL import java.util.Properties import scala.collection.JavaConverters._ import scala.util.control.NonFatal /** * A simply utility for loading information from a build.properties file. The ClassLoader for the * given object is used to...
twitter/twitter-server
server/src/main/scala/com/twitter/server/BuildProperties.scala
Scala
apache-2.0
2,524
package mesosphere.marathon package core.storage.store import java.io.File import java.time.{Clock, OffsetDateTime} import akka.Done import akka.http.scaladsl.marshalling.Marshaller import akka.http.scaladsl.unmarshalling.Unmarshaller import akka.stream.scaladsl.{FileIO, Keep, Sink} import mesosphere.AkkaUnitTest imp...
mesosphere/marathon
src/test/scala/mesosphere/marathon/core/storage/store/PersistenceStoreTest.scala
Scala
apache-2.0
8,749
package com.webtrends.harness.utils import org.specs2.mutable.SpecificationWithJUnit import scala.concurrent.{Await, Future} import scala.util.{Failure, Success} import org.specs2.concurrent.ExecutionEnv import scala.concurrent.duration.Duration class FutureExtensionsSpec(implicit ee: ExecutionEnv) extends Specific...
Webtrends/wookiee
wookiee-core/src/test/scala/com/webtrends/harness/utils/FutureExtensionsSpec.scala
Scala
apache-2.0
2,876
package models case class NewsstandShardConfig(shards:Long)
guardian/mobile-n10n
common/src/main/scala/models/NewsstandShardConfig.scala
Scala
apache-2.0
61
/* sbt -- Simple Build Tool * Copyright 2008, 2009, 2010 Mark Harrah, Viktor Klang, Ross McDonald */ package sbt import Using._ import ErrorHandling.translate import java.io.{ BufferedReader, ByteArrayOutputStream, BufferedWriter, File, FileInputStream, InputStream, OutputStream, PrintWriter } import java.io.{ Obje...
xeno-by/old-scalameta-sbt
util/io/src/main/scala/sbt/IO.scala
Scala
bsd-3-clause
36,335
package com.twitter.scrooge.java_generator import com.twitter.scrooge.frontend._ import java.io._ import com.github.mustachejava.DefaultMustacheFactory import com.twitter.mustache.ScalaObjectHandler import com.google.common.base.Charsets import com.google.common.io.CharStreams import com.twitter.scrooge.ast._ import c...
elipoz/scrooge
scrooge-generator/src/test/scala/com/twitter/scrooge/java_generator/ApacheJavaGeneratorSpec.scala
Scala
apache-2.0
8,065
package akka.contrib.persistence.mongodb import com.typesafe.config._ import akka.actor.ActorSystem class MongoSettingsSpec extends BaseUnitTest { def reference: Config = ConfigFactory.parseString( """ |akka.contrib.persistence.mongodb.mongo.driver = foo """.stripMargin) def withUri: Config = Conf...
scullxbones/akka-persistence-mongo
common/src/test/scala/akka/contrib/persistence/mongodb/MongoSettingsSpec.scala
Scala
apache-2.0
3,203
package wash import scalaz._ import Scalaz._ import app.MConfig import io.megam.common._ import io.megam.common.amqp._ import io.megam.common.amqp.request._ import io.megam.common.amqp.response._ import models.base.RequestResult import controllers.Constants._ /** * @author rajthilak * */ case class AOneWasher(pq: ...
indykish/vertice_gateway
app/wash/AOneWasher.scala
Scala
mit
797
/** * Copyright (C) 2010-2011 LShift 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...
lshift/diffa
agent/src/test/scala/net/lshift/diffa/agent/itest/support/TestEnvironment.scala
Scala
apache-2.0
11,553
package eu.brosbit.opos.snippet.admin import java.util.Date import scala.xml.{NodeSeq, Text, XML, Unparsed} import _root_.net.liftweb.util._ import _root_.net.liftweb.common._ import _root_.eu.brosbit.opos.model.page._ import _root_.eu.brosbit.opos.model._ import _root_.net.liftweb.http.{S, SHtml, RequestVar} import _...
mikolajs/osp
src/main/scala/eu/brosbit/opos/snippet/admin/AdminAddSlidesSn.scala
Scala
agpl-3.0
1,917
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.api.inject import com.google.inject.AbstractModule import com.typesafe.config.Config import org.specs2.matcher.BeEqualTypedValueCheck import org.specs2.mutable.Specification import play.api.{ Configuration, Environment } import p...
aradchykov/playframework
framework/src/play-guice/src/test/scala/play/api/inject/ModulesSpec.scala
Scala
apache-2.0
2,953
package com.trueaccord.scalapb import org.scalatest._ import org.scalatest.prop.GeneratorDrivenPropertyChecks class EncodingSpec extends PropSpec with GeneratorDrivenPropertyChecks with Matchers { property("fromBase64 is the inverse of toBase64") { forAll { b: Array[Byte] => Encoding.fromBase64(En...
eiennohito/ScalaPB
scalapb-runtime/shared/src/test/scala/com/trueaccord/scalapb/EncodingSpec.scala
Scala
apache-2.0
788
package com.github.mdr.mash.ns.os import java.nio.charset.StandardCharsets import java.nio.file.Path import com.github.mdr.mash.completions.CompletionSpec import com.github.mdr.mash.evaluator._ import com.github.mdr.mash.functions.{ BoundParams, MashFunction, Parameter, ParameterModel } import com.github.mdr.mash.inf...
mdr/mash
src/main/scala/com/github/mdr/mash/ns/os/WriteFunction.scala
Scala
mit
2,349
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ptkool/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ShuffleExchangeExec.scala
Scala
apache-2.0
16,057
package com.sksamuel.elastic4s.aws import java.io.ByteArrayInputStream import java.net.URLEncoder import java.nio.charset.StandardCharsets import org.apache.http.client.methods.{HttpGet, HttpPost} import org.apache.http.entity.BasicHttpEntity trait SharedTestData { val region = "us-east-1" val service = "es" ...
Tecsisa/elastic4s
elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/aws/SharedTestData.scala
Scala
apache-2.0
3,272
package kvstore import akka.actor.Props import akka.actor.Actor import akka.actor.ActorRef import scala.concurrent.duration._ object Replicator { case class Replicate(key: String, valueOption: Option[String], id: Long) case class Replicated(key: String, id: Long) case class Snapshot(key: String, valueOption:...
wezil/principles-reactive-programming
kvstore/Replicator.scala
Scala
mit
1,752
/* * Copyright 2014 – 2015 Paul Horn * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
knutwalker/rx-redis
modules/serialization/src/main/scala/rx/redis/serialization/ByteBufReader.scala
Scala
apache-2.0
3,734
package com.avsystem.commons package redis.commands import com.avsystem.commons.redis._ trait SetsApiSuite extends CommandsSuite { import RedisApi.Batches.StringTyped._ apiTest("SADD") { sadd("key", Nil).assertEquals(0) sadd("key", "a", "b", "c").assertEquals(3) sadd("key", "a", "b", "d").assertEqu...
AVSystem/scala-commons
commons-redis/src/test/scala/com/avsystem/commons/redis/commands/SetsApiSuite.scala
Scala
mit
4,417
package edu.nus.maxsmtplay import com.microsoft.z3._ import scala.util.control.Breaks._ /** * Implementation of Fu-Malik algorithm * * For more information on the Fu & Malik procedure: * * Z. Fu and S. Malik, On solving the partial MAX-SAT problem, in International * Conference on Theory and Applicati...
mechtaev/maxsmt-playground
src/main/scala/edu/nus/maxsmtplay/FuMalik.scala
Scala
mit
3,099
package models import java.util.UUID import com.mohiva.play.silhouette.api.{ Identity, LoginInfo } import play.api.libs.json.Json import play.api.i18n.Lang import play.api.libs.json.Writes import play.api.libs.json.JsPath import play.api.libs.json.Reads import play.api.libs.json.Format import play.api.libs.json.JsValu...
BaptisteMounier/webPLM
app/models/User.scala
Scala
agpl-3.0
1,579
/* * Copyright (C) 2010 Lalit Pant <[email protected]> * * The contents of this file are subject to the GNU General Public License * Version 3 (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.gnu.org/copyleft/gpl.html * *...
vnkmr7620/kojo
KojoEnv/src/net/kogics/kojo/core/music.scala
Scala
gpl-3.0
1,996
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
gioenn/xSpark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/collect.scala
Scala
apache-2.0
4,951
package models.tosca import scalaz._ import Scalaz._ import scalaz.effect.IO import scalaz.Validation import scalaz.Validation.FlatMap._ import scalaz.NonEmptyList._ import scalaz.syntax.SemigroupOps import cache._ import db._ import models.json.tosca._ import models.Constants._ import io.megam.auth.funnel.FunnelErro...
indykish/verticegateway
app/models/tosca/UnitsBreaker.scala
Scala
mit
3,691
package com.github.morikuni.locest.area.domain.model import org.specs2.mutable.Specification class CoordinateSpec extends Specification { "create" should { "return Coordinate successfully" in { val lat = 90d val lng = 180d val coordinate = Coordinate.create(lat, lng).get coordinate mus...
morikuni/locest
area/test/com/github/morikuni/locest/area/domain/model/CoordinateSpec.scala
Scala
mit
1,136
package com.jeff.chaser.models.components.motion import com.badlogic.ashley.core.Component class AccelerationComponent(val x: Float, val y: Float) extends Component
jregistr/Academia
CSC455-Game-Programming/Chaser/core/src/com/jeff/chaser/models/components/motion/AccelerationComponent.scala
Scala
mit
167
package maths object `package` { def factorial(x: Int): Int = numbers.oneto(x).foldLeft(1)((x,y) => x * y) }
melezov/xsbt-web-plugin
src/sbt-test/container/multi-module-single-webapp/maths/src/main/scala/maths.scala
Scala
bsd-3-clause
119
/** * This file is part of the TA Buddy project. * Copyright (c) 2013-2014 Alexey Aksenov [email protected] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Global License version 3 * as published by the Free Software Foundation with the addition...
digimead/digi-TABuddy-desktop
part-core/src/main/scala/org/digimead/tabuddy/desktop/core/definition/command/Command.scala
Scala
agpl-3.0
21,471
/* * Copyright 2017 PayPal * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
SarathChandran/squbs
samples/pubsub/pubsubsvc/src/main/scala/org/squbs/samples/pubsub/actors/EventCache.scala
Scala
apache-2.0
6,139
/* * 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/pbik
test/helper/StubbedControllerUtils.scala
Scala
apache-2.0
1,543
//############################################################################ // Bitsets //############################################################################ //############################################################################ import scala.language.postfixOps object TestMutable { import scala....
lrytz/scala
test/files/run/bitsets.scala
Scala
apache-2.0
7,034
/* * Copyright (c) 2012-2014 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
jramos/snowplow
3-enrich/scala-common-enrich/src/main/scala/com.snowplowanalytics.snowplow.enrich/common/adapters/AdapterRegistry.scala
Scala
apache-2.0
3,831
/* // Copyright 2012/2013 de Gustavo Steinberg, Flavio Soares, Pierre Andrews, Gustavo Salazar Torres, Thomaz Abramo // // Este arquivo é parte do programa Vigia Político. O projeto Vigia // Político é um software livre; você pode redistribuí-lo e/ou // modificá-lo dentro dos termos da GNU Affero General Public License...
cidadao-automatico/cidadao-server
app/models/User.scala
Scala
agpl-3.0
7,963
package org.powlab.jeye.decode.graph import org.powlab.jeye.decode.graph.OpcodeNodes._ /** * Набор утилитных методов */ object OpcodeTreeHelper { def scanTree(tree: OpcodeTree, handler: NodeHandler) { scanTree(tree, tree.head, handler) } /** * Обход дерева dev.powlab.org 178.62.179.49 * TODO her...
powlab/jeye
src/main/scala/org/powlab/jeye/decode/graph/OpcodeTreeHelper.scala
Scala
apache-2.0
2,338
/* * 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/src/test/scala/org/apache/flink/table/runtime/stream/sql/TemporalJoinITCase.scala
Scala
apache-2.0
10,017
//Part of Cosmos by OpenGenus Foundation object PrintReverse { case class Node[T](value: T, next: Option[Node[T]]) { // append new node at the end def :~>(tail: Node[T]): Node[T] = next match { case None => new Node(value, Some(tail)) case Some(x) => new Node(value, Some(x :~> tail)) } } ...
OpenGenus/cosmos
code/data_structures/src/list/singly_linked_list/operations/print_reverse/print_reverse.scala
Scala
gpl-3.0
784
package devsearch.concat.actors import java.io._ import java.nio.file.{ Paths, Files, Path } import akka.actor.{ Actor, ActorLogging, ActorRef, Props } import devsearch.concat.Utils import devsearch.concat.actors.Coordinator._ import devsearch.concat.actors.Worker._ import org.apache.commons.compress.archivers.{ Arch...
devsearch-epfl/devsearch-concat
src/main/scala/devsearch/concat/actors/Worker.scala
Scala
agpl-3.0
4,236
/** * Created by anicolaspp on 7/3/16. */ package com.nico.actors import akka.actor.{Actor, ActorLogging, Props} import com.nico.actors.TransactionManagerActor._ import com.nico.persistence.{Account, TransactionManager} class TransactionManagerActor(transactionManager: TransactionManager) extends Actor with Actor...
anicolaspp/distributd-transaction-processor
actors/src/main/scala/com/nico/actors/TransactionManagerActor.scala
Scala
mit
1,339
package jp.ne.opt.redshiftfake.read import com.github.tototoshi.csv._ import jp.ne.opt.redshiftfake.{Column, Row} case class InvalidCsvException(message: String) extends RuntimeException class CsvReader(csvRow: String, delimiterChar: Char, nullAs: String) { private[this] object csvFormat extends CSVFormat { v...
opt-tech/redshift-fake-driver
src/main/scala/jp/ne/opt/redshiftfake/read/CsvReader.scala
Scala
apache-2.0
1,038
package com.harborx.api.system import org.scalatest._ import org.scalatestplus.play.{PlaySpec, _} import play.api.mvc._ import play.api.test.FakeRequest import play.api.test.Helpers._ import scala.concurrent.Future class SystemSpec extends PlaySpec with OneServerPerSuite with MustMatchers with BeforeAndAfterAll { ...
harborx/play-di-example
play-guice/test/com/harborx/api/system/SystemSpec.scala
Scala
mit
1,044
package ctlmc.bddgraph import ctlmc._ import net.sf.javabdd._ class Domain( val factory: GraphFactory, val paramName: String, val domainSize: Int ) { val bddDomain = factory.bddFactory.extDomain(domainSize) bddDomain.setName(paramName) val bddSize = bddDomain.varNum() def createBDD(value: Int): BDD = { ...
fpoli/ctlmc
src/main/scala/bddgraph/Domain.scala
Scala
gpl-3.0
448
package generators import java.io.IOException import java.net.SocketException import org.jsoup.nodes._ import org.jsoup.select._ import play.api.Logger import services.SearchEngineService import scala.collection.JavaConversions._ /** * Created by franco on 9/12/16. */ trait BasicUrlGenerator { final val ERR...
TVilaboa/Egresados
app/generators/BasicUrlGenerator.scala
Scala
gpl-3.0
3,058
package libref.spec import libref.collection._ import leon.lang._ import scala.language.postfixOps import scala.language.implicitConversions abstract class HeapADT { def findMin: Option[BigInt] def deleteMin: HeapADT def insert (e: BigInt): HeapADT def toSortedList: List[BigInt] def content: Set[BigInt...
fmlab-iis/LibRef
spec/heap.scala
Scala
gpl-3.0
367
import System.out._ import com.codahale.simplespec.Spec object BackoffSpec extends Spec { class `exponential backoff` { // def `should take time` { // val b = new Backoff() // val start = System.currentTimeMillis // for (i <- 1 to 12) b.spin // val end = System.currentTimeMillis // ...
aturon/ChemistrySet
src/test/scala/BackoffSpec.scala
Scala
bsd-2-clause
369
package com.rasterfoundry.backsplash.server import com.rasterfoundry.backsplash.Parameters._ import com.rasterfoundry.datamodel._ import com.rasterfoundry.database.Implicits._ import com.rasterfoundry.database.{ProjectDao, MetricDao, ToolRunDao} import cats.data._ import cats.effect._ import cats.implicits._ import d...
azavea/raster-foundry
app-backend/backsplash-server/src/main/scala/com/rasterfoundry/backsplash/middleware/MetricMiddleware.scala
Scala
apache-2.0
4,105
package com.eclipsesource.schema.internal import com.eclipsesource.schema.internal.validation.Validated import play.api.libs.json._ import scalaz.Failure object SchemaUtil { def dropSlashIfAny(path: String): String = if (path.startsWith("/#")) path.substring(1) else path def failure(keyword: String, ...
eclipsesource/play-json-schema-validator
src/main/scala/com/eclipsesource/schema/internal/SchemaUtil.scala
Scala
apache-2.0
2,902
/** * 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...
themarkypantz/kafka
core/src/test/scala/unit/kafka/log/LogSegmentTest.scala
Scala
apache-2.0
18,889
/* * 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 ...
citlab/vs.msc.ws14
flink-0-7-custom/flink-tests/src/test/scala/org/apache/flink/api/scala/operators/GroupReduceITCase.scala
Scala
apache-2.0
26,761
import java.util.List trait Foo { val x: List[String] = null } abstract class Bar extends Foo
som-snytt/dotty
tests/pos-java-interop-separate/forwarder/Foo_1.scala
Scala
apache-2.0
98