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) 2005, The OpenURP 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... | openurp/api | edu/src/main/scala/org/openurp/edu/program/domain/PlanUtils.scala | Scala | lgpl-3.0 | 1,073 |
package org.jetbrains.plugins.hocon
import java.net.{MalformedURLException, URL}
import java.{lang => jl, util => ju}
import com.intellij.lang.ASTNode
import com.intellij.openapi.util.TextRange
import com.intellij.psi.tree.{IElementType, TokenSet}
import com.intellij.psi.{PsiElement, PsiWhiteSpace}
import org.jetbrai... | ghik/intellij-hocon | src/org/jetbrains/plugins/hocon/CommonUtil.scala | Scala | apache-2.0 | 3,840 |
package io.zophie.api.event
// Used for DefaultEventBus eventhandler registry
import scala.collection.mutable.Map
// Used for async event trigger
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
// EventBus trait, a type of class which keeps track of EventHandlers on Events, a... | torstein-vik/zophie | src/main/scala/api/event/EventBus.scala | Scala | gpl-3.0 | 3,095 |
import scala.compiletime.ops.int.*
object Test:
val one: 1 = ???
val n: Int = ???
val m: Int = ???
| dotty-staging/dotty | bench/tests/compiletime-ops/empty.scala | Scala | apache-2.0 | 106 |
/*
* Scala (https://www.scala-lang.org)
*
* Copyright EPFL and Lightbend, Inc.
*
* 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.
*/
// GENERATED CODE: DO NOT EDIT... | scala/scala | src/library/scala/Tuple19.scala | Scala | apache-2.0 | 2,178 |
/*
* Copyright (c) 2012-2014 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at http://www.apach... | wesley1001/snowplow | 3-enrich/scala-common-enrich/src/test/scala/com.snowplowanalytics.snowplow.enrich.common/enrichments/miscEnrichmentSpecs.scala | Scala | apache-2.0 | 4,324 |
/**
* (c) Copyright 2013 WibiData, Inc.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of... | kijiproject/kiji-express-music | src/test/scala/org/kiji/express/music/SongPlayCounterSuite.scala | Scala | apache-2.0 | 3,713 |
package com.geishatokyo.sqlgen.process
import com.geishatokyo.sqlgen.core.{Sheet, Workbook}
/**
* Created by takezoux2 on 2017/07/05.
*/
object WorkbookMerger {
def merge(w1: Workbook, w2: Workbook) = {
w2.sheets.foreach(s => {
if(w1.hasSheet(s.name)) {
mergeSheet(w1(s.name), s)
} else... | geishatokyo/sql-generator | src/main/scala/com/geishatokyo/sqlgen/process/WorkbookMerger.scala | Scala | mit | 578 |
package CQLConnect
import com.weather.scalacass.ScalaSession
object Queries {
def previous_poll_query( keyspace: String, table: String ) : String = {
val previous_poll_query =
s"""SELECT
| actual_loop_id,
| time,
| vcc,
| channel,
| active_passive_reply,... | AkhilNairAmey/CQLConnect | java/Queries.scala | Scala | mit | 1,151 |
/*
* 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 ... | goldmedal/spark | sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestData.scala | Scala | apache-2.0 | 11,135 |
// timber -- Copyright 2012-2021 -- Justin Patterson
//
// 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... | scalawag/timber | tests/DebugMode/src/test/scala/test/DebugModeTest.scala | Scala | apache-2.0 | 1,417 |
package ml.combust.mleap.xgboost.runtime.bundle.ops
import java.io.ByteArrayInputStream
import java.nio.file.Files
import ml.combust.bundle.BundleContext
import ml.combust.bundle.dsl.{Model, Value}
import ml.combust.bundle.op.OpModel
import ml.combust.mleap.bundle.ops.MleapOp
import ml.combust.mleap.runtime.MleapCont... | combust/mleap | mleap-xgboost-runtime/src/main/scala/ml/combust/mleap/xgboost/runtime/bundle/ops/XGBoostRegressionOp.scala | Scala | apache-2.0 | 1,812 |
package com.ubirch.user.core.manager
import com.typesafe.scalalogging.StrictLogging
import com.ubirch.user.config.Config
import com.ubirch.user.model.db.Context
import com.ubirch.util.mongo.connection.MongoUtil
import com.ubirch.util.mongo.format.MongoFormats
import reactivemongo.api.collections.bson.BSONCollection
im... | ubirch/ubirch-user-service | core/src/main/scala/com/ubirch/user/core/manager/ContextManager.scala | Scala | apache-2.0 | 3,868 |
package com.socrata.datacoordinator.truth.sql
package sample
import java.sql.{Types, PreparedStatement, ResultSet}
class SamplePointColumnRep(val base: String) extends SqlColumnRep[SampleType, SampleValue] {
def representedType = SamplePointColumn
val sqlTypes = Array("DOUBLE PRECISION", "DOUBLE PRECISION")
va... | socrata-platform/data-coordinator | coordinatorlib/src/main/scala/com/socrata/datacoordinator/truth/sql/sample/SamplePointColumnRep.scala | Scala | apache-2.0 | 1,401 |
package org.oneugene.lens
import java.util.concurrent.TimeUnit
import org.oneugene.log.play.TestConstants
import org.openjdk.jmh.annotations.{Benchmark, BenchmarkMode, Mode, OutputTimeUnit}
import org.openjdk.jmh.infra.Blackhole
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@BenchmarkMode(Array(Mode.AverageTime))
class Lens... | oneugene/evgeniy-portfolio | jmhtests/src/main/scala/org/oneugene/lens/LensPerformanceTest.scala | Scala | mit | 1,454 |
/*
* Copyright 2020 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-authorised-frontend | src/test/scala/uk/gov/hmrc/play/frontend/auth/UserSessionDataSpec.scala | Scala | apache-2.0 | 2,962 |
/*
* 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/ct-calculations | src/main/scala/uk/gov/hmrc/ct/computations/calculations/LowEmissionCarsCalculator.scala | Scala | apache-2.0 | 9,019 |
/*
* Copyright (c) 2011 Miles Sabin
*
* 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... | retronym/shapeless | src/test/scala/shapeless/hlist.scala | Scala | apache-2.0 | 26,862 |
package com.todesking.jcon
import Implicits._
case class Command(proc:Context=>Boolean) {
def execute(ctx:Context):Boolean = proc(ctx)
}
object Command {
import scala.util.parsing.combinator._
object Parser extends RegexParsers {
val ALL = ("""exit|quit|:?q""".r ^^ {q => Quit}) | (":i(nfo)?".r ^^ {_ => In... | todesking/jcon | src/main/scala/Command.scala | Scala | gpl-3.0 | 1,953 |
package com.cloudray.scalapress.plugin.ecommerce.controller.admin
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.{RequestParam, PathVariable, RequestMethod, ModelAttribute, RequestMapping}
import com.cloudray.scalapress.plugin.ecommerce.domain.Address
import scala.Array... | vidyacraghav/scalapress | src/main/scala/com/cloudray/scalapress/plugin/ecommerce/controller/admin/AddressEntryController.scala | Scala | apache-2.0 | 1,619 |
/*
* scala-bcp-rpc
* Copyright 2014 深圳岂凡网络有限公司 (Shenzhen QiFun Network Corp., LTD)
*
* 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... | qifun/scala-bcp-rpc | src/main/scala/com/qifun/bcp/rpc/BcpRpc.scala | Scala | apache-2.0 | 872 |
/**
* Copyright (C) 2015 Orbeon, Inc.
*
* 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
* 2.1 of the License, or (at your option) any later version.
*
* This program i... | joansmith/orbeon-forms | src/main/scala/org/orbeon/oxf/xforms/submission/SerializationParameters.scala | Scala | lgpl-2.1 | 10,550 |
package org.opencoin.core.REST
import org.opencoin.core.token.{Blind,Coin}
case class RequestRenewalREST(
reference: Int,
coins: List[Coin],
blinds: List[Blind]) | OpenCoin/opencoin-issuer-scala | src/main/scala/org/opencoin/core/REST/RequestRenewalREST.scala | Scala | gpl-3.0 | 175 |
package nl.codecentric.assumption.dsl.api.word
import nl.codecentric.assumption.dsl.api.registry.DefinitionRegistry
import scala.concurrent.duration.FiniteDuration
/**
* Created by hylke on 02/07/15.
*/
trait GlueVerb {
def definitionRegistry: DefinitionRegistry
trait GlueVerbWrapper {
val leftSide: Stri... | craftsmenlabs/gareth-poc | dsl/api/src/main/scala/nl/codecentric/assumption/dsl/api/word/GlueVerb.scala | Scala | gpl-2.0 | 970 |
/* sbt -- Simple Build Tool
* Copyright 2009 Mark Harrah
*/
package sbt
import java.io.{ File, IOException }
import sbinary.{ DefaultProtocol, Format }
import DefaultProtocol._
import scala.reflect.Manifest
sealed trait FileInfo extends NotNull {
val file: File
}
sealed trait HashFileInfo extends FileInfo {
val... | pdalpra/sbt | cache/src/main/scala/sbt/FileInfo.scala | Scala | bsd-3-clause | 5,368 |
/* Copyright 2009-2016 EPFL, Lausanne */
package leon
package purescala
import Common._
import Definitions._
import Expressions._
import Extractors._
import ExprOps._
import Types._
import Constructors._
import TypeOps.instantiateType
import xlang.Expressions._
object MethodLifting extends TransformationPhase {
v... | epfl-lara/leon | src/main/scala/leon/purescala/MethodLifting.scala | Scala | gpl-3.0 | 12,905 |
/** MACHINE-GENERATED FROM AVRO SCHEMA. DO NOT EDIT DIRECTLY */
package example.logical
import scala.annotation.switch
final case class LogicalSc(var data: BigDecimal, var fxField: fxType, var ts: java.time.Instant, var dt: java.time.LocalDate, var uuid: java.util.UUID, var dataBig: BigDecimal) extends org.apache.avr... | julianpeeters/avrohugger | avrohugger-core/src/test/expected/specific/example/logical/LogicalSc.scala | Scala | apache-2.0 | 5,152 |
/*
* Copyright 2016 The BigDL Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | intel-analytics/BigDL | scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/nn/GRU.scala | Scala | apache-2.0 | 7,421 |
package org.jetbrains.plugins.scala.testingSupport.scalatest.scala2_10.scalatest2_2_1
import org.jetbrains.plugins.scala.SlowTests
import org.jetbrains.plugins.scala.testingSupport.scalatest.SpecialCharactersTest
import org.junit.experimental.categories.Category
/**
* @author Roman.Shein
* @since 18.01.2015.
*/
@C... | jastice/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/testingSupport/scalatest/scala2_10/scalatest2_2_1/Scalatest2_10_2_2_1_SpecialCharactersTest.scala | Scala | apache-2.0 | 463 |
package quotidian.web
import javax.servlet.http.{HttpServlet, HttpServletRequest => Request, HttpServletResponse => Response}
import quotidian.{Config,Logging}
import quotidian.model.Quote
import quotidian.web.controller.{QuoteController,SearchController}
import velocity.VelocityView
class QuoteServlet extends QcServ... | bryanjswift/quotidian | src/main/scala/quotidian/web/QuoteServlet.scala | Scala | mit | 1,740 |
package fi.allacca
import android.provider.CalendarContract.Events
import android.content.ContentValues
import android.content.Context
import org.joda.time.DateTime
class CalendarEvent(val title: String, val startTime: Long, val endTime: Long, val description: String, val location: String = "", val allDay: Boolean = ... | timorantalaiho/allacca | spikes/calendar/src/main/scala/fi/allacca/calendarEvents.scala | Scala | gpl-3.0 | 1,632 |
/*
* Copyright 2001-2019 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/propspec/FixtureAsyncPropSpecLike.scala | Scala | apache-2.0 | 16,844 |
/*
* 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... | travisbrown/scalatest | src/test/scala/org/scalatest/NonImplicitAssertionsSuite.scala | Scala | apache-2.0 | 1,824 |
/*
* 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/amls-frontend | app/controllers/businessdetails/RegisteredOfficeIsUKController.scala | Scala | apache-2.0 | 3,636 |
/*
* Copyright 2011-2022 GatlingCorp (https://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | gatling/gatling | gatling-graphite/src/main/scala/io/gatling/graphite/OldGraphitePathPattern.scala | Scala | apache-2.0 | 2,986 |
package turkey
/**
* Provides classes for managing tasks on Mechanical Turk.
*/
package object tasks
| julianmichael/turkey | turkey/shared/src/main/scala/turkey/tasks/package.scala | Scala | mit | 106 |
/*
* Cancelled.scala
* (FScape)
*
* Copyright (c) 2001-2022 Hanns Holger Rutz. All rights reserved.
*
* This software is published under the GNU Affero General Public License v3+
*
*
* For further information, please contact Hanns Holger Rutz at
* contact@sciss.de
*/
package de.sciss.fscape.stream
fi... | Sciss/FScape-next | core/shared/src/main/scala/de/sciss/fscape/stream/Cancelled.scala | Scala | agpl-3.0 | 364 |
package org.mbari.vars.arctic
import java.io.File
import java.util.{Date, TimeZone}
import org.mbari.math.FastCollator
import org.slf4j.LoggerFactory
import vars.annotation.VideoFrame
import vars.annotation.ui.{StateLookup, ToolBelt}
import vars.shared.ui.GlobalStateLookup
import scala.collection.JavaConverters._
i... | hohonuuli/vars | vars-standalone/src/main/scala/org/mbari/vars/arctic/MergeVideoData.scala | Scala | lgpl-2.1 | 5,597 |
/*
* Copyright 2011-2019 Asakusa Framework Team.
*
* 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 ... | ashigeru/asakusafw-spark | compiler/src/test/scala/com/asakusafw/spark/compiler/graph/OutputClassBuilderSpec.scala | Scala | apache-2.0 | 6,764 |
package week02
object StructuralInductionOnTrees {;import org.scalaide.worksheet.runtime.library.WorksheetSupport._; def main(args: Array[String])=$execute{;$skip(67);
val x = 10;System.out.println("""x : Int = """ + $show(x ));$skip(12);
val y = 5;System.out.println("""y : Int = """ + $show(y ));$skip(16);... | juliocnsouzadev/scala_datascience | functional_program_design_in_scala/functional_program_design_in_scala/.worksheet/src/week02.StructuralInductionOnTrees.scala | Scala | mit | 1,759 |
package com.arcusys.valamis.persistence.impl.scorm.schema
import com.arcusys.valamis.persistence.common.DbNameUtils._
import com.arcusys.valamis.persistence.common.{LongKeyTableComponent, SlickProfile, TypeMapper}
import com.arcusys.valamis.persistence.impl.scorm.model.AttemptModel
import com.arcusys.valamis.util.Tupl... | igor-borisov/valamis | valamis-slick-persistence/src/main/scala/com/arcusys/valamis/persistence/impl/scorm/schema/AttemptTableComponent.scala | Scala | gpl-3.0 | 1,544 |
package com.github.mdr.mash.ns.core.help
import com.github.mdr.mash.functions.{ BoundParams, MashFunction, Parameter, ParameterModel }
import com.github.mdr.mash.inference._
import com.github.mdr.mash.ns.core.{ ClassClass, FunctionClass }
import com.github.mdr.mash.runtime._
object HelpFunction extends MashFunction("... | mdr/mash | src/main/scala/com/github/mdr/mash/ns/core/help/HelpFunction.scala | Scala | mit | 1,409 |
package com.malaska.spark.training.partitioning
import org.apache.spark.Partitioner
import org.apache.spark.sql.SparkSession
object SimpleCustomPartitioner {
def main(args:Array[String]): Unit = {
val jsonPath = args(0)
val partitions = args(1).toInt
val sparkSession = SparkSession.builder
.mast... | TedBear42/spark_training | src/main/scala/com/malaska/spark/training/partitioning/SimpleCustomPartitioner.scala | Scala | apache-2.0 | 1,523 |
/**
* Copyright 2010 Mission Motors, Inc.
* Kindly released under the Apache Source License (http://www.apache.org/licenses/LICENSE-2.0.html) on Feb 19th, 2013
*/
package com.ridemission.rest
import scala.util.matching._
import scala.io._
import scala.collection.mutable.ListBuffer
import java.io._
import java.net.... | NileshP/arduleader | common/src/main/scala/com/ridemission/rest/HttpConstants.scala | Scala | gpl-3.0 | 1,149 |
/*
* Copyright 2013 zhongl
*
* 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 w... | javachengwc/HouseMD | src/main/scala/com/github/zhongl/housemd/command/MethodFilter.scala | Scala | apache-2.0 | 2,667 |
package com.twitter.finatra.http.response
import com.twitter.finagle.http.{Response, Status}
import com.twitter.finagle.http.Status._
import com.twitter.util.{Return, Try}
object ResponseUtils {
val Http4xxOr5xxResponses: PartialFunction[Try[Response], Boolean] = {
case Return(response) if is4xxOr5xxResponse(r... | twitter/finatra | http-core/src/main/scala/com/twitter/finatra/http/response/ResponseUtils.scala | Scala | apache-2.0 | 2,243 |
package org.hammerlab.guacamole.filters.somatic
import org.apache.spark.rdd.RDD
import org.hammerlab.guacamole.variants.CalledSomaticAllele
object SomaticMedianMismatchFilter {
def hasMaximumMedianMismatch(somaticGenotype: CalledSomaticAllele,
maximumMedianMismatches: Int): Boolean =... | hammerlab/guacamole | src/main/scala/org/hammerlab/guacamole/filters/somatic/SomaticMedianMismatchFilter.scala | Scala | apache-2.0 | 1,086 |
class B[@specialized(Int) T](t: T) {
val a = t
val b = "?"
}
object Test {
def main(args: Array[String]): Unit =
println(new B(42).b)
}
| scala/scala | test/files/run/t4511.scala | Scala | apache-2.0 | 147 |
package org.scalaide.debug.internal.model
import java.util.concurrent.ConcurrentHashMap
import scala.collection.JavaConverters.asScalaBufferConverter
import scala.collection.JavaConverters.mapAsScalaConcurrentMapConverter
import scala.concurrent.Future
import org.scalaide.debug.internal.JdiEventReceiver
import org.... | scala-ide/scala-ide | org.scala-ide.sdt.debug/src/org/scalaide/debug/internal/model/ScalaDebugCache.scala | Scala | bsd-3-clause | 13,079 |
package com.etsy.sahale
import org.junit.runner.RunWith
import org.scalatest._
import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
class FlowStatusSpec extends FlatSpec with ShouldMatchers {
val initialExpected = Map[String, String](
"jt_url" -> FlowTracker.UNKNOWN,
"user_name" -> System... | ind9/Sahale | src/test/scala/FlowStatusSpec.scala | Scala | mit | 869 |
package mlbigbook.math
import breeze.linalg.DenseVector
class MathVectorOpsDenseLongTest
extends AbstractMathVectorOpsT[Long, DenseVector] {
import MathVectorOps.Implicits._
override val vops = implicitly[MathVectorOps.Type[Long, DenseVector]]
override def int2num(i: Int) = i.toLong
override def dbl2num(... | malcolmgreaves/bigmlbook | fp4ml-main/src/test/scala/mlbigbook/math/MathVectorOpsDenseLongTest.scala | Scala | lgpl-3.0 | 431 |
/*
* #%L
* GatlingCql
* %%
* Copyright (C) 2014 Mikhail Stepura
* %%
* 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... | infomaven/GatlingCql | src/main/scala/io/github/gatling/cql/CqlStatement.scala | Scala | mit | 2,266 |
package russoul.lib.common.scene
import russoul.lib.common.{Mat4F, Real, Real3, Real3F, RealF, TypeClasses, V4, Vec3}
import russoul.lib.common.math.geometry.complex.Frustum
import russoul.lib.common.math.geometry.simple.{RayOver, RectangleOver}
import russoul.lib.common.Implicits._
import russoul.lib.common.math.alge... | Russoul/UniScalaLib | src/main/scala/russoul/lib/common/scene/Camera.scala | Scala | mit | 2,842 |
package fr.janalyse.ssh
import org.slf4j._
trait SSHLazyLogging {
val logger: Logger = LoggerFactory.getLogger(getClass)
}
| dacr/jassh | src/main/scala/fr/janalyse/ssh/SSHLazyLogging.scala | Scala | apache-2.0 | 127 |
package other
import com.excilys.ebi.gatling.core.Predef._
import com.excilys.ebi.gatling.http.Predef._
import com.excilys.ebi.gatling.jdbc.Predef._
import com.excilys.ebi.gatling.http.Headers.Names._
import com.excilys.ebi.gatling.redis.Predef.redisFeeder
import akka.util.duration._
import bootstrap._
import com.redi... | krishnenc/gatling-sbt | src/main/scala/other/ByteArrayBodySimulation.scala | Scala | mit | 1,382 |
package hoconspring
import java.{lang => jl, util => ju}
import com.typesafe.config.{Config, ConfigFactory}
import org.scalatest.FunSuite
import org.springframework.beans.factory.support.DefaultListableBeanFactory
import org.springframework.context.support.GenericApplicationContext
import org.springframework.core.Def... | ghik/hocon-spring | src/test/scala/hoconspring/HoconBeanDefinitionReaderTest.scala | Scala | apache-2.0 | 2,156 |
object Example1 extends OptionsDSL {
def main ( args: Array[String]) = {
// A call with strike $110 purchased 30 days before expiration when the price was $100
var call = Option call 110 expiration 30 volatility 0.35 fillCost 100
// Value 15 days later at underlying price $100
println(call time 15 ... | Nic0S/Options-DSL | src/Example1.scala | Scala | apache-2.0 | 699 |
package quizleague.web.core
import com.felstar.scalajs.vue.VuetifyComponent
import scalajs.js
import com.felstar.scalajs.vue.VueComponent
import com.felstar.scalajs.vue.VueRxComponent
import com.felstar.scalajs.vue.VuetifyComponent
trait GridSizeComponentConfig extends Component{
type facade <: VueRxComponent w... | gumdrop/quizleague-maintain | js/src/main/scala/quizleague/web/core/GridSizeComponent.scala | Scala | mit | 539 |
package breeze.linalg.operators
import breeze.storage.Zero
import breeze.math.{Field, Ring, Semiring}
import breeze.linalg.support.{CanZipMapKeyValues, CanTransformValues, CanZipMapValues, CanCopy}
import breeze.generic.UFunc
import breeze.linalg._
trait CounterOps {
implicit def canCopy[K1, V:Zero:Semiring]:CanCop... | claydonkey/breeze | math/src/main/scala/breeze/linalg/operators/CounterOps.scala | Scala | apache-2.0 | 11,160 |
package com.lucidchart.aspell
import scala.util.Try
private[aspell] class Aspell {
// initialize aspell for a given language
@native def init(language: String): Boolean
// clean up allocations on heap/other leakable structures
@native def cleanup()
// Check a word and return suggestions, if any
@native... | lucidsoftware/lucid-aspell | src/main/scala/com/lucidchart/aspell/Aspell.scala | Scala | apache-2.0 | 2,243 |
package models
import db.{CouponDto, CruitedProductDto, EditionDto, ReductionDto}
import models.frontend.FrontendOrder
import play.api.Logger
case class Order(id: Option[Long],
editionId: Long,
containedProductCodes: List[String],
couponId: Option[Long],
... | PanzerKunst/redesigned-cruited.com-frontend | website/app/models/Order.scala | Scala | gpl-3.0 | 6,218 |
/*
* Copyright (C) 2011 Romain Reuillon
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This progra... | ISCPIF/PSEExperiments | openmole-src/openmole/core/org.openmole.core.filedeleter/src/main/scala/org/openmole/core/filedeleter/FileDeleter.scala | Scala | agpl-3.0 | 1,817 |
package router
import dao._
import model._
import org.specs2.mock._
import org.specs2.mutable.Specification
import router.dto.EventDayDto
import service.{ EventDayService, UserService }
import spray.http.{ BasicHttpCredentials, StatusCodes }
import spray.httpx.SprayJsonSupport._
import spray.testkit.Specs2RouteTest
im... | Gneotux/pfc | src/test/scala/router/EventDayIntegrationSpec.scala | Scala | apache-2.0 | 3,605 |
/*
* 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 ... | darionyaphet/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateFormatter.scala | Scala | apache-2.0 | 4,011 |
package catherine.cli
import catherine.ASG._
import catherine._
case class Config(
user: String = "core",
instanceType: String = "t2.micro",
spot: Boolean = false,
desiredInstances: Int = 1,
replicas: Int = 0,
... | mindfulmachines/catherine | src/main/scala/catherine/cli/CLI.scala | Scala | mit | 13,764 |
/*
* Copyright (C) 2016. envisia GmbH
* All Rights Reserved.
*/
package de.envisia.postgresql.parsers
import java.nio.ByteBuffer
import de.envisia.postgresql.message.backend.{ ProcessData, ServerMessage }
object BackendKeyDataParser extends MessageParser {
override def parseMessage(buf: ByteBuffer): ServerMess... | schmitch/akka-pg | src/main/scala/de/envisia/postgresql/parsers/BackendKeyDataParser.scala | Scala | apache-2.0 | 375 |
/*
* 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... | lresende/incubator-toree | protocol/src/test/scala/org/apache/toree/kernel/protocol/v5/content/InspectReplyErrorSpec.scala | Scala | apache-2.0 | 2,716 |
/*
* 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 ... | openwhisk/openwhisk | common/scala/src/main/scala/org/apache/openwhisk/core/database/CouchDbRestStore.scala | Scala | apache-2.0 | 23,267 |
package looty
package poeapi
import looty.util.AjaxHelp
import AjaxHelp.HttpRequestTypes
import AjaxHelp.HttpRequestTypes.HttpRequestType
import looty.util.JsPromises.JsFutureFailure
import scala.scalajs.js
import org.scalajs.jquery.JQueryStatic
import scala.concurrent.{Future, Promise}
import scala.util.{Success, F... | mihailim/looty | looty/src/main/scala/looty/poeapi/PoeRpcs.scala | Scala | gpl-2.0 | 8,701 |
package org.geoscript
import org.scalatest._, matchers._
import feature._, feature.schemaBuilder._
import geometry._, geometry.builder._
import projection._
class UsageTests extends FunSuite with ShouldMatchers {
// test("work like on the geoscript homepage") {
// val NAD83 = lookupEPSG("EPSG:26912").get
... | dwins/geoscript.scala | geoscript/src/test/scala/UsageTests.scala | Scala | mit | 3,623 |
/* Swinemeeper, Copyright (C) 2013 Chris Reuter. GPL, No Warranty,
see Copyright.txt. */
package ca.blit.SwineMeeper
import scala.collection.immutable._
import scala.util._
/** Instances of this class represent individual squares of the game's
* map. They contain the square's mutable and immutable state.
*
... | suetanvil/swinemeeper | grid.scala | Scala | gpl-2.0 | 7,346 |
package com.example
object Main extends App {
println("Running Main")
}
| kxbmap/sbt-jooq | core/src/sbt-test/jooq/auto-library/changes/MainPlain.scala | Scala | apache-2.0 | 77 |
package controllers
import common.AppGlobal.SparkConfig
import org.scalatest._
import org.scalatestplus.play._
import play.api.mvc._
import play.api.test.Helpers._
import play.api.test._
import scala.concurrent.Future
class SearchSpec extends PlaySpec with Results with SparkBuilder {
class TestController() extend... | atware/activator-play-spark-react | test/controllers/SearchSpec.scala | Scala | apache-2.0 | 1,475 |
/*
* Copyright (c) 2014 Contributor. All rights reserved.
*/
package org.scalaide.debug.internal.preferences
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer
import org.eclipse.jface.preference.BooleanFieldEditor
import org.eclipse.jface.preference.FieldEditorPreferencePage
import org.eclips... | pilipolio/scala-ide | org.scala-ide.sdt.debug.expression/src/org/scalaide/debug/internal/preferences/ExprEvalPreferencePage.scala | Scala | bsd-3-clause | 3,582 |
/*
* Copyright 2012 Twitter Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed... | jeffreywugz/zipkin | zipkin-collector-core/src/test/scala/com/twitter/zipkin/collector/filter/ClientIndexFilterSpec.scala | Scala | apache-2.0 | 2,357 |
package com.imageintelligence.pix.core
import java.time.Instant
import java.util.UUID
case class ProcessedImage(
id: UUID,
batchId: UUID,
url: String,
blob: Array[Byte],
createdAt: Instant
)
object ProcessedImage {
def create(batchId: UUID, url: String, blob: Array[Byte]): ProcessedImage =
ProcessedI... | ImageIntelligence/pix-api | src/main/scala/com/imageintelligence/pix/core/ProcessedImage.scala | Scala | mit | 377 |
import stainless.lang._
object CopyMut {
case class Toto(var x: Int)
case class Foo(bar: Int, var toto: Toto) {
def double: Foo = this.copy(bar = bar * 2)
}
def prop = (Foo(41, Toto(1)).double.bar == 84).holds
}
| epfl-lara/stainless | frontends/benchmarks/extraction/invalid/CopyMut.scala | Scala | apache-2.0 | 229 |
package mesosphere.marathon
package core.launchqueue.impl
import akka.Done
import akka.actor.ActorRef
import akka.pattern.ask
import akka.util.Timeout
import com.typesafe.scalalogging.StrictLogging
import mesosphere.marathon.core.async.ExecutionContexts
import mesosphere.marathon.core.instance.update.InstanceChange
im... | janisz/marathon | src/main/scala/mesosphere/marathon/core/launchqueue/impl/LaunchQueueDelegate.scala | Scala | apache-2.0 | 5,129 |
package mesosphere.marathon
package raml
import mesosphere.marathon.Protos.ResidencyDefinition
import mesosphere.marathon.state._
import mesosphere.marathon.stream.Implicits._
import mesosphere.mesos.protos.Implicits._
import scala.concurrent.duration._
trait AppConversion extends DefaultConversions with ConstraintC... | meln1k/marathon | src/main/scala/mesosphere/marathon/raml/AppConversion.scala | Scala | apache-2.0 | 22,535 |
package chap4
object Exe3 extends App {
def map2[A, B, C](a: Option[A], b: Option[B])(f: (A, B) => C): Option[C] = {
for {
x <- a
y <- b
} yield f(x, y)
}
assert(map2(Some(1), Some(2))(_ + _) == Some(3))
assert(map2(Some(1), None)(_ + _) == None)
assert(map2(None: Option[Int], None)(_ + ... | ponkotuy/FPScala | src/main/scala/chap4/Exe3.scala | Scala | unlicense | 334 |
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.internal.langserver.codec
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
trait PositionFormats { self: sjsonnew.BasicJsonProtocol =>
implicit lazy val P... | xuwei-k/xsbt | protocol/src/main/contraband-scala/sbt/internal/langserver/codec/PositionFormats.scala | Scala | apache-2.0 | 1,146 |
package com.evojam.mongodb.evolutions
import com.typesafe.config.ConfigFactory
import com.evojam.mongodb.evolutions.clock.ClockComponent
import com.evojam.mongodb.evolutions.command.CommandsComponent
import com.evojam.mongodb.evolutions.config.{Configuration, ConfigurationComponent}
import com.evojam.mongodb.evolutio... | evojam/mongodb-evolutions-scala | src/main/scala/com/evojam/mongodb/evolutions/MongoEvolutionsComponent.scala | Scala | apache-2.0 | 1,518 |
/*
* 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... | datamountaineer/stream-reactor | kafka-connect-cassandra/src/test/scala/com/datamountaineer/streamreactor/connect/cassandra/config/TestCassandraSinkConfig.scala | Scala | apache-2.0 | 5,272 |
/*
* Copyright (C) 2016 Christopher Batey and Dogan Narinc
*
* 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... | mikefero/cpp-driver | gtests/src/integration/scassandra/server/server/src/test/scala/org/scassandra/server/priming/prepared/PrimePreparedPatternStoreTest.scala | Scala | apache-2.0 | 5,756 |
/*
* RangeScaleImpl.scala
* (FScape)
*
* Copyright (c) 2001-2022 Hanns Holger Rutz. All rights reserved.
*
* This software is published under the GNU Affero General Public License v3+
*
*
* For further information, please contact Hanns Holger Rutz at
* contact@sciss.de
*/
package de.sciss.fscape.strea... | Sciss/FScape-next | core/shared/src/main/scala/de/sciss/fscape/stream/impl/RangeScaleImpl.scala | Scala | agpl-3.0 | 2,194 |
/*
* Copyright (c) 2014 Pwootage
*
* This file is part of SASM.
*
* SASM 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 Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ... | Pwootage/SASM | src/main/scala/com/pwootage/sasm/exceptions/InvalidInstructionException.scala | Scala | gpl-3.0 | 899 |
package com.github.nicholasren.moco.wrapper
import com.github.dreamhead.moco.{ResponseHandler, RequestMatcher}
import com.github.nicholasren.moco.dsl.SMoco
class PartialRule(matcher: RequestMatcher, moco: SMoco) {
def andThen(handler: ResponseHandler): SMoco = {
moco.record(new Rule(Some(matcher), handler))
... | nicholasren/moco-scala | src/main/scala/com/github/nicholasren/moco/wrapper/PartialRule.scala | Scala | mit | 333 |
package scala.tools.nsc
package backend.jvm
import scala.tools.asm
import scala.tools.nsc.backend.jvm.BTypes.InternalName
/**
* Core BTypes and some other definitions. The initialization of these definitions requires access
* to symbols / types (global).
*
* The symbols used to initialize the ClassBTypes may chan... | felixmulder/scala | src/compiler/scala/tools/nsc/backend/jvm/CoreBTypes.scala | Scala | bsd-3-clause | 22,666 |
import java.util.List
import ie.nuig.entitylinking.core.{AnnotatedMention, ELDocument}
import ie.nuig.entitylinking.main.nel.EntityLinkingMain
import scala.collection.JavaConversions._
object NUIGEntityLinkingTest {
def main(args: Array[String]) {
//config file path that contains paths for classifier and c... | canademar/me_extractors | BRMDemoReview/src/main/scala/NUIGEntityLinkingTest.scala | Scala | gpl-2.0 | 1,506 |
package deburnat.transade.gui.components
import javax.swing.{Icon, ImageIcon, JOptionPane}
import JOptionPane.{getRootFrame, showOptionDialog, CLOSED_OPTION, YES_OPTION, YES_NO_OPTION, QUESTION_MESSAGE}
import deburnat.transade.MainFrame.top.getCenter
import deburnat.transade.gui.admins.GuiAdmin._
/**
* Project name... | deburnatshazem/transade | gui/src/main/scala/deburnat/transade/gui/components/TransOptionPane.scala | Scala | apache-2.0 | 3,330 |
package mesosphere.marathon
package core.externalvolume.impl.providers
import scala.jdk.CollectionConverters._
import mesosphere.UnitTest
import mesosphere.marathon.state.{CSIExternalVolumeInfo, ExternalVolume, VolumeMount}
import org.apache.mesos.Protos.Volume.Source.{CSIVolume => MesosCSIVolume}
import org.apache.me... | mesosphere/marathon | src/test/scala/mesosphere/marathon/core/externalvolume/impl/providers/CSIProviderVolumeToUnifiedMesosVolumeTest.scala | Scala | apache-2.0 | 2,068 |
package org.elastic.rest.scala.driver.utils
import org.elastic.rest.scala.driver.test_utils.SampleResources._
import org.elastic.rest.scala.driver.RestBase._
import org.elastic.rest.scala.driver.RestResources._
import org.elastic.rest.scala.driver.RestBase.BaseDriverOp
import utest._
import scala.concurrent.E... | Alex-At-Home/rest_client_library | rest_scala_core/shared/src/test/scala/org/elastic/rest/scala/driver/utils/MockRestDriverTests.scala | Scala | apache-2.0 | 1,183 |
/*
* 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... | vmanoria/bluemix-hue-filebrowser | hue-3.8.1-bluemix/apps/spark/java/livy-server/src/main/scala/com/cloudera/hue/livy/server/batch/BatchSessionProcess.scala | Scala | gpl-2.0 | 3,300 |
package uk.gov.gds.ier.client
import uk.gov.gds.ier.model.{Fail, ApiResponse, Success}
import play.api.libs.ws.{WS, Response}
import scala.concurrent.duration._
import scala.concurrent.Await
import play.api.http._
import uk.gov.gds.ier.guice.WithConfig
import org.joda.time.DateTime
import uk.gov.gds.ier.logging.Loggin... | michaeldfallen/ier-frontend | app/uk/gov/gds/ier/client/ApiClient.scala | Scala | mit | 4,605 |
/*
* 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 ... | maropu/spark | graphx/src/main/scala/org/apache/spark/graphx/GraphLoader.scala | Scala | apache-2.0 | 3,864 |
package is.hail.services
import is.hail.utils._
import org.json4s.{DefaultFormats, Formats}
import java.io.{File, FileInputStream}
import java.security.KeyStore
import javax.net.ssl.{KeyManagerFactory, SSLContext, TrustManagerFactory}
import org.apache.log4j.{LogManager, Logger}
import org.json4s.jackson.JsonMethods
... | danking/hail | hail/src/main/scala/is/hail/services/tls/package.scala | Scala | mit | 1,960 |
/*
* Copyright (c) 2011-2017 Interfaculty Department of Geoinformatics, University of
* Salzburg (Z_GIS) & Institute of Geological and Nuclear Sciences Limited (GNS Science)
* in the SMART Aquifer Characterisation (SAC) programme funded by the New Zealand
* Ministry of Business, Innovation and Employment (MBIE)
*
... | ZGIS/smart-portal-backend | app/Module.scala | Scala | apache-2.0 | 2,427 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | zhangminglei/flink | flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/TableSchema.scala | Scala | apache-2.0 | 6,939 |
package cromwell.engine
import cromwell.backend.wdl.ReadLikeFunctions
import cromwell.core.path.PathBuilder
import wom.values.{WomFile, WomValue}
import scala.concurrent.Future
import scala.util.{Failure, Try}
class WdlFunctions(val pathBuilders: List[PathBuilder]) extends ReadLikeFunctions {
private def fail(name... | ohsu-comp-bio/cromwell | engine/src/main/scala/cromwell/engine/WdlFunctions.scala | Scala | bsd-3-clause | 858 |
package ch.epfl.bluebrain.nexus.iam.realms
import java.time.Instant
import java.util.concurrent.TimeUnit
import akka.actor.{Actor, ActorLogging, ActorRef, ActorSystem, PoisonPill, Props, ReceiveTimeout}
import akka.cluster.sharding.ShardRegion.{ExtractEntityId, ExtractShardId, Passivate}
import akka.cluster.sharding.... | hygt/nexus-iam | src/main/scala/ch/epfl/bluebrain/nexus/iam/realms/Groups.scala | Scala | apache-2.0 | 8,381 |
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.