code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
package org.talkingpuffin.ui import javax.swing.table.AbstractTableModel import twitter4j.{User, Status} case class UserAndStatus(user: User, retweetedUser: Option[User], status: Option[Status]) { def origUser = retweetedUser.getOrElse(user) def retweetingUser = if (retweetedUser.isDefined) Some(user) else None }...
dcbriccetti/talking-puffin
desktop/src/main/scala/org/talkingpuffin/ui/UserAndStatusProvider.scala
Scala
mit
435
package com.arcusys.learn.liferay.update.version270 import com.arcusys.learn.liferay.LiferayClasses.LUpgradeProcess import com.arcusys.learn.liferay.update.SlickDBContext import com.arcusys.learn.liferay.update.version270.slide.SlideTableComponent import com.arcusys.valamis.web.configuration.ioc.Configuration import c...
igor-borisov/valamis
learn-portlet/src/main/scala/com/arcusys/learn/liferay/update/version270/DBUpdater2729.scala
Scala
gpl-3.0
4,837
package example object X/*<=example.X.*/ { @deprecated/*=>scala.deprecated#*//*=>scala.deprecated#`<init>`().*/("to test -Xmaxwarn", since/*=>scala.deprecated#`<init>`().(since)*/ = "forever") def x/*<=example.X.x().*/ = 42 } trait T/*<=example.T#*/ { import X/*=>example.X.*/._ def `1`/*<=example.T#`1`().*/ ...
scalameta/scalameta
tests/jvm/src/test/resources/example/XmaxWarn.scala
Scala
bsd-3-clause
6,134
// Copyright 2017 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
google/bottlerocket
src/main/scala/bottlerocket/BottleRocketGenerator.scala
Scala
apache-2.0
1,745
// Generated by the Scala Plugin for the Protocol Buffer Compiler. // Do not edit! // // Protofile syntax: PROTO3 package scalapb.perf.protos object ProtosProto extends _root_.scalapb.GeneratedFileObject { lazy val dependencies: Seq[_root_.scalapb.GeneratedFileObject] = Seq( scalapb.options.ScalapbProto ) l...
trueaccord/ScalaPB
docs/src/main/scala/scalapb/perf/protos/ProtosProto.scala
Scala
apache-2.0
4,114
/** * Copyright © 2015, BoldRadius Solutions * * 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 ...
rahulkavale/akka-exchange
util/src/main/scala/com/boldradius/akka_exchange/domain/securities.scala
Scala
apache-2.0
2,301
package ohnosequences.tabula.impl import ohnosequences.cosas._, types._, properties._ import ohnosequences.tabula._, attributes._, conditions._, predicates._ import com.amazonaws.services.dynamodbv2.model.{AttributeValue, ScalarAttributeType, AttributeDefinition, ConditionalOperator} import com.amazonaws.services.dyn...
ohnosequences/tabula
src/main/scala/tabula/impl/ImplicitConversions.scala
Scala
agpl-3.0
4,469
package com.github.jarlakxen.scalatra.rest.queryable import org.junit.runner.RunWith import org.specs2.runner.JUnitRunner import org.specs2.mutable._ import javax.servlet.http.HttpServletRequest import org.scalatra.{ ScalatraServlet, ScalatraParams } import org.scalatra.test.specs2.MutableScalatraSpec import org.scala...
Jarlakxen/scalatra-rest
src/test/scala/com/github/jarlakxen/scalatra/rest/queryable/QueryableViewSupportSpec.scala
Scala
gpl-2.0
1,325
package com.cloudray.scalapress.plugin.gallery.vegas import javax.persistence._ import com.cloudray.scalapress.section.Section import scala.collection.JavaConverters._ import com.cloudray.scalapress.framework.ScalapressRequest import com.cloudray.scalapress.plugin.gallery.base.{Gallery, Image} import scala.Some import...
vidyacraghav/scalapress
src/main/scala/com/cloudray/scalapress/plugin/gallery/vegas/VegasSection.scala
Scala
apache-2.0
1,601
/* * 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/keras/autograd/math.scala
Scala
apache-2.0
20,405
/* * 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 ...
JerryLead/spark
core/src/main/scala/org/apache/spark/util/AccumulatorV2.scala
Scala
apache-2.0
14,704
package org.littlewings.infinispan.query import org.infinispan.query.Search import org.infinispan.query.dsl.{ Query, SortOrder } import org.scalatest.FunSpec import org.scalatest.Matchers._ class IndexLessQueryDslSpec extends FunSpec with InfinispanClusteredSpecSupport { private def sourceBooks: Seq[Book] = Ar...
kazuhira-r/infinispan-getting-started
embedded-query/src/test/scala/org/littlewings/infinispan/query/IndexLessQueryDslSpec.scala
Scala
mit
3,108
/* * Copyright (c) 2011, The Broad Institute * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, me...
iontorrent/Torrent-Variant-Caller-stable
public/scala/src/org/broadinstitute/sting/queue/util/PrimitiveOptionConversions.scala
Scala
mit
8,516
/* * Copyright 2019 Spotify AB. * * 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 ...
spotify/scio
scio-google-cloud-platform/src/main/scala/com/spotify/scio/bigquery/client/Jobs.scala
Scala
apache-2.0
1,476
/* * 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 ...
szhem/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InMemoryFileIndex.scala
Scala
apache-2.0
13,352
/* * Copyright 2001-2014 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 agreed to in ...
scalatest/scalatest
project/GenMustMatchersTests.scala
Scala
apache-2.0
7,083
/** * This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]]. */ // DO NOT EDIT MANUALLY package sbt.protocol.testing.codec import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError } trait EndTestGroupErrorEventFormats { self: sjsonnew.BasicJsonProtocol => implicit ...
Duhemm/sbt
testing/src/main/contraband-scala/sbt/protocol/testing/codec/EndTestGroupErrorEventFormats.scala
Scala
bsd-3-clause
1,201
package com.imaginea.activegrid.core.models import org.neo4j.graphdb.Node import org.slf4j.LoggerFactory /* * Created by nagulmeeras on 25/10/16. */ case class Filter(override val id: Option[Long], filterType: FilterType, values: List[String]) extends BaseEntity object Filter { ...
eklavya/activeGrid
src/main/scala/com/imaginea/activegrid/core/models/Filter.scala
Scala
apache-2.0
1,383
package im.actor.server.encryption import akka.actor._ import akka.event.Logging import akka.http.scaladsl.util.FastFuture import cats.instances.all._ import cats.syntax.all._ import cats.data.{ Xor, XorT } import im.actor.api.rpc.encryption._ import im.actor.cats.dbio._ import im.actor.server.db.DbExtension import im...
EaglesoftZJ/actor-platform
actor-server/actor-core/src/main/scala/im/actor/server/encryption/EncryptionExtension.scala
Scala
agpl-3.0
9,617
package com.julianpeeters.avro.annotations package provider package matchers import scala.reflect.macros.blackbox.Context import collection.JavaConversions._ import org.apache.avro.Schema import org.codehaus.jackson.JsonNode import org.codehaus.jackson.node._ object FromJsonMatcher { def getDefaultValue(field: S...
iulianu/avro-scala-macro-annotations
macros/src/main/scala/avro/scala/macro/annotations/provider/matchers/FromJsonMatcher.scala
Scala
apache-2.0
2,565
/** * * Crypto * Ledger wallet * * Created by Pierre Pollastri on 04/02/15. * * The MIT License (MIT) * * Copyright (c) 2015 Ledger * * 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 Softw...
LedgerHQ/ledger-wallet-android
app/src/main/scala/co/ledger/wallet/core/crypto/Crypto.scala
Scala
mit
2,187
/* Copyright The MITRE Corporation 2009-2010. All rights reserved. */ package org.mitre.jcarafe.posttagger class PostTok(val str: String) { override def toString = str }
wellner/jcarafe
jcarafe-ext/src/main/scala/org/mitre/jcarafe/posttagger/PostTok.scala
Scala
bsd-3-clause
179
/** * 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...
lindong28/kafka
core/src/main/scala/kafka/server/AbstractFetcherManager.scala
Scala
apache-2.0
9,411
package ua.edu.odeku.ceem.mapRadar.tools.radar.surface import com.google.common.primitives.Doubles import gov.nasa.worldwind.WorldWind import gov.nasa.worldwind.geom.{Sector, LatLon, Angle} import gov.nasa.worldwind.globes.{Earth, ElevationModel} import gov.nasa.worldwind.layers.RenderableLayer import gov.nasa.worldwi...
aleo72/ww-ceem-radar
src/main/scala/ua/edu/odeku/ceem/mapRadar/tools/radar/surface/SurfaceManager.scala
Scala
apache-2.0
10,766
package com.cloudray.scalapress.plugin.form.controller import org.springframework.stereotype.Controller import org.springframework.web.bind.annotation._ import org.springframework.beans.factory.annotation.Autowired import javax.servlet.http.{HttpServletResponse, HttpServletRequest} import org.springframework.web.multi...
vidyacraghav/scalapress
src/main/scala/com/cloudray/scalapress/plugin/form/controller/SubmissionController.scala
Scala
apache-2.0
3,466
package com.hm.khols.reccom.functional import com.twitter.scalding.TupleConversions import com.pragmasoft.scaldingunit.TestInfrastructure import scala.collection.mutable import com.hm.khols.reccom.ProdRecByPriceJob import com.hm.khols.reccom.schemas._ import com.hm.khols.reccom.test.data.TestData._ import org.junit....
linu2891/reccom.io
examples/src/test/scala/com/hm/khols/reccom/functional/ProdRecbyAvgPriceJobTest.scala
Scala
apache-2.0
1,726
package com.tribbloids.spookystuff.uav.actions import com.tribbloids.spookystuff.actions._ import com.tribbloids.spookystuff.row.SpookySchema /** * Do many things: * Globally * 1. add takeoff to the beginning of the trace if it is missing * * Locally * 2. replace Anchors.Home with UAVConf.home * 3. repl...
tribbloid/spookystuff
uav/src/main/scala/com/tribbloids/spookystuff/uav/actions/AutoTakeoffRule.scala
Scala
apache-2.0
1,146
/* * Copyright 2016 MongoDB, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
jCalamari/mongo-scala-driver
driver/src/test/scala/org/mongodb/scala/model/CollationAlternateSpec.scala
Scala
apache-2.0
2,339
package com.sksamuel.elastic4s.admin import com.sksamuel.elastic4s._ import com.sksamuel.elastic4s.analyzers.WhitespaceAnalyzer import org.scalatest.WordSpec import com.sksamuel.elastic4s.testkit.ElasticSugar class SettingsTest extends WordSpec with ElasticSugar with ElasticDsl { client.execute { createIndex("...
aroundus-inc/elastic4s
elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/admin/SettingsTest.scala
Scala
apache-2.0
1,286
/* * 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 ...
ashokblend/incubator-carbondata
integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/filterexpr/NullMeasureValueTestCaseFilter.scala
Scala
apache-2.0
2,213
package io.reactors import scala.collection._ /** Service that tracks different transports for remote communication. * * The most important method is `resolve`, which creates a channel from a * channel URL. This allows communication with reactors in non-local * reactor systems, e.g. in another process, or ...
storm-enroute/reactors
reactors-core/shared/src/main/scala/io/reactors/Remote.scala
Scala
bsd-3-clause
2,509
package rsgr import io.gatling.core.Predef._ import io.gatling.http.Predef._ import scala.concurrent.duration._ class RSGRSimulationAPI100 extends Simulation { object Browse { val headers_10 = Map("Content-Type" -> "application/json") // Note the headers specific to a given request // repeat is a loop reso...
JoshuaChi/RSGR-gatling-stress-testing
src/test/scala/rsgr/RSGRSimulationAPI100.scala
Scala
mit
1,172
package geek.lawsof.physics.lib.block.te.render import cpw.mods.fml.relauncher.{Side, SideOnly} import geek.lawsof.physics.Reference import geek.lawsof.physics.lib.block.te.render.model.CustomModelBase import net.minecraft.block.Block import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer import net...
GeckoTheGeek42/TheLawsOfPhysics
src/main/scala/geek/lawsof/physics/lib/block/te/render/CustomRendererBase.scala
Scala
mit
2,367
/* * Copyright (c) 2013-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 agr...
roberth/shapeless
core/src/test/scala/shapeless/tuples.scala
Scala
apache-2.0
51,244
/* * Copyright 2017 by Simba Project * * 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 agree...
InitialDLab/Simba
src/main/scala/org/apache/spark/sql/simba/SimbaSession.scala
Scala
apache-2.0
9,378
/* * Copyright (c) 2013-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.a...
atotech/snowplow
2-collectors/scala-stream-collector/src/test/scala/com.snowplowanalytics.snowplow.collectors.scalastream/CollectorServiceSpec.scala
Scala
apache-2.0
8,776
package object slickless extends HListShapeImplicits
underscoreio/slickless
src/main/scala/slickless/package.scala
Scala
apache-2.0
53
package org.jetbrains.plugins.hocon.highlight import com.intellij.icons.AllIcons import com.intellij.openapi.fileTypes.SyntaxHighlighterFactory import com.intellij.openapi.options.colors.{AttributesDescriptor, ColorSettingsPage} import org.jetbrains.plugins.hocon.highlight.{HoconHighlighterColors => HHC} import org.je...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/hocon/highlight/HoconColorSettingsPage.scala
Scala
apache-2.0
4,280
// Databricks notebook source exported at Sun, 19 Jun 2016 03:03:29 UTC // MAGIC %md // MAGIC // MAGIC # [Scalable Data Science](http://www.math.canterbury.ac.nz/~r.sainudiin/courses/ScalableDataScience/) // MAGIC // MAGIC // MAGIC ### prepared by [Raazesh Sainudiin](https://nz.linkedin.com/in/raazesh-sainudiin-4595...
raazesh-sainudiin/scalable-data-science
db/xtraResources/ProgGuides1_6/MLlibProgrammingGuide/dataTypes/004_DistributedMatrix.scala
Scala
unlicense
6,364
import sbt._ import Keys._ import play.Project._ object ApplicationBuild extends Build { val appName = "serversents" val appVersion = "1.0-SNAPSHOT" val appDependencies = Seq( // Add your project dependencies here, javaCore, javaJdbc, javaEbean ) val main = play.Project(appNam...
spamoc/SSETest
server/project/Build.scala
Scala
mit
417
package views.html.user.show import controllers.routes import lila.api.Context import lila.app.templating.Environment._ import lila.app.ui.ScalatagsTemplate._ import lila.common.paginator.Paginator import lila.game.{ Game, Pov } import lila.user.User object gamesContent { def apply( u: User, nbs: lila...
luanlv/lila
app/views/user/show/gamesContent.scala
Scala
mit
2,273
package com.arcusys.learn.liferay.update.version260 import com.arcusys.learn.liferay.LiferayClasses._ import com.arcusys.learn.liferay.services.{CompanyLocalServiceHelper, UserLocalServiceHelper} import com.arcusys.learn.liferay.util.PortalUtilHelper import com.arcusys.valamis.lrs.LrsType import com.arcusys.learn.life...
igor-borisov/valamis
learn-portlet/src/main/scala/com/arcusys/learn/liferay/update/version260/DBUpdater2507.scala
Scala
gpl-3.0
3,285
/* * 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 ...
houshengbo/openwhisk
common/scala/src/main/scala/org/apache/openwhisk/core/database/StoreUtils.scala
Scala
apache-2.0
5,131
/* * 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
tools/src/main/scala/org/apache/predictionio/tools/admin/CommandClient.scala
Scala
apache-2.0
5,074
/* * 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/test/scala/org/apache/spark/sql/execution/datasources/jdbc/connection/ConnectionProviderSuiteBase.scala
Scala
apache-2.0
2,839
package net.fehmicansaglam.bson.reader import java.nio.ByteBuffer import net.fehmicansaglam.bson.element.BsonLong case class BsonLongReader(buffer: ByteBuffer) extends Reader[BsonLong] { def read: Option[BsonLong] = { val name = readCString() val value = buffer.getLong() Some(BsonLong(name, value)) ...
danielwegener/tepkin
bson/src/main/scala/net/fehmicansaglam/bson/reader/BsonLongReader.scala
Scala
apache-2.0
324
/* * 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 ...
kl0u/flink
flink-scala/src/test/scala/org/apache/flink/api/scala/extensions/impl/acceptPartialFunctions/OnCrossDataSetTest.scala
Scala
apache-2.0
1,894
/* * 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
examples/src/test/scala/org/scalatest/examples/wordspec/fixturecontext/ExampleSpec.scala
Scala
apache-2.0
1,641
package spark.cassandra import spark.SparkContext import spark.SparkContext._ import spark.Logging import java.nio.ByteBuffer import spark.RDD import spark.SparkException import spark.TaskContext import org.apache.hadoop.mapred.HadoopWriter class CassContext(sc_ : SparkContext) extends Logging { initLogging() i...
kernel164/spark-cassandra
src/main/scala/spark/cassandra/CassContext.scala
Scala
apache-2.0
1,299
package controllers import javax.inject._ import actions._ import akka.stream.Materializer import be.objectify.deadbolt.scala.DeadboltActions import com.feth.play.module.pa.PlayAuthenticate import com.nappin.play.recaptcha.{RecaptchaVerifier, WidgetHelper} import constants.{SecurityRoleKey, SessionKey} import org.webj...
bravegag/play-authenticate-usage-scala
app/controllers/Application.scala
Scala
apache-2.0
10,534
package picasso.model.integer import scala.collection.GenSeq import picasso.graph._ import picasso.utils._ import picasso.utils.tools.armc._ /** Integer Program. * Integer program are use during the termination proof of DBP. * Right now their purpose is just these termination check (not safety). */ class Progr...
dzufferey/picasso
core/src/main/scala/picasso/model/integer/Program.scala
Scala
bsd-2-clause
11,549
import sbt._ object Dependencies { // Logging Support val log4j2Version = "2.6" val scalaLoggingVersion = "3.4.0" // Config Hocoon Support val typesafeConfigVersion = "1.3.0" // Test Support val scalaTestVersion = "2.2.6" // Metrics Support val scalaMetricsVersion = "3.5.4" lazy val catsV...
IsmailMarmoush/scala-samples
scalalang/project/Dependencies.scala
Scala
agpl-3.0
864
package scala.slick.memory import org.slf4j.LoggerFactory import scala.collection.mutable.{ArrayBuffer, HashMap} import scala.slick.ast._ import scala.slick.SlickException import scala.slick.util.{SlickLogger, Logging} import TypeUtil.typeToTypeUtil import java.util.regex.Pattern /** A query interpreter for the Memor...
retronym/slick
src/main/scala/scala/slick/memory/QueryInterpreter.scala
Scala
bsd-2-clause
18,307
import dispatch.{Request, Http, NoLogging, StatusCode, url} import cc.spray.json.{JsNull, JsonParser, DefaultJsonProtocol, JsValue} import RichJsValue._ import org.apache.commons.codec.digest.DigestUtils import org.apache.commons.codec.binary.{Hex, Base64} import java.io.{IOException, File, FileInputStream} import scal...
wangpeibin713/scala_study
scala_at_coursera/progfun-recfun/project/CourseraHttp.scala
Scala
gpl-2.0
10,049
package org.github.sguzman.scala.game.scalebra.util.log.help import org.github.sguzman.scala.game.scalebra.util.config.values.App /** * This case class holds all config information that will be included in log * message. It is information that is not known until the logging actually * happens. * * @param na...
sguzman/Scalebra
src/main/scala/org/github/sguzman/scala/game/scalebra/util/log/help/LogConfig.scala
Scala
mit
1,090
/** * 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...
MyPureCloud/kafka
core/src/test/scala/unit/kafka/controller/ReplicaStateMachineTest.scala
Scala
apache-2.0
16,824
/* * Copyright 2011-2022 GatlingCorp (https://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
gatling/gatling
gatling-core/src/main/scala/io/gatling/core/action/builder/TryMaxBuilder.scala
Scala
apache-2.0
1,274
package com.larry.da.jobs.userdigest import org.apache.spark.{SparkContext, SparkConf} /** * Created by larry on 14/12/15. */ object UserdigestTest { def main(args: Array[String]): Unit = { val conf = new SparkConf().setAppName("channelid-merge") conf.set("spark.serializer", "org.apache.spark.seria...
larry88/spark_da
src/main/scala/com/larry/da/jobs/userdigest/UserdigestTest.scala
Scala
gpl-2.0
769
package com.github.wildprairie.common.actors.world import akka.actor.Props /** * Created by jacek on 20.05.17. */ object CharacterIdentifierSupply { def props: Props = Props(classOf[CharacterIdentifierSupply]) final case class State(idCounter: Long, reservedNames: List[String]) sealed trait Cmd final c...
OpenWakfu/wildprairie
common/src/main/scala/com/github/wildprairie/common/actors/world/CharacterIdentifierSupply.scala
Scala
mit
1,537
package org.scalameta class FileLine(val file: sourcecode.File, val line: sourcecode.Line) { override def toString: String = { val shortFilename = file.value.replaceAll("(.*/|\\.scala)", "") Console.GREEN + s"$shortFilename:${line.value}" + Console.RESET } } object FileLine { implicit def generate(impli...
DavidDudson/scalameta
scalameta/common/shared/src/main/scala/org/scalameta/logger.scala
Scala
bsd-3-clause
1,242
package algorithms.machineLearning /** * Created by yujieshui on 2016/7/25. */ object CorrelationRegression { def pearsonProduct(x: Seq[Double], y: Seq[Double]) = { val x_mean = x.sum / x.size val y_mean = y.sum / y.size val omg = (x.map(_ - x_mean) zip y.map(_ - y_mean) map { case (xx, yy) => xx * ...
1178615156/hackerrank
src/main/scala/algorithms/machineLearning/CorrelationRegression.scala
Scala
apache-2.0
671
package scavlink.link.parameter import scavlink.link._ import scavlink.link.operation._ import scavlink.message.{From, Packet} import scavlink.message.common.{ParamRequestRead, ParamValue} case class GetNamedParameters(names: Set[String]) extends ParameterOp { require(names.size > 0) val actorType = classOf[GetNa...
nickolasrossi/scavlink
src/main/scala/scavlink/link/parameter/GetNamedParameters.scala
Scala
mit
1,895
/* * A real-time collaborative tool to develop files over the network. * Copyright (C) 2010 Mauro Ciancio and Leandro Gilioli * {maurociancio,legilioli} at gmail dot com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Publi...
maurociancio/parallel-editor
src/parallel-editor-common/src/main/scala/ar/noxit/paralleleditor/common/operation/NullOperation.scala
Scala
gpl-3.0
1,121
package daos import scala.concurrent.Future import javax.inject.Inject import models.{Category, CategoryTable} import play.api.db.slick.DatabaseConfigProvider import slick.driver.JdbcProfile import scala.concurrent.ExecutionContext.Implicits.global /** Implementation of CategoryDao that uses slick for db access */ ...
kdoomsday/doomcart
app/daos/CategoryDaoSlick.scala
Scala
unlicense
1,034
package org.apache.spark.sql.snowflake import net.snowflake.spark.snowflake.Utils import org.apache.spark.SparkContext import org.apache.spark.sql.{DataFrame, Encoder, SparkSession} import scala.reflect.runtime.universe.TypeTag import scala.util.Random class SFTestWrapperSparkSession(sc: SparkContext, sfConfigs: Map...
snowflakedb/spark-snowflake
src/it/scala/org/apache/spark/sql/snowflake/SFTestWrapperSparkSession.scala
Scala
apache-2.0
1,654
package epic.preprocess import java.io.{File, FilenameFilter, StringReader} import breeze.util.Iterators import epic.corpora.MascSlab import epic.slab._ import epic.trees.Span import scala.collection.mutable.ArrayBuffer @SerialVersionUID(1L) class TreebankTokenizer() extends Tokenizer with Serializable { overrid...
briantopping/epic
src/main/scala/epic/preprocess/TreebankTokenizer.scala
Scala
apache-2.0
3,411
package com.datamountaineer.streamreactor.connect.redis.sink.writer /* * Copyright 2017 Datamountaineer. * * 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...
datamountaineer/stream-reactor
kafka-connect-redis/src/test/scala/com/datamountaineer/streamreactor/connect/redis/sink/writer/RedisStreamTest.scala
Scala
apache-2.0
3,232
package com.twitter.finagle import com.twitter.conversions.time._ import com.twitter.finagle.builder.Cluster import com.twitter.finagle.service.Backoff import com.twitter.finagle.util.DefaultTimer import com.twitter.util.{Closable, Future, Duration, Timer, Var} import java.net.SocketAddress import java.util.concurrent...
yancl/finagle-6.22.0
finagle-core/src/main/scala/com/twitter/finagle/Group.scala
Scala
apache-2.0
5,814
/* * Copyright 2016 Nikolay Donets * * 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 ...
nikdon/telepooz
src/main/scala/com/github/nikdon/telepooz/engine/Webhook.scala
Scala
apache-2.0
5,586
package com.twitter.finagle.http.filter import com.twitter.conversions.DurationOps._ import com.twitter.finagle.Service import com.twitter.finagle.http.{Method, Request, Response, Status} import com.twitter.util.{Await, Future} import org.scalatest.FunSuite class MethodRequiredFilterTest extends FunSuite { val dum...
luciferous/finagle
finagle-http/src/test/scala/com/twitter/finagle/http/filter/MethodRequiredFilterTest.scala
Scala
apache-2.0
1,415
package com.teambytes.inflatable.raft.cluster import com.teambytes.inflatable.raft.protocol._ import org.scalatest.{BeforeAndAfterAll, Matchers, FlatSpecLike} import akka.remote.testkit.{MultiNodeConfig, MultiNodeSpec} import akka.util.Timeout import akka.actor.{Address, RootActorPath, ActorRef} import scala.concurren...
grahamar/inflatable
src/multi-jvm/scala/com/teambytes/inflatable/raft/cluster/RaftClusterSpec.scala
Scala
apache-2.0
3,300
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/library/scala/PartialFunction.scala
Scala
bsd-3-clause
12,746
package com.v_standard.vsp /** * テンプレート拡張トレイト。 */ trait TemplateExtension { } /** * デフォルトテンプレート拡張トレイト。 */ class DefaultTemplateExtension extends TemplateExtension { }
VanishStandard/vsp
src/main/scala/com/v_standard/vsp/TemplateExtension.scala
Scala
bsd-3-clause
237
package net.al3x.blog import java.io.File import scala.collection.{immutable, mutable} class Index(posts: Seq[Post]) extends FileHelpers { def indexBody = { var out = "" for (post <- posts) { out += post.htmlBody } out } lazy val index = templatizeFile(new File(Config.template), ...
al3x/simple-scala-blog
src/Index.scala
Scala
mit
513
/* * 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
core/src/test/scala/org/apache/spark/InternalAccumulatorSuite.scala
Scala
apache-2.0
10,002
/* * 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 ...
jkbradley/spark
mllib/src/test/scala/org/apache/spark/ml/classification/OneVsRestSuite.scala
Scala
apache-2.0
14,152
package org.locationtech.geomesa.plugin import org.apache.wicket.behavior.SimpleAttributeModifier import org.apache.wicket.markup.html.form.{Form, FormComponent} import org.apache.wicket.markup.html.panel.Panel import org.apache.wicket.model.{IModel, ResourceModel} import org.geoserver.web.data.store.StoreEditPanel im...
mcharles/geomesa
geomesa-plugin/src/main/scala/org/locationtech/geomesa/plugin/GeoMesaStoreEditPanel.scala
Scala
apache-2.0
2,919
/* Copyright 2009-2021 EPFL, Lausanne */ import stainless.lang._ import stainless.proof._ object Lists4 { sealed abstract class List[T] case class Cons[T](head: T, tail: List[T]) extends List[T] case class Nil[T]() extends List[T] def map[F,T](list: List[F], f: F => T): List[T] = list match { case Cons(h...
epfl-lara/stainless
frontends/benchmarks/verification/valid/MicroTests/Lists4.scala
Scala
apache-2.0
786
import gh2011.models.Repository import gh2013.models.{CommitRepository} import net.liftweb.json._ import org.scalatest.{FlatSpec, Matchers} class CommitRepositoryTest extends FlatSpec with Matchers { "A valid EventBody" must "be correctly parsed" in { val json = parse( """ | { |...
mgoeminne/github_etl
src/test/scala/gh/test/gh2013/model/CommitRepositoryTest.scala
Scala
mit
14,027
package com.dominikgruber.fpinscala.chapter03 import org.scalatest._ class Exercise03Spec extends FlatSpec with Matchers { "setHead" should "return List(1) if 1 gets set on Nil" in { List.setHead(1, Nil) should be (List(1)) } it should "return List(0, 2, 3) if 0 gets set on List(1, 2, 3)" in { List.se...
TheDom/functional-programming-in-scala
src/test/scala/com/dominikgruber/fpinscala/chapter03/Exercise03Spec.scala
Scala
mit
375
package net.softler.server import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.http.scaladsl.coding.{Deflate, Encoder, Gzip} import akka.http.scaladsl.model.HttpMethods._ import akka.http.scaladsl.model.TransferEncodings.{deflate, gzip} import akka.http.scaladsl.model.headers.`Access-Control-Allow...
Freshwood/akka-http-rest-client
client/akka-http/src/test/scala/net/softler/server/HttpServer.scala
Scala
mit
1,940
/* * 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 ...
dotunolafunmiloye/spark
streaming/src/main/scala/org/apache/spark/streaming/scheduler/StreamingListenerBus.scala
Scala
apache-2.0
3,567
package benchmarks import lift.arithmetic.SizeVar import ir._ import ir.ast._ import opencl.ir._ import opencl.ir.pattern._ @deprecated("Uses an old benchmark infrastructure", "") class SumAbsoluteValues(override val name: String, override val defaultInputSizes: Seq[Int], override va...
lift-project/lift
src/main/benchmarks/SumAbsoluteValues.scala
Scala
mit
4,680
package net.ssanj.dabble import scalaz._ sealed trait ExitCode { val code: Int } case object SuccessfulAction extends ExitCode { val code = 0} case object UnsuccessfulAction extends ExitCode { val code = -1 } //TODO: Replace with ER2 //TODO: Make this a list of messages case class ExecutionResult(message: Option[Str...
ssanj/dabble
src/main/scala/net/ssanj/dabble/Models.scala
Scala
mit
1,829
/* * 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
server/src/main/scala/com/stratio/crossdata/kryo/CrossdataRegistrator.scala
Scala
apache-2.0
1,720
/* * 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 ...
ahnqirage/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/DataSourceScanExec.scala
Scala
apache-2.0
21,130
/* * Licensed to Intel Corporation under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * Intel Corporation licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use t...
zhichao-li/BigDL
dl/src/test/scala/com/intel/analytics/bigdl/models/ModelforCheck.scala
Scala
apache-2.0
23,628
/** * 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/test/scala/io/deepsense/deeplang/params/PrefixBasedColumnCreatorParamSpec.scala
Scala
apache-2.0
1,482
package org.bitcoins.bundle.gui import akka.actor.ActorSystem import com.typesafe.config._ import grizzled.slf4j.Logging import org.bitcoins.bundle.gui.BundleGUI._ import org.bitcoins.commons.config.AppConfig import org.bitcoins.commons.util.{DatadirUtil, ServerArgParser} import org.bitcoins.core.api.node.InternalImpl...
bitcoin-s/bitcoin-s
app/bundle/src/main/scala/org/bitcoins/bundle/gui/LandingPaneModel.scala
Scala
mit
3,727
package examples object monadtransformer1 { }
adilakhter/scalaznoob
src/main/scala/examples/monadtransformer1.scala
Scala
apache-2.0
48
package vggames.webdev import vggames.shared.task.{ Tasks, TaskGroup } import vggames.shared.GameEngine import vggames.shared.task.TaskGroup import vggames.shared.task.Task import vggames.shared.task.status.Ok class WebdevGame extends GameEngine { val tasks = new Tasks( design ++ html ++ siteGenera...
vidageek/games
games/webdev/src/main/scala/vggames/webdev/WebdevGame.scala
Scala
gpl-3.0
3,824
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // Licence: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.indexer import java.sql.SQLException import akka.actor._ import akka.event.slf4j.SLF4JLogging import org.apache.commons.vfs2._ import org.ensime.api._ import org.ensime.i...
j-mckitrick/ensime-sbt
src/sbt-test/ensime-sbt/ensime-server/core/src/main/scala/org/ensime/indexer/SearchService.scala
Scala
apache-2.0
11,496
package reactivemongo.api.bson.collection import reactivemongo.api.{ CollectionMetaCommands, DB, FailoverStrategy, ReadPreference, Serialization } import reactivemongo.api.collections.GenericCollection /** * A Collection that interacts with the BSON library. */ private[reactivemongo] final class Collecti...
ReactiveMongo/ReactiveMongo
driver/src/main/scala-2.13-/api/bson/collection/CollectionImpl.scala
Scala
apache-2.0
747
package org.kimbasoft.akka.dispatcher import akka.actor.{Actor, Props} import org.kimbasoft.akka.dispatcher.DispatcherActor.Exceptions.IllegalRequestException import org.kimbasoft.akka.dispatcher.DispatcherActor.Messages.{DispatcherResponse, DispatcherRequest} import scala.util.{Failure, Try} /** * Missing document...
kimba74/sandbox-scala
src/main/scala/org/kimbasoft/akka/dispatcher/DispatcherActor.scala
Scala
gpl-3.0
1,042
package com.stovokor.editor.state import com.jme3.app.state.AppStateManager import com.jme3.app.Application import com.jme3.math.Vector3f import com.jme3.input.controls.ActionListener import com.jme3.input.KeyInput import com.jme3.input.controls.KeyTrigger import com.simsilica.lemur.input.AnalogFunctionListener import...
jcfandino/leveleditor
src/main/scala/com/stovokor/editor/state/EffectsState.scala
Scala
bsd-3-clause
2,352
package akka.http.extensions.utils import scala.collection.immutable.Map object BiMap { def apply[A,B](elems:(A,B)*): BiMap[A, B] ={ val mp = Map(elems:_*) val inv = Map(elems.map{case (key,value)=>value->key}:_*) DirectBiMap[A,B](mp,inv) } def empty[A,B]: BiMap[A, B] = DirectBiMap(Map.empty[A,B],...
denigma/akka-http-extensions
extensions/src/main/scala/akka/http/extensions/utils/BiMap.scala
Scala
mpl-2.0
1,716
package com.github.ldaniels528.trifecta.sjs.services import io.scalajs.npm.angularjs.Service import io.scalajs.npm.angularjs.http.{Http, HttpResponse} import scala.scalajs.js /** * Configuration Service * @author lawrence.daniels@gmail.com */ class ConfigService($http: Http) extends Service { /** * Retr...
ldaniels528/trifecta
app-js/src/main/scala/com/github/ldaniels528/trifecta/sjs/services/ConfigService.scala
Scala
apache-2.0
569
package extruder.metrics.dropwizard.keyed import extruder.cats.effect.EvalValidation import extruder.core.Encode import extruder.metrics.data.Metrics import io.dropwizard.metrics5.MetricRegistry trait DropwizardKeyedEncoder extends Encode { self: DropwizardKeyedDataSource => override type EncodeData = Metrics ove...
janstenpickle/extruder
metrics/dropwizard/src/main/scala/extruder/metrics/dropwizard/keyed/DropwizardKeyedEncoder.scala
Scala
mit
414
package metermen.client.util import java.io.PrintWriter import java.nio.file.Paths import com.jeff.dsl.util.Util._ import scala.collection.mutable.ListBuffer /** * Class to manage writing data down to a csv file. */ object CSVMan { def write(name: String, results: List[(String, List[Double])]): Unit = { ...
jregistr/Academia
CSC445-Computer-Networks/HW1/client/src/main/scala/metermen/client/util/CSVMan.scala
Scala
mit
911
/** * Copyright (C) 2009-2017 Lightbend Inc. <http://www.lightbend.com> */ package akka.actor import akka.actor.Deploy.{ NoDispatcherGiven, NoMailboxGiven } import akka.dispatch._ import akka.routing._ import scala.collection.immutable import scala.language.existentials import scala.reflect.ClassTag /** * Factor...
rorygraves/perf_tester
corpus/akka/akka-actor/src/main/scala/akka/actor/Props.scala
Scala
apache-2.0
6,968