code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
/* * Copyright (C) 2005, The Beangle Software. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
beangle/ems
app/src/main/scala/org/beangle/ems/app/util/JSON.scala
Scala
lgpl-3.0
2,154
/* * Copyright (c) 2013-2014 Telefónica Investigación y Desarrollo S.A.U. * * 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 * * Unles...
telefonicaid/fiware-cosmos-platform
cosmos-api/app/es/tid/cosmos/api/controllers/common/JsonController.scala
Scala
apache-2.0
1,433
package io.youi.http.content import java.io.File import io.youi.net.ContentType import io.youi.stream.IO case class FileContent(file: File, contentType: ContentType, lastModifiedOverride: Option[Long] = None) extends Content { assert(file.isFile, s"Cannot send back ${file.getAbsolutePath} as it is a directory or d...
outr/youi
core/jvm/src/main/scala/io/youi/http/content/FileContent.scala
Scala
mit
871
/* * Original implementation (C) 2009-2011 Debasish Ghosh * Adapted and extended in 2011 by Mathias Doenitz * Adapted and extended in 2016 by Eugene Yokota * * 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 cop...
eed3si9n/sjson-new
core/src/main/scala/sjsonnew/BasicJsonProtocol.scala
Scala
apache-2.0
1,281
package br.edu.ifrn.potigol.editor import org.antlr.v4.runtime.tree.TerminalNode import org.antlr.v4.runtime.tree.ParseTreeListener; import org.antlr.v4.runtime.Token import org.antlr.v4.runtime.tree.ErrorNode import org.antlr.v4.runtime.ParserRuleContext import br.edu.ifrn.potigol.parser.potigolBaseListener ...
potigol/EditorPotigol
src/main/scala/br/edu/ifrn/potigol/editor/HighLight.scala
Scala
gpl-2.0
686
package org.ergoplatform.validation /** Interface implemented by objects capable of checking soft-fork conditions. */ trait SoftForkChecker { /** Check soft-fork condition. * @param vs ValidationSettings actualized from blockchain extension sections * @param ruleId id of the rule which raised Validat...
ScorexFoundation/sigmastate-interpreter
sigmastate/src/main/scala/org/ergoplatform/validation/SoftForkChecker.scala
Scala
mit
1,921
package com.aughma.dataflow trait InputPort extends Port { def Retrieve: String }
fahdrafi/Aughma-Dataflow-Service
src/com/aughma/dataflow/InputPort.scala
Scala
apache-2.0
84
package models import anorm._ import anorm.SqlParser._ import play.api.db._ import play.api.Play.current case class Student( id: Pk[Long] = NotAssigned, name: String, department: Long ) case class Department( id: Pk[Long] = NotAssigned, name: String, imageSrc:...
sayon/simple-rest-app
app/models/Models.scala
Scala
mit
6,467
package org.jetbrains.plugins.scala.lang.psi.impl.statements import com.intellij.lang.ASTNode import com.intellij.openapi.progress.ProgressManager import com.intellij.psi._ import com.intellij.psi.scope._ import com.intellij.psi.stubs.StubElement import com.intellij.psi.tree.IElementType import org.jetbrains.plugins....
JetBrains/intellij-scala-historical
src/org/jetbrains/plugins/scala/lang/psi/impl/statements/ScMacroDefinitionImpl.scala
Scala
apache-2.0
3,953
package teststep package util package csv import org.scalatest.FreeSpec class CsvParserSpec extends FreeSpec { "Given a CsvParser is created with MapOutput" - { val csvParser = new CsvParser with MapOutput { val delimiter = "," } "When parse is passed a empty String Iterator" - { "Then return a None...
ssfc/test_step
src/test/scala/teststep/util/csv/CsvParserSpec.scala
Scala
apache-2.0
1,342
package techex.cases import org.http4s.dsl._ import org.joda.time.Instant import techex._ import techex.data._ import techex.domain._ import scalaz.Scalaz._ import scalaz._ import scalaz.stream.async.mutable.Topic object startSession { def restApi(topic: Topic[InputMessage]): WebHandler = { case req@POST -> ...
kantega/tech-ex-2015
backend/src/main/scala/techex/cases/startSession.scala
Scala
mit
958
/* * 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 n...
wangcy6/storm_app
frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/test/scala/kafka/common/InterBrokerSendThreadTest.scala
Scala
apache-2.0
4,752
/* * MOIS: VarCalc Process Helper Trait * Copyright (C) 2014 University of Edinburgh School of Informatics * * 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 Li...
edinburgh-rbm/mois
src/main/scala/uk/ac/ed/inf/mois/VarCalc.scala
Scala
gpl-3.0
1,375
/** * Digi-Lib-Mesh - distributed mesh library for Digi components * * Copyright (c) 2012-2013 Alexey Aksenov [email protected] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * h...
ezh/digi-lib-mesh
src/main/scala/org/digimead/digi/lib/mesh/Peer.scala
Scala
apache-2.0
4,919
/* * 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...
scalatest/scalatest
jvm/scalatest-test/src/test/scala/org/scalatest/BigSuite.scala
Scala
apache-2.0
8,783
/*********************************************************************** * 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/main/scala/org/locationtech/geomesa/utils/conf/ConfigLoader.scala
Scala
apache-2.0
2,575
package pl.touk.nussknacker.engine.management.sample.transformer import org.apache.flink.api.common.state.ValueStateDescriptor import org.apache.flink.api.scala._ import org.apache.flink.streaming.api.functions.co.KeyedCoProcessFunction import org.apache.flink.streaming.api.scala.DataStream import org.apache.flink.uti...
TouK/nussknacker
engine/flink/management/dev-model/src/main/scala/pl/touk/nussknacker/engine/management/sample/transformer/EnrichWithAdditionalDataTransformer.scala
Scala
apache-2.0
6,081
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
fnothaft/corretto
src/main/scala/org/bdgenomics/corretto/rdd/ErrorCorrection.scala
Scala
apache-2.0
16,706
package beam.sim.vehiclesharing import beam.router.BeamSkimmer import beam.sim.BeamServices import beam.sim.config.BeamConfig import org.matsim.api.core.v01.Id object RepositionAlgorithms { def lookup( config: BeamConfig.Beam.Agentsim.Agents.Vehicles.SharedFleets$Elm.Reposition ): RepositionAlgorithmType = {...
colinsheppard/beam
src/main/scala/beam/sim/vehiclesharing/RepositionAlgorithms.scala
Scala
gpl-3.0
1,436
package wakfutcp.protocol.messages.server import wakfutcp.protocol.protobuf.aptitude.SheetSet import wakfutcp.protocol.protobuf.buildSheet.ProtoBuildSheetSet import wakfutcp.protocol.raw.character._ import wakfutcp.protocol.{Codec, ServerMessage} final case class CharacterInformationMessage( reservedIds: Array[Long...
OpenWakfu/wakfutcp
protocol/src/main/scala/wakfutcp/protocol/messages/server/CharacterInformationMessage.scala
Scala
mit
839
package example class MethodUsages { val m = new Methods[Int] m.m1 m.m2() m.m3(0) m.m4(0)(0) m.m5("") m.m5(0) m.m6(0) m.m6(new m.List[Int]) m.m6(Nil) m.m7(m, new m.List[Int]) m.`m8().`() m.m9(null) m.m10(null) m.m11(Predef) m.m11(Example) m.m12a(null) m.m12b(null) m.m13(0) m.m15...
dotty-staging/dotty
tests/semanticdb/expect/MethodUsages.scala
Scala
apache-2.0
469
/* * 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 ...
maropu/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DistributionAndOrderingUtils.scala
Scala
apache-2.0
4,810
package com.julianpeeters.avro.annotations package provider import org.apache.avro.file.DataFileReader import org.apache.avro.generic.{GenericDatumReader, GenericRecord} import org.apache.avro.Schema import org.apache.avro.Schema.Parser import org.apache.avro.Schema.Type._ import scala.collection.JavaConverters._ ob...
rvvincelli/avro-scala-macro-annotations
macros/src/main/scala/avro/scala/macro/annotations/provider/FileParser.scala
Scala
apache-2.0
1,252
package controllers import util._ import play.api.libs.json._ import play.api.mvc._ object ApiResponse extends ApiResponse { import Results._ import OutputType.contentTypeWithCharset def formatJsonMessage(status: String, data: JsValue): JsObject = { JsObject(Seq( "status" -> JsString(status), ...
Shopify/collins
app/controllers/ApiResponse.scala
Scala
apache-2.0
7,980
package org.jetbrains.plugins.scala package lang.refactoring.changeSignature import com.intellij.openapi.project.Project import com.intellij.psi._ import com.intellij.psi.codeStyle.JavaCodeStyleManager import com.intellij.refactoring.changeSignature.JavaParameterInfo import com.intellij.refactoring.util.CanonicalTypes...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/refactoring/changeSignature/ScalaParameterInfo.scala
Scala
apache-2.0
4,599
/* * Copyright (C) 2015 Stratio (http://stratio.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 app...
darroyocazorla/crossdata
cassandra/src/main/scala/com/stratio/crossdata/connector/cassandra/statements/CreateKeyspaceStatement.scala
Scala
apache-2.0
1,451
/* * The MIT License (MIT) * <p> * Copyright (c) 2017-2019 * <p> * 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,...
amannocci/streamy
core/src/test/scala/io/techcode/streamy/util/monitor/DeadLetterMonitorSpec.scala
Scala
mit
2,472
/* * SkolemSymbols.scala */ package at.logic.gapt.language.hol import at.logic.gapt.expr._ import at.logic.gapt.utils.ds.streams.Definitions._ trait TSkolemSymbol object TypeSynonyms { type SkolemSymbol = SymbolA with TSkolemSymbol } import at.logic.gapt.language.hol.TypeSynonyms._ /* The idea of SkolemSymbol...
gisellemnr/gapt
src/main/scala/at/logic/gapt/language/hol/skolemSymbols.scala
Scala
gpl-3.0
1,702
package se.chimps.bitziness.core.generic.serializers import scala.reflect.ClassTag trait ObjectSerializer { import akka.actor.ActorSystem import akka.serialization.SerializationExtension protected def system:ActorSystem lazy protected val extension = SerializationExtension(system) def serialize(instance: AnyRe...
Meduzz/Bitziness
src/main/scala/se/chimps/bitziness/core/generic/serializers/ObjectSerializer.scala
Scala
apache-2.0
545
package com.partup import akka.actor.{Actor, ActorLogging, Props} import com.partup.utils.IsoDate import iot.jcypher.database.IDBAccess import iot.jcypher.query.JcQuery import iot.jcypher.query.api.IClause import spray.httpx.SprayJsonSupport import spray.json.DefaultJsonProtocol import scala.collection.JavaConversion...
part-up/api
src/main/scala/com/partup/UpdateNeo4jActor.scala
Scala
agpl-3.0
4,276
package ls import scala.util.control.NonFatal object Git { object GhRepo { val GHRemote = """^[email protected][:](\S+)/(\S+)[.]git$""".r def unapply(line: String) = line.split("""\s+""") match { case Array(_, GHRemote(user, repo), _) => Some(user, repo) case _ => None } } val CurrentB...
softprops/ls
plugin/src/main/scala/git.scala
Scala
mit
1,013
package org.jetbrains.plugins.scala.debugger import java.io.File import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.projectRoots.impl.JavaAwareProjectJdkTableImpl import com.intellij.openapi.projectRoots.{JavaSdk, Sdk} import com.intellij.openapi.util.registry.Registry import org.j...
triplequote/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/debugger/DebuggerTestUtil.scala
Scala
apache-2.0
4,118
/** * Swaggy Jenkins * Jenkins API clients generated from Swagger / Open API specification * * The version of the OpenAPI document: 1.1.2-pre.0 * Contact: [email protected] * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech */ package...
cliffano/swaggy-jenkins
clients/scalatra/generated/src/main/scala/org/openapitools/server/model/DiskSpaceMonitorDescriptorDiskSpace.scala
Scala
mit
504
package composition import _root_.webserviceclients.fakes.DateServiceConstants.DayValid import _root_.webserviceclients.fakes.DateServiceConstants.MonthValid import _root_.webserviceclients.fakes.DateServiceConstants.YearValid import com.tzavellas.sse.guice.ScalaModule import org.joda.time.DateTime import org.joda.tim...
dvla/vrm-retention-online
test/composition/TestDateService.scala
Scala
mit
1,328
/** * Swaggy Jenkins * Jenkins API clients generated from Swagger / Open API specification * * The version of the OpenAPI document: 1.1.2-pre.0 * Contact: [email protected] * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not ed...
cliffano/swaggy-jenkins
clients/scala-lagom-server/generated/src/main/scala/io/swagger/client/model/DiskSpaceMonitorDescriptorDiskSpace.scala
Scala
mit
751
// // GraftGroup.scala -- Scala class GraftGroup // Project OrcScala // // Created by dkitchin on Aug 12, 2011. // // Copyright (c) 2017 The University of Texas at Austin. All rights reserved. // // Use and redistribution of this file is governed by the license terms in // the LICENSE file found in the project's top-le...
orc-lang/orc
OrcScala/src/orc/run/core/GraftGroup.scala
Scala
bsd-3-clause
3,769
package com.twitter.finagle.service import com.twitter.conversions.DurationOps._ import com.twitter.finagle.service.RetryPolicy._ import com.twitter.finagle.{ Backoff, ChannelClosedException, Failure, FailureFlags, TimeoutException, WriteException } import com.twitter.util._ import org.scalatest.funspec.An...
twitter/finagle
finagle-core/src/test/scala/com/twitter/finagle/service/RetryPolicyTest.scala
Scala
apache-2.0
7,995
/* * 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 ...
cbickel/openwhisk
common/scala/src/main/scala/org/apache/openwhisk/core/entity/Limits.scala
Scala
apache-2.0
4,022
package com.twitter.finagle.http import com.twitter.conversions.DurationOps._ import com.twitter.conversions.StorageUnitOps._ import com.twitter.finagle.http.{Status => HttpStatus} import com.twitter.finagle.service.ConstantService import com.twitter.finagle.transport.Transport import com.twitter.finagle.{Http => Fina...
twitter/finagle
finagle-http/src/test/scala/com/twitter/finagle/http/AbstractStreamingTest.scala
Scala
apache-2.0
17,713
/* * 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 ...
WindCanDie/spark
mllib/src/test/scala/org/apache/spark/ml/feature/MaxAbsScalerSuite.scala
Scala
apache-2.0
2,528
package org.cloudfun.util import _root_.java.util.logging.{Logger, Level} /** * A mixin that provides various logging methods that call a generic logging method. * * Utilizes scalas function passing syntax to only evaluate parameters if the message should be logged. */ // TODO: Use own level names for severe and...
zzorn/cloudfun
src/main/scala/org/cloudfun/util/LogMethods.scala
Scala
lgpl-3.0
2,327
package chapter26 /** * 26장 익스트랙터 * * 아마도 지금까지 패턴 매치를 사용해 데이터를 분해하고 분석하는 간결한 방법에 많이 익숙해졌을 것이다. * 26장에서는 이 개념을 더 일반화하는 방법을 설명한다. * * 지금까지 생성자를 사용한 패턴은 케이스 클래스와 관련이 있었다. 예를 들어 Some(x) 는 * Some이 케이스 클래스라서 올바른 패턴이었다. 때로 케이스 클래스는 만들고 싶지 않지만, 이런 패턴은 * 사용하고 싶을 때가 있다. extractor는 그런 방법을 제공한다. * * 26.1 예제: 전자우편 주소 ...
seraekim/srkim-lang-scala
src/main/java/chapter26/c26_i01.scala
Scala
bsd-3-clause
2,420
package io.eels.component.parquet import com.sksamuel.exts.Logging import com.sksamuel.exts.io.Using import io.eels.component.parquet.util.ParquetIterator import io.eels.schema.StructType import io.eels.{CloseableIterator, Part, Predicate, Row} import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.Pa...
stheppi/eel
eel-components/src/main/scala/io/eels/component/parquet/ParquetPart.scala
Scala
apache-2.0
1,394
package com.thangiee.lolhangouts.ui.core import android.view.ViewGroup import android.view.ViewGroup.LayoutParams._ import com.google.android.gms.ads.{AdRequest, AdSize, AdView} trait Ads extends TActivity { private lazy val adView = new AdView(ctx) def adUnitId: String def adLayout: ViewGroup def setupAds(...
Thangiee/LoL-Hangouts
src/com/thangiee/lolhangouts/ui/core/Ads.scala
Scala
apache-2.0
971
/* * 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 ...
chenc10/Spark-PAF
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUDFSuite.scala
Scala
apache-2.0
18,460
package tul.poiis.decision_tree /** * Created by michal on 06.01.2016. */ class Feature(val value: String) { def stringValue: String ={ value } }
CucumisSativus/decision-tree-movie-evaluator
src/main/scala/tul/poiis/decision_tree/Feature.scala
Scala
mit
159
package org.scalamu.report sealed abstract class LineStatus(val styleName: String) object LineStatus { case object Covered extends LineStatus("covered") case object NotCovered extends LineStatus("uncovered") case object NotApplicable extends LineStatus("na") }
sugakandrey/scalamu
report/src/main/scala/org/scalamu/report/LineStatus.scala
Scala
gpl-3.0
278
package com.sksamuel.elastic4s.searches.queries.geo import com.sksamuel.elastic4s.DistanceUnit import com.sksamuel.elastic4s.searches.queries.Query import com.sksamuel.exts.OptionImplicits._ case class GeoDistanceQuery(field: String, geoDistance: Option[GeoDistance] = None, ...
Tecsisa/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/searches/queries/geo/GeoDistanceQuery.scala
Scala
apache-2.0
1,830
package ammonite import ammonite.runtime.{History, Interpreter, Storage} import ammonite.main.Defaults import ammonite.ops._ import ammonite.runtime.tools.IvyConstructor._ import ammonite.TestUtils._ import utest._ object CachingTests extends TestSuite{ val tests = TestSuite{ println("ScriptTests") val scr...
coderabhishek/Ammonite
amm/src/test/scala/ammonite/CachingTests.scala
Scala
mit
5,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 ...
zzcclp/carbondata
integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/bigdecimal/TestNullAndEmptyFields.scala
Scala
apache-2.0
4,068
package com.wincom.dcim.sharded import java.lang.Math._ import akka.actor.{ActorRef, Props, ReceiveTimeout} import akka.cluster.sharding.ShardRegion import akka.cluster.sharding.ShardRegion.Passivate import akka.http.scaladsl.model.DateTime import com.wincom.dcim.domain.{AlarmRecord, Settings} import com.wincom.dcim....
xtwxy/mysc
dcim-cluster/cluster/src/main/scala/com/wincom/dcim/sharded/ShardedAlarmRecord.scala
Scala
apache-2.0
1,513
package com.arcusys.valamis.gradebook.storage import com.arcusys.valamis.gradebook.model.CourseGrade trait CourseGradeStorage { def create(course: CourseGrade) def get(courseId: Int, userID: Int): Option[CourseGrade] def modify(course: CourseGrade) def renew() }
ViLPy/Valamis
valamis-gradebook/src/main/scala/com/arcusys/valamis/gradebook/storage/CourseGradeStorage.scala
Scala
lgpl-3.0
273
package com.wavesplatform.lang.v1 import java.nio.charset.StandardCharsets import java.util.concurrent.{ThreadLocalRandom, TimeUnit} import cats.Id import cats.syntax.bifunctor._ import com.wavesplatform.account import com.wavesplatform.common.state.ByteStr import com.wavesplatform.common.utils.EitherExt2 import com....
wavesplatform/Waves
benchmark/src/test/scala/com/wavesplatform/lang/v1/EnvironmentFunctionsBenchmark.scala
Scala
mit
8,066
package view import java.util.Date import org.specs2.mutable._ import org.specs2.mock.Mockito import service.RequestCache import model.Account import service.SystemSettingsService.SystemSettings import play.twirl.api.Html import javax.servlet.http.HttpServletRequest class AvatarImageProviderSpec extends Specificatio...
tb280320889/TESTTB
src/test/scala/view/AvatarImageProviderSpec.scala
Scala
apache-2.0
5,030
package controllers import java.util.concurrent.TimeUnit import akka.util.Timeout import play.api.mvc._ import scala.concurrent.ExecutionContext object Application extends Controller { import play.api.libs.concurrent.Execution.Implicits._ val bench = new BenchService { override implicit def ec: ExecutionC...
rafax/playspray
play/app/controllers/Application.scala
Scala
mit
681
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
mdzimmerman/geomesa
geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/stats/StatSerializer.scala
Scala
apache-2.0
17,885
package dispatch.spec import java.nio.charset.Charset import org.asynchttpclient.Realm import org.asynchttpclient.Realm.AuthScheme import org.scalacheck._ import org.scalacheck.Prop._ object BasicSpecification extends Properties("Basic") with DispatchCleanup { import java.net.{URLEncoder,URLDecoder} import Prop....
dispatch/reboot
core/src/test/scala/basic.scala
Scala
lgpl-3.0
8,144
package mesosphere.marathon package core.task.bus import mesosphere.marathon.core.condition.Condition import mesosphere.marathon.core.instance.update._ import mesosphere.marathon.core.instance.{ Instance, TestInstanceBuilder } import mesosphere.marathon.core.pod.MesosContainer import mesosphere.marathon.core.task.{ Ta...
natemurthy/marathon
src/test/scala/mesosphere/marathon/core/task/bus/TaskStatusUpdateTestHelper.scala
Scala
apache-2.0
8,438
package io.plasmap.geo.producing.test import _root_.io.plasmap.generator.OsmObjectGenerator import _root_.io.plasmap.geo.producing.OsmProducer import _root_.io.plasmap.model.OsmObject import akka.actor._ import akka.stream._ import akka.stream.scaladsl._ import org.scalamock.proxy.ProxyMockFactory import org.scalamock...
plasmap/plasmap
processing/src/test/scala/io/plasmap/geo/producing/test/OsmProducerSpec.scala
Scala
apache-2.0
1,875
/* * Copyright 2020 Google 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
GoogleCloudPlatform/java-docs-samples
bigtable/spark/src/main/scala/example/Wordcount.scala
Scala
apache-2.0
2,688
package com.typesafe.sbt.packager.rpm import sbt._ import com.typesafe.sbt.packager.linux.LinuxSymlink object RpmHelper { /** Returns the host vendor for an rpm. */ def hostVendor = sys.process.Process(Seq("rpm", "-E", "%{_host_vendor}")) !! /** * Prepares the staging directory for the rpm build comma...
fsat/sbt-native-packager
src/main/scala/com/typesafe/sbt/packager/rpm/RpmHelper.scala
Scala
bsd-2-clause
5,200
package pl.bigpicture.wikipv.job import java.text.SimpleDateFormat import java.util.Date import org.scalatest.FunSuite /** * Created by kuba on 21/02/16. */ class HousekeepingJobTest extends FunSuite { test("file with current timestamp should not be removed") { val sdf = new SimpleDateFormat("yyyyMMdd-HH...
jpieprzyk/wikipv
src/test/scala/pl/bigpicture/wikipv/job/HousekeepingJobTest.scala
Scala
apache-2.0
1,335
package com.ntsdev.connect4.ai import com.ntsdev.connect4.game.Game import com.ntsdev.connect4.model.{Board, RedCell} import org.specs2.mutable.Specification class SimpleComputerPlayerSpec extends Specification { "the simple computer player" should { "generate a move" in { val testBoard = Board val ...
neilshannon/connect4
src/test/scala/com/ntsdev/connect4/ai/SimpleComputerPlayerSpec.scala
Scala
mit
558
package io.getquill.norm import io.getquill.Spec import io.getquill.testContext.qr1 import io.getquill.testContext.qr2 import io.getquill.testContext.quote import io.getquill.testContext.unquote class AdHocReductionSpec extends Spec { "*.filter" - { "a.filter(b => c).filter(d => e)" in { val q = quote { ...
getquill/quill
quill-core/src/test/scala/io/getquill/norm/AdHocReductionSpec.scala
Scala
apache-2.0
1,813
package scalajsreact.select.example.components import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.prefix_<^._ object Footer { val component = ReactComponentB.static("Footer", <.footer(^.textAlign.center, <.div(^.borderBottom := "1px solid grey", ^.padding := "0px"), <.p(^.paddingTop := ...
lvitaly/scalajs-react-select-example
src/main/scala/scalajsreact/select/example/components/Footer.scala
Scala
apache-2.0
421
package com.cterm2.mcfm1710 import net.minecraft.nbt.NBTTagCompound import cpw.mods.fml.relauncher.{SideOnly, Side} import interops.smartcursor._ package interfaces { trait IModuledInjector { def storeSpecificData(nbt: NBTTagCompound) def loadSpecificData(nbt: NBTTagCompound) } } package ...
Pctg-x8/fluidMechanics
src/contents/energyInjector.scala
Scala
lgpl-2.1
23,216
package org.jetbrains.plugins.scala.actions import java.awt.event.{MouseAdapter, MouseEvent} import java.awt.{Color, Point} import javax.swing._ import javax.swing.border.Border import javax.swing.event.{ListSelectionEvent, ListSelectionListener} import com.intellij.codeInsight.CodeInsightBundle import com.intellij.o...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/actions/GoToImplicitConversionAction.scala
Scala
apache-2.0
10,292
package org.eknet.county /** * @author Eike Kettner [email protected] * @since 23.03.13 12:30 */ sealed trait Granularity extends Serializable { def name: String def keyFor(millis: Long): TimeKey } object Granularity { val values = List(Millis, Second, Minute, Hour, Day, Month, Year) @SerialVersi...
eikek/county
api/src/main/scala/org/eknet/county/Granularity.scala
Scala
apache-2.0
1,354
package org.gbif.population.spark import org.junit.Assert._ import org.junit._ import org.scalatest.FunSpec import org.gbif.population.spark._ import scala.collection.mutable.Stack @Test class LinearRegressionTest extends FunSpec { describe("A simple linear regression") { it("should cross...
gbif/species-population
spark-process/src/test/scala/org/gbif/population/spark/LinearRegressionTest.scala
Scala
apache-2.0
577
package org.elasticmq.rest.sqs import com.amazonaws.auth.{AWSStaticCredentialsProvider, BasicAWSCredentials} import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration import com.amazonaws.services.sqs.model.{Message, ReceiveMessageRequest} import com.amazonaws.services.sqs.{AmazonSQS, AmazonSQSClientB...
adamw/elasticmq
rest/rest-sqs-testing-amazon-java-sdk/src/test/scala/org/elasticmq/rest/sqs/SqsClientServerCommunication.scala
Scala
apache-2.0
3,412
/* * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com> */ package play.api.db import java.sql.{ Connection, Driver, DriverManager } import javax.sql.DataSource import scala.util.control.{ NonFatal, ControlThrowable } import play.api.Configuration import play.utils.{ ProxyDriver, Reflect } /** * Dat...
jyotikamboj/container
pf-framework/src/play-jdbc/src/main/scala/play/api/db/Database.scala
Scala
mit
7,327
type Id[A] = A
hmemcpy/milewski-ctfp-pdf
src/content/1.8/code/scala/snippet05.scala
Scala
gpl-3.0
14
/* * 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/EntityTag.scala
Scala
apache-2.0
2,221
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.api import org.specs2.mutable.Specification class LoggerConfiguratorSpec extends Specification { "generateProperties" should { "generate in the simplest case" in { val env = Environment.simple() val config = ...
aradchykov/playframework
framework/src/play/src/test/scala/play/api/LoggerConfiguratorSpec.scala
Scala
apache-2.0
3,153
package com.github.diegopacheco.sandbox.scripts.scala.basic.varargs object VarargsMain extends App { def sumItAll(vs:Int*):Int = vs.foldLeft(0)(_+_) println( sumItAll(1,2,3,4,5) ) }
diegopacheco/scala-playground
scala-playground/src/com/github/diegopacheco/sandbox/scripts/scala/basic/varargs/VarargsMain.scala
Scala
unlicense
195
/* * 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/db/TextPermWR.scala
Scala
apache-2.0
3,499
package org.twitterist.utils.solr.schemamanager class SchemaManagerException(msg: String = null, cause: Throwable = null) extends java.lang.Exception(msg, cause) {} object SchemaManagerException { def apply(msg: String) = new SchemaManagerException(msg) def apply(msg: String, throwable: Throwable) = new SchemaMan...
twitterist/solr-schema-manager
src/main/scala/org/twitterist/utils/solr/schemamanager/SchemaManagerException.scala
Scala
mit
662
import java.util.Properties import org.apache.spark.SparkContext import org.apache.spark.sql.SQLContext import org.apache.phoenix.spark._ import com.vader.SentimentAnalyzer import edu.stanford.nlp.ling.CoreAnnotations import edu.stanford.nlp.neural.rnn.RNNCoreAnnotations import edu.stanford.nlp.pipeline.StanfordCor...
tspannhw/nlp-utilities
stanford.scala
Scala
apache-2.0
2,784
/** * This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]]. */ // DO NOT EDIT MANUALLY package sbt.internal.bsp.codec import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError } trait DebugSessionAddressFormats { self: sjsonnew.BasicJsonProtocol => implicit lazy v...
xuwei-k/xsbt
protocol/src/main/contraband-scala/sbt/internal/bsp/codec/DebugSessionAddressFormats.scala
Scala
apache-2.0
1,063
/** * Digi-Lib - base library for Digi components * * Copyright (c) 2012-2013 Alexey Aksenov [email protected] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/...
ezh/digi-lib
src/test/scala/org/digimead/digi/lib/cache/CacheSpec.scala
Scala
apache-2.0
3,191
/* * La Trobe University - Distributed Deep Learning System * Copyright 2014 Matthias Langer ([email protected]) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apa...
bashimao/ltudl
blaze/src/main/scala/edu/latrobe/blaze/modules/raw/DecodeBitmaps.scala
Scala
apache-2.0
3,080
package fm.common.rich import fm.common.OptionCache final class RichSomeObject(val module: Some.type) extends AnyVal { /** Returns a cached copy of the Option instance (if available) to avoid allocation */ def cached(v: Boolean): Some[Boolean] = OptionCache.valueOf(v) /** Returns a cached copy of the Option i...
frugalmechanic/fm-common
shared/src/main/scala/fm/common/rich/RichSomeObject.scala
Scala
apache-2.0
1,023
package util package config import play.api.Application import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.atomic.AtomicBoolean import java.io.File import scala.collection.JavaConverters._ object Registry { private val registered = new ConcurrentHashMap[String,Configurable]() private val ...
Shopify/collins
app/util/config/Registry.scala
Scala
apache-2.0
2,576
package org.apache.mesos.chronos.scheduler.api import org.apache.mesos.chronos.scheduler.jobs.JobScheduler import javax.ws.rs.core.{MediaType, Response} import javax.ws.rs.{GET, Path, Produces} import com.google.inject.Inject @Path(PathConstants.getLeaderPath) @Produces(Array(MediaType.APPLICATION_JSON)) class Leade...
hamo/chronos
src/main/scala/org/apache/mesos/chronos/scheduler/api/LeaderRestModule.scala
Scala
apache-2.0
486
package chapter08 object Exercise3 extends App { class Game(i: Int) { println("The constructor of Game") } class BoardGame(i: Int) extends Game(i) { println("The constructor of BoardGame") } class Chess() extends BoardGame(11) { println("The constructor of Chess") } new Chess() }
vsuharnikov/books-exercises
scala/scala-for-the-impatient/src/main/scala/chapter08/Exercise3.scala
Scala
mit
293
/* * Copyright 2017-2018 Azad Bolour * Licensed under GNU Affero General Public License v3.0 - * https://github.com/azadbolour/boardgame/blob/master/LICENSE.md */ package com.bolour.boardgame.scala.server.service import javax.inject.{Inject} import akka.actor.{ActorSystem} import org.slf4j.LoggerFactory impo...
azadbolour/boardgame
scala-server/app/com/bolour/boardgame/scala/server/service/GameHarvester.scala
Scala
agpl-3.0
906
import com.bowlingx.scalablog._ import org.scalatra._ import javax.servlet.ServletContext class ScalatraBootstrap extends LifeCycle { override def init(context: ServletContext) { context.mount(new ScalablogServlet, "/*") } }
BowlingX/scalablog
src/main/scala/ScalatraBootstrap.scala
Scala
apache-2.0
234
/* * 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
graphx/src/main/scala/org/apache/spark/graphx/PartitionStrategy.scala
Scala
apache-2.0
6,122
package org.opencompare.io.bestbuy import java.io.{FileReader, File} import com.github.tototoshi.csv.CSVReader import scala.io.Source import scala.xml import scala.xml.XML /** * Created by gbecan on 4/7/15. */ class ProductInfoLoader { def load(overview : File, specification : File, xmlDescription : File) : Pr...
gbecan/OpenCompare
org.opencompare/io-best-buy/src/main/scala/org/opencompare/io/bestbuy/ProductInfoLoader.scala
Scala
apache-2.0
1,103
package com.github.fntzr.spray.routing.ext import scala.language.experimental.macros import scala.reflect.macros.Context import spray.routing._ import scala.language.implicitConversions import spray.routing.PathMatchers._ import spray.routing._ import spray.routing.PathMatcher1 /** * Object for transformation Strin...
fntz/spray-routing-ext
src/main/scala/Routable.scala
Scala
mit
11,157
package com.sksamuel.elastic4s import com.sksamuel.elastic4s.ElasticDsl._ import com.sksamuel.elastic4s.mappings.FieldType.NestedType import org.scalatest.{FreeSpec, Matchers} import com.sksamuel.elastic4s.testkit.ElasticSugar import org.elasticsearch.common.text.Text import org.elasticsearch.search.highlight.Highligh...
sjoerdmulder/elastic4s
elastic4s-core-tests/src/test/scala/com/sksamuel/elastic4s/NestedQueryTest.scala
Scala
apache-2.0
2,808
/* sbt -- Simple Build Tool * Copyright 2008, 2009, 2010, 2011 Mark Harrah */ package sbt.internal.util import sbt.util._ import java.io.{ BufferedWriter, PrintStream, PrintWriter } import java.util.Locale object ConsoleLogger { @deprecated("Moved to ConsoleOut", "0.13.0") def systemOut: ConsoleOut = ConsoleOut...
Duhemm/util
internal/util-logging/src/main/scala/sbt/internal/util/ConsoleLogger.scala
Scala
bsd-3-clause
8,429
package tastytest import tastytest.{dottyErasure => dotc, scala2Erasure => nsc} object TestErasure extends Suite("TestErasure") { val z = new dotc.Z test("erasure of scala 3 from scala 2") { z.a_01(anyObj) z.a_02(anyObj) z.a_02X(anyObj) z.a_03(anyObj) z.a_04(anyObj) z.a_04X(anyObj) z...
scala/scala
test/tasty/run/src-2/tastytest/TestErasure.scala
Scala
apache-2.0
4,674
package io.getquill import java.util.Date import io.getquill.context.cassandra.encoding.{ CassandraMapper, CassandraType } import io.getquill.context.cassandra.{ CassandraContext, CqlIdiom } import java.time.{ Instant, LocalDate } import scala.reflect.ClassTag class CassandraMirrorContextWithQueryProbing extends Cas...
getquill/quill
quill-cassandra/src/main/scala/io/getquill/CassandraMirrorContext.scala
Scala
apache-2.0
1,968
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
witgo/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/command/functions.scala
Scala
apache-2.0
10,999
package mesosphere.marathon.state import com.wix.accord.dsl._ import com.wix.accord._ import mesosphere.marathon.api.v2.Validation._ import org.apache.mesos.{ Protos => Mesos } import scala.collection.immutable.Seq // TODO: trait Container and specializations? // Current implementation with type defaulting to DOCKER ...
titosand/marathon
src/main/scala/mesosphere/marathon/state/Container.scala
Scala
apache-2.0
3,922
package com.atomist.source.filter import java.nio.file._ case class GitDirFilter(rootPath: String) extends ArtifactFilter { private val dotGitDir = Paths.get(rootPath, ".git") override def apply(path: String): Boolean = !Paths.get(path).toAbsolutePath.startsWith(dotGitDir.toAbsolutePath) }
atomist/artifact-source
src/main/scala/com/atomist/source/filter/GitDirFilter.scala
Scala
gpl-3.0
303
/* * Copyright 2014–2017 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
drostron/quasar
web/src/test/scala/quasar/api/services/MetadataServiceSpec.scala
Scala
apache-2.0
7,306
/* * 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/vat-registration-frontend
app/forms/ApplicationReferenceForm.scala
Scala
apache-2.0
1,499
/* * Copyright (c) 2011-14 Miles Sabin * * 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...
mandubian/shapeless
examples/src/test/scala/shapeless/examples/lift.scala
Scala
apache-2.0
2,500