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.scalaAsm.x86 package Instructions package General // Description: Set Interrupt Flag // Category: general/flgctrl trait STI extends InstructionDefinition { val mnemonic = "STI" } object STI extends ZeroOperands[STI] with STIImpl trait STIImpl extends STI { implicit object _0 extends NoOp{ val op...
bdwashbu/scala-x86-inst
src/main/scala/com/scalaAsm/x86/Instructions/General/STI.scala
Scala
apache-2.0
353
package mcoffin.rogue.wpi.patcher import java.io.BufferedOutputStream import java.io.ByteArrayInputStream import java.io.File import java.io.FileOutputStream import java.io.InputStream import java.nio.file.{Files, Paths} import java.net.URL import java.net.URLClassLoader import java.util.LinkedList import java.util...
mcoffin/rogue
wpilib-patcher/src/main/scala/mcoffin/rogue/wpi/patcher/Patcher.scala
Scala
apache-2.0
4,141
/* * 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...
scalatest/scalatest
jvm/featurespec-test/src/test/scala/org/scalatest/featurespec/AsyncFeatureSpecSpec.scala
Scala
apache-2.0
29,688
package controllers import play.api.libs.json._ import play.api.mvc._ import models.Person._ import javax.inject.Inject import scala.concurrent.ExecutionContext.Implicits.global import scala.util.{Failure, Success} import dao.PersonDAO import scala.concurrent.Future class PersonController @Inject()(personDao: Perso...
magura42/KickAppServer
app/controllers/PersonController.scala
Scala
mit
1,841
/** * Copyright (C) 2011 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This program i...
ajw625/orbeon-forms
src/main/scala/org/orbeon/oxf/xforms/processor/XFormsResourceRewriter.scala
Scala
lgpl-2.1
10,572
package debop4s.data.slick /** * μ‚¬μš©μž μ •μ˜ 수ν–₯κ³Ό DB μ»¬λŸΌκ°„μ˜ λ³€ν™˜μ„ μˆ˜ν–‰ν•©λ‹ˆλ‹€. * @author sunghyouk.bae@gmail.com */ package object customtypes { // TODO: examples.JdbcTypeFunSuite λ₯Ό μ°Έκ³ ν•΄μ„œ implicit ν•¨μˆ˜λ₯Ό μ œκ³΅ν•©λ‹ˆλ‹€. }
debop/debop4s
debop4s-data-slick/src/main/scala/debop4s/data/slick/customtypes/package.scala
Scala
apache-2.0
267
package roshan.map import akka.actor.{Actor, ActorRef} import roshan.protocols.MapProtocol.CharacterId import roshan.buffer.Msg.{CharacterAction, ACTION} import roshan.model.Direction._ import roshan.protocols.CharacterChangesProtocol._ /** Event Box is a event pub/sub system for map boxes. */ trait EventBox extends ...
andychase/roshan
src/main/scala/roshan/map/EventBox.scala
Scala
mit
1,624
/* * 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...
pncampbell/ct-calculations
src/test/scala/uk/gov/hmrc/ct/accounts/frs10x/boxes/AC8899Spec.scala
Scala
apache-2.0
1,652
/* * 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 ...
ahnqirage/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/FileIndexSuite.scala
Scala
apache-2.0
11,391
package controllers import java.util.UUID import javax.inject.{Inject, Singleton} import com.mohiva.play.silhouette.api.Environment import com.mohiva.play.silhouette.impl.authenticators.CookieAuthenticator import models._ import models.daos.PCMContainerDAO import org.opencompare.api.java.{PCMContainer, PCMFactory} im...
OpenCompare/OpenCompare
org.opencompare/play-app/app/controllers/PCMAPI.scala
Scala
apache-2.0
5,182
package com.codahale.jerkson.tests import com.codahale.simplespec.Spec import com.codahale.jerkson.Json._ import com.fasterxml.jackson.databind.node.IntNode import com.fasterxml.jackson.databind.JsonNode import org.junit.Test class BasicTypeSupportSpec extends Spec { class `A Byte` { @Test def `generates a JSON...
codahale/jerkson
src/test/scala/com/codahale/jerkson/tests/BasicTypeSupportSpec.scala
Scala
mit
5,208
package sampler.example.abc.flockMortality.util import play.api.libs.json.JsLookupResult.jsLookupResultToJsLookup import play.api.libs.json.JsValue import play.api.libs.json.JsValue.jsValueToJsLookup import play.api.libs.json.Writes import play.api.libs.json.Json import play.api.libs.json.JsObject import sampler._ ...
tearne/Sampler
sampler-examples/src/main/scala/sampler/example/abc/flockMortality/util/Posterior.scala
Scala
apache-2.0
2,342
package breeze.optimize import breeze.math.{MutablizingAdaptor, CoordinateSpace, MutableCoordinateSpace} import breeze.util.Implicits._ import breeze.optimize.FirstOrderMinimizer.OptParams import breeze.linalg.DenseVector import breeze.linalg.operators.{OpMulMatrix, BinaryOp} import breeze.linalg.support.CanCopy /** ...
eponvert/breeze
src/main/scala/breeze/optimize/OptimizationPackage.scala
Scala
apache-2.0
4,121
package dotty.tools package dotc package parsing import core._, ast._ import Trees._ object desugarPackage extends DeSugarTest { def test() = { reset() val start = System.nanoTime() val startNodes = Trees.ntrees parseDir("./src") val ms1 = (System.nanoTime() - start)/1000000 val nodes = Tre...
som-snytt/dotty
compiler/test/dotty/tools/dotc/parsing/desugarPackage.scala
Scala
apache-2.0
814
///////////////////////////////////////////////////////////////////// //// //// //// WISHBONE revB.2 compliant I2C Master controller Top-level //// //// //// //// ...
sifive/sifive-blocks
src/main/scala/devices/i2c/I2C.scala
Scala
apache-2.0
21,714
package org.jetbrains.plugins.scala package util import com.intellij.openapi.editor.Document import com.intellij.openapi.project.Project import com.intellij.openapi.util.text.StringUtil import com.intellij.psi.codeStyle.CodeStyleSettingsManager import com.intellij.psi.{PsiDocumentManager, PsiElement} import org.jetbra...
SergeevPavel/intellij-scala
src/org/jetbrains/plugins/scala/util/MultilineStringUtil.scala
Scala
apache-2.0
10,468
package com.lynbrookrobotics.potassium.commons.position import com.lynbrookrobotics.potassium.{Component, Signal} import com.lynbrookrobotics.potassium.streams.Stream import com.lynbrookrobotics.potassium.control.{PIDF, PIDFConfig} import com.lynbrookrobotics.potassium.tasks.{ContinuousTask, FiniteTask} import squants...
Team846/potassium
commons/src/main/scala/com/lynbrookrobotics/potassium/commons/position/Position.scala
Scala
mit
2,472
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2015, G...
rmihael/squants
shared/src/main/scala/squants/photo/LuminousEnergy.scala
Scala
apache-2.0
1,993
/* * Copyright 2013 agwlvssainokuni * * 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...
agwlvssainokuni/lifelog
lifelog-common/app/models/Member.scala
Scala
apache-2.0
4,783
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/nn/mkldnn/Utils.scala
Scala
apache-2.0
5,488
/* * Copyright 2016 LinkedIn Corp. * * 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 i...
linkedin/dr-elephant
test/com/linkedin/drelephant/util/SparkUtilsTest.scala
Scala
apache-2.0
14,141
package com.nthportal.shell package util import com.nthportal.shell.impl.TestCommand class CommandTabCompleterTest extends SimpleSpec { behavior of classOf[CommandTabCompleter].getSimpleName it should "return an empty seq when given an empty list of arguments" in { val ctc = new CommandTabCompleter { o...
NthPortal/app-shell
src/test/scala/com/nthportal/shell/util/CommandTabCompleterTest.scala
Scala
apache-2.0
426
package com.github.suzuki0keiichi.nomorescript.trees case class NoMoreScriptSetter(name: String, target: NoMoreScriptTree, val rhs: NoMoreScriptTree) extends NoMoreScriptTree { val rootMatcher = "nomorescriptroot\\\\.[a-zA-Z0-9_]+\\\\.([a-zA-Z0-9_.]+)$".r override def toJs(terminate: Boolean) = { val lh...
suzuki0keiichi/nomorescript
nomorescript-plugin/src/main/scala/com/github/suzuki0keiichi/nomorescript/trees/NoMoreScriptSetter.scala
Scala
mit
763
package group.matsen.phylohmc import spire.algebra.Order._ import spire.algebra.{Field, Signed} import spire.std.seq._ import spire.syntax.order._ import spire.syntax.vectorSpace._ trait ReflectiveLeapProg[R, N, D <: Int with Singleton] extends NumericalDynamics[R, N, D] { val barrier = Field[R].fromDouble(0.0) ...
armanbilge/phyloHMC
src/main/scala/group/matsen/phylohmc/ReflectiveLeapProg.scala
Scala
agpl-3.0
1,393
import scala.reflect.runtime.universe._ import scala.tools.reflect.Eval object Test extends dotty.runtime.LegacyApp { reify { class Complex(val re: Double, val im: Double) { def + (that: Complex) = new Complex(re + that.re, im + that.im) def - (that: Complex) = new Complex(re - that.r...
yusuke2255/dotty
tests/disabled/macro/run/reify_complex.scala
Scala
bsd-3-clause
864
package org.jetbrains.plugins.scala.lang.psi.stubs.elements.signatures import com.intellij.lang.ASTNode import org.jetbrains.plugins.scala.lang.psi.api.statements.params.ScParameter import org.jetbrains.plugins.scala.lang.psi.impl.statements.params.ScParameterImpl import org.jetbrains.plugins.scala.lang.psi.stubs.ScPa...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/signatures/ScParameterElementType.scala
Scala
apache-2.0
654
/* * 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 ...
caneGuy/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StreamingSymmetricHashJoinExec.scala
Scala
apache-2.0
27,415
package io.iohk.ethereum.consensus.validators import io.iohk.ethereum.consensus.validators.BlockHeaderError._ import io.iohk.ethereum.domain.BlockHeader import io.iohk.ethereum.ledger.BloomFilter import io.iohk.ethereum.utils.{BlockchainConfig, ByteStringUtils} /** Validator specialized for the block with checkpoint ...
input-output-hk/etc-client
src/main/scala/io/iohk/ethereum/consensus/validators/BlockWithCheckpointHeaderValidator.scala
Scala
mit
7,605
package com.wavesplatform.state.diffs.ci import com.wavesplatform.account.Address import com.wavesplatform.db.WithState.AddrWithBalance import com.wavesplatform.db.{DBCacheSettings, WithDomain, WithState} import com.wavesplatform.lang.directives.DirectiveDictionary import com.wavesplatform.lang.directives.values.{StdL...
wavesplatform/Waves
node/src/test/scala/com/wavesplatform/state/diffs/ci/InvokePaymentsLimitTest.scala
Scala
mit
3,397
package com.socrata.util.locks package simple import scala.{collection => sc} import sc.{mutable => scm} import org.joda.time.DateTime private [simple] class LockStructure { var heldBy: Thread = null var holdCount: Int = 0 var heldSince: DateTime = null val waiters = new scm.HashSet[Thread] def acquiredBy(...
socrata-platform/socrata-utils
src/main/scala/com/socrata/util/locks/simple/SimpleLocker.scala
Scala
apache-2.0
3,295
/* ___ _ ___ _ _ *\\ ** / __| |/ (_) | | The SKilL Generator ** ** \\__ \\ ' <| | | |__ (c) 2013 University of Stuttgart ** ** |___/_|\\_\\_|_|____| see LICENSE ...
XyzNobody/skill
src/main/scala/de/ust/skill/generator/ada/api/internal/ByteReaderBodyMaker.scala
Scala
bsd-3-clause
5,624
package akka.persistence.eventstore.journal import akka.persistence.journal.JournalSpec import akka.persistence.eventstore.EventStorePluginSpec class JournalIntegrationSpec extends JournalSpec with EventStorePluginSpec
petervdm/EventStore.Akka.Persistence
src/test/scala/akka/persistence/eventstore/journal/JournalIntegrationSpec.scala
Scala
bsd-3-clause
220
/* * Copyright 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 agreed to in...
knutwalker/NtParser
core/src/main/scala/de/knutwalker/ntparser/ParseError.scala
Scala
apache-2.0
675
/* * This software is licensed under the GNU Affero General Public License, quoted below. * * This file is a part of PowerAPI. * * Copyright (C) 2011-2016 Inria, University of Lille 1. * * PowerAPI is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public Lice...
Spirals-Team/powerapi
powerapi-core/src/test/scala/org/powerapi/core/target/TargetSuite.scala
Scala
agpl-3.0
1,400
package at.forsyte.apalache.tla.bmcmt.caches import at.forsyte.apalache.tla.bmcmt.StackableContext import at.forsyte.apalache.tla.bmcmt.rewriter.Recoverable import scala.collection.immutable.HashMap /** * A stackable cache that allows one to store values and retrieve them later. * * @author Igor Konnov */ cl...
konnov/dach
tla-bmcmt/src/main/scala/at/forsyte/apalache/tla/bmcmt/caches/SimpleCache.scala
Scala
apache-2.0
2,790
package bank2 import akka.actor.{ ActorSystem, Actor, Props, ActorRef } import akka.bita.RandomScheduleHelper import akka.bita.pattern.Patterns._ import akka.util.duration._ import org.scalatest._ import akka.testkit.TestProbe import util.BitaTests class BankSpec extends BitaTests { // feel free to change these...
Tjoene/thesis
benchmark/src/test/scala/bank2/BankSpec.scala
Scala
gpl-2.0
2,005
/* * 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 not u...
knockdata/spark-highcharts
src/main/scala/com/knockdata/spark/highcharts/PlotOptions.scala
Scala
apache-2.0
2,320
/* * Copyright 2016-2018 SN127.fi * * 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...
jaa127/tackler
core/src/main/scala/fi/sn127/tackler/model/TxnTS.scala
Scala
apache-2.0
2,886
package notebook import notebook.util.Match import org.junit.runner._ import org.specs2.mutable._ import org.specs2.runner._ @RunWith(classOf[JUnitRunner]) class PresentationCompilerTests extends Specification { def complete(pc:PresentationCompiler)(s:String, i:Int) = { val (st, com) = pc.complete(s, i) (s...
antonkulaga/spark-notebook
test/notebook/PresentationCompilerTests.scala
Scala
apache-2.0
3,438
/* * 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 ...
hortonworks-spark/spark-llap
src/test/scala/com/hortonworks/spark/sql/hive/llap/TestFilterPushdown.scala
Scala
apache-2.0
5,914
/** * Copyright (c) 2013, The National Archives <digitalpreservation@nationalarchives.gov.uk> * http://www.nationalarchives.gov.uk * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozi...
digital-preservation/dali
src/main/scala/uk/gov/tna/dri/preingest/loader/unit/disk/TruecryptedPartitionUnitActor.scala
Scala
mpl-2.0
4,361
class A { class B(val x: Int) def x = 1 def moo() { new B(/* line: 2 */x = 1) } }
ilinum/intellij-scala
testdata/resolve2/bug3/ConstructorNamedParameters.scala
Scala
apache-2.0
95
package is.hail import java.io._ import java.lang.reflect.Method import java.net.{URI, URLClassLoader} import java.security.SecureRandom import java.text.SimpleDateFormat import java.util.{Base64, Date} import java.util.zip.{Deflater, Inflater} import is.hail.annotations.ExtendedOrdering import is.hail.check.Gen impo...
danking/hail
hail/src/main/scala/is/hail/utils/package.scala
Scala
mit
26,460
// AORTA is copyright (C) 2012 Dustin Carlino, Mike Depinet, and Piyush // Khandelwal of UT Austin // License: GNU GPL v2 package utexas.aorta.map.make import scala.collection.mutable import utexas.aorta.map.{Edge, Vertex, Turn, Road} import utexas.aorta.common.{Util, cfg, TurnID, RoadID} class Pass3_Part2(graph: ...
dabreegster/aorta
utexas/aorta/map/make/Pass3_Part2.scala
Scala
gpl-2.0
4,555
//############################################################################ // Bugs //############################################################################ //############################################################################ // Bug 98 object Bug98Test { object MyCase { def name = "mycase" } de...
martijnhoekstra/scala
test/files/run/bugs.scala
Scala
apache-2.0
11,567
package com.ibm.spark.magic import com.ibm.spark.utils.DynamicReflectionSupport import scala.language.dynamics class MagicExecutor(magicLoader: MagicLoader) extends Dynamic { val executeMethod = classOf[Magic].getDeclaredMethods.head.getName def applyDynamic(name: String)(args: Any*): Either[CellMagicOutput, L...
yeghishe/spark-kernel
kernel-api/src/main/scala/com/ibm/spark/magic/MagicExecutor.scala
Scala
apache-2.0
1,168
package nl.soqua.lcpi.repl.lib import nl.soqua.lcpi.ast.lambda.Expression import nl.soqua.lcpi.interpreter.show.Show import nl.soqua.lcpi.interpreter.transformation.Stringify import nl.soqua.lcpi.interpreter.{InterpreterResult, SingleExpressionInterpreterResult, TraceInterpreterResult} trait ExpressionRenderer { i...
kevinvandervlist/lcpi
repl/src/main/scala/nl/soqua/lcpi/repl/lib/ExpressionRenderer.scala
Scala
mit
1,316
/* * 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 ...
shaoxuan-wang/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/plan/rules/logical/CalcRankTransposeRuleTest.scala
Scala
apache-2.0
5,764
package com.mayreh.thankyou import org.scalatest.FlatSpec class GitHubRepoTest extends FlatSpec { it should "parse https github web url" in { assert(GitHubRepo.fromUrl("https://github.com/opt-tech/chronoscala") == Some(GitHubRepo("opt-tech", "chronoscala"))) } it should "parse https github repo url" in { ...
ocadaruma/sbt-thank-you-stars
src/test/scala/com/mayreh/thankyou/GitHubRepoTest.scala
Scala
apache-2.0
872
package chess package format import Pos._ class UciMoveTest extends ChessTest { import pgn.Fixtures._ "piotr encoding" should { "be reflexive" in { val move = UciMove("a2g7").get UciMove piotr move.piotr must_== move.some } } }
psuter/scalachess
src/test/scala/format/UciMoveTest.scala
Scala
mit
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 ...
SHASHANKB/spark
core/src/main/scala/org/apache/spark/serializer/SerializerManager.scala
Scala
apache-2.0
7,954
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
Kegeruneku/rudder
rudder-web/src/main/scala/bootstrap/liftweb/RudderContext.scala
Scala
agpl-3.0
1,871
package com.twitter.querulous.config import com.twitter.querulous._ import com.twitter.querulous.database.DatabaseFactory import com.twitter.querulous.query.QueryFactory import com.twitter.util.Duration import evaluator._ trait AutoDisablingQueryEvaluator { def errorCount: Int def interval: Duration } class Quer...
twitter/querulous
querulous-core/src/main/scala/com/twitter/querulous/config/QueryEvaluator.scala
Scala
apache-2.0
1,716
/* * Copyright (C) 2011 Mathias Doenitz * * 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...
spray/spray-can
spray-can/src/test/scala/cc/spray/can/ResponsePreparerSpec.scala
Scala
apache-2.0
6,588
package org.opencommercesearch.api.controllers /* * Licensed to OpenCommerceSearch under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. OpenCommerceSearch licenses this * file to you under the Apache License, Ve...
madickson/opencommercesearch
opencommercesearch-api/app/org/opencommercesearch/api/controllers/ApiDocController.scala
Scala
apache-2.0
1,053
import scala.quoted.* trait IsExpr[T] { type Underlying def toExpr(x: T): Expr[Underlying] } given [U]: IsExpr[Expr[U]] = new IsExpr[Expr[U]] { type Underlying = U def toExpr(x: Expr[U]): Expr[U] = x } def f(x: Any): String = x.toString def g[T](x: T)(using e: IsExpr[T])(using tu: Type[e.Underlying]): Quote...
dotty-staging/dotty
tests/run-macros/i7048/Lib_1.scala
Scala
apache-2.0
517
package microjson import scala.collection.mutable.ArrayBuffer sealed trait JsValue { def value: Any } case class JsString(value: java.lang.String) extends JsValue case class JsObject(value: Map[String, JsValue]) extends JsValue case class JsArray(value: Seq[JsValue]) extends JsValue case class JsNumber(value: ...
benhutchison/MicroJson
shared/src/main/scala/microjson/Js.scala
Scala
apache-2.0
11,583
package org.jetbrains.plugins.scala package lang package refactoring package namesSuggester package genericTypes import org.jetbrains.plugins.scala.lang.psi.types.ScType import org.jetbrains.plugins.scala.lang.psi.types.api.ParameterizedType /** * @author adkozlov */ class MonadicTypeNamesProvider extends Generic...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/refactoring/namesSuggester/genericTypes/MonadicTypeNamesProvider.scala
Scala
apache-2.0
1,152
/* * Copyright (C) 2013 FURYU CORPORATION * * 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 License, or (at your option) any later version. * * This li...
Furyu/play-c3p0-plugin
project/Build.scala
Scala
lgpl-2.1
3,045
package scife package enumeration package showcase import dependent._ import memoization._ import scife.{ enumeration => e } import scife.util._ import structures._ import BSTrees._ import scife.util.logging._ import scala.language.existentials import scala.language.implicitConversions import org.scalatest._ impor...
kaptoxic/SciFe
src/test/scala/scife/enumeration/showcase/PedagogicalExample.scala
Scala
gpl-2.0
3,347
package im.tox.antox.data import java.util import java.util.ArrayList import android.content.{ContentValues, Context} import android.database.sqlite.{SQLiteDatabase, SQLiteOpenHelper} //remove if not needed class UserDB(ctx: Context) extends SQLiteOpenHelper(ctx, "userdb", null, 1) { private var CREATE_TABLE_USE...
0xPoly/Antox
app/src/main/scala/im/tox/antox/data/UserDB.scala
Scala
gpl-3.0
2,876
/* * 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 ...
sgururajshetty/carbondata
store/search/src/main/scala/org/apache/spark/rpc/Master.scala
Scala
apache-2.0
11,621
/* * 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
sql/core/src/main/scala/org/apache/spark/sql/execution/Exchange.scala
Scala
apache-2.0
12,906
package com.sircamp.algorithms.clustering import org.apache.spark.mllib.clustering.{BisectingKMeans, BisectingKMeansModel, KMeans, KMeansModel} import org.apache.spark.rdd.RDD import org.apache.spark.mllib.linalg.Vector /** * Created by stefano on 29/01/17. */ object ClusteringKmeansBuilder { def buildKmean...
sirCamp/mushrooms-ml-classfier-scala-spark
src/main/scala/com/sircamp/algorithms/clustering/ClusteringKmeansBuilder.scala
Scala
mit
655
package com.github.sorhus.webalytics.cruft.model import com.github.sorhus.webalytics.akka.event._ import com.github.sorhus.webalytics.model._ import com.github.sorhus.webalytics.cruft.redis.RedisMetaDao import scala.collection.mutable import scala.concurrent.{ExecutionContext, Future} trait MetaDao { def addMeta(...
sorhus/webalytics
service/src/main/scala/com/github/sorhus/webalytics/cruft/model/MetaDao.scala
Scala
gpl-3.0
1,786
package blended.security.ssl import java.math.BigInteger import java.security.cert.X509Certificate import blended.testsupport.scalatest.LoggingFreeSpec import org.scalacheck.Gen import org.scalatest.matchers.should.Matchers import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks class SelfSignedProviderSpec ext...
woq-blended/blended
blended.security.ssl/src/test/scala/blended/security/ssl/SelfSignedProviderSpec.scala
Scala
apache-2.0
2,571
package com.avsystem.commons package redis.commands import com.avsystem.commons.redis._ import com.avsystem.commons.redis.protocol.{ArrayMsg, ErrorMsg, NullArrayMsg, RedisMsg} trait TransactionApi extends ApiSubset { /** Executes [[http://redis.io/commands/watch WATCH]] */ def watch(key: Key, keys: Key*): Result[...
AVSystem/scala-commons
commons-redis/src/main/scala/com/avsystem/commons/redis/commands/transactions.scala
Scala
mit
2,135
package forcomp import org.scalatest.FunSuite import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import Anagrams._ @RunWith(classOf[JUnitRunner])class AnagramsSuite extends FunSuite { test("wordOccurrences: abcd") { val p = wordOccurrences("abcd"); println(p); assert(wordOccurrenc...
samsol/FunProg-scala
forcomp/src/test/scala/forcomp/AnagramsSuite.scala
Scala
agpl-3.0
4,398
sealed trait WC case class Stub(chars: String) extends WC case class Part(lStub: String, words: Int, rStub: String) extends WC val wcMonoid: Monoid[WC] = new Monoid[WC] { // The empty result, where we haven't seen any characters yet. val zero = Stub("") def op(a: WC, b: WC) = (a, b) match { case (Stub(c), S...
ShokuninSan/fpinscala
answerkey/monoids/11.answer.scala
Scala
mit
573
/** * Copyright (C) 2016 Verizon. 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 law o...
Verizon/trapezium
framework/src/test/scala/org/apache/spark/util/TestUtils.scala
Scala
apache-2.0
1,688
package org.akoshterek.backgammon.nn.encog.activation import org.encog.engine.network.activation.ActivationFunction import org.encog.util.obj.ActivationUtil /** * Created by Alex on 20-05-17. */ @SerialVersionUID(1L) class ActivationLeakingRelu(thresholdHigh: Double, thresholdLow: Double, high: Double, low: Doubl...
akoshterek/MultiGammonJava
multi-gammon-core/src/main/java/org/akoshterek/backgammon/nn/encog/activation/ActivationLeakingRelu.scala
Scala
gpl-3.0
2,113
/* * 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/keras/nn/MaxPooling2DSpec.scala
Scala
apache-2.0
3,465
package effectful.impl import effectful._ import cats._ import scala.collection.generic.CanBuildFrom object EffectIteratorOps { def collect[E[_],A,M[_]](ea: EffectIterator[E,A])(implicit cbf:CanBuildFrom[Nothing,A,M[A]]) : E[M[A]] = { import ea._ import Monad.ops._ val builder = cbf() for { ...
lancegatlin/effectful-demo
src/main/scala/effectful/impl/EffectIteratorOps.scala
Scala
mit
4,835
package examples.custom_command import com.coldcore.akkaftp.ftp.core.{FtpState, Session} import com.coldcore.akkaftp.ftp.command.{DefaultCommandFactory, Reply, Command} import java.text.SimpleDateFormat import java.util.Date import akka.actor.ActorSystem import com.coldcore.akkaftp.{Settings, Launcher} case ...
2nolife/akka-ftp
examples/custom-command/scala/custom-command.scala
Scala
lgpl-3.0
2,139
/** * Copyright 2015 Thomson Reuters * * Licensed under the Apache License, Version 2.0 (the β€œLicense”); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
nruppin/CM-Well
server/cmwell-zstore/src/main/scala/cmwell/zstore/ZStore.scala
Scala
apache-2.0
11,330
object Test { "" match { case Unapply(a, b) => a: Int b: String case UnapplySeq(a, b1, b2) => a: Int b1: String b2: String } } // These used to fail `too many patterns` under -Ymacro-expand:discard
loskutov/intellij-scala
testdata/scalacTests/macros/t8934a/Test_2.scala
Scala
apache-2.0
240
package com.geeksville.mavlink import java.net._ import org.mavlink.messages.MAVLinkMessage import org.mavlink.messages.MAVLinkMessageFactory import org.mavlink.IMAVLinkMessage import com.geeksville.util.ThreadTools import com.geeksville.akka.InstrumentedActor import akka.actor.PoisonPill /** * published on our even...
geeksville/arduleader
common/src/main/scala/com/geeksville/mavlink/MavlinkUDP.scala
Scala
gpl-3.0
2,984
/* * 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/modules/AddBias_CUDA_Baseline.scala
Scala
apache-2.0
8,990
package org.nkvoll.javabin.routing import akka.actor._ import akka.util.Timeout import nl.grons.metrics.scala.Timer import org.nkvoll.javabin.models.User import org.nkvoll.javabin.routing.directives.{ PermissionDirectives, MetricDirectives, ClusterDirectives, AuthDirectives } import org.nkvoll.javabin.routing.helpers....
nkvoll/javabin-rest-on-akka
src/main/scala/org/nkvoll/javabin/routing/ApiV0Routing.scala
Scala
mit
3,545
package scala.tools package testing import org.junit.Assert import Assert._ import scala.runtime.ScalaRunTime.stringOf import scala.collection.{ GenIterable, IterableLike } import scala.collection.JavaConverters._ import scala.collection.mutable import java.lang.ref._ import java.lang.reflect._ import java.util.Identi...
jvican/scala
test/junit/scala/tools/testing/AssertUtil.scala
Scala
bsd-3-clause
3,220
/* * Copyright 2011-2018 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 applic...
wiacekm/gatling
gatling-core/src/test/scala/io/gatling/core/action/ExitSpec.scala
Scala
apache-2.0
1,315
package notebook.front.widgets.magic trait ExtraMagicImplicits { }
dragos/spark-notebook
modules/common/src/main/pre-df/magic.scala
Scala
apache-2.0
67
package net.bhardy.braintree.scala import net.bhardy.braintree.scala.util.NodeWrapper import net.bhardy.braintree.scala.CreditCard._ import net.bhardy.braintree.scala.CreditCards.CardType sealed abstract class CustomerLocation(override val toString:String) object CustomerLocation { case object INTERNATIONAL extends...
benhardy/braintree-scala
src/main/scala/CreditCard.scala
Scala
mit
3,047
import sbt.Keys._ import sbt._ import pl.project13.scala.sbt.JmhPlugin import sbtunidoc.Plugin.unidocSettings import scoverage.ScoverageSbtPlugin object Util extends Build { val branch = Process("git" :: "rev-parse" :: "--abbrev-ref" :: "HEAD" :: Nil).!!.trim val suffix = if (branch == "master") "" else "-SNAPSHOT...
travisbrown/util
project/Build.scala
Scala
apache-2.0
12,128
package dotty.tools.dotc.config import PathResolver.Defaults class ScalaSettings extends Settings.SettingGroup { protected def defaultClasspath = sys.env.getOrElse("CLASSPATH", ".") /** Path related settings. */ val bootclasspath = PathSetting("-bootclasspath", "Override location of bootstrap class files."...
densh/dotty
src/dotty/tools/dotc/config/ScalaSettings.scala
Scala
bsd-3-clause
18,178
package controllers import java.util.{Date, UUID} import javax.inject.{Inject, Singleton} import akka.stream.Materializer import akka.stream.scaladsl.{FileIO, Sink} import akka.util.ByteString import models._ import net.fortuna.ical4j.model.property.Uid import net.fortuna.ical4j.model.{Calendar, Dur} import org.joda....
soniCaH/footbalisto-api
app/controllers/ApiController.scala
Scala
apache-2.0
9,810
package model.pokedex import org.scalatest.{FlatSpec, Matchers} /** * Created by salim on 12/09/2016. */ class MonsterSpec extends FlatSpec with Matchers { }
salimfadhley/scalamoo
src/test/scala/model/pokedex/MonsterSpec.scala
Scala
mit
165
/* * 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 ...
caneGuy/spark
core/src/test/scala/org/apache/spark/scheduler/SparkListenerSuite.scala
Scala
apache-2.0
25,500
/* * 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...
akara/squbs
squbs-httpclient/src/test/scala/org/squbs/httpclient/ClientConfigurationSpec.scala
Scala
apache-2.0
7,584
package im.actor.server.model.presences import org.joda.time.DateTime @SerialVersionUID(1L) case class UserPresence(userId: Int, authId: Long, lastSeenAt: Option[DateTime])
EaglesoftZJ/actor-platform
actor-server/actor-models/src/main/scala/im/actor/server/model/presences/UserPresence.scala
Scala
agpl-3.0
175
/* * 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
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaSourceRDD.scala
Scala
apache-2.0
6,235
package wallet import org.springframework.context.annotation.Configuration import org.springframework.boot.autoconfigure.EnableAutoConfiguration import org.springframework.context.annotation.ComponentScan import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.Respo...
meghanagogi/DigitalWallet
src/main/scala/wallet/IDCard.scala
Scala
mit
1,081
package json import org.apache.spark._ import org.apache.spark.sql._ object SparkJSON { def main(args: Array[String]) { // generate our Spark job's configuration val conf = new SparkConf().setAppName("Spark JSON").setMaster("local[1]") val spark = new SparkContext(conf) // all ...
chivesrs/spark-demo
src/main/scala/json/SparkJSON.scala
Scala
gpl-3.0
1,066
package net.shift.server.http import java.net.URLDecoder import java.nio.ByteBuffer import scala.util.Try import net.shift.common.{BinReader, LogBuilder, Path, ShiftParsers} import net.shift.io.{IO, LocalFileSystem} import net.shift.io.IO._ class HttpParser extends ShiftParsers { private val log = LogBuilder.log...
mariusdanciu/shift
shift-server/src/main/scala/net/shift/server/http/HttpParser.scala
Scala
apache-2.0
3,296
package com.googlecode.kanbanik.commands import com.googlecode.kanbanik.builders.ProjectBuilder import scala.collection.JavaConversions._ import com.googlecode.kanbanik.model.Board import org.bson.types.ObjectId import com.googlecode.kanbanik.dtos.{ErrorDto, ProjectDto} class SaveProjectCommand extends Command[Project...
mortenpoulsen/kanbanik
kanbanik-server/src/main/scala/com/googlecode/kanbanik/commands/SaveProjectCommand.scala
Scala
apache-2.0
1,020
package io.dylemma.spac import io.dylemma.spac.impl.{SplitterByConsecutiveMatches, SplitterByContextMatch, SplitterByInputMatch, SplitterJoiner} /** Primary "spac" abstraction that acts as a selector for sub-streams within a single input stream. * * A "sub-stream" is some series of consecutive values from the ori...
dylemma/xml-stream
core/src/main/scala/io/dylemma/spac/Splitter.scala
Scala
mit
9,568
/* * 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 ...
hengyicai/OnlineAggregationUCAS
core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala
Scala
apache-2.0
5,943
package net.selenate.server import akka.util.Timeout import com.typesafe.config.{ Config, ConfigFactory, ConfigParseOptions, ConfigSyntax } import java.io.File import net.selenate.common.exceptions.SeException import scala.concurrent.duration.{ Duration, FiniteDuration } trait CBase { val configOverride = sys.props...
tferega/selenate
code/Server/src/main/scala/net/selenate/server/CUtils.scala
Scala
bsd-3-clause
3,021
/* * Copyright 2010 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...
loiane/Potigol
src/com/twitter/io/StreamIO.scala
Scala
gpl-2.0
1,474
package skinny.controller.feature import org.scalatra.test.scalatest.ScalatraFlatSpec import skinny._ import skinny.controller.SkinnyController class FormParamsFeatureSpec extends ScalatraFlatSpec { behavior of "FormParamsFeature" class Controller extends SkinnyController { def single = formParams.getAs[Stri...
skinny-framework/skinny-framework
framework/src/test/scala/skinny/controller/feature/FormParamsFeatureSpec.scala
Scala
mit
1,534