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 ai.verta.client.entities import ai.verta.swagger.client.{ClientSet, HttpException} import sttp.model.StatusCode import scala.util.{Failure, Success, Try} object GetOrCreateEntity { def getOrCreate[T](get: () => Try[T], create: () => Try[T]): Try[T] = { create() match { case Success(x) => Success(...
mitdbg/modeldb
client/scala/src/main/scala/ai/verta/client/entities/GetOrCreateEntity.scala
Scala
mit
523
package uima.cc.qalab import java.util.Locale import org.apache.uima.cas.CAS import org.apache.uima.collection.CasConsumer_ImplBase import org.apache.uima.resource.ResourceProcessException import uima.cc.qalab.en.EnglishQALabSummarizationSubtaskCasConsumer import uima.cc.qalab.ja.JapaneseQALabSummarizationSubtaskCasC...
ktr-skmt/FelisCatusZero-multilingual
src/main/scala/uima/cc/qalab/QALabSummarizationSubtaskCasConsumer.scala
Scala
apache-2.0
1,020
/** * Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0 * See accompanying LICENSE file. */ package kafka.manager import javax.management._ import javax.management.remote.{JMXConnectorFactory, JMXServiceURL} import kafka.manager.ActorModel.BrokerMetrics import org.slf4j.LoggerFactory impor...
sdgdsffdsfff/kafka-manager
app/kafka/manager/KafkaJMX.scala
Scala
apache-2.0
8,833
package services import converter.shared._ import io.megl.scalajs.{HTML2SJS, JSON2CC} class ApiService extends Api { override def toVDOM(text: String): String = HTML2SJS.processString(text) override def toCaseClasses(rootName:String, jsonText: String): String = JSON2CC.convertToCC(rootName, jsonText) }
tcnoviembre2013/scalajs-converter
server/src/main/scala/services/ApiService.scala
Scala
apache-2.0
311
/* * 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/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala
Scala
apache-2.0
17,371
import stainless.lang._ import stainless.lang._ import stainless.annotation._ object AddNaturals4 { def addTwoNaturals(x: Int, y: Int): Int = { require(x >= 0 && y >= 0) x + y } ensuring(_ >= 0) def addTwoBigNaturals(x: BigInt, y: BigInt): BigInt = { require(x >= 0 && y >= 0) x + y } ensuring(...
epfl-lara/stainless
frontends/benchmarks/verification/invalid/AddNaturals4.scala
Scala
apache-2.0
475
package shred.man.cuda.driver import jcuda.driver.{JCudaDriver, CUfunction} import jcuda.Pointer class Dim3(val x: Int = 1, val y: Int = 1, val z: Int = 1) class CuFunction(val function: CUfunction) { def apply(params: Pointer, grid: Dim3, block: Dim3, sharedMemBytes: Int = 0) { JCudaDriver.cuLaunchKernel(func...
shredzzz/shredman
cuda/src/main/scala/shred/man/cuda/driver/CuFunction.scala
Scala
apache-2.0
454
/*********************************************************************** * Copyright (c) 2013-2018 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...
jahhulbert-ccri/geomesa
geomesa-kafka/geomesa-kafka-datastore/src/main/scala/org/locationtech/geomesa/kafka/data/KafkaCacheLoader.scala
Scala
apache-2.0
9,328
/* * Copyright (c) 2013-2014 Telefónica Investigación y Desarrollo S.A.U. * * 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 * * Unles...
telefonicaid/fiware-cosmos-platform
ambari-service-manager/src/test/scala/es/tid/cosmos/servicemanager/ambari/clusters/InMemoryClusterDescription.scala
Scala
apache-2.0
1,732
package com.twitter.finagle.http object Fields { val Accept = "Accept" val AcceptCharset = "Accept-Charset" val AcceptEncoding = "Accept-Encoding" val AcceptLanguage = "Accept-Language" val AcceptRanges = "Accept-Ranges" val AcceptPatch = "Accept-Patch" val AccessControlAllowCredentials = "Access-Control...
sveinnfannar/finagle
finagle-http/src/main/scala/com/twitter/finagle/http/Fields.scala
Scala
apache-2.0
2,888
/* * * * Copyright 2020 Lenses.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 app...
datamountaineer/stream-reactor
kafka-connect-common/src/main/scala/com/datamountaineer/streamreactor/common/config/base/traits/ConnectionSettings.scala
Scala
apache-2.0
2,161
package io.github.interestinglab.waterdrop.apis import org.apache.spark.api.java.JavaRDD import org.apache.spark.rdd.RDD import org.apache.spark.sql.{Dataset, Row, SparkSession} import org.apache.spark.streaming.StreamingContext import org.apache.spark.streaming.api.java.{JavaDStream, JavaStreamingContext} import org....
InterestingLab/waterdrop
waterdrop-apis/src/main/scala/io/github/interestinglab/waterdrop/apis/BaseJavaStreamingInput.scala
Scala
apache-2.0
1,197
package com.andbutso.poker.handhistory.model import com.github.aselab.activerecord.ActiveRecordTables import com.github.aselab.activerecord.dsl._ object Tables extends ActiveRecordTables { val handHistory = table[HandHistory] val playerAction = table[PlayerAction] }
marcel/texas
src/main/scala/com/andbutso/poker/handhistory/model/Tables.scala
Scala
mit
273
/* * Copyright 2009-2016 DigitalGlobe, 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 ag...
akarmas/mrgeo
mrgeo-mapalgebra/mrgeo-mapalgebra-rastermath/src/main/scala/org/mrgeo/mapalgebra/unarymath/RawUnaryMathMapOp.scala
Scala
apache-2.0
4,277
package com.twitter.finagle.http import org.scalatest.FunSuite class MapParamMapTest extends FunSuite { test("get") { assert(MapParamMap().get("key") == None) assert(MapParamMap("key" -> "value").get("key") == Some("value")) } test("keys") { val paramMap = MapParamMap("a" -> "1", "b" -> "2", "a" -...
luciferous/finagle
finagle-base-http/src/test/scala/com/twitter/finagle/http/MapParamMapTest.scala
Scala
apache-2.0
1,075
package org.sireum.pilarform.util trait CaseClassReflector extends Product { def getFields: List[(String, Any)] = { val names = getClass.getDeclaredFields map { _.getName } names.toList zip productIterator.toList } private def getFieldsOld: List[(String, Any)] = { var fieldValueToName: Map[Any, Str...
fgwei/pilarform
pilarform/src/main/scala/org/sireum/pilarform/util/CaseClassReflector.scala
Scala
epl-1.0
566
package io.eels.component.jdbc import com.sksamuel.exts.Logging import com.typesafe.config.{Config, ConfigFactory} import io.eels.schema.{Precision, Scale} case class JdbcReaderConfig(defaultPrecision: Precision, defaultScale: Scale) object JdbcReaderConfig extends Logging { def apply(): JdbcReaderConfig = apply(...
stheppi/eel
eel-components/src/main/scala/io/eels/component/jdbc/JdbcReaderConfig.scala
Scala
apache-2.0
631
/* * 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 ...
Mega-DatA-Lab/mxnet
scala-package/examples/src/main/scala/ml/dmlc/mxnetexamples/visualization/ExampleVis.scala
Scala
apache-2.0
3,223
package chiselutils.interfaces.exanicx4 import Chisel._ /** This module joins incomplete frames together back to back * based on the len of each frame * len = 0 => 8 */ class DataCombiner extends Module { val io = new Bundle { val dataIn = Vec.fill(8) { UInt(INPUT, 8) } val vld = Bool(INPUT) val l...
da-steve101/chisel-utils
src/main/scala/chiselutils/interfaces/exanicx4/DataCombiner.scala
Scala
lgpl-3.0
1,645
/** * 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...
roadboy/KafkaACL
core/src/main/scala/kafka/consumer/ConsumerFetcherThread.scala
Scala
apache-2.0
3,737
package scala.collection.mutable import org.junit.Assert._ import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.JUnit4 import scala.collection.mutable @RunWith(classOf[JUnit4]) class QueueTest { @Test def reversingReturnsAQueue(): Unit = { val q1 = Queue(1, 2, 3) val q2: Queue[I...
scala/scala
test/junit/scala/collection/mutable/QueueTest.scala
Scala
apache-2.0
1,203
package org.au9ustine.merry.model.identicon import org.scalatest.FlatSpec import javax.imageio.ImageIO import java.io.File /** * Created by shaotch on 1/6/14. */ class PatchTest extends FlatSpec { "Patch module" should "be available to generate a patch given a code" in { val identIcon = new IdentIc...
au9ustine/org.au9ustine.merry
src/test/scala/org/au9ustine/merry/model/identicon/PatchTest.scala
Scala
apache-2.0
833
/** * ____ __ ____ ____ ____,,___ ____ __ __ ____ * ( _ \ /__\ (_ )(_ _)( ___)/ __) ( _ \( )( )( _ \ Read * ) / /(__)\ / /_ _)(_ )__) \__ \ )___/ )(__)( ) _ < README.txt * (_)\_)(__)(__)(____)(____)(____)(___/ (__) (______)(____/ LICENSE.txt */ package razi...
razie/wikireactor
common/app/razie/wiki/model/Visibility.scala
Scala
apache-2.0
1,011
/* * SpeciessDAO.scala * * To change this template, choose Tools | Template Manager * and open the template in the editor. * @author Alexandre Martins */ package pt.cnbc.wikimodels.dataAccess import com.hp.hpl.jena.ontology.OntModel import com.hp.hpl.jena.ontology.OntModelSpec import com.hp.hpl.jena.ontology.O...
alexmsmartins/WikiModels
wm_server/src/main/scala/pt/cnbc/wikimodels/dataAccess/SpeciessDAO.scala
Scala
mit
11,312
package foo { class Bippy }
felixmulder/scala
test/pending/neg/dot-classpath/S_1.scala
Scala
bsd-3-clause
30
package com.beamly.playse4 import org.joda.time.{ Duration => JodaDuration } import play.api.libs.json._ import scala.concurrent.duration._ import java.util.concurrent.TimeUnit trait PlayJsonJodaTimeInstances { implicit val dateTimeFormat = Format( Reads jodaDateReads "yyyy-MM-dd'T'HH:mm:ss.SSSZZ", ...
gcpagano/playse4
src/main/scala/com/beamly/playse4/PlayJsonJodaTimeInstances.scala
Scala
apache-2.0
773
/* * 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 n...
KevinLiLu/kafka
core/src/test/scala/unit/kafka/server/KafkaApisTest.scala
Scala
apache-2.0
34,020
object Test
som-snytt/dotty
tests/pos/i7650/Test_2.scala
Scala
apache-2.0
12
package io.finch.argonaut import argonaut.{EncodeJson, Json, PrettyParams} import io.finch.Encode import io.finch.internal.BufText trait Encoders { protected def printer: PrettyParams /** * Maps Argonaut's [[EncodeJson]] to Finch's [[Encode]]. */ implicit def encodeArgonaut[A](implicit e: EncodeJson[A])...
yanana/finch
argonaut/src/main/scala/io/finch/argonaut/Encoders.scala
Scala
apache-2.0
626
package notebook.share import scala.collection.JavaConverters._ import tachyon.client.TachyonFS class Client(tachyonUrl:Option[String]) { lazy val tachyonClient = tachyonUrl.map( url => TachyonFS.get(url)).getOrElse(notebook.share.Tachyon.fs) def list(path:String) = tachyonClient.ls(path, false).asScala }
jayfans3/spark-notebook
modules/tachyon/src/main/tachyon_0.5.0/share/Client.scala
Scala
apache-2.0
314
/* * 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 ...
goldmedal/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/HashExpressionsSuite.scala
Scala
apache-2.0
28,836
package scaladci package semantics import util._ class ObjectIdentity extends DCIspecification { "Is same when playing a Role" >> { @context case class Context(roleA: Data) { val roleB = Data(42) def foo = roleA.me def bar = roleB.me role roleA { def me = self } ...
DCI/scaladci
coretest/src/test/Scala/scaladci/semantics/ObjectIdentity.scala
Scala
apache-2.0
852
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.api.routing.sird import java.net.{ URL, URI } import java.util.regex.Pattern import play.api.mvc.RequestHeader import play.utils.UriEncoding import scala.collection.concurrent.TrieMap import scala.util.matching.Regex /** * Th...
Shruti9520/playframework
framework/src/play/src/main/scala/play/api/routing/sird/PathExtractor.scala
Scala
apache-2.0
3,086
import sbt._ import Keys._ object FPInScalaBuild extends Build { val opts = Project.defaultSettings ++ Seq( scalaVersion := "2.11.7", resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/", libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.0-M12" % "test", depe...
ailveen/fpinscala
project/Build.scala
Scala
mit
1,452
package com.sksamuel.elastic4s.snapshots import java.util.UUID import com.sksamuel.elastic4s.testkit.DockerTests import org.scalatest.{FlatSpec, Matchers} class SnapshotTest extends FlatSpec with Matchers with DockerTests { private val repoName = "repotest_" + UUID.randomUUID() "createRepository" should "creat...
Tecsisa/elastic4s
elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/snapshots/SnapshotTest.scala
Scala
apache-2.0
2,022
/* * Copyright 2012 Twitter Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
cogitate/twitter-zipkin-uuid
zipkin-query-service/config/query-redis.scala
Scala
apache-2.0
874
/* * 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 ...
himanshudhami/PredictionIO
data/src/main/scala/org/apache/predictionio/data/storage/EvaluationInstances.scala
Scala
apache-2.0
5,579
/* * 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 ...
ashokblend/incubator-carbondata
integration/spark2/src/main/scala/org/apache/spark/util/Compaction.scala
Scala
apache-2.0
1,838
/* The MIT License (MIT) Copyright (c) 2016 Tom Needham 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, merge, p...
06needhamt/Neuroph-Intellij-Plugin
neuroph-plugin/src/com/thomas/needham/neurophidea/examples/scala/TestUHN.scala
Scala
mit
5,395
package ca.uwo.eng.sel.cepsim.sched import ca.uwo.eng.sel.cepsim.event.EventSet import ca.uwo.eng.sel.cepsim.query.{InputVertex, OutputVertex, Vertex} /** * Trait for simulation actions. The temporal relationships between actions are similar to the ones * implemented on JBoss Drools. */ trait Action extends Ord...
virsox/cepsim
cepsim-core/src/main/scala/ca/uwo/eng/sel/cepsim/sched/Action.scala
Scala
mit
2,858
package maker.utils import org.scalatest.events._ import org.scalatest.events.Event import org.scalatest.events.SuiteCompleted import org.scalatest.events.SuiteStarting import org.scalatest.Reporter import scala.collection.mutable.HashMap import scala.collection.mutable.SynchronizedMap import scala.collection.mutable....
syl20bnr/maker
utils/src/maker/utils/MakerTestResults.scala
Scala
bsd-2-clause
8,055
package ch.bsisa.hyperbird.dao.xqs import play.api.Logger import play.api.libs.ws.Response import play.api.libs.ws.WS import play.api.libs.concurrent.Execution.Implicits._ import play.api.mvc._ import play.api.mvc.Results._ import scala.concurrent.Future import ch.bsisa.hyperbird.util.format.JsonXmlConverter import ch...
bsisa/hb-api
app/ch/bsisa/hyperbird/dao/xqs/XQSQueriesProcessor.scala
Scala
gpl-2.0
1,298
/* * Copyright 2015 Databricks * * 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 i...
huaxingao/spark-redshift
project/SparkRedshiftBuild.scala
Scala
apache-2.0
8,542
/** * Ephedra Food Alerts * Copyright (C) 2013-2014 Philippe Sam-Long aka pulsation * * 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 ...
pulsation/ephedra-android
src/eu/pulsation/ephedra/AlertNotifications/EphedraAlarmReceiver.scala
Scala
gpl-3.0
1,931
// scalac: -Xfatal-warnings // sealed abstract class TA sealed abstract class TB extends TA case object A extends TA case object B extends TB sealed trait C case class CTA(id: Int, da: TA) extends C case class CTB(id: Int, da: TB) extends C class Test { def test(c: C): Unit = c match { case CTA(_, A) => cas...
lrytz/scala
test/files/pos/t9399.scala
Scala
apache-2.0
364
package model /** * POJO with the basic Computer State information (Used by the ComputerState DAO, Service and Controller) * @author Camilo Sampedro <camilo.sampedro@udea.edu.co> */ case class ComputerState( computerIp: String, registeredDate: java.sql.Timestam...
ProjectAton/AtonLab
app/model/ComputerState.scala
Scala
gpl-3.0
467
package org.jetbrains.plugins.dotty.lang.parser.parsing.patterns /** * @author adkozlov */ object Pattern2 extends org.jetbrains.plugins.scala.lang.parser.parsing.patterns.Pattern2 { override protected def pattern3 = Pattern3 }
ilinum/intellij-scala
src/org/jetbrains/plugins/dotty/lang/parser/parsing/patterns/Pattern2.scala
Scala
apache-2.0
235
package ru.biocad.ig.common.algorithms import scala.collection.GenIterable /** * Created with IntelliJ IDEA. * User: pavel * Date: 12.03.14 * Time: 13:19 */ object SmallTools { def truncateSuffix(text : String, suffix : String) : String = { val pattern = s"(.*?)($suffix)?$$".r val pattern(name, _) = te...
zmactep/igcat
lib/ig-common/src/main/scala/ru/biocad/ig/common/algorithms/SmallTools.scala
Scala
bsd-2-clause
1,181
package http import org.apache.http.params.{CoreConnectionPNames, CoreProtocolPNames, BasicHttpParams} import org.apache.http.client.params.{CookiePolicy, ClientPNames} import org.apache.http.conn.scheme.{PlainSocketFactory, Scheme, SchemeRegistry} import javax.net.ssl.{X509TrustManager, SSLContext} import java.securi...
SunriseSoftVN/hayhayblog
core/app/http/HttpClientBuilder.scala
Scala
gpl-2.0
2,758
package controllers import play.api.Play.current import scala.async.Async.{ async, await } import scala.concurrent._ import org.elasticsearch.search.SearchHit import play.api._ import play.api.mvc._ import play.api.libs.json._ import play.api.libs.concurrent.Execution.Implicits._ import play.Logger import utils._ impor...
adlnet/LR-Search
app/controllers/Data.scala
Scala
apache-2.0
2,053
/* Listok is a dialect of LISP Copyright (C) 2011 Konstantin Boukreev ru.kolyvan@gmail.com This file is part of Listok. Listok 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 ...
kolyvan/listok
src/main/scala/bif_number.scala
Scala
lgpl-3.0
17,761
/*********************************************************************** * Copyright (c) 2013-2020 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...
aheyne/geomesa
geomesa-index-api/src/main/scala/org/locationtech/geomesa/index/index/z2/legacy/Z2IndexV4.scala
Scala
apache-2.0
4,505
/* * Copyright (c) 2017-2022 Lymia Alusyia <lymia@lymiahugs.com> * * 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,...
Lymia/PrincessEdit
modules/princess-edit/src/main/scala/moe/lymia/princess/editor/scripting/ControlTypeLib.scala
Scala
mit
2,929
// Copyright (C) 2011-2012 the original author or authors. // See the LICENCE.txt file distributed with this work for additional // information regarding copyright ownership. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You ...
scalastyle/scalastyle
src/main/scala/org/scalastyle/scalariform/ProcedureDeclarationChecker.scala
Scala
apache-2.0
1,420
package com.earldouglas.xwp import java.util.jar.Manifest import sbt._ import sbt.Def.taskKey import sbt.Def.settingKey import sbt.Keys._ import sbt.FilesInfo.lastModified import sbt.FilesInfo.exists import sbt.FileFunction.cached object WebappPlugin extends AutoPlugin { object autoImport { lazy val webappPre...
earldouglas/xsbt-web-plugin
src/main/scala/com/earldouglas/xwp/WebappPlugin.scala
Scala
bsd-3-clause
5,898
/** * This file is part of Facsimile. * * (C) Copyright 2016 Taylor Raack. * * Facsimile is free software: you can redistribute it and/or modify * it under the terms of the Affero GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) an...
facsimile-linux/facsimile
src/main/scala/info/raack/facsimile/Host.scala
Scala
agpl-3.0
807
package slick.test.codegen import slick.driver.JdbcProfile import scala.concurrent.ExecutionContext.Implicits.global import slick.jdbc.meta.MTable import slick.ast.{Node, Select} import slick.test.codegen.generated._ import com.typesafe.slick.testkit.util.{TestCodeRunner, JdbcTestDB} import org.junit.Assert._ /** Te...
jkutner/slick
slick-testkit/src/test/scala/slick/test/codegen/GeneratedCodeTest.scala
Scala
bsd-2-clause
6,004
/* * 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/plan/nodes/dataset/DataSetAggregate.scala
Scala
apache-2.0
5,574
/** * This file is part of the TA Buddy project. * Copyright (c) 2014 Alexey Aksenov ezh@ezh.msk.ru * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Global License version 3 * as published by the Free Software Foundation with the addition of t...
digimead/digi-TABuddy-desktop
part-core-ui/src/main/scala/org/digimead/tabuddy/desktop/core/ui/support/TextValidator.scala
Scala
agpl-3.0
4,090
package breeze.linalg import scala.reflect.ClassTag /** * A SliceVector is a vector that is a view of another underlying tensor. For instance: * {{{ * val m = DenseMatrix(...) * m( (1,2), (3,4), (4,5)) * }}} * * will give a SliceVector such that apply/update at index 0 will map to m(1,2), index 1 to m(3,4), et...
ktakagaki/breeze
src/main/scala/breeze/linalg/SliceVector.scala
Scala
apache-2.0
1,020
/** * 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...
flange/drift-dev
kafka/00-kafka_2.11-0.10.1.0/libs/tmp/kafka/api/ApiUtils.scala
Scala
apache-2.0
4,139
package com.thoughtworks.pact.verify.pact import java.io.File import org.apache.commons.logging.LogFactory import play.api.libs.json.Json import scala.io.{Codec, Source} import scala.util.{Failure, Success, Try} /** * Created by xfwu on 12/07/2017. */ object PactFile { implicit val pactRequestFormat = Json.fo...
XuefengWu/pact_verify
src/main/scala/com/thoughtworks/pact/verify/pact/PactFile.scala
Scala
mit
2,793
package play.api.libs.json import play.api.libs.iteratee.Execution.Implicits.defaultExecutionContext /** * Helper functions to handle JsValues. */ object Json { /** * Parse a String representing a json, and return it as a JsValue. * * @param input a String to parse * @return the JsValue representing ...
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/play-json/src/main/scala/play/api/libs/json/Json.scala
Scala
mit
7,197
/** * Created by jmgomez on 18/03/15. */ import com.stratio.deep.core.context.{DeepSparkConfig, DeepSparkContext} import com.stratio.deep.jdbc.config._ import com.stratio.deep.core.rdd._ object Debug extends App with Constants{ //Configure DeepSparkConfig val deepSpakConfig = new DeepSparkConfig(); deepSpakCo...
Stratio/deep-spark
deep-jdbc/src/test/java/Debug.scala
Scala
apache-2.0
1,376
/* * 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 ...
ueshin/apache-flink
flink-scala-shell/src/test/scala/org/apache/flink/api/scala/ScalaShellITCase.scala
Scala
apache-2.0
15,819
/* * 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 ...
saltstar/spark
sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala
Scala
apache-2.0
53,588
package com.twitter.util import java.util.concurrent.atomic.{AtomicReference, AtomicInteger} import scala.collection.generic.CanBuild import scala.collection.immutable.Queue import scala.collection.mutable /** * Events are instantaneous values, defined only at particular * instants in time (cf. [[com.twitter.util.V...
mosesn/util
util-core/src/main/scala/com/twitter/util/Event.scala
Scala
apache-2.0
9,493
/* * Copyright 2014–2018 SlamData 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 agr...
jedesah/Quasar
it/src/test/scala/quasar/StreamingQueryRegressionSpec.scala
Scala
apache-2.0
1,158
package ozmi.lambda_core.sql import org.scalacheck.Prop._ import org.scalacheck.Properties /** * Created by attila on 4/21/2015. */ class SqlPrinterParserSpec extends Properties("SqlPrinterParser") { val ab = ArbitrarySqlExpr.binaryOp (3) property("PrintParse") = forAll (ab) { (sqlExpr : ColumnExpr) => ...
ozmi/lambda_core
src/test/scala/ozmi/lambda_core/sql/SqlPrinterParserSpec.scala
Scala
mit
504
package com.rocketfuel.sdbc.cassandra import com.datastax.oss.driver.api.core.data.UdtValue import com.rocketfuel.sdbc.base import java.net.InetAddress import java.time.LocalDate import java.util.UUID import scala.collection.JavaConverters._ import scala.reflect.ClassTag import scodec.bits.ByteVector trait Getter ext...
rocketfuel/sdbc
cassandra/src/main/scala-2.13/com/rocketfuel/sdbc/cassandra/Getter.scala
Scala
bsd-3-clause
3,666
package day1.basics.helloworld /** * Created by Niels Bokmans on 21-3-2016. */ object HelloWorldMain { def main(args: Array[String]) { println("Hello world") println((1).+(1)) } }
nielsje41/7l7wScala
day1/basics/helloworld/HelloWorldMain.scala
Scala
mit
197
object Script { val rl = loopInduction( parseFormula( "(A() > 0 & B() > 0 & ~(f() = l()) & eps() > 0) &" + "(((B()*x(l()) > B()*x(f()) + " + "(1/2) * (v(f())^2 - v(l())^2) & " + "x(l()) > x(f()) &" + "v(f()) >= 0 &" + "v(l()) >= 0 ) ) )")) val cuttct = cutT( DirectedCut, parseFo...
keymaerad/KeYmaeraD
examples/llcsimpler.dl.scala
Scala
bsd-3-clause
2,702
/* * This file is part of Apparat. * * Copyright (C) 2010 Joa Ebert * http://www.joa-ebert.com/ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the Lice...
joa/apparat
apparat-anttasks/src/main/scala/apparat/embedding/ant/ApparatTask.scala
Scala
lgpl-2.1
1,840
/* * Copyright 2011-2021 Asakusa Framework Team. * * 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 ...
asakusafw/asakusafw-spark
compiler/src/main/scala/com/asakusafw/spark/compiler/DataModelLoaderProvider.scala
Scala
apache-2.0
780
/** * * Copyright (c) 2014 Chris Norman * * @author Chris Norman (cmn397@gmail.com) * */ import org.scalatest.FunSuite import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import scala.util.{ Try, Success, Failure } import bioscala.core._ /** * */ @RunWith(classOf[JUnitRunner]) class S...
chrisnorman/BioScala
src/test/scala/SequenceSuite.scala
Scala
mit
5,050
package scala.scalajs.sbtplugin.test.env import scala.scalajs.sbtplugin.env.nodejs.NodeJSEnv import org.junit.Test class NodeJSTest extends JSEnvTest { protected def newJSEnv = new NodeJSEnv /** Node.js strips double percentage signs - #500 */ @Test def percentageTest = { val counts = 1 to 15 val a...
swhgoon/scala-js
sbt-plugin/src/test/scala/scala/scalajs/sbtplugin/test/env/NodeJSTest.scala
Scala
bsd-3-clause
1,115
/* * 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/main/scala/org/apache/flink/table/planner/plan/rules/physical/batch/BatchExecLegacySinkRule.scala
Scala
apache-2.0
3,838
/** * Copyright 2014-2015 Martin Cooper * * 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 ...
martincooper/scala-datatable
src/main/scala/com/github/martincooper/datatable/DataSort/TableSort.scala
Scala
apache-2.0
2,158
/** * * Copyright 2016 - Thamir Qadah * * 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 ...
qadahtm/aims-project
src/main/scala/edu/purdue/aims/IBDP.scala
Scala
apache-2.0
30,983
/* * Copyright 2011-2014 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...
EBPI/yaidom
src/test/scala/nl/ebpi/yaidom/blogcode/Blog2XbrlTest.scala
Scala
apache-2.0
17,779
package ingraph.ire.listeners import ingraph.ire.datatypes.Tuple import scala.collection.mutable trait ChangeListener { def added(tuple: Tuple) def removed(tuple: Tuple) def terminated() } abstract class ConsistentChangeListener extends ChangeListener { val positive = mutable.ListBuffer[Tuple]() val negat...
FTSRG/ingraph
ire/src/main/scala/ingraph/ire/listeners/ChangeListener.scala
Scala
epl-1.0
788
/* * 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/main/scala/eu/cdevreeze/yaidom/convert/YaidomToDomConversions.scala
Scala
apache-2.0
7,433
import sbt._ import Keys._ object ShowgregatorBuild extends Build { lazy val commonSettings = Seq( organization := "org.showgregator", version := "0.0.1", scalaVersion := "2.10.4", conflictManager := ConflictManager.strict ) lazy val showgregator = project.in(file(".")) .aggregate(core, serv...
csm/showgregator
project/Build.scala
Scala
agpl-3.0
536
package fr.acinq.bitcoin sealed trait BtcAmount case class Satoshi(amount: Long) extends BtcAmount { // @formatter:off def toLong = amount def +(other: Satoshi) = Satoshi(amount + other.amount) def -(other: Satoshi) = Satoshi(amount - other.amount) def *(m: Long) = Satoshi(amount * m) def /(d: L...
btcontract/lnwallet
app/src/main/java/fr/acinq/bitcoin/BtcAmount.scala
Scala
apache-2.0
2,902
package com.javachen.spark.examples.rdd import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ object Join { def main(args: Array[String]) { val sc = new SparkContext("local[2]", "JoinAction Test") val data1 = Array[(String, Int)](("A1", 1), ("A2", 2), ("B1", 3), ("B2", 4), ...
grayaaa/learning-spark
src/main/scala/com/javachen/spark/examples/rdd/Join.scala
Scala
apache-2.0
712
package util import util.position.Position object Coordinate { def moveToCoordinate(posFrom: Position, posTo: Position): String = { val sb = new StringBuilder sb.append(posToCoordinate(posFrom)) sb.append(DirectionEnum.getDirection(posFrom, posTo).toString) sb.toString() } def posToCoordinate(p...
MartinLei/Arimaa
src/main/scala/util/Coordinate.scala
Scala
mit
662
package org.jetbrains.plugins.scala package lang package psi package api package statements import org.jetbrains.plugins.scala.lang.psi.api.base.types.ScTypeElement import org.jetbrains.plugins.scala.lang.psi.api.toplevel.ScTypedDefinition import org.jetbrains.plugins.scala.lang.psi.types.ScType import org.jetbrains.p...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/api/statements/ScTypedDeclaration.scala
Scala
apache-2.0
581
package controllers import javax.inject.Inject import java.util.UUID import play.api.mvc.{Action, Controller} import play.api.libs.json.Json import scala.concurrent.{ ExecutionContext, Future } import util.actions.Authenticated import util.OAuth2 import util.JwtUtil class Login @Inject() (oauth2: OAuth2)(implicit e...
trifectalabs/roadquality
web/app/controllers/Login.scala
Scala
bsd-3-clause
573
package reductions import org.scalameter._ import common._ object LineOfSightRunner { val standardConfig = config( Key.exec.minWarmupRuns -> 40, Key.exec.maxWarmupRuns -> 80, Key.exec.benchRuns -> 100, Key.verbose -> true ) withWarmer(new Warmer.Default) def main(args: Array[String]) { v...
syhan/coursera
parprog1/reductions/src/main/scala/reductions/LineOfSight.scala
Scala
gpl-3.0
3,782
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.3 * @date Sat Jan 9 14:06:47 EST 2010 * @see LICENSE (MIT style license file). */ package scalation.scala2d import scalation.scala2d.Shapes.Shape import scalation.util.Error //::::::...
scalation/fda
scalation_1.3/scalation_mathstat/src/main/scala/scalation/scala2d/CurvilinearShape.scala
Scala
mit
3,073
package com.github.blemale.scaffeine import com.github.benmanes.caffeine.cache.stats.CacheStats import com.github.benmanes.caffeine.cache.{Cache => CaffeineCache, Policy} import scala.collection.JavaConverters._ import scala.compat.java8.FunctionConverters._ object Cache { def apply[K, V](cache: CaffeineCache[K, ...
blemale/scaffeine
src/main/scala/com/github/blemale/scaffeine/Cache.scala
Scala
apache-2.0
6,018
package controllers import views._ import lila.app._ import lila.oauth.{ AccessToken, OAuthTokenForm } final class OAuthToken(env: Env) extends LilaController(env) { private val tokenApi = env.oAuth.tokenApi def index = Auth { implicit ctx => me => tokenApi.listPersonal(me) map { tokens => Ok...
luanlv/lila
app/controllers/OAuthToken.scala
Scala
mit
1,230
/* * 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...
jenniew/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/optim/DistriOptimizer.scala
Scala
apache-2.0
35,079
package mesosphere.marathon package integration.setup import java.util.Date import javax.servlet.http.{ HttpServletRequest, HttpServletResponse } import com.typesafe.scalalogging.StrictLogging import mesosphere.marathon.integration.setup.ServiceMock._ import org.eclipse.jetty.server.handler.AbstractHandler import org...
natemurthy/marathon
src/test/scala/mesosphere/marathon/integration/setup/ServiceMock.scala
Scala
apache-2.0
9,582
package services.sitedata import javax.inject._ import scala.concurrent.Future import utils.Awaits import models.sitedata.Modality import dao.sitedata.ModalityDao import dao.sitedata.IModalityDao trait IModalityService extends BaseService[Modality] { def insert(modality: Modality): Future[Unit] def update(id: Lon...
tnddn/iv-web
portal/rest-portal/app/services/sitedata/ModalityService.scala
Scala
apache-2.0
1,743
/* * 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 ...
narahari92/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ShuffleExchange.scala
Scala
apache-2.0
12,826
package com.twitter.zipkin.storage.redis import java.nio.ByteBuffer import com.google.common.io.Closer import com.twitter.finagle.redis.Client import com.twitter.util.{Duration, Future} import com.twitter.zipkin.common.Span import com.twitter.zipkin.storage._ /** * @param client the redis client to use * @param tt...
Yelp/zipkin
zipkin-redis/src/main/scala/com/twitter/zipkin/storage/redis/RedisSpanStore.scala
Scala
apache-2.0
1,868
package lila.tournament import org.joda.time.DateTime import scala.concurrent.Promise import chess.Clock.{ Config => TournamentClock } import lila.user.User private[tournament] case class WaitingUsers( hash: Map[User.ID, DateTime], clock: TournamentClock, date: DateTime ) { // ultrabullet -> 8 // hy...
luanlv/lila
modules/tournament/src/main/WaitingUsers.scala
Scala
mit
1,623
/* * * (C) Copyright 2015 Atomic BITS (http://atomicbits.io). * * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Affero General Public License * (AGPL) version 3.0 which accompanies this distribution, and is available in * the LICENSE file or...
rcavalcanti/scraml
modules/scraml-dsl/src/main/scala/io/atomicbits/scraml/dsl/BodyPart.scala
Scala
agpl-3.0
2,954
/* Copyright (c) 2015 Andrée Ekroth. * Distributed under the MIT License (MIT). * See accompanying file LICENSE or copy at * http://opensource.org/licenses/MIT */ package com.github.ekroth package concert package controllers trait ServerCredentials { import scala.io.Source implicit val spotifyCredentials = s...
ekroth/lost-my-concert
app/controllers/Credentials.scala
Scala
mit
806