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 ner import text.StringOption /** * @author K.Sakamoto * Created on 2015/11/26 */ object NamedEntityRecognizerForWorldHistory extends NamedEntityRecognizer { override def recognize(textOpt: StringOption): Seq[NamedEntity] = { NamedEntityRecognizerInGlossary.recognize(textOpt).toList ::: ...
ktr-skmt/FelisCatusZero
src/main/scala/ner/NamedEntityRecognizerForWorldHistory.scala
Scala
apache-2.0
600
package com.aesireanempire.eplus.gui.elements import com.aesireanempire.eplus.GUIAdvEnchantment import net.minecraft.client.gui.GuiButton import net.minecraft.util.ResourceLocation class ScrollBar(posX: Int, posY: Int, width: Int, height: Int, texture: ResourceLocation, screen: GUIAdvEnchantment) exte...
darkhax/EnchantingPlus-Scala
src/main/scala/com/aesireanempire/eplus/gui/elements/ScrollBar.scala
Scala
lgpl-3.0
2,386
/* * 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 ...
tophua/spark1.52
external/kafka/src/test/scala/org/apache/spark/streaming/kafka/DirectKafkaStreamSuite.scala
Scala
apache-2.0
19,261
package rwsscala.ichiba import org.specs2._, matcher.DataTables class ShipOverseaSpec extends Specification with DataTables { def is = "ShipOversea" ^ "param" ...
nisshiee/rws-scala
core/src/test/scala/core/ichiba/request/ShipOverseaSpec.scala
Scala
mit
1,764
package io.github.hbase4s import io.github.hbase4s.utils.HBaseImplicitUtils.asBytes import org.scalatest.{FlatSpec, Matchers} /** * Created by Volodymyr.Glushak on 23/05/2017. */ class WrappedResultTest extends FlatSpec with Matchers { "It" should "produce correct results" in { val data = List( Field...
hbase4s/hbase4s
src/test/scala/io/github/hbase4s/WrappedResultTest.scala
Scala
mit
996
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
andrewor14/iolap
mllib/src/main/scala/org/apache/spark/ml/feature/VectorIndexer.scala
Scala
apache-2.0
17,462
/* * Copyright © 2015 Reactific Software LLC. All Rights Reserved. * * 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 us...
reactific/RxMongo
messages/src/main/scala/rxmongo/messages/cmds/DiagnosticCommands.scala
Scala
mit
8,075
package special import org.apache.spark.rdd.RDD import org.apache.spark.{Partitioner, SparkContext, SparkConf} // This gives is access to the PairRDDFunctions import org.apache.spark.SparkContext._ import scala.collection.{mutable, Iterator} // Partition a pair RDD with an integer key with the given // partition co...
spirom/LearningSpark
src/main/scala/special/PairRDD.scala
Scala
mit
3,192
/* * 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/aggregate/HashAggregateExec.scala
Scala
apache-2.0
46,130
package com.github.jeanadrien.evrythng.scala.json /** * { * "day": Integer, * "month": Integer, * "year": Integer * } */ case class Birthday( day : Int, month : Int, year : Option[Int] = None )
jeanadrien/evrythng-scala-sdk
src/main/scala/com/github/jeanadrien/evrythng/scala/json/Birthday.scala
Scala
apache-2.0
228
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://www.scala-lang.org/ ** ** /____/\\___/_/...
cran/rkafkajars
java/scala/xml/dtd/ValidationException.scala
Scala
apache-2.0
1,642
package corescala import org.specs2.mutable.Specification class AlunoDAOSpec extends Specification { "o dao de alunos" >> { val alunoDAO = new AlunoDAO "retornar None se o aluno para o email especificado nao existir" >> { alunoDAO.findAlunoByEmail("test@globalcode.com") must_== None } "retor...
claudioed/scala-bootcamp
cs1-lab07/src/test/scala/corescala/AlunoDAOSpec.scala
Scala
apache-2.0
593
package org.jetbrains.plugins.scala package lang package psi package stubs package elements import com.intellij.lang.ASTNode import com.intellij.psi.PsiElement import com.intellij.psi.stubs.{StubElement, StubInputStream, StubOutputStream} import org.jetbrains.plugins.scala.lang.psi.api.base.ScAccessModifier import org...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/ScAccessModifierElementType.scala
Scala
apache-2.0
1,799
package io.cumulus.services import io.cumulus.Settings import io.cumulus.persistence.query.{QueryE, QueryRunner} import io.cumulus.persistence.query.QueryRunner._ import io.cumulus.persistence.query.QueryE._ import io.cumulus.validation.AppError import io.cumulus.models.user.session.UserSession import io.cumulus.model...
Cumulus-Cloud/cumulus
server/cumulus-core/src/main/scala/io/cumulus/services/UserService.scala
Scala
mit
9,117
/** * Generated by Scrooge * version: 4.7.0 * rev: d9d56174937f524a1981b38ebd6280eef7eeda4a * built at: 20160427-121531 */ package com.komanov.serialization.domain.thriftscala import com.twitter.scrooge.{ LazyTProtocol, TFieldBlob, ThriftException, ThriftStruct, ThriftStructCodec3, ThriftStructFieldInfo...
dkomanov/scala-serialization
scala-serialization/src/main/scala/com/komanov/serialization/domain/thriftscala/BlogComponentDataSetPb.scala
Scala
mit
23,202
// Copyright (c) 2013, Johns Hopkins University. All rights reserved. // This software is released under the 2-clause BSD license. // See /LICENSE.txt // Travis Wolfe, twolfe18@gmail.com, 30 July 2013 package edu.jhu.hlt.parma.inference import edu.jhu.hlt.parma.types._ import edu.jhu.hlt.parma.util._ import edu.jhu....
hltcoe/parma
src/main/scala/edu/jhu/hlt/parma/inference/FeatureFunctionRefiner.scala
Scala
bsd-2-clause
4,132
object Test extends App { case class AnnotationInfo(a: String, b: Int) extends Product2[String, Int] { def _1 = a def _2 = b } // if we're not careful in unapplyTypeListFromReturnType, the generated unapply is // thought to return two components instead of one, since AnnotationInfo (the result of the u...
som-snytt/dotty
tests/pending/run/virtpatmat_extends_product.scala
Scala
apache-2.0
487
package org.web3scala.protocol import org.web3scala.model._ trait Ethereum { /** Returns current client version */ def web3ClientVersion: Either[Error, Response] /** Returns asynchronously current client version */ def asyncWeb3ClientVersion: AsyncResponse /** Returns Keccak-256 (not the standardized SHA...
web3scala/web3scala
src/main/scala/org/web3scala/protocol/Ethereum.scala
Scala
apache-2.0
16,482
// scalac: -Xfatal-warnings // import scala.annotation.switch class Test { def unreachable(ch: Char) = (ch: @switch) match { case 'a' => println("b") // ok case 'a' => println("b") // unreachable case 'c' => } }
martijnhoekstra/scala
test/files/neg/t5830.scala
Scala
apache-2.0
229
package org.deepdive.inference import akka.actor._ import akka.actor.SupervisorStrategy._ import akka.pattern.{ask, pipe} import akka.util.Timeout import java.io.File import org.deepdive.TaskManager import org.deepdive.calibration._ import org.deepdive.settings.{FactorDesc, VariableDataType} import org.deepdive.Contex...
feiranwang/deepdive
src/main/scala/org/deepdive/inference/InferenceManager.scala
Scala
apache-2.0
7,780
class BCPIntegerOrIntegerTest { def m(): Unit = { val a = 4 val b = a | 11 } }
jean-andre-gauthier/scalasca
src/test/scala/lara/epfl/scalasca/tests/unit/executables/blockconstantpropagation/BlockConstantPropagationIntegerOrIntegerTest.scala
Scala
bsd-3-clause
84
/* * 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 ...
ioana-delaney/spark
sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
Scala
apache-2.0
85,118
/* * Copyright (C) 2016 Original Work Benjamin Finley * * This file is part of ReSurfAlt. * * ReSurfAlt 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 op...
finleyb/ReSurfAlt
src/main/scala/com/resurf/strategies/ReSurf.scala
Scala
gpl-2.0
5,063
/* * 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 ...
bOOm-X/spark
core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala
Scala
apache-2.0
21,238
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * 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 * * https://www.apache.org/licenses/LICENSE...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/compendium/monster/SubRace.scala
Scala
apache-2.0
989
package org.bitcoins.core.protocol import org.bitcoins.core.config.NetworkParameters import org.bitcoins.core.protocol.script.ScriptPubKey import scala.util.{Failure, Success, Try} abstract class AddressFactory[T] { /** Attempts to create an address from the given String */ def fromString(str: String): Try[T] ...
bitcoin-s/bitcoin-s-core
core/src/main/scala/org/bitcoins/core/protocol/AddressFactory.scala
Scala
mit
905
package com.wavesplatform.state.diffs.ci.sync import com.wavesplatform.account.Address import com.wavesplatform.db.WithDomain import com.wavesplatform.db.WithState.AddrWithBalance import com.wavesplatform.features.BlockchainFeatures._ import com.wavesplatform.lang.directives.values.V5 import com.wavesplatform.lang.scr...
wavesplatform/Waves
node/src/test/scala/com/wavesplatform/state/diffs/ci/sync/SyncDAppBurnBalanceCheckTest.scala
Scala
mit
3,189
/* * Copyright (c) 2019 Georgios Andreadakis * * 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...
GeorgiosAndreadakis/TextAnalyzerPlatform
domain/src/main/scala/org/tap/domain/DepthFirstElementsOrder.scala
Scala
apache-2.0
1,817
/* * cramersv.scala * author: RJ Nowling <rnowling@redhat.com> * * Copyright (c) 2016 Red Hat, 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...
willb/silex
src/test/scala/com/redhat/et/silex/statistics/cramsersv.scala
Scala
apache-2.0
2,486
package dk.tennis.compare.rating.multiskill.model.perfdiff.skillsfactor.cov.surface import dk.tennis.compare.rating.multiskill.model.perfdiff.skillsfactor.cov.CovFunc import dk.tennis.compare.rating.multiskill.model.perfdiff.Player import dk.tennis.compare.rating.multiskill.model.perfdiff.skillsfactor.cov.opponent.Pla...
danielkorzekwa/tennis-player-compare
multiskill/src/main/scala/dk/tennis/compare/rating/multiskill/model/perfdiff/skillsfactor/cov/surface/SurfaceCovFunc.scala
Scala
bsd-2-clause
2,486
import org.specs._ import com.redis._ import org.specs.mock.Mockito import org.mockito.Mock._ import org.mockito.Mockito._ import org.mockito.Mockito.doNothing object KeySpaceOperationsSpec extends Specification with Mockito { "Redis Client Key Operations" should { var client: RedisTestClient = null var co...
baroquebobcat/pubsubhubbub-rb
vendor/redis-1.02/client-libraries/scala/src/test/scala/com/redis/operations/KeySpaceOperationsSpec.scala
Scala
apache-2.0
1,398
sealed trait List[+A] case object Nil extends List[Nothing] case class Cons[+A](head: A, tail: List[A]) extends List[A] object List { def sum(ints: List[Int]): Int = ints match { case Nil => 0 case Cons(x, xs) => x + sum(xs) } def product(ds: List[Double]): Double = ds match { case Nil => 0.0 ...
maxspencer/fp-in-scala
ch3-lists.scala
Scala
mit
5,884
/* * Copyright 2020 Precog Data * * 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 ...
djspiewak/quasar
impl/src/main/scala/quasar/impl/external/ClassPath.scala
Scala
apache-2.0
1,051
package synthesis import org.scalatest._ class PASynthesisTest extends FunSpec with Matchers { import PASynthesis._ def O(name: String) = PASynthesis.OutputVar(name) def I(name: String) = PASynthesis.InputVar(name) implicit def OutputVarToPACombination(o: OutputVar):PACombination = PACombination(o) implicit...
epfl-lara/comfusy
src/test/scala/PASynthesisTest.scala
Scala
bsd-2-clause
15,055
package com.krux.hyperion.activity import com.krux.hyperion.HyperionContext import com.krux.hyperion.aws.AdpEmrActivity import com.krux.hyperion.common.{SparkCommandRunner, PipelineObjectId, BaseFields} import com.krux.hyperion.datanode.S3DataNode import com.krux.hyperion.expression.RunnableObject import com.krux.hype...
hoangelos/hyperion
core/src/main/scala/com/krux/hyperion/activity/SparkActivity.scala
Scala
apache-2.0
3,222
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.scalajs.js import scala.scalajs...
nicolasstucki/scala-js
library/src/main/scala-old-collections/scala/scalajs/js/WrappedDictionary.scala
Scala
apache-2.0
4,219
package org.qy.test /** * Created by tuyou006 on 2017/6/8. */ object PropertyUtil { }
7u/spark-learning
spark.learning/spark_test/src/main/scala/org/qy/test/PropertyUtil.scala
Scala
apache-2.0
100
/* * Copyright (C) 2015 Hugo Freire Gil * * 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 2 * of the License, or (at your option) any later version. * */ package com.aba...
TLmaK0/avl-crrcsim-editor
src/main/scala/com/abajar/crrcsimeditor/swt/dsl/TablePropertyEditor.scala
Scala
gpl-2.0
1,707
package com.socrata.datacoordinator.service.collocation import java.util.UUID import com.socrata.datacoordinator.common.collocation.CollocationLockTimeout import com.socrata.datacoordinator.collocation.TestData import com.socrata.datacoordinator.common.collocation.CollocationLock import com.socrata.datacoordinator.id...
socrata-platform/data-coordinator
coordinator/src/test/scala/com/socrata/datacoordinator/service/collocation/CoordinatedCollocatorTest.scala
Scala
apache-2.0
32,287
package com.taig.tmpltr.markup import com.taig.tmpltr._ import play.api.mvc.Content trait details extends Tag.Body[details, Content] { val tag = "details" }
Taig/Play-Tmpltr
app/com/taig/tmpltr/markup/details.scala
Scala
mit
160
package com.twitter.node_registry import org.specs._ import org.specs.util.Duration import scala.collection._ class TestStore extends Store { val nodes: mutable.Map[String, String] = mutable.Map() override def registerNode(host: String, port: Int, data: String) { nodes.synchronized { nodes + ("%s:%d".fo...
imownbey/Node-Registry
src/test/scala/com/twitter/node_registry/NodeRegistrySpec.scala
Scala
apache-2.0
2,035
/* * 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 ...
HuaweiBigData/carbondata
integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala
Scala
apache-2.0
35,539
package blended.security import java.io.File import blended.testsupport.BlendedTestSupport class ConfigLoginSpec extends AbstractLoginSpec { override val baseDir : String = new File(BlendedTestSupport.projectTestOutput, "simple").getAbsolutePath() "The Simple Login Module should" - { "allow a user to logi...
woq-blended/blended
blended.security.test/src/test/scala/blended/security/ConfigLoginSpec.scala
Scala
apache-2.0
945
package scala.quoted package matching /** Value sequence of value expressions */ object ValueSeq { /** Matches literal sequence of literal constant value expressions and return a sequence of values. * * Usage: * ```scala * inline def sum(args: Int*): Int = ${ sumExpr('args) } * def sumExpr(argsEx...
som-snytt/dotty
library/src/scala/quoted/matching/ValueSeq.scala
Scala
apache-2.0
765
/* * 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...
i8run/BigDL-1
spark/dl/src/test/scala/com/intel/analytics/bigdl/nn/mkldnn/FusionSpec.scala
Scala
apache-2.0
15,614
object blockescapesNeg { def m0 = { object Foo { class Bar { val field = 2 }} ; new Foo.Bar } m0.field class A[T] def m1 = { val x = 1; new A[x.type]} }
yusuke2255/dotty
tests/neg/blockescapesNeg.scala
Scala
bsd-3-clause
161
package mesosphere.marathon.core.task.bus import java.util.UUID import mesosphere.mesos.protos.TaskID import org.apache.mesos.Protos.{ TaskState, TaskStatus } object MarathonTaskStatusTestHelper { def mesosStatus(state: TaskState, maybeHealthy: Option[Boolean] = None): TaskStatus = { import mesosphere.mesos.pr...
ss75710541/marathon
src/test/scala/mesosphere/marathon/core/task/bus/MarathonTaskStatusTestHelper.scala
Scala
apache-2.0
1,494
/*********************************************************************** * Copyright (c) 2013-2020 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
aheyne/geomesa
geomesa-accumulo/geomesa-accumulo-tools/src/main/scala/org/locationtech/geomesa/accumulo/tools/export/AccumuloExplainCommand.scala
Scala
apache-2.0
1,256
/** * Copyright (C) 2010 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...
evlist/orbeon-forms
src/main/scala/org/orbeon/oxf/processor/xinclude/XIncludeProcessor.scala
Scala
lgpl-2.1
6,305
package com.twitter.finagle.postgresql.transport import java.nio.ByteBuffer import java.nio.ByteOrder import com.twitter.finagle.postgresql.PropertiesSpec import com.twitter.finagle.postgresql.Types.Format import com.twitter.finagle.postgresql.Types.Inet import com.twitter.finagle.postgresql.Types.Name import com.twit...
twitter/finagle
finagle-postgresql/src/test/scala/com/twitter/finagle/postgresql/transport/PgBufSpec.scala
Scala
apache-2.0
7,379
/* Copyright (C) 2008-2014 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
hlin117/factorie
src/main/scala/cc/factorie/app/topics/lda/TaggedLDA.scala
Scala
apache-2.0
3,872
/* * 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/catalyst/catalog/InMemoryCatalog.scala
Scala
apache-2.0
23,276
package im.tox.antox.wrapper class FriendRequest(val requestKey: String, val requestMessage: String) { }
Ansa89/Antox
app/src/main/scala/im/tox/antox/wrapper/FriendRequest.scala
Scala
gpl-3.0
107
package models import com.vividsolutions.jts.geom.{Coordinate, GeometryFactory, Point, PrecisionModel} import play.api.libs.json._ import play.api.libs.json.Reads._ import play.api.libs.functional.syntax._ case class User(id: Int, username: String, password: String) object User { implicit val userWrites = new Writ...
acrisci/hikerplaces.org
app/models/Models.scala
Scala
mit
1,979
package rere.ql.values import rere.ql.options.Options import rere.ql.ql2.Term.TermType import rere.ql.types.{ReqlPoint, ReqlPolygon} class ReqlPolygonQuery(point1: ReqlPoint, point2: ReqlPoint, point3: ReqlPoint, otherPoints: ReqlPoint*) extends ReqlPolygon { val command = TermType.POLYGON val string = "polygon" ...
pbaun/rere
modules/ql/src/main/scala/rere/ql/values/ReqlPolygonQuery.scala
Scala
apache-2.0
419
package nodes.learning import scala.collection.mutable.HashMap import scala.reflect.ClassTag import breeze.linalg._ import org.apache.spark.rdd.RDD import utils.{MatrixUtils, Stats} import workflow.{Transformer, LabelEstimator} /** * Defines a wrapper to access elements of a symmetric distributed * matrix that ...
tomerk/keystone
src/main/scala/nodes/learning/KernelMatrix.scala
Scala
apache-2.0
2,490
package models import nl.tudelft.ec2interface.taskmonitor._ object Task { case class Task(taskId: String, job: Any, taskInfo: String) case class TaskResult(taskId: String, result: Any, taskInfo: String) }
jhejderup/Awsseract
awsseract-frontend/app/models/Task.scala
Scala
apache-2.0
212
package io.udash.web.guide.views.rpc.demos import io.udash._ import io.udash.bootstrap.button.UdashButton import io.udash.bootstrap.utils.BootstrapStyles.Color import io.udash.web.commons.views.Component import io.udash.web.guide.Context import io.udash.web.guide.demos.rpc.PingClient import io.udash.web.guide.styles.p...
UdashFramework/udash-guide
guide/src/main/scala/io/udash/web/guide/views/rpc/demos/PingPongPushDemoComponent.scala
Scala
gpl-3.0
1,934
/* * 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 ...
tophua/spark1.52
sql/core/src/main/scala/org/apache/spark/sql/expressions/udaf.scala
Scala
apache-2.0
6,389
/******************************************************************************* * Copyright (c) 2014 Guillaume DUBUISSON DUPLESSIS <guillaume.dubuisson_duplessis@insa-rouen.fr>. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * ...
GuillaumeDD/scala99problems
src/main/scala/binaryTree/P67/sol01.scala
Scala
gpl-3.0
2,110
package com.twitter.finagle.redis.integration import com.twitter.finagle.redis.protocol.{Limit, ZInterval} import com.twitter.finagle.redis.naggati.RedisClientTest import com.twitter.finagle.redis.tags.{ClientTest, RedisTest} import com.twitter.finagle.redis.util.CBToString import com.twitter.util.Await import org.jun...
sveinnfannar/finagle
finagle-redis/src/test/scala/com/twitter/finagle/redis/commands/sorted-set/SortedSetClientIntegrationSuite.scala
Scala
apache-2.0
6,643
package jp.modal.soul.soylatteart /** * Created by imae on 2015/12/17. */ trait Monitor { def sampling(target: Target): SamplingData }
modalsoul/SoyLatteArt
src/main/scala/jp/modal/soul/soylatteart/Monitor.scala
Scala
mit
140
package com.shorrockin.cascal.session import org.apache.commons.pool.PoolableObjectFactory import org.apache.commons.pool.impl.{GenericObjectPoolFactory, GenericObjectPool} import com.shorrockin.cascal.utils.Logging import com.shorrockin.cascal.jmx.CascalStatistics import com.shorrockin.cascal.model._ /** * a sessi...
shorrockin/cascal
src/main/scala/com/shorrockin/cascal/session/SessionPool.scala
Scala
apache-2.0
10,787
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
gioenn/xSpark
core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
Scala
apache-2.0
34,273
package com.twitter.finagle import com.twitter.finagle.stats.DefaultStatsReceiver import com.twitter.finagle.toggle.{StandardToggleMap, ToggleMap} package object http { /** * The name of the finagle-http [[ToggleMap]]. */ private val LibraryName: String = "com.twitter.finagle.http" /** * The [[To...
luciferous/finagle
finagle-base-http/src/main/scala/com/twitter/finagle/package.scala
Scala
apache-2.0
462
package benchmarks.lattices.delta.crdt import org.openjdk.jmh.annotations._ import rescala.extra.lattices.delta.crdt.reactive.RGA import java.util.concurrent.TimeUnit @BenchmarkMode(Array(Mode.Throughput)) @OutputTimeUnit(TimeUnit.MILLISECONDS) @Warmup(iterations = 3, time = 1000, timeUnit = TimeUnit.MILLISECONDS) @...
guidosalva/REScala
Code/Microbenchmarks/src/main/scala/benchmarks/lattices/delta/crdt/RGABench.scala
Scala
apache-2.0
1,565
package im.actor.server.api.rpc.service import im.actor.api.rpc._ import im.actor.api.rpc.configs._ import im.actor.api.rpc.misc.ResponseSeq import im.actor.server.user.{ UserProcessorRegion, UserOffice } import im.actor.server.{ ImplicitUserRegions, ImplicitSessionRegionProxy, BaseAppSuite } import im.actor.server.ap...
chieryw/actor-platform
actor-server/actor-tests/src/test/scala/im/actor/server/api/rpc/service/ConfigsServiceSpec.scala
Scala
mit
1,939
package org.jetbrains.plugins.scala package debugger.evaluateExpression import org.jetbrains.plugins.scala.debugger.{ScalaDebuggerTestCase, ScalaVersion_2_11, ScalaVersion_2_12} /** * Nikolay.Tropin * 8/2/13 */ class InAnonFunEvaluationTest extends InAnonFunEvaluationTestBase with ScalaVersion_2_11 class InAnonF...
whorbowicz/intellij-scala
test/org/jetbrains/plugins/scala/debugger/evaluateExpression/InAnonFunEvaluationTest.scala
Scala
apache-2.0
3,966
/* * 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 ...
sujen1412/sparkler
sparkler-app/src/main/scala/edu/usc/irds/sparkler/util/JobUtil.scala
Scala
apache-2.0
1,542
package com.twitter.finagle.memcached.unit.protocol.text.server import com.twitter.conversions.DurationOps._ import com.twitter.finagle.memcached.protocol.StorageCommand.StorageCommands import com.twitter.finagle.memcached.protocol.text.server.MemcachedServerDecoder import com.twitter.finagle.memcached.protocol.{Set, ...
luciferous/finagle
finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/protocol/text/server/MemcachedServerDecoderTest.scala
Scala
apache-2.0
2,386
package com.github.shivawu.sbt.maven object PathUtil { import java.io.File def relativeTo(target: File, base: File = new File(".")) = { def toPathList(file: File) = { var f = file.getCanonicalFile val list = collection.mutable.ListBuffer[String]() while (f != null) { if (f.getName != "") list +=...
shivawu/sbt-maven-plugin
src/main/scala/com/github/shivawu/sbt/maven/Utils.scala
Scala
apache-2.0
765
/* * MUSIT is a museum database to archive natural and cultural history data. * Copyright (C) 2016 MUSIT Norway, part of www.uio.no (University of Oslo) * * 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...
kpmeen/musit
service_geo_location/test/controllers/ApplicationIntegrationSpec.scala
Scala
gpl-2.0
1,348
package com.karasiq.bittorrent.protocol.extensions trait BitTorrentFastMessageIds { val HAVE_ALL = 0x0E val HAVE_NONE = 0x0F val SUGGEST_PIECE = 0x0D val REJECT_REQUEST = 0x10 val ALLOWED_FAST = 0x11 }
Karasiq/torrentstream
library/src/main/scala/com/karasiq/bittorrent/protocol/extensions/BitTorrentFastMessageIds.scala
Scala
apache-2.0
212
import java.io.File object B { def main(args: Array[String]) { Thread.sleep(1000) } }
pdalpra/sbt
sbt/src/sbt-test/run/concurrent/changes/B.scala
Scala
bsd-3-clause
90
/* Generated File */ package services.store import com.kyleu.projectile.models.result.data.DataField import com.kyleu.projectile.models.result.filter.Filter import com.kyleu.projectile.models.result.orderBy.OrderBy import com.kyleu.projectile.services.ModelServiceHelper import com.kyleu.projectile.services.database.Jd...
KyleU/boilerplay
app/services/store/InventoryRowService.scala
Scala
cc0-1.0
9,499
package be.wegenenverkeer.atomium.format.pub sealed trait Draft { def value:String } object Draft { def apply(value:String): Draft = if (value == DraftYes.value) DraftYes else DraftNo } object DraftYes extends Draft { override def value = "yes" } object DraftNo extends Draft { override def value = "no" }
joachimvda/atomium
modules/format/src/main/scala/be/wegenenverkeer/atomium/format/pub/Draft.scala
Scala
mit
317
package mesosphere.marathon.api.v2 import akka.event.EventStream import mesosphere.marathon.health.HealthCheckManager import mesosphere.marathon.state._ import mesosphere.marathon.tasks.TaskTracker import mesosphere.marathon.{ MarathonConf, MarathonSchedulerService, MarathonSpec } import org.mockito.Matchers.{ any, eq...
quamilek/marathon
src/test/scala/mesosphere/marathon/api/v2/AppsResourceTest.scala
Scala
apache-2.0
3,682
package com.softwaremill.bootzooka.user.application import java.time.OffsetDateTime import java.util.UUID import com.softwaremill.bootzooka.common.FutureHelpers._ import com.softwaremill.bootzooka.common.sql.SqlDatabase import com.softwaremill.bootzooka.user.domain.RememberMeToken import scala.concurrent.{ExecutionC...
aywengo/bootzooka
backend/src/main/scala/com/softwaremill/bootzooka/user/application/RememberMeTokenDao.scala
Scala
apache-2.0
1,555
package com.bot4s.telegram.api import cats.MonadError import cats.instances.future._ import com.typesafe.scalalogging.StrictLogging import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future class TestBot extends BotBase[Future] with StrictLogging { override lazy val client: RequestHa...
mukel/telegrambot4s
core/test/src/com/bot4s/telegram/api/TestBot.scala
Scala
apache-2.0
436
package is.hail.utils import is.hail.{HailSuite, TestUtils} import org.testng.annotations.Test class RichRDDSuite extends HailSuite { @Test def parallelWrite() { def read(file: String): Array[String] = fs.readLines(file)(_.map(_.value).toArray) val header = "my header is awesome!" val data = Array("the...
hail-is/hail
hail/src/test/scala/is/hail/utils/RichRDDSuite.scala
Scala
mit
1,744
import stainless.annotation._ object ContainerTest { case class Box(var value: BigInt) case class Container[@mutable T](t: T) @extern def f2(b: Container[Box]): Unit = ??? def g2(b: Container[Box]) = { val v = b.t.value f2(b) assert(b.t.value == v) } }
epfl-lara/stainless
frontends/benchmarks/imperative/invalid/ContainerTest.scala
Scala
apache-2.0
280
package scalaz.stream import Cause._ import java.util.concurrent.atomic.{AtomicBoolean, AtomicReference} import scala.annotation.tailrec import scala.collection.SortedMap import scala.concurrent.duration._ import scalaz.stream.async.immutable.Signal import scalaz.{\\/-, Catchable, Functor, Monad, Monoid, Nondetermin...
runarorama/scalaz-stream
src/main/scala/scalaz/stream/Process.scala
Scala
mit
56,888
package fuds.restriction import org.scalatest.Spec class PathRegexWhiteListSpec extends Spec { object `PathRegexWhiteList must` { def `give the restriction when the path matches the regex`() { val restriction = new ContentRestriction { override def apply(v1: Array[Byte]) = throw new RuntimeExcepti...
jcaraballo/fuds
src/test/scala/fuds/restriction/PathRegexWhiteListSpec.scala
Scala
apache-2.0
553
package uk.gov.bis.taxserviceMock.actions import com.google.inject.Inject import play.api.mvc.Results._ import play.api.mvc._ import uk.gov.bis.taxserviceMock.data._ import uk.gov.bis.taxserviceMock.controllers._ import scala.concurrent.{ExecutionContext, Future} class GatewayUserRequest[A](val request: Request[A], ...
WellFactored/das-alpha-taxservice-mock
src/main/scala/uk.gov/bis/taxserviceMock/actions/GatewayUserAction.scala
Scala
mit
1,231
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.api.db import java.sql.Connection /** * Defines isolation levels that determines the degree to which one transaction must be isolated from resource or data modifications made by other operations. * * @param id the transaction isolatio...
benmccann/playframework
persistence/play-jdbc-api/src/main/scala/play/api/db/TransactionIsolationLevel.scala
Scala
apache-2.0
1,467
package com.twitter.scalding.db.macros.impl.handler import scala.reflect.macros.Context import scala.util.{ Success, Failure } import com.twitter.scalding.db.macros.impl.FieldName object StringTypeHandler { def apply[T](c: Context)(implicit accessorTree: List[c.universe.MethodSymbol], fieldName: FieldName, ...
jzmq/scalding
scalding-db/src/main/scala/com/twitter/scalding/db/macros/impl/handler/StringTypeHandler.scala
Scala
apache-2.0
2,134
/* * #%L * lazycontainer * %% * Copyright (C) 2014 KangWoo, Lee * %% * 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...
imcharsi/vaadinlazycontainer
src/main/scala/com/github/imcharsi/vaadin/lazycontainer/AbstractTableContainer.scala
Scala
apache-2.0
5,970
package com.quantarray.skylark.measure /* * Skylark * * © 2012-2017, Quantarray * http://skylark.io */ package object simplification { type EnergyPriceTimesFXMeasure = ProductMeasure[EnergyPrice, FX] trait DefaultSimplificationImplicits { implicit val canSimplifyEnergyPriceTimesCurrencyPrice = new Can...
quantarray/skylark
skylark-measure/src/main/scala/com/quantarray/skylark/measure/simplification/package.scala
Scala
apache-2.0
1,352
package com.amichalo.smooolelo.gateway import java.io.IOException import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.http.scaladsl.client.RequestBuilding import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport import akka.http.scaladsl.model.{HttpResponse, HttpRequest} import akka.strea...
amichalo/smooolelo
src/main/scala/com/amichalo/smooolelo/gateway/MoooleloServerGateway.scala
Scala
apache-2.0
3,071
// // Scaled - a scalable editor extensible via JVM languages // http://github.com/scaled/scaled/blob/master/LICENSE package scaled import org.junit._ import org.junit.Assert._ class LocTest { def testInsert (descrip :String, expect :Loc, loc :Loc, start :Loc, end :Loc) { assertEquals(s"$descrip $loc +~ [$sta...
swhgoon/scaled
api/src/test/scala/scaled/LocTest.scala
Scala
bsd-3-clause
2,140
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
VinACE/adam
adam-core/src/test/scala/org/bdgenomics/adam/rdd/variation/VariationRDDFunctionsSuite.scala
Scala
apache-2.0
3,452
package com.typesafe.slick.docs import java.sql.Blob import org.reactivestreams.Publisher import scala.collection.mutable.ArrayBuffer import scala.concurrent.{Future, Await} import scala.concurrent.duration.Duration import scala.concurrent.ExecutionContext.Implicits.global import scala.language.higherKinds import sl...
InsideVault/slick
slick/src/sphinx/code/Connection.scala
Scala
bsd-2-clause
3,310
package opennlp.fieldspring.tr.util import opennlp.fieldspring.tr.topo._ class DistanceTable { val storedDistances = new scala.collection.mutable.HashMap[(Int, Int), Double] def distance(l1:Location, l2:Location): Double = { var leftLoc = l1 var rightLoc = l2 if(l1.getId > l2.getId) { leftLo...
utcompling/fieldspring
src/main/scala/opennlp/fieldspring/tr/util/DistanceTable.scala
Scala
apache-2.0
770
import sbt._ object Dependencies { object version { val fabric: String = "1.2.7" val profig: String = "3.3.0" val scalaPass: String = "1.2.0" val arangoDBJavaDriver: String = "6.16.1" val jackson: String = "3.0.0" val catsEffect: String = "3.3.6" val fs2: String = "3.2.5" val scribe: ...
outr/scarango
project/Dependencies.scala
Scala
mit
1,285
package demesne.scaladsl import shapeless.Lens import omnibus.archetype.domain.model.core.Entity trait BasicEntityModuleBuilderOpF[+A] extends SimpleModuleBuilderOpF[A] import scala.language.existentials case class SetIdLens[+A]( idLens: Lens[_, _], next: A ) extends BasicEntityModuleBuilderOpF[A] case class SetNa...
dmrolfs/demesne
sandbox/freemonad-dsl/scaladsl/BasicEntityModuleBuilderOpF.scala
Scala
apache-2.0
1,115
package com.tmyjoe.akka.support trait DatabaseConfig { val driver = slick.driver.MySQLDriver import driver.api._ def db = Database.forConfig("database") implicit val session: Session = db.createSession() }
tmyjoe/akka-microservices-template
src/main/scala/com/tmyjoe/akka/support/DatabaseConfig.scala
Scala
mit
218
package assets.mustache.ordinary import uk.gov.gds.ier.transaction.overseas.lastUkAddress.LastUkAddressManualMustache import uk.gov.gds.ier.test._ import uk.gov.gds.ier.transaction.ordinary.previousAddress.PreviousAddressManualMustache class PreviousAddressManualTemplateTest extends TemplateTestSuite with Previou...
alphagov/ier-frontend
test/assets/mustache/ordinary/PreviousAddressManualTemplateTest.scala
Scala
mit
4,166
package lagom import java.io.File import java.nio.file.Files import sbt._ import sbt.Keys._ import sbt.plugins.JvmPlugin import scala.util.Try import scala.xml.{Elem, NodeSeq, PrettyPrinter, XML} /** * Generates the maven plugin descriptor. * * This has two primary purposes: * * 1. Generate parts of the d...
edouardKaiser/lagom
project/SbtMavenPlugin.scala
Scala
apache-2.0
9,919
/** * 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...
YMartsynkevych/camel
components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SetHeaderTest.scala
Scala
apache-2.0
2,233
package ml.sparkling.graph.operators.algorithms.random.ctrw.struct import org.apache.spark.graphx.VertexId /** * Created by mth on 4/13/17. */ class CTRWVertex(val id: VertexId, val neighbours: Array[VertexId], val messages: Array[CTRWMessage], val initialized: Boolean) extends Serializable { val degree = neigh...
sparkling-graph/sparkling-graph
operators/src/main/scala/ml/sparkling/graph/operators/algorithms/random/ctrw/struct/CTRWVertex.scala
Scala
bsd-2-clause
741