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
/* * The MIT License (MIT) * <p/> * Copyright (c) 2016 SWEeneyThreads * <p/> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the right...
SweeneyThreads/Actorbase
src/main/scala/server/messages/query/user/RowMessages.scala
Scala
mit
5,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 ...
chenc10/Spark-PAF
core/src/main/scala/org/apache/spark/rpc/netty/NettyRpcCallContext.scala
Scala
apache-2.0
2,104
package techex.domain object notifications { } case class DeviceToken(value:String){ override def toString = "DeviceToken("+value.take(10)+")" } sealed trait NotificationTarget case class Android(maybeToken:Option[DeviceToken]) extends NotificationTarget case class iOS(maybeToken:Option[DeviceToken]) extends Notif...
kantega/tech-ex-2015
backend/src/main/scala/techex/domain/notifications.scala
Scala
mit
984
/*********************************************************************** * Copyright (c) 2013-2017 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
ronq/geomesa
geomesa-process/geomesa-process-vector/src/main/scala/org/locationtech/geomesa/process/analytic/TrackLabelProcess.scala
Scala
apache-2.0
2,960
/** * This file is based on GitHubProvider.scala * Original work: Copyright 2012-2014 Jorge Aliss (jaliss at gmail dot com) - twitter: @jaliss * Modifcations: Copyright 2015 KASHIMA Kazuo (k4200 at kazu dot tv) - twitter: @k4200 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use...
k4200/securesocial
module-code/app/securesocial/core/providers/BitbucketProvider.scala
Scala
apache-2.0
4,271
package PACKAGE_MODELS case class DatabaseVersion(version: Long, appliedIn: Long) { }
luismfonseca/agile-scala-android
src/main/resources/create/src/main/scala/PACKAGE_NAME_AS_DIR/models/DatabaseVersion.scala
Scala
mit
94
package isel.leic.ps.CardioStream.WebApp.sparkJobs import org.apache.spark.sql.SparkSession /** * Created by isaac on 09-06-2017. */ class ProcessHeartRate (val x : String) { def method(): Unit = { } }
isaacboucinha/CardioStream
web-app/src/main/scala/isel/leic/ps/CardioStream/WebApp/sparkJobs/ProcessHeartRate.scala
Scala
apache-2.0
214
/* * Copyright 2015 Heiko Seeberger * * 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...
Tecsisa/constructr
core/src/test/scala/de/heikoseeberger/constructr/ConstructrMachineSpec.scala
Scala
apache-2.0
11,367
// scalastyle:off /* * Copyright 2015 Ayasdi 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 ...
abridgett/spark-csv
src/main/scala/com/databricks/spark/csv/readers/readers.scala
Scala
apache-2.0
8,437
package exerciseOne import java.io.File import akka.actor.ActorSystem import org.reactivestreams.api.{Consumer, Producer} object DisplayMp4 { /** * run: * ./activator 'runMain exerciseOne.DisplayMp4' * */ def main(args: Array[String]): Unit = { // ActorSystem represents the "engine" we run in...
retroryan/streams-workshop
src/exercises/exerciseOne/DisplayMp4.scala
Scala
cc0-1.0
766
package jigg.pipeline /* Copyright 2013-2016 Hiroshi Noji 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...
tomeken-yoshinaga/jigg
src/main/scala/jigg/pipeline/IOCommunicator.scala
Scala
apache-2.0
6,884
package com.twitter.finagle.tracing import com.twitter.conversions.DurationOps._ import com.twitter.io.Buf import com.twitter.util.Time import com.twitter.util.{Return, Throw} import org.mockito.Matchers.any import org.mockito.Mockito.{never, times, verify, when, atLeast} import org.scalatest.{OneInstancePerTest, Befo...
luciferous/finagle
finagle-core/src/test/scala/com/twitter/finagle/tracing/TraceTest.scala
Scala
apache-2.0
12,631
package org.jetbrains.plugins.scala package lang package psi package impl package statements import com.intellij.lang.ASTNode import com.intellij.openapi.progress.ProgressManager import com.intellij.psi._ import com.intellij.psi.scope.PsiScopeProcessor import org.jetbrains.plugins.scala.extensions.PsiElementExt import...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/statements/ScFunctionImpl.scala
Scala
apache-2.0
3,133
/* * Copyright (c) 2015, Nightfall Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of conditions a...
Nightfall/Instrumentality
core/src/main/scala/moe/nightfall/instrumentality/PoseBoneTransform.scala
Scala
bsd-2-clause
5,066
package es.upm.fi.oeg.morph.tc class D001Test extends R2RMLTest("D001-1table1column1row") { "TC0001a" should "generate 1 triple" in{ val dg=generate("R2RMLTC0001a") dg.getDefaultGraph.size should be (1) } "TC0001b" should "generate 1 graph" in{ val dg=generate("R2RMLTC0001b") dg.getDefaultGraph...
jpcik/morph
morph-r2rml-tc/src/test/scala/es/upm/fi/oeg/morph/tc/D001Test.scala
Scala
apache-2.0
427
/* * 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 ...
scaledaction/weather-service
core/src/main/scala/com/scaledaction/core/spark/SparkConfig.scala
Scala
apache-2.0
2,376
package drt.client.services import autowire._ import diode.Implicits.runAfterImpl import diode._ import diode.data._ import diode.react.ReactConnector import drt.client.{SPAMain, TableViewUtils} import drt.client.logger._ import drt.client.services.HandyStuff._ import drt.client.services.RootModel.{FlightCode, mergeT...
somanythings/drt-scalajs-spa-exploration
client/src/main/scala/spatutorial/client/services/SPACircuit.scala
Scala
apache-2.0
23,728
package responses object IngressMM { val BaseURL = "http://ingressmm.com/" }
ponkotuy/mission-recommender
app/responses/IngressMM.scala
Scala
apache-2.0
80
/* * Copyright (c) 2014-2018 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...
Wogan/monix
monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentReplaySubjectSuite.scala
Scala
apache-2.0
1,278
/* * Copyright 2016 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...
ahudspith-equalexperts/ct-calculations
src/test/scala/uk/gov/hmrc/ct/ct600/v2/calculations/QualifyingExpenditureOnMachineryCalculationSpec.scala
Scala
apache-2.0
1,122
object Test extends App { println(f"%") println(f"%%") println(f"%%%") println(f"%%%%") println(f"%%%%%") println(f"%%%%%%") println(f"%%n") println(f"%%%n") println(f"%%%%n") println(f"%%%%%n") println(f"%%%%%%n") println(f"%%%%%%%n") println(f"${0}%") println(f"${0}%d") println(f"${0}%...
felixmulder/scala
test/files/neg/t7325.scala
Scala
bsd-3-clause
443
package zzb.xmpp.ebus import org.jivesoftware.smackx.muc.ParticipantStatusListener /** * Created by Simon on 2014/8/12 */ abstract class RoomMemberListener extends ParticipantStatusListener{ override def kicked(participant: String, actor: String, reason: String): Unit = () override def voiceGranted(participant...
stepover/zzb-xmpp
src/main/scala/zzb/xmpp/ebus/RoomMemberListener.scala
Scala
mit
1,089
/** * This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]]. */ // DO NOT EDIT MANUALLY package sbt.protocol abstract class SettingQueryResponse() extends sbt.protocol.EventMessage() with Serializable { override def equals(o: Any): Boolean = o match { case x: SettingQueryResponse...
Duhemm/sbt
protocol/src/main/contraband-scala/sbt/protocol/SettingQueryResponse.scala
Scala
bsd-3-clause
522
package org.cddcore.carers import org.joda.time.DateTime case class TimeLineItem(events: List[(DateRange, KeyAndParams)]) { val startDate = events.head._1.from val endDate = events.last._1.to val daysInWhichIWasOk = events.foldLeft[Int](0)((acc, tuple) => tuple match { case (dr, keyAndParams) if keyAndParam...
scott-thomson/carers
src/main/scala/org/cddcore/carers/TimeLineCalcs.scala
Scala
bsd-2-clause
2,843
package japgolly.scalajs.react.extra import scala.annotation.tailrec import scala.reflect.ClassTag import java.util.{Date, UUID} import org.scalajs.dom.console import scala.scalajs.js.{Date => JsDate} import japgolly.scalajs.react._ import japgolly.scalajs.react.extra.internal.ReusabilityMacros import japgolly.scalajs...
matthughes/scalajs-react
extra/src/main/scala/japgolly/scalajs/react/extra/Reusability.scala
Scala
apache-2.0
21,311
/* * 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/feature/image/ImageFiller.scala
Scala
apache-2.0
1,634
package stock import akka.stream.scaladsl._ import akka.util.{ByteString, ByteStringBuilder} import org.scalatest.concurrent.ScalaFutures import org.scalatest.{FlatSpec, Matchers} import streams.AkkaStreamsTest import scala.concurrent.Future class FlowGraphsSpec extends FlatSpec with AkkaStreamsTest with Matchers wi...
linearregression/akka-streams-http-intro
src/test/scala/stock/FlowGraphsSpec.scala
Scala
apache-2.0
3,506
/* * Licensed to Cloudera, Inc. under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Cloudera, Inc. licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use thi...
MobinRanjbar/hue
apps/spark/java/livy-spark/src/main/scala/com/cloudera/hue/livy/spark/interactive/InteractiveSessionYarnFactory.scala
Scala
apache-2.0
1,721
package io.questions.testdata import io.questions.model.questionnaire.FieldName.FieldNameStringSyntax import io.questions.model.questionnaire.QuestionText.QuestionTextSyntax import io.questions.model.questionnaire.nodekey.NodeKey import io.questions.model.questionnaire.{ Element, QuestionnaireNode } object CompanyIde...
channingwalton/qanda
questionnaire/src/test/scala/io/questions/testdata/CompanyIdentifierQuestionnaire.scala
Scala
mit
701
/*********************************************************************** * 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 ...
giserh/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/iterators/Z3IteratorTest.scala
Scala
apache-2.0
2,846
package twotails import org.scalatest.{ FlatSpec, Matchers } import annotation.{tailrec, switch} import java.lang.StackOverflowError class Foo{ @mutualrec final def yo(x: Int): Int = if(0 < x) yo(x-1) else 0 } class Foo2{ @tailrec final def yo(x: Int): Int = if(0 < x) yo(x-1) else 0 } class Bar{ @mutualrec fi...
wheaties/TwoTails
core/src/test/scala/twotails/BasicTest.scala
Scala
apache-2.0
3,014
object Test extends dotty.runtime.LegacyApp { def test1(n: Int) = { println(s"""Bob is $n years old""") println(f"""Bob is $n%2d years old""") println(s"""Bob will be ${n+1} years old""") println(f"""Bob will be ${n+1}%2d years old""") println(s"""$n+1 = ${n+1}""") println(f"""$n%d+1 = ${n+1}...
yusuke2255/dotty
tests/pending/run/interpolationMultiline1.scala
Scala
bsd-3-clause
599
package com.nulabinc.backlog.migration.common.utils import com.nulabinc.backlog.migration.common.dsl.ConsoleDSL import com.nulabinc.backlog.migration.common.utils.ConsoleOut.outStream import com.osinka.i18n.Messages import monix.eval.Task import monix.execution.Scheduler import org.fusesource.jansi.Ansi import org.fus...
nulab/backlog-migration-common
core/src/main/scala/com/nulabinc/backlog/migration/common/utils/ProgressBar.scala
Scala
mit
2,016
package io.getquill.norm.capture import io.getquill.Spec import io.getquill.testContext._ import io.getquill.Query class AvoidAliasConflictSpec extends Spec { "renames alias to avoid conflict between entities during normalization" - { "flatMap" in { val q = quote { qr1.flatMap(a => qr2.flatMap(a ...
getquill/quill
quill-core/src/test/scala/io/getquill/norm/capture/AvoidAliasConflictSpec.scala
Scala
apache-2.0
7,808
package mesosphere.marathon package api.v2 import javax.servlet.http.HttpServletRequest import javax.ws.rs.core.{ Context, MediaType, Response } import javax.ws.rs.{ Consumes, GET, Path, Produces } import com.google.inject.Inject import mesosphere.chaos.http.HttpConf import mesosphere.marathon.api.{ AuthResource, Mar...
Caerostris/marathon
src/main/scala/mesosphere/marathon/api/v2/InfoResource.scala
Scala
apache-2.0
3,441
package zzz.akka.avionics import akka.actor.{FSM, Actor, ActorRef} import scala.concurrent.duration._ object FlyingBehaviour { import ControlSurfaces._ // The states governing behavioural transitions sealed trait State case object Idle extends State case object Flying extends State case object PreparingTo...
kevyin/akka-book-wyatt
src/main/scala/zzz/akka/avionics/FlyingBehaviour.scala
Scala
mit
5,626
/* * 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 ...
aljoscha/flink
flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/StreamExecutionEnvironment.scala
Scala
apache-2.0
45,075
package aecor.schedule import java.time.{ Clock => _, _ } import java.util.UUID import aecor.data._ import aecor.runtime.KeyValueStore import aecor.runtime.akkapersistence._ import aecor.runtime.akkapersistence.readside.JournalEntry import aecor.schedule.process.{ DefaultScheduleEventJournal, PeriodicProcessRunti...
notxcain/aecor
modules/schedule/src/main/scala/aecor/schedule/Schedule.scala
Scala
mit
3,708
package com.gh.helper.config import com.typesafe.config.ConfigFactory import util.Try /** * Holds service configuration settings. */ trait Configuration { /** * Application config object. */ val config = ConfigFactory.load() /** Host name/address to start service on. */ lazy val serviceHost = Try(co...
saetar/grocery-backend
src/main/scala/com/gh/helper/config/Configuration.scala
Scala
unlicense
1,053
package slogger.services.processing.aggregation.aggregators.onefield import slogger.services.processing.aggregation.Aggregator import play.api.libs.iteratee.Enumerator import play.api.libs.json.JsObject import play.api.libs.iteratee.Iteratee import scala.concurrent.ExecutionContext import play.api.libs.json.JsObject i...
IvanMykhailov/stats-logger
core/src/main/scala/slogger/services/processing/aggregation/aggregators/onefield/AverageAggregator.scala
Scala
mit
2,273
/* * fsc-analytics */ package de.pc2.dedup.analysis import scala.collection.mutable.Map trait FrequencyEstimator[T] { def add(value: T) def apply(value: T): Int def getMaxValue(): Option[T] } class MapFrequenceEstimator[T] extends FrequencyEstimator[T] { val map = Map.empty[T, Int] def add(value: T) { ...
dmeister/fs-c-analytics
src/main/scala/de/pc2/dedup/analysis/MisraGries.scala
Scala
bsd-3-clause
1,459
// This benchmark is important because it shows a nice counterexample. import stainless.annotation._ import stainless.collection._ import stainless.lang._ import stainless.lang.Option._ import stainless.lang.StaticChecks._ import stainless.proof.check object TreeImmutMapGenericExample { case class Cell[T](var value...
epfl-lara/stainless
frontends/benchmarks/full-imperative/invalid/OpaqueEffectsGeneric.scala
Scala
apache-2.0
1,549
package com.twitter.app import scala.util.control.NoStackTrace /** * An exception that represents collected errors which occurred on close of the app. * * @note When execution of the `App#nonExitingMain` throws a [[CloseException]], the app will not * attempt to call `App#close()` again in the `App#exitOnEr...
twitter/util
util-app/src/main/scala/com/twitter/app/CloseException.scala
Scala
apache-2.0
753
/** * MIT License * * Copyright (c) 2016-2018 James Sherwood-Jones <[email protected]> * * 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, includi...
jSherz/lsd-members
backend/src/it/scala/com/jsherz/luskydive/itest/dao/AuthDaoSpec.scala
Scala
mit
3,984
package feh.tec.util import scala.concurrent.duration.Duration trait Debugging { outer => def debug: Boolean protected implicit class DebugLogWrapper[R](r: => R){ def debugLog(f: R => String): R = { val a = r outer.debugLog(f(a)) a } def debugLog(msg: String): R = debugLog(_ => ...
fehu/agent-tareas
agent/src/main/scala/feh/tec/util/Debugging.scala
Scala
mit
1,059
/* Copyright (C) 2015 University of Massachusetts Amherst. This file is part of “author_coref” http://github.com/iesl/author_coref Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at h...
iesl/author_coref
src/main/scala/edu/umass/cs/iesl/author_coref/coreference/SizeLimitingEntityNameTemplate.scala
Scala
apache-2.0
2,774
/* * 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 ...
pronix/spark
sql/core/src/test/scala/org/apache/spark/sql/DataFrameComplexTypeSuite.scala
Scala
apache-2.0
1,735
/* * 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-examples/src/main/scala/com/spotify/scio/examples/DebuggingWordCount.scala
Scala
apache-2.0
2,933
package sclack.domain.factories import javax.swing.ImageIcon import sclack.domain.Map import sclack.domain.NonPlayableCharacter import sclack.domain.Entity import sclack.tech.TileManager /** * Factory for creating various maps that we may or may not use. I know that * this class looks horrible due to all the har...
psyomn/sclack
src/main/scala/domain/factories/MapFactory.scala
Scala
gpl-3.0
8,244
package mesosphere.marathon.tasks import org.apache.mesos.Protos.TaskID /** * Utility functions for dealing with TaskIDs * * @author Tobi Knaup */ object TaskIDUtil { val taskDelimiter = "_" def taskId(appName: String, sequence: Int) = { "%s%s%d-%d".format(appName, taskDelimiter, sequence, System.curre...
MiLk/marathon
src/main/scala/mesosphere/marathon/tasks/TaskIDUtil.scala
Scala
apache-2.0
488
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this opt 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...
scalatest/scalatest
jvm/scalatest-test/src/test/scala/org/scalatest/ShouldBeDefinedLogicalOrSpec.scala
Scala
apache-2.0
12,971
package controllers.cadmin import views._ import loom.models.admin.Admin import controllers._ /** * * @author chaosky */ object Settings extends AbstractSettings { def password() = AdminAction { implicit request => Ok(html.admin.settings.password(passwordForm)) } def changePassword() = AdminActi...
chaosky/loom
app/controllers/cadmin/Settings.scala
Scala
mit
951
package fix package v0_7_0 import scalafix.v1._ import scala.meta._ class BQClientRefactoring extends SyntacticRule("BQClientRefactoring") { private val imports = scala.collection.mutable.ArrayBuffer.empty[(String, String)] // Check that the package is not imported multiple times in the same file def addIm...
spotify/scio
scalafix/rules/src/main/scala/fix/BQClientRefactoring.scala
Scala
apache-2.0
2,904
/* * This file is part of BioScala * * BioScala 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 your option) any later version. * * BioScala is distrib...
paradigmatic/BioScala
src/test/scala/SequenceTest.scala
Scala
gpl-3.0
1,213
package scala.util.parsing.combinator import scala.util.parsing.input.CharArrayReader import org.junit.Test import org.junit.Assert.assertEquals class JavaTokenParsersTest { @Test def parseDecimalNumber: Unit = { object TestJavaTokenParsers extends JavaTokenParsers import TestJavaTokenParsers._ asse...
l15k4/scala-parser-combinators
src/test/scala/scala/util/parsing/combinator/JavaTokenParsersTest.scala
Scala
bsd-3-clause
1,889
package ls object Sbt { def lib(l: Library, cross: Boolean) = """ "%s" %s "%s" % "%s" """ format(l.organization, if(cross) "%%" else "%s", l.name, l.version) def configuration(l: Library) = { """libraryDependencies += %s""" format(lib(l, true)) } }
softprops/ls-server
src/main/scala/sbt.scala
Scala
mit
265
/* * Copyright (c) 2008, Michael Pradel * All rights reserved. See LICENSE for details. */ package collaborations import scala.roles._ import scala.collection.mutable.HashSet import scala.collection.mutable.HashMap import scala.collection.Set // TODO use implicit conversions class HiddenUniversity extends Transi...
tupshin/Scala-Roles
examples/collaborations/HiddenUniversity.scala
Scala
bsd-3-clause
1,370
/* * Copyright 2013 Maurício Linhares * * Maurício Linhares 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/LICENSE-2.0 * * Unless ...
dripower/postgresql-async
mysql-async/src/test/scala/com/github/mauricio/async/db/mysql/ConnectionHelper.scala
Scala
apache-2.0
4,791
/*******************************************************************************/ /* */ /* Copyright (C) 2017 by Max Lv <[email protected]> */ /* Copyright (C) 2017 by Mygod Studio <contact-shadowsocks-android@mygod....
weiwenqiang/GitHub
Linux/shadowsocks-android-master/mobile/src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
Scala
apache-2.0
8,469
package com.cloudray.scalapress.folder.controller.admin import org.springframework.stereotype.Controller import org.springframework.web.bind.annotation.{PathVariable, ModelAttribute, RequestMethod, RequestMapping} import scala.Array import org.springframework.beans.factory.annotation.Autowired import com.cloudray.scal...
vidyacraghav/scalapress
src/main/scala/com/cloudray/scalapress/folder/controller/admin/FolderContentSectionController.scala
Scala
apache-2.0
1,092
package cromwell.database.sql.tables case class SummaryStatusEntry ( summaryTableName: String, summarizedTableName: String, maximumId: Long, summaryStatusEntryId: Option[Int] = None )
ohsu-comp-bio/cromwell
database/sql/src/main/scala/cromwell/database/sql/tables/SummaryStatusEntry.scala
Scala
bsd-3-clause
193
package unof.cv.tools import unof.cv.base.charLib.CMShape import unof.cv.base.DrawingContext import unof.cv.base.charLib.DrawCommand import unof.cv.utils.Transforme import unof.cv.utils.Algebra._ import unof.cv.base.charLib.CMShape import unof.cv.base.charLib.MoveTo import unof.cv.base.charLib.CurveTo import unof.cv.b...
Hgjj/CharViewer
js/src/main/scala/unof/cv/tools/ShapeManipulator.scala
Scala
bsd-3-clause
14,252
package templemore.liftjson.provider import net.liftweb.json._ import io.Source import java.io.{InputStream, OutputStream, OutputStreamWriter} trait LiftJsonIntegration { protected def config: ProviderConfig protected def convertToJson(value: AnyRef, entityStream: OutputStream, ...
skipoleschris/lift-json-jsr311-provider
provider/src/main/scala/templemore/liftjson/provider/LiftJsonIntegration.scala
Scala
apache-2.0
1,695
package org.scalacoin.marshallers.script import org.scalacoin.protocol.BitcoinAddress import org.scalatest.{FlatSpec, MustMatchers} import spray.json._ import DefaultJsonProtocol._ /** * Created by chris on 12/27/15. */ class ScriptPubKeyMarshallerTest extends FlatSpec with MustMatchers { val str = """ ...
scalacoin/scalacoin
src/test/scala/org/scalacoin/marshallers/script/ScriptPubKeyMarshallerTest.scala
Scala
mit
1,225
object Test { val x: 1 = 1 final val y = x val z: 1 = y object O { final val x = 42 } val fourtyTwo: 42 = O.x final val a = { println("x"); 2 } // side effects don't matter val b: 2 = a def f: 3 = 3 final val c = f val dc: 3.0 = 3.0 final val dc1 = dc val fc: 3.0f = 3.0f final val fc1 = ...
lampepfl/dotty
tests/pos/singletons.scala
Scala
apache-2.0
1,367
package com.tsukaby.bean_validation_scala import javax.validation.{ConstraintValidator, ConstraintValidatorContext} import org.hibernate.validator.constraints.LuhnCheck import org.hibernate.validator.internal.constraintvalidators.hv.LuhnCheckValidator /** * Luhn algorithm checksum validator for scala. * * http://...
bean-validation-scala/bean-validation-scala
src/main/scala/com/tsukaby/bean_validation_scala/LuhnCheckValidatorForOption.scala
Scala
mit
1,045
package scalariform.lexer import scalariform._ import scalariform.lexer.Tokens._ import org.scalatest.FlatSpec import org.scalatest.matchers.ShouldMatchers import org.scalatest.TestFailedException import org.scalatest.TestPendingException import scalariform.utils.Utils._ class RedundantSemicolonDetectorTest extends F...
triggerNZ/scalariform
scalariform/src/test/scala/com/danieltrinh/scalariform/lexer/RedundantSemicolonDetectorTest.scala
Scala
mit
1,370
package controllers import controllers.Application._ import play.api.mvc.Action import scala.concurrent.Future object RoutingController { def index = Action.async { Future.successful(Ok(views.html.index())) } def menu = Action.async { Future.successful(Ok(views.html.menu())) } }
Hajtosek/ggEasy
app/controllers/RoutingController.scala
Scala
apache-2.0
300
/* * ****************************************************************************** * * Copyright (C) 2013 Christopher Harris (Itszuvalex) * * [email protected] * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * * as p...
Itszuvalex/Femtocraft-alpha-1
src/main/java/com/itszuvalex/femtocraft/industry/blocks/BlockNanoHorologe.scala
Scala
gpl-2.0
4,135
package net.batyuk.akkahttp.examples.api import com.typesafe.config.{ ConfigFactory, Config } import akka.stream.FlowMaterializer import akka.actor.ActorSystem import akka.pattern._ import akka.stream.scaladsl.Flow import akka.http.Http import akka.http.server._ import akka.http.model.{HttpResponse, HttpRequest, Stat...
abatyuk/akka-http-examples
multiProjectWebPlugin/api/src/main/scala/net/batyuk/akkahttp/examples/api/TestServer.scala
Scala
apache-2.0
2,633
/* Copyright (c) 2017, Qvantel All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following di...
Doikor/jsonapi-scala
core/src/main/scala/com/qvantel/jsonapi/ToMany.scala
Scala
bsd-3-clause
4,494
/* * Copyright © 2015 Reactific Software LLC. All Rights Reserved. * * 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...
reactific/RxMongo
driver/src/main/scala/rxmongo/driver/AkkaIOChannel.scala
Scala
mit
7,070
/** * 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...
aba1476/spark-timeseries
src/test/scala/com/cloudera/sparkts/RebaseSuite.scala
Scala
apache-2.0
7,498
package filodb.query.exec import scala.collection.mutable.ArrayBuffer import scala.concurrent.duration._ import com.typesafe.config.ConfigFactory import monix.eval.Task import monix.execution.Scheduler import monix.execution.Scheduler.Implicits.global import org.scalatest.BeforeAndAfterAll import org.scalatest.concurr...
filodb/FiloDB
query/src/test/scala/filodb/query/exec/MetadataExecSpec.scala
Scala
apache-2.0
15,753
package de.csmath.scalog.substitution import de.csmath.scalog.Types._ import de.csmath.scalog.AstToProlog._ import scala.collection.immutable.HashMap trait Substitution { def apply(term: Term): Term = term match { case v@Var(x) if mapping.contains(v) => mapping(v) case s@Struct(functor,terms) => ...
lpcsmath/scalog
src/main/scala/de/csmath/scalog/substitution/Substitution.scala
Scala
bsd-2-clause
1,185
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
witgo/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/OutputWriter.scala
Scala
apache-2.0
2,815
package org.jetbrains.sbt package project.structure import com.intellij.openapi.util.Key /** * @author Pavel Fatin */ sealed abstract class OutputType object OutputType { object StdOut extends OutputType object StdErr extends OutputType object MySystem extends OutputType final case class Other(key: Key[_])...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/sbt/project/structure/OutputType.scala
Scala
apache-2.0
342
package epfl.pacman package maze trait Thingies { this: Models => private var id = 0 private def freshId = { id += 1; id } abstract class Thingy { val pos: Position } abstract class Figure extends Thingy { override val pos: OffsetPosition val dir: Direction val stopped: Boolean def incrOffs...
lrytz/pacman
src/main/scala/epfl/pacman/maze/Thingies.scala
Scala
bsd-2-clause
2,076
package nodes.util import breeze.linalg.SparseVector import org.apache.spark.rdd.RDD import pipelines.Estimator import scala.reflect.ClassTag /** * An Estimator that chooses all sparse features observed when training, * and produces a transformer which builds a sparse vector out of them */ case class AllSparseFea...
shivaram/keystone
src/main/scala/nodes/util/AllSparseFeatures.scala
Scala
apache-2.0
662
package cc.factorie.directed import cc.factorie.util.FastLogging import cc.factorie.variable.DoubleVariable import org.junit.Test import org.scalatest.junit.JUnitSuite class TestDirectedModel extends JUnitSuite with FastLogging { @Test def testDirectedModel(): Unit = { implicit val model = DirectedModel() ...
hlin117/factorie
src/test/scala/cc/factorie/directed/TestDirectedModel.scala
Scala
apache-2.0
693
package com.imaginea.activegrid.core.models /** * Created by nagulmeeras on 01/11/16. */ sealed trait GroupType { def groupType: String } case object GroupType { def toGroupType(groupType: String): GroupType = { groupType match { case "role" => Role } } case object Role extends GroupType {...
eklavya/activeGrid
src/main/scala/com/imaginea/activegrid/core/models/GroupType.scala
Scala
apache-2.0
372
/* * 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 ...
pronix/spark
mllib/src/test/scala/org/apache/spark/ml/feature/TokenizerSuite.scala
Scala
apache-2.0
2,895
package com.donniewest.titan.tent object identityJson { // contains Json strings for authentication val registration = """{ "type": "https://tent.io/types/app/v0#", "content": { "name": "Titan", "url": "https://tent.donniewest.com", "types": { "read": [ "https://tent.io/types/app/v0" ...
DonnieWest/Titan
src/main/scala/com/donniewest/titan/tent/identityJson.scala
Scala
apache-2.0
516
/* * Copyright 2016 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...
ahudspith-equalexperts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v2/B106.scala
Scala
apache-2.0
1,003
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.macrotestkit import scala.language.experimental.macros import java.util.regex.Pattern import scala.reflect.macros.TypecheckException import scala.reflect.macros.blackbox /** * A macro that ensures that a code s...
rcavalcanti/lagom
macro-testkit/src/main/scala/com/lightbend/lagom/macrotestkit/ShouldNotTypecheck.scala
Scala
apache-2.0
1,706
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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 b...
hpe-cct/cct-core
src/test/scala/cogdebugger/ui/fieldvisualizations/vector/TestGeometric2DVectorViewer.scala
Scala
apache-2.0
1,639
/* * 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 ...
ueshin/apache-spark
core/src/main/scala/org/apache/spark/deploy/DeployMessage.scala
Scala
apache-2.0
10,072
package scalaj.http /** scalaj.http Copyright 2010 Jonathan Hoffman 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 a...
scalaj/scalaj-http
src/main/scala/scalaj/http/Http.scala
Scala
apache-2.0
31,853
package edu.gemini.spModel.core import org.scalacheck.{Arbitrary, Gen} import org.scalacheck.Gen._ import java.text.SimpleDateFormat import java.util.Date /** * ProgramId Generator. */ object ProgramIdGen { val genYear: Gen[Int] = choose(2000, 2020) val genSite: Gen[Site] = oneOf(Site.GN, Site.GS) val ge...
fnussber/ocs
bundle/edu.gemini.spModel.core/src/test/scala/edu/gemini/spModel/core/ProgramIdGen.scala
Scala
bsd-3-clause
1,614
package org.jetbrains.plugins.scala.failed.typeInference import org.jetbrains.plugins.scala.PerfCycleTests import org.jetbrains.plugins.scala.base.ScalaLightCodeInsightFixtureTestAdapter import org.junit.experimental.categories.Category /** * @author Anton Yalyshev * @since 10.01.2018. */ @Category(Array(classO...
jastice/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/failed/typeInference/TypeAliasInferenceTest.scala
Scala
apache-2.0
1,412
package monocle.state import cats.{Eval, Now} import monocle.PLens import cats.data.{IndexedStateT, State} trait StateLensSyntax { implicit def toStateLensOps[S, T, A, B](lens: PLens[S, T, A, B]): StateLensOps[S, T, A, B] = new StateLensOps[S, T, A, B](lens) } final class StateLensOps[S, T, A, B](private val l...
aoiroaoino/Monocle
state/src/main/scala/monocle/state/StateLensSyntax.scala
Scala
mit
1,798
package pw.ian.sysadmincraft.listeners import org.bukkit.entity.EntityType import org.bukkit.event.block.BlockBreakEvent import org.bukkit.event.entity.CreatureSpawnEvent import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason import org.bukkit.event.player.PlayerJoinEvent import org.bukkit.event.{EventHandler, ...
simplyianm/sysadmincraft
src/main/scala/pw/ian/sysadmincraft/listeners/MiscListener.scala
Scala
isc
1,184
/* sbt -- Simple Build Tool * Copyright 2009 Mark Harrah */ package sbt import java.lang.{Process => JProcess, ProcessBuilder => JProcessBuilder} import java.io.{Closeable, File, IOException} import java.io.{BufferedReader, InputStream, InputStreamReader, OutputStream, PipedInputStream, PipedOutputStream} import ja...
kuochaoyi/xsbt
util/process/Process.scala
Scala
bsd-3-clause
11,137
/* * Copyright (c) <2015-2016>, see CONTRIBUTORS * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list...
amanjpro/languages-a-la-carte
testLang/src/main/scala/components/Langs.scala
Scala
bsd-3-clause
10,618
/* * Copyright 2011-2017 Chris de Vreeze * * 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...
dvreeze/yaidom
jvm/src/test/scala/eu/cdevreeze/yaidom/integrationtest/UpdateTest.scala
Scala
apache-2.0
17,251
package org.eichelberger.sfc.examples.quickstart object Example2 extends App { import org.eichelberger.sfc._ import org.eichelberger.sfc.SpaceFillingCurve._ // create a 4D curve val zCurve = new ZCurve(OrdinalVector(10, 20, 15, 4)) // map from an input point to a hashed point val idx = zCurve.index(Ordin...
cne1x/sfseize
src/main/scala/org/eichelberger/sfc/examples/quickstart/Example2.scala
Scala
apache-2.0
491
/* * 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/test/scala/monix/reactive/consumers/MapConsumerSuite.scala
Scala
apache-2.0
1,872
// scalac: -Xplugin:. -Yrangepos:false import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context object Macros { def impl1(c: Context) = { import c.universe._ q"""println("impl1")""" } def impl2(c: Context) = { import c.universe._ q"""println("impl2")""" } def f...
scala/scala
test/files/run/macroPlugins-typedMacroBody/Macros_2.scala
Scala
apache-2.0
370
package io.buoyant.k8s.v1beta1 import com.twitter.finagle.http._ import com.twitter.finagle.{Service => FService} import com.twitter.io.Buf import com.twitter.util._ import io.buoyant.test.{Awaits, Exceptions} import org.scalatest.FunSuite class ApiTest extends FunSuite with Awaits with Exceptions { val ingressRes...
denverwilliams/linkerd
k8s/src/test/scala/io/buoyant/k8s/v1beta1/ApiTest.scala
Scala
apache-2.0
2,195
package net.scalax.ubw.database.test object Sample01 { val friend1 = Friend(name = "魔理沙", nick = "小莎莎", age = Option(2333), grade = 3) val friend2 = Friend(name = "jilen", nick = "jilen 酱", age = Option(30), grade = 4) val friend3 = Friend(name = "品神", nick = "kerr", age = Option(28), grade = 5) val fr...
scalax/fsn
sample/commonSlick/src/main/scala/Sample01.scala
Scala
mit
416