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 buck
case class Class1(val hello: String) {
def sayHello = {
Console.println("Hello " + hello)
}
}
| daedric/buck | test/com/facebook/buck/jvm/scala/testdata/scala_binary/Class1.scala | Scala | apache-2.0 | 116 |
package org.scalafmt.util
import java.io.File
/** Wrapper around java.io.File with an absolute path. */
sealed abstract case class AbsoluteFile(jfile: File) {
def path: String = jfile.getAbsolutePath
def /(other: String) = new AbsoluteFile(new File(jfile, other)) {}
}
object AbsoluteFile {
def fromFiles(files:... | Daxten/scalafmt | utils/src/main/scala/org/scalafmt/util/AbsoluteFile.scala | Scala | apache-2.0 | 972 |
/*
* 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/carbondata/streaming/StreamSinkFactory.scala | Scala | apache-2.0 | 12,089 |
package lang.lightweightjava.configuration
import lang.lightweightjava.ast.statement.Statement
import lang.lightweightjava.ast.{AST, Heap, Program, State}
import name.Name
case class NormalConfiguration(program: Program, state: State, heap: Heap, programFlow: Statement*) extends Configuration {
override def freshNa... | matthisk/hygienic-transformations | scala/src/main/scala/lang/lightweightjava/configuration/NormalConfiguration.scala | Scala | lgpl-3.0 | 642 |
/*
* Copyright 2017 Iaroslav Zeigerman
*
* 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... | akkeeper-project/akkeeper | akkeeper/src/test/scala/akkeeper/container/service/TestUserActor.scala | Scala | apache-2.0 | 948 |
package jp.rotaryo.whitespace
protected[whitespace] object CopyOperation extends Operation {
override def getSource(): String = {
return stackManipulation + "\\t "
}
override def getParameter(): Option[Parameter] = {
return Some(NumberParameter)
}
override def preRun(container: Container, index: I... | rotary-o/scala2ws | src/main/scala/jp/rotaryo/whitespace/CopyOperation.scala | Scala | mit | 503 |
/*
* 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 ... | Sephiroth-Lin/incubator-carbondata | integration/spark/src/test/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtilTestCase.scala | Scala | apache-2.0 | 8,976 |
/**
* Copyright 2011-2017 GatlingCorp (http://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | timve/gatling | gatling-recorder/src/main/scala/io/gatling/recorder/scenario/ScenarioDefinition.scala | Scala | apache-2.0 | 6,029 |
package ch.thmx.cwiid
object CWiid {
def hstr2barr(addr: String) = addr.split(":").map(Integer.valueOf(_, 16).toByte).reverse.toArray
}
class CWiid {
}
| ThmX/ARPi-Bot | RasPi/src/main/scala/ch/thmx/cwiid/CWiid.scala | Scala | mit | 156 |
/*
* Copyright 2021 LINE Corporation
*
* LINE Corporation licenses this file to you 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:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | trustin/armeria | sangria/sangria_2.13/src/main/scala/com/linecorp/armeria/server/sangria/SangriaGraphqlService.scala | Scala | apache-2.0 | 6,813 |
package fafa.api
import fafa.BaseTest
import org.scalatest.{Matchers, FlatSpec}
/**
* Created by mac on 04.01.16.
*/
class ChessApiTest extends BaseTest {
def capturingMoves(actor: Actor) = actor.possibleMoves filter {
_.capturing.isDefined
} toSet
def nonCapturingMoves(actor: Actor) = actor.possibleMo... | Macok/fafachess | src/test/scala/fafa/api/ChessApiTest.scala | Scala | apache-2.0 | 369 |
/*
* Copyright (c) 2014 Robert Conrad - All Rights Reserved.
* Unauthorized copying of this file, via any medium is strictly prohibited.
* This file is proprietary and confidential.
* Last modified by rconrad, 12/27/14 10:40 AM
*/
package base.rest.swagger
import akka.actor.ActorRefFactory
/**
* Builds spray r... | robconrad/base-api | project-rest/src/main/scala/base/rest/swagger/SwaggerVersionsRouteFactory.scala | Scala | mit | 695 |
package com.github.j5ik2o.forseti.domain.json.jwk
import java.net.URI
import java.security.cert.X509Certificate
import java.security.interfaces.RSAPublicKey
import com.github.j5ik2o.forseti.domain.json.JsType
import com.github.j5ik2o.forseti.domain.support.Entity
import com.github.j5ik2o.forseti.infrastructure.util.{... | j5ik2o/forseti | domain/src/main/scala/com/github/j5ik2o/forseti/domain/json/jwk/JWK.scala | Scala | mit | 4,669 |
package mesosphere.marathon.core.matcher.base
import mesosphere.marathon.Protos.MarathonTask
import mesosphere.marathon.state.Timestamp
import org.apache.mesos.Protos.{ Offer, OfferID, TaskInfo }
import scala.concurrent.Future
object OfferMatcher {
case class TaskWithSource(source: TaskLaunchSource, taskInfo: Task... | Kosta-Github/marathon | src/main/scala/mesosphere/marathon/core/matcher/base/OfferMatcher.scala | Scala | apache-2.0 | 2,212 |
/**
* Swaggy Jenkins
* Jenkins API clients generated from Swagger / Open API specification
*
* The version of the OpenAPI document: 1.1.2-pre.0
* Contact: blah@cliffano.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not ed... | cliffano/swaggy-jenkins | clients/scala-sttp/generated/src/main/scala/org/openapitools/client/model/PipelinelatestRunartifacts.scala | Scala | mit | 551 |
package com.mesosphere.util
import org.mockito.InOrder
import org.mockito.Mockito._
import org.mockito._
import org.scalatest.FreeSpec
import org.scalatest.Matchers
import org.scalatest.mockito.MockitoSugar
class RoundTripSpec extends FreeSpec with Matchers with MockitoSugar {
import RoundTripSpec._
"RoundTrip.... | dcos/cosmos | cosmos-test-common/src/test/scala/com/mesosphere/util/RoundTripSpec.scala | Scala | apache-2.0 | 5,345 |
/**
* 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... | fintler/kafka | core/src/main/scala/kafka/log/LogManager.scala | Scala | apache-2.0 | 14,572 |
/*
* 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/self-service-time-to-pay-frontend | test/testsupport/stubs/DirectDebitStub.scala | Scala | apache-2.0 | 2,304 |
/*
* Copyright (C) 2016 Lightbend Inc. <http://www.lightbend.com>
*/
package sample.chirper.chirp.api
import java.time.Instant
import scala.collection.immutable.Seq
case class HistoricalChirpsRequest(fromTime: Instant, userIds: Seq[String])
| dotta/activator-lagom-scala-chirper | chirp-api/src/main/scala/sample/chirper/chirp/api/HistoricalChirpsRequest.scala | Scala | apache-2.0 | 245 |
package com.github.diegopacheco.sandbox.scala.akka.actor.persistence
import akka.persistence.PersistentActor
import akka.actor.ActorSystem
import akka.actor.Props
/**
*
* PersistentActor:
*
* Is a persistent, stateful actor. It is able to persist events to a journal and can react to them in a thread-safe mann... | diegopacheco/scala-playground | scala_11_akka_23_full_playground/src/main/scala/com/github/diegopacheco/sandbox/scala/akka/actor/persistence/AsyncPersistentActorApp.scala | Scala | unlicense | 2,470 |
package scala.collection.immutable
import org.junit.Assert._
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
@RunWith(classOf[JUnit4])
class TreeSetTest {
@Test
def hasCorrectDropAndTakeMethods(): Unit = {
val set = TreeSet(1, 2, 3)
assertEquals(TreeSet.empty[Int], ... | martijnhoekstra/scala | test/junit/scala/collection/immutable/TreeSetTest.scala | Scala | apache-2.0 | 2,643 |
/*
Deduction Tactics
Copyright (C) 2012-2015 Raymond Dodge
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 progra... | rayrobdod/boardGame | View/src/test/scala/CoordinateFunctionSpecifierParserTest.scala | Scala | gpl-3.0 | 12,183 |
package com.gx.monad
import scala.collection.mutable.ListBuffer
/**
* Copyright 2018 josephguan
*
* 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/licen... | josephguan/scala-design-patterns | other/monad/src/main/scala/com/gx/monad/Validator.scala | Scala | apache-2.0 | 1,383 |
package algebra
package lattice
import scala.{specialized => sp}
/**
* De Morgan algebras are bounded lattices that are also equipped with
* a De Morgan involution.
*
* De Morgan involution obeys the following laws:
*
* - ¬¬a = a
* - ¬(x∧y) = ¬x∨¬y
*
* However, in De Morgan algebras this involutio... | denisrosset/algebra | core/src/main/scala/algebra/lattice/DeMorgan.scala | Scala | mit | 1,711 |
/*
* Copyright 2013 David Savage
*
* 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... | davemssavage/modula | impl/src/main/scala/org/chronologicalthought/modula/impl/ModuleProviderWrapper.scala | Scala | apache-2.0 | 1,718 |
package com.github.gigurra.serviceutils.tuple
/**
* Created by kjolh on 12/20/2015.
*/
object FlattenTuple {
def apply[T](t: T): T = t
def apply[T1, T2](ts: (T1, T2)): (T1, T2) = ts
def apply[T1, T2, T3](ts: ((T1, T2), T3)): (T1, T2, T3) = (ts._1._1, ts._1._2, ts._2)
def apply[T1, T2, T3, T4](ts: (((T1... | GiGurra/service-utils | src/main/scala/com/github/gigurra/serviceutils/tuple/FlattenTuple.scala | Scala | mit | 637 |
package mesosphere.marathon
package state
import java.time.format.{DateTimeFormatter, DateTimeParseException}
import java.time.{Duration, Instant, OffsetDateTime, ZoneOffset}
import java.util.concurrent.TimeUnit
import org.apache.mesos
import scala.concurrent.duration.FiniteDuration
import scala.language.implicitCon... | gsantovena/marathon | src/main/scala/mesosphere/marathon/state/Timestamp.scala | Scala | apache-2.0 | 3,859 |
package com.geeksville.util
/// A helper class that calls a callback _at most_ every
/// minIntervalMsec.
///
/// To use: throttled = new Throttled(1000); throttled { some code }
/// @param minIntervalMsec use -1 to disable
class Throttled(minIntervalMsec: Int) {
private var lasttimeMsec = 0L
private var numVetoe... | NileshP/arduleader | common/src/main/scala/com/geeksville/util/Throttled.scala | Scala | gpl-3.0 | 1,843 |
// 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 to in writi... | lookout/zipkin | zipkin-cassandra/src/main/scala/com/twitter/cassie/tests/util/FakeCassandra.scala | Scala | apache-2.0 | 15,972 |
/*
* scala-swing (https://www.scala-lang.org)
*
* Copyright EPFL, Lightbend, Inc., contributors
*
* Licensed under Apache License 2.0
* (http://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package scala... | scala/scala-swing | examples/src/main/scala/scala/swing/examples/UIDemo.scala | Scala | apache-2.0 | 5,810 |
/*
* 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 ... | kimoonkim/spark | resource-managers/kubernetes/integration-tests-spark-jobs/src/main/scala/org/apache/spark/deploy/kubernetes/integrationtest/jobs/GroupByTest.scala | Scala | apache-2.0 | 1,980 |
/*
* 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 ... | aosagie/spark | sql/core/src/test/scala/org/apache/spark/sql/StatisticsCollectionTestBase.scala | Scala | apache-2.0 | 17,803 |
/*
* Copyright (c) 2013 timezra
*
* 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, copy, modify, merge, publish, di... | timezra/jacoco-scala-maven-plugin | jacoco-scalatest-maven-plugin-example/src/main/scala/CaseExample.scala | Scala | mit | 1,258 |
/**
* 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... | wangcy6/storm_app | frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/test/scala/unit/kafka/message/BaseMessageSetTestCases.scala | Scala | apache-2.0 | 4,769 |
package ManualnOutdated
import leon.lazyeval._
import leon.lang._
import leon.annotation._
import leon.instrumentation._
import leon.invariant._
//import leon.invariant._
object TestGenerics {
sealed abstract class List[T] {
def size: BigInt = {
this match {
case SNil() => BigInt(0)
... | regb/leon | testcases/lazy-datastructures/ManualnOutdated/TestGenerics.scala | Scala | gpl-3.0 | 693 |
package im.actor.server.commons
object KeyValueMappings {
val LocalNames = "LocalNames"
val Migrations = "Migrations"
} | luoxiaoshenghustedu/actor-platform | actor-server/actor-commons-base/src/main/scala/im/actor/server/commons/KeyValueMappings.scala | Scala | mit | 124 |
package org.clulab.twitter4food.featureclassifier
import org.clulab.learning._
import org.clulab.struct.Counter
import org.clulab.twitter4food.struct._
import org.clulab.twitter4food.util._
import java.io.{BufferedWriter, FileWriter}
import com.typesafe.config.{Config, ConfigFactory}
import org.slf4j.{Logger, LoggerF... | clulab/twitter4food | src/main/scala/org/clulab/twitter4food/featureclassifier/ClassifierImpl.scala | Scala | apache-2.0 | 38,452 |
/*
* 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
* distribut... | thenetcircle/event-bus | core/src/main/scala/com/thenetcircle/event_bus/story/interfaces/ITaskBuilder.scala | Scala | apache-2.0 | 1,456 |
package com.mentatlabs.nsa
package scalac
package dsl
package experimental
trait ScalacXResidentDSL
extends ScalacExperimentalDSL {
object Xresident {
val unary_- = options.ScalacXResident
}
}
| melezov/sbt-nsa | nsa-dsl/src/main/scala/com/mentatlabs/nsa/scalac/dsl/experimental/advanced/ScalacXResidentDSL.scala | Scala | bsd-3-clause | 207 |
package com.wavesplatform.network
import com.wavesplatform.utils.{Schedulers, ScorexLogging}
import io.netty.channel.ChannelHandler.Sharable
import io.netty.channel.{ChannelDuplexHandler, ChannelHandlerContext}
import monix.execution.schedulers.SchedulerService
import monix.reactive.Observable
@Sharable
class Discard... | wavesplatform/Waves | node/src/main/scala/com/wavesplatform/network/DiscardingHandler.scala | Scala | mit | 942 |
/*
* The MIT License
*
* Copyright 2014 Kamnev Georgiy (nt.gocha@gmail.com).
*
* Данная лицензия разрешает, безвозмездно, лицам, получившим копию данного программного
* обеспечения и сопутствующей документации (в дальнейшем именуемыми "Программное Обеспечение"),
* использовать Программное Обеспечение без огра... | gochaorg/odt-export | src/main/scala/xyz/cofe/odtexport/Common.scala | Scala | mit | 3,563 |
package io.scalding.approximations.performance
import java.io._
/**
* This Scala application generates a single file - with one 10-character string (key) per line
*
* It generates :
* 1 Million keys - 30 MBytes
* 10 Million keys - 300 MBytes
* 20 Million keys - 600 MBytes
* 40 Mi... | LeeRisk/social-media-analytics | src/main/scala/io/scalding/approximations/performance/GenerateMillionKeys.scala | Scala | apache-2.0 | 2,595 |
package io.eels
import java.nio.file.Paths
import com.sksamuel.exts.metrics.Timed
object SpeedTest extends App with Timed {
val path = Paths.get("big.csv")
// timed("plain java io") {
// val rows = Files.readAllLines(path).asScala
// println(rows.last)
// }
// timed("univocity") {
// val... | eel-lib/eel | eel-core/src/test/scala/io/eels/SpeedTest.scala | Scala | mit | 938 |
/*
* Copyright 2014 Treode, 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... | Treode/store | disk/src/com/treode/disk/PageTally.scala | Scala | apache-2.0 | 2,169 |
/*
* Copyright 2008 Juha Komulainen
*
* 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 ... | komu/solitarius | src/main/scala/solitarius/general/Card.scala | Scala | apache-2.0 | 2,908 |
package rpgboss.editor.dialog
import rpgboss.editor.uibase._
import rpgboss.editor.uibase.SwingUtils._
import rpgboss.editor.misc._
import scala.swing._
import scala.swing.event._
import rpgboss.model._
import rpgboss.model.resource._
import net.java.dev.designgridlayout._
import java.io._
import rpgboss.lib.FileHelpe... | hendrik-weiler/rpgboss | editor/src/main/scala/rpgboss/editor/dialog/NewProjectDialog.scala | Scala | agpl-3.0 | 1,641 |
package Tutorial
import Chisel._
import Node._
import Literal._
import scala.collection.mutable.HashMap
class IncgComponent extends gComponent (UFix(width = 32)) (UFix(width = 32)){
//class IncgComponent extends gComponent() {
val outputData = Reg(UFix(width=32))
val outputValid = Reg(Bool(false))
outputValid :... | seyedmaysamlavasani/GorillaPP | chisel/KmeansAndMesh/backup/ChainUsingMetaDataClassNotWorking/Chained.scala | Scala | bsd-3-clause | 2,835 |
/*
* 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 ... | practice-vishnoi/dev-spark-1 | core/src/test/scala/org/apache/spark/shuffle/hash/HashShuffleManagerSuite.scala | Scala | apache-2.0 | 4,697 |
import akka.actor.ActorSystem
import akka.event.{ Logging, LoggingAdapter }
import akka.http.scaladsl.Http
import akka.stream.ActorMaterializer
import http.HttpService
import services._
import utils.{ Config, SampleDataSeed }
import scala.concurrent.ExecutionContext
object Main extends App with Config {
implicit ... | ziyasal/Reserveon | src/main/scala/Main.scala | Scala | mit | 1,546 |
/*
* Copyright 2010 Red Hat, Inc.
*
* Red Hat licenses this file to you 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... | janstey/fuse | fmc/fmc-rest/src/main/scala/org/fusesource/fabric/webui/agents/activemq/DestinationResource.scala | Scala | apache-2.0 | 3,529 |
package dsmoq.persistence
import org.joda.time.DateTime
import PostgresqlHelper.PgSQLSyntaxType
import scalikejdbc.DBSession
import scalikejdbc.ResultName
import scalikejdbc.ResultName
import scalikejdbc.SQLSyntax
import scalikejdbc.SQLSyntaxSupport
import scalikejdbc.SQLSyntaxSupport
import scalikejdbc.SyntaxProvide... | nkawa/dsmoq | server/common/src/main/scala/dsmoq/persistence/App.scala | Scala | apache-2.0 | 5,063 |
import scala.quoted._
inline def rewrite[T](inline x: T): T = ${ rewriteMacro('x) }
private def rewriteMacro[T: Type](x: Expr[T])(using QuoteContext): Expr[T] = {
val rewriter = Rewriter(
postTransform = {
case '{ Nil.map[$t]($f) } => '{ Nil }
case '{ Nil.filter($f) } => '{ Nil }
case '{ Nil.... | som-snytt/dotty | tests/run-macros/flops-rewrite/Macro_1.scala | Scala | apache-2.0 | 1,657 |
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs
// Licence: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.indexer
import akka.event.slf4j.SLF4JLogging
import org.scalatest.FunSpec
import org.scalatest.Matchers
import DescriptorParser.{ parse, parseType }
import ClassName._
imp... | j-mckitrick/ensime-sbt | src/sbt-test/ensime-sbt/ensime-server/core/src/test/scala/org/ensime/indexer/DescriptorParserSpec.scala | Scala | apache-2.0 | 3,112 |
package com.wavesplatform.state.diffs.smart.scenarios
import com.wavesplatform.common.utils.EitherExt2
import com.wavesplatform.db.WithState
import com.wavesplatform.features.BlockchainFeatures
import com.wavesplatform.lagonaki.mocks.TestBlock
import com.wavesplatform.lang.v1.estimator.v2.ScriptEstimatorV2
import com.... | wavesplatform/Waves | node/src/test/scala/com/wavesplatform/state/diffs/smart/scenarios/ScriptedSponsorTest.scala | Scala | mit | 5,711 |
/*
* Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com>
*/
package com.lightbend.lagom.internal.javadsl.persistence
import java.util.Optional
import java.util.concurrent.{ CompletableFuture, CompletionStage, ConcurrentHashMap, TimeUnit }
import akka.actor.ActorSystem
import akka.cluster.Cluster
imp... | rstento/lagom | persistence/javadsl/src/main/scala/com/lightbend/lagom/internal/javadsl/persistence/AbstractPersistentEntityRegistry.scala | Scala | apache-2.0 | 7,117 |
/***********************************************************************
* Copyright (c) 2013-2022 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | locationtech/geomesa | geomesa-filter/src/test/scala/org/locationtech/geomesa/filter/function/FastPropertyTest.scala | Scala | apache-2.0 | 2,408 |
package com.creatifcubed.minecraft.mc_chatroom;
import _root_.cpw.mods.fml.common.network.{ IPacketHandler, Player, ITinyPacketHandler, PacketDispatcher };
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.{ Packet250CustomPayload, Packet131MapData, NetHandler };
import net.minecraft.en... | Raekye/MC-Chatroom | src/minecraft/com/creatifcubed/minecraft/mc_chatroom/PacketHandler.scala | Scala | gpl-2.0 | 1,168 |
package rest
import org.scalatest.{Matchers, WordSpec}
import org.specs2.mock.Mockito
import persistence.dal.{SuppliersDal, SuppliersDalImpl}
import utils.{ActorModule, ConfigurationModuleImpl, DbContext, PersistenceModule}
import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory
import akka.http.sca... | cdiniz/quill-async-akka-http | src/test/scala/rest/AbstractRestTest.scala | Scala | apache-2.0 | 780 |
/*
* -╥⌐⌐⌐⌐ -⌐⌐⌐⌐-
* ≡╢░░░░⌐\░░░φ ╓╝░░░░⌐░░░░╪╕
* ╣╬░░` `░░░╢┘ φ▒╣╬╝╜ ░░╢╣Q
* ║╣╬░⌐ ` ╤▒▒▒Å` ║╢╬╣
* ╚╣╬░⌐ ╔▒▒▒▒`«╕ ╢╢╣▒
* ╫╬░░╖ .░ ╙╨╨ ╣╣╬░φ ╓φ░╢╢Å
* ╙╢░░░░⌐"░░░╜ ╙Å░░░░⌐░░░░╝`
* ``˚¬ ⌐ ˚˚⌐´
*
* ... | Flipkart/connekt | commons/src/test/scala/com/flipkart/connekt/commons/tests/dal/HbaseDaoTest.scala | Scala | mit | 5,118 |
/*
* 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... | cogitate/twitter-zipkin-uuid | zipkin-collector-core/src/main/scala/com/twitter/zipkin/collector/sampler/ZooKeeperGlobalSampler.scala | Scala | apache-2.0 | 2,052 |
package chat.tox.antox.utils
import android.content.Context
import android.media.{AudioManager, MediaPlayer}
object MediaUtils {
def setupSound(context: Context, resourceId: Int, streamType: Int, looping: Boolean): MediaPlayer = {
val sound = new MediaPlayer()
val assetFileDescriptor = context.getResources.... | wiiam/Antox | app/src/main/scala/chat/tox/antox/utils/MediaUtils.scala | Scala | gpl-3.0 | 644 |
package org.jetbrains.plugins.scala.lang.psi.api.base.patterns
/**
* @author Alexander Podkhalyuzin
* Date: 28.02.2008
*/
trait ScReferencePattern extends ScBindingPattern {
} | gtache/intellij-lsp | intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/api/base/patterns/ScReferencePattern.scala | Scala | apache-2.0 | 178 |
/*
* 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 ... | sh-cho/cshSpark | api/java/JavaRDD.scala | Scala | apache-2.0 | 7,945 |
/*
* Copyright 2015 Webtrends (http://www.webtrends.com)
*
* See the LICENCE.txt 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.
* Yo... | Kraagen/wookiee-kafka | src/main/scala/com/webtrends/harness/component/kafka/actor/KafkaWriter.scala | Scala | apache-2.0 | 5,002 |
/*
* Copyright 2014 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 agreed to in... | knutwalker/rx-redis | tests/src/it/scala/rx/redis/commands/it/StringCommandsSpec.scala | Scala | apache-2.0 | 3,553 |
package japgolly.microlibs.compiletime
import scala.reflect.macros.blackbox.Context
object CompileTimeInfo {
// Null versions
def envVarOrNull(key: String): String =
macro CompileTimeInfoMacros.envVarOrNull
def sysPropOrNull(key: String): String =
macro CompileTimeInfoMacros.sysPropOrNull
def envV... | japgolly/microlibs-scala | compile-time/shared/src/main/scala-2/japgolly/microlibs/compiletime/CompileTimeInfo.scala | Scala | apache-2.0 | 2,931 |
package models.hbase
/*
* Copyright 2014 YMC. See LICENSE for details.
*/
trait HBaseContext {
val hBase: HBase
val logFileParser: LogFileParser
}
| Connexity/hannibal | app/models/hbase/HBaseContext.scala | Scala | apache-2.0 | 154 |
package com.zxg.chat.lightdd.service
import java.lang.Class
import scala.collection.mutable.LinkedHashMap;
class ServiceRepository extends Service {
val serviceMap = LinkedHashMap[Class[_ <: Service], Service]()
def registerService[T <: Service](serviceInterface: Class[T], service: T): Unit = {
if (serviceMa... | Xianguang-Zhou/light-dd | light-dd/src/main/scala/com/zxg/chat/lightdd/service/ServiceRepository.scala | Scala | gpl-3.0 | 1,299 |
package com.softwaremill.macwire.autocats
import com.softwaremill.macwire.CompileTestsSupport
class CompileTests extends CompileTestsSupport {
runTestsWith(
expectedFailures = List(
"simpleMissingDeps" -> List("Cannot find a value of type: [String]"), //TODO List("Cannot find a value of type: [String], p... | adamw/macwire | macrosAutoCatsTests/src/test/scala/com/softwaremill/macwire/autocats/CompileTests.scala | Scala | apache-2.0 | 527 |
/**
* Licensed to the Minutemen Group under one or more contributor license
* agreements. See the COPYRIGHT 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 complian... | mohiva/silhouette | modules/http/src/main/scala/silhouette/http/client/Response.scala | Scala | apache-2.0 | 2,425 |
/*
* Copyright (C) 2016 University of Basel, Graphics and Vision Research Group
*
* 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) an... | unibas-gravis/scalismo-ui | src/main/scala/scalismo/ui/model/TriangleMeshNode.scala | Scala | gpl-3.0 | 2,902 |
package net.node3.scalabot.config
import scala.collection.JavaConversions._
import scala.collection.immutable.Seq
import com.typesafe.config.Config
import com.github.kxbmap.configs._
object Network {
def apply(c: Config): Network = Network(
c.getString("hostname"),
c.getInt("port"),
c.opt[String]("pass... | nadams/scalabot | src/main/scala/config/Network.scala | Scala | mit | 494 |
/*
* Copyright (c) 2015 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.apache.org... | snowplow/schema-guru | src/test/scala/JsonObjectAnnotatorSpec.scala | Scala | apache-2.0 | 2,365 |
package com.codahale.jerkson.ser
import com.fasterxml.jackson.core.JsonGenerator
import com.fasterxml.jackson.databind.{SerializerProvider, JsonSerializer}
class MapSerializer extends JsonSerializer[collection.Map[Any, Any]] {
def serialize(map: collection.Map[Any, Any], json: JsonGenerator, provider: SerializerPro... | rememberthemilk/jerkson | src/main/scala/com/codahale/jerkson/ser/MapSerializer.scala | Scala | mit | 499 |
package com.pragmaxim.scalajs.bindings.mbostock
import org.scalajs.dom.Element
import scala.scalajs.js
import scala.scalajs.js.native
@native
trait Selection extends js.Array[js.Any] with Selectors with EnterSelection {
/**
* @return the value of the specified attribute for the first non-null element in the se... | viagraphs/scalajs-bindings | d3/src/main/scala/com/pragmaxim/scalajs/bindings/mbostock/Selection.scala | Scala | mit | 29,870 |
/** Copyright 2015 TappingStone, 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 ... | ch33hau/PredictionIO | data/src/main/scala/io/prediction/data/api/PluginsActor.scala | Scala | apache-2.0 | 1,562 |
/*
* 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 ... | mtunique/flink | flink-libraries/flink-table/src/main/scala/org/apache/flink/table/calcite/RelTimeIndicatorConverter.scala | Scala | apache-2.0 | 14,652 |
package io.citrine.lolo.trees
import breeze.linalg.DenseMatrix
import io.citrine.lolo.trees.splits.Split
import io.citrine.lolo.{Learner, Model, PredictionResult}
import scala.collection.mutable
/**
* Class to provide getNode interface for internal and leaf training nodes
* Created by maxhutch on 11/29/16.
*
... | CitrineInformatics/lolo | src/main/scala/io/citrine/lolo/trees/Nodes.scala | Scala | apache-2.0 | 10,355 |
/**
* © 2019 Refinitiv. 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 required by applicable l... | dudi3001/CM-Well | server/cmwell-kafka-assigner/src/main/scala/cmwell/kafka/KafkaAssignmentStrategy.scala | Scala | apache-2.0 | 9,279 |
package com.datastax.spark.connector.writer
import java.util.concurrent.Semaphore
import com.datastax.spark.connector.util.Logging
import com.google.common.util.concurrent.{FutureCallback, Futures, ListenableFuture, SettableFuture}
import scala.collection.concurrent.TrieMap
import scala.util.Try
import AsyncExecuto... | shashwat7/spark-cassandra-connector | spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/writer/AsyncExecutor.scala | Scala | apache-2.0 | 2,287 |
package test_data.v24
import scala.xml.Elem
case class SectionAboutEmployment(xml: Elem) {
val rootPathJobDetails = xml \\\\ "DWPCATransaction" \\\\ "DWPCAClaim" \\\\ "Employment" \\\\ "JobDetails"
val address = (rootPathJobDetails \\\\ "Employer" \\\\ "Address" \\\\ "Answer" \\\\"Line").map(x => x.text).filte... | Department-for-Work-and-Pensions/RenderingService | test/test_data/v24/SectionAboutEmployment.scala | Scala | mit | 3,524 |
import akka.http.scaladsl.model.HttpMethods._
import akka.http.scaladsl.model.headers._
import akka.http.scaladsl.model.{HttpResponse, StatusCodes}
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server.{Directive0, Route}
trait CorsSupport {
private def addAccessControlHeaders: Directive0 =
... | sangria-graphql/sangria-akka-http-example | src/main/scala/CorsSupport.scala | Scala | apache-2.0 | 825 |
/*
* 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/api/stream/sql/SetOperatorsTest.scala | Scala | apache-2.0 | 7,286 |
/***********************************************************************
* Copyright (c) 2013-2015 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 ... | setumaven/geomesa | geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/accumulo.scala | Scala | apache-2.0 | 5,224 |
/*
* Copyright (c) 2014 Oculus Info Inc.
* http://www.oculusinfo.com/
*
* Released under the MIT License.
*
* 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, includ... | aashish24/aperture-tiles | tile-generation/src/main/scala/com/oculusinfo/tilegen/spark/MinMaxAccumulator.scala | Scala | mit | 2,977 |
/*
* Distributed as part of the Stanford Topic Modeling Toolbox.
* Copyright (c) 2009- The Board of Trustees of the Leland
* Stanford Junior University.
*
* 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 Softw... | quhfus/DoSeR | Stanford Topic Model/src/main/scala/edu/stanford/nlp/tmt/learn/SerialModeler.scala | Scala | gpl-2.0 | 3,041 |
/*
* chocola library
*
* Copyright (C) 2013 hanny
*
* 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, copy, modify... | hanny24/chocola | src/test/scala/com/chocola/CPProblemTest.scala | Scala | mit | 1,654 |
package object com {
} | triggerNZ/intellij-scala | testdata/move/packageObject2/before/com/package.scala | Scala | apache-2.0 | 23 |
/*
* 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 ... | rocwzp/zipkin | zipkin-common/src/main/scala/com/twitter/zipkin/common/Endpoint.scala | Scala | apache-2.0 | 2,114 |
package util.scalikejdbc
import scalikejdbc._
object BulkInsert {
implicit class BulkInsertSQLBuilder(val self: InsertSQLBuilder) extends AnyVal {
def multiValues(values: Seq[Any]*): InsertSQLBuilder = {
values.foreach(x => require(x.nonEmpty))
val elems = values.transpose.map { xs =>
val ys... | ttdoda/MyFleetGirls | server/app/util/scalikejdbc/BulkInsert.scala | Scala | mit | 456 |
package com.automatatutor.model
import net.liftweb.mapper._
import net.liftweb.common.Box
import net.liftweb.common.Empty
import net.liftweb.common.Full
class SolutionAttempt extends LongKeyedMapper[SolutionAttempt] with IdPK {
def getSingleton = SolutionAttempt
object dateTime extends MappedDateTime(this)
object... | AutomataTutor/automatatutor-frontend | src/main/scala/com/automatatutor/model/SolutionAttempt.scala | Scala | mit | 3,466 |
package org.phenoscape.owl.sim
import monix.eval.Task
import monix.reactive.Observable
import org.apache.jena.datatypes.TypeMapper
import org.apache.jena.rdf.model.impl.ResourceImpl
import org.apache.jena.rdf.model.{AnonId, ResourceFactory, Statement => JenaStatement}
import org.apache.jena.riot.RDFFormat
import org.a... | phenoscape/phenoscape-owl-tools | src/main/scala/org/phenoscape/owl/sim/OWLsim.scala | Scala | mit | 16,445 |
/*
* La Trobe University - Distributed Deep Learning System
* Copyright 2016 Matthias Langer (t3l@threelights.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apa... | bashimao/ltudl | cublaze/src/main/scala/edu/latrobe/cublaze/_FilterStruct.scala | Scala | apache-2.0 | 3,217 |
package im.mange.driveby.conditions
import im.mange.driveby.browser.UnSafeBrowser
import im.mange.driveby.{By, Condition, Describer}
case class ElementChecked(by: By) extends Condition {
import Describer._
def expectation = expect("ElementChecked", List(by.toString))
def isSatisfied(browser: UnSafeBrowser) = {... | alltonp/driveby | src/main/scala/im/mange/driveby/conditions/ElementChecked.scala | Scala | apache-2.0 | 478 |
/*
* Copyright (c) 2016 Lucas Satabin
*
* 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 writ... | gnieh/docdiff | src/main/scala/gnieh/docdiff/utils/package.scala | Scala | apache-2.0 | 1,140 |
package controllers
import java.security.MessageDigest
import java.util.Base64
import java.util.Base64.Encoder
trait AccessTokenValidator {
def validate(accessToken: String, algorithmName: String, atHash: String): Boolean
}
object AccessTokenValidator {
def ofDefault(padding: Boolean = false): AccessTokenVali... | j5ik2o/forseti | app/relying-party/app/controllers/AccessTokenValidator.scala | Scala | mit | 1,433 |
package com.giyeok.jparser.visualize
import com.giyeok.jparser.ParseForest
import com.giyeok.jparser.ParseResultDerivations
import com.giyeok.jparser.ParseResultDerivationsSet
import com.giyeok.jparser.ParseResultGraph
import com.giyeok.jparser.ParseResultTree
import com.giyeok.jparser.Symbols
import com.giyeok.jparse... | Joonsoo/moon-parser | visualize/src/main/scala/com/giyeok/jparser/visualize/ParseResultFigureGenerator.scala | Scala | mit | 11,111 |
package com.github.macpersia.planty.views.jira
import java.io.{File, FileNotFoundException}
import java.net.{URI, URISyntaxException}
import java.time.LocalDate
import java.util.TimeZone
import com.github.macpersia.planty.views.jira.JiraWorklogReporter._
import com.github.macpersia.planty.views.jira.model.JiraWorklog... | macpersia/planty-jira-view | src/main/scala/com/github/macpersia/planty/views/jira/App.scala | Scala | apache-2.0 | 3,707 |
package org.workcraft.gui
import java.awt.Window
import org.workcraft.services.ModelServiceProvider
import org.workcraft.services.GlobalServiceManager
import org.workcraft.services.FileOpenService
import java.io.File
import javax.swing.JFileChooser
import org.workcraft.services.FileOpen
import javax.swing.filec... | mechkg/workcraft | Gui/src/main/scala/org/workcraft/gui/OpenDialog.scala | Scala | gpl-3.0 | 3,337 |
/***********************************************************************
* 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-tools/src/main/scala/org/locationtech/geomesa/tools/status/HelpCommand.scala | Scala | apache-2.0 | 1,938 |
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.