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 ch.bsisa.hyperbird.security
case class Role(name : String, ID_G : String, Id : String) {
} | bsisa/hb-api | app/ch/bsisa/hyperbird/security/Role.scala | Scala | gpl-2.0 | 100 |
sealed abstract class Base
object Test {
case object Up extends Base
def foo(d1: Base) =
d1 match {
case Up =>
}
// Sealed subtype: ModuleTypeRef <empty>.this.Test.Up.type
// Pattern: UniqueThisType Test.this.type
}
object Test1 {
sealed abstract class Base
object Base {
... | som-snytt/dotty | tests/patmat/t7285a.scala | Scala | apache-2.0 | 1,423 |
/*
* 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 ... | ueshin/apache-spark | sql/core/src/test/scala/org/apache/spark/sql/sources/DisableUnnecessaryBucketedScanSuite.scala | Scala | apache-2.0 | 11,903 |
package com.softwaremill.codebrag.usecases.reactions
import com.softwaremill.codebrag.domain.{CommitInfo, ReviewedCommit}
import com.softwaremill.codebrag.common.{EventBus, Clock}
import com.typesafe.scalalogging.slf4j.Logging
import com.softwaremill.codebrag.dao.commitinfo.CommitInfoDAO
import com.softwaremill.codebr... | softwaremill/codebrag | codebrag-service/src/main/scala/com/softwaremill/codebrag/usecases/reactions/ReviewCommitUseCase.scala | Scala | agpl-3.0 | 1,297 |
/***********************************************************************
* Copyright (c) 2013-2019 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | elahrvivaz/geomesa | geomesa-hbase/geomesa-hbase-datastore/src/test/scala/org/locationtech/geomesa/hbase/data/HBaseS3IndexTest.scala | Scala | apache-2.0 | 15,292 |
package controllers.sitedata.table
import javax.inject._
import play.api._
import play.api.mvc._
import play.api.data.Form
import play.api.data.Forms._
import play.api.data._
import models.sitedata.SiteInfo
import models.sitedata.SiteInfoDetail
import models.sitedata.SubZone
import models.sitedata.Zone
import models.s... | tnddn/iv-web | portal/rest-portal/app/controllers/sitedata/table/PetnameController.scala | Scala | apache-2.0 | 4,195 |
package breeze.stats
package distributions
/*
Copyright 2009 David Hall, Daniel Ramage
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 requir... | ktakagaki/breeze | src/main/scala/breeze/stats/distributions/Beta.scala | Scala | apache-2.0 | 5,080 |
/**
* Created by jdrews on 2/21/2015.
*
* Represents a log message.
*/
package com.jdrews.logstation.webserver
case class LogMessage(logMessage: String, logFile: String)
| jdrews/logstation | src/main/scala/com/jdrews/logstation/webserver/LogMessage.scala | Scala | apache-2.0 | 177 |
package se.culvertsoft.mgen.visualdesigner.view
import java.awt.BasicStroke
import java.awt.Color
import java.awt.Graphics2D
import java.awt.Point
import java.awt.Stroke
object Graphics2DOps {
implicit class RichGraphics2D(g: Graphics2D) {
def color(c: Color)(f: => Unit) {
val prevColor = g.getCol... | culvertsoft/mgen-visualdesigner | src/main/scala/se/culvertsoft/mgen/visualdesigner/view/Graphics2DOps.scala | Scala | gpl-2.0 | 859 |
import scala.collection.immutable._
case class Scrabble() {
private val letterMap = HashMap((List('A', 'E', 'I', 'O', 'U', 'L', 'N', 'R',
'S', 'T').zip(List.fill(10)(1)) ++
List('D', 'G').zip(List.fill(2)(2)) ++
List('B', 'C', 'M', 'P').zip(List.fill(4)(3)) ++
List('F', 'H', 'V', 'W', 'Y').zip(List.fill(5)... | stanciua/exercism | scala/scrabble-score/src/main/scala/ScrabbleScore.scala | Scala | mit | 601 |
/*
* 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 | sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala | Scala | apache-2.0 | 25,037 |
package org.apache.spark.hbase.helpers
import org.apache.hadoop.hbase.util.Bytes
import org.apache.spark.hbase.Serde
/**
* Created by mharis on 07/08/15.
*/
trait SerdeBool extends Serde[Boolean] {
final override def toBytes = (value: Boolean) => Bytes.toBytes(value)
final override def fromBytes = (bytes: Arra... | michal-harish/spark-on-hbase | src/main/scala/org/apache/spark/hbase/helpers/SerdeBool.scala | Scala | apache-2.0 | 373 |
/*
* 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 ... | greghogan/flink | flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/stream/sql/RelTimeIndicatorConverterTest.scala | Scala | apache-2.0 | 6,389 |
package org.scaladebugger.tool.commands
import java.io.File
import org.scaladebugger.api.profiles.traits.info.ThreadGroupInfo
import org.scaladebugger.api.utils.JDITools
import org.scaladebugger.test.helpers.ParallelMockFunSpec
import org.scalatest.concurrent.Eventually
import test.{ToolConstants, ToolFixtures, ToolT... | ensime/scala-debugger | scala-debugger-tool/src/it/scala/org/scaladebugger/tool/commands/ThreadGroupCommandIntegrationSpec.scala | Scala | apache-2.0 | 2,906 |
package edu.gemini.pit
import java.util.logging.{Logger, Level}
package object catalog {
val Log = Logger.getLogger(this.getClass.getPackage.getName)
type Callback = Result => Unit
implicit class StringPimp(val s:String) extends AnyVal {
def toDoubleOption = try {
Some(s.toDouble)
} catch {
... | arturog8m/ocs | bundle/edu.gemini.pit/src/main/scala/edu/gemini/pit/catalog/package.scala | Scala | bsd-3-clause | 745 |
package binconcifartests
import chisel3._
import chisel3.iotesters.{PeekPokeTester, Driver, ChiselFlatSpec}
import scala.util.Random
import binconcifar.PoolLayer
import scala.collection.mutable.ArrayBuffer
class PoolComputeTests( c : PoolLayer ) extends PeekPokeTester( c ) {
val myRand = new Random
val cycs = c.... | da-steve101/binary_connect_cifar | src/test/scala/PoolComputeSuite.scala | Scala | gpl-3.0 | 2,210 |
package com.twitter.finagle.ssl
import java.lang.reflect.Method
import java.util.logging.Logger
import org.jboss.netty.channel.{
ChannelHandlerContext, ChannelStateEvent, SimpleChannelUpstreamHandler
}
class SslShutdownHandler(o: Object) extends SimpleChannelUpstreamHandler {
private[this] val log = Logger.getLo... | enachb/finagle_2.9_durgh | finagle-core/src/main/scala/com/twitter/finagle/ssl/SslShutdownHandler.scala | Scala | apache-2.0 | 809 |
// Copyright (C) 2011-2012 the original author or authors.
// See the LICENCE.txt 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 ... | jkerfs/scalastyle | src/main/scala/org/scalastyle/scalariform/ScalaDocChecker.scala | Scala | apache-2.0 | 13,454 |
/*
* Copyright (C) 2013 Alcatel-Lucent.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* Licensed to you 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 cop... | molecule-labs/molecule | molecule-io-examples/src/main/scala/molecule/examples/io/choice/SimpleChoice.scala | Scala | apache-2.0 | 2,170 |
package org.jetbrains.plugins.scala.lang.formatting.settings.inference
import com.intellij.psi.codeStyle.CodeStyleScheme
import com.intellij.psi.impl.source.codeStyle.CodeStyleSchemesImpl
import org.jetbrains.plugins.scala.ScalaLanguage
import org.jetbrains.plugins.scala.components.RunOnceStartupActivity
import org.je... | JetBrains/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/formatting/settings/inference/LegacyCodeStyleSettingsComponent.scala | Scala | apache-2.0 | 1,394 |
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
*/
package play.api.inject
package guice
import com.google.inject.util.{ Modules => GuiceModules }
import com.google.inject.util.{ Providers => GuiceProviders }
import com.google.inject.Binder
import com.google.inject.CreationException
import com.google.... | benmccann/playframework | core/play-guice/src/main/scala/play/api/inject/guice/GuiceInjectorBuilder.scala | Scala | apache-2.0 | 16,470 |
package io.udash.benchmarks.properties
import io.udash._
import japgolly.scalajs.benchmark._
import japgolly.scalajs.benchmark.gui._
object TransformedSeqPropertyListeners extends BenchmarkUtils {
private val seqSize = 50
private val properties: Seq[(String, () => (SeqProperty[Int], ReadableSeqProperty[Int]))] = ... | UdashFramework/udash-core | benchmarks/.js/src/main/scala/io/udash/benchmarks/properties/TransformedSeqPropertyListeners.scala | Scala | apache-2.0 | 1,646 |
/*
* 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 | core/src/test/scala/org/apache/spark/shuffle/sort/SortShuffleWriterSuite.scala | Scala | apache-2.0 | 4,158 |
package frameless
import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.catalyst.expressions.{GenericInternalRow, UnsafeArrayData}
import org.apache.spark.sql.types._
import org.apache.spark.sql.FramelessInternals.UserDefinedType
@SQLUserDefinedType(udt = classOf[UdtEncodedClassUdt])
class UdtE... | adelbertc/frameless | dataset/src/test/scala/frameless/UdtEncodedClass.scala | Scala | apache-2.0 | 1,512 |
/*
* Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* 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 Fou... | tesendic/Relite | test-src/test2.scala | Scala | agpl-3.0 | 2,484 |
/*
* Copyright 2012 Pellucid and Zenexity
*
* 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 ag... | Enalmada/datomisca | core/src/main/scala/datomisca/excision.scala | Scala | apache-2.0 | 6,645 |
/*
* 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-core/src/main/scala/io/gatling/core/body/RawFileBodies.scala | Scala | apache-2.0 | 2,358 |
import sbt._
import Keys._
object build extends Build {
lazy val k1 = taskKey[Unit]("")
lazy val k2 = taskKey[Unit]("")
val UpdateK1 = Command.command("UpdateK1") { st: State =>
val ex = Project extract st
import ex._
val session2 = BuiltinCommands.setThis(st, ex, Seq(k1 := {}), """k1 := {
|//
... | xeno-by/old-scalameta-sbt | sbt/src/sbt-test/project/session-update-from-cmd/project/build.scala | Scala | bsd-3-clause | 676 |
/**
* 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... | junrao/kafka | core/src/main/scala/kafka/cluster/Broker.scala | Scala | apache-2.0 | 4,882 |
/*
* 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 ... | jongwook/incubator-s2graph | s2counter_core/src/main/scala/org/apache/s2graph/counter/core/TimedQualifier.scala | Scala | apache-2.0 | 7,224 |
package hyperdrive.cj.model
import shapeless._
import shapeless.labelled._
trait DataValueReader[T] {
def readDataValue(value: DataValue): Option[T]
}
object DataValueReader {
// implicit def optionDVR[T](implicit enc: DataValueReader[T]): DataValueReader[Option[T]] = new DataValueReader[Option[T]] {
// d... | ScalaConsultants/hyperdrive | src/main/scala/hyperdrive/cj/model/DataReader.scala | Scala | unlicense | 3,137 |
package xfp.fixedpoint
import xfp.utils.{BigRational => Rational}
import Rational._
import AffineUtils._
import collection.mutable.Queue
object FixedPointFormat {
/** Default bitvector length. */
var globalBitLength = 16
/** Default rounding mode. */
var globalRounding = false
/** Default setting for wheth... | malyzajko/xfp | analysis_tool/src/xfp/fixedpoint/FixedPointFormat.scala | Scala | bsd-3-clause | 5,920 |
/* Code Pulse: a real-time code coverage tool, for more information, see <http://code-pulse.com/>
*
* Copyright (C) 2014-2017 Code Dx, Inc. <https://codedx.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 ... | secdec/codepulse | hq/src/main/scala/com/secdec/bytefrog/hq/protocol/DataMessage.scala | Scala | apache-2.0 | 2,811 |
package org.scalatest.examples.funsuite.beforeandafter
import org.scalatest.FunSuite
import org.scalatest.BeforeAndAfter
import collection.mutable.ListBuffer
class ExampleSuite extends FunSuite with BeforeAndAfter {
val builder = new StringBuilder
val buffer = new ListBuffer[String]
before {
builder.appen... | hubertp/scalatest | examples/src/main/scala/org/scalatest/examples/funsuite/beforeandafter/ExampleSuite.scala | Scala | apache-2.0 | 715 |
package com.twitter.scrooge.backend.lua
import com.twitter.scrooge.ast._
import com.twitter.scrooge.backend.{Generator, GeneratorFactory, ServiceOption, TemplateGenerator}
import com.twitter.scrooge.frontend.ResolvedDocument
import com.twitter.scrooge.mustache.Dictionary.{CodeFragment, v}
import com.twitter.scrooge.mu... | twitter/scrooge | scrooge-generator/src/main/scala/com/twitter/scrooge/backend/lua/LuaGenerator.scala | Scala | apache-2.0 | 8,504 |
/*
* 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 | core/src/main/scala/org/apache/spark/deploy/history/HistoryPage.scala | Scala | apache-2.0 | 8,571 |
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); yo... | KevinLiLu/kafka | core/src/test/scala/integration/kafka/api/PlaintextProducerSendTest.scala | Scala | apache-2.0 | 4,459 |
/**
*
*/
package com.labjack
import com.sun.jna._
import com.sun.jna.win32.StdCallLibrary
import com.sun.jna.ptr._
/**
* LJM is the wrapper object to the LJM library's functions and constants.
* Refer to the LabJackM.h header file or online User's Guide for functions
* and constants documentation:<br>
* <br>
*... | porl/labjackscala | com/labjack/LJM.scala | Scala | mit | 26,766 |
/*
* 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-jms/src/main/scala/com/datamountaineer/streamreactor/connect/jms/sink/JMSSinkTask.scala | Scala | apache-2.0 | 3,126 |
package com.allaboutscala.learn.spark.functions
import com.allaboutscala.learn.spark.utils.Context
/**
* Created by Nadim Bahadoor on 28/06/2016.
*
* Tutorial: Learn How To Use Apache Spark
*
* [[http://allaboutscala.com/big-data/spark/]]
*
* Copyright 2016 Nadim Bahadoor (http://allaboutscala.com)
*... | nadimbahadoor/learn-spark | source-code/learn-spark/src/main/scala/com/allaboutscala/learn/spark/functions/Tutorial_14_DataFrameStringFunctions.scala | Scala | apache-2.0 | 1,841 |
/**
* Copyright (C) 2009-2017 Lightbend Inc. <http://www.lightbend.com>
*/
package akka.io
import java.net.InetSocketAddress
import java.nio.channels.{ SelectionKey, DatagramChannel }
import akka.actor.{ ActorRef, ActorLogging, Actor }
import akka.io.Udp.{ CommandFailed, Send }
import akka.io.SelectionHandler._
imp... | rorygraves/perf_tester | corpus/akka/akka-actor/src/main/scala/akka/io/WithUdpSend.scala | Scala | apache-2.0 | 3,363 |
package com.github.gdefacci.briscola
import argonaut._
import scalaz.{ -\/, \/, \/- }
import org.obl.raz.Path
import com.github.gdefacci.briscola.web.util.ArgonautHelper
import com.github.gdefacci.briscola.presentation.sitemap.SiteMap
import com.github.gdefacci.briscola.presentation._
import com.github.gdefacci.brisc... | gdefacci/briscola | ddd-briscola-web/src/test/scala/com/github/gdefacci/briscola/TestDecoders.scala | Scala | bsd-3-clause | 6,982 |
/*
* Copyright (c) 2010 e.e d3si9n
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish... | justjoheinz/scalaxb | cli/src/main/scala/scalaxb/compiler/xsd/XsTypeSymbol.scala | Scala | mit | 9,231 |
import sbt._
import sbt.Keys._
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
object deps {
// https://github.com/lihaoyi/scalatags
val scalatags = "0.5.2"
// https://github.com/lloydmeta/enumeratum
val enumeratum = "1.3.7"
val akka = "2.5.1"
val akkaHttp = "10.0.5"
... | sschaef/tooling-research | project/deps.scala | Scala | mit | 5,561 |
package feh.tec.visual.api
import java.awt.{Window, Component}
/**
* Draws `app` in `drawComponent` of `appWindow`
*/
trait AwtWindowedApp {
def appWindow: Window
def drawComponent: Component
def app: AgentApp with AppBasicControlApi
}
| fehu/agent-tareas | agent/src/main/scala/feh/tec/visual/api/AwtWindowedApp.scala | Scala | mit | 246 |
/*
* 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 ... | cloud-fan/spark | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisSuite.scala | Scala | apache-2.0 | 43,542 |
/*
* 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... | qiuxin2012/BigDL | spark/dl/src/test/scala/com/intel/analytics/bigdl/nn/MaxoutSpec.scala | Scala | apache-2.0 | 3,709 |
package com.agecomp.dts
import com.agecomp.Environment
import com.agecomp.AgentRef
import com.agecomp.InputComponent
import scala.concurrent.duration._
import scala.language.postfixOps
import akka.actor.PoisonPill
import javafx.stage.Stage
class FixedTimeEnvironment(val fps: Double, stage: Stage) extends Environment ... | abdielbrilhante/agecomp | src/main/scala/com/agecomp/dts/FixedTimeEnvironment.scala | Scala | mit | 950 |
/**
* (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-schema-shell | src/main/scala/org/kiji/schema/shell/util/ForkJvm.scala | Scala | apache-2.0 | 6,741 |
/*
# Copyright 2016 Georges Lipka
#
# 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 wri... | glipka/Easy-React-With-ScalaJS | src/main/scala/com/glipka/easyReactJS/reactBootstrap/InputGroupButton.scala | Scala | apache-2.0 | 853 |
import scala.reflect.runtime.universe._
import scala.tools.reflect.Eval
object Test extends dotty.runtime.LegacyApp {
reify {
val RegexParser = """(.*) \\d+([A-Z]+) \\| (.*) \\|.*""".r
val RegexParser(name, shortname, value) = "American Dollar 1USD | 2,8567 | sometext"
println("name = %s, shortname = %s,... | yusuke2255/dotty | tests/disabled/macro/run/t5273_2b_oldpatmat.scala | Scala | bsd-3-clause | 373 |
package service
import util.Directory._
import util.ControlUtil._
import SystemSettingsService._
import javax.servlet.http.HttpServletRequest
trait SystemSettingsService {
def baseUrl(implicit request: HttpServletRequest): String = loadSystemSettings().baseUrl(request)
def saveSystemSettings(settings: SystemSet... | tily/gitbucket2 | src/main/scala/service/SystemSettingsService.scala | Scala | apache-2.0 | 8,051 |
package org.litis.relief
import scala.math._
import scala.io.BufferedSource
import org.sofa.math.{Point3, Triangle, ConstTriangle, Rgba}
import java.io.{File, InputStream, FileInputStream, FileOutputStream, PrintStream, IOException}
import javax.imageio.ImageIO
/** Techniques of resizing of the heightmap. */
objec... | Ant01n3/ReliefExtruder | src/main/scala/org/litis/relief/HeightMap.scala | Scala | gpl-2.0 | 18,937 |
import com.typesafe.tools.mima.core._
import com.typesafe.tools.mima.core.ProblemFilters._
object BinaryIncompatibilities {
val IR = Seq(
)
val Tools = Seq(
)
val JSEnvs = Seq(
)
val SbtPlugin = Seq(
)
val TestAdapter = Seq(
)
val CLI = Seq(
)
}
| CapeSepias/scala-js | project/BinaryIncompatibilities.scala | Scala | bsd-3-clause | 276 |
class A
class B extends A
class C extends A
var a: A = new B()
a = new C()
// It works. Because a is A explicitly.
var b = new B()
b = new C()
// error: type mismatch;
// found : this.C
// required: this.B
// Because variable a is inferenced as B on line 5.
| sgkim126/snippets | scala/InferenceVariableType.scala | Scala | bsd-2-clause | 266 |
package cz.kamenitxan.jakon.utils.mail
import javax.mail.Message
trait EmailTypeHandler {
def handle(emailType: String): (Message, Map[String, Any]) => Unit
def afterSend(emailType: String): Unit
}
| kamenitxan/Jakon | modules/backend/src/main/scala/cz/kamenitxan/jakon/utils/mail/EmailTypeHandler.scala | Scala | bsd-3-clause | 205 |
/*
* 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.
*/
package scala
package tools.ns... | scala/scala | src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala | Scala | apache-2.0 | 96,939 |
/*
* Copyright 2014 Intelix Pty 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
*
* Unless required by applicable law or agreed... | mglukh/ehub | modules/core/src/main/scala/agent/flavors/files/ResourceCatalog.scala | Scala | apache-2.0 | 4,727 |
package ohnosequences.db.rna16s.test
import org.scalatest.FunSuite
import ohnosequences.files.read
import ohnosequences.faster.{FASTA, FASTAEntry}
import ohnosequences.db.rna16s, rna16s.Version
import org.scalatest.EitherValues._
class Mappings extends FunSuite {
test("There is a valid mapping to taxon ID for each... | ohnosequences/db.rna16s | src/test/scala/mappings.scala | Scala | agpl-3.0 | 1,077 |
package com.wallace.demo.rest.sever.demo.services.app.common
import spray.json._
/**
* Created by 10192057 on 2016/6/17.
*/
case class Person(name: List[String], age: List[Int])
case class NewPerson(name: String, age: Int)
object NewPersonProtocol extends DefaultJsonProtocol {
implicit object NewPersonForma... | LeagueForHacker/Rest-Sever-Demo | src/main/scala/com/wallace/demo/rest/sever/demo/services/app/common/Person.scala | Scala | mit | 904 |
package com.nielsen.ecom.wordseg
import akka.actor.Actor
import org.ansj.splitWord.analysis._
//#worker
class SegWorker extends Actor {
def receive = {
case word: String =>
val result = ToAnalysis.parse(word).toString()
sender() ! result
}
} | adrianwkj/web_akka | src/main/scala/com/nielsen/ecom/wordseg/Worker.scala | Scala | cc0-1.0 | 263 |
// lchannels - session programming in Scala
// Copyright (c) 2016, Alceste Scalas and Imperial College London
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source ... | scribble/scribble.github.io | src/main/jbake/assets/docs/lchannels/examples/src/main/scala/lchannels/examples/game/ClientB.scala | Scala | apache-2.0 | 4,296 |
/*
* Copyright 2014 IBM Corp.
*
* 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... | bpburns/spark-kernel | kernel/src/test/scala/com/ibm/spark/kernel/protocol/v5/magic/MagicManagerSpec.scala | Scala | apache-2.0 | 5,178 |
package springtastrophe.trees
import org.scalatest.{Matchers, FlatSpec}
class JavaClassTest extends FlatSpec with Matchers {
"An annotation finder" should "not find any annotations on a class ... with no annotations" in {
(pending)
}
it should "find the annotations on a class ... with annotations" in {
... | hamishdickson/springtastrophe | src/test/scala/springtastrophe/trees/JavaClassTest.scala | Scala | mit | 337 |
package org.odfi.indesign.core.module.ui.www.external
import com.idyria.osi.wsb.webapp.localweb.LocalWebHTMLVIew
import com.idyria.osi.vui.html.Html
import com.idyria.osi.wsb.webapp.localweb.DefaultLocalWebHTMLBuilder
import com.idyria.osi.vui.html.Head
import com.idyria.osi.vui.html.HTMLNode
import org.w3c.dom... | opendesignflow/indesign | indesign-wwwui/src/main/scala/org/odfi/indesign/core/module/ui/www/external/ExternalBuilder.scala | Scala | gpl-3.0 | 1,529 |
package au.com.feedbacker.controllers
import au.com.feedbacker.AllFixtures
import au.com.feedbacker.model.CredentialStatus.CredentialStatus
import au.com.feedbacker.model.{CredentialStatus, Person}
import org.scalatest.prop.PropertyChecks
import org.scalatestplus.play.PlaySpec
import play.api.mvc.Result
import play.ap... | lachlang/feedbacker | test/au/com/feedbacker/controllers/SessionManagerSpec.scala | Scala | apache-2.0 | 7,017 |
/*
* 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 ... | hequn8128/flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/catalog/BasicOperatorTable.scala | Scala | apache-2.0 | 13,006 |
object Monoids3 extends App {
trait Monoid[A] {
def mappend(a1: A, a2: A): A
def mzero: A
}
object Monoid {
implicit val IntMonoid: Monoid[Int] = new Monoid[Int] {
def mappend(a: Int, b: Int): Int = a + b
def mzero: Int = 0
}
implicit val StringMonoid: Monoid[String] = new Mo... | diegopacheco/scala-playground | scalaz/src/main/scala/Monoids3.scala | Scala | unlicense | 602 |
package functionalops.systemz
import scalaz._
import Scalaz._
trait ManagementInstances extends ManagementClasses {
// TODO Define default/package level typeclass instances here
}
| functionalops/systemz | management/src/main/scala/functionalops/instances.scala | Scala | bsd-3-clause | 184 |
package code
package snippet
import net.liftweb._
import http.js._
import http.js.JsCmds._
import http.js.JE._
import net.liftmodules.extras.Bootstrap3Screen
/*
* Base all LiftScreens off this. Currently configured to use bootstrap 3.
*/
abstract class BaseScreen extends Bootstrap3Screen {
override def defaultTo... | eltimn/lift-poly-example | src/main/scala/code/snippet/BaseScreen.scala | Scala | apache-2.0 | 336 |
package blog
import skinny.orm._, feature._
import scalikejdbc._, SQLInterpolation._
import org.joda.time._
case class Post(
id: Long,
title: String,
body: String,
viewCount: BigDecimal,
tags: Seq[Tag] = Nil,
createdAt: DateTime,
updatedAt: Option[DateTime] = None)
object Post extends SkinnyCRUDMapper[... | BlackPrincess/skinny-framework | orm/src/test/scala/blog/Post.scala | Scala | mit | 898 |
package com.rasterfoundry.api.config
import com.rasterfoundry.api.utils.Config
import com.rasterfoundry.database.FeatureFlagDao
import com.rasterfoundry.datamodel.FeatureFlag
import doobie.free.connection.ConnectionIO
import io.circe.generic.JsonCodec
@JsonCodec
final case class AngularConfig(
clientId: String,
... | aaronxsu/raster-foundry | app-backend/api/src/main/scala/config/Config.scala | Scala | apache-2.0 | 916 |
package com.sidesna.iicfiltering.managedata
import org.apache.spark.sql.{SQLContext, DataFrame}
/**
* Created by Miguel A. Sotomayor
* Date: 18/10/15
*
*
*/
trait ExtractionBase {
def getCustomers(sqlContext: SQLContext): DataFrame
def getProducts(sqlContext: SQLContext): DataFrame
def getPurchases(sqlCont... | masfworld/IICFiltering | src/main/scala/com/sidesna/iicfiltering/managedata/ExtractionBase.scala | Scala | mit | 350 |
/*
* VideoUpdateProgressJob.scala
*
* Copyright (c) 2014 Ronald Kurniawan. All rights reserved.
*
* This library 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 Licen... | fluxodesign/DownloadDaemon | src/main/scala/net/fluxo/dd/VideoUpdateProgressJob.scala | Scala | gpl-2.0 | 4,737 |
package sbtfmppresolver
case class Args(underlying: Seq[(String, String)]) {
def get(key: String): Option[(String, String)] = {
underlying.find(_._1 == key)
}
def valueOf(key: String): String = {
get(key).map(_._2) match {
case None | Some("") => throw new IllegalArgumentException(s"Please provid... | jeffreyolchovy/sbt-fmpp-resolver | resolver/src/main/scala/sbtfmppresolver/Args.scala | Scala | apache-2.0 | 1,125 |
package cromwell.server
import akka.actor.ActorSystem
import com.typesafe.config.ConfigFactory
import cromwell.engine.backend.{Backend, CromwellBackend}
import cromwell.engine.workflow.WorkflowManagerActor
trait WorkflowManagerSystem {
protected def systemName = "cromwell-system"
protected def newActorSystem(): ... | dgtester/cromwell | src/main/scala/cromwell/server/WorkflowManagerSystem.scala | Scala | bsd-3-clause | 863 |
/*
* Contributions:
* Jean-Francois GUENA: implement "suffixed collection name" feature (issue #39 partially fulfilled)
* ...
*/
package akka.contrib.persistence.mongodb
import akka.actor.ActorSystem
import com.typesafe.config.{Config, ConfigFactory}
import reactivemongo.api._
import reactivemongo.api.bson.colle... | JeanFrancoisGuena/akka-persistence-mongo | rxmongo/src/main/scala/akka/contrib/persistence/mongodb/RxMongoPersistenceExtension.scala | Scala | apache-2.0 | 7,741 |
package net.fwbrasil.activate.storage.relational
import java.util.regex.Pattern
import scala.annotation.tailrec
import scala.collection.mutable.ListBuffer
import net.fwbrasil.activate.storage.marshalling.StorageValue
import com.google.common.collect.MapMaker
import com.google.common.cache.CacheBuilder
trait QlStateme... | xdevelsistemas/activate | activate-core/src/main/scala/net/fwbrasil/activate/storage/relational/QlStatement.scala | Scala | lgpl-2.1 | 3,440 |
//: ----------------------------------------------------------------------------
//: Copyright (C) 2015 Verizon. 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 Licen... | rintcius/knobs | core/src/main/scala/knobs/Interpolation.scala | Scala | apache-2.0 | 965 |
package drt.client.services
import utest._
object StaffQueueAssignmentTests extends TestSuite {
def tests = TestSuite {
'DeskRecHandler - {
}
}
}
| somanythings/drt-scalajs-spa-exploration | client/src/test/scala/spatutorial/client/services/StaffQueueAssignmentTests.scala | Scala | apache-2.0 | 161 |
package aecor.schedule
import java.time._
import java.time.format.DateTimeFormatter
import aecor.schedule.CassandraScheduleEntryRepository.{ Queries, TimeBucket }
import aecor.schedule.ScheduleEntryRepository.ScheduleEntry
import aecor.util.effect._
import akka.NotUsed
import akka.persistence.cassandra._
import akka.... | notxcain/aecor | modules/schedule/src/main/scala/aecor/schedule/CassandraScheduleEntryRepository.scala | Scala | mit | 8,187 |
package picasso.math
import picasso.graph.Trace
import scala.collection.GenSeq
/** abstract view of a WSTS.
* The domain is embedded into the type, and the ordering implicit.
* The user should only have to specify the transitions.
* TODO put S and T as type parameters ? then WSTS can extends Traceable. seems a ... | dzufferey/picasso | core/src/main/scala/picasso/math/WSTS.scala | Scala | bsd-2-clause | 1,077 |
package repository
import akka.stream.Materializer
import com.google.inject.{AbstractModule, Provides}
import com.mohiva.play.silhouette.api.util.PasswordInfo
import com.mohiva.play.silhouette.impl.providers.OAuth2Info
import com.mohiva.play.silhouette.persistence.daos.DelegableAuthInfoDAO
import play.api.Configuratio... | kpmeen/symbiotic | examples/symbiotic-server/app/repository/MongoDBModule.scala | Scala | apache-2.0 | 1,248 |
package models.other
import models.db.DeckShip
import models.join.ShipWithName
import scalikejdbc.{AutoSession, DBSession}
import scala.concurrent.duration._
/**
*
* @author ponkotuy
* Date: 15/03/04.
*/
case class ShipWithCondition(id: Int, name: String, stype: String, cond: Int, rest: Int, deckId: Option[Int])
... | ttdoda/MyFleetGirls | server/app/models/other/ShipWithCondition.scala | Scala | mit | 734 |
/*
* Copyright 2022 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-partials | src/test/scala/uk/gov/hmrc/play/partials/FormPartialSpec.scala | Scala | apache-2.0 | 8,042 |
package io.atal.butterfly.action
import io.atal.butterfly.{Editor, Clipboard}
/** Implement the action MoveCursorsToBottom
* Move the cursors to the bottom
*
* @constructor Create the action
*/
class MoveCursorsToBottom extends Action {
/** Execute the action
*
* @param editor The editor onto the a... | Matthieu-Riou/Butterfly | src/main/scala/io/atal/butterfly/action/MoveCursorsToBottom.scala | Scala | mit | 499 |
/**
* 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/main/scala/io/deepsense/deeplang/doperables/multicolumn/SingleColumnTransformerUtils.scala | Scala | apache-2.0 | 1,771 |
package tetris
import java.io.{DataOutputStream, File, FileInputStream, FileOutputStream}
import java.nio.channels.FileChannel.MapMode._
import org.apache.commons.io.IOUtils
import org.apache.spark.{SparkConf, SparkContext}
import scala.collection.JavaConversions._
import scala.collection.mutable.HashMap
/**
* Cre... | PapaCharlie/TetrisBot | tetris/src/main/scala/tetris/Utils.scala | Scala | mit | 6,536 |
package troy
package cql.parser.dml
import java.util.UUID
import org.scalatest.{ FlatSpec, Matchers }
import troy.cql.ast.dml.SimpleSelection._
import troy.cql.ast.dml.{ IfExist, IfCondition }
import troy.cql.ast._
import troy.cql.ast.dml._
import troy.cql.ast.dml.WhereClause.Relation.Simple
import troy.cql.parser.Pa... | schemasafe/troy | cql-parser/src/test/scala/troy/cql/parser/dml/DeleteStatementParserTest.scala | Scala | apache-2.0 | 9,455 |
/***********************************************************************
* Copyright (c) 2015-2022 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | geomesa/geomesa-nifi | geomesa-hbase-bundle/geomesa-hbase-processors/src/main/scala/org/geomesa/nifi/processors/hbase/PutGeoMesaHBase.scala | Scala | apache-2.0 | 985 |
/***********************************************************************
* Copyright (c) 2013-2019 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | elahrvivaz/geomesa | geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/uuid/Z3FeatureIdGenerator.scala | Scala | apache-2.0 | 6,201 |
/*
* Copyright 2022 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/fset-faststream | app/services/testdata/InProgressQuestionnaireStatusGenerator.scala | Scala | apache-2.0 | 8,646 |
/*
* Copyright 2016 Coral realtime streaming analytics (http://coral-streaming.github.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... | coral-streaming/coral | src/main/scala/io/coral/api/Runtime.scala | Scala | apache-2.0 | 2,615 |
package glaux.interfaces.api
package domain
import glaux.neuralnetwork.trainers.SGD.SGDSettings
import glaux.reinforcementlearning.DeepMindQLearner.ConvolutionBased
case class SessionId(agentName: AgentName, profileId: ProfileId)
sealed trait AgentSettings {
def name: AgentName
}
case class AdvancedAgentSettings(... | A-Noctua/glaux | interface-api/src/main/scala/glaux/interfaces/api/domain/models.scala | Scala | mit | 476 |
package slaq.ql
import slaq.Fail
import slaq.session.{PositionedResult, PositionedParameters}
import slaq.util.{Node, UnaryNode}
import core.{Profile, ColumnOption, ColumnOptions}
abstract class Table[T](
val schemaName: Option[String],
val tableName: String
) extends ColumnBase[T] {
final type TableType = T
... | godenji/slaq | src/main/scala/slaq/scalaquery/ql/Table.scala | Scala | bsd-2-clause | 4,093 |
package name.bshelden.arcanefluids.model
/**
* ADT for rotation axes
*
* (c) 2013 Byron Shelden
* See COPYING for details
*/
sealed trait RotAxis
/**
* Rotate the YZ plane CCW around the X axis
*
* 90 Degrees:
* 1 0 0
* 0 0 1
* 0 -1 0
**/
case object RotX extends RotAxis
/**
* Rotate the XZ plan... | bshelden/ArcaneFluids | src/main/scala/name/bshelden/arcanefluids/model/RotAxis.scala | Scala | bsd-2-clause | 578 |
/*
* Copyright (c) 2014-2021 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache... | monifu/monifu | monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapSuite.scala | Scala | apache-2.0 | 3,510 |
/*
* Copyright (c) 2015 Alexandros Pappas p_alx hotmail 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
*
* Unle... | gnostix/freeswitch-monitoring | src/main/scala/gr/gnostix/freeswitch/actors/ActorsProtocol.scala | Scala | apache-2.0 | 5,138 |
package com.twitter.finagle.context
import com.twitter.finagle.util.ByteArrays
import com.twitter.io.Buf
import com.twitter.util.{Duration, Return, Throw, Time, Try}
/**
* A deadline is the time by which some action (e.g., a request) must
* complete. A deadline has a timestamp in addition to the deadline.
* This t... | mkhq/finagle | finagle-core/src/main/scala/com/twitter/finagle/context/Deadline.scala | Scala | apache-2.0 | 2,978 |
/*
* 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 ... | fhueske/flink | flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/batch/sql/LimitTest.scala | Scala | apache-2.0 | 2,731 |
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.