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
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-kudu/geomesa-kudu-datastore/src/main/scala/org/locationtech/geomesa/kudu/index/KuduColumnMapper.scala
Scala
apache-2.0
4,200
package org.geneticmachine.navigation import org.geneticmachine._ import org.geneticmachine.common.graph.{GraphBuilder, Graph} import scala.concurrent.Future import org.geneticmachine.navigation.vision._ import org.geneticmachine.navigation.generators._ import org.geneticmachine.navigation.feedback._ case class Navi...
ZloVechno/genetic-machine
src/main/scala/org/geneticmachine/navigation/NavigationEnvironment.scala
Scala
mit
3,984
/** * Log analyzer and summary builder written in Scala built for JVM projects * * @package LogAnalyzer * @copyright Apache V2 License (see LICENSE) * @url https://github.com/mcross1882/LogAnalyzer */ package mcross1882.loganalyzer.parser import mcross1882.loganalyzer.analyzer.Analyzer import scala.colle...
mcross1882/LogAnalyzer
src/main/scala/mcross1882/loganalyzer/parser/SimpleParser.scala
Scala
apache-2.0
5,242
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ueshin/apache-spark
sql/core/src/test/scala/org/apache/spark/sql/execution/ui/MetricsAggregationBenchmark.scala
Scala
apache-2.0
7,852
package org.openapitools.client.model case class ClassesByClass ( _classes: Option[List[String]], _class: Option[String] ) object ClassesByClass { def toStringBody(var_classes: Object, var_class: Object) = s""" | { | "classes":$var_classes,"class":$var_class | } ""...
cliffano/swaggy-jenkins
clients/scala-gatling/generated/src/gatling/scala/org/openapitools/client/model/ClassesByClass.scala
Scala
mit
336
/* * Copyright (C) 2016-2017 Lightbend Inc. <http://www.lightbend.com> */ package akka.persistence.cassandra.journal import akka.actor._ import akka.persistence._ import akka.persistence.cassandra.journal.CassandraSslSpec._ import akka.persistence.cassandra.{ CassandraLifecycle, CassandraSpec } import akka.testkit....
ktoso/akka-persistence-cassandra
core/src/test/scala/akka/persistence/cassandra/journal/CassandraSslSpec.scala
Scala
apache-2.0
3,953
package io.floyd.web import spray.routing.authentication.{Authentication, ContextAuthenticator} import spray.routing.{AuthenticationFailedRejection, RequestContext} import scala.concurrent.{ExecutionContext, Future} /** Token based authentication for Spray Routing. * * Extracts an API key from the header or quer...
floyd-io/floyd-scala
src/main/scala/io/floyd/web/TokenAuthenticator.scala
Scala
lgpl-3.0
2,643
package org.dbpedia.spotlight.db.memory import org.dbpedia.spotlight.db.model.QuantizedCountStore import scala.collection.mutable class MemoryQuantizedCountStore extends MemoryStore with QuantizedCountStore { var countMap: java.util.Map[Short, Int] = new java.util.HashMap[Short, Int]() def getCount(quantized: ...
Skunnyk/dbpedia-spotlight-model
core/src/main/scala/org/dbpedia/spotlight/db/memory/MemoryQuantizedCountStore.scala
Scala
apache-2.0
822
/** * 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"); yo...
Chasego/kafka
core/src/test/scala/unit/kafka/server/BaseRequestTest.scala
Scala
apache-2.0
6,321
package outwatch.helpers import outwatch._ @inline class ModifierBooleanOps(val condition: Boolean) extends AnyVal { @inline def apply(m: => VDomModifier):VDomModifier = if(condition) VDomModifier(m) else VDomModifier.empty @inline def apply(m: => VDomModifier, m2: => VDomModifier):VDomModifier = if(condition) V...
OutWatch/outwatch
outwatch/src/main/scala/outwatch/helpers/ModifierBooleanOps.scala
Scala
apache-2.0
1,390
/* * scala-swing (https://www.scala-lang.org) * * Copyright EPFL, Lightbend, Inc., contributors * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala...
scala/scala-swing
src/main/scala/scala/swing/event/EditDone.scala
Scala
apache-2.0
423
package com.overviewdocs.database import com.overviewdocs.models.tables.FileGroups import com.overviewdocs.test.DbSpecification class FileGroupDeleterSpec extends DbSpecification { "FileGroupDeleter" should { "mark file_group deleted" in new DbScope { val fileGroup = factory.fileGroup() val delete...
overview/overview-server
worker/src/test/scala/com/overviewdocs/database/FileGroupDeleterSpec.scala
Scala
agpl-3.0
529
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/main/scala/org/neo4j/cypher/internal/compiler/v2_3/helpers/IteratorSupport.scala
Scala
apache-2.0
1,179
/* * sbt * Copyright 2011 - 2018, Lightbend, Inc. * Copyright 2008 - 2010, Mark Harrah * Licensed under Apache License 2.0 (see LICENSE) */ package sbt.test import org.scalacheck._, Prop._, util.Pretty import sbt.internal.util.AttributeKey import sbt.util.NoJsonWriter import sbt.{ InputTask, Scope, Task } impor...
xuwei-k/xsbt
main-settings/src/test/scala/sbt/ScopedSpec.scala
Scala
apache-2.0
4,552
import sbt._ import sbt.Keys._ import Path.flat object LibNotifyBuild extends Build { import LibNotifyBuildKeys._ object LibNotifyBuildKeys { val generateNativeHeaders = taskKey[Unit]("Generates native headers from the compiled classes (triggers compile if project not compiled)") val javahClasses = sett...
lpiepiora/sbt-libnotify-plugin
project/LibNotifyBuild.scala
Scala
apache-2.0
4,617
/* * Copyright (c) 2015 Lucas Satabin * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writ...
satabin/toolxit-ng
core/src/main/scala/toolxit/ReadingState.scala
Scala
apache-2.0
772
package io.github.rlazoti.servicestats.infrastructure import io.github.rlazoti.servicestats.utils.ExecutionContextProvider import redis.RedisClient trait Redis extends ExecutionContextProvider { //TODO use config to get host and port from a properties file private val redisHost = "localhost" private val redisPo...
rlazoti/microservice-dependency-graph
service-stats/src/main/scala/io/github/rlazoti/servicestats/infrastructure/Redis.scala
Scala
mit
404
/* * Copyright 2014 – 2018 Paul Horn * * 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...
knutwalker/transducers-scala
core/src/main/scala/scalax/transducers/internal/transducers.scala
Scala
apache-2.0
6,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 ...
oscarceballos/flink-1.3.2
flink-scala/src/test/scala/org/apache/flink/api/operator/SelectByFunctionTest.scala
Scala
apache-2.0
8,101
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
tomwhite/adam
adam-cli/src/main/scala/org/bdgenomics/adam/cli/ADAMMain.scala
Scala
apache-2.0
3,825
/* * Copyright 2017-2022 John Snow Labs * * 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...
JohnSnowLabs/spark-nlp
src/test/scala/com/johnsnowlabs/nlp/AssertAnnotations.scala
Scala
apache-2.0
2,875
/* * 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 ...
zhangjunfang/eclipse-dir
spark/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala
Scala
bsd-2-clause
2,696
package com.ru.waka import com.google.api.client.auth.oauth2.Credential import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport import com.google.api.client.json.jackson2.JacksonFactory import com.google.api.client.util.DateTime import com.google.api.services.calendar.Calendar import com.ru.waka.reposit...
ngineerxiv/dark-api
src/main/scala/com/ru/waka/CalendarClient.scala
Scala
mit
1,257
package domain import play.api.libs.json.Json import org.specs2.mutable._ class InstagramAuthSpec extends Specification { "InstagramAuth" >> { "parse json into case class" >> { val json = Json.obj( "accessToken" -> "test123", "user" -> Json.obj( "id" -> "testid", ...
sofiaaacole/socialDashboard
test/domain/InstagramAuthSpec.scala
Scala
mit
585
package org.objectify.responders.serializers /** * @author Joe Gaudet - ([email protected]) */ object SerializerRegistry { // defaults var jsonSerializer: JsonSerializer = new JerksonJsonSerializers var xmlSerializer: XMLSerializer = new NotImplementedXmlSerializer def toJson(any: Any): String = { jsonS...
learndot/Objectify.scala
src/main/scala/org/objectify/responders/serializers/SerializerRegistry.scala
Scala
mit
404
package testfeature import feature._ import org.scalatest.FunSuite /** * Created by prussell on 9/30/16. */ class RegionUnionSuite extends FunSuite { unionEmpty() unionBlockBlock() unionBlockBlockSet() unionBlockSetBlockSet() def unionEmpty(): Unit = { test("Empty union") { assert(Empty.unio...
pamelarussell/sgxlib
src/test/scala/testfeature/RegionUnionSuite.scala
Scala
mit
106,801
/* * 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 ...
PredictionIO/PredictionIO
storage/elasticsearch/src/main/scala/org/apache/predictionio/data/storage/elasticsearch/ESLEvents.scala
Scala
apache-2.0
10,413
package org.gg.play.authentication.auth import scala.concurrent.Future import play.api.mvc._ import play.api.libs.iteratee.{Enumerator, Iteratee} import play.api.libs.json.{Json, JsValue} import play.api.libs.concurrent.Execution.Implicits._ import org.gg.play.authentication.misc.Loggable /** * User: luigi * Dat...
gigiigig/play2-authentication
app/auth/Secured.scala
Scala
gpl-3.0
6,318
package sexamples.virtualnetworking.pingpongselectors import se.sics.kompics.sl._ import se.sics.kompics.network.Network class Ponger extends ComponentDefinition { val self = cfg.getValue[TAddress]("pingpong.ponger.addr"); val net = requires[Network]; private var counter: Long = 0L; net uponEvent { ca...
kompics/kompics-scala
docs/src/main/scala/sexamples/virtualnetworking/pingpongselectors/Ponger.scala
Scala
gpl-2.0
490
package com.scaledaction.core.spark import com.scaledaction.core.cassandra.CassandraConfig import org.apache.spark.{ SparkContext, SparkConf, Logging } import org.apache.spark.streaming.{ StreamingContext, Seconds } object SparkUtils extends Logging { //TODO - Need to replace the "sparkMaster" and "sparkAppName" a...
benburford/core
core/src/main/scala/com/scaledaction/core/spark/SparkUtils.scala
Scala
apache-2.0
1,867
/* * Copyright 2017 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...
liquidarmour/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600e/v2/E22.scala
Scala
apache-2.0
1,030
/* * 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 ...
akopich/spark
core/src/test/scala/org/apache/spark/serializer/SerializationDebuggerSuite.scala
Scala
apache-2.0
8,565
/* * Copyright 2021 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/ct-calculations
src/test/scala/uk/gov/hmrc/ct/ct600j/v3/J10Spec.scala
Scala
apache-2.0
3,058
package controllers import scala.annotation.implicitNotFound import play.api.i18n.Lang import play.api.mvc.RequestHeader import org.squeryl.PrimitiveTypeMode.inTransaction import securesocial.core.SecureSocial class LangAwareController extends BaseController { implicit override def lang(implicit request: RequestHea...
lukaszbudnik/hackaton-portal
app/controllers/LangAwareController.scala
Scala
apache-2.0
756
package eventstore package core package cluster import scala.collection.immutable.SortedSet sealed trait NodeState extends Ordered[NodeState] { def id: Int def isAllowedToConnect: Boolean def compare(that: NodeState) = this.id compare that.id } object NodeState { val values: SortedSet[NodeState] = SortedSet(...
EventStore/EventStore.JVM
core/src/main/scala/eventstore/core/cluster/NodeState.scala
Scala
bsd-3-clause
3,176
package com.thoughtworks.datacommons.prepbuddy.imputations import com.thoughtworks.datacommons.prepbuddy.rdds.TransformableRDD import com.thoughtworks.datacommons.prepbuddy.utils.RowRecord /** * A contract for an imputation strategy */ trait ImputationStrategy extends Serializable { def prepareSubstitute(rdd:...
data-commons/prep-buddy
src/main/scala/com/thoughtworks/datacommons/prepbuddy/imputations/ImputationStrategy.scala
Scala
apache-2.0
423
package sp.widgetservice import sp.domain._ import sp.domain.Logic._ import scala.util.Try package API_Patient { sealed trait PatientProperty case class Priority(color: String, timestamp: String) extends PatientProperty case class Attended(attended: Boolean, doctorId: String, timestamp: String) extends Patient...
kristoferB/SP
spservices/widgetService/src/main/scala/widgetService/WidgetComm.scala
Scala
mit
2,756
package org.openmole.web.db.tables import slick.driver.H2Driver.simple._ /** * Created with IntelliJ IDEA. * User: luft * Date: 6/14/13 * Time: 1:39 PM */ class MoleStats(tag: Tag) extends Table[(String, Int, Int, Int, Int, Int)](tag, "MoleStats") { type Stats = Map[String, Int] lazy val empty = Map("Ready" ...
ISCPIF/PSEExperiments
openmole-src/openmole/web/core/src/main/scala/org/openmole/web/db/tables/MoleStats.scala
Scala
agpl-3.0
783
package cromwell.database.migration.liquibase import java.sql.Connection import liquibase.database.jvm.{HsqlConnection, JdbcConnection} import liquibase.database.{Database, DatabaseConnection, DatabaseFactory} import liquibase.diff.compare.CompareControl import liquibase.diff.{DiffGeneratorFactory, DiffResult} import...
ohsu-comp-bio/cromwell
database/migration/src/main/scala/cromwell/database/migration/liquibase/LiquibaseUtils.scala
Scala
bsd-3-clause
4,577
package us.stivers.blue.codec import scala.annotation.{implicitNotFound} import scalax.util.{Try,Success,Failure} import us.stivers.blue.http.{Content} /** * Encodes A into Content. */ @implicitNotFound("Cannot find ContentEncoder for ${A}") trait ContentEncoder[A] extends Converter[A,Content] /** * Decodes A fro...
cstivers78/blue
blue-core/src/main/scala/us/stivers/blue/codec/ContentCodec.scala
Scala
apache-2.0
1,579
package breeze.linalg.support import breeze.math.Complex /* Copyright 2012 David Hall Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requi...
wstcpyt/breeze
math/src/main/scala/breeze/linalg/support/CanTransformValues.scala
Scala
apache-2.0
2,022
package com.github.akovari.rdfp.api.ql.db import com.github.akovari.rdfp.api.ql.UQLContext.IllegalUQLFieldException import com.github.akovari.rdfp.api.ql.UQLContext.UnifiedResult.UnifiedResultFromResourceType import com.github.akovari.rdfp.api.ql.db.SQLContext._ import com.typesafe.config.ConfigFactory import scala.c...
akovari/reactive-data-federation-poc
src/main/scala/com/github/akovari/rdfp/api/ql/db/SQLContext.scala
Scala
apache-2.0
2,501
/*********************************************************************** * 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-tools/src/main/scala/org/locationtech/geomesa/tools/data/RemoveSchemaCommand.scala
Scala
apache-2.0
2,702
import leon.lang._ import leon.annotation._ import leon.collection._ import leon._ object Trees { abstract class Expr case class Plus(lhs: Expr, rhs: Expr) extends Expr case class Minus(lhs: Expr, rhs: Expr) extends Expr case class LessThan(lhs: Expr, rhs: Expr) extends Expr case class And(lhs: Expr, rhs: Ex...
epfl-lara/leon
testcases/repair/Desugar/Desugar2.scala
Scala
gpl-3.0
5,907
package views.html package practice import play.api.libs.json.Json import lila.api.Context import lila.app.templating.Environment._ import lila.app.ui.ScalatagsTemplate._ import lila.common.String.html.safeJsonValue object show { def apply( us: lila.practice.UserStudy, data: lila.practice.JsonView.JsD...
luanlv/lila
app/views/practice/show.scala
Scala
mit
1,017
package io.finch import cats.data.NonEmptyList import com.twitter.concurrent.AsyncStream import com.twitter.finagle.http.{Cookie, Method, Request} import com.twitter.finagle.http.exp.Multipart.FileUpload import com.twitter.finagle.netty3.ChannelBufferBuf import com.twitter.io.Buf import com.twitter.util.{Base64StringE...
yanana/finch
core/src/main/scala/io/finch/Endpoints.scala
Scala
apache-2.0
20,782
package one.lockstep.vault.sdk.impl import java.util import one.lockstep.vault._ import one.lockstep.util._ import one.lockstep.util.japi._ class UnlockedVaultAdapter(impl: one.lockstep.vault.UnlockedVault) extends sdk.UnlockedVault { override def getSecret(id: String): Array[Byte] = { require(impl.index.secr...
lockstep-one/vault
vault-client/src/main/scala/one/lockstep/vault/sdk/impl/UnlockedVaultAdapter.scala
Scala
agpl-3.0
1,926
import sbt.Keys._ import sbt._ //import Dependencies._ import spray.revolver.RevolverPlugin._ object BuildSettings { val VERSION = "3.1.0" val defaultBuildSettings = Defaults.coreDefaultSettings ++ Format.settings ++ /* Revolver.settings ++ */ Seq( version := VERSION, organization := "com.github.dmrolfs"...
dmrolfs/lineup
project/BuildSettings.scala
Scala
mit
5,156
package com.seanshubin.uptodate.logic import scala.annotation.tailrec case class Version(originalString: String, words: List[String]) extends Ordered[Version] { def this(version: String) = this(version, Version.breakIntoWords(version)) def isRelease: Boolean = words.forall(Version.isNumberOrReleaseWord) def i...
SeanShubin/up-to-date
logic/src/main/scala/com/seanshubin/uptodate/logic/Version.scala
Scala
unlicense
4,373
/* * 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 ...
practice-vishnoi/dev-spark-1
mllib/src/main/scala/org/apache/spark/mllib/feature/IDF.scala
Scala
apache-2.0
6,998
/** * 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...
wangcy6/storm_app
frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/main/scala/kafka/utils/Annotations.scala
Scala
apache-2.0
1,315
package com.nodeta.scalandra /** * Range class used in range based limiting * * @author Ville Lautanala */ case class Range[T](start : Option[T], finish : Option[T], order : Order, count : Int) {}
nodeta/scalandra
src/main/scala/com/nodeta/scalandra/Range.scala
Scala
mit
202
package org.geoscript.support package object graph { def isClique[V](vs: Set[V], connected: (V, V) => Boolean): Boolean = vs.toSeq.combinations(2).forall { case Seq(a, b) => connected(a, b) } def maximalCliques[V] (vertices: Set[V], connected: (V, V) => Boolean) : Set[Set[V]] = { // leveraging t...
dwins/geoscript.scala
geocss/src/main/scala/org/geoscript/support/graph/package.scala
Scala
mit
2,294
package de.choffmeister.secpwd import java.io.File import java.util.Properties import de.choffmeister.secpwd.utils.SshConnectionInfo import de.choffmeister.secpwd.utils.RichFile._ import de.choffmeister.secpwd.utils.SshConnectionInfo import java.io.StringReader import java.io.FileNotFoundException case class Config(s...
choffmeister/secpwd
src/main/scala/de/choffmeister/secpwd/Config.scala
Scala
apache-2.0
1,562
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @builder scalation.util.bld.BldMM_Sorting * @version 1.2 * @date Sat Sep 26 20:25:19 EDT 2015 * @see LICENSE (MIT style license file). */ package scalation.util import scala.util.Random //::::...
mvnural/scalation
src/main/scala/scalation/util/MM_SortingI.scala
Scala
mit
30,825
package com.btcontract.wallet.sqlite import immortan.sqlite._ import android.database.sqlite._ import android.content.Context class DBInterfaceSQLiteAndroidMisc(context: Context, name: String) extends SQLiteOpenHelper(context, name, null, 3) with DBInterfaceSQLiteAndroid { val base: SQLiteDatabase = getWritableDat...
btcontract/wallet
app/src/main/java/com/btcontract/wallet/sqlite/DBInterfaceSQLiteAndroidMisc.scala
Scala
apache-2.0
1,147
/* * 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...
monixio/monix
monix-eval/shared/src/main/scala/monix/eval/internal/package.scala
Scala
apache-2.0
1,421
package knot.data.util import scala.reflect.ClassTag trait SafeParser { def toIntOrDefault(s: String): Int = { toIntOption(s).getOrElse(0) } def toIntOption(s: String): Option[Int] = { throwableThenOption[Int, NumberFormatException](s.toInt) } def toFloatOrDefault(s: String): Float = { toFloa...
defvar/knot
knot-data/src/main/scala/knot/data/util/SafeParser.scala
Scala
mit
697
import akka.LifeActors import play.api.GlobalSettings object Global extends GlobalSettings { override def onStart(application: play.api.Application) { //LifeActors } override def onStop(application: play.api.Application) { //LifeActors.system.shutdown() } }
kirhgoff/life-server
app/Global.scala
Scala
mit
280
// Copyright (c) 2013, Johns Hopkins University. All rights reserved. // This software is released under the 2-clause BSD license. // See /LICENSE.txt // Travis Wolfe, [email protected], 30 July 2013 package edu.jhu.hlt.parma.input import edu.jhu.hlt.parma.types._ import edu.jhu.hlt.parma.inference.{ DocMetaAligner...
hltcoe/parma
src/main/scala/edu/jhu/hlt/parma/input/DocAlignmentPerturber.scala
Scala
bsd-2-clause
10,285
package algebra package instances import algebra.lattice._ import algebra.ring._ package object long extends LongInstances trait LongInstances extends cats.kernel.instances.LongInstances { implicit val longAlgebra: LongAlgebra = new LongAlgebra val LongMinMaxLattice: BoundedDistributiveLattice[Long] = B...
sritchie/algebra
core/src/main/scala/algebra/instances/long.scala
Scala
mit
858
package org.pdfextractor.algorithm.finder.it import org.pdfextractor.db.domain.dictionary.PaymentFieldType import org.pdfextractor.db.domain.dictionary.PaymentFieldType.TOTAL_BEFORE_TAXES import org.springframework.stereotype.Service @Service class ItalianTotalBeforeTaxesFinder extends AbstractItalianTotalFinder(TOTA...
kveskimae/pdfalg
src/main/scala/org/pdfextractor/algorithm/finder/it/ItalianTotalBeforeTaxesFinder.scala
Scala
mit
338
package org.apache.spark.mllib.sparselr import org.apache.spark.mllib.sparselr.Utils._ abstract class Gradient extends Serializable { /** * Compute the gradient and loss given the features of a single data point. * * @param data features for one data point * @param label label for this data point * @...
hhbyyh/SparseML
src/main/scala/org/apache/spark/mllib/sparselr/Gradient.scala
Scala
apache-2.0
1,910
package biz.jackman.brewmaster.phases trait SettingsAction { type ReturnType def perform : ReturnType }
benjaminjackman/brewmaster
brewmaster-core/src/main/scala/biz/jackman/brewmaster/phases/SettingsAction.scala
Scala
gpl-3.0
107
package com.tribbloids.spookystuff.testutils trait LocalPathDocsFixture extends RemoteDocsFixture { import TestDocsResolver._ override def HTML_URL: String = unpacked("testutils/files/Wikipedia.html") override def JSON_URL: String = unpacked("testutils/files/tribbloid.json") override def PNG_URL: String = un...
tribbloid/spookystuff
core/src/test/scala/com/tribbloids/spookystuff/testutils/LocalPathDocsFixture.scala
Scala
apache-2.0
682
package de.tototec.cmvn.configfile import java.io.File import java.util.List trait ConfigFileReader { def readKeyValues(configFile: File): List[KeyValue] }
jwausle/cmvn
de.tototec.cmvn/src/main/scala/de/tototec/cmvn/configfile/ConfigFileReader.scala
Scala
apache-2.0
160
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/lgpl-3.0.en.html package org.ensime.sexp import org.scalatest._ import org.scalactic.TypeCheckedTripleEquals import org.slf4j.LoggerFactory import org.slf4j.bridge.SLF4JBridgeHandler /** * Boilerplate rem...
VlachJosef/ensime-server
s-express/src/test/scala/org/ensime/sexp/SexpSpec.scala
Scala
gpl-3.0
657
package com.htc.studio.demo import anorm._ import play.api.db.DB import play.api.mvc._ import play.api.libs.json._ import play.api.Play.current import play.api.libs.concurrent.Execution.Implicits.defaultContext object Application extends Controller { /** * Create a json string from a h2 table. Only shows two co...
simonandluna/lama-demo
play/app/com/htc/studio/demo/Application.scala
Scala
agpl-3.0
2,875
/* * Copyright (c) 2014-2018 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
ddworak/monix
monix-tail/shared/src/main/scala/monix/tail/internal/IterantHeadOptionL.scala
Scala
apache-2.0
3,285
import org.scalatest.{Matchers, FlatSpec} class SquaresTest extends FlatSpec with Matchers { it should "calc square of sums to 5" in { val result = Squares.squareOfSums(5) result should equal(225) } it should "calc sum of squares to 5" in { val result = Squares.sumOfSquares(5) result should equa...
stanciua/exercism
scala/difference-of-squares/src/test/scala/SquaresTest.scala
Scala
mit
1,204
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
aljoscha/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/ScalarFunctionsTest.scala
Scala
apache-2.0
94,346
package net.slozzer.babel import cats.data.Chain import cats.implicits._ import io.circe.Json import io.circe.{parser => CirceParser} trait circe { private def error(tpe: String, path: Chain[String]): Parser.Error = Parser.Error(s"Unsupported JSON type: $tpe (${path.mkString_(".", ".", "")})", cause = None) ...
Taig/lokal
modules/circe/src/main/scala/net/slozzer/babel/circe.scala
Scala
mit
1,295
package org.ensime.server import org.ensime.util._ import scala.collection.{ immutable, mutable } import scala.tools.nsc.io.AbstractFile import scala.tools.nsc.interactive.{ Global } import org.ardverk.collection._ import scala.collection.JavaConversions._ trait NamespaceTraversal { self: RichPresentationCompiler => ...
non/ensime
src/main/scala/org/ensime/server/NamespaceTraversal.scala
Scala
gpl-3.0
1,403
package app import util.Directory._ import util.Implicits._ import util.ControlUtil._ import _root_.util._ import service._ import org.scalatra._ import java.io.File import org.eclipse.jgit.api.Git import org.eclipse.jgit.lib._ import org.apache.commons.io.FileUtils import org.eclipse.jgit.treewalk._ import java.util....
nvdnkpr/gitbucket
src/main/scala/app/RepositoryViewerController.scala
Scala
apache-2.0
10,698
package io.leonard import io.leonard.AnimalSpec._ import io.leonard.TraitFormat.{caseObjectFormat, traitFormat} import org.scalatest.{FlatSpec, Matchers} import play.api.libs.json.Json.format import play.api.libs.json._ class TraitFormatSpec extends FlatSpec with Matchers { "TraitFormat" should "serialise" in { ...
leonardehrenfried/play-json-traits
src/test/scala/io/leonard/TraitFormatSpec.scala
Scala
apache-2.0
3,481
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.sbt.routes import play.api.PlayException import play.core.PlayVersion import play.routes.compiler.RoutesGenerator import play.routes.compiler.RoutesCompilationError import play.routes.compiler.RoutesCompiler.GeneratedSource import play.ro...
benmccann/playframework
dev-mode/sbt-plugin/src/main/scala/play/sbt/routes/RoutesCompiler.scala
Scala
apache-2.0
9,392
package im.actor.server.model @SerialVersionUID(1L) case class UserPublicKey( userId: Int, hash: Long, data: Array[Byte] )
ljshj/actor-platform
actor-server/actor-models/src/main/scala/im/actor/server/model/UserPublicKey.scala
Scala
mit
134
package benchmarks import org.openjdk.jmh.annotations._ @State(Scope.Thread) class Step { @Param(Array("2")) var step: Int = _ var count: Int = 0 def run(): Int = { count += 1 count } def get(): Int = count def at(): Int = step def test(v: Int): Boolean = v % step == 0 }
volkc/REScala
Research/Microbenchmarks/src/main/scala/benchmarks/Step.scala
Scala
apache-2.0
300
package ca.hyperreal.scalgorithms class MachineInt( val a: Long ) extends OrderedRing[MachineInt] { def isZero = a == 0 def isOne = a == 1 def +( that: MachineInt ) = MachineInt( a + that.a ) def *( that: MachineInt ) = MachineInt( a * that.a ) def *:( x: Int ) = MachineInt( a*x ) def -( that: MachineI...
edadma/scalgorithms
src/main/scala/MachineInt.scala
Scala
mit
981
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala package xml pack...
scala/scala-xml
shared/src/main/scala/scala/xml/factory/NodeFactory.scala
Scala
apache-2.0
2,195
package org.jetbrains.plugins.hocon.formatting import java.io.File import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.command.CommandProcessor import com.intellij.openapi.util.JDOMUtil import com.intellij.openapi.util.io.FileUtil import com.intellij.psi.codeStyle.{CodeStyleManager,...
triggerNZ/intellij-scala
test/org/jetbrains/plugins/hocon/formatting/HoconFormatterTest.scala
Scala
apache-2.0
1,635
package web import core.{CoreActors, Core} import api.Api import akka.io.IO import spray.can.Http /** * Provides the web server (spray-can) for the REST api in ``Api``, using the actor system * defined in ``Core``. * * You may sometimes wish to construct separate ``ActorSystem`` for the web server machinery. * H...
chidakiyo/perf-spray-client
src/main/scala/web/Web.scala
Scala
apache-2.0
711
/* * 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 ...
dbtsai/spark
mllib/src/main/scala/org/apache/spark/mllib/fpm/AssociationRules.scala
Scala
apache-2.0
5,852
/* * 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 ...
bravo-zhang/spark
examples/src/main/scala/org/apache/spark/examples/mllib/PCAExample.scala
Scala
apache-2.0
2,784
/* Copyright (C) 2008-2014 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
patverga/factorie
src/main/scala/cc/factorie/optimize/Pegasos.scala
Scala
apache-2.0
12,258
package skuber import org.scalatest.{BeforeAndAfterAll, Matchers} import org.scalatest.concurrent.Eventually import skuber.json.format._ import scala.concurrent.duration._ import scala.concurrent.Await import scala.util.{Failure, Success} class PodSpec extends K8SFixture with Eventually with Matchers with BeforeAnd...
doriordan/skuber
client/src/it/scala/skuber/PodSpec.scala
Scala
apache-2.0
3,971
package debop4s.rediscala /** * RedisConsts * Created by debop on 2014. 2. 22. */ object RedisConsts { val DEFAULT_PORT: Int = 6379 val DEFAULT_SENTINEL_PORT: Int = 26379 val DEFAULT_TIMEOUT: Int = 2000 val DEFAULT_DATABASE: Int = 0 val CHARSET: String = "UTF-8" val DEFAULT_LOGBACK_CHANNEL = "channel...
debop/debop4s
debop4s-rediscala/src/main/scala/debop4s/rediscala/RedisConsts.scala
Scala
apache-2.0
355
/* * 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 ...
jongwook/incubator-s2graph
s2core/src/main/scala/org/apache/s2graph/core/types/HBaseType.scala
Scala
apache-2.0
5,485
package ninja.fangs.github import org.eclipse.egit.github.core.Repository import org.eclipse.egit.github.core.client.GitHubClient import org.eclipse.egit.github.core.service.{IssueService, RepositoryService} import scalafx.collections.ObservableBuffer import scalafx.geometry.{Insets, Pos} import scalafx.scene.Scene im...
kfang/scalafx-github
src/main/scala/ninja/fangs/github/RepoScene.scala
Scala
gpl-3.0
1,364
/* * Copyright 2010-2011 Vilius Normantas <[email protected]> * * This file is part of Crossbow library. * * Crossbow 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 ...
ViliusN/Crossbow
crossbow-core/src/lt/norma/crossbow/core/TimeBarSplitter.scala
Scala
gpl-3.0
2,186
import Macros.* object Test { def main(args: Array[String]): Unit = { val a: String = defaultOf("int") // error val b: Int = defaultOf("string") // error } }
lampepfl/dotty
tests/neg-macros/quote-whitebox/Test_2.scala
Scala
apache-2.0
171
package com.twitter.finagle.loadbalancer.aperture import com.twitter.util.Closable import org.scalacheck.Gen import org.scalatest.FunSuite import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks class ProcessCoordinateTest extends FunSuite with ScalaCheckDrivenPropertyChecks { import ProcessCoordinate._ ...
luciferous/finagle
finagle-core/src/test/scala/com/twitter/finagle/loadbalancer/aperture/ProcessCoordinateTest.scala
Scala
apache-2.0
2,125
package gapt.expr.formula.fol import gapt.expr.Expr trait FOLPartialTerm extends Expr { private[expr] def numberOfArguments: Int }
gapt/gapt
core/src/main/scala/gapt/expr/formula/fol/FOLPartialTerm.scala
Scala
gpl-3.0
135
class A1 { def f1 = { def g = 1 ; class A { def a = g } ; new A().a } def f2 = { def g = 2 ; class A { def a = g } ; new A().a } } object Test extends App { println(classOf[A1].getDeclaredMethods.map(_.toString).sorted.mkString("\n")) println(new A1().f1) println(new A1().f2) }
lampepfl/dotty
tests/pending/run/t5652c/t5652c.scala
Scala
apache-2.0
290
/* * 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/jdbc/MySQLDialect.scala
Scala
apache-2.0
1,907
package main.scala import scala.collection.mutable._ class Lookup { def register(request: Request) { var remoteObjectName: String = request.remoteObjectArgumentList(0).asInstanceOf[String]; if (!LookupTableList.lookupTable.contains(remoteObjectName)) { LookupTableList.lookupTable.put(rem...
labs2/FLiMSy
LookupFLiMSy/src/main/scala/Lookup.scala
Scala
apache-2.0
727
package org.bitcoins.core.number import org.bitcoins.core.gen.NumberGenerator import org.bitcoins.core.util.BitcoinSLogger import org.scalacheck.{ Prop, Properties } import scala.util.Try /** * Created by chris on 6/21/16. */ class Int32Spec extends Properties("Int32Spec") { property("Serialization symmetry") =...
Christewart/bitcoin-s-core
src/test/scala/org/bitcoins/core/number/Int32Spec.scala
Scala
mit
3,026
/** * Copyright 2013 Gianluca Amato * * This file is part of JANDOM: JVM-based Analyzer for Numerical DOMains * JANDOM 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 ...
francescaScozzari/Jandom
core/src/main/ppl/it/unich/jandom/domains/numerical/ppl/PPLProperty.scala
Scala
lgpl-3.0
9,283
/* * 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/vat-registration-frontend
app/connectors/AddressLookupConnector.scala
Scala
apache-2.0
2,077
/* * Init.scala * (Mellite) * * Copyright (c) 2012-2022 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Affero General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * [email protected] */ package de.sciss.mellite import java....
Sciss/Mellite
app/src/main/scala/de/sciss/mellite/Init.scala
Scala
agpl-3.0
5,403