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 org.kimbasoft.akka.scheduler
import akka.actor.{Props, Actor}
import org.kimbasoft.akka.scheduler.WorkerActor.Messages.Tick
/**
* Missing documentation.
*
* @author <a href="steffen.krause@soabridge.com">Steffen Krause</a>
* @since 1.0
*/
class WorkerActor extends Actor {
def receive: Receive = {
... | kimba74/sandbox-scala | src/main/scala/org/kimbasoft/akka/scheduler/WorkerActor.scala | Scala | gpl-3.0 | 582 |
package actors
import akka.actor.Actor
import akka.actor.ActorLogging
import akka.event.LoggingReceive
import play.api.libs.json.JsValue
import play.api.libs.json.Json
import akka.actor.ActorRef
import akka.actor.Props
import scala.xml.Utility
import akka.actor.ActorSystem
class UserActor(room:ActorRef, out:ActorRef)... | diegopacheco/scala-playground | play-akka/app/actors/UserActor.scala | Scala | unlicense | 831 |
/*
* Copyright (c) 2014-2020 by The Monix Project Developers.
* See the project homepage at: https://monix.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... | alexandru/monifu | monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala | Scala | apache-2.0 | 9,054 |
package sext
import org.scalatest._
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import collection.immutable.Queue
@RunWith(classOf[JUnitRunner])
class OrderedMapTest extends FunSuite with Matchers {
test("preserves order of creation") {
val elems = (1 to 100) zip (1 to 100)
Ordere... | nikita-volkov/sext | src/test/scala/sext/OrderedMapTest.scala | Scala | mit | 1,143 |
package models.actor
import no.uio.musit.models.{DatabaseId, OrgId}
import play.api.libs.json.Json
/**
* Address specialized for Organization
*/
case class OrganisationAddress(
id: Option[DatabaseId],
organisationId: Option[OrgId],
streetAddress: Option[String],
streetAddress2: Option[String],
p... | MUSIT-Norway/musit | service_backend/app/models/actor/OrganisationAddress.scala | Scala | gpl-2.0 | 520 |
import stainless.lang._
import stainless.annotation._
object FirstClassHeapExample {
case class Cell(var value: BigInt) extends AnyHeapRef
def getAndCompareHeapRegions(c1: Cell, c2: Cell): Unit = {
reads(Set(c1, c2))
modifies(Set(c1, c2))
require(c1 != c2)
val heapA = Heap.get
c1.value += 2
... | epfl-lara/stainless | frontends/benchmarks/full-imperative/valid/FirstClassHeap.scala | Scala | apache-2.0 | 1,531 |
package cmdreader.std
import cmdreader.Global
import scala.io.Source
class Loader {
def load = {
val lines = Source.fromFile("docs/std.txt").getLines.toList
List("OAdd", "OSubt", "OAvg", "OMult", "ODiv", "OIDiv", "OMod", "HLuna", "OEq", "ONeq", "OLt", "OLe", "OGt",
"OGe", "Car", "Cdr", "Cons", "ECar... | bluebear94/bag | src/main/scala/cmdreader/std/Loaderstd.scala | Scala | gpl-3.0 | 1,118 |
package com.gilt.pickling.avro
import com.gilt.pickling.TestObjs.{MultipleSameObject, InnerObject}
import org.apache.avro.Schema
import com.gilt.pickling.TestUtils._
import scala.Some
import org.apache.avro.generic.GenericData
import org.scalatest.{Assertions, FunSuite}
import scala.pickling._
object MultipleSameObj... | gilt/gfc-avro | src/test/scala/com/gilt/pickling/avro/MultipleSameObjectsTest.scala | Scala | apache-2.0 | 1,648 |
package io.hnfmr.free
import cats.free.FreeApplicative
import cats.free.FreeApplicative.lift
import cats.implicits._
import cats.~>
import cats.data.Const
import cats.data.Kleisli
import cats.data.Tuple2K
import scala.concurrent.{Future, Await}
import scala.concurrent.duration._
import scala.concurrent.ExecutionConte... | hnfmr/advanced-scala | src/main/scala/io/hnfmr/free/FApplicative.scala | Scala | mit | 2,768 |
/*
* This file is part of Apparat.
*
* Copyright (C) 2010 Joa Ebert
* http://www.joa-ebert.com/
*
* This library 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 Lice... | joa/apparat | apparat-core/src/main/scala/apparat/pbj/PbjRegisterMagic.scala | Scala | lgpl-2.1 | 3,737 |
/*
* @author Carol Alexandru
*
* Copyright 2013 University of Zurich
*
* Licensed below 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
*
*... | danihegglin/DynDCO | src/main/scala/com/signalcollect/console/AggregationOperation.scala | Scala | apache-2.0 | 14,352 |
/* NSC -- new Scala compiler
* Copyright 2005-2011 LAMP/EPFL
* @author Martin Odersky
*/
package org.apache.spark.repl
import scala.tools.nsc._
import scala.tools.nsc.interpreter._
import scala.collection.{ mutable, immutable }
import scala.PartialFunction.cond
import scala.reflect.NameTransformer
import util.Ch... | windeye/spark | repl/src/main/scala/org/apache/spark/repl/SparkMemberHandlers.scala | Scala | apache-2.0 | 8,196 |
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs
// License: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.lsp.rpc
import org.ensime.lsp.rpc.companions._
import org.ensime.lsp.rpc.messages._
import org.scalatest.Matchers._
import org.scalatest._
import spray.json._
import scal... | ensime/ensime-server | lsp/src/test/scala/org/ensime/lsp/rpc/MessageCompanionsSpec.scala | Scala | gpl-3.0 | 8,054 |
/*
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 to in writing, software
distr... | twitter/summingbird | summingbird-batch-hadoop/src/main/scala/com/twitter/summingbird/batch/store/HDFSMetadata.scala | Scala | apache-2.0 | 5,805 |
/***********************************************************************
* 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-spark/geomesa-spark-sql/src/main/scala/org/apache/spark/sql/SQLRules.scala | Scala | apache-2.0 | 12,971 |
package json.bench
import json.bench.circe.CirceBench
import json.bench.handwritten.HandwrittenBench
import json.bench.json4s.Json4sBench
import json.bench.model.Data
import json.bench.play.PlayBench
import json.bench.spray.SprayBench
import json.bench.tethysjson.TethysBench
trait DataReader {
def read(json: String... | tethys-json/tethys | modules/benchmarks/src/main/scala/json/bench/DataReader.scala | Scala | apache-2.0 | 900 |
/*
* Copyright © 2017 Safety Data - CFH SAS.
*
* 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 o... | safety-data/akka-persistence-redis | src/main/scala/akka/persistence/redis/RedisKeys.scala | Scala | apache-2.0 | 1,209 |
package com.ponkotuy.data
import org.json4s._
/**
*
* @author ponkotuy
* Date: 14/03/24.
*/
case class MapInfo(id: Int, cleared: Boolean, exbossFlag: Boolean, defeatedCount: Option[Int], eventMap: Option[EventMap])
object MapInfo {
implicit val formats = DefaultFormats
def fromJson(obj: JValue): List[MapInf... | nekoworkshop/MyFleetGirls | library/src/main/scala/com/ponkotuy/data/MapInfo.scala | Scala | mit | 1,645 |
package uk.gov.gds.common.mongo.repository
import com.novus.salat.CaseClass
import uk.gov.gds.common.model.HasIdentity
import com.mongodb.WriteConcern
abstract class IdentityBasedMongoRepository[A <: CaseClass with HasIdentity](implicit m: Manifest[A])
extends SimpleMongoRepository[A] {
protected val databaseIdP... | alphagov/gds-scala-common | mongo-utils/src/main/scala/uk/gov/gds/common/mongo/repository/IdentityBasedMongoRepository.scala | Scala | mit | 905 |
/**
* Copyright © 2012 Gustav van der Merwe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program i... | gvdm/proof-system | src/Rules.scala | Scala | gpl-3.0 | 2,115 |
// test repeated synthesizeSAMFunction where the sam type is not fully defined
// the naive implementation would enter the same apply$body in the same scope twice
trait F[T, U] { def apply(x: T): U }
class C {
def app[T, U](x: T)(f: F[T, U]): U = f(x)
app(1)(x => List(x))
app(2)(x => List(x))
} | loskutov/intellij-scala | testdata/scalacTests/pos/sammy_twice.scala | Scala | apache-2.0 | 302 |
package pureconfig
import java.io.File
import java.math.{BigDecimal => JavaBigDecimal, BigInteger}
import java.net.{URI, URL}
import java.nio.file.Path
import java.time.temporal.ChronoUnit
import java.time.{Duration => JavaDuration, _}
import java.util.UUID
import java.util.regex.Pattern
import scala.collection.JavaC... | melrief/pureconfig | tests/src/test/scala/pureconfig/BasicConvertersSuite.scala | Scala | mpl-2.0 | 7,070 |
package org.elasticmq.actor.test
import org.elasticmq._
import org.joda.time.{DateTime, Duration}
import org.elasticmq.MessageId
import org.elasticmq.MillisNextDelivery
trait DataCreationHelpers {
def createQueueData(name: String, defaultVisibilityTimeout: MillisVisibilityTimeout) =
QueueData(name, defaultVisib... | everyonce/elasticmq | core/src/test/scala/org/elasticmq/actor/test/DataCreationHelpers.scala | Scala | apache-2.0 | 1,135 |
package hu.gansperger.neptunapi.constants
object Misc {
val userAgent = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0"
}
| qwe2/neptun-api | src/main/scala/hu/gansperger/neptunapi/constants/Misc.scala | Scala | mit | 156 |
package com.sopranoworks.bolt.values
import com.sopranoworks.bolt._
import com.google.cloud.spanner.{ResultSet, ResultSets, Struct, Type, Value=>SValue, Database => SDatabase}
import org.specs2.mutable.Specification
import scala.collection.JavaConversions._
class IdentifierValueTest extends Specification {
class... | OsamuTakahashi/bolt | src/test/scala/com/sopranoworks/bolt/values/IdentifierValueTest.scala | Scala | mit | 4,620 |
package jkm.cineclub.raft
/**
* Created with IntelliJ IDEA.
* User: cineclub
* Date: 12/26/13
* Time: 7:13 PM
* To change this template use File | Settings | File Templates.
*/
import akka.actor.{ReceiveTimeout, ActorLogging, Actor, IndirectActorProducer}
import jkm.cineclub.raft.PersistentState._
import scala.S... | stepist/scalaraft | src/main/scala/jkm/cineclub/raft/LeaderSubActor.scala | Scala | apache-2.0 | 3,708 |
package org.jetbrains.plugins.scala.lang.resolve2
/**
* Pavel.Fatin, 02.02.2010
*/
class FunctionRepeatTest extends ResolveTestBase {
override def folderPath: String = {
super.folderPath + "function/repeat/"
}
def testArraya = doTest
def testArrayRaw = doTest
def testEmpty = doTest
def testNone = ... | LPTK/intellij-scala | test/org/jetbrains/plugins/scala/lang/resolve2/FunctionRepeatTest.scala | Scala | apache-2.0 | 482 |
/*
* Copyright 2020 Frugal Mechanic (http://frugalmechanic.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... | frugalmechanic/fm-http | src/main/scala/fm/http/server/RequestRouterAndHandler.scala | Scala | apache-2.0 | 904 |
package memnets.fx.app
import javafx.fxml.FXMLLoader
import memnets.fx._
import memnets.fx.utils.TableColumnUtils._
import memnets.model._
import memnets.utils._
class ParamEditorFX(engineFX: EngineFXAdapter) extends Logging {
import scalafx.Includes._
import scalafx.scene.control._
val paramLoader = new FXMLL... | MemoryNetworks/memnets | fx/src/main/scala/memnets/fx/app/ParamEditorFX.scala | Scala | apache-2.0 | 2,994 |
import sbt._
object Dependencies {
object Versions {
val play = "2.8.0"
val playJson = "2.8.1"
val specs2 = "4.6.0"
val enumeratum = "1.5.13"
val refined = "0.9.14"
}
val playTest = Seq(
"com.typesafe.play" %% "play-test" % Versions.play % Test)
val playRoutesCompiler = Seq(
"com.... | iheartradio/play-swagger | project/Dependencies.scala | Scala | apache-2.0 | 842 |
/*******************************************************************************
* (C) Copyright 2015 ADP, 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.... | adplabs/unicorn | util/src/main/scala/unicorn/util/package.scala | Scala | apache-2.0 | 4,376 |
/*
* #%L
* Instancez
* %%
* Copyright (C) 2012 Instancez
* %%
* 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... | travisbrown/instancez | lift/src/main/scala/org/instancez/lift/package.scala | Scala | apache-2.0 | 719 |
/*
* 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 | test/iht/views/application/assets/insurancePolicy/InsurancePolicyDetailsAnnuityViewTest.scala | Scala | apache-2.0 | 2,509 |
/*
* 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 ... | vinodkc/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala | Scala | apache-2.0 | 34,234 |
package com.swoop.spark.records
import org.scalatest._
class FlatRecordEnvironmentTest extends WordSpec with Matchers {
"a flat record environment" should {
"validate custom data fields" which {
"allows custom data fields that are subset of custom record fields" in {
val env = FlatRecordEnvironme... | swoop-inc/spark-records | src/test/scala/com/swoop/spark/records/FlatRecordEnvironmentTest.scala | Scala | apache-2.0 | 977 |
package scalajson.ast
package unsafe
import scalajson.ast
import scalajson.ast._
/** Represents a JSON Value which may be invalid. Internally uses mutable
* collections when its desirable to do so, for performance and other reasons
* (such as ordering and duplicate keys)
*
* @author Matthew de Detrich
* @se... | mdedetrich/scalajson | native/src/main/scala/scalajson/ast/unsafe/JValue.scala | Scala | bsd-3-clause | 6,568 |
package chat.tox.antox.callbacks
import android.content.Context
import chat.tox.antox.tox.ToxSingleton
import chat.tox.antox.utils.AntoxLog
class AntoxOnPeerJoinCallback(private var ctx: Context) /* extends GroupPeerJoinCallback */ {
def groupPeerJoin(groupNumber: Int, peerNumber: Int): Unit = {
ToxSingleton.ge... | wiiam/Antox | app/src/main/scala/chat/tox/antox/callbacks/AntoxOnPeerJoinCallback.scala | Scala | gpl-3.0 | 449 |
package org.opendronecontrol
package spatial
object Vec3 {
def apply() = new Vec3(0,0,0)
def apply(v:Vec3) = new Vec3(v.x,v.y,v.z)
def apply( v: Float=0.f) = new Vec3( v, v, v)
def apply( vv: Double) = { val v=vv.toFloat; new Vec3( v, v, v) }
def apply( x: Float, y: Float, z: Float) = new Vec3(x,y,z)
def... | IDMNYU/Creative-Coding-UG-Fall-2014 | Class25/dronestuff/odc-master/odc/src/main/scala/spatial/Vec.scala | Scala | gpl-2.0 | 2,254 |
package com.twitter.finagle.http.filter
import com.twitter.finagle._
import com.twitter.finagle.http.{Request, Response}
import com.twitter.finagle.http.codec.HttpContext
import com.twitter.util.Future
/**
* Sets the following Context values from the request headers:
* - request deadline
*/
private[finagle] cl... | adriancole/finagle | finagle-http/src/main/scala/com/twitter/finagle/http/filter/ContextFilter.scala | Scala | apache-2.0 | 2,143 |
package com.ctask.client
import java.time.{LocalDate, ZonedDateTime}
import akka.actor.ActorSystem
import akka.util.Timeout
import com.ctask.data.{Task, TaskList}
import com.ctask.data.TaskJsonUtils.TaskOrdering
import com.ctask.messages.Command
import com.ctask.messages._
import com.ctask.REPL._
import com.ctask.htt... | modsrm/ctask | client/src/main/scala/com/ctask/client/CtaskREPL.scala | Scala | gpl-3.0 | 9,662 |
/*
* 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 ... | witgo/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/LookupCatalog.scala | Scala | apache-2.0 | 7,387 |
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs
// License: http://www.gnu.org/licenses/lgpl-3.0.en.html
package spray.json
import scala.collection.immutable.ListMap
import shapeless._, labelled.{ field, FieldType }
/**
* Automatically create product/coproduct marshallers (i.e. families
* ... | VC1995/ensime-server | json/src/main/scala/spray/json/FamilyFormats.scala | Scala | gpl-3.0 | 18,233 |
package org.gbougeard.model.groups
/**
* Created with IntelliJ IDEA.
* User: gbougeard
* Date: 13/07/13
* Time: 19:10
* To change this template use File | Settings | File Templates.
*/
case class GroupsInput(_one_group: Option[String],
groups: Option[List[String]])
object GroupsInput {
... | gbougeard/gas | src/main/scala/org/gbougeard/model/groups/GroupsInput.scala | Scala | apache-2.0 | 447 |
package usercase
import com.moilioncircle.jsonpath._
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
/**
* Created by leon on 15-6-24.
*/
@RunWith(classOf[JUnitRunner])
class JSONPathUserCase extends FunSuite {
test("user case 1") {
val json =
"""
... | moilioncircle/jsonpath | src/test/scala/usercase/JSONPathUserCase.scala | Scala | apache-2.0 | 2,229 |
package za.jwatson.glycanoweb
import japgolly.scalajs.react._
import japgolly.scalajs.react.extra.{Reusability, ReusableVar}
import japgolly.scalajs.react.vdom.{AttrValue, ClassNameAttr, TagMod}
import org.scalajs.dom
import scala.annotation.tailrec
import scala.scalajs.js
import scala.util.Try
package object react ... | james-za/glycano | core/src/main/scala/za/jwatson/glycanoweb/react/package.scala | Scala | mit | 2,488 |
/* Copyright (C) 2008-2010 Univ of Massachusetts Amherst, Computer Science Dept
This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible)
http://factorie.cs.umass.edu, http://code.google.com/p/factorie/
This software is provided under the terms of the Eclipse Public License 1.0
as published by... | andrewmilkowski/factorie | src/main/scala/cc/factorie/StructuredPerceptron.scala | Scala | epl-1.0 | 1,721 |
/*
* 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/test/scala/org/scalatest/words/ResultOfContainWordSpec.scala | Scala | apache-2.0 | 943 |
/**
* (c) Copyright 2013 WibiData, Inc.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of... | alexandre-normand/kiji-schema-shell | src/test/scala/org/kiji/schema/shell/api/TestClient.scala | Scala | apache-2.0 | 6,297 |
/***********************************************************************
* 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-kafka/geomesa-kafka-datastore/src/main/scala/org/locationtech/geomesa/kafka/data/MetadataMigration.scala | Scala | apache-2.0 | 2,093 |
/***********************************************************************
* Crown Copyright (c) 2016-2022 Dstl
* 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 available at
* http:/... | locationtech/geomesa | geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/data/AccumuloDataStoreNullAttributeVisibilityTest.scala | Scala | apache-2.0 | 3,948 |
/*
* Copyright 2014–2018 SlamData Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | jedesah/Quasar | connector/src/main/scala/quasar/qscript/qsu/ReifyAutoJoins.scala | Scala | apache-2.0 | 4,260 |
package com.github.diegopacheco.scala.twoten.makros
import language.experimental.macros
import scala.reflect.macros.Context
object HelloMakros {
def hello(): Unit = macro hello_impl
def hello_impl(c: Context)(): c.Expr[Unit] = {
import c.universe._
reify { println("Hello World!") }
}
}
| diegopacheco/scala-playground | scala-macros-fun/src/com/github/diegopacheco/scala/twoten/makros/HelloMacros.scala | Scala | unlicense | 316 |
package com.adlawson.json4s
import org.json4s.MappingException
object EnumType {
sealed trait Enum {
val value: String = toString.toLowerCase
}
sealed trait Direction extends Enum
object Direction {
case object Left extends Direction
case object Right extends Direction
}
object DirectionSer... | adlawson/scala-json4s | examples/src/main/scala/EnumType.scala | Scala | mit | 659 |
package com.lookout
import com.twitter.util.Future
import org.jboss.netty.handler.codec.http.HttpHeaders
import com.twitter.finagle.httpx
/**
* This is the root package of borderpatrol-core which provides a functional approach to web sessions and
* authentication built on top of [[com.twitter.finagle Finagle]]. It ... | trane/borderpatrol | core/src/main/scala/com/lookout/borderpatrol/package.scala | Scala | mit | 2,424 |
package ch04
sealed trait Option[+A] {
import Option._
def map[B](f: A => B): Option[B] = this match {
case None => None
case Some(x) => Some(f(x))
}
def flatMap[B](f: A => Option[B]): Option[B] = this.map(f).getOrElse(None)
def getOrElse[B >: A](default: => B): B = this match {
case None => defa... | mebubo/fpinscala | standalone/src/main/scala/ch04/Option.scala | Scala | mit | 1,522 |
package com.eevolution.context.dictionary.infrastructure.service.impl
import java.util.UUID
import com.eevolution.context.dictionary.infrastructure.repository.ChartRepository
import com.eevolution.context.dictionary.infrastructure.service.ChartService
import com.lightbend.lagom.scaladsl.api.ServiceCall
import com.lig... | adempiere/ADReactiveSystem | dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/service/impl/ChartServiceImpl.scala | Scala | gpl-3.0 | 1,985 |
/*
* Copyright 2010 LinkedIn
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... | tcrayford/hafka | kafka/core/src/main/scala/kafka/server/KafkaServer.scala | Scala | bsd-3-clause | 4,292 |
/*
* 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/trait/MiniBatchIntervalTraitDef.scala | Scala | apache-2.0 | 1,756 |
package io.udash.web.guide.styles
import io.udash.css.{CssBase, CssStyle}
import scala.language.postfixOps
object MarkdownStyles extends CssBase {
import dsl._
val markdownPage: CssStyle = style(
unsafeChild("li") (
position.relative,
paddingLeft(2 rem),
margin(.5 rem, `0`, .5 rem, 4.5 rem... | UdashFramework/udash-core | guide/shared/src/main/scala/io/udash/web/guide/styles/MarkdownStyles.scala | Scala | apache-2.0 | 831 |
/*
* Copyright (c) 2013-2014 Telefónica Investigación y Desarrollo S.A.U.
*
* 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
*
* Unles... | telefonicaid/fiware-cosmos-platform | service-manager/src/main/scala/es/tid/cosmos/servicemanager/clusters/sql/migrations/Migrate_20131203162457_AddClusterUserEntity.scala | Scala | apache-2.0 | 1,811 |
/*
* 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 ... | lxsmnv/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/subquery.scala | Scala | apache-2.0 | 11,586 |
/*
* Licensed to Intel Corporation under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* Intel Corporation licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use t... | SeaOfOcean/BigDL | dl/src/test/scala/com/intel/analytics/bigdl/optim/OptimizerSpec.scala | Scala | apache-2.0 | 7,942 |
package com.haskforce.importWizard.stack
import javax.swing.Icon
import com.haskforce.HaskellIcons
import com.intellij.ide.util.projectWizard.WizardContext
import com.intellij.projectImport.SelectImportedProjectsStep
/**
* Provides a list of stack packages that the user can import as modules.
*/
class StackSelectI... | carymrobbins/intellij-haskforce | src/com/haskforce/importWizard/stack/StackSelectImportedProjectsStep.scala | Scala | apache-2.0 | 587 |
/*
* User.scala
*
* Object User registers the user in a session var and
* also removes the session var
*/
package pt.cnbc.wikimodels.client.snippet
import net.liftweb.mapper._
import net.liftweb.http._
import net.liftweb.http.provider.HTTPRequest
import _root_.scala.xml.{NodeSeq, Node, Elem}
import _root_.scala.xml.t... | alexmsmartins/WikiModels | wm_web_client/src/main/scala/pt/cnbc/wikimodels/client/snippet/User.scala | Scala | mit | 2,054 |
/*
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 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 writi... | MLnick/scalanlp-core | data/src/test/scala/scalanlp/serialization/TableSerializationTest.scala | Scala | apache-2.0 | 2,827 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 Heiko Blobner
*
* 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 use... | windelknecht/stup-utils | src/main/scala/de/windelknecht/stup/utils/io/pack/compress/package.scala | Scala | mit | 3,847 |
/**
* Copyright 2015, deepsense.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | deepsense-io/seahorse-workflow-executor | deeplang/src/main/scala/io/deepsense/deeplang/inference/exceptions/SparkTransformSchemaException.scala | Scala | apache-2.0 | 796 |
package com.kakao.cuesheet.cf
import com.kakao.mango.logging.Logging
import org.apache.spark.broadcast.Broadcast
import org.apache.spark.rdd.RDD
import scala.language.implicitConversions
import scala.reflect.ClassTag
object ItemBasedCF {
def apply[USER: ClassTag, ITEM: ClassTag](implicit ordering: Ordering[ITEM])... | kakao/cuesheet | src/main/scala/com/kakao/cuesheet/cf/ItemBasedCF.scala | Scala | apache-2.0 | 4,432 |
package com.yammer.dropwizard.scala.params.tests
import javax.ws.rs.WebApplicationException
import com.yammer.dropwizard.scala.params.BooleanParam
import org.scalatest.FlatSpec
import org.scalatest.matchers.ShouldMatchers
class BooleanParamTest extends FlatSpec with ShouldMatchers {
"A valid boolean parameter" sho... | clearstorydata/dropwizard-scala | src/test/scala/com/yammer/dropwizard/scala/params/tests/BooleanParamTest.scala | Scala | apache-2.0 | 792 |
package controllers.billing
import scalaz._
import Scalaz._
import scalaz.Validation
import scalaz.Validation.FlatMap._
import scalaz.NonEmptyList._
import net.liftweb.json._
import net.liftweb.json.JsonParser._
import io.megam.auth.funnel.{ FunnelResponse, FunnelResponses }
import io.megam.auth.funnel.FunnelErrors._... | indykish/vertice_gateway | app/controllers/billing/Quotas.scala | Scala | mit | 5,171 |
/*
* Copyright 2017 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | liquidarmour/ct-calculations | src/main/scala/uk/gov/hmrc/ct/computations/CPQ19.scala | Scala | apache-2.0 | 1,980 |
package cd
import som._
final class Simulator(numAircraft: Int) {
val aircraft = new Vector[CallSign]();
(0 until numAircraft).foreach { i =>
aircraft.append(new CallSign(i))
}
def simulate(time: Double): Vector[Aircraft] = {
val frame = new Vector[Aircraft]();
(0 until aircraft.size() by 2).fore... | cedricviaccoz/scala-native | benchmarks/src/main/scala/cd/Simulator.scala | Scala | bsd-3-clause | 619 |
package com.arcusys.valamis.course.exception
class CertificateNotFoundException(message: String = null) extends RuntimeException(message)
| arcusys/Valamis | valamis-course/src/main/scala/com/arcusys/valamis/course/exception/CertificateNotFoundException.scala | Scala | gpl-3.0 | 139 |
/*
* Copyright 2013 Akiyoshi Sugiki, University of Tsukuba
*
* 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 a... | axi-sugiki/kumoi | src/kumoi/impl/group/PhysicalMachineView.scala | Scala | apache-2.0 | 972 |
/*
* Copyright 2012 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... | jkdcdlly/zipkin | zipkin-collector-service/config/collector-cassandra.scala | Scala | apache-2.0 | 2,307 |
package client
import monifu.reactive.OverflowStrategy.DropNew
import monifu.reactive.{Observable, Subscriber}
import org.scalajs.dom
import shared.models.{Event, OverflowEvent, Signal}
import scala.concurrent.duration.FiniteDuration
import scala.scalajs.js.Dynamic.global
final class DataConsumer(interval: FiniteDura... | ngbinh/monifu-sample | client/src/main/scala/client/DataConsumer.scala | Scala | apache-2.0 | 1,792 |
package com.dys.chatwork4s.beans
/**
* ChatWorkAPIの利用回数制限情報
* APIのリクエスト数は、5分あたり100回までとなります。(APIの利用回数は、今後変更される可能性があります)
* この制限を超えた場合、APIのレスポンスが 429 Too Many Requests エラーを返すようになります。
*
* @param limit 最大コール回数
* @param remaining 残りコール回数
* @param reset 次に制限がリセットされる時間(Unix time)
*/
case class APILimit... | kado-yasuyuki/chatwork4s | src/main/scala/com/dys/chatwork4s/beans/APILimit.scala | Scala | apache-2.0 | 786 |
package io.youi.font
import io.youi._
import io.youi.drawable.{Composite, Context}
import io.youi.paint.{Paint, Stroke}
import io.youi.spatial.BoundingBox
import io.youi.util.CanvasPool
case class CachedText(font: CachedFont,
text: String,
size: Double,
... | outr/youi | gui/src/main/scala/io/youi/font/CachedText.scala | Scala | mit | 1,702 |
package autolift.scalaz
import autolift._
trait `LiftM*Package` extends LiftM2Context
with LiftM3Context
with LiftM4Context
with LiftM5Context
with LiftM6Context
with LiftM7Context
with LiftM8Context
with LiftM9Context
with LiftM10Context
with LiftM11Context
with LiftM12Context
with LiftM13Conte... | wheaties/AutoLifts | autolift-scalaz/src/main/scala/autolift/scalaz/LiftM*.scala | Scala | apache-2.0 | 950 |
/*
* 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-analytics/TopicModeling | src/main/scala/org/apache/spark/mllib/topicModeling/LDAModel.scala | Scala | apache-2.0 | 9,549 |
package org.jetbrains.plugins.scala
package lang
package resolve
package processor
import com.intellij.psi._
import org.jetbrains.plugins.scala.caches.CachesUtil
import org.jetbrains.plugins.scala.extensions._
import org.jetbrains.plugins.scala.lang.completion.ScalaCompletionUtil
import org.jetbrains.plugins.scala.lan... | loskutov/intellij-scala | src/org/jetbrains/plugins/scala/lang/resolve/processor/CompletionProcessor.scala | Scala | apache-2.0 | 6,253 |
package sp.domain.logic
import sp.domain._
case object OperationLogic extends OperationLogics {
}
trait OperationLogics {
import sp.domain.logic.AttributeLogic._
import sp.domain.logic.StateLogic._
case class EvaluateProp(
stateVars: Map[ID, SPValue => Boolean],
groups: Set[SPValue],
defs: Operat... | sequenceplanner/sp-domain | src/main/scala/sp/domain/logic/OperationLogic.scala | Scala | mit | 4,278 |
package ru.pavkin.todoist.api.core
import cats.Functor
import ru.pavkin.todoist.api._
import ru.pavkin.todoist.api.utils.{Flattener, Produce}
abstract class CompositeExecutedRequestDefinition[F[_], L[_], P[_], R, Req, Base]
(requestFactory: RawRequest Produce Req,
executor: RequestExecutor.Aux[Req, L, Base],... | vpavkin/scalist | core/src/main/scala/ru/pavkin/todoist/api/core/CompositeExecutedRequestDefinition.scala | Scala | mit | 626 |
/*
* SlidingPlatform.scala
* (FScape)
*
* Copyright (c) 2001-2022 Hanns Holger Rutz. All rights reserved.
*
* This software is published under the GNU Affero General Public License v3+
*
*
* For further information, please contact Hanns Holger Rutz at
* contact@sciss.de
*/
package de.sciss.fscape.stre... | Sciss/FScape-next | core/jvm/src/main/scala/de/sciss/fscape/stream/SlidingPlatform.scala | Scala | agpl-3.0 | 2,825 |
/* NSC -- new Scala compiler
* Copyright 2005-2013 LAMP/EPFL
* @author Paul Phillips
*/
package scala.tools.nsc
package interpreter
import Properties.{ javaVersion, javaVmName, shellPromptString, shellWelcomeString,
versionString, versionNumberString }
import scala.sys._
import Prop._
import ja... | felixmulder/scala | src/repl/scala/tools/nsc/interpreter/ReplProps.scala | Scala | bsd-3-clause | 3,038 |
/**
* Copyright (C) 2014 Stratio (http://stratio.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | Stratio/streaming-cep-engine | api/src/main/scala/com/stratio/decision/api/StreamingAPIListOperation.scala | Scala | apache-2.0 | 1,567 |
package scalaprops
package scalazlaws
import scalaprops.Property.forAll
import scalaprops.Properties.properties
import scala.math.{Ordering => SOrdering}
import scalaz._
object order {
def antisymmetric[A](implicit A: Order[A], G: Gen[A]): Property =
forAll(A.orderLaw.antisymmetric _)
def transitiveOrder[A](... | scalaprops/scalaprops | scalaz/src/main/scala/scalaprops/scalazlaws/order.scala | Scala | mit | 1,149 |
package org.vaadin.addons.rinne
import java.util
import com.vaadin.ui.ColorPicker
import com.vaadin.ui.components.colorpicker.{ColorChangeEvent, ColorChangeListener}
import org.vaadin.addons.rinne.events.ListenersSet
import org.vaadin.addons.rinne.mixins.AbstractComponentMixin
class VColorPicker extends ColorPicker ... | LukaszByczynski/rinne | src/main/scala/org/vaadin/addons/rinne/VColorPicker.scala | Scala | apache-2.0 | 917 |
package controllers
import models.{Script, ScriptList}
import org.json4s.DefaultFormats
import org.json4s.jackson.Serialization._
import org.json4s.jackson.JsonMethods
import play.api.mvc.{Action, Controller}
import utils.db.MongoLocalDatabase
class ScriptController extends Controller {
implicit val formats = Defa... | tgodzik/akkajs | app/controllers/ScriptController.scala | Scala | mit | 1,280 |
/**
* 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... | qiunian2012/kafka | core/src/main/scala/kafka/tools/ConsoleProducer.scala | Scala | apache-2.0 | 15,439 |
package org.openstack.api.restful.keystone.v2.requests
/**
* @author Antonio Murgia
* @version 10/11/14
*/
import spray.json._
import org.openstack.api.restful.keystone.v2.elements.JsonConversions._
/**
* @author Antonio Murgia
* @version 09/11/14
*/
object JsonConversions extends DefaultJsonProtocol{
impli... | tmnd1991/ceilometerAPI4s | src/main/scala/org/openstack/api/restful/keystone/v2/requests/JsonConversions.scala | Scala | apache-2.0 | 390 |
package im.actor.api.rpc
import cats.data.Xor._
import cats.data.{ Xor, XorT }
import cats.syntax.all._
import cats.{ Functor, Monad }
import slick.dbio.DBIO
import scala.concurrent.{ ExecutionContext, Future }
object DBIOResultRpc {
type Result[A] = XorT[DBIO, RpcError, A]
def Result[A] = XorT.apply[DBIO, RpcE... | ljshj/actor-platform | actor-server/actor-core/src/main/scala/im/actor/api/rpc/DBIOResultRpc.scala | Scala | mit | 2,051 |
/*
* Copyright 2011-2022 GatlingCorp (https://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | gatling/gatling | gatling-charts/src/main/scala/io/gatling/charts/util/JsHelper.scala | Scala | apache-2.0 | 797 |
package io.iohk.ethereum.consensus.validators
import java.math.BigInteger
import java.security.SecureRandom
import akka.util.ByteString
import io.iohk.ethereum.consensus.validators.SignedTransactionError.{TransactionSignatureError, _}
import io.iohk.ethereum.consensus.validators.std.StdSignedTransactionValidator
impo... | input-output-hk/etc-client | src/test/scala/io/iohk/ethereum/consensus/validators/SignedTransactionValidatorSpec.scala | Scala | mit | 10,948 |
package com.rikmuld.camping.common.inventory
import net.minecraft.inventory.{IInventory, Slot}
class SlotTabbed(inv: IInventory, index: Int, x:Int, y:Int, val tab: Int) extends
Slot(inv, index, x, y) with com.rikmuld.corerm.gui.slots.SlotTabbed
| Rikmuld/MC-Camping | scala/com/rikmuld/camping/common/inventory/SlotTabbed.scala | Scala | gpl-3.0 | 249 |
package de.unihamburg.vsis.sddf.visualisation.logger
import de.unihamburg.vsis.sddf.visualisation.model.Analysable
import de.unihamburg.vsis.sddf.visualisation.model.IndexingModelExtended
object IndexingOutputterExtended extends Outputter {
override def logCustomResults(analysable: Analysable) = {
analysable m... | numbnut/sddf | src/main/scala/de/unihamburg/vsis/sddf/visualisation/logger/IndexingOutputterExtended.scala | Scala | gpl-3.0 | 1,006 |
/**
* Copyright (c) 2013 SLL. <http://sll.se>
*
* This file is part of Invoice-Data.
*
* Invoice-Data 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, ... | KentorIT/sll-invoice-data | invoice-data-performance/src/test/scala/se/sll/invoicedata/LoadTestRegisterInvoicedataOkSimulation.scala | Scala | lgpl-3.0 | 1,451 |
/*
* Copyright (C) 2010 Romain Reuillon
*
* 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.
*
* This progra... | ISCPIF/PSEExperiments | openmole-src/openmole/core/org.openmole.core.workflow/src/main/scala/org/openmole/core/workflow/data/DataMode.scala | Scala | agpl-3.0 | 1,466 |
import sbt._
class Plugins(info: ProjectInfo) extends PluginDefinition(info){
/*
TODO disable WebbyTest until its in a maven repo
val webbytest = "org.fusesource" % "webbytest" % "1.0-SNAPSHOT"
val scalaToolsRepo = "ScalaTools Repository" at "http://scala-tools.org/repo-releases/"
*/
} | dnatic09/scalate | project/plugins/Plugins.scala | Scala | apache-2.0 | 296 |
/*
* 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 ... | chenc10/Spark-PAF | mllib/src/main/scala/org/apache/spark/mllib/random/RandomRDDs.scala | Scala | apache-2.0 | 29,290 |
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.