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 2014 Commonwealth Bank of Australia // // 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 ap...
CommBank/maestro
maestro-core/src/main/scala/au/com/cba/omnia/maestro/core/codec/Decode.scala
Scala
apache-2.0
6,043
/* * Copyright (C) 2005, The Beangle Software. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
beangle/data
hibernate/src/main/scala/org/beangle/data/hibernate/PropertyAccessor.scala
Scala
lgpl-3.0
5,567
import synthesis.Definitions._ object Coordinates { def main(args : Array[String]) : Unit = { println("Size X ?") val x = Console.readInt println("Size Y ?") val y = Console.readInt println("Size Z ?") val z = Console.readInt println("Index ?") val i = Console.readInt val (j, k,...
epfl-lara/comfusy
src/examples/Coordinates.scala
Scala
bsd-2-clause
597
/* * Copyright 2015 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...
keithhall/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v3/B315.scala
Scala
apache-2.0
978
package org.hammerlab.guacamole.reads import htsjdk.samtools.TextCigarCodec import org.hammerlab.genomics.reference.{ContigName, Locus} import org.hammerlab.guacamole.readsets.SampleId trait ReadsUtil { /** * Convenience function to construct a Read from unparsed values. */ private def read(sequence: String...
hammerlab/guacamole
src/test/scala/org/hammerlab/guacamole/reads/ReadsUtil.scala
Scala
apache-2.0
4,222
package es.uvigo.ei.sing.sds package searcher import scala.concurrent.Future import play.api.libs.concurrent.Execution.Implicits.defaultContext import entity._ import service.DiseasesService final class DiseasesSearcher extends SearcherAdapter { lazy val diseases = new DiseasesService override def search(quer...
agjacome/smart-drug-search
src/main/scala/searcher/DiseasesSearcher.scala
Scala
mit
561
package hbase import org.apache.hadoop.hbase.filter._ import org.apache.hadoop.hbase.util.Pair import CompareFilter.CompareOp import collection.JavaConverters._ object Filters { object Row { def prefix[A](value: A)(implicit conv: Bytes[A]) = new PrefixFilter(conv.toBytes(value)) def firstKeyOnly = new Firs...
hamnis/hbase-scala
src/main/scala/hbase/Filters.scala
Scala
apache-2.0
2,119
package io.github.nthportal.version package releasetype /** * Represents basic (Apache) Maven release types: snapshot and final release. */ sealed trait MavenBasic extends ReleaseType with Ordered[MavenBasic] { protected val rank: Int override def compare(that: MavenBasic): Int = this.rank compare that.rank ...
NthPortal/version-scala
src/main/scala/io/github/nthportal/version/releasetype/MavenBasic.scala
Scala
apache-2.0
1,271
package org.eknet.sitebag.lucene import java.io.File import java.nio.file.Path import scala.concurrent.Future import scala.concurrent.duration._ import akka.actor._ import org.apache.lucene.store.{FSDirectory, Directory} import org.apache.lucene.index.{IndexWriterConfig, IndexWriter} import org.apache.lucene.analysis....
eikek/sitebag
src/main/scala/org/eknet/sitebag/lucene/IndexWriterActor.scala
Scala
apache-2.0
2,482
/* * 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
mimir/src/test/scala/quasar/mimir/EvaluatorMethods.scala
Scala
apache-2.0
4,522
/* * Copyright 2010 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 to...
travisbrown/util
util-core/src/test/scala/com/twitter/util/DurationTest.scala
Scala
apache-2.0
8,223
// Copyright: 2010 - 2018 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.fixture import java.util.concurrent.TimeUnit import scala.concurrent.Await import scala.concurrent.duration._ import scala.util.Try import akka.actor.ActorSystem import ...
yyadavalli/ensime-server
testutil/src/main/scala/org/ensime/fixture/TestKitFixture.scala
Scala
gpl-3.0
2,505
package com.arcusys.valamis.tag import com.arcusys.learn.liferay.LiferayClasses.{LAssetCategory, LNoSuchVocabularyException} import com.arcusys.learn.liferay.services._ import com.arcusys.valamis.tag.model.ValamisTag import com.liferay.portal.kernel.dao.orm.QueryUtil import scala.collection.JavaConverters._ class Ta...
igor-borisov/valamis
valamis-core/src/main/scala/com/arcusys/valamis/tag/TagService.scala
Scala
gpl-3.0
2,474
package fr.iscpif.flocking.model.tools //---- Base types ----// trait DoubleBoundsKeeper { val lowBound: Double val highBound: Double def keepInBounds(x: Double): Double = if (x >= highBound) ((x - lowBound) % (highBound - lowBound)) + lowBound else if (x < lowBound) highBound - ((highBound - x) % (high...
ISCPIF/PSEExperiments
simpuzzle-src/models/flocking/model/src/main/scala/fr/iscpif/flocking/model/tools/DoubleBoundsKeeper.scala
Scala
agpl-3.0
579
package fpinscala.datastructures import scala.annotation.tailrec sealed trait List[+A] // `List` data type, parameterized on a type, `A` case object Nil extends List[Nothing] // A `List` data constructor representing the empty list /* Another data constructor, representing nonempty lists. Note that `tail` is another ...
moliware/fpinscala
exercises/src/main/scala/fpinscala/datastructures/List.scala
Scala
mit
4,903
package org.scalaide.debug.internal.command import java.util.concurrent.atomic.AtomicBoolean import scala.Option.option2Iterable import scala.Range import scala.collection.JavaConverters.asScalaBufferConverter import scala.collection.mutable.ListBuffer import scala.concurrent.Future import org.eclipse.debug.core.Deb...
dragos/scala-ide
org.scala-ide.sdt.debug/src/org/scalaide/debug/internal/command/ScalaStepOver.scala
Scala
bsd-3-clause
5,349
package lv.addresses.migration import java.nio.channels._ import java.nio.file._ class Lock (file_name: String) { val fc: FileChannel = FileChannel.open(Paths.get(file_name), StandardOpenOption.CREATE, StandardOpenOption.APPEND) def acquire (): FileLock = { val lock = fc.tryLock(0, 1, false) if (lock ==...
mrumkovskis/addresses
updater/src/main/scala/migration/Lock.scala
Scala
mit
520
package com.twitter.finagle.memcached import _root_.java.lang.{Boolean => JBoolean, Long => JLong} import _root_.java.net.{InetSocketAddress, SocketAddress} import com.twitter.bijection.Bijection import com.twitter.concurrent.Broker import com.twitter.conversions.time._ import com.twitter.finagle import com.twitter.fi...
sveinnfannar/finagle
finagle-memcached/src/main/scala/com/twitter/finagle/memcached/Client.scala
Scala
apache-2.0
45,998
package io.monadless.cats //import cats.instances.list._ import org.scalatest.MustMatchers import io.monadless.impl.TestSupport import cats.instances.list._ import cats.Id import cats.Monad class MonadlessMonadSpec extends org.scalatest.FreeSpec with MustMatchers with MonadlessMonad[Id] with TestSupport[Id]...
monadless/monadless
monadless-cats/src/test/scala/io/monadless/cats/MonadlessMonad.scala
Scala
apache-2.0
1,663
/** * Created by jannis on 5/4/14. * Contains all classes needed to serialize data into the database correctly. * Should be independent from the actual database implementation used. */ package object database { }
dadarakt/jamon
src/main/scala/database/package.scala
Scala
apache-2.0
219
/* * 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 ...
fhueske/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/calcite/RelTimeIndicatorConverter.scala
Scala
apache-2.0
25,178
/* * Copyright 2011-2022 GatlingCorp (https://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
gatling/gatling
gatling-core/src/main/scala/io/gatling/core/check/xpath/XmlParsers.scala
Scala
apache-2.0
3,286
/* * 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 ...
techaddict/spark
mllib/src/main/scala/org/apache/spark/ml/feature/StandardScaler.scala
Scala
apache-2.0
10,136
package scala.meta.converter import scala.meta.TreeConverterTestBaseNoLibrary class TreeConverterIntegrationTest extends TreeConverterTestBaseNoLibrary { def testSomeBigClass(): Unit = { // TODO } }
JetBrains/intellij-scala
scala/scala-impl/test/scala/meta/converter/TreeConverterIntegrationTest.scala
Scala
apache-2.0
211
package org.apache.flink.contrib.tensorflow.graphs import org.apache.flink.contrib.tensorflow.util.GraphUtils import org.apache.flink.core.fs.Path import org.slf4j.{Logger, LoggerFactory} import org.tensorflow.Graph /** * The default graph loader. * * <p>Loads graphs from a distributed filesystem. * * @para...
cookieai/flink-tensorflow
flink-tensorflow/src/main/scala/org/apache/flink/contrib/tensorflow/graphs/DefaultGraphLoader.scala
Scala
apache-2.0
674
import com.sksamuel.elastic4s.ElasticDsl._ import com.sksamuel.elastic4s.mappings.FieldType.{IntegerType, StringType} import com.sksamuel.elastic4s.{ElasticsearchClientUri, ElasticClient, StopAnalyzer} import org.elasticsearch.common.settings.ImmutableSettings object ExampleRemoteClient { def main (args: Array[Str...
canademar/me_extractors
DWClient2/src/main/scala/ExampleRemoteClient.scala
Scala
gpl-2.0
1,067
package org.scalaide.core.internal.quickassist import org.eclipse.jdt.internal.ui.text.spelling.WordQuickFixProcessor import org.scalaide.core.quickassist.BasicCompletionProposal import org.scalaide.core.quickassist.InvocationContext import org.scalaide.core.quickassist.QuickAssist /** * Creates quick assists for sp...
romanowski/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/core/internal/quickassist/FixSpellingMistake.scala
Scala
bsd-3-clause
729
package sri.universal.apis import scala.scalajs.js import scala.scalajs.js.annotation.JSImport @js.native trait CameraRoll extends js.Object { def saveImageWithTag(tag: String, successCallback: js.Function, errorCallback: js.Function): Unit = js.native def getPhotos(params: js.Object, callback: js.Function, err...
scalajs-react-interface/universal
src/main/scala/sri/universal/apis/CameraRoll.scala
Scala
apache-2.0
453
package state import config.Config import play.api.libs.json.Json import play.api.libs.ws.WS import play.api.mvc._ import play.api.Play.current import scala.concurrent.ExecutionContext.Implicits.global trait SignIn { val config: Config import config._ def UserAction(action: User => Result) = Action { req...
valtech/valtech-idp-test-clients
scala-play/app/state/SignIn.scala
Scala
mit
1,267
/* * Copyright 2015-2018 Snowflake Computing * * 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 Lic...
snowflakedb/spark-snowflakedb
src/main/scala/net/snowflake/spark/snowflake/SnowflakeConnectorUtils.scala
Scala
apache-2.0
4,818
package com.sageserpent.americium import scala.language.implicitConversions import scala.math.Ordered object Unbounded { implicit def convertToOrdered[X: Ordering]( unbounded: Unbounded[X] ): Ordered[Unbounded[X]] = (another: Unbounded[X]) => (unbounded, another) match { case (Finite(thisU...
sageserpent-open/americium
src/main/scala/com/sageserpent/americium/Unbounded.scala
Scala
mit
978
/* * Copyright (c) 2012-2014 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
haensel-ams/snowplow
3-enrich/scala-common-enrich/src/main/scala/com.snowplowanalytics.snowplow.enrich/common/utils/MapTransformer.scala
Scala
apache-2.0
9,048
package com.hungrylearner.pso.swarm /** * SwarmIntelligence encompasses multiple aspects of the swarms behavior. An implementation * can choose from different implementations of each aspect to get the desired behavior. * * The Id (from psychoanalysis) contains innate information and processes used by the other par...
flintobrien/akka-multiswarm
src/main/scala/com/hungrylearner/pso/swarm/SwarmIntelligence.scala
Scala
apache-2.0
1,898
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
gioenn/xSpark
core/src/main/scala/org/apache/spark/deploy/mesos/ui/MesosClusterUI.scala
Scala
apache-2.0
1,834
package com.twitter.finagle.netty4.proxy import com.twitter.finagle.{ CancelledConnectionException, ChannelClosedException, Failure, ConnectionFailedException } import com.twitter.finagle.client.Transporter import com.twitter.finagle.client.Transporter.Credentials import com.twitter.finagle.netty4.channel.BufferingC...
sveinnfannar/finagle
finagle-netty4/src/main/scala/com/twitter/finagle/netty4/proxy/HttpProxyConnectHandler.scala
Scala
apache-2.0
6,667
package nz.wicker.autoencoder import scala.math._ import nz.wicker.autoencoder.math.matrix.Mat import nz.wicker.autoencoder.math.matrix._ package object thresholding { /** * Simple 1D-grid search that determines the best threshold for transforming * sigmoid activities into binary activities */ def findO...
joergwicker/autoencoder
src/main/scala/nz/wicker/autoencoder/thresholding/package.scala
Scala
gpl-3.0
1,275
/** * Copyright (C) 2012 Alberto Franco * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This progr...
thHube/Cpunf-ModelCheck
src/it/unipd/math/atomic/test/ParserTest.scala
Scala
gpl-3.0
1,104
/*********************************************************************** * 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-gt/geomesa-gt-tools/src/main/scala/org/locationtech/geomesa/geotools/tools/data/GeoToolsDeleteFeaturesCommand.scala
Scala
apache-2.0
1,429
/* * 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...
pncampbell/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC7210B.scala
Scala
apache-2.0
1,234
/** * 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...
SumoLogic/sumobot
src/main/scala/com/sumologic/sumobot/quartz/QuartzExtension.scala
Scala
apache-2.0
2,530
package gitbucket.core.service import gitbucket.core.util.Implicits._ import gitbucket.core.util.ConfigUtil._ import gitbucket.core.util.Directory._ import gitbucket.core.util.SyntaxSugars._ import SystemSettingsService._ import javax.servlet.http.HttpServletRequest trait SystemSettingsService { def baseUrl(implic...
gencer/gitbucket
src/main/scala/gitbucket/core/service/SystemSettingsService.scala
Scala
apache-2.0
10,072
/* * 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 ...
ajbozarth/incubator-livy
thriftserver/server/src/main/scala/org/apache/livy/thriftserver/cli/ThriftHttpServlet.scala
Scala
apache-2.0
19,542
package com.github.tminglei.slickpg package window import slick.ast.Library.SqlFunction import slick.ast.LiteralNode import slick.jdbc.{JdbcType, JdbcTypesComponent, PostgresProfile} import slick.lifted.OptionMapperDSL trait PgWindowFuncSupport extends JdbcTypesComponent { driver: PostgresProfile => import driver.a...
tminglei/slick-pg
core/src/main/scala/com/github/tminglei/slickpg/window/PgWindowFuncSupport.scala
Scala
bsd-2-clause
2,790
/*********************************************************** * Particle filter * * Details : https://github.com/particlefilter/mrpf/ * * Copyright(c)2016 University of Liverpool * ************************************************************/ import org.ap...
particlefilter/mrpf
src/PF_Spark.scala
Scala
mit
38,502
/* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/fset-faststream
test/config/Phase2ScheduleExamples.scala
Scala
apache-2.0
781
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
gioenn/xSpark
sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala
Scala
apache-2.0
6,538
package org.jetbrains.plugins.scala.settings import java.util import javax.swing.{JComponent, JPanel} import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.application.ApplicationBundle import com.intellij.openapi.ui.{InputValidator, Messages} import com.intellij.openapi.wm.IdeFocusManage...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/settings/ScalaProjectSettingsUtil.scala
Scala
apache-2.0
5,806
package mesosphere.marathon package raml import mesosphere.marathon.api.v2.{AppHelpers, AppNormalization} import mesosphere.marathon.core.health.{MarathonHttpHealthCheck, PortReference} import mesosphere.marathon.core.pod.{BridgeNetwork, HostNetwork} import mesosphere.marathon.state._ import mesosphere.{UnitTest, Vali...
gsantovena/marathon
src/test/scala/mesosphere/marathon/raml/AppConversionTest.scala
Scala
apache-2.0
6,646
/** * Copyright 2015 Thomson Reuters * * 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...
hochgi/CM-Well
server/cmwell-util/src/main/scala/cmwell/util/resource/package.scala
Scala
apache-2.0
893
/* * This file is part of CubeLoader. * Copyright (c) 2016 - 2017, KitsuneAlex, All rights reserved. * * CubeLoader is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the Li...
TeamMD5/CubeLoader
src/main/scala/de/keri/cubeloader/proxy/ServerProxy.scala
Scala
gpl-3.0
2,816
package com.socrata.spandex.secondary import java.math.BigDecimal import org.joda.time.DateTime import org.scalatest.prop.PropertyChecks import org.scalatest.{FunSuiteLike, Matchers} import com.socrata.datacoordinator.id.{ColumnId, CopyId, RowId, UserColumnId} import com.socrata.datacoordinator.secondary._ import com...
socrata-platform/spandex
spandex-integration-tests/src/test/scala/com/socrata/spandex/secondary/VersionEventsHandlerSpec.scala
Scala
apache-2.0
21,974
package edu.gemini.sp.vcs2 import edu.gemini.pot.sp.version.LifespanId import edu.gemini.pot.sp.{ISPStaffOnlyFieldProtected, SPNodeKey} import edu.gemini.shared.util.VersionComparison.Newer import edu.gemini.sp.vcs2.MergeCorrection._ import edu.gemini.spModel.core.SPProgramID import edu.gemini.spModel.data.ISPDataObje...
arturog8m/ocs
bundle/edu.gemini.sp.vcs/src/main/scala/edu/gemini/sp/vcs2/StaffOnlyFieldCorrection.scala
Scala
bsd-3-clause
4,115
package to.gplus.rayracine.pack trait ProductPack { /** * Represents this type as 2 consecutive binary blocks of type T1..T2, * relative to the specified way of decomposing and composing S as such. */ def asProduct2[S,T1:Pack,T2:Pack] (apply: (T1,T2) => S) (unapply: S => Product2[T1,T2]) = new Pack[S...
RayRacine/Pack
src/main/scala/to/gplus/rayracine/pack/ProductPack.scala
Scala
mit
6,465
package com.weightwatchers package object eventing { /** Used by SimpleKinesisConsumer and SimpleKinesisProducer */ implicit val system = akka.actor.ActorSystem.create("test-system") }
WW-Digital/reactive-kinesis
src/it/scala/com/weightwatchers/reactive/kinesis/package.scala
Scala
apache-2.0
191
package com.github.chengpohi.serializer import java.time.format.DateTimeFormatter import java.time.{LocalDate, LocalDateTime, LocalTime, ZoneId, ZonedDateTime} import com.github.chengpohi.api.EastMoneyStocks.{DailyStockInfo, MinuteStockInfo} import org.json4s._ class MinuteStockInfoSerializer extends CustomSerializ...
chengpohi/coolmarks
modules/bi/src/main/scala/com/github/chengpohi/serializer/JSON4sSerializers.scala
Scala
apache-2.0
2,194
package definiti.core.plugin.serialization import definiti.common.ast._ import spray.json._ private[core] trait RootJsonSerialization { self: JsonSerialization => def rootToJson(root: Root): String = { rootFormat.write(root).compactPrint } def rootFromJson(json: String): Root = { rootFormat.read(jso...
definiti/definiti-core
src/main/scala/definiti/core/plugin/serialization/RootJsonSerialization.scala
Scala
mit
7,189
/** * Copyright (c) 2016 Intel Corporation  * * 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 applicabl...
aayushidwivedi01/spark-tk
sparktk-core/src/main/scala/org/trustedanalytics/sparktk/graph/internal/ops/orientdb/DataTypesConverter.scala
Scala
apache-2.0
2,551
package kykl import akka.actor.{Actor, ActorLogging} import akka.cluster.Cluster import akka.cluster.ClusterEvent._ class ClusterListener extends Actor with ActorLogging { // subscribe to cluster changes, re-subscribe when restart override def preStart(): Unit = { log.debug("starting up cluster listener...")...
kykl/akka-clustering-pubsub
src/main/scala/kykl/ClusterListener.scala
Scala
mit
1,010
package org.cloudio.morpheus.scanner.protodata import java.util.Date import org.json4s.JValue import org.json4s.JsonAST.{JValue, JString} import org.morpheus._ import org.morpheus.Morpheus._ import org.morpheus.FragmentValidator._ /** * Created by zslajchrt on 19/08/15. */ object Thing { type ThingMorphType = Th...
zslajchrt/morpheus-tutor
src/main/scala/org/cloudio/morpheus/scanner/protodata/Thing.scala
Scala
apache-2.0
3,422
object P { def unary_+ = 20 def unary_+(x: Int) = 21 def unary_+(x: String) = 22 } println(/*name: unary_+, line: 2 */+P) println((/*name: unary_+, line: 3 */+P)(3))
ilinum/intellij-scala
testdata/resolve2/function/unary/ParenthesisedPrefix.scala
Scala
apache-2.0
172
// // The contents of this file are subject to the Mozilla Public // License Version 1.1 (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.mozilla.org/MPL/ // // Software distributed under the License is distributed on an "AS // IS...
kaoru2010/android-startup-project
tools/smc/smc_6_5_0/examples/Scala/EX3/checkstring.scala
Scala
apache-2.0
1,992
import anorm.{NotAssigned, Id} import play.api._ import securesocial.core._ import dao._ import model._ object Global extends GlobalSettings { object PsqlDao extends PsqlDaoProvider override def onStart(app: Application) = { if(PsqlDao.entryStateDao.getById(1).isEmpty) insertInitialData } private def i...
mikegirkin/papersheet
src/app/Global.scala
Scala
mit
1,356
/* * Copyright (c) 2012 - 2020 Splice Machine, Inc. * * This file is part of Splice Machine. * Splice Machine 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, or (at your option) ...
splicemachine/spliceengine
splice_spark/src/test/scala/com/splicemachine/spark/splicemachine/permissions/TestContext_Permissions.scala
Scala
agpl-3.0
4,194
package edu.scalanus.compiler import javax.script.{ScriptContext, ScriptEngine, ScriptException} import edu.scalanus.EngineTest import org.scalatest.{FlatSpec, Matchers} class ScalanusCompilerSpec extends FlatSpec with Matchers with EngineTest { behavior of "Scalanus AST -> IR Compiler" it should "not fail on ...
mkaput/scalanus
src/test/scala/edu/scalanus/compiler/ScalanusCompilerSpec.scala
Scala
mit
1,364
package com.twitter.finatra.thrift import com.twitter.finagle.ThriftMux import com.twitter.finagle.param.Stats import com.twitter.finagle.stats.NullStatsReceiver import com.twitter.finagle.thrift.ClientId import com.twitter.inject.app.EmbeddedApp import com.twitter.inject.server.PortUtils._ import com.twitter.inject.s...
joecwu/finatra
thrift/src/test/scala/com/twitter/finatra/thrift/ThriftClient.scala
Scala
apache-2.0
1,051
package org.hawaiki /** * Entry point to the daemon */ object Main { def main(args: Array[String]): Unit = { println("Hello Hawaiki") } }
hawaiki/hawaiki
src/main/scala/org/hawaiki/Main.scala
Scala
mit
151
// 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 writing, software // distributed unde...
supriyantomaftuh/network
src/main/scala/com/cloudant/clouseau/ClouseauSupervisor.scala
Scala
apache-2.0
2,202
package org.openstack.api.restful.ceilometer.v2.requests import org.openstack.api.restful.ceilometer.v2.elements.Alarm /** * @author Antonio Murgia * @version 21/10/14 */ case class AlarmPOSTRequest(data : Alarm)
tmnd1991/ceilometerAPI4s
src/main/scala/org/openstack/api/restful/ceilometer/v2/requests/AlarmPOSTRequest.scala
Scala
apache-2.0
217
package com.teambytes.awsleader trait LeaderActionsHandler { def onIsLeader(): Unit def onIsNotLeader(): Unit }
grahamar/aws-leader-election
src/main/scala/com/teambytes/awsleader/LeaderActionsHandler.scala
Scala
apache-2.0
120
/* * Copyright (c) 2016. StulSoft, Yuriy Stul */ package com.stulsoft.ysps.pclass import scala.util.Random /** * Created by Yuriy Stul on 11/7/2016. */ class Container3 private(val p1:Int) { } object Container3 { def apply(): Container3 = { val c = new Container3(Random.nextInt(100)) c } }
ysden123/ysps
src/main/scala/com/stulsoft/ysps/pclass/Container3.scala
Scala
mit
315
/* * Copyright (C) 2005, The Beangle Software. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
beangle/cache
caffeine/src/main/scala/org/beangle/cache/caffeine/CaffeineCacheManager.scala
Scala
lgpl-3.0
2,227
package com.twitter.finagle.topo import com.twitter.app.App import com.twitter.conversions.storage._ import com.twitter.conversions.time._ import com.twitter.finagle.builder.ClientBuilder import com.twitter.finagle.httpx.{Request, Response, Status} import com.twitter.finagle.thrift.ThriftClientFramedCodec import com.t...
lucaslanger/finagle
finagle-stress/src/main/scala/com/twitter/finagle/topo/Appserver.scala
Scala
apache-2.0
2,725
package fs2.interop.scalaz import fs2.util._ import _root_.scalaz.{ \\/, Catchable => ZCatchable, Functor => ZFunctor, Monad => ZMonad, MonadError, NaturalTransformation } trait Instances extends Instances0 { implicit def effectToMonadError[F[_]](implicit F: Effect[F]): MonadError[F, Throwable] = new MonadError[F, ...
functional-streams-for-scala/fs2-scalaz
src/main/scala/fs2/interop/scalaz/Instances.scala
Scala
mit
2,057
package io.github.mandar2812.dynaml.pipes /** * @author mandar2812 on 18/11/15. * * Top level trait representing an * abstract pipe that defines a transformation * between two data types, i.e. [[Source]] and [[Destination]] */ trait DataPipe[Source, Destination] { def run(data: Source): Destination /*...
sisirkoppaka/bayeslearn
src/main/scala/io/github/mandar2812/dynaml/pipes/DataPipe.scala
Scala
apache-2.0
1,694
/* * 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/sj-platform
core/sj-common/src/main/scala/com/bwsw/sj/common/dal/model/service/ESServiceDomain.scala
Scala
apache-2.0
1,319
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.3 * @date Sat Jan 30 13:19:22 EST 2010 * @see LICENSE (MIT style license file). */ package scalation.dynamics import scalation.linalgebra.VectorD import scalation.util.Error //::::::::...
NBKlepp/fda
scalation_1.3/scalation_modeling/src/main/scala/scalation/dynamics/Integrator.scala
Scala
mit
5,060
object Driver { def main(a: Array[String]) { val s = new Solution val n1 = new TreeNode(1) val n2 = new TreeNode(2) val n3 = new TreeNode(3) n1.left = n2 n1.right = n3 println(s.sumNumbers(n1)) } }
shengmin/coding-problem
leetcode/sum-root-to-leaf-numbers/Driver.scala
Scala
mit
231
package io.sphere.json import io.sphere.json._ import org.json4s.{JObject, JValue} import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec class SphereJsonExample extends AnyWordSpec with Matchers { case class User(name: String, age: Int, location: String) object User { // u...
sphereio/sphere-scala-libs
json/json-core/src/test/scala/io/sphere/json/SphereJsonExample.scala
Scala
apache-2.0
1,299
package com.twitter.finagle.zipkin.thrift import com.twitter.finagle.stats.InMemoryStatsReceiver import com.twitter.finagle.tracing._ import com.twitter.util._ import com.twitter.zipkin.common.Annotation import com.twitter.zipkin.storage.InMemorySpanStore import com.twitter.zipkin.{Constants, common} import org.junit....
rocwzp/zipkin
zipkin-query-service/src/test/scala/com/twitter/zipkin/config/SpanStoreZipkinTracerTest.scala
Scala
apache-2.0
2,090
package im.tox.antox.activities import java.io.File import android.content.Intent import android.os.{Build, Bundle} import android.support.v7.app.AppCompatActivity import android.text.{Editable, TextWatcher} import android.widget.{EditText, TextView} import de.hdodenhof.circleimageview.CircleImageView import im.tox....
zetok/Antox
app/src/main/scala/im/tox/antox/activities/FriendProfileActivity.scala
Scala
gpl-3.0
3,040
package dawn.flow import breeze.linalg._ class TestTS[A: Data](val rawSource1: Source[LabeledData[A]], name: String, tlog: Option[TestLogger]) extends SinkBatch1[LabeledData[A]] { def consumeAll1(l: ListT[LabeledData[A]]) = { def data = implicitly[Data[A]] val toV = l.map(x => (data.toVector(x.v.value), da...
rubenfiszel/scala-flow
core/src/main/scala/TestTS.scala
Scala
mit
1,912
package com.caibowen.prma.logger.logback import java.net.InetAddress import ch.qos.logback.classic.Level import ch.qos.logback.classic.spi.{ILoggingEvent, IThrowableProxy} import com.caibowen.gplume.misc.Str import com.caibowen.prma.api.model.{EventVO, ExceptionVO} import com.caibowen.prma.api.{EventAdaptor, LogLevel...
xkommando/PRMA
logger/src/main/scala/com/caibowen/prma/logger/logback/LogbackEventAdaptor.scala
Scala
lgpl-3.0
3,315
/* __ *\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\___/_/ |_/...
felixmulder/scala
src/library/scala/collection/mutable/ImmutableMapAdaptor.scala
Scala
bsd-3-clause
2,660
class X class Y extends X object Ambiguous { def f(x: X) = 1 def f(ys: Y*) = 2 } object Test extends App { println(Ambiguous.f(new X)) println(Ambiguous.f(new Y)) }
felixmulder/scala
test/files/neg/t4728.scala
Scala
bsd-3-clause
173
import scala.collection.mutable import scala.annotation.tailrec // A type class derivation encoding using Shape/Shaped scheme, now superseded by // typeclass-derivation2a object TypeLevel { /** @param caseLabels The case and element labels of the described ADT as encoded strings. */ class ReflectedClass(labelsSt...
dotty-staging/dotty
tests/run-custom-args/typeclass-derivation2.scala
Scala
apache-2.0
16,581
package org.talkingpuffin.util import java.util.regex.Pattern /** * Extracts links from Twitter status */ object LinkExtractor { val urlCharClass = """[^'"()\\[\\]\\s]""" val hyperlinkRegex = "(https?://" + urlCharClass + "+)" val userListRegex = """@((\\w+)/""" + urlCharClass + "+)" val usernameRegex = ...
dcbriccetti/talking-puffin
common/src/main/scala/org/talkingpuffin/util/LinkExtractor.scala
Scala
mit
4,529
package io.youi.http.content import io.youi.net.ContentType case class BytesContent(value: Array[Byte], contentType: ContentType, lastModified: Long = System.currentTimeMillis()) extends Content { override def length: Long = value.length override def withContentType(contentType: ContentType): Content = copy(cont...
outr/youi
core/shared/src/main/scala/io/youi/http/content/BytesContent.scala
Scala
mit
601
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ * @ @ * * # # # # (c) 2016 CAB * * # # # # # # ...
AlexCAB/ProbabilisticPlaying
mathact/src/main/scala/mathact/parts/plumbing/infrastructure/DriveBuilding.scala
Scala
mit
4,725
/** * 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 ...
laserson/adam
adam-apis/src/main/scala/org/bdgenomics/adam/api/python/DataFrameConversionWrapper.scala
Scala
apache-2.0
1,097
/* * This file is part of AckCord, licensed under the MIT License (MIT). * * Copyright (c) 2019 Katrix * * 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 ...
Katrix-/AckCord
gateway/src/main/scala/ackcord/gateway/GatewayProtocol.scala
Scala
mit
18,236
package se.sics.caracaldb.api.data import spray.json._ import se.sics.caracaldb.operations.ResponseCode import se.sics.caracaldb.global.LUTJsonProtocol import se.sics.caracaldb.global.LUTJsonProtocol.SchemaObj object CaracalJsonProtocol extends DefaultJsonProtocol { import DefaultJsonProtocol._ implicit obje...
CaracalDB/CaracalDB
rest-api/src/main/scala/se/sics/caracaldb/api/data/CaracalJsonProtocol.scala
Scala
gpl-2.0
1,464
package zzz.akka.avionics import akka.actor.{Props, Actor, ActorRef, ActorSystem} import akka.pattern.ask import scala.concurrent.Await import akka.util.Timeout import scala.concurrent.duration._ import scala.concurrent.ExecutionContext.Implicits.global object Avionics { // needed for '?' below implicit val timeo...
justindav1s/learning-scala
src/main/scala/zzz/akka/avionics/Avionics.scala
Scala
apache-2.0
1,169
object BinomialHeap { def apply[T](value: T)(implicit ord: Ordering[T], treeOrd: Ordering[BinTree[T]]) = new BinomialHeap(Map())(ord, treeOrd).add(BinTree(value)) } case class BinomialHeap[T](heap: Map[Int, BinTree[T]])(implicit ord: Ordering[T], treeOrd: Ordering[BinTree[T]]) { def add(tree: BinTree[T]): Bi...
OpenGenus/cosmos
code/data_structures/src/tree/heap/binomial_heap/binomial_heap.scala
Scala
gpl-3.0
1,954
/* * 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 ...
shaoxuan-wang/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/batch/sql/SetOperatorsTest.scala
Scala
apache-2.0
7,577
package edu.arizona.sista.processors import edu.arizona.sista.processors.fastnlp.FastNLPProcessor import org.scalatest._ import scala.io.Source /** * This is a pseudo test; I just wanted to run FastNLPProcessor on a big file * User: mihais * Date: 2/25/15 */ class TestFastNLPProcessorSpeed extends FlatSpec with...
VivianLuwenHuangfu/processors
src/test/scala/edu/arizona/sista/processors/TestFastNLPProcessorSpeed.scala
Scala
apache-2.0
699
package org.opencommercesearch.search.collector /* * 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 Licen...
madickson/opencommercesearch
opencommercesearch-common/src/main/scala/org/opencommercesearch/search/collector/SimpleCollector.scala
Scala
apache-2.0
1,679
package io.getquill.dsl import scala.reflect.macros.whitebox.{ Context => MacroContext } import io.getquill.Embedded import io.getquill.util.OptionalTypecheck import io.getquill.util.MacroContextExt._ trait ValueComputation { val c: MacroContext import c.universe._ sealed trait Value { val term: Option[Ter...
getquill/quill
quill-core/src/main/scala/io/getquill/dsl/ValueComputation.scala
Scala
apache-2.0
4,562
/* * Make it easy to check counters after our Spark job runs. */ package com.holdenkarau.spark.validator import java.sql.Timestamp import org.apache.spark.sql._ import org.apache.spark.{Accumulator, SparkContext, ValidatorSparkContext} import scala.collection.mutable.HashMap /** * Validation class that will be u...
holdenk/spark-validator
src/main/scala/com/holdenkarau/spark/validator/Validation.scala
Scala
apache-2.0
5,603
package com.wavesplatform.state.patch import cats.instances.map._ import cats.syntax.semigroup._ import com.wavesplatform.account.{Address, Alias, PublicKey} import com.wavesplatform.common.state.ByteStr import com.wavesplatform.common.utils.{Base58, EitherExt2} import com.wavesplatform.features.BlockchainFeatures imp...
wavesplatform/Waves
node/src/main/scala/com/wavesplatform/state/patch/CancelLeasesToDisabledAliases.scala
Scala
mit
2,098
import language.i0 @scala.AnyRef object i1 { def i2(i3: String) = 2 def I4(i3: String): Any = None trait i5 {} def I6[i7 <: _[_]](i7: i7[i7])(implicit i7: i5[i7]): i7 = i2 + i2 + + i1() yield i7 i2(i5, this) }
som-snytt/dotty
tests/fuzzy/comment17.scala
Scala
apache-2.0
221