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 ...
dbtsai/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsTestUtils.scala
Scala
apache-2.0
13,294
package com.scalaAsm.x86 package Instructions package x87 // Description: IEEE Partial Remainder // Category: general/arith trait FPREM1 extends InstructionDefinition { val mnemonic = "FPREM1" } object FPREM1 extends ZeroOperands[FPREM1] with FPREM1Impl trait FPREM1Impl extends FPREM1 { implicit object _0 exten...
bdwashbu/scala-x86-inst
src/main/scala/com/scalaAsm/x86/Instructions/x87/FPREM1.scala
Scala
apache-2.0
420
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
Kegeruneku/rudder
rudder-web/src/main/scala/com/normation/rudder/web/components/RuleGrid.scala
Scala
agpl-3.0
24,485
package org.scalameta.paradise package typechecker trait Namers { self: AnalyzerPlugins => import global._ import analyzer._ import definitions._ import scala.reflect.internal.Flags._ import analyzer.{Namer => NscNamer} def mkNamer(namer0: NscNamer) = new { val namer: NscNamer = namer0 } with Namer with ...
scalameta/paradise
plugin/src/main/scala-2.12.8/org/scalameta/paradise/typechecker/Namers.scala
Scala
bsd-3-clause
35,149
package peschke.markov.utils import cats.{Order, Show} import cats.data.{NonEmptyVector, ValidatedNel} import cats.syntax.apply._ import cats.syntax.show._ import cats.syntax.validated._ import com.github.ghik.silencer.silent import com.monovore.decline.Argument /** * Manly used to encode ranges for the CLI paramet...
morgen-peschke/markov-text
scala/src/main/scala/peschke/markov/utils/PositiveRange.scala
Scala
mit
1,838
/* * Copyright 2017 Guy Van den Broeck <guyvdb@cs.ucla.edu> * * 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 ...
UCLA-StarAI/ScalaDD
src/main/scala/edu/ucla/cs/starai/util/BigRational.scala
Scala
apache-2.0
3,892
package com.github.bruneli.phyqty /* * Copyright 2016 Renaud Bruneliere * * 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 ...
bruneli/phyqty
src/main/scala/com/github/bruneli/phyqty/Math.scala
Scala
apache-2.0
7,126
package com.twitter.finagle.netty4 import com.twitter.concurrent.Once import com.twitter.finagle.stats.{FinagleStatsReceiver, Gauge} import io.netty.buffer.{PoolArenaMetric, PooledByteBufAllocator} import scala.collection.JavaConverters._ import scala.collection.mutable /** * Exports a number of N4-related metrics u...
spockz/finagle
finagle-netty4/src/main/scala/com/twitter/finagle/netty4/exportNetty4Metrics.scala
Scala
apache-2.0
2,996
// TLCockpit // Copyright 2017-2018 Norbert Preining // Licensed according to GPLv3+ // // Front end for tlmgr package TLCockpit import scalafx.beans.property.{ObjectProperty, StringProperty} // Note!!! we have to use ObjectProperty[Int] here instead of IntegerProperty // since IntegerProperty does NOT implement Ob...
TeX-Live/tlcockpit
src/main/scala/TLCockpit/TLDisplayClasses.scala
Scala
gpl-3.0
1,660
package dispatch /** Mix in to Http if you want JDK logging */ trait JdkLogging extends HttpExecutor { override def make_logger = new dispatch.Logger { val jdklog = java.util.logging.Logger.getLogger("dispatch") def info(msg: String, items: Any*) { jdklog.info(msg.format(items: _*)) } def war...
cmc333333/Databinder-Dispatch
core/src/main/scala/logging.scala
Scala
lgpl-2.1
755
/** * 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...
pkuwm/incubator-eagle
eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormExecutionEnvironment.scala
Scala
apache-2.0
1,615
package com.etsy.sahale import org.junit.runner.RunWith import org.scalatest._ import org.scalatest.junit.JUnitRunner import scala.collection.mutable @RunWith(classOf[JUnitRunner]) class FlowGraphBuilderSpec extends FlatSpec with Matchers { val graphDotString = { scala.io.Source.fromInputStream( Thre...
etsy/Sahale
flowtracker/src/test/scala/FlowGraphBuilderSpec.scala
Scala
mit
1,778
package org.alcaudon.core.sources import java.io.InputStream import com.fasterxml.jackson.databind.{JsonNode, ObjectMapper} import com.twitter.hbc.ClientBuilder import com.twitter.hbc.common.DelimitedStreamReader import com.twitter.hbc.core.Constants import com.twitter.hbc.core.endpoint.StatusesSampleEndpoint import ...
fcofdez/alcaudon
src/main/scala/org/alcaudon/core/sources/TwitterSource.scala
Scala
apache-2.0
2,685
package controllers import javax.inject.Inject import be.objectify.deadbolt.scala.{ActionBuilders, DeadboltActions} import be.objectify.deadbolt.scala.cache.HandlerCache import play.api.mvc.{Action, Controller} import security.{HandlerKeys, MyAlternativeDynamicResourceHandler, MyDeadboltHandler} import views.html.acc...
play2-maven-plugin/play2-maven-test-projects
play24/external-modules/deadbolt/scala/app/controllers/DynamicRestrictionsController.scala
Scala
apache-2.0
1,542
package spark.deploy object ExecutorState extends Enumeration("LAUNCHING", "LOADING", "RUNNING", "KILLED", "FAILED", "LOST") { val LAUNCHING, LOADING, RUNNING, KILLED, FAILED, LOST = Value type ExecutorState = Value def isFinished(state: ExecutorState): Boolean = Seq(KILLED, FAILED, LOST).contains(state) }
ankurdave/arthur
core/src/main/scala/spark/deploy/ExecutorState.scala
Scala
bsd-3-clause
320
/* * The Bluejelly project, Copyright 2012. * * This source code is distributed under the terms of * the BSD license, see the LICENSE file for details. */ package bluejelly.l4 import java.io.StringWriter import scala.text.Document import scala.text.Document.group import scala.text.Document.nest import scala.tex...
ppedemon/Bluejelly
bluejelly-l4/src/main/scala/bluejelly/l4/StaticAnalysis.scala
Scala
bsd-3-clause
14,289
package com.github.fellowship_of_the_bus package tdtd package game import scala.collection.mutable.Set import scala.util.Random import scala.math._ abstract class AI { def pick(r: Float, c: Float, enemies: Set[Enemy]) : Enemy def pick(r: Float, c: Float, enemiesU: Set[Enemy], enemiesD: Set[Enemy], enemiesL: Set[E...
Fellowship-of-the-Bus/tdtd
src/main/scala/game/AI.scala
Scala
apache-2.0
2,642
package io.github.binaryfoo.lagotto import org.scalatest.{Matchers, FlatSpec} import io.github.binaryfoo.lagotto.LogFiles._ class LogFilesTest extends FlatSpec with Matchers { "Log sequence number" should "use N in blah.N.log" in { sequenceNumber(file("/some/directory/name.42.log")) shouldBe 42 sequenceNum...
binaryfoo/lagotto
src/test/scala/io/github/binaryfoo/lagotto/LogFilesTest.scala
Scala
mit
745
/** * 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...
samaitra/kafka
core/src/main/scala/kafka/coordinator/MemberMetadata.scala
Scala
apache-2.0
4,462
/* * Copyright (c) 2013-2014 Telefónica Investigación y Desarrollo S.A.U. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unles...
telefonicaid/fiware-cosmos-platform
cosmos-api/app/es/tid/cosmos/api/controllers/Application.scala
Scala
apache-2.0
4,313
package org.firesocks.net.ws.server import akka.util.ByteString import org.java_websocket.WebSocket import org.java_websocket.handshake.ClientHandshake sealed abstract class WSEvent extends Serializable @SerialVersionUID(1) case class WSError(conn: WebSocket, ex: Exception) extends WSEvent @SerialVersionUID(1) case...
fa08c/firesocks
modules/proxy/src/main/scala/org/firesocks/net/ws/server/WSEvent.scala
Scala
mit
716
package P { object X { val x = 1; val y = 2; } } package Q { object X { val x = true; val y = "" } }
yusuke2255/dotty
tests/untried/neg/specification-scopes/P_1.scala
Scala
bsd-3-clause
105
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
jedesah/Quasar
web/src/test/scala/quasar/server/ControlServiceSpec.scala
Scala
apache-2.0
3,726
sealed trait HZip[A <: HList, B <: HList, Result <: HList] { def apply(a: A, b: B): Result } object HZip { import HList.:: implicit def hzipNil0: HZip[HNil, HNil, HNil] = new HZip[HNil, HNil, HNil] { def apply(a: HNil, b: HNil) = HNil } implicit def hzipNil1[H, T <: HList]: HZip[HCons[H,T], HNil, HNil] = new HZip[H...
harrah/up
HZip.scala
Scala
bsd-3-clause
835
package models import slick.driver.MySQLDriver.api._ import slick.lifted.{ Tag => SlickTag } case class Tag( id: Int, url: String, title: String) extends KeyedEntity class TagTable(tag: SlickTag) extends Table[Tag](tag, "tag") with KeyedEntityTable { def id = column[Int]("id", O.PrimaryKey, O.AutoInc) ...
metaxmx/pm15
app/models/Tag.scala
Scala
apache-2.0
520
/*********************************************************************** * 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...
ccri/geomesa
geomesa-fs/geomesa-fs-tools/src/main/scala/org/locationtech/geomesa/fs/tools/ingest/StorageJobUtils.scala
Scala
apache-2.0
3,287
package test import org.junit.{Assert, Test} class SamplePhaseTest extends DottyTest { // Disabled, awaiting resolution: @Test def testTypechekingSimpleClass = checkCompile("frontend", "class A{}") { (tree, context) => implicit val ctx = context Assert.assertTrue("can typecheck simple class", ...
yusuke2255/dotty
test/test/SamplePhaseTest.scala
Scala
bsd-3-clause
709
/* * Copyright 2012-2015 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 * * Unless re...
ipapa/money
money-aspectj/src/test/scala/com/comcast/money/aspectj/TraceAspectSpec.scala
Scala
apache-2.0
9,013
/* * Copyright (c) 2016 SnappyData, Inc. 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 ap...
vjr/snappydata
core/src/main/scala/org/apache/spark/serializer/serializers.scala
Scala
apache-2.0
9,484
package io.circe.benchmarks import argonaut.Parse import argonaut.Argonaut._ import org.json4s.jackson.JsonMethods import org.scalatest.flatspec.AnyFlatSpec import play.api.libs.json.Json class EncodingBenchmarkSpec extends AnyFlatSpec { val benchmark: EncodingBenchmark = new EncodingBenchmark import benchmark._...
circe/circe-benchmarks
src/test/scala/io/circe/benchmarks/EncodingBenchmarkSpec.scala
Scala
apache-2.0
1,907
package tests object Example { def foo(o: AnyRef) = { val i: Int = 2 i<caret> + 5 } }
JetBrains/intellij-scala
scala/scala-impl/testdata/postfixTemplate/tabCompletion/var-after.scala
Scala
apache-2.0
99
package sangria.util import cats.effect.{ContextShift, IO} import fs2.Stream import sangria.streaming.SubscriptionStream import scala.concurrent.Future object Fs2Support { type IOS[A] = Stream[IO, A] class Fs2SubscriptionStream(implicit CS: ContextShift[IO]) extends SubscriptionStream[IOS] { def supported[T[...
OlegIlyenko/sangria
modules/core/src/test/scala/sangria/util/Fs2SubscriptionStream.scala
Scala
apache-2.0
1,570
package com.sksamuel.akka.patterns /** * The AcknowledgingActor will send an ack to the sender as soon as a message is received * before continuing with processing the message. * Uses the stackable trait pattern with DecoratingActor. Override receiver in traits that wish to use this actor. * See DecoratingActor. ...
stoopbrain/akka-patterns
src/main/scala/com/sksamuel/akka/patterns/AcknowledgingActor.scala
Scala
apache-2.0
571
package com.gilesc package mynab package testkit package generator import org.scalacheck.Gen import java.util.UUID import java.time.LocalDate import java.time.OffsetDateTime trait TransactionGenerator { // def generateTransactionId: Stream[TransactionId] = Stream.cons(TransactionId(UUID.randomUUID), generateTransac...
CraigGiles/mynab
testkit/src/main/scala/com/gilesc/mynab/testkit/generator/TransactionGenerator.scala
Scala
mit
1,727
package org.inosion.dadagen.api import javax.script.{ScriptEngineManager, ScriptEngine} import org.inosion.dadagen.Dadagenerator import scala.tools.nsc.interpreter.IMain /** * A Scala Object to load up the Java Script Engine */ object ScalaScriptEngine { val loadEngine: ScriptEngine = { val engine = new Scri...
inosion/dadagen
dadagen-support/src/main/scala/org/inosion/dadagen/support/ScalaScriptEngine.scala
Scala
apache-2.0
601
package nodes.util import org.apache.spark.rdd.RDD import pipelines.Logging import workflow.Transformer import scala.reflect.ClassTag /** * Randomly shuffle the rows of an RDD within a pipeline. Uses a shuffle operation in Spark. * * @param numParts An optional parameter indicating the number of output partitions...
tomerk/keystone
src/main/scala/nodes/util/Shuffler.scala
Scala
apache-2.0
659
package io.iohk.ethereum.vm import akka.util.ByteString import io.iohk.ethereum.crypto.kec256 import io.iohk.ethereum.domain.{Account, Address, UInt256} object MockWorldState { type TestVM = VM[MockWorldState, MockStorage] type PS = ProgramState[MockWorldState, MockStorage] type PC = ProgramContext[MockWorldSta...
input-output-hk/etc-client
src/test/scala/io/iohk/ethereum/vm/MockWorldState.scala
Scala
mit
2,590
/* Copyright (C) 2008-2014 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
iesl/fuse_ttl
src/factorie-factorie_2.11-1.1/src/main/scala/cc/factorie/app/nlp/coref/MentionPhraseFinder.scala
Scala
apache-2.0
6,198
/** * Copyright (C) 2012 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...
orbeon/orbeon-forms
src/main/scala/org/orbeon/oxf/util/DateUtilsUsingSaxon.scala
Scala
lgpl-2.1
7,194
package com.twitter.finatra.streams.queryable.thrift import com.twitter.app.Flag import com.twitter.finatra.kafkastreams.partitioning.StaticPartitioning import com.twitter.finatra.kafkastreams.query.{ QueryableFinatraCompositeWindowStore, QueryableFinatraKeyValueStore, QueryableFinatraWindowStore } import com.tw...
twitter/finatra
kafka-streams/kafka-streams-queryable-thrift/src/main/scala/com/twitter/finatra/streams/queryable/thrift/QueryableState.scala
Scala
apache-2.0
5,104
package com.bfm.topnotch.tnassertion import org.antlr.runtime.tree.Tree import org.apache.hadoop.hive.ql.parse.HiveParser.TOK_TABLE_OR_COL import org.apache.hadoop.hive.ql.parse.{ParseDriver, ParseException} import org.apache.spark.sql.{Column, DataFrame} import org.json4s._ import org.json4s.native.JsonMethods...
blackrock/TopNotch
src/main/scala/com/bfm/topnotch/tnassertion/TnAssertionReport.scala
Scala
apache-2.0
7,927
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2015, G...
typelevel/squants
shared/src/main/scala/squants/UnitOfMeasure.scala
Scala
apache-2.0
3,926
package calculator import scala.scalajs.js import org.scalajs.dom import org.scalajs.dom.html import dom.document object CalculatorUI { def main(args: Array[String]): Unit = { try { setupTweetMeasurer() setup2ndOrderPolynomial() setupCalculator() } catch { case th: Throwable => ...
rusucosmin/courses
fp/9-calculator-rusucosmin/web-ui/src/main/scala/calculator/CalculatorUI.scala
Scala
mit
5,412
package controllers.s_consent_and_declaration import org.specs2.mutable._ import utils.WithBrowser import controllers.BrowserMatchers import utils.pageobjects.{TestData, PageObjects} import utils.pageobjects.s_consent_and_declaration.GDeclarationPage import utils.pageobjects.preview.PreviewPage class GDeclarationInte...
Department-for-Work-and-Pensions/ClaimCapture
c3/test/controllers/s_consent_and_declaration/GDeclarationIntegrationSpec.scala
Scala
mit
1,951
import sbt._ import Keys._ object P extends Build { lazy val root = Project("root", file(".")) lazy val a = Project("a", file("a")) dependsOn(b) lazy val b = Project("b", file("b")) }
jaceklaskowski/sbt
sbt/src/sbt-test/dependency-management/invalidate-internal/project/P.scala
Scala
bsd-3-clause
189
/** * Here is a thoroughly artifical set of definitions, just to test the range of code fragments */ object test { /* Should include this preceding comment through the closing paren */ val c = ( 1, 2, 3 ) // Should include this preceding comment through the closing brace var b = { 1; 2;...
bhoward/Escalator
demo/test.scala
Scala
apache-2.0
450
package hercules.config.processingunit import java.io.File import akka.event.LoggingAdapter /** * Provide a config for a IlluminaProcessingUnitFetcherConfig. * * @param runfolderRoots * @param sampleSheetRoot * @param customQCConfigRoot * @param defaultQCConfigFile * @param customProgramConfigRoot * @param de...
johandahlberg/hercules
src/main/scala/hercules/config/processingunit/IlluminaProcessingUnitFetcherConfig.scala
Scala
mit
648
package io.actorbase.actor.main import akka.actor.ActorSystem import akka.testkit.{ImplicitSender, TestActorRef, TestKit} import io.actorbase.actor.api.Api.Request._ import io.actorbase.actor.api.Api.Response._ import org.apache.commons.lang3.SerializationUtils import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll, ...
rcardin/actorbase
src/test/scala/io/actorbase/actor/main/ActorbaseTest.scala
Scala
mit
8,814
/* * 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...
yiheng/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/Dropout.scala
Scala
apache-2.0
6,454
package org.jetbrains.plugins.scala.testingSupport.utest import com.intellij.execution.RunnerAndConfigurationSettings import org.jetbrains.plugins.scala.testingSupport.ScalaTestingTestCase import org.jetbrains.plugins.scala.testingSupport.test.utest.{UTestRunConfiguration, UTestConfigurationProducer} /** * @author ...
igrocki/intellij-scala
test/org/jetbrains/plugins/scala/testingSupport/utest/UTestTestCase.scala
Scala
apache-2.0
454
package scala.meta package internal.hosts.scalac package converters import org.scalameta.invariants._ import org.scalameta.unreachable import scala.{Seq => _} import scala.collection.immutable.Seq import scala.tools.nsc.{Global => ScalaGlobal} import scala.meta.internal.{ast => m} import scala.meta.internal.hosts.scal...
beni55/scalameta
scalahost/src/main/scala/scala/meta/internal/hosts/scalac/converters/ToGsymbol.scala
Scala
bsd-3-clause
931
package com.twitter.finatra.utils import org.jboss.netty.handler.codec.http.HttpResponse object ResponseUtils { def is5xxResponse(response: HttpResponse) = { errorClass(response) == 5 } def is4xxOr5xxResponse(response: HttpResponse) = { val errClass = errorClass(response) errClass == 4 || errClass...
kaushik94/finatra
utils/src/main/scala/com/twitter/finatra/utils/ResponseUtils.scala
Scala
apache-2.0
432
package presenters import java.time.Instant import java.time.temporal._ import nl.surfnet.nsiv2.utils._ import org.ogf.schemas.nsi._2013._12.connection.types._ class ConnectionPresenterTest extends helpers.Specification { "A connection" >> { def states = new ConnectionStatesType() .withReservationState(Re...
BandwidthOnDemand/nsi-safnari
test/presenters/ConnectionPresenterTest.scala
Scala
bsd-3-clause
3,519
package web import org.json4s.{DefaultFormats, Formats} import org.scalatra.ScalatraServlet import org.scalatra.json.JacksonJsonSupport /** * Created by salim on 04/02/2016. */ class JSONServlet extends ScalatraServlet with JacksonJsonSupport{ before() { contentType = formats("json") } protected impli...
salimfadhley/funproxy
src/main/scala/web/JSONServlet.scala
Scala
mit
367
/* Copyright 2015 Richard Wiedenhöft <richard@wiedenhoeft.xyz> * * 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 version. *...
Richard-W/jenastop
src/main/scala/net/metanoise/android/jenastop/AboutActivity.scala
Scala
gpl-3.0
1,502
/** * Licensed to Gravity.com under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Gravity.com licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use th...
lloydmeta/gander
src/main/scala/gander/extractors/StandardContentExtractor.scala
Scala
apache-2.0
952
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
sgururajshetty/carbondata
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/mutation/IUDCommonUtil.scala
Scala
apache-2.0
3,866
/* * 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/Partitioner.scala
Scala
apache-2.0
11,306
package org.apache.spark.sql import com.datastax.spark.connector.SparkCassandraITFlatSpecBase import com.datastax.spark.connector.cql.CassandraConnector import com.datastax.spark.connector.rdd.{CqlWhereClause, CassandraTableScanRDD} import org.apache.spark.Logging import org.apache.spark.rdd.RDD import org.apache.spar...
jimenefe/spark-cassandra-connector
spark-cassandra-connector/src/it/scala/org/apache/spark/sql/CassandraPrunedFilteredScanSpec.scala
Scala
apache-2.0
3,925
/** * 扩展如下的BankAccount类,新类CheckingAccount对每次存款和取款都收取1美元的手续费 class BankAccount(initialBalance:Double){ private var balance = initialBalance def deposit(amount:Double) = { balance += amount; balance} def withdraw(amount:Double) = {balance -= amount; balance} } */ class BankAccount(initia...
vernonzheng/scala-for-the-Impatient
src/Chapter08/exercise01.scala
Scala
mit
769
/** * Copyright (c) 2016, Anthony Anderson<Illyohs> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * li...
Illyohs/CivilMagicks
src/main/scala/us/illyohs/civilmagiks/common/core/util/BlockUtils.scala
Scala
bsd-2-clause
2,156
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
colinrgodsey/scala-js
test-suite/src/test/scala/org/scalajs/testsuite/jsinterop/ExportsTest.scala
Scala
bsd-3-clause
31,150
/* 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 to in writing, software distr...
snoble/algebird
algebird-core/src/main/scala/com/twitter/algebird/CountMinSketch.scala
Scala
apache-2.0
16,095
package codes.bytes.macros_intro.macros import scala.language.experimental.macros import scala.reflect.macros.Context import scala.collection.mutable.{ListBuffer, Stack} object PrintfMacros { def printf(format: String, params: Any*): Unit = macro printf_impl def printf_impl(c: Context)(format: c.Expr[String], pa...
bwmcadams/scala-macros-intro-talk
macros/src/main/scala/codes/bytes/macros_intro/macros/PrintfMacros.scala
Scala
apache-2.0
1,200
/* * 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...
yiheng/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/ops/SegmentSum.scala
Scala
apache-2.0
1,746
package cn.changhong.nio.multi.selector.demo.v2 import java.net.InetSocketAddress import java.nio.channels.{ SelectionKey, ServerSocketChannel, Selector} /** * Created by yangguo on 15-3-5. */ object Start { def main(args:Array[String]): Unit ={ val mainSelector=Selector.open() val serverChannel=Serve...
guoyang2011/nio-MultipleReactors
src/main/scala/cn/changhong/nio/multi/selector/demo/v2/Start.scala
Scala
gpl-2.0
1,190
package rpg import language.implicitConversions /** Contains hit-point-related messages and implicit conversions. */ object HitPoints { // ----------------------------------------------------------------------------------------------- // messages // -------------------------------------------------------------...
wookietreiber/arpgt
src/main/scala/HitPoints.scala
Scala
gpl-3.0
2,760
/* Copyright (C) 2008-2014 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
hlin117/factorie
src/main/scala/cc/factorie/variable/CategoricalSeqVariable.scala
Scala
apache-2.0
3,429
package domain.util.crypto object Md5 { def hex(str: String) = { import org.apache.commons.codec.digest.DigestUtils DigestUtils.md5Hex(str) } }
rysh/scalatrader
scalatrader/app/domain/util/crypto/Md5.scala
Scala
mit
158
package compiler import java.io.File import java.net.{URL, URLClassLoader} import sbt.internal.inc.ScalaInstance import sbt.io.Path object ScalaLocator { def scalaLoader(jars: Seq[File]) = new URLClassLoader( Path.toURLs(jars), sbt.internal.inc.classpath.ClasspathUtilities.rootLoader ) val ...
Humblehound/fsbt
server/src/main/scala/compiler/ScalaLocator.scala
Scala
mit
2,311
package org.openurp.edu.eams.core.service.event import org.beangle.commons.event.BusinessEvent import org.openurp.edu.base.Student @SerialVersionUID(6912654970490765968L) class CreateStudentEvent(source: Student) extends BusinessEvent(source)
openurp/edu-eams-webapp
core/src/main/scala/org/openurp/edu/eams/core/service/event/CreateStudentEvent.scala
Scala
gpl-3.0
247
package net.sansa_stack.rdf.spark.streaming import org.apache.jena.graph.Triple import org.apache.spark.streaming.StreamingContext import org.apache.spark.streaming.dstream.DStream /** * Abstract class for loading a DStream of Triples. * * @author Gezim Sejdiu */ abstract class StreamReader { /** * Load a s...
SANSA-Stack/SANSA-RDF
sansa-rdf/sansa-rdf-spark/src/main/scala/net/sansa_stack/rdf/spark/streaming/StreamReader.scala
Scala
apache-2.0
478
package deburnat.transade.core.storages import collection.mutable.ListBuffer import deburnat.transade.core.admins.CoreAdmin.{a, c, cc, br, brr, tb1, tb2, tb3, tb4, tb5, tb6, tb7} /** * An algorithm for dynamic programming. It uses internally a two-dimensional * matrix to store the previous results. * Project name:...
deburnatshazem/deburnat
core/src/main/scala/deburnat/transade/core/storages/ExcelStorage.scala
Scala
apache-2.0
12,963
/* * * * Copyright 2016 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 r...
andywhardy/address-reputation-ingester
app/addressbase/OSBlpu.scala
Scala
apache-2.0
2,714
/* * 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/test/scala/org/scalatest/matchers/ShouldFileBePropertyMatcherSpec.scala
Scala
apache-2.0
1,618
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @builder scalation.linalgebra.mem_mapped.bld.BldMatrix * @version 1.2 * @date Mon Sep 28 11:18:16 EDT 2015 * @see LICENSE (MIT style license file). */ package scalation.linalgebra.mem_mapped im...
scalation/fda
scalation_1.2/src/main/scala/scalation/linalgebra/mem_mapped/MatrixC.scala
Scala
mit
64,452
/******************************************************************************* Copyright (c) 2013, S-Core, KAIST. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. ***************************************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/analysis/typing/models/DOMEvent/EventListener.scala
Scala
bsd-3-clause
1,907
package mesosphere.marathon package state import mesosphere.marathon.core.readiness.ReadinessCheck import mesosphere.marathon.stream.Implicits._ import scala.concurrent.duration._ object ReadinessCheckSerializer { def fromProto(proto: Protos.ReadinessCheckDefinition): ReadinessCheck = { def opt[T]( hasVa...
guenter/marathon
src/main/scala/mesosphere/marathon/state/ReadinessCheckSerializer.scala
Scala
apache-2.0
2,753
/* * Copyright (c) 2014 Paul Bernard * * 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...
quantintel/spectrum
financial/src/main/scala/org/quantintel/ql/termstructures/TermStructure.scala
Scala
apache-2.0
1,209
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-accumulo/geomesa-accumulo-jobs/src/main/scala/org/locationtech/geomesa/jobs/accumulo/mapreduce/GeoMesaAccumuloFileOutputFormat.scala
Scala
apache-2.0
9,240
package com.theseventhsense.collections import com.theseventhsense.utils.collections.spark._ import com.theseventhsense.utils.collections.{BulkCollection, KVBulkCollection} import com.theseventhsense.utils.collections.stdlib._ import org.apache.spark.SparkConf import org.apache.spark.sql.SparkSession import org.scalat...
7thsense/utils-collections
src/test/scala/com/theseventhsense/collections/BulkCollectionSpec.scala
Scala
mit
2,773
package lila.hub import scala.concurrent.duration._ import actorApi.map._ import akka.actor._ import akka.pattern.{ ask, pipe } import makeTimeout.short trait ActorMap extends Actor { private val actors = scala.collection.mutable.Map.empty[String, ActorRef] def mkActor(id: String): Actor def actorMapReceive...
Happy0/lila
modules/hub/src/main/ActorMap.scala
Scala
mit
1,186
package com.github.blemale.scaffeine import org.scalatest._ import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec class LoadingCacheSpec extends AnyWordSpec with Matchers with OptionValues { "LoadingCache" should { "be a cache" in { val cache = Scaffeine().build[String, ...
blemale/scaffeine
src/test/scala/com/github/blemale/scaffeine/LoadingCacheSpec.scala
Scala
apache-2.0
2,226
package interretis.utils import org.apache.spark.SparkConf import org.apache.spark.SparkContext import org.apache.spark.sql.SQLContext object SparkContextBuilder { def buildContext(appName: String): SparkContext = { val config = new SparkConf config setAppName appName new SparkContext(config) } ...
MarekDudek/spark-certification
src/main/scala/interretis/utils/SparkContextBuilder.scala
Scala
mit
449
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
hpe-cct/cct-core
src/main/scala/cogdebugger/ui/components/PopupButton.scala
Scala
apache-2.0
3,764
package temportalist.compression.main.client import net.minecraft.client.gui.GuiScreen import net.minecraftforge.fml.relauncher.{Side, SideOnly} import temportalist.compression.main.common.Compression import temportalist.origin.foundation.client.gui.GuiConfigBase /** * * Created by TheTemportalist on 4/14/2016. ...
TheTemportalist/Compression
src/main/scala/temportalist/compression/main/client/GuiConfig.scala
Scala
apache-2.0
466
/* * 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
core/src/main/scala/org/apache/spark/internal/config/package.scala
Scala
apache-2.0
63,569
package easeml.text.preprocess import easeml.text.StopWords import org.apache.spark.rdd.RDD import easeml.util.IO.{readMap, writeMap} /** * Transform raw documents to TFIDF representations * @author YanXiaohui on 2016-09-30. */ object TFIDFProc { /** * Transform documents into word id sequences * ...
xiaohuiyan/scalaml
src/main/scala/easeml/text/preprocess/TFIDFProc.scala
Scala
apache-2.0
2,123
package com.twitter.finagle.mysql.transport import com.twitter.io.{Buf, BufByteWriter, ProxyByteWriter} import java.nio.charset.{StandardCharsets, Charset => JCharset} /** * A `ByteWriter` specialized for dealing with MySQL protocol messages. */ class MysqlBufWriter(underlying: BufByteWriter) extends ProxyByteW...
twitter/finagle
finagle-mysql/src/main/scala/com/twitter/finagle/mysql/transport/MysqlBufWriter.scala
Scala
apache-2.0
2,220
/*********************************************************************** * 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-index-api/src/main/scala/org/locationtech/geomesa/index/utils/Reprojection.scala
Scala
apache-2.0
4,233
package hooktest /* * Copyright (c) 2016 Yuki Ono * Licensed under the MIT License. */ import java.util.concurrent.SynchronousQueue import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicBoolean import scala.annotation.tailrec object EventWaiter { // http://hsmemo.github.io/articles/no3...
ykon/w10wheel
src/main/scala/hooktest/EventWaiter.scala
Scala
mit
5,321
/* * 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 n...
gf53520/kafka
core/src/test/scala/unit/kafka/server/KafkaApisTest.scala
Scala
apache-2.0
28,359
/* ## Language map */ package laughedelic.literator.lib case class Comment(start: String, end: String, line: String) case class Language(syntax: String, ext: String, comment: Comment) object LanguageMap { def clike = Comment("/*", "*/", "//") val langs = List( Language("c", "c", clike) , Languag...
laughedelic/literator
src/main/scala/lib/LanguageMap.scala
Scala
agpl-3.0
937
/* * 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/test/scala/org/scalatest/OneInstancePerTestSpec.scala
Scala
apache-2.0
7,717
package scala.reflect.quasiquotes import org.scalacheck._, Prop._, Gen._, Arbitrary._ import scala.reflect.runtime.universe._, Flag._ object TermConstructionProps extends QuasiquoteProperties("term construction") { property("unquote single tree return tree itself") = forAll { (t: Tree) => q"$t" ≈ t } prope...
shimib/scala
test/scalacheck/scala/reflect/quasiquotes/TermConstructionProps.scala
Scala
bsd-3-clause
10,065
/** * 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...
Ishiihara/kafka
core/src/test/scala/unit/kafka/integration/KafkaServerTestHarness.scala
Scala
apache-2.0
6,085
package integration.models import models.{MongoSugar, TVChannelProviderRepository, TVChannelProvider} import org.scalatest.concurrent.ScalaFutures import org.scalatest.time.{Millis, Span, Seconds} import org.scalatest.{BeforeAndAfterAll, MustMatchers} import org.scalatestplus.play.PlaySpec import play.api.libs.iterate...
tvlive/tv-api
test/integration/models/TVChannelProviderRepositoryIntSpec.scala
Scala
apache-2.0
1,962
/* * 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-transport-netty/src/main/scala/io/rdbc/pgsql/transport/netty/sapi/NettyPgConnectionFactory.scala
Scala
apache-2.0
11,303
/* * Copyright 2017-2022 John Snow Labs * * 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...
JohnSnowLabs/spark-nlp
src/test/scala/com/johnsnowlabs/ml/crf/SerializationSpec.scala
Scala
apache-2.0
1,788
package io.finch import cats.Eq import cats.instances.AllInstances import cats.laws._ import cats.laws.discipline._ import org.scalacheck.{Arbitrary, Prop} import org.typelevel.discipline.Laws trait DecodePathLaws[A] extends Laws with MissingInstances with AllInstances { def capture: DecodePath[A] def roundTrip...
finagle/finch
core/src/test/scala/io/finch/DecodePathLaws.scala
Scala
apache-2.0
709