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) 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...
ddseapy/geomesa
geomesa-index-api/src/test/scala/org/locationtech/geomesa/index/metadata/CachedLazyMetadataTest.scala
Scala
apache-2.0
3,074
/* * Copyright (C) 2017 HAT Data Exchange Ltd * SPDX-License-Identifier: AGPL-3.0 * * This file is part of the Hub of All Things project (HAT). * * HAT 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 Founda...
Hub-of-all-Things/HAT2.0
hat/app/org/hatdex/hat/api/service/monitoring/JsonStatsService.scala
Scala
agpl-3.0
2,496
/* * Copyright 2010-2011 Vilius Normantas <code@norma.lt> * * This file is part of Crossbow library. * * Crossbow 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 ...
ViliusN/Crossbow
crossbow-core/src/lt/norma/crossbow/indicators/ListenerIndicator.scala
Scala
gpl-3.0
1,082
import sbt._ import Keys._ import play.Project._ object ApplicationBuild extends Build { val appName = "ctr" val appVersion = "0.0.1" val appDependencies = Seq( // Add your project dependencies here, jdbc, anorm, "org.specs2" %% "specs2" % "2.0" ) val main = play.Project(appN...
XuefengWu/ctr
project/Build.scala
Scala
apache-2.0
419
package com.yammer.metrics.scala import com.yammer.metrics.Metrics /** * The mixin trait for creating a class which is instrumented with metrics. */ trait Instrumented { private lazy val metricsGroup = new MetricsGroup(getClass, metricsRegistry) /** * Returns the MetricsGroup for the class. */ def metr...
sstone/metrics-scala
src/main/scala/com/yammer/metrics/scala/Instrumented.scala
Scala
apache-2.0
453
package blended.activemq.client.internal import blended.activemq.client.{ConnectionVerifier, ConnectionVerifierFactory} import blended.container.context.api.ContainerContext import blended.jms.utils.IdAwareConnectionFactory import scala.concurrent.{ExecutionContext, Future} class DefaultConnectionVerifierFactory ext...
woq-blended/blended
blended.activemq.client/src/main/scala/blended/activemq/client/internal/DefaultConnectionVerifier.scala
Scala
apache-2.0
677
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2010, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
cran/rkafkajars
java/scala/concurrent/DelayedLazyVal.scala
Scala
apache-2.0
1,660
package com.twitter.finagle.memcachedx.protocol.text.client import com.twitter.finagle.memcachedx.protocol.ServerError import com.twitter.finagle.memcachedx.protocol.text._ import com.twitter.finagle.memcachedx.util.ChannelBufferUtils._ import com.twitter.finagle.memcachedx.util.ParserUtils import com.twitter.finagle....
nkhuyu/finagle
finagle-memcachedx/src/main/scala/com/twitter/finagle/memcachedx/protocol/text/client/Decoder.scala
Scala
apache-2.0
4,370
package testing.fixtures.same import org.scalatest._ import java.io._ import scala.language.postfixOps class OverridingWithFixtureMethodNoArgTest extends FlatSpec { override def withFixture(test: NoArgTest): Outcome = { val name = test.name val file = new File("trash/test.txt") val writer = new Prin...
MarekDudek/testing-in-scala
src/testing/fixtures/same/OverridingWithFixtureMethodNoArgTest.scala
Scala
mit
704
/* * 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 ...
mahak/spark
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/SparkPod.scala
Scala
apache-2.0
2,232
package com.twitter.util.validation.internal import java.lang.annotation.Annotation import java.lang.reflect.Method import java.util import sun.reflect.annotation.AnnotationParser private[validation] object AnnotationFactory { /** * Creates a new Annotation (AnnotationProxy) instance of * the given annotatio...
twitter/util
util-validator/src/main/scala/com/twitter/util/validation/internal/AnnotationFactory.scala
Scala
apache-2.0
1,244
package service; import play.api.Play import play.Logger import play.api.Play.current import play.api.libs.ws._ import scala.concurrent.ExecutionContext.Implicits.global import models.YoSubscriber import com.google.inject.Inject import models.daos.YoSubscriberDAO class YoServiceImpl @Inject() (yoSubscriberDAO: YoSub...
sne11ius/playlog
app/service/YoServiceImpl.scala
Scala
gpl-3.0
1,101
// code-examples/TypeLessDoMore/relative-imports.scala import scala.collection.mutable._ import collection.immutable._ // Since "scala" is already imported import _root_.scala.collection.jcl._ // full path from real "root" package scala.actors { import remote._ // We're in the scope of ...
XClouded/t4f-core
scala/src/tmp/TypeLessDoMore/relative-imports.scala
Scala
apache-2.0
337
/* * Copyright (c) 2014-2021 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
snowplow/iglu-scala-client
modules/core/src/main/scala/com.snowplowanalytics.iglu/client/Client.scala
Scala
apache-2.0
2,161
package scala.pickling.generator trait IsIgnoreCaseClassSubclasses /** * This gives us all of our generator options. */ package object opts { implicit object ignoreCaseClassSubclasses extends IsIgnoreCaseClassSubclasses }
beni55/pickling
core/src/main/scala/scala/pickling/generator/opts/package.scala
Scala
bsd-3-clause
229
package org.jetbrains.plugins.scala package codeInsight.intention import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.psi.PsiElement import com.intellij.psi.impl.source.codeStyle.CodeEditUtil i...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/codeInsight/intention/RemoveBracesIntention.scala
Scala
apache-2.0
4,886
package sc.ala.kafka.utils import org.apache.kafka.clients.consumer.{ConsumerConfig, KafkaConsumer} import org.apache.kafka.common.TopicPartition import org.apache.kafka.common.protocol.SecurityProtocol import org.apache.kafka.common.security.JaasUtils import org.apache.kafka.common.serialization.ByteArrayDeserializer...
maiha/kafka-utils
src/main/scala/sc/ala/kafka/utils/KafkaBrokerUtils.scala
Scala
mit
2,261
// The MIT License (MIT) // Copyright (c) 2016 Josiah Witt, Christopher Poenaru package com.trifectalabs.myriad package aco import akka.actor.{ActorSystem, Props} class ACOSystemFactory(config: ACOConfiguration) { def build(actorSystem: Option[ActorSystem] = None): ACOSystem = { val system = actorSystem.getOrE...
trifectalabs/myriad
src/main/scala/aco/ACOSystemFactory.scala
Scala
mit
913
import sbt.ExclusionRule import sbt._ object Dependencies { import Dependency._ val pluginInterface = Seq( playJson % "compile", mesosUtils % "compile", guava % "compile", wixAccord % "compile", scalaxml % "provided" // for scapegoat ) val excludeSlf4jLog4j12 = ExclusionRule(organization ...
timcharper/marathon
project/Dependencies.scala
Scala
apache-2.0
6,437
/* * 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 ...
pferrel/PredictionIO
examples/scala-parallel-recommendation/custom-query/src/main/scala/Engine.scala
Scala
apache-2.0
1,417
/* * Copyright 2007-2010 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...
jeppenejsum/liftweb
framework/lift-modules/lift-widgets/src/main/scala/net/liftweb/widgets/calendars/CalendarMonthView.scala
Scala
apache-2.0
8,989
package com.robocubs4205.cubscout import java.time.{LocalDate, Year} import com.robocubs4205.cubscout.model.{District, Event, Robot, Team} import sangria.execution.deferred.{Deferred, DeferredResolver, UnsupportedDeferError} import sangria.schema._ import slick.dbio.DBIO import scala.concurrent.{ExecutionContext, Fu...
robocubs4205/cubscout-server
api-server/app/com/robocubs4205/cubscout/graphql/package.scala
Scala
mit
4,049
/* Copyright (c) 2017, Robby, Kansas State University 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 retain the above copyright notice, this list of cond...
sireum/v3-runtime
library/shared/src/main/scala/org/sireum/Annotations.scala
Scala
bsd-2-clause
1,975
package org.jetbrains.plugins.scala.lang.autoImport import com.intellij.openapi.fileTypes.FileType import org.jetbrains.plugins.scala.worksheet.WorksheetFileType trait WorksheetFiles extends ScalaFiles { override protected def fileType: FileType = WorksheetFileType }
JetBrains/intellij-scala
scala/worksheet/test/org/jetbrains/plugins/scala/lang/autoImport/WorksheetFiles.scala
Scala
apache-2.0
272
package ch.cern.udf import org.apache.spark.sql.api.java._ import scala.math.{abs, cos, cosh, sin, sinh, sqrt} class DimuonMass extends UDF6[Float, Float, Float, Float, Float, Float, Float] { def call(m0_pt: Float, m0_eta: Float, m0_phi: Float, m1_pt: Float, m1_eta: Float, m1_phi: Float): Float = { val E = sqrt...
LucaCanali/Miscellaneous
Spark_Physics/Dimuon_mass_spectrum/scalaUDF/src/main/scala/ch/cern/udf/DimuonMass.scala
Scala
apache-2.0
411
package rescala.extra.encrdt.sync.p2p import com.github.plokhotnyuk.jsoniter_scala.core.{JsonValueCodec, readFromString, writeToString} import org.eclipse.jetty.websocket.api.exceptions.WebSocketTimeoutException import org.eclipse.jetty.websocket.api.{CloseStatus, Session, WebSocketAdapter, WebSocketBehavior} import r...
guidosalva/REScala
Code/Extensions/Replication/src/main/scala/rescala/extra/encrdt/sync/p2p/CrdtSyncWebSocketHandler.scala
Scala
apache-2.0
4,234
package spotlight.analysis.algorithm.business import com.github.nscala_time.time.Imports._ import com.persist.logging._ import com.typesafe.config.Config import net.ceedubs.ficus.Ficus._ import org.apache.commons.math3.stat.descriptive.StatisticalSummary import org.joda.{ time ⇒ joda } import spotlight.analysis.algori...
dmrolfs/lineup
core/src/main/scala/spotlight/analysis/algorithm/business/PastPeriodAverageAlgorithm.scala
Scala
mit
10,103
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
dotty-staging/scalatest
scalatest-test/src/test/scala/org/scalatest/ShouldNotShorthandSpec.scala
Scala
apache-2.0
47,715
package scalaprops import java.util.Arrays object TinyMT32Test extends Scalaprops { val testGetDefault = Property.forAll { var tiny = TinyMT32.getDefault(1) val c_data = List(0x97b6d625, 0x3a86e2e1, 0xdd7305b1, 0x8e4ef1b0, 0xd60a5515, 0xe3b751f6, 0x7e073136, 0x82e5df8b, 0xa5e6b3a8, 0x2d91deed) val...
scalaprops/scalaprops
scalaprops/src/test/scala/scalaprops/TinyMT32Test.scala
Scala
mit
6,823
// Failure of autotupling in the presence of overloaded functions. object Test { def compare(first: Any, second: Any): Any = { (first, second) match { case (k: Int, o: Int) => k compare o //why the next case matches (Float, Int) but does not match (Int, Float) ??? case (k: Number, o: Nu...
som-snytt/dotty
tests/disabled/not-representable/t2337.scala
Scala
apache-2.0
760
/** 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 ...
alex9311/PredictionIO
data/src/main/scala/org/apache/predictionio/data/store/Common.scala
Scala
apache-2.0
1,766
/** * Copyright (c) 2016 Intel Corporation  * * 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 applicabl...
aayushidwivedi01/spark-tk
sparktk-core/src/main/scala/org/trustedanalytics/sparktk/frame/internal/ops/join/JoinRight.scala
Scala
apache-2.0
2,980
package net.codejitsu.tasks.dsl import org.scalatest.{FlatSpec, Matchers} class ShellScriptTest extends FlatSpec with Matchers { import net.codejitsu.tasks._ import net.codejitsu.tasks.dsl.Tasks._ import scala.concurrent.duration._ implicit val timeout = 30 seconds implicit val stage = new Dev "shell ...
codejitsu/tasks
tasks-dsl/src/test/scala/ShellScriptTest.scala
Scala
apache-2.0
687
package forcomp object Anagrams { /** A word is simply a `String`. */ type Word = String /** A sentence is a `List` of words. */ type Sentence = List[Word] /** `Occurrences` is a `List` of pairs of characters and positive integers saying * how often the character appears. * This list is sorted al...
syhan/coursera
progfun1/forcomp/src/main/scala/forcomp/Anagrams.scala
Scala
gpl-3.0
6,485
/* *\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2015, Ga...
typelevel/squants
shared/src/main/scala/squants/motion/Pressure.scala
Scala
apache-2.0
3,767
package sttp.client3.circe import org.scalatest.concurrent.ScalaFutures import sttp.client3._ import sttp.client3.testing.SttpBackendStub import io.circe.generic.auto._ import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers class SttpBackendStubCirceTests extends AnyFlatSpec with Matc...
softwaremill/sttp
json/circe/src/test/scala/sttp/client3/circe/SttpBackendStubCirceTests.scala
Scala
apache-2.0
707
package exercices import support.HandsOnSuite class e06_currying extends HandsOnSuite { /** * Le mécanisme de curryfication permet de décomposer une fonction en appliquant de manière partielle ses paramètres * Le principe de curryfication peut être fait 'à la volée' ou alors explicitement dans la signatur...
loicknuchel/scala-class
src/test/scala/exercices/e06_currying.scala
Scala
unlicense
4,172
/* * This file is part of AckCord, licensed under the MIT License (MIT). * * Copyright (c) 2019 Katrix * * 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 ...
Katrix-/AckCord
data/src/main/scala/ackcord/util/JsonOption.scala
Scala
mit
6,343
package de.htwg.zeta.common.format.project.gdsl.shape.geoModel import de.htwg.zeta.common.models.project.gdsl.shape.geomodel.Point import de.htwg.zeta.common.models.project.gdsl.shape.geomodel.Polyline import de.htwg.zeta.common.models.project.gdsl.style.Style import play.api.libs.json.JsSuccess import play.api.libs.j...
Zeta-Project/zeta
api/common/src/test/scala/de/htwg/zeta/common/format/project/gdsl/shape/geoModel/PolylineFormatTest.scala
Scala
bsd-2-clause
2,458
package gust.linalg.cuda import org.scalameter.api._ import jcuda.jcublas.{cublasHandle, JCublas2} import gust.util.cuda import breeze.linalg.{DenseVector, DenseMatrix, LU, qr} /** * Created by piotrek on 31.05.2014. */ object CuMethodsTest extends PerformanceTest.Quickbenchmark { // this has to do for gener...
piotrMocz/gust
src/test/scala/gust/linalg/cuda/CuMethodsTest.scala
Scala
apache-2.0
3,717
package org.zalando.jsonapi.json.circe import org.zalando.jsonapi.json.JsonapiSupportSpec import org.zalando.jsonapi.model.RootObject import spray.httpx.marshalling.Marshaller import spray.httpx.unmarshalling.Unmarshaller class CirceJsonapiSupportSpec extends JsonapiSupportSpec { override def jsonapiSupportClassNam...
texvex/scala-jsonapi
src/test/scala/org/zalando/jsonapi/json/circe/CirceJsonapiSupportSpec.scala
Scala
mit
606
package minmax import Stream._ trait State[St<:State[St,Sc,T], Sc<:Score[Sc], T<:Table] extends Ordered[St] { val score: Sc val lastMove: Move val childs: List[St] def posibleStates(h: Heuristic[St,Sc,T]): Seq[St] def score(h: Heuristic[St,Sc,T]): St def updateScore(childs: Seq[St]): St d...
pauful/minmax
src/main/scala/minmax/MinMax.scala
Scala
gpl-3.0
1,203
package org.http4s package server package middleware import cats.effect._ import cats.implicits._ import fs2._ import java.io.ByteArrayOutputStream import java.util.zip.GZIPOutputStream import org.http4s.dsl.io._ import org.http4s.headers._ import org.scalacheck.Properties import org.scalacheck.Prop.forAll class GZip...
aeons/http4s
server/src/test/scala/org/http4s/server/middleware/GZipSpec.scala
Scala
apache-2.0
2,634
/* * Copyright 2009-2017. DigitalGlobe, 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 ...
ngageoint/mrgeo
mrgeo-core/src/main/scala/org/mrgeo/data/rdd/RasterRDD.scala
Scala
apache-2.0
1,154
package lila.message import org.joda.time.DateTime import ornicar.scalalib.Random import lila.user.User case class Thread( _id: String, name: String, createdAt: DateTime, updatedAt: DateTime, posts: List[Post], creatorId: String, invitedId: String, visibleByUserIds: List[String]) { ...
clarkerubber/lila
modules/message/src/main/Thread.scala
Scala
agpl-3.0
2,676
package code.snippet import scala.collection.mutable import scala.xml.NodeSeq import net.liftweb.http.RequestVar import net.liftweb.common.{Failure, Full, Empty, Box} import net.liftweb.http.js.JE._ import net.liftweb.http.js.JsCmds._ import net.liftweb.http.js.{JsExp, JsCmd, JsObj} import net.liftweb.json.Serializati...
htmldoug/ng-lift-proxy
src/main/scala/code/snippet/Angular.scala
Scala
apache-2.0
10,472
package akashic.storage.auth import akka.http.scaladsl.model.HttpRequest case class ParamList(unwrap: Seq[(String, String)]) { def find(k: String) = unwrap.find(_._1.toLowerCase == k.toLowerCase).map(_._2) } object ParamList { val empty = ParamList(Seq()) def fromRequest(req: HttpRequest) = { ParamList(req...
akiradeveloper/akashic-storage
src/main/scala/akashic/storage/auth/ParamList.scala
Scala
apache-2.0
340
package com.julienvey.trello object TrelloConfig { val memberName = "hungrybytes" val memberId = "5b15c866cd0e22df84e23b36" val applicationKey = "e87998229cfb001330e620e6934d37d7" val token = "eb9f49ff421546eae2830c49fb172f788f0153d7870d5cd2cb164b1fe0f12728" val boardId = "5b15c8a233e68e7cc44ca235" val to...
bywan/trello-java-wrapper
src/test/scala/com/julienvey/trello/TrelloConfig.scala
Scala
apache-2.0
407
package ildl package benchmark package deforest import org.scalameter.CurveData import org.scalameter.api._ import org.scalameter.Key import org.scalameter.DSL._ // // You can read about this benchmark on the following wiki page: // https://github.com/miniboxing/ildl-plugin/wiki/Sample-%7E-Deforestation // /** The b...
miniboxing/ildl-plugin
tests/benchmarks/src/ildl/benchmark/deforest/Benchmark.scala
Scala
bsd-3-clause
3,229
/* * 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
store/src/com/treode/store/atomic/ScanDeputy.scala
Scala
apache-2.0
1,300
/* This file is part of Octetoscope. Copyright (C) 2013-2014 Octetoscope contributors (see /AUTHORS.txt) 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 ...
SpecLad/Octetoscope
core/src/main/scala/ru/corrigendum/octetoscope/core/VersionInfo.scala
Scala
gpl-3.0
1,492
package com.rasterfoundry.api.project import com.rasterfoundry.api.utils.queryparams.QueryParametersCommon import com.rasterfoundry.datamodel._ import com.rasterfoundry.datamodel.GeoJsonCodec._ import com.rasterfoundry.database._ import com.rasterfoundry.akkautil._ import akka.http.scaladsl.model.StatusCodes import a...
aaronxsu/raster-foundry
app-backend/api/src/main/scala/project/ProjectLayerAnnotationRoutes.scala
Scala
apache-2.0
10,963
package com.twitter.finagle import com.twitter.finagle.thrift.ThriftClientRequest import com.twitter.util.Future import java.net.SocketAddress import org.apache.thrift.protocol.{TProtocolFactory, TBinaryProtocol} import org.jboss.netty.buffer.{ChannelBuffer, ChannelBuffers} // TODO: factor the *Rich traits into its o...
foursquare/finagle
finagle-thriftmux/src/main/scala/com/twitter/finagle/thriftmux/ThriftMuxServer.scala
Scala
apache-2.0
3,898
// Copyright (C) 2014 Open Data ("Open Data" refers to // one or more of the following companies: Open Data Partners LLC, // Open Data Research LLC, or Open Data Capital LLC.) // // This file is part of Hadrian. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in ...
opendatagroup/hadrian
hadrian/src/main/scala/com/opendatagroup/hadrian/lib/model/reg.scala
Scala
apache-2.0
49,938
import com.excilys.ebi.gatling.app.Gatling import com.excilys.ebi.gatling.core.config.GatlingPropertiesBuilder import com.excilys.ebi.gatling.core.util.PathHelper.path2string object Engine extends App { val props = new GatlingPropertiesBuilder props.dataDirectory(IDEPathHelper.dataDirectory) props.resultsDirect...
mindcandy/unfiltered-rest-gatling.g8
src/main/g8/$project__norm$-server/src/test-load/scala/Engine.scala
Scala
apache-2.0
731
/* Copyright 2015 Mate1 inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writ...
mate1/kafka-avro-tools
src/main/scala/com/mate1/kafka/avro/KafkaAvroProducer.scala
Scala
apache-2.0
3,146
/* * Copyright 2014 Joshua R. Rodgers * * 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...
Mr-Byte/Random-Redstone
core/src/main/scala/com/theenginerd/core/common/block/ModBlock.scala
Scala
apache-2.0
3,670
package scato import clazz._ import scala.language.implicitConversions // TODO Add `MaybeFunctions` and syntax trait Prelude extends data.DisjunctionFunctions { // Core Class // ========== type Applicative[F[_]] = clazz.Applicative[F] type Apply[F[_]] = clazz.Apply[F] type Bind[M[_]] = clazz.Bind[M] type...
aloiscochard/scato
prelude/src/main/scala/Prelude.scala
Scala
apache-2.0
2,699
package io.buoyant.admin.names import com.twitter.finagle.Service import com.twitter.finagle.http.{MediaType, Request, Response} import com.twitter.util.{Activity, Future} import io.buoyant.namer.{EnumeratingNamer, RichActivity} class BoundNamesHandler(namers: Seq[EnumeratingNamer]) extends Service[Request, Response]...
denverwilliams/linkerd
admin/src/main/scala/io/buoyant/admin/names/BoundNamesHandler.scala
Scala
apache-2.0
678
/** * This file is part of the "seeruk/scala-semver" project. * * Unless required by applicable law or agreed to in writing, software * distributed under the LICENSE is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * For the full copyright and licen...
SeerUK/scala-semver
src/main/scala/seeruk/semver/SemanticVersion.scala
Scala
mit
1,030
package org.bitcoins.node.networking.peer import _root_.org.scalatest.compatible.Assertion import org.bitcoins.core.protocol.blockchain.{Block, MerkleBlock} import org.bitcoins.core.protocol.transaction.Transaction import org.bitcoins.node.config.NodeAppConfig import org.bitcoins.testkit.BitcoinSTestAppConfig import o...
bitcoin-s/bitcoin-s-core
node-test/src/test/scala/org/bitcoins/node/networking/peer/MerkleBuffersTest.scala
Scala
mit
2,585
// Ranges // What do these lines do? val r1 = 1 to 10 val r2 = 1 until 10 val r3 = 1 until 10 by 3 val r4 = 1.0 until 2.0 by 0.1 r1.foreach(println) r2 foreach(println) // Drop the . r3 foreach println // Drop the . and () r4 foreach println // Side note: Why is dropping the . and () useful? // 1. Reduces clut...
deanwampler/SeductionsOfScalaTutorial
code-examples/ranges.scala
Scala
apache-2.0
714
/* * 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...
TiVo/kafka
core/src/test/scala/unit/kafka/server/AbstractFetcherManagerTest.scala
Scala
apache-2.0
8,803
/* Copyright 2009-2015 - Big Data Technologies S.R.L. All Rights Reserved. */ package org.supler.field import play.api.libs.json._ abstract class RenderHint(val name: String) { def extraJSON: List[(String, JsValue)] = Nil } case object BasicFieldPasswordRenderHint extends RenderHint("password") with BasicFieldCom...
aparo/scalajs-supler
supler/shared/src/main/scala/org/supler/field/RenderHint.scala
Scala
apache-2.0
2,677
import java.io.File import avrohugger._ import avrohugger.format.Standard import org.specs2._ class StandardGeneratorSpec extends mutable.Specification { "a Generator" should { "correctly generate a simple case class definition in a package" in { val infile = new java.io.File("avrohugger-core/src/test/...
ppearcy/avrohugger
avrohugger-core/src/test/scala/standard/StandardGeneratorSpec.scala
Scala
apache-2.0
12,153
package com.wuyuntao.aeneas.migration import java.util.Date import com.datastax.driver.core.Row import com.wuyuntao.aeneas.migration.dsl.DbModifier trait Migration { def version: Long def up(db: DbModifier) def down(db: DbModifier) } final case class MigrationInfo private (version: Long, name: St...
wuyuntao/Aeneas
aeneas-migration/src/main/scala/com/wuyuntao/aeneas/migration/Migration.scala
Scala
apache-2.0
619
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/nn/ops/Prod.scala
Scala
apache-2.0
1,938
package filodb.memory.format.vectors import java.nio.ByteBuffer import debox.Buffer import filodb.memory.format._ class DoubleVectorTest extends NativeVectorTest { describe("DoubleMaskedAppendableVector") { it("should append a list of all NAs and read all NAs back") { val builder = DoubleVector.appendi...
filodb/FiloDB
memory/src/test/scala/filodb.memory/format/vectors/DoubleVectorTest.scala
Scala
apache-2.0
15,133
/* * Copyright (c) 2013 Aviat Networks. * This file is part of DocReg+Web. Please refer to the NOTICE.txt file for license details. */ package vvv.docreg.util import java.sql.Timestamp import java.util.Date object T { def at(date: Date) = { new Timestamp(date.getTime) } def ago(duration: Long) = { ...
scott-abernethy/docreg-web
src/main/scala/vvv/docreg/util/T.scala
Scala
gpl-3.0
507
/* * 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 ...
jatin9896/incubator-carbondata
integration/spark2/src/main/scala/org/apache/carbondata/spark/util/CarbonSparkUtil.scala
Scala
apache-2.0
4,245
package models import java.security.SecureRandom import org.joda.time.DateTime import scalikejdbc._ import skinny.orm.SkinnyCRUDMapper import scala.util.Random case class OauthAccessToken( id: Long, accountId: Long, account: Option[Account] = None, oauthClientId: Long, oauthClient: Option[OauthClient] = N...
tsuyoshizawa/scala-oauth2-provider-example-skinny-orm
app/models/OAuthAccessToken.scala
Scala
mit
3,374
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
goldmedal/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/ui/ExecutionPage.scala
Scala
apache-2.0
5,409
package hstore import org.scalatest.funsuite.AnyFunSuite import org.scalatest.matchers.should.Matchers import pl.iterators.kebs.instances.time.mixins.InstantEpochMilliLong import pl.iterators.kebs.instances.time.{DayOfWeekInt, YearMonthString} import slick.lifted.Isomorphism class MapIsomorphismTest extends AnyFunSui...
theiterators/kebs
slick/src/test/scala/hstore/MapIsomorphismTest.scala
Scala
mit
7,326
/* * Copyright 2016 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 i...
nntnag17/dr-elephant-1
app/com/linkedin/drelephant/spark/legacydata/LegacyDataConverters.scala
Scala
apache-2.0
6,477
package ca.uqam.euler.nicolas object Problem067 { def main(args: Array[String]) = Answer { val lines = io.Source.fromFile("src/ca/uqam/euler/nicolas/scala/triangle.txt").getLines() Problem018.triangleSum(lines) } }
nicolaspayette/project-euler
src/main/scala/ca/uqam/euler/nicolas/Problem067.scala
Scala
mit
227
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.util import java.io.File import org.ensime.api.RawFile /** * String interpolation that automatically escapes known "bad" types * (such as `File` on Windows) and *ONLY* ...
VlachJosef/ensime-server
testutil/src/main/scala/org/ensime/util/EscapingStringInterpolation.scala
Scala
gpl-3.0
914
package com.eugene.impatience_scala import java.awt.{Point, Rectangle} import java.awt.geom.Ellipse2D import java.io.{FileInputStream, InputStream} /** * Created by eugene on 16/3/10. */ object Chap10 { def main(args: Array[String]) { // t1 // t4 t9 } trait RectangleLike{ ...
Ernestyj/ScalaStudy
src/com/eugene/impatience_scala/Chap10.scala
Scala
gpl-3.0
3,115
/* * 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 not u...
sgururajshetty/carbondata
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/longstring/VarcharDataTypesBasicTestCase.scala
Scala
apache-2.0
21,543
package com.github.agourlay.cornichon.json import com.github.agourlay.cornichon.core.CornichonError import org.parboiled2._ import scala.util.{ Failure, Success } import com.github.agourlay.cornichon.json.JsonPathParser._ class JsonPathParser(val input: ParserInput) extends Parser { def placeholdersRule = rule { ...
OlegIlyenko/cornichon
cornichon-core/src/main/scala/com/github/agourlay/cornichon/json/JsonPathParser.scala
Scala
apache-2.0
1,937
package scalax.collection package rdf import scalax.collection.GraphPredef._, scalax.collection.GraphEdge._ /** * Custom edge type representing RDF triples as directed edges. * * This representation does not relate predicates to subjects or objects * of other triples. Predicates are not checked ...
Calavoow/scala-graph
misc/src/main/scala/scalax/collection/rdf/TripleDiEdge.scala
Scala
bsd-3-clause
1,366
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/test/scala/org/neo4j/cypher/internal/compiler/v2_3/pipes/UndirectedDirectedRelationshipByIdSeekPipeTest.scala
Scala
apache-2.0
3,904
/* * Copyright (c) 2012-2016 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
snowplow/schema-guru
src/main/scala/com.snowplowanalytics/schemaguru/Common.scala
Scala
apache-2.0
8,552
package com.typesafe.slick.testkit.tests import org.junit.Assert._ import com.typesafe.slick.testkit.util.{JdbcTestDB, TestkitTest} class ExecutorTest extends TestkitTest[JdbcTestDB] { import tdb.profile.simple._ def test { class T(tag: Tag) extends Table[Int](tag, "t") { def a = column[Int]("a") ...
retronym/slick
slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/ExecutorTest.scala
Scala
bsd-2-clause
770
package jadecrawler.website import java.io.File import java.io.FileOutputStream import scala.language.postfixOps import sys.process.Process import jadeutils.common.Logging import org.apache.commons.lang.StringUtils.isNotBlank import org.json.JSONObject import org.jsoup.Jsoup import org.jsoup.nodes.Document import...
Jade-Shan/Jade-crawler
crawler-logic/src/main/scala/website/K1Parser.scala
Scala
gpl-3.0
5,771
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you...
asorianostratio/incubator-toree
communication/src/main/scala/org/apache/toree/communication/security/SignatureProducerActor.scala
Scala
apache-2.0
1,883
/* * 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 ...
shaneknapp/spark
sql/core/src/test/scala/org/apache/spark/sql/DataFrameAggregateSuite.scala
Scala
apache-2.0
53,509
package test4 class Test4 { def test() = { println("Test4") } } class Test05 { def test() = { println("Test5") } }
srz-zumix/wandbox-api
samples/command/src/scala/test3.scala
Scala
mit
149
package io.finch.endpoint import scala.reflect.ClassTag import cats.Id import cats.data.NonEmptyList import cats.effect.Sync import io.finch._ abstract private[finch] class Param[F[_], G[_], A](name: String)(implicit d: DecodeEntity[A], tag: ClassTag[A], protected val F: Sync[F] ) extends Endpoint[F, G[A...
finagle/finch
core/src/main/scala/io/finch/endpoint/param.scala
Scala
apache-2.0
3,161
package org.http4s package client package blaze import java.nio.ByteBuffer import java.nio.charset.StandardCharsets import java.util.concurrent.{ExecutorService, TimeoutException} import java.util.concurrent.atomic.AtomicReference import org.http4s.Uri.{Authority, RegName} import org.http4s.{headers => H} import org....
m4dc4p/http4s
blaze-client/src/main/scala/org/http4s/client/blaze/Http1Connection.scala
Scala
apache-2.0
12,861
// Copyright 2016, Martin Pokorny <martin@truffulatree.org> // // This Source Code Form is subject to the terms of the Mozilla Public License, // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2.0/. // package org.truffulatree.h2odb.sql import org.truff...
mpokorny/h2odb
src/main/scala/sql/DbRecord.scala
Scala
mpl-2.0
1,601
package org.jetbrains.sbt package resolvers import java.io._ import java.util.Properties import com.intellij.openapi.progress.ProgressIndicator import com.intellij.util.io.{DataExternalizer, EnumeratorStringDescriptor, PersistentHashMap} import org.apache.maven.index.ArtifactInfo import scala.collection.JavaConversi...
triggerNZ/intellij-scala
src/org/jetbrains/sbt/resolvers/SbtResolverIndex.scala
Scala
apache-2.0
5,806
package net.takasing import org.slf4j.LoggerFactory /** * @author takasing */ object Roop extends App { val logger = LoggerFactory.getLogger(this getClass) def logging(str : String) = { logger info str } def logging(x : Int) = { logger info x.toString } // for (i <- 1 to 5) { // logger info("H...
takasing/scala-playground
src/main/scala/net/takasing/Roop.scala
Scala
mit
630
/////////////////////////////////////////////////////////////////////////////// // DirichletUnigramLangModel.scala // // Copyright (C) 2010-2014 Ben Wing, The University of Texas at Austin // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with th...
utcompling/textgrounder
src/main/scala/opennlp/textgrounder/langmodel/DirichletUnigramLangModel.scala
Scala
apache-2.0
1,759
/* * 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...
SRGOM/scalatest
scalatest-test/src/test/scala/org/scalatest/AllOfContainMatcherSpec.scala
Scala
apache-2.0
11,979
/* * 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 ...
hequn8128/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/functions/utils/UserDefinedFunctionUtils.scala
Scala
apache-2.0
24,508
package com.github.romangrebennikov.columnize.engine /** * Created by shutty on 10/13/15. */ class QueryTransformer(schema:String) { }
shuttie/columnize
src/main/scala/com/github/romangrebennikov/columnize/engine/QueryTransformer.scala
Scala
bsd-2-clause
139
package arx.core /** * Created by IntelliJ IDEA. * User: nvt * Date: 5/5/12 * Time: 4:59 PM * Created by nonvirtualthunk */ @SerialVersionUID(1L) class CachedValue[T <: AnyRef] ( f : => T , ticksBetweenUpdates : Int = 100 ) extends Serializable { @transient var lastValue : T = null.asInstanceOf[T] @transient...
nonvirtualthunk/arx-core
src/main/scala/arx/core/CachedValue.scala
Scala
bsd-2-clause
3,884
package com.vk.connector.rparser import scala.util.{ Failure, Success } import org.parboiled2._ import scala.annotation.tailrec import org.parboiled2.ParserInput.apply import scala.io.StdIn class Calculator(val input: ParserInput) extends Parser { def InputLine = rule { Expression ~ EOI } def Expression: Rule1[I...
alexander-myltsev/scheme-parser
src/main/scala/com/vk/connector/rparser/Calculator.scala
Scala
apache-2.0
1,520
package org.aja.tej.examples.ml import org.aja.tej.utils.TejUtils import org.apache.spark.ml.classification.MultilayerPerceptronClassifier import org.apache.spark.ml.evaluation.MulticlassClassificationEvaluator import org.apache.spark.mllib.util.MLUtils import org.apache.spark.sql.SQLContext /** * Created by mageswa...
Mageswaran1989/aja
src/examples/scala/org/aja/tej/examples/ml/ANNet.scala
Scala
apache-2.0
2,506
package com.ecfront.ez.framework.service.jdbc import scala.annotation.StaticAnnotation /** * 实体注解,要持久化的对象必须应用此注解 * * @param desc 表注释 */ case class Entity(desc: String) extends StaticAnnotation /** * 唯一性 */ @scala.annotation.meta.field case class Unique() extends StaticAnnotation /** * 必需项 */ @scala....
gudaoxuri/ez-framework
services/jdbc/src/main/scala/com/ecfront/ez/framework/service/jdbc/Annotation.scala
Scala
apache-2.0
1,283