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.scalera.tools object TraverseFunctions { implicit class MapHelpers[K,V](m1: Map[K,V]){ // Joining def fullJoin[W](m2: Map[K,W]): Map[K,(Option[V],Option[W])] = (m1.keySet ++ m2.keySet).map{ k => k -> (m1.get(k),m2.get(k)) }.toMap def <+>[W](m2: Map[K,W]): Map[K,(Optio...
Scalera/scalera-tools
src/main/scala/org/scalera/tools/TraverseFunctions.scala
Scala
apache-2.0
1,584
package ru.lester.spark.example.anomaly import org.apache.spark.{SparkConf, SparkContext} import org.apache.spark.mllib.linalg.{Vectors, Vector} import org.apache.spark.mllib.linalg.{Matrices, Matrix} import org.apache.spark.mllib.stat.distribution.MultivariateGaussian import org.apache.spark.mllib.regression.LabeledP...
vivanov/anomaly-detection
example/src/main/scala/ru/lester/spark/example/anomaly/MultivariateGaussianDistribution.scala
Scala
apache-2.0
3,957
/** Copyright 2015 TappingStone, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
nvoron23/PredictionIO
core/src/main/scala/controller/Engine.scala
Scala
apache-2.0
27,768
import scala.io.Source object Prob81 extends App { val matrix = Source.fromFile("resources/p081_matrix.txt").getLines().map { line => line.split(',').map(_.toInt) }.toArray val xSize = matrix.length val ySize = matrix.head.length for { j <- matrix.indices i <- matrix.head.indices } { if(i ...
ponkotuy/ProjectEular
src/main/scala/Prob81.scala
Scala
mit
566
package org.jetbrains.plugins.scala package lang package psi package stubs package elements import com.intellij.lang.ASTNode import com.intellij.psi.PsiElement import com.intellij.psi.stubs.{IndexSink, StubElement, StubInputStream, StubOutputStream} import com.intellij.util.io.StringRef import org.jetbrains.plugins.sc...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/ScSelfTypeElementElementType.scala
Scala
apache-2.0
2,132
package fif.spark.avroparquet /** * Code generated from avro schemas by scalaAvro. Do not modify. * "ALL THESE FILES ARE YOURS—EXCEPT SAMPLEENTITY.SCALA / ATTEMPT NO MODIFICATIONS THERE" */ final case class SampleEntity(entityName: String, entityType: String, ...
malcolmgreaves/abstract_data
data-tc-spark/src/test/scala/fif/spark/avroparquet/SampleEntity.scala
Scala
apache-2.0
2,563
/* * Licensed to Intel Corporation under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * Intel Corporation licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use t...
dding3/BigDL
dl/src/main/scala/com/intel/analytics/bigdl/example/textclassification/TextTransformer.scala
Scala
apache-2.0
2,971
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package eu.lateral.swg import eu.lateral.swg.db.ImageRecord import eu.lateral.swg.db.Project import eu.lateral.swg.db.SWGSchema import...
orest-d/swg
swg/src/main/scala/eu/lateral/swg/ImageUtils.scala
Scala
gpl-3.0
3,118
class Credentials(accessKeyId: String, secretAccessKey: String) extends com.amazonaws.auth.AWSCredentials { override def getAWSAccessKeyId: String = accessKeyId override def getAWSSecretKey: String = secretAccessKey } class SessionCredentials(accessKeyId: String, secretAccessKey: String, token: String) extends...
hirokikonishi/awscala
aws/core/src/main/scala/Credentials.scala
Scala
apache-2.0
760
/* * 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 ...
manishgupta88/carbondata
integration/spark-common/src/main/scala/org/apache/spark/util/FileUtils.scala
Scala
apache-2.0
4,787
/** * Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com> */ package akka.io import java.net.{ SocketException, InetSocketAddress } import java.nio.channels.SelectionKey._ import java.io.{ FileInputStream, IOException } import java.nio.channels.{ FileChannel, SocketChannel } import java.nio.ByteBuffer i...
jmnarloch/akka.js
akka-js-actor/jvm/src/main/scala/akka/io/TcpConnection.scala
Scala
bsd-3-clause
19,760
package com.eevolution.context.dictionary.domain.model import ai.x.play.json.Jsonx import com.eevolution.context.dictionary.api.{ActiveEnabled, DomainModel, Identifiable, Traceable} import org.joda.time.DateTime /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This progra...
adempiere/ADReactiveSystem
dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/model/ReplicationLog.scala
Scala
gpl-3.0
3,372
package org.jetbrains.plugins.scala.lang.psi.impl.statements import com.intellij.lang.ASTNode import com.intellij.openapi.progress.ProgressManager import com.intellij.psi._ import com.intellij.psi.scope._ import org.jetbrains.plugins.scala.extensions.{PsiElementExt, ifReadAllowed} import org.jetbrains.plugins.scala.l...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/statements/ScMacroDefinitionImpl.scala
Scala
apache-2.0
3,713
/* * Copyright 2001-2013 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...
travisbrown/scalatest
src/main/scala/org/scalatest/exceptions/TestPendingException.scala
Scala
apache-2.0
2,288
package is.solidninja package openshift package client package impl import is.solidninja.k8s.api.v1.{PodList, ReplicationControllerList, ServiceList} import cats.effect._ import is.solidninja.openshift.api.v1.{Service => v1Service, _} import fs2.async.immutable.Signal import io.circe._ import io.circe.syntax._ import ...
solidninja/openshift-scala-api
src/main/scala/is/solidninja/openshift/client/impl/HttpOpenshiftClient.scala
Scala
mit
8,355
package lore.compiler.poem.writer import lore.compiler.core.CompilationException import lore.compiler.semantics.NamePath import java.io.ByteArrayOutputStream import java.nio.{ByteBuffer, ByteOrder} import java.nio.charset.Charset /** * The bytecode writer writes various primitive data sizes in big endian. */ cla...
marcopennekamp/lore
compiler/src/lore/compiler/poem/writer/BytecodeWriter.scala
Scala
mit
2,199
package se.citerus.dddsample.application.impl import org.apache.commons.logging.Log import se.citerus.dddsample.domain.model.handling._; import org.apache.commons.logging.LogFactory; import org.springframework.transaction.annotation.Transactional; import se.citerus.dddsample.application.ApplicationEvents; impor...
oluies/ddd-sample-scala
src/main/scala/se/citerus/dddsample/application/impl/HandlingEventServiceImpl.scala
Scala
mit
2,176
package scala.meta package classifiers private[meta] trait Api { implicit class XtensionClassifiable[T: Classifiable](x: T) { def is[U](implicit classifier: Classifier[T, U]): Boolean = { classifier.apply(x) } def isNot[U](implicit classifier: Classifier[T, U]): Boolean = { !this.is(classif...
DavidDudson/scalameta
scalameta/common/shared/src/main/scala/scala/meta/classifiers/Api.scala
Scala
bsd-3-clause
370
/* * Copyright 2010-2011 Vilius Normantas <code@norma.lt> * * This file is part of Crossbow library. * * Crossbow is free software: you can redistribute it and/or modify it under the terms of the GNU * General Public License as published by the Free Software Foundation, either version 3 of the * License, or (at ...
ViliusN/Crossbow
crossbow-core/src/lt/norma/crossbow/indicators/Sqrt.scala
Scala
gpl-3.0
1,027
/* * Copyright 2015-2018 Snowflake Computing * Copyright 2015 TouchType 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 * * Un...
snowflakedb/spark-snowflake
src/main/scala/net/snowflake/spark/snowflake/DefaultSource.scala
Scala
apache-2.0
5,366
package repositories.storage.dao import no.uio.musit.models.ObjectTypes.{CollectionObjectType, Node, SampleObjectType} import no.uio.musit.models.{ObjectUUID, StorageNodeId} import no.uio.musit.test.MusitSpecWithAppPerSuite import no.uio.musit.test.matchers.MusitResultValues class LocalObjectDaoSpec extends MusitSpec...
MUSIT-Norway/musit
service_backend/test/repositories/storage/dao/LocalObjectDaoSpec.scala
Scala
gpl-2.0
2,038
package gapt.proofs import gapt.expr._ import gapt.expr.ty.->: import gapt.expr.ty.TBase import gapt.expr.ty.TVar import gapt.expr.ty.Ty import gapt.proofs.context.Context import gapt.proofs.context.facet.ProofNames import gapt.proofs.context.update.Update import gapt.proofs.lk.LKProof import gapt.proofs.lk.rules.AndL...
gapt/gapt
core/src/main/scala/gapt/proofs/Checkable.scala
Scala
gpl-3.0
6,740
/* scala-stm - (c) 2009-2011, Stanford University, PPL */ package scala.concurrent.stm.ccstm import java.util.concurrent.atomic.AtomicLong import scala.annotation.tailrec /** A counter with a linearizable increment operator and adaptive contention * avoidance. Reading the counter with `apply()` is not linearizabl...
nbronson/scala-stm
src/main/scala/scala/concurrent/stm/ccstm/Counter.scala
Scala
bsd-3-clause
1,444
package com.karasiq.shadowcloud.test.utils import akka.util.ByteString import com.karasiq.common.encoding.HexString import com.karasiq.shadowcloud.model.Chunk trait ByteStringImplicits { implicit class ByteStringOps(private val bs: ByteString) { def toHexString: String = { HexString.encode(bs) } }...
Karasiq/shadowcloud
utils/test/src/main/scala/com/karasiq/shadowcloud/test/utils/ByteStringImplicits.scala
Scala
apache-2.0
755
package com.sksamuel.elastic4s.requests.alias import com.sksamuel.elastic4s.Indexes import com.sksamuel.elastic4s.ext.OptionImplicits._ case class GetAliasesRequest(indices: Indexes, aliases: Seq[String] = Nil, ignoreUnavailable: Option[Boolean] = None) { def ignoreUnavailable(ignore: Boolean): GetAliasesRequest = ...
sksamuel/elastic4s
elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/alias/GetAliasesRequest.scala
Scala
apache-2.0
360
class Foo { def f: Int = 50 def init: Int = f } class Bar extends Foo { private var m = 10 override def f: Int = m } class Qux extends Bar { init override def f = a private val a = 30 // error }
som-snytt/dotty
tests/init/neg/override31.scala
Scala
apache-2.0
213
/* * 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
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/LocalityPreferredContainerPlacementStrategy.scala
Scala
apache-2.0
11,600
package com.komanov.mysql.streaming import java.sql._ import java.util import scala.collection.mutable object Query { val TableName = "test_table" val CreateSql = s""" CREATE TABLE $TableName ( id INT, name VARCHAR(1000), PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 """ private val Million...
dkomanov/stuff
src/com/komanov/mysql/streaming/Query.scala
Scala
mit
4,125
package dmtest.stack import dmtest._ object Pool { case class S(pool: Pool, size: Sector) extends Stack { private val linear: Linear = pool.alloc(size) override def terminate: Unit = { pool.free(linear) } override def path = linear.path } case class Range(start: Sector, len: Sector) extend...
akiradeveloper/dmtest
src/main/scala/dmtest/stack/Pool.scala
Scala
apache-2.0
1,699
/* * 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/spark/carbondata/commands/SetCommandTestCase.scala
Scala
apache-2.0
5,371
package com.twitter.finagle.tracing import com.twitter.finagle._ import com.twitter.finagle.client.Transporter import java.net.{SocketAddress, InetSocketAddress} /** * [[com.twitter.finagle.ServiceFactoryProxy]] used to trace the local addr and * server addr. */ class ServerDestTracingProxy[Req, Rep](self: Service...
JustinTulloss/finagle
finagle-core/src/main/scala/com/twitter/finagle/tracing/DestinationTracing.scala
Scala
apache-2.0
2,347
package model.dtos case class DiscussionThread(var id:Option[Long], discussion_thread_type_id:Int, //whether the discussion thread refers to the whole article (1 for article part and 2 for whole article) clientId:String, //id produced by javascript ...
scify/DemocracIT-Web
app/model/dtos/DiscussionThread.scala
Scala
apache-2.0
406
/* * Copyright 2017 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/featran
core/src/main/scala/com/spotify/featran/transformers/Normalizer.scala
Scala
apache-2.0
3,301
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js API ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-lang.org/ ** ** /____/\\___/...
matthughes/scala-js
library/src/main/scala/scala/scalajs/js/UndefOr.scala
Scala
bsd-3-clause
9,316
/* * Copyright (c) 2018. Fengguo Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License v2.0 * which accompanies this distribution, and is available at * https://www.apache.org/licenses/LICENSE-2.0 * * Detailed contributors ar...
arguslab/Argus-SAF
amandroid/src/main/scala/org/argus/amandroid/plugin/communication/CommunicationSourceAndSinkManager.scala
Scala
apache-2.0
1,653
/* * 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
experiments/akkastream/src/main/scala/org/apache/gearpump/akkastream/module/DummyModule.scala
Scala
apache-2.0
3,423
package com.fustigatedcat.heystk.common.normalization import java.util.Date case class Normalization(log : Log, startProcessing : Long, endProcessing : Long = new Date().getTime, fields : Map[String, (String,String)] = Map()) { }
fustigatedcat/heystk
heystk-common/src/main/scala/com/fustigatedcat/heystk/common/normalization/Normalization.scala
Scala
gpl-3.0
308
package camelinaction import org.apache.camel.{Exchange, Processor} import org.apache.camel.ExchangePattern._ import akka.actor.Actor._ import akka.camel._ /** * @author Martin Krasser */ object SectionE32 extends Application { import SampleActors._ val service = CamelServiceManager.startCamelService val ht...
sprklinginfo/camelinaction2
old_chapters/appendixE/src/main/scala/SectionE32.scala
Scala
apache-2.0
1,338
/* * 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 ...
wangyixiaohuihui/spark2-annotation
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
Scala
apache-2.0
43,331
package controllers import play.api.mvc.Action import models.AssetSupport.IdType import play.api.mvc.BodyParsers.parse import models.customer.{AgentIn, AgentUpdate, AgentCreate} import controllers.utils.CrudController object Agents extends CrudController { override type MODEL = AgentIn override type UPDATEMODEL...
tsechov/shoehorn
app/controllers/Agents.scala
Scala
apache-2.0
698
package dundertext.editor import org.junit.Test import org.junit.Assert._ class DocumentBufferTest { val buffer = DocumentBuffer.empty @Test def should_be_empty_at_start(): Unit = { assertEquals(0, buffer.length) assertTrue(buffer.isEmpty) } @Test def should_append_text(): Unit = { buffer.a...
dundertext/dundertext
editor/src/test/scala/dundertext/editor/DocumentBufferTest.scala
Scala
gpl-3.0
689
package serialization import model._ import scodec.Codec import scodec.codecs._ import scalaz.std.string._ import scalaz.{IMap, Order} object Model { // Hash = 256 bits // MutablePtr = 256 bits // RemotePath = MutablePtr + int32 size of list + n strings (int32 size in bytes + the bytes) // List of A: int32 s...
NightRa/CIFS
src/main/scala/serialization/Model.scala
Scala
bsd-3-clause
1,132
package com.komanov.stringformat.jmh import java.util.concurrent.TimeUnit import com.komanov.stringformat.{InputArg, JavaFormats, ScalaFormats} import org.openjdk.jmh.annotations._ @State(Scope.Benchmark) @BenchmarkMode(Array(Mode.AverageTime)) @OutputTimeUnit(TimeUnit.NANOSECONDS) @Fork(value = 2, jvmArgs = Array("...
dkomanov/stuff
src/com/komanov/stringformat/jmh/Benchmarks.scala
Scala
mit
2,070
/* * Copyright (c) 2017-2021, Robby, Kansas State University * 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, th...
sireum/v3-logika-runtime
library/shared/src/test/scala/org/sireum/ZSTest.scala
Scala
bsd-2-clause
2,140
import sbt._ import Keys._ trait BuildSetting { // Eclipse plugin import com.typesafe.sbteclipse.plugin.EclipsePlugin._ //Dependency graph plugin import net.virtualvoid.sbt.graph.Plugin._ val scalaSettings = Defaults.defaultSettings ++ eclipseSettings ++ graphSettings ++ Seq( initialComma...
tferega/revenj
scala/project/NGSBuild.scala
Scala
bsd-3-clause
4,275
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC7200.scala
Scala
apache-2.0
816
package gitbucket.core.util import gitbucket.core.api.JsonFormat import gitbucket.core.controller.Context import gitbucket.core.servlet.Database import java.util.regex.Pattern.quote import javax.servlet.http.{HttpSession, HttpServletRequest} import scala.util.matching.Regex import scala.util.control.Exception._ im...
zhoffice/gitbucket
src/main/scala/gitbucket/core/util/Implicits.scala
Scala
apache-2.0
3,045
/* * Copyright 2017 FOLIO Co., 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 agreed...
folio-sec/reladomo-scala
reladomo-scala-common/src/main/scala/com/folio_sec/reladomo/scala_api/BiTemporalTransactionalListBase.scala
Scala
apache-2.0
2,344
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.fixture import akka.actor.{ ActorRef, ActorSystem } import org.scalatest._ import akka.testkit._ import org.ensime.api._ import org.ensime.core._ import scala.concurrent...
pascr/ensime-server
core/src/it/scala/org/ensime/fixture/ProjectFixture.scala
Scala
gpl-3.0
3,153
package ucesoft.cbm.formats.cart import ucesoft.cbm.ChipID import ucesoft.cbm.cpu.Memory import ucesoft.cbm.formats.{Cartridge, CartridgeBuilder } import ucesoft.cbm.formats.ExpansionPortFactory.CartridgeExpansionPort import ucesoft.cbm.misc.{AMF29F040, FlashListener} import java.io.{ObjectInputStream, ObjectOutputSt...
abbruzze/kernal64
Kernal64/src/ucesoft/cbm/formats/cart/EasyFlash.scala
Scala
mit
5,088
package scodec.protocols package pcap import scalaz.\/ import scalaz.\/.{ left, right } import scodec.{ Codec, Decoder, Err } import scodec.bits.BitVector import scodec.codecs._ import scodec.stream._ import scodec.{ Codec, Attempt, DecodeResult } import scodec.stream.decode.DecodingError import shapeless.Lazy case...
jrudnick/scodec-protocols
src/main/scala/scodec/protocols/pcap/CaptureFile.scala
Scala
bsd-3-clause
2,044
/* * 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 ...
bdrillard/spark
sql/core/src/test/scala/org/apache/spark/sql/streaming/continuous/ContinuousQueuedDataReaderSuite.scala
Scala
apache-2.0
5,584
package vexriscv.demo import vexriscv.plugin._ import vexriscv.{plugin, VexRiscv, VexRiscvConfig} import spinal.core._ /** * Created by spinalvm on 15.06.17. */ object GenSmallest extends App{ def cpu() = new VexRiscv( config = VexRiscvConfig( plugins = List( new IBusSimplePlugin( rese...
SpinalHDL/VexRiscv
src/main/scala/vexriscv/demo/GenSmallest.scala
Scala
mit
1,583
package spire package math import java.lang.Math import scala.math.{ScalaNumber, ScalaNumericConversions} import spire.algebra._ import spire.syntax.field._ import spire.syntax.isReal._ import spire.syntax.nroot._ object Quaternion extends QuaternionInstances { def i[@sp(Float, Double) A](implicit f: Rig[A]): Quat...
rklaehn/spire
core/shared/src/main/scala/spire/math/Quaternion.scala
Scala
mit
11,561
/* * Copyright 2010 LinkedIn * * 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...
jinfei21/kafka
test/unit/kafka/log/LogManagerTest.scala
Scala
apache-2.0
4,327
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
rorygraves/perf_tester
corpus/scala-library/src/main/scala/util/control/TailCalls.scala
Scala
apache-2.0
4,156
package lila.coach import play.api.libs.json._ final class JsonView(jsonWriters: JSONWriters) { import jsonWriters._ def opening(period: Period, color: chess.Color): Fu[JsObject] = fuccess { val stat = period.data val openings = stat.openings(color).trim Json.obj( "from" -> period.from, ...
bjhaid/lila
modules/coach/src/main/JsonView.scala
Scala
mit
1,596
package uk.gov.gds.ier.transaction.overseas.parentsAddress import uk.gov.gds.ier.serialiser.WithSerialiser import uk.gov.gds.ier.step.StepTemplate import uk.gov.gds.ier.service.WithAddressService import uk.gov.gds.ier.model.Addresses import uk.gov.gds.ier.transaction.overseas.{InprogressOverseas, WithOverseasControlle...
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/transaction/overseas/parentsAddress/ParentsAddressSelectMustache.scala
Scala
mit
3,889
/* * Artificial Intelligence for Humans * Volume 1: Fundamental Algorithms * Scala Version * http://www.aifh.org * http://www.jeffheaton.com * * Code repository: * https://github.com/jeffheaton/aifh * Copyright 2013 by Jeff Heaton * * Licensed under the Apache License, Version 2.0 (the "License"); * you ma...
HairyFotr/aifh
vol1/scala-examples/src/main/scala/com/heatonresearch/aifh/general/data/RichData.scala
Scala
apache-2.0
2,379
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
gioenn/xSpark
core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraphListener.scala
Scala
apache-2.0
6,093
/* * Copyright 2016 Coursera 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 t...
coursera/naptime
naptime/src/main/scala/org/coursera/naptime/actions/RestActionBuilder.scala
Scala
apache-2.0
6,245
package io.surfkit.elasticsearch import java.io.IOException import java.net.URLEncoder import java.util.UUID import akka.Done import akka.actor.{ActorRef, ActorSystem} import akka.http.scaladsl.Http import akka.http.scaladsl.client.RequestBuilding import akka.http.scaladsl.model.HttpHeader.ParsingResult import akka.h...
coreyauger/reactive-elastic-search
src/main/scala/io/surfkit/elasticsearch/ESClient.scala
Scala
mit
8,692
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
rnpandya/adam
adam-apis/src/main/scala/org/bdgenomics/adam/apis/java/JavaAlignmentRecordRDD.scala
Scala
apache-2.0
3,632
package cs.ucla.edu.bwaspark.datatype class ExtParam() { var leftQs: Array[Byte] = _ var leftQlen: Int = -1 var leftRs: Array[Byte] = _ var leftRlen: Int = -1 var rightQs: Array[Byte] = _ var rightQlen: Int = -1 var rightRs: Array[Byte] = _ var rightRlen: Int = -1 var w: Int = -1 var mat: Array[Byte] = _ va...
peterpengwei/bwa-spark-fpga
src/main/scala/cs/ucla/edu/bwaspark/datatype/ExtensionParameters.scala
Scala
gpl-2.0
2,001
/* * 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 ...
WangTaoTheTonic/flink
flink-examples/flink-examples-streaming/src/test/scala/org/apache/flink/streaming/scala/examples/WindowJoinITCase.scala
Scala
apache-2.0
2,671
package com.twitter.finagle.mysql import com.twitter.finagle._ import com.twitter.finagle.param.Stats import com.twitter.finagle.stats.StatsReceiver import com.twitter.logging.Logger import com.twitter.util.{Future, Return, Stopwatch, Throw, Time} object RollbackFactory { private val RollbackQuery = QueryRequest("R...
luciferous/finagle
finagle-mysql/src/main/scala/com/twitter/finagle/mysql/RollbackFactory.scala
Scala
apache-2.0
2,948
package com.eugene.impatience_scala import scala.util.Random /** * Created by eugene on 16/2/27. */ object Chap1 { def main(args: Array[String]) { val x = math.sqrt(3) println(3-x*x) val y = BigInt(2).pow(1024) println(y) val z = BigInt.probablePrime(100, Random); ...
Ernestyj/ScalaStudy
src/com/eugene/impatience_scala/Chap1.scala
Scala
gpl-3.0
537
/** * 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...
stealthly/kafka
core/src/main/scala/kafka/controller/ReplicaStateMachine.scala
Scala
apache-2.0
22,109
/* * 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 ...
kimoonkim/spark
resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/kubernetes/integrationtest/backend/GCE/GCETestBackend.scala
Scala
apache-2.0
1,710
package com.rocketfuel.sdbc.postgresql import org.scalatest._ import com.rocketfuel.sdbc.PostgreSql._ class QSeqSetterSpec extends FunSuite { test("implicit Seq[Int] conversion works") { assertCompiles("Seq(1,2,3): ParameterValue") } test("implicit Seq[Option[Int]] conversion works") { assertCompiles(...
rocketfuel/sdbc
postgresql/src/test/scala/com/rocketfuel/sdbc/postgresql/QSeqSetterSpec.scala
Scala
bsd-3-clause
774
package model import model.impl.PlayerNameEnum.PlayerNameEnum import model.impl.Tile import model.impl.TileNameEnum.TileNameEnum import util.position.Position trait FieldTrait { def isOccupied(pos: Position): Boolean def changeTilePos(player: PlayerNameEnum, posOld: Position, posNew: Position): Boolean def ge...
MartinLei/Arimaa
src/main/scala/model/FieldTrait.scala
Scala
mit
1,096
package org.jetbrains.plugins.scala.packagesearch.configuration import com.intellij.ide.ui.search.{SearchableOptionContributor, SearchableOptionProcessor} import com.jetbrains.packagesearch.intellij.plugin.configuration.ui.PackageSearchGeneralConfigurable class SbtSearchableOptionContributor extends SearchableOptionC...
JetBrains/intellij-scala
scala/integration/packagesearch/src/org/jetbrains/plugins/scala/packagesearch/configuration/SbtSearchableOptionContributor.scala
Scala
apache-2.0
719
package com.robot.core import scalaz.\\/ /** * Board having rows & columns **/ final class Board private(val rows:Int,val columns:Int) { def contains(p: Point): Boolean = p match { case Point(x, y) => !(x < 0 || x > columns - 1 || y < 0 || y > rows - 1) } def getAt(x: Int, y: Int): Option[Point] = { ...
ratheeshmohan/robotappscala
src/main/scala/com/robot/core/board.scala
Scala
apache-2.0
810
// Copyright 2014 Commonwealth Bank of Australia // // 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 ap...
shyam334/ebenezer
tools/src/main/scala/au/com/cba/omnia/ebenezer/cli/Cat.scala
Scala
apache-2.0
1,247
/** * Copyright (c) 2012 Petr Kozelek <petr.kozelek@gmail.com> * * The full copyright and license information is presented * in the file LICENSE that was distributed with this source code. */ package mql.model.semantic import org.scalatest.FlatSpec import mql.EqualitySpec import org.scalatest.matchers.ShouldMatch...
footcha/MQL
test/main/scala/mql/model/semantic/ColumnSpec.scala
Scala
bsd-3-clause
937
package com.datastax.examples.meetup.websocket import com.datastax.examples.meetup.model._ import org.apache.spark.storage.StorageLevel import scalawebsocket.WebSocket import org.apache.spark.streaming.receiver.Receiver import org.apache.spark.Logging import org.json4s._ import org.json4s.jackson.JsonMethods._ class...
rstml/datastax-spark-streaming-demo
src/main/scala/com/datastax/examples/meetup/websocket/WebSocketReceiver.scala
Scala
apache-2.0
1,513
/* * Copyright 2001-2014 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...
scalatest/scalatest
jvm/scalactic-test/src/test/scala/org/scalactic/anyvals/PosZDoubleSpec.scala
Scala
apache-2.0
16,473
/* * 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/pipeline/api/keras2/layers/Minimum.scala
Scala
apache-2.0
1,765
package opennlp.scalabha.cluster /** * A confusion matrix for comparing gold clusters to some predicted clusters. * * @param goldLabels the set of labels from the gold labeled data * @param predictedOutcomes a set of (usually autogenerated) labels for the predicted clusters * @param counts the matrix, where each ...
eponvert/Scalabha
src/main/scala/opennlp/scalabha/cluster/Evaluation.scala
Scala
apache-2.0
2,534
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 Foundatio...
HuangLS/neo4j
community/cypher/frontend-2.3/src/main/scala/org/neo4j/cypher/internal/frontend/v2_3/ast/functions/Sin.scala
Scala
apache-2.0
1,182
def tuple = (1, Map(1 -> 2)) println(/*start*/tuple._2(1)/*end*/) //Int
ilinum/intellij-scala
testdata/typeInference/bugs5/SCL3278A.scala
Scala
apache-2.0
71
package com.google.protobuf import com.google.protobuf.DescriptorProtos._ object Descriptors { class EnumValueDescriptor { def getName(): String = ??? def getNumber(): Int = ??? } class EnumDescriptor { def getName(): String = ??? def getContainingType(): Descriptor = ??? def getValues()...
trueaccord/protobuf-scala-runtime
shared/src/main/scala/com/google/protobuf/Descriptors.scala
Scala
apache-2.0
2,590
package nl.malienkolders.htm.battle package comet import snippet._ import _root_.net.liftweb._ import http._ import common._ import actor._ import util._ import Helpers._ import _root_.scala.xml.{ NodeSeq, Text } import _root_.java.util.Date import nl.malienkolders.htm.lib.model._ import dispatch._ impor...
hema-tournament-manager/htm
htm-battle/src/main/scala/nl/malienkolders/htm/battle/comet/BattleServer.scala
Scala
apache-2.0
11,075
package mesosphere.marathon /** * The accepted resource roles default behavior defines whether which values are selected for the accepted resource roles by default * * - [[AcceptedResourceRolesDefaultBehavior.Any]] indicates that either reserved or unreserved resources will be accepted. (default) * - [[Accep...
mesosphere/marathon
src/main/scala/mesosphere/marathon/AcceptedResourceRolesDefaultBehavior.scala
Scala
apache-2.0
1,479
package org.example1.usage import org.example1.declaration.data.A import org.example1.declaration.{X => X_Renamed} trait Usage_WithRename_OfMovedClass_OtherImportCommon1 { val a: A = ??? val x: X_Renamed = ??? }
JetBrains/intellij-scala
scala/scala-impl/testdata/move/allInOne/before/org/example1/usage/Usage_WithRename_OfMovedClass_OtherImportCommon1.scala
Scala
apache-2.0
218
/*********************************************************************** * 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-spark/geomesa-spark-jts/src/main/scala/org/locationtech/geomesa/spark/jts/util/WKUtils.scala
Scala
apache-2.0
2,243
import scala.language.experimental.macros import scala.reflect.macros.Context object Macros { def impl(c: Context) = { import c.universe._ c.Expr[Unit](q"""println("Hello World")""") } def hello: Unit = macro impl }
hbutani/hive-lineage
macros/src/main/scala/Macros.scala
Scala
apache-2.0
232
package net.debasishg.sw15.algebra package domain.trade package algebra import java.util.{ Date, Calendar } import scalaz._ import Scalaz._ import \\/._ /* trait Trade {this: RefModel => case class TradeModel (account: Account, instrument: Instrument, refNo: String, market: Market, unitPrice: BigDecimal, quan...
debasishg/scalaworld15
src/main/scala/sw15/algebra/algebra/trade.scala
Scala
apache-2.0
499
package lila.puzzle import play.api.data._ import play.api.data.Forms._ object DataForm { val round = Form(single( "win" -> number )) val vote = Form(single( "vote" -> number )) }
clarkerubber/lila
modules/puzzle/src/main/DataForm.scala
Scala
agpl-3.0
200
package edu.mit.csail.sdg.hsqldb.data.access.query.setOps import edu.mit.csail.sdg.hsqldb.data.access.QueryExpr /** * Created by IntelliJ IDEA. * User: Dwayne * Date: 7/9/11 * Time: 9:00 AM * To change this template use File | Settings | File Templates. */ case class Union(left: QueryExpr, right: Q...
dlreeves/ormolu
src/edu/mit/csail/sdg/hsqldb/data/access/query/setOps/Union.scala
Scala
mit
675
package gitbucket.core.service import gitbucket.core.model.Profile._ import profile.simple._ import gitbucket.core.util.StringUtil._ import gitbucket.core.util.Implicits._ import gitbucket.core.model._ import scala.slick.jdbc.{StaticQuery => Q} import Q.interpolation trait IssuesService { import IssuesService._ ...
marklacroix/gitbucket
src/main/scala/gitbucket/core/service/IssuesService.scala
Scala
apache-2.0
23,268
package lila.round import akka.stream.OverflowStrategy import akka.stream.scaladsl._ import chess.Color import chess.format.Forsyth import chess.{ Centis, Replay } import play.api.libs.json._ import scala.concurrent.ExecutionContext import lila.common.Bus import lila.game.actorApi.FinishGame import lila.game.actorApi...
luanlv/lila
modules/round/src/main/ApiMoveStream.scala
Scala
mit
3,758
/* * Copyright 2012-2014 Comcast Cable Communications Management, 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 * * Unl...
Comcast/sirius
src/main/scala/com/comcast/xfinity/sirius/uberstore/data/UberDataFile.scala
Scala
apache-2.0
4,665
package org.apache.mesos.chronos.scheduler.jobs import org.apache.mesos.chronos.scheduler.graph.JobGraph import org.apache.mesos.chronos.scheduler.state.PersistenceStore import org.joda.time._ import org.specs2.mock._ import org.specs2.mutable._ class JobSchedulerSpec extends SpecificationWithJUnit with Mockito { i...
BoopBoopBeepBoop/chronos
src/test/scala/org/apache/mesos/chronos/scheduler/jobs/JobSchedulerSpec.scala
Scala
apache-2.0
13,451
/* * 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
core/src/test/scala/io/techcode/streamy/util/monitor/GarbageCollectorMonitorSpec.scala
Scala
mit
4,603
package scorex.network import akka.actor.Props import scorex.ActorTestingCommons import scorex.block.Block._ import scorex.network.BlockchainSynchronizer.{InnerId, InnerIds} import scorex.settings.SettingsMock import scorex.transaction.History import scala.language.implicitConversions class HistoryReplierSpecificati...
B83YPoj/Waves
src/test/scala/scorex/network/HistoryReplierSpecification.scala
Scala
apache-2.0
2,395
package play.core.server.websocket import org.jboss.netty.buffer.ChannelBuffer import org.jboss.netty.channel.Channel import java.nio.charset.Charset import org.jboss.netty.util.CharsetUtil import org.jboss.netty.handler.codec.http.websocketx.WebSocketFrame import org.jboss.netty.handler.codec.http.websocketx.TextWebS...
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/play/src/main/scala/play/core/server/websocket/Frame.scala
Scala
mit
1,567
package chrome.webRequest.bindings import scala.scalajs.js @js.native trait WebRequestBodyDetails extends WebRequestDetails { /** * Contains the HTTP request body data. Only provided if extraInfoSpec contains 'requestBody'. * @since Chrome 23. */ val requestBody: WebRequestBody = js.native }
lucidd/scala-js-chrome
bindings/src/main/scala/chrome/webRequest/bindings/WebRequestBodyDetails.scala
Scala
mit
311
/*********************************************************************** * 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-filter/src/main/scala/org/locationtech/geomesa/filter/expression/FastTemporalOperator.scala
Scala
apache-2.0
5,627
package isabelle.eclipse.ui.views.outline import org.eclipse.jface.resource.ResourceManager import org.eclipse.jface.viewers.LabelProvider import org.eclipse.swt.graphics.Image import isabelle.Library import isabelle.Thy_Syntax.Structure import isabelle.eclipse.ui.internal.IsabelleImages /** * Label provider for T...
andriusvelykis/isabelle-eclipse
isabelle.eclipse.ui/src/isabelle/eclipse/ui/views/outline/TheoryStructureLabelProvider.scala
Scala
epl-1.0
2,830