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 services import models._ import play.api.Logger import play.api.libs.json.{JsArray, Json} /** * Created by meln1k on 23/08/14. // */ object LikeService { def getUsersLikedByUser(user: VkUser): Seq[(VkUser, Int)] = { ??? } def getUsersWhoLikedUser(user: VkUser): Seq[(VkUser, Int)] = { val userP...
meln1k/like-o-meter
app/services/LikeService.scala
Scala
apache-2.0
727
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.core import FloodGate.Activate import akka.actor._ /** * Holds messages until an Activate is received. */ class FloodGate( target: ActorRef ) extends Actor with A...
VC1995/ensime-server
core/src/main/scala/org/ensime/core/FloodGate.scala
Scala
gpl-3.0
701
package scala.lms package epfl package test3 import test1._ import test2._ trait MatchProg { this: Matching with Extractors => case class Success(x: Int) implicit def successTyp: Typ[Success] implicit def intTyp: Typ[Int] implicit def stringTyp: Typ[String] implicit def listTyp[T:Typ]: Typ[List[T]] ...
astojanov/virtualization-lms-core
test-src/epfl/test3-parsers/TestMatch.scala
Scala
bsd-3-clause
3,640
package xyz.hyperreal package object rtcep { val EOF = '\\u0004' }
edadma/rtcep
src/main/scala/rtcep.scala
Scala
mit
68
package hammock package hi import java.util.Base64 import cats._ import cats.implicits._ sealed trait Auth object Auth { case class BasicAuth(user: String, pass: String) extends Auth case class OAuth2Bearer(token: String) extends Auth case class OAuth2Token(token: String) extends Auth im...
pepegar/hammock
core/src/main/scala/hammock/hi/Auth.scala
Scala
mit
1,062
/* * Copyright 2015 http4s.org * * 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 i...
http4s/http4s
circe/src/main/scala/org/http4s/circe/middleware/JsonDebugErrorHandler.scala
Scala
apache-2.0
5,426
package katas.scala.pascaltriangle import org.junit.Test import org.scalatest.Matchers /** * @author DKandalov */ class PascalTriangle1 extends Matchers { @Test def shouldComputeElementsOfPascalsTriangle() { pascal(0, -1) should equal(0) pascal(0, 0) should equal(1) pascal(0, 1) should equal(0) p...
dkandalov/katas
scala/src/katas/scala/pascaltriangle/PascalTriangle1.scala
Scala
unlicense
2,094
package mesosphere.marathon package state import mesosphere.UnitTest import mesosphere.marathon.state.VersionInfo.FullVersionInfo class VersionInfoTest extends UnitTest { "VersionInfo" should { "NoVersion upgrades to FullVersion on a scaling change" in { Given("NoVersion") val versionInfo = VersionI...
mesosphere/marathon
src/test/scala/mesosphere/marathon/state/VersionInfoTest.scala
Scala
apache-2.0
4,848
import leon.lang._ object Postconditions { def passing_1(f: BigInt => BigInt, x: BigInt) = { require(x >= 0 && forall((a: BigInt) => f(a) < 0)) x } ensuring { res => forall((a: BigInt) => res > f(a)) } def passing_2(f: BigInt => BigInt, x: BigInt) = { require(x >= 0 && forall((a: BigInt) => a > 0 =...
epfl-lara/leon
testcases/verification/quantification/valid/Postcondition.scala
Scala
gpl-3.0
667
/* * Copyright Β© 2015-2019 the contributors (see Contributors.md). * * 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 published * by the Free Software Foundation, either version 3 of the License, or *...
musicEnfanthen/Knora
webapi/src/main/scala/org/knora/webapi/util/jsonld/JsonLDUtil.scala
Scala
agpl-3.0
34,580
/** * 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...
SumoLogic/sumobot
src/main/scala/com/sumologic/sumobot/core/model/Messages.scala
Scala
apache-2.0
6,059
package org.infinispan.spark.rdd import java.util.Properties import org.apache.spark.api.java.{JavaPairRDD, JavaSparkContext} import org.infinispan.spark._ import scala.reflect.ClassTag /** * @author gustavonalle */ object InfinispanJavaRDD { def createInfinispanRDD[K, V](jsc: JavaSparkContext, config: Proper...
rnowling/infinispan-spark
src/main/scala/org/infinispan/spark/rdd/InfinispanJavaRDD.scala
Scala
apache-2.0
729
/* Copyright 2009 David Hall, Daniel Ramage 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 writi...
MLnick/scalanlp-core
data/src/main/scala/scalanlp/stage/text/DocumentFilters.scala
Scala
apache-2.0
1,028
/** * Copyright 2015 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 agreed ...
zjrstar/RxScala
src/main/scala/rx/lang/scala/observers/TestSubscriber.scala
Scala
apache-2.0
11,129
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
pronix/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala
Scala
apache-2.0
8,384
/* * Copyright 2014 IBM Corp. * * 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...
bpburns/spark-kernel
kernel/src/test/scala/integration/security/SignatureCheckerActorSpecForIntegration.scala
Scala
apache-2.0
3,049
package dataflow import akka.dataflow._ import financial.MockServices import scala.concurrent.ExecutionContext.Implicits.global /** * Created by IntelliJ IDEA. * Author: Steve Levine * Date: 3/23/15 */ object SimpleDataFlow extends App with MockServices { val marketCap = flow { val q = flow {quote("tsla")...
slevine/concurrency-scratchpad
src/main/scala/dataflow/SimpleDataflow.scala
Scala
apache-2.0
547
/* 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 com.jspha.maia.internal import scala.language.higherKinds import com.jspha.maia._ /** * A [[ReqTree]] ...
MaiaOrg/scala-maia
maia/src/main/scala-2.12/com/jspha/maia/internal/ReqTree.scala
Scala
mpl-2.0
1,308
package scala.c.engine import java.nio.file.Paths import scala.io.Source class JpegTest extends StandardTest { "jpeg test" should "print the correct results" in { val code = """ void main() { printf("nation emergency\\n"); }""" val slre = Paths.get("tests", "scala", "c", "engine", "jpe...
bdwashbu/AstViewer
tests/scala/c/engine/JpegTest.scala
Scala
gpl-3.0
506
package com.alexitc.coinalerts.models import com.alexitc.playsonify.models.WrappedString import play.api.libs.json.{JsPath, Reads} case class ReCaptchaResponse(string: String) extends AnyVal with WrappedString object ReCaptchaResponse { implicit val reads: Reads[ReCaptchaResponse] = JsPath.read[String].map(ReCaptch...
AlexITC/crypto-coin-alerts
alerts-server/app/com/alexitc/coinalerts/models/ReCaptchaResponse.scala
Scala
gpl-3.0
339
package webhooks import java.util.UUID import akka.actor.ActorSystem import akka.stream.ActorMaterializer import akka.testkit.{ImplicitSender, TestKit} import org.scalatest.{Matchers, WordSpecLike} import webhooks.HookManager._ import webhooks.models._ class ManagerSpec extends TestKit(ActorSystem()) with WordSpecL...
jw3/awebapi
src/test/scala/webhooks/ManagerSpec.scala
Scala
apache-2.0
746
package wdl.util import java.util.regex.Pattern import scala.annotation.tailrec /** This is under a `wdl` package because it exists purely to do WDLy stuff, but it's currently being called from the * WOMmy TaskDefinition. That should get straightened out. */ object StringUtil { val Ws = Pattern.compile("[\\\\ \\...
ohsu-comp-bio/cromwell
wom/src/main/scala/wdl/util/StringUtil.scala
Scala
bsd-3-clause
1,907
package fi.kapsi.kosmik.sfti import scala.beans.BeanProperty object Chapter05 { /** * Improve the Counter class in Section 5.1, β€œSimple Classes and Parameterless * Methods,” on page 55 so that it doesn’t turn negative at Int.MaxValue. */ object Ex01 { class Counter { private var value: Lon...
suniala/sfti-exercises
src/main/scala/fi/kapsi/kosmik/sfti/Chapter05.scala
Scala
apache-2.0
4,805
/* * 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 ...
apache/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/metadata/MetadataTestUtil.scala
Scala
apache-2.0
19,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 ...
nchammas/spark
core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala
Scala
apache-2.0
102,860
package org.example.json import spray.json._ /** * Created by kailianghe on 1/23/15. */ // simple example grabbed from https://github.com/spray/spray-json case class Color(name: String, red: Int, green: Int, blue: Int) object MyJsonProtocol extends DefaultJsonProtocol { implicit val colorFormat = jsonFormat4(Col...
hekailiang/akka-play
actor-samples/src/main/scala/org/example/json/SimpleJsonApp.scala
Scala
apache-2.0
513
/* * 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 ...
zhangminglei/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/expressions/literals.scala
Scala
apache-2.0
6,265
/******************************************************************************* Copyright 2009,2011, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. ***********************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/scala_src/useful/ErrorLog.scala
Scala
bsd-3-clause
1,801
package com.themillhousegroup.edn import org.specs2.mutable.Specification import com.themillhousegroup.edn.test.{ StreamChecking, EDNParsing } class StreamingUsageSpec extends Specification with EDNParsing with StreamChecking { "Using the Streaming Scala EDN parser" should { "Allow iteration over a flat keysp...
themillhousegroup/edn-scala
src/test/scala/com/themillhousegroup/edn/StreamingUsageSpec.scala
Scala
gpl-2.0
3,761
package net.kemuridama.kafcon.protocol import spray.json._ import net.kemuridama.kafcon.model.{APIResponse, APIError} trait APIResponseJsonProtocol extends JsonProtocol with APIErrorJsonProtocol { implicit def apiResponseFormat[T: JsonFormat] = new RootJsonFormat[APIResponse[T]] { def read(json: JsValue)...
kemuridama/kafcon
src/main/scala/net/kemuridama/kafcon/protocol/APIResponseProtocol.scala
Scala
mit
689
/* * 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...
beamly/spray-json
src/test/scala/cc/spray/json/ProductFormatsSpec.scala
Scala
apache-2.0
3,389
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
travisbrown/scalatest
src/test/scala/org/scalatest/ShouldIncludeSubstringSpec.scala
Scala
apache-2.0
16,112
package util /** * GraPHPizer source code analytics engine * Copyright (C) 2015 Martin Helmich <kontakt@martin-helmich.de> * * 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 versio...
martin-helmich/graphpizer-server
app/util/WrappingActorLogging.scala
Scala
gpl-3.0
1,091
package org.jetbrains.plugins.scala.debugger.evaluation.evaluator import com.intellij.debugger.JavaDebuggerBundle import com.intellij.debugger.engine.DebuggerUtils import com.intellij.debugger.engine.evaluation.EvaluationContextImpl import com.intellij.debugger.engine.evaluation.expression.{Evaluator, Modifier} import...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/debugger/evaluation/evaluator/ScalaArrayAccessEvaluator.scala
Scala
apache-2.0
2,682
package com.twitter.gizzard.nameserver object HostStatus extends Enumeration { val Normal = Value(0) val Blackholed = Value(1) val Blocked = Value(2) } case class Host(hostname: String, port: Int, cluster: String, status: HostStatus.Value)
kmiku7/gizzard
src/main/scala/com/twitter/gizzard/nameserver/Host.scala
Scala
apache-2.0
255
/* * Copyright 2001-2008 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
svn2github/scalatest
src/main/scala/org/scalatest/Helper.scala
Scala
apache-2.0
6,625
package msgpack4z import scala.util.Random import scalaprops._ import scalaz._ abstract class UnionSpec(unionGen0: Gen[MsgpackUnion] = UnionGen.unionGen) extends SpecBase { private implicit def unionGen: Gen[MsgpackUnion] = unionGen0 private def supportExtType: Boolean = unionGen == UnionGen.unionGen val unio...
msgpack4z/msgpack4z-core
src/test/scala/msgpack4z/UnionSpec.scala
Scala
mit
3,926
package handlers.client import handlers.packets.{PacketReader, PacketsUtils} import handlers.server.VersionAndCryptKey import scala.concurrent.Future /** * Created by franblas on 26/03/17. */ class CryptKeyRequest() extends HandlerProcessor { override def process(data: Array[Byte]): Future[Array[Byte]] = { ...
franblas/NAOC
src/main/scala/handlers/client/CryptKeyRequest.scala
Scala
mit
1,004
package com.github.log0ymxm.mapper.examples.taxi import org.apache.log4j.{ LogManager, Level } import org.apache.spark.ml import org.apache.spark.ml.Pipeline import org.apache.spark.ml.feature.{ OneHotEncoder, StringIndexer, StandardScaler, VectorAssembler } import org.apache.spark.mllib import org.apache.spark.mllib....
log0ymxm/spark-mapper
src/main/scala/com/github/log0ymxm/mapper/examples/taxi/TaxiDriver.scala
Scala
apache-2.0
8,033
package scala.pickling.internal import java.util import scala.pickling.PicklingErrors.LogicException import scala.pickling.spi.{RefUnpicklingRegistry, RefPicklingRegistry, RefRegistry} /** Default implementation of the Ref registry that allows circular dependencies to be handled. * Uses thread-local caches (per pi...
scala/pickling
core/src/main/scala/scala/pickling/internal/DefaultRefRegistry.scala
Scala
bsd-3-clause
2,636
/* * Copyright 2014–2017 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
drostron/quasar
mongodb/src/main/scala/quasar/physical/mongodb/RenameSemantics.scala
Scala
apache-2.0
803
import sbt.Keys._ import sbt._ object Common { val _scalaVersion = "2.12.2" val _scalacOptions = Seq( "-feature", "-deprecation", "-language:postfixOps", "-language:implicitConversions", "-Xcheckinit", // Should be removed for production use // Found this list on tpolecat's github site ...
SKNZ/SpinaciCore
wow/project/Common.scala
Scala
mit
820
import _root_.io.gatling.core.scenario.Simulation import ch.qos.logback.classic.{Level, LoggerContext} import io.gatling.core.Predef._ import io.gatling.http.Predef._ import org.slf4j.LoggerFactory import scala.concurrent.duration._ /** * Performance test for the Meeting entity. */ class MeetingGatlingTest extends ...
TransparencyInternationalEU/lobbycal
src/test/gatling/simulations/MeetingGatlingTest.scala
Scala
cc0-1.0
3,439
package tiger import org.scalatest.Inside._ import org.scalatest.Matchers._ import org.scalatest._ import tiger.Abs.{FunctionDec, LetExp, VarDec, _} import tiger.TigerTestUtil.{TigerAbs, TigerEscapes} class EscapesSpec extends FlatSpec { "EscapesComponent" should "escapes nested functions" in new TigerAbs("/aditi...
joseluisdiaz/tigerc
src/test/scala/tiger/EscapesSpec.scala
Scala
apache-2.0
1,764
/* * 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...
pncampbell/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/frs10x/boxes/AC8052.scala
Scala
apache-2.0
1,221
/* * 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 ...
jkbradley/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisSuite.scala
Scala
apache-2.0
29,403
/* * 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/test/scala/com/waz/service/assets2/AssetServiceSpec.scala
Scala
gpl-3.0
12,308
package endpoints.play.client import endpoints.algebra.Codec import play.api.http.ContentTypes import play.api.libs.ws.{BodyWritable, InMemoryBody} /** * Interpreter for [[endpoints.algebra.JsonEntitiesFromCodec]] that encodes JSON requests * and decodes JSON responses. */ trait JsonEntitiesFromCodec extends En...
Krever/endpoints
play/client/src/main/scala/endpoints/play/client/JsonEntitiesFromCodec.scala
Scala
mit
816
package repositories import fixtures.DBSpecBase import models.Session import models._ import org.joda.time.DateTime import play.api.db.slick._ import repositories.SessionSongRepositoryMessages.{SessionNotAcceptingSongs, InvalidSession, RequestSongRequest} import org.virtuslab.unicorn.LongUnicornPlay.driver.simple._ im...
nagirrab/Karaoke
test/repositories/SessionSongRepositorySpec.scala
Scala
mit
3,740
/* Copyright (c) 2016, Rice University 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 and the following disclaimer. 2....
agrippa/spark-swat
functional-tests/prim-input-prim-output/src/main/scala/sparksimple/GenerateInput.scala
Scala
bsd-3-clause
2,235
/*********************************************************************** * Copyright (c) 2013-2020 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...
aheyne/geomesa
geomesa-features/geomesa-feature-avro/src/test/scala/org/locationtech/geomesa/features/avro/AvroSimpleFeatureFactoryTest.scala
Scala
apache-2.0
1,850
/* * 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-flatfile
src/main/scala/fm/flatfile/plain/LineReader.scala
Scala
apache-2.0
1,694
package com.blogspot.nhu313.tictactoe class GameFactory(val io: IO) { private val playerFactory = new PlayerFactory(io) def isValidType(selection: Int) = selection > 0 && selection <= types.length def types() = { for { x <- playerFactory.types y <- playerFactory.types } yield Tuple2(x, y) ...
nhu313/tic_tac_toe_scala
src/main/scala/tictactoe/GameFactory.scala
Scala
apache-2.0
585
/* Copyright 2016 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...
twitter/scalding
scalding-core/src/test/scala/com/twitter/scalding/TimePathedSourceTest.scala
Scala
apache-2.0
1,389
package io.sqooba.oss.timeseries.entity /** Identifies an entity that can have time series data attached to it. The different * possible signals are defined by [[io.sqooba.oss.timeseries.entity.TsLabel!]]s. * * @note It is the implementor's responsibility to choose a way of identifying * entities. Be that by diffe...
Shastick/tslib
src/main/scala/io/sqooba/oss/timeseries/entity/TimeSeriesEntityId.scala
Scala
mit
1,366
package hearthstone.data.enum object MinionType extends Enumeration { type MinionType = Value val Beast, Murloc = Value }
ukupat/hearthstone
src/hearthstone/data/enum/MinionType.scala
Scala
mit
127
package com.vorlov.helper.similarity import org.scalatest.{Matchers, WordSpec} import com.vorlov.util.TwitterTokenizer._ class CircularSimhashDeduplicationSpec extends WordSpec with Matchers { implicit def stringify(str: String): String = str.tokens.mkString "remove similar documents when all documents are simi...
VolodymyrOrlov/tweets-opinion-mining
src/test/scala/com/vorlov/helper/similarity/CircularSimhashDeduplicationSpec.scala
Scala
apache-2.0
1,854
package com.ambrosoft /** * Created by jacek on 7/7/16. */ object Multiplication extends App { def multiply(a: Int, b: Int): Int = if (a == 0 || b == 0) 0 else mult(a, b, 0) def mult(a: Int, b: Int, acc: Int): Int = if (b == 0) acc else if ((b & 0x01) != 0) mult(a << 1, b >> 1, ac...
JacekAmbroziak/Ambrosoft
src/main/scala/com/ambrosoft/Multiplication.scala
Scala
apache-2.0
579
package org.aprsdroid.app import _root_.android.database.Cursor import _root_.android.content.Context import _root_.android.graphics.Typeface import _root_.android.view.View import _root_.android.widget.SimpleCursorAdapter import _root_.android.widget.SimpleCursorAdapter.ViewBinder import _root_.android.widget.TextVie...
ge0rg/aprsdroid
src/PostListAdapter.scala
Scala
gpl-2.0
1,386
package skinny.logging trait LoggerProvider { // The logger. Instantiated the first time it's used. private lazy val _logger = Logger(getClass) /** * Get the `Logger` for the class that mixes this trait in. The `Logger` * is created the first time this method is call. The other methods (e.g., * `error...
xerial/skinny-micro
micro-common/src/main/scala/skinny/logging/LoggerProvider.scala
Scala
bsd-2-clause
524
package de.tu_berlin.formic.common.datastructure.persistence import akka.actor.{ActorSystem, Props} import de.tu_berlin.formic.common.controlalgo.{ControlAlgorithm, WaveOTServer} import de.tu_berlin.formic.common.{ClientId, DataStructureInstanceId, OperationId} import de.tu_berlin.formic.common.datastructure._ import ...
rbraeunlich/formic
common/jvm/src/test/scala/de/tu_berlin/formic/common/datastructure/persistence/AbstractServerDataStructureFactoryPersistenceSpec.scala
Scala
apache-2.0
3,934
/* * 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/main/scala/org/apache/flink/table/sources/tsextractors/ExistingField.scala
Scala
apache-2.0
3,997
package test import com.julianpeeters.avro.annotations._ //Primitive Types @AvroTypeProvider("tests/src/test/resources/AvroTypeProviderTest00.avro") @AvroRecord case class AvroTypeProviderTest00() @AvroTypeProvider("tests/src/test/resources/AvroTypeProviderTest01.avro") @AvroRecord case class AvroTypeProviderTest0...
rvvincelli/avro-scala-macro-annotations
tests/src/test/scala/AvroTypeProviderTestClasses.scala
Scala
apache-2.0
10,594
package com.twitter.finagle import com.twitter.finagle.stats.DefaultStatsReceiver import com.twitter.finagle.toggle.{StandardToggleMap, ToggleMap} package object kestrel { private[this] val LibraryName: String = "com.twitter.finagle.kestrel" /** * The [[ToggleMap]] used for finagle-kestrel */ private[fi...
spockz/finagle
finagle-kestrel/src/main/scala/com/twitter/finagle/package.scala
Scala
apache-2.0
410
package net.rosien.configz import com.typesafe.config._ import scalaz._ import Scalaz._ /** Reads settings from a [[com.typesafe.config.Config]]. */ sealed trait Configz[A] { self => /** Read the settings from a config. */ def settings(config: Config): Settings[A] /** Validate the computed settings with a pred...
arosien/configz
core/src/main/scala/Configz.scala
Scala
apache-2.0
3,712
/* * Copyright 2013 Sanjin Sehic * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
tuwiendsg/CAPA
core/test/scala/util/ValueSpec.scala
Scala
apache-2.0
1,336
package models.connection import java.time.OffsetDateTime abstract class Connection(val id: Option[Long], val child: Long, val parent: Long, val creationDate: OffsetDateTime, val endDate: Option[OffsetDateTime], val discriminator: String) object Connection { def tupled(t: (Option[Long], L...
HackerSchool/Passport
app/models/connection/Connection.scala
Scala
bsd-3-clause
616
package uk.gov.gds.location.importer.model /** * ONS Country codes */ object Countries { val countries = Map( "S92000003" -> "Scotland", "E92000001" -> "England", "W92000004" -> "Wales" ) def countryForGssCode(gssCode: String) = gssCode.substring(0, 1) match { case "E" => "England" case "S...
alphagov/location-data-importer
src/main/scala/uk/gov/gds/location/importer/model/Countries.scala
Scala
mit
366
package scala package collection package immutable import scala.annotation.unchecked.uncheckedVariance import scala.collection.mutable.Builder import scala.language.higherKinds trait SortedMap[K, +V] extends Map[K, V] with collection.SortedMap[K, V] with SortedMapOps[K, V, SortedMap, SortedMap[K, V]] { o...
rorygraves/perf_tester
corpus/scala-library/src/main/scala/collection/immutable/SortedMap.scala
Scala
apache-2.0
4,749
/*** * Copyright 2014 Rackspace US, 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 applica...
tylerroyal/api-checker
cli/wadl2dot/src/main/scala/com/rackspace/com/papi/components/checker/cli/Wadl2Dot.scala
Scala
apache-2.0
7,425
package gitbucket.core.servlet import javax.servlet._ import javax.servlet.http.HttpServletRequest import gitbucket.core.controller.ControllerBase import gitbucket.core.plugin.PluginRegistry class PluginControllerFilter extends Filter { private var filterConfig: FilterConfig = null override def init(filterConf...
x-way/gitbucket
src/main/scala/gitbucket/core/servlet/PluginControllerFilter.scala
Scala
apache-2.0
1,491
/* * 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 ...
bOOm-X/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRelation.scala
Scala
apache-2.0
5,903
/* Copyright 2014 White Label Personal Clouds Pty Ltd * * 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 a...
welcomer/framework
src/main/scala/me/welcomer/framework/Settings.scala
Scala
apache-2.0
2,964
/** * This file is part of objc2swift. * https://github.com/yahoojapan/objc2swift * * Copyright (c) 2015 Yahoo Japan Corporation * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ package org.objc2swift import org.objc2swift.ObjCPa...
johndpope/objc2swift
src/main/scala/org/objc2swift/EnumVisitor.scala
Scala
mit
3,622
package com.yammer.metrics.experiments import collection.JavaConversions._ import java.util.concurrent.TimeUnit import com.yammer.metrics.stats.{ExponentiallyDecayingSample} import com.yammer.metrics.stats.{UniformSample} import java.io.{PrintWriter, FileOutputStream} /** * A simple experiment to see how uniform and...
box/metrics
metrics-scala_2.9.1/src/test/scala/com/yammer/metrics/experiments/RecencyBiasExperiment.scala
Scala
mit
2,158
package com.avsystem.scex package compiler import java.{lang => jl, util => ju} import scala.reflect.internal.util.Position /** * Created: 13-12-2013 * Author: ghik */ class ExpressionSourceFile( val exprDef: ExpressionDef, sourceName: String, val code: String, startOffset: Int) extends ScexSourceFile(sou...
pnf/scex
scex-core/src/main/scala/com/avsystem/scex/compiler/ExpressionSourceFile.scala
Scala
apache-2.0
633
package com.lucaswilkins.newtonfractals import com.lucaswilkins.newtonfractals.complex.Complex import com.lucaswilkins.newtonfractals.polynomial._ /** * Newton-Raphson Solver for complex Polynomials */ class Newton(val poly: Polynomial, iters: Int = 10) { val deriv = poly.diff def solve(x: Complex, remainingIt...
drlucaswilkins/newtonfractal
NewtonFractal/src/main/scala/com/lucaswilkins/newtonfractals/Newton.scala
Scala
gpl-2.0
511
package akka.persistence.eventstore.journal import akka.persistence.journal.JournalPerfSpec import scala.concurrent.duration._ class JournalPerfIntegrationSpec extends JournalIntegrationSpec with JournalPerfSpec { override def awaitDurationMillis = 30.seconds.toMillis }
petervdm/EventStore.Akka.Persistence
src/test/scala/akka/persistence/eventstore/journal/JournalPerfIntegrationSpec.scala
Scala
bsd-3-clause
274
/* * 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 ...
lincoln-lil/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/metadata/FlinkRelMdColumnOriginNullCountTest.scala
Scala
apache-2.0
6,376
import com.twitter.scrooge.ScroogeSBT import sbt.Keys._ import sbt._ object Searchbird extends Build { val guavaVersion = "18.0" val finagleVersion = "6.24.0" val scroogeVersion = "3.17.0" val twitterServerVersion = "1.9.0" val twitterUtilVersion = "6.23.0" val additionalResolvers = Seq( resolvers ++...
maufee/Searchbird
project/Build.scala
Scala
apache-2.0
1,509
/* * Artificial Intelligence for Humans * Volume 1: Fundamental Algorithms * Scala Version * http://www.aifh.org * http://www.jeffheaton.com * * Code repository: * https://github.com/jeffheaton/aifh * Copyright 2013 by Jeff Heaton * * Licensed under the Apache License, Version 2.0 (the "License"); * you ma...
PeterLauris/aifh
vol1/scala-examples/src/main/scala/com/heatonresearch/aifh/AIFH.scala
Scala
apache-2.0
1,101
package pl.newicom.dddd import pl.newicom.dddd.aggregate.EntityId trait BusinessEntity { def id: EntityId def department: String }
pawelkaczor/akka-ddd
akka-ddd-protocol/src/main/scala/pl/newicom/dddd/BusinessEntity.scala
Scala
mit
139
/* * Copyright 2014–2020 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
slamdata/quasar
impl/src/main/scala/quasar/impl/local/LocalDestinationModule.scala
Scala
apache-2.0
1,822
/* * 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 ...
gioenn/xSpark
mllib/src/main/scala/org/apache/spark/ml/feature/package.scala
Scala
apache-2.0
3,888
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ueshin/apache-spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/SymmetricHashJoinStateManager.scala
Scala
apache-2.0
26,435
package net.paploo.encountersimulator.sim import java.util.UUID import scala.language.implicitConversions import net.paploo.encountersimulator.sim.Creature.CreatureId object Creature { type CreatureId = UUID def apply(template: CreatureTemplate): Creature = ImmutableCreature(template = template) def apply(n...
paploo/EncounterSimulator
src/main/scala/net/paploo/encountersimulator/sim/Creature.scala
Scala
bsd-3-clause
1,341
package mr.merc.battle import mr.merc.map.GameField import mr.merc.battle.event._ import mr.merc.unit.Soldier import mr.merc.map.hex.TerrainHex import mr.merc.map.pathfind.PathFinder import mr.merc.unit.Attack import mr.merc.map.pathfind.PossibleMovesFinder import mr.merc.unit.BeforeTurnAction import mr.merc.unit.Sold...
RenualdMarch/merc
src/main/scala/mr/merc/battle/BattleModel.scala
Scala
gpl-3.0
8,770
package org.jetbrains.plugins.scala package lang.refactoring.changeSignature import com.intellij.openapi.project.Project import com.intellij.psi._ import com.intellij.psi.codeStyle.JavaCodeStyleManager import com.intellij.psi.search.GlobalSearchScope import com.intellij.refactoring.changeSignature.JavaParameterInfo im...
LPTK/intellij-scala
src/org/jetbrains/plugins/scala/lang/refactoring/changeSignature/ScalaParameterInfo.scala
Scala
apache-2.0
4,290
package scala.slick.ast import TypeUtil.typeToTypeUtil import Util._ /** A SQL comprehension */ final case class Comprehension(from: Seq[(Symbol, Node)] = Seq.empty, where: Seq[Node] = Seq.empty, groupBy: Option[Node] = None, orderBy: Seq[(Node, Ordering)] = Seq.empty, select: Option[Node] = None, fetch: Option[Long]...
retronym/slick
src/main/scala/scala/slick/ast/Comprehension.scala
Scala
bsd-2-clause
4,267
/* * This file is part of eCobertura. * * Copyright (c) 2009, 2010 Joachim Hofer * All rights reserved. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/le...
jmhofer/eCobertura
ecobertura.ui/src/main/scala/ecobertura/ui/views/session/commands/OpenCoverageSessionHandler.scala
Scala
epl-1.0
1,419
// // RemoteFuture.scala -- Scala classes RemoteFuture and RemoteFutureReader, and trait RemoteFutureManager // Project PorcE // // Created by jthywiss on Jan 13, 2016. // // Copyright (c) 2019 The University of Texas at Austin. All rights reserved. // // Use and redistribution of this file is governed by the license t...
orc-lang/orc
PorcE/src/orc/run/distrib/porce/RemoteFuture.scala
Scala
bsd-3-clause
8,842
/* * Copyright 2014 Lars Edenbrandt * * 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...
slicebox/slicebox
src/main/scala/se/nimsa/sbx/dicom/streams/AnonymizationFlow.scala
Scala
apache-2.0
2,631
// Copyright (c) 2010, Stephen D. Strowes // 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 ...
sdstrowes/scala-util
ParallelDijkstra.scala
Scala
bsd-3-clause
7,167
package suggestions package gui import scala.collection.mutable.ListBuffer import scala.collection.JavaConverters._ import scala.concurrent._ import scala.concurrent.ExecutionContext.Implicits.global import scala.swing._ import scala.util.{ Try, Success, Failure } import scala.swing.event._ import swing.Swing._ import...
vasnake/Principles-of-Reactive-Programming
w4/suggestions/src/main/scala/suggestions/gui/WikipediaSuggest.scala
Scala
gpl-3.0
4,113
package edu.gemini.model.p1.dtree.inst import org.specs2.mutable.Specification import edu.gemini.model.p1.immutable.{GracesReadMode, GracesFiberMode} class GracesSpec extends Specification { "The Graces decision tree" should { "includes Graces fiber modes" in { val graces = Graces() graces.title mus...
fnussber/ocs
bundle/edu.gemini.model.p1/src/test/scala/edu/gemini/model/p1/dtree/inst/GracesSpec.scala
Scala
bsd-3-clause
1,039
package org.json4s.reflect import java.lang.reflect.{Field, TypeVariable} import org.json4s.{JArray, JObject, JValue} object ScalaType { private val types = new Memo[Manifest[_], ScalaType] private val singletonFieldName = "MODULE$" def apply[T](mf: Manifest[T]): ScalaType = { /* optimization */ if ...
json4s/json4s
core/src/main/scala/org/json4s/reflect/ScalaType.scala
Scala
apache-2.0
10,149
/* * Copyright (C) 2016-2017 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.internal.javadsl.cluster import scala.concurrent.duration._ import akka.actor.ActorSystem import com.google.inject.AbstractModule import com.google.inject.Inject import com.lightbend.lagom.internal.cluster.JoinClu...
edouardKaiser/lagom
cluster/javadsl/src/main/scala/com/lightbend/lagom/internal/javadsl/cluster/JoinCluster.scala
Scala
apache-2.0
580
/* * -β•₯⌐⌐⌐⌐ -⌐⌐⌐⌐- * β‰‘β•’β–‘β–‘β–‘β–‘βŒ\β–‘β–‘β–‘Ο† β•“β•β–‘β–‘β–‘β–‘βŒβ–‘β–‘β–‘β–‘β•ͺβ•• * ╣╬░░` `β–‘β–‘β–‘β•’β”˜ Ο†β–’β•£β•¬β•β•œ β–‘β–‘β•’β•£Q * β•‘β•£β•¬β–‘βŒ ` β•€β–’β–’β–’Γ…` ║╒╬╣ * β•šβ•£β•¬β–‘βŒ β•”β–’β–’β–’β–’`Β«β•• β•’β•’β•£β–’ * ╫╬░░╖ .β–‘ ╙╨╨ ╣╣╬░φ β•“Ο†β–‘β•’β•’Γ… * β•™β•’β–‘β–‘β–‘β–‘βŒ"β–‘β–‘β–‘β•œ β•™Γ…β–‘β–‘β–‘β–‘βŒβ–‘β–‘β–‘β–‘β•` * ``˚¬ ⌐ ˚˚⌐´ * * ...
Flipkart/connekt
commons/src/main/scala/com/flipkart/connekt/commons/iomodels/CallbackEvent.scala
Scala
mit
1,650
/* * 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...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/utils/tf/loaders/Sigmoid.scala
Scala
apache-2.0
1,215
package scala.meta.internal.semanticdb.scalac import scala.collection.mutable import scala.meta.internal.inputs._ import scala.meta.internal.io.PathIO import scala.meta.internal.scalacp._ import scala.meta.internal.semanticdb._ import scala.meta.internal.{semanticdb => s} import scala.reflect.internal._ import scala.r...
MasseGuillaume/scalameta
semanticdb/scalac/library/src/main/scala/scala/meta/internal/semanticdb/scalac/TextDocumentOps.scala
Scala
bsd-3-clause
24,628