code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
package com.avsystem.scex.parsing import scala.annotation.nowarn import scala.collection.immutable.SortedMap /** * Created: 24-10-2013 * Author: ghik */ trait PositionMapping { def apply(pos: Int): Int def reverse: PositionMapping def compose(other: PositionMapping): PositionMapping = if (this eq Em...
AVSystem/scex
scex-core/src/main/scala/com/avsystem/scex/parsing/PositionMapping.scala
Scala
mit
3,533
/* * 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-dsl/src/main/scala/com/websudos/phantom/builder/query/TruncateQuery.scala
Scala
bsd-2-clause
2,710
package com.zobot.client.packet.definitions.clientbound.play import com.zobot.client.packet.Packet case class UnlockRecipes(count: Int, entityIds: Any) extends Packet { override lazy val packetId = 0x32 override lazy val packetData: Array[Byte] = fromVarInt(count) ++ fromAny(entityIds) }
BecauseNoReason/zobot
src/main/scala/com/zobot/client/packet/definitions/clientbound/play/UnlockRecipes.scala
Scala
mit
304
package functional import java.sql.Date.{valueOf => date} import play.api.{Application => PlayApp} import play.api.test._ import play.api.test.Helpers._ import play.api.i18n.MessagesApi import play.api.i18n.{Lang, Messages, MessagesImpl, MessagesProvider} import java.time.Instant import play.api.inject.guice.GuiceAppl...
ruimo/store2
test/functional/UserGroupMaintenanceSpec.scala
Scala
apache-2.0
7,844
package com.amichalo.mooolelo.api.util import akka.http.scaladsl.server.PathMatchers.{Segment, LongNumber} import akka.http.scaladsl.server._ import com.amichalo.mooolelo.domain.{ServiceGroup, ServiceType, ServiceId} trait PathMatchers { val ServiceIdMatcher: PathMatcher1[ServiceId] = { LongNumber map { value ...
amichalo/mooolelo
src/main/scala/com/amichalo/mooolelo/api/util/PathMatchers.scala
Scala
apache-2.0
563
package lila.round import reactivemongo.bson._ import lila.db.BSON.BSONJodaDateTimeHandler import lila.db.Implicits._ import org.joda.time.DateTime import chess.format.UciMove import chess.Pos import Forecast.Step import lila.game.{ Pov, Game } final class ForecastApi(coll: Coll) { private implicit val PosBSONHa...
r0k3/lila
modules/round/src/main/ForecastApi.scala
Scala
mit
2,591
package org.jetbrains.plugins.scala package annotator package template import org.jetbrains.plugins.scala.annotator.AnnotatorPart import com.intellij.lang.annotation.AnnotationHolder import lang.psi.api.toplevel.typedef.ScTrait object TraitHasImplicitBound extends AnnotatorPart[ScTrait] { def kind = classOf[ScTrait...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/annotator/template/TraitHasImplicitBound.scala
Scala
apache-2.0
929
/* * The MIT License (MIT) * <p> * Copyright (c) 2020 * <p> * 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...
amannocci/streamy
plugin-gelf/src/main/scala/io/techcode/streamy/gelf/component/GelfTransformer.scala
Scala
mit
2,365
/* * Copyright 2018 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/worldpay-downloader
test/support/steps/HealthCheckSteps.scala
Scala
apache-2.0
1,764
package com.avsystem.scex package compiler /** * Created: 20-10-2014 * Author: ghik */ class ValueRoot[V](val value: V)
AVSystem/scex
scex-core/src/test/scala/com/avsystem/scex/compiler/ValueRoot.scala
Scala
mit
124
package com.zobot.client.packet.definitions.serverbound.play import com.zobot.client.packet.Packet case class ClientSettings(locale: String, viewDistance: Any, chatMode: Int, chatColors: Any, displayedSkinParts: Any, mainHand: Int) extends Packet { override lazy val packetId = 0x04 override lazy val packetData: ...
BecauseNoReason/zobot
src/main/scala/com/zobot/client/packet/definitions/serverbound/play/ClientSettings.scala
Scala
mit
509
package ch.epfl.scala.index package server package routes import com.softwaremill.session.SessionDirectives._ import com.softwaremill.session.SessionOptions._ import com.softwaremill.session.CsrfDirectives._ import com.softwaremill.session.CsrfOptions._ import akka.http.scaladsl._ import model._ import Uri.Query impo...
adamwy/scaladex
server/src/main/scala/ch.epfl.scala.index.server/routes/Oauth2.scala
Scala
bsd-3-clause
2,278
/* * 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
core/src/main/scala/org/apache/spark/scheduler/TaskResultGetter.scala
Scala
apache-2.0
7,415
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. package ducttape.hyperdag.meta import ducttape.hyperdag.PackedVertex import ducttape.hyperdag.HyperEdge import ducttape.hyp...
jhclark/ducttape
src/main/scala/ducttape/hyperdag/meta/UnpackedMetaVertex.scala
Scala
mpl-2.0
3,140
/* * Copyright 2013 http4s.org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
http4s/http4s
core/shared/src/main/scala/org/http4s/headers/Last-Event-Id.scala
Scala
apache-2.0
1,269
package spatutorial.client.components import diode.react.ReactPot._ import diode.react._ import diode.data.Pot import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.prefix_<^._ import spatutorial.client.components.Bootstrap._ import spatutorial.client.services.UpdateMotd /** * This is a simple componen...
vmunier/scalajs-spa-tutorial
client/src/main/scala/spatutorial/client/components/Motd.scala
Scala
apache-2.0
1,176
package com.github.gdefacci.briscola.presentation.competition import com.github.gdefacci.briscola.{ competition => model } import com.github.gdefacci.briscola.web.util.ArgonautHelper.{ enumDecoder, fromMap } import argonaut.DecodeJson import argonaut.DecodeResult object CompetitionJsonDecoders { import com.githu...
gdefacci/briscola
ddd-briscola-web/src/main/scala/com/github/gdefacci/briscola/presentation/competition/CompetitionJsonDecoders.scala
Scala
bsd-3-clause
2,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 may ...
shaneknapp/spark
mllib/src/test/scala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala
Scala
apache-2.0
34,428
package com.twitter.util.tunable.linter import com.twitter.app.App import com.twitter.util.{Throw, Return} import com.twitter.util.tunable.JsonTunableMapper import java.nio.file.Paths object ConfigurationLinter extends App { def main(): Unit = { var allSucceeded = true println("\nValidating TunableMap co...
twitter/util
util-tunable/src/main/scala/com/twitter/util/tunable/linter/ConfigurationLinter.scala
Scala
apache-2.0
1,040
package scutil.lang import minitest._ import scutil.core.implicits._ object EitherTest extends SimpleTestSuite { test("Either should do successful ap") { val func:Either[String,Int=>Int] = Either right (_ * 2) val value:Either[String,Int] = Either right 7 assertEquals( func ap value, Right(14) ) } ...
ritschwumm/scutil
modules/core/src/test/scala/scutil/lang/EitherTest.scala
Scala
bsd-2-clause
693
package ru.pavlenov.scala.utils /** * ⓭ + 44 * Какой сам? by Pavlenov Semen 05.07.14. * ${TITLE} * ${URL} * * ${GIVEN} * ${RETURN} */ object Comb { /** * Считаем число Каталана * С[n+1] = (2*(2*n+1)/(n+2))*C[n] * * @param n * @return */ def catalan(n: Int): BigInt = { var c: BigInt =...
laser13/rosalind
src/scala/ru/pavlenov/scala/utils/Comb.scala
Scala
apache-2.0
4,091
package io.pivotal.gemfire.spark.connector.internal import java.net.InetAddress import com.gemstone.gemfire.cache.client.{ClientCache, ClientCacheFactory, ClientRegionShortcut} import com.gemstone.gemfire.cache.execute.{FunctionException, FunctionService} import com.gemstone.gemfire.cache.query.Query import com.gemst...
ysung-pivotal/incubator-geode
gemfire-spark-connector/gemfire-spark-connector/src/main/scala/io/pivotal/gemfire/spark/connector/internal/DefaultGemFireConnection.scala
Scala
apache-2.0
6,813
package twitter4s.response import http.client.request.{CompletionEvaluation, HttpRequest} import http.client.response.HttpResponse import play.api.libs.json.JsSuccess /** Keeps scrolling so long as the next_cursor is greater than zero. */ object TwitterEmptyNextCursorCompletionEvaluation extends CompletionEvaluation...
SocialOrra/social4s
twitter4s/src/main/scala/twitter4s/response/TwitterEmptyNextCursorCompletionEvaluation.scala
Scala
apache-2.0
581
/* * Seldon -- open source prediction engine * ======================================= * Copyright 2011-2015 Seldon Technologies Ltd and Rummble Ltd (http://www.seldon.io/) * ********************************************************************************************** * * Licensed under the Apache License, Vers...
Seichis/seldon-server
offline-jobs/spark/src/main/scala/io/seldon/spark/topics/CreateNextItemFeatures.scala
Scala
apache-2.0
13,276
/* * 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/spark/testsuite/datacompaction/MajorCompactionWithMeasureSortColumns.scala
Scala
apache-2.0
4,010
package gitbucket.core.controller import java.net.URI import com.nimbusds.oauth2.sdk.id.State import com.nimbusds.openid.connect.sdk.Nonce import gitbucket.core.helper.xml import gitbucket.core.model.Account import gitbucket.core.service._ import gitbucket.core.util.Implicits._ import gitbucket.core.util.SyntaxSugars...
x-way/gitbucket
src/main/scala/gitbucket/core/controller/IndexController.scala
Scala
apache-2.0
8,774
/* * Copyright 2014–2018 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...
jedesah/Quasar
connector/src/main/scala/quasar/qscript/qsu/QScriptUniform.scala
Scala
apache-2.0
29,101
package com.lucaongaro.similaria.lmdb import scala.language.implicitConversions import java.nio.ByteBuffer // A class to serialize/deserialize occurrency counts with an active flag. // Since counts can only be positive, the sign is used for the active flag: // positive means active, negative means inactive. case clas...
lucaong/similaria
src/main/scala/com/lucaongaro/similaria/lmdb/CountMuted.scala
Scala
mit
836
package org.bidpulse import akka.actor.Actor import spray.routing._ import spray.http._ import MediaTypes._ // we don't implement our route structure directly in the service actor because // we want to be able to test it independently, without having to spin up an actor class ServiceActor extends Actor with Service {...
EugenyLoy/BidPulse
src/main/scala/org/bidpulse/Service.scala
Scala
mit
1,114
package dao import javax.inject.{Inject, Singleton} import models.{NewEvent, Event} import play.modules.reactivemongo.ReactiveMongoApi import play.modules.reactivemongo.json.collection.JSONCollection import play.api.libs.json._ import play.api.libs.concurrent.Execution.Implicits.defaultContext import reactivemongo.api...
siz-io/siz-api
app/dao/EventDao.scala
Scala
isc
1,313
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.lsp.api.commands import org.ensime.lsp.api.types._ import spray.json._ import scalaz.deriving object TextDocumentSyncKind { /** * Documents should not be synced at...
ensime/ensime-server
lsp/src/main/scala/org/ensime/lsp/api/commands.scala
Scala
gpl-3.0
8,934
package net.liftmodules import org.specs2.mutable.Specification object FoBoPopAPISpec extends Specification { "FoBoPopAPISpec Specification".title sequential }
karma4u101/FoBo
Popper/Popper-API/src/test/scala/net/liftmodules/fobopop/FoBoPopAPISpec.scala
Scala
apache-2.0
168
/* * 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 ...
WindCanDie/spark
core/src/main/scala/org/apache/spark/ui/ConsoleProgressBar.scala
Scala
apache-2.0
4,527
package com.tirthal.learning.scala.functional // See it in action -> Option-Some-None for Functional error handling // 'Some' and 'None' both are the children of 'Option' type object ErrorHandlingUsingOptionSomeNone extends App { // Use the 'Option' type to return a value from a function that can be null // Wraps...
tirthalpatel/Learning-Scala
ScalaQuickStart/src/main/scala/com/tirthal/learning/scala/functional/ErrorHandlingUsingOptionSomeNone.scala
Scala
mit
890
/** * 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...
guozhangwang/kafka
core/src/main/scala/kafka/server/AclApis.scala
Scala
apache-2.0
6,922
import scala.reflect.runtime.universe._ import scala.reflect.runtime.{universe => ru} import scala.reflect.runtime.{currentMirror => cm} import scala.tools.reflect.{ToolBox, mkSilentFrontEnd} object Test extends App { val toolbox = cm.mkToolBox(options = "-deprecation", frontEnd = mkSilentFrontEnd()) toolbox.eval(...
lampepfl/dotty
tests/disabled/macro/run/toolbox_silent_reporter.scala
Scala
apache-2.0
613
/* * 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 ...
aljoscha/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/batch/BatchPhysicalLegacyTableSourceScan.scala
Scala
apache-2.0
2,585
package filodb.coordinator import java.util.concurrent.atomic.{AtomicBoolean, AtomicReference} import scala.collection.immutable import scala.concurrent.{Await, Future} import scala.concurrent.duration._ import akka.Done import akka.actor._ import akka.cluster._ import akka.cluster.ClusterEvent._ import akka.util.Ti...
filodb/FiloDB
coordinator/src/main/scala/filodb.coordinator/FilodbCluster.scala
Scala
apache-2.0
11,299
package ee.cone.c4ui import java.net.URL import java.util.UUID import ee.cone.c4actor_branch.BranchTypes.BranchKey import ee.cone.c4actor.LEvent.{delete, update} import ee.cone.c4actor.Types.SrcId import ee.cone.c4actor._ import ee.cone.c4actor_branch._ import ee.cone.c4assemble.Types.{Each, Values} import ee.cone.c4...
conecenter/c4proto
base_lib/src/main/scala/ee/cone/c4ui/AlienExchangeImpl.scala
Scala
apache-2.0
3,474
package test import dotty.tools.dotc.core._ import dotty.tools.dotc.core.Contexts._ import dotty.tools.dotc.core.Symbols._ import dotty.tools.dotc.core.Flags._ import Types._, Symbols._, Decorators._ import dotty.tools.dotc.printing.Texts._ import dotty.tools.dotc.reporting.ConsoleReporter import dotty.tools.dotc.core...
DarkDimius/dotty
test/test/DottyTest.scala
Scala
bsd-3-clause
2,407
package modules import com.google.inject.{ AbstractModule, Provides } import models.Thing import models.daos._ import services.ThingService import services.impl.ThingServiceImpl import net.codingwell.scalaguice.ScalaModule import play.api.Configuration import play.api.libs.concurrent.Execution.Implicits._ class Ideen...
sne11ius/ideen
app/modules/IdeenModule.scala
Scala
gpl-3.0
518
package me.sgrouples.rogue.cc.macros import java.util.concurrent.atomic.AtomicInteger import me.sgrouples.rogue.cc.{Marker, NamesResolver} import shapeless.tag import shapeless.tag.@@ import scala.collection.mutable trait MacroNamesResolver[T] extends NamesResolver { private var resolved: Boolean = false privat...
sgrouples/rogue-fsqio
cc/src/main/scala/me/sgrouples/rogue/cc/macros/MacroNamesResolver.scala
Scala
apache-2.0
1,938
package controllers import play.api.mvc.{Controller, Action} object OptionsController extends Controller { def options(path: String) = Action { implicit request => // Access-Control headers are handled by the CORSFilter, so we just reply OK Ok } }
statwarn/alerting-api
app/controllers/OptionsController.scala
Scala
mit
270
/* * Copyright (c) 2014-2021 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...
monixio/monix
monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CharsReaderObservableSuite.scala
Scala
apache-2.0
12,033
package gitbucket.core.model trait AccountFederationComponent { self: Profile => import profile.api._ lazy val AccountFederations = TableQuery[AccountFederations] class AccountFederations(tag: Tag) extends Table[AccountFederation](tag, "ACCOUNT_FEDERATION") { val issuer = column[String]("ISSUER") val s...
McFoggy/gitbucket
src/main/scala/gitbucket/core/model/AccountFederation.scala
Scala
apache-2.0
728
package guiobjects import communication.PlayerClient import gamelogic.{GameAction, GameEvents, GameState} import gui._ /** * This represents a Player sitting at the table. */ class PlayerFrame(val player: String, playerClient: PlayerClient) extends Frame(UIParent) { setWidth(200) setHeight(50) ...
sherpal/oh-hell-card-game
gameplaying/src/main/scala/guiobjects/PlayerFrame.scala
Scala
mit
3,955
/* * 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
streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala
Scala
apache-2.0
20,112
package ml.combust.mleap.runtime.transformer.feature import ml.combust.mleap.core.feature.MathUnaryModel import ml.combust.mleap.core.feature.UnaryOperation.Sin import ml.combust.mleap.core.types._ import ml.combust.mleap.runtime.frame.{DefaultLeapFrame, Row} import org.scalatest.FunSpec /** * Created by hollinwilk...
combust/mleap
mleap-runtime/src/test/scala/ml/combust/mleap/runtime/transformer/feature/MathUnarySpec.scala
Scala
apache-2.0
1,171
package controllers.circs.report_changes import controllers.CarersForms._ import controllers.mappings.Mappings._ import models.domain.CircumstancesStoppedCaring import models.view.{CachedChangeOfCircs, Navigable} import play.api.Play._ import play.api.data.Form import play.api.data.Forms._ import play.api.mvc.Controll...
Department-for-Work-and-Pensions/ClaimCapture
c3/app/controllers/circs/report_changes/GPermanentlyStoppedCaring.scala
Scala
mit
1,497
/* * Copyright (c) 2014-2022 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
snowplow/schema-ddl
modules/core/src/main/scala/com.snowplowanalytics/iglu.schemaddl/jsonschema/properties/ObjectProperty.scala
Scala
apache-2.0
2,592
// 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.active import edu.jhu.hlt.parma.types._ import edu.jhu.hlt.parma.util._ import java.io.Fil...
hltcoe/parma
src/main/scala/edu/jhu/hlt/parma/active/InteractiveLearner.scala
Scala
bsd-2-clause
2,667
package redis.commands import redis._ import scala.concurrent.Future import redis.api.strings._ import redis.api._ trait Strings extends Request { def append[V: ByteStringSerializer](key: String, value: V): Future[Long] = send(Append(key, value)) def bitcount(key: String): Future[Long] = send(Bitcount(k...
272029252/rediscala
src/main/scala/redis/commands/Strings.scala
Scala
apache-2.0
3,249
/* * Copyright 2016 Dennis Vriend * * 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...
dnvriend/demo-akka-persistence-jdbc
src/main/scala/com/github/dnvriend/adapter/WrapperEventAdapter.scala
Scala
apache-2.0
1,023
/* * 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 ...
wangmiao1981/spark
core/src/main/scala/org/apache/spark/ui/ToolTips.scala
Scala
apache-2.0
4,434
/* * The MIT License (MIT) * <p/> * Copyright (c) 2016 SWEeneyThreads * <p/> * 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 right...
SweeneyThreads/Actorbase
src/main/scala/server/utils/fileManagerLibrary/RemoveStrategy.scala
Scala
mit
1,702
package models.addons import scalaz._ import Scalaz._ import scalaz.effect.IO import scalaz.Validation import scalaz.Validation.FlatMap._ import scalaz.NonEmptyList._ import cache._ import db._ import models.Constants._ import models.json.tosca._ import models.tosca.{ KeyValueField, KeyValueList} import io.megam.auth...
indykish/verticegateway
app/models/addons/Addons.scala
Scala
mit
5,440
/** * Copyright (C) 2013 Carnegie Mellon University * * 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 appl...
twmarshall/tdb
core/src/main/scala/tdb/list/DoubleChunkList.scala
Scala
apache-2.0
4,067
package genetic.main import java.io.IOException import java.nio.charset.StandardCharsets import java.nio.file.{Files, Paths} import java.util.{ArrayList, Random, Scanner} import genetic.analysys.{Analysis, Benchmark} import genetic.baldwin.BaldwinMain import genetic.func.{Func, GeneticFuncMain, HoldersTableFunction, ...
NightRa/AILab
Genetic/src/main/scala/genetic/main/UserMain.scala
Scala
apache-2.0
21,659
package pl.touk.nussknacker.engine.lite.kafka import com.dimafeng.testcontainers._ import com.typesafe.scalalogging.LazyLogging import org.scalatest.{FunSuite, Matchers} import pl.touk.nussknacker.test.{EitherValuesDetailedMessage, ExtremelyPatientScalaFutures} import sttp.client.asynchttpclient.future.AsyncHttpClient...
TouK/nussknacker
engine/lite/kafka/integration-test/src/it/scala/pl/touk/nussknacker/engine/lite/kafka/NuKafkaRuntimeDockerProbesTest.scala
Scala
apache-2.0
1,749
package uk.gov.dvla.vehicles.presentation.common.controllers // Used to test the version controller. Used in the routes file. class VersionControllerTest extends Version
dvla/vehicles-presentation-common
common-test/app/uk/gov/dvla/vehicles/presentation/common/controllers/VersionControllerTest.scala
Scala
mit
171
/* * Copyright 2015 - 2017 Pablo Alcaraz * Mysql to Postgres converter * * 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...
pabloa/mysql2postgresql
src/main/scala/com/github/mysql2postgresql/converter/conversion/InsertConverter.scala
Scala
apache-2.0
3,175
package slick.compiler import slick.SlickException import slick.ast._ import Util._ import TypeUtil._ import slick.util.ConstArray /** Create a ResultSetMapping root node, ensure that the top-level server-side node returns a * collection, and hoist client-side type conversions into the ResultSetMapping. The origina...
AtkinsChang/slick
slick/src/main/scala/slick/compiler/CreateResultSetMapping.scala
Scala
bsd-2-clause
3,807
/** * Copyright (C) 2013 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...
tanbo800/orbeon-forms
src/main/scala/org/orbeon/oxf/fr/relational/RelationalUtils.scala
Scala
lgpl-2.1
2,245
/////////////////////////////////////////////////////////////////////////////// // Poligrounder.scala // // Copyright (C) 2010-2014 Ben Wing, The University of Texas at Austin // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. //...
utcompling/textgrounder
src/main/scala/opennlp/textgrounder/poligrounder/Poligrounder.scala
Scala
apache-2.0
8,597
package com.scala.bala import com.scala.bala.util.CurrencyCodes import akka.routing.RoundRobinRouter import akka.actor.{Props, ActorSystem} object MainApp { def main(args: Array[String]): Unit = { val system = ActorSystem() val server = system.actorOf(Props(new QuotesRequestor).withRouter(RoundRobinRoute...
bbalajisg/scala-projects
currency-retriever/src/main/scala/com/scala/bala/MainApp.scala
Scala
gpl-2.0
435
package org.apache.spot.utilities.data.validation import org.apache.spark.sql.types._ import org.scalatest.{FlatSpec, Matchers} class InputSchemaTest extends FlatSpec with Matchers { "validate" should "return true when incoming schema is valid" in { val incomingSchema = StructType(List(StructField("ip", Strin...
brandon-edwards/incubator-spot
spot-ml/src/test/scala/org/apache/spot/utilities/data/validation/InputSchemaTest.scala
Scala
apache-2.0
1,742
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
jkbradley/spark
sql/core/src/test/scala/org/apache/spark/sql/ReplaceNullWithFalseInPredicateEndToEndSuite.scala
Scala
apache-2.0
4,486
/* * Copyright (C) 2012 Mikołaj Sochacki mikolajsochacki AT gmail.com * This file is part of VRegister (Virtual Register) * Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ */ package eu.brosbit.opos.lib import java.util.{Date, Locale, GregorianCalendar} import java.text.{SimpleDate...
mikolajs/osp
src/main/scala/eu/brosbit/opos/lib/Formater.scala
Scala
agpl-3.0
1,998
/* * 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 ...
lxsmnv/spark
core/src/main/scala/org/apache/spark/util/io/ChunkedByteBuffer.scala
Scala
apache-2.0
8,028
package com.twitter.util import org.junit.runner.RunWith import org.scalatest.{Matchers, WordSpec} import org.scalatest.junit.JUnitRunner import org.scalatest.mock.MockitoSugar @RunWith(classOf[JUnitRunner]) class ConfigTest extends WordSpec with MockitoSugar with Matchers { import Config._ "Config" should { ...
travisbrown/util
util-core/src/test/scala/com/twitter/util/ConfigTest.scala
Scala
apache-2.0
2,256
package is.hail.annotations import is.hail.asm4s._ import is.hail.expr.ir.{Ascending, Descending, EmitMethodBuilder, SortField, SortOrder} import is.hail.types._ import is.hail.asm4s.coerce import is.hail.types.physical._ import is.hail.utils._ object CodeOrdering { sealed trait Op { type ReturnType val rt...
cseed/hail
hail/src/main/scala/is/hail/annotations/CodeOrdering.scala
Scala
mit
19,096
import sbt._ import Keys._ import org.ensime.EnsimePlugin object FPInScalaBuild extends Build { val opts = Project.defaultSettings ++ Seq( scalaVersion := "2.10.4", resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/", libraryDependencies += "org.scalatest" % "scalatest_2.1...
RawToast/fpinscala
project/Build.scala
Scala
mit
1,583
package org.scalafmt.stats case class OsInfo(name: String, architechture: String, version: String) object OsInfo { def apply(): OsInfo = OsInfo( sys.props("os.name"), sys.props("os.arch"), sys.props("os.version") ) }
Daxten/scalafmt
core/src/test/scala/org/scalafmt/stats/OsInfo.scala
Scala
apache-2.0
248
package org.scalaide.core.internal.project.scopes import scala.tools.nsc.Settings import org.eclipse.core.resources.IContainer import org.eclipse.core.resources.IFile import org.eclipse.core.resources.IMarker import org.eclipse.core.resources.IResource import org.eclipse.core.runtime.IProgressMonitor import org.eclips...
Kwestor/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/core/internal/project/scopes/BuildScopeUnit.scala
Scala
bsd-3-clause
4,660
package com.spotify.hype trait HFn[T] extends Serializable { /** * The function that will run in docker */ def run: T /** * Override this to allow the function to modify the container it is about to be submitted to. */ def image: String = HFn.defaultImage } object HFn { val defaultImage =...
spotify/hype
hype-submitter_2.11/src/main/scala/com/spotify/hype/HFn.scala
Scala
apache-2.0
521
import Dependencies._ import FiloSettings._ import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys.MultiJvm import pl.project13.scala.sbt.JmhPlugin import sbt._ import sbt.Keys._ // All of the submodules are defined here. // This works around an issue where things in multiple build.sbt files cannot reference one another. //...
tuplejump/FiloDB
project/FiloBuild.scala
Scala
apache-2.0
5,722
package controllers import models.User import util._ import util.security._ object Permissions { val LoggedIn = SecuritySpec.fromConfig("controllers.Api", SecuritySpec(true)) def AdminSpec = SecuritySpec(true, AuthenticationProviderConfig.adminGroup) def please(user: User, spec: SecuritySpecification): Boolean...
Shopify/collins
app/controllers/Permissions.scala
Scala
apache-2.0
4,200
package com.googlecode.kanbanik.commands import com.googlecode.kanbanik.model.{User, Board, Project} import com.googlecode.kanbanik.security._ import org.bson.types.ObjectId import com.googlecode.kanbanik.messages.ServerMessages import com.googlecode.kanbanik.db.HasEntityLoader import com.googlecode.kanbanik.dtos.{Per...
kanbanik/kanbanik
kanbanik-server/src/main/scala/com/googlecode/kanbanik/commands/BaseProjectsOnBoardCommand.scala
Scala
apache-2.0
1,664
package models import org.joda.time.DateTime /** * * @param instant */ case class Stardate(instant: DateTime) { override def toString(): String = instant.toString("yyyy.D") def day = instant.getDayOfMonth def month = instant.monthOfYear().getAsShortText def year = instant.year().get() } object Stardate { de...
michaelwestphal/stardatenow
app/models/Stardate.scala
Scala
mit
496
package models.sunerp import models.core.{AbstractQuery, AbstractTable, WithId} import play.api.db.slick.Config.driver.simple._ import scala.slick.lifted.Tag import play.api.libs.json.Json import play.api.data.Form import play.api.data.Forms._ import play.api.data.format.Formats._ import dtos.{ExtGirdDto, PagingDto} ...
SunriseSoftVN/sunerp
app/models/sunerp/Company.scala
Scala
apache-2.0
2,727
// Copyright (c) 2016 PSForever.net to present package net.psforever.packet.game.objectcreate import scodec.{Attempt, Codec, Err} import scodec.codecs._ import scala.annotation.switch /** * A reference between all object class codes and the name of the object they represent.<br> * <br> * Object classes compose...
Fate-JH/PSF-Server
common/src/main/scala/net/psforever/packet/game/objectcreate/ObjectClass.scala
Scala
gpl-3.0
28,237
/* * 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 ...
dotunolafunmiloye/spark
graphx/src/test/scala/org/apache/spark/graphx/PregelSuite.scala
Scala
apache-2.0
2,363
package models.sitedata.joined import models.sitedata.BaseModel object ZoneInfoDef{ def toTable: String = "ZoneInfo" } case class ZoneInfo ( subzoneid: Long, subzonename: String, zonename: String ) extends BaseModel { override def toString: String = { "ZoneInfo {id: " + subzoneid + ...
tnddn/iv-web
portal/rest-portal/app/models/sitedata/joined/ZoneInfo.scala
Scala
apache-2.0
548
/** * 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...
likaiwalkman/kafka
core/src/test/scala/unit/kafka/common/TopicTest.scala
Scala
apache-2.0
3,132
/* * 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...
Myllyenko/incubator-toree
pyspark-interpreter/src/main/scala/org/apache/toree/kernel/interpreter/pyspark/PySparkService.scala
Scala
apache-2.0
3,721
/** * Copyright 2015 Thomson Reuters * * Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
hochgi/CM-Well
server/cmwell-cons/src/main/scala/ctl.scala
Scala
apache-2.0
96,840
/* * 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 ...
MLnick/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
Scala
apache-2.0
21,986
package provingground.andrewscurtis import provingground.translation.StringParse._ import cats.kernel._ import upickle.default.{ReadWriter => RW, macroRW} /* * Free group in n generators * An element is represented as a word in integers, together with rank of the corresponding group * The negative of a number rep...
siddhartha-gadgil/ProvingGround
core/src/main/scala/provingground/andrewscurtis/FreeGroups.scala
Scala
mit
12,174
val textFile = sc.textFile("README.md", 4) val words = textFile.flatMap(line => line.split("[\\\\s]+")) val realWords = words.filter(_.nonEmpty) val wordTuple = realWords.map(word => (word, 1)) val groupBy = wordTuple.groupByKey(2) val wordCount = groupBy.mapValues(value => value.reduce(_ + _)) wordCount.collect().sort...
taewookeom/spark-shell-examples
Example05WordCountGroupByKey.scala
Scala
apache-2.0
477
package objsets import common._ import TweetReader._ /** * A class to represent tweets. */ class Tweet(val user: String, val text: String, val retweets: Int) { override def toString: String = "User: " + user + "\\n" + "Text: " + text + " [" + retweets + "]" } /** * This represents a set of objects of ...
clasnake/coursera-fp-scala
objsets/src/main/scala/objsets/TweetSet.scala
Scala
mit
7,054
/* * Copyright (c) 2014-2021 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...
monifu/monifu
monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala
Scala
apache-2.0
5,266
package at.logic.gapt.provers.viper.grammars import at.logic.gapt.expr._ import at.logic.gapt.expr.fol.folTermSize import at.logic.gapt.proofs.Context import at.logic.gapt.utils.NameGenerator import scala.util.Random object randomInstance { def generate( tys: Seq[TBase] )( implicit ctx: Context ): Seq[Expr] = { ...
gebner/gapt
core/src/main/scala/at/logic/gapt/provers/viper/grammars/randomInstance.scala
Scala
gpl-3.0
1,167
/* * 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 ...
manuzhang/incubator-gearpump
core/src/main/scala/org/apache/gearpump/cluster/DaemonMessage.scala
Scala
apache-2.0
1,925
/* * 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 ...
bravo-zhang/spark
streaming/src/test/scala/org/apache/spark/streamingtest/ImplicitSuite.scala
Scala
apache-2.0
1,417
package controllers.webservice import helpers.Token import models.admin.{Question, QuestionTable} import models.webservice.{GameUserDAO, GameUser} import play.api.Play import play.api.Play.current import play.api.db.slick.DatabaseConfigProvider import play.api.libs.json.{Reads, JsPath, JsError, Json} import play.api.m...
mustafin/ent-quiz-server
modules/webservice/app/controllers/webservice/Application.scala
Scala
apache-2.0
1,822
/* * 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 ...
ConeyLiu/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/json/JsonScanBuilder.scala
Scala
apache-2.0
1,594
package epic.parser package projections /* Copyright 2012 David Hall 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...
langkilde/epic
src/test/scala/epic/parser/projections/EnumeratedAnchoringTest.scala
Scala
apache-2.0
1,913
/* * Copyright (c) 2013-2014 Telefónica Investigación y Desarrollo S.A.U. * * 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 * * Unles...
telefonicaid/fiware-cosmos-platform
cosmos-api/test/es/tid/cosmos/api/controllers/cluster/ClusterDetailsTest.scala
Scala
apache-2.0
4,564
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.3 * @date Thu Apr 28 13:55:48 EDT 2016 * @see LICENSE (MIT style license file). */ package scalation.util //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::...
NBKlepp/fda
scalation_1.3/scalation_mathstat/src/main/scala/scalation/util/BinarySearch.scala
Scala
mit
3,804
/* ********************************************************** *\\ ** ___________ __ ** \\__ ___/____/ |_____________ ** | |_/ __ \\ __\\_ __ \\__ \\ Tetra Concepts LLC ** | |\\ ___/| | | | \\// __ \\_ tetraconcepts.com ** |____| \\___ >__| |__| (____...
tetra-concepts-llc/accumulo-scala
src/test/scala/com/tetra/accumulo_scala/util/BatchScannerProxySpec.scala
Scala
apache-2.0
9,320