code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
/* * Copyright 2022 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/iht-frontend
test/controllers/javascript/ReverseAssetsTest.scala
Scala
apache-2.0
1,213
package com.yammer.dropwizard.examples import com.yammer.dropwizard.cli.Command import com.yammer.dropwizard.{AbstractService, Service} import org.apache.commons.cli.{CommandLine, OptionGroup, Options, Option => CliOption} class SplodyCommand extends Command("splody", "Explodes with an error") { override def getOpt...
jamesward/dropwizard
dropwizard-scala_2.9.1/src/test/scala/com/yammer/dropwizard/examples/SplodyCommand.scala
Scala
apache-2.0
808
package com.softwaremill.clippy import japgolly.scalajs.react._ import japgolly.scalajs.react.extra.ExternalVar import japgolly.scalajs.react.vdom.prefix_<^._ object BsUtils { def bsPanel(body: TagMod*) = <.div(^.cls := "panel panel-default") { <.div(^.cls := "panel-body")(body) } // Maybe this could be a ...
softwaremill/scala-clippy
ui-client/src/main/scala/com/softwaremill/clippy/BsUtils.scala
Scala
apache-2.0
955
package views.html.mod import play.api.i18n.Lang import lila.api.Context import lila.app.templating.Environment._ import lila.app.ui.ScalatagsTemplate._ import lila.mod.Gamify.Period import controllers.routes object gamify { def index(leaderboards: lila.mod.Gamify.Leaderboards, history: List[lila.mod.Gamify.Hist...
luanlv/lila
app/views/mod/gamify.scala
Scala
mit
4,090
/* * 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 ...
shaoxuan-wang/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/plan/metadata/FlinkRelMdColumnIntervalTest.scala
Scala
apache-2.0
29,723
/* * Copyright 2014 Frugal Mechanic (http://frugalmechanic.com) * * 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...
frugalmechanic/fm-lazyseq
src/main/scala/fm/lazyseq/TmpFileLazySeqBuilder.scala
Scala
apache-2.0
3,595
// Jubatus: Online machine learning framework for distributed environment // Copyright (C) 2014-2015 Preferred Networks and Nippon Telegraph and Telephone Corporation. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License version 2.1...
jubatus/jubatus-on-yarn
jubatusonyarn/jubatus-on-yarn-client/src/test/scala/us/jubat/yarn/client/YarnClientControllerSpec.scala
Scala
lgpl-2.1
3,887
/* * 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...
copperlight/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/util/ShardsSuite.scala
Scala
apache-2.0
6,755
/* * 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 ...
bdrillard/spark
mllib/src/main/scala/org/apache/spark/ml/classification/MultilayerPerceptronClassifier.scala
Scala
apache-2.0
12,867
package io.getquill.codegen.gen trait QuerySchemaNaming { this: CodeGeneratorComponents => object `"query"` extends QuerySchemaNaming { override def apply(tm: TableMeta): String = "query" } object `[namespace][Table]` extends QuerySchemaNaming { override def apply(tm: TableMeta): String = names...
getquill/quill
quill-codegen/src/main/scala/io/getquill/codegen/gen/QuerySchemaNaming.scala
Scala
apache-2.0
374
/* * Copyright (C) 2017-present, Chenai Nakam(chenai.nakam@gmail.com) * * 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 r...
chenakam/AutoTX
src/main/scala/hobby/chenai/nakam/autotx/core/Model.scala
Scala
apache-2.0
779
/* * Copyright 2010 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...
travisbrown/util
util-logging/src/main/scala/com/twitter/logging/FileHandler.scala
Scala
apache-2.0
9,076
package com.avsystem.commons package mongo.core.ops import org.bson.conversions.Bson import org.mongodb.scala.MongoClient import org.mongodb.scala.bson.BsonDocument import org.scalactic.Equality object BsonEquality extends Equality[Bson] { def toDoc(bson: Bson): BsonDocument = bson.toBsonDocument(classOf[BsonDocume...
AVSystem/scala-commons
commons-mongo/jvm/src/test/scala/com/avsystem/commons/mongo/core/ops/BsonEquality.scala
Scala
mit
644
/* * Copyright 2017 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 ...
SarathChandran/squbs
squbs-unicomplex/src/test/scala/org/squbs/unicomplex/SystemStatusTest.scala
Scala
apache-2.0
5,049
/* * MIT License * * Copyright (c) 2017 Gonçalo Marques * * 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, ...
gonmarques/slick-repo
src/main/scala/com/byteslounge/slickrepo/version/InstantVersion.scala
Scala
mit
1,383
package io.udash package rest.examples import io.udash.rest.SttpRestClient import sttp.client3.SttpBackend import scala.concurrent.duration._ import scala.concurrent.{Await, Future} import scala.util.{Failure, Success} object ClientMain { def main(args: Array[String]): Unit = { implicit val sttpBackend: SttpBa...
UdashFramework/udash-core
rest/.jvm/src/test/scala/io/udash/rest/examples/ClientMain.scala
Scala
apache-2.0
926
package au.id.cxd.sphero.controller.system import java.lang.Shutdown import akka.actor._ import au.id.cxd.sphero.controller._ import au.id.cxd.sphero.controller.agents.{RandomController, Coordinator, RobotController} import au.id.cxd.sphero.controller.bluetooth.ConnectThread import au.id.cxd.sphero.controller.protoco...
cxd/sphero-controller-desktop
src/main/scala/au/id/cxd/sphero/controller/system/RandomWalkTestSystem.scala
Scala
artistic-2.0
1,184
package models import play.api.libs.json.{Format, Json} /** * Represents a target and the operators that can be applied to it, * for example "data.foo" with operators "equal", "threshold_min", "threshold_max", etc. * @param target Target data or metadata field (e.g. "data.foo") * @param operators Associated opera...
statwarn/alerting-api
app/models/TargetOperators.scala
Scala
mit
1,838
/* * * * Copyright 2015 eBay, Inc. * * AIALib: Asynchronous Iterative Algorithm Library * Author: Alexander Terenin * * 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:...
eBay/AIALib
src/main/scala/aialib/examples/OLSProblem.scala
Scala
apache-2.0
26,099
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
zzcclp/carbondata
integration/spark/src/test/scala/org/apache/spark/carbondata/TestStreamingTableQueryFilter.scala
Scala
apache-2.0
12,964
package ark import scala.collection.mutable.Stack import org.scalatest.Assertions import org.scalatest.FunSpec class ExampleSpec extends FunSpec { describe("A Stack") { it("should pop values in last-in-first-out order") { val stack = new Stack[Int] stack.push(1) stack.push(2) assert(st...
lucaster/ark-calc
src/test/scala/ark/ExampleSpec.scala
Scala
mit
576
package org.example object Foo extends App { class Bar { val x = 1 } class Foo extends Bar { def testMethod(i: Int, s: String) = { i + s.length } } val map = Map[String, Int]() val foo = new Foo() println("Hello, " + foo.x) println(foo.testMethod(7, "seven")) val fn: String => In...
ensime/ensime-server
testing/simple/src/main/scala/org/example/Foo.scala
Scala
gpl-3.0
696
/* * 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 ...
h2oai/sparkling-water
scoring/src/main/scala/ai/h2o/sparkling/ml/params/H2OSupervisedMOJOParams.scala
Scala
apache-2.0
1,170
package info import java.io.File import org.springframework.core.io.ClassPathResource /** * Created by siddhuwarrier on 27/07/2014. */ package object siddhuw { def getFileFromClasspath(filename: String): File = { if (new File(filename).exists()) { new File(filename) } else if (new ClassPathReso...
siddhuwarrier/intl-odds-calculator
src/main/scala/info/siddhuw/package.scala
Scala
apache-2.0
626
package com.twitter.sbt // from http://github.com/debasishg/sjson/blob/master/project/build/TemplateProject.scala import _root_.sbt._ import FileUtilities.{clean, createDirectory} trait TemplateProject extends DefaultProject with FileTasks { // declares fmpp as a managed dependency. By declaring it in the private...
twitter/standard-project
src/main/scala/com/twitter/sbt/TemplateProject.scala
Scala
apache-2.0
2,346
package example.project.fixture import doc.jockey.model._ import example.project.fixture.SupportedProductTypes._ import example.project.main._ case class SupportedProductTypes(tradeTypes: List[TradeType], subExpecteds: List[Expected]) extends JustACommand { def title = "Product types supported" def expecteds: Lis...
agmenc/doc-jockey
src/test/scala/example/project/fixture/SupportedProductTypes.scala
Scala
mit
1,333
package servlet import org.eclipse.jgit.http.server.GitServlet import org.eclipse.jgit.lib._ import org.eclipse.jgit.transport._ import org.eclipse.jgit.transport.resolver._ import org.slf4j.LoggerFactory import javax.servlet.ServletConfig import javax.servlet.ServletContext import javax.servlet.http.HttpServletReque...
guoyao/gitbucket
src/main/scala/servlet/GitRepositoryServlet.scala
Scala
apache-2.0
5,954
/* * Copyright (c) 2018. Fengguo Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License v2.0 * which accompanies this distribution, and is available at * https://www.apache.org/licenses/LICENSE-2.0 * * Detailed contributors ar...
arguslab/Argus-SAF
amandroid/src/test/scala/org/argus/amandroid/summary/model/UriSuTest.scala
Scala
apache-2.0
9,976
/* * Wire * Copyright (C) 2016 Wire Swiss GmbH * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This progr...
wireapp/wire-android-sync-engine
zmessaging/src/main/scala/com/waz/db/ColBinder.scala
Scala
gpl-3.0
1,288
package com.laserfiche import org.apache.predictionio.controller.IEngineFactory import org.apache.predictionio.controller.Engine /** Define Query class which serves as a wrapper for * new text data. */ case class Query(text: String) extends Serializable /** Define PredictedResult class which serves as a * wrap...
michaelzzh/LF_PredictionIO
engines/baseTextClassification/src/main/scala/Engine.scala
Scala
apache-2.0
953
package suites import boxity.ParserMacroSuite trait CorrectParserMacros extends ParserMacroSuite { test("Simple expansion") { // We are actually giving 5 tokens to the parser macro: `BOF`, "hello", ` `, "world", `EOF` "macros.ParserMacros.countTokens#(hello world)" shouldExpandTo "5" } test("Expand mu...
Duhemm/parsermacros
tests/src/test/scala/suites/CorrectParserMacros.scala
Scala
bsd-3-clause
1,884
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.tools.nsc packag...
martijnhoekstra/scala
src/scaladoc/scala/tools/nsc/doc/base/MemberLookupBase.scala
Scala
apache-2.0
8,574
/* * 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/ct-calculations
src/test/scala/uk/gov/hmrc/ct/ct600/v3/B295Spec.scala
Scala
apache-2.0
1,134
/* * 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/kubernetes/submit/submitsteps/initcontainer/BaseInitContainerConfigurationStep.scala
Scala
apache-2.0
2,945
/* * Copyright (C) 2015 Stratio (http://stratio.com) * * 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 app...
fjsc/sparta
sdk/src/main/scala/com/stratio/sparta/sdk/properties/models/PropertiesQueryModel.scala
Scala
apache-2.0
733
package io.buoyant.router.h2 import com.twitter.finagle.{Service, ServiceFactory, SimpleFilter, Stack, Stackable} import com.twitter.finagle.buoyant.h2.{Request, Response} object DupRequest { val role = Stack.Role("DupRequest") object filter extends SimpleFilter[Request, Response] { def apply(req: Request, s...
denverwilliams/linkerd
router/h2/src/main/scala/io/buoyant/router/h2/DupRequest.scala
Scala
apache-2.0
715
package net.ultrametrics.fractactor import net.ultrametrics.math.Complex /** * A function for calculating the mandelbrot set. * * By default, uses PointScaler which is a noop on the calculated value. * Functions utilizing this trait, however, can mixin an alternate * PointScaler implementation to achieve differ...
pchuck/fractactor
src/main/scala/net/ultrametrics/fractactor/MandelbrotFunction.scala
Scala
bsd-2-clause
946
package com.eigengo.lift.exercise.classifiers.workflows import akka.stream.{ActorFlowMaterializer, ActorFlowMaterializerSettings} import akka.stream.scaladsl._ import akka.stream.testkit.{StreamTestKit, AkkaSpec} import com.eigengo.lift.exercise.AccelerometerValue import com.typesafe.config.ConfigFactory import scala....
lachatak/lift
server/exercise/src/test/scala/com/eigengo/lift/exercise/classifiers/workflows/GestureWorkflowTest.scala
Scala
apache-2.0
3,051
/** * 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 ...
FusionWorks/adam
adam-core/src/test/scala/org/bdgenomics/adam/converters/AlignmentRecordConverterSuite.scala
Scala
apache-2.0
6,141
package glasskey.model.validation import glasskey.model.ValidatedAccessToken /** * Created by loande on 3/24/15. */ trait OAuthClaimValidator extends ClaimValidator[ValidatedAccessToken] { def hasScope(scope: String) = OAuthHas(Scope, scope) def hasClientId(clientId: String) = OAuthHas(Client_Id, clientId) de...
MonsantoCo/glass-key
glass-key-common/src/main/scala/glasskey/model/validation/OAuthClaimValidator.scala
Scala
bsd-3-clause
435
package org.pgscala.converters /** Do not edit - generated in Builder / PGLongConverterBuilder.scala */ object PGLongConverter extends PGConverter[Long] { val PGType = PGNullableLongConverter.pgType def toPGString(l: Long) = PGNullableLongConverter.longToString(java.lang.Long valueOf l) val defaultValue: ...
melezov/pgscala
converters-scala/src/generated/scala/org/pgscala/converters/core/PGLongConverter.scala
Scala
bsd-3-clause
458
/* * 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 ...
Dax1n/spark-core
core/src/main/scala/org/apache/spark/deploy/master/ui/MasterPage.scala
Scala
apache-2.0
7,439
package io.clouderite.commons.scala.berries.other import java.io.{ByteArrayInputStream, ByteArrayOutputStream} import java.util.zip.{GZIPInputStream, GZIPOutputStream} import scala.io.Source object Gzipper { def gzip(value: String): Array[Byte] = { val b = new ByteArrayOutputStream() val gzip = new GZIPOut...
clouderite/scala-berries
src/main/scala/io/clouderite/commons/scala/berries/other/Gzipper.scala
Scala
mit
592
package me.fornever.githublo.ui import javafx.application.{Application, HostServices} import javafx.scene.Parent import javafx.stage.Stage import me.fornever.githublo.common.Configuration import scala.reflect.runtime.universe._ import scalafx.Includes._ import scalafx.scene.Scene import scalafxml.core.{FXMLView, Exp...
ForNeVeR/githublo
src/main/scala/me/fornever/githublo/ui/FXApplication.scala
Scala
mit
1,268
import helpers.TestHelpers._ import org.specs2.mutable._ /** * Integration tests and specifications for FacebookUser */ class FacebookUserSpec extends Specification { // TODO: Write tests }
mehmetakiftutuncu/twittercik
test/FacebookUserSpec.scala
Scala
apache-2.0
194
/* * 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 ...
wowmsi/safe
safe-logic/src/main/scala/safe/safelog/Marshaller.scala
Scala
apache-2.0
1,041
/* * 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 ...
wangmiao1981/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/IntervalUtils.scala
Scala
apache-2.0
55,801
/* * Copyright 2019 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/scio
scio-core/src/main/scala/com/spotify/scio/transforms/ScalaAsyncDoFn.scala
Scala
apache-2.0
941
package ghpages.pages import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.html_<^._ /** * Created by chandrasekharkode on 11/16/14. */ object HomePage { private val p = <.p(^.margin := "1.3em 0") val component = ScalaComponent.static( <.div( <.h1( <.a( ^.color :=...
japgolly/scalajs-react
ghpages/src/main/scala/ghpages/pages/HomePage.scala
Scala
apache-2.0
1,635
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
slamdata/slamengine
foundation/src/main/scala/quasar/contrib/refined/package.scala
Scala
apache-2.0
844
package im.actor.server.api.rpc.service.messaging import scala.concurrent.Future import org.joda.time.DateTime import slick.dbio import slick.driver.PostgresDriver.api._ import im.actor.api.rpc.PeerHelpers._ import im.actor.api.rpc._ import im.actor.api.rpc.DBIOResult._ import im.actor.api.rpc.messaging._ import im....
JamesWatling/actor-platform
actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/messaging/HistoryHandlers.scala
Scala
mit
11,367
package org.sisioh.aws4s.cfn.model import com.amazonaws.services.cloudformation.model.{ DescribeStacksResult, Stack } import org.sisioh.aws4s.PimpedType import scala.collection.JavaConverters._ object DescribeStacksResultFactory { def create(): DescribeStacksResult = new DescribeStacksResult() } class RichDescr...
sisioh/aws4s
aws4s-cfn/src/main/scala/org/sisioh/aws4s/cfn/model/RichDescribeStacksResult.scala
Scala
mit
978
package clean.tex import java.io.{File, FileWriter} import clean.lib._ import ml.Pattern import ml.classifiers._ import util.{StatTests, Datasets, Stat, Tempo} import scala.io.Source object tableMeta extends App { /* +---------+ | mc | +---------+ | 5NN | | C4.55 | | chu | | CIELM | | defr-a | |...
active-learning/active-learning-scala
src/main/scala/clean/tex/tableMeta.scala
Scala
gpl-2.0
4,896
package slrn.metrics trait Metric { def add(target: Double, prediction: Double): Unit def apply(): Double } /** * NE proposed in 'Practical Lessons from Predicting Clicks on Ads at Facebook' * by Xinran He et. al. */ class NormalizedEntropy extends Metric { var nPos = 0 var nNeg = 0 var S = 0.0 def...
lorserker/slrn
src/main/scala/slrn/metrics.scala
Scala
mit
1,324
import org.specs2._ /** * User: Aditya Vishwakarma * Date: 05/11/13 * Time: 2:35 PM */ class Chapter4tests extends Specification { def is = s2""" Tests for Chapter 4 Example code for Option map2 should option + option => Option $m1 option + None => None $m2 none + none => None ...
adityav/fpPractice
src/test/scala/Chapter4tests.scala
Scala
gpl-3.0
2,386
package org.broadinstitute.dsde.firecloud.dataaccess import org.broadinstitute.dsde.firecloud.integrationtest.ElasticSearchShareLogDAOSpecFixtures import org.broadinstitute.dsde.firecloud.model.ShareLog.{Share, ShareType} import org.broadinstitute.dsde.workbench.util.health.SubsystemStatus import scala.concurrent.Exec...
broadinstitute/firecloud-orchestration
src/test/scala/org/broadinstitute/dsde/firecloud/dataaccess/MockShareLogDAO.scala
Scala
bsd-3-clause
1,556
package org.sisioh.aws4s.dynamodb.extension import java.util.Date import com.amazonaws.services.{ dynamodbv2 => aws } import org.sisioh.aws4s.dynamodb.Implicits._ import org.sisioh.aws4s.dynamodb.model._ import scala.collection.JavaConverters._ import scala.util.Try case class Table(underlying: aws.model.TableDescr...
everpeace/aws4s
aws4s-dynamodb-ext/src/main/scala/org/sisioh/aws4s/dynamodb/extension/Table.scala
Scala
mit
4,776
package models import scalaz._ import Scalaz._ import scalaz.NonEmptyList import scalaz.NonEmptyList._ import net.liftweb.json._ import net.liftweb.json.scalaz.JsonScalaz._ import java.nio.charset.Charset import models.Constants._ /** * @author ranjitha * */ package object disks { type DisksResults = List[Opti...
indykish/verticegateway
app/models/disks/package.scala
Scala
mit
1,184
/* * Copyright 2016 org.NLP4L * * 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...
fubuki/nlp4l
app/org/nlp4l/lucene/Document.scala
Scala
apache-2.0
3,245
package object tests { val foo = "foo" }
dotty-staging/dotty
scaladoc-testcases/src/tests/package.scala
Scala
apache-2.0
43
import scala.collection.JavaConversions._ // you can write to stdout for debugging purposes, e.g. // println("this is a debug message") object Solution { def solution(A: Array[Int], B: Array[Int]): Array[Int] = { // write your code in Scala 2.10 val n = Math.min(A.length, B.length) val ...
sfindeisen/prgctst
codility/lesson/Ladder.scala
Scala
gpl-3.0
685
package ch39_back_tracking import org.scalatest.FlatSpec class EightQueensTest extends FlatSpec { behavior of "EightQueensTest" it should "calc8Queues" in { val eightQueens = new EightQueens() eightQueens.calc8Queues(0) } }
wangzheng0822/algo
scala/src/test/scala/ch39_back_tracking/EightQueensTest.scala
Scala
apache-2.0
243
/* * Copyright 2020 Precog Data * * 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 ...
djspiewak/quasar
frontend/src/main/scala/quasar/std/agg.scala
Scala
apache-2.0
2,314
/** * Copyright (c) 2017-2018 BusyMachines * * See company homepage at: https://www.busymachines.com/ * * 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...
busymachines/busymachines-commons
json/src/test/scala/busymachines/json_test/AnomalyJsonTest.scala
Scala
apache-2.0
7,798
package com.sksamuel.elastic4s import org.elasticsearch.action.WriteConsistencyLevel import org.elasticsearch.action.support.replication.ReplicationType import org.scalatest.{ FlatSpec, Matchers } import scala.concurrent.duration._ import com.sksamuel.elastic4s.testkit.ElasticSugar /** @author Stephen Samuel */ class...
tototoshi/elastic4s
elastic4s-core-tests/src/test/scala/com/sksamuel/elastic4s/BulkDslTest.scala
Scala
apache-2.0
2,204
package com.geteit.rcouch.actors import akka.actor._ import spray.http._ import com.geteit.rcouch.Settings.ClusterSettings import akka.event.LoggingReceive import com.geteit.rcouch.couchbase.Couchbase._ import scala.util.Random /** */ class BucketMonitor(_bucket: Bucket, config: ClusterSettings) extends Actor with ...
zbsz/reactive-couch
src/main/scala/com/geteit/rcouch/actors/BucketMonitor.scala
Scala
apache-2.0
1,638
package actors import actors.TescoActor.{GetTransactions, TescoTransaction} import akka.actor.Actor import core.DatabaseCfg._ import domain.TescoTxn import scala.slick.driver.H2Driver.simple._ object TescoActor { case class GetTransactions() case class TescoTransaction(txns: List[TescoTxn]) } class TescoAct...
treidco/dashwiz
src/main/scala/actors/TescoActor.scala
Scala
cc0-1.0
535
package com.twitter.finagle.memcachedx.integration import com.twitter.common.application.ShutdownRegistry.ShutdownRegistryImpl import com.twitter.common.zookeeper.ServerSet.EndpointStatus import com.twitter.common.zookeeper.testing.ZooKeeperTestServer import com.twitter.common.zookeeper.{CompoundServerSet, ZooKeeperUt...
travisbrown/finagle
finagle-memcachedx/src/test/scala/com/twitter/finagle/memcachedx/integration/CacheNodeGroupTest.scala
Scala
apache-2.0
9,476
package utils import org.apache.commons.logging.LogFactory import org.apache.hadoop.fs.{FileSystem, Path} import org.apache.hadoop.mapred._ import org.apache.spark.{SparkConf, SparkContext} import org.apache.spark.SparkContext._ class DirectOutputCommitter extends OutputCommitter { private final val LOG = LogFactor...
Vaishaal/ckm
keystone_pipeline/src/main/scala/loaders/DirectOutputCommitter.scala
Scala
apache-2.0
975
/* * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Fou...
TiarkRompf/lancet
src/main/scala/generated/scala/FloatSparseVectorViewCSR.scala
Scala
agpl-3.0
1,308
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
slamdata/matryoshka
core/shared/src/main/scala/matryoshka/instances/fixedpoint/package.scala
Scala
apache-2.0
11,129
package models.product.traits import javax.persistence.Column trait BasicDetails { @Column(nullable = false, length = 192) var name: String = _ @Column(nullable = true, length = 255) var description: String = _ @Column(nullable = true, length = 5000) var longDescription: String = _ }
Bhashit/play-commerce
app/models/product/traits/BasicDetails.scala
Scala
mit
302
package org.jetbrains.plugins.scala package annotator package element import com.intellij.openapi.util.TextRange import com.intellij.psi._ import org.jetbrains.plugins.scala.annotator.AnnotatorUtils.{registerTypeMismatchError, withoutNonHighlightables} import org.jetbrains.plugins.scala.annotator.createFromUsage.{Crea...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/annotator/element/ScMethodInvocationAnnotator.scala
Scala
apache-2.0
10,282
package gapt.formats.verit import java.io.{ Reader, StringReader } import gapt.expr._ import gapt.expr.formula.All import gapt.expr.formula.And import gapt.expr.formula.Eq import gapt.expr.formula.Imp import gapt.expr.formula.Neg import gapt.expr.formula.Or import gapt.expr.formula.fol.FOLAtom import gapt.expr.formul...
gapt/gapt
core/src/main/scala/gapt/formats/verit/VeriTParser.scala
Scala
gpl-3.0
15,773
package CSON import CSON.Types._ import java.util.Date import EntityInterface._ import scala.language.dynamics import java.nio.{ByteOrder, ByteBuffer} class CSONElement(typeCode:Byte) extends IElementValue { import CSONTypes._ private val thisElementType = CSONTypesArray.CSONElementTypes(typeCode) private var va...
Mevolutrix/MevoFramework
Common/src/main/scala/CSON/CSONElement.scala
Scala
apache-2.0
12,568
import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future object _1_FutureMap { def printUser(): Unit = { // Util.getUserFromExternalService(1) // Use 'map' to get a future of type string, and print out // the string when the future is completed } def main(args: Arra...
JohnMurray/akka-actors-futures-presentation
IntelliJProject/src/main/scala/_1_FutureMap.scala
Scala
mit
365
/* * Copyright 2007-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 b...
jeppenejsum/liftweb
framework/lift-base/lift-util/src/main/scala/net/liftweb/util/BindPlus.scala
Scala
apache-2.0
3,662
package io.udash.web.guide.views.frontend.demos import io.udash.web.guide.demos.AutoDemo import io.udash.web.guide.styles.partials.GuideStyles import scalatags.JsDom.all._ object RepeatDemo extends AutoDemo { private val (rendered, source) = { import io.udash._ import io.udash.css.CssView._ import org....
UdashFramework/udash-core
guide/guide/.js/src/main/scala/io/udash/web/guide/views/frontend/demos/RepeatDemo.scala
Scala
apache-2.0
1,312
/** * sbt-android-mill - simple-build-tool multi-thread plugin with profiling * * 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 * *...
sbt-android-mill/sbt-android-mill
src/main/scala/sbt/android/mill/proguard/Proguard.scala
Scala
apache-2.0
6,173
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
slamdata/slamengine
frontend/src/main/scala/quasar/frontend/logicalplan/Optimizer.scala
Scala
apache-2.0
16,453
import tw.com.ehanlin.mde.MongoEmbedder class Example4 extends ReadmeExampleTest {def is = s2""" Example4 $example4 """ def example4 = { val dsl = """ |@findOne <db=game coll=game query={ _id : { $oid : "557e58727a8ea2a9dfe2ef83" } } projection={ _id : 0 }> |< | box_score ...
eHanlin/mongodb-dbobject-embedder
src/test/scala/Example4.scala
Scala
mit
1,184
/*-------------------------------------------------------------------------*\\ ** ScalaCheck ** ** Copyright (c) 2007-2014 Rickard Nilsson. All rights reserved. ** ** http://www.scalacheck.org ** ** ...
cgta/open
serland/shared/src/main/scala/cgta/serland/gen/Arbitrary.scala
Scala
mit
13,713
package org.odfi.indesign.core.module.artifactresolver import java.io.File import java.util.jar.JarFile import org.eclipse.aether.artifact.{Artifact, DefaultArtifact} import org.odfi.indesign.core.brain.{Brain, ExternalBrainRegion} import org.odfi.indesign.core.module.IndesignModule import scala.jdk.CollectionConver...
opendesignflow/indesign
indesign-stdplatform/src/main/scala/org/odfi/indesign/core/module/artifactresolver/ArtifactExternalRegion.scala
Scala
gpl-3.0
2,547
package adt.bson.mongo.codecs import adt.bson.mongo._ import adt.bson.{BsonFormat, BsonValue, _} import org.bson._ import org.bson.codecs.configuration.CodecRegistry import org.bson.codecs.{Codec, DecoderContext, EncoderContext} import scala.language.implicitConversions import scala.reflect.ClassTag /** * Provides ...
jeffmay/bson-adt
bson-adt-core/src/main/scala/adt/bson/mongo/codecs/BsonCodecImplicits.scala
Scala
apache-2.0
3,149
/* * 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/ct600e/v3/E3.scala
Scala
apache-2.0
930
/*********************************************************************** * Copyright (c) 2013-2017 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...
ronq/geomesa
geomesa-hbase/geomesa-hbase-tools/src/main/scala/org/locationtech/geomesa/hbase/tools/stats/HBaseStatsCountCommand.scala
Scala
apache-2.0
1,137
/* * Copyright 2017 Workday, Inc. * * This software is available under the MIT license. * Please see the LICENSE.txt file in this project. */ package com.workday.esclient.actions import com.google.gson.Gson import com.workday.esclient.JsonUtils import io.searchbox.action.{AbstractMultiTypeActionBuilder, GenericR...
Workday/escalar
src/main/scala/com/workday/esclient/actions/SnapshotCreateAction.scala
Scala
mit
2,399
package com.datastax.spark.connector.rdd.reader import com.datastax.driver.core.{ProtocolVersion, Row} import com.datastax.spark.connector._ import com.datastax.spark.connector.cql.TableDef import com.datastax.spark.connector.types.TypeConverter import com.datastax.spark.connector.util.JavaApiHelper class ValueRowRea...
boneill42/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/rdd/reader/ValueRowReader.scala
Scala
apache-2.0
1,527
package peregin.gpv.model import java.awt.Color sealed abstract class SlopeSegment(grade: MinMax, val color: Color) { def includes(slope: Double) = grade.includes(slope) override def toString = f"${getClass.getSimpleName.dropRight(1)} (${grade.min}%.0f - ${grade.max}%.0f)%%" } object SlopeSegment { case obje...
peregin/gps-overlay-on-video
src/main/scala/peregin/gpv/model/SlopeSegment.scala
Scala
mit
984
/** * 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/descriptions/HasInferenceResult.scala
Scala
apache-2.0
737
/******************************************************************************* Copyright (c) 2013, S-Core. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. *********************************************************************...
daejunpark/jsaf
src/kr/ac/kaist/jsaf/analysis/typing/models/builtin/BuiltinObject.scala
Scala
bsd-3-clause
96,275
/* * Copyright © 2015 Lukas Rosenthaler, Benjamin Geer, Ivan Subotic, * Tobias Schweizer, Sepideh Alassi, André Kilchenmann, and Sepideh Alassi. * * This file is part of Knora. * * Knora is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as publi...
nie-ine/Knora
webapi/src/main/scala/org/knora/webapi/messages/v1/responder/resourcemessages/ResourceMessagesV1.scala
Scala
agpl-3.0
56,665
/* * Accio is a platform to launch computer science experiments. * Copyright (C) 2016-2018 Vincent Primault <v.primault@ucl.ac.uk> * * Accio is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version...
privamov/accio
accio/java/fr/cnrs/liris/infra/thriftserver/AuthStrategy.scala
Scala
gpl-3.0
1,062
/** * Digi-Lib - base library for Digi components * * Copyright (c) 2012-2014 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....
ezh/digi-lib
src/main/scala/org/digimead/digi/lib/cache/HashMapCache.scala
Scala
apache-2.0
3,155
/* * Copyright (c) 2013, Scodec * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions a...
scodec/scodec
unitTests/src/test/scala/scodec/codecs/PackedDecimalCodecTest.scala
Scala
bsd-3-clause
3,051
package Problems object p9 extends Problem { val limit = 1000 lazy val (a, b, c) = (for ( b <- 2 until limit; a <- 0 until b; c = limit - a - b if a * a + b * b == c * c ) yield (a, b, c)).head lazy val product = a * b * c override def solve(): Long = product }
catap/scala-euler
src/main/scala/Problems/p9.scala
Scala
unlicense
293
/* ************************************************************************************* * Copyright 2013 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
Kegeruneku/rudder
rudder-web/src/main/scala/com/normation/rudder/web/rest/changeRequest/ChangeRequestApi.scala
Scala
agpl-3.0
2,075
package com.kubukoz.scala99 import scala.annotation.tailrec /** * P09 (**) Pack consecutive duplicates of list elements into sublists. * If a list contains repeated elements they should be placed in separate sublists. * Example: * * * scala> pack(List('a, 'a, 'a, 'a, 'b, 'c, 'c, 'a, 'a, 'd, 'e, 'e, 'e, 'e))...
kubukoz/scala-99
src/main/scala/com/kubukoz/scala99/P09.scala
Scala
apache-2.0
875
import java.util.concurrent.TimeUnit import com.codahale.metrics.graphite.{Graphite, GraphiteReporter} import com.codahale.metrics.{ConsoleReporter, MetricRegistry} import scopt.OptionParser object Main { case class Config(host: String = "localhost", port: Int = 8090, url: S...
xxpizzaxx/waterslide
src/main/scala/Main.scala
Scala
mit
2,830
package org.http4s import scalaz.scalacheck.ScalazProperties import org.http4s.CharsetRange.`*` import org.scalacheck.{Gen, Prop} import org.scalacheck.Prop.forAll import org.scalacheck.Arbitrary._ import org.specs2.ScalaCheck import org.specs2.mutable.Specification import scalaz.syntax.order._ class CharsetRangeSpe...
m4dc4p/http4s
tests/src/test/scala/org/http4s/CharsetRangeSpec.scala
Scala
apache-2.0
1,157