code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
/* * Copyright 2016 The BigDL 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 agr...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/estimator/EstimateSupportive.scala
Scala
apache-2.0
4,714
package utils import play.api.mvc.RequestHeader object Helper { /* * find URI * @param request - HTTP request */ def findUri(request: RequestHeader): String = { request.uri } /* * find session values * @param request - HTTP request * @param element - find session value stored in element ...
knoldus/PlayingField
app/utils/Helper.scala
Scala
apache-2.0
804
package org.jetbrains.plugins.scala package lang package refactoring.extractMethod import com.intellij.psi._ import org.jetbrains.annotations.Nullable import org.jetbrains.plugins.scala.lang.psi.types.ScType import com.intellij.openapi.actionSystem.DataContext import com.intellij.openapi.project.Project import com.int...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/refactoring/extractMethod/ScalaExtractMethodHandler.scala
Scala
apache-2.0
18,473
/* * Copyright 2012 Twitter Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
dsias/zipkin
zipkin-finatra/src/main/scala/com/twitter/zipkin/web/App.scala
Scala
apache-2.0
8,075
/* * MnoClassifier learns MSISDN-Operator combinations to afterwards predict Operators. * Copyright (C) 2013 MACH Connectivity GmbH * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either...
mkroli/mnoclassifier
src/main/scala/com/github/mkroli/mnoclassifier/service/http/TrainingPlanComponent.scala
Scala
gpl-2.0
3,612
/* * 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 ...
tzulitai/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/calcite/FlinkLogicalRelFactories.scala
Scala
apache-2.0
9,564
/* * Copyright 2014 JHC Systems Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
andrewjskatz/sqlest
src/main/scala/sqlest/untyped/ast/syntax/ColumnSyntax.scala
Scala
apache-2.0
6,862
package shapeless.datatype.record import org.scalacheck.Prop.forAll import org.scalacheck._ import magnolify.scalacheck.auto._ import shapeless._ import scala.language.implicitConversions object RecordMapperRecords { case class RequiredA(intField: Int, longField: Long, stringField: String) case class RequiredB(i...
nevillelyh/shapeless-datatype
core/src/test/scala/shapeless/datatype/record/RecordMapperSpec.scala
Scala
apache-2.0
4,558
package org.jetbrains.plugins.scala.lang.transformation.calls import org.jetbrains.plugins.scala.lang.transformation.TransformerTest /** * @author Pavel Fatin */ class ExpandVarargArgumentTest extends TransformerTest(ExpandVarargArgument, """ object O { def f(v: A*) {} def g(v1: A, v2: B*) {}...
whorbowicz/intellij-scala
test/org/jetbrains/plugins/scala/lang/transformation/calls/ExpandVarargArgumentTest.scala
Scala
apache-2.0
1,351
/* * 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 ...
jatin9896/incubator-carbondata
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonAlterTableDropColumnCommand.scala
Scala
apache-2.0
8,798
/* Copyright 2009-2014 EPFL, Lausanne */ import leon._ import leon.lang._ import leon.annotation._ object Numerical { def power(base: BigInt, p: BigInt): BigInt = { require(p >= BigInt(0)) if (p == BigInt(0)) { BigInt(1) } else if (p%BigInt(2) == BigInt(0)) { power(base*base, p/BigInt(2)) ...
ericpony/scala-examples
testcases/repair/Numerical/Numerical2.scala
Scala
mit
1,092
/** * @author Admin * */ package ex8.cs import scala.collection.mutable class translator { var counter = 1 var init = true def initial = init = false var scope = mutable.ListBuffer("") def trueLabalCounter: Int = { counter += 1; counter / 2 } def pars(s: String, file: String = "") = {...
semlie/TheElemOfCompSys
ex8/cs/translator.scala
Scala
gpl-2.0
6,399
package com.tutuur.ducksoup.database import com.tutuur.ducksoup.json.PostJsonProtocol import com.tutuur.ducksoup.meta.Post import slick.driver.JdbcDriver import slick.profile.RelationalProfile.ColumnOption.Length import spray.json._ import scala.concurrent.Await import scala.concurrent.duration.Duration imp...
Thiross/ducksoup
web/src/main/scala/com/tutuur/ducksoup/database/PostDao.scala
Scala
gpl-3.0
2,916
package org.zalando.grafter import scala.reflect.ClassTag trait Reflect { outer => /** * @return true if A implements the list of types defined by a given class tag */ def implements(a: Any)(implicit ct: ClassTag[_]): Boolean = { val types: List[Class[_]] = ct.runtimeClass +: ct.runtimeClass.getI...
jcranky/grafter
core/src/main/scala/org/zalando/grafter/Reflect.scala
Scala
mit
568
package org.scalafmt.util import scala.meta.inputs.Input import scala.collection.mutable final case class MarkdownFile(parts: List[MarkdownPart]) { def renderToString: String = { val out = new StringBuilder() parts.foreach(_.renderToString(out)) out.result() } } object MarkdownFile { sealed abstract...
scalameta/scalafmt
scalafmt-core/shared/src/main/scala/org/scalafmt/util/MarkdownFile.scala
Scala
apache-2.0
3,581
/* * 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/ct600a/v2/LP02.scala
Scala
apache-2.0
3,087
package com.typesafe.sbt package packager package rpm import linux.{LinuxPackageMapping,LinuxFileMetaData} import sbt._ import com.typesafe.sbt.packager.linux.LinuxSymlink case class RpmMetadata( name: String, version: String, release: String, arch: String, vendor: String, os: String, summ...
yanns/sbt-native-packager
src/main/scala/com/typesafe/sbt/packager/rpm/RpmMetadata.scala
Scala
bsd-2-clause
5,442
/* * Copyright 2016 The BigDL 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 agr...
jenniew/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/utils/tf/BigDLToTensorflow.scala
Scala
apache-2.0
16,116
package jp.sf.amateras.solr.scala.async import scala.concurrent.{Promise, Future} import scala.util.{Failure, Success} import jp.sf.amateras.solr.scala.query.{QueryTemplate, ExpressionParser} import org.apache.solr.client.solrj.request.UpdateRequest import jp.sf.amateras.solr.scala.CaseClassMapper import org.apache.so...
matthewchartier/solr-scala-client
src/main/scala/jp/sf/amateras/solr/scala/async/IAsyncSolrClient.scala
Scala
apache-2.0
2,858
package mesosphere.marathon.core.appinfo.impl import mesosphere.marathon.MarathonSchedulerService import mesosphere.marathon.Protos.MarathonTask import mesosphere.marathon.core.appinfo.{ AppInfo, EnrichedTask, TaskCounts, TaskStatsByVersion } import mesosphere.marathon.core.base.Clock import mesosphere.marathon.health...
sledigabel/marathon
src/main/scala/mesosphere/marathon/core/appinfo/impl/AppInfoBaseData.scala
Scala
apache-2.0
5,917
package com.wavesplatform.it.sync.smartcontract import com.typesafe.config.Config import com.wavesplatform.api.http.ApiError.ScriptExecutionError import com.wavesplatform.common.state.ByteStr import com.wavesplatform.common.utils.EitherExt2 import com.wavesplatform.features.BlockchainFeatures import com.wavesplatform....
wavesplatform/Waves
node-it/src/test/scala/com/wavesplatform/it/sync/smartcontract/InvokeScriptTransactionSuite.scala
Scala
mit
9,498
package org.vvcephei.rest import java.io.ByteArrayInputStream import java.net.{URI, URL} import javax.ws.rs.core.MediaType import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.databind.{JsonNode, ObjectMapper} import com.fasterxml.jackson.module.scala.DefaultScalaModule import com.fasterx...
vvcephei/denim
src/test/scala/org/vvcephei/rest/RestClientTest.scala
Scala
apache-2.0
9,358
package org.jetbrains.plugins.scala package lang package structureView package itemsPresentations package impl import javax.swing._ import com.intellij.openapi.editor.colors.{CodeInsightColors, TextAttributesKey} import com.intellij.psi._ import org.jetbrains.plugins.scala.icons.Icons; /** * @author Alexander Podkha...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/structureView/itemsPresentations/impl/ScalaValueItemPresentation.scala
Scala
apache-2.0
788
/* * Copyright 2015 Nicolas Rinaudo * * 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...
nrinaudo/tabulate
laws/shared/src/main/scala/kantan/csv/laws/package.scala
Scala
mit
1,721
package com.twitter.finagle.httpx.netty import org.jboss.netty.buffer.ChannelBuffer import org.jboss.netty.handler.codec.http.{HttpHeaders, HttpMessage, HttpVersion} /** Proxy for HttpMessage. Used by Request and Response. */ private[finagle] trait HttpMessageProxy extends Proxy { protected[finagle] def httpMessa...
suls/finagle
finagle-httpx/src/main/scala/com/twitter/finagle/httpx/netty/HttpMessageProxy.scala
Scala
apache-2.0
1,049
package scoreboards import org.openqa.selenium.WebDriver import org.openqa.selenium.htmlunit.HtmlUnitDriver import org.openqa.selenium.remote.DesiredCapabilities import scoreboards.Scoreboards._ import scala.annotation.tailrec class Scoreboards(columnNameResolver: ColumnNamesResolver, pageDataResol...
dballinger/scoreboards
src/main/scala/scoreboards/Scoreboards.scala
Scala
apache-2.0
1,278
package core.models.daos import com.mohiva.play.silhouette.api.LoginInfo import core.models.User import core.utils.json.MongoFormats._ import core.utils.mongo.MongoModel import javax.inject.Inject import play.api.libs.json.Json import play.modules.reactivemongo.ReactiveMongoApi import play.modules.reactivemongo.json._...
akkie/silhouette-play-react-seed
app-core/src/main/scala/core/models/daos/UserDAOImpl.scala
Scala
mit
1,962
/********************************************************************************************************************** * This file is part of Scrupal, a Scalable Reactive Web Application Framework for Content Management * * ...
scrupal/scrupal
scrupal-storage/src/main/scala/scrupal/storage/api/Storage.scala
Scala
apache-2.0
4,100
package spatutorial.shared import boopickle._ sealed trait TodoPriority case object TodoLow extends TodoPriority case object TodoNormal extends TodoPriority case object TodoHigh extends TodoPriority case class TodoItem(id: String, timeStamp:Int, content: String, priority: TodoPriority, completed: Boolean) object...
kkasravi/scalajs-spa-tutorial
shared/src/main/scala/spatutorial/shared/TodoItem.scala
Scala
apache-2.0
500
package com.github.diegopacheco.sandbox.scala.akka.actor.persistence import akka.persistence.SaveSnapshotFailure import akka.persistence.SaveSnapshotSuccess import akka.persistence.Processor import akka.persistence.SnapshotOffer import akka.persistence.Persistent import akka.actor.ActorSystem import akka.actor.Props i...
diegopacheco/scala-playground
scala_11_akka_23_full_playground/src/main/scala/com/github/diegopacheco/sandbox/scala/akka/actor/persistence/SnapshotsPersistenceApp.scala
Scala
unlicense
1,415
// Copyright 2015-2016 Ricardo Gladwell. // Licensed under the GNU Affero General Public License. // See the LICENSE file for more information. package com.is_hosted_by.api import java.io.InputStream import scala.concurrent.{ExecutionContext, Future} trait NetworkParser { def parseNetwork(input: InputStream)(impl...
rgladwell/is-aws-api
src/main/scala/com/is_hosted_by/api/NetworkParser.scala
Scala
agpl-3.0
377
/* * Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com> */ package play.api.test import org.openqa.selenium.WebDriver import org.specs2.execute.{ AsResult, Result } import org.specs2.mutable.Around import org.specs2.specification.Scope import play.api.inject.guice.{ GuiceApplicationBuilder, GuiceApp...
Shenker93/playframework
framework/src/play-specs2/src/main/scala/play/api/test/Specs.scala
Scala
apache-2.0
3,822
/* * Copyright 2012 IL <iron9light AT gmali DOT 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 applicabl...
iron9light/ideacolorschemes-commons
src/main/scala/com/ideacolorschemes/commons/json/VersionSerializer.scala
Scala
apache-2.0
1,418
package com.box.castle.router class RouterException(val msg: String, e: Throwable = null) extends RuntimeException(msg, e)
Box-Castle/router
src/main/scala/com/box/castle/router/RouterException.scala
Scala
apache-2.0
124
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this fi...
wangcy6/storm_app
Elasticsearch/elasticsearch-hadoop-master/spark/sql-13/src/main/scala/org/elasticsearch/spark/sql/DefaultSource.scala
Scala
apache-2.0
23,062
package services.graphstages import akka.stream._ import akka.stream.stage.{GraphStage, GraphStageLogic, InHandler, OutHandler} import drt.shared.CrunchApi.{MillisSinceEpoch, StaffMinute, StaffMinutes} import drt.shared.Terminals.Terminal import drt.shared.{SDateLike, _} import org.slf4j.{Logger, LoggerFactory} import...
UKHomeOffice/drt-scalajs-spa-exploration
server/src/main/scala/services/graphstages/StaffGraphStage.scala
Scala
apache-2.0
7,937
package io.finch.petstore import _root_.argonaut._, Argonaut._ import com.twitter.finagle.{Service, SimpleFilter} import com.twitter.finagle.httpx.{Request, Response} import com.twitter.util.Future import io.finch.argonaut._ import io.finch.request._ import io.finch.request.items._ import io.finch.response._ import io...
bthuillier/finch
petstore/src/main/scala/io/finch/petstore/ErrorHandling.scala
Scala
apache-2.0
1,670
package io.mpjsons.impl /** * Exception used internally inside this library. * @param message message for the exception * @param cause cause of the exception * @author Marcin Pieciukiewicz */ class JsonInnerException(message: String, cause: Exception) extends RuntimeException(message, cause) {}
marpiec/mpjsons
src/main/scala/io/mpjsons/impl/JsonInnerException.scala
Scala
apache-2.0
302
/** * This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]]. */ // DO NOT EDIT MANUALLY package sbt.internal.langserver.codec import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError } trait LocationFormats { self: sbt.internal.langserver.codec.RangeFormats with s...
xuwei-k/xsbt
protocol/src/main/contraband-scala/sbt/internal/langserver/codec/LocationFormats.scala
Scala
apache-2.0
1,196
package com.airbnb.aerosolve.training import java.io.{StringReader, BufferedWriter, BufferedReader, StringWriter} import com.airbnb.aerosolve.core.models.{ModelFactory, MlpModel} import com.airbnb.aerosolve.core.Example import com.typesafe.config.ConfigFactory import org.apache.spark.SparkContext import org.junit.Tes...
ralic/aerosolve
training/src/test/scala/com/airbnb/aerosolve/training/MlpModelTrainerTest.scala
Scala
apache-2.0
7,641
package com.novocode.squery import java.sql.ResultSet import com.novocode.squery.session.{Session, CloseableIterator, ReadAheadIterator, PositionedResult} import com.novocode.squery.sql.QueryBuilder class QueryInvoker[T,R] private (q: Query[ConvertableColumn[T]], mapper: T => R) { lazy val selectStatement = new Qu...
gnufied/squery
src/com/novocode/squery/QueryInvoker.scala
Scala
bsd-2-clause
2,559
/* * Copyright 2016 The BigDL 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 agr...
intel-analytics/BigDL
scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/nn/NarrowTableSpec.scala
Scala
apache-2.0
1,273
package spinoco.fs2.cassandra.system import java.nio.ByteBuffer /** * C* 3+ schema for columns */ case class ColumnSchema( keyspace_name: String , table_name: String , column_name: String , clustering_order: String , column_name_bytes: ByteBuffer , kind:String , position: Int , `type`: String ) ...
Spinoco/fs2-cassandra
core/src/main/scala/spinoco/fs2/cassandra/system/ColumnSchema.scala
Scala
mit
626
package io.youi.material case class MaterialIcon(name: String) { def isEmpty: Boolean = name.isEmpty def nonEmpty: Boolean = name.nonEmpty }
outr/youi
gui/src/main/scala/io/youi/material/MaterialIcon.scala
Scala
mit
145
/** * 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...
bryaakov/CM-Well
server/cmwell-tracking/src/main/scala/cmwell/tracking/TrackingUtil.scala
Scala
apache-2.0
7,876
/** * 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...
martinluther/orbeon-forms
src/main/scala/org/orbeon/oxf/fr/relational/crud/Common.scala
Scala
lgpl-2.1
6,250
package dstructures /** Maps features into original strings * * @constructor create a new FeatureMap with key * @param k key/feature */ class FeatureMap(k:String) extends KeyStore { val key = k; var listlength = 0; var strings = List[String](); def addString(s: String) = { strings = strings ::: List(s...
theikkila/fuzzydb
src/main/scala/dstructures/FeatureMap.scala
Scala
apache-2.0
1,127
/* * Copyright (c) 2013-2014 Erik van Oosten * * 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 ...
scullxbones/metrics-scala
src/main/scala/nl/grons/metrics/scala/MetricBuilder.scala
Scala
apache-2.0
2,402
/* * Copyright 2015 Nicolas Rinaudo * * 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...
nrinaudo/tabulate
enumeratum/shared/src/test/scala/kantan/csv/enumeratum/values/StringEnumCodecTests.scala
Scala
mit
1,077
package scala.tools.scalap import java.io.ByteArrayInputStream import java.nio.charset.StandardCharsets import java.lang.StringBuilder import org.apache.bcel.classfile._ import scala.reflect.internal.pickling.ByteCodecs import scala.tools.scalap.scalax.rules.scalasig.{ByteCode, ScalaSig, ScalaSigAttributeParsers, Sc...
loskutov/intellij-scala
scalap/src/scala/tools/scalap/Decompiler.scala
Scala
apache-2.0
3,948
package akka.persistence.pg.query import java.util.concurrent.TimeUnit import akka.NotUsed import akka.actor.ActorRef import akka.persistence.pg._ import akka.stream.ActorMaterializer import akka.stream.scaladsl.{RunnableGraph, Sink} import akka.util.Timeout import com.typesafe.config.{Config, ConfigFactory} import o...
kwark/akka-persistence-postgresql
modules/akka-persistence-pg/src/test/scala/akka/persistence/pg/query/EventStoreQueryNotificationTest.scala
Scala
mit
3,722
package ml.combust.mleap.core.feature import ml.combust.mleap.core.Model import ml.combust.mleap.core.types.{BasicType, ListType, StructType} /** * Created by mikhail on 9/29/16. */ case class NGramModel(n: Int) extends Model{ def apply(value: Seq[String]): Seq[String] = { value.iterator.sliding(n).withPart...
combust/mleap
mleap-core/src/main/scala/ml/combust/mleap/core/feature/NGramModel.scala
Scala
apache-2.0
559
package net.surguy.olympic import scala.collection.mutable._ import java.io.FileInputStream import java.awt.{Frame, BorderLayout} import processing.core.PApplet import processing.core.PConstants import com.hp.hpl.jena.ontology._ import com.hp.hpl.jena.rdf.model._ import pimpmyjena.Conversions._ /** * Visualize the ...
inigo/olympic-mashup
src/main/scala/net/surguy/olympic/ProcessingVisualization.scala
Scala
gpl-3.0
3,994
import at.logic.gapt.language.fol._ import at.logic.gapt.proofs.lk._ object inductionExamples { // Variables and constants val (x, y, z) = (FOLVar("x"), FOLVar("y"), FOLVar("z")) val (a, b, c) = (FOLVar("α"), FOLVar("β"), FOLVar("γ")) val zero = FOLConst("0") // Successor and addition def S(x: FOLTerm) =...
gisellemnr/gapt
examples/simple/induction.scala
Scala
gpl-3.0
3,121
package services import javax.inject.Singleton import java.util.UUID import com.google.inject.ImplementedBy /** * A type declaring the interface that will be injectable. */ @ImplementedBy(classOf[SimpleUUIDGenerator]) abstract class UUIDGenerator() { def generate: UUID } /** * A simple implementation of UUIDGe...
lancearlaus/vega-factor-scratchpad
app/services/UUIDGenerator.scala
Scala
apache-2.0
456
/* * Random Access list. * Copyright (C) 2014 Michael Thorsley * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later ver...
Vyzen/trout
src/main/scala/com/eigenvektor/collections/immutable/RandomAccessList.scala
Scala
gpl-3.0
1,188
/* * Copyright 2014 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
blaze-core/src/main/scala/org/http4s/blazecore/ResponseHeaderTimeoutStage.scala
Scala
apache-2.0
2,812
/* Code Pulse: a real-time code coverage tool, for more information, see <http://code-pulse.com/> * * Copyright (C) 2014-2017 Code Dx, Inc. <https://codedx.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 ...
secdec/codepulse
hq/src/main/scala/com/secdec/bytefrog/hq/protocol/ControlMessageSender.scala
Scala
apache-2.0
2,195
package extruder.core import cats.data.NonEmptyList import extruder.core.ValidationErrorsToThrowable.defaultValidationErrorsThrowable import extruder.data.{ValidationError, ValidationErrors} import org.scalacheck.{Arbitrary, Gen} import org.scalatest.funsuite.AnyFunSuite import org.scalatestplus.scalacheck.ScalaCheckD...
janstenpickle/extruder
core/src/test/scala/extruder/core/ValidationErrorsToThrowableSuite.scala
Scala
mit
1,311
package com.socrata.http.common.util import java.io.InputStream class AcknowledgeableInputStream(underlying: InputStream, limit: Long) extends InputStream with Acknowledgeable { private var readSoFar: Long = 0L private def checkSize() { if(readSoFar > limit || readSoFar < 0) throw new TooMuchDataWithoutAckno...
socrata-platform/socrata-http
socrata-http-common/src/main/scala/com/socrata/http/common/util/AcknowledgeableInputStream.scala
Scala
apache-2.0
940
/* * Copyright © 2014 TU Berlin (emma@dima.tu-berlin.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.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
aalexandrov/emma
emma-examples/emma-examples-spark/src/test/scala/org/emmalanguage/examples/ml/classification/SparkNaiveBayesIntegrationSpec.scala
Scala
apache-2.0
1,400
/* * 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 u...
mike0sv/spark
sql/core/src/main/scala/org/apache/spark/sql/expressions/UserDefinedFunction.scala
Scala
apache-2.0
3,345
/* Copyright 2013 Ilya Lakhin (Илья Александрович Лахин) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applica...
Eliah-Lakhin/papa-carlo
src/main/scala/name.lakhin.eliah.projects/papacarlo/syntax/rules/ReferentialRule.scala
Scala
apache-2.0
5,130
package com.github.basp1.pulsar import akka.actor.{ActorRef, ActorSystem} object Main extends App { val system: ActorSystem = ActorSystem("main") val worker: ActorRef = system.actorOf(Worker.props()) worker ! new Worker.Append(new Track(1L, 1000, 42, 0)) worker ! new Worker.Time(1000) }
basp1/pulsar
src/main/scala/Main.scala
Scala
mit
301
/* * Copyright 2016 rdbc contributors * * 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...
rdbc-io/rdbc-pgsql
rdbc-pgsql-core/src/main/scala/io/rdbc/pgsql/core/internal/typeconv/LocalTimeTypeConverter.scala
Scala
apache-2.0
1,043
package domala.internal.macros.meta.args import scala.meta._ case class TableGeneratorArgs( catalog: Term.Arg, schema: Term.Arg, table: Term.Arg, pkColumnName: Term.Arg, valueColumnName: Term.Arg, pkColumnValue: Term.Arg, initialValue: Term.Arg, allocationSize: Term.Arg, implementer: Type ) object ...
bakenezumi/domala
meta/src/main/scala/domala/internal/macros/meta/args/TableGeneratorArgs.scala
Scala
apache-2.0
1,600
package com.scalaenthusiasts import java.io.File import org.apache.spark.rdd.RDD import org.apache.spark.{SparkConf, SparkContext} case class WikipediaArticle(title: String, text: String) { /** * @return Whether the text of this article mentions `lang` or not * @param lang Language to look for (e.g. "Scala...
littlenag/scala-enthusiasts
spark-intro/src/main/scala/com/scalaenthusiasts/RDD_03.scala
Scala
mit
6,226
package com.twitter.scalding sealed trait DescribedArg { def key: String def description: String } final case class RequiredArg(key: String, description: String) extends DescribedArg final case class OptionalArg(key: String, description: String) extends DescribedArg final case class ListArg(key: String, descripti...
tdyas/scalding
scalding-core/src/main/scala/com/twitter/scalding/ArgHelp.scala
Scala
apache-2.0
4,180
package at.logic.gapt.examples import at.logic.gapt.expr._ import at.logic.gapt.expr.hol.universalClosure import at.logic.gapt.proofs.{ Context, Sequent } import at.logic.gapt.proofs.gaptic._ import at.logic.gapt.proofs.lk.LKProof /** * Monoid cancellation benchmark from * Gregory Malecha and Jesper Bengtson: Extens...
gebner/gapt
examples/gaptic/MonoidCancellation.scala
Scala
gpl-3.0
3,292
package org.ugr.sci2s.mllib.test import org.apache.spark.mllib.classification.ClassificationModel import org.apache.spark.mllib.regression.LabeledPoint import org.apache.spark.rdd.RDD import org.apache.spark.mllib.classification.SVMModel import org.apache.spark.mllib.linalg._ trait ClassifierAdapter extends Serializa...
sramirez/spark-experiments
src/main/scala/org/ugr/sci2s/mllib/test/ClassifierAdapter.scala
Scala
apache-2.0
514
/** * Copyright (C) 2015-2016 Duncan DeVore. <https://github.com/ironfish/> */ package akka.persistence.mongo.journal import akka.actor.ActorLogging import akka.persistence.PersistentRepr import akka.persistence.mongo.{CasbahCommon, CasbahRoot, CasbahJournalCommon} import com.mongodb.casbah.Imports._ import scal...
ironfish/akka-persistence-mongo
src/main/scala/akka/persistence/mongo/journal/CasbahJournalRoot.scala
Scala
apache-2.0
5,044
package spire package algebra import java.lang.Double.{ isInfinite, isNaN, doubleToLongBits } import java.lang.Long.{ numberOfTrailingZeros } trait Field[@sp(Byte, Short, Int, Long, Float, Double) A] extends Any with EuclideanRing[A] with MultiplicativeAbGroup[A] { /** * This is implemented in terms of basic Fi...
tixxit/spire
core/shared/src/main/scala/spire/algebra/Field.scala
Scala
mit
1,423
/* * 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
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/package.scala
Scala
apache-2.0
2,829
package org.jetbrains.plugins.scala.codeInsight.intention.types import org.jetbrains.plugins.scala.lang.psi.api.base.patterns.{ScBindingPattern, ScTypedPattern, ScWildcardPattern} import org.jetbrains.plugins.scala.lang.psi.api.statements.params.ScParameter import org.jetbrains.plugins.scala.lang.psi.api.statements.{S...
LPTK/intellij-scala
src/org/jetbrains/plugins/scala/codeInsight/intention/types/Description.scala
Scala
apache-2.0
1,768
package hyperion import scala.concurrent.duration.DurationInt import scala.concurrent.ExecutionContext.Implicits.global import akka.actor.{ActorSystem, DeadLetter, Props} import akka.event.Logging import akka.http.scaladsl.Http import akka.pattern.{BackoffOpts, BackoffSupervisor} import akka.stream.{ActorMaterializer,...
mthmulders/hyperion
app/src/main/scala/hyperion/core.scala
Scala
mit
2,768
/* * @author Genc Mazlami * * Copyright 2013 University of Zurich * * 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 * * U...
gmazlami/dcop-maxsum
src/main/scala/com/signalcollect/dcop/vertices/id/VariableId.scala
Scala
apache-2.0
815
package com.freshsoft.matterbridge.routing import akka.http.scaladsl.server.Directives.{path, _} import akka.http.scaladsl.server.Route import com.freshsoft.matterbridge.service.database.CodingLoveService import model.{CodingLoveUpload, DatabaseEntityJsonSupport} import scala.concurrent.ExecutionContext /** * The ...
Freshwood/matterbridge
src/main/scala/com/freshsoft/matterbridge/routing/CodingLoveRoute.scala
Scala
mit
1,314
package coffee.cypher.scalaexamples object HelloWorld { def main(args: Array[String]) { println("Hello World (Scala)") } }
Cypher121/CSCodeExamples
src/coffee/cypher/scalaexamples/HelloWorld.scala
Scala
mit
140
import sbt._ object TestBuild extends Build { val k1 = TaskKey[Unit]("k1") val k2 = TaskKey[Unit]("k2") val k3 = TaskKey[Unit]("k3") val k4 = TaskKey[Unit]("k4") val k5 = TaskKey[Unit]("k4") lazy val root = Project("root", file(".")) }
jkinkead/sbt
sbt/src/sbt-test/project/session-save/project/Build.scala
Scala
bsd-3-clause
247
import com.typesafe.sbt.SbtSite.site import sbt._ import Keys._ import com.typesafe.sbt._ object LibExifBuild extends Build { val dependencies = Seq( "org.scalatest" %% "scalatest" % "3.0.1" % "test" cross CrossVersion.binary ) override lazy val settings = super.settings ++ Seq( libraryDependencies ...
ngrossmann/slibexif
project/Build.scala
Scala
gpl-3.0
1,984
/* * 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 ...
himanshudhami/PredictionIO
examples/scala-parallel-similarproduct/no-set-user/src/main/scala/ALSAlgorithm.scala
Scala
apache-2.0
7,806
/* * 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
mllib/src/main/scala/org/apache/spark/ml/classification/GBTClassifier.scala
Scala
apache-2.0
17,177
package tastytest object Logarithms { opaque type Logarithm = Double object Logarithm { // These are the two ways to lift to the Logarithm type private[Logarithms] def apply(d: Double): Logarithm = math.log(d) def of(d: Double): Option[Logarithm] = if (d > 0.0) Some(math.log(d)) else None ...
lrytz/scala
test/tasty/run/src-3/tastytest/Logarithms.scala
Scala
apache-2.0
674
package lila.analyse package actorApi import lila.game.Game case class AnalysisReady(game: Game, analysis: Analysis) case class AnalysisProgress( game: Game, variant: chess.variant.Variant, initialFen: chess.format.FEN, analysis: Analysis ) case class StudyAnalysisProgress(analysis: Analysis, comple...
luanlv/lila
modules/analyse/src/main/actorApi.scala
Scala
mit
333
/* * Copyright 2016 The BigDL 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 agr...
qiuxin2012/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/keras/Cropping2DSpec.scala
Scala
apache-2.0
1,786
/* * Copyright 2013 websudos 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 t...
nosheenzaza/phantom-data-centric
phantom-dsl/src/test/scala/com/websudos/phantom/tables/MyTest.scala
Scala
gpl-2.0
1,273
package org.jetbrains.bsp.project.test.environment import com.intellij.execution.application.ApplicationConfiguration import com.intellij.execution.configurations.RunConfiguration class BspEnvironmentApplicationRunnerExtension extends BspEnvironmentRunnerExtension { override def classes(config: RunConfiguration): Op...
JetBrains/intellij-scala
bsp/src/org/jetbrains/bsp/project/test/environment/BspEnvironmentApplicationRunnerExtension.scala
Scala
apache-2.0
718
// https://www.hackerrank.com/challenges/order-exercises // see https://en.wikipedia.org/wiki/Maximum_subarray_problem object OrderExercises extends App { // kadane def max(A: Array[Int]): Int = { var maxLocal, maxTotal = 0 for (a <- A) { maxLocal = math.max(0, maxLocal + a) maxTotal = math.max(maxTotal, ...
flopezlasanta/hackerrank
src/functional_programming/functional_structures/OrderExercises.scala
Scala
mit
920
import java.time.{LocalDate, LocalDateTime} import java.util.Date import org.joda.time.DateTime trait Now[T] { def apply(): T } object Now { def apply[T : Now]: Now[T] = implicitly def apply[T](value: => T): Now[T] = new Now[T] { override def apply(): T = value } implicit object DateNow extends Now...
PeterPerhac/cheat-sheets
scala-scratches/now.scala
Scala
unlicense
742
package uk.gov.dvla.vehicles.presentation.common.mappings import java.util.Locale import org.joda.time.{DateTime, DateTimeZone} import org.joda.time.format.DateTimeFormat object Time { val format = "h:mm a" val formatHour = "h a" def fromMinutes(mins: Long) = { val millisPerMinute = 60000 val millis =...
dvla/vehicles-presentation-common
app/uk/gov/dvla/vehicles/presentation/common/mappings/Time.scala
Scala
mit
869
package net.kwas.impatient.ch6 import org.scalatest._ class ArgumentReverserSpec extends FlatSpec with Matchers { "ArgumentReverser" should "print out reversed arguments" in { ArgumentReverser.main(Array("1", "2", "3")) } }
dkwasny/ScalaImpatient
src/test/scala/net/kwas/impatient/ch6/ArgumentReverserSpec.scala
Scala
mit
235
/* * 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/amls-frontend
app/models/businessdetails/RegisteredOfficeIsUK.scala
Scala
apache-2.0
1,373
package com.kubukoz.adventofcode2016 import org.scalatest.{FlatSpec, Matchers} class Day12Tests extends FlatSpec with Matchers { "transformInput" should "work" in { Day12.transformInput( """cpy 41 a |inc a |inc a |dec a |jnz a 2 |dec a""".stripMargin.split("\\n").to...
kubukoz/advent-of-code-2016
src/test/scala/com/kubukoz/adventofcode2016/Day12Tests.scala
Scala
apache-2.0
363
/*********************************************************************** * Copyright (c) 2013-2016 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 ...
mdzimmerman/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/geotools/GridSnapTest.scala
Scala
apache-2.0
4,236
package edu.berkeley.nlp.entity.wiki import edu.berkeley.nlp.futile.fig.basic.Indexer import scala.collection.mutable.HashMap import scala.collection.mutable.ArrayBuffer import edu.berkeley.nlp.futile.fig.basic.IOUtils import scala.collection.mutable.HashSet import edu.berkeley.nlp.futile.util.Logger import edu.berkel...
malcolmgreaves/berkeley-entity
src/main/java/edu/berkeley/nlp/entity/wiki/WikipediaLinkDB.scala
Scala
gpl-3.0
9,022
/** * @author Yuuto */ package yuuto.inventorytools.gui.slot import net.minecraft.inventory.Slot import yuuto.inventorytools.tiles.TileToolBench import net.minecraft.item.ItemStack import net.minecraft.entity.player.EntityPlayer class SlotTool(tile:TileToolBench, slotIndex:Int, x:Int, y:Int) extends Slot(tile.inv, ...
AnimeniacYuuto/InventoryTools
src/main/scala/yuuto/inventorytools/gui/slot/SlotTool.scala
Scala
gpl-3.0
575
package com.github.eyce9000.spark.bes import org.apache.spark.SparkContext import org.apache.spark.rdd.RDD import org.apache.spark.sql.Row import org.apache.spark.Partition import org.apache.spark.TaskContext import org.apache.spark.sql.types.StructType import org.apache.spark.sql.catalyst.expressions.SpecificMutableR...
eyce9000/bigfix-relevance-spark
src/main/scala/com/github/eyce9000/spark/bes/BigfixRDD.scala
Scala
apache-2.0
1,337
/* Copyright 2009-2016 EPFL, Lausanne */ import leon.annotation._ import leon.lang._ import leon.lang.StaticChecks._ import leon.io.{ FileInputStream => FIS, FileOutputStream => FOS, StdOut } import leon.util.{ TimePoint } import scala.annotation.tailrec /** * Some basic image processing; this version uses V...
mantognini/GenC
3 master thesis project report/case_studies/Image Processing/benchmark/ImageProcessingVLABenchmark.vc_removed.scala
Scala
mit
24,231
package com.cloudray.scalapress.plugin.ecommerce.tag import org.scalatest.{OneInstancePerTest, FunSuite} import org.scalatest.mock.MockitoSugar import com.cloudray.scalapress.plugin.ecommerce.tags.InvoiceNumberTag import com.cloudray.scalapress.plugin.ecommerce.domain.Order import javax.servlet.http.HttpServletRequest...
vidyacraghav/scalapress
src/test/scala/com/cloudray/scalapress/plugin/ecommerce/tag/InvoiceNumberTagTest.scala
Scala
apache-2.0
907
/* * The MIT License (MIT) * * Copyright (c) 2014 Heiko Blobner * * 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...
windelknecht/stup-utils
src/main/scala/de/windelknecht/stup/utils/ui/fxml/ResourceFxmlLoader.scala
Scala
mit
6,162