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 dk.aau.sw404f16.syntax.lexer /** * Created by coffee on 28/03/16. */ // all value names are suffixed with "Tok" to avoid possible clashing with built-in keywords object Regexp { // with capture group (regexp with output) val atomTok = """#([A-Za-z_][\w'-]*)""".r // triple-quote ignores escapes an...
ElectricCoffee/quantum-lang
src/main/scala/dk/aau/sw404f16/syntax/lexer/Regexp.scala
Scala
bsd-3-clause
1,553
/* * Copyright 2001-2014 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...
scalatest/scalatest
jvm/featurespec/src/main/scala/org/scalatest/featurespec/AsyncFeatureSpec.scala
Scala
apache-2.0
100,618
package slick.jdbc import scala.collection.mutable.ListBuffer import scala.reflect.ClassTag import scala.reflect.macros.blackbox.Context /** AST builder used by the SQL interpolation macros. */ private[jdbc] class MacroTreeBuilder[C <: Context](val c: C)(paramsList: List[C#Expr[Any]]) { import c.universe._ def ...
nafg/slick
slick/src/main/scala/slick/jdbc/MacroTreeBuilder.scala
Scala
bsd-2-clause
8,168
package scuff.concurrent import scuff._ import java.util.concurrent._ import scala.concurrent.ExecutionContextExecutorService private[concurrent] final class SingleThreadExecutor( threadFactory: ThreadFactory, queue: BlockingQueue[Runnable], failureReporter: Option[Throwable => Unit], rejectionHandler: Rejec...
nilskp/scuff
src/main/scala/scuff/concurrent/SingleThreadExecutor.scala
Scala
mit
651
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
gioenn/xSpark
mllib/src/main/scala/org/apache/spark/ml/regression/AFTSurvivalRegression.scala
Scala
apache-2.0
21,741
package com.danielasfregola.twitter4s.entities final case class ExtendedTweet(full_text: String, display_text_range: Seq[Int] = Seq.empty, entities: Option[Entities] = None, extended_entities: Option[Entities] = None)
DanielaSfregola/twitter4s
src/main/scala/com/danielasfregola/twitter4s/entities/ExtendedTweet.scala
Scala
apache-2.0
312
package io.getquill.codegen import io.getquill.codegen.integration.CodegenTestCases._ import io.getquill.codegen.util.ConfigPrefix.TestMysqlDB import io.getquill.codegen.util._ import org.scalatest.matchers.should.Matchers._ class MysqlCodegenTestCases extends CodegenSpec { import io.getquill.codegen.generated.mysq...
getquill/quill
quill-codegen-tests/src/test/scala/io/getquill/codegen/MysqlCodegenTestCases.scala
Scala
apache-2.0
3,912
/* * Copyright ASCII Soup (Nils Luxton) (c) 2016. * * GNU GPL v3 - See LICENSE.txt for details */ package com.asciisoup.advent.DayOne import scala.io.Source object Puzzle extends App { val input = Source.fromInputStream(getClass.getResourceAsStream("/day_one.txt")) val instructions = Instructions(input.mkStr...
ascii-soup/AdventOfCode2016
src/main/scala/com/asciisoup/advent/DayOne/Puzzle.scala
Scala
gpl-3.0
500
package uk.ac.ncl.openlab.intake24.sql.tools.food.nutrients import uk.ac.ncl.openlab.intake24.nutrientsndns.{CsvNutrientTableMapping} object AusnutImport extends CsvNutrientTableImport("AUSNUT", "AUSNUT 2011-13 food nutrient database", CsvNutrientTableMapping(1, 0, 2, None, AusnutMapping.map))
digitalinteraction/intake24
DatabaseTools/src/main/scala/uk/ac/ncl/openlab/intake24/sql/tools/food/nutrients/AusnutImport.scala
Scala
apache-2.0
296
/* * 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 ...
jackylk/incubator-carbondata
integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/joins/BroadCastSIFilterPushJoin.scala
Scala
apache-2.0
22,377
/* * File Config.scala is part of JsonRecipes. * JsonRecipes is opensource Minecraft mod(released under LGPLv3), created by anti344. * Full licence information can be found in LICENCE and LICENCE.LESSER files in jar-file of the mod. * Copyright © 2014, anti344 */ package net.anti344.jsonrecipes.config import cpw...
mc-anti344/JsonRecipes
src/main/scala/net/anti344/jsonrecipes/config/Config.scala
Scala
gpl-3.0
1,553
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.testsuite.scalalib import...
scala-js/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/scalalib/ArrayTest.scala
Scala
apache-2.0
595
/******************************************************************************* * Copyright 2010 Maxime Lévesque * * 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://ww...
squeryl/squeryl
src/main/scala/org/squeryl/logging/StatisticsListener.scala
Scala
apache-2.0
1,710
package dpla.ingestion3.mappers.providers import dpla.ingestion3.mappers.utils.Document import dpla.ingestion3.messages.{IngestMessage, MessageCollector} import dpla.ingestion3.model._ import dpla.ingestion3.utils.FlatFileIO import org.scalatest.{BeforeAndAfter, FlatSpec} import scala.xml.{NodeSeq, XML} class Michig...
dpla/ingestion3
src/test/scala/dpla/ingestion3/mappers/providers/MichiganMappingTest.scala
Scala
mit
12,216
package org.jetbrains.plugins.scala.lang.types.existentialSimplification.generated import org.jetbrains.plugins.scala.lang.types.existentialSimplification.ExistentialSimplificationTestBase class ExistentialSimplificationAllRulesTest extends ExistentialSimplificationTestBase { override def folderPath: String = super...
jastice/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/types/existentialSimplification/generated/ExistentialSimplificationAllRulesTest.scala
Scala
apache-2.0
380
/* * 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...
wzhongyuan/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/ops/DepthwiseConv2D.scala
Scala
apache-2.0
6,251
/* ************************************************************************************* * Copyright 2014 Normation SAS ************************************************************************************* * * This file is part of Rudder. * * Rudder is free software: you can redistribute it and/or modify * it under the...
armeniaca/rudder
rudder-core/src/test/scala/com/normation/rudder/services/policies/TestComputeSchedule.scala
Scala
gpl-3.0
4,068
package org.helgoboss.domino.configuration_watching import org.helgoboss.capsule.CapsuleContext import org.osgi.framework.{ServiceRegistration, BundleContext} import org.helgoboss.scala_osgi_metatype.interfaces.{ObjectClassDefinition, MetaTypeProvider} import org.helgoboss.scala_osgi_metatype.builders.SingleMetaTypePr...
lefou/domino
src/main/scala/org/helgoboss/domino/configuration_watching/ConfigurationWatching.scala
Scala
mit
4,648
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
colinrgodsey/scala-js
test-suite/src/test/scala/org/scalajs/testsuite/jsinterop/ThisFunctionTest.scala
Scala
bsd-3-clause
2,728
/* * Licensed to Cloudera, Inc. under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Cloudera, Inc. licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use thi...
hdinsight/hue
apps/spark/java/livy-server/src/test/scala/com/cloudera/hue/livy/server/interactive/BaseSessionSpec.scala
Scala
apache-2.0
3,390
package org.powlab.jeye.decode import org.powlab.jeye.core._ import scala.collection.mutable import org.powlab.jeye.decode.graph.OpcodeTree import org.powlab.jeye.decode.graph.OpcodeNode /** * Namer отвечает за наименование локальных переменных. * Принцип - название типа + индекс переменной(например boolean0, boole...
powlab/jeye
src/main/scala/org/powlab/jeye/decode/Namer.scala
Scala
apache-2.0
1,984
package com.faacets.yamlson import argonaut._, Argonaut._ class ParseTests extends YamlsonSuite { test("Positive max-int") { val yaml = "num: 2147483647" Yamlson.parse(yaml) shouldBe jObjectFields(List("num" -> jNumber(BigDecimal("2147483647"))):_*) } test("Object with numbers") { val yaml = """--...
denisrosset/yamlson
src/test/scala/com.faacets.yamlson/ParseTests.scala
Scala
mit
2,035
/** * Copyright (C) 2015 DANS - Data Archiving and Networked Services (info@dans.knaw.nl) * * 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...
DANS-KNAW/easy-pid-generator
src/test/scala/nl/knaw/dans/easy/pid/PidGeneratorAppSpec.scala
Scala
apache-2.0
6,520
/** * 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...
pkuwm/incubator-eagle
eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormFlatMapperWrapper.scala
Scala
apache-2.0
1,712
package presentation._3 import com.twitter.finagle.http.Method.Get import com.twitter.finagle.http.filter.Cors import com.twitter.finagle.http.filter.Cors.HttpFilter import com.twitter.finagle.http.path.Root import com.twitter.finagle.http.{Request, Response} import com.twitter.finagle.{Http, Service} import io.fintro...
daviddenton/fintrospect
src/test/scala/presentation/_3/SearchApp.scala
Scala
apache-2.0
1,546
/* * 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 ...
hhbyyh/spark
core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala
Scala
apache-2.0
34,463
package com.twitter.finagle.service import com.twitter.finagle._ import com.twitter.finagle.context.Contexts import com.twitter.finagle.client.LatencyCompensation import com.twitter.finagle.tracing.Trace import com.twitter.util.{Future, Duration, Timer, Time} object TimeoutFilter { val TimeoutAnnotation = "finagle....
cogitate/twitter-finagle-uuid
finagle-core/src/main/scala/com/twitter/finagle/service/TimeoutFilter.scala
Scala
apache-2.0
3,844
/** * Copyright 2015, deepsense.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 applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
deeplang/src/test/scala/io/deepsense/deeplang/doperations/EstimatorAsOperationSpec.scala
Scala
apache-2.0
3,792
package mesosphere.marathon.api import java.util.Collections import javax.servlet.http.{ HttpServletRequest, HttpServletResponse } import mesosphere.marathon.plugin.PathId import mesosphere.marathon.plugin.auth.{ Identity, Authorizer, Authenticator, AuthorizedAction } import mesosphere.marathon.plugin.http.{ HttpRequ...
matsluni/marathon
src/test/scala/mesosphere/marathon/api/TestAuthFixture.scala
Scala
apache-2.0
1,800
package parsers import java.time.format.DateTimeFormatter import java.time.{LocalDate, LocalTime, ZonedDateTime} import cats.syntax.either._ import io.circe._ import io.circe.generic.auto._ import io.circe.parser._ import io.circe.syntax._ import play.api.mvc._ import uk.ac.ncl.openlab.intake24.api.data.ErrorDescript...
digitalinteraction/intake24
ApiPlayServer/app/parsers/JsonUtils.scala
Scala
apache-2.0
3,576
package net.cucumbersome.rpgRoller.warhammer.player.actions import cats.data.Validated.{Invalid, Valid} import net.cucumbersome.rpgRoller.warhammer.infrastructure.repositories.ActorRepository import net.cucumbersome.rpgRoller.warhammer.player.CombatActorValidator.validate import net.cucumbersome.rpgRoller.warhammer.pl...
CucumisSativus/rpgRollerBackend
src/main/scala/net/cucumbersome/rpgRoller/warhammer/player/actions/CreateActor.scala
Scala
mit
876
package sttp.client3.examples import sttp.client3._ import sttp.client3.circe._ import sttp.client3.asynchttpclient.zio._ import io.circe.generic.auto._ import zio._ import zio.Console object GetAndParseJsonZioCirce extends ZIOAppDefault { override def run: ZIO[ZEnv, Nothing, ExitCode] = { case class HttpBinR...
softwaremill/sttp
examples/src/main/scala/sttp/client3/examples/GetAndParseJsonZioCirce.scala
Scala
apache-2.0
1,078
package org.scalawebtest.integration.browser import org.scalawebtest.integration.ScalaWebTestBaseSpec import org.scalawebtest.integration.browser.behaviors.BrowserBehaviors class HtmlUnitSpec extends ScalaWebTestBaseSpec with BrowserBehaviors { config.useBaseUri("http://localhost:9090") config.enableJavaScript(t...
unic/ScalaWebTest
scalawebtest-integration/src/it/scala/org/scalawebtest/integration/browser/HtmlUnitSpec.scala
Scala
apache-2.0
679
import _root_.io.gatling.core.scenario.Simulation import ch.qos.logback.classic.{Level, LoggerContext} import io.gatling.core.Predef._ import io.gatling.http.Predef._ import org.slf4j.LoggerFactory import scala.concurrent.duration._ /** * Performance test for the Event entity. */ class EventGatlingTest extends Simu...
JuanLSanchez/Chefs
project/src/test/gatling/simulations/EventGatlingTest.scala
Scala
gpl-2.0
3,326
package com.trafficland.augmentsbt.releasemanagement import sbt.{Setting, SettingKey} object FinalReleaseTasks { lazy val releasePublishLibFinalSettingKey: SettingKey[Seq[String]] = SettingKey[Seq[String]] ( "release-publish-lib-final-tasks", "a list of tasks to execute (in order) for publishing a library'...
ereichert/augment-sbt
src/main/scala/com/trafficland/augmentsbt/releasemanagement/FinalReleaseTasks.scala
Scala
apache-2.0
1,323
package gdg.blaze.ext import com.google.common.base.Charsets import com.google.common.io.Resources import gdg.blaze._ import org.testng.annotations.Test class TestGrokFilter { @Test def test: Unit = { val log = "112.169.19.192 - - [06/Mar/2013:01:36:30 +0900] \\"GET / HTTP/1.1\\" 200 44346 \\"-\\" \\"Mozilla...
micahrupersburg/blaze-of-glory
src/test/scala/gdg/blaze/ext/TestGrokFilter.scala
Scala
apache-2.0
712
package assigner.service import akka.actor.ActorSystem import akka.io.IO import akka.pattern.ask import akka.util.Timeout import assigner._ import assigner.model._ import assigner.search._ import assigner.search.moves._ import org.json4s.{Formats, DefaultFormats} import org.json4s.jackson.Serialization._ import sca...
joroKr21/IoS-Algorithm
src/main/scala/assigner/service/SprayService.scala
Scala
mit
9,544
package xyz.hyperreal.pattern_matcher import scala.collection.mutable.ArrayBuffer import xyz.hyperreal.dllist.DLList object Main extends App with Matchers[Reader] { //reserved += () //delimiters += () def input = matchall(singleStringLit) val s = """ |'asdf' """.stripMargin input( Reader....
edadma/matcher
src/test/scala/Main.scala
Scala
isc
1,847
package com.eevolution.context.dictionary.domain.model import ai.x.play.json.Jsonx import com.eevolution.context.dictionary.api.{ActiveEnabled, DomainModel, Identifiable, Traceable} import org.joda.time.DateTime /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This program...
adempiere/ADReactiveSystem
dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/model/FieldGroup.scala
Scala
gpl-3.0
3,240
package com.socrata.datacoordinator.util import scala.{collection => sc} import scala.util.matching.Regex /** Simple string interpolation. This replaces variables of the form %VARIABLE_NAME% * with other strings provided. */ object TemplateReplacer extends ((String, sc.Map[String, String]) => String) { def apply...
socrata-platform/data-coordinator
coordinatorlib/src/main/scala/com/socrata/datacoordinator/util/TemplateReplacer.scala
Scala
apache-2.0
711
package io.github.pauljamescleary.petstore.config import cats.effect.{Async, Sync} import doobie.hikari.HikariTransactor import org.flywaydb.core.Flyway case class DatabaseConfig(url: String, driver: String, user: String, password: String) object DatabaseConfig { def dbTransactor[F[_]: Async](dbConfig: DatabaseCo...
jastice/intellij-scala
scala/scala-impl/testdata/localProjects/scala-pet-store/src/main/scala/io/github/pauljamescleary/petstore/config/DatabaseConfig.scala
Scala
apache-2.0
959
/* * 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/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/DateExpressionsSuite.scala
Scala
apache-2.0
30,316
/* * Copyright 2020 Google 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 appli...
GoogleCloudDataproc/spark-bigquery-connector
spark-bigquery-dsv1/src/main/scala/com/google/cloud/spark/bigquery/BigQueryStreamWriter.scala
Scala
apache-2.0
3,458
/* * Copyright 2015 Avira Operations GmbH * * 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...
Avira/sparser
spark/src/main/scala/com/avira/ds/sparser/spark/ParserAccumulators.scala
Scala
apache-2.0
3,024
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/test/scala/org/neo4j/cypher/internal/compiler/v2_3/executionplan/builders/BuilderTest.scala
Scala
apache-2.0
3,812
package net.fwbrasil.radon.util import scala.collection._ object ThreadUtil { def runInNewThread(f: => Unit): Thread = { val thread = new Thread { override def run() { f } } thread.start thread } }
fwbrasil/radon-stm
src/main/scala/net/fwbrasil/radon/util/ThreadUtil.scala
Scala
lgpl-2.1
297
package example import scala.language.experimental.macros import scala.reflect.macros._ object Provider { def tree(args: Any): Any = macro treeImpl def treeImpl(c: Context)(args: c.Expr[Any]) = { import c.universe._ c.Expr[Any]( Apply( Select(Ident(TermName("Bar")), TermName("bar")), ...
som-snytt/xsbt
sbt/src/sbt-test/source-dependencies/macro-nonarg-dep/macro-provider/Provider.scala
Scala
bsd-3-clause
361
/* * 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/ShouldSameInstanceAsSpec.scala
Scala
apache-2.0
8,715
/** * Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0 * See accompanying LICENSE file. */ package models.navigation import features.{KMTopicManagerFeature, KMClusterManagerFeature, ApplicationFeatures} import kafka.manager.features.{KMLogKafkaFeature, ClusterFeatures} /** * @author hiral...
xuwei-k/kafka-manager
app/models/navigation/Menus.scala
Scala
apache-2.0
2,872
// Databricks notebook source exported at Sun, 28 Aug 2016 15:27:31 UTC // MAGIC %md // MAGIC // MAGIC # [Big Data Analysis for Humanities and Social Sciences](https://www.eventbrite.co.uk/e/big-data-analysis-for-the-humanities-and-social-sciences-tickets-26708754604) // MAGIC // MAGIC ### August 26, 2016, King's Dig...
lamastex/scalable-data-science
db/20160826_KDL_Intro2BDA_HumSocSci/01_introduction/002_loginToDatabricksCE.scala
Scala
unlicense
2,718
package com.inneractive.cerberus import java.io.{File, FileInputStream} import java.util import javax.xml.transform.stream.StreamSource import org.dmg.pmml.{FieldName, Model, PMML} import org.jpmml.evaluator.{EvaluatorUtil, FieldValue, ModelEvaluator, ModelEvaluatorFactory} import org.jpmml.model.JAXBUtil import sca...
inneractive-opensrc/cerberus
engine/src/main/scala/com/inneractive/cerberus/Evaluators.scala
Scala
apache-2.0
3,725
package com.ftchinese.jobs.common /** * The message of Notification. * Created by wanbo on 3/22/16. * * @param id: The notification unique id, at least it is unique in the notifications created current date. */ case class NotificationMessage( deviceToken: String = "", deviceType: String = "", appNumber: String ...
FTChinese/push
src/main/scala/com/ftchinese/jobs/common/NotificationMessage.scala
Scala
mit
975
/* * scala-swing (https://www.scala-lang.org) * * Copyright EPFL, Lightbend, Inc., contributors * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala...
scala/scala-swing
src/main/scala/scala/swing/TextField.scala
Scala
apache-2.0
3,085
package dog package examples object Examples extends Dog with Assert { val `fail example` = TestCase { equal(0, 1) } val `success example` = TestCase { for { _ <- equal(1, 1).lift } yield 1 } val `bind test case` = TestCase { for { a <- `success example`; _ <- equal(a, 2)...
pocketberserker/dog-examples
src/test/scala/dog/Examples.scala
Scala
unlicense
1,581
/* * Licensed to The Apereo Foundation under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * The Apereo Foundation licenses this file to you under the Apache License, * Version 2.0, (the "License"); you ma...
equella/Equella
Source/Plugins/Core/com.equella.core/scalasrc/com/tle/web/controls/universal/handlers/fileupload/details/ViewersListModel.scala
Scala
apache-2.0
1,748
package com.datastax.spark.connector.types import java.net.InetAddress import java.nio.ByteBuffer import java.util.{Calendar, GregorianCalendar, UUID, Date} import scala.collection.JavaConversions._ import scala.collection.immutable.{TreeMap, TreeSet} import scala.reflect.runtime.universe._ import org.joda.time.Date...
willgalen/REVEL
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/types/TypeConverter.scala
Scala
apache-2.0
25,487
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.scalajs.js import scala.annotat...
SebsLittleHelpers/scala-js
library/src/main/scala-new-collections/scala/scalajs/js/ArrayOps.scala
Scala
apache-2.0
59,584
/* * Copyright (C) 2015 Stratio (http://stratio.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
pmadrigal/Crossdata
server/src/test/scala/com/stratio/crossdata/server/CrossdataAvroIT.scala
Scala
apache-2.0
1,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 ...
zzcclp/carbondata
integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/DDLHelper.scala
Scala
apache-2.0
17,386
package gapt.proofs.reduction import gapt.expr._ import gapt.expr.formula.fol.FOLAtom import gapt.expr.formula.fol.FOLVar import gapt.logic.Polarity import gapt.proofs._ import gapt.proofs.context.Context import gapt.proofs.context.update.InductiveType import gapt.proofs.context.update.Sort import gapt.proofs.expansio...
gapt/gapt
tests/src/test/scala/gapt/proofs/reduction/ErasureReductionTest.scala
Scala
gpl-3.0
4,523
package io.buoyant.linkerd.clientTls import com.fasterxml.jackson.annotation.JsonIgnore import com.twitter.finagle.buoyant.TlsClientPrep import io.buoyant.linkerd.{TlsClientConfig, TlsClientInitializer} class NoValidationInitializer extends TlsClientInitializer { val configClass = classOf[NoValidationConfig] over...
hhtpcd/linkerd
linkerd/tls/src/main/scala/io/buoyant/linkerd/clientTls/NoValidationInitializer.scala
Scala
apache-2.0
594
package aerospiker package object listener
tkrs/aerospiker
core/src/main/scala/aerospiker/listener/package.scala
Scala
mit
44
/* * 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 ...
windeye/spark
core/src/test/scala/org/apache/spark/LocalSparkContext.scala
Scala
apache-2.0
2,052
package lila.game import scala.util.Random import chess.format.Forsyth import chess.{ Color, Status } import org.joda.time.DateTime import play.api.libs.json._ import play.modules.reactivemongo.json.BSONFormats.toJSON import play.modules.reactivemongo.json.ImplicitBSONHandlers.JsObjectWriter import reactivemongo.bson...
terokinnunen/lila
modules/game/src/main/GameRepo.scala
Scala
mit
16,066
package scalariform.lexer trait LexerResult { def tokens: List[Token] }
jkinkead/scalariform
scalariform/src/main/scala/scalariform/lexer/LexerResult.scala
Scala
mit
77
/* * Copyright (c) 2013, Scodec * 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...
scodec/scodec
unitTests/src/test/scala/scodec/codecs/EitherCodecTest.scala
Scala
bsd-3-clause
2,386
package org.jetbrains.plugins.scala.extensions.implementation.iterator import com.intellij.psi.PsiElement /** * Pavel.Fatin, 11.05.2010 */ class ContextsIteratorTest extends IteratorTestCase { def testEmpty = { assertIterates("", "0") } def testOneParent = { assertIterates("0", parse("0 (1.1)").get...
triggerNZ/intellij-scala
test/org/jetbrains/plugins/scala/extensions/implementation/iterator/ContextsIteratorTest.scala
Scala
apache-2.0
832
package org.psliwa.idea.composerJson.intellij.codeAssist import com.intellij.codeInsight.lookup.Lookup import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.util.Computable import com.intellij.testFramework.UsefulTestCase import com.intellij.testFramework.fixtures.BasePlatformTestCase ...
psliwa/idea-composer-plugin
src/test/scala/org/psliwa/idea/composerJson/intellij/codeAssist/CompletionTest.scala
Scala
mit
2,202
package TAPLcomp.tyarith import scala.text.Document object TyArithPrinter { import TAPLcomp.Print._ def ptyType(outer: Boolean, ty: Ty): Document = ty match { case ty1 => ptyAType(outer, ty1) } def ptyAType(outer: Boolean, ty: Ty): Document = ty match { case TyBool => "Bool" case TyNat => "Nat"...
hy-zhang/parser
Scala/Parser/src/TAPLcomp/tyarith/syntax.scala
Scala
bsd-3-clause
1,483
package se.culvertsoft.mgen.compiler.util import java.io.File import java.nio.charset.Charset import java.nio.file.Files import java.nio.file.Paths import scala.collection.JavaConversions.asScalaBuffer import scala.collection.mutable.LinkedHashMap import scala.collection.mutable.Map import scala.reflect.io.Path impo...
culvertsoft/mgen
mgen-compiler/src/main/scala/se/culvertsoft/mgen/compiler/util/FileUtils.scala
Scala
mit
5,857
/* * Copyright 2019 CJWW Development * * 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...
cjww-development/auth-service
app/forms/validation/SettingsValidation.scala
Scala
apache-2.0
2,450
package actortree import akka.actor.{ Props, ActorRef, ActorSystem } import org.scalatest.{ BeforeAndAfterAll, FlatSpec } import akka.testkit.{ TestProbe, ImplicitSender, TestKit } import org.scalatest.matchers.ShouldMatchers import scala.util.Random import scala.concurrent.duration._ import org.scalatest.FunSuite c...
BBK-PiJ-2015-67/sdp-portfolio
exercises/bst/src/test/scala/actortree/BinaryTreeSuite.scala
Scala
unlicense
4,274
/* * 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...
yiheng/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/nn/RecurrentSpec.scala
Scala
apache-2.0
22,615
/* * 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...
scalatest/scalatest
jvm/scalactic-test/src/test/scala/org/scalactic/TraversableConstraintsSpec.scala
Scala
apache-2.0
3,224
package maths.interpolation.linear import physical.Velocity import scala.collection.mutable.ArrayBuffer class TrilinearInterpolation extends BilinearInterpolation { override val partialResult: ArrayBuffer[Velocity] = ArrayBuffer.empty[Velocity] def apply(v: Array[Array[Array[Velocity]]], x: Double, y: Double, ...
shawes/zissou
src/main/scala/maths/interpolation/linear/TrilinearInterpolation.scala
Scala
mit
465
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/play-async
src/test/scala/uk/gov/hmrc/play/asyncmvc/example/connectors/StockConnector.scala
Scala
apache-2.0
1,005
package com.atomist.rug.kind.pom import com.atomist.param.SimpleParameterValues import com.atomist.project.edit.SuccessfulModification import com.atomist.rug.kind.java.JavaTypeUsageTest import com.atomist.source.{ArtifactSource, SimpleFileBasedArtifactSource, StringFileArtifact} import org.scalatest.{FlatSpec, Matcher...
atomist/rug
src/test/scala/com/atomist/rug/kind/pom/EveryPomUsageTest.scala
Scala
gpl-3.0
1,924
package scala.pickling package pickler /** Picklers for primitive types. */ trait PrimitivePicklers { // TODO: figure out why removing these pickler/unpicklers slows down evactor1 implicit val bytePickler: Pickler[Byte] with Unpickler[Byte] = PrimitivePickler[Byte] implicit val shortPickler: Pickler[Short] with...
beni55/pickling
core/src/main/scala/scala/pickling/pickler/Primitives.scala
Scala
bsd-3-clause
2,018
/* * Copyright 2015 Functional Objects, 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 ...
funobjects/akka-persistence-orientdb
src/test/scala/org/funobjects/akka/persistence/orientdb/OrientDbJournalSpec.scala
Scala
apache-2.0
1,466
package org.oseraf.bullseye.store import java.util.UUID import java.util.concurrent.atomic.AtomicLong import org.oseraf.bullseye.store.EntityStore.ID import org.oseraf.bullseye.store.AttributeContainer.{KEY,VALUE} /** * Created by nhamblet. */ trait EntityStore { def entity(id: EntityStore.ID): Entity def relat...
OSERAF/MASTERImpl
store/src/main/scala/org/oseraf/bullseye/store/EntityStore.scala
Scala
apache-2.0
3,803
package com.github.alixba.vast import javax.xml.datatype.XMLGregorianCalendar import scala.xml.Node case class Duration(value: XMLGregorianCalendar) extends VASTElement { /** * Serializes this to a Node. */ def toXML: Node = <Duration>{ value }</Duration> } object Duration extends VASTElementCompani...
AlixBa/vast
src/main/scala/com/github/alixba/vast/Duration.scala
Scala
mit
594
package com.scalakata import scala.concurrent._ import org.scalajs.dom import scalajs.js import scalajs.concurrent.JSExecutionContext.Implicits.queue object GitHub { def share(content: String): Future[String] = post(content).map(id(_)) def fetch(gistId: String): Future[String] = dom.ext.Ajax.get( url = "http...
Jorginho211/TFG
ScalaKata2/webapp/js/src/main/scala/com.scalakata/GitHub.scala
Scala
gpl-3.0
1,226
/* * Copyright 2016 Carlo Micieli * * 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...
CarloMicieli/hascalator
core/src/test/scala/io/hascalator/AbstractTestSpec.scala
Scala
apache-2.0
730
/* * 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...
asorianostratio/incubator-toree
kernel/src/test/scala/test/utils/SparkContextProvider.scala
Scala
apache-2.0
1,123
package debop4s.timeperiod.tests import debop4s.core.Logging import debop4s.timeperiod.utils.Times import org.joda.time.DateTime import org.scalatest.{BeforeAndAfter, FunSuite, Matchers} /** * debop4s.timeperiod.tests.AbstractTimeFunSuite * * @author 배성혁 sunghyouk.bae@gmail.com * @since 2014. 1. 2. 오전 11:12 */ a...
debop/debop4s
debop4s-timeperiod/src/test/scala/debop4s/timeperiod/AbstractTimeFunSuite.scala
Scala
apache-2.0
583
/******************************************************************************* * Copyright 2010 Maxime Lévesque * * 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://...
squeryl/squeryl
src/main/scala/org/squeryl/internals/FieldTypeHandler.scala
Scala
apache-2.0
13,984
/** * Copyright 2016, deepsense.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 applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
deeplang/src/main/scala/io/deepsense/deeplang/doperables/spark/wrappers/params/common/RegressionImpurity.scala
Scala
apache-2.0
1,111
/* * Copyright 2001-2014 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/src/main/scala/org/scalatest/flatspec/FixtureAnyFlatSpecLike.scala
Scala
apache-2.0
91,716
package io.youi.component.bootstrap class Accordion(element: html.Element) extends HTMLContainer[AccordionEntry](element) with BootstrapComponent[html.Element] { def this() = { this(dom.create[html.Div]("div")) } override protected def defaultParentTheme: Theme = Container override def componentType: Stri...
outr/youi
ui/js/src/main/scala/io/youi/component/bootstrap/Accordion.scala
Scala
mit
686
package uk.gov.dvla.vehicles.presentation.common.filters import com.google.inject.Inject import play.api.mvc.{Cookie, Cookies, Filter, Headers, RequestHeader, Result} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import uk.gov.dvla.vehicles.presentation.common.clientsidesessi...
dvla/vehicles-presentation-common
app/uk/gov/dvla/vehicles/presentation/common/filters/EnsureSessionCreatedFilter.scala
Scala
mit
2,692
package ca.hyperreal.sscheme import java.io.{FileReader, PrintWriter} import jline.console.ConsoleReader object Main extends App { if (!args.isEmpty) { val script = new FileReader( args(0) ) interpret( Parser.parse(script) )( standardEnvironment add ('args -> SList.fromScalaSeq(args.toList.tail)) ) match {...
edadma/sscheme
src/main/scala/Main.scala
Scala
mit
1,733
package com.redis import org.scalatest.FunSpec import org.scalatest.BeforeAndAfterEach import org.scalatest.BeforeAndAfterAll import org.scalatest.matchers.ShouldMatchers import org.scalatest.junit.JUnitRunner import org.junit.runner.RunWith import Patterns._ @RunWith(classOf[JUnitRunner]) class PatternsSpec extends...
Tjoene/thesis
Case_Programs/scala-redis-2.9-pre-scala-2.10/src/test/scala/com/redis/PatternsSpec.scala
Scala
gpl-2.0
2,148
import PartialFunction.cond import util.* object Test extends App { object I { def unapply(x: String): Option[Int] = Try(x.toInt).toOption } implicit class RX(val sc: StringContext) { def rx = sc.parts.mkString("(.+)").r } Console println ("2 by 4" match { case rx"${I(a)} by ${I(b)}" => a+b case...
dotty-staging/dotty
tests/pending/run/t7715.scala
Scala
apache-2.0
648
/** * The MIT License (MIT) * <p/> * Copyright (c) 2016 ScalateKids * <p/> * 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 ...
ScalateKids/Actorbase
src/main/scala/com/actorbase/actorsystem/messages/AuthActorMessages.scala
Scala
mit
5,146
/* * 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 *...
fusepoolP3/p3-silk
silk-core/src/main/scala/de/fuberlin/wiwiss/silk/datasource/Source.scala
Scala
apache-2.0
3,735
/* * Copyright © 2014 TU Berlin (emma@dima.tu-berlin.de) * * 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 app...
emmalanguage/emma
emma-lib/src/main/scala/org/emmalanguage/lib/ml/feature/encode.scala
Scala
apache-2.0
2,118
/* * Copyright 2012 Arktekk AS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
arktekk/scala-atom
src/main/scala/no/arktekk/atom/PersonLike.scala
Scala
apache-2.0
1,266
/* * Copyright 2017 Datamountaineer. * * 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...
CodeSmell/stream-reactor
kafka-connect-hbase/src/test/scala/com/datamountaineer/streamreactor/connect/hbase/SinkRecordKeyRowKeyBuilderTest.scala
Scala
apache-2.0
2,221
package models.storage import play.api.libs.functional.syntax._ import play.api.libs.json.{Format, _} case class FromToDouble(from: Option[Double], to: Option[Double]) object FromToDouble { implicit val formats: Format[FromToDouble] = ( (__ \\ "from").formatNullable[Double] and (__ \\ "to").formatNullabl...
MUSIT-Norway/musit
service_backend/app/models/storage/FromToDouble.scala
Scala
gpl-2.0
385
package com.awesomesauce.minecraft.forge.core.lib.item import net.minecraft.item.Item import net.minecraft.item.ItemStack trait ItemUnusable extends Item with ItemDescription { override def doesContainerItemLeaveCraftingGrid(stack: ItemStack) = false setContainerItem(this); setMaxStackSize(1); addUsa...
AwesomeSauceMods/AwesomeSauceCore
main/scala/com/awesomesauce/minecraft/forge/core/lib/item/ItemUnusable.scala
Scala
mit
365