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
package com.googlecode.warikan.domain.models /** * Role. * * @author yukei */ @serializable case class Role(name:String)
digitalsoul0124/warikan
src/main/scala/com/googlecode/warikan/domain/models/Role.scala
Scala
mit
126
/*********************************************************************** * 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-utils/src/test/scala/org/locationtech/geomesa/utils/cache/FilePersistenceTest.scala
Scala
apache-2.0
2,854
package com.cloudray.scalapress.plugin.ecommerce import com.cloudray.scalapress.plugin.ecommerce.domain.{Address, Order} import com.cloudray.scalapress.payments.Purchase /** @author Stephen Samuel */ class OrderPurchase(val order: Order, val domain: String) extends Purchase { require(order != null) def successUr...
vidyacraghav/scalapress
src/main/scala/com/cloudray/scalapress/plugin/ecommerce/OrderPurchase.scala
Scala
apache-2.0
892
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.testsuite.junit import or...
scala-js/scala-js
test-suite/js/src/test/scala/org/scalajs/testsuite/junit/JUnitAbstractClassTest.scala
Scala
apache-2.0
1,353
package controllers import java.util.UUID import javax.inject.Inject import play.api.Logger import play.api.i18n.MessagesApi import play.api.libs.concurrent.Execution.Implicits.defaultContext import play.api.libs.json.Json import play.api.mvc._ import service.{UserHistoryService, HKGPostGrabber} import utils.{CookieH...
j4ckcyw/golden-cache
app/controllers/HKGPostController.scala
Scala
gpl-3.0
1,545
import scala.reflect.runtime.universe._, definitions._ object Test extends dotty.runtime.LegacyApp { // Tuples assert(TupleClass.seq.size == 22) assert(TupleClass(0) == NoSymbol) assert(TupleClass(23) == NoSymbol) assert((1 to 22).forall { i => TupleClass(i).name.toString == s"Tuple$i" }) // Functions ass...
yusuke2255/dotty
tests/run/var-arity-class-symbol.scala
Scala
bsd-3-clause
771
package scodec package codecs import scalaz.\\/ import scalaz.syntax.std.either._ import scodec.bits.BitVector private[codecs] final class ConstantCodec(constant: BitVector, validate: Boolean = true) extends Codec[Unit] { override def encode(ignore: Unit) = \\/.right(constant) override def decode(buffer: B...
danielwegener/scodec
src/main/scala/scodec/codecs/ConstantCodec.scala
Scala
bsd-3-clause
748
/* * 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/util/RexProgramExtractor.scala
Scala
apache-2.0
13,252
/* * 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...
asorianostratio/incubator-toree
scala-interpreter/src/main/scala-2.10/org/apache/toree/kernel/interpreter/scala/ScalaInterpreterSpecific.scala
Scala
apache-2.0
14,056
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/amls-frontend
test/views/msb/what_you_needSpec.scala
Scala
apache-2.0
5,457
package lila.team import akka.actor.ActorSelection import akka.pattern.ask import lila.hub.actorApi.message.LichessThread import lila.hub.actorApi.router._ private[team] final class Notifier( sender: String, messenger: ActorSelection, router: ActorSelection) { import makeTimeout.large def acceptReq...
Happy0/lila
modules/team/src/main/Notifier.scala
Scala
mit
782
/* * Copyright 2006-2011 WorldWide Conferencing, 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 required by applica...
lift/lift
framework/lift-base/lift-util/src/main/scala/net/liftweb/util/Mailer.scala
Scala
apache-2.0
9,953
package dev.code_n_roll.gatling.jdbc.action import dev.code_n_roll.gatling.jdbc.builder.column.ColumnHelper._ import io.gatling.commons.stats.{KO, OK} import io.gatling.commons.util.DefaultClock import io.gatling.core.Predef._ import io.gatling.core.action.Action import io.gatling.core.session.Session import io.gatlin...
rbraeunlich/gatling-jdbc
src/test/scala/dev/code_n_roll/gatling/jdbc/action/JdbcCreateTableActionSpec.scala
Scala
apache-2.0
4,526
/* * Copyright (C) 2015 Cotiviti Labs (nexgen.admin@cotiviti.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
uzh/triplerush
src/main/scala/com/signalcollect/triplerush/JenaGraphAdapter.scala
Scala
apache-2.0
5,365
package mesosphere.marathon.core.task.bus import mesosphere.marathon.core.task.Task import mesosphere.marathon.core.task.bus.TaskStatusObservables.TaskStatusUpdate import mesosphere.marathon.state.{ PathId, Timestamp } import org.apache.mesos.Protos.TaskID import org.joda.time.DateTime class TaskStatusUpdateTestHelpe...
pgkelley4/marathon
src/test/scala/mesosphere/marathon/core/task/bus/TaskStatusUpdateTestHelper.scala
Scala
apache-2.0
3,134
package org.oxygen.redio.items import net.minecraft.item.Item import org.oxygen.redio.CreativeTab object ItemScreen extends Item { setCreativeTab(CreativeTab) setMaxStackSize(1) setUnlocalizedName("screen") }
chenzhuoyu/RedIO
src/main/scala/org/oxygen/redio/items/ItemScreen.scala
Scala
lgpl-2.1
214
/* * 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/ThreadPool.scala
Scala
apache-2.0
7,227
package com.twitter.finagle.memcached.protocol.text.server import com.twitter.finagle.memcached.protocol.text.Framer import com.twitter.finagle.memcached.util.ParserUtils import com.twitter.io.Buf private[finagle] class ServerFramer(storageCommands: Set[Buf]) extends Framer { // The data length is the 5th token, i...
twitter/finagle
finagle-memcached/src/main/scala/com/twitter/finagle/memcached/protocol/text/server/ServerFramer.scala
Scala
apache-2.0
638
class D extends C { // mention abc name to check if local inheritance dependencies are _not_ included in member reference // extension of inheritance invalidation def bar(abc: Int): Int = abc }
dotty-staging/dotty
sbt-test/source-dependencies/local-class-inheritance/D.scala
Scala
apache-2.0
200
package io.soheila.um.daos.activities import io.soheila.um.entities.UserActivity import io.soheila.um.vos.activities.UserActivityQuery import io.soheila.commons.crud.CRUDDAO import io.soheila.commons.entities.Page import io.soheila.commons.exceptions.MongoDAOException import scala.concurrent.Future /** * Handles ac...
esfand-r/soheila-um
src/main/scala/io/soheila/um/daos/activities/UserActivityDAO.scala
Scala
apache-2.0
566
/******************************************************************************* * Copyright (c) 2016 Logimethods * All rights reserved. This program and the accompanying materials * are made available under the terms of the MIT License (MIT) * which accompanies this distribution, and is available at * http://open...
Logimethods/smart-meter
dockerfile-app_inject/src/main/scala/com/logimethods/smartmeter/generate/InterpolatedProfile.scala
Scala
mit
6,420
package scala.virtualization.lms.internal /* Defines OpenCL specific device transfer functions */ trait OpenCLDeviceTransfer extends AbstractDeviceTransfer { this: OpenCLCodegen => val IR: Expressions import IR._ def emitSendSlave(tp: Manifest[_]): (String,String) = { if (isPrimitiveType(tp)) { val...
afernandez90/virtualization-lms-core
src/internal/OpenCLDeviceTransfer.scala
Scala
bsd-3-clause
3,279
class JustGeneric[T, G] new JustGeneric[Int, /*caret*/] //T, G
triggerNZ/intellij-scala
testdata/parameterInfo/typeParameterInfo/SimpleTests/JustGeneric.scala
Scala
apache-2.0
63
/* * Copyright 2016 Nicolas Rinaudo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed...
nrinaudo/kantan.codecs
core/shared/src/main/scala/kantan/codecs/Optional.scala
Scala
apache-2.0
1,569
/* _ _ _ *\\ ** | (_) | | ** ** ___| |_ __| | ___ clide 2 ** ** / __| | |/ _` |/ _ \\ (c) 2012-2014 Martin Ring ...
flatmap/cobra
modules/cobra-common/shared/src/main/scala/net/flatmap/collaboration/Server.scala
Scala
lgpl-3.0
3,749
package controllers import java.io.File import java.nio.file.{Files, Paths} import javax.inject._ import grammars.Schema import grammars.tsql.TSqlFileVisitor import play.api.data.Forms._ import play.api.data._ import play.api.http.ContentTypes import play.api.libs.json.Json import play.api.mvc._ import services.Viz ...
BrunoSabos/rme-web
app/controllers/ParseController.scala
Scala
gpl-3.0
5,905
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
qiuxin2012/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/UpSampling1D.scala
Scala
apache-2.0
3,421
trait T { type U } // "abstract override" shouldn't be allowed on types trait T1 extends T { abstract override type U = Int }
yusuke2255/dotty
tests/untried/neg/t6795.scala
Scala
bsd-3-clause
126
package domala.tests.entity import java.time.{LocalDate, LocalDateTime, LocalTime} import domala._ import domala.jdbc.Config import domala.tests.TestConfig import org.scalatest.{BeforeAndAfter, FunSuite} import domala.jdbc.Result class JavaDateTestSuite extends FunSuite with BeforeAndAfter { implicit val config: ...
bakenezumi/domala
paradise/src/test/scala/domala/tests/entity/JavaDateTestSuite.scala
Scala
apache-2.0
4,593
package net.pointsgame.engine import net.pointsgame.engine.Dot._ import scala.annotation.tailrec // This class needs to be very quick. // Nulls and other strange stuff is used here. //public class DotType protected class Dot( // dots in directions: up, right, down, left //var u: Dot, var ur: Dot, var r: Dot, va...
vn971/points-wip
modules/game-engine-experiments/src/main/scala/net/pointsgame/engine/Dot.scala
Scala
agpl-3.0
2,930
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/nn/keras/nn/Convolution3DSpec.scala
Scala
apache-2.0
3,002
package generic_signature.akka class ActorRef class Actor2 { def actorOf(clazz: Class[_ <: Actor]): ActorRef = new ActorRef } object Actor3 { def actorOf(clazz: Class[_ <: Actor]): ActorRef = new ActorRef }
Kwestor/scala-ide
org.scala-ide.sdt.core.tests/test-workspace/simple-structure-builder/src/generic_signature/akka/Actor.scala
Scala
bsd-3-clause
214
package hyperion.ws import akka.actor.{Actor, ActorLogging, ActorRef} import hyperion.MessageDistributor.RegisterReceiver import hyperion.p1.TelegramReceived /** * Actor that forwards telegrams to a WebSocket connection * * @param source Ref to an Actor that publishes the telegrams to a [[Stream]]. * @param ...
mthmulders/hyperion
app/src/main/scala/hyperion/ws/ActualValuesHandlerActor.scala
Scala
mit
782
//package com.sksamuel.elastic4s.search // //import com.sksamuel.elastic4s.DocumentRef //import com.sksamuel.elastic4s.testkit.{ClassloaderLocalNodeProvider, ElasticSugar} //import org.scalatest.mockito.MockitoSugar //import org.scalatest.{FlatSpec, Matchers} // //class PercolateTest extends FlatSpec with Matchers with...
stringbean/elastic4s
elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/search/PercolateTest.scala
Scala
apache-2.0
2,355
/** * This file is part of CloudScript [ http://cloudscript.modelbased.net ] * * Copyright (C) 2011- SINTEF ICT * Contact: Sebastien Mosser <sebastien.mosser@sintef.no> * * Module: net.modelbased.cloudscript.samples * * CloudScript is free software: you can redistribute it and/or modify * it under the terms o...
SINTEF-9012/cloudscript
net.modelbased.cloudscript.samples/src/main/scala/net/modelbased/cloudscript/samples/sensapp/Software.scala
Scala
gpl-3.0
2,508
/* * 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-test/src/test/scala/org/scalatest/matchers/dsl/ResultOfAtLeastOneElementOfApplicationSpec.scala
Scala
apache-2.0
1,513
package uk.gov.gds.ier.transaction.overseas.openRegister import uk.gov.gds.ier.validation.{ErrorTransformForm, ErrorMessages, FormKeys} import play.api.data.Forms._ import uk.gov.gds.ier.transaction.overseas.InprogressOverseas trait OpenRegisterForms { self: FormKeys with ErrorMessages => lazy val openRegis...
alphagov/ier-frontend
app/uk/gov/gds/ier/transaction/overseas/openRegister/OpenRegisterForms.scala
Scala
mit
684
package org.orbeon.oxf.xforms.analysis.controls import cats.syntax.option._ import org.orbeon.dom.Element import org.orbeon.oxf.xforms.analysis._ import org.orbeon.oxf.xforms.xbl.{CommonBinding, ConcreteBinding} import org.orbeon.xforms.XFormsNames import org.orbeon.xforms.xbl.Scope import org.orbeon.xml.NamespaceMapp...
orbeon/orbeon-forms
xforms-analysis/shared/src/main/scala/org/orbeon/oxf/xforms/analysis/controls/ComponentControl.scala
Scala
lgpl-2.1
2,455
/* * 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 ...
cloud-fan/spark
sql/core/src/test/scala/org/apache/spark/sql/connector/WriteDistributionAndOrderingSuite.scala
Scala
apache-2.0
30,132
/* * 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
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/MetadataLogFileIndex.scala
Scala
apache-2.0
2,585
package io.buoyant.namerd.iface import com.fasterxml.jackson.annotation.JsonIgnore import com.twitter.finagle.stats.StatsReceiver import com.twitter.finagle.{Namer, Path, Stack, Thrift, ThriftMux} import com.twitter.finagle.naming.NameInterpreter import com.twitter.finagle.param import com.twitter.scrooge.ThriftServic...
denverwilliams/linkerd
namerd/iface/interpreter-thrift/src/main/scala/io/buoyant/namerd/iface/ThriftInterpreterInterfaceConfig.scala
Scala
apache-2.0
2,959
/** * ==== * This file is part of SensApp [ http://sensapp.modelbased.net ] * * Copyright (C) 2011- SINTEF ICT * Contact: SINTEF ICT <nicolas.ferry@sintef.no> * * Module: net.modelbased.sensapp * * SensApp is free software: you can redistribute it and/or modify * it under the terms of...
SINTEF-9012/sensapp
net.modelbased.sensapp.backyard.gatling.ws/src/main/scala/IDEPathHelper.scala
Scala
lgpl-3.0
2,616
import java.util.Properties import org.apache.kafka.clients.producer.{ProducerRecord, KafkaProducer} /** * From http://allegro.tech/2015/08/spark-kafka-integration.html * Makes it easier to send messages to Kafka. */ class KafkaSink(createProducer: () => KafkaProducer[String, String]) extends Serializable { la...
polarking/ss7-ml-preprocess
src/main/scala/KafkaSink.scala
Scala
apache-2.0
699
/** * © 2019 Refinitiv. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
dudi3001/CM-Well
server/cmwell-common/src/main/scala/cmwell/common/Settings.scala
Scala
apache-2.0
822
// - Project: scalajs-svgjs (https://github.com/jokade/scalajs-svgjs) // Description: Scala.js bindings for the svg.js SVG object // // Copyright (c) 2015 Johannes Kastner <jokade@karchedon.de> // Distributed under the MIT License (see included file LICENSE) package biz.enef.svgjs import scala.scalajs....
jokade/scalajs-svgjs
src/main/scala/biz/enef/svgjs/SVG.scala
Scala
mit
518
package sbtazurepack.tasks import sbt.Logger import sbtazurepack.settings._ object GenerateCloudServiceRole { def apply(roleSettings: CloudServiceRoleSettings)(implicit logger: Logger): CloudServiceRoleDefinition = { require(roleSettings != null) require(logger != null) logger.info("cspkgRole started...
kostrse/sbt-azurepack
src/main/scala/sbtazurepack/tasks/GenerateCloudServiceRole.scala
Scala
mit
367
object RedPaper extends ColorPaper("red") object RedPaperBox extends Box("red paper box", RedPaper) class ExistentialDrawingChild4a(name: String, box: Box[T] forSome { type T <: RedPaper.type}) { def draw = { val paper = box.take println("Drawing on "+paper) } override def toString = name } class Existe...
grzegorzbalcerek/scala-book-examples
examples/ExistentialDrawingChild4.scala
Scala
mit
517
package stores import java.util.concurrent.atomic.AtomicInteger import javax.inject.Singleton import org.coursera.example.Instructor import org.coursera.example.Partner import org.coursera.naptime.model.Keyed @Singleton class PartnerStore { @volatile var partnerStore = Map.empty[String, Partner] val nextId = n...
vkuo-coursera/naptime
examples/src/main/scala/stores/PartnerStore.scala
Scala
apache-2.0
853
package io.opencensus.scala.doobie import cats.effect.{ContextShift, IO} import io.opencensus.scala.Tracing import io.opencensus.scala.http.testSuite.MockTracing import io.opencensus.trace.{BlankSpan, Status} import org.scalatest.{OptionValues, Outcome} import scala.concurrent.ExecutionContext.global import scala.uti...
census-ecosystem/opencensus-scala
doobie/src/test/scala/io/opencensus/scala/doobie/FTracingSpec.scala
Scala
apache-2.0
2,093
package scalashop import java.util.concurrent.ForkJoinTask import org.scalameter._ import common._ object HorizontalBoxBlurRunner { val standardConfig = config( Key.exec.minWarmupRuns -> 5, Key.exec.maxWarmupRuns -> 10, Key.exec.benchRuns -> 10, Key.verbose -> true ) withWarmer(new Warmer.Defaul...
shouya/thinking-dumps
parprog/scalashop/src/main/scala/scalashop/HorizontalBoxBlur.scala
Scala
mit
2,101
package com.softwaremill.macwire.packages class A
rcirka/macwire
tests2/src/test/scala/com/softwaremill/macwire/packages/A.scala
Scala
apache-2.0
51
package scala.meta package prettyprinters import org.scalameta.adt._ sealed trait Options { def isLazy: Boolean } private[meta] trait LowPriorityOptions { implicit case object Lazy extends Options { def isLazy = true } } object Options extends LowPriorityOptions { implicit case object Eager extends Opti...
Dveim/scalameta
scalameta/common/src/main/scala/scala/meta/prettyprinters/Options.scala
Scala
bsd-3-clause
355
package atto import atto.Atto._ import atto.syntax.refined._ import eu.timepit.refined.string.MatchesRegex import cats.implicits._ import org.scalacheck._ @SuppressWarnings(Array("org.wartremover.warts.NonUnitStatements", "org.wartremover.warts.Any")) object RefinedTest extends Properties("Refined") { import Prop._...
tpolecat/atto
modules/tests/.jvm/src/test/scala-3/atto/RefinedTest.scala
Scala
mit
790
package com.seanshubin.detangler.console object ConsoleApplication extends App { new TopLevelWiring { override def commandLineArguments: Seq[String] = args }.launcher.run() }
SeanShubin/detangler
console/src/main/scala/com/seanshubin/detangler/console/ConsoleApplication.scala
Scala
unlicense
184
import org.scalatestplus.play._ import services.AtomicCounter import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner /** A very simple unit-test example. */ @RunWith(classOf[JUnitRunner]) class AtomicCounterSpec extends PlaySpec { "AtomicCounter" should { "produce increasing values" in { ...
play2-maven-plugin/play2-maven-test-projects
play25/scala/starter-example/test/AtomicCounterSpec.scala
Scala
apache-2.0
486
package diffson package sprayJson import jsonmergepatch._ class SprayJsonTestJsonMergePatch extends TestJsonMergePatch[spray.json.JsValue] with SprayJsonTestProtocol
gnieh/diffson
sprayJson/src/test/scala/diffson/sprayJson/TestJsonMergePatch.scala
Scala
apache-2.0
168
package todomvc import org.scalajs.dom import org.scalajs.dom.{Event, HashChangeEvent, KeyboardEvent} import preact.Preact.VNode import preact.macros.PreactComponent import todomvc.Model.{Filter, Item, ItemId} object TodoMvc { case class Props(initialTodos: Seq[Item], persist: Seq[Item] => Unit) case class Stat...
LMnet/scala-js-preact
examples/todomvc/src/main/scala/todomvc/TodoMvc.scala
Scala
mit
5,253
/* * (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/cogx/compiler/parser/syntaxtree/Operation.scala
Scala
apache-2.0
2,228
package io.scalaland.chimney.examples object foo { import io.scalaland.chimney.dsl._ sealed trait A extends Product with Serializable sealed trait AA extends A case object A1 extends AA object into { sealed trait A extends Product with Serializable sealed trait AA extends A case object A1 exten...
scalalandio/chimney
chimney/src/test/scala/io/scalaland/chimney/examples/Issues.scala
Scala
apache-2.0
387
package io.igu.cityindex.example import io.igu.cityindex.HttpJwsClient import io.igu.cityindex.market.model.MarketSearchRequest import org.scalatest.concurrent.{PatienceConfiguration, ScalaFutures} import org.scalatest.time.{Millis, Seconds, Span} import org.slf4j.LoggerFactory import scala.concurrent.ExecutionContex...
deadcore/city-index-scala-api
src/main/scala/io/igu/cityindex/example/LogonExample.scala
Scala
apache-2.0
1,549
/* * Copyright 2016 Nikolay Smelik * * 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 ...
kerzok/ScalaBot
BotApi/src/main/scala/scalabot/common/chat/UserChat.scala
Scala
apache-2.0
913
/* * 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 ...
Panos-Bletsos/spark-cost-model-optimizer
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
Scala
apache-2.0
38,699
package almhirt import scala.language.implicitConversions import almhirt.common._ import com.ibm.icu.util._ import almhirt.i18n.MeasuredLength /** * Stuff for internationalizations. * * Calculation functions are only to be used for display purposes! */ package object i18n { implicit object ULocaleMagnet extends...
chridou/almhirt
almhirt-i18n/src/main/scala/almhirt/i18n/package.scala
Scala
apache-2.0
4,743
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
goldmedal/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/python/BatchEvalPythonExec.scala
Scala
apache-2.0
3,570
package com.outr.stripe.card import scala.scalajs.js import scala.scalajs.js.| @js.native trait StripeCard extends js.Object { def createToken(info: StripeCardInfo, responseHandler: js.Function2[Int, CardTokenInfo, Unit]): Unit = js.native def validateCardNumber(number: String): Boolean = js.native def validate...
outr/scala-stripe
core/js/src/main/scala/com/outr/stripe/card/StripeCard.scala
Scala
mit
494
package de.endrullis.firefoxstateapi import java.io.File import java.nio.file.Files import de.endrullis.firefoxstateapi.FirefoxState._ import scala.io.Source import scala.util.matching.Regex /** * An API to access the state of the Firefox web browser. * * @author Stefan Endrullis &lt;stefan@endrullis.de&gt; */ ...
xylo/FirefoxStateApi
src/main/scala/de/endrullis/firefoxstateapi/FirefoxStateApi.scala
Scala
apache-2.0
2,380
package testcode class Foo { TestMacro.call() }
dotty-staging/dotty
tests/pos/i13532/Foo.scala
Scala
apache-2.0
49
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
daewon/incubator-s2graph
s2rest_play/app/org/apache/s2graph/rest/play/models/package.scala
Scala
apache-2.0
1,013
/* * 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 ...
bhoppi/zen
ml/src/main/scala/com/github/cloudml/zen/ml/clustering/LDA.scala
Scala
apache-2.0
17,957
package org.jetbrains.plugins.scala.lang.transformation.calls import org.jetbrains.plugins.scala.lang.transformation.TransformerTest /** * @author Pavel Fatin */ class ExpandUnaryCallTest extends TransformerTest(ExpandUnaryCall, """ object O { def unary_! {} def !(p: A) {} } """) { ...
whorbowicz/intellij-scala
test/org/jetbrains/plugins/scala/lang/transformation/calls/ExpandUnaryCallTest.scala
Scala
apache-2.0
670
package org.nkvoll.gpsd.client import com.fasterxml.jackson.databind.ObjectMapper package object commands { sealed trait GPSCommand { def serialize(): Array[Byte] } object GPSCommand { val mapper = new ObjectMapper() val watchPrefix = "?WATCH=".getBytes } case class Watch(enable: Boolean, js...
nkvoll/scala-gpsd
src/main/scala/org/nkvoll/gpsd/client/commands/package.scala
Scala
mit
605
package org.jetbrains.plugins.scala package lang.psi.types import com.intellij.psi.search.LocalSearchScope import com.intellij.psi.search.searches.ClassInheritorsSearch import com.intellij.psi.{PsiClass, PsiTypeParameter} import org.jetbrains.plugins.scala.extensions._ import org.jetbrains.plugins.scala.lang.psi.api.s...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/types/ComparingUtil.scala
Scala
apache-2.0
3,615
package Scalisp class InterpreterException(s: String) extends Exception(s) { } class VariableNotFound(s: String) extends InterpreterException(s) { } class MethodNotFound(s: String) extends InterpreterException(s) { } class InvalidName(s: String) extends InterpreterException(s) { } class TypeError(s: String) extends In...
quantintel/Scalisp
src/main/scala/interpreter.scala
Scala
mit
4,589
package at.vizu.s2n.types.result /** * Phil on 06.11.15. */ trait ReflectImplementation extends Implementation
viZu/nasca
src/main/scala/at/vizu/s2n/types/result/ReflectImplementation.scala
Scala
apache-2.0
113
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
tzulitai/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/runtime/stream/sql/JoinITCase.scala
Scala
apache-2.0
46,186
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
goldmedal/spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/HiveTableScanExec.scala
Scala
apache-2.0
9,354
package com.twitter.finagle.netty4.ssl.server import com.twitter.finagle.{Address, FailureFlags, SslException, SslVerificationFailedException} import com.twitter.finagle.ssl.server.{SslServerConfiguration, SslServerSessionVerifier} import com.twitter.logging.{HasLogLevel, Level} import com.twitter.util.{Promise, Retur...
luciferous/finagle
finagle-netty4/src/main/scala/com/twitter/finagle/netty4/ssl/server/SslServerVerificationHandler.scala
Scala
apache-2.0
3,622
package com.datawizards.dmg.examples import com.datawizards.dmg.examples.TestModel.Person import com.datawizards.dmg.service.AvroSchemaRegistryServiceImpl object CopyAvroSchemaToHDFS extends App { val service = new AvroSchemaRegistryServiceImpl("http://localhost:8081") service.copyAvroSchemaToHdfs[Person]("/metad...
mateuszboryn/data-model-generator
src/main/scala/com/datawizards/dmg/examples/CopyAvroSchemaToHDFS.scala
Scala
apache-2.0
342
/* * 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 ...
bravo-zhang/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/compression/compressionSchemes.scala
Scala
apache-2.0
28,337
package scalapoi import shapeless._ import cats._ import cats.data._ import cats.implicits._ import org.apache.poi.ss.usermodel.{Cell, Row} import org.apache.poi.xssf.usermodel._ // the following code is designed to derive a PoiEncoder instance for flat case classes object instances { implicit val stringEncoder: ...
hamishdickson/scalapoi
src/main/scala/scalapoi/instances.scala
Scala
mit
1,999
/* * 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 ...
wangmiao1981/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcSerializer.scala
Scala
apache-2.0
7,097
package dao import javax.inject.{Inject, Named} import model.{Airport, Country, Runaway} import play.api.cache._ import scala.concurrent.Future class CachingDAO @Inject()( @Named("appDAO") dao: DAO, cache: CacheApi ) extends DAO { ...
MysterionRise/airport-dangerzone
app/dao/CachingDAO.scala
Scala
mit
1,489
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. package ducttape.hyperdag.walker import grizzled.slf4j.Logging /** A generalization of the iterator concept to allow para...
jhclark/ducttape
src/main/scala/ducttape/hyperdag/walker/Walker.scala
Scala
mpl-2.0
3,881
package com.datastax.killrweather import scala.concurrent.duration._ import com.datastax.killrweather.GitHubEvents.MonthlyCommits import kafka.producer.{KeyedMessage, Producer} import kafka.serializer.StringDecoder import org.apache.spark.streaming.{Seconds, StreamingContext} import org.apache.spark.{SparkContext, Spa...
GitOutATown/killrweather
killrweather-examples/src/main/scala/com/datastax/killrweather/KafkaStreamingJson2.scala
Scala
apache-2.0
3,058
/* * 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 ...
indhub/mxnet
scala-package/infer/src/main/scala/org/apache/mxnet/infer/Predictor.scala
Scala
apache-2.0
8,514
package cd final class Vector3D(val x: Double, val y: Double, val z: Double) { def plus(other: Vector3D) = new Vector3D(x + other.x, y + other.y, z + other.z) def minus(other: Vector3D) = new Vector3D(x - other.x, y - other.y, z - other.z) def dot(other: Vector3D): Double = x * other.x + y * other....
cedricviaccoz/scala-native
benchmarks/src/main/scala/cd/Vector3D.scala
Scala
bsd-3-clause
550
package org.jetbrains.plugins.scala package lang package psi package stubs package elements import _root_.org.jetbrains.plugins.scala.lang.psi.impl.statements.ScPatternDefinitionImpl import com.intellij.lang.ASTNode import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.lang.psi.api.statements.ScValue ...
LPTK/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/ScValueDefinitionElementType.scala
Scala
apache-2.0
629
package services.crunch import drt.shared.CrunchApi._ import drt.shared.{Forecast, Queues, SDateLike} import org.specs2.mutable.Specification import services.{CSVData, SDate} class ForecastPlanningToCSVDataTest extends Specification { "Forecast Planning export" >> { "Given a ForecastPeriod with 1 day when we e...
UKHomeOffice/drt-scalajs-spa-exploration
server/src/test/scala/services/crunch/ForecastPlanningToCSVDataTest.scala
Scala
apache-2.0
19,132
package muster package codec package json4s import org.json4s.JsonAST._ import scala.util.Try package object api { implicit class JValueProducingObject[T:Producer](p: T) { def asJValue = Json4sCodec.from(p) } implicit class JValueConsumingObject(jv: JValue) { @inline def as[T](implicit consumer: Consu...
json4s/muster
codecs/json4s/src/main/scala/muster/codec/json4s/api/package.scala
Scala
mit
574
import scala.language.implicitConversions class LazyList[A] object LazyList { inline implicit def toDeferred[A](l: LazyList[A]): Deferred[A] = new Deferred(l) final class Deferred[A](l: => LazyList[A]) { def #:: [B >: A](elem: => B): LazyList[B] = ??? } } import LazyList.* final class Test { lazy v...
dotty-staging/dotty
tests/init/pos/lazylist1.scala
Scala
apache-2.0
458
import leon.lang._ import leon.annotation._ import leon.collection._ import leon._ object Trees { abstract class Expr case class Plus(lhs: Expr, rhs: Expr) extends Expr case class Minus(lhs: Expr, rhs: Expr) extends Expr case class LessThan(lhs: Expr, rhs: Expr) extends Expr case class And(lhs: Expr, rhs: Ex...
regb/leon
testcases/synt2016/repair/Compiler/Compiler3.scala
Scala
gpl-3.0
7,024
package org.jetbrains.plugins.scala.testingSupport.specs2.specs2_2_12_4_0_0 import org.jetbrains.plugins.scala.SlowTests import org.jetbrains.plugins.scala.testingSupport.specs2.Specs2PackageTest import org.junit.experimental.categories.Category /** * @author Roman.Shein * @since 06.09.2015. */ @Category(Array(...
triplequote/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/testingSupport/specs2/specs2_2_12_4_0_0/Specs2_2_12_4_0_0_PackageTest.scala
Scala
apache-2.0
431
def map[B](f: A => B): Stream[B] = foldRight(empty[B])((h,t) => cons(f(h), t)) def filter[B](f: A => Boolean): Stream[A] = foldRight(empty[A])((h,t) => if (f(h)) cons(h, t) else t) def append[B>:A](s: Stream[B]): Stream[B] = foldRight(s)((h,t) => cons(h,t)) def flatMap[B](f: A => Stream[B]): Stream...
ShokuninSan/fpinscala
answerkey/laziness/6.answer.scala
Scala
mit
372
/** * 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...
guozhangwang/kafka
core/src/main/scala/kafka/server/BrokerLifecycleManager.scala
Scala
apache-2.0
19,675
/*******************************************************************************/ /* */ /* Copyright (C) 2017 by Max Lv <max.c.lv@gmail.com> */ /* Copyright (C) 2017 by Mygod Studio <contact-shadowsocks-android@mygod....
hangox/shadowsocks-android
mobile/src/main/scala/com/github/shadowsocks/ShadowsocksBackupAgent.scala
Scala
gpl-3.0
2,574
package com.twitter.finagle.memcached.protocol.text import client.DecodingToResponse import client.{Decoder => ClientDecoder} import server.DecodingToCommand import server.{Decoder => ServerDecoder} import com.twitter.io.Charsets.Utf8 import com.twitter.finagle._ import com.twitter.finagle.memcached.protocol._ import ...
yancl/finagle-6.22.0
finagle-memcached/src/main/scala/com/twitter/finagle/memcached/protocol/text/Memcached.scala
Scala
apache-2.0
4,350
package org.zouzias.rx.kafka.pipes import com.cj.kafka.rx.RxConsumer import kafka.serializer.StringDecoder import org.apache.kafka.clients.producer.ProducerRecord import org.zouzias.rx.kafka.utils.StringKafkaProducer import org.zouzias.rx.kafka.utils.RxConsumerImplicits._ /** * A simple pipe from sourceTopic to Tar...
zouzias/kafka-rx-example
src/main/scala/org/zouzias/rx/kafka/pipes/SimplePipe.scala
Scala
apache-2.0
887
package com.github.jeanadrien.evrythng.scala.rest import com.github.jeanadrien.evrythng.scala.json.EvtJsonProtocol._ import com.github.jeanadrien.evrythng.scala.json._ import com.typesafe.scalalogging.LazyLogging /** * */ class ApplicationRestApi(override val apiKey : String) extends Environment with Authoriz...
jeanadrien/evrythng-scala-sdk
src/main/scala/com/github/jeanadrien/evrythng/scala/rest/ApplicationRestApi.scala
Scala
apache-2.0
1,921
/* ************************************************************************************* * 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-core/src/main/scala/com/normation/rudder/services/marshalling/MarshallingUtil.scala
Scala
agpl-3.0
2,153
package org.jetbrains.plugins.scala package lang package parser package parsing package expressions import com.intellij.lang.PsiBuilder import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder import org.jetbrains.plugins.scala.lang.pa...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/lang/parser/parsing/expressions/InfixExpr.scala
Scala
apache-2.0
3,726