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 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC120A.scala
Scala
apache-2.0
1,178
/* * Copyright 2012-2014 Comcast Cable Communications Management, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unl...
Comcast/sirius
src/test/scala/com/comcast/xfinity/sirius/api/impl/SiriusStateTest.scala
Scala
apache-2.0
1,192
package com.alexitc.coinalerts.tasks import java.math.MathContext import javax.inject.Inject import com.alexitc.coinalerts.config.TaskExecutionContext import com.alexitc.coinalerts.data.async.{FixedPriceAlertFutureDataHandler, UserFutureDataHandler} import com.alexitc.coinalerts.models._ import com.alexitc.coinalerts...
AlexITC/crypto-coin-alerts
alerts-server/app/com/alexitc/coinalerts/tasks/FixedPriceAlertsTask.scala
Scala
gpl-3.0
4,813
package org.cddb.lsmt class BlockManager { } object BlockManager { }
tierex/cddb
core/src/main/scala/org/cddb/lsmt/BlockManager.scala
Scala
apache-2.0
74
/* * Copyright (c) 2016. Fengguo (Hugo) Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Detailed co...
arguslab/argus-cit-intellij
src/main/scala/org/argus/cit/intellij/jawa/annotator/JawaHighlightingAnnotator.scala
Scala
epl-1.0
3,696
/* * @author Philip Stutz * * Copyright 2014 University of Zurich * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2....
jacqueslk/triplerush-filter
src/main/scala/com/signalcollect/triplerush/japi/TripleRush.scala
Scala
apache-2.0
2,266
package au.net.hivemedia.crateconnector import java.io.IOException import io.crate.client.CrateClient import org.scalatest.{Matchers, FlatSpec} /** * Test Case Class to test the storage and retrevial of items from database */ case class TestObject(testInt: Int, testString: String, testBoolean: Boolean, ...
HiveMedia/crate-connector
src/test/scala/au/net/hivemedia/crateconnector/CrateConnectorSpec.scala
Scala
apache-2.0
3,782
package com.idyria.osi.ooxoo.db
richnou/ooxoo-db
src/main/scala/com/idyria/osi/ooxoo/db/DBOption.scala
Scala
lgpl-3.0
33
/* * Copyright (c) 2012-2013 SnowPlow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
richo/snowplow
3-etl/hive-etl/snowplow-log-deserializers/src/test/scala/com/snowplowanalytics/snowplow/hadoop/hive/StructEventTest.scala
Scala
apache-2.0
3,786
import scala.language.higherKinds trait 柴 { type 尾 <: 柴 def 尾: 尾 type 当前燃料 <: 燃料 def 当前燃料: 当前燃料 type 初始化[I <: 燃料] <: 柴 def 初始化[I <: 燃料](i: I): 初始化[I] type 点火[I <: 火苗] <: 柴 def 点火[I <: 火苗](i: I): 点火[I] } class 一块柴[S <: 燃料, T <: 柴](override val 当前燃料: S, override val 尾: T) extends 柴 { self => o...
djx314/ubw
raw07-晒太阳/src/main/scala/Chai.scala
Scala
bsd-3-clause
1,655
package org.scalacheck.ops.time import org.scalacheck.Gen private[time] trait FromLong { self: AbstractTimeGenerators => protected[time] def now(implicit params: ParamsType): InstantType = asInstant(System.currentTimeMillis()) protected[time] def asInstant(millis: Long)(implicit params: ParamsType): InstantTy...
gloriousfutureio/scalacheck-ops
core_1-12/src/main/scala/org/scalacheck/ops/time/FromLong.scala
Scala
apache-2.0
776
/*********************************************************************** * 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/api/ShardStrategy.scala
Scala
apache-2.0
2,472
/* * Copyright (C) 2005, The Beangle Software. * * 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 3 of the License, or * (at your option) any later version. * * This...
beangle/cdi
spring/src/test/scala/org/beangle/cdi/spring/config/ConvertTest.scala
Scala
lgpl-3.0
1,284
/* * Copyright (c) 2018. Fengguo Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License v2.0 * which accompanies this distribution, and is available at * https://www.apache.org/licenses/LICENSE-2.0 * * Detailed contributors ar...
arguslab/Argus-SAF
jawa/src/main/scala/org/argus/jawa/core/compiler/interactive/CompilerControl.scala
Scala
apache-2.0
12,300
package com.seanshubin.contract.domain import java.io._ import java.nio.channels.Channel import java.util.{Map, Properties} trait SystemContract { def in: InputStream def out: PrintStream def err: PrintStream def setIn(in: InputStream) def setOut(out: PrintStream) def setErr(err: PrintStream) def ...
SeanShubin/contract
domain/src/main/scala/com/seanshubin/contract/domain/SystemContract.scala
Scala
unlicense
1,519
package exercises.ch04 object Ex04 { def sequence[A](a: List[Option[A]]): Option[List[A]] = { val newList = a.flatMap(a => a match { case None => List(); case Some(aa) => List(aa) }) if (newList.size < a.size) None else Some(newList) } def main(args: Array[String]): Unit = { println...
VladMinzatu/fpinscala-exercises
src/main/scala/exercises/ch04/Ex04.scala
Scala
mit
474
package core.formatter.marketplace.product import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.databind.module.SimpleModule import com.fasterxml.jackson.databind.{ JsonSerializer, ObjectMapper, SerializerProvider } import com.fasterxml.jackson.module.scala.DefaultScalaModule import com.lvxingp...
Lvxingpai/Hanse
app/core/formatter/marketplace/product/CommodityCommentFormatter.scala
Scala
apache-2.0
6,183
package com.arcusys.learn.liferay.util import javax.portlet.{ActionRequest, PortletRequest, RenderRequest} import javax.servlet.http.HttpServletRequest import com.arcusys.learn.liferay.LiferayClasses.LUser import com.liferay.portal.kernel.security.auth.CompanyThreadLocal import com.liferay.portal.kernel.service.{Comp...
arcusys/Valamis
learn-liferay700-services/src/main/scala/com/arcusys/learn/liferay/util/PortalUtilHelper.scala
Scala
gpl-3.0
3,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 may ...
pronix/spark
yarn/src/test/scala/org/apache/spark/network/yarn/YarnShuffleServiceSuite.scala
Scala
apache-2.0
9,573
// 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/maestro
maestro-core/src/main/scala/au/com/cba/omnia/maestro/core/data/Field.scala
Scala
apache-2.0
2,317
/* * Copyright (C) 2015 47 Degrees, LLC http://47deg.com [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 * * Unl...
iwaiawi/cellmon
src/main/scala/iwai/cellmon/ui/fragment/locations/Styles.scala
Scala
apache-2.0
2,107
package macros.test /** * Created by cuz on 1/18/17. */ object MacrosClientTest extends App{ }
cuzfrog/WebDriverServ
client/src/test/scala/macros/test/MacrosClientTest.scala
Scala
apache-2.0
103
package scala.collection.immutable import reftree.core._ import reftree.util.Reflection.PrivateFields /** * [[ToRefTree]] instances for Scala immutable collections, which require access to private fields * * The package name is intentionally changed so that we can get access to some private fields and classes. */...
stanch/reftree
core/jvm/src/main/scala/reftree/core/HackedCollectionInstances.scala
Scala
gpl-3.0
6,065
/* * 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
connector/src/main/scala/quasar/qscript/ShiftType.scala
Scala
apache-2.0
1,078
package controllers.auth import javax.inject.Inject import com.mohiva.play.silhouette.api.Authenticator.Implicits._ import com.mohiva.play.silhouette.api._ import com.mohiva.play.silhouette.api.exceptions.ProviderException import com.mohiva.play.silhouette.api.repositories.AuthInfoRepository import com.mohiva.play.si...
dpitkevics/play-silhouette-4.0-slick-postgres-seed
app/controllers/auth/SignInController.scala
Scala
apache-2.0
4,257
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/integration/torch/ViewSpec.scala
Scala
apache-2.0
2,459
package us.newsrdr.models object Constants { val ITEMS_PER_PAGE = 10 val LOGIN_URI = "/auth/login" val AUTHENTICATED_URI = "/auth/authenticated" val GOOGLE_CLIENT_ID = "51702830260-toudua1ufu12a2f7rbge9c0jpbhoqej2.apps.googleusercontent.com" val GOOGLE_CLIENT_SECRET = "INSERT SECRET HERE" def getURL(req...
tmiw/newsrdr
src/main/scala/us/newsrdr/models/ApiResult.scala
Scala
bsd-3-clause
2,071
/* * 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 ...
ArvinDevel/onlineAggregationOnSparkV2
sql/core/src/main/scala/org/apache/spark/sql/columnar/NullableColumnBuilder.scala
Scala
apache-2.0
2,816
/* * 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 ...
ajbozarth/incubator-livy
server/src/main/scala/org/apache/livy/utils/LineBufferedStream.scala
Scala
apache-2.0
2,841
/* * 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...
rahulkavale/scalatest
scalatest-test/src/test/scala/org/scalatest/EveryShouldContainAllElementsOfSpec.scala
Scala
apache-2.0
30,327
object Test { def printList(in: List[String]): Unit = in match { case Nil => Unit case (s: String) :: Nil => println(s) case head :: (s: String) :: Nil => printList(head :: Nil) for(i <- head){ print(i) } println println(s) } }
som-snytt/dotty
tests/patmat/t4408.scala
Scala
apache-2.0
290
package com.asto.dop.streamprocessor.process import com.asto.dop.core.CoreModel import com.asto.dop.streamprocessor.DOPContext import org.apache.spark.Logging import org.apache.spark.rdd.RDD object ProcessFactory extends Serializable with Logging { def process(rdd: RDD[String], context: DOPContext): Unit = { ...
zj-lingxin/dop
source/stream-processor/src/main/scala/com/asto/dop/streamprocessor/process/ProcessFactory.scala
Scala
mit
641
/* * 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 ...
minixalpha/spark
mllib-local/src/main/scala/org/apache/spark/ml/linalg/Matrices.scala
Scala
apache-2.0
44,093
package no.digipost.labs.oauth import com.ning.http.client.ProxyServer import com.ning.http.client.ProxyServer.Protocol import scala.concurrent.Future import org.json4s._ import org.json4s.jackson.JsonMethods._ import dispatch._ import scala.concurrent.ExecutionContext.Implicits.global import scala.util.{Success, Fai...
digipost/labs
backend/src/main/scala/no/digipost/labs/oauth/DigipostService.scala
Scala
apache-2.0
1,714
/* * Copyright 2014 Michael Krolikowski * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
mesosphere/dns4s
core/src/test/scala/com/github/mkroli/dns4s/section/ResourceRecordSpec.scala
Scala
apache-2.0
4,076
package com.tothferenc.templateFX.examples.todo import com.tothferenc.templateFX.examples.todo.model.TodoItem import com.tothferenc.templateFX.examples.todo.model.TodoModel import org.slf4j.LoggerFactory class Component(appModel: TodoModel, protoRenderer: Reactor[Intent] => Renderer[TodoModel]) extends Reactor[Intent...
tferi/templateFX
examples/src/main/scala/com/tothferenc/templateFX/examples/todo/Component.scala
Scala
gpl-3.0
2,136
/* active-learning-scala: Active Learning library for Scala Copyright (c) 2014 Davi Pereira dos Santos 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 ...
active-learning/active-learning-scala
src/main/scala/clean/tex/METAtabwinnersPares.scala
Scala
gpl-2.0
5,018
/* * 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 ...
MLnick/spark
core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala
Scala
apache-2.0
13,563
package uk.co.turingatemyhamster.shortbol package ops import scalaz.Scalaz._ import scalaz._ import monocle.{Lens, Prism} import RewriteRule.{FilteringEq, Logging, MaybeRewritten, Rewritten} import uk.co.turingatemyhamster.shortbol.ops.Eval.EvalState import uk.co.turingatemyhamster.shortbol.sharedAst.{Identifier, Lite...
drdozer/shortbol
shortbol/core/shared/src/main/scala/uk/co/turingatemyhamster/shortbol/ops/RewriteRule.scala
Scala
apache-2.0
13,317
package com.markglh.blog import java.util.UUID import com.typesafe.scalalogging.LazyLogging import io.circe._ import io.circe.generic.auto._ import io.getquill.{CassandraAsyncContext, SnakeCase} import org.http4s._ import org.http4s.client.blaze.PooledHttp1Client import org.http4s.dsl._ import scala.concurrent.Execu...
markglh/composing-microservices-with-sbt-docker
beacon-service/src/main/scala/com/markglh/blog/BeaconService.scala
Scala
apache-2.0
943
/** * Created by compr on 06-05-2017. */ object MaximalTourismMemoization { import scala.collection.mutable.Map def main(args: Array[String]) { val sc = new java.util.Scanner (System.in); var n = sc.nextInt(); var m = sc.nextInt(); var route = Array.ofDim[Int](m,2); var distinc...
comprakash/learning-scala
rookierank-3/src/main/scala/MaximalTourismMemoization.scala
Scala
gpl-3.0
2,835
/* 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...
vidyar/twitterscalding
scalding-core/src/main/scala/com/twitter/scalding/source/CheckedInversion.scala
Scala
apache-2.0
955
package org.jetbrains.plugins.scala.lang.optimize package generated class OptimizeImportsSimpleTest extends OptimizeImportsTestBase { //This class was generated by build script, please don't change this override def folderPath: String = super.folderPath + "simple/" protected override def rootPath(): String = f...
advancedxy/intellij-scala
test/org/jetbrains/plugins/scala/lang/optimize/generated/OptimizeImportsSimpleTest.scala
Scala
apache-2.0
897
/* * Copyright (c) 2014-2019 Israel Herraiz <[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 to use, c...
iht/fpinscala
src/main/scala/chap03/ex09.scala
Scala
mit
1,356
package colang.ast.parsed.routines import colang.ast.parsed.{RootNamespace, Type} import colang.ast.raw import colang.issues.Issue import colang.tokens.NativeKeyword private[routines] object RegisterTypes { /** * "Registers" all types in the root namespace. * @param rootNamespace root namespace * @para...
merkispavel/colang
src/main/scala/colang/ast/parsed/routines/RegisterTypes.scala
Scala
mit
940
package org.aprsdroid.app import com.jazzido.PacketDroid.AudioBufferProcessor class AfskInWrapper(hq : Boolean, au : AfskUploader, in_type : Int, samplerate : Int) { var abp = if (!hq) new AudioBufferProcessor(au) else null var ad = if (hq) new AfskDemodulator(au, in_type, samplerate) else null def start() = if (...
ge0rg/aprsdroid
src/backend/AfskInWrapper.scala
Scala
gpl-2.0
415
/* * Copyright 2015 Textocat * * 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 la...
textocat/textokit-core
Textokit.PhraseRecognizer.SPC/src/main/scala/com/textocat/textokit/morph/RichWord.scala
Scala
apache-2.0
2,937
package scopt /** * this file was copied from "https://github.com/scopt/scopt", a light-weight command-line arg parsing library. */ import java.net.UnknownHostException import java.text.ParseException import scala.collection.mutable.{ListBuffer, ListMap} trait Read[A] { self => def arity: Int def tokensToRea...
MrVPlussOne/Muse-CGH
src/scopt/options.scala
Scala
mit
26,341
/* Copyright 2013 Stephen K Samuel 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...
carlosFattor/scrimage
scrimage-filters/src/main/scala/com/sksamuel/scrimage/filter/TwirlFilter.scala
Scala
apache-2.0
1,225
package com.twitter.finagle.builder import com.twitter.conversions.time._ import com.twitter.finagle.ChannelClosedException import com.twitter.finagle.Service import com.twitter.finagle.{Codec, CodecFactory} import com.twitter.io.Charsets import com.twitter.util.{Await, Future} import java.net.InetSocketAddress import...
JustinTulloss/finagle
finagle-core/src/test/scala/com/twitter/finagle/builder/ServerChannelConfigurationTest.scala
Scala
apache-2.0
3,739
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
travisbrown/scalatest
src/main/scala/org/scalatest/RunningTest.scala
Scala
apache-2.0
1,665
package core.host import core.spatial.{Viewable, Zone} //The class that will extends Host will contain the implementations for each zones //It is aggregated by the HostActor that call its functions abstract class Host(val zone: Zone) extends InputReceiver{ def getViewableFromZone(id: String , zone : Zone) : Iterab...
DeltaIMT/Delta
framework/src/main/scala/core/host/Host.scala
Scala
mit
338
/* __ *\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2015, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\___/_/ |_/...
som-snytt/dotty
library/src/scalaShadowing/language.scala
Scala
apache-2.0
11,632
/* * 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.collection packa...
martijnhoekstra/scala
src/library/scala/collection/mutable/OpenHashMap.scala
Scala
apache-2.0
10,156
/** * * GooglePlayServiceHelper * Ledger wallet * * Created by Pierre Pollastri on 11/02/15. * * The MIT License (MIT) * * Copyright (c) 2015 Ledger * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to dea...
LedgerHQ/ledger-wallet-android
app/src/main/scala/co/ledger/wallet/core/utils/GooglePlayServiceHelper.scala
Scala
mit
4,006
/** * 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...
SumoLogic/sumobot
src/main/scala/com/sumologic/sumobot/plugins/beer/Beer.scala
Scala
apache-2.0
2,095
/* * Copyright 2015 Michael Cuthbert * * 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...
Crashfreak/JVerDocs
src/main/scala/org/creak/docversioning/Docs.scala
Scala
apache-2.0
4,817
package org.broadinstitute.clio.util.generic import org.scalatest.{FlatSpec, Matchers} class SameFieldsTypeConverterSpec extends FlatSpec with Matchers { behavior of "SameFieldsTypeConverter" it should "convert between classes" in { case class TransferObject(a: Option[String], b: Int) case class Internal...
broadinstitute/clio
clio-util/src/test/scala/org/broadinstitute/clio/util/generic/SameFieldsTypeConverterSpec.scala
Scala
bsd-3-clause
566
/* * 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 ...
jiangxb1987/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala
Scala
apache-2.0
18,776
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
nagavallia/geomesa
geomesa-features/geomesa-feature-avro/src/main/scala/org/locationtech/geomesa/features/avro/serde/Version2Deserializer.scala
Scala
apache-2.0
1,378
package api import javax.inject.{Inject, Singleton} import com.payu.shorturl.model.Url import com.payu.shorturl.service.ShortUrlService @Singleton class ShortUrlApi @Inject()( shortUrlService: ShortUrlService ) extends Api { def create() = Action.async(json[...
felipehaack/shorturl
payu-api/app/api/ShortUrlApi.scala
Scala
gpl-3.0
690
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
mdzimmerman/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/data/VisibilitiesTest.scala
Scala
apache-2.0
9,315
package com.twitter.finatra.http.integration.tweetexample.main.modules import com.twitter.finatra.http.integration.tweetexample.main.services.{MyTweetsRepository, TweetsRepository} import com.twitter.inject.TwitterModule object TweetsEndpointServerModule extends TwitterModule { override def configure() { bind...
tom-chan/finatra
http/src/test/scala/com/twitter/finatra/http/integration/tweetexample/main/modules/TweetsEndpointServerModule.scala
Scala
apache-2.0
377
/** * For copyright information see the LICENSE document. */ package entice.server.world import entice.server.physics._ import entice.server.utils._ import entice.protocol._ import shapeless._ import scala.language.postfixOps /** * Manages all entities registered to it, all systems registered to it, and can * c...
entice/old-server
src/main/scala/entice/server/world/World.scala
Scala
bsd-3-clause
2,105
package io.igl.jwt import play.api.libs.json.{JsString, JsValue} trait HeaderValue extends JwtValue { val field: HeaderField } trait HeaderField extends JwtField { def attemptApply(value: JsValue): Option[HeaderValue] } case class Typ(value: String) extends HeaderValue { override val field: HeaderField = Typ ...
iain-logan/jwt
src/main/scala/io/igl/jwt/Headers.scala
Scala
mit
1,201
package amailp.intellij.robot.structureView import com.intellij.navigation.ItemPresentation import javax.swing.Icon import com.intellij.ide.util.treeView.smartTree.TreeElement import com.intellij.ide.structureView.StructureViewTreeElement import amailp.intellij.robot.lexer.RobotIElementType import amailp.intellij.robo...
puhnastik/robot-plugin
src/main/scala/amailp/intellij/robot/structureView/InStructureView.scala
Scala
gpl-3.0
1,561
package markpeng.scala.learningscala object Ch5Ex { // placeholder syntax def tripleOp[A, B](a: A, b: A, c: A, f: (A, A, A) => B) = f(a, b, c) /** * (Int, Int) => Boolean */ def factorOf(x: Int, y: Int) = y % x == 0 /** * Int => Int => Boolean */ def factorOf2(x: Int)(y: Int) = y % x == 0 /...
guitarmind/play-scala
src/main/scala/markpeng/scala/learningscala/Ch5Ex.scala
Scala
apache-2.0
1,700
package org.denigma.kappa.notebook.views.comments import org.denigma.codemirror.Editor import org.scalajs.dom.html._ /** * Created by antonkulaga on 8/28/16. */ trait Watcher { type Data def parse(editor: Editor, lines: List[(Int, String)], currentNum: Int): Unit }
antonkulaga/kappa-notebook
app/js/src/main/scala/org/denigma/kappa/notebook/views/comments/Watcher.scala
Scala
mpl-2.0
279
package io.scalaland.chimney import io.scalaland.chimney.dsl._ import io.scalaland.chimney.utils.OptionUtils._ import utest._ object ErrorPathSpec extends TestSuite { val tests = Tests { "error path should capture for" - { type V[+A] = Either[List[TransformationError[String]], A] def printError(er...
scalalandio/chimney
chimney/src/test/scala/io/scalaland/chimney/ErrorPathSpec.scala
Scala
apache-2.0
5,448
package org.receiver2d.engine.geometry import org.receiver2d.engine.math._ import scala.collection.immutable.IndexedSeq class Poly(val verts: IndexedSeq[Vec2]) extends Shape[Poly] with Iterable[Vec2] { require(verts.length >= 3) def apply(i: Int) = verts.apply(i) def iterator: Iterator[Vec2] = verts.iterator...
Prince781/Receiver2D
src/main/scala/org/receiver2d/engine/geometry/Poly.scala
Scala
gpl-2.0
1,771
/*********************************************************************** * 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/package.scala
Scala
apache-2.0
1,098
// Copyright (c) 2013, Johns Hopkins University. All rights reserved. // This software is released under the 2-clause BSD license. // See /LICENSE.txt // Travis Wolfe, [email protected], 30 July 2013 package edu.jhu.hlt.parma.input import edu.jhu.hlt.parma.annotation.PredArgSelector import edu.jhu.hlt.parma.util._ ...
hltcoe/parma
src/main/scala/edu/jhu/hlt/parma/input/LeastOverlapReader.scala
Scala
bsd-2-clause
5,327
package lagcomp import scala.concurrent._ import transport.ConnectionHandle import scala.util.Random class ClockSync(connection: ConnectionHandle, localTime: () => Long) { var behavior: (String => Unit) = greeting _ private val globalTimePromise = Promise[() => Int]() private val identityPromise = Promise[Peer...
OlivierBlanvillain/scala-lag-comp
lag-comp/src/main/scala/ClockSync.scala
Scala
mit
1,384
/* * 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/main/scala/monix/reactive/internal/operators/OnErrorRetryCountedObservable.scala
Scala
apache-2.0
2,510
package taczombie.client.view.main import taczombie.client.view.tui.Tui import com.google.inject.AbstractModule import com.google.inject.Guice import taczombie.client.view.gui.Gui class UiModule(ui: Array[String]) extends AbstractModule { def configure { ui.toList match { case "tui" :: Nil => bind(classOf...
mahieke/TacZombie
gui/src/main/scala/taczombie/client/view/main/Main.scala
Scala
gpl-2.0
690
package antike import monocle.macros.Lenses import monocle.Lens import State._ import Ressource._ import Moves._ import WheelState._ import Utils._ @Lenses case class State( actives: Int, idles: Int, coins: Int, fees: Int, marble: Ressource, iron: Ressource, gold: Ressource, wheelState: WheelState) ...
OlivierBlanvillain/Antike
src/main/scala/Game.scala
Scala
mit
4,832
package wakfutcp.protocol.common import cats.syntax.apply._ import wakfutcp.protocol.Codec final case class Proxy( id: Int, name: String, community: Community, server: ProxyServer, order: Byte ) final case class ProxyServer(address: String, ports: Array[Int]) object ProxyServer { import Codec._ impli...
OpenWakfu/wakfutcp
protocol/src/main/scala/wakfutcp/protocol/common/Proxy.scala
Scala
mit
619
package ru.svd.medan.presentation.web import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport import spray.json._ /** * Created by severian on 21.05.17. */ trait JsonSupport extends SprayJsonSupport with DefaultJsonProtocol { import ru.svd.medan.application._ implicit val ageFormat: RootJsonFormat[A...
severiand/medan
src/main/scala/ru/svd/medan/presentation/web/JsonSupport.scala
Scala
apache-2.0
4,298
/* * Copyright 2016 Dennis Vriend * * 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...
dnvriend/type-classes-example
src/test/scala/com/github/dnvriend/TestSpec.scala
Scala
apache-2.0
986
package se.culvertsoft.mgen.visualdesigner.view.autobox2 import se.culvertsoft.mgen.visualdesigner.classlookup.Type2String import se.culvertsoft.mgen.visualdesigner.control.Controller import se.culvertsoft.mgen.visualdesigner.model.CustomTypeField import se.culvertsoft.mgen.visualdesigner.model.EntityId import se.culv...
culvertsoft/mgen-visualdesigner
src/main/scala/se/culvertsoft/mgen/visualdesigner/view/autobox2/EntityAutoBoxItem.scala
Scala
gpl-2.0
1,822
package org.talkingpuffin.util import org.joda.time.DateTime case class CachedExpandedUrl(lastUsed: DateTime, url: Option[String])
dcbriccetti/talking-puffin
common/src/main/scala/org/talkingpuffin/util/CachedExpandedUrl.scala
Scala
mit
133
package tap.types.kinds import tap.Id import tap.types._ import scala.annotation.tailrec sealed trait Kind case object Star extends Kind case class Kfun(x: Kind, y: Kind) extends Kind case class Kvar(q: Id, id: String) extends Kind object Kind { /** * Finds the kind of a type. */ def kind(t: Type)...
garyb/tap
src/main/scala/tap/types/kinds/Kind.scala
Scala
mit
874
package mimir.sql; import java.sql.{ResultSet,ResultSetMetaData,Blob,Clob,SQLFeatureNotSupportedException,NClob,Ref,RowId,SQLXML,Statement,Time,Timestamp,SQLWarning,SQLException}; import java.net.URL import java.io._; import java.util.{Calendar}; import collection.JavaConversions._; import net.sf.jsqlparser.statement...
Legacy25/mimir
mimircore/src/main/scala/mimir/sql/CSV.scala
Scala
apache-2.0
19,439
/* Copyright (C) 2011 Mikołaj Sochacki mikolajsochacki AT gmail.com * This file is part of VRegister (Virtual Register - Wirtualny Dziennik) * LICENCE: GNU AFFERO GENERAL PUBLIC LICENS Version 3 (AGPLv3) * See: <http://www.gnu.org/licenses/>. */ package eu.brosbit.opos.model import net.liftweb.mapper._ im...
mikolajs/osp
src/main/scala/eu/brosbit/opos/model/SubjectChangeList.scala
Scala
agpl-3.0
779
package com.github.j5ik2o.forseti.domain.auhtorizationCode import scala.concurrent.{ExecutionContext, Future} import scalaz.EitherT trait AuthorizationCodeWriter { def store(entity: AuthorizationCode)( implicit ec: ExecutionContext ): EitherT[Future, Exception, Unit] def deleteById(id: AuthorizationCode...
j5ik2o/forseti
domain/src/main/scala/com/github/j5ik2o/forseti/domain/auhtorizationCode/AuthorizationCodeWriter.scala
Scala
mit
503
package com.arcusys.valamis.util.mustache case class MustacheParseException(line: Int, msg: String) extends Exception("Line " + line + ": " + msg)
ViLPy/Valamis
valamis-util/src/main/scala/com/arcusys/valamis/util/mustache/MustacheParseException.scala
Scala
lgpl-3.0
150
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/utils/serializer/converters/VariableFormatConverter.scala
Scala
apache-2.0
3,180
package org.cakesolutions.akkapatterns.api import akka.actor.ActorSystem import cc.spray.Directives import org.cakesolutions.akkapatterns.domain.User import org.cakesolutions.akkapatterns.core.application.{NotRegisteredUser, RegisteredUser} import akka.pattern.ask /** * @author janmachacek */ class UserService(impl...
anand-singh/akka-patterns
maven/api/src/main/scala/org/cakesolutions/akkapatterns/api/user.scala
Scala
apache-2.0
742
package is.hail.utils import is.hail.backend.ExecuteContext import is.hail.backend.spark.SparkBackend import is.hail.io.fs.FS import org.apache.spark.rdd.RDD import java.io.{ObjectInputStream, ObjectOutputStream} import scala.reflect.{ClassTag, classTag} object SpillingCollectIterator { def apply[T: ClassTag](loca...
hail-is/hail
hail/src/main/scala/is/hail/utils/SpillingCollectIterator.scala
Scala
mit
2,870
/* * Part of NDLA image-api. * Copyright (C) 2016 NDLA * * See LICENSE * */ package no.ndla.imageapi import com.amazonaws.services.s3.AmazonS3 import com.zaxxer.hikari.HikariDataSource import no.ndla.imageapi.auth.{Role, User} import no.ndla.imageapi.controller.{HealthController, ImageControllerV2, InternContro...
NDLANO/image-api
src/test/scala/no/ndla/imageapi/TestEnvironment.scala
Scala
gpl-3.0
2,493
import akka.actor.{ActorLogging, Props, Actor, ActorRef} import com.ning.http.client.AsyncHttpClientConfig.Builder import play.api.libs.json.Json import play.api.libs.ws.ning.NingWSClient import UserHandler.Ticker class DataFetcher(broadcaster: ActorRef) extends Actor with ActorLogging { override def receive: Receiv...
theiterators/reactive-microservices
btc-users/src/main/scala/DataFetcher.scala
Scala
mit
1,067
/* * 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 ...
ArvinDevel/onlineAggregationOnSparkV2
core/src/main/scala/org/apache/spark/deploy/client/TestClient.scala
Scala
apache-2.0
2,159
package controllers import global.Globals import models.Skill import services.ApiServices import javax.inject._ import play.api._ import play.api.mvc._ import play.api.libs.json._ import io.swagger.core._ import io.swagger.annotations._ import play.api.libs.concurrent.Execution.Implicits._ @Api(value = "/skills", ...
gilbertw1/personal-api
app/controllers/SkillController.scala
Scala
gpl-2.0
799
package com.sksamuel.scapegoat.inspections.collections import com.sksamuel.scapegoat.InspectionTest /** @author Stephen Samuel */ class AvoidSizeEqualsZeroTest extends InspectionTest { override val inspections = Seq(new AvoidSizeEqualsZero) "collection.size == 0" - { "should report warning" in { val c...
sksamuel/scapegoat
src/test/scala/com/sksamuel/scapegoat/inspections/collections/AvoidSizeEqualsZeroTest.scala
Scala
apache-2.0
1,190
package com.github.kaeluka.spencer import java.io._ import java.nio.file.{Path, Paths} import java.sql.{Connection, DriverManager, ResultSet} import java.util.concurrent.TimeUnit import java.util.{Calendar, EmptyStackException} import com.github.kaeluka.spencer.Events.{AnyEvt, LateInitEvt, ReadModifyEvt} import com.g...
kaeluka/spencer-all
spencer-analyse/src/main/scala/com/github/kaeluka/spencer/tracefiles/PostgresSpencerDB.scala
Scala
mit
37,940
package recipestore.nlp.corpus.ingredient.stats.models //Order agnostic tuple class Pair(val first: String, val second: String) { private val values = Set(first, second) def canEqual(other: Any): Boolean = other.isInstanceOf[Pair] override def equals(other: Any): Boolean = other match { case that: Pair => ...
prad-a-RuntimeException/semantic-store
src/main/scala/recipestore/nlp/corpus/ingredient/stats/models/Pair.scala
Scala
mit
536
/* * 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 ...
kevinyu98/spark
sql/core/src/test/scala/org/apache/spark/sql/ColumnExpressionSuite.scala
Scala
apache-2.0
28,625
package org.jetbrains.plugins.scala.lang.resolveSemanticDb import com.intellij.psi._ import com.intellij.psi.impl.source.PsiAnnotationMethodImpl import com.intellij.psi.search.GlobalSearchScope import org.jetbrains.plugins.scala.extensions._ import org.jetbrains.plugins.scala.lang.psi.api.ScPackageLike import org.jetb...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/resolveSemanticDb/ComparisonSymbol.scala
Scala
apache-2.0
5,444
package com.example import com.rocketfuel.sdbc.H2._ case class TestClass( id: Int, value: String ) object TestClass { final case class Value(value: String) object Value { implicit val selectable: Selectable[Value, TestClass] = Select[TestClass]("SELECT * FROM test_class WHERE value = @value").sel...
rocketfuel/sdbc
examples/src/main/scala/com/example/TestClass.scala
Scala
bsd-3-clause
1,158
/* * 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 ...
aniketadnaik/carbondataStreamIngest
integration/spark2/src/main/scala/org/apache/spark/sql/parser/CarbonSparkSqlParser.scala
Scala
apache-2.0
7,673