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 2011, Patrick Boe * =========================== * This program is distributed under the terms of the GNU General Public License. * * This file is part of Thimblus. * * Thimblus is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as publ...
patrickboe/thimblus
src/main/scala/org/thimblus/model/model.scala
Scala
gpl-3.0
1,509
package spark.streaming.examples import spark.streaming.{Seconds, StreamingContext} import spark.storage.StorageLevel import com.twitter.algebird._ import spark.streaming.StreamingContext._ import spark.SparkContext._ /** * Illustrates the use of the Count-Min Sketch, from Twitter's Algebird library, to compute * w...
hobinyoon/spark-0.7.0
examples/src/main/scala/spark/streaming/examples/TwitterAlgebirdCMS.scala
Scala
bsd-3-clause
3,974
package play.api.db import scala.language.reflectiveCalls import play.api._ import play.api.libs._ import play.core._ import java.sql._ import javax.sql._ import com.jolbox.bonecp._ import com.jolbox.bonecp.hooks._ import scala.util.control.{ NonFatal, ControlThrowable } /** * The Play Database API manages sever...
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/play-jdbc/src/main/scala/play/api/db/DB.scala
Scala
mit
21,351
/* * Copyright 2015 eleflow.com.br. * * 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 ...
eleflow/uberdata
iuberdata_core/src/main/scala/eleflow/uberdata/core/data/json/Executor.scala
Scala
apache-2.0
3,845
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
rnpandya/adam
adam-core/src/main/java/org/bdgenomics/adam/io/IndexedBamInputFormat.scala
Scala
apache-2.0
4,280
package com.arcusys.valamis.hook import com.liferay.portal.DuplicateGroupException import com.liferay.portal.kernel.dao.orm.{RestrictionsFactoryUtil, QueryUtil} import com.liferay.portal.kernel.events.SimpleAction import com.liferay.portal.kernel.log.{Log, LogFactoryUtil} import com.liferay.portal.model._ import com.l...
ViLPy/Valamis
valamis-hook/src/main/scala/com/arcusys/valamis/hook/CreateDashboardAction.scala
Scala
lgpl-3.0
6,785
package com.rocketfuel.sdbc.sqlserver.jdbc /** * Output of this test: * int: int * bit: bit * tinyint: tinyint * smallint: smallint * bigint: bigint * decimal: decimal * float: float * real: real * time: nvarchar * date: nvarchar * smalldatetime: smalldatetime * datetime: datetime * datetime2: nvarchar ...
wdacom/sdbc
sqlserver/src/test/scala/com/rocketfuel/sdbc/sqlserver/jdbc/EnumerateTypesSpec.scala
Scala
bsd-3-clause
1,717
/* *\ ** \ \ / _) \ \ / \ | ** ** \ \ / | __ \ _ \ __| \ \ / |\/ | ** ** \ \ / | | | __/ | \ \ / | | ** ** \_/ _| .__/ \___| _| \_/ _| _| ** ** _| ...
hsyl20/Scala_ViperVM
src/main/scala/org/vipervm/platform/host/DefaultHostMemoryNode.scala
Scala
gpl-3.0
1,721
/* * Copyright 2012 The Clustermeister Team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
nethad/clustermeister
integration-tests/src/main/scala/com/github/nethad/clustermeister/integration/sc07/LoadRequestScenario.scala
Scala
apache-2.0
2,796
/* * 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 ...
Zhangshunyu/incubator-carbondata
integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/filterexpr/NullMeasureValueTestCaseFilter.scala
Scala
apache-2.0
2,213
/* * Copyright 2017 Benedikt Ritter * * 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...
britter/reactive-chirps
src/main/scala/com/github/britter/reactive/chirps/ReactiveChirps.scala
Scala
apache-2.0
1,672
package example1 case class Tweet( user: User, entities: Entities, retweeted_status: Option[Tweet]) case class Entities( user_mentions: Set[User], hashtags: Set[Hashtag]) case class User(screen_name: String) { override def toString = s"@$screen_name" } case class Hashtag(text: String) { override def t...
socialmetrix/spark-javaconf
src/main/scala/example1/Tweet.scala
Scala
mit
342
/** test project to run arbitrary code */ object Main { def main(args: Array[String]): Unit = { println("hello world") } }
papauschek/cointape
tools/src/main/scala/Main.scala
Scala
mit
135
/* * Copyright (c) 2019 Georgios Andreadakis * * 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...
GeorgiosAndreadakis/TextAnalyzerPlatform
test/org/tap/accepttest/importdoc/api/DocImportTestContext.scala
Scala
apache-2.0
1,621
/*********************************************************************** * Copyright (c) 2013-2015 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 which * accompanies this distribution and is ...
vpipkt/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/csv/package.scala
Scala
apache-2.0
9,622
package com.seanshubin.cron.format.domain import scala.collection.mutable.ArrayBuffer sealed abstract case class MonthEnum(ordinal: Int, name: String, shortName: String) { MonthEnum.valuesBuffer += this } object MonthEnum { private val valuesBuffer = new ArrayBuffer[MonthEnum] lazy val values = valuesBuffer.to...
SeanShubin/cron-format
domain/src/main/scala/com/seanshubin/cron/format/domain/MonthEnum.scala
Scala
unlicense
957
package au.com.dius.pact.provider import java.net.URI package object scalatest { trait Consumer { val filter: ConsumerInfo => Boolean } /** * Matching consumer pacts will be allowed to run against the provider * * @param consumer * @return */ implicit def strToConsumer(consumer: Stri...
Fitzoh/pact-jvm
pact-jvm-provider-scalatest/src/main/scala/au/com/dius/pact/provider/scalatest/package.scala
Scala
apache-2.0
839
package play.api.data import play.api.data.Forms._ import play.api.data.validation.Constraints._ import play.api.data.format.Formats._ import org.specs2.mutable.Specification import org.joda.time.{DateTime, LocalDate} object FormSpec extends Specification { "A form" should { "have an error due to a malformed em...
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/play/src/test/scala/play/api/data/FormSpec.scala
Scala
mit
7,830
import org.apache.hadoop.hbase.HBaseConfiguration import org.apache.hadoop.hbase.client.Result import org.apache.hadoop.hbase.io.ImmutableBytesWritable import org.apache.hadoop.hbase.mapreduce.TableInputFormat import org.apache.hadoop.hbase.util.Bytes import org.apache.spark.mllib.linalg.{Vectors, Matrices, Matrix} imp...
Arulselvanmadhavan/Artist_Recognition_from_Audio_Features
MLPrediction/src/main/scala/MLDataMapper.scala
Scala
apache-2.0
1,853
package org.finra.datagenerator.scaffolding.messaging.response /** * Created by dkopel on 7/7/16. */ trait Response[+R] { val response: R val priority: Long } object Response { def apply[R](data: R, prty: Long=0): Response[R] = new Response[R] { override val response=data override val p...
FINRAOS/DataGenerator
rubber-scaffolding/rubber-commons/src/main/scala/org/finra/datagenerator/scaffolding/messaging/response/Response.scala
Scala
apache-2.0
340
/* * 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 ...
ahnqirage/spark
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
Scala
apache-2.0
32,624
/* * Copyright 1998-2018 Linux.org.ru * 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...
hizel/lorsource
src/test/scala/ru/org/linux/search/ElasticsearchIndexServiceIntegrationSpec.scala
Scala
apache-2.0
2,802
/* Copyright 2009-2016 EPFL, Lausanne */ package leon package synthesis import purescala.Definitions._ import purescala.Expressions._ import purescala.Constructors._ import purescala.Common._ import evaluators.{TrackingEvaluator, DefaultEvaluator} import leon.utils.ASCIIHelpers._ /** Sets of valid and invalid exampl...
regb/leon
src/main/scala/leon/synthesis/ExamplesBank.scala
Scala
gpl-3.0
6,720
package breeze.linalg import breeze.generic.UFunc import breeze.macros.expand import breeze.util.{ArrayUtil, ReflectionUtil} import breeze.macros._ import scala.reflect.ClassTag /** * deduplicates the array * * @author stucchio */ object unique extends UFunc { implicit def impl[S]: Impl[DenseVector[S], DenseV...
scalanlp/breeze
math/src/main/scala/breeze/linalg/functions/unique.scala
Scala
apache-2.0
1,285
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.3 * @date Fri Aug 19 17:10:23 EDT 2011 * @see LICENSE (MIT style license file). */ package apps.event import scalation.model.Modelable import scalation.event.{CausalLink, Entity, Event...
scalation/fda
scalation_1.3/scalation_models/src/main/scala/apps/event/CallCenter2.scala
Scala
mit
5,905
package com.github.hexx.gaeds import java.lang.reflect.{ Field, Method } import scala.reflect.ClassTag import com.google.appengine.api.datastore.{ Entity, FetchOptions, Transaction } import org.json4s._ import org.json4s.native.JsonMethods._ abstract class Mapper[T <: Mapper[T]: ClassTag] extends DatastoreDelegate[T]...
hexx/gaeds
src/main/scala/Mapper.scala
Scala
mit
3,054
package pl.touk.nussknacker.engine.util import scala.util.Try object convert { abstract class StringToNumberConverter[T](tryToConvert: String => T) { def unapply(str: String): Option[T] = Try(tryToConvert(str)).map(Some(_)).recover { case _: NumberFormatException => None }.get } object...
TouK/nussknacker
utils/utils/src/main/scala/pl/touk/nussknacker/engine/util/convert.scala
Scala
apache-2.0
755
package outwatch import outwatch.definitions._ object dsl extends Attributes with Tags with Styles { object tags extends Tags { object extra extends TagsExtra object svg extends TagsSvg } object attributes extends Attributes { object svg extends SvgAttrs } object svg extends SvgAttrs with Tags...
OutWatch/outwatch
outwatch/src/main/scala/outwatch/dsl.scala
Scala
apache-2.0
504
/** * 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"); yo...
KevinLiLu/kafka
core/src/test/scala/unit/kafka/server/ServerGenerateBrokerIdTest.scala
Scala
apache-2.0
7,549
/* * Copyright 2013 - 2015, Daniel Krzywicki <[email protected]> * * 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 ...
ros3n/IntOb
int-ob/src/main/scala/pl/edu/agh/intob/network/FitnessDeserializer.scala
Scala
mit
1,586
/* * 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 required by applicable law or a...
ahudspith-equalexperts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600e/v3/E165.scala
Scala
apache-2.0
895
/* * Copyright (c) 2012 Michael Rose * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this work except in compliance with the License. * You may obtain a copy of the License in the LICENSE file, or at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
Xorlev/Simon
simon-http-server/src/main/scala/com/xorlev/simon/request/RequestMapper.scala
Scala
apache-2.0
1,984
package debop4s.core.utils import org.scalactic.TolerantNumerics._ import org.scalactic.TripleEquals._ import org.slf4j.LoggerFactory import scala.annotation.switch import scala.util.control.NonFatal /** * 무게에 대한 단위를 표현합니다. * @author [email protected] */ class WeightUnit(val gram: Double) extends Ordered[We...
debop/debop4s
debop4s-core/src/main/scala/debop4s/core/utils/WeightUnit.scala
Scala
apache-2.0
2,981
package com.aristocrat.mandrill.requests.Metadata import com.aristocrat.mandrill.requests.MandrillRequest case class Add(key: String, name: String, viewTemplate: String) extends MandrillRequest
aristocratic/mandrill
src/main/scala/com/aristocrat/mandrill/requests/Metadata/Add.scala
Scala
mit
196
/* * 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
core/src/test/scala/quasar/Fixture.scala
Scala
apache-2.0
1,094
package newts import cats.Id import cats.kernel.laws.discipline.{CommutativeMonoidTests, CommutativeSemigroupTests, OrderTests} import cats.laws.discipline.{CommutativeMonadTests, DistributiveTests, TraverseTests} class MinTest extends NewtsSuite { checkAll("Min[Int]", CommutativeSemigroupTests[Min[Int]].commutati...
julien-truffaut/newts
test/shared/src/test/scala/newts/MinTest.scala
Scala
apache-2.0
927
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2006-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
l15k4/scala-parser-combinators
src/main/scala/scala/util/parsing/input/Reader.scala
Scala
bsd-3-clause
1,853
/* sbt -- Simple Build Tool * Copyright 2010 Jason Zaugg */ package xsbt import scala.tools.nsc.{CompilerCommand, Settings} object Command { /** * Construct a CompilerCommand using reflection, to be compatible with Scalac before and after * <a href="https://lampsvn.epfl.ch/trac/scala/changeset/21274">r21274<...
ornicar/xsbt
compile/interface/Command.scala
Scala
bsd-3-clause
1,030
package net.tomasherman.specus.server.grid import akka.actor.Actor import net.tomasherman.specus.common.api.logging.Logging import net.tomasherman.specus.common.api.grid.messages.{WriteRequest, Register, PacketMessage} import net.tomasherman.specus.server.api.di.DependencyConfigRepository /** * This file is part of ...
tomasherman/specus
server/src/main/scala/grid/RemoteServerConnector.scala
Scala
gpl-3.0
1,422
package ghpages.examples import ghpages.GhPagesMacros import japgolly.scalajs.react._, vdom.prefix_<^._ import org.scalajs.dom.window import ghpages.examples.util.SideBySide import Addons.ReactCssTransitionGroup object AnimationExample { def content = SideBySide.Content(jsSource, source, main()) lazy val main =...
vcarrera/scalajs-react
gh-pages/src/main/scala/ghpages/examples/AnimationExample.scala
Scala
apache-2.0
2,370
/* * Original implementation (C) 2010-2015 Nathan Hamblen and contributors * Adapted and extended in 2016 by foundweekends project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * ...
foundweekends/giter8
app/src/main/scala/giter8.scala
Scala
apache-2.0
1,795
package ooyala.common.akka import akka.actor.Actor import org.slf4j.LoggerFactory /** * Trait that adds Logback/SLF4J logging to actors. It adds the following members: * * * logger * * It also prints a message upon actor initialization. * Also, it fills the akkaSource MDC variable with the current actor's path...
nachiketa-shukla/spark-jobserver
akka-app/src/ooyala.common.akka/Slf4jLogging.scala
Scala
apache-2.0
1,097
package org.http4s package server import cats.implicits._ import cats.effect._ import cats.effect.concurrent.Ref import fs2._ import fs2.concurrent.{Signal, SignallingRef} import java.net.{InetAddress, InetSocketAddress} import javax.net.ssl.SSLContext import org.http4s.internal.BackendBuilder import org.http4s.server...
aeons/http4s
server/src/main/scala/org/http4s/server/ServerBuilder.scala
Scala
apache-2.0
3,764
/* * 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 ...
fhueske/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/rules/datastream/StreamTableSourceScanRule.scala
Scala
apache-2.0
2,422
/* * Copyright 2022 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/sbt-bobby
src/main/scala/uk/gov/hmrc/bobby/output/BobbyWriter.scala
Scala
apache-2.0
1,411
//package com.sksamuel.elastic4s.streams // //import java.util.concurrent.Executors // //import akka.actor.ActorSystem //import com.sksamuel.elastic4s.Indexes //import com.sksamuel.elastic4s.bulk.BulkCompatibleDefinition //import com.sksamuel.elastic4s.http.ElasticDsl //import com.sksamuel.elastic4s.jackson.ElasticJack...
stringbean/elastic4s
elastic4s-http-streams/src/test/scala/com/sksamuel/elastic4s/streams/SubscriberFlushAfterTest.scala
Scala
apache-2.0
5,728
package yang.iterator /** * Created by y28yang on 3/1/2016. */ trait TimeoutCheckable { @volatile var lastTimeStamp = System.currentTimeMillis() def touch() { lastTimeStamp = System.currentTimeMillis() } def isTimeOut(maxUnusedTime: Long): Boolean = { val currentTime = System.currentTimeMillis...
wjingyao2008/firsttry
NextGenAct/src/main/scala/yang/iterator/TimeoutCheckable.scala
Scala
apache-2.0
412
trait Covariant[+A] trait Invariant[A] extends Covariant[A @annotation.unchecked.uncheckedVariance] trait Combinable[G] { def combined = 0 } trait CanBuildFrom[+C] object C { implicit def convert1[G, TRAVONCE[+e] <: Covariant[e]] (xs: TRAVONCE[G]): Combinable[G] = ??? implicit def convert2[G, SET[e] <...
felixmulder/scala
test/files/neg/t8431.scala
Scala
bsd-3-clause
1,643
package sclib.serialization import org.scalatest.{FunSuite, Matchers} import sclib.ops.either._ import sclib.serialization.simple._ class SerializationSuite extends FunSuite with Matchers { // // serialize // test("serialize string") { Serialize("44:one string") should be("13:44:one string") } test...
j-keck/sclib
src/test/scala/sclib/serialization/SerializationSuite.scala
Scala
mit
3,886
/* * 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/src/test/scala/org/neo4j/cypher/EagerizationAcceptanceTest.scala
Scala
apache-2.0
23,894
class i0(val i1: Double) extends AnyVal { def i2 = new i0.i3 } abstract class i5 { def i6(i7: i0): i1 = i3 class i8(i9: i4) { def i10 = new i6 { def i7 = i3(, ) } } 0 private def i11: Unit = { val i10 = i1(2, ) def i12 = i13 val i13 = i2() val def >>(i10: i1) = i1 def i14: i0 => String = ??? trait i18 extends i2 abstra...
som-snytt/dotty
tests/fuzzy/c8f351c9685739fcf49bd7ce406e431b2a6b7cf7.scala
Scala
apache-2.0
447
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.mvc import org.specs2.mutable.Specification import play.api.http.HttpConfiguration import play.api.libs.typedmap.TypedMap import play.api.mvc.{ Headers, RequestHeader } import play.api.mvc.request.{ DefaultRequestFactory, RemoteC...
Shruti9520/playframework
framework/src/play/src/test/scala/play/mvc/RequestHeaderSpec.scala
Scala
apache-2.0
3,473
/* * CordImpl.scala * (Cord) * * Copyright (c) 2015-2020 Hanns Holger Rutz. * * This software is published under the GNU Lesser General Public License v2.1+ * * * For further information, please contact Hanns Holger Rutz at * [email protected] */ package de.sciss.cord package impl import de.sciss.cord.v...
Sciss/Cord
src/main/scala/de/sciss/cord/impl/CordImpl.scala
Scala
lgpl-2.1
897
/* * Copyright (c) 2017 Aaron Levin * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish...
aaronlevin/scala-parsec
src/main/scala/ca/aaronlevin/parsec/package.scala
Scala
mit
8,870
package org.workcraft.plugins.cpog.scala.tools import org.workcraft.dom.visual.ColorisableGraphicalContent import org.workcraft.gui.graph.tools.GraphEditorToolUtil import org.workcraft.gui.graph.tools.Colorisation import org.workcraft.gui.graph.tools.AbstractTool import org.workcraft.gui.graph.tools.GraphEditorTool.Bu...
tuura/workcraft-2.2
CpogsPlugin/src/main/scala/org/workcraft/plugins/cpog/scala/tools/ControlPointsTool.scala
Scala
gpl-3.0
6,013
/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
arashi01/scalate-samples
scalate-bookstore/src/main/scala/org/fusesource/scalate/samples/bookstore/model/Book.scala
Scala
apache-2.0
890
/* * Copyright (C) 2014-2015 by Nokia. * See the LICENCE.txt file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy o...
elyast/wookie
collector-api/src/main/scala/wookie/collector/utils/DI.scala
Scala
apache-2.0
918
package fr.acinq.eclair.channel import fr.acinq.bitcoin.Crypto.{PrivateKey, PublicKey} import fr.acinq.bitcoin.DeterministicWallet._ import fr.acinq.bitcoin._ import fr.acinq.eclair._ import fr.acinq.eclair.blockchain.TxConfirmedAt import fr.acinq.eclair.blockchain.fee.FeeratePerKw import fr.acinq.eclair.crypto.Genera...
btcontract/wallet
app/src/main/java/fr/acinq/eclair/channel/ChannelTypes.scala
Scala
apache-2.0
19,846
package io.plasmap.geo.mappings.impl import com.typesafe.config.ConfigFactory import io.plasmap.geo.mappings.{OsmWayMapping, OsmRelationMapping, OsmNodeMapping, MappingService} import io.plasmap.model.OsmId import org.joda.time.DateTime import reactivemongo.api.collections.bson.BSONCollection import reactivemongo.api....
plasmap/plasmap
dal/src/main/scala/io/plasmap/geo/mappings/impl/MongoMappingService.scala
Scala
apache-2.0
6,445
/* * 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 ...
MrCodeYu/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvalHelper.scala
Scala
apache-2.0
11,540
package org.finra.datagenerator.scaffolding.config /** * Created by dkopel on 12/13/16. */ case class LocalConfig(nConfs: Seq[Config[_]])(implicit oConf: Configuration) extends Configuration(oConf.provider) { implicit val self: Configuration = this def allConfs = nConfs.toList ++ oConf.confs().filter(c =>...
FINRAOS/DataGenerator
rubber-scaffolding/rubber-commons/src/main/scala/org/finra/datagenerator/scaffolding/config/LocalConfig.scala
Scala
apache-2.0
724
/** * Copyright (C) 2014 TU Berlin ([email protected]) * * 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...
carabolic/peel
peel-extensions/src/main/scala/org/peelframework/hadoop/beans/system/Yarn.scala
Scala
apache-2.0
5,783
package BIDMach.models import BIDMat.{Mat,SBMat,CMat,DMat,FMat,IMat,HMat,GDMat,GMat,GIMat,GSDMat,GSMat,SMat,SDMat} import BIDMat.MatFunctions._ import BIDMat.SciFunctions._ import BIDMach.datasources._ /** * An Abstract class with shared code for Factor Models */ abstract class FactorModel(override val opt...
uhjish/BIDMach
src/main/scala/BIDMach/models/FactorModel.scala
Scala
bsd-3-clause
2,974
package scala.scalanative package nir package parser import fastparse.all._ object Inst extends Base[nir.Inst] { import Base.IgnoreWhitespace._ val None = P("none".! map (_ => nir.Inst.None)) val Label = P(Local.parser ~ ("(" ~ Val.Local.rep(sep = ",") ~ ")").? ~ ":" map { case (name, params) => nir...
cedricviaccoz/scala-native
tools/src/main/scala/scala/scalanative/nir/parser/Inst.scala
Scala
bsd-3-clause
1,646
/* * 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/SyntaxExceptionCreator.scala
Scala
apache-2.0
1,333
// Copyright 2011 Kiel Hodges package sample case class Request(widgetId: Long)
greenbar/replicant
scala/src/test/scala/sample/Request.scala
Scala
mit
81
package com.tuplejump.cobalt.query import org.apache.cassandra.thrift.{IndexOperator, IndexExpression} import java.nio.ByteBuffer /** * Created with IntelliJ IDEA. * User: rohit * Date: 3/1/13 * Time: 7:01 PM * To change this template use File | Settings | File Templates. */ trait Query { protected[query] va...
tuplejump/calliope-old
src/main/scala/com/tuplejump/calliope/query/Query.scala
Scala
apache-2.0
1,946
/* * Copyright 2014 The Guardian * * 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...
guardian/gu-who
app/lib/AccountRequirement.scala
Scala
apache-2.0
3,112
/* * Copyright (C) 2011-2017 Interfaculty Department of Geoinformatics, University of * Salzburg (Z_GIS) & Institute of Geological and Nuclear Sciences Limited (GNS Science) * in the SMART Aquifer Characterisation (SAC) programme funded by the New Zealand * Ministry of Business, Innovation and Employment (MBIE) * ...
ZGIS/smart-portal-backend
test/UserDAOSpec.scala
Scala
apache-2.0
12,183
package com.gx.valueobject import org.scalatest.{FlatSpec, Matchers} /** * Copyright 2017 josephguan * * 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/...
josephguan/scala-design-patterns
creational/value-object/src/test/scala/com/gx/valueobject/ValueObjectSpec.scala
Scala
apache-2.0
847
// // Copyright (c) 2014 Ole Krause-Sparmann // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge,...
pixelogik/postwall
postwall/common/src/main/scala/com/postwall/Configs.scala
Scala
mit
1,340
package sangria.execution.deferred import sangria.util.Cache trait FetcherCache { def cacheKey(id: Any): Any def cacheKeyRel(rel: Any, relId: Any): Any def cacheable(id: Any): Boolean def cacheableRel(rel: Any, relId: Any): Boolean def get(id: Any): Option[Any] def getRel(rel: Any, relId: Any): Option[S...
OlegIlyenko/sangria
modules/core/src/main/scala/sangria/execution/deferred/FetcherCache.scala
Scala
apache-2.0
1,770
/* * 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 ...
witgo/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/sources/filters.scala
Scala
apache-2.0
10,259
/* * 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 ...
aosagie/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/sources/RateStreamProvider.scala
Scala
apache-2.0
5,860
package latis.time import latis.util.LatisProperties object TimeScaleType extends Enumeration { type TimeScaleType = Value val NATIVE = Value("NATIVE") val UTC = Value("UTC") val TAI = Value("TAI") //Note, using def instead of lazy val to support tests. def default: TimeScaleType = LatisProperti...
dlindhol/LaTiS
src/main/scala/latis/time/TimeScaleType.scala
Scala
epl-1.0
451
/** * Copyright (C) 2010 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
core-cross-platform/js/src/main/scala/org/orbeon/oxf/xml/SaxonUtils.scala
Scala
lgpl-2.1
17,116
import scala.util.parsing.combinator._ import scala.util.parsing.input.Reader import scala.util.parsing.input.CharArrayReader.EofCh import scala.collection.mutable.{Map, HashMap} import scala.pickling.testing.PicklingBenchmark import scala.io.Source import scala.util.Random // for Java Serialization: import java.io.{...
phaller/pickling
benchmark/WikiGraph.scala
Scala
bsd-3-clause
8,469
package cromwell.engine.backend.runtimeattributes import AttributeMap.EnhancedBackendType import cromwell.engine.backend.BackendType object AttributeMap { implicit class EnhancedBackendType(val backendType: BackendType) extends AnyVal { def supportedKeys: Set[RuntimeKey] = for { key <- RuntimeKey.values()...
dgtester/cromwell
src/main/scala/cromwell/engine/backend/runtimeattributes/AttributeMap.scala
Scala
bsd-3-clause
961
package org.jetbrains.plugins.scala package lang package refactoring package namesSuggester import com.intellij.openapi.util.text.StringUtil import org.jetbrains.plugins.scala.extensions._ import org.jetbrains.plugins.scala.lang.psi.api.base.{ScLiteral, ScReferenceElement} import org.jetbrains.plugins.scala.lang.psi.a...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/refactoring/namesSuggester/NameSuggester.scala
Scala
apache-2.0
7,233
class Foo { val tup: (Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int) = ??? tup.size tup.size tup.size tup.size tup.size }
dotty-staging/dotty
tests/bench/tuple22-size.scala
Scala
apache-2.0
267
package org.tensorframes import org.apache.spark.sql.types.{BinaryType, DataType, NumericType} import org.tensorflow.framework.TensorShapeProto import scala.collection.JavaConverters._ import org.tensorframes.Shape.DimType import org.tensorframes.impl.ScalarType import org.{tensorflow => tf} /** * The shape of a t...
databricks/tensorframes
src/main/scala/org/tensorframes/Shape.scala
Scala
apache-2.0
3,665
/* * Copyright 2013 Norman Maurer * * Norman Maurer, licenses this file to you 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 require...
carlosFattor/postgresql-async
mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/codec/LittleEndianByteBufAllocator.scala
Scala
apache-2.0
2,795
/* * 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...
dotty-staging/scalatest
scalatest/src/main/scala/org/scalatest/Documenter.scala
Scala
apache-2.0
4,987
package slamdata.engine import slamdata.engine.analysis._ import slamdata.engine.std.Library import scalaz._ import scalaz.std.map._ import scalaz.std.string._ import scalaz.std.list._ import scalaz.std.option._ import scalaz.std.set._ import scalaz.syntax.apply._ import scalaz.syntax.traverse._ trait SemanticAnaly...
sellout/slamengine-old
src/main/scala/slamdata/engine/semantics.scala
Scala
agpl-3.0
19,729
package vultura.util /** * Mixin for memoizing hash values of case classes (more generally products). * @see scala.Product */ trait HashMemo {self: Product => override final val hashCode: Int = self.productIterator.toSeq.hashCode() }
ziggystar/vultura-factor
util/src/main/scala/vultura/util/HashMemo.scala
Scala
mit
240
package spatial.transform import argon.core._ import argon.nodes._ import argon.transform.ForwardTransformer import spatial.analysis.SpatialTraversal import spatial.aliases._ import spatial.metadata._ import spatial.nodes._ import spatial.utils._ import scala.collection.mutable.ArrayBuffer /** * Inserts UnitPipe w...
stanford-ppl/spatial-lang
spatial/core/src/spatial/transform/UnitPipeTransformer.scala
Scala
mit
11,498
/* * Copyright (c) 2014-2020 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
alexandru/monifu
monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayByTimespanSuite.scala
Scala
apache-2.0
2,908
object typers { class A(x: Int) { val x: String = "a" // error: double def { val y: String = "" val y: Int = 0 // error: double def y } } class B { self => // error: double def def self: Int = 0 def self(x: Int): Int = x } class C { val x: Int val x: Strin...
reactormonk/dotty
tests/neg/typers.scala
Scala
bsd-3-clause
1,552
/* * 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 ...
yuyongyang800/SparkDistributedMatrix
src/main/scala/org/apache/spark/sql/matfast/MatfastSessionState.scala
Scala
apache-2.0
2,546
import scala.quoted._ import scala.quoted.staging._ import scala.quoted.autolift object Macros { inline def assert(expr: => Boolean): Unit = ${ assertImpl('expr) } def assertImpl(expr: Expr[Boolean])(using QuoteContext) = '{ if !($expr) then throw new AssertionError(s"failed assertion: ${${showExpr(expr...
som-snytt/dotty
tests/pos-staging/quote-0.scala
Scala
apache-2.0
1,163
package net.akmorrow13.endive.featurizers import net.akmorrow13.endive.EndiveFunSuite class MotifSuite extends EndiveFunSuite { // training data of region and labels var motifPath = resourcePath("models.yaml") test("should read pwms from yaml file") { val motifs = Motif.parseYamlMotifs(motifPath) asse...
akmorrow13/endive
src/test/scala/net/akmorrow13/endive/featurizers/MotifSuite.scala
Scala
apache-2.0
460
package stream import stream.Fns._ object PureStreams { trait IntStream { def empty : Boolean def current : Int def next : IntStream def currentValid : Boolean } class IntFilterStream(stream : IntStream, pred : IntBoolFn) extends IntStream { def next = new IntFilterStream(stream.next, pred)...
svn2github/metascala
src/test/stream/PureIntStream.scala
Scala
bsd-3-clause
1,758
package uk.org.nbn.nbnv.importer.ingestion import org.mockito.Mockito._ import org.mockito.Matchers._ import javax.persistence.EntityManager import uk.org.nbn.nbnv.jpa.nbncore.{Dataset, TaxonDataset} import uk.org.nbn.nbnv.importer.metadata.Metadata import uk.org.nbn.nbnv.importer.testing.BaseFunSuite import u...
JNCC-dev-team/nbn-importer
importer/src/test/scala/uk/org/nbn/nbnv/importer/ingestion/DatasetIngesterSuite.scala
Scala
apache-2.0
2,400
import leon.annotation.inline import leon.lang._ object Array8 { def bar(): Boolean = { val a = foo() a.length == 5 }.holds @inline def foo(): Array[Int] = { Array.fill(5)(0) } ensuring { res => res(0) == 0 } }
epfl-lara/leon
src/test/resources/regression/verification/xlang/valid/Array8.scala
Scala
gpl-3.0
237
/* * Copyright 2016 Combined Conditional Access Development, 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 requir...
ccadllc/cedi-dtrace
logging/jvm/src/test/scala/com/ccadllc/cedi/dtrace/logging/TestSupport.scala
Scala
apache-2.0
1,952
/* * Copyright 2012 Alexander Bertram * * 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...
abertram/AntScout
src/main/scala/de.fhwedel.antscout/snippet/AddUserInterfaceCometActor.scala
Scala
apache-2.0
1,010
package edu.gemini.spModel.ags import java.util.Comparator /** * */ sealed trait AgsStrategyKey { def id: String def displayName: String = id.replaceAll("_", " ") } object AgsStrategyKey { case object AltairAowfsKey extends AgsStrategyKey { val id = "ALTAIR" override def displayName = "Altair" } ...
arturog8m/ocs
bundle/edu.gemini.pot/src/main/scala/edu/gemini/spModel/ags/AgsStrategyKey.scala
Scala
bsd-3-clause
2,184
package sbt import java.io.PrintWriter object MainLogging { def multiLogger(config: MultiLoggerConfig): Logger = { import config._ val multi = new MultiLogger(console :: backed :: extra) // sets multi to the most verbose for clients that inspect the current level multi setLevel Level.unionAll(backingLeve...
harrah/xsbt
util/log/src/main/scala/sbt/MainLogging.scala
Scala
bsd-3-clause
2,341
object A { def x(i: Int) = 3 }
xeno-by/old-scalameta-sbt
sbt/src/sbt-test/actions/compile/A.scala
Scala
bsd-3-clause
32
package ch.ethz.dalab.dissolve.optimization import java.io.File import java.io.PrintWriter import breeze.linalg._ import breeze.linalg.DenseVector import breeze.linalg.Vector import breeze.linalg.csvwrite import breeze.numerics._ import ch.ethz.dalab.dissolve.classification.StructSVMModel import ch.ethz.dalab.dissolv...
dalab/dissolve-struct
dissolve-struct-lib/src/main/scala/ch/ethz/dalab/dissolve/optimization/SSGSolver.scala
Scala
apache-2.0
5,467