code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
package org.sisioh.aws4s.s3.model import java.util.Date import com.amazonaws.services.s3.model.{ MultipartUpload, Owner } import org.sisioh.aws4s.PimpedType object RichMultipartUploadFactory { def create(): MultipartUpload = new MultipartUpload() } class RichMultipartUpload(val underlying: MultipartUpload) ...
everpeace/aws4s
aws4s-s3/src/main/scala/org/sisioh/aws4s/s3/model/RichMultipartUpload.scala
Scala
mit
1,357
package com.rasterfoundry.database import com.rasterfoundry.datamodel._ import com.rasterfoundry.datamodel.{AuthFailure, PageRequest, Project, ToolRun} import cats.Applicative import cats.implicits._ import doobie._ import doobie.implicits._ import doobie.implicits.javasql._ import doobie.postgres.implicits._ import...
raster-foundry/raster-foundry
app-backend/db/src/main/scala/MapTokenDao.scala
Scala
apache-2.0
4,558
/* * Copyright (C) 2012 The Regents of The University California. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENS...
mattyb149/blinkdb
src/main/scala/shark/memstore2/column/NullableColumnIterator.scala
Scala
apache-2.0
2,106
/* * Copyright 2017 Datamountaineer. * * 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...
datamountaineer/stream-reactor
kafka-connect-rethink/src/test/scala/com/datamountaineer/streamreactor/connect/rethink/config/TestReThinkSinkSettings.scala
Scala
apache-2.0
2,092
/* * ========================================================================================= * Copyright © 2013-2017 the kamon project <http://kamon.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...
kamon-io/kamon-netty
src/test/scala/kamon/netty/Servers.scala
Scala
apache-2.0
5,962
package org.jetbrains.plugins.scala.failed.annotator import org.jetbrains.plugins.scala.PerfCycleTests import org.jetbrains.plugins.scala.base.ScalaLightCodeInsightFixtureTestAdapter import org.junit.experimental.categories.Category /** * @author Roman.Shein * @since 28.03.2016. */ @Category(Array(classOf[PerfC...
katejim/intellij-scala
test/org/jetbrains/plugins/scala/failed/annotator/OverridingAnnotatorTest2.scala
Scala
apache-2.0
1,471
package com.mesosphere.cosmos.handler import com.mesosphere.cosmos.error.CosmosException import com.mesosphere.cosmos.handler.ServiceUpdateHandler._ import com.mesosphere.cosmos.rpc import io.circe.syntax._ import org.scalatest.FreeSpec import org.scalatest.Matchers class ServiceUpdateHandlerSpec extends FreeSpec wit...
dcos/cosmos
cosmos-test-common/src/test/scala/com/mesosphere/cosmos/handler/ServiceUpdateHandlerSpec.scala
Scala
apache-2.0
2,490
/** * Angles * Copyright (C) 2014 Sebastian Schelter * * 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. * * Thi...
nwolber/angles
src/main/scala/io/ssc/angles/pipeline/ExtractMetadata.scala
Scala
gpl-3.0
7,698
/** * Copyright (c) 2016 Bernard Leach * * 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, modify, merge, publ...
leachbj/akka-http-newrelic
src/main/scala/com/github/leachbj/newrelic/akka/http/scaladsl/InboundHttpHeaders.scala
Scala
mit
1,534
/* * Copyright 2016 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicabl...
kythe/kythe-contrib
kythe/scala/com/google/devtools/kythe/analyzers/scala/testdata/verified/object_extension.scala
Scala
apache-2.0
2,263
// Project: Default (Template) Project // Module: // Description: // Copyright (c) 2016. Distributed under the MIT License (see included LICENSE file). package routing import angulate2.std._ import angulate2.ext.tags.simple._ import scalatags.Text.all._ @Component( template = tpl( h2("Page not found")...
jokade/angulate2-examples
routing/src/main/scala/routing/PageNotFoundComponent.scala
Scala
mit
360
package controllers import Common.PrototypeHtml import helpers.disposal_of_vehicle.CookieFactoryForUnitSpecs import helpers.{UnitSpec, TestWithApplication} import org.mockito.Mockito.when import pages.disposal_of_vehicle.{BeforeYouStartPage, SetupTradeDetailsPage, VehicleLookupPage} import play.api.test.FakeRequest im...
dvla/vehicles-online
test/controllers/VehicleLookupFailureUnitSpec.scala
Scala
mit
4,440
package org.psesd.srx.shared.core import org.json4s.JValue import org.psesd.srx.shared.core.config.Environment import org.psesd.srx.shared.core.exceptions.{ArgumentInvalidException, SrxRequestActionNotAllowedException} import org.psesd.srx.shared.core.sif.SifRequestAction.SifRequestAction import org.psesd.srx.shared.c...
PSESD/srx-shared-core
src/test/scala/org/psesd/srx/shared/core/TestValues.scala
Scala
mit
3,146
import sbt._ import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._ /** * Application settings. Configure the build for your application here. * You normally don't have to touch the actual build definition after this. */ object Settings { /** The name of your application */ val name = "YOUR PROJECT NAME" /*...
mitchdzugan/PSPSjsAR-stack-template
project/Settings.scala
Scala
apache-2.0
3,093
package uk.gov.gds.router.controller import org.scalatra.ScalatraFilter import javax.servlet.http.Cookie import scala.collection.JavaConversions._ class MainTestHarnessController extends ScalatraFilter { before() { response.setContentType("text/html") } get("/test/test-harness") { output(dumpParams) ...
gds-attic/scala-router
router/router-test-harness-main-host/src/main/scala/uk/gov/gds/router/controller/MainTestHarnessController.scala
Scala
mit
2,603
package scala.meta.tests.metacp import java.nio.charset.StandardCharsets import java.nio.file.FileVisitResult import java.nio.file.Files import java.nio.file.Path import java.nio.file.attribute.BasicFileAttributes import munit.FunSuite import munit.Ignore import scala.meta.tests.Slow import scala.collection.JavaConver...
scalameta/scalameta
tests/jvm/src/test/scala-2.12/scala/meta/tests/metacp/SignatureSuite.scala
Scala
bsd-3-clause
3,429
package dzufferey.utils import scala.collection.mutable.HashMap class Namer { private val map = new java.util.concurrent.ConcurrentHashMap[String, java.util.concurrent.atomic.AtomicInteger]() private def counter = new java.util.concurrent.atomic.AtomicInteger() def getPrefixAndVersion(prefix: String) = { ...
dzufferey/misc-scala-utils
src/main/scala/dzufferey/utils/Namer.scala
Scala
apache-2.0
1,517
package scife package enumeration import org.scalatest._ class EnumTest extends FunSuite with Matchers { test("factory method") { { val enum = Enum((Set(1, 2, 3) map { Set(_) }).toList) enum shouldBe a [WrapArray[_]] enum.hasDefiniteSize should be (true) enum.size should be (3) } ...
kaptoxic/SciFe
src/test/scala/scife/enumeration/EnumTest.scala
Scala
gpl-2.0
1,239
package mesosphere.marathon package upgrade import mesosphere.UnitTest import mesosphere.marathon.state._ import mesosphere.marathon.test.GroupCreation class GroupVersioningUtilTest extends UnitTest with GroupCreation { val emptyGroup = createRootGroup(version = Timestamp(1)) val app = AppDefinition(Absolute...
mesosphere/marathon
src/test/scala/mesosphere/marathon/upgrade/GroupVersioningUtilTest.scala
Scala
apache-2.0
4,218
package dialectic.example.micro import dialectic.micro._ import dialectic.micro.Micro._ import scalaz.Show import scalaz.std.anyVal.intInstance import scalaz.std.string._ import scalaz.syntax.foldable._ object MicroExample0 { def stringify[A : Show](r: Streem[A], n: Int): String = r.take(n).takeAll.map(Show[A]...
adelbertc/dialectic
example/src/main/scala/dialectic/example/micro/MicroExample0.scala
Scala
bsd-3-clause
1,114
package hr.element.beepo.client package email import scala.xml.Elem import scalax.file.Path object Email { def apply(from: From, to: To, subject: Subject): Email = Email(from, Seq(to), Nil, Nil, Nil, subject, None, None, Nil) import org.apache.commons.codec.binary.Base64 private def b64encode(bytes: Array...
element-doo/beepo
code/scala/client/src/main/scala/hr/element/beepo/client/email/Email.scala
Scala
bsd-3-clause
2,549
package sp.domain.logic import play.api.libs.json._ import scala.util.Try import org.threeten.bp._ import sp.domain._ /** * To use the attributes, you also need to include the json formaters * import sp.domain.Logic._ to get it all */ object AttributeLogic extends AttributeLogics trait AttributeLogics { // A...
kristoferB/SP
spdomain/src/main/scala/sp/domain/logic/AttributeLogic.scala
Scala
mit
2,996
/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package swave.benchmarks import scala.concurrent.Future import scala.concurrent.duration._ import swave.core....
sirthias/swave
benchmarks/src/main/scala/swave/benchmarks/Swave.scala
Scala
mpl-2.0
2,897
package fr.acinq.bitcoin.samples import fr.acinq.bitcoin._ object KeysFromXpub extends App { /** * this is how you would derive pubkeys and addresses from an xpub that someone gave you * we currently support BIP49 (p2sh-of-p2wpkh) and BIP84 (p2wpkh) * */ def deriveAddresses(xpub: String) = { ...
ACINQ/bitcoin-lib
src/test/scala/fr/acinq/bitcoin/samples/KeysFromXpub.scala
Scala
apache-2.0
1,264
package com.twitter.finagle.thriftmux.service import com.twitter.finagle._ import com.twitter.finagle.filter.{ClientExceptionTracingFilter => ExceptionTracingFilter} import com.twitter.finagle.thrift.ClientDeserializeCtx import com.twitter.finagle.tracing.Tracing import com.twitter.io.Buf import com.twitter.util.{Futu...
twitter/finagle
finagle-thriftmux/src/main/scala/com/twitter/finagle/thriftmux/service/ClientExceptionTracingFilter.scala
Scala
apache-2.0
1,312
/* * MUSIT is a museum database to archive natural and cultural history data. * Copyright (C) 2016 MUSIT Norway, part of www.uio.no (University of Oslo) * * 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 Softw...
kpmeen/musit
service_actor/test/repositories/dao/OrganisationDaoSpec.scala
Scala
gpl-2.0
4,746
Either[A, B] => A
hmemcpy/milewski-ctfp-pdf
src/content/1.9/code/scala/snippet14.scala
Scala
gpl-3.0
17
/* * This file is part of the sohva project. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
gnieh/sohva
src/test/scala/gnieh/sohva/test/TestBulkDocs.scala
Scala
apache-2.0
3,171
package lila.hub import scala.concurrent.duration._ import actorApi.map._ import akka.actor._ import akka.pattern.{ ask, pipe } import makeTimeout.short trait ActorMap extends Actor { private val actors = scala.collection.mutable.Map.empty[String, ActorRef] def mkActor(id: String): Actor def actorMapReceive...
clarkerubber/lila
modules/hub/src/main/ActorMap.scala
Scala
agpl-3.0
1,239
import example.launcher.JettyLauncherSupport object JettyLauncher extends JettyLauncherSupport { override def resourceBase: String = "src/main/webapp" }
debop/scalatra-spring-couchbase
src/main/scala/JettyLauncher.scala
Scala
apache-2.0
159
// A simple recursive solution def ints(count: Int)(rng: RNG): (List[Int], RNG) = if (count == 0) (List(), rng) else { val (x, r1) = rng.nextInt val (xs, r2) = ints(count - 1)(r1) (x :: xs, r2) } // A tail-recursive solution def ints2(count: Int)(rng: RNG): (List[Int], RNG) = { def go(count: ...
ud3sh/coursework
functional-programming-in-scala-textbook/answerkey/state/04.answer.scala
Scala
unlicense
508
package scaladex.server.route import scala.concurrent.ExecutionContext import akka.http.scaladsl.model.StatusCodes.TemporaryRedirect import akka.http.scaladsl.model.Uri.Query import akka.http.scaladsl.model._ import akka.http.scaladsl.model.headers.Referer import akka.http.scaladsl.server.Directives._ import akka.htt...
scalacenter/scaladex
modules/server/src/main/scala/scaladex/server/route/Oauth2.scala
Scala
bsd-3-clause
3,031
/* * Copyright (c) <2015-2016>, see CONTRIBUTORS * 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, this list...
amanjpro/languages-a-la-carte
dcct/src/main/scala/ast/TreeFactories.scala
Scala
bsd-3-clause
3,179
package com.sksamuel.avro4s.schema import com.sksamuel.avro4s.AvroSchema import org.scalatest.{FunSuite, Matchers} class NamespaceSchemaTest extends FunSuite with Matchers { test("use package name for top level class") { val expected = new org.apache.avro.Schema.Parser().parse(getClass.getResourceAsStream("/to...
51zero/avro4s
avro4s-core/src/test/scala/com/sksamuel/avro4s/schema/NamespaceSchemaTest.scala
Scala
mit
1,547
/** * This file is part of the TA Buddy project. * Copyright (c) 2012-2014 Alexey Aksenov ezh@ezh.msk.ru * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Global License version 3 * as published by the Free Software Foundation with the addition...
digimead/digi-TABuddy-desktop
part-core-ui/src/main/scala/org/digimead/tabuddy/desktop/core/ui/Resources.scala
Scala
agpl-3.0
13,609
/* Copyright 2014 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 in writing, software distr...
nabarunnag/Summingbird_dev
summingbird-core-test/src/test/scala/com/twitter/summingbird/memory/ConcurrentMemoryLaws.scala
Scala
apache-2.0
7,476
/* * 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...
liquidarmour/http-verbs
project/HmrcBuild.scala
Scala
apache-2.0
2,329
/* * Copyright 2016 Michal Harish, michal.harish@gmail.com * * 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 ...
amient/affinity
core/src/main/scala/io/amient/affinity/core/cluster/CoordinatorZk.scala
Scala
apache-2.0
4,240
/* * Copyright 2016 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...
ahudspith-equalexperts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v2/B172.scala
Scala
apache-2.0
971
package com.twitter.finagle.tracing import scala.util.control.NonFatal case class TraceId128(low: Option[SpanId], high: Option[SpanId]) object TraceId128 { val empty: TraceId128 = TraceId128(None, None) /** * Extracts the high 64bits (if set and valid) and low 64bits (if valid) from a B3 TraceID's string rep...
twitter/finagle
finagle-core/src/main/scala/com/twitter/finagle/tracing/TraceId128.scala
Scala
apache-2.0
886
package io.buoyant.namer.consul import com.twitter.conversions.DurationOps._ import com.twitter.finagle.http.{Request, Response, Status, Version} import com.twitter.finagle.stats.NullStatsReceiver import com.twitter.finagle.util.DefaultTimer import com.twitter.finagle.{Addr, Address, Failure, IndividualRequestTimeoutE...
BuoyantIO/linkerd
namer/consul/src/test/scala/io/buoyant/namer/consul/SvcAddrTest.scala
Scala
apache-2.0
11,658
/** * 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...
kavink92/kafka-0.8.0-beta1-src
core/src/test/scala/unit/kafka/server/ServerShutdownTest.scala
Scala
apache-2.0
3,963
package org.scalatest.tools.scalasbt import org.scalatest.FunSuite import org.scalatest.tags.Disk @Disk class DiskTaggedSuite extends FunSuite { test("test 1") { } test("test 2") { } test("test 3") { } }
svn2github/scalatest
src/test/scala/org/scalatest/tools/scalasbt/DiskTaggedSuite.scala
Scala
apache-2.0
239
package ulang import ulang.expr.Expr import ulang.expr.Var import ulang.expr.Pat import ulang.expr.unify package object prove { type Env = Map[Var, Expr] type Ind = List[(Pat, List[Goal])] object Env { val empty: Env = Map() def apply(dfs: List[(Var, Expr)]): Env = { Map(dfs: _*) } ...
gernst/ulang-proto
src/main/scala/ulang/prove/package.scala
Scala
mit
740
package mountainrangepvp.engine.input import com.badlogic.gdx.math.Vector2 import mountainrangepvp.engine.input.Bindings._ /** * Maps from raw key and mouse events to actions. */ class InputMapper { private var emptyStates: Map[String, Boolean] = Map.empty private var mouseButtons: Map[MouseButton, String] = Ma...
thorinii/MountainRangePvP
src/main/scala/mountainrangepvp/engine/input/InputMapper.scala
Scala
mit
1,525
package 练习05 trait 被乘数 { type 被乘[T <: 乘数] <: 自然数 } class 被乘数Positive[Tail <: 被乘数, Head] extends 被乘数 { override type 被乘[T <: 乘数] = T#乘[Tail, Head] } class 被乘数Zero extends 被乘数 { override type 被乘[T <: 乘数] = 自然数Zero } trait 乘数 { type 乘[T <: 被乘数, H] <: 自然数 } class 乘数Positive[Tail <: 乘数, Head] extends 乘数 { overri...
djx314/ubw
a28-练习/src/main/scala/练习05/乘法.scala
Scala
bsd-3-clause
775
// Copyright 2017 Foursquare Labs Inc. All Rights Reserved. package io.fsq.common.testing.matchers.test import io.fsq.common.testing.AssertException import io.fsq.common.testing.matchers.{FoursquareMatchers => FM} import org.junit.{Assert => A, Test} import scala.util.matching.Regex class FoursquareMatchersTest { ...
foursquare/fsqio
test/jvm/io/fsq/common/testing/matchers/test/FoursquareMatchersTest.scala
Scala
apache-2.0
1,553
/** * Objeto para probar la funcionalidad requerida */ object Prueba extends App{ import Huffman._ /** * Codigo Huffman para el lenguaje frances, obtenido a partir de la pagina * web http://fr.wikipedia.org/wiki/Fr%C3%A9quence_d%27apparition_des_lettres_en_fran%C3%A7ais */ val codigoHuffmanFranc...
romanarranz/NTP
P5/src/Prueba.scala
Scala
mit
4,414
/**************************************************************************** * Copyright (C) 2015 Łukasz Szpakowski. * * * * This software is licensed under the GNU General Public License * * v3 ...
luckboy/IssueNotifier
src/main/scala/pl/luckboy/issuenotifier/GitHubDataFetcher.scala
Scala
gpl-3.0
8,031
package com.treode.server import scala.util.parsing.input.OffsetPosition import com.treode.store.TableId import org.scalatest.FreeSpec import SchemaParser._ class SchemaParserSpec extends FreeSpec { def assertSuccess (s: String, expected: Schema): Unit = assertResult (CompilerSuccess (expected)) (parse (s)) ...
Treode/store
server/test/com/treode/server/SchemaParserSpec.scala
Scala
apache-2.0
2,252
/* * 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-test/src/test/scala/com/spotify/scio/values/SCollectionWithSideOutputTest.scala
Scala
apache-2.0
2,137
package com.github.tminglei.slickpg import java.sql.{Timestamp, Time, Date} import java.util.Calendar import java.text.SimpleDateFormat import org.scalatest.FunSuite import scala.concurrent.Await import scala.concurrent.duration._ class PgDateSupportSuite extends FunSuite { import MyPostgresDriver.api._ val db...
timcharper/slick-pg
src/test/scala/com/github/tminglei/slickpg/PgDateSupportSuite.scala
Scala
bsd-2-clause
8,664
/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
maslovalex/scalate
scalate-core/src/main/scala/org/fusesource/scalate/ssp/SspParser.scala
Scala
apache-2.0
6,980
/** Open Bank Project - API Copyright (C) 2011, 2014, TESOBE / Music Pictures Ltd 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 Foundation, either version 3 of the License, or (at your option) any later...
OpenBankProject/status
src/main/scala/com/tesobe/status/model/Message.scala
Scala
agpl-3.0
1,682
def f(arr:List[Int]):List[Int] = arr.foldLeft(List[Int]())((a, b) => b::a)
franklingu/HackerRank
functional-programming/introduction/reverse-a-list/reverse_a_list.scala
Scala
mit
75
package yang.notification import akka.actor.{ActorRef, ActorRefFactory, Props} import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation._ /** * Created by y28yang on 3/31/2016. */ @Configuration class NotificationCoreModule { @Autowired var actorFactory: Ac...
wjingyao2008/firsttry
NextGenAct/src/main/scala/yang/notification/NotificationCoreModule.scala
Scala
apache-2.0
964
/* * 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...
zhangxiaoli73/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/tensor/DenseTensor.scala
Scala
apache-2.0
92,055
package com.airtonjal.poc.producer import java.text.{SimpleDateFormat, DateFormat} import java.util.{Locale, TimeZone, Date} import com.airtonjal.poc.parser.pchr.PCHRParser import com.airtonjal.poc.producer.impl.PCHRProducer import com.airtonjal.poc.utils.{SizeFormatter, CommandLineUtils} import org.apache.commons.lo...
airtonjal/Big-Data-Pipeline
producer/src/main/scala/com/airtonjal/poc/producer/Main.scala
Scala
mit
2,386
/* Stratagem is a model checker for transition systems described using rewriting rules and strategies. Copyright (C) 2013 - SMV@Geneva University. Program written by Edmundo Lopez Bobeda <edmundo [at] lopezbobeda.net>. This program is free software; you can redistribute it and/or modify it under the terms of the GNU G...
didierbuchs/oldstratagem
src/main/scala/ch/unige/cui/smv/stratagem/ts/One.scala
Scala
gpl-2.0
1,319
/* * 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/ct600a/v3/A30.scala
Scala
apache-2.0
1,360
/* * Copyright (c) 2010-2011 Belmont Technology Pty Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * U...
GrahamLea/SodaTest
sodatest-api/src/main/scala/org/sodatest/api/reflection/ReflectiveSodaFixture.scala
Scala
apache-2.0
2,503
package muster.codec.json import muster.{Consumer, Junk} class Ac { type Foo = Junk object WithAlias { implicit val WithAliasConsumer = Consumer.consumer[WithAlias] } case class WithAlias(in: Foo) case class NoAlias(in: Junk) }
json4s/muster
codecs/json/src/test/scala/muster/codec/json/Ac.scala
Scala
mit
247
object Test extends App { def printIArray[T](arr: IArray[T]): Unit = println(arr.asInstanceOf[Array[T]].mkString("IArray(", ",", ")")) // This is used to check the correct result, as well as checking that the IArray was not mutated in place def assertDifferent[T, U](expr: IArray[T], sources: IArray[U]*): Un...
lampepfl/dotty
tests/run-bootstrapped/iarray-extmtds.scala
Scala
apache-2.0
3,090
/* * Copyright (c) 2015 Andreas Wolf * * See te LICENSE file in the project root for further copyright information. */ package info.andreaswolf.roadhopper.measurements import com.emotioncity.soriento.ODocumentReader import com.emotioncity.soriento.RichODocumentImpl._ import com.emotioncity.soriento.annotations.Em...
andreaswolf/roadhopper
src/main/scala/info/andreaswolf/roadhopper/measurements/Measurement.scala
Scala
mit
1,412
package com.cloudray.scalapress.item import com.cloudray.scalapress.item.attr.{Attribute, AttributeFuncs} import scala.util.Random import com.cloudray.scalapress.search.Sort /** @author Stephen Samuel */ object ItemSorter { def sort(objs: Iterable[Item], sort: Sort, sortAttribute: Option[Attr...
vidyacraghav/scalapress
src/main/scala/com/cloudray/scalapress/item/ItemSorter.scala
Scala
apache-2.0
1,092
/* * 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/main/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/relatedPartyTransactions/AC7801.scala
Scala
apache-2.0
1,155
/* * Shadowsocks - A shadowsocks client for Android * Copyright (C) 2014 <max.c.lv@gmail.com> * * 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 y...
catinred2/shadowsocks-android
src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala
Scala
gpl-3.0
21,780
package se.citerus.dddsample.domain.model.handling import se.citerus.dddsample.domain.model.location.UnLocode case class UnknownLocationException(val unlocode:UnLocode) extends Exception() { override def getMessage = "No location with UN locode " + unlocode.idString + " exists in the system" }
oluies/ddd-sample-scala
src/main/scala/se/citerus/dddsample/domain/model/handling/UnknownLocationException.scala
Scala
mit
304
/** * 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...
MykolaB/gatling
gatling-charts/src/main/scala/io/gatling/charts/component/ErrorsTableComponent.scala
Scala
apache-2.0
2,211
/** * Copyright 2011-2016 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...
GabrielPlassard/gatling
gatling-http/src/test/scala/io/gatling/http/check/body/HttpBodyRegexCheckSpec.scala
Scala
apache-2.0
3,742
package carldata.sf.compiler /** * Helper object for definition of Result. * Status code which is return by compiler Checkers */ object Result { sealed trait Result { /** Join 2 results */ def andThen(r2: => Result): Result } object Ok extends Result { override def andThen(r2: => Result): Res...
carldata/flow-script
src/main/scala/carldata/sf/compiler/Result.scala
Scala
apache-2.0
445
/* * Copyright 2021 ABSA Group Limited * * 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...
AbsaOSS/spline
persistence/src/main/scala/za/co/absa/spline/persistence/model/Attribute.scala
Scala
apache-2.0
904
/* * 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 ...
rikima/spark
core/src/test/scala/org/apache/spark/util/collection/ExternalAppendOnlyMapSuite.scala
Scala
apache-2.0
19,912
/* 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 not use this f...
transcendent-ai-labs/DynaML
dynaml-core/src/main/scala/io/github/mandar2812/dynaml/probability/MeasurableFunction.scala
Scala
apache-2.0
6,000
package models import formats.MongoJsonFormats import play.modules.reactivemongo.ReactiveMongoPlugin import play.api.Play.current import play.modules.reactivemongo.json.collection.JSONCollection class MongoModel(collectionName: String) extends MongoJsonFormats { def driver = ReactiveMongoPlugin.driver def connec...
jdauphant/play_api_example
app/models/MongoModel.scala
Scala
isc
475
package br.unb.cic.poo.gol trait Rules { /* metodo abstrato para verificar se uma celula deve ser mantida viva */ def shouldKeepAlive(i: Int, j: Int): Boolean /* metodo abstrato para verificar se uma celula deve (re)nascer */ def shouldRevive(i: Int, j: Int): Boolean }
PeterTowers/TP1-022017
GoLScala/GoLScala_INF/src/br/unb/cic/poo/gol/Rules.scala
Scala
mit
280
package artisanal.pickle.maker import models._ import parser._ import org.specs2._ import mutable._ import specification._ import scala.reflect.internal.pickling.ByteCodecs import scala.tools.scalap.scalax.rules.scalasig._ import com.novus.salat.annotations.util._ import scala.reflect.ScalaSignature class Option...
julianpeeters/artisanal-pickle-maker
src/test/scala/doubleValueMember/OptionSpecs/OptionListUserListUserSpec.scala
Scala
apache-2.0
1,082
package com.github.mdr.mash.os import java.nio.file.Paths import com.github.mdr.mash.os.linux.GlobHelper import org.scalatest.{ FlatSpec, Matchers } class GlobHelperTest extends FlatSpec with Matchers { "Finding the start directory for a glob" should "work" in { GlobHelper.globStart("/etc/*") should equal(Pat...
mdr/mash
src/test/scala/com/github/mdr/mash/os/GlobHelperTest.scala
Scala
mit
615
/* * Copyright 2016 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...
ahudspith-equalexperts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/computations/CP36.scala
Scala
apache-2.0
917
/* * 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 ...
aokolnychyi/spark
mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala
Scala
apache-2.0
76,712
package monocle import scalaz.{Applicative, Choice, Maybe, Monoid, \\/} import scalaz.syntax.std.option._ /** * A [[POptional]] can be seen as a pair of functions: * - `getOrModify: S => T \\/ A` * - `set : (B, S) => T` * * A [[POptional]] could also be defined as a weaker [[PLens]] and * weaker [...
malcolmgreaves/Monocle
core/src/main/scala/monocle/Optional.scala
Scala
mit
9,474
package sigmastate.utxo import org.ergoplatform._ import sigmastate._ import sigmastate.Values._ import sigmastate.lang.Terms._ import sigmastate.serialization.OpCodes.OpCode object ComplexityTable { val MinimalComplexity = 100 val OpCodeComplexity: Map[OpCode, Int] = Seq( Fold.opCode -> ...
ScorexFoundation/sigmastate-interpreter
sigmastate/src/main/scala/sigmastate/utxo/ComplexityTable.scala
Scala
mit
9,377
package com.xenopsconsulting.gamedayapi import java.util.Date import java.text.SimpleDateFormat case class ScheduleYear(year: Int) { val _scheduleLines: List[String] = readGamesFromFile() def games() = { _scheduleLines map(ScheduleGame) } def openingDay() = { games().head.date() } def finalDay(...
ecopony/scala-gameday-api
src/main/scala/com/xenopsconsulting/gamedayapi/ScheduleYear.scala
Scala
mit
1,225
package org.vaadin.addons.rinne import com.vaadin.ui.{Component, CustomComponent} import org.vaadin.addons.rinne.mixins.ComponentMixin class VCustomComponent extends CustomComponent with ComponentMixin { def compositionRoot: Option[Component] = Option(getCompositionRoot) def compositionRoot_=(component: Compone...
LukaszByczynski/rinne
src/main/scala/org/vaadin/addons/rinne/VCustomComponent.scala
Scala
apache-2.0
483
package pages.vrm_assign import org.openqa.selenium.WebDriver import org.scalatest.selenium.WebBrowser.{find, id} import uk.gov.dvla.vehicles.presentation.common.helpers.webbrowser.{Page, WebDriverFactory} import views.vrm_assign.PaymentNotAuthorised.{ExitId, TryAgainId} object PaymentNotAuthorisedPage extends Page {...
dvla/vrm-assign-online
test/pages/vrm_assign/PaymentNotAuthorisedPage.scala
Scala
mit
663
package com.twitter.finagle.client import com.twitter.finagle._ import com.twitter.finagle.factory.BindingFactory import com.twitter.finagle.param.Label import com.twitter.util._ private[finagle] object EndpointRecorder { val role = Stack.Role("EndpointRecorder") /** * Creates a [[com.twitter.finagle.Stackabl...
sveinnfannar/finagle
finagle-core/src/main/scala/com/twitter/finagle/client/EndpointRecorder.scala
Scala
apache-2.0
2,307
package dhg.pos.tagdict import org.junit.Test import dhg.util.StringUtil._ import org.junit.Assert._ class TagDictionaryTests { @Test def test_SimpleTagDictionary { val map = Map("a" -> Set(1), "b" -> Set(2), "c" -> Set(3), "d" -> Set(1, 2)) val td = SimpleTagDictionary.apply(map, "0", 0, "9", 9, Set("a...
dhgarrette/low-resource-pos-tagging-2014
src/test/scala/dhg/pos/tagdict/TagDictionaryTests.scala
Scala
apache-2.0
7,513
/* Copyright 2014 Nest Labs 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...
mighdoll/sparkle
kafka/src/main/scala/nest/sparkle/loader/kafka/KafkaEncoders.scala
Scala
apache-2.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...
vkroz/kafka
core/src/main/scala/kafka/server/ReplicaFetcherThread.scala
Scala
apache-2.0
12,913
package io.scylla.actors import io.scylla.client.raw.ThriftToScyllaSchemaConversions /** * Created by edouard on 12/07/2015. */ trait SchemaVerifier extends ThriftToScyllaSchemaConversions{ }
le-doude/scylla
src/main/scala/io/scylla/actors/SchemaVerifier.scala
Scala
apache-2.0
196
package com.shellhive.i18n import scala.scalajs.js import org.scalajs.dom /** * Facade type of Play Messages <a href="https://github.com/ccampbell/mousetrap">MouseTrap</a> library */ object Messages extends js.Object { def apply(i18nLang:String)(key:String): String = scala.scalajs.js.native } object i18nMessa...
OmarCastro/ShellHive-scala
client/src/main/scala/com/shellhive/i18n/Messages.scala
Scala
mit
597
package com.sksamuel.scapegoat.inspections.string import com.sksamuel.scapegoat._ /** @author Stephen Samuel */ class StripMarginOnRegex extends Inspection { def inspector(context: InspectionContext): Inspector = new Inspector(context) { override def postTyperTraverser = Some apply new context.Traverser { ...
pwwpche/scalac-scapegoat-plugin
src/main/scala/com/sksamuel/scapegoat/inspections/string/StripMarginOnRegex.scala
Scala
apache-2.0
1,025
package models import scala.slick.driver.MySQLDriver.simple._ import java.sql.Timestamp import scala.slick.model.ForeignKeyAction import java.util.Date /** * setting up database scheme (everything else is self explanatory) */ case class MissedCall(simNumber: String, phno: String, timestamp: Timestamp, id: Option[L...
pamu/FooService
FooService2/app/models/Tables.scala
Scala
apache-2.0
4,361
/* * 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 ...
mahak/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Sum.scala
Scala
apache-2.0
6,754
// problem 6.2 abstract class UnitConversion(private val initRatio: Double) { def converse(base: Double) = {initRatio * base} } object InchesToCentimeters extends UnitConversion(2.54){ def apply(base: Double) = InchesToCentimeters.converse(base) } object GallonsToLiters extends UnitConversion(4.546){ def apply(...
Com-Mean/Scala_for_the_Impatient
chapter6/problem.scala
Scala
gpl-3.0
788
/* * (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/cogmath/circuit/Node.scala
Scala
apache-2.0
6,566
/* * Semiring.scala * Sum and product operations according to a semiring algebraic structure. * * Created By: Michael Howard (mhoward@cra.com) * Creation Date: Jun 3, 2013 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email figaro@cra.com for informat...
jyuhuan/figaro
Figaro/src/main/scala/com/cra/figaro/algorithm/factored/factors/Semiring.scala
Scala
bsd-3-clause
5,235
/* * This software is licensed under the GNU Affero General Public License, quoted below. * * This file is a part of PowerAPI. * * Copyright (C) 2011-2016 Inria, University of Lille 1. * * PowerAPI is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public Lice...
Spirals-Team/powerapi
powerapi-core/src/main/scala/org/powerapi/module/cpu/simple/CpuSimpleSensor.scala
Scala
agpl-3.0
3,041
package net.ruippeixotog.scalafbp.component.stream import akka.actor.Props import rx.lang.scala.Observable import spray.json.{ JsArray, JsValue } import net.ruippeixotog.scalafbp.component._ import net.ruippeixotog.scalafbp.util.NashornEngine case object MapConcat extends Component { val name = "stream/MapConcat" ...
ruippeixotog/scalafbp
components/stream/src/main/scala/net/ruippeixotog/scalafbp/component/stream/MapConcat.scala
Scala
mit
1,305
package info.mukel.codeforces4s.api import info.mukel.codeforces4s.http.HttpClient import info.mukel.codeforces4s.http.ScalajHttpClient import info.mukel.codeforces4s.json.JsonUtils import org.json4s._ import org.json4s.native.JsonMethods._ import org.json4s.native.Serialization import org.json4s.native.Serializati...
mukel/codeforces4s
src/main/scala/info/mukel/codeforces4s/api/CodeforcesApi.scala
Scala
gpl-2.0
8,991