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
/* * 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 ...
windeye/spark
core/src/main/scala/org/apache/spark/broadcast/MultiTracker.scala
Scala
apache-2.0
13,609
// tells Scala where to find the TMT classes import scalanlp.io._; import scalanlp.stage._; import scalanlp.stage.text._; import scalanlp.text.tokenize._; import scalanlp.pipes.Pipes.global._; import edu.stanford.nlp.tmt.stage._; import edu.stanford.nlp.tmt.model.SymmetricDirichletParams; import edu.stanford.nlp.tmt....
dsheets4/Trajic
tmt/taxi.in.scala
Scala
gpl-3.0
2,694
/* * Copyright 2015-2016 IBM 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 applicable law or agree...
nwspeete-ibm/openwhisk
tests/src/whisk/core/dispatcher/test/DispatcherTests.scala
Scala
apache-2.0
6,737
/** * 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 * dist...
DigitalAssetCom/hlp-candidate
server/network/src/main/scala/org/hyperledger/network/server/BlockDownloadState.scala
Scala
apache-2.0
2,070
package lila.site import actorApi._ import lila.socket._ import lila.socket.actorApi.{ Ping, StartWatching } import lila.common.PimpedJson._ import ornicar.scalalib.Random private[site] final class ApiSocketHandler( socket: akka.actor.ActorRef, hub: lila.hub.Env) { private val flag = "api".some private ...
clarkerubber/lila
modules/site/src/main/ApiSocketHandler.scala
Scala
agpl-3.0
836
/** * 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...
MyPureCloud/kafka
core/src/test/scala/integration/kafka/api/ProducerFailureHandlingTest.scala
Scala
apache-2.0
11,088
/* * Copyright 2011-2019 Asakusa Framework Team. * * 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 ...
ashigeru/asakusafw-spark
runtime/src/main/scala/com/asakusafw/spark/runtime/rdd/IdentityPartitioner.scala
Scala
apache-2.0
885
/* * Copyright 2015 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
howyp/http-verbs
src/main/scala/uk/gov/hmrc/play/connectors/Connector.scala
Scala
apache-2.0
908
package ch.wsl.box.rest import ch.wsl.box.model.shared.{JSONID, JSONKeyValue} import ch.wsl.box.rest.logic.EnhancedModel class EnhancedModelSpec extends BaseSpec { import _root_.ch.wsl.box.rest.utils.JSONSupport._ import _root_.io.circe.generic.auto._ case class Test_row(id: Option[Int] = None, name: Option[...
Insubric/box
server/src/test/scala/ch/wsl/box/rest/EnhancedModelSpec.scala
Scala
apache-2.0
576
/* Title: Pure/Concurrent/counter.scala Author: Makarius Synchronized counter for unique identifiers < 0. NB: ML ticks forwards, JVM ticks backwards. */ package isabelle object Counter { type ID = Long def make(): Counter = new Counter } final class Counter private { private var count: Counter...
larsrh/libisabelle
modules/pide/2019-RC4/src/main/scala/Concurrent/counter.scala
Scala
apache-2.0
499
/* * Copyright 2015 PayPal * * 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 ...
keshin/squbs
squbs-testkit/src/main/scala/org/squbs/testkit/stress/LoadActor.scala
Scala
apache-2.0
5,672
package objsets import common._ import TweetReader._ /** * A class to represent tweets. */ class Tweet(val user: String, val text: String, val retweets: Int) { override def toString: String = "User: " + user + "\\n" + "Text: " + text + " [" + retweets + "]" } /** * This represents a set of objects of ty...
juliengrimault/Scala-Class
objsets/src/main/scala/objsets/TweetSet.scala
Scala
mit
7,703
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
fnothaft/xASSEMBLEx
xASSEMBLEx-core/src/main/scala/org/bdgenomics/xASSEMBLEx/reads/ProcessReads.scala
Scala
apache-2.0
2,581
package io.vamp.http_api import io.vamp.common.akka.{ ActorSystemProvider, ExecutionContextProvider } import io.vamp.common.notification.NotificationProvider trait AbstractRoute extends ActorSystemProvider with ExecutionContextProvider with NotificationProvider
magneticio/vamp
http_api/src/main/scala/io/vamp/http_api/AbstractRoute.scala
Scala
apache-2.0
264
package ru.dgolubets.neo4s import akka.http.scaladsl.model.{HttpMethods, Uri} import akka.stream.scaladsl._ import org.scalamock.scalatest.MockFactory import org.scalatest.concurrent.ScalaFutures import org.scalatest.time.SpanSugar import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpec} import play.api.libs.json....
DGolubets/neo4s
src/test/scala/ru/dgolubets/neo4s/NeoConnectionSpec.scala
Scala
apache-2.0
3,496
package core.exception /** * Hanse的基础异常类 * * Created by pengyt on 2015/10/23. */ abstract class HanseBaseException(message: String, cause: Throwable) extends RuntimeException(message, cause)
Lvxingpai/Hanse
app/core/exception/HanseBaseException.scala
Scala
apache-2.0
208
/* * 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/akka-persistence-inmemory
src/test/scala/akka/persistence/inmemory/snapshot/InMemorySnapshotStoreSpec.scala
Scala
apache-2.0
832
/* * Copyright 2015 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
scottcutts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v3/B985.scala
Scala
apache-2.0
767
package distopt.utils // breeze import breeze.linalg._ import breeze.numerics._ // others import scala.math object SdcaL1L2 { /** * Minimize the objective w.r.t. w: * (0.5/s)*||X*w - y||_2^2 + lambda*(0.5*||w||_2^2 + sigma*||w||_1 - w'*z). * * @param x d-by-s feature matrix * @param...
wangshusen/SparkGiant
src/main/scala/utils/SdcaL1L2.scala
Scala
mit
13,243
package me.benetis.posts import me.benetis.Content import me.benetis.model.{GeneralSoftware, Meta, Post, PostParams, Slug} import me.benetis.partials.FeedbackSection import org.joda.time.DateTime import scalatags.Text.all._ object SoftwareEngineerTwoHours extends Post { override val params: PostParams = PostPa...
benetis/benetis.me
src/main/scala/me/benetis/posts/SoftwareEngineerTwoHours.scala
Scala
agpl-3.0
9,633
package com.socrata.pg.soql import SqlizerTest._ import com.socrata.soql.exceptions.TypecheckException import com.socrata.soql.types.SoQLID import org.joda.time.{DateTime, DateTimeZone} import java.sql.Timestamp // scalastyle:off null class SqlizerBasicTest extends SqlizerTest { test("string literal with quotes") ...
socrata-platform/soql-postgres-adapter
common-pg/src/test/scala/com/socrata/pg/soql/SqlizerBasicTest.scala
Scala
apache-2.0
27,745
/* Picomath public domain implementation of normal distribution CDF http://picomath.org/scala/Phi.scala.html http://picomath.org/scala/NormalCDFInverse.scala.html */ package BootstrapResampling import scala.math protected[BootstrapResampling] class Distributions { def phi(x: Double): Double = { // ...
rdtaylor/BootstrapResampling
src/main/scala/BootstrapResampling/Distributions.scala
Scala
mit
2,002
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
MutahirKazmi/geomesa
geomesa-features/geomesa-feature-kryo/src/main/scala/org/locationtech/geomesa/features/kryo/serialization/KryoUserDataSerialization.scala
Scala
apache-2.0
1,859
package mllib.perf import org.json4s.JsonAST.JValue import org.json4s.JsonDSL._ import org.apache.spark.SparkContext import org.apache.spark.mllib.linalg.distributed.RowMatrix import mllib.perf.util.DataGenerator /** Parent class for linear algebra tests which run on a large dataset. * Generated this way so that ...
arijitt/spark-perf
mllib-tests/v1p5/src/main/scala/mllib/perf/LinearAlgebraTests.scala
Scala
apache-2.0
2,027
/******************************************************************************* * Copyright 2012 Roman Levenstein * * 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.apac...
gmazlami/dcop-maxsum
src/main/scala/com/romix/akka/serialization/kryo/ScalaProductSerializers.scala
Scala
apache-2.0
4,263
package com.nekopiano.scala.processing.sandbox.sample import com.nekopiano.scala.processing.{Angles, ScalaPAppCompanion, ThreeDimensionalPApp} import processing.core.PImage /** * Created on 28/07/2016. */ class LuminousSphere extends ThreeDimensionalPApp { //http://p5aholic.hatenablog.com/entry/2015/12/10/00000...
lamusique/ScalaProcessing
samples/src/test/scala/com/nekopiano/scala/processing/sandbox/sample/LuminousSphere.scala
Scala
apache-2.0
2,659
package com.oglowo.callfire.entity import com.oglowo.callfire.{BetterEnumerationCompanion, BetterEnumeration} sealed trait OrderStatus extends BetterEnumeration object OrderStatus extends BetterEnumerationCompanion[OrderStatus] { val values: Set[OrderStatus] = Set(NewOrderStatus, ProcessingOrderStatus, FinishedOrde...
oGLOWo/callfire-scala-client
src/main/scala/com/oglowo/callfire/entity/OrderStatus.scala
Scala
apache-2.0
788
package mocks import org.joda.time.DateTime import yoda.orm.annotations.{ColumnSchema, TableSchema} /** * Created by Peerapat A on Mar 22, 2017 */ @TableSchema(name = "orm", pk = "id") case class OrmAnnotate(@ColumnSchema(name = "id") id: Long , @ColumnSchema(name = "full_name" ...
nuboat/yoda-orm
src/test/scala/mocks/OrmAnnotate.scala
Scala
mit
700
package com.wavesplatform.state.diffs.smart import com.wavesplatform.common.utils.EitherExt2 import com.wavesplatform.db.WithState.AddrWithBalance import com.wavesplatform.db.{DBCacheSettings, WithDomain, WithState} import com.wavesplatform.features.BlockchainFeatures import com.wavesplatform.lang.directives.values.V4...
wavesplatform/Waves
node/src/test/scala/com/wavesplatform/state/diffs/smart/DiffComplexityCountTest.scala
Scala
mit
5,596
package edu.gemini.osgi.tools.idea import java.io.File import edu.gemini.osgi.tools.ProjectDirs import edu.gemini.osgi.tools.app.Application /** Contains all the context relevant to setting up an Idea project. */ class Idea(val pd: ProjectDirs, crossTarget: File, appl: Application, val configIdOpt: Option[String]) { ...
arturog8m/ocs
project/src/main/scala/edu/gemini/osgi/tools/idea/Idea.scala
Scala
bsd-3-clause
786
package org.tagsharp.test import org.tagsharp.checkpoint.Checkpoint class CheckpointSuite(val checkpoints: Seq[Checkpoint]) { def size():Int = checkpoints.size }
reggoodwin/tagsharp
src/main/scala/org/tagsharp/test/CheckpointSuite.scala
Scala
mit
167
/* * (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/test/scala/cogx/platform/opencl/PlatformSpec.scala
Scala
apache-2.0
6,284
package funsets import common._ /** * 2. Purely Functional Sets. */ object FunSets { /** * We represent a set by its characteristic function, i.e. * its `contains` predicate. */ type Set = Int => Boolean /** * Indicates whether a set contains a given element. */ def contains(s: Set, elem: In...
WangTaoTheTonic/Functional-Programming-Principles-in-Scala
code/funsets/src/main/scala/funsets/FunSets.scala
Scala
apache-2.0
2,220
/* * Copyright (c) 2014 Dufresne Management Consulting LLC. */ package com.nickelsoftware.bettercare4me.actors import java.io.BufferedWriter import java.io.File import java.io.FileNotFoundException import java.io.FileWriter import java.io.IOException import com.nickelsoftware.bettercare4me.hedis.HEDISScoreSummary im...
reactivecore01/bettercare4.me
play/app/com/nickelsoftware/bettercare4me/actors/ClaimGeneratorActor.scala
Scala
apache-2.0
6,414
package org.http4s package server package middleware import cats.data.OptionT import cats.effect._ import java.util.concurrent.TimeoutException import java.util.concurrent.atomic.AtomicBoolean import org.http4s.dsl.io._ import org.http4s.Uri.uri import scala.concurrent.duration._ class TimeoutSpec extends Http4sSpec ...
ChristopherDavenport/http4s
server/src/test/scala/org/http4s/server/middleware/TimeoutSpec.scala
Scala
apache-2.0
2,070
package org.jetbrains.plugins.scala.codeInspection import com.intellij.openapi.project.Project import com.intellij.codeInspection.{ProblemDescriptor, LocalQuickFix} import com.intellij.codeInsight.{FileModificationService, CodeInsightUtilBase} import com.intellij.psi.PsiElement /** * Pavel Fatin */ abstract class ...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/codeInspection/AbstractFix.scala
Scala
apache-2.0
787
package scala.collection.immutable import org.junit.runner.RunWith import org.junit.runners.JUnit4 import org.junit.{Ignore, Test} import org.junit.Assert._ @RunWith(classOf[JUnit4]) class PagedSeqTest { // should not NPE, and should equal the given Seq @Test @Ignore("This tests a non-stack safe method in a dep...
felixmulder/scala
test/junit/scala/collection/immutable/PagedSeqTest.scala
Scala
bsd-3-clause
1,042
package org.jetbrains.plugins.scala package lang.completion import com.intellij.codeInsight.completion._ import com.intellij.patterns.PlatformPatterns import org.jetbrains.plugins.scala.lang.psi.api.expr.{ScSuperReference, ScMethodCall, ScArgumentExprList, ScReferenceExpression} import org.jetbrains.plugins.scala.lang...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/completion/SameSignatureCallParametersProvider.scala
Scala
apache-2.0
8,850
/* * Copyright 2013 Twitter 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...
betable/zipkin
zipkin-anormdb/src/main/scala/com/twitter/zipkin/storage/anormdb/DB.scala
Scala
apache-2.0
8,899
package org.infinispan.spark.sql import org.apache.spark.sql.SQLContext import org.apache.spark.sql.sources.{BaseRelation, DataSourceRegister, RelationProvider} class InfinispanDataSource extends RelationProvider with DataSourceRegister { override def shortName(): String = "infinispan" override def createRel...
galderz/infinispan-spark
src/main/scala/org/infinispan/spark/sql/InfinispanDataSource.scala
Scala
apache-2.0
455
/*********************************************************************** * 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-spark/geomesa-spark-core/src/main/scala/org/locationtech/geomesa/spark/SpatialRDDProvider.scala
Scala
apache-2.0
2,322
package a61 object Runner extends App { for (i <- 1 to 100) { val yuan = (i - 1).toDouble / i var num: Double = 0 for (num1 <- 1 to 4000) { num += math.pow(yuan, num1) / num1 } assert(math.abs(math.log(i) - num) < 0.000001d) } }
djx314/ubw
a61-自然对数计算/src/main/scala/a61/Runner.scala
Scala
bsd-3-clause
267
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/help-frontend
test/acceptance/specs/LanguageSwitchingFeature.scala
Scala
apache-2.0
1,707
package org.openurp.edu.eams.teach.lesson.task.web.action import org.apache.commons.lang3.ArrayUtils import org.beangle.commons.collection.Collections import org.beangle.data.jpa.dao.OqlBuilder import org.beangle.commons.lang.Strings import org.beangle.commons.transfer.exporter.PropertyExtractor import org.openur...
openurp/edu-eams-webapp
schedule/src/main/scala/org/openurp/edu/eams/teach/lesson/task/web/action/TeachTaskSearchAction.scala
Scala
gpl-3.0
11,153
/* * Copyright 2013 Twitter 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...
twitter/storehaus
storehaus-testing/src/main/scala/com/twitter/storehaus/testing/Cleanup.scala
Scala
apache-2.0
1,309
package redis.api.transactions import redis.{RedisCommandMultiBulk, RedisCommandStatusBoolean} import akka.util.ByteString import redis.protocol.MultiBulk case object Multi extends RedisCommandStatusBoolean { val isMasterOnly = true val encodedRequest: ByteString = encode("MULTI") } case object Exec extends Redi...
272029252/rediscala
src/main/scala/redis/api/Transactions.scala
Scala
apache-2.0
662
/* * Copyright (c) 2014-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.apach...
mdavid/lessig-bigdata
lib/snowplow/3-enrich/scala-common-enrich/src/main/scala/com.snowplowanalytics.snowplow.enrich/common/utils/shredder/Shredder.scala
Scala
mit
8,478
package org.jetbrains.plugins.scala package testingSupport.test import javax.swing.Icon import com.intellij.ide.fileTemplates.FileTemplateDescriptor import com.intellij.lang.Language import com.intellij.openapi.module.Module import com.intellij.psi.util.PsiTreeUtil import com.intellij.psi.{PsiClass, PsiElement, PsiMe...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/testingSupport/test/AbstractTestFramework.scala
Scala
apache-2.0
3,013
package com.signalcollect.triplerush import org.scalatest.FlatSpec import org.scalatest.Matchers import org.scalacheck.Arbitrary import org.scalatest.prop.Checkers import org.scalacheck.Gen._ import com.signalcollect.triplerush.optimizers.CleverCardinalityOptimizer class EmptyQuerySpec extends FlatSpec with Matchers ...
jacqueslk/triplerush-filter
src/test/scala/com/signalcollect/triplerush/EmptyQuerySpec.scala
Scala
apache-2.0
670
package util package security import play.api._ import play.api.Configuration import models.User import org.specs2.mutable._ import java.io.File object AuthenticationProviderSpec extends Specification with _root_.test.ResourceFinder { "Authentication Providers" should { "work with default authentication" >> { ...
Shopify/collins
test/util/security/AuthenticationProviderSpec.scala
Scala
apache-2.0
3,867
/* * Copyright (c) 2014-2016 * nonblocking.at gmbh [http://www.nonblocking.at] * * This file is part of Cliwix. * * Cliwix is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the...
nonblocking/cliwix
cliwix-core/src/main/scala/at/nonblocking/cliwix/core/interceptor/ReplaceDocumentUrlsInPageSettingsInterceptor.scala
Scala
agpl-3.0
2,729
/** * 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...
Chasego/kafka
core/src/test/scala/unit/kafka/admin/DeleteTopicTest.scala
Scala
apache-2.0
20,203
package cmdreader.std import cmdreader.Command import types._ import scala.collection.mutable._ class Clone extends Command { override def getName(): String = "clone" override def isValidArg0(n: Int): Boolean = n == 1 override def apply(args: Array[Type]): Type = { args(0).>/< } }
bluebear94/bag
src/main/scala/cmdreader/std/Clone.scala
Scala
gpl-3.0
295
/* * 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 ...
yew1eb/flink
flink-examples/flink-examples-streaming/src/main/scala/org/apache/flink/streaming/scala/examples/kafka/Kafka010Example.scala
Scala
apache-2.0
3,123
import org.scalatest._ class WordCountSpecs extends FlatSpec with Matchers { it should "count one word" in { val phrase = new Phrase("word") phrase.wordCount should be (Map("word" -> 1)) } it should "count one of each" in { pending val phrase = new Phrase("one of each") val counts = Map("one...
nlochschmidt/xscala
word-count/src/test/scala/word_count_test.scala
Scala
mit
2,029
import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spark.SparkConf import java.lang.Math import org.apache.spark.rdd.RDD def exclude[T] (connections : Array[(String,String,T)], from: String, to :String) = { connections.filter( f=> f._1 != from && f._2 != to) } def exclu...
arekbee/TSPSpark
src/Src/Scala/tsp_bab.scala
Scala
mit
8,623
package com.twitter.finatra.multiserver.Add1HttpServer import com.twitter.adder.thriftscala.Adder import com.twitter.adder.thriftscala.Adder._ import com.twitter.conversions.DurationOps._ import com.twitter.finagle.Filter import com.twitter.inject.Injector import com.twitter.inject.exceptions.PossiblyRetryable import ...
twitter/finatra
inject-thrift-client-http-mapper/src/test/scala/com/twitter/finatra/multiserver/Add1HttpServer/AdderThriftClientModule.scala
Scala
apache-2.0
2,196
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
liquidarmour/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v2/B155.scala
Scala
apache-2.0
796
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
fhueske/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/MatchRecognizeITCase.scala
Scala
apache-2.0
26,134
package com.shatacloud.bandstream.util import scalikejdbc.{ConnectionPool, ConnectionPoolSettings} object SetupJdbc { def apply(driver: String, url: String, user: String, password: String): Unit = { Class.forName(driver) ConnectionPool.singleton(url, user, password, ConnectionPoolSettings(connectionPo...
AlexanderMok/kafka_sparkstreaming_practice
src/main/scala/com/shatacloud/bandstream/util/SetupJdbc.scala
Scala
apache-2.0
353
package ch5 import scala.annotation.tailrec import Stream._ object Exercise11 { def unfold[A, S](z: S)(f: S => Option[(A, S)]): Stream[A] = f(z) match { case None => empty case Some((h, s)) => cons(h, unfold(s)(f)) } } import Exercise11._ /* from repl you can test typing: :load src/main/scala...
rucka/fpinscala
src/main/scala/fpinscala/ch5/Exercise11.scala
Scala
gpl-2.0
405
package org.automanlang.core.exception case class StrategyError(err: String) extends Exception
dbarowy/AutoMan
libautoman/src/main/scala/org/automanlang/core/exception/StrategyError.scala
Scala
gpl-2.0
96
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.scaladsl.api.broker /** * A message broker message. * * This provides access to both the message payload, and the metadata. */ sealed trait Message[Payload] { /** * The payload of the message. */ def...
ignasi35/lagom
service/scaladsl/api/src/main/scala/com/lightbend/lagom/scaladsl/api/broker/MessageMetadata.scala
Scala
apache-2.0
2,744
package net.sansa_stack.examples.spark.rdf import java.io.File import net.sansa_stack.rdf.spark.io._ import net.sansa_stack.rdf.spark.qualityassessment._ import org.apache.jena.riot.Lang import org.apache.spark.sql.SparkSession object RDFQualityAssessment { def main(args: Array[String]) { parser.parse(args, C...
SANSA-Stack/SANSA-RDF
sansa-examples/sansa-examples-spark/src/main/scala/net/sansa_stack/examples/spark/rdf/RDFQualityAssessment.scala
Scala
apache-2.0
3,255
/* * Copyright (C) 2011 Mathias Doenitz * * 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...
backchatio/http-parsers
src/main/scala/io/backchat/http/parser/CacheControlHeader.scala
Scala
apache-2.0
1,863
package com.realizationtime.btdogg.frontend.normal import com.realizationtime.btdogg.commons.TKey import com.realizationtime.btdogg.commons.mongo.MongoTorrent import com.realizationtime.btdogg.mongo.{MongoConnectionWrapper, MongoTorrentReader} import scala.concurrent.{ExecutionContext, Future} class MongoFetcher(uri...
bwrega/btdogg
frontend/server/src/main/scala/com/realizationtime/btdogg/frontend/normal/MongoFetcher.scala
Scala
mit
687
/* * Copyright 2016 Spotify AB. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
spotify/big-data-rosetta-code
src/main/scala/com/spotify/bdrc/pipeline/Sessions.scala
Scala
apache-2.0
3,538
/** * User: Eros Candelaresi <eros@candelaresi.de> * Project: Krautmail Server * Date: 08.10.2013 * Time: 21:21 */ import sbt._ object KrautMail extends Build { lazy val root = Project(id = "Root", base = file(".")) .aggregate(baseComponents, collectors, runners) lazy val baseComponents = Project(id = "...
DerEros/krautmail
server/project/build.scala
Scala
gpl-3.0
883
package com.github.j5ik2o.chatwork.infrastructure.api /** * Created by junichi.kato on 2013/12/12. */ object IconPresets extends Enumeration { val group, check, document, meeting, event, project, business, study, security, star, idea, heart, magcup, beer, music, sports, travel = Value }
j5ik2o/chatwork-client
src/main/scala/com/github/j5ik2o/chatwork/infrastructure/api/IconPresets.scala
Scala
apache-2.0
295
package club.diybio.bank.domain package object bank { type DepositorId = String }
antonkulaga/plasmid-bank
shared/src/main/scala/club/diybio/bank/domain/bank/package.scala
Scala
mpl-2.0
87
/* * Copyright 2006-2011 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...
lift/framework
core/util/src/main/scala/net/liftweb/util/BaseField.scala
Scala
apache-2.0
5,641
/* * Copyright 2012-2017 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...
ralph-tice/edda
src/main/scala/com/netflix/edda/FileElector.scala
Scala
apache-2.0
1,134
package im.tox.antox.activities import android.content.Context import android.content.Intent import android.os.Build import android.os.Bundle import android.support.v7.app.ActionBarActivity import android.view.View import android.widget.EditText import android.widget.TextView import android.widget.Toast import im.tox...
ollieh/Antox
app/src/main/scala/im/tox/antox/activities/FriendProfileActivity.scala
Scala
gpl-3.0
2,266
/* * Copyright 2011-2021 Asakusa Framework Team. * * 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 ...
asakusafw/asakusafw-spark
runtime/src/main/scala/com/asakusafw/spark/runtime/fragment/user/join/MasterJoinUpdate.scala
Scala
apache-2.0
1,152
package turksem.util import org.scalajs.dom.html import japgolly.scalajs.react.vdom.html_<^._ import japgolly.scalajs.react._ import scalacss.DevDefaults._ import scalacss.ScalaCssReact._ import nlpdata.util.Text import cats.implicits._ // only higher-order-ish. More for just reducing redundancy. // feel free to ...
julianmichael/mturk-semantics
turksem/js/src/main/scala/turksem/util/HighlightableSentence.scala
Scala
mit
1,964
package org.jetbrains.plugins.scala.projectView import java.util import com.intellij.ide.projectView.{TreeStructureProvider, ViewSettings} import com.intellij.openapi.project.DumbAware import org.jetbrains.plugins.scala.extensions.PsiModifierListOwnerExt import org.jetbrains.plugins.scala.icons.Icons import org.jetbr...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/projectView/ScalaTreeStructureProvider.scala
Scala
apache-2.0
2,108
/* * 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 ...
pferrel/PredictionIO
core/src/main/scala/org/apache/predictionio/core/AbstractDoer.scala
Scala
apache-2.0
2,343
/* * 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 ...
zimmermatt/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/sources/tsextractors/StreamRecordTimestamp.scala
Scala
apache-2.0
1,768
package models.daos import java.util.UUID import models.Book import scala.concurrent.Future trait BookDAO { def find(id: UUID)(implicit userId:UUID): Future[Option[Book]] def findBooks(bookIds: Seq[UUID])(implicit userId:UUID): Future[Seq[Book]] def list(implicit userId:UUID): Future[Seq[Book]] def save(...
slopyjoe/book-club
app/models/daos/BookDAO.scala
Scala
apache-2.0
370
package controllers import play.api._ import play.api.mvc._ import models.Tables._ import play.api.db.slick._ import play.api.db.slick.Config.driver.simple._ object About extends Controller { def index = Action { Ok(views.html.about("Your new application is ready.")) } def history = Action { Ok(views...
browncr/cr-www
app/controllers/About.scala
Scala
agpl-3.0
1,006
/* * Licensed to Intel Corporation under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * Intel Corporation licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use t...
SeaOfOcean/BigDL
dl/src/test/scala/com/intel/analytics/bigdl/torch/NarrowSpec.scala
Scala
apache-2.0
3,356
/*********************************************************************** * 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 ...
mcharles/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/util/ExplainingBatchScanner.scala
Scala
apache-2.0
2,620
/* * 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/input/FixedLengthBinaryRecordReader.scala
Scala
apache-2.0
5,249
package scala.quoted package runtime.impl import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.core.Contexts.* import dotty.tools.dotc.core.Flags.* import dotty.tools.dotc.core.Names.* import dotty.tools.dotc.core.Types.* import dotty.tools.dotc.core.StdNames.nme import dotty.tools.dotc.core.Symbols.* /** Matches...
dotty-staging/dotty
compiler/src/scala/quoted/runtime/impl/QuoteMatcher.scala
Scala
apache-2.0
18,541
/* * Copyright (c) 2014-2020 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
alexandru/monifu
monix-tail/shared/src/test/scala/monix/tail/IterantScanSuite.scala
Scala
apache-2.0
2,430
package net.mtgto.confluence4s /** * The entity model of the space. * * @see https://developer.atlassian.com/display/CONFDEV/Remote+Confluence+Data+Objects#RemoteConfluenceDataObjects-Space * @param key the space key * @param name the name of the space * @param url the url to view this space online * @param hom...
mtgto/confluence4s
src/main/scala/net/mtgto/confluence4s/Space.scala
Scala
bsd-3-clause
525
object Main extends App { val scanner = new java.util.Scanner(System.in) val N = scanner.nextInt (1 to N).foreach { _ => val t = scanner.nextInt if (t % 15 == 0) { println("FizzBuzz") } else if (t % 5 == 0) { println("Buzz") } else if (t % 3 == 0) { println("Fizz") } else { println(t) } ...
nhirokinet/fuzetsu
tests/Main.scala
Scala
bsd-3-clause
325
package uk.co.morleydev.ghosthunt.view.impl import uk.co.morleydev.ghosthunt.view.View import org.jsfml.graphics.{Color, Text, RenderTarget} import uk.co.morleydev.ghosthunt.data.store.EntityComponentStore import uk.co.morleydev.ghosthunt.model.component.menu.TextBox import uk.co.morleydev.ghosthunt.data.ContentFactor...
MorleyDev/GhostHunt
src/main/scala/uk/co/morleydev/ghosthunt/view/impl/TextBoxView.scala
Scala
mit
1,447
/* * Copyright (c) 2014 Paul Bernard * * 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...
quantintel/spectrum
financial/src/main/scala/org/quantintel/ql/instruments/swap/VanillaSwap.scala
Scala
apache-2.0
1,734
/* Copyright (c) 2008 Google 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...
mjanson/gdata-scala-client
src/com/google/gdata/calendar/StdAclFeed.scala
Scala
apache-2.0
1,055
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
goldmedal/spark
sql/core/src/test/scala/org/apache/spark/sql/connector/V2CommandsCaseSensitivitySuite.scala
Scala
apache-2.0
8,856
package de.sciss.fscape package tests import de.sciss.audiofile.{AudioFile, AudioFileSpec, AudioFileType, SampleFormat} import de.sciss.file._ import de.sciss.fscape.Ops._ import de.sciss.fscape.graph.GenWindow import de.sciss.fscape.gui.SimpleGUI import de.sciss.log.Level import de.sciss.numbers import scala.swing.S...
Sciss/FScape-next
core/jvm/src/test/scala/de/sciss/fscape/tests/MorassTest.scala
Scala
agpl-3.0
12,270
package sri.universal.components import chandu0101.macros.tojs.JSMacro import sri.core._ import sri.universal.{ReactEvent, ReactUniversal} import scala.scalajs.js import scala.scalajs.js.{UndefOr => U, undefined} case class WindowedListView[T](key: U[String] = undefined, style: U[js.A...
chandu0101/sri
universal/src/main/scala/sri/universal/components/WindowedListView.scala
Scala
apache-2.0
1,914
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
minixalpha/spark
sql/core/src/test/scala/org/apache/spark/sql/ApproximatePercentileQuerySuite.scala
Scala
apache-2.0
8,930
package io.github.netvl.picopickle import scala.reflect.macros.Context class DiscriminatorMacrosImpl[C <: Context](override val c: C) extends DiscriminatorMacros object DiscriminatorMacrosImpl { def inst(c: Context) = new DiscriminatorMacrosImpl[c.type](c) def materializeDiscriminatorImpl[S: c.WeakTypeTag, T: c...
LMnet/picopickle
core/src/main/scala-2.10/io/github/netvl/picopickle/DiscriminatorMacrosImpl.scala
Scala
mit
419
/* * Copyright 2012 Emil Hellman * * This file is part of SortableChallenge. * * SortableChallenge is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your optio...
archevel/SortableCodingChallenge
src/main/scala/sortablechallenge/SortableChallenge.scala
Scala
gpl-3.0
3,524
/* * 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/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala
Scala
apache-2.0
98,975
package com.mec.scala object PartialFunctionTest { def main(args: Array[String]) = { println(" | pf1 - String | pf2 - Double | pf - All") println("x | def? | pf1(x) | def? | pf2(x) | def? | pf(x)") println("++++++++++++++++++++++++++++++++++++++++++++++++++++") List("str", 3.14, 10) foreach { x => ...
mectest1/HelloScala
HelloWorld/src/com/mec/scala/PartialFunctionTest.scala
Scala
gpl-3.0
881
package lms object LMSCSVStringLitParseGen extends CSVStringLitParseGen() /***************************************** Emitting Generated Code *******************************************/ case class CSVStringLitParseGen() extends ((Array[Char])=>ParseResultListAnon1680061013) { def apply(x0:Array[Char]): ParseResultL...
begeric/FastParsers
FastParsers/src/test/scala/lms/CSVStringLitParseGen.scala
Scala
mit
11,331
package com.socrata.datacoordinator.common.soql.jsonreps import com.rojoma.json.v3.ast.{JString, JNull, JValue} import com.socrata.datacoordinator.truth.json.JsonColumnRep import com.socrata.soql.types._ import com.vividsolutions.jts.geom.Geometry class GeometryLikeRep[T <: Geometry](repType: SoQLType, geometry: SoQL...
socrata-platform/data-coordinator
coordinatorlib/src/main/scala/com/socrata/datacoordinator/common/soql/jsonreps/GeometryLikeRep.scala
Scala
apache-2.0
1,158