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
/* * 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 ...
chuckchen/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/metric/CustomMetrics.scala
Scala
apache-2.0
2,046
/** * Utility functions. * * @author Yujian Zhang <yujian{dot}zhang[at]gmail(dot)com> * * License: * GNU General Public License v2 * http://www.gnu.org/licenses/gpl-2.0.html * Copyright (C) 2014-2015 Yujian Zhang */ package net.whily.scaland import java.io.{PrintWriter, StringWriter} import android.app....
whily/scaland
src/main/scala/Util.scala
Scala
gpl-2.0
5,455
package nak.classify import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import breeze.linalg._ /** * * @author dlwh */ @RunWith(classOf[JUnitRunner]) class PerceptronTrainerTest extends ClassifierTrainerTestHarness with ContinuousTestHarness { def trainer[L,T]:Classifier.Trainer[L,Counter[...
scalanlp/nak
src/test/scala/nak/classify/PerceptronTrainerTest.scala
Scala
apache-2.0
385
package com.ft.membership.healthcheck import java.net.URI import java.util.concurrent.TimeUnit import com.ft.membership.logging.{LoggingContext, Logging} import com.ft.platform.dropwizard.{AdvancedHealthCheck, AdvancedResult} import com.netflix.hystrix.HystrixCommand.Setter import com.netflix.hystrix._ import com.ft....
Financial-Times/scala-commons
src/main/scala/com/ft/membership/healthcheck/ServiceAvailabilityHealthCheck.scala
Scala
mit
2,540
/* * 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 ...
tlby/mxnet
scala-package/core/src/test/scala/org/apache/mxnet/SymbolSuite.scala
Scala
apache-2.0
4,184
package org.infinispan.spark import org.apache.spark.scheduler.{SparkListener, SparkListenerJobEnd} import org.apache.spark.streaming.dstream.DStream import org.infinispan.client.hotrod.RemoteCacheManager import org.infinispan.spark.config.ConnectorConfiguration import org.infinispan.spark.rdd.RemoteCacheManagerBuilde...
galderz/infinispan-spark
src/main/scala/org/infinispan/spark/stream/package.scala
Scala
apache-2.0
1,144
package com.szadowsz.spark.ml.feature import com.szadowsz.spark.ml.expr._ import com.szadowsz.common.io.write.CsvWriter import org.apache.spark.ml.Transformer import org.apache.spark.ml.param.shared.HasInputCols import org.apache.spark.ml.param.{Param, ParamMap, ParamPair, ParamValidators} import org.apache.spark.ml.u...
zakski/project-cadisainmduit
module/spark/src/main/scala/com/szadowsz/spark/ml/feature/StringStatistics.scala
Scala
apache-2.0
6,678
package com.akkademy import akka.actor.Actor import akka.pattern._ import akka.util.Timeout import com.akkademy.messages.{SetRequest, GetRequest} import scala.concurrent.{Future, Await} import scala.util.{Success, Failure, Either, Left, Right} class AskDemoArticleParser(cacheActorPath: String, ...
josiah14/AkkademyDb
akkademaid/src/main/scala/com/akkademy/AskDemoArticleParser.scala
Scala
mit
2,114
package coursier.util import java.util.concurrent.{ExecutorService, ScheduledExecutorService} import scala.concurrent.{Await, ExecutionContext, ExecutionContextExecutorService, Future} import scala.concurrent.duration.{Duration, FiniteDuration} import scala.concurrent.Promise import scala.util.Success abstract class...
alexarchambault/coursier
modules/cache/jvm/src/main/scala/coursier/util/PlatformTaskCompanion.scala
Scala
apache-2.0
1,389
/** * 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...
ErikKringen/kafka
core/src/main/scala/kafka/log/LogCleanerManager.scala
Scala
apache-2.0
14,758
package com.sksamuel.elastic4s.searches.sort import com.sksamuel.elastic4s.script.ScriptDefinition import org.elasticsearch.common.geo.GeoPoint import org.elasticsearch.search.sort.ScriptSortBuilder.ScriptSortType trait SortDsl { def scoreSort(): ScoreSortDefinition = ScoreSortDefinition() def scriptSort(script...
ulric260/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/searches/sort/SortDsl.scala
Scala
apache-2.0
1,321
package com.seanshubin.todo.sample.test import com.seanshubin.todo.sample.core.http.Content import com.seanshubin.todo.sample.core.NumberedLine case class TestCase(webSettings: WebSettings, source: String, testRequest: TestRequest, testResponse: TestResponse) { import AssertResult._ def toMultipleLineString: Se...
SeanShubin/javascript-todo-samples
test/src/main/scala/com/seanshubin/todo/sample/test/TestCase.scala
Scala
unlicense
1,924
package util import org.eclipse.jgit.api.Git import util.Directory._ import util.StringUtil._ import util.ControlUtil._ import scala.collection.JavaConverters._ import org.eclipse.jgit.lib._ import org.eclipse.jgit.revwalk._ import org.eclipse.jgit.revwalk.filter._ import org.eclipse.jgit.treewalk._ import org.eclipse...
wangsicong/gitbucket
src/main/scala/util/JGitUtil.scala
Scala
apache-2.0
18,171
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala package tools.ns...
lrytz/scala
src/compiler/scala/tools/nsc/transform/patmat/Logic.scala
Scala
apache-2.0
36,049
/* * 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/CATO02.scala
Scala
apache-2.0
1,362
import java.io._ import play.markdown.Helper.CompilerHelper import play.markdown.Html object MdExample extends App { val sourceDir = new File("src/test/resources/markdown") val generatedDir = new File("target/test/generated-templates") val generatedClasses = new File("target/test/generated-classes") scalax.fi...
jasonqu/play-markdown
src/main/scala/MdExample.scala
Scala
apache-2.0
864
package com.atomist.rug.spi import java.lang.reflect.InvocationTargetException import com.atomist.rug.RugRuntimeException import com.atomist.rug.runtime.js.interop.NashornUtils import com.atomist.tree.TreeNode import com.atomist.tree.content.text.OutOfDateNodeException /** * Operation on an exported Rug type. Typi...
atomist/rug
src/main/scala/com/atomist/rug/spi/TypeOperation.scala
Scala
gpl-3.0
3,738
/* * Copyright 2015 Vitaly Koulakov * * 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...
wivern/play2-module-thymeleaf
src/main/scala/org/thymeleaf/resourceresolver/PlayResourceResolver.scala
Scala
apache-2.0
1,488
/* * Copyright 2019 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
ember-core/shared/src/main/scala/org/http4s/ember/core/Shared.scala
Scala
apache-2.0
872
package com.github.blemale.scaffeine.example import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers class LoadingCacheExample extends AnyFlatSpec with Matchers { "LoadingCache" should "be created from Scaffeine builder" in { import com.github.blemale.scaffeine.{LoadingCache, Sc...
blemale/scaffeine
src/test/scala/com/github/blemale/scaffeine/example/LoadingCacheExample.scala
Scala
apache-2.0
594
/* * 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 ...
daewon/incubator-s2graph
s2rest_play/app/org/apache/s2graph/rest/play/config/Config.scala
Scala
apache-2.0
2,675
package com.theseventhsense.utils.persistence import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicits.global import scala.language.implicitConversions trait DelegatingManager[A <: DomainObject, B <: DTO] extends Manager[A] { implicit def from(obj: A): B implicit def asDomain(dto: B): A ...
easel/utils-persistence
src/main/scala/com/theseventhsense/utils/persistence/DelegatingManager.scala
Scala
mit
1,595
package epam.bdcc_app.json import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonProperty import lombok.Data @Data @JsonIgnoreProperties(ignoreUnknown = true) class Vk_post { @JsonProperty("id") val id = 0L @JsonProperty("from_id") val from_id = 0L ...
mkasatkin/bdcc_app.vk_samza
src/main/scala/epam/bdcc_app/json/Vk_post.scala
Scala
apache-2.0
1,379
/** * © 2019 Refinitiv. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
dudi3001/CM-Well
server/cmwell-data-tools/src/main/scala/cmwell/tools/data/utils/akka/stats/IngesterStats.scala
Scala
apache-2.0
7,447
package app import _root_.util.Directory._ import _root_.util.Implicits._ import _root_.util.ControlUtil._ import _root_.util.{StringUtil, FileUtil, Validations, Keys} import org.scalatra._ import org.scalatra.json._ import org.json4s._ import jp.sf.amateras.scalatra.forms._ import org.apache.commons.io.FileUtils impo...
campolake/gitbucketV2.1
src/main/scala/app/ControllerBase.scala
Scala
apache-2.0
7,082
package system.ontologies.messages import system.ontologies.messages.MessageType._ /** * A Message Subtype for a Generic Content of Type C * * Created by Xander_C on 03/07/2017. */ trait MessageSubtype[C] { /** * The Message type of which this is a subtype */ val superType: MessageTy...
albertogiunta/arianna
src/main/scala/system/ontologies/messages/MessageSubtype.scala
Scala
gpl-3.0
5,839
object Test { def testPermutations1(num: Int, stream: Stream[Int]): Unit = { val perm = stream.permutations print(num) while(perm.hasNext) { print(" " + perm.next().toList) } println() } def testPermutations2(num: Int, stream: List[Int]): Unit = { val perm = stream.permutations p...
folone/dotty
tests/run/t5377.scala
Scala
bsd-3-clause
1,189
package basic.auth.api.yaml import scala.language.existentials import play.api.mvc.{Action, Controller, Results} import play.api.http._ import Results.Status import de.zalando.play.controllers.{PlayBodyParsing, ParsingError, ResultWrapper} import PlayBodyParsing._ import scala.util._ import de.zalando.play.contro...
zalando/play-swagger
play-scala-generator/src/test/resources/expected_results/controllers/basic_auth_api_yaml.base.scala
Scala
mit
2,161
/* * ____ ____ _____ ____ ___ ____ * | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R) * | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data * | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In...
precog/platform
ingest/src/main/scala/com/precog/ingest/EventIdSequence.scala
Scala
agpl-3.0
3,764
// scalac: -Werror -Xlint // import annotation.nowarn trait Pattern { trait NumericOps[T] extends Serializable { def zero: T def add(a: T, b: T): T def add(a: T, b: T, c: T): T = add(a, add(b, c)) def sum(terms: Iterable[T]) = terms.foldLeft(zero)(add) def sum(terms: Iterator[T]) = terms.fol...
scala/scala
test/files/neg/patmat-exprs-b.scala
Scala
apache-2.0
1,465
package org.scalatra package swagger import org.scalatra.json.JacksonJsonSupport trait JacksonSwaggerBase extends ScalatraBase with JacksonJsonSupport with CorsSupport with SwaggerBase
lightvector/scalatra
swagger/src/main/scala/org/scalatra/swagger/JacksonSwaggerBase.scala
Scala
bsd-2-clause
187
package org.opencompare.io.bestbuy import scala.xml.{XML, Elem} import scalaj.http.{HttpException, Http, HttpOptions} class BestBuyAPI { val apiURL = "http://api.remix.bestbuy.com/v1/" val apiKey = "apiKey=ye723adnkr5x3qafvvvgc7r3" var timeLastCall : Long = 0 var callsInLastSecond : Int = 0 val maxAPICal...
OpenCompare/OpenCompare
org.opencompare/io-best-buy/src/main/scala/org/opencompare/io/bestbuy/BestBuyAPI.scala
Scala
apache-2.0
2,530
package plugins.cloudimage import org.apache.commons.codec.digest.DigestUtils import org.apache.commons.io.IOUtils import org.apache.http.client.methods.HttpPost import org.apache.http.entity.mime.content.ByteArrayBody import org.apache.http.entity.mime.content.StringBody import org.apache.http.entity.mime.HttpMultipa...
lukaszbudnik/play-cloud-plugins
app/plugins/cloudimage/CloudinaryCloudImage.scala
Scala
apache-2.0
6,401
package beyond.engine.javascript.lib import beyond.engine.javascript.BeyondContext import beyond.engine.javascript.BeyondContextFactory import beyond.engine.javascript.JSArray import beyond.engine.javascript.JSFunction import com.beyondframework.rhino.ContextOps._ import com.typesafe.scalalogging.slf4j.{ StrictLogging...
SollmoStudio/beyond
core/app/beyond/engine/javascript/lib/ScriptableFuture.scala
Scala
apache-2.0
9,598
package com.twitter.finagle.exp.mysql import com.twitter.util.Promise import com.twitter.finagle.exp.mysql.protocol.{BufferReader, Packet} case class PreparedStatement(statementId: Int, numberOfParams: Int) extends Result { val statement: Promise[String] = new Promise[String]() private[this] var params: Array[Any...
firebase/finagle
finagle-mysql/src/main/scala/com/twitter/finagle/mysql/PreparedStatement.scala
Scala
apache-2.0
2,587
/** * Ayla Geometry Core * (c) 2011-2014 William Harvey * http://www.aylasoftware.org */ package ayla.geometry import java.io._ import scala.collection.mutable.ArrayBuffer import ayla.util.UnionFind import scala.annotation.tailrec class SimplicialComplex(val vertices: Array[Array[Float]], val faces: Array[Array[I...
harveywi/Ayla-Geometry-Core
src/ayla/geometry/SimplicialComplex.scala
Scala
gpl-2.0
5,026
package org.scalafmt.cli import scala.io.Codec import scala.io.Source import java.io.File import java.io.InputStream import org.scalafmt.Error.MisformattedFile import org.scalafmt.util.AbsoluteFile import org.scalafmt.util.FileOps sealed abstract class InputMethod { def isSbt = filename.endsWith(".sbt") def rea...
Daxten/scalafmt
cli/src/main/scala/org/scalafmt/cli/InputMethod.scala
Scala
apache-2.0
1,783
package com.tardis.client.render import com.tardis.client.model.ModelDoor import com.tardis.common.Tardis import com.tardis.common.init.TardisBlocks import com.tardis.common.tile.TEDoor import com.temportalist.origin.api.client.render.TERenderItem import cpw.mods.fml.relauncher.{Side, SideOnly} import net.minecraft.ti...
TheTemportalist/Tardis
src/main/scala/com/tardis/client/render/RenderTardisDoor.scala
Scala
apache-2.0
1,232
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distribute...
wvlet/wvlet
wvlet-server/src/test/scala/wvlet/dataflow/api/v1/ErrorCodeTest.scala
Scala
apache-2.0
661
package de.kaufhof.jsonhomeclient import org.mockito.ArgumentMatchers.any import org.mockito.Mockito._ class JsonHomeServiceSpec extends UnitSpec { val server1 = JsonHomeHost("http://host1", Nil) val server2 = JsonHomeHost("http://host2", Nil) describe("JsonHomeService") { val cache1 = mockCache(server1, ...
Galeria-Kaufhof/jsonhomeclient
src/test/scala/de/kaufhof/jsonhomeclient/JsonHomeServiceSpec.scala
Scala
apache-2.0
2,214
package sangria.validation import org.parboiled2.Position import sangria.parser.SourceMapper import sangria.schema.Named import sangria.util.StringUtil import sangria.validation.rules.ConflictReason trait Violation { def errorMessage: String } object Violation { def didYouMean(suggestions: Seq[String], text: Str...
PhilAndrew/JumpMicro
JMSangriaGraphql/src/main/scala/sangria/validation/Violation.scala
Scala
mit
21,167
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
goldmedal/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/json/JsonParsingOptionsSuite.scala
Scala
apache-2.0
4,622
package com.karumi.shot.json import com.karumi.shot.domain.{Config, Dimension, Screenshot} import com.karumi.shot.domain.model.{FilePath, Folder, ScreenshotsSuite} import org.json4s._ import org.json4s.jackson.JsonMethods._ object ScreenshotsComposeSuiteJsonParser { def parseScreenshots( json: String, p...
Karumi/Shot
core/src/main/scala/com/karumi/shot/json/ScreenshotsComposeSuiteJsonParser.scala
Scala
apache-2.0
1,430
import sbt._ import Keys._ import org.scalatra.sbt._ import org.scalatra.sbt.PluginKeys._ import com.mojolly.scalate.ScalatePlugin._ import ScalateKeys._ object VivowidgetsBuild extends Build { val Organization = "duke" val Name = "VivoWidgets" val Version = "0.3.0" val ScalaVersion = "2.10.1" val ScalatraVe...
OIT-ADS-Web/vivo_widgets
project/build.scala
Scala
bsd-3-clause
2,980
/* * 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/cypher-compiler-2.3/src/main/scala/org/neo4j/cypher/internal/compiler/v2_3/commands/expressions/MathFunction.scala
Scala
apache-2.0
10,793
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
shaneknapp/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/FileSourceStrategySuite.scala
Scala
apache-2.0
28,506
package ast case class Constant(name: String, term: String) extends Rule { def genCSS = "" } case class LessStylesheet(charset: Option[Charset], imports: Seq[Import], rules: Seq[Rule]) { def compile() = Stylesheet(charset, Nil, LessStylesheet.compiledRules(rules)) } object LessStylesheet { def compiledRules(...
erwan/sless
sless/src/main/scala/ast/less.scala
Scala
apache-2.0
851
/* * Copyright 2016 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/kantan.codecs
scalaz/laws/shared/src/main/scala/kantan/codecs/scalaz/laws/discipline/ScalazDisciplineSuite.scala
Scala
apache-2.0
1,232
package org.gateway import io.netty.handler.codec.MessageToMessageEncoder import io.netty.channel.ChannelHandlerContext import java.net.InetSocketAddress import org.slf4j.LoggerFactory import io.netty.channel.socket.DatagramPacket import io.netty.buffer.Unpooled class Encoder(remoteAddress: InetSocketAddress) extends...
haghard/gateway-server
src/org/gateway/Encoder.scala
Scala
apache-2.0
772
package com.celexus.tipsy.model import play.api.libs.json.{JsValue, JsObject} /** * Holder for a given expert */ class Expert(result: JsObject) { /** * Expert's name */ val name: String = (result \\ "name").as[String] /** * Firm the expert belongs to */ val firm: String = (result \\ "firm...
Ccook/tipsy
src/main/scala/com/celexus/tipsy/model/Expert.scala
Scala
apache-2.0
2,496
/* * Copyright (c) 2015-6 x.ai 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...
xdotai/typeless
src/test/scala/selectFunctionsSeq.scala
Scala
apache-2.0
2,487
package lila.analyse import akka.actor.ActorSelection import chess.format.FEN import lila.db.dsl._ import lila.game.actorApi.InsertGame import lila.game.{ Game, GameRepo } import lila.hub.actorApi.map.Tell final class Analyser( indexer: ActorSelection, requesterApi: RequesterApi, roundSocket: ActorSelect...
clarkerubber/lila
modules/analyse/src/main/Analyser.scala
Scala
agpl-3.0
1,294
package com.eevolution.context.dictionary.domain.api.repository import com.eevolution.context.dictionary._ /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Publi...
adempiere/ADReactiveSystem
dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/api/repository/LabelPrinterRepository.scala
Scala
gpl-3.0
1,139
package com.twitter.finagle.netty4.http.handler import com.twitter.conversions.StorageUnitOps._ import com.twitter.util.StorageUnit.zero import io.netty.buffer.Unpooled import io.netty.channel.embedded.EmbeddedChannel import io.netty.handler.codec.http._ import org.scalatest.funsuite.AnyFunSuite class FixedLengthMess...
twitter/finagle
finagle-netty4-http/src/test/scala/com/twitter/finagle/netty4/http/handler/FixedLengthMessageAggregatorTest.scala
Scala
apache-2.0
6,742
/* * Copyright 2013 Twitter Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
sdjamaa/storehaus
storehaus-mysql/src/main/scala/com/twitter/storehaus/mysql/MySQLStore.scala
Scala
apache-2.0
11,250
package scanalyzer package analysis package constants import cfg._ /** * AbstractVal implementation for the Constants domain. */ sealed abstract class ConstVal extends AbstractVal[ConstVal] { override def join(other: ConstVal): ConstVal = { (this, other) match { case (TOP(), _) | (_, TOP()) => TOP() ...
fabian-r/scanalyzer
src/main/scala/analysis/ConstantAnalysis.scala
Scala
mit
2,195
/* Copyright 2015 Mario Pastorelli (pastorelli.mario@gmail.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...
jyt109/PureCSV
src/main/scala/purecsv/unsafe/converter/defaults/string/package.scala
Scala
apache-2.0
2,183
package quizleague.web.maintain.user import quizleague.web.core._ import quizleague.web.maintain.component.TemplateElements._ import quizleague.web.maintain.component.ItemListComponentConfig import quizleague.web.model._ import quizleague.web.names._ import scalajs.js object UserListComponent extends ItemListComponen...
gumdrop/quizleague-maintain
js/src/main/scala/quizleague/web/maintain/user/UserListComponent.scala
Scala
mit
697
package dk.industria.url2har import akka.actor.{Actor, ActorLogging, ActorRef} import java.io.File import java.nio.file.{FileSystems, Path} import scala.compat.Platform import scala.io.Source import io.github.bonigarcia.wdm.FirefoxDriverManager import org.openqa.selenium.{By, NoSuchElementException, TimeoutExcep...
industria/urltohar
src/main/scala/dk/industria/url2har/UrlExporter.scala
Scala
apache-2.0
4,915
package stack private[stack] trait Logger { def print(str: String) def println(string: String) } private[stack] object Logger { def named(names: Set[String]): Map[String, Logger] = { val colors = Color.wheel val pad = names.map(_.size).max names.map { name => val color = colors.next (nam...
softprops/stack
src/main/scala/Logger.scala
Scala
mit
716
package org.pantsbuild.example.compiler_options // Unused import import scala.collection.Map object A { private val unused = ??? }
tdyas/pants
examples/src/scala/org/pantsbuild/example/scalac/compiler_options/A.scala
Scala
apache-2.0
135
/* * 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 ...
mahak/spark
mllib/src/test/scala/org/apache/spark/ml/tree/impl/TreePointSuite.scala
Scala
apache-2.0
1,433
// 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...
CommBank/edge
src/main/scala/com/cba/omnia/edge/source/memory/DistributableMemoryRecordReader.scala
Scala
apache-2.0
1,328
package reopp.common.choco.connectors import reopp.common.{OptionSol, Utils} import Utils._ import reopp.common.choco._ /** * Created with IntelliJ IDEA. * User: jose * Date: 11/06/12 * Time: 18:21 * To change this template use File | Settings | File Templates. */ class ChoFifo(a: String, b: String, var data: ...
joseproenca/ip-constraints
code/src/main/scala/reopp/common/choco/connectors/ChoFifo.scala
Scala
mit
1,229
/* * Copyright 2016-2017 Nokia Solutions and Networks Oy * * 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...
dilation/akka-typed-persistence
src/main/scala/com/nokia/ntp/ct/persistence/PersistentActor.scala
Scala
apache-2.0
5,858
package controllers import play.api._ import play.api.mvc._ object Application extends Controller { }
virdis/functional-imperative.com
app/controllers/Application.scala
Scala
gpl-2.0
105
package mesosphere.marathon.upgrade import akka.actor._ import akka.event.EventStream import mesosphere.marathon.core.launchqueue.LaunchQueue import mesosphere.marathon.state.AppDefinition import mesosphere.marathon.tasks.TaskTracker import mesosphere.marathon.{ AppStartCanceledException, SchedulerActions } import org...
EasonYi/marathon
src/main/scala/mesosphere/marathon/upgrade/AppStartActor.scala
Scala
apache-2.0
1,245
/* * 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 ...
Intel-bigdata/OAP
oap-mllib/mllib-dal/src/main/scala/org/apache/spark/ml/util/OneCCL.scala
Scala
apache-2.0
2,880
package org.bitcoins.core.protocol.script import org.bitcoins.testkit.core.gen.ScriptGenerators import org.bitcoins.core.util.BitcoinSLogger import org.scalacheck.{Prop, Properties} /** * Created by chris on 6/22/16. */ class P2PKScriptSignatureSpec extends Properties("P2PKSpec") { private def logger = BitcoinS...
bitcoin-s/bitcoin-s-core
core-test/src/test/scala/org/bitcoins/core/protocol/script/P2PKScriptSignatureSpec.scala
Scala
mit
517
package adawg.minecraftbot.behaviortree.behaviors import adawg.minecraftbot._ import behaviortree._ import behaviortree.BehaviorStatus._ import behaviortree.NodeImplicits._ import BotImplicits._ import scala.util.Random import adawg.minecraftbot.RichVec3 import adawg.minecraftbot.BotWrapper import adawg.minecraftbot.Bo...
yanich/BTBot
forge/mcp/src/minecraft/adawg/minecraftbot/behaviortree/behaviors/Behaviors.scala
Scala
bsd-3-clause
8,188
package net.thereturningvoid.bladebot.song import org.json.JSONObject import scala.util.Random abstract class Song(val name: String, val artist: String, val id: String) { def get: JSONObject } case class SoundcloudSong(override val name: String, override val artist: String, override val id: String) extends Song(n...
TheReturningVoid/BladeBot
src/main/scala/net/thereturningvoid/bladebot/song/Song.scala
Scala
mit
1,007
/** * Copyright 2011-2017 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
timve/gatling
gatling-http/src/main/scala/io/gatling/http/action/ws2/WsClose.scala
Scala
apache-2.0
1,580
/* * 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...
psyyz10/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/torch/VolumetricConvolutionSpec.scala
Scala
apache-2.0
13,046
/* * 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 ...
holdenk/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormat.scala
Scala
apache-2.0
8,135
object Test { abstract class Base { val changesBaseClasses: Boolean } class Concrete extends Base { val changesBaseClasses = true } def getBase : Base = new Concrete var c = new Base { val changesBaseClasses = true } c = getBase }
yusuke2255/dotty
tests/untried/pos/inferbroadtype.scala
Scala
bsd-3-clause
242
/* * Copyright (c) 2017 Lucas Satabin * * 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 writi...
satabin/toolxit-ng
mouth/src/main/scala/toolxit/mouth/TeXTokens.scala
Scala
apache-2.0
1,552
/* * Copyright 2013 Gregor Uhlenheuer * * 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...
kongo2002/prost
src/com/kongo2002/android/prost/Tiles.scala
Scala
apache-2.0
2,812
package httpz package http4sblaze import scalaz.\\/ import org.http4s._ import org.http4s.Method._ import scodec.bits.ByteVector import scalaz.stream.Process import java.net.URLEncoder.encode object Blaze { private[this] def urlWithParam(url: String, params: Map[String, String]) = if(params.isEmpty) url el...
pocketberserker/httpz-http4s
blaze/src/main/scala/Blaze.scala
Scala
mit
1,099
package com.twitter.finagle import com.twitter.logging.{HasLogLevel, Level} import com.twitter.util.Future import scala.annotation.tailrec import scala.util.control.NoStackTrace /** * Base exception for all Finagle originated failures. These are * Exceptions, but with additional `sources` and `flags`. Sources * de...
luciferous/finagle
finagle-core/src/main/scala/com/twitter/finagle/Failure.scala
Scala
apache-2.0
10,907
/* * Copyright 2014 IBM Corp. * * 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...
bpburns/spark-kernel
protocol/src/main/scala/com/ibm/spark/kernel/protocol/v5/content/KernelInfoReply.scala
Scala
apache-2.0
1,218
/* * Copyright 2017 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/kantan.mongodb
core/src/main/scala/kantan/mongodb/BsonValue.scala
Scala
apache-2.0
9,256
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.api.http import akka.util.ByteString import play.api.libs.Files.TemporaryFile import play.api.mvc._ import play.api.libs.json._ import play.api.mvc.MultipartFormData.FilePart import scala.annotation._ import java.nio.file.{ Fil...
Shruti9520/playframework
framework/src/play/src/main/scala/play/api/http/Writeable.scala
Scala
apache-2.0
5,850
/** * 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...
MyPureCloud/kafka
core/src/main/scala/kafka/server/DelegationTokenManager.scala
Scala
apache-2.0
17,666
package org.jetbrains.plugins.scala.lang.completion.postfix.templates.selector import com.intellij.codeInsight.PsiEquivalenceUtil import com.intellij.openapi.util.Condition import com.intellij.psi.search.GlobalSearchScope import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpress...
LPTK/intellij-scala
src/org/jetbrains/plugins/scala/lang/completion/postfix/templates/selector/SelectorConditions.scala
Scala
apache-2.0
2,396
object O { sealed trait Expr[T] case class IExpr(x: Int) extends Expr[Int] case class BExpr(b: Boolean) extends Expr[Boolean] def foo[T](x: Expr[T], y: Expr[T]) = (x, y) match { case (IExpr(_), IExpr(_)) => true case (BExpr(_), BExpr(_)) => false } }
som-snytt/dotty
tests/patmat/gadt-invariant.scala
Scala
apache-2.0
278
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
PredictionIO/PredictionIO
e2/src/main/scala/org/apache/predictionio/e2/engine/BinaryVectorizer.scala
Scala
apache-2.0
2,130
package com.mooveit.moonitor.agent import java.io.File import akka.actor.ActorSystem import com.typesafe.config.ConfigFactory object Main extends App { val config = ConfigFactory .parseFile(new File("/etc/default/moonitor-agent.conf")) .withFallback(ConfigFactory.load("dev")) System.loadLibrary...
enriquerodbe/moonitor
agent/src/main/scala/com/mooveit/moonitor/agent/Main.scala
Scala
mit
383
/* * 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 ...
practice-vishnoi/dev-spark-1
examples/src/main/scala/org/apache/spark/examples/mllib/StreamingLinearRegression.scala
Scala
apache-2.0
2,827
object Foo extends (Int => Int) { // OK def apply(x: Int) = x } enum E(x: Int) { // used to generate Int => new E(x) as the parent of object E --> crash case C(x: Int) extends E(x) }
som-snytt/dotty
tests/pos/objXfun.scala
Scala
apache-2.0
188
package io.protoless.generic.messages import io.protoless.EncoderDecoderAssertions import io.protoless.fields.{FieldDecoder, RepeatableFieldDecoder} import io.protoless.messages.{Decoder, Encoder} import io.protoless.tests.ProtolessSuite import io.protoless.tests.instances.EqualityInstances import io.protoless.tests.s...
julien-lafont/protoless
modules/generic/src/test/scala/io/protoless/generic/messages/SemiAutoEncoderDecoderSuite.scala
Scala
apache-2.0
4,530
// Copyright © 2008-2012 Esko Luontola <www.orfjackal.net> // This software is released under the Apache License 2.0. // The license text is at http://dimdwarf.sourceforge.net/LICENSE package net.orfjackal.dimdwarf.actors import com.google.inject._ import collection.JavaConversions._ import org.scalatest.matchers.Sho...
orfjackal/dimdwarf
dimdwarf-core/src/test/scala/net/orfjackal/dimdwarf/actors/InstallingActorsSpec.scala
Scala
apache-2.0
5,361
package com.twitter.finagle.pool import com.twitter.conversions.time._ import com.twitter.finagle.{Service, ServiceFactory, WriteException, MockTimer} import com.twitter.util.{Duration, Time, Future, Promise} import org.junit.runner.RunWith import org.mockito.Matchers.any import org.mockito.Mockito.{never, times, veri...
joshbedo/finagle
finagle-core/src/test/scala/com/twitter/finagle/pool/CachingPoolTest.scala
Scala
apache-2.0
10,582
package com.nabijaczleweli.minecrasmer.reference object Reference { final val MOD_ID = "minecrasmer" final val MOD_NAME = "@MODNAME@" final val VERSION = "@MODVER@" final val DEPENDENCIES = "after:appliedenergistics2;after:Waila;after:PneumaticCraft;after:MineFactoryReloaded;after:TConstruct;after:N...
nabijaczleweli/ASMifier
src/main/scala/com/nabijaczleweli/minecrasmer/reference/Reference.scala
Scala
mit
755
package coursier.cli.resolve import caseapp.{ExtraName => Short, HelpMessage => Help, ValueDescription => Value, _} import coursier.cli.install.SharedChannelOptions import coursier.cli.options.{ CacheOptions, DependencyOptions, OutputOptions, RepositoryOptions, ResolutionOptions } import coursier.install.Raw...
alexarchambault/coursier
modules/cli/src/main/scala/coursier/cli/resolve/ResolveOptions.scala
Scala
apache-2.0
1,749
/* * Copyright 2016 agido GmbH * * 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...
agido/pageobject
core/src/main/scala/org/pageobject/core/driver/DriverProvider.scala
Scala
apache-2.0
2,093
/* * Copyright 2015-2016 IBM 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 applicable law or agree...
xin-cai/openwhisk
tests/src/test/scala/whisk/core/controller/test/ActionsApiTests.scala
Scala
apache-2.0
36,932
/* * Copyright (c) 2013, Scodec * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions a...
scodec/scodec
shared/src/main/scala/scodec/DropUnits.scala
Scala
bsd-3-clause
2,838
/** * Copyright 2011-2016 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
GabrielPlassard/gatling
gatling-charts/src/main/scala/io/gatling/charts/stats/buffers/GroupPercentilesBuffers.scala
Scala
apache-2.0
1,871
package scorex.consensus.qora import com.google.common.primitives.{Bytes, Longs} import scorex.account.{Account, PrivateKeyAccount, PublicKeyAccount} import scorex.block.{Block, BlockField} import scorex.consensus.{ConsensusModule, OneGeneratorConsensusModule, PoSConsensusModule} import scorex.crypto.EllipticCurveImpl...
alexeykiselev/WavesScorex
scorex-consensus/src/main/scala/scorex/consensus/qora/QoraLikeConsensusModule.scala
Scala
cc0-1.0
7,823
package ks import leon._ import mem._ import lang._ import annotation._ import instrumentation._ import invariant._ /** * Knapsack dynamic programming algorithm. * Written in a purely functional way using memoization. */ object Knapscak { sealed abstract class IList { // a list of pairs: (weight, value) def ...
regb/leon
testcases/benchmarks/steps/Knapsack.scala
Scala
gpl-3.0
4,615