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 scala.generator import com.bryzek.apidoc.generator.v0.models.InvocationForm import scala.models.Play23ClientGenerator import scala.models.ning.Ning18ClientGenerator import models.TestHelper import org.scalatest.{FunSpec, Matchers} class ReferenceWithImportsSpec extends FunSpec with Matchers { lazy val ssd...
krschultz/apidoc-generator
scala-generator/src/test/scala/models/generator/ReferenceWithImportsSpec.scala
Scala
mit
1,783
package org.kududb.spark.demo.gamer.cdc import java.text.SimpleDateFormat import java.util.Random import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.{TimeUnit, Executors} import org.kududb.client.{Operation, PartialRow, KuduClient} import org.kududb.spark.demo.gamer.aggregates.GamerDataGener...
tmalaska/SparkOnKudu
src/main/scala/org/kududb/spark/demo/gamer/cdc/DirectDataMultiThreadedInjector.scala
Scala
apache-2.0
1,558
/* * Copyright (C) 2014 - 2020 Contributors as noted in the AUTHORS.md file * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option)...
DFASDL/dfasdl-utils
src/main/scala/org/dfasdl/utils/ElementHelpers.scala
Scala
agpl-3.0
6,304
package examples.demo import java.awt.Dimension import examples.demo.ui.{Circle, Shape, ShapesPanel} import rescala.default._ import scala.swing.{MainFrame, SimpleSwingApplication, UIElement} /** So far, we demonstrated the Signal abstraction, which allows modular, * yet declarative implementation of interactive ...
guidosalva/REScala
Code/Examples/examples/src/main/scala/examples/demo/EInaccurateNumericCircle.scala
Scala
apache-2.0
4,220
/* * 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-runtime/src/test/scala/org/apache/flink/runtime/testingUtils/TestingTaskManager.scala
Scala
apache-2.0
2,614
package gameover.fwk.libgdx.gfx import com.badlogic.gdx.math.{Polygon, Vector2} import gameover.fwk.libgdx.utils.LibGDXHelper import gameover.fwk.pool.Vector2Pool object Polygons extends LibGDXHelper { def createArcAsPolygon(x: Float, y: Float, radius: Float, start: Float, angle: Float, segments: Int): Polygon = {...
PixelDuck/gameover-game-framework
src/main/scala/gameover/fwk/libgdx/gfx/Polygons.scala
Scala
mit
3,009
/* * Copyright (C) 2014 - 2017 Contributors as noted in the AUTHORS.md file * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option)...
Tensei-Data/tensei-agent
src/main/scala/com/wegtam/tensei/agent/processor/RecipesWorker.scala
Scala
agpl-3.0
11,889
package com.olvind package sui object SuiTypeMemberMethodMapper extends MemberMapper { override def apply(compName: CompName)(memberMethod: MemberMethod): ParsedMethod = ParsedMethod( apply(compName, memberMethod.paramNames, memberMethod.name), None ) private def apply(c: CompName, args: Seq[...
chandu0101/scalajs-react-components
gen/src/main/scala/com/olvind/sui/SuiTypeMemberMethodMapper.scala
Scala
apache-2.0
678
package org.jetbrains.plugins.scala.lang.dfa.analysis.tests import org.jetbrains.plugins.scala.lang.dfa.Messages._ import org.jetbrains.plugins.scala.lang.dfa.analysis.ScalaDfaTestBase class IfStatementsDfaTest extends ScalaDfaTestBase { def testRegularIfs(): Unit = test(codeFromMethodBody(returnType = "Int") { ...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/dfa/analysis/tests/IfStatementsDfaTest.scala
Scala
apache-2.0
867
/* * 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 ...
kevinyu98/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/DataSourceSuite.scala
Scala
apache-2.0
5,085
/* * 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 ...
gyfora/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/stream/sql/join/TemporalJoinTest.scala
Scala
apache-2.0
5,022
package org.skycastle.entity.tilemap import content.composite.CompositeEntity import javax.swing.JComponent import ui.Ui import util.Parameters /** * * * @author Hans Haggstrom */ class Tilemap2dUi(tilemap : TilemapEntity) extends Ui { type ViewType = JComponent def createOwnView(composite: CompositeEnti...
weimingtom/skycastle
src/main/scala/org/skycastle/content/tilemap/Tilemap2dUi.scala
Scala
gpl-2.0
427
/* * Copyright 2013 Akiyoshi Sugiki, University of Tsukuba * * 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 a...
axi-sugiki/kumoi
src/kumoi/impl/cache/CachedObject.scala
Scala
apache-2.0
7,094
/* * 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 ...
witgo/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/FilterPushdownBenchmark.scala
Scala
apache-2.0
14,737
/* * Copyright 2020 Precog Data * * 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 ...
quasar-analytics/quasar
ejson/src/main/scala/quasar/ejson/EncodeEJson.scala
Scala
apache-2.0
3,239
/* * 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
niflheim/src/main/scala/quasar/niflheim/RawLoader.scala
Scala
apache-2.0
5,350
package top.myetl.lucenerdd.util import java.io.{Closeable, File} import java.util import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs._ import org.apache.hadoop.fs.permission.FsPermission import org.apache.hadoop.hdfs.DistributedFileSystem import org.apache.hadoop.hdfs.protocol.HdfsConstants.Safe...
myetl/sparkLu
src/main/scala/top/myetl/lucenerdd/util/FsUtils.scala
Scala
apache-2.0
4,570
import com.thesamet.proto.e2e.extensions._ import org.scalatest._ class ExtensionsSpec extends FlatSpec with MustMatchers with OptionValues { "BaseMessage.parseFrom" should "parse unknown fields" in { val helper = Helper(optInt = Some(37), optString = Some("foo")) val extended = BaseMessage.parseFrom(helper....
dotty-staging/ScalaPB
e2e/src/test/scala/ExtensionsSpec.scala
Scala
apache-2.0
836
package com.temportalist.chalked.common.tile import java.util import com.temportalist.origin.library.common.lib.ItemMeta import com.temportalist.origin.wrapper.common.tile.TEWrapper import net.minecraft.block.Block import net.minecraft.item.ItemStack import net.minecraft.nbt.NBTTagCompound /** * * * @author TheTe...
TheTemportalist/Chalked
src/main/scala/com/temportalist/chalked/common/tile/TEColored.scala
Scala
apache-2.0
1,537
import sbt._ object Conf { lazy val dbConf = settingKey[(String, String, String)]("Typesafe config file with slick settings") }
101dev/play-slick-codegen-flyway-seed
project/Conf.scala
Scala
cc0-1.0
131
object SCL6854 { trait Foo[T] { def value: T } // LEVEL 1 case class FooAny[T](value: T) extends Foo[T] // LEVEL 2 case class FooNumberAny[T: Numeric](value: T) extends Foo[T] // Constructor object Foo { def apply[T, R <: Foo[T]](value: T)(implicit builder: Builder[T, R]): R = builder....
LPTK/intellij-scala
testdata/typeInference/bugs5/SCL6854.scala
Scala
apache-2.0
2,001
package parameter trait Given { trait T1 trait T2 trait T3 trait T4 trait T5 trait T6 trait T7 trait T8 trait T9 trait T10 trait T11 trait T12 given aliasTypeParameter[A]: Int = ??? given aliasTypeParameters[A, B]: Int = ??? given aliasValueParameter(using x: Int): Int = ???...
JetBrains/intellij-scala
tasty/runtime/data/parameter/Given.scala
Scala
apache-2.0
1,315
package edu.oregonstate.mutation.statementHistory /** * Created by caius on 12/5/15. */ class MethodChangeDetectorTest extends GitTest with NodeChangeDetectorTest { it should "track a method across refactorings" in { val first = add("A.java", "public class A{\\npublic void m(){\\nint x=3;\\n}}") val secon...
caiusb/statement-history
src/test/scala/edu/oregonstate/mutation/statementHistory/MethodChangeDetectorTest.scala
Scala
mit
1,022
package poker.core.handanalyzer import poker.core.{Hand, HandStatus, HandType} import poker.Utils final class RoyalFlushAnalyzer extends HandAnalyzer { /** Detect any T-J-Q-K-A, all of the same suit */ override def doAnalyze(hand: Hand): HandStatus = { if (hand.hasSameSuit && hand.hasConsecutiveCardsStartingW...
kyuksel/poker
src/main/scala/poker/core/handanalyzer/RoyalFlushAnalyzer.scala
Scala
mit
434
package controllers import play.api.mvc.Controller import org.scribe.oauth.OAuthService import play.api.Play import play.api.mvc.Action import org.scribe.builder.ServiceBuilder import org.scribe.builder.api.GoogleApi import org.scribe.model.Token import play.api.Logger import org.scribe.model.Verifier import org.scrib...
knoldus/Play-Starter-Template
app/controllers/Google.scala
Scala
apache-2.0
4,605
/* Find the Kth element of a list. By convention, the first element in the list is element 0. Example: scala> nth(2, List(1, 1, 2, 3, 5, 8)) res0: Int = 2 */ package S99 object P03 { @annotation.tailrec def nth[A](n: Int, xs: List[A]): A = { xs match { case _ :: tail if n > 0 => nth(n - 1, ...
gcanti/S-99
src/main/scala/P03.scala
Scala
mit
439
package scalanlp.stats package distributions import org.scalatest.junit.JUnitRunner import org.scalatest.FunSuite import org.junit.Test import org.junit.runner.RunWith import org.junit.Before import org.scalatest.prop._ import org.scalacheck._ import java.util.zip.DeflaterInputStream /** * @author dlwh */ trait Mom...
MLnick/scalanlp-core
learn/src/test/scala/scalanlp/stats/distributions/MomentsTestBase.scala
Scala
apache-2.0
1,456
/* * 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 ...
wowmsi/safe
safe-logic/src/main/scala/safe/safelog/parser/ParserImpl.scala
Scala
apache-2.0
38,105
/* * Wire * Copyright (C) 2016 Wire Swiss GmbH * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This progr...
wireapp/wire-android-sync-engine
zmessaging/src/main/scala/com/waz/model2/transport/Team.scala
Scala
gpl-3.0
1,327
import com.google.inject.{Guice, AbstractModule} import play.api.GlobalSettings /** * Set up the Guice injector and provide the mechanism for return objects from the dependency graph. */ object Global extends GlobalSettings { /** * Bind types such that whenever UUIDGenerator is required, an instance of SimpleU...
franciscodr/what-are-we-talking-about
app/Global.scala
Scala
apache-2.0
796
/* * Copyright (c) 2015 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org...
snowplow/schema-guru
src/test/scala/MergeSpec.scala
Scala
apache-2.0
4,595
/** * Copyright 2013, 2014 Gianluca Amato <gamato@unich.it> * * 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 versi...
francescaScozzari/Jandom
core/src/main/scala/it/unich/jandom/targets/lts/Region.scala
Scala
lgpl-3.0
1,545
/** * 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...
kavink92/kafka-0.8.0-beta1-src
core/src/main/scala/kafka/consumer/ZookeeperConsumerConnector.scala
Scala
apache-2.0
33,296
package fpinscala.datastructures /** Reimplement Scala's List type */ sealed trait List[+A] case object Nil extends List[Nothing] case class Cons[+A](head: A, tail: List[A]) extends List[A] object List { def apply[A](as: A*): List[A] = if (as.isEmpty) Nil else Cons(as.head, apply(as.tail: _*)) /** A tot...
grscheller/scheller-linux-archive
grok/Scala2/fpinscala/src/main/scala/fpinscala/datastructures/List.scala
Scala
bsd-3-clause
8,150
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2014, G...
non/squants
src/test/scala/squants/market/MoneyContextSpec.scala
Scala
apache-2.0
6,133
package models.module import play.api.mvc.{PathBindable, QueryStringBindable} object ModelBindables { /* Start model bindables */ /* Projectile export section [boilerplay] */ private[this] def boilerplayMpaaRatingTypeExtractor(v: Either[String, String]) = v match { case Right(s) => Right(models.film.MpaaRat...
KyleU/boilerplay
app/models/module/ModelBindables.scala
Scala
cc0-1.0
1,311
package special.sigma import org.ergoplatform.SigmaConstants.ScriptCostLimit import org.scalatest.BeforeAndAfterAll import scalan.RType import scalan.util.BenchmarkUtil import sigmastate.{DataValueComparer, JitCost, TrivialProp} import sigmastate.Values.ErgoTree import sigmastate.eval.{CSigmaProp, Profiler, SigmaDsl} ...
ScorexFoundation/sigmastate-interpreter
sigmastate/src/test/scala/special/sigma/DataValueComparerSpecification.scala
Scala
mit
8,591
package com.github.aselab.activerecord import java.sql.Connection import org.squeryl.internals.DatabaseAdapter import play.api.Play.current import java.util.{Locale, TimeZone} import play.api.i18n.{Messages, I18nSupport} class PlayConfig( val schema: ActiveRecordTables, overrideSettings: Map[String, Any] = Map()...
xdougx/scala-activerecord
play2/src/main/scala/PlaySupport.scala
Scala
mit
2,738
/* * Copyright © 2015-2019 the contributors (see Contributors.md). * * This file is part of Knora. * * Knora is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or *...
musicEnfanthen/Knora
webapi/src/it/scala/org/knora/webapi/e2e/v1/KnoraSipiScriptsV1ITSpec.scala
Scala
agpl-3.0
10,200
package com.sammyrulez.ocs.api import org.scalatra.test.specs2._ import org.specs2.mock.Mockito import org.mockito.Matchers._ import org.specs2.mutable._ import javax.servlet.http._ import javax.servlet._ import org.scalatra.auth.Scentry import net.iharder.Base64 import org.scalatra.ScalatraFilter class Operations...
sammyrulez/octo-crypto-samurai
src/test/scala/com/sammyrulez/ocs/api/OperationsTest.scala
Scala
mit
2,042
class Factorial { def computeFactorial(num : Int):String = { (2 to num).foldLeft(BigInt(1))(_*_).toString() } }
aayushKumarJarvis/Code-Snippets-JAVA-SCALA
src/main/scala/Factorial.scala
Scala
mit
122
package org.vaslabs.granger.repo import java.time.ZonedDateTime import java.util.UUID import akka.http.scaladsl.model.StatusCode import cats.effect.IO import org.vaslabs.granger.LoadDataOutcome import org.vaslabs.granger.comms.api.model.{ Activity, AddToothInformationRequest } import org.vaslabs.granger.modeltreatmen...
vaslabs/granger
src/main/scala/org/vaslabs/granger/repo/GrangerRepo.scala
Scala
lgpl-3.0
1,619
package kessler import ksp._ import scala.actors._ /** * A daemon for merging save files and replying with the merged files. * * Operations are: * - update <content> - merge this content into the master save file * - get - get a copy of the merged file * - get <list> - get a copy of the merged file, excluding r...
ToxicFrog/kessler
kesslerd/src/KesslerDaemon.scala
Scala
mit
4,809
/* * 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 ...
aokolnychyi/spark
core/src/main/scala/org/apache/spark/scheduler/SparkListener.scala
Scala
apache-2.0
11,406
/* - Coeus web framework ------------------------- * * Licensed under the Apache License, Version 2.0. * * Author: Spiros Tzavellas */ package com.tzavellas.coeus.i18n.locale import java.util.Locale import javax.servlet.http.{ HttpServletRequest, HttpServletResponse } /** * Resolves the user's locale based on a...
sptz45/coeus
src/main/scala/com/tzavellas/coeus/i18n/locale/SessionLocaleResolver.scala
Scala
apache-2.0
2,226
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
HuaweiBigData/carbondata
integration/spark2/src/test/scala/org/apache/carbondata/spark/testsuite/partition/TestAlterPartitionTable.scala
Scala
apache-2.0
50,672
/** * Copyright 2015 Mohiva Organisation (license at mohiva dot com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
cemcatik/play-silhouette
silhouette/test/com/mohiva/play/silhouette/impl/providers/SocialProviderRegistrySpec.scala
Scala
apache-2.0
3,091
/* * 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
integration-test/src/test/spark2/scala/Spark2JobApiIT.scala
Scala
apache-2.0
4,372
package domain object Test extends App { Array("test@test.com", "m@blah.blah.com", "not_valid") foreach { case Email("test", Domain("com", "test")) => println("first case") case Email(_, Domain(_, "blah", _*)) => println("second case") case _ => println("not valid") } }
mhotchen/programming-in-scala
src/domain/Test.scala
Scala
apache-2.0
288
package com.github.simy4.xpath package scala import java.io.StringReader import java.util.stream.Stream import fixtures.FixtureAccessor import helpers.SimpleNamespaceContext import javax.xml.namespace.NamespaceContext import javax.xml.xpath.{ XPathConstants, XPathExpression, XPathFactory } import org.assertj.core.api...
SimY4/xpath-to-xml
xpath-to-xml-scala/src/test/scala/com/github/simy4/xpath/scala/XmlBuilderTest.scala
Scala
apache-2.0
11,196
package org.pico.fp import scala.language.higherKinds trait Applicative[F[_]] extends Apply[F] { def point[A](a: => A): F[A] }
pico-works/pico-fp
pico-fp/src/main/scala/org/pico/fp/Applicative.scala
Scala
mit
131
package org.pdfextractor.algorithm import java.awt._ import java.io.{File, InputStream} import java.nio.charset.StandardCharsets import java.time.LocalDate import java.util.Locale import net.liftweb.json.JsonAST.JValue import net.liftweb.json._ import org.apache.commons.io.{FileUtils, IOUtils} import org.pdfextractor...
kveskimae/pdfalg
src/main/scala/org/pdfextractor/algorithm/io/IOHelper.scala
Scala
mit
3,767
package forimpatient.chapter16 import scala.io.Source import scala.xml.parsing.XhtmlParser /** * Created by Iryna Kharaborkina on 8/19/16. * * Solution to the Chapter 16 Exercise 05 'Scala for the Impatient' by Horstmann C.S. * * Print the names of all images in an XHTML file. That is, print all src attrib...
Kiryna/Scala-for-the-Impatient
src/forimpatient/chapter16/Exercise05.scala
Scala
apache-2.0
538
/** * Copyright (C) 2015 DANS - Data Archiving and Networked Services (info@dans.knaw.nl) * * 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...
DANS-KNAW/easy-update-solr-index
command/src/main/scala/nl.knaw.dans.easy.solr.command/Command.scala
Scala
apache-2.0
2,229
/* * Copyright 2009-2011 WorldWide Conferencing, LLC * * 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 o...
karolx/json4s
tests/src/test/scala/org/json4s/ExtractionExamplesSpec.scala
Scala
apache-2.0
15,602
/* * 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 ...
ArvinDevel/onlineAggregationOnSparkV2
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/NonFoldableLiteral.scala
Scala
apache-2.0
1,954
package models package object db { object AccountRole extends Enumeration { val normal, admin = Value } }
asciiu/halo
arbiter/app/models/db/package.scala
Scala
mit
116
package models.daos import java.util.UUID import com.mohiva.play.silhouette.api.LoginInfo import models.User import scala.concurrent.Future /** * Give access to the user object. */ trait UserDao { /** * Finds a user by its login info. * * @param loginInfo The login info of the user to find. * @retu...
sne11ius/geotracker-service
app/models/daos/UserDao.scala
Scala
gpl-3.0
873
/* * 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 to in writ...
tangyang/zipkin
zipkin-web/src/main/scala/com/twitter/zipkin/config/StaticResourceConfig.scala
Scala
apache-2.0
917
package pl.szymonmatejczyk.myerson import com.twitter.cassovary.graph.{DirectedGraph, GraphDir} import pl.szymonmatejczyk.subgraphsampling.{SubgraphsStructure, Subgraph} import scala.collection import scala.collection.immutable.BitSet import scala.collection.mutable import scala.util.Random /** * Created by szymonm...
szymonm/subgraphSampling
src/main/scala/pl/szymonmatejczyk/myerson/ValuationFunction.scala
Scala
apache-2.0
5,532
package xyz.hyperreal.bvm import scala.collection.immutable object VMLazyListClass extends VMClass with VMBuilder { val parent: VMClass = VMObjectClass val name: String = "LazyList" val extending: List[VMType] = List(parent) val members: Map[Symbol, VMMember] = Map() override def build(iterator: Iterator[V...
edadma/funl
bvm/src/main/scala/xyz/hyperreal/bvm/VMLazyListClass.scala
Scala
mit
1,175
package com.akkademy import akka.actor.ActorSystem import akka.pattern.ask import akka.util.Timeout import com.akkademy.messages.{GetRequest, SetRequest} import scala.concurrent.duration._ class SClient(remoteAddress: String){ private implicit val timeout = Timeout(2 seconds) private implicit val system = ActorSy...
jasongoodwin/learning-akka
ch2/akkademy-db-client-scala/src/main/scala/com/akkademy/SClient.scala
Scala
apache-2.0
593
object Colors { import scala.Console._ lazy val isANSISupported = { Option(System.getProperty("sbt.log.noformat")).map(_ != "true").orElse { Option(System.getProperty("os.name")) .map(_.toLowerCase) .filter(_.contains("windows")) .map(_ => false) }.getOrElse(true) } def ...
fehmicansaglam/elastic-streams
project/Colors.scala
Scala
apache-2.0
1,011
import scala.annotation.tailrec import scala.{Stream => _, _} /** * Created by philwill on 18/01/15. */ object Chapter5 { sealed trait Stream[+A] { final def headOption: Option[A] = this match { case Empty => None case Cons(h, t) => Some(h()) } // 5.1 final def toList: List[A] = { ...
WillerZ/functional-programming-in-scala
src/main/scala/Chapter5.scala
Scala
unlicense
8,644
package com.twitter.finagle.offload import com.twitter.app.GlobalFlag object queueSize extends GlobalFlag[Int]( Int.MaxValue, "Experimental flag. When offload filter is enabled, its queue is bounded by this value (default is" + "Int.MaxValue or unbounded). Any excess work that can't be offload...
twitter/finagle
finagle-core/src/main/scala/com/twitter/finagle/offload/queueSize.scala
Scala
apache-2.0
540
/* * 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 ...
brad-kaiser/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryRelation.scala
Scala
apache-2.0
6,867
package euler package til70 import euler._ object Euler61 extends EulerProblem { override def result = { val polys = (1000 to 9999) filter isPoly val cyclics = for { p1 <- polys p2 <- polys if p1 % 100 == p2 / 100 p3 <- polys if p2 % 100 == p3 / 100 p4 <- polys if p3 % 100 == p4 / ...
TrustNoOne/Euler
scala/src/main/scala/euler/til70/Euler61.scala
Scala
mit
1,047
object overloaded { def f(x: String): String = x def f[T >: Null](x: T): Int = 1 val x1 = f("abc") val x2 = f(new Integer(1)) val x3 = f(null) val x4: String => String = f val x5: String => Any = f val x6: Any = f _ def g(): Int = 1 def g(x: Int): Int = 2 val y1: Int => Int = g val ...
DarkDimius/dotty
tests/pos/overloaded.scala
Scala
bsd-3-clause
396
/* * Copyright 2013 Maurício Linhares * * Maurício Linhares licenses this file to you 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 ...
dripower/postgresql-async
mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/binary/BinaryRowDecoder.scala
Scala
apache-2.0
2,360
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // Licence: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.fixture import akka.actor.ActorSystem import org.ensime.api._ import org.ensime.indexer.{ EnsimeVFS, SearchService } import scala.concurrent._ import scala.concurrent.dura...
j-mckitrick/ensime-sbt
src/sbt-test/ensime-sbt/ensime-server/core/src/it/scala/org/ensime/fixture/SearchServiceFixture.scala
Scala
apache-2.0
1,509
package filodb.downsampler.chunk import java.time.Instant import java.time.format.DateTimeFormatter import kamon.Kamon import org.apache.spark.SparkConf import org.apache.spark.sql.SparkSession import filodb.coordinator.KamonShutdownHook import filodb.downsampler.DownsamplerContext /** * * Goal: Downsample all ...
filodb/FiloDB
spark-jobs/src/main/scala/filodb/downsampler/chunk/DownsamplerMain.scala
Scala
apache-2.0
7,068
// -*- mode: Scala;-*- // Filename: State.scala // Authors: lgm // Creation: Wed Mar 12 14:09:06 2014 // Copyright: Not supplied // Description: // ------------------------------------------------------------------------ package com.biosimilarity.lif...
leithaus/strategies
src/main/scala/com/biosimilarity/lib/monad/State.scala
Scala
cc0-1.0
1,155
package hbase import org.apache.hadoop.conf.Configuration import org.apache.hadoop.hbase.HBaseConfiguration import org.apache.hadoop.hbase.HConstants._ import Config._ import scala.concurrent.duration._ case class Config private[hbase](props: Map[String, String] = Map.empty) { def put[A](key: Key[A], value: A)(impl...
hamnis/hbase-scala
src/main/scala/hbase/Config.scala
Scala
apache-2.0
3,313
package gitbucket.core.model trait SshKeyComponent { self: Profile => import profile.api._ lazy val SshKeys = TableQuery[SshKeys] class SshKeys(tag: Tag) extends Table[SshKey](tag, "SSH_KEY") { val userName = column[String]("USER_NAME") val sshKeyId = column[Int]("SSH_KEY_ID", O AutoInc) val title ...
gencer/gitbucket
src/main/scala/gitbucket/core/model/SshKey.scala
Scala
apache-2.0
715
/* * Copyright (c) 2017. Yuriy Stul */ package com.stulsoft.ysps.ptuple /** * @author Yuriy Stul */ private object CompareTuple extends App { private def t1(): Unit = { println("==>t1") var t1 = (1.0, 2.0) var t2 = (1.0, 2.0) println(s"t1 == t2 is ${t1 == t2}") println(s"t1.equals(t2) is $...
ysden123/ysps
src/main/scala/com/stulsoft/ysps/ptuple/CompareTuple.scala
Scala
mit
548
package cookbook.finagle import com.twitter.finagle.Http import com.twitter.finagle.http.Request import com.twitter.util.Await.result import io.fintrospect.filters.RequestFilters.AddUserAgent object SSL_Client_Example extends App { val client = Http.client.withTls("api.github.com").newService("api.github.com:443")...
daviddenton/fintrospect
src/test/scala/cookbook/finagle/SSL_Client_Example.scala
Scala
apache-2.0
469
package eventstore package akka class StreamMetadataITest extends TestConnection { "StreamMetadata" should { "return empty content for empty stream" in new TestScope { val content = connection.getStreamMetadata(streamId).await_ content mustEqual Content.Empty } "return empty content for no...
EventStore/EventStore.JVM
client/src/test/scala/eventstore/akka/StreamMetadataITest.scala
Scala
bsd-3-clause
1,406
package ru.pavkin.todoist.api.utils import org.scalatest.prop.Checkers import org.scalatest.{FunSuite, FlatSpec, Matchers} import shapeless.{::, HNil} import shapeless.test.illTyped class NotContainsSpec extends FunSuite with Checkers { test("NotContains") { NotContainsConstraint[HNil, Int] NotContainsCons...
vpavkin/todoist-api-scala
tests/src/test/scala/ru/pavkin/todoist/api/utils/NotContainsSpec.scala
Scala
mit
550
package org.codeswarm.polymap import org.scalatest._ class Examples extends FreeSpec { "Simple person example" in { case class Person(id: Int, name: String) val people = new PolyMap[Person] { val byId = index(_.id) val byName = index(_.name) } people += (Person(1, "Alice"), Person(2,...
chris-martin/polymap
src/test/scala/Examples.scala
Scala
apache-2.0
2,376
package BIDMach.mixins import BIDMat.{Mat,SBMat,CMat,DMat,FMat,IMat,HMat,GMat,GIMat,GSMat,SMat,SDMat} import BIDMat.MatFunctions._ import BIDMat.SciFunctions._ import BIDMach.models._ @SerialVersionUID(100L) abstract class Mixin(val opts:Mixin.Opts = new Mixin.Options) extends Serializable { val options = o...
jamesjia94/BIDMach
src/main/scala/BIDMach/mixins/Mixin.scala
Scala
bsd-3-clause
696
package org.jetbrains.sbt package annotator import com.intellij.lang.annotation.{AnnotationHolder, Annotator} import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil import org.jetbrains.plugins.scala.lang.psi.api.base.ScLiteral import org.jetbrains.plugins.scala.lang.psi.api.expr.{...
double-y/translation-idea-plugin
src/org/jetbrains/sbt/annotator/SbtDependencyAnnotator.scala
Scala
apache-2.0
3,816
package de.unihamburg.vsis.sddf.preprocessing import de.unihamburg.vsis.sddf.reading.Tuple import de.unihamburg.vsis.sddf.visualisation.model.BasicAnalysable class PipePreprocessorTrim(featureId: Int*) extends TraitPipePreprocessor with Serializable { def clean(tuple: Tuple): Tuple = { featureId.foreach(fId =>...
numbnut/sddf
src/main/scala/de/unihamburg/vsis/sddf/preprocessing/PipePreprocessorTrim.scala
Scala
gpl-3.0
534
package org.scala_tools.time import akka.util.{ FiniteDuration, Duration ⇒ AkkaDuration } import java.util.concurrent.TimeUnit import org.joda.time.Duration trait AkkaImplicits { implicit def forceAkkaDuration(builder: DurationBuilder): AkkaDuration = durationForceAkkaDuration(builder.underlying.toStandardDura...
scalatra/oauth2-server
src/main/scala/org/scala_tools/time/AkkaImplicits.scala
Scala
mit
687
/* * 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 ...
spark0001/spark2.1.1
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala
Scala
apache-2.0
10,928
package com.twitter.scalding.reducer_estimation import scala.collection.JavaConverters._ import cascading.flow.FlowStep import cascading.tap.{ Tap, CompositeTap } import cascading.tap.hadoop.Hfs import org.apache.hadoop.mapred.JobConf import org.slf4j.LoggerFactory object InputSizeReducerEstimator { val BytesPerRed...
JiJiTang/scalding
scalding-core/src/main/scala/com/twitter/scalding/reducer_estimation/InputSizeReducerEstimator.scala
Scala
apache-2.0
3,225
/* * Copyright (c) 2014-2020 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...
alexandru/monifu
monix-execution/shared/src/main/scala_2.13+/monix/execution/compat.scala
Scala
apache-2.0
1,366
/* * Copyright (c) 2014-2015 by its authors. Some rights reserved. * See the project homepage at: http://www.monifu.org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://...
virtualirfan/monifu
core/shared/src/main/scala/monifu/concurrent/Scheduler.scala
Scala
apache-2.0
17,476
/* * @author Philip Stutz * * Copyright 2011 University of Zurich * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2....
Tjoene/thesis
Case_Programs/signal-collect/src/main/scala/com/signalcollect/logging/DefaultLogger.scala
Scala
gpl-2.0
1,295
/* * 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/test/scala/io/gatling/core/controller/inject/open/OpenInjectionStepSpec.scala
Scala
apache-2.0
7,996
package com.eevolution.context.dictionary.infrastructure.service.impl import java.util.UUID import com.eevolution.context.dictionary.infrastructure.repository.SchedulerRecipientRepository import com.eevolution.context.dictionary.infrastructure.service.SchedulerRecipientService import com.lightbend.lagom.scaladsl.api....
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/service/impl/SchedulerRecipientServiceImpl.scala
Scala
gpl-3.0
2,142
/* * Copyright (c) 2013 Scott Abernethy. * * 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 program is d...
scott-abernethy/opener-of-the-way
test/model/ClonedSnapshotFactoryTest.scala
Scala
gpl-3.0
4,575
package wow.common.config /** * Makes an enumeration config convertible */ trait ConfigurationSerializableEnumeration { this: Enumeration => /** * Config converter for Value type */ implicit val valueConfigConverter = wow.common.config.deriveEnumValue(this) /** * Config converter for ValueSet...
SKNZ/SpinaciCore
wow/core/src/main/scala/wow/common/config/ConfigurationSerializableEnumeration.scala
Scala
mit
422
/* * 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/accounts/frsse2008/AC22.scala
Scala
apache-2.0
1,120
package application import java.awt.image.BufferedImage import org.joda.time.DateTime class Image(var imageId: Int, var loadTime: Option[DateTime], var image: BufferedImage)
abtv/RemoteViewer
src/main/scala/application/Image.scala
Scala
mit
177
/* * 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 ...
wgpshashank/spark
core/src/main/scala/spark/scheduler/ShuffleMapTask.scala
Scala
apache-2.0
7,038
package uppsat.solver; import java.io.{BufferedReader, FileNotFoundException, InputStreamReader}; import uppsat.globalOptions import uppsat.Timer import uppsat.Timer.TimeoutException class Z3Solver(val name : String = "Z3", val checkSatCmd : String = "(check-sat)") extends SMTSolver { case clas...
uuverifiers/uppsat
src/main/scala/uppsat/solver/Z3Solver.scala
Scala
gpl-3.0
3,727
package org.bluescale.util import org.apache.log4j.Logger; trait LogHelper { val loggerName = this.getClass.getName val logger = Logger.getLogger(loggerName) def log(msg: => String) { logger.info(msg) } def debug(msg: => String) { println(msg) } def error(msg: =>String) { logger.error(msg) } ...
BlueScale/BlueScale
src/main/scala/org/bluescale/util/LogHelper.scala
Scala
agpl-3.0
391
/** * Copyright 2015, deepsense.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 applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
deeplang/src/it/scala/io/deepsense/deeplang/doperations/DataFrameSplitterIntegSpec.scala
Scala
apache-2.0
3,967
/** * 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...
akosiaris/kafka
core/src/main/scala/kafka/log/CleanerConfig.scala
Scala
apache-2.0
2,092
/* Copyright 2014 Janek Bogucki 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...
janekdb/scalacraft-domain
src/test/scala/com/scalacraft/domain/v2/net/unconstrained/PortSpec.scala
Scala
apache-2.0
2,261