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
/* * Copyright (c) 2016. Fengguo (Hugo) Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Detailed co...
arguslab/argus-cit-intellij
src/main/scala/org/argus/cit/intellij/jawa/lang/psi/api/base/JawaPsiField.scala
Scala
epl-1.0
668
/* * 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 ...
u2009cf/spark-radar
sql/core/src/main/scala/org/apache/spark/sql/expressions/ReduceAggregator.scala
Scala
apache-2.0
2,242
/* * 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/nisp-frontend
app/uk/gov/hmrc/nisp/utils/Country.scala
Scala
apache-2.0
1,354
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * 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 package reflect....
lrytz/scala
src/reflect/scala/reflect/internal/util/SourceFile.scala
Scala
apache-2.0
7,931
import java.util.ServiceLoader import com.google.inject.{AbstractModule, Guice, Module} import play.api.GlobalSettings import services.{SimpleUUIDGenerator, UUIDGenerator} import scala.collection.JavaConversions._ object Global extends GlobalSettings { val runtimeModules = ServiceLoader.load(classOf[Module]).iter...
nyavro/ooo-master
ui/app/Global.scala
Scala
apache-2.0
649
/* * 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 ...
zuotingbing/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala
Scala
apache-2.0
32,666
/* * 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 n...
Chasego/kafka
core/src/test/scala/kafka/server/BrokerToControllerRequestThreadTest.scala
Scala
apache-2.0
15,121
package net.ssanj.dabble trait DabblePathTypes { object DabblePathTypes { def dirPath(dir: String): DirPath = DirPath(dir) def filePath(dir: DirPath, file: String): FilePath = FilePath(dir, file) } case class DirPath(dir: String) { def /(subdir: DirPath): DirPath = DirPath(s"${dir}/${subdir.dir}"...
ssanj/dabble
src/main/scala/net/ssanj/dabble/DabblePathTypes.scala
Scala
mit
1,346
package slick.lifted import slick.util.ConstArray import scala.language.higherKinds import scala.language.experimental.macros import scala.annotation.implicitNotFound import scala.reflect.macros.blackbox.Context import slick.ast.{Join => AJoin, _} import FunctionSymbolExtensionMethods._ import ScalaBaseType._ sealed...
nafg/slick
slick/src/main/scala/slick/lifted/Query.scala
Scala
bsd-2-clause
17,684
package org.jetbrains.plugins.scala package lang package parser package parsing package types import com.intellij.lang.PsiBuilder import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder import scala.annotation.tailrec /** * @author ...
double-y/translation-idea-plugin
src/org/jetbrains/plugins/scala/lang/parser/parsing/types/SimpleType.scala
Scala
apache-2.0
4,297
/** Copyright 2014 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 ...
TheDataShed/PredictionIO
engines/src/main/scala/itemrank/ReplayDataSource.scala
Scala
apache-2.0
10,304
package spray.json.laws import org.scalacheck.Arbitrary.arbitrary import org.scalacheck.Prop.forAll import org.scalacheck._ import spray.json.DefaultJsonProtocol._ import spray.json._ import spray.json.Scalaz._ import scalaz._ import scalaz.Scalaz._ object JsonReaderLaws { val laws = new Properties("JsonReader Fu...
msimav/spray-contrib-scalaz
src/test/scala/spray/json/laws/JsonReaderLaws.scala
Scala
mit
1,572
/* * Copyright 2013-2015 Websudos, Limited. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of c...
levinson/phantom
phantom-reactivestreams/src/test/scala/com/websudos/phantom/reactivestreams/suites/PublisherIntegrationTest.scala
Scala
bsd-2-clause
3,305
/* * Copyright 2009-2010 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
jeppenejsum/liftweb
examples/example/src/main/scala/net/liftweb/example/snippet/Wizard.scala
Scala
apache-2.0
3,405
import org.scalatest.FunSuite import scala.reflect.runtime.universe._ class ParameterZoo { class C[@funny T](@funny val x: Int) object С def m[@funny T, @funny U](@funny x: Int)(@funny y: Int) = ??? type T[@funny U] = U } class Parameters extends FunSuite { test("combo") { assert(typeOf[ParameterZoo].de...
scalamacros/paradise
tests/src/test/scala/annotations/run/Parameters.scala
Scala
bsd-3-clause
504
/* * Copyright (C) 2014 AyaIB Developers (http://github.com/fauu/AyaIB) * * This software is licensed under the GNU General Public License * (version 3 or later). See the COPYING file in this distribution. * * You should have received a copy of the GNU Library General Public License * along with this software. I...
fauu/AyaIB
app/models/forms/BoardForm.scala
Scala
gpl-3.0
1,032
package org.talkingpuffin.util import org.specs.runner.JUnit4 import org.specs.Specification class WordCounterTest extends JUnit4(WordCounterSpec) object WordCounterSpec extends Specification { "The result" should { "contain 2 words" in { WordCounter("Scala traits").words must have size(2) } "hav...
dcbriccetti/talking-puffin
common/src/test/scala/org/talkingpuffin/util/WordCounterTest.scala
Scala
mit
529
package io.ino.solrs import io.ino.solrs.future.ScalaFutureFactory.ScalaFuture import io.ino.time.Clock.MutableClock import org.apache.solr.client.solrj.SolrResponse import org.apache.solr.client.solrj.response.QueryResponse import org.mockito.ArgumentMatchers._ import org.mockito.Mockito._ import scala.concurrent._ ...
inoio/solrs
src/test/scala/io/ino/solrs/AsyncSolrClientMocks.scala
Scala
apache-2.0
2,226
/* * 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 ...
style95/openwhisk
tests/src/test/scala/org/apache/openwhisk/core/controller/test/PackageActionsApiTests.scala
Scala
apache-2.0
29,041
package com.github.slackey.codecs.responses case class GroupsOpen( no_op: Option[Boolean], already_open: Option[Boolean] )
slackey/slackey
src/main/scala/com/github/slackey/codecs/responses/GroupsOpen.scala
Scala
mit
128
/** * Angles * Copyright (C) 2015 Jakob Hendeß, Niklas Wolber * * 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. ...
nwolber/angles
src/main/scala/io/ssc/angles/pipeline/explorers/GenerateAntiPairs.scala
Scala
gpl-3.0
1,874
package me.axiometry.blocknet.entity trait Animal extends Creature object Animal { trait Tameable extends Animal { def ownerName: Option[String] def sitting: Boolean def tame: Boolean def ownerName_=(ownerName: Option[String]) def sitting_=(sitting: Boolean) } trait Rideable extends Animal {...
Axiometry/Blocknet
blocknet-api/src/main/scala/me/axiometry/blocknet/entity/Animal.scala
Scala
bsd-2-clause
389
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/library/scala/collection/generic/GenericTraversableTemplate.scala
Scala
bsd-3-clause
8,052
package com.scout24.pipedsl.model import com.amazonaws.services.datapipeline.model.Field import scala.collection.mutable class PipelineObject(id : String, theType : String) extends AwsPipelineObject { setId(id) addValueField("type", theType) var referencedObjects = mutable.Set[PipelineObject]() def withRef...
matey-jack/pipe-dsl
src/main/scala/com/scout24/pipedsl/model/PipelineObject.scala
Scala
gpl-2.0
989
package de.fosd.typechef.crewrite import de.fosd.typechef.parser.c._ import de.fosd.typechef.featureexpr.FeatureModel import de.fosd.typechef.conditional.Opt // implements a simple analysis that checks whether a switch statement has // code that does not occur in the control flow of a case or default statement // htt...
ckaestne/TypeChef
CRewrite/src/main/scala/de/fosd/typechef/crewrite/DanglingSwitchCode.scala
Scala
lgpl-3.0
1,254
/* Copyright (c) 2012 Joshua Garnett 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, distribute, ...
joshgarnett/Astar-Scala
src/com/adverserealms/astar/core/AstarPath.scala
Scala
mit
1,626
package fr.renoux.gaston.util trait Identified { val id: Int }
gaelrenoux/gaston
src/main/scala/fr/renoux/gaston/util/Identified.scala
Scala
apache-2.0
66
package com.github.scalaspring.akka import akka.actor.ActorSystem import org.springframework.beans.factory.annotation.Autowired /** * Extend this trait to add actor reference creation helper methods to any Spring configuration. */ trait ActorSystemConfiguration extends SpringActorRefFactory { @Autowired protec...
scalaspring/akka-spring-boot
src/main/scala/com/github/scalaspring/akka/ActorSystemConfiguration.scala
Scala
apache-2.0
368
/* * Copyright 2018 Analytics Zoo 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...
intel-analytics/analytics-zoo
zoo/src/test/scala/com/intel/analytics/zoo/pipeline/api/keras/layers/KerasBaseSpec.scala
Scala
apache-2.0
3,671
/* * 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 ...
wgpshashank/spark
core/src/main/scala/spark/ui/Page.scala
Scala
apache-2.0
921
/* * 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 ...
BryanCutler/spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala
Scala
apache-2.0
27,560
/* * 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 ...
hongyuhong/flink
flink-libraries/flink-ml/src/main/scala/org/apache/flink/ml/metrics/distances/EuclideanDistanceMetric.scala
Scala
apache-2.0
1,674
package scredis.protocol.requests import scredis.protocol._ import scredis.serialization.Writer import scala.collection.generic.CanBuildFrom import scala.language.higherKinds object PubSubRequests { import scredis.serialization.Implicits.{intReader, stringReader} object PSubscribe extends Command("PSUBSCRI...
1and1/scredis
src/main/scala/scredis/protocol/requests/PubSubRequests.scala
Scala
apache-2.0
2,500
package gitbucket.core.controller.api import java.io.File import gitbucket.core.api._ import gitbucket.core.controller.ControllerBase import gitbucket.core.service.{AccountService, ReleaseService} import gitbucket.core.util.Directory.getReleaseFilesDir import gitbucket.core.util.{FileUtil, ReferrerAuthenticator, Repos...
imeszaros/gitbucket
src/main/scala/gitbucket/core/controller/api/ApiReleaseControllerBase.scala
Scala
apache-2.0
6,653
package com.blrest.dao import com.blrest.model.{Tag, TagResponse} import reactivemongo.api.{QueryOpts, DB} import reactivemongo.api.collections.default.BSONCollection import akka.actor.{ActorRef, Actor, ActorSystem} import reactivemongo.core.commands.Count import scala.util.Random import reactivemongo.bson.{BSONObject...
ctcarrier/bl-rest
src/main/scala/com/blrest/dao/TagDao.scala
Scala
mit
1,429
package at.forsyte.apalache.tla.bmcmt.caches import at.forsyte.apalache.tla.bmcmt.smt.SolverContext import at.forsyte.apalache.tla.bmcmt.types.ConstT import at.forsyte.apalache.tla.bmcmt.{Arena, ArenaCell} import at.forsyte.apalache.tla.lir.convenience.tla /** * A cache for string constants that are translated as u...
konnov/dach
tla-bmcmt/src/main/scala/at/forsyte/apalache/tla/bmcmt/caches/StrValueCache.scala
Scala
apache-2.0
1,125
/* * 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/main/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC212B.scala
Scala
apache-2.0
1,142
/* * Copyright (C) 2016-2017 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.internal.kafka import java.io.File import java.io.IOException import java.nio.file.FileVisitOption import java.nio.file.Files import java.nio.file.Paths import java.util.Properties import java.util.concurrent.atomi...
edouardKaiser/lagom
dev/kafka-server/src/main/scala/com/lightbend/lagom/internal/kafka/KafkaLocalServer.scala
Scala
apache-2.0
7,332
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
apache/kylin
kylin-spark-project/kylin-spark-engine/src/test/scala/org/apache/kylin/engine/spark/builder/TestCreateFlatTable.scala
Scala
apache-2.0
7,187
import sbt._ object TestPlugin extends Plugin { val Check = TaskKey[Unit]("check") override def settings = Seq( Check := assert(JavaTest.X == 9) ) }
pdalpra/sbt
sbt/src/sbt-test/project/src-plugins/plugin/TestPlugin.scala
Scala
bsd-3-clause
154
/** * * BaseActivity.scala * Ledger wallet * * Created by Pierre Pollastri on 09/01/15. * * The MIT License (MIT) * * Copyright (c) 2015 Ledger * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * ...
Morveus/ledger-wallet-android
app/src/main/scala/com/ledger/ledgerwallet/base/BaseActivity.scala
Scala
mit
4,067
package com.pamarin.monitoring.gatling import io.gatling.core.Predef._ import io.gatling.http.Predef._ import scala.concurrent.duration._ import com.typesafe.config._ /** * @author jittagornp * create 26/11/2015 */ class HomePageSimulation extends Simulation { val conf = ConfigFactory.load(); val homePageUrl ...
jittagornp/gatling-example
src/test/resources/simulations/HomePageSimulation.scala
Scala
apache-2.0
939
package ch.wsl.box.client import ch.wsl.box.client.utils.TestHooks import org.scalajs.dom.document import org.scalajs.dom.window class LoginTest extends TestBase { "login" should "be done" in { Main.setupUI().flatMap { _ => val beforeLogin = document.body.innerHTML assert(document.que...
Insubric/box
client/src/test/scala/ch/wsl/box/client/LoginTest.scala
Scala
apache-2.0
781
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * 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.collection packa...
scala/scala
src/library/scala/collection/mutable/IndexedSeq.scala
Scala
apache-2.0
2,537
package uk.co.morleydev.ghosthunt.model.component.menu import org.jsfml.system.Vector2f /** * A menu option is a series of buttons, where one of those buttons can be selected. * That button will then become considered the active button. * * @param position * @param size * @param text * @param active */ case c...
MorleyDev/GhostHunt
src/main/scala/uk/co/morleydev/ghosthunt/model/component/menu/MenuOption.scala
Scala
mit
413
package at.logic.gapt.proofs.resolution import at.logic.gapt.expr._ import at.logic.gapt.proofs.{ Ant, Sequent, Suc } import org.specs2.mutable.Specification class UnitResolutionToLKProofTest extends Specification { "flips" in { val p1 = Input( Sequent() :+ hof"a=b" ) val p2 = Input( hof"b=a" +: Sequent() ...
gebner/gapt
tests/src/test/scala/at/logic/gapt/proofs/resolution/UnitResolutionToLKProofTest.scala
Scala
gpl-3.0
850
package hoecoga.play.api import org.scalatest.FunSpec import play.api.http.Writeable import play.api.libs.json.Json import play.api.mvc.Results._ import play.api.mvc.{Action, BodyParsers} import play.api.test.Helpers._ import play.api.test.{FakeApplication, FakeRequest} class ErrorHandlerSpec extends FunSpec { impo...
hoecoga/hoecoga-play-api
src/test/scala/hoecoga/play/api/ErrorHandlerSpec.scala
Scala
mit
1,433
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.scaladsl.testkit import java.nio.file.{ Files, Path, Paths } import com.lightbend.lagom.scaladsl.api.{ Descriptor, Service } import com.lightbend.lagom.scaladsl.persistence.cassandra.CassandraPersistenceComponent...
rstento/lagom
testkit/scaladsl/src/test/scala/com/lightbend/lagom/scaladsl/testkit/ServiceTestSpec.scala
Scala
apache-2.0
3,061
package com.socrata.soda.clients.datacoordinator import com.socrata.http.client.{RequestBuilder, HttpClient} import com.socrata.http.server.util.RequestId.{RequestId, ReqIdHeader} import com.socrata.http.common.AuxiliaryData import com.socrata.curator.ProviderCache import com.socrata.soda.server.{HeaderAddingHttpClien...
socrata-platform/soda-fountain
soda-fountain-lib/src/main/scala/com/socrata/soda/clients/datacoordinator/CuratedHttpDataCoordinatorClientProvider.scala
Scala
apache-2.0
2,636
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/init-repository
src/main/scala/uk/gov/hmrc/initrepository/Coordinator.scala
Scala
apache-2.0
4,045
package com.stackmob.customcode.dev package test package server import org.specs2.Specification import com.stackmob.newman.test.DummyHttpClient import com.stackmob.customcode.dev.server.APIRequestProxy import com.stackmob.customcode.dev.server.APIRequestProxy.UnknownVerbError import collection.JavaConverters._ class ...
matthewfarwell/stackmob-customcode-dev
src/test/scala/com/stackmob/customcode/dev/test/server/APIRequestProxySpecs.scala
Scala
apache-2.0
2,728
/* * Copyright (C) 2016 DANS - Data Archiving and Networked Services (info@dans.knaw.nl) * * 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 ...
DANS-KNAW/easy-license-creator
src/test/scala/nl/knaw/dans/easy/agreement/datafetch/LdapSpec.scala
Scala
apache-2.0
2,474
package com.twitter.finagle import com.twitter.finagle.client._ import com.twitter.finagle.dispatch.SerialServerDispatcher import com.twitter.finagle.http.codec.HttpClientDispatcher import com.twitter.finagle.netty3._ import com.twitter.finagle.server._ import com.twitter.util.Future import java.net.{InetSocketAddress...
firebase/finagle
finagle-http/src/main/scala/com/twitter/finagle/Http.scala
Scala
apache-2.0
2,110
package com.github.vooolll.domain.comments import com.github.vooolll.domain.FacebookAttribute object FacebookCommentsAttributes { val defaultCommentsAttributeValues = Set(Id, Message, CreatedTime, Attachment, From, Object) trait FacebookCommentsAttribute extends FacebookAttribute case object Id extends F...
vooolll/facebook4s
src/main/scala/com/github/vooolll/domain/comments/FacebookCommentsAttributes.scala
Scala
apache-2.0
881
package org.emailscript.helpers import org.emailscript.api._ import org.scalatest.{FlatSpec, Matchers} class ConfigurationTest extends FlatSpec with Matchers { "IndexerBean" should "produce a named Indexer obj" in { val bean = new IndexerBean() bean.setUrl("url1") bean.setNickname("name1") val re...
OdysseusLevy/emailscript
src/test/scala/org/emailscript/helpers/ConfigurationTest.scala
Scala
lgpl-3.0
1,664
/* * 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 n...
sslavic/kafka
core/src/test/scala/unit/kafka/server/KafkaApisTest.scala
Scala
apache-2.0
80,961
/* * 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
streaming/src/test/scala/org/apache/spark/streaming/MasterFailureTest.scala
Scala
apache-2.0
22,529
package cgta.cenum ////////////////////////////////////////////////////////////// // Copyright (c) 2014 Ben Jackman // All Rights Reserved // please contact ben@jackman.biz // for licensing inquiries // Created by bjackman @ 5/8/14 3:42 PM ////////////////////////////////////////////////////////////// private[cenum]...
cgta/open
cenum/js/src/main/scala/cgta/cenum/CEnumInitStrategyImpl.scala
Scala
mit
486
import fpscala.errorhandling._ object Exercise4_2 extends App { def variance(xs: Seq[Double]): Option[Double] = { def calcVar(xs: Seq[Double]): Double = { val m = xs.sum / xs.length xs.map(x => math.pow(x - m, 2)).sum / xs.length } Some(xs).flatMap(x => if (x.isEmpty) None else Some(calcVar(x...
hnfmr/fpscala
ex4.2.scala
Scala
mit
445
package org.ferrit.core.test import org.ferrit.core.http.{Request, Response, DefaultResponse, Stats} /** * Utility used with FakeHttpClient, a fake response minus the Request param * that is only available at request time. */ case class PartResponse( status: Int, headers: Map[String,Seq[String]], content: ...
reggoodwin/ferrit
src/test/scala/org/ferrit/core/test/PartResponse.scala
Scala
mit
488
/* * Copyright (c) 2014-2020 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
alexandru/monifu
monix-execution/js/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala
Scala
apache-2.0
3,642
package controllers; import play.api.mvc.Controller; import play.api.mvc.Action; import play.api.cache.Cached; import play.api.Play.current; import play.api.i18n.Lang; object I18N extends Controller { def setLang(lang: String) = Action { request => Found(request.headers.get("referer").getOrElse("/")).w...
shunjikonishi/jquery-formbuilder
app/controllers/I18N.scala
Scala
mit
754
package domain.count import domain.Dao._ import play.api.db._ import play.api.Play.current import domain._ import domain.entity._ object GetActivity { def getId(name: String): Int = DB.withConnection (implicit connection => { Dao.getVoicebankId(name) }) def getName(id: Int): String = ...
maruLoop/VoiceBankActivity
app/domain/count/GetActivity.scala
Scala
mit
2,244
import com.twitter.scalding import java.io.{IOException, FileInputStream, FileOutputStream, File} import java.nio.file._ import java.nio.file.attribute.BasicFileAttributes import java.util.jar.JarOutputStream import java.util.zip.ZipOutputStream import org.apache.commons.io.IOUtils import org.apache.hadoop.util.ToolRu...
pomadchin/hadoop-dg-decomp
src/main/scala/scalding/RunAll.scala
Scala
apache-2.0
2,437
/* * 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 ...
mylog00/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/descriptors/DescriptorPropertiesTest.scala
Scala
apache-2.0
4,912
package name.abhijitsarkar.akka import akka.actor.ActorSystem import akka.stream.scaladsl.{GraphDSL, Sink, UnzipWith} import akka.stream.{ActorMaterializer, SinkShape} import akka.util.ByteString import name.abhijitsarkar.akka.model.Rsvp import name.abhijitsarkar.akka.service.{MeetupStreamingService, RsvpSubscriber} i...
asarkar/akka
akka-streams-learning/meetup-streaming/src/main/scala/name/abhijitsarkar/akka/MeetupStreamingApp.scala
Scala
gpl-3.0
1,981
/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md 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...
dnatic09/scalate
scalate-core/src/main/scala/org/fusesource/scalate/scuery/Transform.scala
Scala
apache-2.0
1,375
/* * 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 ...
maropu/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetRecordMaterializer.scala
Scala
apache-2.0
2,479
package com.twitter.util import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import com.twitter.conversions.storage._ @RunWith(classOf[JUnitRunner]) class StorageUnitTest extends FunSuite { test("StorageUnit: should convert whole numbers into storage units (back and...
BuoyantIO/twitter-util
util-core/src/test/scala/com/twitter/util/StorageUnitTest.scala
Scala
apache-2.0
2,152
/* * 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 ...
pgandhi999/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/QueryExecutionSuite.scala
Scala
apache-2.0
6,925
/* * Copyright 2015 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...
scottcutts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/AC21.scala
Scala
apache-2.0
942
package epam.bdcc_app.json import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonProperty import lombok.Data @Data @JsonIgnoreProperties(ignoreUnknown = true) class Follows_get { @JsonProperty("response") val response: Vk_follows = null; }
mkasatkin/bdcc_app.vk_samza
src/main/scala/epam/bdcc_app/json/Follows_get.scala
Scala
apache-2.0
303
package com.workshop import org.specs2.mutable.Specification class IsIncreasingTest extends Specification { val intSmaller = (a: Int, b: Int) => a < b val isSorted = new IsIncreasing[Int](intSmaller) "check" should { "be true for increasing seq" in { isSorted.check(Seq(1, 2, 3, 4)) must beTrue } ...
maximn/scala-workshop
src/test/scala/com/workshop/IsIncreasingTest.scala
Scala
mit
527
package org.jetbrains.plugins.scala.findUsages.compilerReferences package bytecode import java.io.File import java.{util => ju} import org.jetbrains.jps.backwardRefs.CompilerRef import org.jetbrains.plugins.scala.findUsages.compilerReferences.indices.{ScFunExprCompilerRef, ScalaCompilerReferenceWriter} private[findU...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/findUsages/compilerReferences/bytecode/CompiledScalaFile.scala
Scala
apache-2.0
2,374
import java.net.ConnectException import com.fasterxml.jackson.core.`type`.TypeReference import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.scala.DefaultScalaModule import dispatch._, Defaults._ import akka.actor.ActorSystem import akka.actor.Props import akka.actor.Actor import com.t...
andrepnh/creepy-graph-adventure
scala-actors/src/main/scala-2.11/App.scala
Scala
mit
4,733
package org.ensime.api import java.io.File import java.nio.charset.Charset /** * There should be exactly one `RpcResponseEnvelope` in response to an * `RpcRequestEnvelope`. If the `callId` is empty, the response is * an asynchronous event. */ case class RpcResponseEnvelope( callId: Option[Int], payload: Ensim...
eddsteel/ensime
api/src/main/scala/org/ensime/api/outgoing.scala
Scala
gpl-3.0
15,173
package org.vaadin.addons.rinne import com.vaadin.ui.TextArea import org.vaadin.addons.rinne.mixins.AbstractTextFieldMixin class VTextArea extends TextArea with AbstractTextFieldMixin { def rows: Int = getRows def rows_=(rows: Int) { setRows(rows) } def wordwrap: Boolean = isWordwrap def wordwrap_=(w...
LukaszByczynski/rinne
src/main/scala/org/vaadin/addons/rinne/VTextArea.scala
Scala
apache-2.0
372
import _root_.io.gatling.core.scenario.Simulation import ch.qos.logback.classic.{Level, LoggerContext} import io.gatling.core.Predef._ import io.gatling.http.Predef._ import org.slf4j.LoggerFactory import scala.concurrent.duration._ /** * Performance test for the ApollonDiagram entity. */ class ApollonDiagramGatlin...
ls1intum/ArTEMiS
src/test/gatling/user-files/simulations/ApollonDiagramGatlingTest.scala
Scala
mit
3,638
package org.squeryl.logging import xml.Unparsed import java.io.{FileOutputStream, PrintStream} object BarChartRenderer { class Stat(val title: String, val xAxisLabel: String, val lines: Iterable[StatLine], measureFromLike: StatLine => String) { def queryLabelsJSArray = lines.map(sl => "'" + ...
takezoux2/squeryl-experimental
src/main/scala/org/squeryl/logging/BarChartRenderer.scala
Scala
apache-2.0
4,093
package org.chaomai.paraten.matrix import breeze.linalg.{ CSCMatrix => BCSCM, DenseMatrix => BDM, DenseVector => BDV, VectorBuilder => BVB } import breeze.math.Semiring import breeze.stats.distributions.Rand import breeze.storage.Zero import org.apache.spark.SparkContext import org.apache.spark.rdd.RDD import ...
ChaoMai/ParaTen
src/main/scala/org/chaomai/paraten/matrix/IndexedColumnMatrix.scala
Scala
apache-2.0
4,201
/** * Copyright 2015, deepsense.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
deeplang/src/main/scala/io/deepsense/deeplang/params/choice/MultipleChoiceParam.scala
Scala
apache-2.0
1,816
package services import play.api._ import play.api.Play.current import models._ import java.nio.charset.StandardCharsets import java.util.Date import java.net.URI import play.api.libs.oauth._ import scala.util.Try import play.api.mvc.RequestHeader import play.api.mvc.Controller import play.api.mvc.Result import play.a...
toggm/play-scala-jira-api
app/services/JIRAApiService.scala
Scala
gpl-2.0
8,486
package org.ensime.core import org.ensime.api._ import org.ensime.fixture._ import org.ensime.util.EnsimeSpec import DeclaredAs.{ Nil => _, _ } class TypeToScalaNameSpec extends EnsimeSpec with IsolatedRichPresentationCompilerFixture with RichPresentationCompilerTestUtils with ReallyRichPresentationCompil...
d1egoaz/ensime-sbt
src/sbt-test/sbt-ensime/ensime-server/core/src/it/scala/org/ensime/core/TypeToScalaNameSpec.scala
Scala
apache-2.0
5,313
package aio package conduit /** * * exchange szenarios * * alternatives: * * a. read bytebuffer contains full http request and nothing more, http response can be written in one bytebuffer * b. read bytebuffer contains full http request and nothing more, http response must be written with many bytebuffers * c. ...
weltermann17/pleasant-scala
aio/src/main/scala/aio/conduit/Exchange.scala
Scala
apache-2.0
2,226
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package impl import java.nio.file.Files import java.nio.file.StandardOpenOption import java.util.Date import com.lightbend.lagom.scaladsl.api.ServiceLocator.NoServiceLocator import com.lightbend.lagom.scaladsl.server._ import com.lightbend....
rcavalcanti/lagom
dev/sbt-plugin/src/sbt-test/sbt-plugin/run-all-scaladsl/b/impl/src/main/scala/impl/BarLoader.scala
Scala
apache-2.0
1,301
package wom.graph import cats.implicits._ import common.validation.ErrorOr.ErrorOr import common.collections.EnhancedCollections._ import wom.callable.Callable import wom.callable.Callable.{InputDefinitionWithDefault, OptionalInputDefinition, OutputDefinition, RequiredInputDefinition} import wom.graph.GraphNode._ impo...
ohsu-comp-bio/cromwell
wom/src/main/scala/wom/graph/GraphNode.scala
Scala
bsd-3-clause
4,705
/* * 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 ...
steveloughran/spark-timeline-integration
yarn-timeline-history/src/main/scala/org/apache/spark/deploy/history/yarn/rest/PrivilegedFunction.scala
Scala
apache-2.0
1,217
/* * */ package see.values import java.lang.reflect.Method import see.CopyContext import see.EvalError import see.JavaWrapper import see.ParamError import see.Scope private[see] case class Native(wrapper: JavaWrapper) extends Val with Callable { import Native._ override def selType = 'Native override...
acruise/see
src/main/scala/see/values/Native.scala
Scala
bsd-3-clause
3,160
package planstack.anml.model.abs import planstack.anml.model._ import planstack.anml.model.abs.statements.AbstractStatement /** Reference to an action as it appears in a decomposition * * @param name Name of the action * @param args Parameters of the action as instances of local variables * @param localId Loc...
planstack/anml
src/main/scala/planstack/anml/model/abs/AbstractActionRef.scala
Scala
apache-2.0
729
package chandu0101.scalajs.react.components package materialui import chandu0101.macros.tojs.JSMacro import japgolly.scalajs.react._ import scala.scalajs.js import scala.scalajs.js.`|` /** * This file is generated - submit issues instead of PR against it */ case class MuiFlatButton( key: js....
elacin/scalajs-react-components
core/src/main/scala/chandu0101/scalajs/react/components/materialui/MuiFlatButton.scala
Scala
apache-2.0
6,079
package pamflet import collection.immutable.Map object Language { // see http://en.wikipedia.org/wiki/IETF_language_tag val languageNames: Map[String, String] = Map( "ar" -> "العربية", "bn" -> "বাংলা", "ca" -> "Català", "cs" -> "Čeština", "de" -> "Deutsch", "en" -> "English", "es" -> "...
n8han/pamflet
library/src/main/scala/languages.scala
Scala
lgpl-3.0
961
/* * 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-website/app/models/Profile.scala
Scala
apache-2.0
715
package info.fotm.aether import akka.actor.Actor import akka.actor.Actor.Receive object Analytics { case class Event(name: String, value: Int) } class Analytics extends Actor { override def receive: Receive = ??? }
Groz/fotm-info
core/src/main/scala/info/fotm/aether/Analytics.scala
Scala
mit
222
package breeze.optimize import breeze.util._ import logging.ConfiguredLogging import breeze.stats.distributions._ import breeze.math.MutableCoordinateSpace /* Copyright 2009 David Hall, Daniel Ramage Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance wi...
tjhunter/scalanlp-core
learn/src/main/scala/breeze/optimize/StochasticGradientDescent.scala
Scala
apache-2.0
3,064
/* * Copyright 2011-2019 Asakusa Framework Team. * * 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 ...
ashigeru/asakusafw-spark
extensions/iterativebatch/compiler/core/src/main/scala/com/asakusafw/spark/extensions/iterativebatch/compiler/graph/package.scala
Scala
apache-2.0
1,380
/* * Copyright (c) 2014 Paul Bernard * * 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...
quantintel/spectrum
financial/src/main/scala/org/quantintel/ql/time/calendars/Slovakia.scala
Scala
apache-2.0
3,811
package io.apibuilder.validation.helpers import java.io.File import io.apibuilder.validation.zip.FileUtil trait FileHelpers { def readFileAsString(file: File): String = FileUtil.readFileAsString(file) def writeToTempFile( contents: String, prefix: String = "apibuildervalidation", suffix: String = "t...
flowcommerce/lib-apidoc-json-validation
src/test/scala/io/apibuilder/validation/helpers/FileHelpers.scala
Scala
mit
453
package org.jetbrains.plugins.scala package codeInspection.forwardReferenceInspection import com.intellij.codeInspection.ProblemsHolder import com.intellij.psi.util.PsiTreeUtil import org.jetbrains.plugins.scala.codeInspection.AbstractInspection import org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil import org.jetbr...
LPTK/intellij-scala
src/org/jetbrains/plugins/scala/codeInspection/forwardReferenceInspection/ForwardReferenceInspection.scala
Scala
apache-2.0
1,866
import sbt._ object Dependencies { object Versions { val scala = "2.11.8" val akka = "2.4.3" val scalaTest = "2.2.6" } val repos = Seq( "Atlassian Releases" at "https://maven.atlassian.com/public/", "JCenter repo" at "https://bintray.com/bintray/jcenter/", Resolver.sonatypeRepo("snapsho...
ReactivePatterns/functional-objects
project/Dependencies.scala
Scala
apache-2.0
889
package com.github.ldaniels528.trifecta.modules.etl.io.trigger.impl import java.io.File import com.github.ldaniels528.trifecta.modules.etl.io.trigger.impl.FileFeedSet.FeedMatch import org.scalatest.Matchers._ import org.scalatest.mock.MockitoSugar import org.scalatest.{BeforeAndAfterEach, FeatureSpec, GivenWhenThen} ...
ldaniels528/trifecta
app-cli/src/test/scala/com/github/ldaniels528/trifecta/modules/etl/io/trigger/impl/FileFeedSetSpec.scala
Scala
apache-2.0
1,880