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-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...
ccri/geomesa
geomesa-arrow/geomesa-arrow-gt/src/main/scala/org/locationtech/geomesa/arrow/io/ConcatenatedFileWriter.scala
Scala
apache-2.0
2,147
/* * 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 ...
javalovelinux/SparkGroovyScript
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveSerDeSuite.scala
Scala
apache-2.0
1,970
/* * 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 ...
LantaoJin/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/finishAnalysis.scala
Scala
apache-2.0
3,326
/* * 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 ...
tengpeng/spark
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/BasicDriverFeatureStep.scala
Scala
apache-2.0
4,839
abstract class C() { type t; def copy(x: t): t = x; } class D() extends C() { type t = Int; Console.println(copy(1)); }
yusuke2255/dotty
tests/untried/pos/abstract.scala
Scala
bsd-3-clause
129
package com.komanov.junk.throttler import java.util.concurrent.{CountDownLatch, Executors, Semaphore, TimeUnit} import org.specs2.mutable.{After, SpecificationWithJUnit} import scala.concurrent.{ExecutionContext, Future} class ThrottlerTest extends SpecificationWithJUnit { "Throttler" should { "execute seque...
dkomanov/stuff
src/com/komanov/junk/throttler/ThrottlerTest.scala
Scala
mit
2,316
package dotty.tools.backend.jvm import org.junit.Test import org.junit.Assert._ import scala.tools.asm.Opcodes._ class IincTest extends DottyBytecodeTest { import ASMConverters._ @Test def increment = test( """{ | var i = x | i += 1 | i += 54 | i += 127 | i -= 1 | i...
lampepfl/dotty
compiler/test/dotty/tools/backend/jvm/IincTest.scala
Scala
apache-2.0
1,464
package controllers import models._ import play.api.Play.current import play.api.mvc.{Action, Controller} import play.api.libs.json.Json import play.api.Routes import play.api.Logger import play.api.db.slick.DBAction import play.api.db.slick._ import play.api.db.slick.Config.driver.simple._ import play.api.data._ impo...
manvesh/politickle
app/controllers/MessageController.scala
Scala
apache-2.0
887
package io.buoyant.namer import com.twitter.finagle.naming.NameInterpreter import com.twitter.finagle.{Dtab, NameTree, Path, Stack} import io.buoyant.config.Parser import org.scalatest.FunSuite class NamerInitializerTest extends FunSuite { def parse(config: String): NameInterpreter = { val mapper = Parser.obje...
linkerd/linkerd
namer/core/src/test/scala/io/buoyant/namer/NamerInitializerTest.scala
Scala
apache-2.0
1,981
package de.maci.beanmodel.generator.util import java.io.Closeable import de.maci.beanmodel.generator.util.Closeables.consume import org.junit.runner.RunWith import org.mockito.Mockito._ import org.scalatest.junit.JUnitRunner import org.scalatest.mock.MockitoSugar import org.scalatest.{FlatSpec, Matchers} /** * @au...
dangoe/maci-beanmodel
maci-beanmodel-gen/src/test/scala/de/maci/beanmodel/generator/util/Closeables$Test.scala
Scala
apache-2.0
1,125
package akka.persistence.pg.query.javadsl import akka.NotUsed import akka.persistence.query.EventEnvelope import akka.persistence.query.javadsl.ReadJournal import akka.stream.javadsl.Source trait CurrentAllEvents extends ReadJournal { def currentAllEvents(fromRowId: Long, toRowId: Long = Long.MaxValue): Source[Eve...
kwark/akka-persistence-postgresql
modules/akka-persistence-pg/src/main/scala/akka/persistence/pg/query/javadsl/CurrentAllEvents.scala
Scala
mit
344
package com.github.ldaniels528.trifecta.sjs.services import com.github.ldaniels528.trifecta.sjs.models._ import io.scalajs.npm.angularjs.Service import io.scalajs.npm.angularjs.http.{Http, HttpResponse} import scala.scalajs.js /** * Consumer Group Service * @author lawrence.daniels@gmail.com */ class ConsumerG...
ldaniels528/trifecta
app-js/src/main/scala/com/github/ldaniels528/trifecta/sjs/services/ConsumerGroupService.scala
Scala
apache-2.0
1,200
package zzz.akka.avionics import akka.actor.ActorContext import akka.actor.ActorIdentity import akka.actor.FSM import akka.actor.Identify import akka.actor.Props import akka.actor.Terminated import akka.actor.{ Actor, ActorRef, ActorSelection, FSM } import akka.actor.FSM._ import scala.concurrent.duration._ import sca...
jackcviers/learning-akka
src/main/scala/zzz/akka/avionics/FlyingBehavior.scala
Scala
apache-2.0
5,489
/* * Copyright (C) 2005, The OpenURP 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...
openurp/api
qos/src/main/scala/org/openurp/qos/evaluation/model/Questionnaire.scala
Scala
lgpl-3.0
1,381
import collection.mutable.* class TestSet(s0: Set[Int], s1: Set[Int]) { val Iterations = 10 val Range = 100000 val testEachStep = false val Threshold = 20000 val r = new java.util.Random(12345) def test(s: Set[Int], n: Int): Any = { val v = n >> 3 n & 7 match { case 0 | 1 | 2 => s contains v ...
dotty-staging/dotty
tests/run/colltest.scala
Scala
apache-2.0
1,903
/* * Copyright (C) 2014 HMPerson1 <hmperson1@gmail.com> * * 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. * * Th...
HMPerson1/superdoughnuts
src/hmperson1/apps/superdoughnuts/gui/GamePainter.scala
Scala
gpl-3.0
2,351
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 Times(lhs: Expr, rhs: Expr) extends Expr case class LessThan(lhs: Expr, rhs...
epfl-lara/leon
testcases/synthesis/future/Simplifier.scala
Scala
gpl-3.0
10,851
package net.scalytica.symbiotic.mongodb.bson import com.mongodb.DBObject import com.mongodb.casbah.commons.Imports._ import com.mongodb.casbah.commons.MongoDBObject import net.scalytica.symbiotic.api.types.PartyBaseTypes.UserId import net.scalytica.symbiotic.api.types.PersistentType.{ UserStamp, VersionStamp } imp...
kpmeen/symbiotic
symbiotic-mongodb/src/main/scala/net/scalytica/symbiotic/mongodb/bson/BaseBSONConverters.scala
Scala
apache-2.0
1,844
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
goldmedal/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/orc/OrcTable.scala
Scala
apache-2.0
2,586
/* * Copyright (c) 2016. Fengguo (Hugo) Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Detailed co...
arguslab/argus-cit-intellij
src/main/scala/org/argus/cit/intellij/jawa/lang/psi/types/api/TypeSystem.scala
Scala
epl-1.0
1,014
/** * 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 ...
FusionWorks/avocado
avocado-core/src/main/scala/org/bdgenomics/avocado/stats/ScoreCoverage.scala
Scala
apache-2.0
1,705
/* * Copyright 2015 - 2016 Red Bull Media House GmbH <http://www.redbullmediahouse.com> - all rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
RBMHTechnology/eventuate
eventuate-adapter-spark/src/main/scala/com/rbmhtechnology/eventuate/adapter/spark/SparkStreamAdapter.scala
Scala
apache-2.0
9,628
/* * 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/decoder/StringDecoder.scala
Scala
apache-2.0
1,097
/* * Copyright 2018 Analytics Zoo Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
intel-analytics/analytics-zoo
zoo/src/main/scala/com/intel/analytics/zoo/serving/preprocessing/PreProcessing.scala
Scala
apache-2.0
5,854
import scala.reflect.macros.blackbox.Context import language.experimental.macros class ann extends scala.annotation.StaticAnnotation object Macros { def impl(c: Context) = { import c.universe._ // val tpt = Annotated(Apply(Select(New(Ident(newTypeName("ann"))), termNames.CONSTRUCTOR), List()), Ident(newType...
folone/dotty
tests/disabled/macro/run/typed-annotated/Macros_1.scala
Scala
bsd-3-clause
671
package scala.meta.tests package parsers import scala.meta._ class ModSuite extends ParseSuite { test("implicit") { val Defn.Object(List(Mod.Implicit()), _, _) = templStat("implicit object A") val Defn.Class(List(Mod.Implicit()), _, _, _, _) = templStat("implicit class A") val Defn.Object(List(Mod.Impl...
DavidDudson/scalameta
tests/shared/src/test/scala/scala/meta/tests/parsers/ModSuite.scala
Scala
bsd-3-clause
15,579
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. package ducttape.syntax import ducttape.util.AbstractTest import ducttape.syntax.GrammarParser.Parser import org.junit.runn...
jhclark/ducttape
src/test/scala/ducttape/syntax/NameTest.scala
Scala
mpl-2.0
976
package org.jetbrains.plugins.scala package lang package psi package impl package expr import com.intellij.lang.ASTNode import com.intellij.psi.{PsiElement, PsiElementVisitor} import org.jetbrains.plugins.scala.lang.psi.api.ScalaElementVisitor import org.jetbrains.plugins.scala.lang.psi.api.base.patterns.ScBindingPatt...
LPTK/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScUnderscoreSectionImpl.scala
Scala
apache-2.0
5,707
/** * ***************************************************************************** * Copyright 2010 Olaf Sebelin * * This file is part of Verdandi. * * Verdandi 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 Fou...
osebelin/verdandi
src/main/scala/verdandi/ui/SystemTray.scala
Scala
gpl-3.0
4,944
/* * 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/amls-frontend
test/controllers/responsiblepeople/RemoveResponsiblePersonControllerSpec.scala
Scala
apache-2.0
30,284
/* * Copyright (C) 2012 The Regents of The University California. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENS...
vax11780/shark
src/main/scala/shark/KryoRegistrator.scala
Scala
apache-2.0
2,423
package startup import com.typesafe.config.Config import javax.inject._ import play.api.Logger @Singleton class Startup @Inject()(config: Config) { private val logger = Logger(classOf[Startup]) logger.info("System properties") logger.info("-----------------") logger.info("physical_cpu_count: " + System.getP...
zloster/FrameworkBenchmarks
frameworks/Scala/play2-scala/play2-scala-slick/app/startup/Startup.scala
Scala
bsd-3-clause
842
package de.fhwedel.antscout package antnet import extensions.ExtendedDouble._ import org.scalatest.FunSuite import org.scalatest.matchers.ShouldMatchers /** * Created by IntelliJ IDEA. * User: alex * Date: 06.01.12 * Time: 16:37 */ class TrafficModelSampleTest extends FunSuite with ShouldMatchers { test("+...
abertram/AntScout
src/test/scala/de.fhwedel.antscout/antnet/TrafficModelSampleTest.scala
Scala
apache-2.0
1,482
/* * 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 ...
maropu/spark
mllib/src/test/scala/org/apache/spark/ml/feature/LabeledPointSuite.scala
Scala
apache-2.0
1,546
package mimir.parser import fastparse._, MultiLineWhitespace._ import sparsity.parser.{ SQL, StreamParser, Elements => Sparsity, Expression => ExprParser, ErrorMessage } import sparsity.statement.{Statement, Select} import sparsity.expression.{Expression,StringPrimitive} import sparsity.Name import java.sql....
UBOdin/mimir
src/main/scala/mimir/parser/MimirSQL.scala
Scala
apache-2.0
9,562
/* * Copyright 2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicab...
arkadius/scala-phases-chain
src/main/scala/phase/Implicits.scala
Scala
apache-2.0
1,064
package com.advancedspark.serving.prediction.python import scala.collection.JavaConversions._ import scala.collection.JavaConverters.asScalaBufferConverter import scala.collection.JavaConverters.mapAsJavaMapConverter import com.netflix.hystrix.HystrixCommand import com.netflix.hystrix.HystrixCommandGroupKey import co...
Resly/pipeline
prediction.ml/python/src/main/scala/com/advancedspark/serving/prediction/python/PythonSourceCodeEvaluationCommand.scala
Scala
apache-2.0
3,082
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common * Development and Distribution License("CDDL") (colle...
vnkmr7620/kojo
ScalaEditorLite/src/org/netbeans/modules/scala/editor/ScalaKeystrokeHandler.scala
Scala
gpl-3.0
58,216
/* * 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/catalyst/src/main/scala/org/apache/spark/sql/catalyst/dsl/package.scala
Scala
apache-2.0
18,935
package org.pico.statsd.syntax.event import org.pico.disposal.Auto import org.pico.disposal.std.autoCloseable._ import org.pico.event.Bus import org.pico.statsd.impl.{StaticAddressResolution, UdpEmitter} import org.pico.statsd.{NonBlockingStatsdClient, SampleRate} import scala.concurrent.duration.Deadline object Per...
pico-works/pico-statsd
pico-statsd/src/test/scala/org/pico/statsd/syntax/event/PerformanceMain.scala
Scala
mit
1,033
package aima.core.search.local import aima.core.search.Problem import org.scalacheck.{Arbitrary, Gen} import org.specs2.ScalaCheck import org.specs2.mutable.Specification /** * @author Shawn Garner */ class HillClimbingSpec extends Specification with ScalaCheck { import HillClimbingSpec._ implicit val arbXCo...
aimacode/aima-scala
core/src/test/scala/aima/core/search/local/HillClimbingSpec.scala
Scala
mit
1,977
package qrhl.tactic import hashedcomputation.{Hash, HashTag, Hashable} import java.io.PrintWriter import qrhl._ import qrhl.isabellex.RichTerm import hashedcomputation.Implicits._ case class ConseqTac(pre: Option[RichTerm]=None, post:Option[RichTerm]=None) extends Tactic { override def hash: Hash[ConseqTac.this.ty...
dominique-unruh/qrhl-tool
src/main/scala/qrhl/tactic/ConseqTac.scala
Scala
mit
1,014
package com.socrata.datacoordinator.common.soql.sqlreps import java.lang.StringBuilder import java.sql.{PreparedStatement, ResultSet, Types} import com.socrata.datacoordinator.truth.sql.SqlColumnRep import com.socrata.soql.types._ class PhoneRep(val base: String) extends RepUtils with SqlColumnRep[SoQLType, SoQLValu...
socrata-platform/data-coordinator
coordinatorlib/src/main/scala/com/socrata/datacoordinator/common/soql/sqlreps/PhoneRep.scala
Scala
apache-2.0
2,572
case class B(var x: Int) { def succ() { x = x + 1 } } object Test { def main(args: Array[String]) { val b = B(0) b match { case B(x) => //println(x) b.succ() println(x) } } }
felixmulder/scala
test/files/run/t5158.scala
Scala
bsd-3-clause
229
package io.finch import com.twitter.finagle.http.Request import com.twitter.util.{Await, Future} import io.finch.items._ import org.scalatest.{FlatSpec, Matchers} class RequestReaderCompanionSpec extends FlatSpec with Matchers { "The RequestReaderCompanion" should "support a factory method based on a function that...
BenWhitehead/finch
core/src/test/scala/io/finch/RequestReaderCompanionSpec.scala
Scala
apache-2.0
1,341
/* * 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 ...
bOOm-X/spark
mllib/src/main/scala/org/apache/spark/ml/r/LogisticRegressionWrapper.scala
Scala
apache-2.0
6,369
package com.datascience.education.tutorial.lecture4a import scala.util.Random import cats.data.Xor import cats.data.Xor.Left import cats.data.Xor.Right object ResponseList { import RequestResponse._ import TraverseXor._ val rand = new Random val listRequests = (1 to 10).map((i: Int) => Request(i.toString)...
DS12/scala-class
tutorial/src/main/scala/com/datascience/education/tutorial/lecture4a/ResponseList.scala
Scala
cc0-1.0
1,022
package foo import org.scalatest.FlatSpec class FooSpec extends FlatSpec { "foo" should "bar" in { assert(true) } }
xuwei-k/xsbt
sbt-app/src/sbt-test/actions/cross-advanced/foo/src/test/scala/foo/FooSpec.scala
Scala
apache-2.0
125
package com.tdl.study.scala import org.junit.Test class CollectionTestCases { /** list test */ @Test def l1 = { val l1 = List(1, 2, 3, 4) l1.foreach(println) } /** list concat test */ @Test def l2 = { val l1 = List(1, 2, 3, 4) val l2 = List(5, 6, 7, 8) val l = l1 ::: l2 // ๆŠŠๅŽ้ข็š„่ฟžๆŽฅๅˆฐ...
taideli/study-parent
study-scala/src/test/scala/com/tdl/study/scala/CollectionTestCases.scala
Scala
gpl-3.0
2,294
package util import java.io._ import java.net._ import scala.util.parsing.json._ object Util { def uriEncode(text: String) = URLEncoder.encode(text, "UTF-8") def readStream(in0: InputStream) = { val in = new BufferedReader(new InputStreamReader(in0)) try { val result = new StringBuilder() var...
tcoxon/dreamer
src/util/util.scala
Scala
mit
2,036
//package com.ubirch.avatar.core.actor // //import akka.actor.{Actor, ActorLogging, ActorRef} //import com.ubirch.avatar.config.{Config, Const} //import com.ubirch.avatar.core.device.DeviceManager //import com.ubirch.avatar.model.db.device.Device //import com.ubirch.avatar.model.rest.device.DeviceDataRaw //import com.u...
ubirch/ubirch-avatar-service
core/src/main/scala/com/ubirch/avatar/core/actor/MessageChainActor.scala
Scala
apache-2.0
2,098
package com.xebia.incubator.sikuli import org.junit.Assert._ import org.junit._ import java.util.prefs.Preferences class TreAppTest { val treApp=new TreApp(Preferences.userNodeForPackage(getClass())); @Test def stripTestWithComma() { val actual=treApp.strip("Manhattan Food Brands, Inc.") a...
alexkogon/OASIS-Maven
src/test/scala/com/xebia/incubator/sikuli/TreAppTest.scala
Scala
apache-2.0
989
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This file is part of Rudder. * * Rudder is free software: you can redistribute it and/or modify * it under the...
armeniaca/rudder
rudder-core/src/main/scala/com/normation/cfclerk/services/impl/GitTechniqueReader.scala
Scala
gpl-3.0
33,344
package io.vamp.common.http import io.vamp.common.json.PrettyJson import io.vamp.common.notification.NotificationErrorException import org.json4s.Formats import org.json4s.native.Serialization._ import org.yaml.snakeyaml.DumperOptions.FlowStyle import org.yaml.snakeyaml.Yaml import org.yaml.snakeyaml.nodes.Tag import ...
BanzaiMan/vamp-common
src/main/scala/io/vamp/common/http/RestApiBase.scala
Scala
apache-2.0
4,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 ...
milliman/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/ObjectAggregationIterator.scala
Scala
apache-2.0
13,472
package epic.sequences import epic.slab._ import epic.trees.AnnotatedLabel import scala.reflect.ClassTag /** * A Tagger assigns a sequence of Tags to a * * @tparam Tag the type of tag that is annotated * * @author dlwh **/ trait Tagger[Tag] extends StringAnalysisFunction[Sentence with Token, Tag] with (Indexed...
langkilde/epic
src/main/scala/epic/sequences/Tagger.scala
Scala
apache-2.0
1,303
/* * Copyright 2019 ACINQ SAS * * 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...
ACINQ/eclair
eclair-front/src/main/scala/fr/acinq/eclair/router/FrontRouter.scala
Scala
apache-2.0
15,622
/* * 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 ...
lvdongr/spark
core/src/main/scala/org/apache/spark/util/Utils.scala
Scala
apache-2.0
108,913
/* * -โ•ฅโŒโŒโŒโŒ -โŒโŒโŒโŒ- * โ‰กโ•ขโ–‘โ–‘โ–‘โ–‘โŒ\\โ–‘โ–‘โ–‘ฯ† โ•“โ•โ–‘โ–‘โ–‘โ–‘โŒโ–‘โ–‘โ–‘โ–‘โ•ชโ•• * โ•ฃโ•ฌโ–‘โ–‘` `โ–‘โ–‘โ–‘โ•ขโ”˜ ฯ†โ–’โ•ฃโ•ฌโ•โ•œ โ–‘โ–‘โ•ขโ•ฃQ * โ•‘โ•ฃโ•ฌโ–‘โŒ ` โ•คโ–’โ–’โ–’ร…` โ•‘โ•ขโ•ฌโ•ฃ * โ•šโ•ฃโ•ฌโ–‘โŒ โ•”โ–’โ–’โ–’โ–’`ยซโ•• โ•ขโ•ขโ•ฃโ–’ * โ•ซโ•ฌโ–‘โ–‘โ•– .โ–‘ โ•™โ•จโ•จ โ•ฃโ•ฃโ•ฌโ–‘ฯ† โ•“ฯ†โ–‘โ•ขโ•ขร… * โ•™โ•ขโ–‘โ–‘โ–‘โ–‘โŒ"โ–‘โ–‘โ–‘โ•œ โ•™ร…โ–‘โ–‘โ–‘โ–‘โŒโ–‘โ–‘โ–‘โ–‘โ•` * ``หšยฌ โŒ หšหšโŒยด * * ...
Flipkart/connekt
commons/src/main/scala/com/flipkart/connekt/commons/dao/StencilDao.scala
Scala
mit
8,241
package blended.streams.dispatcher.cbe object ExtendedDataElements { def apply(props : Map[String, String]) : String = { props.map { case (k, v) => ExtendedDataElement(k, v).element }.mkString } } case class ExtendedDataElement( name : String, value : String ) { val element : String = s""" ...
woq-blended/blended
blended.streams.dispatcher/src/main/scala/blended/streams/dispatcher/cbe/ExtendedDataElement.scala
Scala
apache-2.0
468
package rescala.core import rescala.util.Globals import scala.language.higherKinds trait Struct { type State[P, S <: Struct] } /** * A reactive value is something that can be reevaluated * * @tparam S Struct type that defines the spore type used to manage the reactive evaluation */ trait Reactive[S <: Stru...
volkc/REScala
Main/shared/src/main/scala/rescala/core/Reactives.scala
Scala
apache-2.0
1,481
/* * 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 ...
maropu/spark
mllib/src/main/scala/org/apache/spark/ml/ann/BreezeUtil.scala
Scala
apache-2.0
2,386
/** * 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 ...
heuermh/bdg-avocado
avocado-core/src/main/scala/org/bdgenomics/avocado/realigner/RealignmentBlock.scala
Scala
apache-2.0
16,844
/* * Copyright 2019 Spotify AB. * * 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 ...
regadas/scio
scio-examples/src/main/scala/com/spotify/scio/examples/MinimalWordCountTypedArguments.scala
Scala
apache-2.0
4,203
import java.time._ import org.specs2.mutable._ import com.getbootstrap.no_carrier.util.RichInstant class RichInstantSpec extends Specification { val utc = ZoneId.of("UTC") val pseudoNow = ZonedDateTime.of(LocalDateTime.of(2015, 3, 17, 1, 2), utc).toInstant implicit val clock = StoppedClock(pseudoNow) val oneDa...
cvrebert/no-carrier
src/test/scala/RichInstantSpec.scala
Scala
mit
1,351
package im.tox.antox.wrapper //Don't change this order (it will break the DB) object ContactType extends Enumeration { type ContactType = Value val NONE = Value(0) val FRIEND = Value(1) val GROUP = Value(2) }
ak-67/Antox
app/src/main/scala/im/tox/antox/wrapper/ContactType.scala
Scala
gpl-3.0
217
/* * Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com> */ package play.api.http.websocket /** * WebSocket close codes */ object CloseCodes { val Regular = 1000 val GoingAway = 1001 val ProtocolError = 1002 val Unacceptable = 1003 val NoStatus = 1005 val ConnectionAbort = 1006 val In...
Shenker93/playframework
framework/src/play/src/main/scala/play/api/http/websocket/CloseCodes.scala
Scala
apache-2.0
494
package mhtml import scalajs.js.Array private[mhtml] object buffer { type Buffer[E] = Array[E] def empty[A]: Buffer[A] = new Array[A] def apply[A](size: Int): Buffer[A] = new Array(size) }
OlivierBlanvillain/monadic-html
monadic-rx/js/src/main/scala/mhtml/buffer.scala
Scala
mit
197
/* * 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 ...
minixalpha/spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/HiveFileFormat.scala
Scala
apache-2.0
6,277
/* * GNU GENERAL PUBLIC LICENSE * Version 2, June 1991 * * Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/> * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Everyone is permitted to copy and distribute verbatim copies * of this license document, ...
P1tt187/fhs-schedule-generator
app/controllers/CEditCourses.scala
Scala
gpl-2.0
25,960
package ohnosequences.scalaguide trait Uh case class Uh1() extends Uh trait Oh case class UhOh1() extends Uh with Oh trait Foo[A] { def bar[B](b: B): Foo[A with B] } object Foo { def baz[A](foo: Foo[A]) = foo bar 1 def baz2[A](foo: Foo[A]): Foo[A with Int] = foo bar[Int] 1 // crashes // def baz3[X](fo...
ohnosequences/scala-guide
src/main/scala/refinementsAndWith.scala
Scala
agpl-3.0
362
package net.totietje.evaluator abstract class AbstractTokenizer[R] extends Tokenizer[R] { /** Transforms an expression into a list of tokens. * @throws net.totietje.evaluator.EvaluationException * If the input string contains an invalid token * @param ex...
totietje/Evaluator
src/main/scala/net/totietje/evaluator/AbstractTokenizer.scala
Scala
apache-2.0
4,338
/*********************************************************************** * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
ddseapy/geomesa
geomesa-index-api/src/test/scala/org/locationtech/geomesa/index/index/AttributeIndexTest.scala
Scala
apache-2.0
10,919
/** * sbt-android-mill - simple-build-tool multi-thread plugin with profiling * * Copyright (c) 2012 Alexey Aksenov ezh@ezh.msk.ru * * 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 * *...
sbt-android-mill/sbt-android-mill
src/main/scala/sbt/android/mill/target/Device.scala
Scala
apache-2.0
2,494
/******************************************************************************* * Copyright (c) 2019. Carl Minden * * 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 ...
carlminden/anathema-roguelike
src/com/anathema_roguelike/entities/characters/perks/actions/targetingstrategies/constraints/SelfOnly.scala
Scala
gpl-3.0
1,182
package com.typesafe.config sealed abstract class MemoryUnit(val prefix:String, val powerOf:Int, val power:Int) { lazy val bytes = BigInt(powerOf).pow(power) } object MemoryUnit { case object BYTES extends MemoryUnit("", 1024, 0) case object KILOBYTES extends MemoryUnit("kilo", 1000, 1) case object MEGABYTES...
unicredit/shocon
facade/shared/src/main/scala/com/typesafe/config/MemoryUnit.scala
Scala
apache-2.0
2,486
/* * 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 ...
jackylk/incubator-carbondata
index/secondary-index/src/test/scala/org/apache/carbondata/spark/testsuite/secondaryindex/TestSecondaryIndexWithIndexOnFirstColumnAndSortColumns.scala
Scala
apache-2.0
2,507
/** soar * * Copyright (c) 2017 Hugo Firth * Email: <me@hugofirth.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 * ...
NewcastleComputingScience/student-outcome-accelerator
glance-core/jvm/src/main/scala/uk/ac/ncl/la/soar/glance/util/Times.scala
Scala
apache-2.0
1,630
package io.flow.dependency.api.lib import util.DependencySpec class ProjectPluginsSbtScalaParserSpec extends DependencySpec { lazy val projectSummary = makeProjectSummary() "empty" should { val contents = """ // Comment to get more information during initialization logLevel := Level.Warn """ "parse de...
flowcommerce/dependency
api/test/lib/ProjectPluginsSbtScalaParserSpec.scala
Scala
mit
1,918
package net.fluffy8x.thsch.base import org.lwjgl.opengl.GL11 import java.nio.FloatBuffer /** * A color plus alpha. 8 bytes per channel, and laid out identically * to AWT's version. We choose not to use AWT's version since it * is an ordinary class, while this one extends {@link AnyVal}, reducing * the overhead of...
bluebear94/proj-youmu
src/main/scala/net/fluffy8x/thsch/base/Color.scala
Scala
apache-2.0
1,092
package org.skycastle.util import _root_.org.skycastle.entity.entitycontainer.EntityContainer object SimpleProperties { def apply( elements: (Symbol, Any)* ) : SimpleProperties = new SimpleProperties( Map.empty ++ elements ) } /** * A class that provides simple mutable Property support. * * Doesn't separatel...
weimingtom/skycastle
src/main/scala/org/skycastle/util/SimpleProperties.scala
Scala
gpl-2.0
1,013
/* Copyright 2016 ScalABM 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 distribu...
EconomicSL/agora
src/main/scala/org/economicsl/agora/markets/auctions/matching/FindMostPreferredAcceptableOrder.scala
Scala
apache-2.0
2,177
package com.nischal.base import play.api.libs.json.{JsValue, Json, Writes} import scalikejdbc._ /** * Created by nbasnet on 6/4/17. */ abstract class BaseModelCompanion[MT] extends SQLSyntaxSupport[MT] { type SQLSyntaxT[MT] = scalikejdbc.QuerySQLSyntaxProvider[scalikejdbc.SQLSyntaxSupport[MT], MT] def defaul...
nischalbasnet/play-scalikejdbc
app/com/nischal/base/BaseModelCompanion.scala
Scala
apache-2.0
710
object Test { val num = implicitly[Integral[Int]] val ops = num.mkOrderingOps ops(9) < 10 }
lampepfl/dotty
tests/pos/ops.scala
Scala
apache-2.0
100
/** * Copyright (c) 2011 ScalaStuff.org (joint venture of Alexander Dvorkovyy and Ruud Diterwich) * * 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....
scalastuff/scalabeans
src/main/scala/org/scalastuff/scalabeans/types/ScalaType.scala
Scala
apache-2.0
19,339
package com.kolor.docker.api.json import play.api.libs.json._ import com.kolor.docker.api.entities._ import play.api.libs.functional.syntax._ import org.joda.time.DateTime class ISODateTimeString(string: String) { def isoDateTime: DateTime = try { org.joda.time.format.ISODateTimeFormat.dateTime().parseDateTime(...
tldeti/reactive-docker
src/main/scala/com/kolor/docker/api/json/Formats.scala
Scala
mit
20,875
/* * Copyright (c) 2014 Robert Conrad - All Rights Reserved. * Unauthorized copying of this file, via any medium is strictly prohibited. * This file is proprietary and confidential. * Last modified by rconrad, 12/24/14 4:37 PM */ package base.entity.model import java.net.{ MalformedURLException, URL } import ba...
robconrad/base-api
project-entity/src/main/scala/base/entity/model/Url.scala
Scala
mit
1,444
/** Copyright 2015 TappingStone, 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 ...
alex9311/PredictionIO
core/src/main/scala/org/apache/predictionio/controller/java/PJavaAlgorithm.scala
Scala
apache-2.0
1,053
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
tkunicki/geomesa
geomesa-convert/geomesa-convert-avro/src/test/scala/org/locationtech/geomesa/convert/avro/AvroTransformersTest.scala
Scala
apache-2.0
1,446
package io.github.mandar2812.dynaml.examples import java.text.{DateFormat, SimpleDateFormat} import breeze.linalg.{DenseMatrix, DenseVector} import io.github.mandar2812.dynaml.evaluation.RegressionMetrics import io.github.mandar2812.dynaml.kernels._ import io.github.mandar2812.dynaml.models.gp.{GPRegression, GPTimeSe...
sisirkoppaka/bayeslearn
src/main/scala/io/github/mandar2812/dynaml/examples/TestOmniTS.scala
Scala
apache-2.0
6,475
package net.liftmodules.ng trait AngularProperties { val ajaxFn = "liftAjax.lift_ajaxHandler" val enhancedAjax = true }
joescii/lift-ng
src/main/scala/net/liftmodules/ng/Angular_2.x.scala
Scala
apache-2.0
125
/* * Copyright 2013 Sanjin Sehic * * 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...
tuwiendsg/CAPA
core/src/scala/util/Value.scala
Scala
apache-2.0
1,374
/* * Copyright (c) 2014-2017 by its authors. Some rights reserved. * 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.a...
monix/monix-nio
src/main/scala/monix/nio/file/AsyncFileChannel.scala
Scala
apache-2.0
9,222
package com.virdis.learningkafka import java.util.UUID import com.virdis.producer.{PConfig, KafkaProducer} import kafka.message.DefaultCompressionCodec /** * Created by sandeep on 6/14/15. */ object MyTopicProducer extends KafkaProducer { override val config = new PConfig { override def brokerList: String ...
virdis/learning-kafka
src/main/scala/MyTopicProducer.scala
Scala
gpl-2.0
700
/** * 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 ...
massie/adam
adam-core/src/test/scala/org/bdgenomics/adam/rdd/fragment/FragmentRDDSuite.scala
Scala
apache-2.0
8,812
/* * 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 ...
h2oai/sparkling-water
ml/src/main/scala/ai/h2o/sparkling/ml/params/NullableMatrixArrayParam.scala
Scala
apache-2.0
3,012
package me.pennekamp.qtables import java.io.Closeable import javax.sql.DataSource import io.getquill.{PostgresJdbcContext, SnakeCase} /** * A global Quill context that will obviously not work at runtime, but for the sake of the tests * we are only interested in the compilation results right now. */ object Quil...
marcopennekamp/qtables
src/test/scala/me/pennekamp/qtables/QuillContext.scala
Scala
mit
401
/* * Copyright 2015 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
jasimmk/atlas
atlas-core/src/main/scala/com/netflix/atlas/core/model/DefaultSettings.scala
Scala
apache-2.0
899
/* * 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 ...
aosagie/spark
mllib/src/main/scala/org/apache/spark/ml/clustering/GaussianMixture.scala
Scala
apache-2.0
25,717
object Test { import scala.collection.mutable._ List(1,2,3,4,5).scanRight(0)(_+_) def main(args: Array[String]): Unit = { } }
yusuke2255/dotty
tests/untried/neg/migration28.scala
Scala
bsd-3-clause
137