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
/* * 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
mllib/src/main/scala/org/apache/spark/ml/classification/OneVsRest.scala
Scala
apache-2.0
18,213
/** * 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/admin/ConfigCommandTest.scala
Scala
apache-2.0
80,618
package org.jetbrains.plugins.scala.project import com.intellij.util.net.HttpConfigurable import org.jetbrains.plugins.scala.buildinfo.BuildInfo import org.jetbrains.plugins.scala.project.Platform.{Dotty, Scala} import org.jetbrains.sbt.Sbt import scala.io.Source import scala.util.Try import scala.util.matching.Regex...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/project/Versions.scala
Scala
apache-2.0
2,739
/* * Copyright (C) 2016 Christopher Batey and Dogan Narinc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
mikefero/cpp-driver
gtests/src/integration/scassandra/server/server/src/test/scala/org/scassandra/server/actors/OptionsHandlerTest.scala
Scala
apache-2.0
1,244
package filodb.core.memstore import com.typesafe.config.ConfigFactory import org.scalatest.concurrent.ScalaFutures import org.scalatest.time.{Millis, Seconds, Span} import filodb.core._ import filodb.core.binaryrecord2.RecordBuilder import filodb.memory._ import filodb.memory.format.UnsafeUtils class PartitionSetSpe...
velvia/FiloDB
core/src/test/scala/filodb.core/memstore/PartitionSetSpec.scala
Scala
apache-2.0
4,530
/* * Copyright (c) 2016 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 in writ...
gnieh/tekstlib
src/main/scala/gnieh/regex/tdfa/package.scala
Scala
apache-2.0
2,069
package com.ponkotuy.queries case class LoginEmail(email: String, password: String)
ponkotuy/aggregate-exif
app/com/ponkotuy/queries/LoginEmail.scala
Scala
apache-2.0
85
package io.hydrosphere.mist.master.interfaces.http import java.lang.management._ import java.time.LocalDateTime import io.hydrosphere.mist.core.FunctionInfoData import io.hydrosphere.mist.master.models.{ContextConfig, RunMode} import mist.api._ import scala.concurrent.duration.Duration case class HttpJobInfo( nam...
Hydrospheredata/mist
mist/master/src/main/scala/io/hydrosphere/mist/master/interfaces/http/models.scala
Scala
apache-2.0
6,389
package text.kanji /** * @author ynupc * Created on 2016/07/26 */ object JISLevel4KanjiCharacter extends KanjiCharacter { override val kanji: Seq[String] = readKanjiCSV("jis_level_4") }
ynupc/scalastringcourseday7
src/main/scala/text/kanji/JISLevel4KanjiCharacter.scala
Scala
apache-2.0
202
package mr.merc.economics import mr.merc.politics.{Party, PopulationElectionReport, RegionElectionReport, State, StateElectionReport} import org.scalatest.funsuite.AnyFunSuite import Party._ class PoliticalSystemTest extends AnyFunSuite { private val state = new State("", Culture.LatinHuman, 0, Party.Absolute, 0) ...
RenualdMarch/merc
src/test/scala/mr/merc/economics/PoliticalSystemTest.scala
Scala
gpl-3.0
4,335
// scalastyle:off package controllers import javax.inject.Inject import com.mohiva.play.silhouette.api._ import com.mohiva.play.silhouette.api.Silhouette import com.mohiva.play.silhouette.api.exceptions.ProviderException import com.mohiva.play.silhouette.impl.providers.CredentialsProvider import com.mohiva.play.silho...
glidester/play-silhouette-seed
app/controllers/PasswordChangeController.scala
Scala
apache-2.0
7,284
/* * 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 ...
aokolnychyi/spark
core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala
Scala
apache-2.0
104,092
package com.socrata.datacoordinator.secondary.feedback import com.rojoma.json.io.JsonLexException import com.rojoma.json.util.JsonArrayIterator.ElementDecodeException import com.rojoma.json.v3.ast._ import com.rojoma.json.v3.codec.JsonEncode import com.rojoma.json.v3.interpolation._ import com.rojoma.simplearm.v2.{Res...
socrata-platform/data-coordinator
secondarylib-feedback/src/main/scala/com/socrata/datacoordinator/secondary/feedback/FeedbackContext.scala
Scala
apache-2.0
18,375
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
guozhangwang/kafka
core/src/main/scala/kafka/admin/ConfigCommand.scala
Scala
apache-2.0
54,052
package com.marcocampana.google.utils import org.scalatest.{FlatSpec,Matchers} abstract class UnitTest(component: String) extends FlatSpec with Matchers { behavior of component }
marcocampana/google-maps-services-scala
src/test/scala/com/marcocampana/google/utils/UnitTest.scala
Scala
apache-2.0
184
package org.openmole.gui.client.core /* * Copyright (C) 17/05/15 // [email protected] * * 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, ...
openmole/openmole
openmole/gui/client/org.openmole.gui.client.core/src/main/scala/org/openmole/gui/client/core/AuthenticationPanel.scala
Scala
agpl-3.0
6,297
/** * 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...
pwielgolaski/gatling
gatling-http/src/main/scala/io/gatling/http/check/header/HttpHeaderRegexExtractorFactory.scala
Scala
apache-2.0
1,992
package com.wallace.demo.rest.sever.demo.rest import akka.actor.{Actor, ActorRefFactory} import com.wallace.demo.rest.sever.demo.common.LogSupport import org.json4s.{DefaultFormats, Formats} import spray.http.HttpResponse import spray.http.MediaTypes._ import spray.httpx.Json4sSupport import spray.routing.{HttpService...
LeagueForHacker/Rest-Sever-Demo
src/main/scala/com/wallace/demo/rest/sever/demo/rest/RedisClientActor.scala
Scala
mit
1,214
import swing._ import scala.swing.event._ import java.util.UUID object Main extends SimpleSwingApplication { def top = new MainFrame { title = "Bookmark Manager" contents = new GridPanel(2, 2) { hGap = 3 vGap = 3 contents += new Button { text = "Press Me!" reactions += { ...
jeroanan/SunshineRecorder
src/Main.scala
Scala
gpl-3.0
453
package o1.adventurejukebox import org.scalatra.test.specs2._ // For more on Specs2, see http://etorreborre.github.com/specs2/guide/org.specs2.guide.QuickStart.html class AdventureServletSpec extends ScalatraSpec { def is = "GET / on AdventureServlet" ^ "should return status 200" ...
tuner/adventure-jukebox
src/test/scala/o1/adventurejukebox/AdventureServletSpec.scala
Scala
mit
493
package latis.writer import java.io.FileOutputStream import org.junit._ import Assert._ import scala.io.Source import latis.reader.tsml.TsmlReader import java.io.DataOutputStream import java.io.File import latis.dm._ import latis.metadata.Metadata class TestMetadataWriter extends WriterTest{ @Test @Ignore def ...
dlindhol/LaTiS
src/test/scala/latis/writer/TestMetadataWriter.scala
Scala
epl-1.0
958
/* * 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...
zhangxiaoli73/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/integration/torch/RReLUSpec.scala
Scala
apache-2.0
8,663
package com.twitter.scalding import com.twitter.scalding.serialization._ import org.specs._ import java.io.{ByteArrayOutputStream=>BOS} import java.io.{ByteArrayInputStream=>BIS} import scala.collection.immutable.ListMap import scala.collection.immutable.HashMap import com.twitter.algebird.{AveragedValue, DecayedV...
stripe/scalding
scalding-core/src/test/scala/com/twitter/scalding/KryoTest.scala
Scala
apache-2.0
4,824
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
darionyaphet/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetPartitionDiscoverySuite.scala
Scala
apache-2.0
46,514
package ch.wsl.box.rest.metadata import java.util.UUID import akka.stream.Materializer import ch.wsl.box.model.boxentities.{BoxForm, BoxFunction, BoxUser} import ch.wsl.box.model.shared._ import ch.wsl.box.rest.routes.{Table, View} import ch.wsl.box.rest.runtime.Registry import ch.wsl.box.rest.utils.UserProfile import...
Insubric/box
server/src/main/scala/ch/wsl/box/rest/metadata/BoxFormMetadataFactory.scala
Scala
apache-2.0
4,290
/* * 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 u...
liutang123/spark
sql/core/src/main/scala/org/apache/spark/sql/Column.scala
Scala
apache-2.0
36,619
import blended.sbt.Dependencies object BlendedUtil extends ProjectFactory { private[this] val helper = new ProjectSettings( projectName = "blended.util", description = "Utility classes to use in other bundles", deps = Seq( Dependencies.akkaActor, Dependencies.akkaSlf4j, Dependencies.sl...
lefou/blended
project/BlendedUtil.scala
Scala
apache-2.0
703
package eventsource.slick import java.time.Instant import akka.actor.ActorSystem import eventsource.models.{Event, EventVersion, SomeEntity, SomeEventType} import org.scalamock.scalatest.MockFactory import org.scalatest.concurrent.ScalaFutures import org.scalatest.time.SpanSugar._ import org.scalatest.{BeforeAndAfter...
21re/play-eventsource
src/test/scala/eventsource/slick/CreateActionSpec.scala
Scala
mit
4,290
package ir.ast import ir.interpreter.Interpreter._ import ir._ /** * Head pattern. * Code for this pattern can be generated. * * The head pattern has the following high-level semantics: * `Head()( [x,,1,,, ..., x,,n,,] ) = x,,1,,` * * The head pattern has the following type: * `Head() : [a],,I,, -> a` */ cas...
lift-project/lift
src/main/ir/ast/Head.scala
Scala
mit
768
import sbt._ import Keys._ object BuildSettings { lazy val basicSettings = Seq[Setting[_]]( organization := "com.github.splee", version := "0.2-SNAPSHOT", description := "Monitors consumer group offset lag in Burrow using InfluxDB", resolvers ++= Dependencies.resolutionRepos ) // sbt-assembly se...
splee/burrower
project/BuildSettings.scala
Scala
mit
1,807
package org.bfn.ninetynineprobs import org.scalatest._ class P88Spec extends UnitSpec { // TODO }
bfontaine/99Scala
src/test/scala/P88Spec.scala
Scala
mit
105
package edu.berkeley.cs.amplab.sparkr import java.io._ import java.net.ServerSocket import java.util.{Map => JMap} import scala.collection.JavaConversions._ import scala.io.Source import scala.reflect.ClassTag import scala.util.Try import org.apache.spark.api.java.{JavaPairRDD, JavaRDD, JavaSparkContext} import org....
nvoron23/SparkR-pkg
pkg/src/src/main/scala/edu/berkeley/cs/amplab/sparkr/RRDD.scala
Scala
apache-2.0
16,618
// scalac -language:implicitConversions -language:postfixOps *.scala import scala.language.implicitConversions import scala.language.postfixOps object Main { implicit class MyInt(i:Int) { def squared = i*i } implicit val implicitInt = 2 implicit def intPair2int(p:(Int,Int)): Int = p._1 + p._2 def mul...
littlenag/scala-enthusiasts
scala-decompiled-pt-2/10_implicits/10_implicits.scala
Scala
mit
520
/* * 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/master/ui/MasterPage.scala
Scala
apache-2.0
9,745
/* * 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...
ioana-delaney/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/ColumnarBatchScan.scala
Scala
apache-2.0
6,844
package io.flow.reference import io.flow.reference.data.Currencies.{Eek, Ltl, Lvl} import io.flow.reference.v0.models.CurrencySymbols import org.scalatest.funspec.AnyFunSpec import org.scalatest.matchers.should.Matchers class CurrenciesSpec extends AnyFunSpec with Matchers { it("unsupported") { data.Currencies...
flowcommerce/lib-reference-scala
src/test/scala/io/flow/reference/CurrenciesSpec.scala
Scala
mit
5,274
package org.pigsaw.ccpm /* Copyright Nik Silver 2015. * * This file is part of CCPM. * * CCPM 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...
niksilver/ccpm
src/test/scala/org/pigsaw/ccpm/RippleAdjusterTest.scala
Scala
gpl-3.0
6,835
package epam.bdcc_app.json import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonProperty import lombok.Data @Data @JsonIgnoreProperties(ignoreUnknown = true) class Vk_follows { @JsonProperty("count") val count = 0L @JsonProperty("items") val items:...
mkasatkin/bdcc_app.vk_samza
src/main/scala/epam/bdcc_app/json/Vk_follows.scala
Scala
apache-2.0
349
/* * Copyright 2014-2022 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
Netflix-Skunkworks/iep-apps
atlas-cloudwatch/src/main/scala/com/netflix/atlas/poller/ClientActor.scala
Scala
apache-2.0
5,876
/* * 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 ...
WindCanDie/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/vectorized/ColumnarBatchSuite.scala
Scala
apache-2.0
43,513
/* * Copyright 2015 Databricks Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
levyx/spark-sql-perf
src/main/scala/com/databricks/spark/sql/perf/tpcds/ImpalaKitQueries.scala
Scala
apache-2.0
69,628
package com.malpeza.solid.isp.entities class CurrencyRatesService { } object CurrencyRatesService { def apply() = new CurrencyRatesService() }
lsolano/blog.solid.demo
scala/src/main/scala/com/malpeza/solid/isp/entities/CurrencyRatesService.scala
Scala
mit
149
/* Copyright 2017-18, 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
tensorflow/scala/api/src/main/scala/org/platanios/tensorflow/api/ops/io/data/RangeDataset.scala
Scala
apache-2.0
2,242
package scaladget.highlightjs import org.querki.jsext import org.scalajs.dom.Element import jsext._ import scala.scalajs.js import scala.scalajs.js.annotation._ /** * @see [[https://highlightjs.org/usage/]] */ @js.native @JSImport("highlight.js", JSImport.Namespace) object HighlightJS extends HighlightStatic ...
openmole/scaladget
highlightjs/src/main/scala/scaladget/highlightjs/HighlightJS.scala
Scala
agpl-3.0
5,871
package com.flowy.binance import akka.actor.ActorSystem import akka.stream.ActorMaterializer import com.flowy.common.utils.ServerConfig import com.flowy.common.utils.sql.{DatabaseConfig, SqlDatabase} import com.flowy.common.database.postgres.{SqlMarketUpdateDao, SqlTheEverythingBagelDao} import com.typesafe.config.Con...
asciiu/fomo
binance-websocket/src/main/scala/com/flowy/binance/Main.scala
Scala
apache-2.0
1,289
package nodes.learning import scala.reflect.ClassTag import scala.util.Random import scala.collection.mutable.ListBuffer import breeze.linalg._ import breeze.math._ import breeze.numerics._ import edu.berkeley.cs.amplab.mlmatrix.RowPartitionedMatrix import edu.berkeley.cs.amplab.mlmatrix.util.{Utils => MLMatrixUtils...
tomerk/keystone
src/main/scala/nodes/learning/KernelRidgeRegression.scala
Scala
apache-2.0
10,051
package slack object IncomingWebhookClient { import play.api._ import play.api.mvc._ import play.api.libs.ws._ import play.api.libs.json._ val WebhookUrl = "https://hooks.slack.com/services/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" def sendMessage(message:String, channel:Option[String]) { var dat...
conor-pappas/chasm_bot
app/value_objects/slack/IncomingWebhookClient.scala
Scala
mit
772
package com.twitter.finatra.tests.json.internal.caseclass.validation.validators import com.twitter.finatra.json.internal.caseclass.validation.validators.UUIDValidator import com.twitter.finatra.validation.ValidationResult._ import com.twitter.finatra.validation.{UUID, ValidationResult, ValidatorTest} import java.util....
tempbottle/finatra
jackson/src/test/scala/com/twitter/finatra/tests/json/internal/caseclass/validation/validators/UUIDValidatorTest.scala
Scala
apache-2.0
1,057
package clean.tex import java.io.File import clean.lib._ import ml.Pattern import ml.classifiers._ import util.{Datasets, Stat, Tempo} object metaEscolheAlgPCadaStratSoPCT extends AppWithUsage with LearnerTrait with StratsTrait with RangeGenerator with Rank with MetaTrait { lazy val arguments = superArguments ++ ...
active-learning/active-learning-scala
src/main/scala/clean/tex/metaEscolheAlgPCadaStratSoPCT.scala
Scala
gpl-2.0
7,904
/** * 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...
eljefe6a/kafka
core/src/main/scala/kafka/tools/ConsoleConsumer.scala
Scala
apache-2.0
16,060
package org.sbuild.plugins.aether import de.tototec.sbuild._ /** * Central configuration of the SBuild Aether Plugin. * The Aether Plugin will register a `[[de.tototec.sbuild.SchemeHandler]]` under the name `[[Aether.schemeName schemeName]]`. * * The following settings are available: * - `[[Aether.remoteRepos]]...
SBuild-org/sbuild-aether-plugin
org.sbuild.plugins.aether/src/main/scala/org/sbuild/plugins/aether/Aether.scala
Scala
apache-2.0
1,498
object T9Spelling extends App { val source = scala.io.Source.fromFile(args(0)) val lines = source.getLines.filter(_.length > 0) lines.next //forget about the test cases number var numpad = Array( " ", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz" ) va...
DarthCharles/google-code-jam
solutions/t9-spelling/scala/tNine.scala
Scala
mit
981
package controllers import play.api.mvc.{ Action, Controller } import play.api.mvc.WebSocket import play.api.libs.iteratee.Enumerator import play.api.libs.json.Reads import play.api.libs.json.JsValue import play.api.libs.iteratee.Iteratee import play.api.libs.functional.syntax._ import play.api.libs.json.JsPath import...
pamu/FooService
FooService2/app/controllers/Application.scala
Scala
apache-2.0
11,668
package org.jetbrains.plugins.scala.lang.psi.impl.base import com.intellij.lang.ASTNode import com.intellij.openapi.util.TextRange import com.intellij.psi.{PsiElement, PsiReference} import org.jetbrains.plugins.scala.extensions._ import org.jetbrains.plugins.scala.lang.psi.api.ScBegin import org.jetbrains.plugins.scal...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/base/ScEndImpl.scala
Scala
apache-2.0
2,255
// Copyright 2011 Kiel Hodges package replicant.support import replicant.ResponseFallback private[support] sealed trait Response[Result] { def value(fallback: ResponseFallback[Result]): Result } private case class ValueResponse[Result](result: () => Result) extends Response[Result] { def value(fallback: Response...
greenbar/replicant
scala/src/main/scala/replicant/support/Response.scala
Scala
mit
533
package walfie.gbf.raidfinder.client import com.thoughtworks.binding.Binding._ import org.scalajs.dom import scala.scalajs.js import scala.scalajs.js.annotation.ScalaJSDefined import walfie.gbf.raidfinder.protocol.BossName object ViewModel { trait Labeled { def label: String def id: String } sealed abs...
xheres/api-gbfraidfinder
client/src/main/scala/walfie/gbf/raidfinder/client/ViewModel.scala
Scala
mit
4,228
package wtf.shekels.alice.als.db.objects import reactivemongo.bson.{BSONDocument, BSONDocumentReader} import sx.blah.discord.handle.obj.IChannel /** * @author alice * @since 10/16/17. */ class Channel(val name: String, val id: String, val position: Int, val topic: Strin...
antflga/AL-S
src/main/scala/wtf.shekels.alice.als/db/objects/Channel.scala
Scala
gpl-3.0
1,670
/* * Copyright (c) 2017 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 in writi...
satabin/toolxit-ng
core/src/main/scala/toolxit/util/Enumerator.scala
Scala
apache-2.0
7,079
/* Copyright 2015 White Label Personal Clouds 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 a...
welcomer/framework
src/main/scala/me/welcomer/framework/pico/dsl/PicoRaiseRemoteEventDSL.scala
Scala
apache-2.0
2,440
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package scaps.eclipse.core.adapters import java.io.ByteArrayInputStream import org.eclipse.core.resources.IResou...
flomerz/scala-ide-scaps
scala-ide-scaps-tests/src/scaps/eclipse/core/adapters/ScapsAdapterIntegrationTest.scala
Scala
mpl-2.0
3,414
package ucesoft.cbm.expansion import javax.sound.sampled.AudioFormat import javax.sound.sampled.DataLine import javax.sound.sampled.SourceDataLine import javax.sound.sampled.AudioSystem import ucesoft.cbm.ChipID class DigiMaxCart(digiAddress:Int) extends ExpansionPort { val TYPE : ExpansionPortType.Value = Expansio...
abbruzze/kernal64
Kernal64/src/ucesoft/cbm/expansion/DigiMAX.scala
Scala
mit
3,098
/* * 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...
yiheng/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/Linear.scala
Scala
apache-2.0
7,957
package org.scalaide.core.sbtbuilder import org.eclipse.core.resources.IProject import org.eclipse.core.resources.IncrementalProjectBuilder import org.eclipse.core.runtime.IPath import org.eclipse.core.runtime.NullProgressMonitor import org.eclipse.jdt.core.IClasspathEntry import org.eclipse.jdt.core.IJavaModelMarker ...
Kwestor/scala-ide
org.scala-ide.sdt.core.tests/src/org/scalaide/core/sbtbuilder/NameHashingVulnerabilityTest.scala
Scala
bsd-3-clause
3,651
package coursier.cli.internal import java.io.File import java.nio.file.{Path, Paths} object PathUtil { def isInPath(p: Path): Boolean = { val p0 = p.toAbsolutePath.normalize val pathValue = Option(System.getenv("PATH")).getOrElse("") val pathEntries = pathValue.split(File.pathSeparator).filt...
alexarchambault/coursier
modules/cli/src/main/scala/coursier/cli/internal/PathUtil.scala
Scala
apache-2.0
549
package eu.phisikus.plotka.examples.ricart.agrawala import java.util.concurrent.{CountDownLatch, Executors} import com.typesafe.scalalogging.Logger import eu.phisikus.plotka.conf.providers.FileConfigurationProvider import org.scalatest.concurrent.Eventually import org.scalatest.time.{Millis, Seconds, Span} import org...
phisikus/plotka
examples/ricart-agrawala/src/test/scala/eu/phisikus/plotka/examples/ricart/agrawala/RicartAgrawalaNodeTest.scala
Scala
bsd-3-clause
1,509
import sbt._ import Keys._ import com.typesafe.sbt.osgi.SbtOsgi._ object Build extends Build { import BuildSettings._ import Dependencies._ override lazy val settings = super.settings :+ { shellPrompt := { s => Project.extract(s).currentProject.id + " > " } } lazy val root = Project("root",file(".")) ...
geotrellis/geotrellis-site
service/project/Build.scala
Scala
apache-2.0
936
package org.fayalite.ui.app.comm import org.scalajs.dom.{Event, MessageEvent, WebSocket} import rx._ import rx.core.Obs import scala.scalajs.js.Dynamic.{global => g} import scala.scalajs.js._ import scala.util.Try object PersistentWebSocket { // val cookies = document.cookie // case class Register(cookies: Stri...
ryleg/fayalite
src/main/scala/org/fayalite/sjs/comm/PersistentWebSocket.scala
Scala
mit
3,361
package net.room271.wk4 object Exercises { /** * Run the tests via sbt: * * $ sbt * $ test-only net.room271.wk4.ExercisesSpec */ /** * The rules: * * Return a list for 0 to n where each item is the next number in the List, unless: * * it is divisible by 3 -> in which case re...
nicl/scala-school
src/main/scala/net/room271/wk4/Exercises.scala
Scala
gpl-3.0
1,642
package listV //import reflect.Selectable.reflectiveSelectable import scalaLibV.* object sci { val isEmpty = iftTrue }
dotty-staging/dotty
tests/pos/i7711/crash2_1.scala
Scala
apache-2.0
122
//====================================================================================================================== // Facsimile: A Discrete-Event Simulation Library // Copyright © 2004-2020, Michael J Allen. // // This file is part of Facsimile. // // Facsimile is free software: you can redistribute it and/or mod...
MichaelJAllen/facsimile
facsimile-collection/src/test/scala/org/facsim/collection/immutable/test/BinomialHeapTest.scala
Scala
lgpl-3.0
12,901
package com.shellhive.angular.components import biz.enef.angulate._ import biz.enef.angulate.core.Attributes import biz.enef.angulate.core.Timeout import biz.enef.angulate.core.JQLite import scalajs.js import org.scalajs.jquery._ /** * @author Omar Castro <[email protected]>, 29-05-2016. */ class TipDirect...
OmarCastro/ShellHive-scala
client/src/main/scala/com/shellhive/angular/components/TipDirective.scala
Scala
mit
1,659
package edu.berkeley.nlp.summ.preprocess import scala.collection.JavaConverters._ import scala.collection.mutable.ArrayBuffer import scala.collection.mutable.HashMap import edu.berkeley.nlp.futile.LightRunner import edu.berkeley.nlp.futile.classify.ClassifyUtils import edu.berkeley.nlp.futile.fig.basic.IOUtils import ...
gregdurrett/berkeley-doc-summarizer
src/main/scala/edu/berkeley/nlp/summ/preprocess/EDUSegmenterSemiMarkov.scala
Scala
gpl-3.0
10,680
package spire.benchmark.jmh import org.openjdk.jmh.annotations.{Scope, Setup, State} import scala.util.Random._ @State(Scope.Thread) class DoubleState extends StateSupport { var values: Array[Double] = _ @Setup def setup(): Unit = values = init(size)(nextDouble) }
kevinmeredith/spire
benchmark-jmh/src/main/scala/spire/benchmark/jmh/DoubleState.scala
Scala
mit
274
package finloader import finloader.entities.FileInfos import org.joda.time.LocalDateTime import org.specs2.mutable.Specification import ITUtils.db import scala.slick.driver.JdbcDriver.simple._ import scala.slick.lifted.TableQuery /** * Created by gefox on 26.12.14. */ class FileInfoServiceItSpec extends Specificat...
paul-lysak/finloader
src/it/scala/finloader/FileInfoServiceItSpec.scala
Scala
apache-2.0
1,571
package org.shubinmountain.king import scala.collection.mutable.{ Buffer, ListBuffer } import akka.actor.ActorRef /** * Form: rectangle * cx, cy - coordinate of lef-bottom corner */ class Button(val cx: Float, val cy: Float, val width: Float, val height: Float, action: Model => Unit) extends Control { va...
signal2564/king-of-nothing
common/src/main/scala/org/shubinmountain/king/Button.scala
Scala
gpl-2.0
635
object rec{ def main(args: Array[String]){ def factorial(num: Int): BigInt={ if(num<=1){ 1 } else{ num*factorial(num-1) } } print("Factorial of 4 is: "+factorial(4)) } }
Jargon4072/DS-ALGO_implementations
scala/rec.scala
Scala
gpl-3.0
227
/* Copyright 2009-2016 EPFL, Lausanne */ import leon.annotation.extern import leon.lang._ object ExpressionOrder { case class Pixel(rgb: Int) case class Matrix(data: Array[Int], w: Int, h: Int) def void = () def fun = 0xffffff def foo = 4 def bar(i: Int) = i * 2 def baz(i: Int, j: Int) = bar(i) - bar(...
epfl-lara/leon
src/test/resources/regression/genc/valid/ExpressionOrder.scala
Scala
gpl-3.0
4,343
/* * 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 ...
ArvinDevel/onlineAggregationOnSparkV2
core/src/main/scala/org/apache/spark/deploy/Client.scala
Scala
apache-2.0
9,092
package org.sisioh.aws4s.sns.model import com.amazonaws.services.sns.model.AddPermissionRequest import org.sisioh.aws4s.PimpedType import scala.collection.JavaConverters._ object AddPermissionRequestFactory { def create(): AddPermissionRequest = new AddPermissionRequest() def create(topicArn: String, label: St...
sisioh/aws4s
aws4s-sns/src/main/scala/org/sisioh/aws4s/sns/model/RichAddPermissionRequest.scala
Scala
mit
1,736
/* * Sentilab SARE: a Sentiment Analysis Research Environment * Copyright (C) 2013 Sabanci University Sentilab * http://sentilab.sabanciuniv.edu * * This file is part of SARE. * * SARE is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published b...
musabhusaini/sare
sare-lib/modules/utils/src/main/scala/edu/sabanciuniv/sentilab/utils/text/nlp/base/LinguisticProcessorLike.scala
Scala
gpl-3.0
2,005
package org.jetbrains.plugins.scala.debugger.friendlyCollections import java.util import com.intellij.debugger.engine.evaluation.{EvaluateException, EvaluationContextImpl} import com.intellij.debugger.settings.NodeRendererSettings import com.intellij.debugger.ui.impl.ThreadsDebuggerTree import com.intellij.debugger.u...
whorbowicz/intellij-scala
test/org/jetbrains/plugins/scala/debugger/friendlyCollections/ScalaCollectionRendererTest.scala
Scala
apache-2.0
5,934
package org.igye.jfxutils.properties import javafx.collections.ListChangeListener import javafx.collections.ListChangeListener.Change object ListChgListener { def apply[T](body: Change[_ <: T] => Unit): ListChangeListener[T] = { new ListChangeListener[T] { override def onChanged(c: Change[_ <:...
Igorocky/jfxutils
src/main/scala/org/igye/jfxutils/properties/ListChgListener.scala
Scala
mit
391
/* * Copyright 2014 Twitter inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
joychugh/storehaus
storehaus-core/src/main/scala/com/twitter/storehaus/MapStore.scala
Scala
apache-2.0
1,073
package uk.gov.gds.ier.form import org.joda.time.{LocalDate, YearMonth, Years} import uk.gov.gds.ier.validation.{ErrorTransformForm, FormKeys, Key} import uk.gov.gds.ier.model.{DateLeft, ApplicationType, LastRegisteredType} import scala.util.Try import uk.gov.gds.ier.validation.constants.DateOfBirthConstants import uk...
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/form/OverseasFormImplicits.scala
Scala
mit
4,139
package sorting import org.salgo.sorting.{CycleSort, GeneralSortingAlgorithm} class CycleSortSpec extends GenericSortSpec { override def getSortingAlgorithm: GeneralSortingAlgorithm = CycleSort }
ascensio/salgo
tests/sorting/CycleSortSpec.scala
Scala
apache-2.0
200
package scutil.collection import minitest._ import scutil.lang._ import scutil.collection.implicits._ object SeqImplicitsTest extends SimpleTestSuite { test("equivalentSpans should be empty for empty input") { //(Seq.empty[String] equivalentSpans equivalentSpansCriterium) must haveTheSameElementsAs(Seq.empty) a...
ritschwumm/scutil
modules/core/src/test/scala/scutil/collection/SeqImplicitsTest.scala
Scala
bsd-2-clause
5,716
package authes import models.Account import play.api.mvc.{Request, Result} import scala.concurrent.{ExecutionContext, Future} import scala.concurrent.duration._ trait Authenticator { import controllers.Responses._ type User = Account val SessionCookie = "PLAY_SESSION" val TimeoutInSeconds = 7.days.toSeconds...
ponkotuy/train-stamp-rally
app/authes/Authenticator.scala
Scala
apache-2.0
2,002
package chapter28 /** * 28.7 저장하기와 불러오기 * * XML 데이터를 바이트 스트림으로 변환하고 역으로 가져오기. * 이를 처리해주는 라이브러리가 있기에 가장 쉬운 부분이다. * 만약 직접 문자열을 바이트로 변경한다면 문자 인코딩을 추적하는 짐을 직접 짊어져야만 한다.. * * XML을 바이트가 담긴 파일로 변경하려면 XML.save 명령을 사용할 수 있다. */ object c28_i07 extends App { val therm = new CCTherm { val description: String = "ho...
seraekim/srkim-lang-scala
src/main/java/chapter28/c28_i07.scala
Scala
bsd-3-clause
1,005
package com.equalinformation.fpps.week4 /** * Created by bpupadhyaya on 9/30/15. * Problem: Provide an implementation of the abstract class Nat that represents * non-negative integers. */ //Peano numbers abstract class Nat { def isZero: Boolean def predecessor: Nat def successor = new Succ(this) def +(tha...
bpupadhyaya/fpps
src/main/scala/com/equalinformation/fpps/week4/Nat.scala
Scala
mit
757
/******************************************************************************* * Copyright (c) 2012-2013 * - Bruno C.d.S. Oliveira ([email protected]) * - Tijs van der Storm ([email protected]) * - Alex Loh ([email protected]) * - William R. Cook ([email protected]) * * All rights reserved. This progra...
tvdstorm/oalgcomp
src/oalg/algebra/paper/Self.scala
Scala
epl-1.0
4,880
import leon.instrumentation._ import leon.invariant._ object AmortizedQueue { sealed abstract class List case class Cons(head : BigInt, tail : List) extends List case class Nil() extends List case class Queue(front : List, rear : List) def size(list : List) : BigInt = (list match { case Nil() => 0 ...
epfl-lara/leon
testcases/orb-testcases/depth/AmortizedQueue.scala
Scala
gpl-3.0
2,707
package ohnosequences.sequences import sequences._, alphabets._ import ohnosequences.cosas.typeSets._ case object finiteSequences { trait AnyFiniteSequence { type Alphabet <: AnyFiniteAlphabet } trait FiniteSequenceOver[A <: AnyFiniteAlphabet] extends AnyFiniteSequence { type Alphabet = A } def...
ohnosequences/sequences
src/main/scala/finiteSequences.scala
Scala
agpl-3.0
2,487
/* Copyright ⓒ 2012 Michael Ekstrand * * 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...
mdekstrand/argparse4s
src/main/scala/ExecutionContext.scala
Scala
mit
1,456
package org.genericConfig.admin.shared.step import play.api.libs.functional.syntax.unlift import play.api.libs.json.{Format, JsPath} import play.api.libs.functional.syntax._ /** * Copyright (C) 2016 Gennadi Heimann [email protected] * * Created by Gennadi Heimann 14.04.2020 */ case class StepParamsDTO( ...
gennadij/admin
shared/src/main/scala/org/genericConfig/admin/shared/step/StepParamsDTO.scala
Scala
apache-2.0
1,019
package com.twitter.finagle.stress import java.io.PrintStream import com.twitter.ostrich.stats.{Stats => OstrichStats} import com.twitter.ostrich.stats.StatsProvider object Stats { private[this] def print(message: String) { (new PrintStream(System.out, true, "UTF-8")).println(message) } def prettyPrintSta...
enachb/finagle_2.9_durgh
finagle-stress/src/main/scala/com/twitter/finagle/stress/Stats.scala
Scala
apache-2.0
921
package jsm4s.ds import scala.collection.Iterable /** * Created by olshanskiy on 7/13/17. */ trait IntentFactory { val attributes: Int def empty: FcaSet def full: FcaSet def values(x: Iterable[Int]): FcaSet }
DmitryOlshansky/jsm4s
src/main/scala/jsm4s/ds/IntentFactory.scala
Scala
gpl-2.0
226
/* * 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 ...
aosagie/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/InternalRow.scala
Scala
apache-2.0
7,372
import clean.lib.Ds import ml.classifiers.MLP import traits.Arg import util.Datasets object Main extends Arg with RHeatMap { lazy val (unlabeledStyleFore, unlabeledStyleBack) = "mark=text, mark options={solid, scale=1, ultra thick}" -> "gray, mark=*, mark options={solid, scale=2, ultra thick}" lazy val (labeledSty...
davips/knowledge-boundary
src/main/scala/Main.scala
Scala
gpl-3.0
1,930
/* * Copyright (c) 2013-2014 Snowplow Analytics Ltd. * All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache * License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at * http:/...
pkallos/snowplow
3-enrich/scala-kinesis-enrich/src/main/scala/com.snowplowanalytics.snowplow.enrich.kinesis/sources/KinesisSource.scala
Scala
apache-2.0
6,101
package org.scalatra import scala.xml.{Text, Node} import org.apache.commons.io.IOUtils import fileupload.FileUploadSupport import scalate.ScalateSupport class TemplateExample extends ScalatraServlet with UrlSupport /*with FileUploadSupport*/ with FlashMapSupport with ScalateSupport { object Template { def st...
kuochaoyi/scalatra
example/src/main/scala/org/scalatra/TemplateExample.scala
Scala
bsd-2-clause
5,395