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 io.cronit.utils import org.joda.time.DateTimeZone import org.scalatest.{BeforeAndAfter, FlatSpec, Matchers} class ConfigurationTest extends FlatSpec with Matchers with BeforeAndAfter { after { System.setProperty("env", "development") } "It" should " load 'development' environment variables when en...
212data/cronit-service
src/test/scala/io/cronit/utils/ConfigurationTest.scala
Scala
apache-2.0
1,083
package io.udash.web.guide.components import io.udash.bootstrap.utils.BootstrapStyles import io.udash.bootstrap.utils.BootstrapStyles.Color import io.udash.css.CssStyleName object BootstrapUtils { /** * Wells component from bootstrap3 is absent in bootstrap4. * These well-like styles make elements look lik...
UdashFramework/udash-core
guide/guide/.js/src/main/scala/io/udash/web/guide/components/BootstrapUtils.scala
Scala
apache-2.0
594
package monocle.function import monocle.function.fields._ import monocle.{Iso, Optional, Prism} import scala.annotation.implicitNotFound import scalaz.{Applicative, \\/} /** * Typeclass that defines a [[Prism]] between an `S` and its init `S` and last `S` * @tparam S source of [[Prism]] and init of [[Prism]] targe...
rperry/Monocle
core/shared/src/main/scala/monocle/function/Snoc.scala
Scala
mit
3,570
/* * La Trobe University - Distributed Deep Learning System * Copyright 2016 Matthias Langer ([email protected]) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apa...
bashimao/ltudl
blaze/src/main/scala/edu/latrobe/blaze/initializers/DependentInitializer.scala
Scala
apache-2.0
3,357
package reo7sp.boardpp.ui.widgets.awt import javax.swing.JTextField import javax.swing.border.EmptyBorder /** * Created by reo7sp on 12/27/13 at 9:59 PM */ class FancyTextField extends JTextField { setBorder(new EmptyBorder(8, 8, 8, 8)) }
reo7sp/BoardPP
src/main/java/reo7sp/boardpp/ui/widgets/awt/FancyTextField.scala
Scala
apache-2.0
245
/* * Copyright (C) 2016 DANS - Data Archiving and Networked Services ([email protected]) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 ...
DANS-KNAW/easy-license-creator
src/main/scala/nl/knaw/dans/easy/agreement/EasyDepositAgreementCreatorServlet.scala
Scala
apache-2.0
2,068
package com.eevolution.context.dictionary.infrastructure.repository import java.util.UUID import com.eevolution.context.dictionary.domain._ import com.eevolution.context.dictionary.domain.model.Image import com.eevolution.context.dictionary.infrastructure.db.DbContext._ import com.eevolution.utils.PaginatedSequence i...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/repository/ImageRepository.scala
Scala
gpl-3.0
2,621
/* * sbt * Copyright 2011 - 2018, Lightbend, Inc. * Copyright 2008 - 2010, Mark Harrah * Licensed under Apache License 2.0 (see LICENSE) */ package sbt.internal.util object Types extends Types trait Types extends TypeFunctions { val :^: = KCons type :+:[H, T <: HList] = HCons[H, T] val :+: = HCons }
sbt/sbt
internal/util-collection/src/main/scala/sbt/internal/util/Types.scala
Scala
apache-2.0
315
package top.spoofer.hbrdd.unit /** * HbRddReader 提供了将Array[Byte]转换为A类型的接口 * @tparam A 类型参数 */ trait HbRddFormatsReader[A] extends Serializable { def formatsRead(readData: Array[Byte]): A } /** * HbRddWriter 提供了将 A类型转化为Array[Byte]的接口 * @tparam A 类型参数 */ trait HbRddFormatsWriter[A] extends Serializable { def ...
TopSpoofer/hbrdd
src/main/scala/top/spoofer/hbrdd/unit/HbRddFormats.scala
Scala
apache-2.0
506
/* * 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 ...
Swrrt/Samza
samza-core/src/main/scala/org/apache/samza/system/SystemConsumers.scala
Scala
apache-2.0
14,301
package org.openguard.core import java.util.Date import com.sksamuel.scrimage.Image /** * Created by pbolle on 20.06.15. */ class Photo(var image: Image,var path: String, var date: Date = new Date()) { }
pbolle/openvideoguard
core/src/main/scala/org/openguard/core/Photo.scala
Scala
apache-2.0
210
package com.chrisomeara.pillar import com.datastax.driver.core.querybuilder.QueryBuilder import com.datastax.driver.core.{Metadata, Session} import org.scalatest.matchers.ShouldMatchers trait AcceptanceAssertions extends ShouldMatchers { val session: Session val keyspaceName: String protected def assertEmptyAp...
smr-co-uk/pillar
src/test/scala/com/chrisomeara/pillar/AcceptanceAssertions.scala
Scala
mit
631
package cpup.mc.oldenMagic.content import net.minecraft.item.ItemStack import net.minecraft.world.World import net.minecraft.entity.player.EntityPlayer class ItemWand extends TItemBase { override def onItemRightClick(stack: ItemStack, world: World, player: EntityPlayer) = { mod.proxy.activateSpellCasting(player) ...
CoderPuppy/oldenmagic-mc
src/main/scala/cpup/mc/oldenMagic/content/ItemWand.scala
Scala
mit
331
package reopp.common.guardedcommands.chocox /** * Created with IntelliJ IDEA. * * Created by jose on 06/02/13. */ import org.scalatest.FunSpec import reopp.common.guardedcommands.dataconnectors.{GCADrain, GCWriter, GCMerger, GCFilter} import reopp.common.{Buffer, Utils, Function, Predicate} import reopp.common.Ut...
joseproenca/ip-constraints
code/src/test/scala/reopp/reopp/common/guardedcommands/chocox/TestChocoX.scala
Scala
mit
1,448
package com.twitter.finagle.client import com.twitter.finagle._ import com.twitter.finagle.context import com.twitter.finagle.context.Contexts import com.twitter.finagle.factory.{ BindingFactory, RefcountedFactory, StatsFactoryWrapper, TimeoutFactory} import com.twitter.finagle.filter.{ClearContextValueFilter, DtabS...
adriancole/finagle
finagle-core/src/main/scala/com/twitter/finagle/client/StackClient.scala
Scala
apache-2.0
24,122
/* * 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 ...
jinglining/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/stream/table/stringexpr/TableAggregateStringExpressionTest.scala
Scala
apache-2.0
3,491
/* * 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-azure-documentdb/src/test/scala/com/datamountaineer/streamreactor/connect/azure/documentdb/sink/DocumentDbSinkTaskStructTest.scala
Scala
apache-2.0
13,224
package org.jetbrains.plugins.hocon.formatting import com.intellij.formatting._ import com.intellij.lang.ASTNode import com.intellij.psi.TokenType import com.intellij.psi.formatter.common.AbstractBlock import org.jetbrains.plugins.hocon.lexer.HoconTokenSets import org.jetbrains.plugins.hocon.parser.HoconElementType i...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/hocon/formatting/HoconBlock.scala
Scala
apache-2.0
2,299
/** * 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 not us...
wayilau/kafka
core/src/test/scala/integration/kafka/api/ConsumerTest.scala
Scala
apache-2.0
13,012
/* * Copyright (C) 2014 AyaIB Developers (http://github.com/fauu/ayaib) * * This software is licensed under the GNU General Public License * (version 3 or later). See the COPYING file in this distribution. * * You should have received a copy of the GNU Library General Public License * along with this software. I...
fauu/AyaIB-old
app/models/Board.scala
Scala
gpl-3.0
1,504
/** * Copyright (c) 2014, MoonGene. All rights reserved. * * This source code is licensed under the GPL license found in the * LICENSE_GPL file in the root directory of this source tree. An alternative * commercial license is also available upon request. */ package com.moongene.services.core import concurrent.F...
MoonGene/Analytics
src/gene/src/main/scala/com/moongene/services/core/MetricsHelper.scala
Scala
gpl-3.0
1,013
package exerciseTwo import akka.actor.ActorSystem // ------------ // EXERCISE 2 // ------------ // Fill in the code necessary to handle receiving a new message to generate the // properties for a random circle. For testing just println when the message is received. // See video.imageUtils.CircleProperties and video....
retroryan/streams-workshop
src/exercises/exerciseTwo/CircleGenerator.scala
Scala
cc0-1.0
863
package doodle package java2d import doodle.core.Base64 import doodle.effect.Writer._ import doodle.syntax._ import minitest._ object Base64Spec extends SimpleTestSuite { def base64Distance[A](b1: Base64[A], b2: Base64[A]): Double = { import java.util.{Base64 => JBase64} val d1 = JBase64.getDecoder().decode...
underscoreio/doodle
java2d/src/test/scala/doodle/java2d/Base64Spec.scala
Scala
apache-2.0
1,105
package com.sksamuel.elastic4s import com.sksamuel.elastic4s.json.{JsonValue, XContentBuilder, XContentFactory} import com.sksamuel.elastic4s.requests.count.CountRequest /** * A typeclass that is used to build the json bodies for requests. * * They accept a request instance, such as CountRequest or SearchReques...
sksamuel/elastic4s
elastic4s-handlers/src/main/scala/com/sksamuel/elastic4s/BodyBuilder.scala
Scala
apache-2.0
676
package com.binarymechanic.data import org.apache.hadoop.fs.{FileSystem, Path} import org.apache.spark.SparkContext import org.apache.spark.mllib.linalg.{Vector => MLVector} import org.apache.spark.sql.SQLContext import org.bdgenomics.adam.rdd.ADAMContext._ /** Provides a location to create data conversion methods, l...
binarymechanic/genomeanalysis
src/main/scala/com/binarymechanic/data/DataLib.scala
Scala
apache-2.0
4,011
package org.jetbrains.plugins.scala.lang.psi.impl.base.patterns import com.intellij.lang.ASTNode import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.lang.psi.api.base.patterns.ScGivenPattern import org.jetbrains.plugins.scala.lang.psi.api.base.types.ScTypeElement import org.jetbrains.plugins.scala.la...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/base/patterns/ScGivenPatternImpl.scala
Scala
apache-2.0
994
package uberset.basic_compiler /* Author: uberset Date: 2015-11-09 Licence: GPL v2 */ import scala.collection.mutable import scala.collection.mutable.ListBuffer object Interpreter { case class Status( lines: Seq[Line], var in: List[String], var lineIndex: Int = 0, var runni...
uberset/basic-compiler
src/main/scala/uberset/basic_compiler/Interpreter.scala
Scala
gpl-2.0
7,154
object ch2 { def slow_fib(n:Int) : Int = { if(n<=1) 1 else fib(n-1)+fib(n-2) } def fib(n:Int) : Int = { @annotation.tailrec def fib_tr(n:Int, f1:Int, f2:Int) : Int = { if(n<=1) f1 else fib_tr(n-1,f1+f2,f1) } fib_tr(n,1,1) } def isSorted[A](arr:Array[A], ordered:(A,A)=>Boolean):B...
okaram/scala
fpinscala/src/main/scala/ch2.scala
Scala
unlicense
831
package com.twitter.finagle.serverset2 import com.twitter.finagle.partitioning.zk.ZkMetadata import com.twitter.finagle.{Addr, Address} import com.twitter.util._ import java.net.InetSocketAddress /** * The Stabilizer attempts to dampen address changes for the observers so that the they * are not affected by transie...
twitter/finagle
finagle-serversets/src/main/scala/com/twitter/finagle/serverset2/Stabilizer.scala
Scala
apache-2.0
5,527
package net.arya.intern /** * Created by arya on 7/25/14. */ class InternTest extends org.scalatest.FunSuite { import syntax._ test("two interned objects should be identical") { val a = List(1,2,3).intern val b = (1 :: 2 :: 3 :: Nil).intern assert(a eq b) } test("internDeep interns Lists' insi...
refried/intern
src/test/scala/net/arya/intern/InternTest.scala
Scala
gpl-2.0
443
package com.sfxcode.nosql.mongo.gridfs import java.io.OutputStream import java.nio.{Buffer, ByteBuffer} import java.util.concurrent.atomic.{AtomicBoolean, AtomicLong} import com.typesafe.scalalogging.LazyLogging import org.mongodb.scala.Observer case class GridFSStreamObserver(outputStream: OutputStream) extends Obs...
sfxcode/simple-mongo
src/main/scala/com/sfxcode/nosql/mongo/gridfs/GridFSStreamObserver.scala
Scala
apache-2.0
970
package org.bitcoins.core.protocol.ln import org.bitcoins.core.config.NetworkParameters import org.bitcoins.core.protocol.ln.LnParams._ import org.bitcoins.core.protocol.ln.currency.{LnCurrencyUnit, LnCurrencyUnits} import org.bitcoins.core.util.Bech32HumanReadablePart import scodec.bits.ByteVector import scala.util....
bitcoin-s/bitcoin-s-core
core/src/main/scala/org/bitcoins/core/protocol/ln/LnHumanReadablePart.scala
Scala
mit
5,014
package org.openmole.plugin.task.timing import org.openmole.core.highlight.HighLight import org.openmole.core.pluginregistry.PluginRegistry import org.osgi.framework.{ BundleActivator, BundleContext } class Activator extends BundleActivator { override def stop(context: BundleContext): Unit = PluginRegistry.unr...
openmole/openmole
openmole/plugins/org.openmole.plugin.task.timing/src/main/scala/org/openmole/plugin/task/timing/Activator.scala
Scala
agpl-3.0
645
package pimpathon.frills import pimpathon.genTraversableLike.GTLGT import scala.collection.{GenTraversable, GenTraversableLike} import scala.collection.immutable.List import scalaz.{NonEmptyList, \\/} import pimpathon.frills.genTraversableLike.{GenTraversableLikeFrillsMixin, GenTraversableLikeOfDisjunctionFrillsMixi...
raymanoz/pimpathon
src/main/scala/pimpathon/frills/list.scala
Scala
apache-2.0
869
package info.hupel.isabelle.api import scala.collection.mutable.ListBuffer // FIXME code mostly copied from xml.scala and yxml.scala object XML { private val X = '\u0005' private val Y = '\u0006' private def prettyEscape(string: String) = string .replace("&", "&amp;") .replace("<", "&lt;") .repla...
larsrh/libisabelle
modules/pide-interface/src/main/scala/XML.scala
Scala
apache-2.0
3,916
package test; object Main extends App { class Global { case class Template(x : Int, y : Int) { Console.println("outer: " + Global.this); } } trait Contexts { self: Analyzer => val xxx : global.Template = { assert(globalInit0 != null); globalInit0.Template(10, 20); } } abstra...
folone/dotty
tests/untried/neg/t783.scala
Scala
bsd-3-clause
734
/******************************************************************************* Copyright (c) 2012-2013, S-Core, KAIST. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. **********************************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/tests/TypingTAJSMicroJUTest.scala
Scala
bsd-3-clause
1,539
/* * Copyright (c) 2015, 2016 Alexey Kuzin <[email protected]> * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice,...
leviathan941/sourepoheatmap
guiapp/src/main/scala/sourepoheatmap/gui/AboutStage.scala
Scala
bsd-3-clause
2,993
package sbtdocker object Instructions { trait Instruction { this: Product => def arguments = productIterator.mkString(" ") def instructionName = productPrefix.toUpperCase override def toString = s"$instructionName $arguments" @deprecated("Use toString instead.", "0.4.0") def toInstructionS...
Banno/sbt-docker
src/main/scala/sbtdocker/Instructions.scala
Scala
mit
2,951
package skuber import akka.stream.KillSwitches import akka.stream.scaladsl.{Keep, Sink} import org.scalatest.Matchers import org.scalatest.concurrent.{Eventually, ScalaFutures} import org.scalatest.time.{Seconds, Span} import skuber.apps.v1.{Deployment, DeploymentList} import scala.concurrent.duration._ import scala....
doriordan/skuber
client/src/it/scala/skuber/WatchContinuouslySpec.scala
Scala
apache-2.0
7,714
/* * Copyright 2014 The Guardian * * 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...
guardian/gu-who
app/lib/StateUpdate.scala
Scala
apache-2.0
1,743
package notebook.kernel import java.io.{StringWriter, PrintWriter, ByteArrayOutputStream} import java.net.{URLDecoder, JarURLConnection} import java.util.ArrayList import scala.collection.JavaConversions import scala.collection.JavaConversions._ import scala.xml.{NodeSeq, Text} import scala.util.control.NonFatal impo...
deanwampler/spark-notebook
modules/spark/src/main/scala_2.10/spark-last/notebook/kernel/Repl.scala
Scala
apache-2.0
12,840
package es.weso.computex import org.rogach.scallop.Scallop import com.typesafe.config.ConfigFactory import org.rogach.scallop.ScallopConf import org.rogach.scallop.exceptions.Help import org.slf4j.LoggerFactory import com.hp.hpl.jena.rdf.model.ModelFactory import com.hp.hpl.jena.util.FileManager import com.hp.hpl.jena...
weso/computex
app/es/weso/computex/AddDatasets.scala
Scala
apache-2.0
7,372
/* * Copyright 2008-present MongoDB, 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 ag...
rozza/mongo-java-driver
driver-scala/src/test/scala/org/mongodb/scala/gridfs/GridFSFindObservableSpec.scala
Scala
apache-2.0
2,633
package stepping class StepFilters { var mutableVar = "var" val immutableVal = "val" def foo(a: String, b: String): Unit = {} def mainTest(): Unit = { mutableVar // line 11 immutableVal mutableVar = immutableVal foo(mutableVar, immutableVal) fors(); bridges() } def fors(): Unit...
stephenh/scala-ide
org.scala-ide.sdt.debug.tests/test-workspace/debug/src/stepping/StepFilters.scala
Scala
bsd-3-clause
902
package me.invkrh.raft.deploy import java.nio.file.{Files, Paths} import com.typesafe.config.{Config, ConfigFactory} import me.invkrh.raft.exception.{RaftConfigDirectoryNotFoundException, RaftConfigFileNotFoundException} trait ConfigHolder { val config: Config } trait RaftConfig extends ConfigHolder { override...
invkrh/akka-raft
src/main/scala/me/invkrh/raft/deploy/ConfigHolder.scala
Scala
mit
732
package common import play.api.libs.concurrent.Akka import play.api.Play.current import scala.concurrent.ExecutionContext object ExecutionContexts { implicit val fastOps: ExecutionContext = play.api.libs.concurrent.Execution.Implicits.defaultContext implicit val internetIOOps: ExecutionContext = Akka.system.dispa...
ubenzer/tezapp
app/common/ExecutionContexts.scala
Scala
agpl-3.0
468
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2007-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
SethTisue/scala-swing
src/main/scala/scala/swing/SequentialContainer.scala
Scala
bsd-3-clause
1,294
package time import java.lang.{Integer => JInt} import java.util.{List => JList} import java.util.Calendar import java.util.Properties; import java.io.StringReader; import scala.util.Sorting.quickSort import scala.collection.JavaConversions._ import scala.collection.mutable.Buffer import edu.stanford.nlp.util.loggin...
gangeli/ParsingTime
src/time/Data.scala
Scala
lgpl-3.0
29,838
package core.database import scala.concurrent._ import play.api.Logger import ExecutionContext.Implicits.global import org.mongodb.scala.Completed trait DatabaseComponent { def db = MongoDb.getDatabase(); def dropAllCollections(): Future[Seq[Seq[Completed]]] = { Logger.debug("Dropping all collections") ...
Vladislav-Zolotaryov/EchoCave
app/core/database/DatabaseComponent.scala
Scala
gpl-3.0
689
package com.twitter.finagle import com.twitter.conversions.storage._ import com.twitter.finagle.client._ import com.twitter.finagle.http.{HttpClientTraceInitializer, HttpServerTraceInitializer, HttpTransport, Request, Response} import com.twitter.finagle.http.codec.{HttpClientDispatcher, HttpServerDispatcher} import c...
rojanu/finagle
finagle-http/src/main/scala/com/twitter/finagle/Http.scala
Scala
apache-2.0
8,133
package spark.transitobh.util; import _root_.java.math.MathContext object FuzzyQueryUtil { def fuzzyQuery(a:String,b:String) = SimilarityTool.compareStrings(a,b) } /// This class implements string comparison algorithm /// based on character pair similarity /// Source: http://www.catalysoft.com/articles/StrikeAMatch...
transitoAgora/sample-realtime-spark
src/main/scala/transitobh/scala/spark/transitobh/util/FuzzyQueryUtil.scala
Scala
mit
833
package dbtarzan.gui.orderby import dbtarzan.db.{Field, OrderByDirection, OrderByField, OrderByFields} import dbtarzan.gui.TControlBuilder import dbtarzan.gui.util.{JFXUtil, OrderedListView, TComboStrategy} import dbtarzan.localization.Localization import scalafx.Includes._ import scalafx.beans.property.BooleanPropert...
aferrandi/dbtarzan
src/main/scala/dbtarzan/gui/orderby/OrderByEditor.scala
Scala
apache-2.0
3,559
class A { val x = """\\u2
lrytz/scala
test/files/neg/t4584.scala
Scala
apache-2.0
25
/* * ScalaRay - Ray tracer based on pbrt (see http://pbrt.org) written in Scala * Copyright (C) 2009, 2010, 2011 Jesper de Jong * * This program 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 ve...
jesperdj/scalaray
src/main/scala/org/jesperdj/scalaray/Main.scala
Scala
gpl-3.0
3,440
/* * Copyright (C) 2017 Vincibean <Andre Bessi> * * This program 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. * * This...
Vincibean/ScalaForTheImpatient-Solutions
src/main/scala/org/vincibean/scala/impatient/chapter10/exercise7/Account.scala
Scala
gpl-3.0
1,414
import java.awt.event.InputEvent import java.awt.event.KeyEvent.{VK_META => VK_COMMAND, _} import java.awt.Robot trait Robotic { val robot: Robot } trait Commands { this: Robotic => def switchWindow = { robot keyPress VK_COMMAND robot keyPress VK_TAB robot keyRelease VK_COMMAND robot keyReleas...
siderakis/dragon-dance
src/main/scala/Commands.scala
Scala
apache-2.0
1,128
/* * Copyright 2012 Atlassian 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 agr...
simpleenergy/kadai
config/src/main/scala/kadai/config/Configuration.scala
Scala
apache-2.0
6,979
package org.elasticmq import java.math.MathContext import org.scalatest.EitherValues import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import scala.util.Random class LimitsTest extends AnyWordSpec with Matchers with EitherValues { "Validation of batch size limits in strict m...
adamw/elasticmq
core/src/test/scala/org/elasticmq/LimitsTest.scala
Scala
apache-2.0
13,233
package org.jetbrains.plugins.scala.codeInspection.booleans import com.intellij.codeInspection.{ProblemHighlightType, ProblemsHolder} import com.intellij.openapi.project.Project import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.codeInspection.booleans.SimplifyBooleanUtil.isOfBooleanType import org....
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/codeInspection/booleans/SimplifyBooleanMatchInspection.scala
Scala
apache-2.0
5,819
/** * Copyright (C) 2014 Kaj Magnus Lindberg (born 1979) * * 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. ...
debiki/debiki-server-old
app/debiki/settings.scala
Scala
agpl-3.0
4,272
/* * 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...
Drooids/spark-kernel
kernel/src/test/scala/com/ibm/spark/boot/layer/StandardComponentInitializationSpec.scala
Scala
apache-2.0
4,311
/* * Copyright 2008-2010 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
wsaccaco/lift
examples/JPADemo/JPADemo-web/src/main/scala/net/liftweb/jpademo/snippet/Books.scala
Scala
apache-2.0
4,570
package se.lu.nateko.cp.meta.ingestion import java.net.URI import scala.concurrent.Future import org.eclipse.rdf4j.model.IRI import org.eclipse.rdf4j.model.ValueFactory import org.eclipse.rdf4j.rio.helpers.ContextStatementCollector import org.eclipse.rdf4j.rio.turtle.TurtleParser import akka.actor.ActorSystem impor...
ICOS-Carbon-Portal/meta
src/main/scala/se/lu/nateko/cp/meta/ingestion/RemoteSparqlConstructIngester.scala
Scala
gpl-3.0
2,148
/* * 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/sj-platform
contrib/benchmarks/sj-regular-performance-benchmark/src/main/scala/com/bwsw/sj/benchmarks/module/regular/Validator.scala
Scala
apache-2.0
987
package lert.elasticsearch.restclient import java.io.InputStream import com.fasterxml.jackson.databind.ObjectMapper import lert.core.config.Source import org.apache.http.{Header, HttpEntity} import scala.reflect.ClassTag trait RestClient { def performRequest(method: String, endpoint: String, params: Map[String, S...
l3rt/l3rt
elasticsearch-input/src/main/scala/lert/elasticsearch/restclient/RestClient.scala
Scala
apache-2.0
1,146
package idv.brianhsu.maidroid.plurk.fragment import idv.brianhsu.maidroid.plurk._ import idv.brianhsu.maidroid.plurk.activity._ import idv.brianhsu.maidroid.plurk.TypedResource._ import idv.brianhsu.maidroid.plurk.adapter._ import idv.brianhsu.maidroid.plurk.dialog._ import idv.brianhsu.maidroid.plurk.util._ import id...
brianhsu/MaidroidPlurk
src/main/scala/fragment/FanListFragment.scala
Scala
gpl-3.0
8,383
/* * Copyright 2015 Geeoz Software * * 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 ...
geeoz/pawl
pawl-scalatest/src/main/scala/pawl/web/Locators.scala
Scala
apache-2.0
1,239
package improbable.launcher import scala.sys.process._ object SpatialOSLauncher extends App { "spatial build gsim".! "spatial local start default_launch.pb.json".! }
timtroendle/spatial-cimo
workers/gsim/src/main/scala/improbable/launcher/SpatialOSLauncher.scala
Scala
mit
171
/* * Util.scala * Utility functions for atomic discrete elements. * * Created By: Avi Pfeffer ([email protected]) * Creation Date: Feb 25, 2011 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email [email protected] for information. * * See http://www.gi...
jyuhuan/figaro
Figaro/src/main/scala/com/cra/figaro/library/atomic/discrete/Util.scala
Scala
bsd-3-clause
1,748
package com.twitter.jaqen.ntuple import scala.language.experimental.macros import scala.language.implicitConversions import NTupleMacros._ /** * A tuple where fields can be accessed by name * * @author Julien Le Dem */ trait NTuple[+T <: NTuple[T]] { type Type = T /** * returns the field named 'key' with ...
twitter/jaqen
jaqen-ntuple/src/main/scala/com/twitter/jaqen/ntuple/NTuple.scala
Scala
apache-2.0
5,167
package com.typesafe.slick.testkit.tests import org.junit.Assert._ import scala.slick.ast.Dump import com.typesafe.slick.testkit.util.{TestkitTest, TestDB} class MapperTest(val tdb: TestDB) extends TestkitTest { import tdb.profile.simple._ override val reuseInstance = true def testMappedEntity { case clas...
boldradius/slick
slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/MapperTest.scala
Scala
bsd-2-clause
4,767
package kartograffel.server.infrastructure.doobie.repository import eu.timepit.refined._ import kartograffel.server.ArbitraryInstances._ import kartograffel.server.domain.model.Radius.LengthRange import kartograffel.server.domain.model._ import kartograffel.server.infrastructure.doobie.DbSpecification._ import org.scal...
fthomas/kartograffel
modules/server/jvm/src/test/scala/kartograffel/server/infrastructure/doobie/repository/DbTagRepositoryTest.scala
Scala
apache-2.0
1,766
/* * 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 ...
bowenli86/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/batch/sql/CalcITCase.scala
Scala
apache-2.0
38,530
package com.alanrodas.test /* import org.scalatest._ package object fronttier { abstract class UnitSpec extends FlatSpec with Matchers } */
alanrodas/Fronttier
src/test/scala/com/alanrodas/test/fronttier/package.scala
Scala
apache-2.0
143
package org.mith.metaHathi.utils import scala.concurrent._ import ExecutionContext.Implicits.global import scalaz._, Scalaz._ import argonaut._, Argonaut._ import java.io.File import java.io.ByteArrayInputStream import java.util.ArrayList // Using apache http utils directly instead of dispatch because // multipart...
umd-mith/metaHathi
src/main/scala/org/mith/metaHathi/utils/openRefine.scala
Scala
apache-2.0
10,710
case class Wrap(i: Int) { override def hashCode = i * 0x9e3775cd }
yusuke2255/dotty
tests/pending/run/ctries-old/Wrap.scala
Scala
bsd-3-clause
75
package is.hail.annotations import is.hail.utils._ object RegionPool { private lazy val thePool: ThreadLocal[RegionPool] = new ThreadLocal[RegionPool]() { override def initialValue(): RegionPool = RegionPool() } def get: RegionPool = thePool.get() def apply(strictMemoryCheck: Boolean = false): RegionPoo...
cseed/hail
hail/src/main/scala/is/hail/annotations/RegionPool.scala
Scala
mit
5,023
/* * Copyright (c) <2015-2016>, see CONTRIBUTORS * 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 code must retain the above copyright * notice, this list...
amanjpro/languages-a-la-carte
oberon0/src/main/scala/submodules/l3/NamerFamily.scala
Scala
bsd-3-clause
2,573
/* * 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.tools.nsc.doc pa...
lrytz/scala
src/scaladoc/scala/tools/nsc/doc/doclet/Generator.scala
Scala
apache-2.0
1,549
/* * Copyright (c) 2013, Scodec * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions a...
scodec/scodec
unitTests/src/test/scala/scodec/codecs/CertificateCodecTest.scala
Scala
bsd-3-clause
2,840
package issue10 @pkg.identity @pkg.placebo class C
xeno-by/paradise
tests/reflect/src/test/scala/compile/issue10/Test2.scala
Scala
bsd-3-clause
52
package gangstead //case class Enthusiast(level: Int) case class Admirer(esteem: Int) class BetterAdmirer(h : Admirer){ def boosted = h.esteem + 1 } object Helper1 { implicit def AdmirerHelper(h: Admirer) = new BetterAdmirer(h) } object Helper2 { implicit class BestAdmirer(h : Admirer) { def bested = h.e...
gangstead/implicitly-yours
src/main/scala/gangstead/ImplicitClass.scala
Scala
gpl-2.0
583
/* * Copyright 2013 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 applica...
galderz/mod-lang-scala
src/main/scala/org/vertx/scala/core/streams/Pump.scala
Scala
apache-2.0
4,008
package util import java.io.{File, IOException, PrintWriter} import java.nio.charset.StandardCharsets import java.nio.file.{Files, Path} import java.time.format.DateTimeFormatter import java.time.{ZoneId, ZonedDateTime} import java.util.Locale import javax.xml.transform.stream.StreamSource import javax.xml.validation....
ktr-skmt/FelisCatusZero
src/main/scala/util/XmlSchema.scala
Scala
apache-2.0
4,645
package sampleclean.activeml import org.apache.spark.mllib.linalg.Vector import org.apache.spark.mllib.regression.LabeledPoint import org.apache.spark.rdd.RDD import sampleclean.crowd.context.{GroupLabelingContext, PointLabelingContext} import sampleclean.crowd.{CrowdTaskConfiguration, CrowdTask} /** * Class for us...
sjyk/sampleclean-async
src/main/scala/sampleclean/activeml/ActiveLearningAlgorithm.scala
Scala
apache-2.0
11,928
package spinoco.protocol.rtp import scodec.bits.ByteVector import scodec.{Attempt, Codec, Err} import scodec.codecs._ /** * Created by pach on 27/02/17. */ package object codec { val version: Codec[RTPVersion.Value] = enumerated(uint(2), RTPVersion) val wordSizeCodec: Codec[Int] = uint16.exmap( szWords ...
Spinoco/protocol
rtp/src/main/scala/spinoco/protocol/rtp/codec/codec.scala
Scala
mit
849
package com.ubirch.user.model.db import com.ubirch.util.date.DateUtil import com.ubirch.util.uuid.UUIDUtil import org.joda.time.DateTime /** * * @param id unique user identifier * @param displayName * @param providerId * @param externalId sha512 hashed email * @param locale * @param active...
ubirch/ubirch-user-service
model-db/src/main/scala/com/ubirch/user/model/db/User.scala
Scala
apache-2.0
1,632
/* * 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/codec/src/test/scala/org/scassandra/codec/messages/StartupSpec.scala
Scala
apache-2.0
1,192
package name.abhijitsarkar.akka /** * @author Abhijit Sarkar */ import java.io._ import java.net.URL import java.time.temporal.ChronoField._ import java.time.temporal.ChronoUnit.SECONDS import java.time.{Instant, LocalDateTime} import akka.Done import akka.stream.ActorMaterializer import akka.stream.scaladsl.{Fi...
asarkar/akka
akka-streams-learning/weather-streaming/src/main/scala/name/abhijitsarkar/akka/Downloader.scala
Scala
gpl-3.0
4,124
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.config import java.io.File import java.nio.file.Path import scala.collection.breakOut import org.ensime.api._ import org.ensime.util.file._ package object richconfig { ...
hzenginx/ensime-server
core/src/main/scala/org/ensime/config/richconfig.scala
Scala
gpl-3.0
2,300
/* * 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 ...
xieguobin/Spark_2.0.0_cn1
ml/tree/Node.scala
Scala
apache-2.0
14,826
package com.gilesc package mynab package service import com.gilesc.mynab.testkit.TestCase import com.gilesc.mynab.repository._ import cats.effect.IO import com.gilesc.arrow._ class CategoryServiceSpec extends TestCase { val filter = new Filter[IO, (String, String), Category, CreateCategoryContext, Category] { o...
CraigGiles/mynab
service/src/test/scala/com/gilesc/mynab/service/CategoryServiceSpec.scala
Scala
mit
1,670
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.testsuite.scalalib import...
SebsLittleHelpers/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/scalalib/EnumerationTest.scala
Scala
apache-2.0
2,913
package trending.util import scala.concurrent._ import ExecutionContext.Implicits.global import play.api.libs.functional.syntax._ import play.api.libs.json._ import play.api.libs.json.Reads._ import play.api.libs.ws._ object Location { implicit def readLocation: Reads[(Double, Double)] = (__ \\ "latitude")...
fbessadok/trendingvenues
app/util/Location.scala
Scala
mit
711
package org.jetbrains.plugins.scala package lang package parser package parsing package top import com.intellij.lang.PsiBuilder import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder /** * @author Alexander Podkhalyuzin * Date: 06.0...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/parser/parsing/top/Qual_Id.scala
Scala
apache-2.0
1,423
/* Copyright (c) 2015 Lucas Satabin * * 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...
satabin/lingua
fst/src/main/scala/lingua/fst/PSubFst.scala
Scala
apache-2.0
12,199
// Ported from https://www.hboehm.info/gc/gc_bench/GCBench.java // // This is adapted from a benchmark written by John Ellis and Pete Kovac // of Post Communications. // It was modified by Hans Boehm of Silicon Graphics. // // This is no substitute for real applications. No actual application // is likely t...
sjrd/scalajs-benchmarks
gcbench/src/main/scala/gcbench/GCBenchBenchmark.scala
Scala
bsd-3-clause
4,806
/* __ __ *\\ * / /____ ___ ____ ___ ___ _/ / lasius * * / __/ -_) _ `/ _ \\/ _ \\/ _ `/ / contributed by tegonal * * \\__/\\__/\\_, /\\___/_//_/\\_,_/_/ http://tegonal.com/ * ...
tegonal/lasius
app/services/UserService.scala
Scala
gpl-3.0
3,470
package com.twitter.finagle.ssl import java.util.concurrent.atomic.AtomicBoolean import java.util.logging.{Level, Logger} import javax.net.ssl._ import collection.mutable.{Map => MutableMap} /* * Creates APR/OpenSSL SSLEngines on behalf of the Ssl singleton * * You need to have the appropriate shared libraries on...
LithiumTD/finagle
finagle-core/src/main/scala/com/twitter/finagle/ssl/OpenSSL.scala
Scala
apache-2.0
4,456