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 bio4j.data.uniprot.flat import bio4j.data.uniprot.seqOps._ /* Example: ``` Q16653; O00713; O00714; O00715; Q13054; Q13055; Q14855; Q92891; Q92892; Q92893; Q92894; Q92895; Q93053; Q96KU9; Q96KV0; Q96KV1; Q99605; ``` */ case class AC(val lines: Seq[String]) extends AnyVal { private def joinedLin...
bio4j/data.uniprot
src/main/scala/flat/AC.scala
Scala
agpl-3.0
456
/* * 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/codegen/agg/AggsHandlerCodeGenerator.scala
Scala
apache-2.0
29,259
package edu.banda.coel.server.grid.callable import com.banda.chemistry.business.ChemistryRunSetting import com.banda.chemistry.domain.ArtificialChemistry import com.banda.math.business.dynamics.JavaDoubleStatsSingleRunDynamicsAnalysis import com.banda.math.domain.StatsSequence import com.banda.math.domain.dynamics.Sin...
peterbanda/coel
source/Server/src/main/scala/edu/banda/coel/server/grid/callable/GridRerunDerridaAnalysisCall.scala
Scala
apache-2.0
1,376
/** * Copyright (C) 2009-2017 Lightbend Inc. <http://www.lightbend.com> */ package akka.actor import scala.concurrent.duration._ import akka.pattern.ask import scala.concurrent.Await import akka.util.Helpers.ConfigOps /** * This object contains elements which make writing actors and related code * more concise, ...
rorygraves/perf_tester
corpus/akka/akka-actor/src/main/scala/akka/actor/ActorDSL.scala
Scala
apache-2.0
5,183
package nz import org.newdawn.slick.GameContainer trait Agent { def update(container: GameContainer): Agent }
wohanley/nz
src/main/scala/Agent.scala
Scala
agpl-3.0
114
object I0{List(I1 I2=>}
lampepfl/dotty
tests/fuzzy/AE-a0a760f3522486caf279b74367aaaa1ff0085b35.scala
Scala
apache-2.0
24
package com.shocktrade.server.trading import java.util.Date import com.shocktrade.util.DateUtil /** * Trading Clock * @author [email protected] */ object TradingClock { /** * The time in milliseconds until the next trading day */ def getDelayUntilTradingStartInMillis = DateUtil.getTradeStartTi...
ldaniels528/shocktrade-server
app-server/app/com/shocktrade/server/trading/TradingClock.scala
Scala
apache-2.0
557
/* * 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 ...
StephanEwen/incubator-flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/rules/physical/stream/StreamPhysicalWindowTableFunctionRule.scala
Scala
apache-2.0
2,677
/* * Copyright 2014 Xored Software, Inc. * Copyright 2015 Gleb Kanterov * * 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 r...
naderghanbari/scala-js-react
scalajs-react/src/main/scala/com/kanterov/scalajs/react/event/SyntheticEvent.scala
Scala
apache-2.0
3,097
/* * 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 ...
mkolod/incubator-spark
streaming/src/main/scala/org/apache/spark/streaming/dstream/FilteredDStream.scala
Scala
apache-2.0
1,351
package domain import akka.actor.ActorRef import scala.concurrent.duration._ import com.softwaremill.tagging._ import akka.persistence.fsm.PersistentFSM import java.time.Instant import scala.reflect.{ClassTag, classTag} import java.util.Base64 import services.UserSharder import domain.identity.DomainEvent import Ident...
dit4c/dit4c
dit4c-portal/app/domain/IdentityAggregate.scala
Scala
mit
2,425
package org.jetbrains.plugins.scala package lang package typeConformance import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.util.text.StringUtil import com.intellij.openapi.vfs.{CharsetToolkit, LocalFileSystem} import com.intellij.psi.util.PsiTreeUtil import com.intellij.psi.{PsiComment, PsiEleme...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/typeConformance/TypeConformanceTestBase.scala
Scala
apache-2.0
6,961
package net.tomasherman.specus.server.grid import org.specs2.mutable.Specification import org.specs2.specification.Scope import org.specs2.mock.Mockito import org.specs2.matcher.ThrownExpectations import net.tomasherman.specus.server.api.grid.{NoNodeRegisteredException, NodeID, NodeWithNameAlreadyRegisteredException, ...
tomasherman/specus
server/src/test/scala/net/tomasherman/specus/server/grid/SpecusNodeManagerSpec.scala
Scala
gpl-3.0
3,603
package org.jetbrains.plugins.scala package lang.psi.stubs import com.intellij.psi.stubs.{DefaultStubBuilder, StubElement} import com.intellij.psi.{PsiElement, PsiFile} import org.jetbrains.plugins.scala.lang.psi.api.ScalaFile import org.jetbrains.plugins.scala.lang.psi.stubs.impl.ScFileStubImpl /** * User: Alexande...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/stubs/ScalaFileStubBuilder.scala
Scala
apache-2.0
606
/* * 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, software * distribute...
wvlet/airframe
examples/src/main/scala/wvlet/airframe/examples/log/Log_01_LogSupport.scala
Scala
apache-2.0
957
package nl.dekkr.feedfrenzy.backend.extractor import com.typesafe.scalalogging.Logger import nl.dekkr.feedfrenzy.backend.model.{Action, Article, RawVariables} import org.slf4j.LoggerFactory class ArticleListExtractor extends ActionExecutor { override protected val logger = Logger(LoggerFactory.getLogger("[Articl...
dekkr/feedfrenzy-backend
src/main/scala/nl/dekkr/feedfrenzy/backend/extractor/ArticleListExtractor.scala
Scala
mit
1,036
package edu.berkeley.veloxms.storage import java.nio.ByteBuffer import edu.berkeley.veloxms.util.KryoThreadLocal object StorageUtils { def toByteArr[T](id: T): Array[Byte] = { // val key = ByteBuffer.allocate(8) // key.putLong(id).array() //val buffer = ByteBuffer.allocate(12) val kryo = KryoThrea...
samklr/velox-modelserver
veloxms-core/src/main/scala/edu/berkeley/veloxms/storage/StorageUtils.scala
Scala
apache-2.0
607
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
junrao/kafka
core/src/main/scala/kafka/tools/ConsumerOffsetChecker.scala
Scala
apache-2.0
9,870
package org.elasticmq case class NewMessageData( id: Option[MessageId], content: String, messageAttributes: Map[String, MessageAttribute], nextDelivery: NextDelivery, messageGroupId: Option[String], messageDeduplicationId: Option[DeduplicationId], orderIndex: Int, tracingId: Option[Trac...
adamw/elasticmq
core/src/main/scala/org/elasticmq/NewMessageData.scala
Scala
apache-2.0
365
package chapter.five object ExerciseEight extends App { // todo: preconditions checks // todo: make defaults static fields? class Car(val manufacturer: String, val modelName: String, val modelYear: Int = -1, var licensePlate: String = "") { } }
deekim/impatient-scala
src/main/scala/chapter/five/ExerciseEight.scala
Scala
apache-2.0
298
/** * Licensed to the Minutemen Group under one or more contributor license * agreements. See the COPYRIGHT 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 complian...
datalek/silhouette
silhouette/src/main/scala/silhouette/LoginInfo.scala
Scala
apache-2.0
1,202
package play.boilerplate.parser.backend case class ParserException(msg: String) extends Exception(msg)
Romastyi/sbt-play-boilerplate
sbt-plugin/lib/src/main/scala/play/boilerplate/parser/backend/ParserException.scala
Scala
apache-2.0
104
package au.gov.dva.sopapi.sopref.parsing.implementations.parsers.paragraphReferenceSplitters import au.gov.dva.sopapi.ConfigurationRuntimeException import au.gov.dva.sopapi.sopref.parsing.traits.ParaReferenceSplitter class OldSoPStyleParaReferenceSplitter extends ParaReferenceSplitter { val hasSubsRefsRegex = """...
govlawtech/dva-sop-api
app/src/main/scala/au/gov/dva/sopapi/sopref/parsing/implementations/parsers/paragraphReferenceSplitters/OldStyleParaReferenceSplitter.scala
Scala
apache-2.0
1,041
package org.hammerlab.guacamole.reads import debox.Buffer import htsjdk.samtools.{ Cigar, CigarOperator } import org.bdgenomics.adam.util.MdTag import org.hammerlab.guacamole.Bases import scala.collection.JavaConversions object MDTagUtils { /** * Adopted from ADAM's mdTag.getReference to operate on Seq[Byte] i...
bikash/guacamole
src/main/scala/org/hammerlab/guacamole/reads/MDTagUtils.scala
Scala
apache-2.0
5,683
package com.ajjpj.adiagram_.ui.mouse import com.ajjpj.adiagram_.ui.fw.{Command, Digest} import com.ajjpj.adiagram_.ui.{ADiagramController, ResizeDirection, AScreenPos} import com.ajjpj.adiagram_.model.diagram.AShapeSpec import com.ajjpj.adiagram_.geometry.APoint /** * @author arno */ private[mouse] class ResizingB...
arnohaase/a-diagram
src/main/scala-old/com/ajjpj/adiagram_/ui/mouse/ResizingBoxMouseTrackerState.scala
Scala
apache-2.0
1,940
/* * Copyright © 2014 TU Berlin ([email protected]) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
emmalanguage/emma
emma-lib-spark/src/test/scala/org/emmalanguage/lib/ml/classification/EvalSparkSpec.scala
Scala
apache-2.0
1,282
package com.programmaticallyspeaking.ncd.nashorn import com.programmaticallyspeaking.ncd.infra.CompiledScript object NameConvert { def sourceNameToUrl(typeName: => String, sourceName: String): String = sourceName match { case x if x.contains("<eval>") => // For evaluated scripts, convert the type name int...
provegard/ncdbg
src/main/scala/com/programmaticallyspeaking/ncd/nashorn/NameConvert.scala
Scala
bsd-3-clause
745
package org.moe.runtime import scala.util.matching.Regex object MoeUtil { // perlish modulo def perlModuloOp(a: Int, b: Int): Int = { val res = a % b if (a < 0) if (b > 0 && res < 0) res + b else res else if (b < 0) res + b else res } // strings matching the alphanumeric pattern /...
MoeOrganization/moe
src/main/scala/org/moe/runtime/MoeUtil.scala
Scala
mit
1,983
package $package$.drawerNavigation import sri.universal.styles.InlineStyleSheetUniversal import scala.scalajs.js object GlobalStyles extends InlineStyleSheetUniversal { import dsl._ val navScreenContainer = style(flex := 1) val wholeContainer = style(flex := 1) val drawerHeader = style(height := 200, ...
scalajs-react-interface/mobile.g8
src/main/scaffolds/drawerNavigation/src/main/scala/$package$/drawerNavigation/GlobalStyles.scala
Scala
apache-2.0
699
package at.ac.tuwien.ifs.ir.evaluation.pool import at.ac.tuwien.ifs.ir.model.{Document, QRels, Runs} /** * Created by aldo on 10/09/15. */ class Pool(val lRuns: List[Runs], gT: QRels) { def getName : String = ??? lazy val pool: Map[Int, Set[Document]] = ??? lazy val qRels:QRels = gT def getNewInstance(l...
aldolipani/PoolBiasEstimators
src/main/scala/at/ac/tuwien/ifs/ir/evaluation/pool/Pool.scala
Scala
apache-2.0
446
package toguru.api /** * The toguru client containing providers of the data needed for making toggling decisions. * * For usage examples, see [[toguru.play.PlaySupport]] * * @param clientProvider the client provider that extracts client information relevant for toggling. * @param activationsProvider the ac...
andreas-schroeder/toguru-scala-client
src/main/scala/toguru/api/ToguruClient.scala
Scala
mit
966
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2007-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/library/scala/math/BigDecimal.scala
Scala
bsd-3-clause
33,802
import java.io.{ByteArrayInputStream, ByteArrayOutputStream, ObjectInputStream, ObjectOutputStream} import geotrellis.proj4.CRS import geotrellis.raster.io.geotiff.writer.GeoTiffWriter import geotrellis.raster.io.geotiff.{SinglebandGeoTiff, _} import geotrellis.raster.{CellType, DoubleArrayTile, MultibandTile, Tile, ...
phenology/infrastructure
applications/ides/scala/src/main/scala/kmeans_satellite.scala
Scala
apache-2.0
23,107
package fe.CCC abstract class VFactory[_VImpl[A]] { type VImpl[A] = _VImpl[A] def One[A](one: A): VImpl[A] def Chc[A](s: Formula, y: VImpl[A], n: VImpl[A]): VImpl[A] def flatMap[A,B](va: VImpl[A], f: (A)=>VImpl[B]): VImpl[B] def map[A,B](va: VImpl[A], f: (A)=>B): VImpl[B] = flatMap(va, (a: A) => One(f(...
FiveEye/CCC
scala/src/main/scala/absV.scala
Scala
mit
894
package playground.models trait Identifiable { def id: Id }
ybr/playground
src/main/scala/playground/models/Identifiable.scala
Scala
mit
63
package calculator import scala.scalajs.js import org.scalajs.dom import org.scalajs.dom.html import dom.document object CalculatorUI extends js.JSApp { def main(): Unit = { try { setupTweetMeasurer() setup2ndOrderPolynomial() setupCalculator() } catch { case th: Throwable => ...
amathewk/func_design_scala
week4/calculator/web-ui/src/main/scala/calculator/CalculatorUI.scala
Scala
lgpl-3.0
5,410
/* * Copyright (C) 2014 - 2019 Dennis Vriend <https://github.com/dnvriend> * Copyright (C) 2019 - 2021 Lightbend Inc. <https://www.lightbend.com> */ package akka.persistence.jdbc.query import akka.persistence.query.{ EventEnvelope, NoOffset, Sequence } import akka.pattern.ask import com.typesafe.config.{ ConfigVal...
dnvriend/akka-persistence-jdbc
core/src/test/scala/akka/persistence/jdbc/query/CurrentEventsByTagTest.scala
Scala
apache-2.0
8,450
/* * 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 ...
mahak/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HintErrorLogger.scala
Scala
apache-2.0
2,404
package org.jetbrains.plugins.scala package codeInsight package template package impl import org.jetbrains.plugins.scala.codeInsight.ScalaCodeInsightBundle import org.jetbrains.plugins.scala.lang.psi.api._ /** * @author Alefas * @since 18/12/14. */ final class ScalaStringContextType extends ScalaFileTemplateCon...
JetBrains/intellij-scala
scala/codeInsight/src/org/jetbrains/plugins/scala/codeInsight/template/impl/ScalaStringContextType.scala
Scala
apache-2.0
836
/* date: Jun 22, 2012 EDIT NODE Evaluates the user's input before the input is stored. If the evaluation fails, then the user is given the opportunity to reenter the correct response. For example, the Edit command (beginning with the 'e' tag): d Enter the type of animal shown (# $animal) e ($animal)...
hangle/Notecard
src/EditNode.scala
Scala
apache-2.0
5,334
/*********************************************************************** * Copyright (c) 2013-2019 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
elahrvivaz/geomesa
geomesa-convert/geomesa-convert-common/src/main/scala/org/locationtech/geomesa/convert2/transforms/MathFunctionFactory.scala
Scala
apache-2.0
2,181
package lila.base import akka.actor.ActorSystem import ornicar.scalalib.Zero import scala.collection.BuildFrom import scala.concurrent.duration._ import scala.concurrent.{ ExecutionContext => EC, Future, Await } import scala.util.Try import lila.common.Chronometer import LilaTypes._ final class PimpedFuture[A](priva...
luanlv/lila
modules/common/src/main/base/PimpedFutures.scala
Scala
mit
7,009
package collins.solr import models.{Asset, AssetLog, Page, PageParams, SortDirection} import models.asset.AssetView import play.api.Logger import org.apache.solr.client.solrj.{SolrQuery, SolrServerException} import org.apache.solr.common.SolrDocument import Solr._ import SortDirection._ /** * This class is a full ...
Shopify/collins
app/collins/solr/CollinsSearchQuery.scala
Scala
apache-2.0
2,470
package com.sksamuel.avro4s.schema import com.sksamuel.avro4s.{AvroSchema, Encoder, ImmutableRecord, SchemaFor} import com.sksamuel.avro4s.examples.UppercasePkg.ClassInUppercasePackage import com.sksamuel.avro4s.schemas.JavaStringSchemaFor import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.Any...
sksamuel/avro4s
avro4s-core/src/test/scala/com/sksamuel/avro4s/schema/StringSchemasTest.scala
Scala
apache-2.0
1,075
/* * Copyright 2015 PayPal * * 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 ...
keshin/squbs
squbs-httpclient/src/main/scala/org/squbs/httpclient/endpoint/HttpClientEndpoint.scala
Scala
apache-2.0
3,737
package streamz.example import akka.actor.ActorSystem import scalaz.concurrent.Task import scalaz.std.string._ import scalaz.stream.Process import streamz.akka.persistence._ object PersistenceExample { implicit val system = ActorSystem("example") val p1: Process[Task, Event[Any]] = replay("processor-1") val p...
Astrac/streamz
streamz-akka-persistence/src/test/scala/streamz/example/PersistenceExample.scala
Scala
apache-2.0
779
package org.scalamu.plugin.mutators import org.scalamu.plugin.MutatingTransformer private[mutators] trait AbstractReplacementRules extends DomainAware { self: MutatingTransformer => protected def replaceWith(input: Domain): global.Tree }
sugakandrey/scalamu
scalac-plugin/src/main/scala/org/scalamu/plugin/mutators/AbstractReplacementRules.scala
Scala
gpl-3.0
248
/** * 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 ...
bigdatagenomics/qc-metrics
quinine-core/src/test/scala/org/bdgenomics/quinine/metrics/targeted/ReadStatsSuite.scala
Scala
apache-2.0
8,446
package org.alitouka.spark.dbscan import org.alitouka.spark.dbscan.util.commandLine.{CommonArgs, CommonArgsParser} import org.apache.commons.math3.ml.distance.{ManhattanDistance, EuclideanDistance} class CommandLineParsingSuite extends DbscanSuiteBase { val masterUrl = "spark://localhost:7777" val jar = "hdfs:/...
zerosign/spark_dbscan
src/test/scala/org/alitouka/spark/dbscan/CommandLineParsingSuite.scala
Scala
apache-2.0
2,529
/* * AudioContextExt.scala * (Cord) * * Copyright (c) 2015-2020 Hanns Holger Rutz. * * This software is published under the GNU Lesser General Public License v2.1+ * * * For further information, please contact Hanns Holger Rutz at * [email protected] */ package de.sciss.cord.audio import org.scalajs.dom...
Sciss/Cord
src/main/scala/de/sciss/cord/audio/AudioContextExt.scala
Scala
lgpl-2.1
2,588
/* * 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 ...
starpit/openwhisk
common/scala/src/main/scala/org/apache/openwhisk/core/entity/DocInfo.scala
Scala
apache-2.0
5,940
package org.jetbrains.sbt package project import java.io.File import java.net.URL import java.util import com.intellij.execution.configurations.SimpleJavaParameters import com.intellij.openapi.application.{ApplicationManager, PathManager} import com.intellij.openapi.externalSystem.model.ExternalSystemException import...
whorbowicz/intellij-scala
src/org/jetbrains/sbt/project/SbtExternalSystemManager.scala
Scala
apache-2.0
6,731
/* * DARWIN Genetic Algorithms Framework Project. * Copyright (c) 2003, 2005, 2007, 2009, 2011, 2016, 2017. Phasmid Software * * Originally, developed in Java by Rubecula Software, LLC and hosted by SourceForge. * Converted to Scala by Phasmid Software and hosted by github at https://github.com/rchillyard/Darwin ...
rchillyard/Darwin
src/main/scala/com/phasmid/darwin/evolution/Evolver.scala
Scala
gpl-3.0
3,566
/** * 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...
rhauch/kafka
core/src/main/scala/kafka/cluster/Replica.scala
Scala
apache-2.0
7,869
package im.actor.server.persist import im.actor.server.model.UserPhone import slick.dbio.Effect.{ Read, Write } import slick.driver.PostgresDriver.api._ import slick.profile.{ FixedSqlAction, FixedSqlStreamingAction } final class UserPhoneTable(tag: Tag) extends Table[UserPhone](tag, "user_phones") { def userId = c...
ljshj/actor-platform
actor-server/actor-persist/src/main/scala/im/actor/server/persist/UserPhoneRepo.scala
Scala
mit
1,921
package tierney.core import cats.~> class LazyFunctionK[F[_], G[_]](value: => F ~> G) extends (F ~> G) { override def apply[A](fa: F[A]) = value(fa) }
m50d/tierney
core/src/main/scala/tierney/core/LazyFunctionK.scala
Scala
apache-2.0
154
/* * 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 ...
goldmedal/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JSONOptions.scala
Scala
apache-2.0
8,039
package me.yingrui.segment.hmm import me.yingrui.segment.util.ISerialize import me.yingrui.segment.util.SerializeHandler class Trie extends ISerialize { var key = -1 var count = 0 var prob = 0.0D var descendant:Array[Trie] = null def getKey(): Int = { return key } def buildIndex(c: Int) { pro...
yingrui/mahjong
lib-segment/src/main/scala/me/yingrui/segment/hmm/Trie.scala
Scala
gpl-3.0
4,595
package com.sksamuel.elastic4s.search import com.sksamuel.elastic4s.JsonSugar import org.elasticsearch.common.xcontent.{ToXContent, XContentFactory} import org.scalatest.FlatSpec class ScoreDslTest extends FlatSpec with JsonSugar { import com.sksamuel.elastic4s.ElasticDsl._ "a score dsl" should "generate correc...
ulric260/elastic4s
elastic4s-core-tests/src/test/scala/com/sksamuel/elastic4s/search/ScoreDslTest.scala
Scala
apache-2.0
2,397
package org.adridadou.ethereum.propeller.util import org.adridadou.ethereum.propeller.solidity.abi.AbiEntry import org.scalatest.{FlatSpec, Matchers} import org.scalatest.check.Checkers class JsonParserTest extends FlatSpec with Matchers with Checkers { "Json parser" should "ignore unknown parameters" in { val jso...
adridadou/eth-propeller-core
src/test/scala/org/adridadou/ethereum/propeller/util/JsonParserTest.scala
Scala
apache-2.0
1,010
/* * ____ ____ _____ ____ ___ ____ * | _ \ | _ \ | ____| / ___| / _/ / ___| Precog (R) * | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data * | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, Inc....
precog/platform
yggdrasil/src/main/scala/com/precog/yggdrasil/StorageFormat.scala
Scala
agpl-3.0
1,433
package euler package til70 object Euler70 extends EulerProblem { override def result = { val res = (2 until 10000000).view map { n => (n, φ(n)) } filter { case (n, φn) => isPermutation(n, φn) } minBy { case (n, φn) => n.toDouble / φn } res._1 } // good for n < 10000000 lazy val ...
TrustNoOne/Euler
scala/src/main/scala/euler/til70/Euler70.scala
Scala
mit
495
/* * Copyright (C) 2015 Jonathan Passerat-Palmbach * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This pr...
ISCPIF/PSEExperiments
openmole-src/openmole/third-parties/toolxit.bibtex/macros/src/main/scala/toolxit/bibtex/macros/OctalLiterals.scala
Scala
agpl-3.0
1,284
/* * Copyright (C) 2015 Stratio (http://stratio.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 required by app...
diegohurtado/sparta
driver/src/test/scala/com/stratio/sparta/driver/test/writer/CubeWriterTest.scala
Scala
apache-2.0
7,115
package com.twitter.finagle.ssl.client import com.twitter.finagle.Address import com.twitter.finagle.ssl._ import com.twitter.io.TempFile import java.io.File import java.net.InetSocketAddress import org.scalatest.funsuite.AnyFunSuite class JdkClientEngineFactoryTest extends AnyFunSuite { private[this] val address:...
twitter/finagle
finagle-core/src/test/scala/com/twitter/finagle/ssl/client/JdkClientEngineFactoryTest.scala
Scala
apache-2.0
6,861
package akkahttptwirl import akka.actor.ActorSystem import akka.http.scaladsl.marshalling.Marshal import akka.http.scaladsl.model.{HttpCharsets, MediaTypes, ResponseEntity} import akka.stream.ActorMaterializer import org.scalatest.{OptionValues, BeforeAndAfterAll, Matchers, WordSpec} import scala.concurrent.Await imp...
btomala/akka-http-twirl
src/test/scala/akkahttptwirl/TwirlSupportSpec.scala
Scala
apache-2.0
2,064
package edu.gemini.util.skycalc.calc import edu.gemini.skycalc.{MoonCalc, TimeUtils, ImprovedSkyCalc} import java.util.Date import edu.gemini.spModel.core.Site import jsky.coords.WorldCoords import edu.gemini.util.skycalc.calc.MoonCalculator.Fields import javax.swing.Icon import java.awt.geom.Arc2D import java.awt.{Co...
arturog8m/ocs
bundle/edu.gemini.util.skycalc/src/main/scala/edu/gemini/util/skycalc/calc/MoonCalculator.scala
Scala
bsd-3-clause
7,088
package com.wlangiewicz.workouttracker.dao import com.github.nscala_time.time.Imports._ import com.wlangiewicz.workouttracker.domain._ class WorkoutDao { var workouts = Set( Workout(UserId(1), WorkoutId(1), "morning run", 10000, 3700, new DateTime(2016, 2, 9, 11, 0, 0, 0)), Workout(UserId(1), WorkoutId(2), ...
wlk/workout-tracker-akka-http
src/main/scala/com/wlangiewicz/workouttracker/dao/WorkoutDao.scala
Scala
mit
2,586
/** * Copyright 2011-2016 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...
GabrielPlassard/gatling
gatling-core/src/test/scala/io/gatling/core/action/GroupEndSpec.scala
Scala
apache-2.0
1,343
package com.workshop object FunctionsComposition { // Functions Composition val toLowerCase: String => String = _.toLowerCase val capitalizeWords: String => String = (value: String) => value.split(" ").map(word => word.take(1).toUpperCase + word.substring(1)).mkString(" ") val removeSpaces: String => Strin...
maximn/scala-workshop
src/main/scala/com/workshop/FunctionsComposition.scala
Scala
mit
1,229
package dsentric.filter import org.scalatest.funsuite.AnyFunSuite import org.scalatest.matchers.should.Matchers import dsentric.{DArray, DObject, Dsentric} class DFilterTests extends AnyFunSuite with Matchers { import Dsentric._ import dsentric.filter.DFilterSyntax._ import dsentric.codecs.std.DCodecs._ tes...
HigherState/dsentric
maps/src/test/scala/dsentric/filter/DFilterTests.scala
Scala
apache-2.0
6,768
package toguru.toggles import akka.actor.{Actor, ActorSystem, Props} import com.codahale.metrics.Counter import com.typesafe.config.{Config => TypesafeConfig} import play.api.http.HeaderNames import play.api.libs.json.Json import play.api.test.FakeRequest import play.api.test.Helpers._ import toguru.app.Config import ...
andreas-schroeder/toguru
test/toguru/toggles/ToggleStateControllerSpec.scala
Scala
mit
5,949
package org.jetbrains.plugins.scala.codeInsight.intention.types import org.jetbrains.plugins.scala.ScalaBundle /** * Converts expression representing java collection to * scala equivalent using [[scala.collection.JavaConverters]] * * @author Eugene Platonov * 04/07/13 */ class ConvertJavaToScalaCollecti...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/codeInsight/intention/types/ConvertJavaToScalaCollectionIntention.scala
Scala
apache-2.0
912
package org.littlewings.weldse.example import javax.enterprise.inject.Instance import org.jboss.weld.environment.se.{Weld, WeldContainer} import org.scalatest.FunSpec import org.scalatest.Matchers._ class WeldExample extends FunSpec { describe("weld-se spec") { it("simple use") { val weld: Weld = new We...
kazuhira-r/javaee6-scala-examples
weld-se-example/src/test/scala/org/littlewings/weldse/example/WeldSeSpec.scala
Scala
mit
1,923
package org.chaomai.paraten.tensor import breeze.linalg.DenseVector import org.chaomai.paraten.{Common, UnitSpec} /** * Created by chaomai on 02/05/2017. */ class TestCoordinateTensor extends UnitSpec { "A TensorFactory" should "build tensor from file" in { val dim = Common.dim3TensorSize val t = Common...
ChaoMai/ParaTen
src/test/scala/org/chaomai/paraten/tensor/TestCoordinateTensor.scala
Scala
apache-2.0
4,238
package breeze.linalg /* Copyright 2012 David Hall 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...
chen0031/breeze
math/src/main/scala/breeze/linalg/DenseVector.scala
Scala
apache-2.0
26,741
/* * Copyright 2016 Nokia Solutions and Networks Oy * * 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...
nokia/akka-typed-persistence
src/test/scala/com/nokia/ntp/ct/persistence/MockSnapshotStore.scala
Scala
apache-2.0
2,697
package rta.concurrent import java.util.concurrent.atomic.AtomicReference import scala.annotation.tailrec import scala.util.control.NonFatal sealed trait Atomic[T] { def get: T def set(newValue: T): Unit def compareAndSet(expect: T, update: T): Boolean @inline final def update(f: T => T): Either[Throwable,...
kjanosz/RuleThemAll
utils/src/main/scala/rta/concurrent/Atomic.scala
Scala
apache-2.0
962
package org.higherstate.jameson.parsers import org.higherstate.jameson.Path import org.higherstate.jameson.tokenizers._ import org.higherstate.jameson.failures._ case class OptionParser[T](parser:Parser[T]) extends Parser[Option[T]] { def parse(tokenizer:Tokenizer, path:Path) = tokenizer.head match { cas...
HigherState/jameson
src/main/scala/org/higherstate/jameson/parsers/OptionParser.scala
Scala
apache-2.0
538
package slamdata.engine.std import scalaz._ import slamdata.engine.{Data, Func, Type, Mapping, SemanticError} import SemanticError._ import Validation.{success, failure} import NonEmptyList.nel trait DateLib extends Library { // NB: SQL specifies a function called `extract`, but that doesn't have comma- // ...
mossprescott/quasar
src/main/scala/slamdata/engine/std/date.scala
Scala
agpl-3.0
921
package com.intenthq.pucket.thrift.writer import com.intenthq.pucket.thrift._ import com.intenthq.pucket.writer.Writer import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.Path import org.apache.parquet.hadoop.ParquetWriter import org.apache.parquet.hadoop.metadata.CompressionCodecName import org.ap...
intenthq/pucket
thrift/src/main/scala/com/intenthq/pucket/thrift/writer/ThriftWriter.scala
Scala
mit
1,846
import cascading.pipe.Pipe import com.twitter.scalding._ /** Scalding Tutorial ported to use the Type-safe API (TDsl) (rather than Cascading's Fields API). The examples here roughly correspond to those in `tutorial/Tutorial{0..5}.scala`. These tutorials are all run from this single file; which one is run can be chose...
Cascading/scalding-tutorial
src/main/scala/tutorial/TypedTutorial.scala
Scala
apache-2.0
9,561
package org.trustedanalytics.sparktk.frame.internal.ops.flatten import org.apache.commons.lang3.StringUtils import org.apache.spark.rdd.RDD import org.apache.spark.sql.Row import org.trustedanalytics.sparktk.frame.DataTypes import org.trustedanalytics.sparktk.frame.DataTypes.DataType import org.trustedanalytics.sparkt...
shibanis1/spark-tk
core/src/main/scala/org/trustedanalytics/sparktk/frame/internal/ops/flatten/FlattenColumns.scala
Scala
apache-2.0
2,244
package systems.adaptix.bling.data import scalikejdbc._ // TODO: EXISTS queries /** * A SelectionCriterion represents a constraint to be imposed on a selection from a given table in a database. This corresponds to the argument to an SQL WHERE clause. * SelectionCriteria should be constructed using one of the follo...
nkashy1/bling
src/main/scala/systems/adaptix/bling/data/SelectionCriterion.scala
Scala
mit
10,479
package com.softwaremill.react.kafka import java.util.Properties import kafka.message.{DefaultCompressionCodec, NoCompressionCodec, SnappyCompressionCodec} import kafka.producer.ProducerConfig import kafka.serializer.Encoder object ProducerProperties { /** * Producer Properties * * brokerList * This i...
blawlor/reactive-kafka
core/src/main/scala/com/softwaremill/react/kafka/ProducerProperties.scala
Scala
apache-2.0
5,998
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.tools.nsc impor...
martijnhoekstra/scala
src/compiler/scala/tools/nsc/CompilerCommand.scala
Scala
apache-2.0
6,043
object MultiArray2 { def test: Int = { val b: Array[Array[Int]] = Array.fill(10)(Array.fill(10)(0)) b(0)(0) = 10 b(0)(0) } ensuring(_ == 10) }
regb/leon
src/test/resources/regression/verification/xlang/valid/MultiArray2.scala
Scala
gpl-3.0
164
/* Author: Kristal Curtis */ package siren.test import org.scalatest._ import siren._ class UnionFindGridTest extends FunSuite with BeforeAndAfter { val indexRange = (250L, 499L) // 0 to 249 val scanRange = (750L, 999L) // 250 to 499 val uf = new UnionFindGrid(indexRange, scanRange) test("toIndex for...
fnothaft/siren-release
src/test/scala/UnionFindGridTest.scala
Scala
bsd-2-clause
474
/* Title: Pure/General/mercurial.scala Author: Makarius Support for Mercurial repositories, with local or remote repository clone and working directory (via ssh connection). */ package isabelle import java.io.{File => JFile} import scala.annotation.tailrec import scala.collection.mutable object Mer...
larsrh/libisabelle
modules/pide/2019-RC4/src/main/scala/General/mercurial.scala
Scala
apache-2.0
6,221
package org.jetbrains.plugins.scala package annotator import com.intellij.codeInsight.daemon.impl.AnnotationHolderImpl import com.intellij.codeInsight.intention.IntentionAction import com.intellij.codeInspection._ import com.intellij.lang.annotation._ import com.intellij.openapi.project.DumbAware import com.intellij.o...
JetBrains/intellij-scala-historical
src/org/jetbrains/plugins/scala/annotator/ScalaAnnotator.scala
Scala
apache-2.0
60,381
package com.sageserpent.americium.java import cats.implicits._ import cats.{Functor, Semigroupal} import com.sageserpent.americium.java.{ Trials => JavaTrials, TrialsScaffolding => JavaTrialsScaffolding } import cyclops.data.tuple.{ Tuple2 => JavaTuple2, Tuple3 => JavaTuple3, Tuple4 => JavaTuple4 } import cy...
sageserpent-open/americium
src/main/scala/com/sageserpent/americium/java/tupleTrials.scala
Scala
mit
11,038
package score.discord.canti.jdamocks import java.util import java.util.concurrent.locks.ReentrantReadWriteLock import net.dv8tion.jda.api.utils.cache.CacheView import net.dv8tion.jda.api.utils.{ClosableIterator, LockIterator} import scala.jdk.CollectionConverters.* open class ScalaCacheView[T](cache: Iterable[T], g...
ScoreUnder/canti-bot
src/test/scala/score/discord/canti/jdamocks/ScalaCacheView.scala
Scala
agpl-3.0
1,373
package com.avsystem.commons.misc import com.avsystem.commons.SharedExtensions._ import org.scalatest.funsuite.AnyFunSuite import org.scalatest.matchers.should.Matchers class OptArgTest extends AnyFunSuite with Matchers { test("nonempty") { val opt = OptArg(23) opt match { case OptArg(num) => assert(n...
AVSystem/scala-commons
commons-core/src/test/scala/com/avsystem/commons/misc/OptArgTest.scala
Scala
mit
780
package org.scalaide.ui.internal.editor import org.eclipse.core.runtime.Status import org.eclipse.core.runtime.jobs.Job import org.eclipse.jdt.core.dom.CompilationUnit import org.eclipse.jface.text.IDocumentExtension4 import org.eclipse.jface.text.ITextSelection import org.eclipse.jface.text.Position import org.eclips...
stephenh/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/ui/internal/editor/MarkOccurrencesEditorExtension.scala
Scala
bsd-3-clause
4,894
/* * Copyright (c) 2018 by Andrew Charneski. * * The author 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 * * U...
acharneski/ImageLabs
src/main/scala/interactive/superres/UpsamplingModel.scala
Scala
apache-2.0
15,324
package org.joda.time.format import java.io.Writer import java.util.Locale import org.joda.time.MutablePeriod import org.joda.time.Period import org.joda.time.PeriodType import org.joda.time.ReadWritablePeriod import org.joda.time.ReadablePeriod class PeriodFormatter { private var iLocale: Locale = null private ...
mdedetrich/soda-time
shared/src/main/scala/org/joda/time/format/PeriodFormatter.scala
Scala
bsd-2-clause
3,213
package fr.lium package actor import fr.lium.model.{Converted, FailedConversion, MediaFile} import fr.lium.tables.MediaFiles import java.io.File import akka.actor.{Actor, ActorRef} import akka.event.Logging import sys.process._ import scala.slick.session.Database import scala.slick.driver.SQLiteDriver.simple._ imp...
bsalimi/speech-recognition-api
app/actors/SoundConvertorActor.scala
Scala
mit
1,529
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/main/scala/org/neo4j/cypher/internal/compiler/v2_3/tracing/rewriters/RewriterTask.scala
Scala
apache-2.0
1,148
class Racional(n: Int, d: Int) { val numerador = n val denominador = d def Multiplicacion (b: Racional): Racional = { new Racional( numerador * b.numerador , denominador * b.denominador ) } } print("Numerador de la primera fraccion: ") val n1 = readInt() print("Denominador de la primera fra...
diana170309/poo1-1
Racionales-Multiplicacion.scala
Scala
mit
699
/* * Copyright 2014 Databricks * * 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 i...
mohitjaggi/spark-csv
src/main/scala/com/databricks/spark/csv/util/InferSchema.scala
Scala
apache-2.0
3,933