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-2015 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 which * accompanies this distribution and is ...
drackaer/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/iterators/FeatureAggregatingIterator.scala
Scala
apache-2.0
5,695
/* ************************************************************************************* * Copyright 2013 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
Kegeruneku/rudder
rudder-web/src/main/scala/com/normation/rudder/web/components/popup/CreateOrUpdateGlobalParameterPopup.scala
Scala
agpl-3.0
13,578
import scala.language.postfixOps object Test extends dotty.runtime.LegacyApp { // the function passed to flatMap produces lots of empty streams, but this should not overflow the stack val res = Stream.from(1).flatMap(i => if (i < 3000) Stream.empty else List(1)) println(res take 42 force) }
yusuke2255/dotty
tests/run/t498.scala
Scala
bsd-3-clause
296
// Copyright (c) 2013-2020 Rob Norris and Contributors // This software is licensed under the MIT License (MIT). // For more information see LICENSE or https://opensource.org/licenses/MIT package doobie package object specs2 { type Checker[M[_]] = analysisspec.Checker[M] type IOChecker = analysisspec.IOCheck...
tpolecat/doobie
modules/specs2/src/main/scala/doobie/specs2/package.scala
Scala
mit
459
package controllers import java.awt.geom.AffineTransform import java.awt.{RenderingHints, Graphics2D} import java.awt.image.{AffineTransformOp, RenderedImage, BufferedImage} import java.io._ import javax.imageio.ImageIO import javax.inject.Singleton import org.slf4j.{Logger, LoggerFactory} import play.api.libs.concur...
HiP-App/HiPBackend
app/controllers/FileController.scala
Scala
apache-2.0
4,898
package com.github.gigurra.glasciia import com.badlogic.gdx.files.FileHandle import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.graphics.Texture.TextureFilter import com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData import com.badlogic.gdx.graphics.g2d._ import com.badlogic.gdx.graphics.g2d.freetype....
GiGurra/glasciia
glasciia-core/src/main/scala/com/github/gigurra/glasciia/Font.scala
Scala
mit
4,031
/* * Copyright 2014 Frugal Mechanic (http://frugalmechanic.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
frugalmechanic/fm-http
src/main/scala/fm/http/server/StaticClasspathFileHandler.scala
Scala
apache-2.0
4,164
// filter: scala.runtime.BoxesRunTime.{1,2}unboxToInt // // noise from -XX:CompileCommand=exclude,scala/runtime/BoxesRunTime.unboxToInt // CompilerOracle: exclude scala/runtime/BoxesRunTime.unboxToInt // ### Excluding compile: static scala.runtime.BoxesRunTime::unboxToInt // import scala.reflect.runtime.universe._ impo...
martijnhoekstra/scala
test/files/run/t6411a.scala
Scala
apache-2.0
3,010
/* * * __________ ______ __ ________ _ __ ______ * /_ __/ __ \\/ _/ / / / / _/ __ \\/ | / / / ____/ * / / / /_/ // // / / / / // / / / |/ / / / __ * / / / _, _// // /___/ /____/ // /_/ / /| / / /_/ / * /_/ /_/ |_/___/_____/_____/___/\\____/_/ |_/ \\____/ *...
chan150/TrillionG
src/main/scala/kr/acon/util/HashFunctions.scala
Scala
apache-2.0
2,304
/** * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com> */ package akka.io import java.util.concurrent.atomic.AtomicBoolean import java.nio.ByteBuffer import annotation.tailrec trait BufferPool { def acquire(): ByteBuffer def release(buf: ByteBuffer) } /** * INTERNAL API * * A buffer pool whi...
Fincore/org.spark-project.akka
actor/src/main/scala/akka/io/DirectByteBufferPool.scala
Scala
mit
1,904
import java.io.FileWriter import java.util.TimeZone import java.util.concurrent.TimeUnit import org.apache.spark.sql._ import org.apache.spark.sql.types._ import queries.utils.{CoalesceAlg, Utility} object ShoweryPatternCounty { def main(args: Array[String]): Unit = { // var startLoad:Long = 0 // var endLoa...
ontop/ontop-examples
jair-2017-MTL-datalog/spark/mesowest/Imperative-Alg/ShoweryPatternCounty.scala
Scala
apache-2.0
11,913
package org.scaladebugger.api.profiles.scala210.info /** * Represents various rules and patterns used across Scala 2.10. */ object Rules { // Construct regex to handle different naming conventions // where the first group matches the desired name private lazy val ParsePatterns = Seq( // Grab tail end of or...
chipsenkbeil/scala-debugger
scala-debugger-api/src/main/scala/org/scaladebugger/api/profiles/scala210/info/Rules.scala
Scala
apache-2.0
938
package org.workcraft.services import java.io.File import org.workcraft.scala.effects.IO import java.io.InputStream object FileOpenService extends Service[GlobalScope, FileOpen] trait FileOpen { val sourceFormat: Format val description: String def open (file: File): IO[Option[FileOpenJob]] } case ...
tuura/workcraft-2.2
Core/src/main/scala/org/workcraft/services/FileOpenService.scala
Scala
gpl-3.0
391
package lille1.car3.tpRest.rejection import spray.routing._ import spray.http._ import StatusCodes._ import Directives._ import MediaTypes._ /** * Contient les redirections personnalisées servant à la gestion des cas d'erreurs lorsqu'une route renvoie une Rejection * * @author Gouzer Willian * @author Philipp...
JimiPepper/m1car_tp2
src/main/scala/lille1/car3/tpRest/rejection/RejectionHandlerRouting.scala
Scala
gpl-2.0
1,237
/* * Accio is a platform to launch computer science experiments. * Copyright (C) 2016-2018 Vincent Primault <v.primault@ucl.ac.uk> * * Accio 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...
privamov/accio
accio/javatests/fr/cnrs/liris/locapriv/ops/SpatialDistortionOpSpec.scala
Scala
gpl-3.0
3,217
/* * 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/bucketing/CoalesceBucketsInJoin.scala
Scala
apache-2.0
6,846
package org.openmole.gui.client package object core { def post(implicit context: PostContext) = Post(timeout = context.timeout, warningTimeout = context.warningTimeout, alert = context.alert) }
openmole/openmole
openmole/gui/client/org.openmole.gui.client.core/src/main/scala/org/openmole/gui/client/core/package.scala
Scala
agpl-3.0
201
package lert.test.integration import java.lang.Thread.sleep import java.nio.file.Files import org.apache.http.HttpHost import org.elasticsearch.client.RestClient class QueryStringMatcherIntegrationSpec extends ElasticSearchIntegrationSpec { it should "log all message and not duplicate" in { implicit val client...
l3rt/l3rt
integration-tests/src/test/scala/lert/test/integration/QueryStringMatcherIntegrationSpec.scala
Scala
apache-2.0
1,629
/** * Copyright (c) 2015, 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/LIC...
kamir/spark-timeseries
src/main/scala/com/cloudera/sparkts/GARCH.scala
Scala
apache-2.0
9,934
package bc125at case class ChannelStorage( banks: Map[Int, ChannelBank], length: Int, // There are 10 banks on the BC125AT defaultBankSize: Int) { def emptyBank = ChannelBank(Seq(), defaultBankSize) def write(i: Int) = banks.get(i) match { case Some(bank) => bank.writeFrom(bank.size * (i - 1)) ...
ashawley/bc125at-scala
src/main/scala/bc125at/ChannelStorage.scala
Scala
gpl-3.0
575
/*********************************************************************** * 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 ...
nagavallia/geomesa
geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/stats/CountStat.scala
Scala
apache-2.0
1,362
/** * @author Yuuto */ package yuuto.inventorytools.compat import cpw.mods.fml.common.Loader import yuuto.inventorytools.api.dolly.DollyHandlerRegistry import yuuto.inventorytools.api.dolly.handlers.ChestDollyTileHandler import yuuto.inventorytools.compat.handlers.JabbaBarrelBlockHandler import yuuto.inventorytools....
AnimeniacYuuto/InventoryTools
src/main/scala/yuuto/inventorytools/compat/CompatLoader.scala
Scala
gpl-3.0
2,242
package ui.scene import ui.GLContext import ui.arrayBuffer.{ElementBuffer, Float32Buffer} import ui.geometry.Geometry import ui.program.Program object Plane { def apply(glContext: GLContext, program: Program): SceneItem = { new SceneItem( program, Seq( new Float32Buffer(Seq( ...
gvatn/play-scalajs-webgl-spark
client/src/main/scala/ui/scene/Plane.scala
Scala
mit
485
package com.twitter.finagle.mux.util import io.netty.util.collection.IntObjectHashMap import java.util.BitSet import scala.annotation.tailrec import scala.collection.JavaConverters._ import scala.collection.immutable.Range import scala.collection.mutable.ListBuffer /** * A `TagMap` maintains a mapping between tags a...
twitter/finagle
finagle-mux/src/main/scala/com/twitter/finagle/mux/util/TagMap.scala
Scala
apache-2.0
4,408
package tv.camfire.media_server.signal /** * User: jonathan * Date: 4/30/13 * Time: 9:35 PM */ class Signal(val `type`: String, val data: String) {}
jgrowl/camfire-signaling
signaling-server/src/main/scala/tv/camfire/media_server/signal/Signal.scala
Scala
mit
167
/* * Copyright 2020 David Edwards * * 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...
davidledwards/zookeeper
zookeeper-cli/src/main/scala/com/loopfor/zookeeper/cli/command/Ls.scala
Scala
apache-2.0
3,683
package me.reminisce.stats.inserting import akka.actor._ import reactivemongo.api.DefaultDB import me.reminisce.stats.computing.ComputationService import me.reminisce.stats.model.ComputationMessages._ import me.reminisce.stats.model.Messages._ import me.reminisce.stats.model.InsertionMessages._ import me.reminisce.sta...
reminisceme/stats
src/main/scala/me/reminisce/stats/inserting/InsertionService.scala
Scala
apache-2.0
1,873
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2015, G...
garyKeorkunian/squants
shared/src/test/scala/squants/photo/LuminousEnergySpec.scala
Scala
apache-2.0
2,464
package org.broadinstitute.clio.transfer.model.arrays import java.time.OffsetDateTime import java.util.UUID import org.broadinstitute.clio.transfer.model.QueryInput import org.broadinstitute.clio.util.model.{ DocumentStatus, Location, RegulatoryDesignation } /* The Key and Metadata fields that can be queried. ...
broadinstitute/clio
clio-transfer-model/src/main/scala/org/broadinstitute/clio/transfer/model/arrays/ArraysQueryInput.scala
Scala
bsd-3-clause
1,252
package com.esri.dbscan import com.esri.dbscan.DBSCANStatus.DBSCANStatus import scala.collection.mutable import scala.collection.mutable.ArrayBuffer /** * A DBSCAN implementation. * * @param eps the neighborhood distance. * @param minPoints the minimum number of points in a neighborhood to start formin...
mraad/dbscan-spark
src/main/scala/com/esri/dbscan/DBSCAN.scala
Scala
apache-2.0
2,632
package scalaBasics.generics object Generics extends App { val animalCage = new Cage(new Animal()) val lionCage: Cage[Animal] = new Cage[Lion](new Lion()) println(lionCage.letOut().getClass) // val testCage = new Cage(5) }
Igerly/scalaBasics
src/scalaBasics/generics/Generics.scala
Scala
mit
239
import org.scalatest.Matchers._ import org.scalatestplus.play._ import org.scalatestplus.play.guice._ import play.api.Application import play.api.cache.ehcache.EhCacheModule import play.api.inject.guice.GuiceApplicationBuilder import play.api.test.Helpers._ import play.api.test._ /** Tests PhonebookController's respo...
EnoughTea/play-phonebook
test/PhonebookControllerSpec.scala
Scala
mit
1,497
import info.fotm.util.MathVector import org.scalatest._ class MathVectorSpec extends FlatSpec with Matchers { implicit val comparer = new org.scalactic.Equality[MathVector] { override def areEqual(a: MathVector, b: Any): Boolean = b.isInstanceOf[MathVector] && a.coords == b.asInstanceOf[MathVector].coor...
temeer/Fotm-Tem-Clone
util/src/test/scala/MathVectorSpec.scala
Scala
mit
1,552
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.server import akka.util.ByteString import org.ensime.api._ import org.ensime.util.EnsimeSpec class FramedStringProtocolSpec extends EnsimeSpec { // subclassed FramedSt...
espinhogr/ensime-server
server/src/test/scala/org/ensime/server/FramedStringProtocolSpec.scala
Scala
gpl-3.0
1,315
/* * 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...
wzhongyuan/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/mkldnn/JoinTable.scala
Scala
apache-2.0
4,977
/** * Copyright 2015, deepsense.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 applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
deeplang/src/main/scala/io/deepsense/deeplang/doperables/MultiColumnModel.scala
Scala
apache-2.0
6,053
/** * Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0 * See accompanying LICENSE file. */ package kafka.manager.utils import java.util.Properties import LogkafkaErrors._ import kafka.manager.BaseTest import kafka.manager.model.ActorModel import ActorModel.{LogkafkaIdentity} import kafka.ma...
krux/kafka-manager
test/kafka/manager/utils/TestCreateLogkafka.scala
Scala
apache-2.0
6,799
/** * Digi Configgy is a library for handling configurations * * Copyright 2009 Robey Pointer <robeypointer@gmail.com> * Copyright 2012-2014 Alexey Aksenov <ezh@ezh.msk.ru> * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You m...
ezh/digi-configgy
src/test/scala/org/digimead/configgy/ConfiggySpec.scala
Scala
apache-2.0
4,790
package chandu0101.scalajs.react.components package semanticui import chandu0101.macros.tojs.JSMacro import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.VdomElement import scala.scalajs.js import scala.scalajs.js.`|` /** * This file is generated - submit issues instead of PR against it */ case clas...
rleibman/scalajs-react-components
core/src/main/scala/chandu0101/scalajs/react/components/semanticui/SuiFormRadio.scala
Scala
apache-2.0
1,116
/* * 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 ...
ArvinDevel/onlineAggregationOnSparkV2
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateMutableProjection.scala
Scala
apache-2.0
4,072
package mesosphere.marathon package api.validation import com.wix.accord.validate import mesosphere.UnitTest import mesosphere.marathon.api.v2.AppNormalization import mesosphere.marathon.api.v2.Validation._ import mesosphere.marathon.api.v2.validation.AppValidation import mesosphere.marathon.core.health.{ MarathonHttp...
Caerostris/marathon
src/test/scala/mesosphere/marathon/api/validation/RunSpecValidatorTest.scala
Scala
apache-2.0
26,384
package com.github.eerohele.expek import java.io.StringReader import java.math.BigDecimal import java.net.URI import javax.xml.transform.stream.StreamSource import net.sf.saxon.s9api._ import scala.xml.Elem /** Methods for converting Java values into XML data model (XDM) values. */ object Any2Xdm { import utils...
eerohele/expek
src/main/scala/com/github/eerohele/expek/Any2Xdm.scala
Scala
mit
1,884
/* 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 use this f...
mandar2812/DynaML
dynaml-core/src/main/scala/io/github/tailhq/dynaml/optimization/GlobalOptimizer.scala
Scala
apache-2.0
1,236
package models.daos.slick import play.api.db.slick.Config.driver.simple._ object DBTableDefinitions { case class DBUser ( userID: String, firstName: Option[String], lastName: Option[String], fullName: Option[String], email: Option[String], avatarURL: Option[String], conektaUserId: Optio...
Wirwing/hello-conekta-play-framework
app/models/daos/slick/DBTableDefinitions.scala
Scala
mit
3,717
package sparkz.utils import org.apache.spark.rdd.RDD import org.joda.time.DateTime import scala.reflect.ClassTag import scalaz.Scalaz._ import scalaz.{Failure, Success, ValidationNel} case object Pimps { implicit class PimpedString(str: String) { def nonEmptyOption: Option[String] = str.nonEmpty.option(str) ...
gm-spacagna/sparkz
src/main/scala/sparkz/utils/Pimps.scala
Scala
apache-2.0
4,448
package sweet trait ParallelSweet extends Sweet { override def run(reporter: SweetReporter) { tests.toArray.par.foreach(_(reporter)) } }
joshcough/Sweet
src/main/scala/sweet/ParallelSweet.scala
Scala
lgpl-2.1
145
package dao.auth import javax.inject.Inject import models.Role import models.tenant.AuthCrewUser import play.api.db.slick.DatabaseConfigProvider import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future class RoleDAOImpl @Inject()(protected val dbConfigProvider: DatabaseConfigProvider...
thomastoye/speelsysteem
app/dao/auth/RoleDAOImpl.scala
Scala
gpl-2.0
785
/* * Copyright (c) 2014-2020 by The Monix Project Developers. * See the project homepage at: https://monix.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...
alexandru/monifu
monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ExecuteWithModelObservable.scala
Scala
apache-2.0
1,675
package extruder.instances import cats.Contravariant import extruder.core.Show trait ShowInstances { implicit val extruderStdInstancesForShow: Contravariant[Show] = new Contravariant[Show] { override def contramap[A, B](fa: Show[A])(f: B => A): Show[B] = fa.contramap(f) } }
janstenpickle/extruder
core/src/main/scala/extruder/instances/ShowInstances.scala
Scala
mit
285
package io.circe.yaml import io.circe.Json /** * Provides helpful syntax that is not specific to the SnakeYAML implementation. */ package object syntax { final class YamlSyntax(val tree: Json) extends AnyVal { def spaces2: String = Printer.spaces2.pretty(tree) def spaces4: String = Printer.spaces4.pretty...
circe/circe-yaml
src/main/scala/io/circe/yaml/syntax/package.scala
Scala
apache-2.0
531
package jp.co.bizreach.kinesis import com.amazonaws.ClientConfiguration import com.amazonaws.auth.AWSCredentialsProvider import com.amazonaws.handlers.AsyncHandler import com.amazonaws.regions.Regions import com.amazonaws.services.kinesis.{AmazonKinesisAsync => AWSKinesisAsync, AmazonKinesisAsyncClientBuilder} import ...
bizreach/aws-kinesis-scala
core/src/main/scala/jp/co/bizreach/kinesis/AmazonKinesisAsync.scala
Scala
apache-2.0
6,167
/* * 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 ...
bowenli86/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/physical/batch/BatchExecSortLimitRule.scala
Scala
apache-2.0
4,070
/* * 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 ...
bharathkk/samza
samza-core/src/main/scala/org/apache/samza/job/local/ProcessJob.scala
Scala
apache-2.0
4,820
// Checks that divergence checking works before going into // recursions. case class E(x: E | Null) given e as E(null) object Test extends App { given f(using e: E) as E(e) assert(summon[E].toString == "E(E(null))") }
som-snytt/dotty
tests/run/implied-divergence.scala
Scala
apache-2.0
226
package com.github.nscala_time.time import com.github.nscala_time.time.Imports._ import org.scalacheck.{Prop, Properties} object RichStringSpec extends Properties("RichString"){ property("String to DateTime") = Prop.secure { "2012-08-08".toDateTime == new DateTime("2012-08-08") } property("String to DateT...
xuwei-k/nscala-time
src/test/scala/RichStringSpec.scala
Scala
apache-2.0
1,494
/* # Copyright 2016 Georges Lipka # # 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 wri...
glipka/Easy-React-With-ScalaJS
src/main/scala/com/glipka/easyReactJS/react/jsx/IntrinsicElement.scala
Scala
apache-2.0
10,334
package knot.net.http.rendering import knot.data.ByteNode import org.scalatest.FunSpec import org.scalatest.Matchers._ class RenderingSpec extends FunSpec { describe("StringRendering") { it("success") { val t = new TestRenderable() t.render(StringRendering()).result() should be("ab, cde") } } ...
defvar/knot
knot-net/src/test/scala/knot/net/http/rendering/RenderingSpec.scala
Scala
mit
807
package adtoyou.spark.analysis import adtoyou.spark.analysis.common.Md5Partitioner import com.redislabs.provider.redis.{RedisConfig, RedisNode} import org.apache.spark.SparkContext import org.apache.spark.rdd.RDD import redis.clients.jedis.{Jedis, JedisPoolConfig, JedisShardInfo, ShardedJedisPool} import redis....
7u/spark-learning
azkaban/azprojects/analysis-spark/src/main/scala/adtoyou/spark/analysis/RedisFunctions.scala
Scala
apache-2.0
6,435
package domain case class PublicImage(display: String, image: String, tags: Seq[String])
dit4c/dit4c
dit4c-portal/app/domain/PublicImage.scala
Scala
mit
89
/* Copyright 2016-2019 UniCredit S.p.A. * * 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 wr...
unicredit/lethe
apps/src/main/scala/unicredit/lethe/Save.scala
Scala
apache-2.0
1,188
/* * #%L * GatlingCql * %% * Copyright (C) 2014 Mikhail Stepura * %% * 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...
infomaven/GatlingCql
src/test/scala/io/github/gatling/cql/PreparedCqlStatementSpec.scala
Scala
mit
2,573
package scodec package codecs import java.nio.ByteBuffer import scalaz.\\/ import scalaz.syntax.std.either._ import scodec.bits.{ BitVector, ByteOrdering } private[codecs] final class FloatCodec(ordering: ByteOrdering) extends Codec[Float] { private val byteOrder = ordering.toJava override def encode(value: Fl...
danielwegener/scodec
src/main/scala/scodec/codecs/FloatCodec.scala
Scala
bsd-3-clause
727
package edu.gemini.spModel.target.env import edu.gemini.spModel.target.env.Indexable._ import org.scalacheck.Prop.forAll import org.specs2.ScalaCheck import org.specs2.mutable.Specification import scalaz._, Scalaz._ class OptsListSpec extends Specification with ScalaCheck with Arbitraries { "OptsList" should { ...
spakzad/ocs
bundle/edu.gemini.pot/src/test/scala/edu/gemini/spModel/target/env/OptsListSpec.scala
Scala
bsd-3-clause
6,606
package io.udash.web.guide.views.ext.demo.bootstrap import io.udash.web.guide.demos.AutoDemo import io.udash.web.guide.styles.partials.GuideStyles import scalatags.JsDom.all._ object AlertsDemo extends AutoDemo { private val (rendered, source) = { import io.udash._ import io.udash.bootstrap._ import Bo...
UdashFramework/udash-core
guide/guide/.js/src/main/scala/io/udash/web/guide/views/ext/demo/bootstrap/AlertsDemo.scala
Scala
apache-2.0
2,088
package stronghold.strings /** * problem description: http://rosalind.info/problems/lcsq/ */ object FindingASharedSplicedMotif { object SampleData { val sample: List[String] = List( ">Rosalind_23", "AACCTTGG", ">Rosalind_64", "ACACTGTGA" ) } import scala.ann...
ghostrider77/Bioinformatics
Bioinformatics/src/main/scala-2.11/stronghold/strings/FindingASharedSplicedMotif.scala
Scala
mit
2,578
package io.circe import cats.data.{NonEmptyList, Validated} import scala.deriving.{ArrayProduct, Mirror} import scala.collection.mutable.WrappedArray import scala.compiletime.{constValue, erasedValue, error, summonFrom} object Derivation { inline final def summonLabels[T <: Tuple]: Array[String] = summonLabelsRec[...
travisbrown/circe
modules/core/shared/src/main/scala-0/io/circe/Derivation.scala
Scala
apache-2.0
10,897
package controllers.s_eligibility import org.specs2.mutable._ import utils.pageobjects.third_party.GThirdPartyPage import utils.{WithJsBrowser, WithBrowser} import utils.pageobjects.common.ErrorPage import utils.pageobjects.{PageObjects, TestData} import utils.pageobjects.s_eligibility._ import utils.pageobjects.s_cla...
Department-for-Work-and-Pensions/ClaimCapture
c3/test/controllers/s_eligibility/GApproveIntegrationSpec.scala
Scala
mit
3,948
/* * MIT License * * Copyright (c) 2016 Gonçalo Marques * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, ...
gonmarques/slick-repo
src/test/scala/com/byteslounge/slickrepo/test/sqlserver/SQLServerRepositoryTest.scala
Scala
mit
1,340
/* * The MIT License * * Copyright (c) 2017 Fulcrum Genomics LLC * * 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 us...
fulcrumgenomics/fgbio
src/test/scala/com/fulcrumgenomics/vcf/VariantMaskTest.scala
Scala
mit
5,928
/* autotomous encodes to .-..--------------..-..., which has 14 dashes in a row. Find the only word that has 15 dashes in a row. */ object bonus2 { def main(args: Array[String]): Unit = { val dash15 = "-" * 15 helper .getFile("https://raw.githubusercontent.com/dolph/dictionary/master/enable1.txt") ...
frankivo/dailyprogrammer
380/src/main/scala/bonus2.scala
Scala
gpl-3.0
547
package net.manub.embeddedkafka import org.apache.kafka.common.serialization.{ StringDeserializer, StringSerializer } import net.manub.embeddedkafka.EmbeddedKafka._ import org.apache.kafka.common.network.ListenerName import org.apache.kafka.common.security.auth.SecurityProtocol import scala.collection.JavaConvert...
manub/scalatest-embedded-kafka
embedded-kafka/src/test/scala/net/manub/embeddedkafka/EmbeddedKafkaObjectSpec.scala
Scala
mit
4,846
package spark.api.java.function abstract class FlatMapFunction[T, R] extends Function[T, java.lang.Iterable[R]] { @throws(classOf[Exception]) def call(x: T) : java.lang.Iterable[R] def elementType() : ClassManifest[R] = ClassManifest.Any.asInstanceOf[ClassManifest[R]] }
ankurdave/arthur
core/src/main/scala/spark/api/java/function/FlatMapFunction.scala
Scala
bsd-3-clause
279
/* * -╥⌐⌐⌐⌐ -⌐⌐⌐⌐- * ≡╢░░░░⌐\░░░φ ╓╝░░░░⌐░░░░╪╕ * ╣╬░░` `░░░╢┘ φ▒╣╬╝╜ ░░╢╣Q * ║╣╬░⌐ ` ╤▒▒▒Å` ║╢╬╣ * ╚╣╬░⌐ ╔▒▒▒▒`«╕ ╢╢╣▒ * ╫╬░░╖ .░ ╙╨╨ ╣╣╬░φ ╓φ░╢╢Å * ╙╢░░░░⌐"░░░╜ ╙Å░░░░⌐░░░░╝` * ``˚¬ ⌐ ˚˚⌐´ * * ...
Flipkart/connekt
commons/src/test/scala/com/flipkart/connekt/commons/tests/CommonsBaseTest.scala
Scala
mit
5,217
package com.geishatokyo.diffsql.parser.mysql import com.geishatokyo.diffsql.ast._ import com.geishatokyo.diffsql.parser.SQLParser /** * Created by takezoux2 on 15/06/30. */ trait PartitionParsers { self: SQLParser => def CreatePatitionByAlter = "ALTER" ~ "TABLE" ~> name ~ partition <~ opt(";") ^^ { case tabl...
geishatokyo/diff-sql-table
parser/src/main/scala/com/geishatokyo/diffsql/parser/mysql/PartitionParsers.scala
Scala
mit
3,787
/* * Copyright 2020 Precog Data * * 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 ...
djspiewak/quasar
ejson/src/main/scala/quasar/ejson/TemporalKeys.scala
Scala
apache-2.0
921
package config import java.io.File import ecdc.crypto.CmsDecryptor import model.Cluster import org.scalatest.mock.MockitoSugar import testutils.Spec class FileSystemConfigResolverSpec extends Spec with MockitoSugar { val cmsDecryptor = mock[CmsDecryptor] it should "resolve env vars" in { val fsr = new File...
benfrasersimpson/ecdc
src/core/src/test/scala/config/FileSystemConfigResolverSpec.scala
Scala
isc
1,224
package models.region import models.utils.MyPostgresDriver.simple._ import play.api.Play.current case class RegionType(regionTypeId: Int, regionType: String) class RegionTypeTable(tag: Tag) extends Table[RegionType](tag, Some("sidewalk"), "region_type") { def regionTypeId = column[Int]("region_type_id", O.PrimaryKe...
danZzyy/SidewalkWebpage
sidewalk-webpage/app/models/region/RegionType.scala
Scala
mit
780
package io.github.tailhq.dynaml.algebra import breeze.generic.UFunc import breeze.linalg.operators._ import breeze.linalg.scaleAdd import io.github.tailhq.dynaml.kernels /** * Created by mandar on 14/10/2016. */ object BlockedMatrixOps extends UFunc { /* * Addition operations * */ /** * Reference im...
mandar2812/DynaML
dynaml-core/src/main/scala/io/github/tailhq/dynaml/algebra/BlockedMatrixOps.scala
Scala
apache-2.0
6,145
package org.bitcoins.core.wallet.keymanagement sealed trait KeyManagerInitializeError extends Error object InitializeKeyManagerError { // todo add explanation of what good/bad entropy is final case object BadEntropy extends Error("Bad Entropy") with KeyManagerInitializeError final case class Encry...
bitcoin-s/bitcoin-s
core/src/main/scala/org/bitcoins/core/wallet/keymanagement/KeyManagerInitializeError.scala
Scala
mit
901
package com.sksamuel.akka.patterns import akka.actor.{Terminated, ActorRef, Actor} import scala.collection.mutable /** @author Stephen Samuel */ class WorkpileMaster extends Actor { val queue = mutable.Queue.empty[Any] val workers = mutable.Queue.empty[ActorRef] def receive = { case WorkerReady(worker) =...
stoopbrain/akka-patterns
src/main/scala/com/sksamuel/akka/patterns/WorkpileMaster.scala
Scala
apache-2.0
1,027
package org.scalaide.core.internal.jdt.search import java.{ util => ju } import scala.collection.mutable.ArrayBuffer import scala.tools.nsc.symtab.Flags import org.eclipse.jdt.core.compiler.CharOperation import org.eclipse.jdt.core.search.IJavaSearchConstants import org.eclipse.jdt.internal.codeassist.ISearchRequestor...
dragos/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/core/internal/jdt/search/ScalaSelectionEngine.scala
Scala
bsd-3-clause
12,976
package org.fathens.colorworks.binarychain import java.io._ /** * 数値の読み込みのための抽象Trait */ trait NumberExpression[I] extends Expression { def bigEdian(i: Int, j: Int): BigInt = { def calc(bs: List[Byte], v: BigInt): BigInt = bs match { case Nil => v case b :: left => { val a = BigInt(b & 0xff...
sawatani/ColorWorks
src/main/scala/org/fathens/colorworks/binarychain/BasicalNumber.scala
Scala
mit
7,320
/* * DigiSSHD - DigiControl component for Android Platform * Copyright (c) 2012, Alexey Aksenov ezh@ezh.msk.ru. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public ...
ezh/android-component-DigiSSHD
src/main/scala/org/digimead/digi/ctrl/sshd/service/option/DSAPublicKeyEncription.scala
Scala
gpl-3.0
5,201
package org.broadinstitute.dsde.firecloud.test.notebooks import java.util.UUID import com.typesafe.scalalogging.LazyLogging import org.broadinstitute.dsde.firecloud.fixture.UserFixtures import org.broadinstitute.dsde.firecloud.page.workspaces.notebooks.WorkspaceNotebooksPage import org.broadinstitute.dsde.workbench.a...
broadinstitute/firecloud-ui
automation/src/test/scala/org/broadinstitute/dsde/firecloud/test/notebooks/NotebooksSpec.scala
Scala
bsd-3-clause
5,689
package com.simple.jdub import java.sql.ResultSet trait RawQuery[A] extends SqlBase { def sql: String def values: Seq[Any] def handle(results: ResultSet): A def apply(db: Database): A = db(this) }
SimpleFinance/jdub
src/main/scala/com/simple/jdub/RawQuery.scala
Scala
mit
210
package jp.que.ti.sv.scalatra.log import org.scalatra.ScalatraServlet import javax.servlet.http.HttpServletResponse import javax.servlet.http.HttpServletRequest import org.xml.sax.ErrorHandler import org.slf4j.LoggerFactory abstract class ServletLogSupport extends ScalatraServlet { private val log = LoggerFactory....
yangiYA/simple-validator
simple-valid4scalatra/src/main/scala/jp/que/ti/sv/scalatra/log/ServletLogSupport.scala
Scala
mit
1,309
/** * 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...
dmsuehir/spark-tk
sparktk-core/src/main/scala/org/trustedanalytics/sparktk/frame/internal/rdd/PythonJavaRdd.scala
Scala
apache-2.0
3,468
/** * 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...
jack6215/kafka
core/src/test/scala/unit/kafka/api/RequestResponseSerializationTest.scala
Scala
apache-2.0
17,875
/* * This file is part of Kiama. * * Copyright (C) 2008-2015 Anthony M Sloane, Macquarie University. * * Kiama 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 ...
solomono/kiama
core/src/org/kiama/attribution/Attribute.scala
Scala
gpl-3.0
1,387
/* * Copyright 2019 ACINQ SAS * * 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...
ACINQ/eclair
eclair-core/src/test/scala/fr/acinq/eclair/channel/states/a/WaitForAcceptChannelStateSpec.scala
Scala
apache-2.0
18,318
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
tzulitai/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/batch/BatchExecHashAggregateBase.scala
Scala
apache-2.0
6,214
package notebook.repl import notebook.OutputTypes._ import notebook.client.ExecuteRequest import notebook.repl.command_interpreters.CommandIntepreterType import notebook.util.Logging import scala.util.matching.Regex case class ReplCommand(outputType: String, replCommand: String) // A Helper to easily define classe...
andypetrella/spark-notebook
modules/kernel/src/main/scala/notebook/repl/command_interpreters/package.scala
Scala
apache-2.0
6,509
/* * 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 ...
matthewfranglen/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/util/ArrowUtilsSuite.scala
Scala
mit
3,361
package com.daxin.shangxiawenjieding.exercise /** * Dog的比较方法 */ class DogChooser[T: Ordering] { //Dog的比较方法 def chooseBeautifulDog(first: T, second: T): T = { val ord = implicitly[Ordering[T]] //只定义比较的结果,谁大谁小。没有定义具体规则,具体规则在DogPredef中定义,没有侵略性 if (ord.gt(first, second)) first else second } } /**...
Dax1n/Scala
implicitDemo/src/com/daxin/shangxiawenjieding/exercise/DogChooser.scala
Scala
apache-2.0
705
package com.ketilovre.server.handlers import akka.http.scaladsl.model.ws.{Message, TextMessage} import akka.stream.scaladsl.Flow class SocketHandler { val hello: Flow[Message, Message, Unit] = Flow[Message].map { case TextMessage.Strict(name) => TextMessage.Strict(s"Hello $name!") case _ ...
ketilovre/akka-http-macwire
src/main/scala/com/ketilovre/server/handlers/SocketHandler.scala
Scala
mit
381
/* * The MIT License (MIT) * * Copyright (c) 2014 MineFormers * * 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, ...
MineFormers/MFCore
src/main/scala/de/mineformers/core/util/Log.scala
Scala
mit
10,628
/* * The MIT License * * Copyright (c) 2015 Fulcrum Genomics LLC * * 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 us...
fulcrumgenomics/dagr
core/src/main/scala/dagr/core/tasksystem/Task.scala
Scala
mit
10,622
/* * 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...
fjsc/sparta
plugins/src/main/scala/com/stratio/sparta/plugin/cube/operator/lastValue/LastValueOperator.scala
Scala
apache-2.0
1,853
package edu.cmu.lti.oaqa.cse.configuration.test import scala.collection.JavaConverters._ import scala.collection.JavaConversions._ object DeepJavaConverter { implicit def deepMapAsScalaConverter[A, B](javaMap: java.util.Map[A, B]): Map[String, Any] = { def deepMapAsScalaConverter[A, B](javaMap: java.util.Map[A,...
oaqa/bagpipes-old
src/test/java/edu/cmu/lti/oaqa/cse/configuration/test/DeepJavaConverter.scala
Scala
apache-2.0
1,037
/* * 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/play-events
src/test/scala/uk/gov/hmrc/play/events/examples/ExampleAlertEvent.scala
Scala
apache-2.0
1,347