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 对数.step1 object Runner { class 类型匹配[T] object 类型匹配 { def apply[T1, T2]: (类型匹配[T1], 类型匹配[T2]) = (new 类型匹配[T1], new 类型匹配[T2]) def apply[T](i: (类型匹配[T], 类型匹配[T])): List[类型匹配[T]] = List(i._1, i._2) } class 底数1 extends 底数Positive[底数1, 底数One1] class 底数One1 extends 底数One[底数1] clas...
djx314/ubw
a24-五法/src/main/scala/对数/step1/Runner.scala
Scala
bsd-3-clause
5,476
package nl.malienkolders.htm.battle package snippet import comet._ import nl.malienkolders.htm.lib.model._ import net.liftweb._ import common._ import util._ import http._ import Helpers._ import dispatch._ import Http._ import json._ import scala.concurrent._ import ExecutionContext.Implicits.global ...
hema-tournament-manager/htm
htm-battle/src/main/scala/nl/malienkolders/htm/battle/snippet/PickFight.scala
Scala
apache-2.0
1,646
package akka.dispatch.verification import scala.collection.mutable.HashMap /** * User-defined fingerprint for uniquely describing how one or more safety * violations manifests. */ trait ViolationFingerprint { def matches(other: ViolationFingerprint) : Boolean // Return the names of all nodes whose internal sta...
NetSys/demi-applications
interposition/src/main/scala/verification/minification/TestOracle.scala
Scala
bsd-2-clause
3,318
import com.typesafe.sbt.{ GitPlugin, SbtScalariform } import de.heikoseeberger.sbtheader.HeaderPlugin import de.heikoseeberger.sbtheader.license.Apache2_0 import sbt._ import sbt.plugins.JvmPlugin import sbt.Keys._ import scalariform.formatter.preferences.{ AlignSingleLineCaseStatements, DoubleIndentClassDeclaration } ...
schemasafe/troy
project/Build.scala
Scala
apache-2.0
3,168
package coursier.cli.search import caseapp.core.RemainingArgs import coursier.cli.{CoursierCommand, CommandGroup} import coursier.cli.Util.ValidatedExitOnError import coursier.install.Channels import coursier.util.Sync object Search extends CoursierCommand[SearchOptions] { override def group: String = CommandGroup...
coursier/coursier
modules/cli/src/main/scala/coursier/cli/search/Search.scala
Scala
apache-2.0
1,198
package com.twitter.scalding.reducer_estimation import scala.collection.JavaConverters._ import cascading.flow.FlowStep import cascading.tap.{ Tap, CompositeTap } import cascading.tap.hadoop.Hfs import org.apache.hadoop.mapred.JobConf import org.slf4j.LoggerFactory object RuntimeReducerEstimator { val RuntimePerRed...
sid-kap/scalding
scalding-core/src/main/scala/com/twitter/scalding/reducer_estimation/RuntimeReducerEstimator.scala
Scala
apache-2.0
4,242
/*********************************************************************** * Copyright (c) 2013-2015 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 which * accompanies this distribution and is ...
drackaer/geomesa
geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/commands/DescribeCommand.scala
Scala
apache-2.0
2,365
package uk.gov.gds.ier.transaction.overseas.lastUkAddress import uk.gov.gds.ier.transaction.overseas.OverseasControllers import uk.gov.gds.ier.controller.routes.ExitController import com.google.inject.{Inject, Singleton} import uk.gov.gds.ier.config.Config import uk.gov.gds.ier.security.EncryptionService import uk.gov...
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/transaction/overseas/lastUkAddress/LastUkAddressStep.scala
Scala
mit
1,836
package com.twitter.finatra.http.tests.integration.doeverything.main.domain import com.twitter.finatra.json.FinatraObjectMapper import com.twitter.finatra.request.QueryParam import javax.inject.Inject case class RequestWithInjectedMapper( @Inject mapper: FinatraObjectMapper, @QueryParam foo: Option[String])
syamantm/finatra
http/src/test/scala/com/twitter/finatra/http/tests/integration/doeverything/main/domain/RequestWithInjectedMapper.scala
Scala
apache-2.0
315
package com.nexus.webserver.handlers import io.netty.channel.{ChannelHandlerContext, SimpleChannelInboundHandler} import io.netty.handler.codec.http.{HttpResponseStatus, FullHttpRequest} import com.nexus.webserver.netty.RoutedHandler import com.nexus.webserver.WebServerUtils /** * No description given * * @author ...
crvidya/nexus-scala
src/main/scala/com/nexus/webserver/handlers/WebServerHandlerTest.scala
Scala
mit
563
package com.velorin.actors import akka.actor.Actor import akka.actor.ActorRef import java.net.URL import com.velorin.conceptmining.ConceptMiner import com.velorin.conceptmining.NLPConceptMiner class ConceptMinerActor(actorRef: ActorRef) extends Actor{ def receive = { case URLEvent(url: URL, text: String, setOf...
AmirHooshangi/ACMG-S
src/main/scala/com/velorin/actors/ConceptMinerActor.scala
Scala
gpl-3.0
510
/* * 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/optim/PredictorSpec.scala
Scala
apache-2.0
11,823
package github.gphat.censorinus.example import github.gphat.censorinus.StatsDClient import java.util.UUID import scala.util.Random object StatsD { def main(args: Array[String]): Unit = { val client = new StatsDClient(asynchronous=false) client.gauge("foo.bar.baz_gauge", 10.0) client.increment("foo.ba...
gphat/censorinus
src/main/scala/github/gphat/censorinus/example/StatsD.scala
Scala
mit
484
package com.github.mnotracker.ui import android.app.Activity import android.content.Context import android.support.v4.app.FragmentActivity import com.github.mnotracker.{R, TypedFindView} import com.github.mnotracker.Logs.logd import scala.util.Try class MainActivity extends FragmentActivity with TypedFindView with ...
mnotracker/mnotracker
src/main/scala/com/github/mnotracker/ui/MainActivity.scala
Scala
bsd-2-clause
2,120
import sbt._ class ProcessProject(info: ProjectInfo) extends DefaultProject(info) { val sc = "org.scala-tools.testing" % "scalacheck" % "1.5" % "test" val sp = "org.scala-tools.testing" % "specs" % "1.6.0" % "test" override def managedStyle = ManagedStyle.Maven val publishTo = "Scala Tools Nexus" at "http://nexus...
harrah/process
project/build/ProcessProject.scala
Scala
bsd-3-clause
430
/** * Copyright (C) 2015 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/xforms/xbl/BindingIndex.scala
Scala
lgpl-2.1
8,416
/* * Copyright (C) 2012-2014 Typesafe Inc. <http://www.typesafe.com> */ package scala.async package run import org.junit.Test import scala.language.{postfixOps, reflectiveCalls} import scala.tools.nsc.reporters.StoreReporter class WarningsSpec { @Test // https://github.com/scala/async/issues/74 def noPure...
anand-singh/async
src/test/scala/scala/async/run/WarningsSpec.scala
Scala
bsd-3-clause
2,495
/* * 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
mongodb/src/main/scala/quasar/physical/mongodb/expression/Check.scala
Scala
apache-2.0
7,525
/* * Copyright 2014-2021 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...
brharrington/atlas
atlas-webapi/src/main/scala/com/netflix/atlas/webapi/GraphRequestActor.scala
Scala
apache-2.0
3,382
/** * Copyright 2015 Thomson Reuters * * 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 ag...
nruppin/CM-Well
server/cmwell-it/src/it/scala/cmwell/it/DeletionTests.scala
Scala
apache-2.0
12,284
class A { def m() { var b: Boolean = ! 1 } } object Main { def main(args: Array[String]) { } }
tobast/compil-petitscala
tests/typing/bad/testfile-bang1-1.scala
Scala
gpl-3.0
95
package service /** * This stores overall process of an ontology * fetch, parsing and persistence flow. */ case class FetchResult( success: Int = 0, // Fail cases duplicate: Int = 0, notFound: Int = 0, failed400x: Int = 0, failed500x: Int = 0, timeout: Int = 0, connection: Int = 0, notParsable: I...
ubenzer/tezapp
app/service/FetchResult.scala
Scala
agpl-3.0
856
package net.scalytica.symbiotic.fs import java.io.{File => JFile} import java.util.UUID import akka.actor.ActorSystem import akka.stream.ActorMaterializer import akka.stream.scaladsl.FileIO import com.typesafe.config.ConfigFactory import net.scalytica.symbiotic.api.types.{File, FileId, ManagedMetadata} import net.sca...
kpmeen/symbiotic
symbiotic-fs/src/test/scala/net/scalytica/symbiotic/fs/FileSystemIOSpec.scala
Scala
apache-2.0
2,397
/* * 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 ...
bravo-zhang/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/command/DataWritingCommand.scala
Scala
apache-2.0
2,286
package com.fhuertas.scalacourse /** * Hello world! * */ object App { def main(args:Array[String]): Unit = { println( "Hello World!" ) } }
fhuertas/ScalaCourse0
m0/src/main/scala/com/fhuertas/scalacourse/App.scala
Scala
apache-2.0
151
/* * 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 ...
BryanCutler/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/finishAnalysis.scala
Scala
apache-2.0
4,468
package com.twitter.finagle.netty4.codec import com.twitter.finagle.Failure import com.twitter.finagle.codec.FrameEncoder import com.twitter.finagle.netty4.BufAsByteBuf import com.twitter.util.NonFatal import io.netty.channel.{ChannelPromise, ChannelHandlerContext, ChannelOutboundHandlerAdapter} import io.netty.channe...
sveinnfannar/finagle
finagle-netty4/src/main/scala/com/twitter/finagle/netty4/codec/EncodeHandler.scala
Scala
apache-2.0
1,550
package org.skycastle.core.entity.types import org.skycastle.core.entity.Entity import com.jme3.asset.AssetManager import tools.nsc.io.{Directory, File} import org.skycastle.util.Logging import org.skycastle.util.parameters.Parameters /** * Keeps track of available entity types. */ object ArchetypeManager extends L...
zzorn/skycastle
src/main/scala/org/skycastle/core/entity/types/ArchetypeManager.scala
Scala
gpl-2.0
1,470
package io.github.yzernik.bitcoinscodec.messages import io.github.yzernik.bitcoinscodec.CodecSuite import io.github.yzernik.bitcoinscodec.structures._ class MemPoolSpec extends CodecSuite { "MemPool codec" should { "roundtrip" in { val mempool = MemPool() roundtrip(MemPool.codec(1), mempool) ...
yzernik/bitcoin-scodec
src/test/scala/io/github/yzernik/bitcoinscodec/messages/MemPoolSpec.scala
Scala
mit
392
/* * Copyright 2016 Dennis Vriend * * 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...
dnvriend/sbt-scaffold-play
src/main/scala/com/github/dnvriend/scaffold/play/scaffolds/ScaffoldResult.scala
Scala
apache-2.0
672
package controllers.utils import scala.util.{Failure, Success, Try} import reactivemongo.core.commands.LastError import reactivemongo.core.errors.GenericDatabaseException class Option2TryWrapper[A](option: Option[A]) { def orFailWithMessage(msg: String): Try[A] = { option match { case Some(a) => Success(...
tsechov/shoehorn
app/controllers/utils/TryWrappers.scala
Scala
apache-2.0
891
/* * Copyright 2012 Sanjin Sehic * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
saserr/sleazy
src/scala/library/Char.scala
Scala
apache-2.0
1,950
package scalaz.stream import org.scalacheck.Prop._ import org.scalacheck.{Gen, Arbitrary, Properties} import scalaz._ import scalaz.scalacheck.ScalazProperties._ import scalaz.syntax.equal._ import scalaz.syntax.show._ import scalaz.std.list._ import scalaz.std.string._ import scalaz.std.anyVal._ import java.nio.chars...
wemrysi/scalaz-stream
src/test/scala/scalaz/stream/BytesSpec.scala
Scala
mit
7,856
package sativum import java.io.File import java.net.URI import java.sql.{DriverManager, SQLException} import java.text.SimpleDateFormat import java.util.Date import com.google.common.io.Resources import generic.{PeapodGenerator, Spark} import org.apache.hadoop.fs.{FileSystem, Path} import org.apache.hadoop.hive.conf....
mindfulmachines/sativum
src/test/scala/sativum/HiveTest.scala
Scala
mit
4,065
/* Copyright 2009-2021 EPFL, Lausanne */ object Array3 { def foo(i: Int): Array[Int] = { require(i > 0) val a = Array.fill(i)(0) a } ensuring(res => res.length == i) def bar(i: Int): Int = { require(i > 0) val b = foo(i) b(0) } }
epfl-lara/stainless
frontends/benchmarks/verification/valid/MicroTests/Array3.scala
Scala
apache-2.0
266
trait T class C { self: T => /*start*/this/*end*/ } () //C with T
ilinum/intellij-scala
testdata/typeInference/bugs/SCL2267B.scala
Scala
apache-2.0
69
package org.jetbrains.plugins.scala package codeInsight package intention package controlFlow import java.util import com.intellij.codeInsight.PsiEquivalenceUtil import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Projec...
JetBrains/intellij-scala
scala/codeInsight/src/org/jetbrains/plugins/scala/codeInsight/intention/controlFlow/MergeIfToOrIntention.scala
Scala
apache-2.0
3,947
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
goldmedal/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/aggregate/PercentileSuite.scala
Scala
apache-2.0
14,770
/* * 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 ...
kiszk/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
Scala
apache-2.0
69,781
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
gyfora/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/logical/FlinkLogicalSink.scala
Scala
apache-2.0
2,999
package org.scalacoin.marshallers.rpc.bitcoincore.mining import org.scalacoin.protocol.rpc.bitcoincore.mining.GetMiningInfo import org.scalatest.{MustMatchers, FlatSpec} import spray.json._ /** * Created by Tom on 1/13/2016. */ class MiningInfoMarshallerTest extends FlatSpec with MustMatchers { val str = """ ...
TomMcCabe/scalacoin
src/test/scala/org/scalacoin/marshallers/rpc/bitcoincore/mining/MiningInfoMarshallerTest.scala
Scala
mit
2,320
package feh.tec.astar.vis import java.awt.Point import feh.tec.astar.{SolutionHistoryRecord, HistoryRecord, VisualizeHistory, History} import feh.util.ScopedState import scala.collection.mutable /** Generic [[VisualizeHistory]] implementation. */ abstract class AWTVisualizeHistory[T] extends VisualizeHistory[T]{ ...
fehu/int-sis--AStar
a-star/src/main/scala/feh/tec/astar/vis/AWTVisualizeHistory.scala
Scala
mit
1,474
/* * Copyright 2018 Vladimir Konstantinov * * 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 ...
yet-another-cafebabe/korro
src/test/scala/com/github/illfaku/korro/util/net/MimeTypesSpec.scala
Scala
lgpl-3.0
1,316
package org.scalamu.core.process import java.lang.management.{ManagementFactory, MemoryNotificationInfo, MemoryPoolMXBean} import javax.management.openmbean.CompositeData import javax.management.{Notification, NotificationEmitter, NotificationListener} import org.scalamu.core.die import org.scalamu.core.api.OutOfMemo...
sugakandrey/scalamu
core/src/main/scala/org/scalamu/core/process/MemoryWatcher.scala
Scala
gpl-3.0
1,762
/* * 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 ...
dbtsai/spark
core/src/main/scala/org/apache/spark/api/java/JavaRDDLike.scala
Scala
apache-2.0
28,153
package com.enkidu.lignum.parsers.ast.statement.declarator import com.enkidu.lignum.parsers.ast.expression.discardable.dimension.Dimension import com.enkidu.lignum.parsers.ast.statement.parameter.Parameter case class ArrayMethodDeclarator(name: String, parameters: Seq[Parameter], dimensions: Seq[Dimension]) extends F...
marek1840/java-parser
src/main/scala/com/enkidu/lignum/parsers/ast/statement/declarator/ArrayMethodDeclarator.scala
Scala
mit
482
object GenericFunction { def foo[T](x: T => String) = "45" foo[Int](/*start*/_/*end*/.toString) } //Int
ilinum/intellij-scala
testdata/typeInference/expected/placeholder/GenericFunction.scala
Scala
apache-2.0
108
package com.twitter.lsh import com.twitter.lsh.hashing.EuclideanHashFamily import com.twitter.lsh.stores.{HashTableManagerMemory, VectorStoreMemory} import com.twitter.lsh.vector.{IndexedVector, VectorMath, LshVector} /** * LSH Builder that uses Euclidean Distance on Regular Vectors * This is the best starting pl...
richwhitjr/DistributedLSH
src/main/scala/com/twitter/lsh/EuclideanLsh.scala
Scala
apache-2.0
1,048
package api import java.io.File import java.nio.file.{ Files, Paths, StandardCopyOption } import java.util.UUID import api.common.DsmoqSpec import dsmoq.controllers.AjaxResponse import dsmoq.{ AppConf, persistence } import dsmoq.persistence.OwnerType import dsmoq.services.json.{ DatasetData, RangeSlice } import org.j...
nkawa/dsmoq
server/apiServer/src/test/scala/api/DatasetAppSpec.scala
Scala
apache-2.0
20,009
/* * Copyright (C) 2016-2017 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.scaladsl.persistence import scala.concurrent.duration._ import scala.concurrent.Future import akka.actor.ActorRef import java.io.NotSerializableException import akka.actor.NoSerializationVerificationNeeded import a...
edouardKaiser/lagom
persistence/scaladsl/src/main/scala/com/lightbend/lagom/scaladsl/persistence/PersistentEntityRef.scala
Scala
apache-2.0
3,092
object Test { trait NT[X] trait W[W, A] extends NT[Int] type StringW[T] = W[String, T] trait K[M[_], A, B] def k[M[_], B](f: Int => M[B]): K[M, Int, B] = null val okay1: K[StringW,Int,Int] = k{ (y: Int) => null: StringW[Int] } val okay2 = k[StringW,Int]{ (y: Int) => null: W[String, Int] } val crash: ...
AlexSikia/dotty
tests/untried/neg/t5683.scala
Scala
bsd-3-clause
955
package http class Foo{ val foo = "FOO" }
anderssonfilip/tradeshift-external-api-scala
http.spray/src/main/scala/http/Foo.scala
Scala
mit
44
/* * Copyright (c) 2014 Robert Conrad - All Rights Reserved. * Unauthorized copying of this file, via any medium is strictly prohibited. * This file is proprietary and confidential. * Last modified by rconrad, 12/24/14 4:37 PM */ package base.entity.user.model import base.entity.ApiStrings.User._ import base.ent...
robconrad/base-api
project-entity/src/main/scala/base/entity/user/model/PostResetRequest.scala
Scala
mit
680
package scala.meta.trees import scala.meta.EnvironmentProvider abstract class TreeConverter extends TreeAdapter with TypeAdapter with Namer with Utils with EnvironmentProvider with TreeConverterBuilder
jastice/intellij-scala
scala/scala-impl/src/scala/meta/trees/TreeConverter.scala
Scala
apache-2.0
304
class Parent { class Inner1 { val len = list.size } class Inner2 { val len = foo } private val list = List(3, 5, 6) def foo: Int = 5 } class Child extends Parent { class InnerA extends Inner1 class InnerB extends Inner2 new InnerA new InnerB val x = 10 // error override def fo...
som-snytt/dotty
tests/init/neg/inner6.scala
Scala
apache-2.0
337
/* * 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 * distribute...
wvlet/airframe
airframe-surface/src/test/scala/wvlet/airframe/surface/SecretParamTest.scala
Scala
apache-2.0
982
/* * Created on 2010/10/09 * Copyright (c) 2010-2011, Wei-ju Wu. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, ...
logicmoo/zmpp2
zmpp-tads3/src/main/scala/org/zmpp/tads3/AnonFuncPtr.scala
Scala
bsd-3-clause
4,098
package uk.gov.gds.router.util import org.apache.http.protocol.HTTP import javax.servlet.http.HttpServletResponse import org.apache.http.message.BasicNameValuePair import org.apache.http.client.methods.{HttpUriRequest, HttpPost, HttpGet} import org.apache.http.HttpResponse import org.apache.http.impl.conn.tsccm.Thread...
gds-attic/scala-router
router/router/src/main/scala/uk/gov/gds/router/util/HttpProxy.scala
Scala
mit
4,798
package sp.psl import akka.actor._ import sp.system._ import sp.system.messages._ import sp.domain._ import sp.domain.Logic._ /** * Created by kristofer on 2016-05-08. */ object OrderHandler extends SPService { val specification = SPAttributes( "service" -> SPAttributes( "group" -> "hide" // to organ...
kristoferB/SP
sp1/src/main/scala/sp/psl/OrderHandler.scala
Scala
mit
6,307
package com.sk.app.proxmock.application.domain.providers.url import com.fasterxml.jackson.annotation.JsonCreator import com.sk.app.proxmock.application.configuration.ConfigurationContext import org.springframework.messaging.Message /** * Created by szymo on 19/11/2016. */ case class StaticUrlProvider(url: String) ...
szymonkudzia/proxmock
sources/src/main/scala/com/sk/app/proxmock/application/domain/providers/url/StaticUrlProvider.scala
Scala
mit
530
/* * 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 ...
yu-iskw/gihyo-spark-book-example
src/test/scala/jp/gihyo/spark/ch06/gihyo_6_3_CogroupSuite.scala
Scala
apache-2.0
1,574
/* * Copyright 2014 Shao Tianchen (Austin) * * 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 requi...
au9ustine/org.au9ustine.gloin
src/test/scala/org/au9ustine/gloin/model/DistanceTest.scala
Scala
apache-2.0
1,245
/** * Copyright 2011-2017 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 appli...
timve/gatling
gatling-commons/src/main/scala/io/gatling/commons/util/Io.scala
Scala
apache-2.0
5,630
package functional import com.ruimo.scoins.Scoping._ import java.nio.file.Files import com.ruimo.scoins.PathUtil import controllers.FileServer import helpers.UrlHelper import helpers.UrlHelper._ import play.api.test._ import play.api.test.Helpers._ import play.api.i18n.MessagesApi import play.api.i18n.{Lang, Messages,...
ruimo/store2
test/functional/FavoSpec.scala
Scala
apache-2.0
3,922
/* * 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
sql/hive/src/test/scala/org/apache/spark/sql/hive/ErrorPositionSuite.scala
Scala
apache-2.0
5,523
package mesosphere.marathon.api.v2 import mesosphere.marathon.state.AppDefinition import org.apache.log4j.Logger import scala.util.control.NonFatal import scala.util.parsing.combinator.RegexParsers case class LabelSelector(key: String, fn: String => Boolean, value: List[String]) { def matches(app: AppDefinition): ...
sepiroth887/marathon
src/main/scala/mesosphere/marathon/api/v2/LabelSelector.scala
Scala
apache-2.0
3,048
/* * 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 ...
ConeyLiu/spark
sql/core/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryManager.scala
Scala
apache-2.0
18,141
package pl.pholda.malpompaaligxilo.i18n object PoTranslationsJVMTest extends PoTranslationsTest { override val poTranslations: PoTranslations = I18nJVM.fromResources(getClass, "en" -> "/en.po", "pl" -> "/pl.po" ) }
pholda/MalpompaAligxilo
core/jvm/src/test/scala/pl/pholda/malpompaaligxilo/i18n/PoTranslationsJVMTest.scala
Scala
gpl-3.0
228
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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 b...
hpe-cct/cct-core
src/main/scala/cogx/compiler/gpu_operator/statement/Assignment.scala
Scala
apache-2.0
1,521
/** * Created by Variant on 16/3/22. */ object List_HighOrder_Function_Ops { def main(args: Array[String]) { println(List(1,2,3,4,5,6) map (_ + 1)) //这两个是相等的 println(List(1,2,3,4,5,6) map (item => item + 1)) val data = List("Scala","Hadoop","Spark") println(data map (_.length)) println(data...
sparkLiwei/ProgrammingNote
scalaLearning/scalaDataStructure/List_HighOrder_Function_Ops.scala
Scala
cc0-1.0
1,356
import sbt._ import sbt.Keys._ import sbtrelease._ object DocumentationUpdate { import CustomReleasePlugin.autoImport._ import ReleasePlugin.autoImport._ import ReleaseKeys._ import Utilities._ /** version to be released */ private def next( implicit st: State ) = st.get( versions ).get._1 /** latest ...
KarelCemus/play-redis
project/DocumentationUpdate.scala
Scala
mpl-2.0
2,607
/* * 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
core/src/main/scala/org/apache/spark/util/EventLoop.scala
Scala
apache-2.0
4,242
/* * */ package see.nodes import see.Scope import see.ResultException import see.OuterScope import see.values._ // Provides an intermediate scope that catches accesses to wildcard parameters. private class ArgInterceptor(val enclosing: Scope) { // This Parent is used to detect argument usage. private class De...
RayRacine/scee
src/main/scala/see/nodes/Blocks.scala
Scala
bsd-3-clause
4,448
package ai.agnos.sparql.stream.client import akka.NotUsed import akka.actor.ActorSystem import akka.http.scaladsl.model.{HttpResponse, StatusCodes} import akka.http.scaladsl.unmarshalling.Unmarshal import akka.stream.{ActorMaterializer, FlowShape} import akka.stream.scaladsl.{Broadcast, Flow, GraphDSL, ZipWith} import...
modelfabric/reactive-sparql
src/main/scala/ai/agnos/sparql/stream/client/SparqlUpdateFlowBuilder.scala
Scala
mit
3,780
package org.psliwa.idea.composerJson.composer.model.version.ConstraintTest import org.junit.Assert._ import org.junit.Test import org.psliwa.idea.composerJson.composer.model.version._ class UpperBoundTest { val boundedConstraint = SemanticConstraint(new SemanticVersion(1, 0)) val unboundedConstraint = WildcardCo...
psliwa/idea-composer-plugin
src/test/scala/org/psliwa/idea/composerJson/composer/model/version/ConstraintTest/UpperBoundTest.scala
Scala
mit
5,241
/** * Copyright (c) 2012 Alexey Aksenov ezh@ezh.msk.ru * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
ezh/android-DigiLib
src/test/scala/org/digimead/digi/ctrl/lib/util/CommonTest.scala
Scala
apache-2.0
3,727
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.config import org.ensime.util.file._ import org.ensime.util.{ EnsimeSpec, EscapingStringInterpolation } import org.ensime.api._ import org.ensime.config.richconfig._ imp...
VlachJosef/ensime-server
core/src/test/scala/org/ensime/config/EnsimeConfigSpec.scala
Scala
gpl-3.0
2,681
package com.datamountaineer.streamreactor.connect.hbase.kerberos import org.apache.kafka.common.config.{AbstractConfig, ConfigException} import scala.util.Try case class Kerberos(auth: Either[KeytabSettings, UserPasswordSettings], ticketRenewalMs: Long) object Kerberos { def from(config: AbstractConfig, hbaseCon...
datamountaineer/stream-reactor
kafka-connect-hbase/src/main/scala/com/datamountaineer/streamreactor/connect/hbase/kerberos/Kerberos.scala
Scala
apache-2.0
1,244
package bad.robot.temperature import java.time.Instant import cats.syntax.either._ import io.circe.generic.semiauto._ import io.circe.{Decoder, Encoder} object LogMessage { implicit val decoderInstant: Decoder[Instant] = Decoder.decodeString.emap { string => Either.catchNonFatal(Instant.parse(string)).leftMap...
tobyweston/temperature-machine
src/main/scala/bad/robot/temperature/LogMessage.scala
Scala
apache-2.0
696
def foo[A <% String : Manifest](x: Int = 45) = x foo[Int]()(<caret>) // implicit ev$1: (Int) => String, ev$2: Manifest[Int]
ilinum/intellij-scala
testdata/parameterInfo/functionParameterInfo/simple/SyntheticParameter.scala
Scala
apache-2.0
124
/** * 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-Client/src/main/scala/com/magmanics/licensing/client/JacksonScalaContextResolver.scala
Scala
gpl-3.0
2,060
/* * 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...
scalatest/scalatest
jvm/diagrams/src/main/scala/org/scalatest/diagrams/DiagrammedExpr.scala
Scala
apache-2.0
4,575
package views.html import play.templates._ import play.templates.TemplateMagic._ import play.api.templates._ import play.api.templates.PlayMagic._ import models._ import controllers._ import java.lang._ import java.util._ import scala.collection.JavaConversions._ import scala.collection.JavaConverters._ import play....
ekomiyama/PlayResponsiveKamanu
target/scala-2.10/src_managed/main/views/html/Index.template.scala
Scala
gpl-2.0
1,855
// Copyright (c) 2016 pishen // // 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 w...
pishen/annoy4s
src/main/scala/annoy4s/Annoy.scala
Scala
apache-2.0
5,949
package notebook.server import akka.actor.{Terminated, _} import notebook.client._ import play.api._ import play.api.libs.json.Json.obj import play.api.libs.json._ import scala.concurrent._ import scala.collection.immutable.Queue import scala.concurrent.duration._ /** * Provides a web-socket interface to the Calcul...
shankar-reddy/spark-notebook
app/notebook/server/CalcWebSocketService.scala
Scala
apache-2.0
8,129
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
aosagie/spark
core/src/main/scala/org/apache/spark/scheduler/Task.scala
Scala
apache-2.0
9,331
/* * 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 ...
kimoonkim/spark
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/rest/kubernetes/FileFetcher.scala
Scala
apache-2.0
1,044
/* * Copyright 2012 zhongl * * 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 w...
CSUG/yascli
src/test/scala/com/github/zhongl/yascli/ApplicationSpec.scala
Scala
apache-2.0
1,991
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
cran/rkafkajars
java/scala/runtime/RichFloat.scala
Scala
apache-2.0
1,886
object Solution { def countAndSay(n: Int): String = { val update = (s:String) => (s.splitAt(s.length-2) match { case (a,b) => a + (b.toInt+10).toString }) val f = ((s:String) => s.foldLeft[String]("")((b:String, h:Char) => if (b != "" && h == b.last) u...
hanlin-he/UTD
leetcode/scala/038.scala
Scala
mit
410
package planstack.anml.parser class ParseResult(val blocks:List[AnmlBlock]) { override def toString = blocks.mkString("\n") }
planstack/anml
src/main/scala/planstack/anml/parser/ParseResult.scala
Scala
apache-2.0
130
/* * 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/frontend/logicalplan/LogicalPlanSpecs.scala
Scala
apache-2.0
6,607
/* * 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
core/src/main/scala/org/apache/spark/SparkContext.scala
Scala
apache-2.0
129,872
/*********************************************************************** * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
ddseapy/geomesa
geomesa-kafka/geomesa-kafka-tools/src/main/scala/org/locationtech/geomesa/kafka/tools/export/KafkaListenCommand.scala
Scala
apache-2.0
2,963
/* * MIT License * * Copyright (c) 2016 Ramjet Anvil * * 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, copy, mod...
RamjetAnvil/padrone
server/src/main/scala/com/ramjetanvil/padrone/http/server/Authentication.scala
Scala
mit
9,239
package com.foomoo.abc.tune import com.foomoo.abc.UnitSpec import com.foomoo.abc.tune.AbcTuneTestSupport._ /** * Tests regarding the extraction of note sequences from an AbcTune */ class AbcTuneNoteExtractSpec extends UnitSpec { "AbcTune" should "extract notes for a single bar" in { val tune = tuneWithHead...
danwatford/AbcNotationParser
domain/src/test/scala/com/foomoo/abc/tune/AbcTuneNoteExtractSpec.scala
Scala
apache-2.0
1,194
package com.twitter.finagle.netty4.decoder import com.twitter.finagle.Failure import com.twitter.finagle.decoder.Decoder import com.twitter.io.Buf import io.netty.channel.{ChannelHandlerContext, ChannelInboundHandlerAdapter} /** * The decoder handler decodes `Buf`s into pipeline messages, so it must be installed * ...
koshelev/finagle
finagle-netty4/src/main/scala/com/twitter/finagle/netty4/decoder/DecoderHandler.scala
Scala
apache-2.0
866
package gitbucket.core.service import gitbucket.core.model.{GroupMember, Account} import gitbucket.core.model.Profile._ import gitbucket.core.util.{StringUtil, LDAPUtil} import gitbucket.core.service.SystemSettingsService.SystemSettings import profile.simple._ import StringUtil._ import org.slf4j.LoggerFactory // TODO...
zhoffice/gitbucket
src/main/scala/gitbucket/core/service/AccountService.scala
Scala
apache-2.0
7,880
// Play and Pause akka actor object PlayActor { case class Play() case class Pause() private case class RunStep() } abstract class PlayActor extends Actor { def run() var running=false def receive = { case Play => { running=true println("Running") self ! RunStep } case RunSt...
gilcu2/scala-code-2-share
playPauseActor.scala
Scala
apache-2.0
495
package fish.philwants import fish.philwants.modules.GitHubModule import org.scalatest.{FlatSpec, Matchers} import TestCredentials._ class DigitalOceanModuleTest extends FlatSpec with Matchers { "DigitalOcean module" should "detect a successful login" in { val creds = Credentials(DIGITAL_OCEAN_USERNAME, DIGITAL...
philwantsfish/shard
src/test/scala/fish/philwants/DigitalOceanModuleTest.scala
Scala
mit
770