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 models import com.mohiva.play.silhouette.api.{ Identity, LoginInfo } /** * The user object. * * @param userID The unique ID of the user. * @param loginInfo The linked login info. * @param firstName Maybe the first name of the authenticated user. * @param lastName Maybe the last name of the authenticated...
joaoraf/tripspace
app/models/User.scala
Scala
apache-2.0
963
/* * Wire * Copyright (C) 2016 Wire Swiss GmbH * * 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 your option) any later version. * * This progr...
wireapp/wire-android-sync-engine
zmessaging/src/test/scala/com/waz/sync/SyncContentUpdaterSpec.scala
Scala
gpl-3.0
2,210
/* * 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 ...
cin/spark
core/src/main/scala/org/apache/spark/ui/jobs/ExecutorTable.scala
Scala
apache-2.0
4,972
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.sbt import sbt.Keys._ import sbt._ import play.dev.filewatch.FileWatchService /** * Declares the default imports for Play plugins. */ object PlayImport { val Production = config("production") def component(id: String) =...
aradchykov/playframework
framework/src/sbt-plugin/src/main/scala/play/sbt/PlayImport.scala
Scala
apache-2.0
5,328
package com.greencatsoft.angularjs.core import scala.scalajs.js import scala.scalajs.js.UndefOr import scala.scalajs.js.annotation.JSBracketAccess import com.greencatsoft.angularjs.injectable @js.native @injectable("$routeParams") trait RouteParams extends js.Object { @JSBracketAccess def apply(key: String): js...
easel/scalajs-angular
src/main/scala/com/greencatsoft/angularjs/core/Route.scala
Scala
apache-2.0
3,210
object Solution { def main(args: Array[String]) { val it = scala.io.Source.stdin.getLines val n = it.next.toInt val arr = new Array[Int](n); val values = it.next.split(" ").map(_.toInt) for(i <- n-1 to 0 by -1) { print(values(i) + " ") } } }
marcos-sb/hacker-rank
data-structures/arrays/arrays-ds/Solution.scala
Scala
apache-2.0
311
package scala.meta.internal.semanticdb.scalac import java.io._ import java.net.URI import scala.compat.Platform.EOL import scala.tools.nsc.Phase import scala.tools.nsc.plugins.PluginComponent import scala.meta.internal.{semanticdb => s} import scala.meta.internal.tokenizers.PlatformTokenizerCache import scala.util.con...
xeno-by/scalameta
semanticdb/scalac/library/src/main/scala/scala/meta/internal/semanticdb/scalac/SemanticdbPipeline.scala
Scala
bsd-3-clause
5,870
class A { def foo[T](x: T) { def goo[G](y: G) { val z: T = x /*start*/ y: G z: T val u = x /*end*/ u } goo(3) } } /* class A { def foo[T](x: T) { def goo[G](y: G) { val z: T = x val u: T = testMethodName(x, y, z) u } goo(3) } def testM...
whorbowicz/intellij-scala
testdata/extractMethod/input/InnerFunGeneric.scala
Scala
apache-2.0
407
/* * 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 ...
yu-iskw/spark-kuromoji-tokenizer
src/test/scala/org/apache/spark/SparkFunSuite.scala
Scala
apache-2.0
1,923
/* * Copyright (c) 2017 Clement Trosa <me@trosa.io> * * 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...
iomonad/avian
src/main/scala/io/trosa/avian/Exceptions.scala
Scala
mit
1,631
package org.opencommercesearch.api import play.api.test.Helpers._ import play.api.test.FakeApplication import org.specs2.mutable.Specification import org.specs2.mock.Mockito import play.api.test.FakeRequest import org.opencommercesearch.common.Context import play.api.i18n.Lang import org.junit.runner.RunWith import or...
madickson/opencommercesearch
opencommercesearch-api/test/org/opencommercesearch/api/ProductQuerySpec.scala
Scala
apache-2.0
1,428
package pl.newicom.dddd.test.dummy import akka.actor.Actor import pl.newicom.dddd.test.dummy.ValueGenerator.{ValueGenerated, GenerateRandom} import pl.newicom.dddd.utils.UUIDSupport object ValueGenerator { case object GenerateRandom case class ValueGenerated(value: String) } class ValueGenerator extends Actor wi...
ahjohannessen/akka-ddd
akka-ddd-test/src/test/scala/pl/newicom/dddd/test/dummy/ValueGenerator.scala
Scala
mit
438
package edu.gemini.phase2.template.factory.impl.graces import edu.gemini.phase2.template.factory.impl._ import edu.gemini.shared.skyobject.Magnitude.Band import edu.gemini.spModel.gemini.graces.blueprint.SpGracesBlueprint import edu.gemini.pot.sp.{SPComponentType, ISPGroup} import edu.gemini.spModel.gemini.visitor.Vis...
arturog8m/ocs
bundle/edu.gemini.phase2.skeleton.servlet/src/main/scala/edu/gemini/phase2/template/factory/impl/graces/Graces.scala
Scala
bsd-3-clause
2,690
package scife.enumeration package combinators import Filter.FilterFunction trait Filter[T] extends Enum[T] { val f: FilterFunction[T] }
kaptoxic/SciFe
src/main/scala/scife/enumeration/combinators/Filter.scala
Scala
gpl-2.0
142
package edu.cmu.lti.oaqa.cse.scala.configuration import scala.collection.JavaConverters._ import net.liftweb.json.JsonAST._ import scala.collection.JavaConversions._ import net.liftweb.json.Serialization import net.liftweb.json.ShortTypeHints import edu.cmu.lti.oaqa.cse.scala.configuration.ConfigurationDescriptors._ ob...
oaqa/bagpipes-old
src/main/java/edu/cmu/lti/oaqa/cse/scala/configuration/Implicits.scala
Scala
apache-2.0
2,470
/* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/fset-faststream
app/repositories/application/PreviousYearCandidatesDetailsRepository.scala
Scala
apache-2.0
81,909
/* * 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 ...
michalsenkyr/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVBenchmarks.scala
Scala
apache-2.0
6,032
package com.sksamuel.elastic4s import org.elasticsearch.search.highlight.HighlightBuilder import scala.language.implicitConversions /** @author Stephen Samuel */ trait HighlightDsl { implicit def string2highlightfield(name: String): HighlightDefinition = new HighlightDefinition(name) case object highlight { ...
l15k4/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/highlighting.scala
Scala
apache-2.0
4,133
package lv.ddgatve.velesanas.cleanup import scala.xml.XML import scala.util.matching.Regex import lv.ddgatve.screenscrapers.web.Downloader import lv.ddgatve.screenscrapers.web.TableExtractor import lv.ddgatve.screenscrapers.csv.CSVWriter /** * This class is responsible for creating large CSV files from the files it ...
kapsitis/ddgatve-screenscrapers
src/main/scala/lv/ddgatve/velesanas/cleanup/CsvAggregator.scala
Scala
cc0-1.0
2,460
package debop4s.data.slick.schema /** * Dtabase Schema 작업을 수행하는 trait 입니다. * @author sunghyouk.bae@gmail.com 15. 3. 22. */ trait SlickSchema { this: SlickProfile => import driver.simple._ /** 자동 증가형 Id 컬럼을 가진 Table Schema 를 표현하는 trait */ trait TableWithId[Id] { def id: Column[Id] } /** * Ident...
debop/debop4s
debop4s-data-slick/src/main/scala/debop4s/data/slick/schema/SlickSchema.scala
Scala
apache-2.0
1,959
package util import org.specs2.mutable._ class StringUtilSpec extends Specification { "urlDecode" should { "decode encoded string to original string" in { val encoded = StringUtil.urlEncode("あいうえお") StringUtil.urlDecode(encoded) mustEqual "あいうえお" } } "splitWords" should { "split string...
Muscipular/gitbucket
src/test/scala/util/StringUtilSpec.scala
Scala
apache-2.0
1,578
/* * Copyright (C) 2005, The OpenURP Software. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
openurp/api
std/src/main/scala/org/openurp/std/graduation/model/GraduateSession.scala
Scala
lgpl-3.0
1,146
package monocle.law import monocle.Lens import monocle.internal.IsEq import cats.data.Const import cats.Id case class LensLaws[S, A](lens: Lens[S, A]) { import IsEq.syntax def getSet(s: S): IsEq[S] = lens.set(lens.get(s))(s) <==> s def setGet(s: S, a: A): IsEq[A] = lens.get(lens.set(a)(s)) <==> a ...
aoiroaoino/Monocle
core/shared/src/main/scala/monocle/law/LensLaws.scala
Scala
mit
943
package client.rootmodel /** * Created by shubham.k on 05-08-2016. */ case class SessionRootModel (messagesSessionUri: String = "", projectSessionUri: String = "", profileSessionUri: String = "", msgPinger: Boolean = false, profilePinger: Boolean = false, projectPinger: Boolean = false...
LivelyGig/ProductWebUI
client/src/main/scala/client/rootmodel/SessionRootModel.scala
Scala
apache-2.0
322
/* Copyright (c) 2013, Noel Raymond Cower 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...
nilium/spastic
src/main/scala/app/FragmentTag.scala
Scala
bsd-2-clause
1,583
package eventstreams.support import akka.actor.{ActorRef, ActorSystem, Props} import core.sysevents.Sysevent import core.sysevents.support.EventAssertions import eventstreams.UUIDTools import org.scalatest.Suite trait ActorSystemTestContext extends EventAssertions { self: Suite => private var system: Option[Acto...
intelix/eventstreams
es-core/es-api/src/test/scala/eventstreams/support/ActorSystemTestContext.scala
Scala
apache-2.0
813
package org.locationtech.geomesa.tools import java.io.File import com.beust.jcommander.ParameterException import org.geotools.data.DataStoreFinder import org.junit.runner.RunWith import org.locationtech.geomesa.accumulo.data.AccumuloDataStore import org.locationtech.geomesa.accumulo.data.AccumuloDataStoreFactory.para...
drackaer/geomesa
geomesa-tools/src/test/scala/org/locationtech/geomesa/tools/IngestArgumentsTest.scala
Scala
apache-2.0
5,358
package org.invisibletech.datasciencefromscratch import DataSciencester._ import org.scalatest.FunSpec import org.scalatest.BeforeAndAfter class CompiledUserDirectorySpec extends FunSpec with BeforeAndAfter { var friendships: List[(Int, Int)] = _ var users: List[User] = _ before { friendships = List((0, ...
InvisibleTech/datasciencefromscratch
src/test/scala/CompiledUserDirectorySpec.scala
Scala
mit
1,500
package com.ebay.neutrino.util import java.net.URI import com.ebay.neutrino.config.Host import com.typesafe.scalalogging.slf4j.StrictLogging import io.netty.buffer.Unpooled import io.netty.channel.ChannelHandlerContext import io.netty.handler.codec.http.HttpHeaders.{Names, Values} import io.netty.handler.codec.http._...
eBay/Neutrino
src/main/scala/com/ebay/neutrino/util/HttpUtils.scala
Scala
apache-2.0
3,275
package omnibus.api.endpoint import akka.actor._ import spray.routing._ import omnibus.core.actors.CoreActors import omnibus.api.route._ import omnibus.api.exceptions.RestFailureHandling class ApiEndpoint(coreActors: CoreActors) extends HttpEndpoint with Actor { implicit val actorRefFactory = context def receiv...
agourlay/omnibus
src/main/scala/omnibus/api/endpoint/ApiEndpoint.scala
Scala
apache-2.0
1,007
package name.mikulskibartosz.parkinglot.clock import java.time.ZonedDateTime import cats._ /** * An implementation of clock which always returns the same value. */ object ConstantTimeClock extends (ClockAction ~> Id) { /** The value returned by the clock. */ val time = ZonedDateTime.now() override def app...
mikulskibartosz/clean-arch-example-parking-lot
domain/src/test/scala/name/mikulskibartosz/parkinglot/clock/ConstantTimeClock.scala
Scala
gpl-3.0
405
import scala.io.Source import scala.collection.mutable.Map object SequenceFullOfColors extends App { val lines = Source.stdin.getLines().toList.tail val results = lines.map(fullOfColors).map(_.toString.capitalize) println(results.mkString("\\n")) def fullOfColors(sequence: String): Boolean = { val colors...
PaulNoth/hackerrank
practice/functional_programming/recursion/sequence_full_of_colors/SequenceFullOfColors.scala
Scala
mit
1,227
package collins.controllers.actions.asset import java.util.concurrent.TimeoutException import scala.concurrent.Future import play.api.libs.concurrent.Execution.Implicits.defaultContext import collins.controllers.SecureController import collins.controllers.actions.AssetAction import collins.controllers.actions.Asset...
funzoneq/collins
app/collins/controllers/actions/asset/FindAction.scala
Scala
apache-2.0
2,293
package pl.edu.agh.mplt.parser.phrase.set import pl.edu.agh.mplt.parser.phrase.expression.{Expression, Number} import pl.edu.agh.mplt.parser.member.SetMember trait SetLiteral extends SetExpression case class ExplicitSet[A <: SetMember](members: Set[A] = Set[A]()) extends SetLiteral case class SetComprehens...
marek1840/MPLT
src/main/scala/pl/edu/agh/mplt/parser/phrase/set/SetLiteral.scala
Scala
mit
472
/* Copyright 2010 Jim McBeath under GPLv2 */ package net.jimmc.scoroutine import scala.collection.Iterator import scala.util.continuations._ /** Standalone generic generator class. * @author Jim McBeath * @since 1.0.1 */ class StandaloneGenerator[T] extends Iterator[T] { private var nextValue:Option[T] = None...
jimmc/scoroutine
src/main/scala/net/jimmc/scoroutine/StandaloneGenerator.scala
Scala
lgpl-2.1
2,222
object Test3 { import scala.reflect.Selectable.reflectiveSelectable def g(x: { type T ; def t: T ; def f(a: T): Boolean }) = x.f(x.t) // error: no ClassTag for x.T g(new { type T = Int; def t = 4; def f(a:T) = true }) g(new { type T = Any; def t = 4; def f(a:T) = true }) val y: { type T = Int; def t = 4; def ...
som-snytt/dotty
tests/neg/structural.scala
Scala
apache-2.0
1,470
package me.lightspeed7.parsers import scala.util._ package object simpleScala { // // Parser Trait // /////////////////////// trait Parser[+A] extends (Stream[Character] => Result[A]) { outer => def ~[B](that: => Parser[B]) = new SequenceParser(this, that) def |[B](that: => Parser[B]) = new DisParse...
dbuschman7/collection-of-things
parsers/src/main/scala/me/lightspeed7/parsers/simpleScala/package.scala
Scala
apache-2.0
2,191
package monitoring import com.codahale.metrics.SharedMetricRegistries import play.api.Play._ object Counters { def recordClaimRenderCount() { SharedMetricRegistries.getOrCreate(current.configuration.getString("metrics.name").getOrElse("default")).counter(s"rs-render-count").inc() } }
Department-for-Work-and-Pensions/RenderingService
app/monitoring/Counters.scala
Scala
mit
295
package org.jetbrains.plugins.scala.lang.refactoring.rename import com.intellij.refactoring.rename.{RenameDialog, RenameJavaClassProcessor} import org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil import org.jetbrains.plugins.scala.lang.psi.api.statements.params.ScTypeParam import org.jetbrains.plugins.scala.lang.scal...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/refactoring/rename/RenameScalaClassProcessor.scala
Scala
apache-2.0
6,024
/* * Copyright (C) 2016-2020 Lightbend Inc. <https://www.lightbend.com> */ package akka.persistence.cassandra.journal import java.util.UUID import akka.annotation.InternalApi import akka.persistence.cassandra.BucketSize import akka.util.HashCode import com.datastax.oss.driver.api.core.uuid.Uuids /** INTERNAL API ...
chbatey/akka-persistence-cassandra
core/src/main/scala/akka/persistence/cassandra/journal/TimeBucket.scala
Scala
apache-2.0
2,328
package com.mesosphere.universe.bijection import com.mesosphere.universe import com.mesosphere.universe.bijection.TestUniverseConversions._ import com.mesosphere.universe.bijection.UniverseConversions._ import com.mesosphere.universe.test.TestingPackages._ import io.lemonlabs.uri.Uri import com.twitter.bijection.Conve...
dcos/cosmos
cosmos-test-common/src/test/scala/com/mesosphere/universe/bijection/UniverseConversionsSpec.scala
Scala
apache-2.0
7,827
/* * 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 ...
gioenn/xSpark
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala
Scala
apache-2.0
22,679
import java.io._ import java.util import java.util.{StringTokenizer} import scala.collection.mutable object D { class Edge(val u: Int, val v: Int, val w: Int) def solve(c: Int, edges: util.HashMap[Int, util.List[Edge]]): Int = { val visited = new util.HashSet[Int](edges.size() * 2) def findMin(node: Int)...
shengmin/coding-problem
acm/frozen-rose-heads/D.scala
Scala
mit
1,728
/* * 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 ...
rekhajoshm/spark
core/src/test/scala/org/apache/spark/executor/ExecutorSuite.scala
Scala
apache-2.0
18,052
package com.misiunas.geoscala.surfaces /** * User: karolis@misiunas.com * Date: 10/08/2013 * Time: 21:47 */ trait OnAPlane extends Surface { /** get plane that this object lies on */ def getPlane: Plane // todo projections }
kmisiunas/GeoScala
src/main/scala/com/misiunas/geoscala/surfaces/OnAPlane.scala
Scala
mit
239
/* * Copyright (c) 2014 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.apache.org...
simplybusiness/snowplow-fork
3-enrich/scala-hadoop-shred/src/main/scala/com.snowplowanalytics.snowplow.enrich/hadoop/utils/JsonUtils.scala
Scala
apache-2.0
2,147
package mesosphere.marathon package core.launcher.impl import java.util.Collections import mesosphere.marathon.core.launcher.{ InstanceOp, TaskLauncher } import mesosphere.marathon.metrics.{ Metrics, ServiceMetric } import mesosphere.marathon.stream.Implicits._ import org.apache.mesos.Protos.{ OfferID, Status } impor...
guenter/marathon
src/main/scala/mesosphere/marathon/core/launcher/impl/TaskLauncherImpl.scala
Scala
apache-2.0
2,838
package net.debasishg.sw15.algebra package domain.trade package model import java.util.{Date, Calendar} import scalaz._ import Scalaz._ trait OrderModel {this: RefModel => case class LineItem(ins: Instrument, qty: BigDecimal, price: BigDecimal) case class Order(no: String, date: Date, customer: Customer, items: ...
debasishg/scalaworld15
src/main/scala/sw15/algebra/ordermodel.scala
Scala
apache-2.0
530
package models.generator.javaAwsLambdaPojos import com.amazonaws.services.dynamodbv2.datamodeling.{DynamoDBTypeConvertedEnum, _} import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.squareup.javapoet.AnnotationSpec.Builder import com.squareup.javapoet._ import io.apibuilder.generator.v0.models.{File...
mbryzek/apidoc-generator
java-aws-lambda-pojos/src/main/scala/models/generator/javaAwsLambdaPojos/BaseJavaAwsLambdaPOJOCodeGenerator.scala
Scala
mit
9,716
package breeze.linalg.operators import breeze.linalg.support.CanMapValues.DenseCanMapValues import breeze.linalg.{DenseMatrix, DenseVector, HashVector, SparseVector, Vector} import breeze.linalg.support.CanTraverseValues.ValuesVisitor import breeze.linalg.support._ import breeze.linalg.support.CanZipAndTraverseValues....
scalanlp/breeze
math/src/main/scala/breeze/linalg/operators/TraversalOps.scala
Scala
apache-2.0
12,925
/* * 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 ...
zimmermatt/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/stream/table/OverWindowTest.scala
Scala
apache-2.0
17,369
/* * 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 ...
andrewor14/iolap
core/src/main/scala/org/apache/spark/deploy/DeployMessage.scala
Scala
apache-2.0
5,981
/* * Copyright 2014 Frugal Mechanic (http://frugalmechanic.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
frugalmechanic/fm-sbt-s3-resolver
src/main/scala/fm/sbt/S3URLHandler.scala
Scala
apache-2.0
19,580
/* * Copyright (c) 2011 Alois Cochard * * 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...
mandubian/shapeless
project/Publishing.scala
Scala
apache-2.0
3,079
package skinny.filter import org.scalatra.test.scalatest.ScalatraFlatSpec import skinny.SkinnyApiController import skinny.routing.Routes class SkinnyFilterActivationSpec extends ScalatraFlatSpec with skinny.Logging { object Controller extends SkinnyApiController with SkinnyFilterActivation with Routes { overri...
seratch/skinny-framework
framework/src/test/scala/skinny/filter/SkinnyFilterActivationSpec.scala
Scala
mit
773
package slrn.model import slrn.feature._ import org.scalatest.FunSuite import slrn.weights.{VocabWeights, VocabularyIndexer} class ModelTest extends FunSuite { val epsilon = 1e-9 val ftr1 = ContinuousFeature("num1")(2.0) val ftr2 = ContinuousFeature("num2")(-1.0) val red = DiscreteFeature("color", "red")(1...
lorserker/slrn
src/test/scala/slrn/models.scala
Scala
mit
1,366
package reswing import scala.swing.{Component, Dimension, MainFrame, Point, Rectangle} class ReMainFrame( contents: ReSwingValue[Component] = (), title: ReSwingValue[String] = (), size: ReSwingValue[Dimension] = (), location: ReSwingValue[Point] = (), bounds: ReSwingValue[Rectangle] = (), mini...
guidosalva/REScala
Code/Extensions/RESwing/src/main/scala/reswing/ReMainFrame.scala
Scala
apache-2.0
712
package com.softwaremill.example.serializers import com.softwaremill.example.SomeScalaComplexObject import com.softwaremill.session.MultiValueSessionSerializer import scala.util.Try class MyScalaMultiValueSessionSerializer extends MultiValueSessionSerializer[SomeScalaComplexObject]( (sco: SomeScalaComplexO...
softwaremill/akka-http-session
example/src/main/scala/com/softwaremill/example/serializers/MyScalaMultiValueSessionSerializer.scala
Scala
apache-2.0
436
/* * 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 ...
GJL/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/stream/sql/LegacyTableSourceTest.scala
Scala
apache-2.0
15,550
/* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/pbik-frontend
app/models/TaxYearRange.scala
Scala
apache-2.0
683
package apps import java.io._ import scala.util.Random import org.apache.spark.SparkContext import org.apache.spark.SparkConf import org.apache.spark.sql.types._ import org.apache.spark.sql.{DataFrame, Row} import org.bytedeco.javacpp.caffe._ import libs._ import loaders._ import preprocessing._ // for this app to...
amplab/SparkNet
src/main/scala/apps/CifarApp.scala
Scala
mit
6,311
package mimir.api import org.eclipse.jetty.util.ssl.SslContextFactory import org.eclipse.jetty.server.Server import org.eclipse.jetty.server.SecureRequestCustomizer import org.eclipse.jetty.server.SslConnectionFactory import org.eclipse.jetty.server.HttpConfiguration import org.eclipse.jetty.server.ServerConnector imp...
UBOdin/mimir
src/main/scala/mimir/api/MimirAPI.scala
Scala
apache-2.0
9,677
/* * Derived from https://github.com/spray/spray/blob/v1.1-M7/spray-http/src/main/scala/spray/http/parser/AcceptHeader.scala * * Copyright (C) 2011-2012 spray.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...
hvesalai/http4s
core/src/main/scala/org/http4s/parser/AcceptHeader.scala
Scala
apache-2.0
2,006
package model import skinny.orm._, feature._ import scalikejdbc._ import org.joda.time._ case class DiaryComment( id: Long, diaryId: Option[Long] = None, accountId: Option[Long] = None, lessonId: Option[Long] = None, content: Option[String] = None, imgBucket: Option[String] = None, postedDate: Option[Da...
yoshitakes/skinny-task-example
src/main/scala/model/DiaryComment.scala
Scala
mit
829
package ml.combust.mleap.avro import java.io.ByteArrayOutputStream import java.nio.charset.Charset import org.apache.avro.Schema import org.apache.avro.file.DataFileWriter import org.apache.avro.generic.{GenericData, GenericDatumWriter} import SchemaConverter._ import ml.combust.mleap.runtime.frame.LeapFrame import m...
combust/mleap
mleap-avro/src/main/scala/ml/combust/mleap/avro/DefaultFrameWriter.scala
Scala
apache-2.0
1,502
package fpinscala.monoids import fpinscala.parallelism.Nonblocking._ import fpinscala.parallelism.Nonblocking.Par.toParOps // infix syntax for `Par.map`, `Par.flatMap`, etc trait Monoid[A] { def op(a1: A, a2: A): A def zero: A } object Monoid { val stringMonoid = new Monoid[String] { def op(a1: String, a2...
feynmanliang/fpinscala
exercises/src/main/scala/fpinscala/monoids/Monoid.scala
Scala
mit
7,727
import sbt._ import Keys._ // Play plugin import play.Project._ // Scalaxb plugin import sbtscalaxb.Plugin._ import ScalaxbKeys._ object ApplicationBuild extends Build { val appName = "hb-api" val appVersion = "5.4.17" val appDependencies = Seq( "io.github.cloudify" %% "spdf" % "1.3.1", "org.apache.po...
bsisa/hb-api
project/ApplicationBuild.scala
Scala
gpl-2.0
2,694
package au.id.cxd.math.example.charting import org.jfree.chart.{ChartPanel, JFreeChart} /** * Created by cd on 30/04/2016. */ object ChartHelper { def makeChartPanel(chart:JFreeChart, width:Int, height:Int) = { //ChartPanel(JFreeChart chart, int width, int height, int minimumDrawWidth, int minimumDrawHeigh...
cxd/scala-au.id.cxd.math
examples/src/test/scala/au/id/cxd/math/example/charting/ChartHelper.scala
Scala
mit
590
package de.tototec.sbuild.ant.tasks import org.apache.tools.ant.taskdefs.Zip import de.tototec.sbuild.Project import de.tototec.sbuild.ant.AntProject import java.io.File import org.apache.tools.ant.types.{ FileSet => AFileSet } object AntZip { def apply(destFile: File = null, baseDir: File = null, ...
SBuild-org/sbuild
de.tototec.sbuild.ant/src/main/scala/de/tototec/sbuild/ant/tasks/AntZip.scala
Scala
apache-2.0
2,203
package com.pharmpress.common.model.dmd /** * Created by James on 14/01/2015. */ case class Ampp( id: String, invalid: Option[String], name: String, abbrevName: Option[String], ampId: String, vmppId: String, vmpId: String, vtmId: Option[String], combPack: Option[String], legalCategory: Option[Str...
pharmpress/DmdBrowserScalaJs
jvm/app/com/pharmpress/common/model/dmd/Ampp.scala
Scala
apache-2.0
2,742
package org.sierra import java.nio.charset.Charset import org.scalatest.FlatSpec import org.scalatest.Matchers import org.sierra.command._ import scodec.codecs._ class StringIntegerSpec extends FlatSpec with Matchers { import api._ trait Setup extends RedisSetup { val StringData = Path("root").on("ok_spec"...
naoh87/sierra
src/test/scala/org/sierra/StringIntegerSpec.scala
Scala
mit
852
package org.openurp.edu.eams.teach.election.service.rule.election.filter import org.beangle.commons.collection.Collections import org.openurp.edu.eams.teach.election.service.context.ElectState import org.openurp.edu.eams.teach.election.service.context.ElectionCourseContext import org.openurp.edu.eams.teach.election.se...
openurp/edu-eams-webapp
election/src/main/scala/org/openurp/edu/eams/teach/election/service/rule/election/filter/ElectableLessonByGenderFilter.scala
Scala
gpl-3.0
1,062
package pl.touk.nussknacker.ui.processreport import cats.data.NonEmptyList import org.scalatest.{FunSuite, Matchers} import pl.touk.nussknacker.engine.api.process.VersionId import pl.touk.nussknacker.engine.api.{FragmentSpecificData, MetaData, StreamMetaData} import pl.touk.nussknacker.engine.build.{ScenarioBuilder, G...
TouK/nussknacker
ui/server/src/test/scala/pl/touk/nussknacker/ui/processreport/ProcessCounterTest.scala
Scala
apache-2.0
4,307
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._ import com.intellij.psi.stubs.StubElement import com.intellij.psi.tree.IElementTyp...
JetBrains/intellij-scala-historical
src/org/jetbrains/plugins/scala/lang/psi/impl/statements/ScFunctionDefinitionImpl.scala
Scala
apache-2.0
4,704
package im.tox.antox.utils import android.graphics.Color import im.tox.jtoxcore.ToxUserStatus import im.tox.antox.R //remove if not needed import scala.collection.JavaConversions._ object IconColor { def iconDrawable(isOnline: java.lang.Boolean, status: ToxUserStatus): Int = { val color = if (!isOnline) { ...
ollieh/Antox
app/src/main/scala/im/tox/antox/utils/IconColor.scala
Scala
gpl-3.0
691
package io.fsq.twofishes.indexer.output import io.fsq.rogue.IterUtil import io.fsq.twofishes.core.Indexes import io.fsq.twofishes.indexer.mongo.RogueImplicits._ import io.fsq.twofishes.indexer.util.GeocodeRecord import io.fsq.twofishes.model.gen.{ThriftGeocodeRecord, ThriftS2CoveringIndex} import io.fsq.twofishes.util...
foursquare/fsqio
src/jvm/io/fsq/twofishes/indexer/output/S2CoveringIndexer.scala
Scala
apache-2.0
2,495
package org.xarcher.ea.test import org.h2.jdbcx.JdbcDataSource import org.xarcher.ea.test.util.SlickUtil package object models { val profile = slick.driver.H2Driver import profile.api._ val globalArticleTable = TableQuery[GlobalArticleTable] val db = { val datasource = new JdbcDataSource() datas...
djx314/slickea
fullTest/src/test/scala/org/xarcher/ea/test/models/package.scala
Scala
mit
506
/* * Copyright (C) 2013 The Mango 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 agre...
feijoas/mango
src/main/scala/org/feijoas/mango/common/collect/RangeMapLike.scala
Scala
apache-2.0
4,718
package com.twitter.finatra.http.tests.integration.multiserver.add2server import com.twitter.finatra.httpclient.modules.HttpClientModule object Add1HttpClientModule extends HttpClientModule { val dest = "flag!add1-server" }
syamantm/finatra
http/src/test/scala/com/twitter/finatra/http/tests/integration/multiserver/add2server/Add1HttpClientModule.scala
Scala
apache-2.0
227
package mesosphere.marathon.upgrade import akka.actor.{ Actor, ActorLogging, Cancellable } import akka.event.EventStream import mesosphere.marathon.TaskUpgradeCanceledException import mesosphere.marathon.core.task.Task import mesosphere.marathon.core.task.tracker.TaskTracker import mesosphere.marathon.event.MesosStatu...
ss75710541/marathon
src/main/scala/mesosphere/marathon/upgrade/StoppingBehavior.scala
Scala
apache-2.0
3,090
/*** * Copyright 2014 Rackspace US, 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 applica...
tylerroyal/api-checker
core/src/main/scala/com/rackspace/com/papi/components/checker/step/startend/URLFail.scala
Scala
apache-2.0
1,827
package spinoco.protocol.http.header.value /** * Created by pach on 12/01/17. */ sealed trait RangeUnit object RangeUnit { case object Bytes extends RangeUnit sealed case class Custom(name: String) extends RangeUnit }
Spinoco/protocol
http/src/main/scala/spinoco/protocol/http/header/value/RangeUnit.scala
Scala
mit
230
/* * Licensed to Tuplejump Software Pvt. Ltd. under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Tuplejump Software Pvt. Ltd. licenses this file * to you under the Apache License, Version 2.0 (the * "Li...
tuplejump/calliope
macros/src/main/scala/com/tuplejump/calliope/Types.scala
Scala
apache-2.0
1,324
package org.jetbrains.plugins.scala.codeInsight.intentions.controlflow import org.jetbrains.plugins.scala.codeInsight.intentions.ScalaIntentionTestBase import org.jetbrains.plugins.scala.codeInsight.intention.controlflow.SplitIfIntention /** * @author Ksenia.Sautina * @since 6/8/12 */ class SplitIfIntentionTest e...
consulo/consulo-scala
test/org/jetbrains/plugins/scala/codeInsight/intentions/controlflow/SplitIfIntentionTest.scala
Scala
apache-2.0
5,220
/* * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Fou...
tesendic/Relite
src/generated/scala/DoubleSparseMatrixCOO.scala
Scala
agpl-3.0
2,028
package me.mziccard.audio.bpm import scala.collection.mutable.ArrayBuffer import scala.collection.mutable.HashMap import me.mziccard.audio.filter.AudioFilter import me.mziccard.audio.AudioFile /** * Class <code>FilterBPMDetector</code> can be used to * detect the tempo of a track in beats-per-minute. * BPM Detec...
mziccard/scala-audio-file
src/main/scala/me/mziccard/audio/bpm/FilterBPMDetector.scala
Scala
mit
9,527
/* * 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
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetReadSupport.scala
Scala
apache-2.0
16,596
package stormlantern.consul.client import java.util.UUID import akka.actor.Status.Failure import akka.actor._ import akka.util.Timeout import stormlantern.consul.client.dao.ServiceInstance import stormlantern.consul.client.discovery.{ ConnectionStrategy, ServiceAvailabilityActor, ServiceDefinition } import stormlante...
dlouwers/reactive-consul
client/src/main/scala/stormlantern/consul/client/ServiceBrokerActor.scala
Scala
mit
4,538
// Jubatus: Online machine learning framework for distributed environment // Copyright (C) 2014-2015 Preferred Networks and Nippon Telegraph and Telephone Corporation. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License version 2.1...
jubatus/jubaql-server
processor/src/main/scala/us/jubat/jubaql_server/processor/HandleExceptions.scala
Scala
lgpl-2.1
1,923
/* * Copyright 2012-2017 Johannes Rudolph * * 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 ...
jrudolph/json-lenses
src/test/scala/spray/json/lenses/JsonLensesSpec.scala
Scala
apache-2.0
10,869
package agilesites.config import sbt.Keys._ import sbt._ import sbt.plugins.JvmPlugin object AgileSitesConfigPlugin extends AutoPlugin with PropertySettings with VersionSettings { override def requires = JvmPlugin val autoImport = AgileSitesConfigKeys import AgileSitesConfigKeys._ override val proje...
agilesites/agilesites2-build
src/main/scala/agilesites/config/AgileSitesConfigPlugin.scala
Scala
mit
3,542
package test import org.specs2.mutable._ import play.api.test._ import play.api.test.Helpers._ /** * Add your spec here. * You can mock out a whole application including requests, plugins etc. * For more information, consult the wiki. */ class ApplicationSpec extends Specification { "Application" should { ...
njacobs5074/glowing-bear
test/ApplicationSpec.scala
Scala
apache-2.0
700
/** * The MIT License (MIT) * * Copyright (c) 2016 FishDog5000 * * 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 *...
FishDog5000/FishDog5000sCore
src/main/scala/net/fishdog5000/core/basestuff/BaseConfig.scala
Scala
mit
3,251
/** * Copyright 2011-2017 GatlingCorp (http://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...
timve/gatling
gatling-charts/src/main/scala/io/gatling/charts/report/Container.scala
Scala
apache-2.0
2,199
package org.jetbrains.plugins.scala package lang package structureView import org.jetbrains.plugins.scala.lang.psi.api.statements.params._ import org.jetbrains.plugins.scala.lang.psi.types.ScSubstitutor import org.jetbrains.plugins.scala.lang.psi.types.result._ /** * @author Alexander Podkhalyuzin * Date: 07.06.2008 ...
triplequote/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/structureView/StructureViewUtil.scala
Scala
apache-2.0
1,399
/* * 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 ...
javadba/ebperf
src/main/scala/com/blazedb/sparkperf/DataGenerator.scala
Scala
apache-2.0
6,163
/* * P25.scala * Copyright (C) 2017 n3xtchen <echenwen@gmail.com> * * Distributed under terms of the GPL-2.0 license. */ package nextchen import reflect.ClassTag import P23.randomSelect object P25 { // scala> randomPermute(List('a, 'b, 'c, 'd, 'e, 'f)) // res0: List[Symbol] = List('b, 'a, 'd, 'c, 'e, 'f) ...
n3xtchen/s-99
src/main/scala/nextchen/P25.scala
Scala
mit
1,054
package com.sksamuel.elastic4s.source /** @author Stephen Samuel */ trait DocumentSource { def json: String } /** An instance of DocumentSource that just provides json as is */ case class JsonDocumentSource(j: String) extends DocumentSource { override def json = j } trait DocumentMap { def map: Map[String, A...
beni55/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/source/Source.scala
Scala
apache-2.0
327
/* * Copyright (c) 2016 by its authors. Some rights reserved. * See the project homepage at: https://sincron.org * * 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.apa...
monixio/sincron
sincron-macros/shared/src/main/scala/org/sincron/macros/InlineMacros.scala
Scala
apache-2.0
3,187
// Copyright © 2009, Esko Luontola. All Rights Reserved. // This software is released under the MIT License. See LICENSE.txt package net.orfjackal.bcd import org.objectweb.asm.Opcodes import org.objectweb.asm.tree._ import org.specs._ object interpretSpec extends Specification { "When no commands have been executed...
orfjackal/bytecode-detective
src/test/scala/net/orfjackal/bcd/interpretSpec.scala
Scala
mit
1,116