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
#!/usr/bin/env scala // Copyright 2017 Marko Dimjašević // // This file is part of jdoop-wrapper. // // jdoop-wrapper is free software: you can redistribute it and/or modify it // under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // Licens...
soarlab/jdoop-wrapper
stats/stats.scala
Scala
agpl-3.0
16,245
/* * Copyright 2011 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 t...
thirstycrow/scrooge
scrooge-generator/src/main/scala/com/twitter/scrooge/frontend/Importer.scala
Scala
apache-2.0
5,783
package co.language.compiler sealed trait WorkflowError case class WorkflowLexerError(location: Location, msg: String) extends WorkflowError case class WorkflowParserError(location: Location, msg: String) extends WorkflowError case class WorkflowRuntimeError(location: Location, msg: String) extends WorkflowError cas...
adityaviswanathan/parser-combinator
src/main/scala/co/language/compiler/WorkflowCompilationError.scala
Scala
mit
408
/* * Copyright (C) 2016 University of Basel, Graphics and Vision Research Group * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) an...
unibas-gravis/scalismo-ui
src/main/scala/scalismo/ui/rendering/actor/SlicingActor.scala
Scala
gpl-3.0
2,394
/* * 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 ...
guoxiaolongzte/spark
core/src/main/scala/org/apache/spark/deploy/security/KafkaTokenUtil.scala
Scala
apache-2.0
8,275
/* * Wire * Copyright (C) 2016 Wire Swiss GmbH * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This progr...
wireapp/wire-android-sync-engine
zmessaging/src/main/scala/com/waz/bitmap/video/MediaCodecHelper.scala
Scala
gpl-3.0
2,977
/* * Copyright (c) 2016, Team Mion * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIM...
teammion/tm-morefood
src/main/scala/io/teammion/morefood/CreativeTabs.scala
Scala
isc
1,475
package models import reactivemongo.bson.BSONObjectID import reactivemongo.bson.Macros.Annotations.Key case class Project( @Key("_id") oid: BSONObjectID, name: String, description: String, quote: String, leaderId: BSONObjectID, team: Seq[BSONObjectID] ) { def id = oid.stringify } object Project { def ...
dohzya/Hackinder
app/models/Project.scala
Scala
agpl-3.0
588
/* * 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 ...
cattoire/sparksamples
streaming-twitter/src/main/scala/com/ibm/cds/spark/samples/StreamingListener.scala
Scala
apache-2.0
2,280
package com.twitter.diffy.lifter import com.google.common.net.{HttpHeaders, MediaType} import com.twitter.io.Charsets import com.twitter.logging.Logger import com.twitter.util.{Try, Future} import org.jboss.netty.handler.codec.http.{HttpResponse, HttpRequest} import scala.collection.JavaConversions._ object HttpLif...
twitter/diffy
src/main/scala/com/twitter/diffy/lifter/HttpLifter.scala
Scala
apache-2.0
4,366
/* * Copyright 2016 Alexey Kuzin <amkuzink@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicab...
leviathan941/choiceroulette
guiapp/src/main/scala/choiceroulette/gui/menubar/AboutStage.scala
Scala
apache-2.0
2,079
/** Copyright 2015 TappingStone, 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 ...
nvoron23/PredictionIO
core/src/main/scala/workflow/CoreWorkflow.scala
Scala
apache-2.0
4,728
/* * 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 available at * http://www.opensource.org/licenses/apache2.0.php. ...
drackaer/geomesa
geomesa-features/geomesa-feature-kryo/src/main/scala/org/locationtech/geomesa/features/kryo/KryoFeatureSerializer.scala
Scala
apache-2.0
13,784
package gitbucket.core.util import gitbucket.core.controller.ControllerBase import gitbucket.core.service.{AccountService, RepositoryService} import gitbucket.core.model.Role import RepositoryService.RepositoryInfo import Implicits._ /** * Allows only oneself and administrators. */ trait OneselfAuthenticator { self...
xuwei-k/gitbucket
src/main/scala/gitbucket/core/util/Authenticator.scala
Scala
apache-2.0
6,411
/* * 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/iht-frontend
app/iht/models/des/ihtReturn/Beneficiary.scala
Scala
apache-2.0
915
package com.eharmony.aloha.reflect import scala.reflect.ManifestFactory import scala.collection.JavaConversions.asScalaBuffer import com.fasterxml.classmate.ResolvedType object ReflectionConversions extends ReflectionConversions trait ReflectionConversions { object Implicits { /** Provides conversions ...
eHarmony/aloha
aloha-core/src/main/scala/com/eharmony/aloha/reflect/ReflectionConversions.scala
Scala
mit
1,985
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/library/scala/collection/parallel/ParMap.scala
Scala
bsd-3-clause
2,360
/* * 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
repl/src/main/scala/org/apache/spark/repl/Main.scala
Scala
apache-2.0
5,009
package mesosphere.marathon package raml object Constraints { def apply(c: StringifiedConstraint*): Set[Seq[String]] = c.map(_.toSeq)(collection.breakOut) sealed trait StringifiedConstraint { def toSeq: Seq[String] } implicit class FieldOperator(fo: (String, String)) extends StringifiedConstraint { ...
guenter/marathon
src/main/scala/mesosphere/marathon/raml/Constraints.scala
Scala
apache-2.0
550
package lean1.abst /** * Created by oot on 2014/11/18. * 抽象类 */ abstract class Shape { def getArea():Int }
HYToop/Scala
Base1/src/lean1/abst/Shape.scala
Scala
unlicense
119
/* * Copyright 2017-2022 John Snow Labs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
JohnSnowLabs/spark-nlp
src/test/scala/com/johnsnowlabs/nlp/annotators/DocumentNormalizerTestSpec.scala
Scala
apache-2.0
1,124
package collins package callbacks import java.beans.PropertyChangeEvent trait CallbackActionHandler { def apply(pce: PropertyChangeEvent) protected def getValue(pce: PropertyChangeEvent): AnyRef = Option(pce.getNewValue).getOrElse(pce.getOldValue) protected def getValueOption(pce: PropertyChangeEvent): Op...
Shopify/collins
app/collins/callbacks/CallbackActionHandler.scala
Scala
apache-2.0
359
package conway import org.scalatest.{FunSpec, Matchers} class RulesSpec extends FunSpec with Matchers { describe("Rules") { describe("apply") { it ("returns true for three live neighbors") { Rules(neighbors = 3, alive = false) shouldBe true } it ("returns true if Cell is alive and has...
mkrogemann/sgol
src/test/scala/conway/RulesSpec.scala
Scala
mit
683
package opencl.generator.stencil import ir._ import ir.ast._ import lift.arithmetic._ import opencl.executor.{Compile, Execute, _} import opencl.ir._ import opencl.ir.pattern.{MapGlb, _} import org.junit.Assert._ import org.junit.Test import rewriting.rules.{FusionRules, Rules} import rewriting.Rewrite import rewritin...
lift-project/lift
src/test/opencl/generator/stencil/GettingStarted.scala
Scala
mit
10,528
package rpgboss.player import scala.concurrent._ import scala.concurrent.duration.Duration import rpgboss.lib.TweenUtils import scala.collection.mutable.ArrayBuffer import rpgboss.lib.ThreadChecked /** Keeps track of a queue of mutation operations on a 'T'. */ class MutateQueue[T](mutatedObject: T) extends ThreadChec...
rpgboss/rpgboss
core/src/main/scala/rpgboss/player/Base.scala
Scala
agpl-3.0
3,087
/* * 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 ...
aljoscha/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamPhysicalPythonGroupWindowAggregate.scala
Scala
apache-2.0
2,818
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
practice-vishnoi/dev-spark-1
mllib/src/main/scala/org/apache/spark/mllib/fpm/LocalPrefixSpan.scala
Scala
apache-2.0
3,627
/* * Copyright 2015 the original author or authors. * @https://github.com/scouter-project/scouter * * 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...
scouter-project/scouter
scouter.server/src/main/scala/scouter/server/tagcnt/first/KeyDataFile.scala
Scala
apache-2.0
6,247
package ca.pgx.rest.service import ca.pgx.rest.service.com.eventhub.rest.service.Boot /** * This is the executable application itself. */ object EventHub extends App { Boot[SimpleRestServiceActor].start() }
pgxcentre/eventhub
rest/src/main/scala/ca/pgx/rest/service/EventHub.scala
Scala
apache-2.0
213
package net.lullabyte import chrome.Manifest import org.scalajs.sbtplugin.ScalaJSPlugin import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._ import sbt.Keys._ import sbt._ object ChromeSbtPlugin extends AutoPlugin { override def requires: Plugins = ScalaJSPlugin object autoImport { val chromePackageCon...
amsayk/scala-js-chrome
sbt-plugin/src/main/scala/net/lullabyte/ChromeSbtPlugin.scala
Scala
mit
1,757
/* * 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 ...
mohammadshahidkhan/incubator-carbondata
integration/spark2/src/main/scala/org/apache/carbondata/spark/CarbonFilters.scala
Scala
apache-2.0
19,149
package spatial.targets import spatial.models._ import spatial.models.altera._ object Plasticine extends AlteraDevice { // TODO: Fix import AlteraDevice._ def name = "Default" val burstSize = 512 // in bits //TODO: No model for plasticine yet protected def makeAreaModel: AreaModel = new StratixVAreaModel ...
stanford-ppl/spatial-lang
spatial/core/src/spatial/targets/Plasticine.scala
Scala
mit
493
/* * Copyright 2017-2022 John Snow Labs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
JohnSnowLabs/spark-nlp
src/main/scala/com/johnsnowlabs/nlp/embeddings/LongformerEmbeddings.scala
Scala
apache-2.0
17,096
/* * Copyright (c) 2016 SnappyData, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
vjr/snappydata
dtests/src/test/scala/io/snappydata/hydra/northwind/NWTestUtil.scala
Scala
apache-2.0
29,815
package org.ai4fm.proofprocess.ui.actions import java.util.Collections.singletonList import scala.collection.JavaConverters._ import org.ai4fm.proofprocess.{Attempt, ProofElem, ProofInfo, ProofParallel, ProofProcessFactory, ProofSeq} import org.ai4fm.proofprocess.core.util.PProcessUtil import org.ai4fm.proofprocess....
andriusvelykis/proofprocess
org.ai4fm.proofprocess.ui/src/org/ai4fm/proofprocess/ui/actions/UngroupStepsHandler.scala
Scala
epl-1.0
4,068
package carldata.sf.compiler /** * Script Abstract Syntax Tree */ object AST { type MathOp = String case class Module(externalFun: Seq[ExternalFun], funDecl: Seq[FunctionDef]) case class ExternalFun(name: String, params: Seq[FunParam], typeName: TypeDecl) case class FunctionDef(name: String, params: Seq[...
carldata/flow-script
src/main/scala/carldata/sf/compiler/AST.scala
Scala
apache-2.0
4,011
package org.scalacheck object SingletonsTestsDefinitions { // Running into SI-7046 for Base if these are put directly into SingletonsTests case object CaseObj case class Empty() sealed trait Base case object BaseObj extends Base case class BaseEmpty() extends Base sealed trait BaseMore case object ...
alexarchambault/scalacheck-shapeless
core/shared/src/test/scala/org/scalacheck/SingletonsTestsDefinitions.scala
Scala
apache-2.0
495
package com.novus.salat.examples import salat._ package object globals { // https://github.com/salat/salat/wiki/TypeHints implicit val ctx = new Context { val name = "When-Necessary-Context" override val typeHintStrategy = StringTypeHintStrategy(when = TypeHintFrequency.Always) } }
noahlz/salat-examples
src/main/scala/com/novus/salat/examples/package.scala
Scala
mit
300
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js API ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-lang.org/ ** ** /____/\\___/...
doron123/scala-js
library/src/main/scala/scala/scalajs/js/package.scala
Scala
bsd-3-clause
6,738
package com.stulsoft.yscdcatalogue.scala.service import java.io.File import java.io.IOException import java.io.IOException import java.nio.file.Files import java.nio.file.Path import java.nio.file.Paths import java.nio.file.attribute.BasicFileAttributes import java.util.Date import java.util.UUID import org.apache.lo...
ysden123/YSCDCatalogue
src/main/scala/com/stulsoft/yscdcatalogue/scala/service/FileTreeWalk.scala
Scala
mit
2,952
package com.twitter.finagle.zipkin import com.twitter.app.GlobalFlag import com.twitter.finagle.zipkin.core.Sampler import java.net.InetSocketAddress object host extends GlobalFlag[InetSocketAddress]( new InetSocketAddress("localhost", 1463), "Host to scribe traces to") object initialSampleRate extends GlobalFla...
koshelev/finagle
finagle-zipkin/src/main/scala/com/twitter/finagle/zipkin/Flags.scala
Scala
apache-2.0
384
package org.rz.fps.week2.assignment.common import java.io.File object common { /** An alias for the `Nothing` type. * Denotes that the type should be filled in. */ type ??? = Nothing /** An alias for the `Any` type. * Denotes that the type should be filled in. */ type *** = Any /** *...
rozasdev/FPS
code/Week2/src/org/rz/fps/week2/assignment/common/common.scala
Scala
apache-2.0
1,182
package sbt import Project._ import Scope.GlobalScope import Def.{ ScopedKey, Setting } import sbt.complete.Parser import std.Transform.DummyTaskMap final case class Extracted(structure: BuildStructure, session: SessionSettings, currentRef: ProjectRef)(implicit val showKey: Show[ScopedKey[_]]) { def rootProject = s...
jasonchaffee/sbt
main/src/main/scala/sbt/Extracted.scala
Scala
bsd-3-clause
5,301
/* * Copyright 2007-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...
lzpfmh/framework-2
web/webkit/src/test/scala/net/liftweb/webapptest/snippet/DeferredSnippet.scala
Scala
apache-2.0
1,283
package prefixes class C { type T def m1: T = ??? object N { type U } def k1: N.U = ??? } object M { type T def n1: T = ??? } object O extends C { def o1: T = ??? } object Test { val c: C = ??? def m2: c.T = ??? def k2: c.N.U = ??? import c.N.* def k3: U = ??? def n2: M.T = ??? ...
dotty-staging/dotty
tests/semanticdb/expect/Prefixes.scala
Scala
apache-2.0
351
/* * 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 ...
aokolnychyi/spark
external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/DockerJDBCIntegrationSuite.scala
Scala
apache-2.0
5,416
/* sbt -- Simple Build Tool * Copyright 2011 Artyom Olshevskiy * * Copyright 2012 Johannes Rudolph * * The settings were imported mostly from 2422df23c601089aa275b1bd04f28defb438d07f * and then adapted to use the new version dependent launcher. * * The main adaptation is to use the correct launcher for the sbt ...
jrudolph/sbt-cross-building
src/main/scala/sbt/SbtScriptedSupport.scala
Scala
bsd-2-clause
3,862
/* * Copyright (c) 2013 Christos KK Loverdos * * 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...
loverdos/thrift3r
src/test/scala/com/ckkloverdos/thrift3r/tests/misc/BeanOptionInt.scala
Scala
apache-2.0
959
/* * @author Philip Stutz * @author Mihaela Verman * * Copyright 2013 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/li...
uzh/triplerush
src/main/scala/com/signalcollect/triplerush/vertices/Forwarding.scala
Scala
apache-2.0
2,197
/** * Copyright 2011-2017 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
timve/gatling
src/sphinx/general/code/GatlingFunSpecExample.scala
Scala
apache-2.0
1,192
/** * Created by Variant on 16/3/20. */ object option_ { //option 中定义的 都必须在一个文件中 //使用了sealed关键字 就有个强制的要求,Option内定义的case class,case object都必须在一个文件内 //用Option的子类进行模式匹配时可以检查所有匹配的选项都是否列在case中 def main(args: Array[String]) { val scores = Map("Alice" -> 22, "Batch" ->23) scores.get("Alsice") match { ...
sparkLiwei/ProgrammingNote
scalaLearning/scalaFunction/option_.scala
Scala
cc0-1.0
544
package com.monsanto.arch.kamon.prometheus.metric import java.io.{ByteArrayInputStream, ByteArrayOutputStream, InputStream, OutputStream} import com.monsanto.arch.kamon.prometheus.proto.Metrics import kamon.util.MilliTimestamp /** Provides support for reading/writing messages using Google’s protocol buffers. * *...
MonsantoCo/kamon-prometheus
library/src/main/scala/com/monsanto/arch/kamon/prometheus/metric/ProtoBufFormat.scala
Scala
bsd-3-clause
4,302
package db import java.util.{Calendar, GregorianCalendar} import anorm.SqlParser._ import anorm._ import models._ import models.frontend.FrontendOrder import play.api.Logger import play.api.Play.current import play.api.db.DB import services.{GlobalConfig, StringService} import scala.util.control.Breaks._ object Rep...
PanzerKunst/redesigned-cruited.com-frontend
website/app/db/ReportDto.scala
Scala
gpl-3.0
16,420
package org.kokho.scheduling.rts.multicritical import org.kokho.scheduling.newmodel.{JobSequence, JobSequenceWithER} import org.kokho.scheduling.{Schedule, Task} /** * Created with IntelliJ IDEA on 6/5/15. * @author: Mikhail Kokho */ /** * A base class for any schedule of multicritical tasks * * @param partiti...
mkokho/dynoslack
old_sources/main/scala/kokho/scheduling/rts/multicritical/MulticriticalSchedule.scala
Scala
apache-2.0
2,248
/* * Copyright 2015 Niklas Grossmann * * 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...
ngrossmann/momo
src/it/scala/net/n12n/momo/couchbase/CouchbaseActorSpec.scala
Scala
apache-2.0
1,416
package vorquel.mod.vderps.proxy class ClientProxy extends IProxy { }
vorquel/VDerps
src/main/scala/vorquel/mod/vderps/proxy/ClientProxy.scala
Scala
apache-2.0
72
/** * Licensed to the Minutemen Group under one or more contributor license * agreements. See the COPYRIGHT 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 complian...
mohiva/silhouette
modules/provider-social/src/test/scala/silhouette/provider/social/state/handler/CsrfStateItemHandlerSpec.scala
Scala
apache-2.0
5,647
package scalapb import com.google.protobuf.ByteString trait AnyMethods { def typeUrl: String def value: ByteString def is[A <: GeneratedMessage with Message[A]](implicit cmp: GeneratedMessageCompanion[A]) = { AnyMethods.typeNameFromTypeUrl(typeUrl) == cmp.scalaDescriptor.fullName } def unpack[A <: Gen...
dotty-staging/ScalaPB
scalapb-runtime/shared/src/main/scala/scalapb/AnyMethods.scala
Scala
apache-2.0
1,304
/* * 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/AC115.scala
Scala
apache-2.0
4,101
package sigmastate import special.sigma.SigmaTestingData import scala.util.{Try, Failure} class JitCostSpecification extends SigmaTestingData { type BinOp = (Int, Int) => Int type JitBinOp = (JitCost, JitCost) => JitCost def testBinary[A](r1: Try[A], r2: Try[A]) = { (r1, r2) match { case (Failure(e...
ScorexFoundation/sigmastate-interpreter
sigmastate/src/test/scala/sigmastate/JitCostSpecification.scala
Scala
mit
1,436
/** * 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 ma...
chirino/activemq-apollo
apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Binding.scala
Scala
apache-2.0
8,393
package uk.gov.gds.ier.session import org.joda.time.DateTime import uk.gov.gds.ier.guice.WithConfig trait SessionTokenValidator { self: WithConfig => implicit class SessionTokenWithValidation(token: SessionToken) { def isValid() = { try { token.latest.isAfter(DateTime.now.minusMinutes(config.se...
alphagov/ier-frontend
app/uk/gov/gds/ier/session/SessionTokenValidator.scala
Scala
mit
420
package play.core.server.netty import play.api.mvc._ import play.api.libs.iteratee._ import play.api._ import org.jboss.netty.handler.codec.http.HttpHeaders.Names._ import org.jboss.netty.buffer.ChannelBuffers import org.jboss.netty.channel._ import org.jboss.netty.handler.codec.http._ import org.jboss.netty.handler....
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/play/src/main/scala/play/core/server/netty/NettyResultStreamer.scala
Scala
mit
9,699
/** * Copyright (C) 2015 DANS - Data Archiving and Networked Services (info@dans.knaw.nl) * * 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...
DANS-KNAW/easy-stage-dataset
lib/src/main/scala/nl.knaw.dans.easy.stage/lib/JSON.scala
Scala
apache-2.0
8,930
package com.lucidchart.piezo.admin.controllers import com.lucidchart.piezo.{TriggerHistoryModel, TriggerMonitoringModel, TriggerMonitoringPriority, WorkerSchedulerFactory} import java.util.Date import org.quartz.Trigger.TriggerState import org.quartz._ import org.quartz.impl.triggers.{CronTriggerImpl, SimpleTriggerImp...
pauldraper/piezo
admin/app/com/lucidchart/piezo/admin/controllers/Triggers.scala
Scala
apache-2.0
13,022
package com.github.ldaniels528.trifecta.modules.etl.io.device import java.util.UUID import com.github.ldaniels528.trifecta.modules.etl.io.Scope import com.github.ldaniels528.trifecta.modules.etl.io.device.StatisticsGeneration.Statistics /** * I/O Statistic Generation * @author lawrence.daniels@gmail.com */ tra...
ldaniels528/trifecta
app-modules/etl/src/main/scala/com/github/ldaniels528/trifecta/modules/etl/io/device/StatisticsGeneration.scala
Scala
apache-2.0
1,530
/* * 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
core/src/main/scala/org/apache/spark/network/BlockDataManager.scala
Scala
apache-2.0
2,522
package dundertext.editor.cmd import dundertext.data.Time import dundertext.editor._ import org.junit.Assert._ import org.junit.Test class NewTextAtVideoTest extends CommandTestBase { @Test def should_create_new_empty_text_at_video_time(): Unit = { // given val editor: Editor = emptyEditor player.cur...
dundertext/dundertext
editor/src/test/scala/dundertext/editor/cmd/NewTextAtVideoTest.scala
Scala
gpl-3.0
1,401
package com.hyenawarrior.OldNorseGrammar.grammar.nouns.stemclasses import com.hyenawarrior.OldNorseGrammar.grammar.enums.Case._ import com.hyenawarrior.OldNorseGrammar.grammar.enums.GNumber._ import com.hyenawarrior.OldNorseGrammar.grammar.enums.{Case, GNumber} import com.hyenawarrior.OldNorseGrammar.grammar.nouns.ste...
HyenaSoftware/IG-Dictionary
OldNorseGrammarEngine/src/main/scala/com/hyenawarrior/OldNorseGrammar/grammar/nouns/stemclasses/WeakStemClassFeminineU.scala
Scala
lgpl-3.0
852
/* * Copyright (c) 2017 Andrzej Jozwik * * 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, publ...
ajozwik/akka-smtp-server
akka-smtp/src/main/scala/pl/jozwik/smtp/server/command/HelloCommand.scala
Scala
mit
1,989
package spire.laws import scala.util.Random import org.scalacheck.Gen import org.scalatest.FunSuite import spire.math.interval._ import spire.math.{Interval, SafeLong, Rational} class ArbTest extends FunSuite { // params with a fixed random seed for def params: Gen.Parameters = { val seed = 0L Gen.Param...
JackSullivan/spire
tests/src/test/scala/spire/laws/ArbTest.scala
Scala
mit
2,513
/* * Copyright 2013 http4s.org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
http4s/http4s
core/shared/src/main/scala/org/http4s/headers/Accept-Ranges.scala
Scala
apache-2.0
2,147
package com.seanshubin.learn.datomic.domain case class SchemaReport(isSuccess: Boolean, appliedPreviously: Seq[SingleUpdateResult], appliedJustNow: Seq[SingleUpdateResult], unableToApply: Seq[SingleUpdateResult]) object SchemaReport { def fromU...
SeanShubin/learn-datomic
domain/src/main/scala/com/seanshubin/learn/datomic/domain/SchemaReport.scala
Scala
unlicense
695
package io.vertx.ext.asyncsql.impl.pool import com.github.mauricio.async.db.Configuration import com.github.mauricio.async.db.postgresql.PostgreSQLConnection import io.netty.channel.EventLoop import io.vertx.core.Vertx import io.vertx.core.logging.Logger import io.vertx.core.logging.LoggerFactory import scala.concurr...
InfoSec812/vertx-mysql-postgresql-service
src/main/scala/io/vertx/ext/asyncsql/impl/pool/PostgresqlAsyncConnectionPool.scala
Scala
apache-2.0
1,081
import edu.uta.diql._ import org.apache.spark._ import org.apache.spark.rdd._ object Test { def main ( args: Array[String] ) { val conf = new SparkConf().setAppName("Test") val sc = new SparkContext(conf) explain(true) var V = sc.textFile(args(0)).flatMap(_.split(",")) var x = V.first() ...
fegaras/DIQL
tests/diablo/spark/Equal.scala
Scala
apache-2.0
448
package dhg.ccg.parse.pcfg import org.junit.Test import org.junit.Assert._ import dhg.ccg.parse._ import dhg.ccg.prob._ import dhg.ccg.cat._ import dhg.ccg.tagdict.SimpleTagDictionary class ProductionInterpolatingProbabilityDistributionTests { @Test def test_ICPDU { throw new NotImplementedError("Test not wr...
dhgarrette/2015-ccg-parsing
src/test/scala/dhg/ccg/parse/pcfg/ProductionInterpolatingProbabilityDistributionTests.scala
Scala
apache-2.0
420
type State[S, +A] = S => (A, S) // may be below case class State[S, +A](run: S => (A, S)) //make Rand a type alias for State: type Rand[A] = State[RNG, A] def map[S, A, B](a: S => (A, S))(f: A => B): S => (B,S) = { state => { val (ax, state2) = a(state) (f(ax), state2) } }
Tomcruseal/FunctionalLearn
fpinscala/src/main/scala/fpinScala/fpState/StateGeneral.scala
Scala
mit
302
package main.scala.model import scala.collection.mutable /** * A simple JSON library * * @author mehmetakiftutuncu */ case class MatSON(pairs: (String, Any)*) { /** * Represents the fields of an object as a sequence of JSONPair */ var fields: mutable.HashSet[JSONPair] = new mutable.HashSet[JSONPair] ...
mehmetakiftutuncu/MatSON
src/main/scala/model/MatSON.scala
Scala
apache-2.0
1,279
/** * Copyright (C) 2014-2015 Really Inc. <http://really.io> */ import sbt._ import Keys._ object FormatSettings { import com.typesafe.sbt.SbtScalariform._ lazy val settings = scalariformSettings ++ Seq( ScalariformKeys.preferences := formattingPreferences ) lazy val formattingPreferences = { impo...
reallylabs/really
project/ScalaFormat.scala
Scala
apache-2.0
1,161
/* * Copyright 2015 Frugal Mechanic (http://frugalmechanic.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
frugalmechanic/fm-http
src/main/scala/fm/http/client/TooManyRedirectsException.scala
Scala
apache-2.0
812
package org.jetbrains.plugins.scala.lang.typeInference.generated import org.jetbrains.plugins.scala.DependencyManagerBase._ import org.jetbrains.plugins.scala.base.libraryLoaders.{IvyManagedLoader, LibraryLoader} import org.jetbrains.plugins.scala.lang.typeInference.TypeInferenceTestBase import org.junit.Ignore /** ...
jastice/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/typeInference/generated/TypeInferenceSprayTest.scala
Scala
apache-2.0
815
package views.acquire import composition.TestHarness import org.scalatest.selenium.WebBrowser.{currentUrl, go} import pages.acquire.TermsAndConditionsPage import uk.gov.dvla.vehicles.presentation.common.testhelpers.{UiSpec, UiTag} class TermsAndConditionsUiSpec extends UiSpec with TestHarness { "go to page" should...
dvla/vehicles-acquire-online
test/views/acquire/TermsAndConditionsUiSpec.scala
Scala
mit
498
package db import com.bryzek.apidoc.api.v0.models.{Membership, Organization, User} import com.bryzek.apidoc.api.v0.models.json._ import com.bryzek.apidoc.common.v0.models.{Audit, ReferenceGuid} import com.bryzek.apidoc.common.v0.models.json._ import lib.Role import anorm._ import javax.inject.{Inject, Named, Singleton...
Seanstoppable/apidoc
api/app/db/MembershipsDao.scala
Scala
mit
6,679
/* * Copyright 2015 Priyesh Patel * * 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...
ItsPriyesh/Litho
src/me/priyesh/litho/Strings.scala
Scala
apache-2.0
1,826
package zzb.db.entites import java.sql.Timestamp import org.squeryl.KeyedEntity /** * Created with IntelliJ IDEA. * User: Simon Xiao * Date: 13-8-20 * Time: 下午4:58 * Copyright baoxian.com 2012~2020 */ ////case class 版本 //case class User(var email: String, var password: String) extends KeyedEntity[Long] { // /...
xiefeifeihu/zzb
zzb-dbaccess/src/test/scala/zzb/db/entites/User.scala
Scala
mit
774
package eu.ace_design.island.stdlib import eu.ace_design.island.map.resources.{WhittakerParser, WhittakerDiagram} /** * a Library containing off-the-shelf Whittaker diagrams */ object WhittakerDiagrams { lazy val caribbean: WhittakerDiagram = WhittakerParser(caribbeanTemplate) lazy val nordic: WhittakerDiagram...
ace-design/island
engine/src/main/scala/eu/ace_design/island/stdlib/WhittakerDiagrams.scala
Scala
lgpl-3.0
2,149
/*********************************************************************** * Copyright (c) 2013-2018 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...
jahhulbert-ccri/geomesa
geomesa-spark/geomesa-spark-jts/src/test/scala/org/locationtech/geomesa/spark/jts/udf/GeometricCastFunctionsTest.scala
Scala
apache-2.0
3,160
package com.scalableminds.webknossos.tracingstore.tracings import com.scalableminds.util.tools.{Fox, FoxImplicits} import com.scalableminds.webknossos.datastore.SkeletonTracing.SkeletonTracing import com.scalableminds.webknossos.datastore.VolumeTracing.VolumeTracing import com.scalableminds.webknossos.datastore.geomet...
scalableminds/webknossos
webknossos-tracingstore/app/com/scalableminds/webknossos/tracingstore/tracings/TracingMigrationService.scala
Scala
agpl-3.0
2,852
/** * 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...
Chasego/kafka
core/src/main/scala/kafka/server/ReplicaFetcherThread.scala
Scala
apache-2.0
18,441
package models.validation sealed trait InputType case class IntType() extends InputType case class BoolType() extends InputType case class EnumType(vals:List[String]) extends InputType //Interface for code generated configurations with a few helpers for the template engine trait IValidator { def features :List[(St...
hblarsen/targetplatform
app/models/validation/IValidator.scala
Scala
mit
1,038
package latis.ops import latis.dm.Function import latis.dm.Number import latis.dm.Real import latis.dm.Tuple import latis.dm.Variable import latis.dm.WrappedFunction import latis.time.Time /** * Integrates the innermost function of a dataset using a trapezoidal Riemann sum. * Start and end points of integral can b...
dlindhol/LaTiS
src/main/scala/latis/ops/Integration.scala
Scala
epl-1.0
1,638
/* * 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 ...
SnappyDataInc/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/SimpleCatalystConf.scala
Scala
apache-2.0
1,769
package abeel.genometools.kmer import atk.util.Tool import atk.compbio.DNAHash import abeel.genometools.Main import java.io.File import java.io.PrintWriter import atk.io.NixWriter import java.time.LocalDateTime import scala.collection.mutable.BitSet import atk.util.BitSetTools object Kmer2AP extends Main { ca...
AbeelLab/genometools
scala/abeel/genometools/kmer/Kmer2AP.scala
Scala
gpl-3.0
2,541
package org.jetbrains.plugins.scala package lang package psi package api package expr import com.intellij.psi.{PsiElement, PsiReference} import org.jetbrains.plugins.scala.lang.psi.types.ScType import org.jetbrains.plugins.scala.lang.psi.types.result.TypeResult /** * @author Alexander Podkhalyuzin * Date: 22.02.2008...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/api/expr/ScSelfInvocation.scala
Scala
apache-2.0
806
package org.scalafmt.rewrite import scala.annotation.tailrec import scala.meta._ import scala.meta.tokens.Token import org.scalafmt.config.ScalafmtConfig import org.scalafmt.internal.{FormatToken, FormatTokens} import org.scalafmt.util.{InfixApp, TreeOps} object RedundantParens extends Rewrite with FormatTokensRewri...
scalameta/scalafmt
scalafmt-core/shared/src/main/scala/org/scalafmt/rewrite/RedundantParens.scala
Scala
apache-2.0
4,494
package org.cloudio.morpheus.mail.morpheus import org.morpheus.Morpheus._ import org.morpheus._ /** * Created by zslajchrt on 24/08/15. */ object App { type MailMorphType = DefaultUserMail with ((RegisteredUserMail with RegisteredUserAdapter with \\?[DefaultFaxByMail]) or (EmployeeUserMail with EmployeeAdapter...
zslajchrt/morpheus-tutor
src/main/scala/org/cloudio/morpheus/mail/morpheus/App.scala
Scala
apache-2.0
2,501
/* * La Trobe University - Distributed Deep Learning System * Copyright 2016 Matthias Langer (t3l@threelights.de) * * 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.apa...
bashimao/ltudl
blaze/src/main/scala/edu/latrobe/blaze/optimizers/Adam.scala
Scala
apache-2.0
10,864
/* * Copyright 2013 Maurício Linhares * * Maurício Linhares 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 ...
dripower/postgresql-async
postgresql-async/src/main/scala/com/github/mauricio/async/db/postgresql/column/PostgreSQLColumnEncoderRegistry.scala
Scala
apache-2.0
7,498
/* Derived from https://github.com/functional-streams-for-scala/fs2/blob/a2a4bfd7cd37790cccecff99d50a6c425af9776f/benchmark/src/main/scala/fs2/benchmark/utils.scala */ /* trampolineEc derived from https://github.com/http4s/blaze/blob/28ddfce96e4630f6f6f1147b2fb1b1283ce25703/core/src/main/scala/org/http4s/blaze/util/Exe...
rossabaker/benchmarks
src/main/scala/BenchmarkUtils.scala
Scala
apache-2.0
4,276
package com.philipborg.mummu.image.io.importers import java.io.InputStream import com.philipborg.mummu.image.Image import com.philipborg.mummu.image.ImageSpecification trait ImageImporter { def apply(inputStream: InputStream, imageSpawner: (ImageSpecification) => Image): Image; }
philipborg/Mummu
src/main/scala/com/philipborg/mummu/image/io/importers/ImageImporter.scala
Scala
agpl-3.0
285