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 org.apache.spark.util import java.io.File import java.util.UUID import org.apache.spark.SparkConf import org.apache.spark.ml.linalg.SQLDataTypes.VectorType import org.apache.spark.ml.linalg.{Vector, VectorUDT} import org.apache.spark.sql.catalyst.InternalRow import org.apache.spark.sql.catalyst.expressions.Un...
Verizon/trapezium
dal/src/main/scala/org/apache/spark/util/DalUtils.scala
Scala
apache-2.0
973
/* * Copyright 2015 - 2016 Red Bull Media House GmbH <http://www.redbullmediahouse.com> - 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...
ianclegg/eventuate
eventuate-log-cassandra/src/main/scala/com/rbmhtechnology/eventuate/log/cassandra/CassandraDeletedToStore.scala
Scala
apache-2.0
1,379
/* * 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...
monix/monix
monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CreateObservable.scala
Scala
apache-2.0
1,497
package edu.gemini.phase2.template.factory.impl.nici import edu.gemini.spModel.gemini.nici.blueprint.SpNiciBlueprintCoronagraphic import edu.gemini.spModel.gemini.nici.NICIParams.{Channel2FW, Channel1FW} import scala.collection.JavaConverters._ case class NiciCoronographic(blueprint:SpNiciBlueprintCoronagraphic) exte...
arturog8m/ocs
bundle/edu.gemini.phase2.skeleton.servlet/src/main/scala/edu/gemini/phase2/template/factory/impl/nici/NiciCoronographic.scala
Scala
bsd-3-clause
902
/* * Copyright (c) 2017 Uber Technologies, Inc. (hoodie-dev-group@uber.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...
vinothchandar/hoodie
hoodie-spark/src/main/scala/com/uber/hoodie/DefaultSource.scala
Scala
apache-2.0
4,088
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not ...
skw1992/gearpump-examples
kafka-hdfs-pipeline/src/main/scala/org/apache/gearpump/examples/kafka_hdfs_pipeline/ParquetWriterTask.scala
Scala
apache-2.0
2,902
/*********************************************************************** * Copyright (c) 2013-2015 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 is ...
giserh/geomesa
geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/TypeUpdatingFeatureCollection.scala
Scala
apache-2.0
1,847
package breeze.stats.hypothesis import org.scalatest._ import org.scalatest.funsuite._ import matchers.should.Matchers._ class TTestTest extends AnyFunSuite { val threshold = 0.01 test("T Test two sample") { tTest(List(1.0, 1, 2, 3), List(9.0, 9, 8, 9)) should be(4.29E-5 +- threshold) } test("T Test one s...
scalanlp/breeze
math/src/test/scala/breeze/stats/hypothesis/TTestTest.scala
Scala
apache-2.0
973
package pages import org.scalajs.dom._ import scala.scalajs.js.annotation.JSExportTopLevel import API.Models import scala.scalajs.js import scala.util.{Failure, Success} import scala.concurrent._ import ExecutionContext.Implicits.global import scala.scalajs.js.JSON class Budgets { Budgets.list() } object Budgets ...
MathieuUrstein/HEIG.SCALA.Projet
client/src/main/scala/pages/Budgets.scala
Scala
apache-2.0
18,294
/* * This file is part of the ToolXiT project. * * 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...
jopasserat/toolxit-bibtex
core/src/test/scala/toolxit/bibtex/test/NameFormattingTest.scala
Scala
apache-2.0
1,129
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
sgururajshetty/carbondata
datamap/mv/plan/src/test/scala/org/apache/carbondata/mv/plans/LogicalToModularPlanSuite.scala
Scala
apache-2.0
9,005
package extruder.tests import cats.Monad import cats.data.{OptionT, ValidatedNel} import cats.instances.either._ import cats.instances.int._ import cats.instances.list._ import cats.instances.map.catsKernelStdEqForMap import cats.instances.option._ import cats.instances.string._ import cats.instances.tuple._ import ca...
janstenpickle/extruder
tests/src/test/scala/extruder/tests/MapSuite.scala
Scala
mit
954
package chapter.six object ExerciseSix extends App { // todo: is there a cleaner way to define this? object Suit extends Enumeration { type Suit = Value val Clubs = Value("\\u2663") // ♣ val Diamonds = Value("\\u2666") // ♦ val Hearts = Value("\\u2665") // ♥ val Spades = Value("\\u2660")...
deekim/impatient-scala
src/main/scala/chapter/six/ExerciseSix.scala
Scala
apache-2.0
340
// Copyright (c) 2016 PSForever.net to present package net.psforever.packet.game import net.psforever.packet.{GamePacketOpcode, Marshallable, PacketHelpers, PlanetSideGamePacket} import scodec.Codec import scodec.codecs._ final case class ReloadMessage(item_guid : PlanetSideGUID, ammo_c...
Fate-JH/PSF-Server
common/src/main/scala/net/psforever/packet/game/ReloadMessage.scala
Scala
gpl-3.0
769
/* * 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 ...
ueshin/asakusafw-spark
runtime/src/test/scala/com/asakusafw/spark/runtime/graph/DirectOutputSetupSpec.scala
Scala
apache-2.0
2,768
import scala.pickling._ import scala.pickling.Defaults._ import scala.pickling.binary._ object ListIntBench extends scala.pickling.testing.PicklingBenchmark { val lst = (1 to size).toList override def run() { val pickle = lst.pickle pickle.unpickle[List[Int]] } }
beni55/pickling
benchmark/ListIntBench.scala
Scala
bsd-3-clause
280
package org.jetbrains.plugins.scala.macroAnnotations import scala.annotation.StaticAnnotation import scala.language.experimental.macros import scala.reflect.macros.whitebox /** * This annotation makes the compiler generate code that calls CachesUtil.get(..,) * * NOTE: Annotated function should preferably be top...
JetBrains/intellij-scala-historical
macroAnnotations/src/org/jetbrains/plugins/scala/macroAnnotations/CachedInsidePsiElement.scala
Scala
apache-2.0
3,451
package test import org.specs2.mutable._ import play.api.test._ import play.api.test.Helpers._ class AuthenticationBrowser extends Specification { "Authentication Browser" should { "try invalid login" in { running(TestServer(3333), HTMLUNIT) { browser => browser.goTo("http://localhost:3333/...
mresposito/flipFeed
test/AuthenticationBrowser.scala
Scala
apache-2.0
2,084
package org.precompiler.spark101.env import com.typesafe.config.ConfigFactory import org.scalatest.FunSuite /** * * @author Richard Li */ class TypesafeConfigTest extends FunSuite { test("loadConfigFile") { val conf = ConfigFactory.load("application-test.properties") assert("test1" == conf.getString...
precompiler/spark-101
learning-spark/src/test/scala/org/precompiler/spark101/env/TypesafeConfigTest.scala
Scala
apache-2.0
452
package preprocess import scala.collection.mutable.{HashMap, ArrayBuilder} import org.apache.spark.rdd.RDD import org.apache.spark.{SparkContext, HashPartitioner, storage} import org.apache.spark.SparkContext._ import org.apache.spark.serializer.KryoRegistrator object KDDCup2012 { val dataDir = "/home/xz60/dat...
XianXing/bdl
src/main/scala/bdl/preprocess/KDDCup2012.scala
Scala
apache-2.0
22,718
package com.datastax.spark.connector.cql import java.io.IOException import org.apache.spark.SparkEnv import org.mockito.Mockito import org.mockito.invocation.InvocationOnMock import org.mockito.stubbing.Answer import org.scalatest.FlatSpec import org.scalatestplus.mockito.MockitoSugar class DefaultConnectionFactoryT...
datastax/spark-cassandra-connector
connector/src/test/scala/com/datastax/spark/connector/cql/DefaultConnectionFactoryTest.scala
Scala
apache-2.0
1,177
package org.contourweb.client.view import java.util.logging.Logger import org.contourweb.common.model.model trait location { this: view => private[location] val log = Logger.getLogger("location") trait LocatedView { def uri: List[String] = Nil } }
kazachonak/contour
contour-client/src/main/scala/org/contourweb/client/view/location.scala
Scala
lgpl-3.0
259
package idbase import play.api.data.Forms._ import play.api.data.validation._ import play.api.data._ package object models { type Markdown = String def nonEmptyList[A](mapping: Mapping[A]): Mapping[List[A]] = RepeatedMapping(mapping) verifying Constraint[List[_]]("constraint.required") { o ⇒ if (o.isE...
ornicar/idbase
app/models/package.scala
Scala
mit
390
// Copyright 2014-2016 Leonardo Schwarz (leoschwarz.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 required by applicab...
evotopid/quest_on
src/main/scala/ScalatraBootstrap.scala
Scala
apache-2.0
845
package com.socrata.curator import org.slf4j.LoggerFactory import com.socrata.http.client.{RequestBuilder, Response, SimpleHttpRequest} import ServerProvider.Complete /** * Manages connections and requests to the provided service. * @param provider Service discovery object. * @param config The configuration f...
socrata-platform/socrata-curator-utils
core/src/main/scala/com.socrata.curator/CuratedServiceClient.scala
Scala
apache-2.0
1,793
package com.lkroll.ep.mapviewer import org.denigma.threejs._ import org.scalajs.dom import org.scalajs.dom.raw.HTMLElement import scala.scalajs.js import js.JSConverters._ trait IntersectionControls { def camera: Camera def scene: Object3D def element: HTMLElement def sceneObjects: Array[Object3D] def over...
Bathtor/ep-explorer
src/main/scala/com/lkroll/ep/mapviewer/IntersectionControls.scala
Scala
mit
3,528
package sssg.renderer import java.io.{File, FileWriter} import java.util.Locale import com.typesafe.scalalogging.LazyLogging import nz.net.ultraq.thymeleaf.LayoutDialect import org.thymeleaf.TemplateEngine import org.thymeleaf.context.Context import org.thymeleaf.templateresolver.FileTemplateResolver import sssg.Conf...
nikosk/sssg
src/main/scala/sssg/renderer/ThymeleafRenderer.scala
Scala
mit
1,343
/* * 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/src/main/scala/org/apache/flink/table/plan/nodes/dataset/DataSetCalc.scala
Scala
apache-2.0
3,137
package mesosphere.mesos.protos case class ExecutorID(value: String)
gsantovena/marathon
src/main/scala/mesosphere/mesos/protos/ExecutorID.scala
Scala
apache-2.0
70
package org.jetbrains.plugins.scala package lang package psi package impl package expr import com.intellij.lang.ASTNode import com.intellij.psi._ import com.intellij.psi.util.PsiTreeUtil import org.jetbrains.plugins.scala.lang.psi.api.ScalaElementVisitor import org.jetbrains.plugins.scala.lang.psi.api.base.ScMethodLik...
igrocki/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScSelfInvocationImpl.scala
Scala
apache-2.0
4,182
package microtools.hateoas import play.api.libs.json._ object JsonTransformers { def addHAL(json: JsValue, actions: Seq[BusinessAction])( implicit linkBuilder: LinkBuilder ): JsValue = { if (actions.isEmpty) json else json.transform(jsonHAL(actions)) match { case JsSuccess(transformed,...
21re/play-error-handling
src/main/scala/microtools/hateoas/JsonTransformers.scala
Scala
mit
695
package com.sksamuel.elastic4s.source /** @author Stephen Samuel */ trait DocumentSource { def json: String } @deprecated("prefer JsonDocumentSource instead; same semantics just different name", "1.5.0") case class StringDocumentSource(str: String) extends DocumentSource { override def json = str } /** An instan...
alexander-svendsen/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/source/Source.scala
Scala
apache-2.0
520
package com.github.mostroverkhov.adventofcode16 import org.scalatest.{FlatSpec, Matchers} /** * Created with IntelliJ IDEA. * Author: mostroverkhov */ class SecurityThroughObscurity4Spec extends FlatSpec with Matchers { "Parse RoomCode row" should "be consistent" in { val input = "aaaaa-bbb-z-y-x-123[ab...
mostroverkhov/adventofcode16
src/test/scala/com.github.mostroverkhov.adventofcode16/SecurityThroughObscurity4Spec.scala
Scala
apache-2.0
1,106
package org.geneontology.jena import scala.collection.JavaConverters._ import org.apache.jena.datatypes.TypeMapper import org.apache.jena.rdf.model.AnonId import org.apache.jena.rdf.model.ResourceFactory import org.apache.jena.rdf.model.Statement import org.apache.jena.rdf.model.impl.ResourceImpl import org.openrdf.m...
balhoff/owl-to-rules
src/main/scala/org/geneontology/jena/SesameJena.scala
Scala
bsd-3-clause
1,945
package ildl package benchmark package aos2soa import org.scalameter.CurveData import org.scalameter.api._ import org.scalameter.Key import org.scalameter.DSL._ // // You can read about this benchmark on the following wiki page: // https://github.com/miniboxing/ildl-plugin/wiki/Sample-~-Array-of-Struct // /** The be...
miniboxing/ildl-plugin
tests/benchmarks/src/ildl/benchmark/aos2soa/Benchmark.scala
Scala
bsd-3-clause
2,791
/* * Copyright 2018 Han van Venrooij * * 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...
irundaia/sbt-sassify
src/main/scala/org/irundaia/sass/Options.scala
Scala
apache-2.0
5,605
package io.buoyant.interpreter.k8s.istio import com.twitter.finagle._ import com.twitter.finagle.naming.NameInterpreter import io.buoyant.k8s.SingleNsNamer import io.buoyant.k8s.istio.RouteCache import io.buoyant.namer.ConfiguredDtabNamer import istio.proxy.v1.config.RouteRule object IstioInterpreter { private val ...
linkerd/linkerd
interpreter/istio/src/main/scala/io/buoyant/interpreter/k8s/istio/IstioInterpreter.scala
Scala
apache-2.0
2,442
/** * ____ __ ____ ____ ____,,___ ____ __ __ ____ * ( _ \\ /__\\ (_ )(_ _)( ___)/ __) ( _ \\( )( )( _ \\ Read * ) / /(__)\\ / /_ _)(_ )__) \\__ \\ )___/ )(__)( ) _ < README.txt * (_)\\_)(__)(__)(____)(____)(____)(___/ (__) (______)(____/ LICENSE.txt */ ...
razie/wikireactor
common/app/razie/wiki/model/WikiModel.scala
Scala
apache-2.0
17,125
package org.scalarules.finance.nl import java.text.NumberFormat import java.util.Locale import scala.math.BigDecimal.RoundingMode._ // scalastyle:off method.name /** * Representeert een bedrag in euro's. */ case class Bedrag private[finance] (waarde: BigDecimal) { /** Returnt de som van dit bedrag en n. */ de...
scala-rules/finance-dsl
src/main/scala/org/scalarules/finance/nl/Bedrag.scala
Scala
mit
4,023
package actions import play.api._ import play.api.mvc._ import play.core.j.JavaHelpers import play.core.j.JavaHelpers._ import scala.collection.concurrent.TrieMap import scala.concurrent._ import scala.concurrent.duration._ import WithJContextSupportAction._ import play.mvc.Http.RequestBody case class WithJContextSu...
bravegag/play-authenticate-usage-scala
app/actions/WithJContextSupportAction.scala
Scala
apache-2.0
1,843
package com.codechef.problems.fctrl2 object Main { def main(args: Array[String]): Unit = { import java.io._ val reader = new BufferedReader(new InputStreamReader(System.in)) val tests = reader.readLine.toInt for(i <- 1 to tests) { println(fac(BigInt(reader.readLine))) } } def fac(n: Big...
pamu/CodeChef
src/main/scala/com/codechef/problems/fctrl2/Main.scala
Scala
apache-2.0
450
// Copyright (C) Maxime MORGE 2017 package org.scaia.asia import org.scaia.hedonic.Player /** * Coalition of individuals around an activity * @constructor create a new coalition * @param activity the activity practiced by the individuals * @param group the group of individuals formed */ class Coalition(val ...
maximemorge/ScaIA
src/main/scala/org/scaia/asia/Coalition.scala
Scala
gpl-3.0
3,105
/* * Copyright (c) 2017. Yuriy Stul */ package com.stulsoft.kafka3 import java.util.Properties import java.util.concurrent.TimeUnit import com.typesafe.scalalogging.LazyLogging import org.apache.kafka.clients.producer.{KafkaProducer, ProducerRecord} import scala.concurrent.Future import scala.util.Random /** ...
ysden123/poc
pkafka/kafka3/src/main/scala/com/stulsoft/kafka3/Producer.scala
Scala
mit
2,122
package uk.gov.homeoffice.io import java.io.IOException import java.net.URL import scala.io.Codec import scala.util.{Failure, Success} import org.specs2.mutable.Specification class URLToStringSpec extends Specification { "URL resource" should { "give a string" in { Resource(new URL("file:./src/test/resour...
UKHomeOffice/rtp-io-lib
src/test/scala/uk/gov/homeoffice/io/URLToStringSpec.scala
Scala
mit
1,198
package com.truman.modules.json.alias import javax.inject.{Inject, Singleton} import scala.util.Try import scala.concurrent.Future import com.google.inject.AbstractModule import play.api.Play import play.api.libs.json._ import play.api.inject.ApplicationLifecycle import com.truman.utils.Base62Encoder @Singleton cl...
truman-misfit/play-json-alias
src/main/scala/com/truman/modules/json/alias/JsonAliasRedisModule.scala
Scala
apache-2.0
1,830
// Copyright (C) 2019 MapRoulette contributors (see CONTRIBUTORS.md). // Licensed under the Apache License, Version 2.0 (see LICENSE). package org.maproulette.services.osm.objects import javax.inject.{Inject, Singleton} import org.joda.time.DateTime import org.maproulette.Config import org.maproulette.cache.BasicCache...
Crashfreak/maproulette2
app/org/maproulette/provider/osm/objects/RelationProvider.scala
Scala
apache-2.0
1,512
/* * Copyright 2014 Treode, 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...
Treode/store
store/src/com/treode/store/CatalogId.scala
Scala
apache-2.0
1,348
// Copyright 2011-2012 James Michael Callahan // See LICENSE-2.0 file for licensing information. package org.scalagfx.math import scala.math.{abs,sin,cos} import java.nio._ //-------------------------------------------------------------------------------------------------- // M A T R I X 3 3 D ...
JimCallahan/Graphics
src/org/scalagfx/math/Matrix33d.scala
Scala
apache-2.0
18,027
package net.resonious.sburb.entities import net.resonious.sburb.game.After import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.resonious.sburb.abstracts.Vector3 import net.resonious.sburb.Sburb import net.minecraft.entity.player.EntityPlayer import net.minecraft.entity.Entity impor...
Resonious/mcsburb
src/main/scala/net/resonious/sburb/entities/ReturnNode.scala
Scala
mit
5,632
package coursier.cli.resolve import java.io.PrintStream import coursier.cli.params.OutputParams import coursier.core.{Dependency, Resolution} import coursier.graph.Conflict import coursier.params.ResolutionParams import coursier.parse.{JavaOrScalaDependency, JavaOrScalaModule} import coursier.util.{ModuleMatcher, Pri...
coursier/coursier
modules/cli/src/main/scala/coursier/cli/resolve/Output.scala
Scala
apache-2.0
3,921
package de.tototec.sbuild import java.io.File import scala.reflect.ClassTag /** * Path can be used to produce absolute [[File]] instances which are relative to the current SBuild project directory * or the directory containing an included and explicit requested project resource. */ object Path { // since SBuil...
SBuild-org/sbuild
de.tototec.sbuild/src/main/scala/de/tototec/sbuild/Path.scala
Scala
apache-2.0
1,713
package hu.frankdavid.diss.network import hu.frankdavid.diss.expression.Expression case class Calculate(expression: Expression)
frankdavid/diss
src/main/scala/hu/frankdavid/diss/network/Calculate.scala
Scala
apache-2.0
129
/* Copyright (C) 2008-2014 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
iesl/fuse_ttl
src/factorie-factorie_2.11-1.1/src/main/scala/cc/factorie/util/CmdOption.scala
Scala
apache-2.0
15,432
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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 b...
hpe-cct/cct-core
src/main/scala/cogx/runtime/allocation/InOrderSharedLatchAllocator.scala
Scala
apache-2.0
11,269
/* * Copyright (c) 2018-2019 Brian Scully * */ package akka.contrib.persistence.mongodb import akka.NotUsed import akka.persistence.{AtomicWrite, PersistentRepr} import akka.stream.scaladsl._ import com.mongodb.ErrorCategory import org.mongodb.scala._ import org.mongodb.scala.bson.{BsonDocument, BsonValue} import ...
scullxbones/akka-persistence-mongo
scala/src/main/scala/akka/contrib/persistence/mongodb/ScalaDriverPersistenceJournaller.scala
Scala
apache-2.0
9,318
package cn.gridx.scala.spray.routing import akka.actor.{Actor, ActorLogging} import spray.can.Http import spray.http.{HttpEntity, HttpRequest, HttpResponse} import spray.http.HttpMethods.GET import spray.http.MediaTypes._ /** * Created by tao on 9/5/16. */ class HttpRequestService extends Actor with ActorLogging ...
TaoXiao/Scala
spray/src/main/scala/cn/gridx/scala/spray/routing/HttpRequestService.scala
Scala
apache-2.0
1,108
package com.github.agaro1121.models.leaguerules case class LeagueRule( id: Int, name: String, description: String ) case class LeagueRules(leagueRules: List[LeagueRule])
agaro1121/PathOfExileApiClient
src/main/scala/com/github/agaro1121/models/leaguerules/LeagueRules.scala
Scala
mit
178
/* * 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/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/rules/logical/RewriteIntersectAllRule.scala
Scala
apache-2.0
5,069
/** * Copyright (c) 2016 Intel Corporation  * * 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 applicabl...
dmsuehir/spark-tk
sparktk-core/src/main/scala/org/trustedanalytics/sparktk/frame/internal/ops/sample/MLDataSplitter.scala
Scala
apache-2.0
3,066
package com.rasterfoundry.backsplash.server import com.rasterfoundry.backsplash._ import com.rasterfoundry.backsplash.RenderableStore.ToRenderableStoreOps import com.rasterfoundry.backsplash.error._ import com.rasterfoundry.database.{SceneDao, SceneToLayerDao} import com.rasterfoundry.datamodel.{BandOverride, SingleBa...
aaronxsu/raster-foundry
app-backend/backsplash-server/src/main/scala/com/rasterfoundry/backsplash/implicits/RenderableStoreImplicits.scala
Scala
apache-2.0
9,092
/* Copyright 2009-2016 EPFL, Lausanne */ import leon.annotation._ import leon.io.{ FileOutputStream => FOS, FileInputStream => FIS } import leon.io.{ StdIn, StdOut } import leon.lang._ object IO { def filename = "test.txt" def printX(x: Int, c: Char, sep: String): Unit = { val out = FOS.open(filename) i...
regb/leon
src/test/resources/regression/genc/unverified/IO.scala
Scala
gpl-3.0
1,883
package io.github.meshelton.secs import java.util.UUID import scala.collection.mutable.{ArrayBuffer, HashMap} /** * A Component * * Components should only store mutable data and only have getter and setter methods */ trait Component /** * Manages a type of componenet * * Manages the components in th...
meshelton/SECS
core/src/main/scala/io/github/meshelton/secs/ComponentyManager.scala
Scala
gpl-2.0
3,118
package unit import org.scalatest.{Matchers, WordSpecLike} import akka.actor.{ActorRef, Props, ActorSystem} import akka.testkit.{TestProbe, TestActorRef, ImplicitSender, TestKit} import io.neilord.serial.models.Messages import Messages.{CommandFailed, PortOpened, OpenPort} import org.mockito.Mockito import Mockito._ i...
NoOrdInaryGuy/akka-cereal
src/test/scala/unit/SerialPortManagerSpec.scala
Scala
apache-2.0
2,448
package booflow.example import java.nio.ByteBuffer import akka.actor.ActorSystem import akka.http.scaladsl.model.ws.{BinaryMessage, Message, TextMessage} import akka.stream.stage._ import akka.util.ByteString import booflow.FlowController import scala.concurrent.duration._ import akka.http.scaladsl.server.Directive...
ochrons/booflow
example/jvm/src/main/scala/booflow/example/Webservice.scala
Scala
mit
1,655
package com.rajiv; import com.rajiv.client._ import com.rajiv.server._ object Demo { val DEFAULT_PORT = 9090 } object Server extends Application { val server = new NioServer(Demo.DEFAULT_PORT) server.start() } object Client extends Application { val client = new Client(Demo.DEFAULT_PORT) client.start() }
RajivKurian/Java-NIO-example
src/main/scala/Main.scala
Scala
apache-2.0
318
package ru.dgolubets.jsmoduleloader.api.readers import java.io.File import java.net.URI import java.nio.charset.Charset /** * File reader with shim config. */ class TestFileModuleReader(baseDir: File, shim: Map[String, String]) extends FileModuleReader(baseDir, charset = Charset.defaultCharset()) { override prote...
DGolubets/js-module-loader
src/test/scala/ru/dgolubets/jsmoduleloader/api/readers/TestFileModuleReader.scala
Scala
mit
554
import play.api.mvc.Results._ import play.api.mvc.{Filter, RequestHeader, Result, WithFilters} import play.api.{Application, GlobalSettings, Logger} import play.filters.gzip.GzipFilter import scala.concurrent.ExecutionContext.Implicits._ import scala.concurrent.Future /** * Global Settings * @author lawrence.dani...
ldaniels528/broadway
app-play/app/Global.scala
Scala
apache-2.0
1,659
package com.anakiou.modbus.net import java.net.InetAddress import com.anakiou.modbus.Modbus import com.anakiou.modbus.ModbusCoupler import com.anakiou.modbus.ModbusIOException import com.anakiou.modbus.io.ModbusUDPTransport import com.anakiou.modbus.msg.ModbusResponse class ModbusUDPListener { private var m_Termi...
anakiou/scamod
src/com/anakiou/modbus/net/ModbusUDPListener.scala
Scala
apache-2.0
2,316
/** * Copyright (C) 2014 Reactibility Inc. <http://www.reactibility.com> */ package garde.security case class User(id: String, name: String, login: String, password: String, roles: List[String], tenants: List[String], version: Long) class UserService { private var users: List[User] = Nil def findLogin(login:...
reactibility/garde
garde-security/src/main/scala/garde/security/User.scala
Scala
apache-2.0
437
package models case class User( username: String, passwordHash: String, email: String )
sne11ius/scail
app/models/User.scala
Scala
gpl-3.0
95
package com.rockymadden.stringmetric.phonetic import com.rockymadden.stringmetric.{StringFilter, StringMetric} import com.rockymadden.stringmetric.Alphabet.Alpha /** An implementation of the Soundex metric. */ class SoundexMetric extends StringMetric[DummyImplicit, Boolean] { this: StringFilter => final override def...
cocoxu/multip
src/main/scala/com/rockymadden/stringmetric/phonetic/SoundexMetric.scala
Scala
gpl-3.0
1,315
package scato package benchmarks import org.openjdk.jmh.annotations.{Benchmark, BenchmarkMode, Fork, Mode} import scato.Prelude._ import scato.benchmarks.Data._ @Fork(1) @BenchmarkMode(Array(Mode.Throughput)) class Instantiations { def l[F[_]](fi: F[Int])(implicit F: Light[F]): Foldable[F] = F.foldable def h[F[...
aloiscochard/scato
benchmarks/src/main/scala/Instantiations.scala
Scala
apache-2.0
3,538
package com.stulsoft.ysps.preduce import org.scalatest.funspec.AnyFunSpec import org.scalatest.matchers.should.Matchers /** * Created by Yuriy Stul on 9/24/2016. */ class PersonTest extends AnyFunSpec with Matchers { describe("Person") { describe("#toString") { it("should return text representation")...
ysden123/ysps
src/test/scala/com/stulsoft/ysps/preduce/PersonTest.scala
Scala
mit
451
package de.htwg.zeta.server.controller.restApi import java.util.UUID import javax.inject.Inject import scala.concurrent.ExecutionContext import scala.concurrent.Future import com.mohiva.play.silhouette.api.actions.SecuredRequest import com.softwaremill.quicklens.ModifyPimp import de.htwg.zeta.common.format.ProjectSh...
Zeta-Project/zeta
api/server/app/de/htwg/zeta/server/controller/restApi/GraphicalDslRestApi.scala
Scala
bsd-2-clause
14,942
/* * 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/main/scala/monix/reactive/internal/builders/UnfoldObservable.scala
Scala
apache-2.0
2,924
package gg.uhc.hosts.endpoints.matches import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server.Route import akka.http.scaladsl.server.directives.RouteDirectives.{complete, reject} import gg.uhc.hosts.CustomJsonCodec._ import gg.uhc.hosts.Instrumented import gg.uhc.hosts.endpoints.matches.websock...
Eluinhost/hosts.uhc.gg
src/main/scala/gg/uhc/hosts/endpoints/matches/ListUpcomingMatches.scala
Scala
mit
1,217
package org.jetbrains.plugins.scala package lang package psi package api package base package patterns import org.jetbrains.plugins.scala.lang.psi.api.statements.params._ import lexer.ScalaTokenTypes import types.ScSequenceArg /** * @author Alexander Podkhalyuzin * Date: 28.02.2008 */ trait ScPatternArgumentList ext...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/psi/api/base/patterns/ScPatternArgumentList.scala
Scala
apache-2.0
741
/** * Copyright 2013, 2016 Jandom Team * * This file is part of JANDOM: JVM-based Analyzer for Numerical DOMains * JANDOM 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, ...
amato-gianluca/Jandom
core/src/main/scala/it/unich/jandom/targets/cfg/ControlFlowGraph.scala
Scala
lgpl-3.0
7,690
package chrome.windows import bindings._ import chrome.events.EventSource import chrome.events.EventSourceImplicits._ import utils.ErrorHandling.lastErrorOrValue import scala.concurrent.{Promise, Future} import scala.scalajs.js object Windows { val WINDOW_ID_NONE: Window.Id = bindings.Windows.WINDOW_ID_NONE val...
amsayk/scala-js-chrome
bindings/src/main/scala/chrome/windows/Windows.scala
Scala
mit
2,538
package org.bitcoins.spvnode.networking import java.net.InetSocketAddress import akka.actor.{Actor, ActorContext, ActorRef, ActorRefFactory, Props} import akka.event.LoggingReceive import akka.io.Tcp import org.bitcoins.core.crypto.{DoubleSha256Digest, Sha256Hash160Digest} import org.bitcoins.core.number.UInt32 impor...
bitcoin-s/bitcoin-s-spv-node
src/main/scala/org/bitcoins/spvnode/networking/PaymentActor.scala
Scala
mit
7,688
package phenan.prj.body import phenan.prj._ import phenan.prj.ir._ import scala.util.Try trait BodyCompiler { this: BodyParser with StatementParsersModule with ExpressionParsersModule with ContextSensitiveParsersModule with JTypeLoader with Environments with IRStatements with IRExpressions with JModules => def ...
csg-tokyo/proteaj2
src/main/scala/phenan/prj/body/BodyCompiler.scala
Scala
mit
1,041
package org.sgine.ui import com.badlogic.gdx.graphics.Texture import render.{Vertex, TextureCoordinates} import org.powerscala._ /** * * * @author Matt Hicks <mhicks@sgine.org> */ object ShapeComponentExample extends UI { val texture = new Texture(Resource("sgine.png")) val shape = new ShapeComponent() sh...
Axiometry/sgine
ui/src/test/scala/org/sgine/ui/ShapeComponentExample.scala
Scala
bsd-3-clause
532
object Test extends App { trait A trait B extends A class C { type D trait E { type T >: B <: A; val x : T } // This is currently correctly disallowed // val y : (D with E)#T = y val y : D with E = y var sneak = { () => y.x } sneak = { () => new B { } } } class F extends C { trait G tr...
yusuke2255/dotty
tests/untried/neg/volatile.scala
Scala
bsd-3-clause
416
package grammarcomp package parsing import grammar._ import utils._ import Logging._ import CFGrammar._ import CNFConverter._ /** * A converter to Greiback Normal Form GNF * Requires grammars to be in CNF */ object GNFUtilities { /** * This method will also handle epsilons */ def indirectLeftRecursiveN...
epfl-lara/GrammarComparison
src/main/scala/grammarcomp/parsing/GNFUtilities.scala
Scala
mit
9,827
object Test { val builder: Builder_1[Int] = ??? builder.build(): Option[Int] }
som-snytt/dotty
tests/pos-java-interop-separate/i8435/Test_2.scala
Scala
apache-2.0
83
package chess import format.Uci import scala.annotation.tailrec import scala.collection.mutable.ArrayBuffer final case class Actor( piece: Piece, pos: Pos, board: Board ) { import Actor._ lazy val moves: List[Move] = kingSafetyMoveFilter(trustedMoves(board.variant.allowsCastling)) /** The moves w...
niklasf/scalachess
src/main/scala/Actor.scala
Scala
mit
7,779
/* * Copyright 2014-2022 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 agr...
Netflix/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/stacklang/DupSuite.scala
Scala
apache-2.0
970
package com.seanshubin.todo.application.console object EntryPoint extends App { new EntryPointWiring { override def commandLineArguments: Seq[String] = args }.runner.run() }
SeanShubin/todo-application
console/src/main/scala/com/seanshubin/todo/application/console/EntryPoint.scala
Scala
unlicense
183
package sgwlpr import com.eaio.uuid.UUID import scala.collection.mutable.ListBuffer import events._ import packets._ trait GameServerTrait[T <: Session] extends ServerTrait[T] { val sessionsInTransit : ListBuffer[Session] = ListBuffer.empty def migrateSession(oldSession: Session, newSession: T) : Boolean over...
th0br0/sgwlpr
framework/src/main/scala/sgwlpr/GameServerTrait.scala
Scala
agpl-3.0
986
package skinny.oauth2.client.facebook import skinny.oauth2.client._ import skinny.logging.LoggerProvider import skinny.json.JSONStringOps import scala.util.control.NonFatal /** * Facebook Graph API client. */ trait FacebookGraphAPI extends LoggerProvider { def me(token: OAuth2Token): Option[FacebookUser] = { ...
Kuchitama/skinny-framework
oauth2/src/main/scala/skinny/oauth2/client/facebook/FacebookGraphAPI.scala
Scala
mit
826
/* * La Trobe University - Distributed Deep Learning System * Copyright 2016 Matthias Langer (t3l@threelights.de) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apa...
bashimao/ltudl
blaze/src/main/scala/edu/latrobe/blaze/modules/jvm/Tanh_JVM.scala
Scala
apache-2.0
2,203
/* * Copyright 2001-2015 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
SRGOM/scalatest
scalactic/src/main/scala/org/scalactic/equalities/RecursiveJavaListEquality.scala
Scala
apache-2.0
1,506
/** * Copyright 2015 Otto (GmbH & Co KG) * * 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...
hpzorn/schedoscope
schedoscope-tutorial/src/main/scala/schedoscope/example/osm/datahub/Restaurants.scala
Scala
apache-2.0
1,838
object Test extends App { class C(val s: Array[Int]) extends AnyVal { override def equals(that: Any) = that match { case that: C => s.toList == that.s.toList case _ => false } } def test1() = { val c = new C(Array(1, 2,3)) assert(c `equals` new C(Array(1, 2, 3))) assert(c == (ne...
som-snytt/dotty
tests/run/vc-equals.scala
Scala
apache-2.0
1,108
/* * 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/ct600/v2/B156.scala
Scala
apache-2.0
828
package rewriting.rules import ir.{ArrayType, Type} import ir.ast._ import opencl.ir.pattern.ReduceSeq import rewriting.utils.Utils object InterchangeRules { val mapMapTransposeZipOutside = Rule("Map(fun(x => Map(fun(a => )) $ Get(n, ) $ Zip(..., A, ...) => " + "Transpose() o Map(fun(a => Map() $ Zip(..., a, ...
lift-project/lift
src/main/rewriting/rules/InterchangeRules.scala
Scala
mit
7,776
package mesosphere.marathon.upgrade import java.net.URL import java.util.UUID import com.wix.accord._ import com.wix.accord.dsl._ import mesosphere.marathon.api.v2.Validation._ import mesosphere.marathon.storage.repository.legacy.store.{ CompressionConf, ZKData } import mesosphere.marathon.core.task.Task import mesos...
timcharper/marathon
src/main/scala/mesosphere/marathon/upgrade/DeploymentPlan.scala
Scala
apache-2.0
12,888
package net.technowizardry.xmpp.messages import net.technowizardry.XMLWriter import net.technowizardry.Base64 import java.nio.ByteBuffer class SaslPlainAuthMessage(username : String, password : String) extends SaslAuthMessage { def WriteAuthBody(writer : XMLWriter) { val busername = username.getBytes() ...
ajacques/XmppClient
SeniorProject/src/net/technowizardry/xmpp/messages/SaslPlainAuthMessage.scala
Scala
mit
540
// Copyright (C) 2011-2012 the original author or authors. // See the LICENCE.txt 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. // You ...
chrisjwwalker/cjww-diagnostics
test/controllers/services/PriceListControllerSpec.scala
Scala
apache-2.0
1,213
package org.scalaide.refactoring.internal import scala.tools.refactoring.MultiStageRefactoring import scala.tools.refactoring.analysis.GlobalIndexes import org.eclipse.core.runtime.IProgressMonitor import org.eclipse.ltk.core.refactoring.RefactoringStatus import org.scalaide.core.IScalaProject import org.scalaide.cor...
dragos/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/refactoring/internal/IndexedRefactorings.scala
Scala
bsd-3-clause
2,158