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 code.snippet import Angular._ import code.model.PonyService class NgPonyService { def render = renderIfNotAlreadyDefined( angular.module("lift.pony") .factory("ponyService", jsObjFactory() .jsonCall("getBestPony", PonyService.getRandomPony) ) ) }
htmldoug/ng-lift-proxy
src/main/scala/code/snippet/NgPonyService.scala
Scala
apache-2.0
281
package skinny.controller import skinny.micro.AsyncSkinnyMicroServlet /** * SkinnyController as a Servlet. */ class AsyncSkinnyServlet extends AsyncSkinnyMicroServlet with AsyncSkinnyControllerBase with AsyncSkinnyWebPageControllerFeatures
seratch/skinny-framework
framework/src/main/scala/skinny/controller/AsyncSkinnyServlet.scala
Scala
mit
258
/* * Copyright 2010 LinkedIn * * 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...
jinfei21/kafka
src/kafka/api/MultiFetchRequest.scala
Scala
apache-2.0
1,347
/* * Copyright (c) 2016 SnappyData, 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 ap...
vjr/snappydata
core/src/main/scala/io/snappydata/impl/ServerImpl.scala
Scala
apache-2.0
1,223
/* * Copyright (C) 2015 Language Technology Group * * 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 version. * * ...
tudarmstadt-lt/newsleak
core/src/main/scala/preprocess/TrueCaser.scala
Scala
agpl-3.0
3,405
package skinny.test import javax.servlet.http.HttpUpgradeHandler import org.scalatest._ class MockHttpServletRequestSpec extends FlatSpec with Matchers { it should "be available" in { val req = new MockHttpServletRequest req.getDispatcherType should equal(null) req.getAsyncContext should equal(null) ...
holycattle/skinny-framework
test/src/test/scala/skinny/test/MockHttpServletRequestSpec.scala
Scala
mit
3,312
object B { inline def inlinedAny(inline x: String): x.type = x }
dotty-staging/dotty
sbt-test/source-dependencies/inline-rec-change-inline/changes/B1.scala
Scala
apache-2.0
69
package jp.scid.specs2 package object jsoup { /** マッチャーをミックインせずに参照するためのインスタンスオブジェクト */ private[jsoup] object Specs2Matchers extends org.specs2.matcher.Matchers }
rhiguchi/jsoup-specs2-matchers
src/main/scala/jp.scid.specs2/jsoup/package.scala
Scala
mit
233
/* * Copyright 2006-2009 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicab...
sortable/framework
web/webkit/src/main/scala/net/liftweb/http/Bindings.scala
Scala
apache-2.0
5,272
package ch.squan.game.model.command import org.newdawn.slick.command.BasicCommand /** * Created by chris on 22/01/16. */ case object CommandLeft extends BasicCommand("Left")
cbenning/space2d
src/main/scala/ch/squan/game/model/command/CommandLeft.scala
Scala
apache-2.0
180
package com.themillhousegroup.l7 import scala.StringBuilder import org.apache.commons.lang3.StringUtils import com.typesafe.scalalogging.LazyLogging import java.io.File import com.themillhousegroup.l7.commands.Command object HierarchyVisualiser { val indentSize = 4 def visualise(hierarchy: Seq[TopLevelNode]): S...
themillhousegroup/l7-merge
src/main/scala/com/themillhousegroup/l7/HierarchyVisualiser.scala
Scala
mit
882
/** * (c) Copyright 2013 WibiData, Inc. * * See the NOTICE 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. * You may obtain a copy of...
iafek/kiji-base
kiji-schema-framework/kiji-schema-extras/src/main/scala/org/kiji/avro/dsl/AvroValue.scala
Scala
apache-2.0
5,613
package scwebapp.data import scutil.core.implicits.* import scwebapp.format.* import scparse.ng.text.* object RangePattern { lazy val parser:TextParser[RangePattern] = parsers.value def unparse(it:RangePattern):String = it match { case Begin(s) => s.toString + "-" case End(c) => "-" + c.toString ca...
ritschwumm/scwebapp
modules/core/src/main/scala/scwebapp/data/RangePattern.scala
Scala
bsd-2-clause
1,637
// Copyright 2016 zakski. // See the LICENCE.txt 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. // You may obtain a copy of the License ...
zakski/project-maeve
src/main/scala/com/szadowsz/maeve/core/instruction/actions/ActionExecutor.scala
Scala
apache-2.0
2,156
package text.vector /** * @author K.Sakamoto * Created on 2016/05/22 */ trait VectorMerger[Vector] { def merge(vectors: Seq[Vector]): Vector }
ktr-skmt/FelisCatusZero
src/main/scala/text/vector/VectorMerger.scala
Scala
apache-2.0
159
case class A(private var foo: Any) { def m = { def foo = 42 /*will be lambda lifted to `A#foo$1`*/ } } object Test { def main(args: Array[String]): Unit = { val A("") = new A("") new A("").m } }
lrytz/scala
test/files/run/t8944b.scala
Scala
apache-2.0
211
package me.yingrui.segment.word2vec import java.lang.Math.abs import me.yingrui.segment.neural.Sigmoid import me.yingrui.segment.word2vec.SimplifiedActivationUtil._ import org.scalatest.{FunSuite, Matchers} import scala.util.Random class SimplifiedActivationUtilTest extends FunSuite with Matchers { test("simplif...
yingrui/mahjong
lib-segment/src/test/scala/me/yingrui/segment/word2vec/SimplifiedActivationUtilTest.scala
Scala
gpl-3.0
916
/* * (c) Copyright 2019 EntIT Software LLC, a Micro Focus company, L.P. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License v2.0 which accompany this distribution. * * The Apache License is available at * http://www.apache.org/licenses/LICE...
CloudSlang/cs-actions
cs-google/src/main/scala/io/cloudslang/content/google/actions/authentication/GetAccessToken.scala
Scala
apache-2.0
5,999
/** * ***************************************************************************** * Copyright 2016 Katja Hahn * * 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...
katjahahn/PortEx
src/main/java/com/github/katjahahn/parser/sections/idata/BoundImportSection.scala
Scala
apache-2.0
2,379
import sbt.{Def, _} import sbtassembly.AssemblyPlugin.autoImport.{MergeStrategy, assembly, assemblyMergeStrategy} import sbtassembly.{AssemblyPlugin, PathList} import Keys._ object Build extends AutoPlugin { override def trigger = allRequirements override def requires: Plugins = AssemblyPlugin override def pr...
gengstrand/clojure-news-feed
server/feed11/project/Build.scala
Scala
epl-1.0
2,154
/* * Copyright 2015 Renaud Bruneliere * * 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...
bruneli/scalaopt
core/src/main/scala/com/github/bruneli/scalaopt/core/constraint/LowerOrEqualOperator.scala
Scala
apache-2.0
1,079
trait Num: type Nat object IsInt: def unapply(using num: Num)(sc: num.Nat): Option[Int] = ??? def test(using num: Num)(x: num.Nat) = x match case IsInt(i) =>
dotty-staging/dotty
tests/pos/i8972.scala
Scala
apache-2.0
170
package mypipe.mysql import java.net.InetAddress import java.util.concurrent.{LinkedBlockingQueue, TimeUnit} import akka.actor.Cancellable import com.github.mauricio.async.db.mysql.MySQLConnection import com.github.mauricio.async.db.{Configuration, Connection} import com.github.shyiko.mysql.binlog.BinaryLogClient imp...
tramchamploo/mypipe
mypipe-api/src/main/scala/mypipe/mysql/binaryLogConsumerTraits.scala
Scala
apache-2.0
12,136
/** * 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...
themarkypantz/kafka
core/src/main/scala/kafka/admin/BrokerApiVersionsCommand.scala
Scala
apache-2.0
3,173
/* * 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 ...
bwsw/sj-platform
core/sj-common/src/main/scala/com/bwsw/sj/common/rest/RestResponse.scala
Scala
apache-2.0
2,819
import com.nathanstoddard._ import common._ import common.geom._ import common.random._ import common.log._ import renderer._ import org.lwjgl import org.lwjgl._ import org.lwjgl.opengl._ import org.lwjgl.input._ import org.lwjgl.opengl.GL11._ import org.lwjgl.opengl.GL12._ import org.lwjgl.opengl.GL13._ import org.lw...
nstoddard/space-demo
src/Main.scala
Scala
mit
21,185
package com.rklaehn.abc import cats._ import cats.implicits._ case class NoEquals(x: Int) { override def hashCode(): Int = throw new UnsupportedOperationException override def equals(x: Any): Boolean = throw new UnsupportedOperationException override def toString: String = throw new UnsupportedOperationExceptio...
rklaehn/abc
tests/src/test/scala/com/rklaehn/abc/NoEquals.scala
Scala
apache-2.0
636
package observatory import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.scalatest.prop.Checkers import scala.collection.concurrent.TrieMap trait InteractionTest extends FunSuite with Checkers { }
masipauskas/coursera-scala
capstone/observatory/src/test/scala/observatory/InteractionTest.scala
Scala
unlicense
260
package com.versionone.httpclient.sampleApp import com.versionone.httpclient._ import org.slf4j.LoggerFactory object SampleApp { def main(args: Array[String]): Unit = { OAuth2SettingsFuncs fromFiles("client_secrets.json", "stored_credentials.json" ) match { case None => sys error "Unable to rea...
versionone/HttpClient.Scala
src/test/scala/com/versionone/httpclient/sampleApp/SampleApp.scala
Scala
bsd-3-clause
890
/* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/iht-frontend
test/iht/views/application/assets/insurancePolicy/InsurancePolicyDetailsGuidanceViewTest.scala
Scala
apache-2.0
2,619
class Lst[+A] { def map[B, That](f: A => B)(implicit bf: collection.BuildFrom[List[A], B, That]): That = ??? } object Test { def foo(l: Lst[Int]) = l.map[Int, List[String]](x => 1) }
scala/scala
test/files/neg/t2462a.scala
Scala
apache-2.0
188
package org.bitcoins.marshallers.transaction import org.bitcoins.marshallers.RawBitcoinSerializer import org.bitcoins.protocol.transaction.{TransactionOutPointImpl, TransactionOutPoint} import org.bitcoins.util.BitcoinSUtil /** * Source for serialization * https://bitcoin.org/en/developer-reference#outpoint * */...
Christewart/scalacoin
src/main/scala/org/bitcoins/marshallers/transaction/RawTransactionOutPointParser.scala
Scala
mit
1,093
package spark.repl import scala.collection.mutable.Set object Main { private var _interp: SparkILoop = null def interp = _interp private[repl] def interp_=(i: SparkILoop) { _interp = i } def main(args: Array[String]) { _interp = new SparkILoop _interp.process(args) } }
javelinjs/spark
repl/src/main/scala/spark/repl/Main.scala
Scala
bsd-3-clause
299
/* * 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 ...
jianran/spark
core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala
Scala
apache-2.0
27,531
package scala.slick.driver import scala.slick.ql.Query import scala.slick.session.{Session, PositionedParameters} import scala.slick.util.RecordLinearizer class BasicUpdateInvoker[T] (query: Query[_, T], profile: BasicProfile) { protected lazy val built = profile.buildUpdateStatement(query) def updateStatement ...
szeiger/scala-query
src/main/scala/scala/slick/driver/BasicUpdateInvoker.scala
Scala
bsd-2-clause
761
package com.sksamuel.avro4s.record.decoder import com.sksamuel.avro4s._ import org.apache.avro.SchemaBuilder import org.apache.avro.generic.GenericData import org.apache.avro.util.Utf8 import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import scala.language.higherKinds case class...
sksamuel/avro4s
avro4s-core/src/test/scala/com/sksamuel/avro4s/record/decoder/ArrayDecoderTest.scala
Scala
apache-2.0
8,516
package com.github.gdefacci.briscola.service.tournament import com.github.gdefacci.briscola.player.PlayerId import com.github.gdefacci.briscola.game._ import com.github.gdefacci.briscola.service.game._ import com.github.gdefacci.briscola.competition.MatchKind import scalaz.{ -\\/, \\/, \\/- } import com.github.gdefacc...
gdefacci/briscola
ddd-briscola/src/main/scala/com/github/gdefacci/briscola/service/tournament/tournament.scala
Scala
bsd-3-clause
3,937
package pokestats.client.screens import autowire._ import org.scalajs.dom import pokestats.Api import pokestats.client.screens.Common._ import pokestats.client.{Ajaxer, Client, PokemonDetailsScreen} import pokestats.model.PokemonSummary import rx._ import scala.scalajs.concurrent.JSExecutionContext.Implicits.queue im...
guilgaly/pokemon-stats
client/src/main/scala/pokestats/client/screens/PokemonList.scala
Scala
apache-2.0
1,843
package lila.simul final case class SimulApplicant( player: SimulPlayer, accepted: Boolean ) { def is(userId: String): Boolean = player is userId def is(other: SimulPlayer): Boolean = player is other } private[simul] object SimulApplicant { def make(player: SimulPlayer): SimulApplicant = new S...
luanlv/lila
modules/simul/src/main/SimulApplicant.scala
Scala
mit
389
package maker.task import java.util.concurrent.atomic.AtomicReference import maker.utils.TestIdentifier import maker.utils.TestFailure import maker.utils.RichString._ import maker.utils.TableBuilder object FailingTests{ private var mostRecentFailures : List[(TestIdentifier, TestFailure)] = Nil def setFailures(f...
syl20bnr/maker
maker/src/maker/task/FailingTests.scala
Scala
bsd-2-clause
1,436
/* * Copyright (c) 2014-2018 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
Wogan/monix
monix-tail/shared/src/main/scala/monix/tail/internal/IterantInterleave.scala
Scala
apache-2.0
6,177
/* * Copyright (c) 2015, PagerDuty * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted * provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of conditions * a...
PagerDuty/eris-core
main/src/main/scala/com/pagerduty/eris/schema/ReplicationStrategy.scala
Scala
bsd-3-clause
2,517
/* * The MIT License (MIT) * * Copyright (c) 2015 Enterprise Data Management Council * * 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...
edmcouncil/rdf-serializer
src/main/scala/org/edmcouncil/rdf_toolkit/command/SparqlDlQueryEngine.scala
Scala
mit
3,454
package chapter15 object Exercise5 extends App { def loadFile: String = { io.Source.fromFile("data/chapter15/exercise5.txt").getLines() mkString "\\n" } // Try it in main/chapter15/JavaExercise5 println("Scala: " + loadFile) }
vsuharnikov/books-exercises
scala/scala-for-the-impatient/src/main/scala/chapter15/Exercise5.scala
Scala
mit
240
/* * The MIT License * * Copyright (c) 2019 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/main/scala/com/fulcrumgenomics/vcf/api/ArrayAttr.scala
Scala
mit
3,655
package controllers import db.PasswordResetRequestsDao import com.bryzek.apidoc.api.v0.models.{PasswordReset, PasswordResetSuccess, PasswordResetRequest, User} import com.bryzek.apidoc.api.v0.errors.ErrorsResponse import java.util.UUID import play.api.test._ import play.api.test.Helpers._ class PasswordResetsSpec ex...
Seanstoppable/apidoc
api/test/controllers/PasswordResetsSpec.scala
Scala
mit
1,798
// See LICENSE for license details. package util import chisel3._ abstract class GenericParameterizedBundle[T <: Object](val params: T) extends Bundle { override def cloneType = { try { this.getClass.getConstructors.head.newInstance(params).asInstanceOf[this.type] } catch { case e: java.lang.Il...
stanford-ppl/spatial-lang
spatial/core/resources/chiselgen/template-level/fringeHW/util/GenericParameterizedBundle.scala
Scala
mit
668
/* * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
snowplow/scala-weather
src/test/scala/com.snowplowanalytics.weather/providers/openweather/WeatherGenerator.scala
Scala
apache-2.0
4,827
/* * Copyright (c) 2014-2018 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
Wogan/monix
monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala
Scala
apache-2.0
6,626
// Copyright (C) 2011-2012 the original author or authors. // See the LICENCE.txt 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. // You ...
cjww-development/rest-api
app/controllers/auth/RegisterController.scala
Scala
apache-2.0
935
package scodec.protocols package ip package v6 import scala.util.Try import scodec.bits._ import scodec.Codec import scodec.codecs case class Address(bytes: ByteVector) { require(bytes.size == 16) override def toString = { def condense[A](xs: List[(A, Int)]): List[(A, Int, Int)] = xs match { case Nil ...
scodec/scodec-protocols
src/main/scala/scodec/protocols/ip/v6/Address.scala
Scala
bsd-3-clause
1,704
import awscala._ import com.amazonaws.services.{s3 => aws} object S3Object { def apply(bucket: Bucket, obj: aws.model.S3Object): S3Object = new S3Object( bucket = bucket, key = obj.getKey, content = obj.getObjectContent(), redirectLocation = obj.getRedirectLocation, metadata = obj.getObjectMetad...
hirokikonishi/awscala
aws/s3/src/main/scala/S3Object.scala
Scala
apache-2.0
1,732
/** * Copyright 2014 Getty Imges, 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...
Tecsisa/akka-http-swagger
src/main/scala/com/tecsisa/akka/http/swagger/SwaggerHttpService.scala
Scala
apache-2.0
2,294
/* * 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 ...
jasonpet/openwhisk
tests/src/test/scala/system/basic/WskPackageTests.scala
Scala
apache-2.0
10,367
/** * 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...
timve/gatling
gatling-core/src/main/scala/io/gatling/core/check/extractor/xpath/JdkXmlParsers.scala
Scala
apache-2.0
3,596
import java.io.{FileWriter, BufferedWriter, File} // I'm sure stuff like this exists somewhere... // But oh well for now. object StringUtils { implicit def pimpString(s:String) = new { def replaceBetween(startDelim:String, endDelim:String, replacement:String): Option[String] = { val startIndex = s.indexOf(...
khalen/f0
project/Utils.scala
Scala
mit
1,554
package levar import org.scalatest._ class ServerSpec extends FlatSpec { }
peoplepattern/LeVar
levar-cli/src/test/scala/levar/ServerSpec.scala
Scala
apache-2.0
78
/* * 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 ...
setjet/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/trees/TreeNodeSuite.scala
Scala
apache-2.0
18,003
package org.scalaide.ui.internal.preferences import org.eclipse.jface.preference.FieldEditorPreferencePage import org.eclipse.ui.IWorkbenchPreferencePage import org.eclipse.ui.IWorkbench import org.scalaide.core.IScalaPlugin import org.eclipse.jface.preference.BooleanFieldEditor /** * Abstract base class for simple ...
Kwestor/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/ui/internal/preferences/BasicFieldEditorPreferencePage.scala
Scala
bsd-3-clause
839
package me.invkrh.raft.core import scala.concurrent.ExecutionContext import scala.concurrent.duration._ import scala.language.postfixOps import scala.util.Random import akka.actor.{ActorRef, Cancellable, Scheduler} import me.invkrh.raft.message.RaftMessage trait Timer { protected var cancellable: Cancellable = _ ...
invkrh/akka-raft
src/main/scala/me/invkrh/raft/core/Timer.scala
Scala
mit
1,297
package api /** * Helper for pagination. */ case class Page[+A](items: Seq[A], page: Int, size: Int, total: Long) { def offset = (page - 1) * size + 1 }
davidgraig/foosball
server/app/api/Page.scala
Scala
mit
157
package mesosphere.marathon.core.externalvolume.impl.providers import com.wix.accord._ import com.wix.accord.dsl._ import mesosphere.marathon.state._ import scala.util.Try protected[providers] object OptionSupport { import OptionLabelPatterns._ /** a validator to enforce that values conform to expectations of "...
ss75710541/marathon
src/main/scala/mesosphere/marathon/core/externalvolume/impl/providers/Helpers.scala
Scala
apache-2.0
1,140
/* * Copyright 2016 MongoDB, 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...
jCalamari/mongo-scala-driver
bson/src/main/scala/org/mongodb/scala/bson/codecs/macrocodecs/MacroCodec.scala
Scala
apache-2.0
7,646
package com.sksamuel.elastic4s.searches import com.sksamuel.exts.OptionImplicits._ import scala.concurrent.duration.FiniteDuration trait ScrollApi { def searchScroll(id: String, keepAlive: String): SearchScrollDefinition = SearchScrollDefinition(id).keepAlive(keepAlive) def searchScroll(id: String): SearchScrol...
FabienPennequin/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/searches/ScrollApi.scala
Scala
apache-2.0
946
/* * Copyright 2015 IBM Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
mrmechko/couchdb-scala
src/main/scala/com/ibm/couchdb/api/Databases.scala
Scala
apache-2.0
1,172
class Z protected (x: String) { def this() = this(")") new /* line: 1 */Z("") } object Z { new /* line: 1 */Z("") } class G extends /* line: 1 */Z("") { new /* line: 2, applicable: false, name: this */Z("") } object G { new /* line: 2, applicable: false, name: this */Z("") }
ilinum/intellij-scala
testdata/resolve2/bug2/SCL3539.scala
Scala
apache-2.0
288
/* * 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 ...
ioana-delaney/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/UnsupportedOperationChecker.scala
Scala
apache-2.0
16,945
/* * Copyright 2019 Spotify AB. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
spotify/scio
scio-core/src/main/scala/com/spotify/scio/coders/instances/AlgebirdCoders.scala
Scala
apache-2.0
1,233
package monocle.std import monocle.TestUtil._ import monocle.function._ import monocle.law.{LensLaws, OptionalLaws, PrismLaws, TraversalLaws} import org.specs2.scalaz.Spec class MapSpec extends Spec { checkAll("at Map", LensLaws(at[Map[Int, String], Int, String](2))) checkAll("each Map", TraversalLaws(each[Map[...
CapeSepias/Monocle
test/src/test/scala/monocle/std/MapSpec.scala
Scala
mit
586
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.util import scala.util.Try object HtmlUtil { def unescapeHtml(escaped: String): Option[String] = { Try { val result = escaped.foldLeft[(String, Option[String...
VlachJosef/ensime-server
core/src/main/scala/org/ensime/util/HtmlUtil.scala
Scala
gpl-3.0
1,319
val l1tmp = opts.string("srcLang","The source language") val l2tmp = opts.string("trgLang","The target langauge") val splitSize = opts.intValue("l","The number of lines for each split (<= 0 for no split)",-1) val resume = opts.flag("resume","Resume based on previous state") val mert = !opts.flag("nomert","Do not tune u...
jmccrae/nimrod
scripts/moses-train.scala
Scala
apache-2.0
16,486
package objektwerks.function import org.scalatest.funsuite.AnyFunSuite import org.scalatest.matchers.should.Matchers import scala.annotation.tailrec import scala.util.Random import scala.util.chaining._ import scala.language.postfixOps class FunctionTest extends AnyFunSuite with Matchers { test("literal") { va...
objektwerks/scala
src/test/scala/objektwerks/function/FunctionTest.scala
Scala
apache-2.0
5,504
package com.oct import java.net.URI import com.oct.sclaav.Mode.Mode import com.sksamuel.scrimage.Image package object sclaav { object MapsModes { def apply(mode: String) = mode match { case "permute" => Mode.MOSAIC_PERMUTE_ALL_FILES case "single" => Mode.MOSAIC_SINGLE_FILE case "mosaic-of-mo...
ogeagla/sclaav
src/main/scala/com/oct/sclaav/package.scala
Scala
apache-2.0
6,070
package com.jcalc.feed import kafka.serializer.Decoder import kafka.serializer.Encoder import kafka.utils.VerifiableProperties class SingleTransactionDecoder(props: VerifiableProperties) extends Decoder[SingleTransaction] { def fromBytes(bytes: Array[Byte]): SingleTransaction = { new SingleTransaction(new Stri...
belled10468/marseille
src/main/scala/com/jcalc/feed/Codec.scala
Scala
apache-2.0
541
/* * 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 ...
jianran/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcQuerySuite.scala
Scala
apache-2.0
22,698
abstract class Obj { type S } class ObjImpl extends Obj { type S = String } abstract class A { type MyObj <: Obj type S = MyObj#S val any: Any = 0 val some: S = any // compiles => type X is set to scala.Any } class B extends A { type MyObj = ObjImpl val myString: S = "hello" val realString: String...
scala/scala
test/files/neg/t836.scala
Scala
apache-2.0
360
/* * Copyright 2013 TeamNexus * * TeamNexus Licenses this file to you under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://opensource.org/licenses/mit-license.php * * Unless required by applicable law ...
crvidya/nexus-scala
src/main/scala/com/nexus/time/NexusTime.scala
Scala
mit
1,064
package mr.merc.map.generator import mr.merc.economics.{FourSeasonsTerrainHex, FourSeasonsTerrainHexField, WorldGenerator} import mr.merc.map.ShortestGrid import mr.merc.map.hex._ import mr.merc.map.pathfind.PathFinder import mr.merc.map.terrain._ import mr.merc.util.MercUtils._ import scala.math.{abs, max, pow} impo...
RenualdMarch/merc
src/main/scala/mr/merc/map/generator/WorldMapGenerator.scala
Scala
gpl-3.0
11,956
package views.html.analyse import lila.api.Context import lila.app.templating.Environment._ import lila.app.ui.ScalatagsTemplate._ import lila.game.Pov object replayBot { def apply( pov: Pov, initialFen: Option[chess.format.FEN], pgn: String, simul: Option[lila.simul.Simul], cross: Op...
luanlv/lila
app/views/analyse/replayBot.scala
Scala
mit
1,497
package dsmoq.services.json /** * ライセンス情報を返却するためのJSON型 * * @param id ライセンスID * @param name ライセンス名 */ case class License( id: String, name: String )
nkawa/dsmoq
server/apiServer/src/main/scala/dsmoq/services/json/License.scala
Scala
apache-2.0
212
/* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/vat-registration-frontend
test/models/external/incorporatedentityid/IncorporatedEntitySpec.scala
Scala
apache-2.0
3,169
object Test extends dotty.runtime.LegacyApp { import Macros._ println("2".toOptionOfInt) }
folone/dotty
tests/disabled/macro/run/macro-term-declared-in-implicit-class/Test_2.scala
Scala
bsd-3-clause
94
/* * 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...
jenniew/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/Bottle.scala
Scala
apache-2.0
4,961
package org.bitcoins.core.bloom import org.bitcoins.core.util.Factory /** * Created by chris on 8/3/16. * Specifies how to update a bloom filter * [[https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki#filter-matching-algorithm]] */ sealed trait BloomFlag { def byte: Byte } /** The filtering node sho...
Christewart/bitcoin-s-core
src/main/scala/org/bitcoins/core/bloom/BloomFlag.scala
Scala
mit
1,337
package hash.tree /** * @author Simon Dirmeier { @literal simon.dirmeier@gmx.de} */ trait INode[T]
dirmeier/algorithms-and-datastructures
hash-tree/src/hash/tree/INode.scala
Scala
gpl-3.0
105
package org.openurp.edu.eams.teach.grade.course import org.beangle.data.model.Entity import org.beangle.commons.entity.TimeEntity import org.openurp.base.Semester import org.openurp.edu.base.Project import org.openurp.edu.base.Student import org.openurp.edu.base.Course import org.openurp.edu.teach.code.ExamStatus impo...
openurp/edu-eams-webapp
grade/src/main/scala/org/openurp/edu/eams/teach/grade/course/GradeModifyApply.scala
Scala
gpl-3.0
1,898
/* * 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...
dotty-staging/scalatest
scalatest-test/src/test/scala/org/scalatest/WordSpecSpec.scala
Scala
apache-2.0
168,535
package breeze.stats.distributions; /* 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...
scalanlp/breeze
math/src/test/scala/breeze/stats/distributions/GaussianTest.scala
Scala
apache-2.0
2,755
package freecli package command object all extends AllOps with AllImplicits { type ParentWith[P, B] = api.ParentWith[P, B] }
pavlosgi/freecli
core/src/main/scala/freecli/command/all.scala
Scala
apache-2.0
127
package uk.gov.gds.ier.transaction.ordinary.postalVote import com.google.inject.{Inject, Singleton} import uk.gov.gds.ier.serialiser.JsonSerialiser import uk.gov.gds.ier.model._ import play.api.templates.Html import uk.gov.gds.ier.config.Config import uk.gov.gds.ier.security.EncryptionService import uk.gov.gds.ier.st...
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/transaction/ordinary/postalVote/PostalVoteStep.scala
Scala
mit
1,788
/* * BoundedProbFactor.scala * Factors over variables. * * Created By: Avi Pfeffer (apfeffer@cra.com) * Creation Date: Jan 15, 2014 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email figaro@cra.com for information. * * See http://www.github.com/p2...
wkretschmer/figaro
Figaro/src/main/scala/com/cra/figaro/algorithm/lazyfactored/BoundedProbFactor.scala
Scala
bsd-3-clause
5,224
/* Copyright 2012 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...
sid-kap/scalding
scalding-commons/src/main/scala/com/twitter/scalding/commons/source/VersionedKeyValSource.scala
Scala
apache-2.0
9,350
/** * Copyright (C) 2013 Carnegie Mellon University * * 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 appl...
twmarshall/tdb
core/src/main/scala/tdb/list/Hasher.scala
Scala
apache-2.0
1,142
package com.lightbend.coursegentools import java.io.File /** * Copyright © 2016 Lightbend, 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/licens...
lightbend-training/course-management-tools
linearize/src/main/scala/com/lightbend/coursegentools/LinearizeCmdLineOptParse.scala
Scala
apache-2.0
3,261
package com.seanshubin.detangler.domain import java.nio.file.Path case class RawConfiguration(reportDir: Option[Path], searchPaths: Option[Seq[Path]], level: Option[Int], startsWith: Option[RawStartsWithConfiguration], ...
SeanShubin/detangler
domain/src/main/scala/com/seanshubin/detangler/domain/RawConfiguration.scala
Scala
unlicense
2,853
package se.uprise.graphql.types import org.scalatest.FunSpec import se.uprise.graphql.GraphQL class CoercionSpec extends FunSpec { describe("Type System: Scalar coercion") { it("coerces output int") { //GraphQLInt.coerce() } } }
hrosenhorn/graphql-scala
src/test/scala/se/uprise/graphql/types/CoercionSpec.scala
Scala
mit
250
package contoso.conference.registration import scala.concurrent.duration._ import akka.actor.{ Actor, ActorLogging, ActorRef, Props } import akka.event.LoggingReceive import com.typesafe.config.ConfigFactory import contoso.conference.{ ConferenceModule, ConferenceProtocol } import contoso.registration.{ OrderLine, Sea...
dmrolfs/demesne
examples/src/main/scala/contoso/conference/registration/PricingRetriever.scala
Scala
apache-2.0
3,160
/** * 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...
usakey/kafka
core/src/main/scala/kafka/server/KafkaHealthcheck.scala
Scala
apache-2.0
3,945
/* * 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 ...
WangTaoTheTonic/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/table.scala
Scala
apache-2.0
36,539
package almond.util import java.lang.Thread.UncaughtExceptionHandler import java.util.concurrent.{Executors, ThreadFactory} import java.util.concurrent.atomic.AtomicInteger import scala.concurrent.{ExecutionContext, ExecutionContextExecutorService} import scala.util.control.NonFatal object ThreadUtil { // From ht...
alexarchambault/jupyter-scala
modules/shared/channels/src/main/scala/almond/util/ThreadUtil.scala
Scala
apache-2.0
1,954