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 bita import akka.actor.{ ActorSystem, Actor, Props, ActorRef } import akka.bita.{ RandomScheduleHelper, Scheduler } import akka.bita.pattern.Patterns._ import akka.util.duration._ import akka.util.Timeout import akka.dispatch.Await import bita.util.FileHelper import bita.criteria._ import bita.ScheduleOptimiza...
Tjoene/thesis
Case_Programs/scala-redis-2.9-pre-scala-2.10/src/test/scala/bita/BitaTests.scala
Scala
gpl-2.0
6,535
package aprsbigdata.maps.kml class PlaceMarker(val label: String, val longitude: Double, val latitude: Double, val altitude: Double = 0, val bearing: Double = 0.0, val timestamp: Long = 0) { override def toString() = label + " " + List(longitude, latitude, altitude, bearing).mkString(","); } /** * Repres...
cericyeh/aprsbigdata
src/main/scala/aprsbigdata/maps/kml/PlaceMarker.scala
Scala
lgpl-3.0
1,105
/* * Copyright 2014-2021 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...
copperlight/atlas
atlas-webapi/src/main/scala/com/netflix/atlas/webapi/LocalPublishActor.scala
Scala
apache-2.0
4,820
package stgy object Vec { def apply(x: Double, y: Double) = new Vec(x, y) def apply() = new Vec(0, 0) } class Vec(var x: Double, var y: Double) extends Element { def +(v: Vec) = Vec(x + v.x, y + v.y) def unary_- = Vec(-x, -y) def -(v: Vec) = this + (-v) def *(v: Vec) = Vec(x * v.x, y * v.y) def *(...
DeltaIMT/Delta
stgy_server/src/main/scala/stgy/Vec.scala
Scala
mit
754
package gapt.proofs.ceres import gapt.expr._ import gapt.expr.formula.All import gapt.expr.formula.And import gapt.expr.formula.Atom import gapt.expr.formula.Bottom import gapt.expr.formula.Eq import gapt.expr.formula.Ex import gapt.expr.formula.Formula import gapt.expr.formula.Iff import gapt.expr.formula.Imp import ...
gapt/gapt
core/src/main/scala/gapt/proofs/ceres/CharacteristicFormula.scala
Scala
gpl-3.0
9,361
package hexico.meeple.ui import scala.swing._ import scala.util.Random import scala.collection.mutable import hexico.meeple.game.{Board, Tilesets} class GameWindow extends Frame { val TILE_SIZE = 50 val random = new Random() val tileset = new mutable.Queue ++ Tilesets.START ++ random.shuffle(Tilesets.BASE) va...
alanbriolat/meeple
src/main/scala/hexico/meeple/ui/GameWindow.scala
Scala
gpl-3.0
1,985
package org.denigma.nlp.annotator import org.denigma.brat._ import org.denigma.nlp.messages.Annotations import org.scalajs.dom import scalajs.js.JSConverters._ import scala.scalajs.js import scala.scalajs.js.Array object ReachBratModel { def apply(): ReachBratModel = new ReachBratModel() } class ReachBratModel { ...
antonkulaga/bio-nlp
annotator/js/src/main/scala/org.denigma/nlp/annotator/ReachBratModel.scala
Scala
mpl-2.0
8,420
/* * 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 ...
wangyixiaohuihui/spark2-annotation
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
Scala
apache-2.0
35,516
import Array._ object Problem { def findMaxPeriod(): Int = { var sequenceLength = 0; var max = 0 for (i <- 1000 to 0 by -1) { if (sequenceLength > i) { return max } var remainders = ofDim[Int](i); var value = 1; var pos = 0 while (remainders(value) == 0 && value != 0) { ...
Jiri-Kremser/euler
026/Problem.scala
Scala
gpl-2.0
761
package play.api.i18n import java.io.File import java.text.MessageFormat import javax.inject.{Singleton, Inject} import play.api.mvc._ import play.api._ import play.api.i18n.Messages.UrlMessageSource import play.mvc.Http import scala.util.{Success, Try} import scala.collection.JavaConverters._ trait MMessages extends...
Department-for-Work-and-Pensions/Multi-Messages
module/src/main/scala/play/api/i18n/MMessage.scala
Scala
mit
4,066
object Main extends App { println("Wrong main") }
joescii/sbt-native-packager
src/sbt-test/universal/staging-custom-main/src/main/scala/Main.scala
Scala
bsd-2-clause
52
package Scalisp import org.scalatest.FlatSpec import org.scalatest.matchers.ShouldMatchers class ProcedureSpec extends FlatSpec with ShouldMatchers { val repl = new REPL() "Multi-line code" should "not crash" in { repl.execute(""" (define a 1) (define b 2) (define l '(1 2 3 4)) """) } "Addition an...
quantintel/Scalisp
src/test/scala/Procedures.scala
Scala
mit
3,937
package sangria.execution import sangria.ast import sangria.marshalling.{InputUnmarshaller, ResultMarshaller} import sangria.parser.SourceMapper import sangria.schema._ import sangria.validation.QueryValidator import InputUnmarshaller.emptyMapVars import sangria.execution.deferred.DeferredResolver import scala.concurr...
OlegIlyenko/sangria
modules/core/src/main/scala/sangria/execution/Executor.scala
Scala
apache-2.0
14,983
package org.apache.spark.ml.parity.feature import org.apache.spark.ml.Transformer import org.apache.spark.ml.feature.FeatureHasher import org.apache.spark.ml.parity.SparkParityBase import org.apache.spark.sql.{DataFrame, Row} import org.apache.spark.sql.types._ import scala.util.Random class FeatureHasherParitySpec ...
combust/mleap
mleap-spark/src/test/scala/org/apache/spark/ml/parity/feature/FeatureHasherParitySpec.scala
Scala
apache-2.0
1,296
/* * 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 ...
shaoxuan-wang/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/metadata/FlinkRelMdSelectivity.scala
Scala
apache-2.0
11,380
/* * AkkaSolrDocumentList.scala * * Updated: Sep 26, 2014 * * Copyright (c) 2014, CodeMettle */ package com.codemettle.akkasolr.solrtypes import org.apache.solr.common.{SolrDocument, SolrDocumentList} import com.codemettle.akkasolr.CollectionConverters._ /** * @author steven * */ @SerialVersionUID(1L) case ...
CodeMettle/akka-solr
src/main/scala/com/codemettle/akkasolr/solrtypes/AkkaSolrDocumentList.scala
Scala
apache-2.0
787
/* Copyright 2015 UniCredit S.p.A. * * 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 writing...
unicredit/hbase-rdd-examples
src/main/scala/unicredit/example/Read.scala
Scala
apache-2.0
1,308
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
jrudolph/futures-backport
src/main/scala/scala/concurrent/duration/DurationConversions.scala
Scala
bsd-3-clause
3,415
package com.seremis.geninfusion.model import com.seremis.geninfusion.api.model.{IAttachmentPoint, IModelPartType} import net.minecraft.util.math.Vec3d class AttachmentPoint(location: Vec3d, partTypes: Array[IModelPartType]) extends IAttachmentPoint { override def getConnectablePartTypes: Array[IModelPartType] = ...
Seremis/Genetic-Infusion
src/main/scala/com/seremis/geninfusion/model/AttachmentPoint.scala
Scala
gpl-3.0
380
package com.arcusys.valamis.content.model case class ContentTree(contentAmount: Int, nodes: Seq[ContentTreeNode]) trait ContentTreeNode{ def item: Content } case class CategoryTreeNode(item: Category, contentAmount: Int, nodes: Seq[Cont...
igor-borisov/valamis
valamis-questionbank/src/main/scala/com/arcusys/valamis/content/model/ContentTree.scala
Scala
gpl-3.0
535
package com.gx.observer /** * Copyright 2017 josephguan * * 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 b...
josephguan/scala-design-patterns
behavioral/observer/src/main/scala/com/gx/observer/App.scala
Scala
apache-2.0
866
package nest.sparkle.tools import scala.concurrent.{ExecutionContext, Future} import scala.language.existentials import scala.reflect.runtime.universe._ import nest.sparkle.store.Column import nest.sparkle.store.EventGroup.transposeSlices import nest.sparkle.store.Store import nest.sparkle.util.Log import nest.sparkl...
mighdoll/sparkle
protocol/src/main/scala/nest/sparkle/tools/Exporter.scala
Scala
apache-2.0
3,214
import scala.util.parsing.combinator._ import java.io.FileReader class JSON extends JavaTokenParsers { def value : Parser[Any] = obj | arr | stringLiteral | floatingPointNumber | "null" | "true" | "false" def obj : Parser[Any] = "{...
Bolt64/my_code
scala/combinator_parser.scala
Scala
mit
616
/* * Scala classfile decoder (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 scal...
martijnhoekstra/scala
src/scalap/scala/tools/scalap/scalax/rules/scalasig/ClassFileParser.scala
Scala
apache-2.0
8,985
package com.letstalkdata.hexiles.game import com.letstalkdata.hexiles.graphics.Colors.Color import com.letstalkdata.hexiles.shapes.Cube /** * Author: Phillip Johnson * Date: 5/30/15 */ class Solution(pieces:Seq[Piece]) { //TODO: Consider implementing this: require(pieces.size == 5) val map:Map[Color,Seq[Cube]...
phillipjohnson/hexiles-web
src/main/scala/com/letstalkdata/hexiles/game/Solution.scala
Scala
mit
716
package nsmc.mongo import com.mongodb.{BasicDBObject, DBObject} private[nsmc] case class MongoInterval(min: DBObject, max: DBObject, destination: Destination) extends Serializable { } case object MongoInterval { def apply(destination: Destination) = new MongoInterval(new BasicDBObject(), new BasicDBObject(), dest...
shotishu/spark-mongodb-connector
src/main/scala/nsmc/mongo/MongoInterval.scala
Scala
apache-2.0
331
package feh.tec.cvis.gui import java.awt.image.BufferedImage import feh.dsl.swing2.Var import scala.swing.Swing._ import scala.swing._ import scala.swing.event.{Key, MouseMoved} trait SimplePreview extends ScrollPane{ def img: BufferedImage horizontalScrollBarPolicy = ScrollPane.BarPolicy.AsNeeded verticalS...
fehu/comp-vis
gui/src/main/scala/feh/tec/cvis/gui/Previews.scala
Scala
mit
1,206
package org.questions.arrays import scala.annotation.tailrec import scala.collection.immutable.HashSet /** * @author maximn * @since 30-Oct-2015 */ class TwoSum { def findPairSum(seq: Seq[Int], sum: Int): Option[(Int, Int)] = { @tailrec def inner(seq: Seq[Int], hash: HashSet[Int]): Option[(Int, Int)] = ...
maximn/coding-interview-questions-scala
src/main/scala/org/questions/arrays/TwoSum.scala
Scala
apache-2.0
577
package io.kaitai.struct.translators import io.kaitai.struct.datatype.DataType import io.kaitai.struct.datatype.DataType._ import io.kaitai.struct.exprlang.{Ast, Expressions} import io.kaitai.struct.format.{ClassSpec, FixedSized} import io.kaitai.struct.languages._ import io.kaitai.struct.languages.components.{CppImpo...
kaitai-io/kaitai_struct_compiler
jvm/src/test/scala/io/kaitai/struct/translators/TranslatorSpec.scala
Scala
gpl-3.0
29,617
/* * 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 ...
apache/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/harness/OverAggregateHarnessTest.scala
Scala
apache-2.0
39,141
/* * Copyright 2013 Maurício Linhares * * Maurício Linhares licenses this file to you under the Apache License, * version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
leosilvadev/postgresql-async
mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/binary/encoder/ShortEncoder.scala
Scala
apache-2.0
986
package net.debasishg.domain.trade package event import serialization.Serialization._ import serialization.Util._ import akka.dispatch._ import akka.util.Timeout import akka.util.duration._ import akka.actor.{ Actor, ActorRef, Props, ActorSystem } import akka.pattern.Patterns.ask import Actor._ import com.redis._ impo...
Tjoene/thesis
benchmark/src/main/scala/cqrs/RedisEventLog.scala
Scala
gpl-2.0
2,591
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.api.cache import play.api.mvc.Result import play.api.mvc.Results import play.api.test._ class SerializableResultSpec extends PlaySpecification { sequential "SerializableResult" should { def serializeAndDeserialize(result: Result...
benmccann/playframework
cache/play-ehcache/src/test/scala/play/api/cache/SerializableResultSpec.scala
Scala
apache-2.0
1,708
package models.query import org.joda.time.LocalDate import org.joda.time.format.ISODateTimeFormat import scalikejdbc._ import scala.util.Try /** * Date: 14/11/27. */ case class Period(from: Option[LocalDate], to: Option[LocalDate], default: Boolean) { import Period._ def where(target: SQLSyntax): SQLSyntax = ...
nekoworkshop/MyFleetGirls
server/app/models/query/Period.scala
Scala
mit
1,106
/* * Copyright 2015 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 applicab...
arkadius/micro-burn
src/main/scala/org/github/microburn/integration/support/scrum/ScrumIntegration.scala
Scala
apache-2.0
4,124
package scalaprops import scalaz._ import scalaz.std.anyVal._ import scalaz.std.stream._ import ScalapropsScalaz._ object ShrinkTest extends Scalaprops { private[this] implicit def equal[A: Gen: Equal]: Equal[Shrink[A]] = { import FunctionEqual._ Equal[A => Stream[A]].contramap(_.f) } val law = scalazl...
scalaprops/scalaprops
scalaz/src/test/scala/scalaprops/ShrinkTest.scala
Scala
mit
1,081
/* * Copyright (c) 2016 dawid.melewski * * 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, publ...
meloniasty/ActyxPowerUserAlert
src/main/scala/actyxpoweruseralert/actors/MachinesActor.scala
Scala
mit
2,088
/* * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Fou...
TiarkRompf/lancet
src/test/scala/lancet/analysis/test1.scala
Scala
agpl-3.0
19,336
/******************************************************************************* Copyright (c) 2013, S-Core. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. *********************************************************************...
daejunpark/jsaf
src/kr/ac/kaist/jsaf/analysis/typing/models/Tizen/TIZENNDEFRecordURI.scala
Scala
bsd-3-clause
4,565
package com.twitter.finagle.http import com.twitter.conversions.time._ import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class CookieTest extends FunSuite { test("mutate underlying") { val cookie = new Cookie("name", "value") ...
adriancole/finagle
finagle-http/src/test/scala/com/twitter/finagle/http/CookieTest.scala
Scala
apache-2.0
1,215
package com.thoughtworks.pact.verify.pact import com.thoughtworks.pact.verify.json.ResponseBodyJson import com.thoughtworks.pact.verify.junit.Failure import org.apache.commons.lang3.exception.ExceptionUtils import play.api.libs.json.Json import scala.util.Success /** * Created by xfwu on 12/07/2017. */ case clas...
XuefengWu/pact_verify
src/main/scala/com/thoughtworks/pact/verify/pact/Interaction.scala
Scala
mit
1,992
package sample.model // Generally speaking I wouldnt import the whole namespace, // but as it happens with mapper models you are pretty much using // most of the types, and it becomes rather verbose to import // more than 10 or 15 types. import net.liftweb.mapper._ import net.liftweb.common.Full object Book extends ...
timperrett/lift-in-action
chapter-14/src/main/scala/sample/model/Book.scala
Scala
apache-2.0
826
/** * 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 ...
VinACE/adam
adam-core/src/test/scala/org/bdgenomics/adam/rdd/BroadcastRegionJoinSuite.scala
Scala
apache-2.0
10,658
/* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/fset-faststream
app/services/testdata/allocation/AssessorAllocationGenerator.scala
Scala
apache-2.0
1,386
package org.jetbrains.plugins.scala package worksheet.ui import java.util import com.intellij.openapi.editor.impl.{EditorImpl, FoldingModelImpl} import com.intellij.openapi.editor.{Editor, FoldRegion} import com.intellij.openapi.project.Project import com.intellij.openapi.vfs.newvfs.FileAttribute import com.intellij....
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/worksheet/ui/WorksheetFoldGroup.scala
Scala
apache-2.0
6,543
package coffeehaus class VanillaCompileSpec extends CoffeehausSpec { describe("Vanilla Compile") { it ("should compile vanilla coffee") { assert(Compile.vanilla()("alert 'hello'") === Right(JsSource(file("/vanilla/basic.js")))) } it ("should compile bare coffee") { assert(Compile...
softprops/coffeehaus
src/test/scala/VanillaCompileSpec.scala
Scala
mit
810
package org.jetbrains.plugins.scala.codeInspection.hashCodeUsesVar import com.intellij.codeInspection.ProblemsHolder import com.intellij.psi._ import com.siyeh.ig.psiutils.MethodUtils import org.jetbrains.plugins.scala.codeInspection.AbstractInspection import org.jetbrains.plugins.scala.lang.psi.api.ScalaRecursiveElem...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/codeInspection/hashCodeUsesVar/HashCodeUsesVarInspection.scala
Scala
apache-2.0
1,412
package org.jetbrains.sbt.project import com.intellij.ide.projectWizard.ProjectSettingsStep import com.intellij.openapi.project.Project import org.jetbrains.plugins.scala.DependencyManagerBase.scalaLibraryDescription import org.jetbrains.plugins.scala.ScalaVersion import org.jetbrains.sbt.project.ProjectStructureDsl.{...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/sbt/project/NewLightbendStarterProjectWizardTest.scala
Scala
apache-2.0
3,418
/* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/fset-faststream
test/services/GBTimeZoneServiceSpec.scala
Scala
apache-2.0
1,691
/* * 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/test/scala/com/intel/analytics/bigdl/dllib/nn/keras/MeanAbsolutePercentageCriterionSpec.scala
Scala
apache-2.0
1,941
package omerxi.semantize import java.io.File import java.io._ trait HTML2Cells extends Utils { /** * convert HTML to simple rows and columns through MarkDown * TODO : maybe replace system calls to grep with Scala regex */ def convertHTML2Cells(htmlFile: String): File = { if (htmlFile.endsWith(".htm...
omerxi/semantize
semantize/src/main/scala/HTML2Cells.scala
Scala
lgpl-3.0
983
package org.denigma.kappa.notebook.views.papers import org.denigma.binding.binders.{Events, GeneralBinder} import org.denigma.binding.extensions._ import org.denigma.binding.views.{BindableView, CollectionMapView} import org.denigma.controls.code.CodeBinder import org.denigma.controls.papers._ import org.denigma.kappa...
antonkulaga/kappa-notebook
app/js/src/main/scala/org/denigma/kappa/notebook/views/papers/PapersView.scala
Scala
mpl-2.0
5,618
package scala.util /** A utility object to support command line parsing for @main methods */ object CommandLineParser { /** An exception raised for an illegal command line * @param idx The index of the argument that's faulty (starting from 0) * @param msg The error message */ class ParseError(val ...
dotty-staging/dotty
library/src/scala/util/CommandLineParser.scala
Scala
apache-2.0
2,691
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ // GENERATED CODE: DO NOT EDIT...
scala/scala
src/library/scala/Function2.scala
Scala
apache-2.0
1,842
/* * Copyright (C) 2005, The Beangle Software. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
beangle/data
orm/src/main/scala/org/beangle/data/orm/tool/DdlGenerator.scala
Scala
lgpl-3.0
7,084
/* * Copyright 2014–2018 SlamData 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...
jedesah/Quasar
connector/src/main/scala/quasar/fs/mount/BackendDef.scala
Scala
apache-2.0
2,389
package client import js.Dynamic.{ global => g } object HelloWorld { def main(): Unit = { g.console.log("Hello") g.alert("Hey!") val paragraph = g.document.createElement("p") paragraph.updateDynamic("innerHTML")("<strong>It works!</strong>") g.document.getElementById("playground").appendChild(pa...
TheBizzle/ScalaJS-Sandbox
assets/javascripts/HelloWorld.scala
Scala
bsd-3-clause
335
package com.arcusys.valamis.web.servlet.lesson import javax.servlet.http.HttpServletResponse import com.arcusys.learn.liferay.constants.QueryUtilHelper import com.arcusys.learn.liferay.services.GroupLocalServiceHelper import com.arcusys.valamis.course.CourseService import com.arcusys.valamis.lesson.model._ import com...
igor-borisov/JSCORM
valamis-portlets/src/main/scala/com/arcusys/valamis/web/servlet/lesson/LessonServlet.scala
Scala
gpl-3.0
8,077
package unfiltered.response trait BaseContentType extends Responder[Any] { def respond(res: HttpResponse[Any]): Unit = { res.header("Content-Type", contentType(res)) } def contentType(res: HttpResponse[Any]): String } case class CharContentType(contentType: String) extends BaseContentType { def contentTyp...
omarkilani/unfiltered
library/src/main/scala/response/types.scala
Scala
mit
1,186
package com.twitter.finagle import scala.annotation.tailrec import scala.collection.mutable /** * Stacks represent stackable elements of type T. It is assumed that * T-typed elements can be stacked in some meaningful way; examples * are functions (function composition) [[Filter Filters]] (chaining), * and [[Servi...
suls/finagle
finagle-core/src/main/scala/com/twitter/finagle/Stack.scala
Scala
apache-2.0
17,940
package silky.persistence.file import java.nio.charset.StandardCharsets._ import java.nio.file.Files._ import java.nio.file.StandardCopyOption._ import java.nio.file.StandardOpenOption._ import java.nio.file.{Files, Path} object Filepath { def save(content: String, path: Path): Path = write(path, content.getBytes(U...
PILTT/silky-persistence
src/main/scala/silky/persistence/file/Filepath.scala
Scala
apache-2.0
451
/* * Copyright 2011-2018 Chris de Vreeze * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
dvreeze/nta
src/main/scala/eu/cdevreeze/nta/ntarule/rules_2_02/Validator_2_02_00_08.scala
Scala
apache-2.0
2,650
package cn.edu.neu.chiewen.roadDemo.road import scala.math.{pow, sqrt} /** * Created by Chiewen on 2015/9/15. */ case class Position(x: Double, y: Double) { def distanceTo(other: Position): Double = sqrt(pow(x - other.x, 2) + pow(y - other.y, 2)) }
chiewen/CkNN
CkNN/src/main/scala/cn/edu/neu/chiewen/roadDemo/road/Position.scala
Scala
gpl-2.0
256
/* * Copyright 2016-2020 47 Degrees Open Source <https://www.47deg.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
47deg/github4s
github4s/src/test/scala/github4s/unit/ActivitiesSpec.scala
Scala
apache-2.0
2,602
/* * Copyright 2014 JHC Systems Limited * * 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...
andrewjskatz/sqlest
src/main/scala/sqlest/sql/BaseStatementBuilder.scala
Scala
apache-2.0
5,060
/* * 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 ...
mzl9039/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/Statistics.scala
Scala
apache-2.0
12,261
package io.hydrosphere.mist.master.interfaces.http import akka.http.scaladsl.model.ws._ import akka.http.scaladsl.server.Directives import akka.stream.scaladsl.{Flow, Sink} import io.hydrosphere.mist.master.EventsStreamer import io.hydrosphere.mist.master.interfaces.JsonCodecs import spray.json._ import scala.languag...
KineticCookie/mist
src/main/scala/io/hydrosphere/mist/master/interfaces/http/WSApi.scala
Scala
apache-2.0
1,298
package org.typelevel.discipline trait Predicate[A] extends (A => Boolean) { def apply(a: A): Boolean def &&(that: Predicate[A]) = Predicate[A](a => this(a) && that(a)) } object Predicate { def apply[A](f: A => Boolean) = new Predicate[A] { def apply(a: A) = f(a) } def const[A](res: Boolean) = new Pre...
etorreborre/discipline
src/main/scala/Predicate.scala
Scala
mit
394
/* * Copyright 2018 Vladimir Konstantinov * * 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 ...
yet-another-cafebabe/korro
src/main/scala/com/github/illfaku/korro/dto/HttpMessage.scala
Scala
lgpl-3.0
9,083
/* * Copyright (c) 2018. Lorem ipsum dolor sit amet, consectetur adipiscing elit. * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagi...
BiyuHuang/CodePrototypesDemo
demo/ScalaDemo/src/main/scala/com/wallace/demo/app/actordemo/master_worker/Worker.scala
Scala
apache-2.0
3,427
package net.cruhland.gentzen import scala.util.Random import org.scalacheck._ import Arbitrary.arbitrary object GenExtras { def genStringContainingAnyOf(chars: Set[Char]): Gen[String] = { Gen.sized { size => for { numChars <- Gen.choose(1, size) charSeq <- Gen.listOfN(numChars, Gen.oneOf...
cruhland/gentzen
src/test/scala/net/cruhland/gentzen/GenExtras.scala
Scala
mit
2,662
// ==> 18b253a4a89a84c5674165c6fc3efafad535eee3.scala <== object x0 { def x1[x2 <:_[ // error // error
lampepfl/dotty
tests/neg/i4373c.scala
Scala
apache-2.0
104
package scala.meta.tests package parsers import scala.meta.dialects.Scala211 class TrickySuite extends ParseSuite { test("annot > \\n > comment > \\n > defn") { templStat("@foo\\n//bar bar\\ndef baz = qux") } test("annot > whitespace > \\n > defn") { templStat("@foo \\ndef baz = qux") } }
beni55/scalameta
scalameta/parsers/src/test/scala/scala/meta/tests/parsers/TrickySuite.scala
Scala
bsd-3-clause
302
package jkm.cineclub.raft.DB import jkm.cineclub.raft.RaftConfig.DBInfo import com.typesafe.scalalogging.slf4j.Logging import java.io.File /** * Created with IntelliJ IDEA. * User: cineclub * Date: 12/26/13 * Time: 9:18 PM * To change this template use File | Settings | File Templates. */ object RaftLevelDB ext...
stepist/scalaraft
src/main/scala/jkm/cineclub/raft/DB/RaftLevelDB.scala
Scala
apache-2.0
1,378
/* Authors: Matei Zaharia & Kristal Curtis Developed as part of the SNAP project (http://snap.cs.berkeley.edu/) */ package siren class SAMEntry( val readId: String, val flags: Int, val piece: String, val position: Int, val mapQuality: Int, val cigar: String, val nextPiece: Strin...
fnothaft/siren-release
src/main/scala/siren/SAMEntry.scala
Scala
bsd-2-clause
6,055
/** Copyright 2015 TappingStone, 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 ...
ydanilenko/PredictionIO
core/src/main/scala/io/prediction/core/BaseServing.scala
Scala
apache-2.0
761
/* * 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 ...
bdrillard/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcSourceSuite.scala
Scala
apache-2.0
19,588
package io.github.tailhq.dynaml.utils /** * @author tailhq date 17/05/2017. * */ abstract class HasHyperParameters { val hyper_parameters: List[String] var blocked_hyper_parameters: List[String] = List() var state: Map[String, Double] = Map() def block(h: String*) = blocked_hyper_parameters = List(h:_*...
mandar2812/DynaML
dynaml-core/src/main/scala/io/github/tailhq/dynaml/utils/HasHyperParameters.scala
Scala
apache-2.0
946
package com.dzegel.DynamockServer.types case class HeaderParameters(included: HeaderSet, excluded: HeaderSet)
dzegel/DynamockServer
src/main/scala/com/dzegel/DynamockServer/types/HeaderParameters.scala
Scala
apache-2.0
111
package net.mrkeks.clave.editor.tools import net.mrkeks.clave.game.{GameObject, PlaceableObject} import net.mrkeks.clave.game.GameObjectManagement import org.denigma.threejs class ObjectPlacer[T <: GameObject with PlaceableObject](override val name: String, factory: () => T) extends AbstractEditorTool { private...
benkeks/clave
src/main/scala/net/mrkeks/clave/editor/tools/ObjectPlacer.scala
Scala
gpl-3.0
1,554
/* * 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 ...
daewon/incubator-s2graph
s2core/src/test/scala/org/apache/s2graph/core/benchmark/GraphUtilSpec.scala
Scala
apache-2.0
5,426
package org.geow.geohash.test import org.geow.geohash._ import org.geow.generator.OsmObjectGenerator import org.specs2.ScalaCheck import org.specs2.execute.Result import org.specs2.mutable.Specification /** * Created by janschulte on 12/02/15. */ class GeoHashSpec extends Specification with ScalaCheck { sequenti...
geow-org/api
src/test/scala/org/geow/geohash/test/GeoHashSpec.scala
Scala
apache-2.0
5,006
package castalia.actors import akka.actor.{ActorSystem, Props} import akka.actor.Status.Failure import akka.http.scaladsl.model.{HttpMethods, HttpProtocols, HttpRequest} import akka.testkit.TestProbe import castalia.StubConfigParser._ import castalia.matcher.RequestMatch import castalia.model.Messages.{EndpointMetrics...
TimSoethout/stubserver
src/test/scala/castalia/actors/JsonResponseProviderEndpointActorSpec.scala
Scala
mit
2,022
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
Kegeruneku/rudder
rudder-web/src/main/scala/bootstrap/liftweb/checks/CheckRuleCategoryExport.scala
Scala
agpl-3.0
3,887
package com.twitter.inject.server import com.google.common.net.{HttpHeaders, MediaType} import com.google.inject.Stage import com.twitter.conversions.time._ import com.twitter.finagle.builder.ClientBuilder import com.twitter.finagle.http._ import com.twitter.finagle.service.Backoff._ import com.twitter.finagle.service...
tom-chan/finatra
inject/inject-server/src/test/scala/com/twitter/inject/server/EmbeddedTwitterServer.scala
Scala
apache-2.0
11,082
package reddit_bot.service import java.util.HashSet import scala.jdk.CollectionConverters._ import org.apache.commons.lang3.time.DateUtils import org.slf4j.{Logger, LoggerFactory} import org.springframework.beans.factory.annotation.Autowired import org.springframework.stereotype.Service import reddit_bot.repository.L...
vitalijzad/java-rss-to-reddit
src/main/scala/reddit_bot/service/SentLinksCounting.scala
Scala
apache-2.0
1,430
package org.reactress package bench import scala.collection._ import org.scalameter.api._ class HashTableMemoryBench extends PerformanceTest.Regression { def persistor = Persistor.None override def measurer = new Executor.Measurer.MemoryFootprint val hashTableSizes = Gen.range("size")(10000...
axel22/reactive-collections
src/test/scala/org/reactress/bench/HashTableMemoryBench.scala
Scala
bsd-3-clause
1,271
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * 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 * * https://www.apache.org/licenses/LICENSE...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/feats/MithralFluidity.scala
Scala
apache-2.0
1,281
package com.twitter.finagle.loadbalancer import com.twitter.finagle._ import com.twitter.finagle.service.FailingFactory import com.twitter.finagle.stats.{StatsReceiver, NullStatsReceiver} import com.twitter.finagle.util.Rng import com.twitter.util._ import java.util.concurrent.atomic.AtomicInteger import org.junit.run...
suls/finagle
finagle-core/src/test/scala/com/twitter/finagle/loadbalancer/ApertureTest.scala
Scala
apache-2.0
6,597
/* * 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.utils object Pl...
SebsLittleHelpers/scala-js
test-suite/jvm/src/main/scala/org/scalajs/testsuite/utils/Platform.scala
Scala
apache-2.0
1,185
package ch.uzh.ifi.pdeboer.pplib.hcomp.ballot.persistence /** * Created by Mattia on 19.01.2015. */ import ch.uzh.ifi.pdeboer.pplib.hcomp.ballot.integrationtest.console.ConsoleIntegrationTest._ import ch.uzh.ifi.pdeboer.pplib.util.LazyLogger import scalikejdbc._ import scalikejdbc.config.DBs trait DBSettings { DB...
manuelroesch/PaperValidator
app/helper/questiongenerator/persistence/DBSettings.scala
Scala
mit
879
package es.own3dh2so4.ch6 import java.sql.Timestamp import java.text.SimpleDateFormat import es.own3dh2so4.Properties import es.own3dh2so4.model.Order import org.apache.spark._ import org.apache.spark.sql.SparkSession import org.apache.spark.streaming._ import org.apache.spark.streaming.dstream.{DStream, PairDStreamF...
own3dh2so4/spark-in-action-book
src/main/scala/es/own3dh2so4/ch6/SparkStreaming.scala
Scala
apache-2.0
2,573
import scala.reflect.runtime.universe._ import scala.reflect.runtime.{currentMirror => cm} import scala.tools.reflect._ object Test extends dotty.runtime.LegacyApp { val tb = cm.mkToolBox() val t1 = tb.parse("1 to 3 map (_+1)") println(tb.eval(t1)) println(tb.eval(t1)) println(tb.eval(t1)) }
yusuke2255/dotty
tests/pending/run/t6287.scala
Scala
bsd-3-clause
304
/* * Copyright 2019 Spotify AB. * * 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 ...
spotify/scio
scio-core/src/main/scala/com/spotify/scio/io/Taps.scala
Scala
apache-2.0
6,358
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/frs105/boxes/AC456.scala
Scala
apache-2.0
1,103
package com.enkidu.lignum.parsers.ast.expression.discardable.literals case class BooleanLiteral(value: String) extends Literal
marek1840/java-parser
src/main/scala/com/enkidu/lignum/parsers/ast/expression/discardable/literals/BooleanLiteral.scala
Scala
mit
128
import org.apache.spark.rdd.RDD import org.scalatest._ import techniques.PeakComparison._ class PeakTests extends SparkTestUtils with ShouldMatchers { test("testMetricDerivative1") { val word1 = Array[Double](1, 1, 1, 199, 1, 1, 1) peakDerivativeMetric(("whatever", word1), ("plop", word1), 1) should be(1.0)...
SidneyBovet/smargn
smargn/test/PeakTests.scala
Scala
gpl-2.0
7,204
package com.arcusys.valamis.persistence.impl.settings import com.arcusys.valamis.persistence.common.SlickProfile import com.arcusys.valamis.settings.model.{Setting, SettingType} import com.arcusys.valamis.settings.storage.SettingStorage import scala.slick.driver.JdbcProfile import scala.slick.jdbc.JdbcBackend /** *...
igor-borisov/valamis
valamis-slick-persistence/src/main/scala/com/arcusys/valamis/persistence/impl/settings/SettingStorageImpl.scala
Scala
gpl-3.0
1,153
class Foo { import java.util.ArrayList // Test that as we extract return values, we're missing the |UncheckedNull in the return type. // i.e. test that the nullability is propagated to nested containers. val ll = new ArrayList[ArrayList[ArrayList[String]]] val level1: ArrayList[ArrayList[String]] = ll.get(0...
som-snytt/dotty
tests/explicit-nulls/neg/interop-propagate.scala
Scala
apache-2.0
501
package org.scalatest.events import org.scalatest.junit.JUnit3Suite import org.scalatest.DoNotDiscover @DoNotDiscover class TestLocationMethodJUnit3Suite extends JUnit3Suite with TestLocationMethodServices { val suiteTypeName = "org.scalatest.events.TestLocationMethodJUnit3Suite" val expectedStartingList = List(T...
hubertp/scalatest
src/test/scala/org/scalatest/events/TestLocationMethodJUnit3Suite.scala
Scala
apache-2.0
726