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 structures import org.tartarus.snowball.EnglishSnowballStemmerFactory /** * Created by mechko on 12/12/14. */ object Stemmer { val stem = EnglishSnowballStemmerFactory.getInstance() def getStem(s : String): String = { stem.process(s) } } case class Word(w : String) { var stemmed = Stemmer.get...
mrmechko/ILF
src/main/scala/structures/Word.scala
Scala
mit
496
/* * Copyright 2016 rdbc contributors * * 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...
rdbc-io/rdbc
rdbc-api-scala/src/main/scala/io/rdbc/sapi/exceptions/RdbcException.scala
Scala
apache-2.0
770
package com.twitter.storehaus package benchmark import com.twitter.bijection._ import com.twitter.algebird._ import com.twitter.storehaus.cache.{ RollOverFrequencyMS, WriteOperationUpdateFrequency, HeavyHittersPercent, MutableCache } import scala.math.pow import com.twitter.storehaus.algebra._ import com.twitter....
twitter/storehaus
storehaus-benchmark/src/main/scala/com/twitter/storehaus/benchmark/WriteThroughCacheBenchmark.scala
Scala
apache-2.0
3,341
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.internal.scaladsl.broker.kafka import akka.actor.ActorSystem import akka.persistence.query.Offset import akka.stream.Materializer import akka.stream.scaladsl.Source import com.lightbend.internal.broker.TaggedOffse...
rstento/lagom
service/scaladsl/kafka/server/src/main/scala/com/lightbend/lagom/internal/scaladsl/broker/kafka/ScaladslRegisterTopicProducers.scala
Scala
apache-2.0
4,116
/* * 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 ...
akopich/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/client/HiveClientBuilder.scala
Scala
apache-2.0
2,196
package workbench import fs2._ import cats.effect.{Effect, IO, Sync} import java.util.concurrent.Executors import iolib.util.Resources.mkThreadFactory import scala.concurrent.ExecutionContext import scala.concurrent.duration._ object SignalsAndQueues { implicit val EC: ExecutionContext = ExecutionContext.fromExec...
scalavision/scunicorn
ideaWorkbench/src/main/scala/workbench/SignalsAndQueues.scala
Scala
apache-2.0
2,799
package spinoco.fs2.kafka.network import java.net.InetSocketAddress import java.util.Date import cats.effect.IO import fs2._ import scodec.bits.ByteVector import shapeless.tag import spinoco.protocol.kafka.Message.SingleMessage import spinoco.protocol.kafka.Request._ import spinoco.protocol.kafka.Response._ import sp...
Spinoco/fs2-kafka
src/test/scala/spinoco/fs2/kafka/network/BrokerConnection08SPec.scala
Scala
mit
4,814
/* * 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 ...
WindCanDie/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ExpressionParserSuite.scala
Scala
apache-2.0
28,722
package coursier.test import coursier.util.Properties import utest._ object PropertiesTests extends TestSuite { val tests = Tests { test("version") { assert(Properties.version.nonEmpty) } test("commitHash") { assert(Properties.commitHash.nonEmpty) } } }
alexarchambault/coursier
modules/tests/jvm/src/test/scala/coursier/test/PropertiesTests.scala
Scala
apache-2.0
292
/* * 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 ...
highfei2011/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisSuite.scala
Scala
apache-2.0
24,941
/* * Copyright 2006-2010 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
jeppenejsum/liftweb
framework/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/LoggingStatementWrappers.scala
Scala
apache-2.0
21,963
/* * Copyright 2001-2015 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 agreed to in ...
SRGOM/scalatest
project/GenCommonTestJS.scala
Scala
apache-2.0
2,400
/** * Licensed to the Minutemen Group under one or more contributor license * agreements. See the COPYRIGHT file distributed with this work for * additional information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in complian...
mohiva/silhouette
modules/provider-social/src/main/scala/silhouette/provider/social/SocialProviderRegistry.scala
Scala
apache-2.0
2,038
package org.bitcoins.testkit.fixtures import org.bitcoins.dlc.oracle.config.DLCOracleAppConfig import org.bitcoins.dlc.oracle.storage._ import org.bitcoins.testkit.{BitcoinSTestAppConfig, EmbeddedPg} import org.scalatest._ import scala.concurrent.Future case class DLCOracleDAOs( rValueDAO: RValueDAO, eventDA...
bitcoin-s/bitcoin-s
testkit/src/main/scala/org/bitcoins/testkit/fixtures/DLCOracleDAOFixture.scala
Scala
mit
1,099
object Test { trait Abc[T] implicit def abcLong: Abc[Long] = ??? implicit def abcInt: Abc[Int] = ??? class Clazz[U](arg: Abc[U])(implicit abc: Abc[U]) /*start*/new Clazz(abcLong)/*end*/ } //Test.Clazz[Long]
jastice/intellij-scala
scala/scala-impl/testdata/typeInference/localTypeInference/SCL12598.scala
Scala
apache-2.0
220
package argonaut import Data._ import scala.collection.immutable.{ SortedSet, SortedMap } import scala.collection.mutable.ArrayBuffer import scalaz._ import scalaz.std.AllInstances._ import scalaz.syntax.functor._ import scalaz.scalacheck.ScalaCheckBinding._ import scalaz.scalacheck.ScalazArbitrary.{UnitArbitrary => _...
etorreborre/argonaut
src/test/scala/argonaut/CodecSpecification.scala
Scala
bsd-3-clause
8,374
/* * 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/atlas
atlas-core/src/main/scala/com/netflix/atlas/core/validation/KeyLengthRule.scala
Scala
apache-2.0
1,419
/* * Copyright 2016 The BigDL 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 agr...
wzhongyuan/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/nn/SoftShrinkSpec.scala
Scala
apache-2.0
1,064
/* * Copyright (C) 2016-2017 Lightbend Inc. <http://www.lightbend.com> */ package akka.persistence.cassandra.journal import akka.actor.{ ExtendedActorSystem, Props } import akka.persistence.RecoveryCompleted import akka.persistence.cassandra.EventWithMetaData.UnknownMetaData import akka.persistence.cassandra.{ Cass...
ktoso/akka-persistence-cassandra
core/src/test/scala/akka/persistence/cassandra/journal/CassandraSerializationSpec.scala
Scala
apache-2.0
3,877
package com.horstmann.impatient object Utils7b { def percentOf(value: Double, rate: Double) = value * rate / 100 } class Employee7b { def raise(salary: Double, rate: Double) = salary * Utils7b.percentOf(salary, rate) }
bruckhaus/challenges
scala_challenges/src/main/scala/scala_for_the_impatient/exercise_7_1b.scala
Scala
mit
223
// The Computer Language Benchmarks Game // http://shootout.alioth.debian.org/ // Contributed by The Anh Tran // Updated for 2.8 by Rex Kerr import scala.actors.Futures.future object regexdna { def main(args: Array[String]) { var input = readAll val init_len = input length // strip header & newline ...
kragen/shootout
bench/regexdna/regexdna.scala-4.scala
Scala
bsd-3-clause
2,052
package com.clackjones.connectivitymap.rest import org.scalatra.ScalatraServlet import org.scalatra.scalate.ScalateSupport import org.json4s.{DefaultFormats, Formats} trait MainControllerComponent { val mainController = new MainController class MainController extends ScalatraServlet with ScalateSupport { pro...
hiraethus/scala-connectivity-map
src/main/scala/com/clackjones/connectivitymap/rest/MainController.scala
Scala
gpl-3.0
507
//Copyright 2014, Alex Khilko. //This file is part of MoonGene which is released under MIT. //See file LICENSE.TXT or go to www.alexkhilko.com for full license details. package com.moongene.services.core trait ExecutionTrait { import scala.concurrent.ExecutionContext object Implicit { implicit val ec: Exec...
InfiniteCode/MoonGene
src/gene/src/main/scala/com/moongene/services/core/ExecutionTrait.scala
Scala
mit
374
package com.github.dzhg.tedis.operations import com.github.dzhg.tedis.CommandExecutor import com.github.dzhg.tedis.commands.ServerCommands.PingCmd trait ServerOperations { this: CommandExecutor => def ping(msg: Option[String]): String = executeUnlocked(PingCmd(msg)) }
dzhg/tedis
src/main/scala/com/github/dzhg/tedis/operations/ServerOperations.scala
Scala
mit
276
package com.gravity.gdk.impression import com.gravity.gdk.util.hash import scala.util.Random /* ___...---'' ___...---'\'___ '' _.-'' _`'.______\\. /_.) )..- __..--'\\ ( __..--'' '-''\@ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ */ /** Generally internal use only. */ case class PageV...
GravityLabs/gdk-scala
src/main/scala/com/gravity/gdk/impression/PageViewGuid.scala
Scala
apache-2.0
483
import java.util.regex.Pattern import edu.stanford.nlp.ie.AbstractSequenceClassifier import edu.stanford.nlp.ie.crf.CRFClassifier import edu.stanford.nlp.ling.CoreLabel import scala.collection.JavaConverters._ /** * Created by alberto on 30/07/14. */ object ScalaNLP { //TODO: test private val stopword_path_all_l...
XI-lab/scala_utils
ScalaNLP/src/main/scala/ScalaNLP.scala
Scala
mit
2,873
package japgolly.microlibs.utils import utest._ object MemoTest extends TestSuite { override def tests = Tests { var i = 0 def inc() = {i += 1; i} def test(actual: Int, expect: Int): Unit = assert(actual == expect) "fn1" - { val f = Memo((_: Int) + inc()) test(f(0), 1) tes...
japgolly/microlibs-scala
utils/shared/src/test/scala/japgolly/microlibs/utils/MemoTest.scala
Scala
apache-2.0
1,035
package almond.protocol import com.github.plokhotnyuk.jsoniter_scala.core.JsonValueCodec import com.github.plokhotnyuk.jsoniter_scala.macros.JsonCodecMaker object Interrupt { case object Request case object Reply def requestType = MessageType[Request.type]("interrupt_request") def replyType = MessageType[Re...
alexarchambault/jupyter-scala
modules/shared/protocol/src/main/scala/almond/protocol/Interrupt.scala
Scala
apache-2.0
543
/* * Copyright 2016 The BigDL 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 agr...
yiheng/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/torch/LogSpec.scala
Scala
apache-2.0
1,982
//: ---------------------------------------------------------------------------- //: 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...
rintcius/knobs
core/src/main/scala/knobs/KeyError.scala
Scala
apache-2.0
899
/* * (C) Copyright IBM Corp. 2015 * * 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 ...
ibmsoe/spark-bench
SVM/src/main/scala/SVMDataGen.scala
Scala
apache-2.0
2,690
/** * Magmanics Licensing. This web application allows for centralized control * of client application activation, with optional configuration parameters * to control licensable features, and storage of supplementary information * about the client machine. Client applications may interface with this * central serv...
manicmonkey/licensing
Licensing-UI-Vaadin/src/main/scala/com/magmanics/licensing/ui/content/configuration/ConfigurationInfo.scala
Scala
gpl-3.0
1,408
/* * The MIT License * * Copyright (c) 2016 Fulcrum Genomics LLC * * 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 us...
fulcrumgenomics/dagr
tasks/src/main/scala/dagr/tasks/picard/UpdateVcfSequenceDictionary.scala
Scala
mit
1,602
package com.karasiq.bootstrap.icons import com.karasiq.bootstrap.BootstrapHtmlComponent import org.scalajs.dom import scalatags.JsDom.all._ final class BootstrapGlyphicon(name: String) extends BootstrapHtmlComponent[dom.html.Span] with IconModifier { override def renderTag(md: Modifier*): RenderedTag = { span(...
GWoodmansey/Bootstrap-Scala.js-Play-Modal-Example
Project/client/src/main/scala/com/karasiq/bootstrap/icons/BootstrapGlyphicon.scala
Scala
mit
509
package tastytest object BadRefinements { class FooIntString extends Refinements.Foo { type T = String type U = Int def foo = ("I am foo", 23) } val b2 = new Refinements.Bar[Long, Boolean].bar(new FooIntString) }
scala/scala
test/tasty/neg/src-2/BadRefinements2_fail.scala
Scala
apache-2.0
235
package com.tenderowls.match3 abstract class Rules { val width: Int val height: Int def randomValue: Cell def +(data: BoardData): Board = Board(this, data) }
fomkin/match3
match3/src/main/scala/com/tenderowls/match3/Rules.scala
Scala
lgpl-3.0
170
package freecli package argument import api.{Action, NoOp} import freecli.parser.CliParser import parser.ArgumentParsingErrors object ops extends AllOps trait AllOps extends dsl.Ops with parser.ParserOps with help.HelpOps { def runArgumentOrFail[A](dsl: ArgumentDsl[A])(args: Array[String]): A = CliParser.runOrF...
pavlosgi/freecli
core/src/main/scala/freecli/argument/ops.scala
Scala
apache-2.0
482
/* Copyright 2011 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 applicable law or...
markusgumbel/scalabioalg
core/src/test/scala/net/gumbix/bioinf/string/seq/test/BWTInvTest.scala
Scala
apache-2.0
987
package me.snov.sns.response import java.util.UUID import akka.http.scaladsl.model.StatusCodes.OK import akka.http.scaladsl.model.HttpResponse import me.snov.sns.model.Topic object TopicResponse extends XmlHttpResponse { def delete = { response( OK, <DeleteTopicResponse xmlns="http://sns.amazonaws....
s12v/sns
src/main/scala/me/snov/sns/response/TopicResponse.scala
Scala
apache-2.0
1,538
package me.heaton.profun.week2 import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import HigherOrderFunction._ @RunWith(classOf[JUnitRunner]) class HigherOtherFunctionTest extends FunSuite { test("sum double from 3 to 5 is 50")(assert(sum(x => x * x)(3, 5) === 50))...
heaton/hello-scala
src/test/scala/me/heaton/profun/week2/HigherOtherFunctionTest.scala
Scala
mit
792
package org.jetbrains.plugins.scala.lang.psi.implicits import com.intellij.openapi.progress.ProgressManager import com.intellij.psi.ResolveState import org.jetbrains.plugins.scala.lang.psi.ElementScope import org.jetbrains.plugins.scala.lang.psi.api.InferUtil.extractImplicitParameterType import org.jetbrains.plugins.s...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/implicits/ExtensionConversionData.scala
Scala
apache-2.0
4,880
/* * 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 ...
transitoAgora/sample-realtime-spark
src/main/scala/transitobh/scala/spark/transitobh/util/TwitterUtils.scala
Scala
mit
5,766
package com.dadrox.sbt.junit import org.scalatools.testing.Logger case class Color(value: String) { override val toString = value } object Colors { val Normal = Color("\u001b[m") val Green = Color("\u001b[32m") val Red = Color("\u001b[31m") val Yellow = Color("\u001b[33m") val Cyan = Color("\...
dadrox/sbt-junit
src/main/scala.bak/com/dadrox/sbt/junit/JunitLogger.scala
Scala
bsd-2-clause
2,309
package org.http4s package headers object `If-Match` extends HeaderKey.Default
hvesalai/http4s
core/src/main/scala/org/http4s/headers/If-Match.scala
Scala
apache-2.0
81
package scalan.imp object run { def main(args: Array[String]): Unit = { } }
scalan/scalan
lms-backend/core/src/main/resources/scalan/imp/run.scala
Scala
apache-2.0
81
package game2048.model class Cell { }
kirill85/Game2048
src/main/scala/game2048/model/Cell.scala
Scala
lgpl-3.0
42
package com.sksamuel.elastic4s.searches.queries import com.sksamuel.exts.OptionImplicits._ case class RangeQueryDefinition(field: String, boost: Option[Double] = None, timeZone: Option[String] = None, includeUpper: Option[...
FabienPennequin/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/searches/queries/RangeQueryDefinition.scala
Scala
apache-2.0
2,337
/* * 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 ...
tophua/spark1.52
core/src/main/scala/org/apache/spark/util/random/SamplingUtils.scala
Scala
apache-2.0
7,190
package org.phenoscape.owl import org.phenoscape.owl.Vocab.inheres_in import org.phenoscape.scowl._ import org.semanticweb.owlapi.model.{OWLAxiom, OWLClass, OWLEquivalentClassesAxiom, OWLOntology} import org.semanticweb.owlapi.reasoner.OWLReasonerFactory import org.semanticweb.owlapi.search.EntitySearcher import scal...
phenoscape/phenoscape-owl-tools
src/main/scala/org/phenoscape/owl/SubsumerGenerator.scala
Scala
mit
3,041
/* * Copyright (c) 2015 Snowplow Analytics Ltd. * All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache * License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at * http://www.a...
TimothyKlim/snowplow
3-enrich/stream-enrich/src/main/scala/com.snowplowanalytics.snowplow.enrich/kinesis/SnowplowTracking.scala
Scala
apache-2.0
5,345
package spinoco.protocol.mail.header.codec import org.scalacheck.Prop._ import org.scalacheck.Properties object RFC2047CodecSpec extends Properties("RFC2047Codec") { import spinoco.protocol.mail.SpecUtil._ implicit val codec = RFC2047Codec.quotedCodec property("decode.quoted.text") = protect { verify( ...
Spinoco/protocol
mail/src/test/scala/spinoco/protocol/mail/header/codec/RFC2047CodecSpec.scala
Scala
mit
525
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-lambda/geomesa-lambda-datastore/src/test/scala/org/locationtech/geomesa/lambda/InMemoryOffsetManager.scala
Scala
apache-2.0
2,605
/* * Copyright (c) 2002-2018 "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 Foundatio...
HuangLS/neo4j
community/cypher/frontend-2.3/src/main/scala/org/neo4j/cypher/internal/frontend/v2_3/symbols/BooleanType.scala
Scala
apache-2.0
1,036
package demo package pages import chandu0101.scalajs.react.components.mixins.AsyncLoad import demo.components.LeftNavPage import demo.routes.{LeftRoute, ReactInfiniteRouteModule} import japgolly.scalajs.react.extra.router2.RouterCtl import japgolly.scalajs.react.{BackendScope, ReactComponentB} object ReactInfinitePag...
tpdi/scalajs-react-components
demo/src/main/scala/demo/pages/ReactInfinitePage.scala
Scala
apache-2.0
912
package junto import org.rogach.scallop._ class JuntoOptions(arguments: Seq[String]) extends ScallopConf(arguments) { version("scalanlp-junto 0.0.1") banner("""Minimalist Scala-based Label Propagation implementation""") footer("\\nSee https://github.com/scalanlp/junto for more details") // The name of the fi...
scalanlp/junto
src/main/scala/junto/JuntoOptions.scala
Scala
apache-2.0
1,887
/* * Copyright 2016 Coursera 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...
coursera/naptime
naptime-graphql/src/main/scala/org/coursera/naptime/ari/graphql/schema/NaptimeTopLevelResourceField.scala
Scala
apache-2.0
6,703
package io.soheila.um.daos.auths import java.time.LocalDateTime import java.util.UUID import io.soheila.um.entities.AuthToken import scala.concurrent.Future /** * Give access to the [[AuthToken]] object. * This token can be used for user activation or password reset where a one time token is required. */ trait A...
esfand-r/soheila-um
src/main/scala/io/soheila/um/daos/auths/AuthTokenDAO.scala
Scala
apache-2.0
1,108
package com.tribbloids.spookystuff.extractors import scala.runtime.AbstractPartialFunction //this entire file is created because default result of .lift & .unlift are not serializable trait PartialFunctionWrapper[-T, +R] extends PartialFunction[T, R] { def partialFunction: scala.PartialFunction[T, R] override fi...
tribbloid/spookystuff
core/src/main/scala/com/tribbloids/spookystuff/extractors/PartialFunctionWrapper.scala
Scala
apache-2.0
1,759
package edu.uw.at.iroberts.wirefugue.pcap /** Methods to compute and validate RFC 1071 Internet checksums. * * Created by Ian Robertson <iroberts@uw.edu> on 5/18/17. */ object InternetChecksum { def onesSum(data: IndexedSeq[Byte]): Short = { import ByteSeqOps._ // Try to be somewhat efficient here. Su...
robertson-tech/wirefugue
sensor/src/main/scala/edu/uw/at/iroberts/wirefugue/pcap/InternetChecksum.scala
Scala
gpl-3.0
1,230
package fi.veikkaus.dcontext import java.io.Closeable /** * Created by arau on 25.5.2016. */ class Contextual(val contextName:String) { def cval[T](vname:String)(make : MutableDContext => T) = new ContextVal(contextName+"."+vname, (c:MutableDContext) => (make(c), None)) def cvalc[T](vname:String)(make : ...
VeikkausOy/dcontext
dcontext/src/main/scala/fi/veikkaus/dcontext/Contextual.scala
Scala
bsd-3-clause
697
package com.twitter.finagle.http.exp.routing import com.twitter.finagle.Service import com.twitter.finagle.exp.routing.{Request => Req, Response => Rep, Route => BaseRoute} import com.twitter.finagle.http.{Method, Request, Response} import com.twitter.util.Future import com.twitter.util.routing.{Found, NotFound} impor...
twitter/finagle
finagle-http/src/test/scala/com/twitter/finagle/http/exp/routing/HttpRouterTest.scala
Scala
apache-2.0
6,528
/* * Copyright (c) 2014-2018 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, and * you may not use this file except in compliance with the Apache License * Version 2.0. You may obtain a copy of the Apache License Version 2.0 at * http://www.apache....
snowplow/iglu
2-repositories/iglu-server/src/main/scala/com.snowplowanalytics.iglu.server/SwaggerDocService.scala
Scala
apache-2.0
2,366
/* NSC -- new Scala compiler * Copyright 2005-2011 LAMP/EPFL * @author Alexander Spoon */ package spark.repl import scala.tools.nsc._ import scala.tools.nsc.interpreter._ import Predef.{ println => _, _ } import java.io.{ BufferedReader, FileReader, PrintWriter } import scala.sys.process.Process import session._ ...
hobinyoon/spark-0.7.0
repl/src/main/scala/spark/repl/SparkILoop.scala
Scala
bsd-3-clause
35,320
package com.javatoscala import org.scalatest.Matchers import org.scalatest.FunSpec class TypeInferenceSpec extends FunSpec with Matchers { it("should know how to infer the type from an assignment"){ val meh = 1 println(s"meh: ${meh + 1}") } }
matyb/java-to-scala
java-to-scala/src/test/scala/com/javatoscala/TypeInferenceSpec.scala
Scala
mit
262
/* * Copyright (c) 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....
jramos/snowplow
4-storage/kinesis-elasticsearch-sink/src/main/scala/com.snowplowanalytics.snowplow.storage.kinesis/elasticsearch/FailureUtils.scala
Scala
apache-2.0
1,315
/** * 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...
noslowerdna/kafka
core/src/main/scala/kafka/tools/ConsumerPerformance.scala
Scala
apache-2.0
12,865
case class Foo(s: String) object Test { def f1 = { import scala.collection.JavaConversions.* val map: Map[Foo, String] = Map(Foo("a") -> "a", Foo("b") -> "b") val v = map.get("a") // should be a type error, actually returns null } def f2 = { import scala.collection.convert.wrapAsScala.* val...
dotty-staging/dotty
tests/untried/neg/saferJavaConversions.scala
Scala
apache-2.0
604
trait X trait Y object test: def f(using x: X) = ??? object instances { given y as Y = ??? } locally { given xFromY(using y: Y) as X = ??? f(using xFromY) // error } locally { object instances2 { given xFromY(using Y) as X = ??? } f // error }
som-snytt/dotty
tests/neg/missing-implicit2.scala
Scala
apache-2.0
288
import sbt._ import Keys._ import Scope.ThisScope object Sxr { val sxrConf = config("sxr") hide val sxr = TaskKey[File]("sxr") val sourceDirectories = TaskKey[Seq[File]]("sxr-source-directories") lazy val settings: Seq[Setting[_]] = inTask(sxr)(inSxrSettings) ++ baseSettings def baseSettings = Seq( library...
gilt/xsbt
project/Sxr.scala
Scala
bsd-3-clause
1,207
/* * 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 ...
mdespriee/spark
core/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala
Scala
apache-2.0
29,265
package com.nabijaczleweli.fancymagicks.entity import com.nabijaczleweli.fancymagicks.element.ElementalDamageSource import com.nabijaczleweli.fancymagicks.element.elements.Element import com.nabijaczleweli.fancymagicks.potion.PotionDamageAura import com.nabijaczleweli.fancymagicks.util.PacketUtil.{BBISUtil, BBOSUtil} ...
nabijaczleweli/Magicks
src/main/scala/com/nabijaczleweli/fancymagicks/entity/EntityForwardElementalProjectile.scala
Scala
mit
4,689
package ml.sparkling.graph.api.operators.measures import org.apache.spark.graphx.{Graph, EdgeTriplet} import scala.reflect.ClassTag /** * Similarity measure of two vertices (or measure for given edge) * Created by Roman Bartusiak (roman.bartusiak@pwr.edu.pl http://riomus.github.io). */ trait EdgeMeasure[O,V] exte...
sparkling-graph/sparkling-graph
api/src/main/scala/ml/sparkling/graph/api/operators/measures/EdgeMeasure.scala
Scala
bsd-2-clause
1,590
package com.dzegel.DynamockServer.service import com.dzegel.DynamockServer.service.ExpectationService._ import com.dzegel.DynamockServer.types._ import com.google.inject.{ImplementedBy, Inject, Singleton} import scala.util.Try @ImplementedBy(classOf[DefaultExpectationService]) trait ExpectationService { def regist...
dzegel/DynamockServer
src/main/scala/com/dzegel/DynamockServer/service/ExpectationService.scala
Scala
apache-2.0
6,064
package chapter.eighteen import ExerciseTwo._ import org.scalatest._ import org.scalatest.junit.JUnitRunner import org.junit.runner.RunWith @RunWith(classOf[JUnitRunner]) class ExerciseTwoSpec extends FlatSpec with Matchers { "function" should "" in { } }
deekim/impatient-scala
src/test/scala/chapter/eighteen/ExerciseTwoSpec.scala
Scala
apache-2.0
264
/* * ****************************************************************************** * Copyright 2012-2013 SpotRight * * 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 * * ...
SpotRight/Polidoro
src/main/scala/com/spotright/polidoro/testing/keyspaces/KeyspaceLoader.scala
Scala
apache-2.0
1,904
package com.eevolution.context.dictionary.infrastructure.repository import com.eevolution.context.dictionary.domain.model.BrowseFieldTrl import com.eevolution.context.dictionary.infrastructure.db.DbContext._ /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This program is...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/repository/BrowseFieldTrlMapping.scala
Scala
gpl-3.0
1,764
/******************************************************************************* * Copyright 2010 Maxime Lévesque * * 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://...
xuwei-k/Squeryl
src/main/scala/org/squeryl/adapters/MySQLAdapter.scala
Scala
apache-2.0
4,133
/* * * * 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 "L...
sunlibin/incubator-eagle
eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamProducer.scala
Scala
apache-2.0
9,826
package org.http4s import cats.{Eq, Order, Show} import cats.implicits.{catsSyntaxEither => _, _} import java.nio.charset.StandardCharsets import org.http4s.Uri._ import org.http4s.internal.parboiled2.CharPredicate.{Alpha, Digit} import org.http4s.internal.parboiled2.{Parser => PbParser} import org.http4s.parser._ imp...
aeons/http4s
core/src/main/scala/org/http4s/Uri.scala
Scala
apache-2.0
13,459
package k2b6s9j.singingKIA.Songs object BuddyHolly { }
kepler0/singingKIA
src/main/scala/k2b6s9j/singingKIA/Songs/BuddyHolly.scala
Scala
mit
57
object Lists { def last[T](list: List[T]): T = list match { case List() => throw new Exception() case x :: List() => x case x :: xs => last(xs) } def init[T](list: List[T]): List[T] = list match { case List() => list case x :: List() => List() case x :: xs => x :: init(xs) } def conc...
arialdomartini/scala-bits
src/main/scala/Lists.scala
Scala
gpl-3.0
3,187
/* * 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 ...
tzulitai/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/api/TableITCase.scala
Scala
apache-2.0
6,588
package edu.osu.cse.groenkeb.logic.proof.rules import edu.osu.cse.groenkeb.logic.Sentence import edu.osu.cse.groenkeb.logic.proof.Assumption sealed abstract class RuleParam(val goal: Sentence) /** * Parameter that requires any proof of 'c' from any set of premises. */ case class AnyProof(c: Sentence) extends RulePa...
bgroenks96/PropLogic
core/src/main/scala/edu/osu/cse/groenkeb/logic/proof/rules/ruleParams.scala
Scala
mit
1,226
import scala.math.BigInt._ import scala.util.Random /** * 为了在使用probablePrime(100,Random)获取随机素数时不在probablePrime和Radom之前使用任何限定符,你需要引入什么? */ probablePrime(100,Random)
vernonzheng/scala-for-the-Impatient
src/Chapter01/exercise06.scala
Scala
mit
231
package com.atomist.source.git.domain import com.fasterxml.jackson.annotation.JsonProperty case class Links(self: LinksHref, html: LinksHref, @JsonProperty("pull_request") pullRequest: LinksHref)
atomist/artifact-source
src/main/scala/com/atomist/source/git/domain/Links.scala
Scala
gpl-3.0
197
package com.chatwork.quiz.misc /** * ワードをカウントするオブジェクト。 */ object WordCounter { /** * 文字列から単語数をカウントする。 * * @param words 文字列 * @return 単語がキー、単語数がヴァリューのマップ */ def countWords(words: List[String]): Map[String, Int] = ??? }
chatwork/scala-quiz
src/main/scala/com/chatwork/quiz/misc/WordCounter.scala
Scala
mit
359
package latis.reader import latis.dm.Dataset import latis.ops.Operation import latis.util._ import com.typesafe.scalalogging.LazyLogging import latis.reader.tsml.ml.TsmlResolver import latis.util.ReflectionUtils import latis.reader.tsml.TsmlReader import latis.util.CacheManager import java.net.URL import latis.reader....
dlindhol/LaTiS
src/main/scala/latis/reader/DatasetAccessor.scala
Scala
epl-1.0
4,593
/* * 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 ...
ueshin/apache-spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlanVisitor.scala
Scala
apache-2.0
2,874
package com.typesafe.slick.testkit.tests import org.junit.Assert._ import com.typesafe.slick.testkit.util.{TestkitTest, TestDB} class ColumnDefaultTest(val tdb: TestDB) extends TestkitTest { import tdb.profile.simple._ case class User(id: Int, first: String, last: String) object A extends Table[(Int, String, ...
boldradius/slick
slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/ColumnDefaultTest.scala
Scala
bsd-2-clause
706
package org.jetbrains.plugins.scala.lang.resolve2 /** * Pavel.Fatin, 02.02.2010 */ class FunctionNamedTest extends ResolveTestBase { override def folderPath: String = { super.folderPath + "function/named/" } def testClash1 = doTest def testClash2 = doTest def testClash3 = doTest def testExcess1 = ...
triggerNZ/intellij-scala
test/org/jetbrains/plugins/scala/lang/resolve2/FunctionNamedTest.scala
Scala
apache-2.0
570
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ import sbt._ import Keys._ import buildinfo.BuildInfo object Dependencies { val akkaVersion = "2.5.1" val akkaHttpVersion = "10.0.6" val playJsonVersion = "2.6.0-M7" val logback = "ch.qos.logback" % "logback-classic" % "1.2.3" v...
richdougherty/playframework
framework/project/Dependencies.scala
Scala
apache-2.0
10,395
/* * 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/com/intel/oap/tags/CommentOnContextPR.scala
Scala
apache-2.0
935
// Copyright (C) 2015, codejitsu. package net.codejitsu.tasks import net.codejitsu.tasks.dsl._ /** * Head task. * * @param hosts target hosts * @param target target file * @param usingSudo true, if task have to be started with sudo * @param usingPar true, if parallel execution required. * @param user user */...
codejitsu/tasks
tasks-dsl/src/main/scala/net/codejitsu/tasks/Head.scala
Scala
apache-2.0
1,304
package com.codacy.client.bitbucket.util import java.net.URI import play.api.data.validation.ValidationError import play.api.libs.json.{Json, Reads, Writes} import scala.language.implicitConversions object Implicits { implicit def enumWrites[E <: Enumeration#Value]: Writes[E] = Writes((e: E) => Json.toJson(e.toS...
rtfpessoa/bitbucket-scala-client
src/main/scala/com/codacy/client/bitbucket/util/Implicits.scala
Scala
apache-2.0
868
/* This file is part of Intake24. Copyright 2015, 2016 Newcastle 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...
digitalinteraction/intake24
FoodDataServices/src/main/scala/uk/ac/ncl/openlab/intake24/services/foodindex/portuguese/SplitterImpl_pt_PT.scala
Scala
apache-2.0
1,058
package gateway.restapi.utils case class GatewayException(message: String = "", cause: Throwable = null) extends Exception(message, cause) object PredefGateway { @inline final def require(requirement: Boolean, message: => Any) { if (!requirement) throw new GatewayException("requirement failed: "+ message)...
kartavtcev/gateway-sketch
src/main/scala/gateway/restapi/utils/GatewayException.scala
Scala
mit
326
package db import javax.inject.{Inject, Singleton} import io.flow.dependency.v0.models.{Library, SyncEvent, VersionForm} import io.flow.postgresql.OrderBy import io.flow.common.v0.models.UserReference import com.google.inject.Provider import db.generated.ProjectLibraryForm import io.flow.dependency.actors.ProjectActor...
flowcommerce/dependency
api/app/db/InternalProjectLibrariesDao.scala
Scala
mit
7,298
// See LICENSE for license details. package sifive.blocks.devices.i2c import Chisel.{defaultCompileOptions => _, _} import freechips.rocketchip.util.CompileOptions.NotStrictInferReset import freechips.rocketchip.config.Field import freechips.rocketchip.diplomacy._ import freechips.rocketchip.subsystem.{BaseSubsystem} ...
sifive/sifive-blocks
src/main/scala/devices/i2c/I2CPeriphery.scala
Scala
apache-2.0
809
/** * Copyright 2015, deepsense.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
deeplang/src/main/scala/io/deepsense/deeplang/doperables/MultiColumnEstimator.scala
Scala
apache-2.0
4,785
package rewriting import ir._ import ir.ast._ import lift.arithmetic.SizeVar import opencl.executor.Compile import opencl.ir._ import org.junit.Assert._ import org.junit.Test class TestLowering { // To avoid the kernel with the data race in gemv, kmeans and nbody that // doesn't compile using private memory for ...
lift-project/lift
src/test/rewriting/TestLowering.scala
Scala
mit
11,521