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 io.surfkit.clientlib.wysihtml5 import scala.scalajs.js import scala.scalajs.js.annotation.JSName /** * Created by suroot on 17/05/16. */ @JSName("wysihtml.dom") @js.native object dom extends js.Object{ def getAsDom(html: String, context: org.scalajs.dom.raw.Document): org.scalajs.dom.raw.Element = js.n...
coreyauger/scala-js-wysihtml
src/main/scala/io/surfkit/clientlib/wysihtml5/dom.scala
Scala
mit
328
package models.user import models.utils.MyPostgresDriver.simple._ import play.api.Play.current import java.sql.Timestamp import models.survey._ import models.daos.slick.DBTableDefinitions.{DBUser, UserTable} import scala.slick.lifted.ForeignKeyQuery case class UserSurveyTextSubmission(userSurveyTextSubmissionId: Int,...
ProjectSidewalk/SidewalkWebpage
app/models/user/UserSurveyTextSubmission.scala
Scala
mit
2,107
package asobu.dsl.extractors import asobu.dsl.{ExtractResult, FallbackResult, Extractor} import Extractor._ import ExtractResult._ import asobu.dsl.util.Read import scala.concurrent.ExecutionContext import scala.util.{Success, Failure, Try} trait PrimitiveExtractors { def stringOption[T: Read](ifEmpty: ⇒ Throwable)...
iheartradio/asobu
dsl/src/main/scala/asobu/dsl/extractors/PrimitiveExtractors.scala
Scala
apache-2.0
666
package io.surfkit.driver import play.api.libs.ws.DefaultWSClientConfig import play.api.libs.ws.ning.NingAsyncHttpClientConfigBuilder import play.api.libs.ws.ning.NingWSClient import com.ning.http.client.AsyncHttpClientConfig import scala.concurrent.ExecutionContext.Implicits.global import scala.Predef._ /** * * C...
coreyauger/spark-ashley-madison-ml
src/main/scala/io/surfkit/driver/Scraper.scala
Scala
mit
838
import scala.quoted.* import scala.language.implicitConversions case class Xml(parts: String, args: List[Any]) object XmlQuote { implicit class SCOps(ctx: StringContext) { inline def xml(args: => Any*): Xml = ${XmlQuote.impl('this, 'args)} } def impl(receiver: Expr[SCOps], args: Expr[Seq[Any]]) ...
dotty-staging/dotty
tests/run-macros/xml-interpolation-1/XmlQuote_1.scala
Scala
apache-2.0
1,799
/* * 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 ...
mtunique/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/expressions/utils/ScalarOperatorsTestBase.scala
Scala
apache-2.0
2,210
package org.sisioh.aws4s.eb.model import java.util.Date import com.amazonaws.services.elasticbeanstalk.model._ import org.sisioh.aws4s.PimpedType object TerminateEnvironmentResultFactory { def create(): TerminateEnvironmentResult = new TerminateEnvironmentResult() } class RichTerminateEnvironmentResult(val unde...
everpeace/aws4s
aws4s-eb/src/main/scala/org/sisioh/aws4s/eb/model/RichTerminateEnvironmentResult.scala
Scala
mit
5,062
package week5 import akka.actor.Actor import akka.actor.Props import akka.event.LoggingReceive class TransferMain extends Actor { val accountFrom = context.actorOf(Props[BankAccount], "accountFrom") val accountTo = context.actorOf(Props[BankAccount], "accountTo") accountFrom ! BankAccount.Deposit(100) accou...
M4573R/playground-notes
principles-of-reactive-programming/week-5/src/main/scala/TransferMain.scala
Scala
mit
871
package org.coursera.naptime.sbt import sbtbuildinfo.BuildInfo object ScalaLibraryLocator { def getPath: Option[String] = { val pattern = "library jar: ([^,]+)".r pattern.findFirstMatchIn(BuildInfo.scalaInstance).map(_.group(1)) } }
vkuo-coursera/naptime
naptime-sbt-plugin/src/main/scala/org/coursera/naptime/sbt/ScalaLibraryLocator.scala
Scala
apache-2.0
247
/** * Model.scala */ package bloom.model import bloom.View import bloom.ClockMode import bloom.globals._ import scala.collection.mutable.ArrayBuffer object Model { /** * Object members */ // Clock mode representation val clock: ClockMode.Value = ClockMode.Standard // Internal representation of...
AndrewMcBurney/bloom
src/main/scala/bloom/model/Model.scala
Scala
mit
1,852
package japgolly.scalajs.react.vdom trait CssUnitsOps { @inline final implicit def vdomAttrVtCssUnits[N: Numeric](n: N): CssUnits = new CssUnits(n) } /** * Extends numbers to provide a bunch of useful methods, allowing you to write * CSS-lengths in a nice syntax without resorting to strings. */ final class C...
japgolly/scalajs-react
coreGeneric/src/main/scala-2/japgolly/scalajs/react/vdom/CssUnits.scala
Scala
apache-2.0
2,722
package org.scalajs.jsenv.test import org.scalajs.jsenv.phantomjs.PhantomJSEnv import org.junit.Test class PhantomJSTest extends JSEnvTest with ComTests { protected def newJSEnv: PhantomJSEnv = new PhantomJSEnv }
mdedetrich/scala-js
js-envs/src/test/scala/org/scalajs/jsenv/test/PhantomJSTest.scala
Scala
bsd-3-clause
218
// Jubatus: Online machine learning framework for distributed environment // Copyright (C) 2014-2015 Preferred Networks and Nippon Telegraph and Telephone Corporation. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License version 2.1...
jubatus/jubatus-on-yarn
jubatusonyarn/jubatus-on-yarn-client/src/main/scala/us/jubat/yarn/client/JubatusYarnApplication.scala
Scala
lgpl-2.1
10,794
package scalajs.antdesign import japgolly.scalajs.react._ import org.scalajs.dom.Event import scala.scalajs.js import scala.scalajs.js.{Dynamic, Object, |} /** * @see https://ant.design/components/table/#API * @param rowSelection row selection config * @param pagination pagination config, hide it via setting t...
mdedetrich/scalajs-antdesign
src/main/scala/scalajs/antdesign/Table.scala
Scala
bsd-3-clause
15,010
package ml.combust.bundle.dsl import ml.bundle.Socket /** Companion object for holding constant values. */ object NodeShape { val standardInputPort: String = "input" val standardOutputPort: String = "output" /** Default constructor. * * @return empty shape */ def apply(): NodeShape = new NodeSh...
combust/mleap
bundle-ml/src/main/scala/ml/combust/bundle/dsl/NodeShape.scala
Scala
apache-2.0
6,138
/******************************************************************************* * Copyright (c) 2014 Łukasz Szpakowski. * * 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/MP...
luckboy/Purfuncor
src/main/scala/pl/luckboy/purfuncor/frontend/instant/InstantiationLambdaInfo.scala
Scala
mpl-2.0
560
import scala.scalajs.js import js.annotation._ package importedjs { package `node-slack` { @JSName("node-slack.Slack") class Slack protected () extends js.Object { def this(hookUrl: String, option: Slack.Option = ???) = this() def send(message: Slack.Message): js.Dynamic = js.native def send(message: Slack.Me...
ara-ta3/scalajs-hubot-doorkeeper-api
src/main/scala/dark/util/NodeSlack.scala
Scala
mit
1,528
/* * 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 ...
akopich/spark
core/src/test/scala/org/apache/spark/storage/BlockReplicationPolicySuite.scala
Scala
apache-2.0
4,905
package com.twitter.finatra.kafkastreams.internal.admin import com.twitter.finagle.Service import com.twitter.finagle.http._ import com.twitter.util.Future import java.util.Properties import scala.collection.JavaConverters._ private[kafkastreams] object KafkaStreamsPropertiesHandler { /** * Create a service fun...
twitter/finatra
kafka-streams/kafka-streams/src/main/scala/com/twitter/finatra/kafkastreams/internal/admin/KafkaStreamsPropertiesHandler.scala
Scala
apache-2.0
1,048
/* * 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 ...
tzulitai/flink
flink-tests/src/test/scala/org/apache/flink/api/scala/completeness/ScalaAPICompletenessTestBase.scala
Scala
apache-2.0
2,943
/* * Copyright (c) 2015 Alpine Data Labs * All rights reserved. */ package com.alpine.json import java.lang.reflect.Type import com.google.gson._ /** * Gson adapter to be used to serialize and serialize [[TypeWrapper]] to and from JSON * with Gson. * * To be used when the developer wishes to to include a inte...
holdenk/PluginSDK
alpine-model-api/src/main/scala/com/alpine/json/GsonTypeAdapter.scala
Scala
apache-2.0
3,162
/* * 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/test/scala/com/intel/analytics/bigdl/dllib/keras/objectives/SparseCategoricalCrossEntropySpec.scala
Scala
apache-2.0
7,189
/** When this files is opened within the IDE, a typing error is reported. */ class A[B] extends TestIterable[B] { //import collection.convert.ImplicitConversionsToScala._ implicit def `iterator asScala`[A](it: ju.Iterator[A]): Iterator[A] = ??? implicit def `enumeration AsScalaIterator`[A](i: ju.Enumeration[A]): ...
scala/scala
test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala
Scala
apache-2.0
498
package org.eso.ias.tranfer import java.util.Properties import com.typesafe.scalalogging.Logger import org.eso.ias.asce.transfer.{IasIO, IasioInfo, ScalaTransferExecutor} import org.eso.ias.logging.IASLogger import org.eso.ias.types.{Alarm, IASTypes, OperationalMode} import scala.util.matching.Regex /** * The Ant...
IntegratedAlarmSystem-Group/ias
TransferFunctions/src/main/scala/org/eso/ias/tranfer/AntPadInhibitor.scala
Scala
lgpl-3.0
7,169
/*********************************************************************** * Copyright (c) 2013-2019 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...
elahrvivaz/geomesa
geomesa-features/geomesa-feature-common/src/main/scala/org/locationtech/geomesa/features/serialization/ObjectType.scala
Scala
apache-2.0
5,164
package im.actor.server.http import im.actor.api.rpc.ClientData import im.actor.api.rpc.counters.UpdateCountersChanged import im.actor.api.rpc.messaging.{ TextMessage, UpdateMessage } import im.actor.api.rpc.misc.ResponseSeq import im.actor.server._ import im.actor.server.api.http.json.Text import im.actor.server.api....
luoxiaoshenghustedu/actor-platform
actor-server/actor-tests/src/test/scala/im/actor/server/http/WebhookHandlerSpec.scala
Scala
mit
3,612
package de.zalando.swagger import java.net.URI import de.zalando.apifirst.Domain import Domain._ import TypeMetaConverter._ import de.zalando.apifirst.naming._ import strictModel._ import scala.collection.mutable import scala.language.{implicitConversions, postfixOps} /** * @author slasch * @since 14.10.2015....
zalando/play-swagger
swagger-parser/src/main/scala/de/zalando/swagger/typeConverter.scala
Scala
mit
15,106
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
bdrillard/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/ExtractBenchmark.scala
Scala
apache-2.0
3,667
package com.twitter.finatra.http.internal.exceptions import com.twitter.finagle.http.{Request, Response} import com.twitter.finatra.http.exceptions.{DefaultExceptionMapper, ExceptionMapper} import com.twitter.inject.Injector import com.twitter.inject.TypeUtils.singleTypeParam import java.lang.reflect.Type import java....
nkhuyu/finatra
http/src/main/scala/com/twitter/finatra/http/internal/exceptions/ExceptionManager.scala
Scala
apache-2.0
3,519
package com.reactific.jfxtend.scene.shape import javafx.scene.shape.Sphere /** Unit Tests For Anchor */ class Anchor extends Sphere { }
reactific/jfxtensions
src/main/scala/com/reactific/jfxtend/scene/shape/Anchor.scala
Scala
apache-2.0
140
package inloopio.indicator.function import inloopio.math.StatsFunctions import inloopio.math.timeseries.Null import inloopio.math.timeseries.TBaseSer import inloopio.math.timeseries.TVar import inloopio.math.indicator.Factor /** * * @author Caoyuan Deng */ class SUMFunction(_baseSer: TBaseSer, var baseVar: TVar[Do...
dcaoyuan/inloopio-libs
inloopio-indicator/src/main/scala/inloopio/indicator/function/SUMFunction.scala
Scala
bsd-3-clause
1,011
/* * 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...
quipo/kafka
core/src/main/scala/kafka/consumer/FetcherRunnable.scala
Scala
apache-2.0
5,341
/* * 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/runtime/stream/sql/FilterableSourceITCase.scala
Scala
apache-2.0
4,958
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
mahak/spark
mllib/src/main/scala/org/apache/spark/ml/image/HadoopUtils.scala
Scala
apache-2.0
4,265
/* * Copyright (C) 2010 Romain Reuillon * * 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. * * This progra...
ISCPIF/PSEExperiments
openmole-src/openmole/core/org.openmole.core.tools/src/main/scala/org/openmole/core/tools/service/Random.scala
Scala
agpl-3.0
2,897
object SCL4150 { class U[T] class JK extends U[Int] class B[T] extends JK trait Z[T] trait C[T] extends Z[Int] class A[T, K] extends B[T] with C[T] def foo[T[_], H](t: T[H]): T[H] = ??? /*start*/foo(new A[Int, String])/*end*/ } /* SCL4150.B[Int] [Scala_2_13]SCL4150.A[Int, String] */
JetBrains/intellij-scala
scala/scala-impl/testdata/typeInference/bugs5/SCL4150B.scala
Scala
apache-2.0
300
package models case class UserAddModel( userid : String, email : String, role : String, templates: String, admin: String, master: String)
HiP-App/HiPBackend
app/models/UserAddModel.scala
Scala
apache-2.0
270
package breeze import breeze.generic.{UFunc, VariableUFunc} import breeze.linalg.{DenseMatrix, DenseVector} import breeze.macros.cforRange import spire.math.poly.PolyDense import breeze.macros._ import spire.implicits.DoubleAlgebra package object polynomial { object densePolyval extends UFunc { implicit object ...
scalanlp/breeze
math/src/main/scala/breeze/polynomial/package.scala
Scala
apache-2.0
2,495
package de.kaufhof.jsonhomeclient import org.scalatest.mockito.MockitoSugar import org.scalatest.{BeforeAndAfterAll, FunSpec, Matchers} abstract class UnitSpec extends FunSpec with Matchers with BeforeAndAfterAll with MockitoSugar
Galeria-Kaufhof/jsonhomeclient
src/test/scala/de/kaufhof/jsonhomeclient/UnitSpec.scala
Scala
apache-2.0
232
package com.rafkind.paintown.animator import javax.swing._ import java.awt.event._ import java.awt.Color import java.io.File import javax.swing.event.ChangeListener import javax.swing.event.ChangeEvent import javax.swing.event.DocumentListener import javax.swing.event.DocumentEvent import com.rafkind.paintown.Undo imp...
boyjimeking/paintown
editor/src/com/rafkind/paintown/animator/tools.scala
Scala
bsd-3-clause
6,902
package net.white_azalea.datas.arguments import java.io.File /** * Application argument parameter. * * @param template Result template file path. * @param javaDocXml JavaDoc XML file path. * @param junitResultDir JUnit test results XML dir path. */ case class Config( template: File, javaDocXml:...
Sunao-Yoshii/JUnitDocMarge
src/main/scala/net/white_azalea/datas/arguments/Config.scala
Scala
apache-2.0
351
package models case class CategoryTree()
mmx900/PlayCode-Wiki
app/models/CategoryTree.scala
Scala
apache-2.0
42
package franka package lang import scala.language.implicitConversions abstract class Ast { type Data sealed trait Exp case class Literal (data : Data) extends Exp implicit def dataToLiteral (data : Data) : Exp = Literal (data) case class Ident (name : Name) extends Exp implicit def nameToI...
bylt/franka
src/main/scala/franka/lang/Ast.scala
Scala
mit
4,212
package org.yotchang4s.ch2.response import java.io._ import scala.collection._ import org.yotchang4s.scala.Loan import org.yotchang4s.scala.Loan._ import org.yotchang4s.ch2._ import org.yotchang4s.http.Http import org.yotchang4s.ch2.thread.ThreadId import java.util.regex.Pattern private[ch2] trait ResponseComponentIm...
yotchang4s/gikolet
src/org/yotchang4s/ch2/response/ResponseComponentImpl.scala
Scala
bsd-3-clause
2,484
package progscala2.typesystem.valuetypes trait Logger { def log(message: String): Unit } class ConsoleLogger extends Logger { def log(message: String): Unit = println(s"log: $message") } trait Service { // Logger의 abstract type alias 지정 type Log <: Logger val logger: Log } class Service1 extends Service {...
younggi/books
programming_scala/progscala2/src/main/scala/progscala2/typesystem/valuetypes/type-projection.scala
Scala
mit
403
package sds.util import collection.mutable.{ ArrayBuffer => Buffer, HashMap => Hash } import sds.Classfile import sds.classfile.{MemberInfo => Member} import sds.classfile.attribute.{ AttributeInfo, BootstrapMethods, Code, InnerClasses, LineNumberTable, LocalVariable, RuntimeAnnotations, RuntimeParam...
g1144146/sds_for_scala
src/main/scala/sds/util/ClassfilePrinter.scala
Scala
apache-2.0
7,936
package com.github.ldaniels528.trifecta.ui.models import play.api.libs.json.{Json, Reads, Writes} case class ConsumerOffsetJs(groupId: String, topic: String, partition: Int, offset: Long, topicStartOffset: ...
ldaniels528/trifecta
app-play/app/com/github/ldaniels528/trifecta/ui/models/ConsumerOffsetJs.scala
Scala
apache-2.0
720
package spinoco.protocol.http.header import spinoco.protocol.http.header.value.{EntityTagRange, HeaderCodecDefinition} /** * RFC 7231 section 3.2 * * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match */ sealed case class `If-None-Match`(value: EntityTagRange) extends DefaultHead...
Spinoco/protocol
http/src/main/scala/spinoco/protocol/http/header/If-None-Match.scala
Scala
mit
467
package com.github.mrpowers.spark.daria.sql import utest._ import org.apache.spark.sql.Row import org.apache.spark.sql.types.{IntegerType, StringType, StructField, StructType} object DataFrameSchemaCheckerTest extends TestSuite with SparkSessionTestWrapper { val tests = Tests { 'missingStructFields - { ...
MrPowers/spark-daria
src/test/scala/com/github/mrpowers/spark/daria/sql/DataFrameSchemaCheckerTest.scala
Scala
mit
7,199
package main.scala import java.util import org.apache.spark.sql.simba.SimbaSession import ca.pfv.spmf.algorithms.frequentpatterns.fpgrowth.AlgoFPMax import org.apache.spark.sql.Row import java.util.Calendar import org.apache.spark.rdd.RDD import org.apache.spark.sql.simba.index.RTreeType /** * Created by and on 3...
aocalderon/PhD
Y2Q3/PBFE4/src/main/scala/PBFE.scala
Scala
lgpl-3.0
5,274
package com.sksamuel.elastic4s import com.sksamuel.elastic4s.ElasticDsl._ import org.scalatest.FlatSpec import org.scalatest.mock.MockitoSugar /** @author Stephen Samuel */ class DeleteTest extends FlatSpec with MockitoSugar with ElasticSugar { client.execute( bulk( index into "places/cities" id 99 field...
maxcom/elastic4s
src/test/scala/com/sksamuel/elastic4s/DeleteTest.scala
Scala
apache-2.0
1,933
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2014, G...
non/squants
src/test/scala/squants/CustomMatchers.scala
Scala
apache-2.0
2,065
package com.criteo.dev.cluster.copy import com.criteo.dev.cluster.Node /** * Most of the cases, we create the metadata of the copied tables on the cluster. * * In S3 case (shared data/metadata), we save it on S3 itself. */ abstract class CreateMetadataAction(conf: Map[String, String], target: Node) { def a...
criteo/berilia
src/main/scala/com/criteo/dev/cluster/copy/CreateMetadataAction.scala
Scala
apache-2.0
356
package threesixty.ProcessingMethods.interpolation import threesixty.data.metadata.{Resolution, Scaling} import threesixty.data.{ProcessedData, TaggedDataPoint, InputDataSkeleton} import threesixty.data.Data.{Identifier} import threesixty.data.Implicits.timestamp2Long import threesixty.processor.{ProcessingMixins, Sin...
elordin/threesixty
src/main/scala/threesixty/ProcessingMethods/interpolation/SplineInterpolation.scala
Scala
mit
5,742
package com.circusoc.simplesite.hire import org.dbunit.DBTestCase import org.scalatest.{BeforeAndAfter, FlatSpecLike} import com.circusoc.simplesite._ import scalikejdbc.ConnectionPool import java.sql.{DriverManager, Connection} import org.dbunit.database.DatabaseConnection import org.dbunit.operation.DatabaseOperat...
ririw/circusoc-backend
src/test/scala/com/circusoc/simplesite/hire/HireSpec.scala
Scala
agpl-3.0
4,539
/* * # Trove * * This file is part of Trove - A FREE desktop budgeting application that * helps you track your finances, FREES you from complex budgeting, and * enables you to build your TROVE of savings! * * Copyright © 2016-2019 Eric John Fredericks. * * Trove is free software: you can redistribute it ...
emanchgo/budgetfree
src/main/scala/trove/core/infrastructure/persist/ProjectImpl.scala
Scala
gpl-3.0
1,610
import sbt._ import sbt.Keys._ object ApplicationBuild extends Build { val appName = "test-sbt-parallel" val appVersion = "0.1.0-SNAPSHOT" val appScalaVersion = "2.10.3" val appScalaOptions = Seq( "-deprecation", "-unchecked", "-feature", // "-optimize", "-encoding", "utf-8" ) val ap...
mogproject/docker-sbt-test
example/project/Build.scala
Scala
apache-2.0
1,122
/* * 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 n...
guozhangwang/kafka
core/src/test/scala/unit/kafka/server/AbstractFetcherManagerTest.scala
Scala
apache-2.0
5,216
/** * This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]]. */ // DO NOT EDIT MANUALLY package sbt.internal.langserver.codec import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError } trait DiagnosticFormats { self: sbt.internal.langserver.codec.RangeFormats with...
sbt/sbt
protocol/src/main/contraband-scala/sbt/internal/langserver/codec/DiagnosticFormats.scala
Scala
apache-2.0
1,576
package pages import java.io.InputStream import java.util.zip.ZipInputStream import code.model.User import net.liftweb.http.js.JsCmd import net.liftweb.util.{CssSel, ClearNodes} import net.liftweb.util.Helpers._ import pages.theme.Libs.Lib import pages.theme.{Styles, Libs} import pages.theme.Styles._ import util.Impl...
slynx-fw/slynx-demo
app/pages/DemoCodePage.scala
Scala
apache-2.0
2,573
/** * 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...
tnachen/kafka
core/src/main/scala/kafka/producer/Producer.scala
Scala
apache-2.0
10,002
package com.twitter.finagle.buoyant.h2 import com.twitter.finagle.{Dtab => FDtab, Status => _, _} import com.twitter.finagle.buoyant.{Dst => BuoyantDst} import com.twitter.finagle.context.{Contexts, Deadline => FDeadline} import com.twitter.finagle.tracing._ import com.twitter.io.Buf import com.twitter.util.{Future, R...
denverwilliams/linkerd
linkerd/protocol/h2/src/main/scala/com/twitter/finagle/buoyant/h2/LinkerdHeaders.scala
Scala
apache-2.0
15,931
/* * 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 ...
InnovaCo/samza
samza-core/src/main/scala/org/apache/samza/serializers/MetricsSnapshotSerde.scala
Scala
apache-2.0
1,588
package ch6_purely_functional_state /** * Ex 6.1 * Write a function that uses RNG.nextInt to generate a random integer between 0 and Int.maxValue (inclusive). * Make sure to handle the corner case when nextInt returns Int.MinValue, * which doesn’t have a non-negative counterpart. * * def nonNegativeInt(rng: RNG)...
zenja/exercise-fp-in-scala
src/ch6_purely_functional_state/Ex6_State.scala
Scala
mit
11,851
package com.wavesplatform.state.patch import com.wavesplatform.account.PublicKey import com.wavesplatform.common.state.ByteStr import com.wavesplatform.common.utils._ import com.wavesplatform.db.WithDomain import com.wavesplatform.db.WithState.AddrWithBalance import com.wavesplatform.features.BlockchainFeatures import...
wavesplatform/Waves
node/src/test/scala/com/wavesplatform/state/patch/CancelLeasesToDisabledAliasesSpec.scala
Scala
mit
2,388
/* * 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 ...
alec-heif/MIT-Thesis
spark-bin/examples/src/main/scala/org/apache/spark/examples/ml/NaiveBayesExample.scala
Scala
mit
2,162
package com.xah.chat.datamodel.tables import android.database.sqlite.SQLiteDatabase import java.sql.Timestamp import android.provider.BaseColumns import android.net.Uri import com.xah.chat.datamodel.{TableHelper, xah} import android.util.Log import scala.language.implicitConversions object MessageFields extends Enume...
lemonxah/xaHChat
src/main/scala/com/xah/chat/datamodel/tables/Messages.scala
Scala
mit
1,569
package com.google.javascript.jscomp import scalaxy.js._ import scala.collection.JavaConversions._ import com.google.javascript.rhino.Node import com.google.javascript.rhino.JSTypeExpression import com.google.javascript.rhino.jstype._ object ClosureCompilerUtils { def defaultExterns: List[SourceFile] = CommandLin...
ochafik/ScalaScript
Generator/src/main/scala/scalaxy/js/externs/ClosureCompilerUtils.scala
Scala
bsd-3-clause
1,484
/* * Copyright 2008-2011 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 applica...
lzpfmh/framework-2
core/util/src/main/scala/net/liftweb/util/NamedPartialFunction.scala
Scala
apache-2.0
3,757
package io.udash.web.homepage.styles.partials import io.udash.css.{CssBase, CssStyle} import io.udash.web.commons.styles.utils._ import scala.concurrent.duration.DurationInt import scala.language.postfixOps object ButtonsStyle extends CssBase { import dsl._ val btn: CssStyle = style( CommonStyleUtils.transi...
UdashFramework/udash-core
guide/shared/src/main/scala/io/udash/web/homepage/styles/partials/ButtonsStyle.scala
Scala
apache-2.0
2,719
package play.api.cache.redis.configuration import play.api.cache.redis._ import org.specs2.mutable.Specification class RedisHostSpec extends Specification { import Implicits._ private implicit val loader = RedisHost "host with database and password" in new WithConfiguration( """ |play.cache.redis {...
KarelCemus/play-redis
src/test/scala/play/api/cache/redis/configuration/RedisHostSpec.scala
Scala
mpl-2.0
1,276
/* Stratagem is a model checker for transition systems described using rewriting rules and strategies. Copyright (C) 2013 - SMV@Geneva University. Program written by Edmundo Lopez Bobeda <edmundo [at] lopezbobeda.net>. This program is free software; you can redistribute it and/or modify it under the terms of the GNU G...
didierbuchs/oldstratagem
src/main/scala/ch/unige/cui/smv/stratagem/petrinets/PetriNetADT.scala
Scala
gpl-2.0
1,298
package scala.util.control /** Library implementation of nonlocal return. * * Usage: * * import scala.util.control.NonLocalReturns._ * * returning { ... throwReturn(x) ... } */ object NonLocalReturns { class ReturnThrowable[T] extends ControlThrowable { private var myResult: T = _ def throwRe...
lampepfl/dotty
library/src/scala/util/control/NonLocalReturns.scala
Scala
apache-2.0
885
package com.github.basp1.pulsar import akka.actor.{ActorRef, ActorSystem} import akka.pattern.ask import com.github.basp1.pulsar.Worker.{Stop, Time} import com.github.basp1.pulsar.radix.Chunk import org.junit.runner.RunWith import org.scalatest._ import org.scalatest.junit._ import org.scalatest.prop._ import scala.c...
basp1/pulsar
src/test/scala/WorkerTests.scala
Scala
mit
1,315
package sbtrelease import sbt.State // State monad trait Step[A] extends (State => (State,A)) { self => def apply(s: State) : (State, A) def map[B](f: A => B) : Step[B] = new Step[B] { def apply(s: State) : (State, B) = { val (s1,a) = self.apply(s) (s1,f(a)) } } def flatMap[...
lancegatlin/sbt-release-gitflow
src/main/scala/sbtrelease/Step.scala
Scala
mit
800
/* * 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...
chipsenkbeil/incubator-toree
kernel/src/main/scala/org/apache/toree/utils/DataFrameConverter.scala
Scala
apache-2.0
2,823
package org.scaladebugger.test.info /** * Provides test of examining class information. * * @note Should have a class name of org.scaladebugger.test.info.Classes */ object Classes { def main(args: Array[String]): Unit = { // Ensure that all desired classes are loaded val c1 = new ExternalNormalClass ...
chipsenkbeil/scala-debugger
scala-debugger-test/src/main/scala/org/scaladebugger/test/info/Classes.scala
Scala
apache-2.0
1,002
/* * 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/si/ServiceInterface.scala
Scala
apache-2.0
1,659
package io.github.raptros.bson import com.mongodb.{BasicDBObject, DBObject} /** Builders are all the things you need to build up DBObjects using available [[EncodeBson]]s and [[EncodeBsonField]]s. */ trait Builders { /** apply this to a bunch of [[DBOKV]]s and get a DBObject. * {{{ * DBO("k0" :> true, "k1"...
raptros/the-bson
core/src/main/scala/io/github/raptros/bson/Builders.scala
Scala
bsd-3-clause
3,317
/* * Copyright (c) 2011-2017 Interfaculty Department of Geoinformatics, University of * Salzburg (Z_GIS) & Institute of Geological and Nuclear Sciences Limited (GNS Science) * in the SMART Aquifer Characterisation (SAC) programme funded by the New Zealand * Ministry of Business, Innovation and Employment (MBIE) * ...
ZGIS/smart-portal-backend
app/models/db/AbstractDatabaseSessionHolder.scala
Scala
apache-2.0
1,164
/* * 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-ml/src/main/scala/org/apache/flink/ml/outlier/StochasticOutlierSelection.scala
Scala
apache-2.0
15,707
package io.giovannini.externalApi import play.api.libs.json.{JsObject, Json} class ExternalApi() { def get: JsObject = Json.obj( "title" -> "Utiliser un DTO pour s'interfacer avec une API", "author" -> "Thomas GIOVANNINI", "email" -> "[email protected]", "publicationDate" -> "2018-03-18" ...
Giovannini/giovannini.github.io
projects/2018-03-18-utilite-d-un-dto/external-api/src/main/scala/io/giovannini/externalApi/ExternalApi.scala
Scala
mit
326
package com.avsystem.commons package redis.util import akka.actor.ActorSystem import com.avsystem.commons.concurrent.RunNowEC import scala.concurrent.duration.{Duration, FiniteDuration} object DelayedFuture { def apply(delay: FiniteDuration)(implicit system: ActorSystem): Future[Unit] = if (delay <= Duration.Z...
AVSystem/scala-commons
commons-redis/src/main/scala/com/avsystem/commons/redis/util/DelayedFuture.scala
Scala
mit
487
package edu.gemini.seqexec.server import java.util.logging.Logger import argonaut._ import Argonaut._ import org.apache.commons.httpclient.{HttpMethod, HttpClient} import org.apache.commons.httpclient.methods.{EntityEnclosingMethod, PutMethod, PostMethod} import scala.io.Source import scalaz.concurrent.Task import ...
arturog8m/ocs
bundle/edu.gemini.seqexec.server/src/main/scala/edu/gemini/seqexec/server/DhsClient.scala
Scala
bsd-3-clause
7,872
package git import org.scalatest.{Matchers, FlatSpec} import java.io.File import git.util.FileUtil import org.joda.time.{DateTimeZone, DateTime} class CommitSpec extends FlatSpec with Matchers { // Create an example commit. val commit = Commit( id = ObjectId("6987b5626be09f59e84cb64c36b8e8a15a198798...
kaisellgren/ScalaGit
src/test/scala/git/CommitSpec.scala
Scala
mit
3,577
package uk.gov.dvla.vehicles.presentation.common.controllers.k2kacquire import org.scalatest.mock.MockitoSugar import play.api.mvc.{Request, Result} import uk.gov.dvla.vehicles.presentation.common.clientsidesession.ClientSideSessionFactory import uk.gov.dvla.vehicles.presentation.common.controllers.BusinessKeeperDetai...
dvla/vehicles-presentation-common
test/uk/gov/dvla/vehicles/presentation/common/controllers/k2kacquire/BusinessKeeperDetailsTesting.scala
Scala
mit
1,842
/* * 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 ...
aliyun/aliyun-emapreduce-sdk
emr-tablestore/src/test/scala/org/apache/spark/sql/aliyun/tablestore/TableStoreDataSuite.scala
Scala
artistic-2.0
2,133
package metal package macros import spire.macros.compat.Context import spire.macros.SyntaxUtil trait Call[C <: Context with Singleton] { val c: C /** Instantiates a call to the function/tree `body`, using the elements pointed to by the pointer * named `pointerName` on container `containerName`. */ def...
denisrosset/ptrcoll
core/src/main/scala/metal/macros/Call.scala
Scala
mit
4,447
/* * The MIT License (MIT) * * Copyright (c) 2016 Ian McIntosh * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use,...
cranst0n/f3
modules/web/src/main/scala/f3/web/app.scala
Scala
mit
2,395
import diode._ import diode.react.{ModelProxy, ReactConnector} import scala.scalajs.js import org.scalajs.dom import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.html_<^._ import japgolly.scalajs.react.WebpackRequire import japgolly.scalajs.react.extra.router.{BaseUrl, Redirect, Router, RouterConfigDsl,...
makespacer/makespace
client/src/main/scala/Main.scala
Scala
apache-2.0
2,272
package com.sksamuel.elastic4s.searches.aggs import com.sksamuel.elastic4s.ScriptBuilder import com.sksamuel.elastic4s.script.SortBuilderFn import com.sksamuel.elastic4s.searches.aggs.pipeline.PipelineAggregationBuilderFn import com.sksamuel.elastic4s.searches.sort.SortDefinition import org.elasticsearch.search.aggreg...
tyth/elastic4s
elastic4s-tcp/src/main/scala/com/sksamuel/elastic4s/searches/aggs/TopHitsAggregationBuilder.scala
Scala
apache-2.0
1,474
import sbt._ import Keys._ object Dependencies{ val playVersion = "2.2.1" val dependenciesList = Seq( "com.typesafe.play" %% "routes-compiler" % playVersion, "com.typesafe.play" % "play-exceptions" % playVersion, "commons-logging" % "commons-logging" % "1.1.3", "org.raml" % "raml-parser" % "0.8....
scalableminds/sbt-play-raml
sbt-plugin/project/Build.scala
Scala
apache-2.0
2,505
/* * Copyright (C) 2005, The Beangle Software. * * 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 3 of the License, or * (at your option) any later version. * * This...
beangle/webmvc
support/src/main/scala/org/beangle/webmvc/support/action/ImportSupport.scala
Scala
lgpl-3.0
2,837
package assigner.search import assigner.model._ import assigner.search.tabu._ import org.coinor.opents._ /** Entry point for running the algorithm. */ class Assigner(course: Course) { val manager = new Manager (course) val objective = new Objective(course) def solution: (Assignment, Seq[(Move, Double)], ...
joroKr21/IoS-Algorithm
src/main/scala/assigner/search/Assigner.scala
Scala
mit
3,762
/* * Copyright 2014-2021 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
brharrington/atlas
atlas-wiki/src/main/scala/com/netflix/atlas/wiki/Main.scala
Scala
apache-2.0
11,139
package notebook.front.widgets.charts import scala.xml.{NodeSeq, UnprefixedAttribute, Null} import play.api.libs.json._ import notebook._ import notebook.front._ import notebook.JsonCodec._ import notebook.front.widgets.{Texts, Utils} import notebook.front.widgets.Utils.Defaults.DEFAULT_MAX_POINTS import notebook.fron...
andypetrella/spark-notebook
modules/common/src/main/scala/notebook/front/widgets/charts/Chart.scala
Scala
apache-2.0
8,050
package edu.umass.cs.iesl.scalacommons.layout package boxter object Commons { def head[A](a:Seq[A]) = a.head def head[A](a:List[A]) = a.head def tail[A](a:Seq[A]) = a.tail def tail[A](a:List[A]) = a.tail def csv = (s:String) => (s.split(",") map (_.trim)).toList def wsv = (s:String) => (s.split(" ") map (...
iesl/scalacommons
src-attic/layout/boxter/boxes.scala
Scala
apache-2.0
14,418
package com.toscaruntime.compiler.parser import com.toscaruntime.compiler.tosca._ import scala.util.parsing.combinator.{JavaTokenParsers, PackratParsers} trait YamlParser extends JavaTokenParsers with PackratParsers { override def skipWhitespace = false val keyPattern = regex( """\w+[^:\[\]\{\}>|\p{Blank},]*""...
vuminhkh/tosca-runtime
compiler/src/main/scala/com/toscaruntime/compiler/parser/YamlParser.scala
Scala
mit
19,476
/* * 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 ...
sh-cho/cshSpark
scheduler/BlacklistTracker.scala
Scala
apache-2.0
16,785
package chatapp.client import java.net.InetSocketAddress import akka.actor.{Actor, ActorSystem, Kill} import akka.io.Tcp._ import akka.io.{IO, Tcp} import akka.util.ByteString import chatapp.client.ClientMessage.SendMessage /** * Created by Niels Bokmans on 30-3-2016. */ class ClientActor(address: InetSocketAddr...
nielsje41/7l7wScala
chatapp/client/ClientActor.scala
Scala
mit
944