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 cc.ferreira.gcal2slack.calendar import java.time.LocalDateTime import cc.ferreira.gcal2slack.BaseSpec class CalendarEventSpec extends BaseSpec { "apply" - { "should allow events with 0 time length" in { noException should be thrownBy CalendarEvent("test", t.now, t.now) } "should fail cr...
hugocf/gcal-slack-update
src/test/scala/cc/ferreira/gcal2slack/calendar/CalendarEventSpec.scala
Scala
mit
1,176
package ordinals import java.util.Calendar import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.{ThreadFactory, Executors, TimeUnit, ExecutorService} object util { final def addTimeStamp(str: String): String = Calendar.getInstance().getTime() + " " + str def log(x: Any): Unit = println(a...
kaelte/playingWithScala
src/main/scala/util.scala
Scala
gpl-3.0
1,694
package com.myproject.play.acl import org.specs2.mock.Mockito import org.specs2.mutable._ import scala.concurrent.Future import scala.concurrent.Await import scala.concurrent.duration._ import scala.util.Random import scala.concurrent.ExecutionContext.Implicits.global /** * Created by Surendra on 6/1/16. */ class A...
surenyonjan/play-acl
test/unit/com/myproject/play/acl/AccessDefinitionsUnitTest.scala
Scala
mit
2,595
package walfie.gbf.raidfinder.server.actor import akka.actor._ import monix.execution.{Cancelable, Scheduler} import scala.concurrent.duration.FiniteDuration import walfie.gbf.raidfinder.BuildInfo import walfie.gbf.raidfinder.domain._ import walfie.gbf.raidfinder.protocol import walfie.gbf.raidfinder.protocol.syntax._...
xheres/api-gbfraidfinder
server/src/main/scala/walfie/gbf/raidfinder/server/actor/WebsocketRaidsHandler.scala
Scala
mit
4,786
package org.scalajs.openui5.sap.m import org.scalajs.openui5.sap.ui.core._ import org.scalajs.openui5.util.{Settings, SettingsMap, noSettings} import scala.scalajs.js import scala.scalajs.js.annotation.{JSName, ScalaJSDefined} @ScalaJSDefined trait ColumnSettings extends ControlSettings object ColumnSettings extends...
lastsys/scalajs-openui5
src/main/scala/org/scalajs/openui5/sap/m/Column.scala
Scala
mit
1,618
/* * 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 java.util final class Optional[T] pri...
nicolasstucki/scala-js
javalib/src/main/scala/java/util/Optional.scala
Scala
apache-2.0
1,665
package com.temportalist.morphadditions.common import com.temportalist.morphadditions.addon.Morph import com.temportalist.origin.foundation.common.utility.Players import morph.api.Api import net.minecraft.command.{CommandBase, ICommandSender} import net.minecraft.entity.player.{EntityPlayer, EntityPlayerMP} import net...
TheTemportalist/MorphAdditions
src/main/scala/com/temportalist/morphadditions/common/CommandMorphA.scala
Scala
apache-2.0
2,795
/* * 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 ...
h2oai/sparkling-water
scoring/src/main/scala/ai/h2o/sparkling/ml/models/H2OMOJOProps.scala
Scala
apache-2.0
965
/** * Copyright 2013 Netflix, 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 ...
zjrstar/RxScala
src/main/scala/rx/lang/scala/subscriptions/CompositeSubscription.scala
Scala
apache-2.0
2,509
/* * Copyright 2016-2020 Daniel Urban and contributors listed in AUTHORS * Copyright 2020 Nokia * SPDX-License-Identifier: Apache-2.0 * * 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 *...
durban/seals
scodec/src/test/scala/dev/tauri/seals/scodec/CodecsSpec.scala
Scala
apache-2.0
7,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 ...
hequn8128/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/SqlExpressionTest.scala
Scala
apache-2.0
12,091
/* * 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/main/scala/com/intel/analytics/zoo/serving/engine/ClusterServingInference.scala
Scala
apache-2.0
9,341
/* * 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-reactive/shared/src/main/scala/monix/reactive/internal/builders/FirstStartedObservable.scala
Scala
apache-2.0
3,268
/* * 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 ...
gf53520/kafka
core/src/test/scala/unit/kafka/cluster/ReplicaTest.scala
Scala
apache-2.0
5,019
/** * Coleccion vacia de mensajes */ class TendenciaVacia extends Tendencia { def length : Integer = 0 // METODOS YA IMPLEMENTADOS QUE NO ES NECESARIO CAMBIAR // ------------------------------------------------------------------------- /** * Agrega nuevo mensaje * * @param mensaje * @retur...
romanarranz/NTP
P4/src/TendenciaVacia.scala
Scala
mit
947
/** * © 2019 Refinitiv. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
dudi3001/CM-Well
server/cmwell-ws/app/controllers/BackPressureToggler.scala
Scala
apache-2.0
2,610
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.3 * @date Fri Jul 29 14:33:21 EDT 2011 * @see LICENSE (MIT style license file). */ package apps.dynamics import scala.math.{cos, sin, Pi} import scala.util.control.Breaks.{breakable, br...
NBKlepp/fda
scalation_1.3/scalation_models/src/main/scala/apps/dynamics/Newtons2nd.scala
Scala
mit
3,993
package cook.path import cook.console.ops._ import cook.error._ import scala.annotation.tailrec import scala.reflect.io.{ Path => SPath, Directory } class Path(val rootDir: Directory, val currentDir: Directory) { val cookWorkspaceDir = (rootDir / ".cook_workspace").toDirectory val configScalaSourceDir = ...
timgreen/cook
src/cook/path/Path.scala
Scala
apache-2.0
1,573
package breeze.linalg import breeze.generic.UFunc import breeze.macros.expand import breeze.math.Ring import scala.reflect.ClassTag /** * Differences between adjacent elements and discrete derivatives. */ object diff extends UFunc with diffLowPrio { @expand @expand.valify implicit def implDV_Double_DV[@expan...
chen0031/breeze
math/src/main/scala/breeze/linalg/functions/diff.scala
Scala
apache-2.0
1,396
package org.jetbrains.plugins.scala package codeInspection.collections import org.jetbrains.plugins.scala.codeInspection.InspectionBundle import org.jetbrains.plugins.scala.codeInspection.collections.OperationOnCollectionsUtil._ import scala.Some /** * Nikolay.Tropin * 2014-05-07 */ class NotIsEmptyInspection exte...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/codeInspection/collections/NotEmptyInspection.scala
Scala
apache-2.0
1,055
/* * Copyright (C) 2020 MapRoulette contributors (see CONTRIBUTORS.md). * Licensed under the Apache License, Version 2.0 (see LICENSE). */ package org.maproulette.framework.graphql.fetchers import org.maproulette.framework.graphql.UserContext import org.maproulette.framework.model.Challenge import sangria.executio...
mgcuthbert/maproulette2
app/org/maproulette/framework/graphql/fetchers/ProjectFetchers.scala
Scala
apache-2.0
718
package functionalProgramming.memoization /** * Created by yujieshui on 2017/2/3. */ object BangaloreBank { }
1178615156/hackerrank
src/main/scala/functionalProgramming/memoization/BangaloreBank.scala
Scala
apache-2.0
116
/** * This file is part of the TA Buddy project. * Copyright (c) 2013-2014 Alexey Aksenov ezh@ezh.msk.ru * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Global License version 3 * as published by the Free Software Foundation with the addition...
digimead/digi-TABuddy-desktop
part-core-ui/src/main/scala/org/digimead/tabuddy/desktop/core/ui/view/defaultv/View.scala
Scala
agpl-3.0
5,353
package domain.modelgeneration /** * GraPHPizer source code analytics engine * Copyright (C) 2015 Martin Helmich <kontakt@martin-helmich.de> * * 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 Foundat...
martin-helmich/graphpizer-server
app/domain/modelgeneration/TypeResolver.scala
Scala
gpl-3.0
2,454
/* * Copyright 2011-2022 GatlingCorp (https://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
gatling/gatling
gatling-core/src/main/scala/io/gatling/core/check/jsonpath/JsonFilter.scala
Scala
apache-2.0
3,842
/* * Copyright 2013 Maurício Linhares * * Maurício Linhares licenses this file to you under the Apache License, * version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
outbrain/postgresql-async
mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/message/server/ColumnProcessingFinishedMessage.scala
Scala
apache-2.0
830
/** * Copyright 2017 Interel * * 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...
Interel-Group/core3
src/test/scala/core3/test/specs/unit/database/containers/QueryableContainer.scala
Scala
apache-2.0
7,560
/* * Copyright (c) 2012 Orderly Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/L...
keplar/piwik-data-archiver
src/main/scala/com/snowplowanalytics/snowpik/csv/LogVisitFile.scala
Scala
apache-2.0
2,098
package org.sisioh.aws4s.sts.model import com.amazonaws.services.securitytoken.model.{Credentials, GetSessionTokenResult, GetFederationTokenResult} import org.sisioh.aws4s.PimpedType class RichGetSessionTokenResult(val underlying: GetSessionTokenResult) extends AnyVal with PimpedType[GetSessionTokenResult] { ...
everpeace/aws4s
aws4s-sts/src/main/scala/org/sisioh/aws4s/sts/model/RichGetSessionTokenResult.scala
Scala
mit
539
/* * Copyright 2012 Atlassian PTY LTD * * 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...
simpleenergy/kadai
core/src/main/scala/kadai/TraversableOptionalSyntax.scala
Scala
apache-2.0
2,021
package com.seanshubin.detangler.analysis import com.seanshubin.detangler.model.Standalone class StringToStandaloneFunction(level: Int, includeStartsWithSeq: Seq[Seq[String]], excludeStartsWithSeq: Seq[Seq[String]], dro...
SeanShubin/detangler
analysis/src/main/scala/com/seanshubin/detangler/analysis/StringToStandaloneFunction.scala
Scala
unlicense
2,783
package japgolly.scalajs.react.internal object FacadeExports extends FacadeExports trait FacadeExports { final type Key = japgolly.scalajs.react.facade.React.Key }
japgolly/scalajs-react
coreGeneric/src/main/scala/japgolly/scalajs/react/internal/FacadeExports.scala
Scala
apache-2.0
168
/* * Copyright (c) 2015, Nightfall Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of conditions a...
Nightfall/Instrumentality
mc1710/src/main/scala/moe/nightfall/instrumentality/mc1710/PlayerInstance.scala
Scala
bsd-2-clause
13,017
/* * 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 ...
databricks/spark-tfocs
src/test/scala/org/apache/spark/mllib/optimization/tfocs/LinearOperatorSuite.scala
Scala
apache-2.0
3,991
/* * 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 ...
jackylk/incubator-carbondata
integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/allqueries/InsertIntoCarbonTableSpark2TestCase.scala
Scala
apache-2.0
1,514
/* * 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 ...
zzcclp/carbondata
integration/spark/src/test/scala/org/apache/carbondata/integration/spark/testsuite/dataload/TestLoadDataWithAutoLoadMerge.scala
Scala
apache-2.0
2,097
package com.eevolution.context.dictionary.infrastructure.repository import java.util.UUID import com.eevolution.context.dictionary.domain._ import com.eevolution.context.dictionary.domain.model.Window import com.eevolution.context.dictionary.infrastructure.db.DbContext._ import com.eevolution.utils.PaginatedSequence ...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/repository/WindowRepository.scala
Scala
gpl-3.0
2,629
//package scalan.examples // //import java.io.File // //import scalan._ //import scalan.compilation.{KernelStore, KernelType} //import scalan.linalgebra.{LADslExp, LADslStd, LADsl} // //trait Example4 extends Scalan with LADsl with LAUtils { // // lazy val mvm = fun { p: Rep[(Matrix[Double], Vector[Double])] => // ...
scalan/scalan-starter
scalan-starter-core/src/main/scala/scalan/examples/Demo4.scala
Scala
apache-2.0
2,384
/* * Copyright 2019 Google LLC 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 applicab...
GoogleCloudPlatform/professional-services
tools/bigquery-zos-mainframe-connector/src/main/scala/com/google/cloud/bqsh/cmd/Cp.scala
Scala
apache-2.0
3,331
package com.databricks.spark.sql.perf.mllib.data import scala.collection.mutable.ArrayBuffer import org.apache.spark.mllib.random.{PoissonGenerator, RandomDataGenerator} class ItemSetGenerator( val numItems: Int, val avgItemSetSize: Int) extends RandomDataGenerator[Array[String]] { assert(avgItemSetSize...
databricks/spark-sql-perf
src/main/scala/com/databricks/spark/sql/perf/mllib/data/ItemSetGenerator.scala
Scala
apache-2.0
1,816
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.core import java.io.File import java.nio.file._ import scala.util.Properties.jdkHome import org.ensime.util.file._ import org.ensime.util.path._ import org.ensime.util.e...
espinhogr/ensime-server
core/src/test/scala/org/ensime/core/CanonSpec.scala
Scala
gpl-3.0
2,184
/* * Copyright 2014–2020 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
slamdata/quasar
ejson/src/main/scala/quasar/ejson/EncodeEJson.scala
Scala
apache-2.0
3,182
package uk.co.pollett.scala import java.net.URL import com.gargoylesoftware.htmlunit.html.{DomNode, HtmlElement, HtmlPage} import com.gargoylesoftware.htmlunit.{BrowserVersion, WebClient} import scala.collection.JavaConversions._ object Main { def main(args: Array[String]) { val url = new URL("http://www.as...
pollett/scala
src/main/scala/uk/co/pollett/scala/Main.scala
Scala
mit
1,531
/* * 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/android/infoViewer/ApkInfoPanel.scala
Scala
epl-1.0
2,057
import sbt.Keys._ import sbt._ object SimpleCacheBuild extends Build { lazy val all = Project("simplecache-all", file(".")) aggregate ( core, ehcache, hibernate, memcached, memcached_spring ) dependsOn ( core, ehcache, hibernate, memcached, memcached_spring ) settings(commonSettings: _*) lazy...
guardian/simplecache
project/SimpleCacheBuild.scala
Scala
apache-2.0
1,735
/* * 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
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaRelation.scala
Scala
apache-2.0
3,875
package org.jetbrains.plugins.scala package lang.refactoring.ui import com.intellij.icons.AllIcons import com.intellij.psi.{PsiElement, PsiModifierList, PsiModifierListOwner} import com.intellij.refactoring.classMembers.MemberInfoModel import com.intellij.refactoring.ui.AbstractMemberSelectionTable import com.intellij...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/refactoring/ui/ScalaMemberSelectionTableBase.scala
Scala
apache-2.0
2,838
package com.github.aselab.activerecord.scalatra.sbt import com.github.aselab.sbt.Generator import com.github.aselab.activerecord.sbt._ import sbt._ import sbt.complete.DefaultParsers._ import mojolly.inflector.InflectorImports._ object ControllerGenerator extends Generator[(String, Seq[(String, String)])] { val na...
xdougx/scala-activerecord
scalatraSbt/src/main/scala/Generator.scala
Scala
mit
1,012
/* * Copyright 2008-present MongoDB, 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 ag...
rozza/mongo-java-driver
driver-scala/src/it/scala/org/mongodb/scala/syncadapter/package.scala
Scala
apache-2.0
920
/*********************************************************************** * Copyright (c) 2013-2019 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
elahrvivaz/geomesa
geomesa-index-api/src/main/scala/org/locationtech/geomesa/index/index/z2/Z2IndexKeySpace.scala
Scala
apache-2.0
6,931
// Copyright (c) 2016 PSForever.net to present package net.psforever class ObjectFinalizedException(msg : String) extends Exception(msg) trait IFinalizable { var closed = false def close = { closed = true } def assertNotClosed = { if(closed) throw new ObjectFinalizedException(this.getClass.get...
Fate-JH/PSF-Server
common/src/main/scala/net/psforever/IFinalizable.scala
Scala
gpl-3.0
529
package com.github.vitalsoftware.scalaredox.models import org.joda.time.DateTime import com.github.vitalsoftware.util.JsonImplicits.jodaISO8601Format import com.github.vitalsoftware.macros._ import com.github.vitalsoftware.util.RobustPrimitives trait Medication extends DateRange { /** Dose The size of the dose for ...
vital-software/scala-redox
src/main/scala/com/github/vitalsoftware/scalaredox/models/Medication.scala
Scala
mit
4,666
package net.xylophones.planetoid.game.logic import net.xylophones.planetoid.game.model.{RoundCountdownTimer, GameModel, GameModelUpdateResult, GameEvent} class RoundStartCountdownUpdater(currentTimeSource: CurrentTimeSource) { def updateRoundTimer(model: GameModel) = { val timer = model.roundTimer val now...
wjsrobertson/planetoid3d
game/src/main/scala/net/xylophones/planetoid/game/logic/RoundStartCountdownUpdater.scala
Scala
apache-2.0
943
/* * 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 ...
michaelzzh/LF_PredictionIO
core/src/main/scala/org/apache/predictionio/core/SelfCleaningDataSource.scala
Scala
apache-2.0
9,903
/* * Copyright 2019 ABSA Group Limited * * 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...
AbsaOSS/spline
consumer-services/src/main/scala/za/co/absa/spline/consumer/service/model/Operation.scala
Scala
apache-2.0
1,325
package domala.internal.reflect.util import java.lang.reflect.Method import org.seasar.doma.internal.WrapException import org.seasar.doma.internal.util.AssertionUtil.assertNotNull object ClassUtil { def getDeclaredMethod[T](clazz: Class[T], name: String, parameterTypes: Class[_]*): Method = { assertNotNull(cla...
bakenezumi/domala
core/src/main/scala/domala/internal/reflect/util/ClassUtil.scala
Scala
apache-2.0
792
/* * 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 ...
bwsw/sj-platform
core/sj-regular-streaming-engine/src/main/scala/com/bwsw/sj/engine/regular/RegularTaskRunner.scala
Scala
apache-2.0
3,076
package com.wix.fax.phaxio import com.google.api.client.http.HttpRequestFactory import com.wix.fax.FaxErrorException import com.wix.fax.model.{Fax, Status} import com.wix.fax.phaxio.model.{Status => PhaxioStatus} import scala.collection.mutable import scala.concurrent.duration.Duration import scala.util.{Fai...
wix/libfax
libfax-phaxio/src/main/scala/com/wix/fax/phaxio/PhaxioFax.scala
Scala
apache-2.0
2,493
/* * 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 ...
myfleetingtime/spark2.11_bingo
core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedClusterMessage.scala
Scala
apache-2.0
4,671
package io.youi import scala.util.Random /** * Color provides a primitive wrapper around a Long representing a Color. This class takes up no more memory space than * a `Long` value and can be used to work powerfully around RGBA values. */ class Color private(val value: Long) extends AnyVal { def red: Double =...
outr/youi
core/shared/src/main/scala/io/youi/Color.scala
Scala
mit
16,962
package recfun import common._ import scala.collection.immutable.Stack object Main { def main(args: Array[String]) { println("Pascal's Triangle") for (row <- 0 to 10) { for (col <- 0 to row) print(pascal(col, row) + " ") println() } } /** * Exercise 1 */ def pascal(c: Int...
alex-learn/functional-programming-principles
assignment1/recfun/src/main/scala/recfun/Main.scala
Scala
apache-2.0
1,056
package me.m1key.audioliciousmigration.repository import me.m1key.audiolicious.domain.entities.Library trait LibraryRepository { def getLibrary(libraryUuid: String): Option[Library] def getLatestLibrary: Option[Library] }
m1key/audiolicious-migration
src/main/scala/me/m1key/audioliciousmigration/repository/LibraryRepository.scala
Scala
gpl-3.0
228
/* * 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
core/src/main/scala/org/apache/spark/util/AkkaUtils.scala
Scala
apache-2.0
9,609
/* * Copyright 2011-2014 Chris de Vreeze * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
EBPI/yaidom
src/main/scala/nl/ebpi/yaidom/utils/package.scala
Scala
apache-2.0
909
package com.sksamuel.scapegoat.inspections import com.sksamuel.scapegoat.{Inspection, Levels, Reporter} import scala.reflect.runtime._ /** @author Stephen Samuel * This inspection was inspired by http://p5wscala.wordpress.com/scalaprocessing-gotchas/#t2 * */ class CollectionPromotionToAny extends Inspect...
RichardBradley/scapegoat
src/main/scala/com/sksamuel/scapegoat/inspections/CollectionPromotionToAny.scala
Scala
apache-2.0
1,488
/** * 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...
noslowerdna/kafka
core/src/test/scala/unit/kafka/admin/LeaderElectionCommandTest.scala
Scala
apache-2.0
10,062
/* * Copyright (C) 2016-2017 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.maven import java.io.File import javax.inject.{ Inject, Singleton } import com.lightbend.lagom.core.LagomVersion import com.lightbend.lagom.dev.PortAssigner.{ Port, PortRange, ProjectName } import com.lightbend.la...
edouardKaiser/lagom
dev/maven-plugin/src/main/scala/com/lightbend/lagom/maven/ServiceManager.scala
Scala
apache-2.0
11,172
package org.hqjpa.generator /** * Helper methods for generators.<br/> * <br/> * Static members are thread safe, instance members are not. */ object GeneratorUtil { /** * Tell if given type name is not an entity type name. * @param typeName Type name to examine. * @return True if yes, false if no. */ def...
vejobrolis/hqjpa
hqjpa/src/org/hqjpa/generator/GeneratorUtil.scala
Scala
lgpl-3.0
1,218
/* * Copyright 2017-2020 47 Degrees Open Source <https://www.47deg.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
frees-io/freestyle-rpc
modules/tests/src/test/scala/higherkindness/mu/rpc/common/SC.scala
Scala
apache-2.0
758
import stainless.annotation._ trait AccessorFlags { @ghost var x: BigInt }
epfl-lara/stainless
frontends/benchmarks/extraction/valid/AccessorFlags.scala
Scala
apache-2.0
78
package controllers import play.api.libs.json._ import play.api.mvc._, Results._ import lila.api.Context import lila.app._ import lila.plan.{ StripeCustomer, MonthlyCustomerInfo, OneTimeCustomerInfo } import lila.user.{ User => UserModel, UserRepo } import views._ object Plan extends LilaController { private val ...
clarkerubber/lila
app/controllers/Plan.scala
Scala
agpl-3.0
5,475
package mimir.algebra; import scala.reflect.runtime.universe._ import java.sql._; import mimir.util._; class TypeException(found: Type.T, expected: Type.T, context:String) extends Exception( "Type Mismatch ["+context+ "]: found "+found.toString+ ", but expected "+expected.toStrin...
sophieyoung717/mimir
src/main/scala/mimir/algebra/Expression.scala
Scala
apache-2.0
11,855
/* * Copyright 2014-2016 Panavista Technologies 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 applicab...
ndwade/def-trade
db/src/test/scala/io/deftrade/db/RepositorySpec.scala
Scala
apache-2.0
6,609
package scalanlp.stats.distributions /* Copyright 2009 David Hall, Daniel Ramage Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requir...
MLnick/scalanlp-core
learn/src/test/scala/scalanlp/stats/distributions/UniformTest.scala
Scala
apache-2.0
1,164
/* sbt -- Simple Build Tool * Copyright 2011 Mark Harrah */ package sbt import java.io.File import java.net.URI // in all of these, the URI must be resolved and normalized before it is definitive /** Identifies a project or build. */ sealed trait Reference /** A fully resolved, unique identifier for a project o...
kuochaoyi/xsbt
main/Reference.scala
Scala
bsd-3-clause
2,242
package im.mange.driveby.conditions import im.mange.driveby.browser.UnSafeBrowser import im.mange.driveby.{By, Condition, Describer} case class ElementHidden(by: By) extends Condition { import Describer._ def expectation = expect("ElementHidden", List(by.toString)) def isSatisfied(browser: UnSafeBrowser) = { b...
alltonp/driveby
src/main/scala/im/mange/driveby/conditions/ElementHidden.scala
Scala
apache-2.0
491
/******************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright (c) 2013,2014 by Peter Pilgrim, Addiscombe, Surrey, XeNoNiQUe UK * * All rights reserved. This program and the accompanying materials * are made available under...
peterpilgrim/digital-scala-javaone-2014
src/test/scala/uk/co/xenonique/digitalone/GradleDependencyTest.scala
Scala
gpl-3.0
1,576
package com.gilesc import java.util.UUID package object mynab { case class UserId(value: Long) extends AnyVal case class CategoryName(value: String) extends AnyVal case class CategoryGroupId(value: Long) extends AnyVal case class CategoryGroup(id: CategoryGroupId, userId: UserId, name: CategoryName) case ...
CraigGiles/mynab
domain/src/main/scala/com/gilesc/mynab/package.scala
Scala
mit
2,096
package no.antares.utils /* XmlStreamerTest.scala Copyright 2011 Tommy Skodje (http://www.antares.no) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licen...
2my/test-data-control
src/test/scala/no/antares/utils/XmlStreamerTest.scala
Scala
apache-2.0
1,687
package net.gnmerritt.tetris.player import java.io.{ByteArrayInputStream, ByteArrayOutputStream} import net.gnmerritt.tetris.UnitSpec /** * Test bot IO and printing */ class BotTest extends UnitSpec { val defaultBrain = new Brain "The line handler" should "handle bad input gracefully" in { val (out, err) ...
gnmerritt/aig-tetris
src/test/scala/net/gnmerritt/tetris/player/BotTest.scala
Scala
mit
1,952
/*-------------------------------------------------------------------------*\\ ** ScalaCheck ** ** Copyright (c) 2007-2021 Rickard Nilsson. All rights reserved. ** ** http://www.scalacheck.org ** ** ...
rickynils/scalacheck
jvm/src/test/scala-2.13+/org/scalacheck/time/OrderingVersionSpecific.scala
Scala
bsd-3-clause
848
package com.getjenny.starchat.entities.persistents import java.util import com.getjenny.starchat.entities.io.DTDocumentStatus import com.getjenny.starchat.utils.Base64 import org.elasticsearch.action.get.GetResponse import org.elasticsearch.action.search.SearchResponse import org.elasticsearch.search.SearchHit import...
GetJenny/starchat
src/main/scala/com/getjenny/starchat/entities/persistents/DecisionTableItem.scala
Scala
gpl-2.0
5,034
package antike import scala.collection.immutable.Queue import org.scalacheck._ import org.scalacheck.Prop.forAll object AStarTest extends Properties(AStar.getClass.toString) { type Square = (Int, Int) def nextKnightPos(s: Square): List[Square] = { val moves = List((1, 2), (1, -2), (-1, 2), (-1, -2), (2, 1), ...
OlivierBlanvillain/Antike
src/test/scala/AStarTest.scala
Scala
mit
2,020
package com.nthportal.extrapredef import scala.concurrent.Future import scala.language.implicitConversions import scala.util.Try /** * An extra `Predef` which has more methods and implicit classes than [[scala.Predef]]. */ trait ExtraPredef extends VersionSpecificExtraPredef { import ExtraPredef._ /** * Tes...
NthPortal/extra-predef
src/main/scala/com/nthportal/extrapredef/ExtraPredef.scala
Scala
apache-2.0
10,362
package org.scalatest.examples.spec.tagging import org.scalatest._ class SetSpec extends Spec { object `A Set` { object `when empty` { @SlowTest def `should have size 0` { assert(Set.empty.size === 0) } @SlowTest @DbTest def `should produce NoSuchElementException w...
hubertp/scalatest
examples/src/main/scala/org/scalatest/examples/spec/tagging/SetSpec.scala
Scala
apache-2.0
441
package service import scala.concurrent.Future /** * Base Dao */ trait BaseDao[T, K] { def add(x: T): Future[_] def fetch(k: K): Future[Option[_]] def fetchAll: Future[Iterable[_]] def update(x: T): Future[_] def remove(k: K): Future[_] }
sczyh30/samsara-aquarius
app/service/BaseDao.scala
Scala
mit
260
/* Copyright 2009-2011 Jay Conrod * * This file is part of Tungsten. * * Tungsten 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 of * the License, or (at your option) any late...
jayconrod/tungsten
llvm/src/main/scala/tungsten/llvm/Type.scala
Scala
gpl-2.0
2,264
/* * Copyright 2019 Spotify AB. * * 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 ...
spotify/scio
scio-core/src/main/scala/com/spotify/scio/coders/instances/ProtobufCoders.scala
Scala
apache-2.0
1,138
/******************************************************************************* * Copyright (c) 2019. Carl Minden * * 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 ...
carlminden/anathema-roguelike
src/com/anathema_roguelike/main/display/RenderSurface.scala
Scala
gpl-3.0
4,747
package com.twitter.finagle.loadbalancer.aperture import com.twitter.conversions.DurationOps._ import com.twitter.finagle.Address.Inet import com.twitter.finagle._ import com.twitter.finagle.loadbalancer.{EndpointFactory, FailingEndpointFactory, NodeT} import com.twitter.finagle.stats.{InMemoryStatsReceiver, NullStats...
luciferous/finagle
finagle-core/src/test/scala/com/twitter/finagle/loadbalancer/aperture/ApertureTest.scala
Scala
apache-2.0
13,824
package codegen.functions import codegen.Constants object FunctionGenerator { /** * Generates the strings necessary to declare and define a C function * based on the given definition * @param definition Definition of function to generate * @return CFunction object containing the strings to declare ...
gatkin/cDTO
src/main/scala/codegen/functions/FunctionGenerator.scala
Scala
mit
3,831
/*********************************************************************** * 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-convert/geomesa-convert-common/src/main/scala/org/locationtech/geomesa/convert/EvaluationContext.scala
Scala
apache-2.0
5,610
package com.twitter.finagle.tracing import com.twitter.finagle.util.LoadService import com.twitter.util.{Duration, Time, TimeFormat} import java.net.InetSocketAddress import java.nio.ByteBuffer import java.util.logging.Logger private[tracing] object RecordTimeFormat extends TimeFormat("MMdd HH:mm:ss.SSS") object R...
lukiano/finagle
finagle-core/src/main/scala/com/twitter/finagle/tracing/Tracer.scala
Scala
apache-2.0
6,392
package lila.rating import chess.Centis import chess.Speed sealed abstract class PerfType( val id: Int, val key: String, val name: String, val title: String, val iconChar: Char ) { def iconString = iconChar.toString } object PerfType { case object UltraBullet extends PerfType( ...
ornicar/lichess-db
src/main/scala/lila/PerfType.scala
Scala
agpl-3.0
4,974
/* Copyright 2014 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
wanyifu/scaldingtest
scalding-hadoop-test/src/main/scala/com/twitter/scalding/platform/HadoopPlatformJobTest.scala
Scala
apache-2.0
3,725
package ch4 import scala.annotation.tailrec import Option._ import Helpers._ object Exercise4 { def map2[A,B,C](a: Option[A], b: Option[B])(f: (A, B) => C): Option[C] = for { a1 <- a b1 <- b } yield f(a1, b1) def sequence[A](a: List[Option[A]]): Option[List[A]] = a.foldRight[Option[List[A]]](S...
rucka/fpinscala
src/main/scala/fpinscala/ch4/Exercise4.scala
Scala
gpl-2.0
523
package me.frmr.punerator.comet import net.liftweb.json._ import Extraction._ import net.liftweb.http.js._ import JE._ import org.bson.types._ class SimpleJsEvent(eventName:String) extends JsCmd { import Serialization._ implicit def typeHints = Serialization.formats(NoTypeHints) + new Serializer[ObjectId] {...
farmdawgnation/punerator
src/main/scala/me/frmr/punerator/comet/JsEvent.scala
Scala
apache-2.0
964
package com.seanshubin.detangler.report import org.scalatest.FunSuite class ReasonsTemplateRulesTest extends FunSuite { test("reasons") { //given val reasonsTemplateText = """<div class="reasons append-reason"> | <div class="reason append-reasons"> | <a class="from" href="">from</a...
SeanShubin/detangler
report/src/test/scala/com/seanshubin/detangler/report/ReasonsTemplateRulesTest.scala
Scala
unlicense
1,965
package rxgpio.examples import rx.lang.scala.Observable import rxgpio._ import rxgpio.pigpio.PigpioLibrary import scala.concurrent.duration.DurationInt import scala.util.Success /** * */ object Flasher extends App { import rxgpio.Gpio.Implicits._ DefaultInitializer.gpioInitialise() match { case S...
jw3/pigpio4s
examples/src/main/scala/rxgpio/examples/Flasher.scala
Scala
apache-2.0
717
/* * 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 ...
goldmedal/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/Source.scala
Scala
apache-2.0
3,475