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 ghpages.examples import ghpages.GhPagesMacros import ghpages.examples.util.SingleSide import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.html_<^._ object AjaxExample2 { def content = SingleSide.Content(source, Main) val source = GhPagesMacros.exampleSource // EXAMPLE:START import ja...
japgolly/scalajs-react
ghpages/src/main/scala/ghpages/examples/AjaxExample2.scala
Scala
apache-2.0
3,212
/* * 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 ...
dszeto/incubator-predictionio
examples/scala-parallel-recommendation/reading-custom-events/src/main/scala/DataSource.scala
Scala
apache-2.0
3,990
/* * 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...
travisbrown/scalatest
src/main/scala/org/scalatest/ResourcefulReporter.scala
Scala
apache-2.0
1,647
/* * 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 ...
tophua/spark1.52
core/src/test/scala/org/apache/spark/storage/DiskBlockManagerSuite.scala
Scala
apache-2.0
3,344
// Copyright 2016 Duong Dang // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
duongdang/wiki-extraction
src/main/scala/com/github/duongdang/wikidata/WikidataParserApp.scala
Scala
apache-2.0
2,299
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
tillrohrmann/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/batch/sql/agg/GroupWindowITCase.scala
Scala
apache-2.0
28,631
package bifrost.api.http import akka.actor.{ActorRef, ActorRefFactory} import akka.http.scaladsl.server.Route import bifrost.history.BifrostHistory import bifrost.mempool.BifrostMemPool import bifrost.scorexMod.GenericWalletBox import bifrost.state.BifrostState import bifrost.transaction.box.{ArbitBox, BifrostBox, Pol...
Topl/Project-Bifrost
src/main/scala/bifrost/api/http/WalletApiRoute.scala
Scala
mpl-2.0
13,224
package com.github.vitalsoftware.scalaredox.client import org.joda.time.DateTime import com.github.vitalsoftware.util.JsonImplicits.jodaISO8601Format import com.github.vitalsoftware.macros._ @json case class AuthRequest(apiKey: String, secret: String) @json case class RefreshRequest(apiKey: String, refreshToken: Str...
vital-software/scala-redox
src/main/scala/com/github/vitalsoftware/scalaredox/client/AuthInfo.scala
Scala
mit
414
extension (x: Array[Char]) inline def swap(i: Int, j: Int) : Unit = val v = x(i) x(i) = x(j) x(j) = v @main def Test = val a = Array('A','B') a.swap(0, 1) assert(a.toList == List('B', 'A'))
dotty-staging/dotty
tests/run/i8058.scala
Scala
apache-2.0
212
package gitbucket.core.service import gitbucket.core.model.SshKey import gitbucket.core.model.Profile._ import profile.simple._ trait SshKeyService { def addPublicKey(userName: String, title: String, publicKey: String)(implicit s: Session): Unit = SshKeys insert SshKey(userName = userName, title = title, publi...
intermezzo-fr/gitbucket
src/main/scala/gitbucket/core/service/SshKeyService.scala
Scala
apache-2.0
638
package vuescale package scaladsl import scala.scalajs.js /** Base trait provides type alias for `js.ThisFunction` types. * * Currently it supports functions with up to 7 arguments. */ trait BoundFunctionTemplate[This] extends js.Object { type Callback0[R] = js.ThisFunction0[This, R] type Callback1[A, R] = js...
lettenj61/vuescale
vuescale-core/src/main/scala/vuescale/scaladsl/BoundFunctionTemplate.scala
Scala
mit
836
package mesosphere.marathon package core.task.tracker.impl import akka.Done import akka.stream.Materializer import akka.stream.scaladsl.Sink import com.typesafe.scalalogging.StrictLogging import mesosphere.marathon.core.instance.Instance import mesosphere.marathon.core.task.tracker.{InstanceTracker, InstanceTrackerCon...
gsantovena/marathon
src/main/scala/mesosphere/marathon/core/task/tracker/impl/InstancesLoaderImpl.scala
Scala
apache-2.0
1,787
package example import org.scalatra.ScalatraServlet class HomeController extends ScalatraServlet with DummyAuthenticationSupport{ before() { requireLogin() } get("/") { <html> <body> <h1>Hello, world!</h1> </body> </html> } }
sammyrulez/scalatra-bouncer
example/src/main/scala/example/HomeController.scala
Scala
mit
275
package se.gigurra.wallace.comm import java.util.concurrent.TimeUnit import scala.concurrent.duration.Duration /** * Created by kjolh on 11/28/2015. */ trait TopicClient[MessageType] { def subscribe( name: String, historySize: Int = 128, historyTimeout: Duration = Duration.apply(1, TimeUnit.HOURS)...
GiGurra/Wall-Ace
lib_comm/src/main/scala/se/gigurra/wallace/comm/TopicClient.scala
Scala
gpl-2.0
489
package io.sandbox.web.repository import io.sandbox.web.domain.Person import scalikejdbc._ object PersonRepository { def findAll()(implicit session: DBSession = AutoSession): List[Person] = { sql"select * from person".map(toPerson).list.apply() } def findOne(id: Int)(implicit session: DBSession = AutoSessi...
bakstad/scala_sandbox
src/main/scala/io/sandbox/web/repository/PersonRepository.scala
Scala
mit
549
package com.github.simonedeponti.play26lettuce import play.api.Configuration import play.cache.AsyncCacheApi /** Dependency-injection provider for [[play.cache.AsyncCacheApi]] wrapper * * @param configuration The application configuration * @param name The cache name (or "default" for the default one) */ cla...
simonedeponti/play26-lettuce
src/main/scala/com/github/simonedeponti/play26lettuce/JavaAsyncWrapperProvider.scala
Scala
bsd-3-clause
558
package com.shocktrade.datacenter.narratives.securities.yahoo.csv import java.lang.{Double => JDouble, Long => JLong} import java.util.Properties import com.ldaniels528.broadway.BroadwayNarrative import com.ldaniels528.broadway.core.actors.TransformingActor import com.ldaniels528.broadway.core.actors.kafka.KafkaPubli...
ldaniels528/shocktrade-broadway-server
src/main/scala/com/shocktrade/datacenter/narratives/securities/yahoo/csv/YFCsvSvcToKafkaNarrative.scala
Scala
apache-2.0
5,322
package org.jetbrains.plugins.scala.lang.psi.api import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.extensions.{ElementText, _} import org.jetbrains.plugins.scala.lang.psi.api.base.patterns.{ScConstructorPattern, ScInfixPattern} import org.jetbrains.plugins.scala.lang.psi.api.base.{ScConstructorInvo...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/api/statements/package.scala
Scala
apache-2.0
9,472
/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
dnatic09/scalate
scalate-war/src/test/scala/org/fusesource/scalate/console/ConsoleTest.scala
Scala
apache-2.0
2,425
/* * 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/main/scala/org/neo4j/cypher/internal/compiler/v2_3/planner/logical/steps/solveOptionalMatches.scala
Scala
apache-2.0
4,214
package im.actor.server import akka.actor._ import akka.contrib.pattern.DistributedPubSubExtension import akka.kernel.Bootable import akka.stream.ActorMaterializer import im.actor.server.activation.gate.{ GateCodeActivation, GateConfig } import im.actor.server.activation.internal.{ ActivationConfig, InternalCodeActiv...
lstNull/actor-platform
actor-server/actor-runner/src/main/scala/im/actor/server/Main.scala
Scala
mit
5,655
package ssscs.crawler import scala.collection.JavaConversions._ import java.text.SimpleDateFormat import java.util.Date import org.jsoup.Jsoup import org.jsoup.nodes._ import ssscs.{CrawlingConfig, ArticleInfo} class InfoCrawler(config: CrawlingConfig) { def crawlInfos(config: CrawlingConfig = config): Vector[Arti...
raincole/ssscs
src/main/scala/ssscs/crawler/InfoCrawler.scala
Scala
mit
2,578
/* * Licensed to SequoiaDB (C) under one or more contributor license agreements. * See the NOTICE file distributed with this work for additional information * regarding copyright ownership. The SequoiaDB (C) licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use t...
SequoiaDB/spark-sequoiadb
src/main/scala/com/sequoiadb/spark/SequoiadbFunctions.scala
Scala
apache-2.0
2,569
/* * 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 ...
yew1eb/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/runtime/batch/table/CalcITCase.scala
Scala
apache-2.0
23,189
package kuaixue.scala.book package kuaixue.scala.book.chapter5 { //类 }
slieer/scala-tutorials
src/main/scala/kuaixue/scala/book/chapter5/package.scala
Scala
apache-2.0
79
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
tomwhite/adam
adam-core/src/main/scala/org/bdgenomics/adam/rdd/read/realignment/IndelRealignmentTarget.scala
Scala
apache-2.0
7,400
package com.kakao.mango.telnet object TelnetClientTest extends App { val client = new TelnetClient("www.example.com", 80) client.send("GET / HTTP/1.1") client.send("Host: www.example.com") client.send("") client.onMessage(println) Thread.sleep(1000) client.close() }
kakao/mango
mango-core/src/test/scala/com/kakao/mango/telnet/TelnetClientTest.scala
Scala
apache-2.0
286
package liang.don.dzviewer.cache.java import collection.mutable.{HashMap, Map} import liang.don.dzviewer.tile.ImageTile import java.io._ import liang.don.dzviewer.cache.DeepZoomCache import liang.don.dzviewer.log.{LogLevel, Logger} /** * Implements the caching of DeepZoom image tiles onto the local hard disk. * * ...
dl2k84/DeepZoomViewer
src/liang/don/dzviewer/cache/java/DiskCache.scala
Scala
mit
3,083
/* * 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 ...
RSulzmann/openwhisk
core/controller/src/main/scala/org/apache/openwhisk/core/controller/Triggers.scala
Scala
apache-2.0
18,398
/* * 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 ...
tophua/spark1.52
sql/catalyst/src/main/scala/org/apache/spark/sql/types/DataTypeParser.scala
Scala
apache-2.0
4,670
/* Copyright 2009-2018 EPFL, Lausanne */ package inox package tip import smtlib.printer._ import smtlib.trees.Terms._ import smtlib.trees.Commands._ import smtlib.trees.TreeTransformer import smtlib.lexer.{Tokens => LT, _} import smtlib.extensions.tip.{Parser => SMTParser, Lexer => SMTLexer} object Tokens { import...
romac/inox
src/main/scala/inox/tip/TipExtensions.scala
Scala
apache-2.0
3,661
package org.genivi.sota.device_registry.daemon import java.time.Instant import org.genivi.sota.data.UpdateStatus import org.genivi.sota.device_registry.db.DeviceRepository import org.genivi.sota.messaging.MessageBusPublisher import org.genivi.sota.messaging.Messages.{DeviceUpdateStatus, UpdateSpec} import slick.drive...
PDXostc/rvi_sota_server
device-registry/src/main/scala/org/genivi/sota/device_registry/daemon/DeviceUpdateStatusListener.scala
Scala
mpl-2.0
1,108
package org.perftester.sbtbot import akka.actor.{Actor, ActorRef, ActorSystem, Props} import akka.testkit.TestProbe import SBTBot.{ExecuteTask, SBTBotReady, TaskResult} // Test class for SBTBot object SBTBotMain { def main(args: Array[String]): Unit = { implicit val actorSystem: ActorSystem = ActorSystem("test...
rorygraves/perf_tester
src/main/scala/org/perftester/sbtbot/SBTBotMain.scala
Scala
apache-2.0
1,595
package com.stackoverflow.lpiepiora class MyClass { def helloWorld(): String = { val tuple = (1, 2) "Hello World" + tuple } }
lpiepiora/stack-overflow
solutions/q-23904666/test-project/TestClass.scala
Scala
mit
140
/* * 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 ...
manuzhang/incubator-gearpump
core/src/main/scala/org/apache/gearpump/cluster/master/Master.scala
Scala
apache-2.0
11,480
package extracells.tileentity import appeng.api.AEApi import appeng.api.config.Actionable import appeng.api.networking.IGridNode import appeng.api.networking.energy.IEnergyGrid import appeng.api.networking.security.IActionHost import appeng.api.util.{AECableType, AEPartLocation, DimensionalCoord} import extracells.api...
ExtraCells/ExtraCells2
src/main/scala/extracells/tileentity/TileEntityVibrationChamberFluid.scala
Scala
mit
7,318
package stronghold.genomeAssembly /** * problem description: http://rosalind.info/problems/asmq/ */ object AssessingAssemblyQuality { object SampleData { val sample: List[String] = List( "GATTACA", "TACTACTAC", "ATTGAT", "GAAGA" ) } import scala.annotation.t...
ghostrider77/Bioinformatics
Bioinformatics/src/main/scala-2.11/stronghold/genomeAssembly/AssessingAssemblyQuality.scala
Scala
mit
1,716
package models.user import models.utils.MyPostgresDriver.simple._ import play.api.Play.current import java.sql.Timestamp import models.survey._ import models.daos.slick.DBTableDefinitions.{DBUser, UserTable} import scala.slick.lifted.ForeignKeyQuery case class UserSurveyOptionSubmission(userSurveyOptionSubmissionId: ...
ProjectSidewalk/SidewalkWebpage
app/models/user/UserSurveyOptionSubmission.scala
Scala
mit
2,123
/** * Labels to draw on map. * * @author Yujian Zhang <yujian{dot}zhang[at]gmail(dot)com> * * License: * GNU General Public License v2 * http://www.gnu.org/licenses/gpl-2.0.html * Copyright (C) 2014 Yujian Zhang */ package net.whily.android.history import android.graphics.{Canvas, Paint} import net.whi...
whily/history
src/main/scala/Label.scala
Scala
gpl-2.0
1,014
/* Copyright 2017-19, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
eaplatanios/tensorflow_scala
modules/api/src/test/scala/org/platanios/tensorflow/api/ops/OpSpec.scala
Scala
apache-2.0
19,602
package com.wordnik.client.model import com.wordnik.client.model.Credential case class Inline_response_200_9 ( data: List[Credential], success: Boolean )
QuantiModo/QuantiModo-SDK-Scalatra
src/main/scala/com/wordnik/client/model/Inline_response_200_9.scala
Scala
gpl-2.0
161
package core.search import com.sksamuel.elastic4s.ElasticDsl._ import com.sksamuel.elastic4s.QueryDefinition /** * Created by topy on 2016/2/18. */ class CommodityTypeFilter(cType: String) extends ElasticsearchFilter { override val queryDefinition: QueryDefinition = termQuery("commodityType", cType) } object Com...
Lvxingpai/Hanse
app/core/search/CommodityTypeFilter.scala
Scala
apache-2.0
402
package rescala.locking import scala.annotation.tailrec object Keychains { private def lockKeychains[R, InterTurn](k1: Key[InterTurn], k2: Key[InterTurn])(f: (Keychain[InterTurn], Keychain[InterTurn]) => R): R = { while (true) { val kc1 = k1.keychain val kc2 = k2.keychain val (first, second) ...
volkc/REScala
Main/jvm/src/main/scala/rescala/locking/Keychains.scala
Scala
apache-2.0
2,185
package fr.inria.hopla import scala.xml.{MetaData, Node} import scala.collection.mutable.ListBuffer import scala.collection.mutable import scala.Some /** * Created by JIN Benli on 26/03/14. * * Element is the first class container for storing all possible relation presented in * the original file, called by Parse...
rouvoy/hopla
hopla-toolchain/src/main/scala/fr/inria/hopla/XsdStructure.scala
Scala
apache-2.0
19,629
import scala.collection.JavaConverters._ import org.apache.lucene.analysis.Analyzer import org.apache.lucene.analysis.ja.JapaneseAnalyzer import org.apache.lucene.document.{Document, Field, StringField, TextField} import org.apache.lucene.index.{DirectoryReader, IndexWriter, IndexWriterConfig, Term} import org.apache....
kazuhira-r/lucene-examples
lucene-join/src/main/scala/LuceneJoin.scala
Scala
mit
9,251
package com.arcusys.learn.liferay.util import com.liferay.portal.kernel.util.Base64 object Base64Helper { def decode(data: String): Array[Byte] = Base64.decode(data) def stringToObject(data: String): Any = Base64.stringToObject(data) def objectToString(data: Any): String = Base64.objectToString(data) }
ViLPy/Valamis
learn-liferay620-services/src/main/scala/com/arcusys/learn/liferay/util/Base64Helper.scala
Scala
lgpl-3.0
312
package org.ucl.compgs04.scm import org.ucl.compgs04.model.FileLineHistory trait Scm { def historyForFile(filePath: String): FileLineHistory }
krivachy/git-line-history
src/main/scala/org/ucl/compgs04/scm/Scm.scala
Scala
mit
149
/*********************************************************************** * Copyright (c) 2013-2019 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...
elahrvivaz/geomesa
geomesa-convert/geomesa-convert-text/src/test/scala/org/locationtech/geomesa/convert/text/ValidatorTest.scala
Scala
apache-2.0
8,068
/* * Copyright (c) 2014-2021 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...
monifu/monix
monix-tail/shared/src/main/scala/monix/tail/internal/IterantDistinctUntilChanged.scala
Scala
apache-2.0
3,667
package com.github.tminglei.slickpg import java.util.UUID import slick.ast.{TableNode, TableExpansion, Select, ColumnOption} import slick.jdbc.JdbcModelBuilder import slick.jdbc.meta.MTable import slick.lifted.PrimaryKey import slick.driver.{PostgresDriver, JdbcDriver} import scala.concurrent.ExecutionContext import...
frosforever/slick-pg
core/src/main/scala/com/github/tminglei/slickpg/ExPostgresDriver.scala
Scala
bsd-2-clause
3,587
package com.wavesplatform.lang.v1.evaluator import cats.Id import cats.syntax.either._ import com.wavesplatform.common.state.ByteStr import com.wavesplatform.common.utils.EitherExt2 import com.wavesplatform.lang.ExecutionError import com.wavesplatform.lang.contract.DApp import com.wavesplatform.lang.contract.DApp.Veri...
wavesplatform/Waves
lang/shared/src/main/scala/com/wavesplatform/lang/v1/evaluator/ContractEvaluator.scala
Scala
mit
5,442
package com.twitter.finagle.netty4.http import com.twitter.finagle.http.exp.{Multipart, MultipartDecoder} import com.twitter.finagle.http.Request import com.twitter.io.Buf import com.twitter.util.StorageUnit import io.netty.handler.codec.http.multipart._ import scala.collection.mutable import scala.collection.JavaConv...
luciferous/finagle
finagle-netty4-http/src/main/scala/com/twitter/finagle/netty4/http/Netty4MultipartDecoder.scala
Scala
apache-2.0
1,742
package org.oxygen.redio.gui.components import java.awt.Color import net.minecraft.client.gui.{Gui, GuiScreen} import net.minecraftforge.fml.relauncher.{Side, SideOnly} import org.apache.commons.lang3.StringUtils import org.lwjgl.input.Keyboard import org.oxygen.redio.MonoFontRenderer import org.oxygen.redio.common.U...
chenzhuoyu/RedIO
src/main/scala/org/oxygen/redio/gui/components/GuiTextBox.scala
Scala
lgpl-2.1
11,472
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ // GENERATED CODE: DO NOT EDIT...
scala/scala
src/library/scala/jdk/FunctionWrappers.scala
Scala
apache-2.0
51,220
import akka.actor.{Props, ActorSystem, ActorRef} import scala.collection.mutable.ArrayBuffer import scala.concurrent.forkjoin.ThreadLocalRandom.{current => Random} import scala.util.{Random => BlockingRandom} import scalagen.actor._ import scalagen.genome.Genome import scalagen.message.Evaluated import scalagen.populat...
ppiotrow/scalagen
scalagen-examples/src/main/scala/BackpackExample.scala
Scala
apache-2.0
5,296
package io.iohk.ethereum.network.p2p.messages import akka.util.ByteString import io.iohk.ethereum.crypto._ import io.iohk.ethereum.domain.Account import io.iohk.ethereum.mpt.{BranchNode, ExtensionNode, HashNode, LeafNode, MptNode, NullNode} import io.iohk.ethereum.mpt.HexPrefix.{bytesToNibbles, encode => hpEncode} imp...
input-output-hk/etc-client
src/test/scala/io/iohk/ethereum/network/p2p/messages/NodeDataSpec.scala
Scala
mit
5,510
import com.uniformlyrandom.jello.{JelloFormat, JelloReader, JelloWriter, TypesLibrary} import org.scalatest.funspec.AnyFunSpec import scala.util.{Success, Try} class JelloFormatSpec extends AnyFunSpec { import TestClasses._ it("reading and writing case classes") { val formatter = JelloFormat.format[SimpleT...
uniformlyrandom/jello
jello/shared/src/test/scala/JelloFormatSpec.scala
Scala
mit
1,848
package net.truerss import java.io.File import java.nio.file.Files import net.truerss.tests.AllTestsTogether import org.specs2.specification.BeforeAfterAll import truerss.db.DbLayer import truerss.{AppInstance, AppRunner} import truerss.util.DbConfig class Sqlite3Tests extends AllTestsTogether with BeforeAfterA...
truerss/truerss
src/real/scala/net/truerss/Sqlite3Tests.scala
Scala
mit
1,061
package spark.streaming.dstream import spark.streaming.StreamingContext private[streaming] class PluggableInputDStream[T: ClassManifest]( @transient ssc_ : StreamingContext, receiver: NetworkReceiver[T]) extends NetworkInputDStream[T](ssc_) { def getReceiver(): NetworkReceiver[T] = { receiver } }
koeninger/spark
streaming/src/main/scala/spark/streaming/dstream/PluggableInputDStream.scala
Scala
bsd-3-clause
313
package intellij.haskell.external.component import intellij.haskell.external.component.HLintRefactoringsParser._ import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers class HLintRefactoringsParserSpec extends AnyFlatSpec with Matchers { val delete = "[Delete {rtype = Import, pos =...
rikvdkleij/intellij-haskell
src/test/scala/intellij/haskell/external/component/HLintRefactoringsParserSpec.scala
Scala
apache-2.0
3,266
package com.sandinh.soap import org.joda.time.DateTime import org.joda.time.format.DateTimeFormatter import org.joda.time.format.ISODateTimeFormat.{yearMonthDay, dateHourMinuteSecond} class SOAPDate(date: DateTime, dateFormatter: DateTimeFormatter) { override def toString = dateFormatter.print(date) def toDate = ...
Empia/corpreg
app/utils/com/sandinh/soap/SOAPDate.scala
Scala
apache-2.0
718
package breeze.math /* Copyright 2012 David Hall Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in w...
tjhunter/scalanlp-core
math/src/main/scala/breeze/math/Field.scala
Scala
apache-2.0
4,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 ...
rabbah/openwhisk
tests/src/test/scala/org/apache/openwhisk/core/entity/test/ActivationCompatTests.scala
Scala
apache-2.0
6,046
/* * 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 ...
paulcastro/openwhisk
tests/src/test/scala/services/KafkaConnectorTests.scala
Scala
apache-2.0
6,427
/* * Copyright 2012 Eike Kettner * * 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...
eikek/publet
doc/src/main/scala/org/eknet/publet/doc/PubletDocModule.scala
Scala
apache-2.0
1,178
package gg.uhc.hosts.endpoints.alerts import java.time.Instant import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.server.Directives.{as, complete, entity, handleRejections, provide, validate} import akka.http.scaladsl.server.{Directive0, Directive1, Route} import gg.uhc.hosts.{Alerts, CustomJsonCod...
Eluinhost/hosts.uhc.gg
src/main/scala/gg/uhc/hosts/endpoints/alerts/CreateAlertRule.scala
Scala
mit
1,747
/* * Copyright (C) 2016. envisia GmbH * All Rights Reserved. */ package de.envisia.postgresql.parsers import java.nio.ByteBuffer import de.envisia.postgresql.message.backend.ServerMessage trait MessageParser { def parseMessage(msg: ByteBuffer): ServerMessage }
schmitch/akka-pg
src/main/scala/de/envisia/postgresql/parsers/MessageParser.scala
Scala
apache-2.0
271
/* * Copyright 2018 Analytics Zoo 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...
intel-analytics/analytics-zoo
zoo/src/test/scala/com/intel/analytics/zoo/models/image/objectdetection/EvalUtilSpec.scala
Scala
apache-2.0
2,624
/* # 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/reactBootstrap/NavbarBrand.scala
Scala
apache-2.0
945
/* * 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 ...
tejasapatil/spark
external/avro/src/main/scala/org/apache/spark/sql/avro/AvroOptions.scala
Scala
apache-2.0
2,747
package scalax.collection import org.scalatest.matchers.should.Matchers import org.scalatest.refspec.RefSpec /** Editing hypergraphs with labeled edges, in particular, editing multi-hypergraphs. */ class EditingLabeledHyperSpec // TODO extends Suites() private class EditingLabeledHyperMutable extends RefSpec with ...
scala-graph/scala-graph
core/src/test/scala/scalax/collection/EditingLabeledHyperSpec.scala
Scala
apache-2.0
1,502
/** * 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...
superwaiwjia/spark-timeseries
src/test/scala/com/cloudera/sparkts/RebaseSuite.scala
Scala
apache-2.0
6,320
/* * @author Philip Stutz * @author Mihaela Verman * * Copyright 2012 University of Zurich * * 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/li...
gmazlami/dcop-maxsum
src/main/scala/com/signalcollect/interfaces/Inspectable.scala
Scala
apache-2.0
1,683
package mdtags object youtube { def apply(videoId: String, altText: String): link = link( s"http://www.youtube.com/watch?v=$videoId", image( s"http://img.youtube.com/vi/$videoId/0.jpg", altText ) ) def apply(videoId: String): link = apply(videoId, s"YouTube video #$videoId") }
timo-schmid/mdtags
src/main/scala/mdtags/youtube.scala
Scala
apache-2.0
312
package colossus.metrics.collectors import colossus.metrics.{CollectionMap, Collector, MetricAddress, MetricMap, MetricNamespace, MetricValue, TagMap} import scala.concurrent.duration._ /** * Metrics Collector which track Long values. * A single Counter instance divides counter values up by tag maps and track ea...
tumblr/colossus
colossus-metrics/src/main/scala/colossus/metrics/collectors/Counter.scala
Scala
apache-2.0
4,650
package com.twitter.finagle.mux import com.twitter.io.Buf /** * The mux spec allows for (re)negotiation to happen arbitrarily throughout a * session, but for simplicity, our implementation assumes it happens at the * start of a session. */ private[finagle] object Handshake { type Headers = Seq[(Buf, Buf)] /*...
luciferous/finagle
finagle-mux/src/main/scala/com/twitter/finagle/mux/Handshake.scala
Scala
apache-2.0
1,137
package scala.slick package lifted import scala.language.higherKinds /** Aliases for lifted embedding features. This trait can be mixed into aliasing * objects which simplify the use of the lifted embedding. */ trait Aliases { type Query[+E, U, C[_]] = lifted.Query[E, U, C] val Query = lifted.Query type Table...
nuodb/slick
src/main/scala/scala/slick/lifted/Aliases.scala
Scala
bsd-2-clause
2,825
/* * Copyright 2009-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...
ponkotuy/json4s
native/src/main/scala/org/json4s/native/JsonParser.scala
Scala
apache-2.0
11,347
/* * Shadowsocks - A shadowsocks client for Android * Copyright (C) 2014 <max.c.lv@gmail.com> * * 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 * (at y...
ray26/shadowsocks-android
src/main/scala/com/github/shadowsocks/ShadowsocksReceiver.scala
Scala
gpl-3.0
3,234
/* * 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.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
datamountaineer/stream-reactor
kafka-connect-redis/src/test/scala/com/datamountaineer/streamreactor/connect/redis/sink/config/RedisSinkSettingsTest.scala
Scala
apache-2.0
5,282
package de.htwg.sa.connectfour.model import org.scalatest._ import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class MatchfieldSpec extends WordSpec with Matchers { val (numberOfRows,numberOfColumns) = (6,7) "The Matchfield" when { "starting" should { ...
danielfranze/ConnectFourWeb
test/de/htwg/sa/connectfour/model/MatchfieldSpec.scala
Scala
mit
4,675
package co.ledger.wallet.web.ripple.core.utils import scala.scalajs.js /** * * OsHelper * ledger-wallet-ripple-chrome * * Created by Pierre Pollastri on 25/07/2016. * * The MIT License (MIT) * * Copyright (c) 2016 Ledger * * Permission is hereby granted, free of charge, to any person obtaining a...
LedgerHQ/ledger-wallet-ripple
src/main/scala/co/ledger/wallet/web/ripple/core/utils/OsHelper.scala
Scala
mit
2,216
/* * Copyright 2012-2013 Eligotech BV. * * 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 ...
CoderPaulK/eventsourced
es-journal/es-journal-hbase/src/main/scala/org/eligosource/eventsourced/journal/hbase/HBaseJournalProps.scala
Scala
apache-2.0
4,814
package section1 import org.scalatest.FunSuite class FuncSetSpec extends FunSuite { import FuncSet._ val a: Set = singleSet(10) val b: Set = singleSet(15) val c: Set = singleSet(-150) test("contains works with custom Set") { val s: Set = x => x == 12 assert( contains(s, 12) === true ) assert...
DarkToast/scala-workshop
workshop/src/test/scala/section1/FuncSetSpec.scala
Scala
mit
3,144
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
kevinyu98/spark
sql/core/src/main/scala/org/apache/spark/sql/Column.scala
Scala
apache-2.0
38,881
package org.vertx.scala.tests.core.http final class HttpTest extends HttpTestBase { val compression: Compression = Uncompressed }
galderz/mod-lang-scala
src/test/scala/org/vertx/scala/tests/core/http/HttpTest.scala
Scala
apache-2.0
135
/** * CSPFJ - CSP solving API for Java * Copyright (C) 2006 Julien VION * * This library 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 2.1 of the License, or (at your option) a...
concrete-cp/concrete
src/main/scala/concrete/Variable.scala
Scala
lgpl-2.1
2,375
/* * 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 ...
bdrillard/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceResolution.scala
Scala
apache-2.0
17,433
/* * Copyright 2015-2016 IBM 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 applicable law or agree...
CrowdFlower/incubator-openwhisk
common/scala/src/main/scala/whisk/common/HttpClient.scala
Scala
apache-2.0
1,384
package com.esri.dbscan object DBSCANProp extends Serializable { val INPUT_PATH = "input.path" val OUTPUT_PATH = "output.path" val DBSCAN_EPS = "dbscan.eps" val DBSCAN_MIN_POINTS = "dbscan.min.points" val DBSCAN_CELL_SIZE = "dbscan.cell.size" val DBSCAN_NUM_PARTITIONS = "dbscan.num.partitions" val FIELD_...
mraad/dbscan-spark
src/main/scala/com/esri/dbscan/DBSCANProp.scala
Scala
apache-2.0
432
sc.setLogLevel("INFO") val textFile = sc.textFile("README.md", 4) val words = textFile.flatMap(line => line.split("[\\\\s]+")) val realWords = words.filter(_.nonEmpty) val wordTuple = realWords.map(word => (word, 1)) wordTuple.cache() val groupBy = wordTuple.groupByKey(2) val wordCount = groupBy.mapValues(value => valu...
taewookeom/spark-shell-examples
Example08WordCountCache.scala
Scala
apache-2.0
532
/* * Copyright 2012 Twitter 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 agree...
rodzyn0688/zipkin
zipkin-server/src/main/scala/com/twitter/zipkin/storage/cassandra/SnappyCodec.scala
Scala
apache-2.0
2,005
package spark.scheduler /** * A task to execute on a worker node. */ abstract class Task[T](var stageId: Int) extends Serializable { def run(attemptId: Long): T def preferredLocations: Seq[String] = Nil var generation: Long = -1 // Map output tracker generation. Will be set by TaskScheduler. }
ankurdave/arthur
core/src/main/scala/spark/scheduler/Task.scala
Scala
bsd-3-clause
307
/* * 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 ...
yelshater/hadoop-2.3.0
spark-core_2.10-1.0.0-cdh5.1.0/src/main/scala/org/apache/spark/api/java/JavaRDDLike.scala
Scala
apache-2.0
21,510
package com.github.eklavya.thrust import java.util.concurrent.atomic.AtomicInteger import com.github.eklavya.thrust.Actions.{CALL, CREATE} import com.github.eklavya.thrust.Arguments._ import com.github.eklavya.thrust.Events.EXECUTE import com.github.eklavya.thrust.Methods._ import scala.collection.concurrent.TrieMap...
eklavya/scala-thrust
src/main/scala/com/github/eklavya/thrust/Menu.scala
Scala
apache-2.0
4,149
package org.jetbrains.plugins.scala package codeInspection.functionExpressions import com.intellij.codeInspection._ import com.intellij.openapi.project.Project import com.intellij.openapi.util.TextRange import com.intellij.psi.impl.source.codeStyle.CodeEditUtil import com.intellij.psi.impl.source.tree.TreeElement impo...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/codeInspection/functionExpressions/MatchToPartialFunctionInspection.scala
Scala
apache-2.0
7,045
package com.twitter.finagle.http import com.twitter.finagle.benchmark.StdBenchAnnotations import io.netty.handler.codec.http.QueryStringEncoder import java.nio.charset.Charset import java.util.{List => JList, Map => JMap} import org.openjdk.jmh.annotations._ @State(Scope.Benchmark) class ParamMapBenchmark extends Std...
twitter/finagle
finagle-benchmark/src/main/scala/com/twitter/finagle/http/ParamMapBenchmark.scala
Scala
apache-2.0
1,320
package mesosphere.marathon.state import javax.validation.Validation import com.google.common.collect.Lists import mesosphere.marathon.api.ModelValidation import mesosphere.marathon.MarathonSpec import mesosphere.marathon.health.HealthCheck import mesosphere.marathon.Protos.{ Constraint, ServiceDefinition } import me...
tnachen/marathon
src/test/scala/mesosphere/marathon/state/AppDefinitionTest.scala
Scala
apache-2.0
8,725
package org.locationtech.geomesa.core.process.tube import java.util.Date import com.vividsolutions.jts.geom._ import org.apache.log4j.Logger import org.geotools.data.Query import org.geotools.data.simple.{SimpleFeatureCollection, SimpleFeatureSource} import org.geotools.data.store.{EmptyFeatureCollection, ReTypingFea...
nhambletCCRI/geomesa
geomesa-core/src/main/scala/org/locationtech/geomesa/core/process/tube/TubeSelectProcess.scala
Scala
apache-2.0
7,541
/* * 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/blockchain/bitcoind/BitcoindService.scala
Scala
apache-2.0
8,793