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 2016 Rackspace US, 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 applica...
rackerlabs/api-checker
core/src/main/scala/com/rackspace/com/papi/components/checker/step/SetHeaderAlways.scala
Scala
apache-2.0
1,516
package ee.cone.c4gate.deep_session import ee.cone.c4actor.Types.SrcId import ee.cone.c4actor._ import ee.cone.c4di.{CreateTypeKey, c4, c4multi} import ee.cone.c4gate.{CurrentSessionKey, KeyGenerator, SessionAttr, SessionAttrAccessFactory, SessionAttrLens} import ee.cone.c4gate.SessionDataProtocol.{N_RawDataNode, U_Ra...
conecenter/c4proto
extra_lib/src/main/scala/ee/cone/c4gate/deep_session/DeepSessionAttrImpl.scala
Scala
apache-2.0
10,314
package models.account import java.util.UUID import org.joda.time.DateTime import services.MailToken import scala.concurrent.Future case class MailTokenUser(id: String, email: String, expirationTime: DateTime, isSignUp: Boolean) extends MailToken object MailTokenUser { def apply(email: String, isSignUp: Boolean): ...
asciiu/halo
arbiter/app/models/account/MailTokenUser.scala
Scala
mit
832
package org.thinkmeta.smp.playground import org.thinkmeta.smp.core.{HostedLisp, ASTShow} /** * @author Hossam Karim */ object MacrosPlayground extends App { import language.reflectiveCalls val m1 = ASTShow.showModule { """ module A { using scala::math::_ module B { using A::* ...
hkarim/macros-playground
playground/src/main/scala/org/thinkmeta/smp/playground/MacrosPlayground.scala
Scala
apache-2.0
3,758
package com.twitter.finagle.thrift import com.twitter.finagle.{Service, SimpleFilter, TransportException} import com.twitter.util.{Time, Future, Try, Return, Throw} import scala.util.Random /** * Indicates that a Thrift response did not have the correct sequence * ID according to that assigned by [[com.twitter.fina...
koshelev/finagle
finagle-thrift/src/main/scala/com/twitter/finagle/thrift/SeqIdFilter.scala
Scala
apache-2.0
3,346
/** * Copyright (C) 2013 Carnegie Mellon University * * 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 appl...
twmarshall/tdb
core/src/main/scala/tdb/examples/Algorithm.scala
Scala
apache-2.0
6,356
/* * 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 ...
apache/flink
flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/ConnectedStreams.scala
Scala
apache-2.0
13,889
package me.hawkweisman.util.tests import me.hawkweisman.math.linear.{Linear, SequentialAlgebra, ParallelAlgebra} import org.scalameter.api._ import scala.util.Random /** * Performance tests comparing the parallel and sequential linear algebra * implementations. * * Created by hawk on 9/14/15. */ abstract class ...
hawkw/scala-common
src/bench/scala/me/hawkweisman/bench/LinearBenchmarks.scala
Scala
mit
1,914
package net.manub.embeddedkafka.schemaregistry import net.manub.embeddedkafka.EmbeddedKafkaSpecSupport class EmbeddedKafkaWithSchemaRegistryTraitSpec extends EmbeddedKafkaSpecSupport with EmbeddedKafkaWithSchemaRegistry { "the withRunningKafka method" should { "start a Schema Registry server on a speci...
manub/scalatest-embedded-kafka
schema-registry/src/test/scala/net/manub/embeddedkafka/schemaregistry/EmbeddedKafkaWithSchemaRegistryTraitSpec.scala
Scala
mit
1,730
/* * OpenVC, an open source VHDL compiler/simulator * Copyright (C) 2010 Christian Reisinger * * 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 ...
chrreisinger/OpenVC
src/test/scala/at/jku/ssw/tests/GenericTest.scala
Scala
gpl-3.0
3,525
/* * Ported from https://github.com/junit-team/junit */ package org.junit import java.lang.annotation._ import scala.scalajs.js.annotation.JSExport @Retention(RetentionPolicy.RUNTIME) @Target(Array(ElementType.METHOD)) @JSExport case class Test(expected: Class[_ <: Throwable] = classOf[Test.None], timeout: Lon...
nicolasstucki/scala-js-junit
runtime/src/main/scala/org/junit/Test.scala
Scala
bsd-3-clause
534
package com.github.diegopacheco.scala3.playground.features // Same effect as having trait and object implementation - but with much less typing. object Logarithms: opaque type Logarithm = Double object Logarithm: def apply(d:Double):Logarithm = math.log(d) extension (x:Logarithm) def toDouble:Double = ...
diegopacheco/scala-playground
scala-3-playground/scala-3-playground/src/main/scala/com/github/diegopacheco/scala3/playground/features/OpaqueTypeMain.scala
Scala
unlicense
730
/** * Copyright (c) 2002-2012 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundati...
dksaputra/community
cypher/src/test/scala/org/neo4j/cypher/docgen/DocumentingTestBase.scala
Scala
gpl-3.0
7,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 ...
NathanSegerlind/incubator-spot
spot-ml/src/test/scala/org/apache/spot/proxy/ProxyWordCreationTest.scala
Scala
apache-2.0
8,100
/* * Copyright (c) 2015-16 Miles Sabin * * 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...
isaka/shapeless
core/src/main/scala/shapeless/test/typetrace.scala
Scala
apache-2.0
1,216
package view import service.RequestCache import twirl.api.Html import util.StringUtil trait AvatarImageProvider { self: RequestCache => /** * Returns &lt;img&gt; which displays the avatar icon. * Looks up Gravatar if avatar icon has not been configured in user settings. */ protected def getAvatarImageHt...
emag/gitbucket
src/main/scala/view/AvatarImageProvider.scala
Scala
apache-2.0
1,801
package com.heaton.maven import java.io.File import java.net.URI import java.nio.charset.Charset import scala.io.Source object Converter { case class Dependency(groupId: String, name: String, version: String) { private def makeXmlPattern:String = s"""<groupId>.*?</groupId>(\\\\s*)<artifactId>$name-$version</a...
heaton/pom-convertor
src/main/scala/com/heaton/maven/Converter.scala
Scala
mit
1,649
/** * Copyright (C) 2014 VanillaSource * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This...
vanillasource/wicket-gatling
src/main/scala/com/vanillasource/wicket/gatling/Predef.scala
Scala
lgpl-3.0
4,796
/* * 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 ...
MLnick/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala
Scala
apache-2.0
55,347
/*******************************************************************************/ /* */ /* Copyright (C) 2017 by Max Lv <max.c.lv@gmail.com> */ /* Copyright (C) 2017 by Mygod Studio <contact-shadowsocks-android@mygod....
hangim/shadowsocks-android
mobile/src/main/scala/com/github/shadowsocks/ProfilesFragment.scala
Scala
gpl-3.0
16,310
package skinny.orm.feature import skinny.orm._ import skinny.orm.feature.associations._ import skinny.orm.feature.includes.IncludesQueryRepository import scalikejdbc._ /** * Provides #joins APIs. * * NOTE: CRUDFeature has copy implementation from this trait. */ trait NoIdJoinsFeature[Entity] extends SkinnyMap...
seratch/skinny-framework
orm/src/main/scala/skinny/orm/feature/NoIdJoinsFeature.scala
Scala
mit
2,276
/*********************************************************************** * Copyright (c) 2013-2019 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...
elahrvivaz/geomesa
geomesa-kudu/geomesa-kudu-datastore/src/main/scala/org/locationtech/geomesa/kudu/data/KuduWritableFeature.scala
Scala
apache-2.0
1,621
package utils import scala.util.{Try, Success, Failure} import scala.collection.JavaConversions._ import scalax.io.Resource import scalax.io.JavaConverters._ import resource._ import java.io.InputStream import java.util.zip.GZIPInputStream import org.apache.commons.net.ftp._ import org.joda.time.DateTime import o...
tanimoto/weather
app/utils/ISD.scala
Scala
mit
5,581
package org.dsa.iot.ignition.core import org.dsa.iot.dslink.link.Requester import org.dsa.iot.dslink.node.value.Value import org.dsa.iot.rx.AbstractRxBlock import org.dsa.iot.scala.{ DSAHelper, Having } /** * Reads values from a DSA node. */ class DSAInput(implicit requester: Requester) extends AbstractRxBlock[Valu...
IOT-DSA/dslink-scala-ignition
src/main/scala/org/dsa/iot/ignition/core/DSAInput.scala
Scala
apache-2.0
893
/* * 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 ...
chgm1006/spark-app
src/main/scala/org/apache/spark/examples/mllib/MovieLensALS.scala
Scala
apache-2.0
8,148
package trivial.rest import scala.reflect.ClassTag // TODO - CAS - 23/04/15 - Introduces boilerplate. Looking for ways to remove it. trait Resource[T <: Resource[T]] { def id: Option[String] // To return T, this has to be a self-recursive type. We can now call aCurrency.withId("x") and get a Currency back, not j...
agmenc/trivial-rest
src/main/scala/trivial/rest/Resource.scala
Scala
mit
821
package operation import model.{ Article, Tag } import scalikejdbc.DBSession import view_model._ /** * The operation for search articles. */ sealed trait SearchOperation { val PAGE_SIZE: Int = 20 def search(q: String, pageNo: Int, pageSize: Int = PAGE_SIZE)(implicit s: DBSession = Tag.autoSession): SearchResul...
atware/sharedocs
src/main/scala/operation/SearchOperation.scala
Scala
mit
879
package com.sksamuel.elastic4s.reindex import com.sksamuel.elastic4s.{Index, Indexes} import com.sksamuel.exts.OptionImplicits._ trait ReindexApi { def reindex(source: String, target: Index): ReindexRequest = reindex(Indexes(source), target) def reindex(source: Indexes, target: Index): ReindexRequest = ReindexR...
Tecsisa/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/reindex/ReindexApi.scala
Scala
apache-2.0
871
package geotrellis.transit.loader.osm import geotrellis.network._ trait WayInfo { val wayId:String def isWalkable:Boolean def walkSpeed:Double val isBikable:Boolean val bikeSpeed:Double private var _direction:WayDirection = BothWays def direction = _direction val tags:Map[String,String] } abstrac...
flibbertigibbet/open-transit-indicators
scala/geotrellis-transit/src/main/scala/geotrellis/transit/loader/osm/OsmWayInfo.scala
Scala
gpl-3.0
4,239
package org.scalatra import org.scalatra.test.scalatest.ScalatraFunSuite class ErrorHandlerTest extends ScalatraFunSuite { trait TestException extends RuntimeException case class Exception1() extends TestException case class Exception2() extends TestException case class Exception3() extends TestException c...
lightvector/scalatra
core/src/test/scala/org/scalatra/ErrorHandlerTest.scala
Scala
bsd-2-clause
1,600
package infrastructure.akka import akka.actor.ActorSystem import scala.reflect.ClassTag import akka.serialization.SerializationExtension trait SerializationSupport { implicit protected def system: ActorSystem def serialize(serializable: AnyRef)(implicit system: ActorSystem) = { val serialization = Serializat...
pawelkaczor/ddd-leaven-akka
src/main/scala/infrastructure/akka/SerializationSupport.scala
Scala
mit
810
package io.bartholomews.spotify4s.client import io.bartholomews.fsclient.core.FsClient import io.bartholomews.fsclient.core.config.UserAgent import io.bartholomews.fsclient.core.oauth.v2.OAuthV2.{AccessToken, RefreshToken} import io.bartholomews.fsclient.core.oauth.v2.{ClientId, ClientPassword, ClientSecret} import io...
bartholomews/spotify-scala-client
modules/circe/src/test/scala/io/bartholomews/spotify4s/client/ClientData.scala
Scala
mit
2,237
package scala package reflect package runtime import scala.collection.mutable import scala.reflect.internal.Flags._ private[reflect] trait SymbolLoaders { self: SymbolTable => /** The standard completer for top-level classes * @param clazz The top-level class * @param module The companion object of `cla...
felixmulder/scala
src/reflect/scala/reflect/runtime/SymbolLoaders.scala
Scala
bsd-3-clause
8,732
/* * Copyright (c) 2015 Elder Research, 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...
ElderResearch/monadic-jfx
src/test/scala/eri/viz/gui/jfx/monadic/MonadSyntaxTests.scala
Scala
apache-2.0
1,057
package me.flygare.utils import _root_.me.flygare.models._ import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport import spray.json.DefaultJsonProtocol object JsonSupport extends DefaultJsonProtocol with SprayJsonSupport { implicit val personFormat = jsonFormat2(Person) implicit val personDB = jsonForma...
flygare/Minopt
PersonService/src/main/scala/me/flygare/utils/JsonSupport.scala
Scala
mit
335
package skuber.ext import skuber.ResourceSpecification.{Names, Scope} import skuber.{LabelSelector, NonCoreResourceSpecification, ObjectMeta, ObjectResource, Pod, ResourceDefinition} /** * @author Cory Klein */ case class DaemonSet(val kind: String ="DaemonSet", override val apiVersion: Strin...
doriordan/skuber
client/src/main/scala/skuber/ext/DaemonSet.scala
Scala
apache-2.0
2,099
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
PredictionIO/PredictionIO
examples/scala-parallel-classification/reading-custom-properties/src/main/scala/PrecisionEvaluation.scala
Scala
apache-2.0
1,715
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.jdk import java...
scala/scala
src/library/scala/jdk/OptionConverters.scala
Scala
apache-2.0
5,298
/* * 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 ...
jatin9896/incubator-carbondata
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/allqueries/MeasureOnlyTableTestCases.scala
Scala
apache-2.0
15,279
package strawman.collections import Predef.{augmentString as _, wrapString as _, *} import scala.reflect.ClassTag import annotation.unchecked.uncheckedVariance import annotation.tailrec /** A strawman architecture for new collections. It contains some * example collection classes and methods with the intent to expo...
dotty-staging/dotty
tests/pos-special/strawman-collections/CollectionStrawMan5.scala
Scala
apache-2.0
17,972
/* * 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-walkthroughs/flink-walkthrough-table-scala/src/main/resources/archetype-resources/src/main/scala/SpendReport.scala
Scala
apache-2.0
1,442
package org.unisonweb.util import org.unisonweb.EasyTest._ object TextTests { lazy val tests = suite("Text")( test("Buffer.apply") { implicit T => (0 until 100) foreach { n => val buf = Text.emptyBlock val codepoints = replicate(n)(codepoint) (0 until n) foreach { i => b...
paulp/unison
runtime-jvm/main/src/test/scala/util/TextTests.scala
Scala
mit
2,400
package com.thecookiezen import akka.NotUsed import akka.actor.{ActorSystem, Props} import akka.http.scaladsl.Http import akka.pattern.ask import akka.stream.ActorMaterializer import akka.stream.scaladsl.{Sink, Source} import akka.util.{ByteString, Timeout} import com.thecookiezen.business.containers.control.{Cluster,...
nikom1337/ClusterActor
src/main/scala/com/thecookiezen/Bootstrap.scala
Scala
apache-2.0
1,757
package ee.cone.c4actor import com.typesafe.scalalogging.LazyLogging import ee.cone.c4actor.ProtoConflict.D_ConflictOrig import ee.cone.c4actor.QProtocol.S_Firstborn import ee.cone.c4actor.Types.SrcId import ee.cone.c4assemble.Types.{Each, Values} import ee.cone.c4assemble.{Assemble, Single, assemble} import ee.cone.c...
conecenter/c4proto
extra_examples/src/main/scala/ee/cone/c4actor/OrigConflictTest.scala
Scala
apache-2.0
2,481
// // SyncChannelType.scala -- Scala object SyncChannelType // Project OrcScala // // $Id: SyncChannelType.scala 2933 2011-12-15 16:26:02Z jthywissen $ // // Created by dkitchin on Dec 1, 2010. // // Copyright (c) 2011 The University of Texas at Austin. All rights reserved. // // Use and redistribution of this file is ...
laurenyew/cOrcS
src/orc/lib/state/types/SyncChannelType.scala
Scala
bsd-3-clause
1,019
/* * Copyright 2001-2013 Artima, 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 agre...
SRGOM/scalatest
scalatest-test/src/test/scala/org/scalatest/ShouldBeWritableExplicitSpec.scala
Scala
apache-2.0
7,213
/* * 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-local/src/main/scala/org/apache/spark/ml/linalg/Vectors.scala
Scala
apache-2.0
24,086
/* * #%L * Maven plugin for ooxoo to generate sources from modeling * %% * Copyright (C) 2006 - 2017 Open Design Flow * %% * 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, ...
richnou/ooxoo-core
maven-ooxoo-plugin/src/main/scala/com/idyria/ooxoo/maven/GenerateSourcesMojo.scala
Scala
agpl-3.0
12,068
package kalmanb.akka.push import scala.util.Failure import scala.util.Success import akka.actor.Actor import akka.actor.ActorLogging import akka.actor.ActorRef import akka.pattern._ import akka.util.Timeout object WebServer { case class Request(url: String) } class WebServer(db: ActorRef, processor: ActorRef) exte...
kalmanb/akka-examples
src/main/scala/kalmanb/akka/push/WebServer.scala
Scala
apache-2.0
1,313
package com.nulabinc.backlog.r2b.exporter.convert import javax.inject.Inject import com.nulabinc.backlog.migration.common.convert.Writes import com.nulabinc.backlog.migration.common.domain.BacklogIssueCategory import com.taskadapter.redmineapi.bean.IssueCategory /** * @author * uchida */ private[exporter] class...
nulab/BacklogMigration-Redmine
src/main/scala/com/nulabinc/backlog/r2b/exporter/convert/IssueCategoriesWrites.scala
Scala
mit
752
package org.qcri.rheem.api.util import org.qcri.rheem.core.types.DataSetType /** * This class waits for a [[org.qcri.rheem.core.types.DataSetType]] to be set and verifies that there are no * two different sets. */ class TypeTrap { /** * Stores the [[DataSetType]]. */ private var _dataSetType: DataS...
jonasrk/rheem
rheem-api/src/main/scala/org/qcri/rheem/api/util/TypeTrap.scala
Scala
apache-2.0
1,341
/** * Copyright (C) 2012-2014 Kaj Magnus Lindberg (born 1979) * * 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) any later vers...
debiki/debiki-server-old
modules/debiki-core/src/main/scala/com/debiki/core/PostActionPayload.scala
Scala
agpl-3.0
8,176
/* * 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 ...
Intel-bigdata/OAP
oap-native-sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/OffsetSeqLogSuite.scala
Scala
apache-2.0
6,511
package com.metl.data import org.scalatest._ import org.scalatest.FunSuite import org.scalatest.BeforeAndAfter import org.scalatest.matchers.{ShouldMatchers, HavePropertyMatcher, HavePropertyMatchResult} import org.scalatest.prop.GeneratorDrivenPropertyChecks import org.scalatest.OptionValues._ import net.liftweb.uti...
StackableRegiments/analyticalmetlx
src/test/scala/com/metl/data/MeTLTextSuite.scala
Scala
apache-2.0
3,793
package libs import java.io._ class Logger(filepath: String) { val startTime = System.currentTimeMillis() val logfile = new PrintWriter(new File(filepath)) def log(message: String, i: Int = -1) { val elapsedTime = 1F * (System.currentTimeMillis() - startTime) / 1000 if (i == -1) { logfile.write(e...
amplab/SparkNet
src/main/scala/libs/Logger.scala
Scala
mit
500
package org.jetbrains.plugins.scala package lang package parser package parsing package expressions import base.Import import com.intellij.lang.PsiBuilder import com.intellij.psi.tree.TokenSet import lexer.ScalaTokenTypes import top.TmplDef import com.intellij.lang.PsiBuilder.Marker import statements.{EmptyDcl, Dcl, D...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/parser/parsing/expressions/BlockStat.scala
Scala
apache-2.0
2,224
package com.gmail.at.pukanito.model.graph import scala.collection.SeqLike import scala.collection.mutable.ArrayBuffer import scala.collection.mutable.Builder /** * Representation of a relative or absolute path through GraphItems. * * A path is a sequence of NodeKeys. */ abstract class Path extends Seq[NodeKey] wi...
pukanito/bigdatanalysis
src/main/scala/com/gmail/at/pukanito/model/graph/Path.scala
Scala
gpl-3.0
3,126
/* * 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 ...
eyalbenivri/amaterasu
common/src/main/scala/org/apache/ameterasu/common/dataobjects/Export.scala
Scala
apache-2.0
901
/* * 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 ...
adrian-ionescu/apache-spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
Scala
apache-2.0
40,282
/** * Copyright 2009 Latterfrosken Software Development Limited * * This file is part of Lafros GUI-Alerts. * * Lafros GUI-Alerts 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 th...
robcd/lafros-gui
lafros-gui-alerts/src/main/scala/com/lafros/gui/alerts/TogPanel.scala
Scala
gpl-3.0
7,115
package com.github.mdr.mash.editor import com.github.mdr.mash.editor.SyntaxSelection.expandSelection import org.scalatest.{ FlatSpec, Matchers } import com.github.mdr.mash.repl.LineBufferTestHelper.lineBuffer class SyntaxSelectionTest extends FlatSpec with Matchers { "iden▶tifier" ==> "▷identifier▶" "foo + ba▶r...
mdr/mash
src/test/scala/com/github/mdr/mash/editor/SyntaxSelectionTest.scala
Scala
mit
1,613
package dao.helper import database.UniqueTable import models.UniqueDbEntity import org.joda.time.DateTime import slick.jdbc.PostgresProfile.api._ import utils.date.DateTimeOps.DateTimeConverter import scala.concurrent.Future trait Updated[T <: Table[DbModel] with UniqueTable, DbModel <: UniqueDbEntity] { self: Cor...
THK-ADV/lwm-reloaded
app/dao/helper/Updated.scala
Scala
mit
1,406
package models import reactivemongo.bson._ import play.api.libs.json._ import play.api.libs.json.Json._ import play.api.libs.json.Writes._ object Formats { val objectIDRegExFormat = "^[0-9a-fA-F]{24}$".r def isObjectIDValid(input: String): Boolean = (objectIDRegExFormat findFirstIn input).nonEmpty implicit...
luanlv/website
app/models/Formats.scala
Scala
apache-2.0
856
package at.forsyte.apalache.tla.bmcmt.rules.aux import at.forsyte.apalache.tla.bmcmt.smt.SolverContext import at.forsyte.apalache.tla.bmcmt.{SymbState, SymbStateDecoder, SymbStateRewriter} import at.forsyte.apalache.tla.lir.TlaEx /** * An abstract version of an oracle that is used e.g. in CherryPick. * * @autho...
konnov/dach
tla-bmcmt/src/main/scala/at/forsyte/apalache/tla/bmcmt/rules/aux/Oracle.scala
Scala
apache-2.0
1,467
///* // * DARWIN Genetic Algorithms Framework Project. // * Copyright (c) 2003, 2005, 2007, 2009, 2011, 2016, 2017. Phasmid Software // * // * Originally, developed in Java by Rubecula Software, LLC and hosted by SourceForge. // * Converted to Scala by Phasmid Software and hosted by github at https://github.com/rchilly...
rchillyard/Darwin
src/main/scala/com/phasmid/darwin/evolution/OldColony.scala
Scala
gpl-3.0
8,049
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013-2015, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
doron123/scala-js
test-suite/src/test/scala/org/scalajs/testsuite/library/UseAsTest.scala
Scala
bsd-3-clause
12,580
import sbt._ import Keys._ import Status.{isSnapshot, publishStatus} import org.apache.ivy.util.url.CredentialsStore object Release extends Build { lazy val publishRelease = TaskKey[Unit]("publish-release") lazy val publishAllArtifacts = TaskKey[Unit]("publish-all-artifacts") lazy val launcherRemotePath = Setti...
ornicar/xsbt
project/Release.scala
Scala
bsd-3-clause
6,244
/* * 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 ...
shaneknapp/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statsEstimation/SizeInBytesOnlyStatsPlanVisitor.scala
Scala
apache-2.0
6,762
/* * 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 * distrib...
fusepoolP3/p3-silk
silk-workbench-outdated/src/main/scala/de/fuberlin/wiwiss/silk/workbench/lift/util/LinkageRuleTree.scala
Scala
apache-2.0
2,293
// Test: Cuttle timeseries with many jobs! // This a very simple cuttle project using the time series scheduler // to execute a lot of jobs to do load tests package com.criteo.cuttle.examples import com.criteo.cuttle._ import com.criteo.cuttle.timeseries._ import java.time.ZoneOffset.UTC import java.time._ import sc...
criteo/cuttle
examples/src/test/scala/com/criteo/cuttle/examples/TestTimeSeriesWithManyJobs.scala
Scala
apache-2.0
1,394
package app import skinny.test.SkinnyFlatSpec class HelloSpec extends SkinnyFlatSpec { addFilter(app.Hello, "/*") addFilter(app.AsyncHello, "/*") it should "work fine with GET Requests" in { get("/hello") { status should equal(200) body should equal("Hello, Anonymous") } get("/hello?nam...
holycattle/skinny-framework
skinny-engine-blank-app/src/test/scala/app/HelloSpec.scala
Scala
mit
1,622
package testhelpers import commons.repositories.ActionRunner import play.api.Application import play.api.inject.guice.GuiceApplicationBuilder import play.api.routing._ import slick.dbio.DBIO import slick.jdbc.JdbcBackend import scala.concurrent.duration.Duration import scala.concurrent.{Await, Future} object TestUti...
Dasiu/play-framework-test-project
test/testhelpers/TestUtils.scala
Scala
mit
1,204
package net.badgerclaw.dropwizard.inject.option import javax.inject.Singleton import javax.ws.rs.ext.ParamConverterProvider import org.glassfish.hk2.utilities.binding.AbstractBinder class OptionParamBinder extends AbstractBinder { override def configure(): Unit = bind(classOf[OptionParamConverterProvider]).to(...
jostly/scala-dropwizard
src/main/scala/net/badgerclaw/dropwizard/inject/option/OptionParamBinder.scala
Scala
mit
378
package ru.maizy.dev.heartbeat /** * Copyright (c) Nikita Kovaliov, maizy.ru, 2015 * See LICENSE.txt for details. */ object Roles extends Enumeration with utils.EnumerationMap { type Role = Value val No = Value("no") val Stat = Value("stat") val Frontend = Value("frontend") } object Modes extends Enumerat...
maizy/akka-cluster-heartbeat
src/main/scala/ru/maizy/dev/heartbeat/Options.scala
Scala
mit
2,775
/* * Copyright 2014–2017 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...
drostron/quasar
niflheim/src/test/scala/quasar/niflheim/CookedBlockSpecs.scala
Scala
apache-2.0
2,611
package io.flow.build import io.apibuilder.spec.v0.models.Service trait Controller { private[this] val internalErrors = scala.collection.mutable.Map[String, Seq[String]]() private[this] val GlobalError = "Global" protected[this] def addError(message: String): Unit = { addError(GlobalError, message) } ...
flowcommerce/api-lint
src/main/scala/io/flow/build/Controller.scala
Scala
mit
946
/* * Copyright 2014–2020 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...
slamdata/quasar
frontend/src/test/scala/quasar/ScalarStageSpec.scala
Scala
apache-2.0
95,579
package poly.algebra import poly.algebra.factory._ import poly.algebra.specgroup._ /** * Represents an upper semilattice that has a specific top element. * * An instance of this typeclass should satisfy the following axioms: * - $lawSupremumAssociativity * - $lawSupremumCommutativity * - $lawSupremumIdempote...
ctongfei/poly-algebra
src/main/scala/poly/algebra/BoundedUpperSemilattice.scala
Scala
mit
983
package com.sksamuel.elastic4s import org.elasticsearch.action.search._ import org.elasticsearch.client.Client import org.elasticsearch.common.unit.TimeValue import org.elasticsearch.index.query.QueryBuilder import org.elasticsearch.search.aggregations.AggregationBuilders import org.elasticsearch.search.rescore.Rescor...
l15k4/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/SearchDsl.scala
Scala
apache-2.0
10,918
package is.hail.types.virtual import is.hail.annotations.ExtendedOrdering import is.hail.types.physical.PVoid case object TVoid extends Type { override def _toPretty = "Void" override def pyString(sb: StringBuilder): Unit = { sb.append("void") } def mkOrdering(missingEqual: Boolean): ExtendedOrdering = ...
hail-is/hail
hail/src/main/scala/is/hail/types/virtual/TVoid.scala
Scala
mit
606
package scala.meta package internal package prettyprinters import scala.meta.internal.ast.{Quasi, Origin} import scala.meta.dialects.{Scala211, QuasiquoteTerm} import scala.meta.prettyprinters.Options.Lazy object TreeToString { def apply(tree: Tree) = { val dialect = tree.origin match { case Origin.Parsed...
Dveim/scalameta
scalameta/trees/src/main/scala/scala/meta/internal/prettyprinters/TreeToString.scala
Scala
bsd-3-clause
766
package santa.ping import net.minecraft.client.Minecraft import net.minecraft.util.text.ITextComponent import net.minecraft.util.text.Style import net.minecraftforge.client.event.ClientChatReceivedEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class PingEventHandler { @SubscribeEvent def o...
elifoster/Ping
src/main/scala/santa/ping/PingEventHandler.scala
Scala
mit
1,245
/* * 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
model/src/main/scala/org/beangle/data/model/pojo/Enabled.scala
Scala
lgpl-3.0
938
package uk.co.morleydev.zander.client.test.spec.update import uk.co.morleydev.zander.client.test.spec.{ResponseCodes, SpecTest} import uk.co.morleydev.zander.client.util.using import uk.co.morleydev.zander.client.test.gen.GenNative import java.io.File class UpdateWithExistingUpToDateArtefactsAndSourcesInCacheAndInsta...
MorleyDev/zander.client
src/test/scala/uk/co/morleydev/zander/client/test/spec/update/UpdateWithExistingUpToDateArtefactsAndSourcesInCacheAndInstalledArtefactsThatAreUpToDateTests.scala
Scala
mit
3,228
package io.vamp.common.json import org.json4s.JsonAST.{JObject, JString} import org.json4s._ object ThrowableSerializer { def apply(message: Option[String]): SerializationFormat = new SerializationFormat { override def customSerializers = super.customSerializers :+ new ThrowableSerializer(message) } } class...
BanzaiMan/vamp-common
src/main/scala/io/vamp/common/json/ThrowableSerializer.scala
Scala
apache-2.0
748
/* * 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 ...
ahnqirage/spark
core/src/main/scala/org/apache/spark/api/r/RUtils.scala
Scala
apache-2.0
4,244
package io.github.mandar2812.dynaml.graphics.charts.repl import unfiltered.request._ import unfiltered.response._ import scala.concurrent.duration.Duration import scala.concurrent.{Await, Promise} /** * User: austin * Date: 12/1/14 * * An unfiltered web-app for displaying graphs */ class PlotServer extends Unfi...
transcendent-ai-labs/DynaML
dynaml-core/src/main/scala/io/github/mandar2812/dynaml/graphics/charts/repl/PlotServer.scala
Scala
apache-2.0
1,382
package com.typesafe.sbt.dart import sbt._ import com.typesafe.sbt.web.SbtWeb import com.typesafe.sbt.web.SbtWeb._ import com.typesafe.sbt.web.pipeline.Pipeline import sbt.Keys.baseDirectory import sbt.Keys.unmanagedResourceDirectories import sbt.Keys.resourceGenerators import sbt.Keys.resourceDirectories import sbt....
cheleb/sbt-dart
src/main/scala/com/typesafe/sbt/dart/SbtDart.scala
Scala
apache-2.0
4,324
package aia.state import akka.agent.Agent import akka.actor.ActorSystem import concurrent.Await import concurrent.duration._ import akka.util.Timeout //import concurrent.ExecutionContext.Implicits.global case class BookStatistics(val nameBook: String, nrSold: Int) case class StateBookStatistics(val sequence: Long, ...
RayRoestenburg/akka-in-action
chapter-state/src/main/scala/aia/state/Agent.scala
Scala
mit
1,597
package debop4s.rediscala.spring import java.util.concurrent.TimeUnit import debop4s.core.concurrent._ import debop4s.rediscala.serializer.SnappyFstValueFormatter import org.slf4j.LoggerFactory import org.springframework.cache.Cache import org.springframework.cache.Cache.ValueWrapper import org.springframework.cache....
debop/debop4s
debop4s-rediscala/src/main/scala/debop4s/rediscala/spring/RedisCache.scala
Scala
apache-2.0
7,333
/* * 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 ...
hequn8128/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/utils/RankProcessStrategy.scala
Scala
apache-2.0
4,755
package amailp.intellij.robot.psi.manipulator import com.intellij.psi.{PsiElement, AbstractElementManipulator} import com.intellij.openapi.util.TextRange import amailp.intellij.robot.psi import amailp.intellij.robot.psi.utils.ExtRobotPsiUtils class ResourceValue extends AbstractElementManipulator[psi.ResourceValue] {...
puhnastik/robot-plugin
src/main/scala/amailp/intellij/robot/psi/manipulator/ResourceValue.scala
Scala
gpl-3.0
677
package controllers import javax.inject.Inject import play.api.mvc.{ControllerComponents, AbstractController} class ApplicationController @Inject() (cc: ControllerComponents) extends AbstractController(cc) { def index = Action { Ok("OK!") } }
futurice/minimal-play2
app/controllers/ApplicationController.scala
Scala
mit
253
package com.rainysoft.decisiontree.tree import scala.collection.immutable.Map /** Singleton to classify a sample. * */ object Classifier { /** Classifies a sample given a decision tree. * */ def classify[A,B](sample: Map[String, A], tree: Tree[A,B]): B = { tree match { case Leaf(value) => ...
MikaelUmaN/DecisionTree
src/main/scala/com/rainysoft/decisiontree/tree/Classifier.scala
Scala
mit
543
package offGridOrcs object BlueprintLibrary { val Headquarters = { val o = None val c = Some(Blueprint.Element.Clearing()) val s = Some(Blueprint.Element.Stockpile()) val Z = Some(Blueprint.Element.Building()) val D = Some(Blueprint.Element.Decal()) Blueprint.build("HQ", 6, 7)( o, c, c,...
dcecile/off-grid-orcs
src/BlueprintLibrary.scala
Scala
mit
948
/* NSC -- new Scala compiler * Copyright 2005-2013 LAMP/EPFL * @author Martin Odersky */ package dotty.tools package dotc import core.Contexts.Context import reporting.Reporter /* To do: */ object Main extends Driver { def resident(compiler: Compiler): Reporter = unsupported("resident") /*loop { line => va...
AlexSikia/dotty
src/dotty/tools/dotc/Main.scala
Scala
bsd-3-clause
834
package japgolly.scalajs.react.internal trait Profunctor[F[_, _]] { def lmap[A, B, C](f: F[A, B])(m: C => A): F[C, B] def rmap[A, B, C](f: F[A, B])(m: B => C): F[A, C] def dimap[A, B, C, D](f: F[A, B])(l: C => A, r: B => D): F[C, D] = rmap(lmap(f)(l))(r) } object Profunctor { final class Ops[F[_, _], A,...
japgolly/scalajs-react
coreGeneric/src/main/scala/japgolly/scalajs/react/internal/Profunctor.scala
Scala
apache-2.0
788
/* * 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...
1974kpkpkp/snowplow
3-enrich/scala-hadoop-enrich/project/Dependencies.scala
Scala
apache-2.0
2,712
package com.twitter.finagle.mysql.integration import com.twitter.conversions.DurationOps._ import com.twitter.finagle.client.DefaultPool import com.twitter.util.{Await, Awaitable} import org.scalatest.FunSuite class AbortedClientTest extends FunSuite with IntegrationClient { private def idleTime = 1.seconds pri...
luciferous/finagle
finagle-mysql/src/test/scala/com/twitter/finagle/mysql/integration/AbortedClientTest.scala
Scala
apache-2.0
1,871
/* * 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 ...
sgururajshetty/carbondata
integration/spark2/src/test/scala/org/apache/spark/carbondata/register/TestRegisterCarbonTable.scala
Scala
apache-2.0
13,562