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 monocle.macros import monocle.Iso import monocle.macros.internal.MacrosCompatibility object GenIso { /** generate an [[Iso]] between a case class `S` and its unique field of type `A` */ def apply[S, A]: Iso[S, A] = macro GenIsoImpl.genIso_impl[S, A] } private object GenIsoImpl extends MacrosCompatibilit...
CapeSepias/Monocle
macro/src/main/scala/monocle/macros/GenIso.scala
Scala
mit
1,712
/* * Copyright 2014 IBM Corp. * * 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...
yeghishe/spark-kernel
protocol/src/main/scala/com/ibm/spark/kernel/protocol/v5/content/CommClose.scala
Scala
apache-2.0
1,226
package liang.don.dzimageconverter.io.net import liang.don.dzimageconverter.io.ImageFetcher /** * Fetches an image using .Net(C#) specific API(s) * * @author Don Liang * @Version 0.1, 22/09/2011 */ trait ImageFetcherNet extends ImageFetcher { override def fetchImage(uri: String): AnyRef = { // TODO sy...
dl2k84/DeepZoomImageConverter
src/liang/don/dzimageconverter/io/net/ImageFetcherNet.scala
Scala
mit
565
package pamflet import knockoff._ import PamfletDiscounter.headerText object Outline { private case class Return(nodes: xml.NodeSeq, rest: collection.Seq[Header]) def apply(page: AuthoredPage) = { def anchor(name: String) = <a href={Printer.webify(page) + BlockNames.fragment(name)}>{ name ...
foundweekends/pamflet
library/src/main/scala/outline.scala
Scala
lgpl-3.0
1,448
/** * 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...
akosiaris/kafka
core/src/test/scala/other/kafka/TestLogCleaning.scala
Scala
apache-2.0
13,287
/* * Copyright 2013 - 2020 Outworkers Ltd. * * 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...
outworkers/phantom
phantom-dsl/src/test/scala/com/outworkers/phantom/builder/serializers/UpdateQuerySerializationTest.scala
Scala
apache-2.0
7,480
/* * Copyright (c) 2014, Cloudera, Inc. All Rights Reserved. * * Cloudera, Inc. 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/LICE...
srowen/oryx
framework/oryx-api/src/main/scala/com/cloudera/oryx/api/speed/ScalaSpeedModelManager.scala
Scala
apache-2.0
1,758
/* * Copyright 2014-2022 Netflix, 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...
Netflix/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/stacklang/FormatSuite.scala
Scala
apache-2.0
980
package com.zkay import java.util.Date /* * Immutable account model (pg 17, listing 1.5) */ object Listing1_5 { type Amount = BigDecimal case class Balance(amount: Amount = 0) class Account(val no: String, val name: String, val dateOfOpening: Date, val balanc...
zkay/bookclub_notes
FunctionalAndReactiveDomainModeling/chapter1/src/main/scala/Listing1_5.scala
Scala
apache-2.0
654
/* * 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 ...
Aegeaner/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/TimestampFormatter.scala
Scala
apache-2.0
3,925
/*********************************************************************** * 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-features/geomesa-feature-kryo/src/main/scala/org/locationtech/geomesa/features/kryo/KryoBufferSimpleFeature.scala
Scala
apache-2.0
10,525
package controllers.admin import play.api._ import play.api.mvc._ trait Secured { private def name(request: RequestHeader) = request.session.get("user") private def onUnauthorized(request: RequestHeader) = Results.Redirect(controllers.admin.routes.Auth.login) def IsAuthenticated(f: => String => Request[AnyCo...
KeizoBookman/TOST
app/controllers/admin/Secured.scala
Scala
mit
440
/* * This file is part of pelam-scala-csv * * Copyright © Peter Lamberg 2015 (pelam-scala-csv@pelam.fi) * * 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/...
pelamfi/pelam-scala-csv
src/main/scala/fi/pelam/csv/cell/StringCell.scala
Scala
apache-2.0
2,168
package pages import API._ import API.Models._ import org.scalajs.dom import org.scalajs.dom._ import scala.concurrent._ import ExecutionContext.Implicits.global import scala.scalajs.js.JSON import scala.scalajs.js.annotation.JSExportTopLevel import scala.util._ class Login {} object Login { @JSExportTopLevel("log...
MathieuUrstein/HEIG.SCALA.Projet
client/src/main/scala/pages/Login.scala
Scala
apache-2.0
1,835
package java.lang import scalanative.native._ final class Double(override val doubleValue: scala.Double) extends Number with Comparable[Double] { @inline def this(s: String) = this(Double.parseDouble(s)) @inline override def byteValue(): scala.Byte = doubleValue.toByte @inline override def sho...
cedricviaccoz/scala-native
javalib/src/main/scala/java/lang/Double.scala
Scala
bsd-3-clause
6,125
package spire.random package rng import spire.util.Pack import java.nio.ByteBuffer final class Lcg64(_seed: Long) extends LongBasedGenerator { private var seed: Long = _seed def copyInit: Lcg64 = new Lcg64(seed) def getSeed: Long = seed def setSeed(n: Long): Unit = seed = n def getSeedBytes: Array[Byte]...
woparry/spire
core/src/main/scala/spire/random/rng/Lcg64.scala
Scala
mit
919
import sbt._ import Keys._ object TestProject extends Build { lazy val root = Project("root", file(".")) settings( ivyPaths <<= (baseDirectory, target)( (dir, t) => new IvyPaths(dir, Some(t / "ivy-cache"))), libraryDependencies <++= baseDirectory (libraryDeps), TaskKey[Unit]("check-forced") <<= check("1.2.14"),...
twitter-forks/sbt
sbt/src/sbt-test/dependency-management/force/project/TestProject.scala
Scala
bsd-3-clause
870
package aia.cluster package words import java.net.URLEncoder import akka.actor._ import akka.actor.Terminated object JobReceptionist { def props = Props(new JobReceptionist) def name = "receptionist" case class JobRequest(name: String, text: List[String]) sealed trait Response case class JobSuccess(name...
RayRoestenburg/akka-in-action
chapter-cluster/src/main/scala/aia/cluster/words/JobReceptionist.scala
Scala
mit
2,518
package edu.uw.at.iroberts.wirefugue.protocol.overlay /** * Created by Ian Robertson <iroberts@uw.edu> on 5/6/17. */ trait Overlay object OverlayDemo extends App { import javax.xml.bind.DatatypeConverter import akka.util.ByteString // val packet0: ByteString = ByteString.fromInts(Array.fill(28)(scala.util....
robertson-tech/wirefugue
sensor/src/main/scala/edu/uw/at/iroberts/wirefugue/protocol/overlay/Overlay.scala
Scala
gpl-3.0
968
/** * Created by zhouqihua on 2017/7/8. */ // TODO: Remove a flow from flowArrays when it is completed. // TODO: Update flow size after determining whether compress or not import scala.util.control.Breaks.{break, breakable} object AlgorithmSimulator { def main(args: Array[String]): Unit = { val ingress1: ...
kimihe/Swallow
swallow-sim/flow/src/main/scala/AlgorithmSimulator.scala
Scala
apache-2.0
9,750
import scala.concurrent.ExecutionContext.Implicits.global object Main { def main(args: Array[String]): Unit = { println("Main Application") println("Feed a sentence to wit.ai:") val sentence = System.console().readLine() println("Making request to wit.ai ...") val req = WS.client.url(Constants....
pamu/wit.ai
src/main/scala/Main.scala
Scala
apache-2.0
774
package domains.model.material import java.io.File import scala.collection.mutable.ListBuffer object MaterialRepository { /** * 対象ディレクトリのMaterialを返す * * @param path 捜査対象のディレクトリ * @return Materialリスト */ def retrieve(path: File): List[Material] = { var buffer = ListBuffer[Material]() val file...
kobtea/home-theatre
app/domains/model/material/MaterialRepository.scala
Scala
lgpl-2.1
976
object SameNameGeneric { def foo[T, F](x: T, y: F) = { /*start*/foo(x, y, 34)/*end*/ } def foo[T, F, Z](x: T, y: F, z: Z) = { (x, y, z) } } //(T, F, Int)
ilinum/intellij-scala
testdata/typeInference/localTypeInference/SameNameGeneric.scala
Scala
apache-2.0
170
/* * 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 ...
shuangshuangwang/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveHints.scala
Scala
apache-2.0
12,742
/* * 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 ...
tillrohrmann/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/batch/table/JoinTest.scala
Scala
apache-2.0
7,043
/* * 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
mllib-local/src/main/scala/org/apache/spark/ml/linalg/BLAS.scala
Scala
apache-2.0
22,322
//: ---------------------------------------------------------------------------- //: Copyright (C) 2016 Verizon. 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 Licen...
oncue/mesos-scheduler
core/src/test/scala/testimpl.scala
Scala
apache-2.0
4,318
package org.alitouka.spark.dbscan.spatial import org.alitouka.spark.dbscan._ private [dbscan] class BoxIdGenerator (val initialId: BoxId) { var nextId = initialId def getNextId (): BoxId = { nextId += 1 nextId } }
isaacboucinha/CardioStream
web-app/src/main/scala/org/alitouka/spark/dbscan/spatial/BoxIdGenerator.scala
Scala
apache-2.0
231
package models import akka.actor.Actor import play.api.libs.iteratee.Concurrent import play.api.libs.json.JsValue import play.api.libs.iteratee.Iteratee import play.api.libs.json.Reads import play.api.libs.json.JsPath import controllers.MissedCallData import play.api.libs.functional.syntax._ import play.api.libs.concu...
pamu/FooService
FooService0/app/models/CallEventsActor.scala
Scala
apache-2.0
1,633
/* * 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 ...
jasonpet/openwhisk
common/scala/src/main/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBArtifactStoreProvider.scala
Scala
apache-2.0
5,244
package pimpathon.scalaz import scala.collection.generic.{Growable, Shrinkable} import scala.util.{Failure, Success, Try} import scalaz.{-\\/, \\/, \\/-} object either { implicit class DisjunctionFrills[L, R](val self: L \\/ R) extends AnyVal { def addTo(ls: Growable[L], rs: Growable[R]): L \\/ R = tap(ls += _...
stacycurl/pimpathon
src/main/scala/pimpathon/scalaz/either.scala
Scala
apache-2.0
1,211
package org.scalarules.dsl.nl.grammar.meta import scala.annotation.compileTimeOnly import scala.meta._ //scalastyle:off /** * Generates a companion object for the annotated subclass of LijstBerekening and makes it implement BerekeningReference. */ @compileTimeOnly("@MacroElementBerekening not expanded") class Be...
scala-rules/rule-engine
engine/src/main/scala/org/scalarules/dsl/nl/grammar/meta/BerekeningReferentie.scala
Scala
mit
2,779
package nexus.diff import scala.language.higherKinds /** * Object holding some information associated with a symbolic expression. * @tparam F Box type * @tparam G Higher-kinded type that defines the type of information stored for a specific type of expression * @note Isomorphic to `(F[A], G[A]) forSome { type A }...
ctongfei/nexus
diff/src/main/scala/nexus/diff/BoxValuePair.scala
Scala
mit
818
/* * Copyright 2008-present MongoDB, 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 ag...
rozza/mongo-java-driver
driver-scala/src/main/scala/org/mongodb/scala/gridfs/package.scala
Scala
apache-2.0
1,311
package hayago.game import cats._ sealed trait Player object Player { def opposition (player: Player) = player match { case Montague => Capulet case Capulet => Montague } object Montague extends Player { override def toString = "MONTAGUE" } object Capulet extends Player { override def toString = "CAPU...
sungiant/hayago
src/main/scala/game/Player.scala
Scala
mit
424
package io.buoyant.namerd import com.twitter.finagle.stats.StatsReceiver import com.twitter.finagle.{Path, Namer, NullServer} import com.twitter.finagle.naming.NameInterpreter import java.net.InetSocketAddress class TestInterpreterInterfaceConfig extends InterpreterInterfaceConfig { val defaultAddr: InetSocketAddre...
denverwilliams/linkerd
namerd/core/src/test/scala/io/buoyant/namerd/TestNamerInterface.scala
Scala
apache-2.0
941
/* * Copyright (c) 2014 Oculus Info Inc. * http://www.oculusinfo.com/ * * Released under the MIT License. * * 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, includ...
unchartedsoftware/aperture-tiles
tile-generation/src/test/scala/com/oculusinfo/tilegen/util/ExtendedNumericsTestSuite.scala
Scala
mit
2,652
/* * 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 ...
jackylk/incubator-carbondata
integration/spark/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonAlterTableRenameCommand.scala
Scala
apache-2.0
9,185
/*********************************************************************** * Copyright (c) 2013-2022 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
locationtech/geomesa
geomesa-hbase/geomesa-hbase-tools/src/main/scala/org/locationtech/geomesa/hbase/tools/data/HBaseCreateSchemaCommand.scala
Scala
apache-2.0
2,476
// - Project: smacrotools (https://github.com/jokade/smacrotools) // Description: Macro annotation to create JS "options objects" from case class definitions. // // Distributed under the MIT License (see included file LICENSE) package de.surfice.smacrotools import scala.annotation.{compileTimeOnly, StaticAnnotation}...
jokade/smacrotools
js/src/main/scala/de/surfice/smacrotools/JSOptionsObject.scala
Scala
mit
5,248
package reactivemongo.api.collections import scala.concurrent.{ ExecutionContext, Future } import reactivemongo.core.errors.GenericDriverException /** Internal bulk operations */ private[reactivemongo] object BulkOps { /** * Applies the given function `f` on all the bulks, * and collects the results, in an ...
ReactiveMongo/ReactiveMongo
driver/src/main/scala/api/collections/BulkOps.scala
Scala
apache-2.0
4,883
package scala.slick.jdbc.meta import java.sql._ import scala.slick.jdbc.ResultSetInvoker import scala.slick.lifted.TypeMapperDelegate /** * A wrapper for a row in the ResultSet returned by DatabaseMetaData.getProcedureColumns(). */ case class MProcedureColumn( procedure: MQName, column: String, columnType: Short,...
zefonseca/slick-1.0.0-scala.2.11.1
src/main/scala/scala/slick/jdbc/meta/MProcedureColumn.scala
Scala
bsd-2-clause
1,366
/******************************************************************************* Copyright (c) 2013-2014, KAIST. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. ******************************************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/widl/DBToWIDL.scala
Scala
bsd-3-clause
14,553
package org.jetbrains.plugins.dotty.lang.parser.parsing.top.template import org.jetbrains.plugins.dotty.lang.parser.parsing.types.SelfType /** * @author adkozlov */ object TemplateBody extends org.jetbrains.plugins.scala.lang.parser.parsing.top.template.TemplateBody { override protected val templateStat = Templ...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/dotty/lang/parser/parsing/top/template/TemplateBody.scala
Scala
apache-2.0
375
/* * ============= Ryft-Customized BSD License ============ * Copyright (c) 2015, Ryft Systems, Inc. * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must...
getryft/spark-ryft-connector
spark-ryft-connector/src/main/scala/com/ryft/spark/connector/domain/ServiceHealth.scala
Scala
bsd-3-clause
2,716
package recipestore.db.tinkerpop import com.datastax.driver.dse.DseSession import com.datastax.driver.dse.graph.GraphResultSet import org.apache.spark.sql.DataFrame import org.slf4j.{Logger, LoggerFactory} import recipestore.db.tinkerpop.models.DSEGraphVertex import recipestore.graph.SparkFactory object RecipeToUserG...
prad-a-RuntimeException/semantic-store
src/main/scala/recipestore/db/tinkerpop/RecipeToUserGraph.scala
Scala
mit
3,809
// Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). // Licensed under the Apache License, Version 2.0 (see LICENSE). object BadScala { some syntax error }
wisechengyi/intellij-pants-plugin
testData/testprojects/intellij-integration/src/java/org/pantsbuild/testproject/excludes2/scala/BadScala.scala
Scala
apache-2.0
173
class Graphe(val head: Array[Int], var succ: Array[Int], val dist: Array[Int], val prospectus: Array[Int], var size: Int) { def this(head: Array[Int], succ: Array[Int], dist: Array[Int], prospectus: Array[Int]){ this(head, succ, dist, prospectus, head.length -1 ) } var D = Array.fill[Array[Int]](head.length...
radioGiorgio/TGOC
src/Graphe.scala
Scala
gpl-3.0
3,215
/* * 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.regex
core/shared/src/test/scala/kantan/regex/BigIntDecoderTests.scala
Scala
apache-2.0
876
package org.eknet.spray.openid.model import spray.http.Uri case class CheckIdRequest(ns: String = namespaceOpenId2, mode: String, claimedId: String, identity: String, assocHandle: Option[String], ...
eikek/spray-openid
src/main/scala/org/eknet/spray/openid/model/CheckIdRequest.scala
Scala
apache-2.0
2,905
package controller import org.joda.time._ import model._ import skinny.engine.context.SkinnyEngineContext import skinny.engine.async.AsyncOperations import scala.concurrent._ import scala.concurrent.duration._ import scala.concurrent.ExecutionContext.Implicits.global import javax.servlet.http.HttpServletRequest cas...
holycattle/skinny-framework
example/src/main/scala/controller/DashboardController.scala
Scala
mit
2,937
package demo import com.raquo.laminar.api.L._ /* * Copyright (C) 19/08/16 // mathieu.leclaire@openmole.org * * This program 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...
openmole/scaladget
bootstrapDemo/src/main/scala/demo/Demo.scala
Scala
agpl-3.0
1,030
package com.twitter.rowz package unit import org.specs.mock.{ClassMocker, JMocker} import com.twitter.util.Time import com.twitter.conversions.time._ import com.twitter.gizzard.shards.{ShardInfo, ShardId, Busy} import RowzShard.CursorStart object SqlShardSpec extends ConfiguredSpecification with JMocker with ClassMo...
twitter/Rowz
src/test/scala/com/twitter/rowz/unit/SqlShardSpec.scala
Scala
apache-2.0
2,300
/* * 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 ...
bwsw/sj-platform
core/sj-crud-rest/src/test/scala-2.12/com/bwsw/sj/crud/rest/instance/InstanceDomainRenewerTestSuit.scala
Scala
apache-2.0
5,323
package com.imaginea.activegrid.core.models /** * Created by nagulmeeras on 14/10/16. */ sealed trait APMProvider { def provider: String override def toString: String = provider } case object GRAPHITE extends APMProvider { val provider = "GRAPHITE" } case object NEWRELIC extends APMProvider...
eklavya/activeGrid
src/main/scala/com/imaginea/activegrid/core/models/APMProvider.scala
Scala
apache-2.0
670
package codesniffer.codefunnel.utils import codesniffer.java8.Java8Parser import org.antlr.v4.runtime.{CharStream, Token, TokenSource} /** * Created by Bowen Cai on 2/23/2016. */ case class SToken(index: Int, tp: Int, line: Int, column: Int, channel: Int, startIdx: Int, stopIdx: Int, text: String) exten...
xkommando/CodeSniffer
codefunnel/src/main/scala/codesniffer/codefunnel/utils/SToken.scala
Scala
lgpl-3.0
902
/* * ____ ____ _____ ____ ___ ____ * | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R) * | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data * | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In...
precog/platform
quirrel/src/main/scala/com/precog/quirrel/typer/ProvenanceChecker.scala
Scala
agpl-3.0
55,725
/** * 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
gatling-commons/src/main/scala/io/gatling/commons/util/FastStringWriter.scala
Scala
apache-2.0
1,933
package gui import scalafx.beans.property.DoubleProperty import scalafx.scene.control.ProgressBar import scalafx.scene.layout.StackPane import scalafx.scene.text.Text /** * Created by alex on 16/05/15. */ class ProgressTextBar(val defaultLabelPadding: Int = 5) extends StackPane { val _progress = new DoubleProper...
unclealex72/ripper
src/main/scala/gui/ProgressTextBar.scala
Scala
mit
975
package org.axonframework.scynapse.serialization.xml import com.thoughtworks.xstream.converters.{UnmarshallingContext, MarshallingContext, Converter} import com.thoughtworks.xstream.io.{HierarchicalStreamReader, HierarchicalStreamWriter} /** * XStream converter for Scala Enumerations. */ class EnumConverter exte...
AxonFramework/Scynapse
scynapse-core/src/main/scala/org/axonframework/scynapse/serialization/xml/EnumConverter.scala
Scala
apache-2.0
1,031
/* * File Name : Sudoku.scala * Created By : Niral Bhalodia * * Sudoku checker and solver. Use the apply method to read in Sudoku puzzle and * solve. Use isCorrect methods to check solution of a completed sudoku puzzle. * * The format of Sudoku text files is 9 lines where each line represents a row * of th...
MrBhalodia/SudokuSolver
Sudoku.scala
Scala
mit
4,847
package com.socrata.balboa.admin.tools import java.io.IOException import com.socrata.balboa.metrics.data.DataStoreFactory import scala.collection.JavaConverters._ /** * List all the entity keys */ class Lister(dataStoreFactory: DataStoreFactory) { def listJava(filters: java.util.Iterator[String]): Unit = list...
socrata-platform/balboa
balboa-admin/src/main/scala/com/socrata/balboa/admin/tools/Lister.scala
Scala
apache-2.0
691
/* * Copyright (C) 2016 Typesafe Inc. <http://www.typesafe.com> */ package akka.persistence.cassandra import java.io.File import scala.concurrent.duration._ import akka.actor.ActorSystem import akka.actor.Props import akka.persistence.PersistentActor import akka.persistence.cassandra.testkit.CassandraLauncher import...
kpbochenek/akka-persistence-cassandra
src/test/scala/akka/persistence/cassandra/CassandraLifecycle.scala
Scala
apache-2.0
2,549
package com.transgee.ebook.pdf.drawing import scala.io.Source import org.scalatest._ import com.transgee.ebook.pdf.OpLog class DrawingMatcherSpec extends FlatSpec with Matchers { private def assertMatch(opLogPath: String, start: Int, end: Int) = { val opLog = OpLog(Source.fromFile(opLogPath).mkString) val...
zenkiezhu/scala-ebook-clipper
src/test/scala/com/transgee/ebook/pdf/drawing/DrawingMatcherSpec.scala
Scala
apache-2.0
1,025
/* * Copyright (C) 2005 - 2019 Schlichtherle IT Services. * All rights reserved. Use is subject to license terms. */ package global.namespace.truelicense.tests.v2.json import global.namespace.truelicense.tests.swing.LicenseManagementWizardITLike import org.scalatest.wordspec.AnyWordSpec class V2JsonLicenseManageme...
christian-schlichtherle/truelicense
tests/src/test/scala/global/namespace/truelicense/tests/v2/json/V2JsonLicenseManagementWizardIT.scala
Scala
apache-2.0
419
package co.rc.sessionmanager /** * Trait that represents the data to save in the session */ trait SessionData /** * Object that represents an empty data */ case object EmptyData extends SessionData
rodricifuentes1/session-manager
src/main/scala/co/rc/sessionmanager/SessionData.scala
Scala
mit
204
package uk.co.turingatemyhamster.consbol import scala.language.higherKinds trait Normalize[A[_], B[_], T] { def apply(a: A[T]): B[T] } object Normalize extends NormalizeLowPriority { implicit class NormalizeOps[A[_], T](_a: A[T]) { def normalize[B[_]](implicit n: Normalize[A, B, T]): B[T] = n(_a) }...
drdozer/consbol
consbol/core/shared/src/main/scala/uk/co/turingatemyhamster/consbol/Normalize.scala
Scala
apache-2.0
2,429
package org.broadinstitute.dsde.firecloud.service import akka.http.scaladsl.model.headers.OAuth2BearerToken import akka.testkit.TestActorRef import org.broadinstitute.dsde.firecloud.{Application, FireCloudConfig} import org.broadinstitute.dsde.firecloud.dataaccess.{MockImportServiceDAO, MockResearchPurposeSupport, Moc...
broadinstitute/firecloud-orchestration
src/test/scala/org/broadinstitute/dsde/firecloud/service/UserServiceSpec.scala
Scala
bsd-3-clause
3,692
package app.components.mui import app.ClientUtils.mergeJSObjects import japgolly.scalajs.react import japgolly.scalajs.react.vdom.html_<^._ import japgolly.scalajs.react.{Callback, Children, ReactEventFromInput} import scala.scalajs.js object TextField { val component = react.JsComponent[js.Object, Children.Vararg...
Igorocky/lesn
client/src/main/scala/app/components/mui/TextField.scala
Scala
mit
895
package sbt package inc import scala.annotation.tailrec import xsbti.compile.DependencyChanges import xsbti.api.{ Compilation, Source } import java.io.File private[inc] abstract class IncrementalCommon(log: Logger, options: IncOptions) { private def incDebug(options: IncOptions): Boolean = options.relationsDebug |...
som-snytt/xsbt
compile/inc/src/main/scala/sbt/inc/IncrementalCommon.scala
Scala
bsd-3-clause
16,520
/*********************************************************************** * Copyright (c) 2013-2017 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...
ronq/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/iterators/DeduplicatingSimpleFeatureIteratorTest.scala
Scala
apache-2.0
1,967
/* NSC -- new Scala compiler * Copyright 2005-2012 LAMP/EPFL * @author Paul Phillips */ package dotty.tools package io import java.io.{ InputStream, OutputStream, DataOutputStream } import java.util.jar._ import scala.collection.JavaConverters._ import scala.collection.mutable import Attributes.Name import scala...
som-snytt/dotty
compiler/src/dotty/tools/io/Jar.scala
Scala
apache-2.0
5,964
package uk.gov.gds.ier.validation import play.api.data.Forms._ import uk.gov.gds.ier.model._ import uk.gov.gds.ier.validation import uk.gov.gds.ier.validation.DateValidator._ import uk.gov.gds.ier.serialiser.WithSerialiser import play.api.data.Form import uk.gov.gds.ier.transaction.ordinary.nationality.NationalityForm...
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/validation/OrdinaryMappings.scala
Scala
mit
1,473
import org.scalatestplus.play._ import play.api.test._ import play.api.test.Helpers._ import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner /** * Add your spec here. * You can mock out a whole application including requests, plugins etc. * For more information, consult the wiki. */ @RunWith(class...
play2-maven-plugin/play2-maven-test-projects
play25/scala/starter-example/test/ApplicationSpec.scala
Scala
apache-2.0
1,148
package org.example.rest /** * Created by kailianghe on 1/20/15. */ import akka.actor.Actor import akka.event.Logging import spray.client.pipelining._ import spray.http.HttpRequest import spray.routing.RequestContext import scala.concurrent.Future import scala.util.{Failure, Success} object ElevationService { ca...
hekailiang/akka-play
actor-samples/src/main/scala/org/example/rest/ElevationService.scala
Scala
apache-2.0
1,961
package som import java.util.Arrays import java.util.Comparator import scala.Predef.intWrapper import scala.{Int, Unit, Boolean, AnyRef, Array} class Vector[E <: AnyRef](initialSize: Int) { def this() = this(50) var storage: Array[AnyRef] = new Array[AnyRef](initialSize) var firstIdx: Int = 0 var la...
sjrd/scalajs-benchmarks
common/shared/src/main/scala/som/Vector.scala
Scala
bsd-3-clause
2,583
package nasa.nccs.cds2.engine import java.io.{IOException, PrintWriter, StringWriter} import nasa.nccs.cdapi.cdm._ import nasa.nccs.cds2.loaders.Collections import nasa.nccs.esgf.process._ import org.slf4j.{Logger, LoggerFactory} import scala.concurrent.ExecutionContext.Implicits.global import nasa.nccs.utilities.cds...
nasa-nccs-cds/CDS2
src/main/scala/nasa/nccs/cds2/engine/manager.scala
Scala
gpl-2.0
33,820
package com.tvunetworks.scala.spark import org.apache.hadoop.fs.FileSystem import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.Path import com.tvunetworks.scala.xml.XmlAnalysis import com.tvunetworks.scala.model.ServerLog import org.apache.spark.SparkContext import org.apache.spark.SparkConf import...
richard-yao/ScalaTest
ScalaTest/src/main/scala/com/tvunetworks/scala/spark/LogAnalysisApp.scala
Scala
apache-2.0
3,709
/* * 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/hvd/cash_payment_over_ten_thousand_eurosSpec.scala
Scala
apache-2.0
2,646
package de.tu_berlin.formic.gatling.protocol import java.net.URL import akka.actor.ActorSystem import com.typesafe.config.ConfigFactory import de.tu_berlin.formic.common.ClientId import de.tu_berlin.formic.gatling.FormicGatlingComponents import io.gatling.core.CoreComponents import io.gatling.core.config.GatlingConfi...
rbraeunlich/formic
formic-gatling/src/main/scala/de/tu_berlin/formic/gatling/protocol/FormicGatlingProtocol.scala
Scala
apache-2.0
1,614
package bintray import bintry.{ BooleanAttr, Client, Licenses, VersionAttr } import dispatch.as import java.io.File import sbt.{ Credentials, Global, Path, Resolver, Setting, Task } import sbt.Def.{ Initialize, setting, task } import sbt.Keys._ import sbt.Path.richFile import scala.concurrent.ExecutionContext.Implicit...
2m/bintray-sbt
src/main/scala/Plugin.scala
Scala
mit
17,661
import sbt.{ExclusionRule, _} object Dependencies { import Dependency._ val pluginInterface = Seq( /* Marathon plugin-interface doesn't directly use these, but we want to expose them as transitive dependencies so * that plugins can use it */ akkaActor % "compile", akkaStream % "compile", akka...
gsantovena/marathon
project/Dependencies.scala
Scala
apache-2.0
9,802
package org.jetbrains.plugins.scala package lang package parser package parsing package expressions import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder /** * @author Alexander Podkhalyuzin * Date: 15.02.2008 */ /* Literal ::= ['...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/parser/parsing/expressions/Literal.scala
Scala
apache-2.0
2,544
package templemore.onx.version2 import org.scalatest.matchers.MustMatchers import org.scalatest. {FeatureSpec, GivenWhenThen} /** * @author Chris Turner */ class PositionSpec extends FeatureSpec with GivenWhenThen with MustMatchers { feature("A position") { scenario("knows its row and column") { given...
skipoleschris/OandX
src/test/scala/templemore/onx/version2/PositionSpec.scala
Scala
apache-2.0
1,098
/* * 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 package reflect ...
martijnhoekstra/scala
src/reflect/scala/reflect/internal/Mode.scala
Scala
apache-2.0
5,525
package com.twitter.finagle.util import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.junit.runner.RunWith @RunWith(classOf[JUnitRunner]) class AsyncLatchTest extends FunSuite { test("when count=0, AsyncLatch should execute waiters immediately") { val latch = new AsyncLatch(0) var...
latur19318/finagle
finagle-core/src/test/scala/com/twitter/finagle/util/AsyncLatchTest.scala
Scala
apache-2.0
1,406
/* * Copyright 2014 Treode, 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...
Treode/store
twitter/src/com/treode/twitter/server/handler/package.scala
Scala
apache-2.0
1,578
package hex.format //Ok with the enum question //Might be kept for hex, why not // http://en.wikipedia.org/wiki/Numeric_Annotation_Glyphs sealed abstract class Nag( val code: Int, val symbol: String) object Nag { case object Good extends Nag(1, "!") case object Mistake extends Nag(2, "?") case object Brilli...
ThomasCabaret/scalahex
src/main/scala/format/Nag.scala
Scala
mit
665
package ru.maizy.cheesecake.core.utils /** * Copyright (c) Nikita Kovaliov, maizy.ru, 2016 * See LICENSE.txt for details. */ import scala.annotation.tailrec import scala.collection.immutable.Queue object LimitedQueue { implicit class LimitedQueueImpl[T](queue: Queue[T]) { def enqueueWithLimit[E >: T](elem...
maizy/cheesecake
core/src/main/scala/ru/maizy/cheesecake/core/utils/LimitedQueue.scala
Scala
apache-2.0
694
/** * 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...
KevinLiLu/kafka
core/src/test/scala/unit/kafka/log/LogValidatorTest.scala
Scala
apache-2.0
55,261
/* * SPDX-License-Identifier: Apache-2.0 * Copyright 2016-2020 Daniel Urban and contributors listed in NOTICE.txt * * 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.ap...
durban/exp-reagents
stress/src/test/scala/dev/tauri/choam/ReactCASTest.scala
Scala
apache-2.0
2,011
/* * 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 ...
akopich/spark
streaming/src/main/scala/org/apache/spark/streaming/dstream/MapPartitionedDStream.scala
Scala
apache-2.0
1,462
package org.scalawiki.time import java.time.format.DateTimeParseException import java.time.{Instant, ZoneOffset, ZonedDateTime} import com.typesafe.config.{ConfigException, ConfigFactory} import net.ceedubs.ficus.Ficus._ import org.specs2.mutable.Specification class DateTimeReadersSpec extends Specification { val...
intracer/scalawiki
scalawiki-core/src/test/scala/org/scalawiki/time/DateTimeReadersSpec.scala
Scala
apache-2.0
991
/* * 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 ...
zzcclp/carbondata
integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/segmentreading/TestSegmentReading.scala
Scala
apache-2.0
23,515
package mdmoss.doobiegen.queries import doobie.imports._ import org.specs2.matcher.ThrownExpectations import org.specs2.mutable.Specification import scalaz.concurrent.Task import mdmoss.doobiegen.db.gen object MultigetSpec extends Specification with ThrownExpectations { val xa = DriverManagerTransactor[Task]("org...
mdmoss/doobie-codegen
test_v4/src/test/scala/mdmoss/doobiegen/queries/MultigetSpec.scala
Scala
mit
2,636
/** This file is part of TextCompose, a program for producing PDF from text files. * Copyright 2014 Jesper S Villadsen <jeschvi@gmail.com> * License: GNU Affero General Public License version 3 or later. * For full license text see LICENSE.txt or <http://www.gnu.org/licenses/>. */ package textcompose.core im...
jvilladsen/TextCompose
src/main/scala/core/LatestExtensions.scala
Scala
agpl-3.0
2,943
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
dbtsai/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/FileSourceStrategySuite.scala
Scala
apache-2.0
27,099
package controllers import java.net.URL import javax.inject.Inject import com.github.j5ik2o.forseti.domain.pkce.{CodeChallenge, CodeChallengeMethodType, CodeVerifier} import com.google.api.client.auth.oauth2._ import controllers.forms.CodeConfirmForm import play.api.Logger import play.api.data.Form import play.api.da...
j5ik2o/forseti
app/relying-party/app/controllers/AuthorizationCodeFlowController.scala
Scala
mit
5,850
/* * Copyright 2015 LinkedIn Corp. * * 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 w...
linkedin/play-parseq
sample/app/controllers/s/SingleTaskSample.scala
Scala
apache-2.0
2,234
package model import play.api.libs.json._ /** * Represents the Swagger definition for Organisation. * @param additionalProperties Any additional properties this model may have. */ @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2022-02-13T...
cliffano/swaggy-jenkins
clients/scala-play-server/generated/app/model/Organisation.scala
Scala
mit
1,404