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 org.jetbrains.plugins.dotty.lang.parser import com.intellij.openapi.project.Project import com.intellij.psi.PsiFile import com.intellij.psi.stubs.PsiFileStub import com.intellij.psi.tree.IStubFileElementType import org.jetbrains.plugins.scala.lang.parser.{PsiCreator, ScalaElementTypes, ScalaParserDefinition} ...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/dotty/lang/parser/DottyParserDefinition.scala
Scala
apache-2.0
557
/* * This file is part of the \\BlueLaTeX project. * * 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 ...
tdurieux/bluelatex
blue-core/src/main/scala/gnieh/blue/core/impl/user/ResetUserPassword.scala
Scala
apache-2.0
2,086
package com.twitter.finagle.kestrel.unit import com.twitter.concurrent.Broker import com.twitter.finagle.kestrel.{ReadHandle, ReadMessage} import com.twitter.io.Buf import com.twitter.util.Await import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import scala.language.p...
spockz/finagle
finagle-kestrel/src/test/scala/com/twitter/finagle/kestrel/unit/ReadHandleTest.scala
Scala
apache-2.0
4,870
/* * Copyright 2012-2019 Comcast Cable Communications Management, 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 * * Unl...
Comcast/sirius
src/main/scala/com/comcast/xfinity/sirius/uberstore/data/RandomAccessFileHandleFactory.scala
Scala
apache-2.0
1,153
package com.azavea.maml.ast import com.azavea.maml.error._ import cats._ import cats.data.{NonEmptyList => NEL, _} import Validated._ import io.circe.Json import io.circe.generic.JsonCodec import java.lang.IllegalArgumentException trait Source trait Literal extends Source { expression: Expression => val childre...
geotrellis/maml
shared/src/main/scala/ast/Source.scala
Scala
apache-2.0
602
package com.sksamuel.elastic4s.requests.searches.suggestion import com.sksamuel.elastic4s.requests.searches.GeoPoint import com.sksamuel.elastic4s.requests.searches.queries.RegexpFlag import com.sksamuel.elastic4s.ext.OptionImplicits._ sealed trait Fuzziness object Fuzziness { def fromEdits(edits: Int): Fuzziness ...
sksamuel/elastic4s
elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/suggestion/CompletionSuggestion.scala
Scala
apache-2.0
4,175
package game import componentwork._, matrix.{IControlF,IControlS,Area}, javax.swing.Timer, java.awt.event.{ActionListener, ActionEvent}, scala.collection.mutable.{Map => MMap}, scala.math.random class TargetGen (val name:MMap[String, Component]) extends Component { //Multiinterf...
AlexCAB/whfzf
game/TargetGen.scala
Scala
mit
3,764
/* * Copyright 2001-2008 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...
yyuu/scalatest
src/test/scala/org/scalatest/matchers/ShouldBeNullSpec.scala
Scala
apache-2.0
7,007
// - Project: scalajs-angulate (https://github.com/jokade/scalajs-angulate) // Description: // // Distributed under the MIT License (see included file LICENSE) package biz.enef.angulate import acyclic.file import scala.scalajs.js /** * Defines the bindings to the global angular object. * * @see [[https://docs.an...
CapeSepias/scalajs-angulate
src/main/scala/biz/enef/angulate/Scope.scala
Scala
mit
5,443
package io.github.finagle.smtp import com.twitter.util.Await import io.github.finagle.Smtp import io.github.finagle.smtp.extension.auth.AuthRequired import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class IntegrationTest extends FunSuit...
finagle/finagle-smtp
src/it/scala/io/github/finagle/smtp/IntegrationTest.scala
Scala
apache-2.0
815
/* * Copyright 2014-2022 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 agr...
Netflix-Skunkworks/iep-apps
atlas-cloudwatch/src/test/scala/com/netflix/atlas/cloudwatch/MetricCategorySuite.scala
Scala
apache-2.0
5,353
/* * Copyright 2015 Simin You * * 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 ...
kgs/SpatialSpark
src/main/scala/spatialspark/index/RTree.scala
Scala
apache-2.0
727
package sample.usecase import org.slf4j.LoggerFactory import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.MessageSource import sample.context._ import sample.context.actor.Actor import sample.context.audit.AuditHandler import sample.context.lock._ import sample.model.Busi...
jkazama/sample-boot-scala
src/main/scala/sample/usecase/ServiceSupport.scala
Scala
mit
1,685
package latis.ops.filter import com.typesafe.scalalogging.LazyLogging import latis.dm.Dataset import latis.dm.Sample import latis.dm.Scalar import latis.dm.Tuple import latis.ops.Operation import latis.ops.OperationFactory import latis.util.RegEx.CONTAINS /** * Filter based on a constraint expression of the form * ...
dlindhol/LaTiS
src/main/scala/latis/ops/filter/Contains.scala
Scala
epl-1.0
2,884
package com.twitter.finagle.service import com.twitter.finagle.stats.{Counter, StatsReceiver} import com.twitter.finagle.util.AsyncLatch import com.twitter.finagle.{param, Service, ServiceFactory, ServiceProxy, Stack, Stackable} import com.twitter.util.{Duration, Promise, Future, NullTimerTask, Timer, Time} import jav...
travisbrown/finagle
finagle-core/src/main/scala/com/twitter/finagle/service/ExpiringService.scala
Scala
apache-2.0
4,327
#!/usr/bin/env scalas /*** scalaVersion := "2.11.2" libraryDependencies += "org.scala-sbt" % "io" % "0.13.5" */ import sbt._, Path._, sbt.IO import java.io.File import java.net.{URI, URL} // Alias for defining files def file(s: String): File = new File(s) /* In case that the file is a directory, rename it and th...
wiegraffolles/LowerTheThings
LowerTheThings.scala
Scala
gpl-3.0
1,612
package com.thenetcircle.event_bus.story.interfaces import com.thenetcircle.event_bus.misc.Logging import com.thenetcircle.event_bus.story.TaskLogger trait ITaskLogging extends Logging { _: ITask => protected lazy val taskLogger: TaskLogger = TaskLogger(getStoryName(), logger) }
thenetcircle/event-bus
core/src/main/scala/com/thenetcircle/event_bus/story/interfaces/ITaskLogging.scala
Scala
apache-2.0
284
/* * Copyright 2017 Kailuo Wang * * 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 ...
kailuowang/mainecoon
core/src/main/scala/mainecoon/syntax/FunctorKSyntax.scala
Scala
apache-2.0
682
package p class BitSet
scala/scala
test/files/pos/t2458/B.scala
Scala
apache-2.0
25
/* * 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
mongodb/src/main/scala/quasar/physical/mongodb/workflow/Crystallized.scala
Scala
apache-2.0
1,261
/* * 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 ...
sh-cho/cshSpark
internal/io/HadoopMapReduceCommitProtocol.scala
Scala
apache-2.0
6,880
/* * Copyright 2015 eleflow.com.br. * * 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 ...
eleflow/uberdata
iuberdata_core/src/main/scala/org/apache/spark/ml/BestModelFinder.scala
Scala
apache-2.0
4,355
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
zzcclp/carbondata
integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/command/SICreationCommand.scala
Scala
apache-2.0
33,673
package com.automatatutor.model import net.liftweb.mapper._ import net.liftweb.common.Box class Attendance extends LongKeyedMapper[Attendance] with IdPK { def getSingleton = Attendance protected object userId extends MappedLongForeignKey(this, User) protected object courseId extends MappedLongForeignKey(this, Cou...
AutomataTutor/automatatutor-frontend
src/main/scala/com/automatatutor/model/Attendance.scala
Scala
mit
2,542
package edu.eckerd.google.api.services.directory import com.typesafe.config.ConfigFactory import edu.eckerd.google.api.services.Service import edu.eckerd.google.api.services.Scopes.ADMIN_DIRECTORY import scala.language.implicitConversions case class Directory(serviceAccountEmail: String, imperso...
EckerdCollege/google-api-scala
src/main/scala/edu/eckerd/google/api/services/directory/Directory.scala
Scala
apache-2.0
1,752
package com.letstalkdata.scalinear /** * Author: Phillip Johnson * Date: 7/17/15 */ class MatrixSpec extends UnitSpec { "A Matrix" should "be created using its factory method" in { val myMatrix = Matrix(Vector(1,2,3),Vector(4,5,6),Vector(7,8,9)) myMatrix(0,0) should be(1) myMatrix(1,1) should be(5) ...
phdoerfler/scalinear
src/test/scala/com/letstalkdata/scalinear/MatrixSpec.scala
Scala
mit
5,122
package chana.timeseries.indicator import akka.actor.Actor import chana.timeseries.TBaseSer import chana.timeseries.TSer import java.text.DecimalFormat /** * * @author Caoyuan Deng */ object Indicator { private val FAC_DECIMAL_FORMAT = new DecimalFormat("0.###") def displayName(ser: TSer): String = ser match...
wandoulabs/chana
src/main/scala/chana/timeseries/indicator/Indicator.scala
Scala
apache-2.0
4,350
/** * Copyright (C) 2005 Orbeon, Inc. * * 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 * 2.1 of the License, or (at your option) any later version. * * This program i...
ajw625/orbeon-forms
src/main/scala/org/orbeon/oxf/servlet/wrappers.scala
Scala
lgpl-2.1
5,824
/* * 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...
poplav/incubator-toree
kernel/src/test/scala/org/apache/toree/kernel/protocol/v5/handler/CommMsgHandlerSpec.scala
Scala
apache-2.0
5,897
package com.mycompany.scalcium.coref object CorefResolver { def getResolver(name: String): CorefResolver = { name.toLowerCase() match { case "stanford" => new StanfordCorefResolver() case "lingpipe" => new LingPipeCorefResolver() case "opennlp" => new OpenNLPCorefResolver() } } } trait C...
sujitpal/scalcium
src/main/scala/com/mycompany/scalcium/coref/CorefResolver.scala
Scala
apache-2.0
464
package com.github.philcali.web import lmxml.{ LmxmlFactory, ResourceLoading } import lmxml.PlainLmxmlParser import lmxml.shortcuts.html.HtmlShortcuts object Lmxml extends LmxmlFactory with ResourceLoading { def createParser(step: Int) = new PlainLmxmlParser(step) with HtmlShortcuts }
philcali/webdir
src/main/scala/Lmxml.scala
Scala
mit
294
package org.rex.dl import org.rex.relation_extract.Candidate trait DistantLabeling[L] { type Label = L type Labels = Set[Label] type Fn = Candidate => Option[Labels] } object DistLabelStr extends DistantLabeling[String] { type Query = String type Answer = String type KnowledgeBase = Map[Query, Map[...
malcolmgreaves/rex
src/main/scala/org/rex/dl/DistantLabeling.scala
Scala
apache-2.0
1,239
package gh.test.gh2013.payload import gh2013.payloads.{CreateEventPayload, FollowEventPayload} import net.liftweb.json._ import org.scalatest.{Matchers, FlatSpec} class CreateEventPayloadTest extends FlatSpec with Matchers { "A valid CreateEvent payload" must "be correctly parsed" in { val json = parse( ...
mgoeminne/github_etl
src/test/scala/gh/test/gh2013/payload/CreateEventPayloadTest.scala
Scala
mit
628
package AccurateML.lsh import java.io._ import breeze.linalg.svd.SVD import breeze.linalg.{DenseMatrix, _} import breeze.numerics._ import org.apache.log4j.{Level, Logger} import org.apache.spark.mllib.linalg.Vectors import org.apache.spark.mllib.regression.LabeledPoint import org.apache.spark.{SparkConf, SparkConte...
harryandlina/ARIM
project/slimML/AccurateML/lsh/IncreSVD1.scala
Scala
apache-2.0
11,414
package com.datascience.education.tutorial.lecture5 import scala.math.BigInt import com.datascience.education.common.lecture5.Stream import com.datascience.education.common.lecture5.Empty import com.datascience.education.common.lecture5.Cons import com.datascience.education.common.lecture5.Stream._ /* https://en....
DS12/scala-class
tutorial/src/main/scala/com/datascience/education/tutorial/lecture5/LookandSay.scala
Scala
cc0-1.0
1,287
package fr.acinq.eclair.wire import com.google.common.base.Charsets import fr.acinq.bitcoin.Crypto.{PrivateKey, PublicKey} import fr.acinq.bitcoin.{ByteVector32, ByteVector64, Crypto, Protocol, Satoshi} import fr.acinq.eclair._ import fr.acinq.eclair.blockchain.fee.FeeratePerKw import fr.acinq.eclair.payment.PaymentRe...
btcontract/wallet
app/src/main/java/fr/acinq/eclair/wire/LightningMessageTypes.scala
Scala
apache-2.0
20,917
package org.jetbrains.sbt import java.io.File import com.intellij.openapi.project.Project import com.intellij.openapi.util.IconLoader /** * @author Pavel Fatin */ object Sbt { val Name = "SBT" val FileExtension = "sbt" val FileDescription = "SBT files" val BuildFile = "build.sbt" val PluginsFile = "p...
double-y/translation-idea-plugin
src/org/jetbrains/sbt/Sbt.scala
Scala
apache-2.0
1,609
/* * 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 ...
holdenk/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogV2Implicits.scala
Scala
apache-2.0
6,160
package chapter7 import org.scalatest.{Matchers, FlatSpec} import org.scalatest.Assertions._ import org.scalatest._ /** * Created by dschmitz on 20.02.15. */ class Exercise7_3_Spec extends scalafortheimpatient.UnitSpec { "nextInt" must "return a random int " in { val n = chapter7.random.nextInt() Asser...
koenighotze/scalafortheimpatient
src/test/scala/chapter7/Exercise7_3_Spec.scala
Scala
apache-2.0
863
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. package com.azure.cosmos.spark import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach, Inside, Inspectors, OptionValues} import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers abstrac...
Azure/azure-sdk-for-java
sdk/cosmos/azure-cosmos-spark_3_2-12/src/test/scala/com/azure/cosmos/spark/UnitSpec.scala
Scala
mit
476
package org.randi3.web.snippet import org.randi3.web.lib.DependencyFactory import net.liftweb.http.S._ import org.randi3.web.util.CurrentTrial import scala.xml._ import scala.xml.Group import scala.xml.NodeSeq import scala.xml.Text import net.liftweb.http.S import net.liftweb.util.Helpers._ import xml.{Text, NodeSeq} ...
dschrimpf/randi3-web
src/main/scala/org/randi3/web/snippet/TrialUserShow.scala
Scala
gpl-3.0
2,695
import annotation._, elidable._ class C { @elidable(INFO) val i: Int = 42 @elidable(INFO) lazy val j: Int = 42 @elidable(INFO) var k: Int = 42 } @elidable(INFO) class D
felixmulder/scala
test/files/neg/t10068.scala
Scala
bsd-3-clause
177
/* * Accio is a platform to launch computer science experiments. * Copyright (C) 2016-2018 Vincent Primault <v.primault@ucl.ac.uk> * * Accio 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...
privamov/accio
accio/java/fr/cnrs/liris/locapriv/ops/SequentialSplittingOp.scala
Scala
gpl-3.0
2,125
/* * 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 ...
SparklineData/spark-druid-olap
src/main/scala/org/apache/spark/sql/hive/thriftserver/sparklinedata/HiveThriftServer2.scala
Scala
apache-2.0
5,896
/* * 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 ...
bowenli86/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/physical/stream/StreamExecLookupJoinRule.scala
Scala
apache-2.0
3,889
/* Copyright 2012 Johannes Rudolph * * 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...
spray/twirl
sbt-twirl/src/main/scala/twirl/sbt/TwirlPlugin.scala
Scala
apache-2.0
3,698
/* * Copyright 2015 ligaDATA * * 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 ...
traytonwhite/Kamanja
trunk/Pmml/PmmlCompiler/src/main/scala/com/ligadata/pmml/transforms/rawtocooked/common/TransformationDictionaryXNodes.scala
Scala
apache-2.0
9,938
//: ---------------------------------------------------------------------------- //: Copyright (C) 2015 Verizon. 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 Licen...
neigor/funnel
chemist/src/main/scala/Cache.scala
Scala
apache-2.0
5,483
/* * 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 n...
wangcy6/storm_app
frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/test/scala/unit/kafka/coordinator/transaction/TransactionMarkerChannelManagerTest.scala
Scala
apache-2.0
20,014
package com.github.gtache.lsp.editor.listeners import com.intellij.openapi.editor.event.{EditorMouseEvent, EditorMouseMotionListener} /** * Class listening for mouse movement in an editor (used for hover) */ class EditorMouseMotionListenerImpl extends EditorMouseMotionListener with LSPListener { override def ...
gtache/intellij-lsp
intellij-lsp/src/com/github/gtache/lsp/editor/listeners/EditorMouseMotionListenerImpl.scala
Scala
apache-2.0
489
package org.jetbrains.plugins.scala.lang.resolve2 class Scala29Test extends ResolveTestBase { override def folderPath: String = { super.folderPath + "scala29/" } def testSCL2913(): Unit = doTest() }
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/resolve2/Scala29Test.scala
Scala
apache-2.0
211
package uk.org.nbn.nbnv.importer.validation import uk.org.nbn.nbnv.importer.fidelity.{ResultLevel, Result} import uk.org.nbn.nbnv.importer.spatial._ import uk.org.nbn.nbnv.importer.spatial.BritishGrid import uk.org.nbn.nbnv.importer.spatial.IrishGrid import uk.org.nbn.nbnv.importer.records.NbnRecord //validat...
JNCC-dev-team/nbn-importer
importer/src/main/scala/uk/org/nbn/nbnv/importer/validation/Nbnv159Validator.scala
Scala
apache-2.0
2,311
package lila.api import play.api.mvc.RequestHeader import lila.common.{ ApiVersion, HTTPRequest } object Mobile { object AppVersion { def mustUpgrade(v: String) = mustUpgradeFromVersions(v) // only call if a more recent version is available in both stores! private val mustUpgradeFromVersions = Set( ...
luanlv/lila
modules/api/src/main/Mobile.scala
Scala
mit
728
package com.jejking.rprng.lotteries.de.lotto // TODO - lift validation to type level /** * Represents the result of a draw such as in German 6/49. * * @param numbers a set of 6 integers between 1 and 49 inclusive * @param superNumber an integer between 0 and 9 inclusive * @throws IllegalArgumentException if...
jejking/rprng
src/main/scala/com/jejking/rprng/lotteries/de/lotto/DrawResult.scala
Scala
apache-2.0
769
package unfiltered.oauth trait Token { val key: String val secret: String } case class RequestToken(key: String, secret: String, consumerKey: String, callback: String) extends Token case class AuthorizedRequestToken(key: String, secret: String, consumerKey: String, user: String, verifier: String) extends Token ...
peel/unfiltered
oauth/src/main/scala/tokens.scala
Scala
mit
1,541
package com.github.gigurra.glasciia /** * Created by johan on 2017-01-08. */ trait Screen { def eventHandler: PartialFunction[GameEvent, Unit] }
GiGurra/glasciia
glasciia-core/src/main/scala/com/github/gigurra/glasciia/Screen.scala
Scala
mit
152
package com.shocktrade.client import io.scalajs.dom.html.browser.console import io.scalajs.npm.angularjs.AngularJsHelper._ import io.scalajs.npm.angularjs.{Controller, Q, Scope, injected} import io.scalajs.util.JsUnderOrHelper._ import io.scalajs.util.PromiseHelper.Implicits._ import scala.scalajs.concurrent.JSExecut...
ldaniels528/shocktrade.js
app/client/angularjs/src/main/scala/com/shocktrade/client/InformationBarController.scala
Scala
apache-2.0
2,822
package se.lu.nateko.cp.meta.utils.rdf4j import org.eclipse.rdf4j.repository.Repository import org.eclipse.rdf4j.repository.sail.SailRepository import org.eclipse.rdf4j.sail.memory.MemoryStore import org.eclipse.rdf4j.rio.RDFFormat import org.eclipse.rdf4j.model.Statement import org.eclipse.rdf4j.model.IRI import scal...
ICOS-Carbon-Portal/meta
src/main/scala/se/lu/nateko/cp/meta/utils/rdf4j/Loading.scala
Scala
gpl-3.0
1,601
package scala.collection.mutable import scala.collection._ trait BagBuilder[A, +Bag <: scala.collection.Bag[A]] extends mutable.Builder[A, Bag] { def add(elem: A, count: Int): this.type def addBucket(bucket: scala.collection.BagBucket[A]): this.type } object BagBuilder { def apply[A, Bag <: scala.collection....
nicolasstucki/multisets
src/main/scala/scala/collection/mutable/BagBuilder.scala
Scala
bsd-3-clause
1,414
/* * 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 ...
hvanhovell/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/encoders/RowEncoderSuite.scala
Scala
apache-2.0
17,745
package sangria.macros.derive import sangria.marshalling.FromInput.{InputObjectResult, CoercedScalaResult} import sangria.util.tag.@@ import language.higherKinds import sangria.schema._ import scala.annotation.implicitNotFound @implicitNotFound(msg = "Can't find suitable GraphQL input type for ${T}. If you have de...
PhilAndrew/JumpMicro
JMSangriaGraphql/src/main/scala/sangria/macros/derive/GraphQLInputTypeLookup.scala
Scala
mit
1,612
/** * 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...
linkedin/pinot
pinot-connectors/pinot-spark-connector/src/main/scala/org/apache/pinot/connector/spark/connector/PinotUtils.scala
Scala
apache-2.0
4,804
package com.sksamuel.scapegoat.inspections.exception import com.sksamuel.scapegoat._ /** * @author Stephen Samuel * * Inspired by http://findbugs.sourceforge.net/bugDescriptions.html#NM_CLASS_NOT_EXCEPTION */ class IncorrectlyNamedExceptions extends Inspection { def inspector(context: InspectionContext...
pwwpche/scalac-scapegoat-plugin
src/main/scala/com/sksamuel/scapegoat/inspections/exception/IncorrectlyNamedExceptions.scala
Scala
apache-2.0
1,924
package cua.li.ti.activate.postgis import scala.collection.mutable.{ Map => MutableMap } import net.fwbrasil.activate.statement.{ CompositeOperatorCriteria, Criteria, FunctionApply, StatementValue } import net.fwbrasil.activate.storage.marshalling.{ ListStorageValue, StorageOptionalValue, StorageValue } import net.fwb...
Alain-Bearez/Activate-PostGIS
src/main/scala/cua/li/ti/activate/postgis/postgisDialect.scala
Scala
lgpl-3.0
4,240
package org.typeclassopedia /** * Read about state here: https://typelevel.org/cats/datatypes/state.html */ case class State[S, A](run: S => (A, S)) { // 1. the map method def map[B](f: A => B): State[S, B] = State { s => val (a, t) = run(s) (f(a), t) } // 2. the flatMap method def fla...
channingwalton/typeclassopedia
src/main/scala/org/typeclassopedia/State.scala
Scala
mit
901
/* * Copyright (C) 2020 MapRoulette contributors (see CONTRIBUTORS.md). * Licensed under the Apache License, Version 2.0 (see LICENSE). */ package org.maproulette.framework.repository import java.sql.Connection import scala.concurrent.duration.FiniteDuration import anorm.SqlParser.{get, long} import anorm.ToParam...
maproulette/maproulette2
app/org/maproulette/framework/repository/TaskReviewMetricsRepository.scala
Scala
apache-2.0
10,696
package org.bitcoins.core.crypto import org.bitcoins.core.protocol.NetworkElement import org.bitcoins.core.util.Factory sealed abstract class ChainCode extends NetworkElement object ChainCode extends Factory[ChainCode] { private case class ChainCodeImpl(bytes: Seq[Byte]) extends ChainCode { require(bytes.size =...
Christewart/bitcoin-s-core
src/main/scala/org/bitcoins/core/crypto/ChainCode.scala
Scala
mit
460
/** * This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]]. */ // DO NOT EDIT MANUALLY package sbt sealed abstract class ServerAuthentication extends Serializable object ServerAuthentication { case object Token extends ServerAuthentication }
xuwei-k/xsbt
main-command/src/main/contraband-scala/sbt/ServerAuthentication.scala
Scala
apache-2.0
286
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js API ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013-2015, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-lang.org/ ** ** /____/\\___/...
jmnarloch/scala-js
library/src/main/scala/scala/scalajs/macroimpls/Compat210.scala
Scala
bsd-3-clause
1,681
package org.fiware.cosmos.orion.flink.connector package object simulatedNotificationLD { final val notificationVal = """{ "data": [ { "id": "R1", "type": "Node", "co": {"type": "Property","value": 0,"unitCode": ""}, "co2": {"type": "Property","value": 0,"un...
Fiware/context.Cosmos
src/test/scala/org.fiware.cosmos.orion.flink.connector.tests/SimulatedNotificationLD.scala
Scala
agpl-3.0
1,955
/* * 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 ...
JihongMA/incubator-carbondata
integration/spark-common/src/main/scala/org/apache/spark/sql/optimizer/CarbonDecoderOptimizerHelper.scala
Scala
apache-2.0
4,995
package io.mewbase.rest import java.util.concurrent.CompletableFuture import java.util.function.Predicate import java.util.{Optional, stream} import java.{lang, util} import io.mewbase.binders.{Binder, BinderStore, KeyVal} import io.mewbase.bson.BsonObject import io.mewbase.eventsource.EventSink import scala.collect...
Tesco/mewbase
mewbase-rest-integrationtest/src/it/scala/io.mewbase.rest/StubBinder.scala
Scala
mit
4,797
package zzb.rest.directives import akka.actor.{ ActorContext, ActorRef } import zzb.rest._ import spray.http.Uri.Path._ import scala.concurrent.{ ExecutionContext, Future } import scala.util.{ Failure, Success } /** * Created with IntelliJ IDEA. * User: Simon Xiao * Date: 14-3-11 * Time: 上午8:32 * Copyright baox...
stepover/zzb
zzb-rest/src/main/scala/zzb/rest/directives/ForwardDirectives.scala
Scala
mit
2,158
package linguistic import japgolly.scalajs.react.vdom.prefix_<^._ import japgolly.scalajs.react.{ReactEventI, _} import linguistic.gateaway.UiSession import shared.protocol.SignInResponse object Panels { def topPanelLeftArea(signUp: (ReactEventI => CallbackTo[Unit]), signOut: (ReactEventI => CallbackTo[Unit])) = ...
haghard/linguistic
ui/src/main/scala/linguistic/Panels.scala
Scala
apache-2.0
2,105
package com.sksamuel.elastic4s.update import com.sksamuel.elastic4s.searches.QueryBuilderFn import com.sksamuel.elastic4s._ import org.elasticsearch.action.support.ActiveShardCount import org.elasticsearch.action.update.{UpdateRequestBuilder, UpdateResponse} import org.elasticsearch.client.Client import org.elasticsea...
tyth/elastic4s
elastic4s-tcp/src/main/scala/com/sksamuel/elastic4s/update/UpdateExecutables.scala
Scala
apache-2.0
3,886
package com.sksamuel.elastic4s import com.sksamuel.elastic4s.mappings.FieldType.StringType import com.sksamuel.elastic4s.testkit.ElasticSugar import org.scalatest.mock.MockitoSugar import org.scalatest.{ FlatSpec, Matchers } import com.sksamuel.elastic4s.ElasticDsl._ /** @author Stephen Samuel */ class PercolateTest ...
beni55/elastic4s
elastic4s-core-tests/src/test/scala/com/sksamuel/elastic4s/PercolateTest.scala
Scala
apache-2.0
1,155
/** * Copyright (c) 2015 Intel Corporation  * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *       http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicabl...
shibanis1/spark-tk
core/src/main/scala/org/trustedanalytics/sparktk/frame/internal/ops/groupby/aggregators/MaxAggregator.scala
Scala
apache-2.0
2,215
package sample.fsm import akka.actor._ import akka.actor.FSM._ import scala.concurrent.duration._ // Akka adaptation of // http://www.dalnefre.com/wp/2010/08/dining-philosophers-in-humus/ /* * Some messages for the chopstick */ sealed trait ChopstickMessage object Take extends ChopstickMessage object Put extends Cho...
JetBrains/intellij-scala
scala/scala-impl/testdata/localProjects/akka-samples/src/main/scala/sample/fsm/DiningHakkersOnFsm.scala
Scala
apache-2.0
5,801
package ifreitas.scalaaiml.elements import org.mockito.Mockito._ import scala.xml.Node class TemplateSpec extends BaseSpec { describe("#toXml") { val xml = Template(evalStub, thinkStub, botStub, uppercaseStub, lowercaseStub, sraiStub, sraixStub, setVarStub, personStub, person2Stub, normalizeStub, mapStub,...
ifreitas/AimlToXml
src/test/scala/ifreitas/scalaaiml/elements/TemplateSpec.scala
Scala
mit
1,214
package org.splink.pagelets import javax.inject.Inject import play.api.mvc.{AbstractController, ControllerComponents, CookieHeaderEncoding, DefaultCookieHeaderEncoding} class InjectedPageletsAssembly @Inject() (cc: ControllerComponents) extends AbstractController(cc) with PageletsAssembly trait PageletsAssembly exte...
splink/pagelets
src/main/scala/org/splink/pagelets/PageletsAssembly.scala
Scala
apache-2.0
591
object Versions extends WebJarsVersions with ScalaJSVersions with SharedVersions with Binding with OtherJVM { val scala = "2.11.8" val kappaNotebook = "0.0.20" val kappaModel = "0.0.3" val websim = "0.0.18" } trait Binding { val binding = "0.8.16" val bindingControls = "0.0.24" val semanticControls...
antonkulaga/kappa-notebook
project/Versions.scala
Scala
mpl-2.0
1,767
package geek.lawsof.physics.lib.util.helpers import net.minecraft.item.ItemStack import net.minecraftforge.oredict.OreDictionary /** * Created by anshuman on 20-07-2014. */ object OreDict { def apply(oreName: String) = OreDictionary.getOres(oreName) def apply(stack: ItemStack) = OreDictionary.getOreIDs(stack)....
GeckoTheGeek42/TheLawsOfPhysics
src/main/scala/geek/lawsof/physics/lib/util/helpers/OreDict.scala
Scala
mit
566
import java.io._ object SerDes { def serialize(obj: AnyRef): Array[Byte] = { val buffer = new ByteArrayOutputStream val out = new ObjectOutputStream(buffer) out.writeObject(obj) buffer.toByteArray } def deserialize(a: Array[Byte]): AnyRef = { val in = new ObjectInputStream(new ByteArrayInput...
felixmulder/scala
test/files/run/t9375.scala
Scala
bsd-3-clause
6,325
package scala.slick.lifted import scala.slick.ast._ import scala.slick.ast.Util.nodeToNodeOps /** A Tag marks a specific row represented by an AbstractTable instance. */ sealed trait Tag { /** Return a new instance of the AbstractTable carrying this Tag, with a new path */ def taggedAs(path: List[Symbol]): Abstra...
retronym/slick
src/main/scala/scala/slick/lifted/AbstractTable.scala
Scala
bsd-2-clause
5,175
package models.goods /** * Created by snc on 5/6/17. */ import slick.lifted.TableQuery import slick.driver.PostgresDriver.api._ /** * Created by stanikol on 10/21/16. */ object GoodsTableDef { class Categories(tag: Tag) extends Table[Category](tag, "categories") { def id = column[Int]("id", O.AutoInc, O.Pr...
stanikol/walnuts
server/app/models/goods/GoodsTableDef.scala
Scala
apache-2.0
2,437
/* * 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
tools/src/main/scala/org/apache/spark/tools/StoragePerfTester.scala
Scala
apache-2.0
4,344
/** * Gauge operations with console feedback */ package common /** * @author ShiZhan * Sequential operations with console feedback * E.g.: to process a large amount of files */ object Gauge { implicit class ArrayOperations[T](items: Array[T]) { def foreachDo(op: T => Any) = { var i = 0 val tota...
ShiZhan/fs-crawler
src/main/scala/common/Gauge.scala
Scala
apache-2.0
632
package scala.meta.converter import scala.meta.TreeConverterTestBaseNoLibrary import scala.meta._ class TreeConverterTemplateTest extends TreeConverterTestBaseNoLibrary { def testTraitEmpty(): Unit = { doTest( "trait A", Defn.Trait(Nil, Type.Name("A"), Nil, Ctor.Primary(Nil, Name.Anonymous(), Nil),...
JetBrains/intellij-scala
scala/scala-impl/test/scala/meta/converter/TreeConverterTemplateTest.scala
Scala
apache-2.0
10,525
/** * Copyright (C) 2013 Orbeon, Inc. * * 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 * 2.1 of the License, or (at your option) any later version. * * This program i...
brunobuzzi/orbeon-forms
xforms/jvm/src/test/scala/org/orbeon/oxf/client/client.scala
Scala
lgpl-2.1
14,172
/* This code is based on the SOM class library. * * Copyright (c) 2001-2016 see AUTHORS.md file * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the 'Software'), to deal * in the Software without restriction, including without ...
cedricviaccoz/scala-native
benchmarks/src/main/scala/storage/StorageBenchmark.scala
Scala
bsd-3-clause
1,724
/* * Copyright 2013 http4s.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://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
http4s/http4s
core/shared/src/main/scala/org/http4s/InvalidBodyException.scala
Scala
apache-2.0
850
/* * The MIT License (MIT) * * Copyright (c) 2016 Ian McIntosh * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use,...
cranst0n/f3
modules/web/src/main/scala/f3/web/view/standings.scala
Scala
mit
5,014
package org.oc.ld32.entity.ai import org.lengine.render.RenderEngine import org.oc.ld32.entity.EntityEnemy class AIAttack(priority: Int, owner: EntityEnemy) extends AITask(priority, owner) { var lastAttackTime = 0f override def shouldContinue: Boolean = { owner.target != null } override def canExecute:...
OurCraft/LD32
src/main/scala/org/oc/ld32/entity/ai/AIAttack.scala
Scala
apache-2.0
869
package com.peterpotts.sample class SampleLift[A](a: A) extends MapSample[Unit, A](SampleUnit, _ => a) object SampleLift { def apply[A](a: A): Sample[A] = new SampleLift(a) }
peterpotts/sample
src/main/scala/com/peterpotts/sample/SampleLift.scala
Scala
mit
179
/* * This file is part of the \BlueLaTeX project. * * 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 l...
tdurieux/bluelatex
blue-compile/src/main/scala/gnieh/blue/compile/impl/let/GetCompilersLet.scala
Scala
apache-2.0
1,358
package codeoptimus.sgir import codeoptimus.sgir.braincase.model.IRCUser import codeoptimus.sgir.braincase.UserManagement import comm.IRCPacket import config.{LogSetup, SimpleConfig} import org.jibble.pircbot.PircBot import org.jibble.pircbot.User import org.joda.time.DateTime import com.foursquare.rogue.Rogue._ imp...
digicyc/SGir
src/main/scala/SGir.scala
Scala
mit
4,752
/* * 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 ...
ueshin/apache-flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/catalog/ExternalTableUtil.scala
Scala
apache-2.0
4,034
/* * Copyright 2011-2018 GatlingCorp (http://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 applic...
wiacekm/gatling
gatling-core/src/main/scala/io/gatling/core/action/builder/IfBuilder.scala
Scala
apache-2.0
1,512
package skinny.controller.feature import org.scalatra.test.scalatest._ import skinny.Routes import skinny.controller.SkinnyApiController class CORSFeatureSpec extends ScalatraFlatSpec { behavior of "CORSFeature" class SampleController extends SkinnyApiController with CORSFeature { beforeAction() { con...
holycattle/skinny-framework
framework/src/test/scala/skinny/controller/feature/CORSFeatureSpec.scala
Scala
mit
742
package sbt // Todo share this this io.syntax private[sbt] trait IOSyntax0 extends IOSyntax1 { implicit def alternative[A, B](f: A => Option[B]): Alternative[A, B] = new Alternative[A, B] { def |(g: A => Option[B]) = (a: A) => f(a) orElse g(a) } } private[sbt] trait Alternative[A, B] { def |(...
Duhemm/sbt
sbt/src/main/scala/AllSyntax.scala
Scala
bsd-3-clause
480