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 (C) 2015 Cotiviti Labs (nexgen.admin@cotiviti.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 req...
uzh/triplerush
src/test/scala/com/signalcollect/triplerush/loading/ParsingErrorSpec.scala
Scala
apache-2.0
1,381
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/RenderingGrid.scala
Scala
apache-2.0
9,414
import scala.quoted.* inline def transform(using dummyImplicit: DummyImplicit): Unit = ${ transformImpl } // error def transformImpl(using dummyImplicit: DummyImplicit)(using Quotes): Expr[Unit] = ???
dotty-staging/dotty
tests/neg-macros/i7839.scala
Scala
apache-2.0
205
package chandu0101.scalajs.react.components.demo.components.reactpopover import chandu0101.scalajs.react.components.demo.components.CodeExample import chandu0101.scalajs.react.components.demo.components.demo.LocalDemoButton import chandu0101.scalajs.react.components.popovers.ReactPopOver import japgolly.scalajs.react....
coreyauger/scalajs-react-components
demo/src/main/scala/chandu0101/scalajs/react/components/demo/components/reactpopover/ReactPopoverDemo.scala
Scala
apache-2.0
3,376
/* * 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
cluster/src/test/scala/io/snappydata/benchmark/memsql/ConcurrentMemsql.scala
Scala
apache-2.0
3,371
/* * Copyright 2016 Miroslav Janíček * * 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...
kroepke/luna
luna-tests/src/test/scala/org/classdump/luna/test/fragments/TableLibFragments.scala
Scala
apache-2.0
36,350
package com.mindcandy.waterfall.io import java.util.concurrent.TimeUnit import akka.actor.ActorSystem import akka.util.Timeout import com.mindcandy.waterfall.RowSeparator._ import com.mindcandy.waterfall.intermediate.FileIntermediate import com.mindcandy.waterfall.{ IOConfig, IOOps, IOSource, Intermediate, Intermedia...
mindcandy/waterfall
src/main/scala/com/mindcandy/waterfall/io/HttpIO.scala
Scala
mit
3,049
/* * Copyright 2013-2016 the original author or 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 ap...
amuramatsu/Laika
core/src/main/scala/laika/io/InputProvider.scala
Scala
apache-2.0
13,026
package com.generativists package object thirdway { type RNG = scala.util.Random }
generativists/ThirdWay
src/main/scala/com/generativists/thirdway/package.scala
Scala
mit
86
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
shaoxuan-wang/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/rules/physical/stream/StreamExecSortLimitRule.scala
Scala
apache-2.0
2,654
/* * 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...
JerryYanWan/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/Cosine.scala
Scala
apache-2.0
7,666
/* * Copyright (C) 2014 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...
openmole/openmole
openmole/plugins/org.openmole.plugin.method.evolution/src/main/scala/org/openmole/plugin/method/evolution/NSGA2.scala
Scala
agpl-3.0
14,273
// Copyright (C) 2015 Fabio Petroni // Contact: http://www.fabiopetroni.com // // This file is part of CoreScript (a script to covert row file in libFM compliant format). // // CoreScript is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // t...
fabiopetroni/CORE
EvaluationManager/AnnotationTool.scala
Scala
gpl-3.0
2,059
/* * Copyright 2010-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
persistence/mongodb/src/main/scala/net/liftweb/mongodb/MongoDocument.scala
Scala
apache-2.0
6,241
package com.snapswap.telesign object EnumUseCaseCodes extends Enumeration { type UseCaseCode = Value /** * Prevent account takeover/compromise */ val ATCK = Value("ATCK") /** * Prevent bulk account creation and fraud */ val BACF = Value("BACF") /** * Prevent bulk account creation and sp...
snap-swap/telesign-api-client
src/main/scala/com/snapswap/telesign/EnumUseCaseCodes.scala
Scala
mit
1,168
/* * 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 ...
nareshgundla/HiBench
sparkbench/micro/src/main/scala/com/intel/sparkbench/micro/ScalaSort.scala
Scala
apache-2.0
1,947
package utils.helpers import models.domain._ import controllers.mappings.Mappings._ import play.api.i18n.{MMessages, MessagesApi, Lang} import play.api.Play.current case class PastPresentLabelHelper(implicit claim: Claim, lang:Lang) object PastPresentLabelHelper { val messagesApi: MessagesApi = current.injector.in...
Department-for-Work-and-Pensions/ClaimCapture
c3/app/utils/helpers/PastPresentLabelHelper.scala
Scala
mit
2,339
package ch02 class Ex24Uncurry { def uncurry[A,B,C](f: A => B => C): (A,B) => C = (a: A, b: B) => f(a)(b) }
IrfanAnsari/fpinscala
src/main/scala/ch02/Ex24Uncurry.scala
Scala
mit
113
package com.twitter.finatra.tests.json.internal.caseclass.validation.domain import com.twitter.finatra.validation.{MethodValidation, NotEmpty, ValidationResult} case class Address( @NotEmpty street: Option[String] = None, @NotEmpty city: String, @NotEmpty state: String) { @MethodValidation def validateStat...
nkhuyu/finatra
jackson/src/test/scala/com/twitter/finatra/tests/json/internal/caseclass/validation/domain/Address.scala
Scala
apache-2.0
452
package editor.model import scala.collection.mutable._ class EditableGameObject(var name: String = "object", var parent: String = "root", var kind: String = "thing") { var article = "a" var description: String = "This object has no description." val adjectives: Set[String] = Set.empty val nouns: Set[...
gregwk/clay-pot
Game_Editor/src/editor/model/EditableGameObject.scala
Scala
mit
694
package org.jetbrains.plugins.scala package lang package psi package api package expr import com.intellij.psi.{PsiAnnotationMemberValue, PsiElement} import org.jetbrains.plugins.scala.lang.parser.ScalaElementTypes import org.jetbrains.plugins.scala.lang.psi.api.base.ScConstructor import org.jetbrains.plugins.scala.lan...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/api/expr/ScAnnotationExpr.scala
Scala
apache-2.0
1,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"); yo...
richhaase/kafka
core/src/test/scala/unit/kafka/server/epoch/LeaderEpochIntegrationTest.scala
Scala
apache-2.0
11,510
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-arrow/geomesa-arrow-gt/src/test/scala/org/locationtech/geomesa/arrow/io/DictionaryBuildingWriterTest.scala
Scala
apache-2.0
2,148
package cromwell import java.nio.file.{Files, Paths} import java.util.UUID import akka.testkit._ import wdl4s.NamespaceWithWorkflow import wdl4s.expression.NoFunctions import wdl4s.types.{WdlArrayType, WdlFileType, WdlStringType} import wdl4s.values.{WdlArray, WdlFile, WdlInteger, WdlString} import cromwell.util.Samp...
dgtester/cromwell
src/test/scala/cromwell/ArrayWorkflowSpec.scala
Scala
bsd-3-clause
2,829
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
pronix/spark
sql/core/src/main/scala/org/apache/spark/sql/columnar/NullableColumnAccessor.scala
Scala
apache-2.0
1,995
package com.robin.kafka /** * Created by robinmac on 15-7-20. */ object CreatingTopicScript extends App { val baseString="/usr/lib/kafka_2.11-0.8.2.1/bin/kafka-topics.sh --zookeeper 10.20.73.186:2181,10.20.73.187:2181,10.20.73.188:2181,10.20.73.189:2181,10.20.73.190:2181 --create --partitions 1 --replication-fac...
mengyou0304/scala_simple_work
src/main/scala/com/robin/kafka/CreatingTopic.scala
Scala
apache-2.0
395
/* * The MIT License (MIT) * * Copyright (c) 2014 Ryan C. Brozo * * 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...
ryanbrozo/spray-hawk
lib/src/main/scala/com/ryanbrozo/spray/hawk/HawkAuthenticator.scala
Scala
mit
11,437
package blended.akka object BlendedAkkaConstants { val osgiFacadePath = "OSGI" val configLocatorPath = "ConfigLocator" }
lefou/blended
blended.akka/src/main/scala/blended/akka/BlendedAkkaConstants.scala
Scala
apache-2.0
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 ...
kl0u/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/stream/sql/join/TemporalFunctionJoinTest.scala
Scala
apache-2.0
4,979
package org.scalawiki.query import org.scalawiki.dto.Page import org.scalawiki.dto.cmd.Action import org.scalawiki.dto.cmd.query.prop.{CategoryInfo, Prop} import org.scalawiki.dto.cmd.query.{Query, TitlesParam} import org.scalawiki.util.{HttpStub, MockBotSpec} import org.specs2.mutable.Specification import spray.util....
intracer/scalawiki
scalawiki-core/src/test/scala/org/scalawiki/query/ListCategoryMembersSpec.scala
Scala
apache-2.0
4,249
package skutek.abstraction.internals.aux import scala.annotation.implicitNotFound import skutek.abstraction.!! @implicitNotFound(msg = "Can't safely apply the partial handler, because some of computation's effects would leak. "+ "It is required that caller manually computes set difference between computation's ef...
marcinzh/skutek
modules/core/src/main/scala/skutek/abstraction/internals/aux/CanHandle.scala
Scala
mit
1,146
package databench.runner import java.io.FileWriter import java.io.File import java.text.SimpleDateFormat import java.util.Date import java.io.PrintWriter import databench.task.Generator trait Reporter { def report(turn: TurnSummary): TurnSummary } class CSVReporter(val tasksGenerators: Seq[Generator]) extends Re...
databench/databench
databench-runner/src/main/scala/databench/runner/Reporter.scala
Scala
lgpl-2.1
2,333
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.core import org.ensime.api._ import org.slf4j.LoggerFactory import scala.collection.mutable.ListBuffer class ImplicitAnalyzer(val global: RichPresentationCompiler) { ...
ensime/ensime-server
core/src/main/scala/org/ensime/core/ImplicitAnalyzer.scala
Scala
gpl-3.0
2,160
/* sbt -- Simple Build Tool * Copyright 2008, 2009, 2010 Mark Harrah */ package sbt import java.io.File import scala.xml.NodeSeq final class IvyPaths(val baseDirectory: File, val ivyHome: Option[File]) { def withBase(newBaseDirectory: File) = new IvyPaths(newBaseDirectory, ivyHome) } sealed trait IvyConfiguration...
kuochaoyi/xsbt
ivy/IvyConfigurations.scala
Scala
bsd-3-clause
4,449
package com.twitter.finagle.http2 import com.twitter.finagle import com.twitter.finagle.http.{AbstractHttp1EndToEndTest, Request, Response} import com.twitter.finagle.Service import com.twitter.util.Future import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner /** * This is really a HTTP/1.x test sui...
spockz/finagle
finagle-http2/src/test/scala/com/twitter/finagle/http2/ClientFailUpgradeTest.scala
Scala
apache-2.0
1,114
package com.github.jlprat.ninetynine.p02 /** * Created by @jlprat on 29/02/2016. * * P02: Find the penultimate element of a list (last but one) * Difficulty: * */ object P02 { /** * This function should return the penultimate element of a list * @param list the list we want to retrieve the element...
jlprat/99-scala-problems
src/main/scala/com/github/jlprat/ninetynine/p02/P02.scala
Scala
apache-2.0
1,330
package com.spike.giantdataanalysis.spark.example.mllib /** * <pre> * CoordinateMatrix的示例 * * 在sbt shell中运行:run vector.DistributedCoordinateMatrixExample * * @author zhoujiagen */ object DistributedCoordinateMatrixExample extends App { // 获取Spark上下文 import org.apache.spark.SparkConf import org.apache.spa...
zhoujiagen/giant-data-analysis
data-management-infrastructure/scala-infrastructure-apache-spark/src/main/scala/com/spike/giantdataanalysis/spark/example/mllib/DistributedCoordinateMatrixExample.scala
Scala
mit
1,306
package edu.indiana.ise.spidal.pca import org.apache.spark.{SparkConf, SparkContext} import org.apache.spark.mllib.feature.PCA import org.apache.spark.mllib.linalg.Vectors import org.apache.spark.mllib.regression.{LabeledPoint, LinearRegressionWithSGD} /** * Created by vibhatha on 7/16/17. */ object DemoPCA { de...
vibhatha/Spark
SparkMlibBenchmark/src/main/scala/edu/indiana/ise/spidal/pca/DemoPCA.scala
Scala
mit
1,199
/* * Copyright 2015 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
keithhall/ct-calculations
src/main/scala/uk/gov/hmrc/ct/computations/calculations/NonTradeIncomeCalculator.scala
Scala
apache-2.0
1,091
package org.gark87.yajom.base import org.gark87.yajom.annotations.{ReturnOnNull, PredicateToFactory} import scala.reflect.ClassTag class YajomCollection[T <: java.lang.Object](val source: java.util.Collection[T]) { def any[A <: T : ClassTag](): T = { val it = source.iterator() if (it.hasNext) it.next...
gark87/yajom
yajom-macros/src/main/scala/org/gark87/yajom/base/YajomCollection.scala
Scala
mit
1,440
package synereo.client.handlers import diode.{ActionHandler, ActionResult, ModelRW} import synereo.client.logger import synereo.client.rootmodels.AppRootModel /** * Created by bhagyashree.b on 2016-07-28. */ case class ShowServerError(getError: String) case class ToggleImageUploadModal() case c...
LivelyGig/ProductWebUI
sclient/src/main/scala/synereo/client/Handlers/AppHandler.scala
Scala
apache-2.0
2,143
package com.coiney.play.json.extras import org.joda.time.DateTime import org.scalatest.{Matchers, WordSpecLike} import play.api.libs.json._ class JodaTimeSpec extends WordSpecLike with Matchers { import JodaTime._ val testMap: Map[Long, String] = Map( 397100000000L -> "1982-08-02T01:33:20...
Coiney/play-json-extras
src/test/scala/com/coiney/play/json/extras/JodaTimeSpec.scala
Scala
bsd-3-clause
2,136
package fpinscala.datastructures import org.scalatest.prop.TableDrivenPropertyChecks._ import org.scalatest.{FeatureSpec, Matchers} /** * Created by michal on 2/15/15. */ class TreeTest extends FeatureSpec with Matchers { feature ("The size function"){ import fpinscala.datastructures.Tree._ val datase...
mkunikow/fpinscala
exercises/src/test/scala/fpinscala/datastructures/TreeTest.scala
Scala
mit
3,316
package com.dt.scala.oop /** * Author: Wang Jialin * Contact Information: * WeChat: 18610086859 * QQ: 1740415547 * Email: 18610086859@126.com * Tel: 18610086859 */ class AbstractClassOps{ var id : Int = _ } abstract class SuperTeacher(val name : String){ var id : Int var age : Int d...
slieer/scala-tutorials
src/main/scala/com/dt/scala/oop/AbstractClassOps.scala
Scala
apache-2.0
764
/* XStreamUtils.scala Copyright 2011 Tommy Skodje (http://www.antares.no) 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 re...
2my/test-data-control
src/main/scala/no/antares/xstream/XStreamUtils.scala
Scala
apache-2.0
2,620
/* cowjac © 2012 David Given * This file is licensed under the Simplified BSD license. Please see * COPYING.cowjac for the full text. */ package com.cowlark.cowjac import scala.collection.JavaConversions.asScalaBuffer import scala.collection.JavaConversions.collectionAsScalaIterable import scala.collection.immutabl...
davidgiven/cowjac
compiler/src/com/cowlark/cowjac/Translator.scala
Scala
bsd-2-clause
34,961
/* * Copyright 2014-2022 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...
Netflix/atlas
atlas-chart/src/main/scala/com/netflix/atlas/chart/util/PngImage.scala
Scala
apache-2.0
7,957
package net.ruippeixotog.structs class BinomialQueueSpec extends PriorityQueueSpec[BinomialQueue] { def queueName = "binomial queue" }
ruippeixotog/functional-brodal-queues
src/test/scala/net/ruippeixotog/structs/BinomialQueueSpec.scala
Scala
mit
137
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
liquidarmour/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600a/v3/A75.scala
Scala
apache-2.0
1,371
package com.datastax.spark.connector.util import java.io.IOException import com.datastax.driver.core.{PreparedStatement, Session} import com.datastax.spark.connector.cql.{ColumnDef, TableDef} import com.datastax.spark.connector.util.Quote._ import scala.collection.Seq object PatitionKeyTools { /** * This quer...
maasg/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/util/PatitionKeyTools.scala
Scala
apache-2.0
1,404
import akka.actor._ import btc.common.UserManagerMessages.LookupUser import btc.common.WebSocketHandlerMessages.InitActorResponse import scala.concurrent.duration.FiniteDuration object UsersManager { def props(broadcaster: ActorRef, keepAliveTimeout: FiniteDuration) = Props(new UsersManager(broadcaster, keepAliveTim...
ldrygala/reactive-microservices
btc-users/src/main/scala/UsersManager.scala
Scala
mit
858
/** * 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...
Jashchahal/incubator-eagle
eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/IteratorStreamSpout.scala
Scala
apache-2.0
2,463
/* * 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...
Myllyenko/incubator-toree
communication/src/main/scala/org/apache/toree/communication/socket/SocketType.scala
Scala
apache-2.0
1,584
/* * 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 ...
Intel-bigdata/OAP
oap-cache/oap/src/main/scala/org/apache/spark/sql/oap/adapter/InputFileNameHolderAdapter.scala
Scala
apache-2.0
1,138
package io.chymyst.test import org.scalatest.{Args, FlatSpec, Matchers, Status} class LogSpec extends FlatSpec with Matchers { protected override def runTest(testName: String, args: Args): Status = { val initTime = System.currentTimeMillis() println(s"*** Starting test ($initTime): $testName") val resu...
Chymyst/chymyst-core
core/src/test/scala/io/chymyst/test/LogSpec.scala
Scala
apache-2.0
476
package org.phenoscape.kb.matrix.reports import org.phenoscape.io.NeXMLReader import org.phenoscape.model.MultipleState import org.phenoscape.model.Association import org.phenoscape.model.AssociationSupport import org.phenoscape.model.Taxon import org.phenoscape.model.State import org.phenoscape.model.Character import...
phenoscape/ontotrace
src/main/scala/org/phenoscape/kb/matrix/reports/CountPopulatedCells.scala
Scala
mit
4,267
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package com.jspha.maia.generic import scala.language.higherKinds import io.circe._ import shapeless._ import shap...
tel/scala-maia
maia/src/main/scala-2.12/com/jspha/maia/generic/ResponseEncoder.scala
Scala
mpl-2.0
15,091
package $package$.default import sri.universal.styles.InlineStyleSheetUniversal object GlobalStyles extends InlineStyleSheetUniversal { import dsl._ val wholeContainer = style(flex := 1, padding := 20) val defaultHeader = style(backgroundColor := "#E91E63") val defaultCardStyle = style(backgroundColor := ...
scalajs-react-interface/mobile.g8
src/main/g8/src/main/scala/$package$/default/GlobalStyles.scala
Scala
apache-2.0
345
import sbt._ import Keys._ import org.scalatra.sbt._ import com.typesafe.sbteclipse.plugin.EclipsePlugin.EclipseKeys import play.twirl.sbt.SbtTwirl import play.twirl.sbt.Import.TwirlKeys._ import sbtassembly._ import sbtassembly.AssemblyKeys._ object MyBuild extends Build { val Organization = "gitbucket" val Name ...
beni55/gitbucket
project/build.scala
Scala
apache-2.0
3,454
class TwoParamSpecializedWithDefault[@specialized A, @specialized B](a: A, b: B = (??? : B))
AlexSikia/dotty
tests/untried/pos/t7329.scala
Scala
bsd-3-clause
93
package nlpdata.datasets import nlpdata.structure._ import nlpdata.datasets.ptb._ import nlpdata.util._ package object nombank { case class SpanIndicator(leftIndex: Int, height: Int) { def upOne = copy(height = this.height + 1) } // for now, ignoring different kinds of linking... TODO do this perhaps ca...
julianmichael/nlpdata
nlpdata/src/nlpdata/datasets/nombank/package.scala
Scala
mit
3,870
/* * 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 ...
SteamShon/incubator-s2graph
s2core/src/main/scala/org/apache/s2graph/core/features/S2GraphVariables.scala
Scala
apache-2.0
2,254
package com.sksamuel.elastic4s.analysis import org.scalatest.funsuite.AnyFunSuite import org.scalatest.matchers.should.Matchers class CustomAnalyzerBuilderTest extends AnyFunSuite with Matchers { test("custom analyzer builder with all standard options") { val a = CustomAnalyzer("my_custom_analyzer", "uaxurl", ...
stringbean/elastic4s
elastic4s-core/src/test/scala/com/sksamuel/elastic4s/analysis/CustomAnalyzerBuilderTest.scala
Scala
apache-2.0
435
/* * Copyright (c) 2013. Regents of the University of California * * 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 require...
fnothaft/adam
adam-core/src/main/scala/edu/berkeley/cs/amplab/adam/algorithms/realignmenttarget/IndelRealignmentTarget.scala
Scala
apache-2.0
15,891
object MapTest{ def main(args: Array[String]){ //构造不可变Map val scores = Map("Alice" -> 10, "Bob" -> 3, "Cindy" -> 8) println("Bob -> "+ scores("Bob")) //scores("Bob") = 20 不可修改 //构造可变Map val scores1 = scala.collection.mutable.Map("Alice" -> 10, "Bob" ...
PengLiangWang/Scala
Map/MapTest.scala
Scala
gpl-3.0
1,296
package models.generator.csv import java.io.StringWriter import io.apibuilder.generator.v0.models.{File, InvocationForm} import io.apibuilder.spec.v0.models.{Operation, Resource, Service} import lib.generator.CodeGenerator import org.apache.commons.csv.{CSVFormat, CSVPrinter} class CsvGenerator extends CodeGenerator...
mbryzek/apidoc-generator
csv-generator/src/main/scala/models/generator/csv/CsvGenerator.scala
Scala
mit
1,793
package avrohugger package format package specific package matchers import treehugger.forest._ import definitions._ import treehuggerDSL._ import org.apache.avro.Schema import org.codehaus.jackson.JsonNode import org.codehaus.jackson.map.ObjectMapper import org.codehaus.jackson.node.{NullNode, ObjectNode, TextNode} ...
ppearcy/avrohugger
avrohugger-core/src/main/scala/format/specific/matchers/DefaultValueMatcher.scala
Scala
apache-2.0
3,347
package mesosphere.marathon package state import com.wix.accord._ import com.wix.accord.dsl._ import mesosphere.marathon.api.v2.Validation._ import mesosphere.marathon.core.externalvolume.ExternalVolumes import mesosphere.marathon.core.pod.PodDefinition import org.jgrapht.DirectedGraph import org.jgrapht.alg.CycleDete...
janisz/marathon
src/main/scala/mesosphere/marathon/state/RootGroup.scala
Scala
apache-2.0
16,771
package filodb.kafka import java.lang.{Long => JLong} import scala.collection.JavaConverters._ import scala.concurrent.Future import com.typesafe.config.Config import com.typesafe.scalalogging.StrictLogging import org.apache.kafka.clients.producer.{KafkaProducer, ProducerRecord} import org.apache.kafka.clients.produ...
tuplejump/FiloDB
kafka/src/main/scala/filodb/kafka/KafkaDownsamplePublisher.scala
Scala
apache-2.0
2,252
/* MET-API Copyright (C) 2014 met.no Contact information: Norwegian Meteorological Institute Box 43 Blindern 0313 OSLO NORWAY E-mail: met-api@met.no This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as publ...
metno/metapi-observations
app/services/observations/ElementInfoGetter.scala
Scala
gpl-2.0
1,294
/* * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH * under one or more contributor license agreements. See the NOTICE file * distributed with this work for additional information regarding copyright * ownership. Camunda licenses this file to you under the Apache License, * Version 2.0; y...
camunda/feel-scala
src/main/scala/org/camunda/feel/impl/script/CompiledFeelScript.scala
Scala
apache-2.0
1,230
package dbpedia.dataparsers.util.wikiparser.impl.simple import SimpleWikiParser._ import dbpedia.dataparsers.util.{Language, UriUtils, WikiUtil} import dbpedia.dataparsers.util.wikiparser.impl.wikipedia.{Disambiguation, Redirect} import dbpedia.dataparsers.util.wikiparser._ import java.net.{URI, URISyntaxException} im...
FnOio/dbpedia-parsing-functions-scala
src/main/scala/dbpedia/dataparsers/util/wikiparser/impl/simple/SimpleWikiParser.scala
Scala
gpl-2.0
28,626
package com.wavesplatform import cats.syntax.either._ import com.wavesplatform.account.PrivateKey import com.wavesplatform.block.Block.{TransactionProof, TransactionsMerkleTree} import com.wavesplatform.common.merkle.Merkle._ import com.wavesplatform.block.validation.Validators._ import com.wavesplatform.common.state....
wavesplatform/Waves
node/src/main/scala/com/wavesplatform/block/package.scala
Scala
mit
2,686
package com.a.eye.gemini.analysis.util import java.util.Date object DateUtilTest { def main(args: Array[String]): Unit = { val partition = 0 val tcpTime = new Date().getTime val atom = new AtomTimeSlotUtil().compareSlotTime(tcpTime) println(atom) val atoms = atom.split("-") println(DateUtil...
skywalking-developer/gemini
gemini-analysis/src/test/scala/com/a/eye/gemini/analysis/util/DateUtilTest.scala
Scala
apache-2.0
1,316
package tethys.derivation.impl import scala.reflect.macros.blackbox /** * Created by eld0727 on 23.04.17. */ trait LoggingUtils { val c: blackbox.Context def info(msg: => String, force: Boolean = false): Unit = c.info(c.enclosingPosition, msg, force) def warn(msg: String): Unit = c.warning(c.enclosingPosit...
tethys-json/tethys
modules/macro-derivation/src/main/scala/tethys/derivation/impl/LoggingUtils.scala
Scala
apache-2.0
469
package fpinscala.laziness trait Stream[+A] { def toList :List[A] = this match { case Empty => Nil case Cons(h, t) => h() :: t().toList } def foldRight[B](z: => B)(f: (A, => B) => B): B = // The arrow `=>` in front of the argument type `B` means that the function `f` takes its second argument by name an...
karolchmist/fpinscala
exercises/src/main/scala/fpinscala/laziness/Stream.scala
Scala
mit
4,980
package immortan.utils import fr.acinq.bitcoin.Crypto.PublicKey import fr.acinq.bitcoin.{BtcAmount, Satoshi, SatoshiLong} import fr.acinq.eclair._ import fr.acinq.eclair.payment.PaymentRequest import fr.acinq.eclair.router.Graph.GraphStructure import fr.acinq.eclair.router.RouteCalculation import fr.acinq.eclair.wire....
btcontract/wallet
app/src/main/java/immortan/utils/InputParser.scala
Scala
apache-2.0
6,025
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * ...
adarro/ddo-calc
subprojects/common/ddo-util/src/main/scala/io/truthencode/ddo/support/matching/LowerCaseStrategy.scala
Scala
apache-2.0
897
package com.twitter.finagle.builder /* * Provides a class for specifying a collection of servers. * e.g. `finagle-serversets` is an implementation of the Finagle Cluster interface using * [[com.twitter.com.zookeeper.ServerSets] ( * http://twitter.github.com/commons/apidocs/#com.twitter.common.zookeeper.ServerSet), ...
enachb/finagle_2.9_durgh
finagle-core/src/main/scala/com/twitter/finagle/builder/Cluster.scala
Scala
apache-2.0
1,644
package io.udash.auth trait UserCtx { def has(permission: Permission): Boolean def isAuthenticated: Boolean } object UserCtx { trait Unauthenticated extends UserCtx { override def has(permission: Permission): Boolean = false override def isAuthenticated: Boolean = false } }
UdashFramework/udash-core
auth/src/main/scala/io/udash/auth/UserCtx.scala
Scala
apache-2.0
292
/* * @author Philip Stutz * @author Mihaela Verman * * Copyright 2013 University of Zurich * * 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.apa...
jacqueslk/triplerush-filter
src/main/scala/com/signalcollect/triplerush/vertices/OptimizedIndexVertex.scala
Scala
apache-2.0
3,690
package {{package}} import com.twitter.finagle.{Service, Thrift} import com.twitter.finagle.stats.{NullStatsReceiver, StatsReceiver} import com.twitter.scrooge.{ThriftStruct, TReusableMemoryTransport} import com.twitter.util.Future import java.nio.ByteBuffer import java.util.Arrays import org.apache.thrift.protocol._ ...
nkhuyu/scrooge
scrooge-generator/src/main/resources/scalagen/finagleService.scala
Scala
apache-2.0
3,965
import com.twitter.logging.LoggerFactory import com.twitter.logging.config._ import com.twitter.parrot.config.ParrotServerConfig import com.twitter.parrot.server.ParrotRequest new ParrotServerConfig[ParrotRequest, Unit] { // DIFFERENCES replayTimeCheck = true thinkTime = 500 com.twitter.parrot.util.ConsoleHan...
twitter/iago
config/test-slow.scala
Scala
apache-2.0
552
package cache import cache.CacheSchema.{TableNames, Tables} import cache.models.CachedPullRequestPair import git._ import scala.slick.driver.SQLiteDriver.simple._ import scala.slick.jdbc.meta.MTable /** * An info getter implementation for the JGit library. * @param provider The JGit provider. */ class CachePairwi...
PRioritizer/PRioritizer-analyzer
src/main/scala/cache/CachePairwiseDecorator.scala
Scala
mit
1,677
package core class Zone[A] { private[this] val buffer = new collection.mutable.ArrayBuffer[A] def transferToEnd(fromIndex: Int, to: Zone[A]): A = { val elem = buffer.remove(fromIndex) to.append(elem) elem } def transferMultiToEnd(fromIndexes: Vector[Int], to: Zone[A]): Vector[A] = { val elems...
whence/powerlife
scala/powercards_statemachine/core/Zone.scala
Scala
mit
970
/* * 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 ...
Aegeaner/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/ScriptTransformationSuite.scala
Scala
apache-2.0
7,386
/* * 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-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala
Scala
apache-2.0
6,893
package memnets.fx.fx3d import scalafx.scene.paint._ trait Phong { self: scalafx.scene.shape.Shape3D => val phong: PhongMaterial = new PhongMaterial { specularColor = Color.web("#bbb") specularPower = 60 } material = phong }
MemoryNetworks/memnets
fx/src/main/scala/memnets/fx/fx3d/Phong.scala
Scala
apache-2.0
241
package org.eigengo.mirror import akka.actor.ActorRefFactory import spray.routing.{Route, Directives} object StaticService extends Directives { def route(implicit arf: ActorRefFactory): Route = { getFromResourceDirectory("") } }
eigengo/activator-mirror
src/main/scala/org/eigengo/mirror/StaticService.scala
Scala
apache-2.0
241
package models.tosca import scalaz._ import Scalaz._ import scalaz.effect.IO import scalaz.Validation import scalaz.Validation.FlatMap._ import scalaz.NonEmptyList._ import scalaz.syntax.SemigroupOps import cache._ import db._ import models.tosca._ import models.json.tosca._ import models.Constants._ import io.megam....
indykish/verticegateway
app/models/tosca/Sensors.scala
Scala
mit
7,770
/** * Copyright 2017 Interel * * 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 t...
Interel-Group/core3
src/test/scala/core3/test/specs/prop/PropertySpec.scala
Scala
apache-2.0
833
/* * 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 ...
shaneknapp/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVFileFormat.scala
Scala
apache-2.0
5,893
/* * Copyright 2015 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
liquidarmour/play-health
app/uk/gov/hmrc/play/health/Manifest.scala
Scala
apache-2.0
1,390
package jmh import org.openjdk.jmh.annotations._ import org.openjdk.jmh.infra._ import scala.offheap._ @State(Scope.Thread) class RegionClose { implicit val props = Region.Props(Pool()) var r: Region = _ @Param(scala.Array("1024", "2048", "4096")) var allocatedPages: Int = _ @Setup(Level.Invocation) def...
arosenberger/scala-offheap
jmh/src/main/scala/Region.scala
Scala
bsd-3-clause
1,350
package maker.utils import java.text.SimpleDateFormat import java.util.Date case class Stopwatch( startTime : Long = System.nanoTime, name : String = "", private var snapshots_ : Map[Any, Long] = Map() ){ private val START = "START" private val END = "END" def takeSnapshot(key : Any) = {snapshots_ = sna...
cage433/maker
maker/src/maker/utils/Stopwatch.scala
Scala
bsd-2-clause
2,225
/* * 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/test/scala/io/snappydata/core/LocalTestData.scala
Scala
apache-2.0
2,488
package system.helpers import java.util.UUID import _root_.play.api.libs.json.Reads._ import _root_.play.api.libs.json._ import models.Helpers.Columns import slick.driver.MySQLDriver.api._ /** * Represents a specific, identifiable application resource. */ trait Resource { /** * All resources must have a u...
Xanho/xanho-api
app/system/helpers/Resource.scala
Scala
apache-2.0
12,173
package amora.backend.schema import java.net.URLEncoder import amora.converter.protocol._ object Schema { def mkShortId(s: Schema): String = s match { case Project(name) ⇒ name case Artifact(owner, organization, name, version) ⇒ s"${mkShortId(owner)}/$organization/$name/$version" case File...
sschaef/tooling-research
converter/protocol/src/main/scala/amora/backend/schema/Schema.scala
Scala
mit
25,772
/* * 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 ...
ron8hu/spark
core/src/main/scala/org/apache/spark/ui/jobs/AllStagesPage.scala
Scala
apache-2.0
5,379
package colang.ast.raw.expression import colang.ast.raw.ParserImpl import colang.{MappedStrategy, SourceCode} /** * Represents a function call expression. * @param function function to call * @param arguments function arguments */ case class FunctionCall(function: Expression, arguments: ArgumentList) extends ...
merkispavel/colang
src/main/scala/colang/ast/raw/expression/FunctionCall.scala
Scala
mit
694