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 play.api import play.utils.Threads import java.io._ import scala.util.control.NonFatal import javax.xml.parsers.SAXParserFactory import org.apache.xerces.impl.Constants import javax.xml.XMLConstants /** Application mode, either `DEV`, `TEST`, or `PROD`. */ object Mode extends Enumeration { type Mode = Val...
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/play/src/main/scala/play/api/Play.scala
Scala
mit
6,802
/* * Copyright 2015 Webtrends (http://www.webtrends.com) * * 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. * Yo...
mjwallin1/wookiee-spray
src/main/scala/com/webtrends/harness/component/spray/route/SprayStreamingResponder.scala
Scala
apache-2.0
4,392
case class C() object arrays2 { def main(args: Array[String]): Unit = { val a: Array[Array[C]] = new Array[Array[C]](2) a(0) = new Array[C](2) a(0)(0) = new C() } } // #2422 object arrays4 { val args = Array[String]("World") "Hello %1$s".format(args*) } /* test/files/pos/arrays2.scala:15: warning...
lampepfl/dotty
tests/pos/arrays2.scala
Scala
apache-2.0
803
package com.jamontes79.scala.movielist.utils /** * Created by alberto on 29/9/15. */ object StringRes { val jsonFilename = "peliculas.json" val jsonConfigFilename = "config.json" val trailerFilename = "trailer.json" }
jamontes79/movieList
src/main/scala/com/jamontes79/scala/movielist/utils/StringRes.scala
Scala
apache-2.0
228
package at.fabricate.liftdev.common package snippet import model.AddRating import model.AddRatingMeta import net.liftweb.util.CssSel import net.liftweb.http.js.JsCmds import net.liftweb.http.js.jquery.JqJsCmds.AppendHtml import net.liftweb.http.SHtml import net.liftweb.util.Helpers._ import scala.xml.NodeSeq import sc...
Fabricate/OpenthingsImplementation
src/main/scala/at/fabricate/liftdev/common/snippet/AddRatingSnippet.scala
Scala
lgpl-3.0
2,395
/* * 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 ...
jkbradley/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Average.scala
Scala
apache-2.0
3,644
package me.yingrui.segment.word2vec.apps import java.io.File import java.lang.Math._ import java.nio.file.Files import me.yingrui.segment.math.Matrix import me.yingrui.segment.math.Matrix.randomize import me.yingrui.segment.neural.errors.CrossEntropyLoss import me.yingrui.segment.neural._ import me.yingrui.segment.ut...
yingrui/mahjong
lib-segment-apps/src/main/scala/me/yingrui/segment/word2vec/apps/MNNSegmentTrainingApp.scala
Scala
gpl-3.0
9,798
/* * 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 ...
alvsanand/spark-generic-connector
sgc-ftp/src/test/scala/es/alvsanand/sgc/ftp/normal/FTPSgcConnectorTest.scala
Scala
apache-2.0
6,818
package com.ft.membership.http.testsupport import org.junit.rules.{RuleChain, TestRule} import org.junit.runner.Description import org.junit.runners.model.Statement class TestRules extends TestRule{ val simpleStub = new SimpleStub(9000) val ruleChain = RuleChain.outerRule(simpleStub) override def apply(statem...
Financial-Times/scala-commons
src/main/test/scala/com/ft/membership/http/testsupport/TestRules.scala
Scala
mit
427
/* * 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/example/localEstimator/LenetLocalEstimator.scala
Scala
apache-2.0
3,056
/** * 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...
piavlo/operations-debs-kafka
core/src/main/scala/kafka/producer/ProducerPool.scala
Scala
apache-2.0
7,827
package com.catinthedark.lib import scala.collection.mutable.ListBuffer /** * Created by over on 29.01.15. */ case class Holder(val timeout: Long, val f: () => Unit) trait LocalDeferred extends SimpleUnit with Deferred { private[this] var tasks = new ListBuffer[Holder] override def defer(timeout: Float, f: ()...
cat-in-the-dark/old48_32_game
src/main/scala/com/catinthedark/lib/LocalDeferred.scala
Scala
apache-2.0
781
package redis.protocol import akka.util.ByteString import scala.annotation.tailrec import scala.collection.mutable import scala.util.Try import redis.MultiBulkConverter sealed trait RedisReply { def toByteString: ByteString def asOptByteString: Option[ByteString] } case class Status(status: ByteString) extends ...
xuwei-k/rediscala
src/main/scala/redis/protocol/RedisProtocolReply.scala
Scala
apache-2.0
7,487
package org.shapelogic.sc.polygon /** * * @author Sami Badawi * */ trait IPoint2D extends Comparable[IPoint2D] with Cloneable with GeometricShape2D with PointReplacable[IPoint2D] { def setLocation(x: Double, y: Double): Unit def minus(that: IPoint2D): IPoint2D def add(that: IPoint2D): IPoint2D def mult...
sami-badawi/shapelogic-scala
src/main/scala/org/shapelogic/sc/polygon/IPoint2D.scala
Scala
mit
769
/* * 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/utils/tf/loaders/NotEqual.scala
Scala
apache-2.0
1,258
/* * Copyright (c) 2014-2020 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...
alexandru/monifu
monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/LoadBalanceConsumer.scala
Scala
apache-2.0
15,482
/* * 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 ...
indhub/mxnet
scala-package/core/src/main/scala/org/apache/mxnet/annotation/Experimental.scala
Scala
apache-2.0
1,133
// Copyright (c) 2016 Yuichiroh Matsubayashi package yuima.nuimo.handler import yuima.nuimo.Nuimode import yuima.nuimo.action.{Key, KeyCode, KeyCodes} object LightroomHandler extends DefaultHandler { override val leftRotationSensitivity: Int = 20 override val rightRotationSensitivity: Int = 20 override val act...
Yuichiroh/nuimo-manager
src/main/scala/yuima/nuimo/handler/LightroomHandler.scala
Scala
mit
1,987
package mesosphere.marathon package api import javax.servlet.http.HttpServletRequest import javax.ws.rs._ import javax.ws.rs.core.{ Context, MediaType, Response } import akka.actor.ActorSystem import ch.qos.logback.classic.{ Level, Logger, LoggerContext } import com.google.inject.Inject import com.typesafe.config.{ C...
natemurthy/marathon
src/main/scala/mesosphere/marathon/api/SystemResource.scala
Scala
apache-2.0
4,021
package PACKAGE_UI.CLASS_NAME_UNDERSCORED import scala.util.Try import android.app.ActionBar import android.app.Fragment import android.content.DialogInterface import android.content.Intent import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup i...
luismfonseca/agile-scala-android
src/main/resources/scaffold/main/scala/PACKAGE_NAME_AS_DIR/ui/CLASS_NAME_UNDERSCORED/EditCLASS_NAME_AS_ISFragment.scala
Scala
mit
4,119
package org.genivi.sota.resolver.test import akka.http.scaladsl.model.StatusCodes import eu.timepit.refined.api.Refined import io.circe.generic.auto._ import org.genivi.sota.data.Device.{DeviceId, DeviceName} import org.genivi.sota.data.{Device, DeviceT, PackageId, Uuid} import org.genivi.sota.marshalling.CirceMarsha...
PDXostc/rvi_sota_server
external-resolver/src/test/scala/org/genivi/sota/resolver/test/ResolveResourceSpec.scala
Scala
mpl-2.0
4,941
package collins.util import java.security.SecureRandom import java.security.Security import scala.util.Random import org.bouncycastle.crypto.PBEParametersGenerator import org.bouncycastle.crypto.digests.SHA256Digest import org.bouncycastle.crypto.engines.AESEngine import org.bouncycastle.crypto.generators.PKCS12Para...
discordianfish/collins
app/collins/util/Codec.scala
Scala
apache-2.0
4,622
package name.denyago.yasc.config /** * Configuration for http.Service */ case class HttpServiceConf(host: String, port: Int)
denyago/yet-another-simple-chat
src/main/scala/name/denyago/yasc/config/HttpServiceConf.scala
Scala
mit
130
package dotty.tools.dotc package ast object PluggableTransformers { /* import Trees._, Contexts._ abstract class PluggableTransformer[T] extends TreeTransformer[T, Context] { type PluginOp[-N <: Tree[T]] = N => Tree[T] private[this] var _ctx: Context = _ private[this] var _oldTree: Tree[T] = _ ...
yusuke2255/dotty
src/dotty/tools/dotc/ast/PluggableTransformers.scala
Scala
bsd-3-clause
3,352
package doodle package examples import doodle.core._ import doodle.core.Image._ import doodle.syntax._ import doodle.random._ import cats.instances.list._ import cats.syntax.cartesian._ import cats.syntax.traverse._ object Spirals { def scale(factor: Double): Point => Point = (pt: Point) => { Point.pola...
Angeldude/doodle
shared/src/main/scala/doodle/examples/Spirals.scala
Scala
apache-2.0
2,468
package views.html.streamer import controllers.routes import play.api.data.Form import lila.api.Context import lila.app.templating.Environment._ import lila.app.ui.ScalatagsTemplate._ import lila.common.String.html.richText object edit { import trans.streamer._ def apply( s: lila.streamer.Streamer.WithUs...
luanlv/lila
app/views/streamer/edit.scala
Scala
mit
9,385
package by.bsuir.verpav.misoi.ui.table import java.awt.{BorderLayout, Color, Component, Dimension} import javax.swing.{JFrame, JLabel, JScrollPane, JTable} import javax.swing.table.{AbstractTableModel, TableCellRenderer} class ObjectPropertiesTable(data: Array[List[Any]]) extends JFrame("Objects properties") { set...
VerkhovtsovPavel/BSUIR_Labs
Labs/MISOI/MISOI-2/src/by/bsuir/verpav/misoi/ui/table/ObjectPropertiesTable.scala
Scala
mit
1,817
package nounou.util import java.io.{FileWriter, BufferedWriter, FileReader} import java.nio.charset.StandardCharsets import java.nio.file.Files import com.google.gson.Gson import nounou.NN import org.apache.commons.io.IOUtils import org.eclipse.jgit.lib.Repository import org.eclipse.jgit.storage.file.FileRepositoryBu...
ktakagaki/nounou.rebooted150527
src/main/scala/nounou/util/NNGit.scala
Scala
apache-2.0
6,106
package chapter.three object ExerciseThree extends App { // todo: make generic // todo: preconditions check def swapAdjacent(initial: Array[Int]): Array[Int] = { for (i <- initial.indices.toArray) yield { if (i == initial.size - 1 & i % 2 == 0) initial(i) else if (i % 2 == 0) initial(i + 1) ...
deekim/impatient-scala
src/main/scala/chapter/three/ExerciseThree.scala
Scala
apache-2.0
356
/** * Copyright 2011-2017 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 appli...
MykolaB/gatling
gatling-http/src/main/scala/io/gatling/http/request/builder/sse/SseRequestExpressionBuilder.scala
Scala
apache-2.0
1,524
import akka.actor.Props import akka.io.IO import akka.pattern.ask import akka.util.Timeout import rest.RoutesActor import service.{BugsService, IssuesService, SubIssuesService} import spray.can.Http import utils._ import scala.concurrent.Await import scala.concurrent.ExecutionContext.Implicits.global import scala.conc...
Kanris826/spray-slick-swagger
src/main/scala/Boot.scala
Scala
apache-2.0
1,228
package universe import universe.Animal._ import universe.Globals.engine._ object Animal { val StartEnergy = 200 // radius that animals can see the world around them val ViewRadius = 9 // energy required to move val MoveCost = 1 // energy required to procreate val ProcreateCost = 10 // maximum age in ...
guidosalva/REScala
Code/Examples/Universe/src/main/scala/universe/Animal.scala
Scala
apache-2.0
5,050
package org.scalatest.tools import org.scalatest.events.{Event, SuiteStarting} private[scalatest] case class SuiteResult( suiteId: String, suiteName: String, suiteClassName: Option[String], duration: Option[Long], startEvent: SuiteStarting, endEvent: Event, eventList: collection.immutable.IndexedS...
hubertp/scalatest
src/main/scala/org/scalatest/tools/SuiteResult.scala
Scala
apache-2.0
492
package com.hamishdickson.helix.protein import com.hamishdickson.helix.genomes.rna.{MRna, MRnaGenome, RnaNucleotide, RnaNucleotideU} import org.scalatest.{Matchers, FlatSpec} class CodonTest extends FlatSpec with Matchers { "The Codon apply method" should "turn a list into a Codon" in { val c: List[RnaNucleotid...
hamishdickson/helix
src/test/scala/com/hamishdickson/helix/protein/CodonTest.scala
Scala
mit
1,155
package com.twitter.scrooge.java_generator import com.twitter.scrooge.ast._ import com.twitter.scrooge.ast.SetType import com.twitter.scrooge.ast.MapType class FieldValueMetadataController( fieldType: FieldType, generator: ApacheJavaGenerator, ns: Option[Identifier]) extends BaseController(generator, ns) { ...
twitter/scrooge
scrooge-generator/src/main/scala/com/twitter/scrooge/java_generator/FieldValueMetadataController.scala
Scala
apache-2.0
1,096
import org.junit.Assert._ import org.junit.Test import org.junit.Ignore import scala.util.Random import scala.collection.mutable.ArrayBuffer import Chisel._ import OLK.Kernel._ class GaussianSuite extends TestSuite { @Test def gaussTest { class GaussianTests(c : Gaussian) extends Tester(c) { val r = scala...
da-steve101/chisel-pipelined-olk
src/test/scala/GaussianSuite.scala
Scala
gpl-2.0
5,846
package com.arcusys.learn.liferay.constants import com.liferay.portal.kernel.util.StringPool object StringPoolHelper { val BLANK = StringPool.BLANK val QUESTION = StringPool.QUESTION val EQUAL = StringPool.EQUAL val AMPERSAND = StringPool.AMPERSAND }
arcusys/Valamis
learn-liferay700-services/src/main/scala/com/arcusys/learn/liferay/constants/StringPoolHelper.scala
Scala
gpl-3.0
261
package com.weez.mercury.common import akka.event.LoggingAdapter import com.weez.mercury.imports.packable sealed trait DBType object DBType { sealed trait DBTypeRef import shapeless._ implicit val typeRefPacker: Packer[DBTypeRef] = Packer.poly[DBTypeRef, String.type :: Int.type :: Long.type :: Double.ty...
weeztech/weez-mercury
main/src/main/scala/com/weez/mercury/common/DBSchema.scala
Scala
apache-2.0
10,011
package ru.maizy.ambient7.core.util /** * Copyright (c) Nikita Kovaliov, maizy.ru, 2016-2017 * See LICENSE.txt for details. */ import java.time.{ Instant, ZoneId, ZonedDateTime } import scala.concurrent.duration.Duration object Dates { def dateTimeForUser(dateTime: ZonedDateTime, timeZone: ZoneId = ZoneId.syste...
maizy/ambient7
core/src/main/scala/ru/maizy/ambient7/core/util/Dates.scala
Scala
apache-2.0
837
/* Copyright (c) 2010, Tobias Knerr 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 of conditions and the foll...
tordanik/TemplatesToTables
src/TemplatesToTables.scala
Scala
bsd-2-clause
1,709
/* * Copyright 2019 ACINQ SAS * * 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...
ACINQ/eclair
eclair-front/src/main/scala/fr/acinq/eclair/FrontSetup.scala
Scala
apache-2.0
5,189
package com.seanshubin.learn.datomic.domain trait Notifications { def effectiveConfiguration(configuration: Configuration) def configurationError(lines: Seq[String]) def topLevelException(exception: Throwable) def schemaUpdateResult(singleUpdateResult: SingleUpdateResult) }
SeanShubin/learn-datomic
domain/src/main/scala/com/seanshubin/learn/datomic/domain/Notifications.scala
Scala
unlicense
287
import java.io.{File, FileOutputStream} import scala.tools.partest.DirectTest import scala.tools.partest.nest.StreamCapture import scala.tools.asm import asm.{ClassWriter, Opcodes} import Opcodes._ // This test ensures that we can read JDK 8 (classfile format 52) files, including those // with default methods. To do ...
scala/scala
test/files/run/classfile-format-52.scala
Scala
apache-2.0
1,957
package org.jetbrains.plugins.scala package lang package psi package api package toplevel import com.intellij.psi.tree.IElementType import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes._ import org.jetbrains.plugins.scala.lang.psi.api.base.types.ScTypeElement import org.jetbrains.plugins.scala.lang.psi.types....
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/api/toplevel/ScTypeBoundsOwner.scala
Scala
apache-2.0
1,405
/* * Copyright 1998-2019 Linux.org.ru * 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...
maxcom/lorsource
src/main/scala/ru/org/linux/util/markdown/SuppressImagesExtension.scala
Scala
apache-2.0
2,044
package net.liftweb.util import _root_.java.text.SimpleDateFormat import _root_.java.util.{TimeZone, Calendar, Date, Locale} /* * Copyright 2006-2008 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. *...
beni55/liftweb
lift-util/src/main/scala/net/liftweb/util/TimeHelpers.scala
Scala
apache-2.0
12,556
package com.plasmaconduit.framework.mvc import com.plasmaconduit.framework.HttpRequest trait Middleware[R <: HttpRequest[R]] { def intercept(next: Controller[R]): Controller[R] } object Middleware { def compose[R <: HttpRequest[R]](action: Controller[R], middleware: Seq[Middleware[R]]): Controller[R] = { ...
plasmaconduit/plasmaconduit-framework
src/main/scala/com/plasmaconduit/framework/mvc/Middleware.scala
Scala
mit
400
/* * 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-http/src/main/scala/io/gatling/http/ahc/AhcRequestBuilder.scala
Scala
apache-2.0
910
package org.loklak.crawler import org.scalatest.{ShouldMatchers, FlatSpec} /** * Created by Scott on 6/2/16. */ class TwitterSearchFuncTest extends FlatSpec with ShouldMatchers{ "Twitter Crawler" should "be able to perform search on any topic" in{ TwitterSearchFunc.grouped_search("loklak").flatten.length sh...
DengYiping/loklak-scala
src/test/scala/org/loklak/crawler/TwitterSearchFuncTest.scala
Scala
mit
339
package mesosphere.marathon.event.http import javax.inject.Inject import akka.actor._ import akka.pattern.ask import mesosphere.marathon.api.v2.json.Formats._ import mesosphere.marathon.core.base.Clock import mesosphere.marathon.event._ import mesosphere.marathon.event.http.HttpEventActor._ import mesosphere.marathon...
yp-engineering/marathon
src/main/scala/mesosphere/marathon/event/http/HttpEventActor.scala
Scala
apache-2.0
5,783
/* * 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 ...
aliyun/aliyun-emapreduce-sdk
examples/src/main/scala/com/aliyun/emr/examples/sql/streaming/StructuredDatahubSample.scala
Scala
artistic-2.0
2,545
package oauthorize.grants import oauthorize.utils._ import oauthorize.model._ import oauthorize.service._ import oauth2.spec.Req._ import oauth2.spec.AccessTokenErrors._ import oauth2.spec._ import oauth2.spec.model._ import scala.concurrent.Future import scala.concurrent.ExecutionContext class ResourceOwnerCredentia...
adaptorel/oauthorize
oauthorize-core/src/main/scala/grants/ResourceOwnerCredentialsGrant.scala
Scala
apache-2.0
3,178
package net.surguy.slidegame.shared import scala.collection.mutable.ListBuffer /** * Support stepping forwards and backwards through the history. */ class TimeTravelActions(observable: Observable) { private val pastActions = new ListBuffer[Message]() private val futureActions = new ListBuffer[Message]() pr...
inigo/scalajs-slidegame
shared/src/main/scala/net/surguy/slidegame/shared/TimeTravelActions.scala
Scala
gpl-3.0
1,991
package com.avast.cactus import org.scalatest.FunSuite class ConverterMethodsTest extends FunSuite { test("map") { case class A(value: Int) case class B(value: String) case class C(values: String) val convAtoB = Converter[A, B] { a => B(a.value.toString) } val convSeqAtoC: Converter[A...
avast/cactus
common/src/test/scala/com/avast/cactus/ConverterMethodsTest.scala
Scala
apache-2.0
1,607
package com.sksamuel.avro4s import java.io.File import java.nio.file.Paths import java.util.UUID import org.apache.avro.file.{DataFileReader, DataFileWriter} import org.apache.avro.generic.GenericData.Record import org.apache.avro.generic.{GenericData, GenericDatumReader, GenericDatumWriter, GenericRecord} object Av...
YuvalItzchakov/avro4s
avro4s-core/src/test/scala/com/sksamuel/avro4s/AvroTest.scala
Scala
mit
1,949
/*********************************************************************** * Copyright (c) 2013-2018 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...
ddseapy/geomesa
geomesa-filter/src/main/scala/org/locationtech/geomesa/filter/Bounds.scala
Scala
apache-2.0
6,130
/** * (c) Copyright 2012 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...
alexandre-normand/kiji-schema-shell
src/main/scala/org/kiji/schema/shell/ddl/UseInstanceCommand.scala
Scala
apache-2.0
1,535
package pipelines import scala.reflect.{BeanProperty, ClassTag} class CKMConf extends Serializable { @BeanProperty var dataset: String = "imagenet-small" @BeanProperty var expid: String = "imagenet-small-run" @BeanProperty var mode: String = "scala" @BeanProperty var seed: Int = 0 @BeanProperty var laye...
Vaishaal/ckm
keystone_pipeline/src/main/scala/pipelines/CKMConf.scala
Scala
apache-2.0
5,005
package com.github.leifh.seglcoverage trait AnotherService { def isUnder18AndSwiss(customer : Customer) : Boolean = if(customer.age < 18) true else if(customer.country == Switzerland) true else false }
leifh/segl-coverage
src/main/scala/com/github/leifh/seglcoverage/AnotherService.scala
Scala
apache-2.0
205
package dao.impl import javax.inject.Inject import com.google.inject.Singleton import dao.{LaboratoryDAO, RoomDAO} import model.table._ import model._ import org.h2.jdbc.JdbcSQLException import play.Logger import play.api.db.slick.DatabaseConfigProvider import play.api.libs.concurrent.Execution.Implicits._ import ser...
ProjectAton/AtonLab
app/dao/impl/LaboratoryDAOImpl.scala
Scala
gpl-3.0
4,289
package com.neusoft.spark.examples import org.apache.spark._ import com.neusoft.spark.examples.Utils._ object ToolGrep { def main(args: Array[String]) { val conf = new SparkConf().setAppName("Grep file content") val sc = new SparkContext(conf) val options = argOptions(args) val input =...
ruoyousi/spark-examples
src/main/scala/com/neusoft/spark/examples/ToolGrep.scala
Scala
apache-2.0
585
package io.finch.benchmarks import com.twitter.finagle.http.Request import com.twitter.io.Buf import io.finch._ import org.openjdk.jmh.annotations.{Benchmark, Scope, State} @State(Scope.Benchmark) class BodyBenchmark extends FinchBenchmark { val input = { val r = Request() val content = Buf.Utf8("x" * 1024...
travisbrown/finch
benchmarks/src/main/scala/io/finch/benchmarks/BodyBenchmark.scala
Scala
apache-2.0
714
/** * 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 controllers import _root_.models.{AccountSegme...
MoonGene/Analytics
src/moon/app/controllers/DataFetcher.scala
Scala
gpl-3.0
14,582
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
nfergu/bdg-utils
utils-io/src/main/scala/org/bdgenomics/utils/io/FileLocator.scala
Scala
apache-2.0
1,959
class M[_] trait T { def foo(m: M[_ >: String]) = 42 } object Test { def t: T = new T { def foo(m: M[_ >: Any]) = 0 // Expected: "same type after erasure" } def main(args: Array[String]): Unit = { val m: M[String] = null t.foo(m) // VerifyError: Duplicate method name&signature } }
lrytz/scala
test/files/neg/t9286c.scala
Scala
apache-2.0
305
package io.bartholomews.spotify4s.circe.api import cats.data.NonEmptySet import com.github.tomakehurst.wiremock.client.MappingBuilder import com.github.tomakehurst.wiremock.client.WireMock._ import com.github.tomakehurst.wiremock.stubbing.StubMapping import io.bartholomews.fsclient.core.oauth.NonRefreshableTokenSigner...
bartholomews/spotify-scala-client
modules/circe/src/test/scala/io/bartholomews/spotify4s/circe/api/TracksApiSpec.scala
Scala
mit
11,333
package ui.pages import japgolly.scalajs.react.vdom.prefix_<^._ import japgolly.scalajs.react.{BackendScope, ReactComponentB, ReactElement} import model._ import ui.WorkbenchRef import ui.widgets._ import ui.widgets.dialogs.ContainerRequestForm import util.{EventAction, EventCategory, PlatformService} import ...
felixgborrego/simple-docker-ui
src/main/scala/ui/pages/ImagePage.scala
Scala
mit
5,242
/* * Copyright (c) 2014-2018 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...
ddworak/monix
monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala
Scala
apache-2.0
1,962
package gitbucket.core.model trait IssueLabelComponent extends TemplateComponent { self: Profile => import profile.simple._ lazy val IssueLabels = TableQuery[IssueLabels] class IssueLabels(tag: Tag) extends Table[IssueLabel](tag, "ISSUE_LABEL") with IssueTemplate with LabelTemplate { def * = (userName, rep...
intermezzo-fr/gitbucket
src/main/scala/gitbucket/core/model/IssueLabels.scala
Scala
apache-2.0
666
package leo.modules.proofCalculi import leo.datastructures._ import leo.datastructures.term.Term import leo.modules.output.Output trait TermComparison { type Substitute = (Subst,Seq[Type]) /** * * @param t - First term to unify * @param s - Second term to unify * @param n - Offset for new implicit Bi...
cbenzmueller/LeoPARD
src/main/scala/leo/modules/proofCalculi/CalculusTest.scala
Scala
bsd-3-clause
6,751
package com.lucidchart.open.cashy.models import javax.inject.Inject import play.api.Play.current import play.api.db.Database import com.lucidchart.open.relate.interp._ import com.lucidchart.open.relate.SqlResult case class User( id: Long, googleId: String, email: String ) object UserModel extends UserModel(pla...
lucidsoftware/cashy
app/com/lucidchart/open/cashy/models/UserModel.scala
Scala
apache-2.0
1,609
package com.wordnik.client.model import com.wordnik.client.model.ShowcaseDatatypePrimitives import com.wordnik.client.model.Category import java.util.Date import com.wordnik.client.model.ShowcaseDatatypeDate import com.wordnik.client.model.ShowcaseDatatypeMath import com.wordnik.client.model.Location case class U...
jfiala/swagger-spring-demo
user-rest-service-1.0.2/generated-code/scalatra/src/main/scala/com/wordnik/client/model/User.scala
Scala
apache-2.0
628
package edu.umass.ciir.kbbridge import data.{ScoredWikipediaEntity, EntityMention} import text2kb.KnowledgeBaseCandidateGenerator import util.{ConfInfo, KbBridgeProperties} /** * User: jdalton * Date: 6/12/13 */ object SimpleEntityLinker { lazy val candidateGenerator = KnowledgeBaseCandidateGenerator() val re...
daltonj/KbBridge
src/main/scala/edu/umass/ciir/kbbridge/SimpleEntityLinker.scala
Scala
apache-2.0
836
/* * 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 ...
Panos-Bletsos/spark-cost-model-optimizer
mllib/src/main/scala/org/apache/spark/ml/ann/LossFunction.scala
Scala
apache-2.0
4,170
/* Copyright 2009-2016 EPFL, Lausanne */ import leon.annotation.extern object DefaultParameter { def foo(x: Int = 1) = x def bar = foo() + foo(2) == 3 def _main() = if (bar) 0 else 1 @extern def main(args: Array[String]): Unit = _main() }
regb/leon
src/test/resources/regression/genc/valid/DefaultParameter.scala
Scala
gpl-3.0
257
package com.twitter.finagle.service import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.scalatest.mock.MockitoSugar import com.twitter.finagle.{NotServableException, Service} import org.mockito.Mockito.{times, verify, when} import org.mockito.Matchers._ impor...
thirstycrow/finagle
finagle-core/src/test/scala/com/twitter/finagle/service/OptionallyServableFilterTest.scala
Scala
apache-2.0
1,547
package scala.slick.compiler import scala.collection.mutable.{HashSet, HashMap} import scala.slick.SlickException import scala.slick.ast._ import Util._ /** * Remove TableExpansions and TableRefExpansions, and flatten ProductNodes * into StructNodes and remove unnecessary columns from them. */ class RewritePaths e...
zefonseca/slick-1.0.0-scala.2.11.1
src/main/scala/scala/slick/compiler/RewritePaths.scala
Scala
bsd-2-clause
7,513
package edu.duke.oit.vw.models import edu.duke.oit.vw.utils._ import edu.duke.oit.vw.solr.Vivo case class Newsfeed(uri:String, vivoType: String, label: String, attributes:Option[Map[String, String]]) extends VivoAttributes(uri, vivoType, label, attributes) wi...
OIT-ADS-Web/vivo_widgets
src/main/scala/models/Newsfeed.scala
Scala
bsd-3-clause
1,084
package org.template.similar import io.prediction.controller.PAlgorithm import io.prediction.controller.Params import io.prediction.controller.IPersistentModel import io.prediction.controller.IPersistentModelLoader import io.prediction.data.storage.BiMap import org.apache.spark.SparkContext import org.apache.spark.Sp...
TheDataShed/PredictionIO
templates/scala-parallel-similar/src/main/scala/ALSAlgorithm.scala
Scala
apache-2.0
6,945
package jgo.tools.compiler package parser import scala.util.parsing.input.Reader import lexer._ import scope._ import interm._ import interm.types._ import stmts._ import funcs._ /** * An old class used for testing the parser. * @todo remove this */ class BlockLang(in: Reader[Token], res: List[Type] = Nil, resNa...
thomasmodeneis/jgo
src/src/main/scala/jgo/tools/compiler/parser/BlockLang.scala
Scala
gpl-3.0
1,103
package com.datastax.spark.connector.sql import org.apache.spark.Logging import org.apache.spark.sql.{DataFrame, SQLContext} import org.apache.spark.sql.SaveMode._ import org.apache.spark.sql.cassandra.{TableRef, CassandraSourceRelation} import com.datastax.spark.connector.SparkCassandraITFlatSpecBase import com.dat...
clakech/spark-cassandra-connector
spark-cassandra-connector/src/it/scala/com/datastax/spark/connector/sql/CassandraDataSourceSpec.scala
Scala
apache-2.0
6,408
package com.datastax.spark.connector.writer import java.io.IOException import com.datastax.driver.core.ProtocolVersion import scala.collection.JavaConversions._ import scala.concurrent.Future import com.datastax.spark.connector.mapper.{ColumnMapper, DefaultColumnMapper} import com.datastax.spark.connector.embedded....
jimenefe/spark-cassandra-connector
spark-cassandra-connector/src/it/scala/com/datastax/spark/connector/writer/TableWriterSpec.scala
Scala
apache-2.0
33,349
package de.mineformers.visum.bean.property import de.mineformers.visum.bean.value.{ObservableValue, MutableObservableValue} /** * Property * * @author PaleoCrafter */ trait MutableProperty[@specialized A] extends Property[A] with MutableObservableValue[A] { protected var valid = false def invalidate(): Unit ...
MineFormers/Visum
src/main/scala/de.mineformers.visum/bean/property/MutableProperty.scala
Scala
mit
861
/* * 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 ...
michalsenkyr/spark
sql/core/src/test/scala/org/apache/spark/sql/sources/v2/SimpleWritableDataSource.scala
Scala
apache-2.0
7,221
package com.sksamuel.elastic4s.scalaz import com.sksamuel.elastic4s.http.{ElasticRequest, Executor, HttpClient, HttpResponse} import scalaz.\\/ import scalaz.concurrent.Task class TaskExecutor extends Executor[Task] { override def exec(client: HttpClient, request: ElasticRequest): Task[HttpResponse] = { Task.a...
Tecsisa/elastic4s
elastic4s-scalaz/src/main/scala/com/sksamuel/elastic4s/scalaz/TaskExecutor.scala
Scala
apache-2.0
400
/* * 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-api/src/main/scala/com/ibm/spark/interpreter/imports/printers/WrapperConsole.scala
Scala
apache-2.0
1,471
package chapter.eight object ExerciseFive extends App { class Point(val x: Double, val y: Double) class LabeledPoint(val label: String, x: Double, y: Double) extends Point(x, y) }
deekim/impatient-scala
src/main/scala/chapter/eight/ExerciseFive.scala
Scala
apache-2.0
191
import scala.collection._ object eclat{ val minSup = 0.5*6 def eclat(_prefix:Set[Int], _x:mutable.Map[Int,Set[Int]], _xx:mutable.Map[Int,Set[Int]], result:mutable.Map[Set[Int], Int]):mutable.Map[Set[Int],Int] = {//:Unit = { var xx = _xx var prefix = _prefix while(!xx.isEmpty){ var itemtid = xx.last ...
heming621/postgraduate-
sparkEclatV1/eclat.scala
Scala
mit
2,519
package chapter.seven // todo: is this correct in terms of best design practices? package object random { // todo: http://stackoverflow.com/questions/31275887/underscores-in-numeric-literals-in-scala val a = 1664525 val b = 1013904223 val n = 32 var seed : Int = 0 def setSeed(seed: Int) = this.seed = see...
deekim/impatient-scala
src/main/scala/chapter/seven/ExerciseThree.scala
Scala
apache-2.0
500
package latis.ops import latis.units.UnitOfMeasure import latis.dm.Dataset import latis.dm.Scalar import latis.units.UnitConverter import latis.time.TimeScale import latis.time.TimeConverter import latis.time.Time import latis.dm.Sample import latis.time.TimeFormat /** * Convert all Time variables to a Time of type ...
dlindhol/LaTiS
src/main/scala/latis/ops/TimeFormatter.scala
Scala
epl-1.0
1,970
/** * 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...
guozhangwang/kafka
core/src/test/scala/unit/kafka/server/ControllerMutationQuotaManagerTest.scala
Scala
apache-2.0
9,084
/* Copyright 2017-19, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
eaplatanios/tensorflow_scala
modules/api/src/main/scala/org/platanios/tensorflow/api/learn/hooks/SummarySaver.scala
Scala
apache-2.0
3,560
package dotty.tools package dotc package fromtasty import scala.language.unsafeNulls import io.{JarArchive, AbstractFile, Path} import core.Contexts._ import java.io.File class TASTYRun(comp: Compiler, ictx: Context) extends Run(comp, ictx) { override def compile(files: List[AbstractFile]): Unit = { val units ...
dotty-staging/dotty
compiler/src/dotty/tools/dotc/fromtasty/TASTYRun.scala
Scala
apache-2.0
1,238
package akka.persistence.hbase.snapshot import java.util.{ArrayList => JArrayList} import akka.actor.ActorSystem import akka.persistence.hbase.common.TestingEventProtocol.DeletedSnapshotsFor import akka.persistence.hbase.common._ import akka.persistence.hbase.journal._ import akka.persistence.serialization.Snapshot i...
ktoso/akka-persistence-hbase
src/main/scala/akka/persistence/hbase/snapshot/HBaseSnapshotter.scala
Scala
apache-2.0
5,067
package mesosphere.marathon.api.v2 import mesosphere.marathon.api.TaskKiller import mesosphere.marathon.health.HealthCheckManager import mesosphere.marathon.state.{ GroupManager, PathId, Timestamp } import mesosphere.marathon.tasks.{ MarathonTasks, TaskIdUtil, TaskTracker } import mesosphere.marathon.{ MarathonConf, M...
bsideup/marathon
src/test/scala/mesosphere/marathon/api/v2/TasksResourceTest.scala
Scala
apache-2.0
2,541
package net.snowflake.spark.snowflake import net.snowflake.client.jdbc.SnowflakeSQLException import net.snowflake.spark.snowflake.Utils.SNOWFLAKE_SOURCE_NAME import net.snowflake.spark.snowflake.test.TestHook import net.snowflake.spark.snowflake.test.TestHookFlag.{ TH_WRITE_ERROR_AFTER_COPY_INTO, TH_WRITE_ERROR_AF...
snowflakedb/spark-snowflake
src/it/scala/net/snowflake/spark/snowflake/TruncateTableSuite.scala
Scala
apache-2.0
23,227
package models import anorm.SqlParser._ import anorm._ import play.api.Play.current import play.api.db._ import scala.language.postfixOps case class User(username: String, password: String, admin: Boolean = false) { def toAdmin = copy(admin = true) } object User { /** * Parse a User from a ResultSet ...
gewoonrik/MAP
bad/app/models/User.scala
Scala
mit
2,123
package x7c1.wheat.harvest import java.io.PrintWriter import play.twirl.api.TxtFormat import sbt._ case class JavaSource( code: String, file: File ) class JavaSourceFactory [A <: ResourceParts]( targetDir: File, className: String, template: A => TxtFormat.Appendable, partsFactory: ResourcePartsFactory[A...
x7c1/Wheat
wheat-harvest/src/main/scala/x7c1/wheat/harvest/JavaSource.scala
Scala
mit
901
package scaffvis.client.components.common import scaffvis.layout.Rect import japgolly.scalajs.react.vdom.ReactTagOf import japgolly.scalajs.react.vdom.prefix_<^._ import org.scalajs.dom.html.Image import scala.scalajs.js.URIUtils object Svg { /* def fromSvgContent(position: Rect, viewBox: Rect)(innerHtml: String...
velkoborsky/scaffvis
client/src/main/scala/scaffvis/client/components/common/Svg.scala
Scala
gpl-3.0
2,221
package pl.touk.nussknacker.sql.service import pl.touk.nussknacker.engine.api.typed.TypedMap import pl.touk.nussknacker.sql.db.query.ResultSetStrategy import pl.touk.nussknacker.sql.db.schema.{MetaDataProviderFactory, TableDefinition} import pl.touk.nussknacker.sql.utils.BaseHsqlQueryEnricherTest import scala.concurr...
TouK/nussknacker
components/sql/src/test/scala/pl/touk/nussknacker/sql/service/DatabaseQueryEnricherTest.scala
Scala
apache-2.0
1,913