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 com.azavea.gtfs.io.csv
trait GtfsFile[T] {
val fileName: String
val isRequired: Boolean
def parse(path: String): Seq[T]
}
| flibbertigibbet/open-transit-indicators | scala/gtfs/src/main/scala/com/azavea/gtfs/io/csv/GtfsFile.scala | Scala | gpl-3.0 | 138 |
/*
* 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/src/main/scala/org/scalatest/RecoverMethods.scala | Scala | apache-2.0 | 8,911 |
/*
* Copyright 2014 Adam Rosenberger
*
* 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... | arosenberger/nalloc_2.10 | optional/src/main/scala/org/nalloc/bitb/kcits/optional/OptionalShort.scala | Scala | apache-2.0 | 1,756 |
package org.bfn.ninetynineprobs
import org.scalatest._
class P68Spec extends UnitSpec {
// TODO
}
| bfontaine/99Scala | src/test/scala/P68Spec.scala | Scala | mit | 105 |
package com.twitter.finagle.oauth2
/**
* Authorized information.
*
* @param user Authorized user which is registered on system.
* @param clientId Using client id which is registered on system.
* @param scope Inform the client of the scope of the access token issued.
* @param redirectUri This value is used by Aut... | finagle/finagle-oauth2 | src/main/scala/com/twitter/finagle/oauth2/AuthInfo.scala | Scala | apache-2.0 | 465 |
package spa.client.modules
import diode.data.Pot
import diode.react.ModelProxy
import japgolly.scalajs.react.extra.router.RouterCtl
import spa.client.SPAMain.{FeedbackLoc, Loc}
import diode.react.ReactPot._
import diode.react._
import diode.data.Pot
import japgolly.scalajs.react._
import japgolly.scalajs.rea... | IceGiant/internet-abridged | client/src/main/scala/spa/client/modules/About.scala | Scala | apache-2.0 | 2,580 |
package com.arcusys.valamis.certificate.model.goal
object GoalStatistic {
def empty = GoalStatistic(0,0,0,0)
}
case class GoalStatistic(success: Int, inProgress: Int, failed: Int, total: Int, notStarted: Int = 0)
{
def addSuccess(count: Int = 1) =
this.copy(success = success + count, total = total + count)
... | igor-borisov/valamis | valamis-certificate/src/main/scala/com/arcusys/valamis/certificate/model/goal/GoalStatistic.scala | Scala | gpl-3.0 | 1,121 |
package org.libss.util.helpers
import java.lang.reflect.Field
/**
* date: 02.06.2016 22:44
* author: Kaa
*
* Reflection field value getter helper trait
*/
trait ReflectionFieldValueHandler {
protected def setFieldValue(instance: AnyRef, field: Field, value: Any) {
field.setAccessible(true)
field.s... | kanischev/libss | libss-utils/src/main/scala/org/libss/util/helpers/ReflectionFieldValueHandler.scala | Scala | apache-2.0 | 866 |
import scala.reflect.runtime.universe._
import scala.reflect.runtime.{universe => ru}
import scala.reflect.runtime.{currentMirror => cm}
import scala.tools.reflect.{ToolBox, mkConsoleFrontEnd}
object Test extends dotty.runtime.LegacyApp {
//val oldErr = Console.err;
val baos = new java.io.ByteArrayOutputStream()
... | yusuke2255/dotty | tests/disabled/macro/run/toolbox_console_reporter.scala | Scala | bsd-3-clause | 969 |
package is.hail.annotations
import java.io.{ObjectInputStream, ObjectOutputStream}
import com.esotericsoftware.kryo.{Kryo, KryoSerializable}
import com.esotericsoftware.kryo.io.{Input, Output}
import is.hail.types.virtual._
import is.hail.types.physical._
import is.hail.utils._
import is.hail.variant.Locus
import org... | danking/hail | hail/src/main/scala/is/hail/annotations/UnsafeRow.scala | Scala | mit | 9,948 |
package com.github.tototoshi.play2.auth.social.providers.facebook
import com.github.tototoshi.play2.auth.social.core.OAuthProviderUserSupport
import play.api.Logger
import play.api.libs.ws.{ WS, WSResponse }
import play.api.Play.current
import scala.concurrent.{ ExecutionContext, Future }
trait FacebookProviderUserSu... | tototoshi/play2-auth | social/src/main/scala/com/github/tototoshi/play2/auth/social/providers/facebook/FacebookProviderUserSupport.scala | Scala | apache-2.0 | 1,215 |
/*
* Copyright 2011-2018 GatlingCorp (http://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... | wiacekm/gatling | gatling-commons/src/test/scala/io/gatling/commons/util/HtmlHelperSpec.scala | Scala | apache-2.0 | 891 |
/**
* © 2019 Refinitiv. 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 applicable l... | dudi3001/CM-Well | server/cmwell-ws/app/ld/exceptions/UnsupportedURIException.scala | Scala | apache-2.0 | 892 |
/*
* Copyright (c) 2015. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
* Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
* Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
* Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagi... | CapeSepias/product-collections | shared/src/main/scala/collections/io/CSVReader.scala | Scala | bsd-2-clause | 3,101 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2002-2018, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\\___/_/... | ashawley/scala-xml | shared/src/main/scala/scala/xml/include/XIncludeException.scala | Scala | bsd-3-clause | 2,244 |
package uk.gov.gds.ier.transaction.forces.previousAddress
import play.api.data.Forms._
import play.api.data.validation.{Invalid, Valid, Constraint}
import uk.gov.gds.ier.validation._
import uk.gov.gds.ier.validation.constraints.CommonConstraints
import uk.gov.gds.ier.serialiser.WithSerialiser
import uk.gov.gds.ier.mod... | alphagov/ier-frontend | app/uk/gov/gds/ier/transaction/forces/previousAddress/PreviousAddressForms.scala | Scala | mit | 10,400 |
package is.hail.utils
class UnionFind(initialCapacity: Int = 32) {
private var a: Array[Int] = new Array[Int](initialCapacity)
private var rank: Array[Int] = new Array[Int](initialCapacity)
private var count: Int = 0
def size: Int = count
private def ensure(i: Int) {
if (i >= a.length) {
var newL... | hail-is/hail | hail/src/main/scala/is/hail/utils/UnionFind.scala | Scala | mit | 1,503 |
/*
* Copyright 2014–2018 SlamData 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... | jedesah/Quasar | foundation/src/main/scala/quasar/time/TemporalPart.scala | Scala | apache-2.0 | 1,575 |
/*
* 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 ... | caneGuy/spark | sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala | Scala | apache-2.0 | 50,118 |
/*
* Main.scala
*
* Licensed to the Communitivity, Inc 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"); y... | Java-Communitivity/MinimalScalaXMPPComponent | src/org/communitivity/echoxmpp/Main.scala | Scala | apache-2.0 | 2,647 |
/*
* 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/funspec/src/main/scala/org/scalatest/funspec/FixtureAnyFunSpecLike.scala | Scala | apache-2.0 | 36,551 |
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs
// Licence: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.sexp
import org.ensime.util.EnsimeSpec
class SexpCompactPrinterSpec extends EnsimeSpec {
private val foo = SexpString("foo")
private val foosym = SexpSymbol("foo")
... | d1egoaz/ensime-sbt | src/sbt-test/sbt-ensime/ensime-server/s-express/src/test/scala/org/ensime/sexp/SexpCompactPrinterSpec.scala | Scala | apache-2.0 | 1,097 |
package com.twitter.finatra.kafkastreams.transformer.lifecycle
import com.twitter.finatra.kafkastreams.transformer.watermarks.Watermark
trait OnWatermark {
def onWatermark(watermark: Watermark): Unit
}
| twitter/finatra | kafka-streams/kafka-streams/src/main/scala/com/twitter/finatra/kafkastreams/transformer/lifecycle/OnWatermark.scala | Scala | apache-2.0 | 206 |
package com.bio4j.dynamograph.parser.go
import com.bio4j.dynamograph.parser.SingleElement
trait AnyGoParser extends Traversable[SingleElement]
| bio4j/dynamograph | src/main/scala/com/bio4j/dynamograph/parser/go/AnyGoParser.scala | Scala | agpl-3.0 | 145 |
package com.twitter.finagle.exp.mysql.transport
import com.twitter.finagle.client.Transporter
import com.twitter.finagle.exp.mysql.{Request, Result}
import com.twitter.finagle.netty3.{ChannelSnooper, Netty3Transporter}
import com.twitter.finagle.Stack
import com.twitter.util.NonFatal
import java.util.logging.{Level, L... | nkhuyu/finagle | finagle-mysql/src/main/scala/com/twitter/finagle/mysql/transport/Netty3.scala | Scala | apache-2.0 | 2,637 |
package org.mauritania.photosync.olympus.client
import java.net.URL
import java.time.{LocalDate, LocalDateTime, LocalTime}
case class FileInfo(
folder: String,
name: String,
size: Long,
date: Int = FileInfo.DefaultDate,
time: Int = FileInfo.DefaultTime,
thumbnailUrl: Option[URL] = None // if local, no thu... | mauriciojost/olympus-photosync | src/main/scala/org/mauritania/photosync/olympus/client/FileInfo.scala | Scala | apache-2.0 | 1,532 |
/*
*
* * Copyright 2015 Skymind,Inc.
* *
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
* *
* * http://www.apache.org/licenses/LICENSE-2.0
* *
* * U... | Mageswaran1989/aja | src/main/scala/org/aja/dhira/src/main/scala/org/dhira/core/nnet/layers/convolution/ConvolutionLayer.scala | Scala | apache-2.0 | 9,034 |
package notebook
import rx.lang.scala.{Observable => RxObservable, Observer => RxObserver}
/**
* Author: Ken
*/
trait Observer[T] extends RxObserver[T] {
def map[A](fxn: A => T): Observer[A] = new MappingObserver[T, A] {
def innerObserver = Observer.this;
def observerMapper = fxn
}
}
/**
* A no-op ob... | erictu/mango-notebook | modules/observable/src/main/scala/notebook/Observer.scala | Scala | apache-2.0 | 1,072 |
/*
* Part of GDL book_api.
* Copyright (C) 2017 Global Digital Library
*
* See LICENSE
*/
package io.digitallibrary.bookapi.model.domain
import io.digitallibrary.bookapi.BookApiProperties
import io.digitallibrary.license.model.License
import scalikejdbc._
case class Book(id: Option[Long],
revis... | GlobalDigitalLibraryio/book-api | src/main/scala/io/digitallibrary/bookapi/model/domain/Book.scala | Scala | apache-2.0 | 1,096 |
package com.bigchange.basic
import org.apache.spark.sql.hive.HiveContext
import org.apache.spark.{SparkContext, SparkConf}
/**
* Created by CHAOJIANG on 2016/5/1 0001.
*/
object HiveOperationTest {
def main(args: Array[String]): Unit = {
if (args.length < 1) {
System.err.println("Usage: <inpath>")
... | bigchange/AI | src/main/scala/com/bigchange/basic/HiveOperationTest.scala | Scala | apache-2.0 | 1,126 |
package xyz.hyperreal.sprolog
class PrologDB extends Database
{
Prolog.compileProgram( Prolog.parseProgram("""
% X = X. % for some reason this doesn't work
If -> Then :- If, !, Then.
If -> Then ; _ :- If, !, Then.
_ -> _ ; Else :- !, Else. % the cut stops the rules for disjunction (;) from bei... | edadma/sprolog | src/main/scala/PrologDB.scala | Scala | mit | 2,552 |
package service
import java.lang.Long.parseLong
import scala.concurrent.Future
import scalaz.syntax.applicative.ToApplyOps
import play.api.libs.concurrent.Execution.Implicits._
import scalaz._
import Scalaz._
import org.mindrot.jbcrypt.BCrypt
import utils.{Logging, Utils}
import Utils._
import entities._
/**
... | alanktwong/typesafe_activators | redis-twitter-clone/app/service/RedisService.scala | Scala | mit | 10,278 |
package test_expect_failure.scala_import
class RootScalaImportPassesLabelsDirectDeps | bazelbuild/rules_scala | test_expect_failure/scala_import/RootScalaImportPassesLabelsDirectDeps.scala | Scala | apache-2.0 | 84 |
package com.danieltrinh.benchmarks
import org.example.SimpleScalaBenchmark
import com.google.caliper.Param
import scala.collection.par._
import scala.collection.par.Scheduler.Implicits.global
import scala.collection.parallel.ParSeq
class ParallelVsRegularCollections extends SimpleScalaBenchmark {
@Param(Array("10",... | daniel-trinh/scala_microbenchmarks | src/main/scala/com/danieltrinh/benchmarks/ParallelVsRegularCollections.scala | Scala | mit | 1,499 |
/* Copyright 2012-2015 Micronautics Research Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | mslinn/awslib_scala | src/test/scala/com/micronautics/aws/ETTest.scala | Scala | mit | 758 |
package com.twitter.finagle.http.netty
import org.jboss.netty.handler.codec.http.{DefaultHttpRequest, HttpMethod, HttpVersion}
import org.specs.SpecificationWithJUnit
class HttpMessageProxySpec extends SpecificationWithJUnit {
"HttpMessageProxy" should {
"basics" in {
val message = new DefaultHttpRequest... | firebase/finagle | finagle-http/src/test/scala/com/twitter/finagle/http/netty/HttpMessageProxySpec.scala | Scala | apache-2.0 | 525 |
/*
* 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 ... | vinodkc/spark | resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/KubernetesSuite.scala | Scala | apache-2.0 | 23,920 |
package extruder.aws
trait AllAwsInstances extends AwsCredentialsInstances with AwsRegionInstances
| janstenpickle/extruder | aws/src/main/scala/extruder/aws/AllAwsInstances.scala | Scala | mit | 100 |
package sctags
import net.pmonk.optparse.Opt
import scala.collection.mutable.ListBuffer
import java.io.File
import java.io.PrintStream
import java.text.Collator
object SCTags extends Parsing with TagGeneration {
var outputFile: String = "tags"
var recurse = false
var etags = false
def main(args: Array[String... | stevej/sctags | src/main/scala/sctags/SCTags.scala | Scala | apache-2.0 | 1,791 |
package org.json4s
import scala.collection.immutable
import scala.annotation.implicitNotFound
@implicitNotFound(
"No JSON serializer found for type ${T}. Try to implement an implicit Writer or JsonFormat for this type."
)
trait Writer[-T] { self =>
def write(obj: T): JValue
def contramap[A](f: A => T): Writer[... | json4s/json4s | ast/shared/src/main/scala/org/json4s/Writer.scala | Scala | apache-2.0 | 2,668 |
/*
* 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 ... | pgandhi999/spark | mllib/src/main/scala/org/apache/spark/mllib/tree/impurity/Entropy.scala | Scala | apache-2.0 | 5,656 |
package org.ucf.scala
import scala.io.Source
object Method {
/**
* The most common way to define a function is as a member of some object;
* such as a function is called a method. For example in the following codes,
* there are two methods.
*/
private def processLine(filename:String, width:I... | bingrao/Scala-Learning | Function/src/main/scala/org/ucf/scala/Function.scala | Scala | mit | 4,329 |
package fs2
package time
import org.scalacheck.Gen
import scala.concurrent.duration._
import Stream._
import fs2.util.Task
class TimeSpec extends Fs2Spec {
"time" - {
"awakeEvery" in {
time.awakeEvery[Task](100.millis).map(_.toMillis/100).take(5).runLog.unsafeRun() shouldBe Vector(1,2,3,4,5)
}
... | japgolly/scalaz-stream | core/src/test/scala/fs2/time/TimeSpec.scala | Scala | mit | 2,359 |
package github.joestein.skeletor
import me.prettyprint.hector.api.{ Cluster, Keyspace => HKeyspace }
import me.prettyprint.hector.api.factory.HFactory
import me.prettyprint.hector.api.query.{ SuperSliceQuery, MultigetSliceQuery, MultigetSliceCounterQuery, CounterQuery, RangeSlicesQuery, MultigetSubSliceQuery}
import g... | joestein/skeletor | src/main/scala/skeletor/Cassandra.scala | Scala | mit | 10,835 |
/**
* Copyright (C) 2009-2011 the original author or authors.
* See the notice.md file distributed with this work for additional
* information regarding copyright ownership.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Yo... | dnatic09/scalate | scalate-core/src/main/scala/org/fusesource/scalate/console/ConsoleHelper.scala | Scala | apache-2.0 | 8,872 |
package io.getquill.h2
import io.getquill.context.sql.ProductSpec
import monix.execution.Scheduler
class ProductJdbcSpec extends ProductSpec {
val context = testContext
import testContext._
implicit val scheduler = Scheduler.global
override def beforeAll = {
testContext.run(quote(query[Product].delete)... | getquill/quill | quill-jdbc-monix/src/test/scala/io/getquill/h2/ProductJdbcSpec.scala | Scala | apache-2.0 | 2,674 |
package io.flow.dependency.api.lib
import io.flow.dependency.v0.models.{Credentials, CredentialsUndefinedType, UsernamePassword}
import org.htmlcleaner.HtmlCleaner
import org.apache.commons.codec.binary.Base64
import org.apache.commons.lang3.StringUtils
import org.apache.commons.text.StringEscapeUtils
import java.net.... | flowcommerce/dependency | api/app/lib/RemoteDirectory.scala | Scala | mit | 2,317 |
package com.wlangiewicz.xbot.domain
case class Ticker(max: Long, min: Long, last: Long, bid: Long, ask: Long, vwap: Long, average: Long, volume: Long) | wlk/xbot | src/main/scala/com/wlangiewicz/xbot/domain/Ticker.scala | Scala | apache-2.0 | 151 |
package com.olvind.crud
package server
import slick.driver.JdbcDriver
trait integrationSlick {
val driver: JdbcDriver
}
| elacin/slick-crud | crud/jvm/src/main/scala/com/olvind/crud/server/integrationSlick.scala | Scala | apache-2.0 | 124 |
package io.buoyant.linkerd
package protocol
import com.twitter.conversions.time._
import com.twitter.finagle.{Http => FinagleHttp, Status => _, http => _, _}
import com.twitter.finagle.buoyant.linkerd.Headers
import com.twitter.finagle.http.{param => _, _}
import com.twitter.finagle.http.Method._
import com.twitter.fi... | hhtpcd/linkerd | linkerd/protocol/http/src/e2e/scala/io/buoyant/linkerd/protocol/HttpEndToEndTest.scala | Scala | apache-2.0 | 16,864 |
package cgta.oscala
package util
import cgta.otest.FunSuite
//////////////////////////////////////////////////////////////
// Copyright (c) 2013 Ben Jackman
// All Rights Reserved
// please contact ben@jackman.biz
// for licensing inquiries
// Created by bjackman @ 9/23/13 5:44 PM
///////////////////////////////////... | cgta/open | oscala/shared/src/test/scala/cgta/oscala/util/TestBin.scala | Scala | mit | 3,525 |
/*
* 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... | pncampbell/ct-calculations | src/main/scala/uk/gov/hmrc/ct/computations/CP14.scala | Scala | apache-2.0 | 1,183 |
/*
* 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 ... | chenc10/Spark-PAF | core/src/main/scala/org/apache/spark/rdd/SubtractedRDD.scala | Scala | apache-2.0 | 5,085 |
/*
* Copyright (c) 2012 - 2020 Splice Machine, Inc.
*
* This file is part of Splice Machine.
* Splice Machine 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, or (at your option) ... | splicemachine/spliceengine | splice_spark2/src/main/scala/com/splicemachine/nsds/kafka/KafkaUtils.scala | Scala | agpl-3.0 | 5,218 |
package fringe.fringeArria10.bigIP
// TODO: what to do for this guy?
import fringe.FringeGlobals
import fringe.bigIP.BigIP
import fringe.bigIP.BigIPSim
import chisel3._
import chisel3.util._
class BigIPArria10 extends BigIPSim | stanford-ppl/spatial-lang | spatial/core/resources/chiselgen/template-level/fringeArria10/bigIP/BigIPArria10.scala | Scala | mit | 227 |
package dx.compiler
import dx.core.languages.Language
import wdlTools.eval.WdlValues
import wdlTools.generators.code.WdlV1Generator
import wdlTools.syntax.{CommentMap, SourceLocation, WdlVersion}
import wdlTools.types.WdlTypes.T_Task
import wdlTools.types.{WdlTypes, TypedAbstractSyntax => TAT}
import wdlTools.util.{Lo... | dnanexus-rnd/dxWDL | src/main/scala/dx/compiler/WdlCodeGen.scala | Scala | apache-2.0 | 13,565 |
package dbtarzan.gui.info
import dbtarzan.db.QuerySql
import dbtarzan.gui.TControlBuilder
import dbtarzan.localization.Localization
import scalafx.scene.Parent
import scalafx.scene.control.TextArea
/** The read only text box showing the query sql, so that it can be seen anc copied */
class QueryInfo(sql : QuerySql, ... | aferrandi/dbtarzan | src/main/scala/dbtarzan/gui/info/QueryInfo.scala | Scala | apache-2.0 | 482 |
import play.api.libs.json.{Json, OFormat}
package object models {
case class Order(id: Int = -1,
customerId: Int,
attendees: List[String])
object Order {
implicit val OrderFormat: OFormat[Order] =
Json.format[Order]
}
case class OrderPlaced(order: Order)
ob... | leanovate/contoso-conference-manager | app/models/package.scala | Scala | apache-2.0 | 616 |
/**
* Copyright (c) 2007-2011 Eric Torreborre <etorreborre@yahoo.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights ... | Muki-SkyWalker/specs | src/test/scala/org/specs/util/dataTableHeaderUnit.scala | Scala | mit | 1,816 |
package extractors.solutions
object Exercise2 {
object At {
def unapply(s: String): Option[(String, String)] = {
val parts = s split "@"
if (parts.length == 2) Some(parts(0), parts(1)) else None
}
}
}
| julienrf/scala-lessons | highlights/extractors/code/src/main/scala/extractors/solutions/Exercise2.scala | Scala | mit | 230 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | tophua/spark1.52 | mllib/src/test/scala/org/apache/spark/mllib/linalg/distributed/IndexedRowMatrixSuite.scala | Scala | apache-2.0 | 7,370 |
package de.tototec.sbuild.ant
import de.tototec.sbuild.Project
import java.io.File
import de.tototec.sbuild.Path
import de.tototec.sbuild.TargetRef
import de.tototec.sbuild.TargetRefs
object AntPath {
def apply(location: File = null,
locations: Seq[File] = null,
path: String = null,
... | SBuild-org/sbuild | de.tototec.sbuild.ant/src/main/scala/de/tototec/sbuild/ant/AntPath.scala | Scala | apache-2.0 | 1,348 |
/*
* Copyright (c) 2018 Georgios Andreadakis
*
* 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... | GeorgiosAndreadakis/TextAnalyserPlatform | framework/src/main/scala/org/tap/framework/filesystem/FileHandling.scala | Scala | apache-2.0 | 2,099 |
trait A{
private var s = 1
def getS = s
}
object Test extends A {
def main(args: Array[String]): Unit = println(getS)
}
| yusuke2255/dotty | tests/run/i744.scala | Scala | bsd-3-clause | 126 |
package io.eels.component.csv
import java.nio.file.Paths
import com.sksamuel.exts.metrics.Timed
import io.eels.schema.StructType
import io.eels.{Frame, Row}
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.FileSystem
import scala.util.Random
/**
* v0.90 1m rows insertion: 1400 reading: 1324... | stheppi/eel | eel-components/src/test/scala/io/eels/component/csv/CsvSpeedTest.scala | Scala | apache-2.0 | 1,050 |
/*******************************************************************************
* 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/dsl/Group.scala | Scala | apache-2.0 | 1,335 |
/*
* Copyright 2017 David Schmitz
*
* 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... | dschmitz/recipe-service | src/main/scala/io/uport/recipe/swagger/SwaggerDocService.scala | Scala | apache-2.0 | 1,388 |
/* Copyright 2009-2021 EPFL, Lausanne */
import stainless.lang._
/** This benchmarks tests some potential issues with the legacy "bestRealType" function, which was original introduced to work around
* Scala's well-too-precise-for-Leon type inference. */
object BestRealTypes {
sealed abstract class Num
case class... | epfl-lara/stainless | frontends/benchmarks/verification/valid/BestRealTypes.scala | Scala | apache-2.0 | 819 |
/*
* Copyright 2010-2011 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 app... | krasserm/scalaz-camel | scalaz-camel-core/src/test/scala/scalaz/camel/core/CamelTest.scala | Scala | apache-2.0 | 15,056 |
package debop4s.data.orm.hibernate.utils
import java.lang.{Iterable => JIterable}
import java.util
import java.util.{Collection => JCollection, Collections, Comparator, List => JList, Locale, Map => JMap}
import debop4s.core.ValueObject
import debop4s.core.json.{JacksonSerializer, JsonSerializer}
import debop4s.core.... | debop/debop4s | debop4s-data-orm/src/main/scala/debop4s/data/orm/hibernate/utils/EntityUtils.scala | Scala | apache-2.0 | 10,900 |
package nibbler
import nibbler.io.HistdataTimestampParser
import org.scalatest.FunSuite
import org.scalatest.matchers.ShouldMatchers
import org.scalatest.mock.MockitoSugar
class HistdataTimestampParserTest extends FunSuite with MockitoSugar with ShouldMatchers {
test("should parse timestamp") {
// Given
v... | pkoperek/nibbler | src/test/scala/nibbler/HistdataTimestampParserTest.scala | Scala | gpl-3.0 | 536 |
package scalaxy.extensions
package test
import org.junit._
import Assert._
import scalaxy.debug._
import java.io._
import scala.collection.mutable
import scala.reflect.internal.util._
import scala.tools.nsc._
import scala.tools.nsc.plugins._
import scala.tools.nsc.reporters._
trait TestBase {
import MacroExtensi... | nativelibs4java/Scalaxy | Obsolete/MacroExtensions/src/test/scala/scalaxy/extensions/TestBase.scala | Scala | bsd-3-clause | 4,518 |
package com.sksamuel.elastic4s
/**
* Converts between scala types and types that Elasticsearch understands.
*/
object FieldsMapper {
import scala.collection.JavaConverters._
def mapper(m: Map[String, Any]): Map[String, AnyRef] = {
m map {
case null => null
case (name: String, nest: Map[_, _]) =... | aroundus-inc/elastic4s | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/FieldsMapper.scala | Scala | apache-2.0 | 2,245 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | tophua/spark1.52 | sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala | Scala | apache-2.0 | 9,356 |
package test
import edu.mit.csail.cap.query._
/** Examples relying on data collected from real applications */
class SwingTextAreaDemo extends SynthesisTest {
override def default = super.default.copy(
PrintStrings = false,
PrintPrimitives = false)
def metadata = "meta_swing"
test("TextAreaDemo moveCar... | kyessenov/semeru | src/test/scala/test/SwingTextAreaDemo.scala | Scala | gpl-3.0 | 941 |
/*
* 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 ... | minixalpha/spark | sql/core/src/test/scala/org/apache/spark/sql/execution/debug/DebuggingSuite.scala | Scala | apache-2.0 | 1,731 |
package ml.sparkling.graph.loaders
import org.apache.spark.SparkContext
import org.apache.spark.graphx.GraphLoader
import org.scalatest._
/**
* Created by Roman Bartusiak (roman.bartusiak@pwr.edu.pl http://riomus.github.io).
*/
abstract class LoaderTest(implicit sc:SparkContext) extends FlatSpec with BeforeAndAfte... | sparkling-graph/sparkling-graph | loaders/src/test/scala/ml/sparkling/graph/loaders/LoaderTest.scala | Scala | bsd-2-clause | 451 |
package play.api.db.evolutions
import java.io._
import scalax.file._
import scalax.io.JavaConverters._
import play.core._
import play.api._
import play.api.db._
import play.api.libs._
import play.api.libs.Codecs._
import javax.sql.DataSource
import java.sql.{ Statement, Date, Connection, SQLException }
import scala... | noel-yap/setter-for-catan | play-2.1.1/framework/src/play-jdbc/src/main/scala/play/api/db/evolutions/Evolutions.scala | Scala | apache-2.0 | 20,609 |
package scalan.primitives
import scalan.staged.BaseExp
import scalan.{ ScalanExp, Scalan, ScalanStd }
import scalan.Scalan
trait StringOps extends UnBinOps { self: Scalan =>
implicit class StringOpsCls(lhs: Rep[String]) {
def toInt = StringToInt(lhs)
def toDouble = StringToDouble(lhs)
def length = Strin... | scalan/scalan | core/src/main/scala/scalan/primitives/StringOps.scala | Scala | apache-2.0 | 2,655 |
package nl.gn0s1s.julius
import scala.annotation.tailrec
import org.scalacheck._
import org.scalacheck.Prop.forAll
object JuliusSpec extends Properties("Julius") {
import Generators._
import RomanDigit._
import RomanNumeral._
property("RomanDigit.generator only generates roman digits") = forAll { r: RomanDi... | Philippus/julius | src/test/scala/nl/gn0s1s/julius/JuliusSpec.scala | Scala | mpl-2.0 | 10,371 |
package devnull.rest.helpers
import javax.servlet.http.HttpServletRequest
import devnull.rest.dto.FaultResponse
import devnull.rest.helpers.ResponseWrites.ResponseJson
import org.json4s.{JValue, StreamInput}
import org.json4s.native.JsonMethods
import unfiltered.directives.Directive
import unfiltered.directives.Direc... | javaBin/devnull | src/main/scala/devnull/rest/helpers/EitherDirective.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 may ... | abhishek-ch/incubator-ignite | modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/ping/VisorPingCommand.scala | Scala | apache-2.0 | 6,151 |
import sbt._
import Keys._
// ===========================================================================
object BuildSettings {
val defaultSettings =
Defaults.defaultSettings ++
Resolvers.settings ++
Publishing.settings ++ Seq(
organization := "hr.element.proxykwai",
crossScalaVersions :=... | melezov/proxykwai | project/ProxyKwaiBuild.scala | Scala | bsd-3-clause | 3,067 |
/*
* 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/t-streams | src/test/scala/com/bwsw/tstreams/agents/integration/ProducerSubscriberPartitionCheckpointTest.scala | Scala | apache-2.0 | 2,565 |
package charactor.core.messages
class MoveAnywhereMessage(val speed: Double)
{
} | PiotrTrzpil/charactor | src/charactor/core/messages/MoveAnywhereMessage.scala | Scala | apache-2.0 | 82 |
/*
* 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/ems | core/src/main/scala/org/beangle/ems/core/user/service/impl/CsvDataResolver.scala | Scala | lgpl-3.0 | 3,115 |
/*
* 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 ... | dmlc/mxnet | scala-package/core/src/main/scala/org/apache/mxnet/DType.scala | Scala | apache-2.0 | 1,746 |
package uk.co.odinconsultants.graph.impl
import java.lang.Math.pow
import scala.collection.immutable.Seq
import scala.collection.mutable.ArrayBuffer
object GraphGenerator {
type ComponentFn = Seq[VertexId] => Seq[Edge]
def and[T](t: T): T = identity(t)
def stronglyConnectedComponents: ComponentFn = { vertic... | PhillHenry/palgorithms | src/test/scala/uk/co/odinconsultants/graph/impl/GraphGenerator.scala | Scala | apache-2.0 | 1,420 |
package scalariform.parser
import scalariform.lexer._
import scalariform.parser._
import org.scalatest.FlatSpec
import org.scalatest.matchers.ShouldMatchers
// format: +preserveSpaceBeforeArguments
class ParserTest extends FlatSpec with ShouldMatchers {
"Parser" should "throw a parse exception" in {
evaluatin... | triggerNZ/scalariform | scalariform/src/test/scala/com/danieltrinh/scalariform/parser/ParserTest.scala | Scala | mit | 1,809 |
/**
* Copyright: Copyright (C) 2016, ATS Advanced Telematic Systems GmbH
* License: MPL-2.0
*/
package org.genivi.sota.core
import java.security.MessageDigest
import akka.stream.scaladsl.Sink
import akka.util.ByteString
import org.apache.commons.codec.binary.Hex
import scala.concurrent.{ExecutionContext, Future}
... | PDXostc/rvi_sota_server | core/src/main/scala/org/genivi/sota/core/DigestCalculator.scala | Scala | mpl-2.0 | 708 |
/*
* Copyright (c) 2016 eBay Software Foundation.
*
* 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... | eBay/RTran | rtran-core/src/main/scala/com/ebay/rtran/core/UpgraderMeta.scala | Scala | apache-2.0 | 1,204 |
package org.jetbrains.plugins.scala
package lang
package parser
package parsing
package patterns
import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes
import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder
import org.jetbrains.plugins.scala.lang.parser.parsing.expressions.Literal
import... | jastice/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/parser/parsing/patterns/SimplePattern.scala | Scala | apache-2.0 | 6,837 |
/*
* 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 ... | ueshin/apache-flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/nodes/dataset/BatchScan.scala | Scala | apache-2.0 | 3,426 |
package gapt.expr.util
import gapt.expr.Apps
import gapt.expr.Const
import gapt.expr.Expr
import gapt.expr.ReductionRule
import gapt.expr.Var
import gapt.expr.formula.Formula
/**
* A conditional rewrite rule.
*
* An instance of this rule can be used to rewrite the left hand side
* into its right hand side only if... | gapt/gapt | core/src/main/scala/gapt/expr/util/ConditionalReductionRule.scala | Scala | gpl-3.0 | 1,439 |
/*
Copyright 2016-17, Hasso-Plattner-Institut fuer Softwaresystemtechnik 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 applicab... | bpn1/ingestion | src/main/scala/de/hpi/ingestion/deduplication/models/Candidate.scala | Scala | apache-2.0 | 912 |
package pureconfig.module.magnolia
import scala.collection.JavaConverters._
import scala.reflect.ClassTag
import _root_.magnolia._
import com.typesafe.config.{ConfigValue, ConfigValueFactory}
import pureconfig._
import pureconfig.generic.{CoproductHint, ProductHint}
/** An object containing Magnolia `combine` and `... | pureconfig/pureconfig | modules/magnolia/src/main/scala/pureconfig/module/magnolia/MagnoliaConfigWriter.scala | Scala | mpl-2.0 | 2,121 |
class Foo {
val bar = new Bar {
type S = Int
type T = Int => Int
type U = [X] =>> Int
val x: Long = 2L
def y: Boolean = true
def z(): Char = 'f'
def z2()(): Char = 'g'
def w[T]: String = "a"
def w2[T](a: Null)(b: Null): Null = null
}
}
trait Bar {
type S
type T
type U <: ... | som-snytt/dotty | tests/pos/simpleRefinement.scala | Scala | apache-2.0 | 444 |
/* scala-stm - (c) 2009-2010, Stanford University, PPL */
package scala.concurrent.stm
/** Provides all of the operations of a `Sink[A]`, without the ability to get
* a `Sink.View`.
*
* @author Nathan Bronson
*/
trait SinkLike[-A, Context] {
/** Performs a transactional write. The new value will not be vis... | nbronson/scala-stm | src/main/scala/scala/concurrent/stm/SinkLike.scala | Scala | bsd-3-clause | 1,469 |
package se.lu.nateko.cp.sbtdeploy
import sbt._
import sbt.Keys._
import sbt.plugins.JvmPlugin
import sbtassembly.AssemblyPlugin
import sbtbuildinfo.BuildInfoPlugin
import scala.sys.process.Process
object IcosCpSbtDeployPlugin extends AutoPlugin {
override def trigger = noTrigger
override def requires = AssemblyP... | ICOS-Carbon-Portal/infrastructure | sbt/icoscp-sbt-deploy/src/main/scala/se/lu/nateko/cp/sbtdeploy/IcosCpSbtDeployPlugin.scala | Scala | gpl-3.0 | 4,596 |
package edu.gemini.phase2.template.factory.impl.michelle
import edu.gemini.spModel.gemini.michelle.blueprint.SpMichelleBlueprintSpectroscopy
import edu.gemini.pot.sp.{ISPObservation, ISPGroup}
import edu.gemini.spModel.gemini.michelle.MichelleParams._
case class MichelleSpectroscopy(blueprint:SpMichelleBlueprintSpect... | arturog8m/ocs | bundle/edu.gemini.phase2.skeleton.servlet/src/main/scala/edu/gemini/phase2/template/factory/impl/michelle/MichelleSpectroscopy.scala | Scala | bsd-3-clause | 1,292 |
Subsets and Splits
Filtered Scala Code Snippets
The query filters and retrieves a sample of code snippets that meet specific criteria, providing a basic overview of the dataset's content without revealing deeper insights.