code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
package org.deeplearning4s.nn.conf import org.nd4j.linalg.lossfunctions.LossFunctions.{LossFunction => LF} /* LossFunction stands for org.nd4j.linalg.lossfunctions.LossFunctions.LossFunction. CustomLossFunction stands for all implemented classes of org.nd4j.linalg.api.ops.Op. */ sealed class LossFunction(val va...
everpeace/deeplearning4s
src/main/scala/org/deeplearning4s/nn/conf/LossFunction.scala
Scala
apache-2.0
4,968
/* Copyright 2009-2011 Jay Conrod * * This file is part of Tungsten. * * Tungsten 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 of * the License, or (at your option) any late...
jayconrod/tungsten
llvm/src/test/scala/tungsten/llvm/BlockParameterAnalysisTest.scala
Scala
gpl-2.0
3,030
package edu.duke.oit.vw.models import edu.duke.oit.vw.utils._ import edu.duke.oit.vw.solr.Vivo case class ArtisticWork(uri:String, vivoType: String, label: String, attributes:Option[Map[String, String]]) extends VivoAttributes(uri, vivoType...
OIT-ADS-Web/vivo_widgets
src/main/scala/models/ArtisticWork.scala
Scala
bsd-3-clause
1,102
package com.github.mdr.mash.evaluator class LastParamTest extends AbstractEvaluatorTest { "def foo n... m = m; foo 1 2 3" ==> 3 "def foo n... m = m; foo 3" ==> 3 "def foo (n = 10) m = m; foo 3" ==> 3 "def fun first (second = 10) = { first, second }; fun 1 2" ==> "{ first: 1, second: 2 }" "def fun first (se...
mdr/mash
src/test/scala/com/github/mdr/mash/evaluator/LastParamTest.scala
Scala
mit
918
package scaladex.core.model /** * Dependency model * * @param source the maven reference of the source, ex: scaladex * @param target the maven reference of one of the dependant libraries of the source, ex: doobie */ case class ArtifactDependency( source: Artifact.MavenReference, target: Artifact.MavenRefe...
scalacenter/scaladex
modules/core/shared/src/main/scala/scaladex/core/model/ArtifactDependency.scala
Scala
bsd-3-clause
2,168
/* * 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...
poplav/incubator-toree
kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/relay/ExecuteRequestRelay.scala
Scala
apache-2.0
4,388
/* * 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 ...
HuaweiBigData/carbondata
integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/DataManagementFunc.scala
Scala
apache-2.0
8,036
package net.javachallenge import net.javachallenge.util.settings.Defaults import net.javachallenge.api.PlayMode import net.javachallenge.api.UserInterfaceMode import com.google.common.io.Files import scala.collection.mutable import java.util.Random import java.awt._ import java.awt.event._ import javax.swing._ import ...
AI-comp/JavaChallenge2012
src/main/scala/net/javachallenge/Main.scala
Scala
apache-2.0
11,357
package beam.utils.csv.writers import org.matsim.api.core.v01.Scenario import scala.collection.JavaConverters._ object NetworkCsvWriter extends ScenarioCsvWriter { private case class LinkMergeEntry( linkId: String, linkLength: String, linkFreeSpeed: String, linkCapacity: Double, numberOfLanes:...
colinsheppard/beam
src/main/scala/beam/utils/csv/writers/NetworkCsvWriter.scala
Scala
gpl-3.0
2,514
package ammonite.terminal.filters import ammonite.terminal.FilterTools._ import ammonite.terminal.LazyList.~: import ammonite.terminal.SpecialKeys.Ctrl import ammonite.terminal._ import acyclic.file import scala.collection.mutable import Filter._ /** * A filter that implements "undo" functionality in the ammonite R...
coderabhishek/Ammonite
terminal/src/main/scala/ammonite/terminal/filters/UndoFilter.scala
Scala
mit
5,765
package io.regadas.shorty.service import cats.data._ import cats.data.Validated._ import cats.effect._ import cats.implicits._ import eu.timepit.refined.api.{RefType, Refined} import io.circe.generic.auto._ import io.circe.syntax._ import io.circe.refined._ import io.regadas.shorty.core.refined._ import io.regadas.sho...
regadas/shorty
shorty-service/src/main/scala/io/regadas/shorty/service/Shorty.scala
Scala
mit
1,751
package org.scalatra import scala.concurrent.ops._ import test.scalatest.ScalatraWordSpec class RouteConcurrencyServlet extends ScalatraServlet { for { i <- 0 until 500 x = future { get(false) { "/"} } } x() val postRoutes = for { i <- 0 until 500 x = future { post(false) { "/"} } } yield x()...
louk/scalatra
core/src/test/scala/org/scalatra/RouteConcurrencySpec.scala
Scala
bsd-2-clause
1,065
package com.codemettle.reactivemq import akka.actor.{ActorContext, ActorRefFactory, ActorSystem} import scala.concurrent.{Await, Future} import scala.concurrent.duration._ import scala.language.implicitConversions /** * Created by steven on 9/19/2017. */ package object util { implicit def actorSystem(implicit a...
CodeMettle/reactivemq
src/main/scala/com/codemettle/reactivemq/util/package.scala
Scala
apache-2.0
762
package oocamp import org.scalatest.{Matchers, FlatSpec} /** * Created by twer on 14/11/23. */ class SmartParkingBoySpec extends FlatSpec with Matchers { it should "can park car then return a ticket" in { new SmartParkingBoy(Array(new ParkingLot(1))).park(Car()) shouldNot be(None) } it should "can't take...
focusj/OOCamp_Scala
src/test/scala/oocamp/SmartParkingBoySpec.scala
Scala
gpl-2.0
2,340
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
jooooooon/rudder
rudder-core/src/main/scala/com/normation/rudder/services/policies/RudderPromiseWriterServiceImpl.scala
Scala
agpl-3.0
10,724
/* * @author Philip Stutz * @author Mihaela Verman * * Copyright 2013 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.apa...
jacqueslk/triplerush-filter
src/main/scala/com/signalcollect/triplerush/optimizers/GreedyCardinalityOptimizer.scala
Scala
apache-2.0
1,249
package org.jetbrains.plugins.scala package lang package psi package api package base package patterns /** * @author Alexander Podkhalyuzin * Date: 28.02.2008 */ trait ScInfixPattern extends ScPattern { def leftPattern: ScPattern = findChildByClassScala(classOf[ScPattern]) def rightPattern: Option[ScPattern] = fi...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/api/base/patterns/ScInfixPattern.scala
Scala
apache-2.0
462
package nfn.service.Temperature import akka.actor.ActorRef import ccn.packet.{NFNInterest, CCNName} import lambdacalculus.parser.ast.{Constant, Str} import nfn.service._ import nfn.tools.Networking._ import scala.concurrent.duration._ /** * Created by blacksheeep on 17/11/15. */ class PredictionService extends N...
cn-uofbasel/nfn-scala
src/main/scala/nfn/service/Temperature/PredictionService.scala
Scala
isc
2,543
/* * 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 ...
pgandhi999/spark
sql/catalyst/src/main/java/org/apache/spark/sql/sources/v2/internal/V1Table.scala
Scala
apache-2.0
2,878
package mr.merc.unit sealed trait SoldierState { } object SoldierState { // TODO write tests for states case object Poisoned extends SoldierState case object Slowed extends SoldierState }
RenualdMarch/merc
src/main/scala/mr/merc/unit/SoldierState.scala
Scala
gpl-3.0
197
package week6 object polynomials{ val p1 = new Poly(Map(1->2.0,3->4.0, 5->6.2)) //> p1 : week6.Poly = 6.2x^5 + 4.0x^3 + 2.0x^1 val p2 = new Poly(Map(0->3.0, 3-> 7.0)) //> p2 : week6.Poly = 7.0x^3 + 3.0x^0 p1 + p2 //> res0: week6.Poly = 6.2x^5 + 11.0x^3 + 2...
moutai/ScalaCourseDemos
src/week6/polynomials.scala
Scala
apache-2.0
714
/* * 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 ...
zuotingbing/spark
sql/core/src/test/scala/org/apache/spark/sql/UserDefinedTypeSuite.scala
Scala
apache-2.0
11,658
package com.seanshubin.detangler.report import com.seanshubin.detangler.model.{Cycle, Detangled, Module, Standalone} class DependencyTemplateRulesImpl(detangled: Detangled, dependencyDirection: DependencyDirection) extends DependencyTemplateRules { override def generate(dependencyTemplate: HtmlElement, ...
SeanShubin/detangler
report/src/main/scala/com/seanshubin/detangler/report/DependencyTemplateRulesImpl.scala
Scala
unlicense
2,842
/* * 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/main/scala/org/apache/flink/table/calcite/FlinkRelBuilder.scala
Scala
apache-2.0
3,600
/* * 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 ...
bwsw/t-streams
src/main/scala/com/bwsw/tstreams/agents/producer/RPCProducerTransaction.scala
Scala
apache-2.0
1,366
/* * Copyright 2014 Treode, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
Treode/store
core/stub/com/treode/async/stubs/package.scala
Scala
apache-2.0
3,025
/* * Licensed to The Apereo Foundation under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * The Apereo Foundation licenses this file to you under the Apache License, * Version 2.0, (the "License"); you ma...
equella/Equella
Source/Plugins/Core/com.equella.core/scalasrc/com/tle/core/item/standard/NotifyMyLive.scala
Scala
apache-2.0
1,571
import sbt._ import Keys._ import AndroidKeys._ import Github._ object General { val settings = Defaults.defaultSettings ++ Seq ( version := "0.1.4", versionCode := 5, organization := "com.zegoggles", scalaVersion := "2.8.1" // 2.9.1 fail with DEXOPT install errors ) val androidSettings = se...
jberkel/gist-it
project/build.scala
Scala
mit
1,568
package nat.traversal.upnp.igd import akka.actor.ActorSystem import java.text.SimpleDateFormat import java.util.Date import nat.traversal.util.{NodeConverters, NodeOps} import scala.concurrent.ExecutionContext import scala.xml.Node /** * WAN connection. */ class WANConnection( val device: WANDevice, val service...
suiryc/nat-traversal
src/main/scala/nat/traversal/upnp/igd/WANConnection.scala
Scala
gpl-3.0
6,246
package mypipe.snapshotter import com.github.mauricio.async.db.{Connection, QueryResult} import mypipe.mysql.BinaryLogFilePosition import scala.concurrent.{ExecutionContext, Future} object MySQLSnapshotter { val trxIsolationLevel = "SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;" val autoCommit = "SET autocom...
tramchamploo/mypipe
mypipe-snapshotter/src/main/scala/mypipe/snapshotter/MySQLSnapshotter.scala
Scala
apache-2.0
3,244
import scala.reflect.io._ import java.net.URLClassLoader object Test extends App { val jarsOrDirectories = Set("partest.lib", "partest.reflect", "partest.comp") map sys.props object AllowedMissingClass { // Some classes in scala-compiler.jar have references to jline classes, which seem to be // not on the...
martijnhoekstra/scala
test/files/jvm/innerClassEnclMethodJavaReflection.scala
Scala
apache-2.0
2,699
val x = Option((1, 2, 3)).map(_ + _ + _) def foo[T <: Tuple : Tuple.IsMappedBy[Option]](t: T)(f: Tuple.InverseMap[T, Option] => Int) = null val y = foo(Option(1), Option(2), Option(3))(_ + _ + _) //val x: (Tuple3[Int, Int, Int] => Int) = _ + _ + _
dotty-staging/dotty
tests/pos/i12127.scala
Scala
apache-2.0
249
package im.actor.server.api.rpc.service.auth import im.actor.api.rpc.messaging.{ ServiceExContactRegistered, ServiceMessage } object ServiceMessages { def contactRegistered(userId: Int) = ServiceMessage("Contact registered", Some(ServiceExContactRegistered(userId))) }
greatdinosaur/actor-platform
actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/auth/ServiceMessages.scala
Scala
mit
274
package scavenger.backend.worker import scala.concurrent.Future import scavenger.Computation import scavenger.backend.SimpleComputationExecutor /** Worker-component that is responsible for evaluation of simple jobs on * worker nodes. * * Everything it needs is already implemented in `SimpleComputationExecutor`...
tyukiand/scavenger_2_x
src/main/scala/scavenger/backend/worker/BruteForceEvaluator.scala
Scala
gpl-3.0
679
package com.imadethatcow.hipchat.common.caseclass import com.imadethatcow.hipchat.common.HipchatValueObject case class Mention(id: Long, mention_name: String, name: String) extends HipchatValueObject
poweld/hipchat-scala
src/main/scala/com/imadethatcow/hipchat/common/caseclass/Mention.scala
Scala
mit
202
/* * Copyright 2011 Delving B.V. * * 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...
delving/dos
app/Jobs.scala
Scala
apache-2.0
1,869
package ru.tolsi.matcher case class ReverseOrders(order: Order, reverseOrder: Order) { require(order.price == reverseOrder.price) require(order.qty == reverseOrder.qty) require(order.`type` != reverseOrder.`type`) }
Tolsi/matcher
src/main/scala/ru/tolsi/matcher/ReverseOrders.scala
Scala
mit
223
package model case class AdminUser(id: Long, name: String, email: String)
skinny-framework/skinny-framework
example/src/main/scala/model/AdminUser.scala
Scala
mit
75
/* Copyright 2009-2016 EPFL, Lausanne */ package leon.synthesis package graph import leon.utils.UniqueCounter import java.io.{File, FileWriter, BufferedWriter} class DotGenerator(search: Search) { implicit val ctx = search.ctx val g = search.g val strat = search.strat private val idCounter = new UniqueCou...
epfl-lara/leon
src/main/scala/leon/synthesis/graph/DotGenerator.scala
Scala
gpl-3.0
3,042
package threesixty.ProcessingMethods.Aggregation import spray.json.DefaultJsonProtocol._ import spray.json._ import threesixty.ProcessingMethods.statistics.StatisticalAnalysis import threesixty.data.Data.{Identifier, Timestamp} import threesixty.data.Implicits.timestamp2Long import threesixty.data.metadata.{Resolution...
elordin/threesixty
src/main/scala/threesixty/ProcessingMethods/Aggregation/Aggregation.scala
Scala
mit
12,667
/* * Copyright (c) 2010 by Alexander Grünewald * * This file is part of gruenewa-grid, a grid computing runtime. * * gruenewa-grid 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 th...
gruenewa/gruenewa-grid
src/main/scala/gruenewa/grid/Grid.scala
Scala
gpl-3.0
2,671
package mesosphere.chaos import com.google.common.util.concurrent.ServiceManager import com.google.inject.{ Module, Guice } import org.rogach.scallop.ScallopConf import com.google.common.util.concurrent.Service import org.apache.log4j.Logger import org.slf4j.bridge.SLF4JBridgeHandler trait App extends scala.App { i...
abel-von/chaos
src/main/scala/mesosphere/chaos/App.scala
Scala
apache-2.0
1,701
package lore.compiler.semantics.functions import lore.compiler.feedback.{Feedback, Reporter} import lore.compiler.types.{Fit, TupleType} import scala.collection.mutable object Dispatch { /** * Resolves a multiple dispatch application for the given hierarchy and type. The empty fit and ambiguous call * err...
marcopennekamp/lore
compiler/src/lore/compiler/semantics/functions/Dispatch.scala
Scala
mit
3,661
package com.arcusys.valamis.web.servlet.public.parameters import com.arcusys.valamis.model.SkipTake import com.arcusys.valamis.web.servlet.base.ServletBase /** * Created by pkornilov on 1/30/17. */ trait BaseParameters { self: ServletBase => def id = params.as[Long]("id") def courseId = params.as[Long]("cou...
arcusys/Valamis
valamis-portlets/src/main/scala/com/arcusys/valamis/web/servlet/public/parameters/BaseParameters.scala
Scala
gpl-3.0
854
package org.jetbrains.plugins.scala package worksheet.actions import java.awt.datatransfer.StringSelection import com.intellij.icons.AllIcons import com.intellij.openapi.actionSystem.{AnAction, AnActionEvent} import com.intellij.openapi.editor._ import com.intellij.openapi.editor.impl.FoldingModelImpl import com.inte...
triplequote/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/worksheet/actions/CopyWorksheetAction.scala
Scala
apache-2.0
4,597
/* * 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...
alessandrolulli/reforest
src/main/scala/reforest/data/RawDataLabeled.scala
Scala
apache-2.0
1,300
/* * Copyright 2013-2015 Websudos, Limited. * * 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 c...
levinson/phantom
phantom-dsl/src/test/scala/com/websudos/phantom/builder/query/db/crud/SelectOptionalTest.scala
Scala
bsd-2-clause
3,839
import sbt.Keys._ import sbt._ import uk.gov.hmrc.SbtAutoBuildPlugin import uk.gov.hmrc.versioning.SbtGitVersioning object HmrcBuild extends Build { import BuildDependencies._ import uk.gov.hmrc.DefaultBuildSettings._ val appName = "play-events" lazy val PlayEvents = (project in file(".")) .enablePlugi...
keithhall/play-events
project/HmrcBuild.scala
Scala
apache-2.0
1,221
package maker.remote import java.io.{BufferedReader, InputStreamReader, PrintWriter} import java.net.Socket import maker.utils.os.Command import maker.utils.Int case class RemoteBuild(remoteHost : String, sshPort : Int, socketPort : Int, remoteAbsDir : String){ def remoteCompile(){ val copyScalaFilesCommand = C...
cage433/maker
maker/src/maker/remote/RemoteBuild.scala
Scala
bsd-2-clause
1,801
package org.littlewings.javaee7 import org.jboss.arquillian.container.test.api.Deployment import org.jboss.shrinkwrap.api.ShrinkWrap import org.jboss.shrinkwrap.api.asset.EmptyAsset import org.jboss.shrinkwrap.api.spec.WebArchive import org.jboss.shrinkwrap.resolver.api.maven.Maven trait Deployer { @Deployment de...
kazuhira-r/javaee7-scala-examples
arquillian-wildfly-container-embedded/src/test/scala/org/littlewings/javaee7/Deployer.scala
Scala
mit
787
package io.hnfmr.chapter3 object ContraMapTut extends App { trait Printable[A] { def format(value: A): String def contramap[B](func: B => A): Printable[B] = { val self = this new Printable[B] { def format(value: B): String = self.format(func(value)) } } } def format[A](val...
hnfmr/advanced-scala
src/main/scala/io/hnfmr/chapter3/ContraMapTut.scala
Scala
mit
1,055
/* * 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 ...
MLnick/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVDataSource.scala
Scala
apache-2.0
9,468
package org.jetbrains.plugins.scala package lang package psi package impl package toplevel package templates import com.intellij.lang.ASTNode import org.jetbrains.plugins.scala.caches.BlockModificationTracker import org.jetbrains.plugins.scala.lang.parser.ScalaElementType import org.jetbrains.plugins.scala.lang.psi.ap...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/toplevel/templates/ScTemplateParentsImpl.scala
Scala
apache-2.0
2,449
package x7c1.linen.repository.source.unread import org.junit.Assert.assertEquals import org.junit.Test import org.junit.runner.RunWith import org.robolectric.annotation.Config import org.robolectric.{RobolectricTestRunner, RuntimeEnvironment} import org.scalatest.junit.JUnitSuiteLike import x7c1.linen.database.control...
x7c1/Linen
linen-repository/src/test/scala/x7c1/linen/repository/source/unread/SourceOpenHelperTest.scala
Scala
mit
5,015
/* * Copyright (C) 2016 Language Technology Group and Interactive Graphics Systems Group, Technische Universität Darmstadt, Germany * * 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 Foundation, ...
thorbenwiese/newsleak-frontend
app/models/IteratorSession.scala
Scala
agpl-3.0
1,408
package example class ValPattern/*<-example::ValPattern#*/ { val (left/*<-example::ValPattern#left.*/, right/*<-example::ValPattern#right.*/) = (/*->scala::Tuple2.apply().*/1, 2) val Some/*->scala::Some.*//*->scala::Some.unapply().*/(number1/*<-example::ValPattern#number1.*/) = Some/*->scala::Some.*//*->scala...
som-snytt/dotty
tests/semanticdb/expect/ValPattern.expect.scala
Scala
apache-2.0
2,221
package slamdata.engine.physical.mongodb case class MapReduce( map: Js.FunDecl, reduce: Js.FunDecl, selection: Option[FindQuery] = None, inputSort: Option[Map[String, SortType]] = None, limit: Option[Int] = None, finalizer: Option[Js.FunDecl] = None, scope: Option[Map[String,...
sellout/slamengine-old
src/main/scala/slamdata/engine/physical/mongodb/mapreduce.scala
Scala
agpl-3.0
413
/* * Copyright 2018 Google Inc. 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 required by appli...
GoogleCloudDataproc/spark-bigquery-connector
spark-bigquery-dsv1/src/test/scala/com/google/cloud/spark/bigquery/BigQueryRelationProviderSuite.scala
Scala
apache-2.0
5,477
package com.geeksville.dapi.test import akka.actor.Actor import akka.actor.ActorLogging import com.geeksville.apiproxy.GCSHooksImpl import com.geeksville.util.Using._ import java.io.BufferedInputStream import akka.actor.Props import com.geeksville.mavlink.TlogStreamReceiver import com.geeksville.mavlink.MavlinkEventBu...
dronekit/dronekit-server
src/main/scala/com/geeksville/dapi/test/SimSimpleVehicle.scala
Scala
gpl-3.0
2,417
package com.wallace.demo.app.classloader /** * com.wallace.demo.app.classloader * Created by 10192057 on 2018/1/12 0012. */ private[classloader] class ParentClassLoader(parent: ClassLoader) extends ClassLoader(parent) { override def findClass(name: String): Class[_] = { super.findClass(name) } overrid...
BiyuHuang/CodePrototypesDemo
demo/ScalaDemo/src/main/scala/com/wallace/demo/app/classloader/ParentClassLoader.scala
Scala
apache-2.0
507
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
wzhongyuan/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/nn/mkldnn/LinearSpec.scala
Scala
apache-2.0
19,516
package dotty.tools.dotc import dotty.tools.FatalError class MissingCoreLibraryException(rootPackage: String) extends FatalError( s"""Could not find package $rootPackage from compiler core libraries. |Make sure the compiler core libraries are on the classpath. """.stripMargin )
som-snytt/dotty
compiler/src/dotty/tools/dotc/MissingCoreLibraryException.scala
Scala
apache-2.0
291
package concurrent_programming.monitors.memory_allocation import io.threadcso.Condition import io.threadcso.monitors.FairMonitor import scala.collection.mutable /* Monitor-based and prioritized  Our second solution stores waiting requests in a priority queue ordered by increasing count.  Each waiting request aw...
AlexandruValeanu/Concurrent-Programming-in-Scala
src/concurrent_programming/monitors/memory_allocation/Allocator2.scala
Scala
gpl-3.0
1,597
package net.caoticode.dirwatcher.actors import akka.actor._ import java.io.File import net.caoticode.dirwatcher._ import net.caoticode.dirwatcher.actors.Messages._ import java.nio.file._ import java.nio.file.StandardWatchEventKinds._ import util.control.Breaks._ import scala.collection.JavaConversions._ import java.ni...
mdread/dir-watcher
src/main/scala/net/caoticode/dirwatcher/actors/MonitorActor.scala
Scala
mit
3,157
package com.gilazaria.subsearch.utils import org.scalatest.FlatSpec import com.gilazaria.subsearch.utils.HostnameUtils._ class HostnameUtilsSpec extends FlatSpec { behavior of "normalise" it should "trim leading and trailing whitespace" in { val subdomain = " sub.domain.com " val expected = "sub.domain...
gavia/subsearch
src/test/scala/com/gilazaria/subsearch/utils/HostnameUtilsSpec.scala
Scala
gpl-2.0
2,427
package org.flowpaint.model2.data import _root_.java.util.ArrayList import _root_.org.flowpaint.util.Rectangle import collection.mutable.HashMap /** * Contains located data points, that can be linked to each other to form vector graphics objects. * The data itself is not visible, but can be visualized in various w...
zzorn/flowpaint
src/main/scala/org/flowpaint/model2/data/DataMap.scala
Scala
gpl-2.0
760
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ahnqirage/spark
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/package.scala
Scala
apache-2.0
1,063
package redis.protocol import akka.util.ByteString import scala.annotation.tailrec import scala.collection.mutable import scala.util.Try import redis.MultiBulkConverter sealed trait RedisReply { def toByteString: ByteString def asOptByteString: Option[ByteString] } case class Status(status: ByteString) extends ...
beni55/rediscala
src/main/scala/redis/protocol/RedisProtocolReply.scala
Scala
apache-2.0
5,485
package org.bitcoins.core.protocol.script import org.bitcoins.testkit.core.gen.ScriptGenerators import org.scalacheck.{Prop, Properties} /** * Created by chris on 6/22/16. */ class MultiSignatureScriptSignatureSpec extends Properties("MultiSignatureScriptSigSpec") { property("Serialization symmetry") = ...
bitcoin-s/bitcoin-s-core
core-test/src/test/scala/org/bitcoins/core/protocol/script/MultiSignatureScriptSignatureSpec.scala
Scala
mit
501
package com.ldaniels528.play.json.support import com.fasterxml.jackson.databind.JsonNode import org.slf4j.LoggerFactory import play.api.libs.json.Json.{obj => J} import play.api.libs.json.{JsArray, JsBoolean, JsNull, JsNumber, JsString, JsValue} import scala.collection.JavaConversions._ /** * Java JSON Compatibilit...
ldaniels528/play-json-compat
src/main/scala/com/ldaniels528/play/json/support/JavaJsonCompatibility.scala
Scala
apache-2.0
1,790
/* * 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 ...
eyalfa/spark
core/src/main/scala/org/apache/spark/storage/BlockManager.scala
Scala
apache-2.0
66,521
package org.crudible.lift.util import net.liftweb.http.js.JsCmds import net.liftweb.http.SHtml import net.liftweb.http.js.JsCmd case class LabelCallback( label: String, protected val clientCallback: Option[() => JsCmd], protected val remoteCallback: Option[() => JsCmd]) { def clientCmd = clientCallback...
rehei/crudible
crudible-lift/src/main/scala/org/crudible/lift/util/LabelCallback.scala
Scala
apache-2.0
724
package uk.gov.gds.common.mongo import migration.{ ChangeScriptFailedException, ChangeScript, ChangeScriptStatus } import org.scalatest.matchers.ShouldMatchers import uk.gov.gds.common.testutil.MongoDatabaseBackedTest import org.scalatest.{ GivenWhenThen, FunSuite } import uk.gov.gds.common.config.Config class MongoD...
alphagov/gds-scala-common
mongo-utils/src/test/scala/uk/gov/gds/common/mongo/MongoDatabaseManagerTests.scala
Scala
mit
4,343
/** * © 2014 Evan Bennett * All rights reserved. */ package com.github.evanbennett.sbt_play_messages import sbt._ object PlayMessagesPlugin extends AutoPlugin { val BUILD_VERSION = "1.1.1-SNAPSHOT" // Needs to be in-sync with 'buildVersion' in build.sbt sealed abstract class Status object Statuses { case o...
evanbennett/play-messages
sbt-play-messages/src/main/scala/com/github/evanbennett/sbt_play_messages/PlayMessagesPlugin.scala
Scala
bsd-3-clause
4,058
package im.actor.server.email import scala.util.Try import com.github.kxbmap.configs._ import com.typesafe.config.Config case class EmailConfig( //sender part address: String, name: String, prefix: String, //smtp part host: String, port: Int, username: String, password: String, tls: ...
boneyao/actor-platform
actor-server/actor-email/src/main/scala/im/actor/server/email/EmailConfig.scala
Scala
mit
949
package org.mltoy.model.classification import scala.collection.immutable.HashMap import org.mltoy.model.AbstractParams import org.apache.log4j.{ Level, Logger } import org.apache.spark.{ SparkConf, SparkContext } import org.apache.spark.mllib.classification.{ LogisticRegressionWithLBFGS, SVMWithSGD } import org.apache...
shenbaise/mltoy
src/main/scala/org/mltoy/model/classification/BinaryClassification.scala
Scala
apache-2.0
3,268
package example import org.scalatra.test.scalatest.ScalatraFlatSpec import skinny.micro._ import scala.concurrent.Future object Hello extends WebApp { def message(implicit ctx: Context) = { s"Hello, ${params(ctx).getOrElse("name", "Anonymous")}" } // synchronous action get("/hello")(message) post("/h...
xerial/skinny-micro
micro/src/test/scala/example/HelloSpec.scala
Scala
bsd-2-clause
1,536
package uk.gov.gds.ier.transaction.ordinary.name import uk.gov.gds.ier.validation.ErrorTransformForm import uk.gov.gds.ier.step.StepTemplate import uk.gov.gds.ier.transaction.ordinary.InprogressOrdinary trait NameMustache extends StepTemplate[InprogressOrdinary] { case class NameModel( question: Question, ...
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/transaction/ordinary/name/NameMustache.scala
Scala
mit
1,994
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
bowenli86/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/NestedLoopJoinCodeGenerator.scala
Scala
apache-2.0
12,021
package spgui.circuit import diode._ import diode.react.ReactConnector import org.scalajs.dom.ext.LocalStorage import scala.util.{Success, Try} import spgui.theming.Theming.Theme import spgui.dashboard.Dashboard object SPGUICircuit extends Circuit[SPGUIModel] with ReactConnector[SPGUIModel] { def initialModel = Br...
kristoferB/SP
gui/src/main/scala/spgui/circuit/SPGUICircuit.scala
Scala
mit
6,150
package mesosphere.marathon package state import org.apache.mesos.{Protos => MesosProtos} import scala.jdk.CollectionConverters._ sealed trait Executable object Executable { def mergeFromProto(proto: MesosProtos.CommandInfo): Executable = if (proto.getShell) Command("").mergeFromProto(proto) else ArgvList...
mesosphere/marathon
src/main/scala/mesosphere/marathon/state/Executable.scala
Scala
apache-2.0
1,729
/** * Copyright (C) 2012 Kaj Magnus Lindberg (born 1979) * * 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 Foundation, either version 3 of the * License, or (at your option) any later version. ...
debiki/debiki-server-old
app/debiki/TemplateRenderer.scala
Scala
agpl-3.0
4,385
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
mdzimmerman/geomesa
geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/common/commands/AbstractHelpCommand.scala
Scala
apache-2.0
1,088
import sbt._ import sbt.Keys._ object CoreBuild extends Build { lazy val androidCore = Project( id = "android-core", base = file("."), settings = Defaults.defaultSettings ++ Seq( name := "Android Core", exportJars := true ) ) }
dant3/android-sdk-plugin
sbt-test/android-sdk-plugin/multiproject-with-resources/android-core/project/Build.scala
Scala
bsd-3-clause
262
package com.johnathangilday.autograder import org.eclipse.jetty.server.Server import org.eclipse.jetty.servlet.{ServletHolder, ServletContextHandler} import org.scalatra.servlet.MultipartConfig object Main extends App { val host = "0.0.0.0" val port = Option(System.getenv("PORT")).getOrElse("8080").toInt val ...
gilday/fast-grades
src/main/scala/com/johnathangilday/autograder/Main.scala
Scala
apache-2.0
818
/* * 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-execution/jvm/src/main/scala/monix/execution/schedulers/ThreadFactoryBuilder.scala
Scala
apache-2.0
1,615
/* * Copyright (c) 2019 Georgios Andreadakis * * 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...
GeorgiosAndreadakis/TextAnalyserPlatform
framework/src/main/scala/org/tap/framework/persistence/elastic/SaveDocOperation.scala
Scala
apache-2.0
1,200
package autosteamgifts import autosteamgifts.TimeAmount._ import chromex.storage.StorageArea import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scala.scalajs.js import scala.scalajs.js.JSConverters._ object Logs { trait Entry extends js.Object { val timestamp: Doubl...
erdavila/auto-steamgifts
src/main/scala/autosteamgifts/Logs.scala
Scala
mit
3,108
/* * 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 ...
darionyaphet/spark
sql/core/src/main/scala/org/apache/spark/sql/internal/CatalogImpl.scala
Scala
apache-2.0
18,934
import sbt._ object Dependencies { import BuildSettings._ val akka = "com.typesafe.akka" %% "akka-actor" % Versions.akka val swing = "org.scala-lang" % "scala-swing" % Versions.scala val paradise = "org.scalamacros" %% "quasiquotes" % Versions.paradise va...
Taerus/taskmanager
project/Dependencies.scala
Scala
bsd-3-clause
1,115
package com.yammer.dropwizard.scala.inject import javax.ws.rs.core.MultivaluedMap import com.sun.jersey.server.impl.model.parameter.multivalued.MultivaluedParameterExtractor /** * Given a parameter name and a possibly-null default value, attempts to extract * the first parameter values and return a Some instance, r...
ankoor512/dropwizard-scala
src/main/scala/com/yammer/dropwizard/scala/inject/ScalaOptionExtractor.scala
Scala
apache-2.0
751
package com.twitter.finagle.factory import com.twitter.conversions.time._ import com.twitter.finagle._ import com.twitter.util.{Future, Time, Await} import org.junit.runner.RunWith import org.scalatest.{FunSuite, Tag} import org.scalatest.junit.JUnitRunner import org.scalatest.mock.MockitoSugar import scala.collection...
sveinnfannar/finagle
finagle-core/src/test/scala/com/twitter/finagle/factory/ServiceFactoryCacheTest.scala
Scala
apache-2.0
2,779
/* Copyright 2015 Mandar Chandorkar 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 ...
transcendent-ai-labs/DynaML
dynaml-core/src/main/scala/io/github/mandar2812/dynaml/models/sgp/ESGPModel.scala
Scala
apache-2.0
14,729
/* * Licensed to STRATIO (C) under one or more contributor license agreements. * See the NOTICE file distributed with this work for additional information * regarding copyright ownership. The STRATIO (C) licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file...
pfcoperez/crossdata
crossdata-common/src/main/scala/com/stratio/crossdata/utils/ManifestUtils.scala
Scala
apache-2.0
6,065
/** * Copyright 2013-2015, AlwaysResolve Project (alwaysresolve.org), MOYD.CO LTD * This file incorporates work covered by the following copyright and permission notice: * * Copyright 2012 silenteh * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complianc...
Moydco/AlwaysResolveDNS
src/main/scala/models/Domain.scala
Scala
apache-2.0
1,843
package io.buoyant.router.http import com.twitter.finagle.Path import com.twitter.finagle.buoyant.Dst import com.twitter.finagle.http.Request import io.buoyant.router.RoutingFactory.{UnidentifiedRequest, IdentifiedRequest} import io.buoyant.test.{Awaits, Exceptions} import org.scalatest.FunSuite class HeaderIdentifie...
linkerd/linkerd
router/http/src/test/scala/io/buoyant/router/http/HeaderIdentifierTest.scala
Scala
apache-2.0
1,521
package o1.adventurejukebox /* * Copyright (c) 2014 Kari Lavikka * * 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...
tuner/adventure-jukebox
src/main/scala/o1/adventurejukebox/AdventureServlet.scala
Scala
mit
6,378
package jp.seraphr.fpinscala.laziness /** */ object Streams { def foldRight[A, B](s: Stream[A])(z: => B)(f: (A, => B) => B): B = s match { case x #:: xs => f(x, foldRight(xs)(z)(f)) case _ => z } def foldLeft[A, B](as: Stream[A])(z: => B)(f: (=> B, A) => B): B = as match { case x #:: xs => f...
seraphr/fpinscala
fp-in-scala/src/main/scala/jp/seraphr/fpinscala/laziness/Streams.scala
Scala
bsd-2-clause
2,347
package com.eevolution.context.dictionary.domain.api.repository import com.eevolution.context.dictionary._ /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Publi...
adempiere/ADReactiveSystem
dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/api/repository/BrowseFieldRepository.scala
Scala
gpl-3.0
1,135
package org.jetbrains.plugins.scala.extensions import java.awt.event.{ActionEvent, ActionListener} import javax.swing.JComponent import scala.language.reflectiveCalls /** * Nikolay.Tropin * 18-May-17 */ object JComponentExt { private type WithAddActionListener = JComponent { def addActionListener(al: Act...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/extensions/JComponentExt.scala
Scala
apache-2.0
527