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 2015 Devon Miller * * 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...
nightscape/scala-vdom
shared/src/main/scala/org/im/vdom/backend/MarkupBackend.scala
Scala
apache-2.0
2,867
package com.ncodelab.trackers.bitbucket import java.util.Base64 import java.nio.charset.StandardCharsets object Auth { type Token = String def auth(credentials: Credentials): Token = Base64.getEncoder .encodeToString((credentials.username + ":" + credentials.password) .getBytes(StandardCharsets.U...
ncodelab/trackers-link
src/main/scala/com/ncodelab/trackers/bitbucket/Auth.scala
Scala
lgpl-3.0
329
/* * 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 ...
ksimar/incubator-carbondata
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/deleteTable/TestDeleteTableNewDDL.scala
Scala
apache-2.0
9,218
/** * Copyright (C) 2010 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This pr...
orbeon/orbeon-forms
xforms-runtime/shared/src/main/scala/org/orbeon/oxf/xforms/XFormsControls.scala
Scala
lgpl-2.1
12,939
package com.ovoenergy.orchestration.scheduling object Persistence { sealed trait SetAsOrchestratingResult case class Successful(schedule: Schedule) extends SetAsOrchestratingResult case object AlreadyBeingOrchestrated extends SetAsOrchestratingResult case object Failed extends SetA...
ovotech/comms-orchestration
src/main/scala/com/ovoenergy/orchestration/scheduling/Persistence.scala
Scala
mit
715
/** * Copyright (C) 2017-2018 Koddi Inc * See the LICENSE file distributed with this work for additional * information regarding copyright ownership. */ package com.koddi.geocoder import java.net.URLEncoder object Component { val ROUTE = "route" val LOCALITY = "locality" v...
mcross1882/geocoder
src/main/scala/com/koddi/geocoder/Component.scala
Scala
mit
2,884
package org.skrushingiv.json import play.api.libs.json.{Format,Reads,Writes,JsValue} /** * `WrappedFormat` provides methods that implement the Format interface by forwarding to * `Reads` and `Writes` instances local to the implementing class. */ trait WrappedFormat[T] extends Format[T] { protected val r: Reads[...
srushingiv/org.skrushingiv
src/main/scala/org/skrushingiv/json/WrappedFormat.scala
Scala
mit
436
package com.socrata.spandex.common.client import java.time.Instant import java.util.concurrent.ArrayBlockingQueue import com.typesafe.scalalogging.slf4j.Logging /** * The ColumnValueCacheWriterThread writes values cached from its provided spandexESClient to Elasticsearch. * * @param spandexESClient Th...
socrata-platform/spandex
spandex-common/src/main/scala/com/socrata/spandex/common/client/ColumnValueCacheWriter.scala
Scala
apache-2.0
1,968
/* * 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 ...
aniketadnaik/carbondataStreamIngest
integration/spark2/src/main/scala/org/apache/spark/sql/streaming/CarbonStreamingOutputWriter.scala
Scala
apache-2.0
2,562
package models import org.jboss.netty.buffer._ import org.joda.time.DateTime import play.api.data._ import play.api.data.Forms._ import play.api.data.format.Formats._ import play.api.data.validation.Constraints._ import reactivemongo.bson._ case class Article( id: Option[BSONObjectID], title: String, content: ...
scalastic/reactivemongo-demo-app
app/models/articles.scala
Scala
apache-2.0
2,360
package powercards.stages import powercards.{ActionCard, Item, Game, Stage, choices } import powercards.Functions.divide object ActionStage extends Stage { def play(game: Game): Stage = { if (game.active.actions > 0) { game.active.chooseOptionalOne(message = "Select an action card to play", items ...
whence/powerlife
scala/powercards_oo/src/main/scala/powercards/stages/ActionStage.scala
Scala
mit
1,172
package com.calabs.dss.dataimport import java.util import org.json4s.JsonAST.{JArray, JInt, JString} import org.scalatest.FunSpec import scala.collection.mutable.{Map => MutableMap} import scala.io.Source import scala.util.{Failure, Success} /** * Created by Jordi Aranda * <jordi.aranda@bsc.es> * 21/11/14 */ cl...
CA-Labs/dss-data-import
src/test/scala/com/calabs/dss/dataimport/JSONDataResourceSpec.scala
Scala
mit
5,144
/* * The MIT License * * Copyright (c) 2017 Fulcrum Genomics LLC * * 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 us...
fulcrumgenomics/fgbio
src/test/scala/com/fulcrumgenomics/basecalling/ExtractBasecallingParamsForPicardTest.scala
Scala
mit
15,395
/* * 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 * distrib...
fusepoolP3/p3-silk
silk-core/src/main/scala/de/fuberlin/wiwiss/silk/plugins/distance/tokenbased/TokenwiseStringDistance.scala
Scala
apache-2.0
16,112
package library.x { class X { class Foo implicit val foo = new Foo } } package library { package object x extends X } package app { import library.x._ object App { implicitly[Foo] } }
felixmulder/scala
test/pending/pos/t6225.scala
Scala
bsd-3-clause
200
case class Parser(ctx: Context) extends BasicSupport
dotty-staging/dotty
tests/pos/i10634/AParser.scala
Scala
apache-2.0
54
package org.mitre.jcarafe.util import org.mitre.jcarafe.lexer._ //import org.mitre.jcarafe.tokenizer._ import GenTokerConstants._ import java.io._ object SeparateDocs { def main(args: Array[String]) = { if (args.length == 3) { var cnt = 0 val dir = new File(args(0)) val tg = args...
wellner/jcarafe
jcarafe-core/src/main/scala/org/mitre/jcarafe/util/SeparateDocs.scala
Scala
bsd-3-clause
1,569
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
tophua/spark1.52
mllib/src/main/scala/org/apache/spark/ml/tuning/CrossValidator.scala
Scala
apache-2.0
5,779
/* * 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 ...
jinglining/flink
flink-tests/src/test/scala/org/apache/flink/api/scala/migration/StatefulJobWBroadcastStateMigrationITCase.scala
Scala
apache-2.0
18,727
/** * 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 * distributed ...
ollie314/kafka
core/src/test/scala/integration/kafka/api/UserClientIdQuotaTest.scala
Scala
apache-2.0
3,945
package models.customer import models.common._ import play.api.libs.json.Json import models._ import models.AssetSupport.IdType import org.joda.time.DateTime import services.CollectionName case class ContactIn( _id: IdType, createdAt: DateTime, lastMod...
tsechov/shoehorn
app/models/customer/contact.scala
Scala
apache-2.0
2,807
package com.github.johnynek.bazel_deps import java.io.File import java.nio.file.Paths import io.circe.jawn.JawnParser import scala.sys.process.{ BasicIO, Process, ProcessIO } import scala.util.{ Failure, Success, Try } import cats.instances.try_._ object MakeDeps { def apply(g: Command.Generate): Unit = { val...
GinFungYJF/bazel-deps
src/scala/com/github/johnynek/bazel_deps/MakeDeps.scala
Scala
mit
7,276
package fpinscala.errorhandling import scala.{Option => _, Either => _, Left => _, Right => _, _} // hide std library `Option` and `Either`, since we are writing our own in this chapter sealed trait Either[+E,+A] { def map[B](f: A => B): Either[E, B] = this match { case Right(x) => Right(f(x)) case Left(x) =>...
conor10/fpinscala
exercises/src/main/scala/fpinscala/errorhandling/Either.scala
Scala
mit
1,508
package mesosphere.marathon.upgrade import akka.actor.{ Actor, ActorLogging } import akka.event.EventStream import mesosphere.marathon.SchedulerActions import mesosphere.marathon.core.launchqueue.LaunchQueue import mesosphere.marathon.event.{ HealthStatusChanged, MarathonHealthCheckEvent, MesosStatusUpdateEvent } impo...
Kosta-Github/marathon
src/main/scala/mesosphere/marathon/upgrade/StartingBehavior.scala
Scala
apache-2.0
3,533
/* * 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/amls-frontend
app/models/businessmatching/BusinessType.scala
Scala
apache-2.0
3,479
package in.tamchow.LinearAlgebra import scala.language.implicitConversions object LinearAlgebra { object Enhancements { implicit class ScalarMatrixInterOp[T](scalar: T)(implicit evidence: Numeric[T]) { def product[B: Numeric](matrix: Matrix[B]): Matrix[Double] = matrix product scalar def *[B: Num...
tamchow/ScalaStuff
src/in/tamchow/LinearAlgebra/LinearAlgebra.scala
Scala
bsd-3-clause
12,082
package com.hyenawarrior.OldNorseGrammar.grammar.morphophonology.ProductiveTransforms import com.hyenawarrior.OldNorseGrammar.grammar.Syllable.Length._ import com.hyenawarrior.OldNorseGrammar.grammar.Syllables import com.hyenawarrior.auxiliary.& /** * Created by HyenaWarrior on 2018.03.18.. */ object SieversLaw {...
HyenaSoftware/IG-Dictionary
OldNorseGrammarEngine/src/main/scala/com/hyenawarrior/OldNorseGrammar/grammar/morphophonology/ProductiveTransforms/SieversLaw.scala
Scala
lgpl-3.0
817
import java.io.IOException import java.sql.Timestamp import java.text.SimpleDateFormat import java.time.Instant import scala.concurrent.Await import scala.concurrent.ExecutionContextExecutor import scala.concurrent.Future import scala.concurrent.duration._ import java.time.Duration import scala.math._ import akka.actor...
charlesxucheng/akka-http-microservice
src/main/scala/Service2.scala
Scala
mit
4,203
package core import java.util.Properties import java.util.concurrent.atomic.AtomicLong import akka.actor._ import akka.event.Logging import domain.{Place, Tweet, User} import org.apache.kafka.clients.producer.{Callback, KafkaProducer, ProducerConfig, ProducerRecord, RecordMetadata} import scala.concurrent.duration._...
mesosphere/iot-demo
twitter/src/main/scala/core/ProducerActor.scala
Scala
apache-2.0
4,363
import sbt._ import Keys._ object Build extends Build { lazy val buildSettings = Seq( libraryDependencies ++= Seq( "org.scodec" %% "scodec-core" % "1.7.0", "org.specs2" %% "specs2" % "2.4.15" % "test", "org.scalacheck" %% "scalacheck" % "1.12.2" % "test" ) ) ++ Seq( scalaVersion := "...
filippovitale/pefile
project/build.scala
Scala
mit
1,790
package edu.cmu.dynet /** The underlying storage for a model parameter. You will never need to construct this yourself, * but can get it back from [[edu.cmu.dynet.ParameterCollection.parametersList()]]. */ class ParameterStorage private[dynet](private[dynet] val storage: internal.ParameterStorage) { def size(): ...
xunzhang/dynet
contrib/swig/src/main/scala/edu/cmu/dynet/Parameter.scala
Scala
apache-2.0
3,204
package reasonable.interact import scalaz.~> import scalaz.Scalaz._ import reasonable.Algebra._ import InteractAlgebra._ object Console extends (Interact ~> EitherType) { def apply[A](i: Interact[A]) = i match { case Ask(prompt) => println(prompt) (scala.io.StdIn.readLine).right case Tell(msg) ...
enpassant/scalaz
src/main/scala/reasonable/interact/Console.scala
Scala
apache-2.0
406
package neuroflow.nets import org.scalatest.FunSuite import neuroflow.core.Activators.Double._ /** * @author bogdanski * @since 22.04.17 */ class ActivatorPerformanceTest extends FunSuite { def withTimer[B](f: => B): Long = { val n1 = System.nanoTime() f val n2 = System.nanoTime() n2 - n1 ...
zenecture/neuroflow
core/src/test/scala/ActivatorPerformanceTest.scala
Scala
apache-2.0
708
/* * Copyright (C) 2010-2014 GRNET S.A. * * 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 program is di...
grnet/snf-common-j
src/main/scala/gr/grnet/common/io/package.scala
Scala
gpl-3.0
1,111
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. ...
RobAltena/deeplearning4j
scalnet/src/test/scala/org/deeplearning4j/scalnet/layers/reshaping/Flatten3DTest.scala
Scala
apache-2.0
1,921
/* * Copyright 2011-2019 Asakusa Framework Team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
ashigeru/asakusafw-spark
runtime/src/main/scala/com/asakusafw/spark/runtime/fragment/user/CoGroupOperatorFragment.scala
Scala
apache-2.0
3,004
/* * 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 ...
Panos-Bletsos/spark-cost-model-optimizer
core/src/main/scala/org/apache/spark/ui/SparkUI.scala
Scala
apache-2.0
7,951
package controllers import models.Survey import play.api.libs.json._ import play.api.mvc._ object Application extends Controller { def addSurvey = Action(BodyParsers.parse.json) { request => val s = request.body.validate[Survey.Survey] s.fold( errors => { BadRequest(Json.obj("status" -> "OK",...
geerdink/FortuneTellerApi
app/controllers/Application.scala
Scala
mit
1,559
/* * Copyright 2013 Julian Peeters * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
julianpeeters/artisanal-pickle-maker
src/main/scala/methods/cls/Equals.scala
Scala
apache-2.0
1,322
package mesosphere.mesos import com.google.common.collect.Lists import com.google.protobuf.TextFormat import mesosphere.marathon.state.AppDefinition.VersionInfo.OnlyVersion import mesosphere.marathon.core.task.Task import mesosphere.marathon.state.Container.Docker import mesosphere.marathon.state.Container.Docker.Port...
titosand/marathon
src/test/scala/mesosphere/mesos/TaskBuilderTest.scala
Scala
apache-2.0
54,107
import com.thesamet.pb.{MyMap, MyVector} import com.thesamet.proto.e2e.collection_types._ import org.scalatest._ import scala.collection.mutable class CollectionTypesSpec extends FlatSpec with MustMatchers { "lenses" should "compile" in { val cis = CollectionTypesMessage().update(_.repeatedInt32 :++= Seq(11, 9)...
dotty-staging/ScalaPB
e2e/src/test/scala/CollectionTypesSpec.scala
Scala
apache-2.0
2,005
package linguistica.stemmer.porter import org.scalatest._ import org.scalatest.matchers._ import org.scalatest.Assertions._ class PrecomputeSpec extends FunSuite with Logic { import LetterType._ test("test that precompute returns everything right") { assert(Word("TR").letters === List(('T', Consonant), ('R'...
vcherkassky/porter-stemmer
src/test/scala/linguistica/stemmer/porter/PrecomputeSpec.scala
Scala
mit
700
package com.github.jmccrae.yuzu import com.github.jmccrae.yuzu.YuzuSettings._ import com.hp.hpl.jena.rdf.model.{Literal, Model, RDFNode, Resource, Property} import com.hp.hpl.jena.vocabulary._ import java.io.Writer import scala.collection.JavaConversions._ import scala.collection.mutable.{Map => MutableMap} object Js...
jmccrae/yuzu
scala/src/main/scala/yuzu/jsonld.scala
Scala
apache-2.0
13,035
package com.websudos.phantom.db import com.websudos.phantom.connectors.ContactPoint import com.websudos.phantom.tables.{Recipes, JsonTable, EnumTable, BasicTable} private object DefaultKeysapce { lazy val local = ContactPoint.local.keySpace("phantom_test") } class TestDatabase extends DatabaseImpl(DefaultKeysapce...
dan-mi-sun/phantom
phantom-dsl/src/test/scala/com/websudos/phantom/db/TestDatabase.scala
Scala
bsd-2-clause
578
package de.htw.pgerhard.domain.tweets import akka.actor.Status.Failure import akka.actor.{ActorRef, Props} import akka.util.Timeout import de.htw.pgerhard.domain.generic._ import de.htw.pgerhard.domain.tweets.errors.TweetNotFound import de.htw.pgerhard.domain.tweets.events._ import scala.collection.mutable import sca...
peter-gerhard/my-twitter-playground
src/main/scala/de/htw/pgerhard/domain/tweets/TweetView.scala
Scala
apache-2.0
1,879
package jp.co.cyberagent.aeromock.server import io.netty.channel.ChannelInitializer import io.netty.channel.socket.SocketChannel import io.netty.handler.codec.http.HttpObjectAggregator import io.netty.handler.codec.http.HttpRequestDecoder import io.netty.handler.codec.http.HttpResponseEncoder import io.netty.handler.c...
CyberAgent/aeromock
aeromock-server/src/main/scala/jp/co/cyberagent/aeromock/server/AeromockServerInitializer.scala
Scala
mit
1,085
package queries import authes.Role import com.github.nscala_time.time.Imports._ import models.User import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder case class CreateUser(name: String, email: String, password: String) { def user(now: DateTime = DateTime.now()): User = { val encoded = BCryp...
ponkotuy/aggregate-exif
app/queries/CreateUser.scala
Scala
apache-2.0
537
import sbt._ import Keys._ import PlayProject._ object ApplicationBuild extends Build { val appName = "play-authenticate-demo" val appVersion = "1.0-SNAPSHOT" val appDependencies = Seq( "be.objectify" %% "deadbolt-java" % "2.1-SNAPSHOT", "com.feth" %% "play-authenticate" % "0...
stefanil/play2-prototypen
play-authenticate-demo/project/Build.scala
Scala
apache-2.0
1,385
/*********************************************************************** * 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-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/audit/ParamsAuditProvider.scala
Scala
apache-2.0
1,337
/* * Copyright 2018 Satellite Applications Catapult 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 * * ...
SatelliteApplicationsCatapult/tribble
tribble-core/src/test/scala/org/catapult/sa/tribble/stats/TestStats.scala
Scala
apache-2.0
1,237
package org.jetbrains.plugins.scala.testingSupport.scalatest.scala2_11.scalatest2_1_7 import org.jetbrains.plugins.scala.SlowTests import org.jetbrains.plugins.scala.testingSupport.scalatest.finders.FindersApiTest import org.junit.experimental.categories.Category /** * @author Roman.Shein * @since 10.02.2015. */ @...
jastice/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/testingSupport/scalatest/scala2_11/scalatest2_1_7/Scalatest2_11_2_1_7_FindersApiTest.scala
Scala
apache-2.0
450
// Generated by the Scala Plugin for the Protocol Buffer Compiler. // Do not edit! // // Protofile syntax: PROTO3 package com.google.protobuf.api /** Api is a light-weight descriptor for an API Interface. * * Interfaces are also described as "protocol buffer services" in some contexts, * such as by the "service...
scalapb/ScalaPB
scalapb-runtime/src/main/js-native/com/google/protobuf/api/Api.scala
Scala
apache-2.0
18,143
package scorex.consensus.nxt import com.google.common.primitives.Longs import scorex.account.{Account, PrivateKeyAccount, PublicKeyAccount} import scorex.block.{Block, BlockField} import scorex.consensus.{ConsensusModule, OneGeneratorConsensusModule, PoSConsensusModule, TransactionsOrdering} import scorex.crypto.encod...
B83YPoj/Waves
src/main/scala/scorex/consensus/nxt/WavesConsensusModule.scala
Scala
apache-2.0
10,526
/* * * * Copyright 2015 Skymind,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 * * * * U...
Mageswaran1989/aja
src/main/scala/org/aja/dhira/src/main/scala/org/dhira/core/util/InputSplit.scala
Scala
apache-2.0
1,633
/* * 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
guod/src/main/scala/phases/InitializersFamily.scala
Scala
bsd-3-clause
2,283
package com.alanjz.meerkat.app.menu.view import java.awt.event.{ActionEvent, KeyEvent} import com.alanjz.meerkat.app.menu.MCMenuItem object MCFullScreen extends MCMenuItem("Enter Full Screen", KeyEvent.VK_F, ActionEvent.CTRL_MASK | ActionEvent.META_MASK){ val f = (_ : ActionEvent) => {} }
spacenut/meerkat-chess
src/com/alanjz/meerkat/app/menu/view/MCFullscreen.scala
Scala
gpl-2.0
295
// scalac: -Xfatal-warnings -Xlint:infer-any // trait Foo[-A <: AnyRef, +B <: AnyRef] { def run[U](x: A)(action: B => U): Boolean = ??? def foo = { run(_: A)(_: B => String) } } trait Xs[+A] { { List(1, 2, 3) contains "a" } // only this warns { List(1, 2, 3) contains 1 } { identity(List(1, 2, 3) contains 1...
martijnhoekstra/scala
test/files/neg/warn-inferred-any.scala
Scala
apache-2.0
744
/* * 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 ...
prccaraujo/openwhisk
common/scala/src/main/scala/whisk/core/connector/MessageConsumer.scala
Scala
apache-2.0
8,747
package uk.ac.ncl.openlab.intake24.systemsql.admin import java.sql.Connection import anorm.Macro.ColumnNaming import javax.inject.{Inject, Named} import javax.sql.DataSource import anorm._ import org.apache.commons.lang3.StringUtils import org.postgresql.util.PSQLException import uk.ac.ncl.openlab.intake24.api.data.{...
digitalinteraction/intake24
SystemDataSQL/src/main/scala/uk/ac/ncl/openlab/intake24/systemsql/admin/UserAdminImpl.scala
Scala
apache-2.0
27,301
/* Copyright 2013 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
sengt/summingbird-batch
summingbird-online/src/test/scala/com/twitter/summingbird/online/TopologyPlannerLaws.scala
Scala
apache-2.0
7,292
/* * Copyright (c) 2014 Snowplow Analytics Ltd. * All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache * License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at * http://www....
jramos/snowplow
4-storage/kinesis-elasticsearch-sink/src/main/scala/com.snowplowanalytics.snowplow.storage.kinesis/elasticsearch/ElasticsearchSinkApp.scala
Scala
apache-2.0
9,333
package com.productfoundry.akka.cqrs.process import akka.actor.Props import com.productfoundry.akka.PassivationConfig import com.productfoundry.akka.cqrs.{AggregateEvent, EntityIdResolution, AggregateEventHeaders, AggregateTag} object DummyProcessManager extends ProcessManagerCompanion[DummyProcessManager] { overr...
odd/akka-cqrs
core/src/test/scala/com/productfoundry/akka/cqrs/process/DummyProcessManager.scala
Scala
apache-2.0
1,007
/* SimpleApp.scala */ import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spark.SparkConf object SimpleApp { def main(args: Array[String]) { val conf = new SparkConf().setAppName("SimpleApp") val sc = new SparkContext(conf) //val logFile = "YOUR_SPARK_HOME/READM...
HintonBR/scratch
language-experiments/scala/SimpleApp.scala
Scala
mit
767
/* * Ported by Alistair Johnson from * https://android.googlesource.com/platform/libcore/+/master/luni/src/main/java/java/math/Conversion.java * Original license copied below: */ /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distr...
scala-js/scala-js
javalib/src/main/scala/java/math/Conversion.scala
Scala
apache-2.0
10,377
/* * 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/test/scala/uk/gov/hmrc/ct/computations/calculations/MachineryAndPlantCalculatorSpec.scala
Scala
apache-2.0
10,235
package com.twitter.finagle.exp.mysql import java.util.{Calendar, TimeZone} import java.sql.{Date, Timestamp, Time} import com.twitter.finagle.exp.mysql.transport.{Buffer, BufferReader, BufferWriter} /** * Defines a Value ADT that represents the domain of values * received from a mysql server. */ sealed trait Valu...
JustinTulloss/finagle
finagle-mysql/src/main/scala/com/twitter/finagle/mysql/Value.scala
Scala
apache-2.0
6,455
/* * Copyright 2001-2009 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...
JimCallahan/Graphics
external/scalatest/src/test/scala/org/scalatest/fixture/FixtureFeatureSpecSpec.scala
Scala
apache-2.0
38,836
package eu.unicredit.swagger.dependencies object Language extends Enumeration { val Scala, Java = Value }
unicredit/sbt-swagger-codegen
lib/src/main/scala/eu/unicredit/swagger/dependencies/Language.scala
Scala
apache-2.0
109
package com.fsist.stream.run import collection.mutable import java.util.concurrent.atomic.AtomicLong import com.fsist.stream._ import scala.annotation.tailrec import scala.language.implicitConversions // This file contains a small implementation of a mutable graph. Existing libraries like scala-graph are not perfor...
fsist/future-streams
src/main/scala/com/fsist/stream/run/Graph.scala
Scala
apache-2.0
5,029
package com.twitter.finagle.http import com.twitter.util.Duration import java.io.{InputStream, InputStreamReader, OutputStream, OutputStreamWriter, Reader, Writer} import java.util.{Iterator => JIterator} import java.nio.charset.Charset import java.util.{Date, TimeZone} import org.apache.commons.lang.time.FastDateForm...
enachb/finagle_2.9_durgh
finagle-http/src/main/scala/com/twitter/finagle/http/Message.scala
Scala
apache-2.0
10,431
package amphip.stoch //import scalax.file.Path import scalaz._, Scalaz._ import spire.implicits._ import amphip.dsl._ import amphip.base._ //import amphip.sem.mathprog object BigModelSpec extends App /* extends FunSuite */ { val BS = BasicScenario import System.{currentTimeMillis => millis} import StochDat...
gerferra/amphip
core/src/test/scala/amphip/stoch/BigModelSpec.scala
Scala
mpl-2.0
8,409
package com.mesosphere.cosmos.model import com.mesosphere.universe.{ReleaseVersion, PackageDetailsVersion} case class ListVersionsResponse( results: Map[PackageDetailsVersion, ReleaseVersion] )
movicha/cosmos
cosmos-model/src/main/scala/com/mesosphere/cosmos/model/ListVersionsResponse.scala
Scala
apache-2.0
198
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
japgolly/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/scalalib/ClassTagTest.scala
Scala
bsd-3-clause
5,406
package old import drx.concreteplatform import drx.graph.{Obs, Rx} import org.scalajs.dom import org.scalajs.dom.Element import scalatags.JsDom.TypedTag import scalatags.JsDom.all._ import scalatags.generic.{AttrPair, StylePair} import scala.collection.mutable import scala.scalajs.js /** Created by david on 15.09.17...
drcicero/drx
todojs/src/main/scala/old/RxDom.scala
Scala
mit
5,820
package org.company.app.models import com.plasmaconduit.json.codegen.traits.{GenParameterRep, GenReader, GenWriter} case class PhoneNumber(value: String) extends GenReader with GenWriter { override val readerRep = GenParameterRep override val writerRep = GenParameterRep }
Agrosis/jcg
examples/src/main/scala/org/company/app/models/PhoneNumber.scala
Scala
mit
279
package xitrum.handler.inbound import java.util.{Map => JMap, List => JList} import scala.collection.mutable.{ArrayBuffer, Map => MMap} import scala.util.control.NonFatal import io.netty.channel.{ChannelHandler, ChannelHandlerContext, SimpleChannelInboundHandler} import ChannelHandler.Sharable import io.netty.handler...
caiiiycuk/xitrum
src/main/scala/xitrum/handler/inbound/UriParser.scala
Scala
mit
2,188
package com.gjos.scala.swoc package object protocol { type Location = Int type Move = Int type Field = Int type Direction = Int type BoardHash = Int type MoveType = Int type Player = Int type Stone = Int }
Oduig/swoc2014
Greedy/src/main/scala/com/gjos/scala/swoc/protocol/package.scala
Scala
apache-2.0
223
package org.jetbrains.plugins.scala package testingSupport.test import java.io.{File, FileOutputStream, IOException, PrintStream} import com.intellij.diagnostic.logging.LogConfigurationPanel import com.intellij.execution._ import com.intellij.execution.configurations._ import com.intellij.execution.runners.{Execution...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/testingSupport/test/AbstractTestRunConfiguration.scala
Scala
apache-2.0
25,313
package io.github.binaryfoo.lagotto import org.joda.time.DateTime import scala.collection.mutable /** * Ceremony around a Map. */ case class SimpleLogEntry(private val _fields: mutable.LinkedHashMap[String, String], private val timeFormat: Option[TimeExpr] = None, lines: String, source: SourceRef = null) extends L...
binaryfoo/lagotto
src/main/scala/io/github/binaryfoo/lagotto/SimpleLogEntry.scala
Scala
mit
1,008
package examples import language.implicitConversions import scala.concurrent.{ Channel, ExecutionContext, future, Future, promise } import scala.concurrent.util.Duration import scala.util.{ Try, Success, Failure } import java.util.concurrent.{ CountDownLatch, Executors } import java.util.concurrent.atomic._ object c...
chenc10/Spark-PAF
build/scala-2.10.5/examples/computeserver.scala
Scala
apache-2.0
4,582
package org.jetbrains.plugins.scala package lang package psi package api package statements import java.util import com.intellij.lang.java.lexer.JavaLexer import com.intellij.openapi.progress.ProgressManager import com.intellij.openapi.project.DumbService import com.intellij.openapi.util.Key import com.intellij.pom....
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/api/statements/ScFunction.scala
Scala
apache-2.0
27,807
/* * 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 ...
zhanghan1990/Yosemite
core/src/main/scala/Yosemite/framework/master/ui/MasterWebUI.scala
Scala
apache-2.0
2,654
/* * The MIT License (MIT) * * Copyright (c) 2016 Algolia * http://www.algolia.com/ * * 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...
algolia/algoliasearch-client-scala
src/test/scala/algolia/dsl/ApiKeysTest.scala
Scala
mit
4,089
package enigma import org.scalacheck._ import Prop._ object PlugboardSpec extends Properties("plugboard") { val p1 = Plugboard(Alphabet.empty) val p2 = Plugboard(Alphabet.shuffled) val alpha = Gen.choose('A','Z') property("identity plugboard") = forAll(alpha){ (c: Char) => p1.transform(c) == c } pro...
timperrett/enigma
src/test/scala/PlugboardSpec.scala
Scala
apache-2.0
465
package com.arcusys.learn.models.request import com.arcusys.learn.liferay.permission.PermissionCredentials import com.arcusys.learn.service.util.{ AntiSamyHelper, Parameter } import org.scalatra.ScalatraBase import scala.util.Try object QuestionRequest extends BaseRequest { val NewCourseId = "newCourseID" val C...
icacic/Valamis
learn-portlet/src/main/scala/com/arcusys/learn/models/request/QuestionRequest.scala
Scala
gpl-3.0
2,252
// timber -- Copyright 2012-2021 -- Justin Patterson // // 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 l...
scalawag/timber
timber-backend/src/main/scala/org/scalawag/timber/backend/receiver/Receiver.scala
Scala
apache-2.0
6,010
import org.scalatest._ import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks import rpm4s.data._ class StatSpec extends AnyFlatSpec with Matchers with ScalaCheckPropertyChecks { "Stat" should "be parsed correctly" in { ...
lucidd/rpm4s
shared/src/test/scala/StatSpec.scala
Scala
mit
553
/* * 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/amls-frontend
test/models/renewal/SendTheLargestAmountsOfMoneySpec.scala
Scala
apache-2.0
4,332
/* * Copyright 2011-2017 Chris de Vreeze * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
dvreeze/yaidom
jvm/src/test/scala/eu/cdevreeze/yaidom/core/ENameTest.scala
Scala
apache-2.0
5,305
package service import util.Directory._ import util.ControlUtil._ import SystemSettingsService._ import javax.servlet.http.HttpServletRequest trait SystemSettingsService { def baseUrl(implicit request: HttpServletRequest): String = loadSystemSettings().baseUrl(request) def saveSystemSettings(settings: SystemSet...
mqshen/gitbucketTest
src/main/scala/service/SystemSettingsService.scala
Scala
apache-2.0
8,643
/* * Copyright 2013 Maurício Linhares * * Maurício Linhares licenses this file to you 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 ...
outbrain/postgresql-async
postgresql-async/src/main/scala/com/github/mauricio/async/db/postgresql/parsers/NoticeParser.scala
Scala
apache-2.0
991
package com.productfoundry.akka.cqrs import akka.persistence.PersistentActor import com.productfoundry.akka.GracefulPassivation /** * Defines a domain entity. */ trait Entity extends PersistentActor with GracefulPassivation { final val entityName = context.parent.path.name final val entityId = self.path.name ...
odd/akka-cqrs
core/src/main/scala/com/productfoundry/akka/cqrs/Entity.scala
Scala
apache-2.0
607
package me.laiseca.restcale.util object PathUtils { private val SEGMENT_SEPARATOR = "/" def split(path:String):List[String] = { path.split(SEGMENT_SEPARATOR).filterNot(_.isEmpty).toList } }
xabierlaiseca/restcale
core/src/main/scala/me/laiseca/restcale/util/PathUtils.scala
Scala
apache-2.0
203
package fr.njin.playoauth.rs import play.api.mvc.Results._ import play.api.mvc.Security.AuthenticatedRequest import play.api.mvc._ import scala.concurrent.{ExecutionContext, Future} import fr.njin.playoauth.common.domain._ import scala.language.{implicitConversions, reflectiveCalls} trait Oauth2Resource[TO <: OauthTo...
giabao/play-oauth
play-oauth/src/main/scala/fr/njin/playoauth/rs/Oauth2Resource.scala
Scala
apache-2.0
3,559
package poly.collection.mut import cats.implicits._ import poly.collection._ import poly.collection.factory._ /** * A set backed by a singly-linked list. * @since 0.1.0 * @author Tongfei Chen */ class ListSet[T] private(private val data: ListSeq[T])(implicit val keyEq: Eq[T]) extends KeyMutableSet[T] { overrid...
ctongfei/poly-collection
core/src/main/scala/poly/collection/mut/ListSet.scala
Scala
mit
1,095
package edu.gemini.horizons.api.osgi import org.osgi.framework.{BundleContext, BundleActivator} class Activator extends BundleActivator { def start(ctx: BundleContext): Unit = { } def stop(ctx: BundleContext): Unit = { } }
arturog8m/ocs
bundle/edu.gemini.horizons.api/src/main/scala/edu/gemini/horizons/api/osgi/Activator.scala
Scala
bsd-3-clause
236
package cromwell.database.slick import cromwell.database.sql.tables.SummaryStatusEntry import scala.concurrent.ExecutionContext trait SummaryStatusSlickDatabase { this: MetadataSlickDatabase => import dataAccess.driver.api._ private[slick] def getSummaryStatusEntryMaximumId(summaryTableName: String, summariz...
ohsu-comp-bio/cromwell
database/sql/src/main/scala/cromwell/database/slick/SummaryStatusSlickDatabase.scala
Scala
bsd-3-clause
1,555
package com.github.mdr.mash.completions import com.github.mdr.mash.inference.Type import com.github.mdr.mash.lexer.Token import com.github.mdr.mash.parser.AbstractSyntax._ import com.github.mdr.mash.parser.{ ConcreteSyntax, SourceInfo } import com.github.mdr.mash.utils.{ Region, StringUtils } import scala.PartialFunc...
mdr/mash
src/main/scala/com/github/mdr/mash/completions/MemberCompleter.scala
Scala
mit
4,175
package io.vamp.container_driver import io.vamp.common.Config case class DockerPortMapping(containerPort: Int, hostPort: Option[Int], protocol: String = "tcp") object Docker { val network = Config.string("vamp.container-driver.network") } case class Docker(image: String, portMappings: List[DockerPortMapping], par...
magneticio/vamp
container_driver/src/main/scala/io/vamp/container_driver/Docker.scala
Scala
apache-2.0
891
package vggames.scala.specs.valvar import vggames.scala.specs.GameSpecification import vggames.scala.code.RestrictedFunction0 import vggames.scala.specs.TestRun class DefineValInt extends GameSpecification[RestrictedFunction0[Int]] { def runSignature = ":Int" def extendsType = "RestrictedFunction0[Int]" over...
vidageek/games
games/scala/src/main/scala/vggames/scala/specs/valvar/DefineValInt.scala
Scala
gpl-3.0
658