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 ...
ron8hu/spark
core/src/main/scala/org/apache/spark/status/api/v1/ApiRootResource.scala
Scala
apache-2.0
6,452
package org.jetbrains.plugins.scala package lang package parser package parsing package base import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder /** * @author Alexander Podkhalyuzin * Date: 15.02.2008 */ /* * Modifier ::= Loc...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/parser/parsing/base/Modifier.scala
Scala
apache-2.0
665
package com.wavesplatform.api.http.requests import com.wavesplatform.account.PublicKey import com.wavesplatform.lang.ValidationError import com.wavesplatform.transaction.assets.IssueTransaction import com.wavesplatform.transaction.{Proofs, TxVersion} import play.api.libs.json.{Format, Json} object SignedIssueV1Reques...
wavesplatform/Waves
node/src/test/scala/com/wavesplatform/api/http/requests/SignedIssueV1Request.scala
Scala
mit
1,132
/* * 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/hive/src/test/scala/org/apache/spark/sql/hive/client/HiveClientUserNameSuite.scala
Scala
apache-2.0
2,379
package org.jetbrains.plugins.scala.lang.completion import com.intellij.codeInsight.completion._ import com.intellij.codeInsight.lookup._ import com.intellij.openapi.application.ApplicationManager import com.intellij.patterns.PsiElementPattern.Capture import com.intellij.patterns.{ElementPattern, PlatformPatterns, Sta...
triplequote/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/completion/ScalaSmartCompletionContributor.scala
Scala
apache-2.0
33,472
package domala.internal.macros.meta.args import scala.meta._ case class TableArgs( name: Term.Arg, catalog: Term.Arg, schema: Term.Arg, quote: Term ) object TableArgs { def of(mods: Seq[Mod]): TableArgs = { val table = mods.collectFirst { case mod"@Table(..$args)" => args } val blank = q"...
bakenezumi/domala
meta/src/main/scala/domala/internal/macros/meta/args/TableArgs.scala
Scala
apache-2.0
983
package qualification2015.a import java.io.{BufferedReader, FileInputStream, InputStreamReader, PrintWriter} /* https://code.google.com/codejam/contest/6224486/dashboard#s=p0 */ object StandingOvation { def main(args: Array[String]): Unit = { val out = new PrintWriter("src/main/scala/qualification2015/a/A-la...
jmg2014/googlecodejam
src/main/scala/qualification2015/a/StandingOvation.scala
Scala
apache-2.0
1,332
package main.scala.PrimeFactors object PrimeFactors { def apply(number: Int): List[Int] = { require(number > 0) def loop(n: Int, p: Int): List[Int] = n match { case 1 => List() case _ => if (n % p == 0) { p :: loop(n / p, p) } else { loop(n, p + 1) } ...
ollielo/ScalaKata
src/main/scala/PrimeFactors/PrimeFactors.scala
Scala
mit
352
package org.substeps.report /** * Created by ian on 06/02/17. */ trait GlossaryTemplate { def buildGlossaryReport(dateTimeString :String) ={ s""" <!DOCTYPE html> <html lang="en"> <head> <title>Substeps Glossary</title> <meta charset="UTF-8"> <link href="css/bootstrap.min.css" rel="stylesheet"/...
Substeps/substeps-framework
core/src/main/scala/org/substeps/report/GlossaryTemplate.scala
Scala
lgpl-3.0
3,261
import scala.util.Random.shuffle object BogoSort { def isSorted(list: List[Int]): Boolean = list match { case Nil => true case a :: b :: _ if a > b => false case _ :: tail => isSorted(tail) } def bogoSort(list: List[Int]): List[Int] = isSorted(list) match { case false => bogoS...
Gathros/algorithm-archive
contents/bogo_sort/code/scala/bogo.scala
Scala
mit
559
/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.10.75 * apibuilder 0.15.33 app.apibuilder.io/flow/session-context/latest/play_2_x_json */ package io.flow.session.context.v0.models { final case class Context( id: String, experiments: Seq[io.flow.session.context.v0.models.Se...
flowvault/proxy
app/generated/FlowSessionContextV0Models.scala
Scala
mit
10,256
/** * Copyright (C) 2013 Carnegie Mellon University * * 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 appl...
twmarshall/tdb
core/src/main/scala/tdb/datastore/cassandra/CassandraTable.scala
Scala
apache-2.0
6,226
package org.ferrit.core.uri /** * Stores all unvisited URIs, queued for fetching. */ trait Frontier { /** * Yes you guessed it, the size of the frontier. How many items are still to be fetched? */ def size: Int /** * Add a fetch job to the frontier. */ def enqueue(f: FetchJob): Int /**...
reggoodwin/ferrit
src/main/scala/org/ferrit/core/uri/Frontier.scala
Scala
mit
421
/* * 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...
jenniew/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/nn/LogSpec.scala
Scala
apache-2.0
1,669
package mesosphere.marathon.api.v2.json import com.wix.accord.Validator import com.wix.accord.dsl._ import mesosphere.marathon.Features import mesosphere.marathon.Protos.Constraint import mesosphere.marathon.api.v2.Validation._ import mesosphere.marathon.core.readiness.ReadinessCheck import mesosphere.marathon.core.he...
timcharper/marathon
src/main/scala/mesosphere/marathon/api/v2/json/AppUpdate.scala
Scala
apache-2.0
6,568
package com.hyenawarrior.OldNorseGrammar.grammar import com.hyenawarrior.OldNorseGrammar.grammar.Syllable.lengthOf import com.hyenawarrior.OldNorseGrammar.grammar.phonology.Consonant.isConsonant import com.hyenawarrior.OldNorseGrammar.grammar.phonology.Vowel._ import scala.annotation.tailrec /** * Created by Hyena...
HyenaSoftware/IG-Dictionary
OldNorseGrammarEngine/src/main/scala/com/hyenawarrior/OldNorseGrammar/grammar/Syllables.scala
Scala
lgpl-3.0
5,358
package org.casualmiracles.finance.models /** * @author nz */ import org.casualmiracles.finance.contracts._ object EmployeeStockOptionsModel extends GenericModel with GenericComputations with GeometricInterestRateModel { override def makeModel(modelDate: Date, inputsData:ModelParameters) = Model( modelStart =...
yuriylesyuk/scala-contracts
src/main/scala/org/casualmiracles/finance/models/EmployeeStockOptionsModel.scala
Scala
mit
870
/* * Copyright 2016 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...
ahudspith-equalexperts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/computations/calculations/ExpensesCalculator.scala
Scala
apache-2.0
1,901
import java.io.File import testgen.{CanonicalDataParser, TestCaseData, TestSuiteBuilder} import TestSuiteBuilder.{toString, _} object VariableLengthQuantityTestGenerator { private def mapListToString(arg: List[_]): String = { s"List(${arg .map { case d: Double => "0x" + d.toLong.toHexString.toUpp...
ricemery/xscala
testgen/src/main/scala/VariableLengthQuantityTestGenerator.scala
Scala
mit
2,655
package xlint1 package object foo { implicit class Bar[T](val x: T) extends AnyVal { def bippy = 1 } } package foo { object Baz { def main(args: Array[String]): Unit = { "abc".bippy } } }
yusuke2255/dotty
tests/pos/valueclasses/xlint1.scala
Scala
bsd-3-clause
216
package io.ruben.minecraft.avatars import io.ruben.minecraft.ScalaLang import io.ruben.minecraft.avatars.models._ import org.bukkit.Bukkit import org.bukkit.plugin.java.JavaPlugin /** * Created by istar on 13/09/15. */ object DataAccess { val plugin:AvatarsPlugin = JavaPlugin.getPlugin(classOf[AvatarsPlugin]) ...
Istar-Eldritch/bukkit-avatars
src/main/scala/io/ruben/minecraft/avatars/DataAccess.scala
Scala
gpl-3.0
601
/** * 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 ...
tdanford/adam
adam-core/src/test/scala/org/bdgenomics/adam/models/ReferenceRegionSuite.scala
Scala
apache-2.0
8,531
package example import diode._ // Define the root of our application model case class RootModel(counter: Int) // Define actions case class Increase(amount: Int) extends Action case class Decrease(amount: Int) extends Action case object Reset extends Action /** * AppCircuit provides the actual instance of the `R...
ochrons/diode
examples/simple/src/main/scala/example/AppCircuit.scala
Scala
mit
1,348
/* * Copyright 2007-2011 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
pbrant/framework
web/webkit/src/main/scala/net/liftweb/http/js/JSArtifacts.scala
Scala
apache-2.0
4,531
package io.eels.component.hive import com.sksamuel.exts.metrics.Timed import io.eels.Frame import io.eels.schema.StructType import org.apache.hadoop.fs.permission.FsPermission import org.apache.hadoop.fs.{FileSystem, Path} import org.apache.hadoop.hive.conf.HiveConf import org.apache.hadoop.hive.metastore.HiveMetaStor...
stheppi/eel
eel-hive/src/test/scala/io/eels/component/hive/HiveSpeedTest.scala
Scala
apache-2.0
2,470
package io.igl.jwt import play.api.libs.json.{JsNumber, JsArray, JsString, JsValue} trait ClaimValue extends JwtValue { val field: ClaimField } trait ClaimField extends JwtField { def attemptApply(value: JsValue): Option[ClaimValue] } case class Iss(value: String) extends ClaimValue { override val field: Clai...
iain-logan/jwt
src/main/scala/io/igl/jwt/Claims.scala
Scala
mit
2,682
package dregex.impl import scala.collection.immutable.Seq case class NfaTransition(from: State, to: State, char: AtomPart) case class Nfa(initial: State, transitions: Seq[NfaTransition], accepting: Set[State]) { override def toString() = { val transStr = transitions.mkString("[", "; ", "]") val acceptStr ...
marianobarrios/dregex
src/main/scala/dregex/impl/Nfa.scala
Scala
bsd-2-clause
566
/** * Copyright 2016, deepsense.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 applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
deeplang/src/main/scala/io/deepsense/deeplang/params/library/LoadFromLibraryParam.scala
Scala
apache-2.0
1,133
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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...
hpe-cct/cct-core
src/main/scala/cogx/compiler/gpu_operator/expression/TernaryFloatExpression.scala
Scala
apache-2.0
1,960
package org.aja.tej.examples.spark.rdd.summarizationPatterns /** * Created by mageswaran on 25/11/15. */ /* Standard reduce is taking a wrapped version of the function and using it to mapPartitions. After that results are collected and reduced locally on a driver. If number of the partitions is large and/or functio...
Mageswaran1989/aja
src/examples/scala/org/aja/tej/examples/spark/rdd/summarizationPatterns/TreeReduceExample.scala
Scala
apache-2.0
1,570
package im.actor.server.api.rpc.service.auth import java.util.regex.Pattern import scalaz._ import scalaz.syntax.all._ import slick.dbio._ import im.actor.api.rpc._ import im.actor.server.util.StringUtils private[auth] trait Helpers extends PublicKeyHelpers { val emailPattern = Pattern.compile("""^[-.\\w]+@(?:[a...
fhchina/actor-platform
actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/auth/Helpers.scala
Scala
mit
1,572
/* * Copyright (c) 2009 Sony Pictures Imageworks Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, thi...
jcai/scala-migrations
src/test/scala/com/imageworks/migration/tests/DatabaseAdapterTests.scala
Scala
bsd-3-clause
2,635
package at.logic.gapt.expr.hol import at.logic.gapt.expr._ import at.logic.gapt.proofs._ import at.logic.gapt.proofs.expansion._ import at.logic.gapt.utils.NameGenerator import scala.collection.mutable case class fastStructuralCNF( propositional: Boolean = true, bidirectionalDefs: Boolean = false ) { def apply( f...
gebner/gapt
core/src/main/scala/at/logic/gapt/expr/hol/fastStructuralCNF.scala
Scala
gpl-3.0
6,728
package org.openurp.edu.eams.teach.program.log //remove if not needed class EndChain(someProperties: Map[String, String]) extends PhaseChain(someProperties) { def end(): String = getLogs def getLogs(): String = { val sb = new StringBuilder() for (i <- 0 until MajorPlanLogHelper.LOG_FIELDS.length) { ...
openurp/edu-eams-webapp
plan/src/main/scala/org/openurp/edu/eams/teach/program/log/EndChain.scala
Scala
gpl-3.0
498
/* * 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/nodes/calcite/Sink.scala
Scala
apache-2.0
2,523
/** * Copyright (C) 2011 - 101loops.com <dev@101loops.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 appli...
crashnote/crashnote-java
modules/core/src/test/scala/com/crashnote/test/core/unit/config/ConfigLoaderSpec.scala
Scala
apache-2.0
1,553
object PrintArgs extends scala.App { /* There are many ways to print the elements of an array in Scala. */ // A traditional while loop: var i = 0; while (i < args.length) { println(args(i)) i += 1 } // A traditional for loop: for (i <- 0 until args.length) println(args(i)) // An ite...
winse/learning-scala-in-small-bites
src/main/scala/PrintArgs.scala
Scala
apache-2.0
786
/* Copyright 2016-17, Hasso-Plattner-Institut fuer Softwaresystemtechnik GmbH 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...
bpn1/ingestion
src/main/scala/de/hpi/ingestion/dataimport/kompass/models/KompassEntity.scala
Scala
apache-2.0
1,676
package org.jetbrains.sbt package settings import java.util import com.intellij.openapi.components._ import com.intellij.openapi.externalSystem.settings.{AbstractExternalSystemSettings, ExternalSystemSettingsListener} import com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil import com.intellij.openapi.mo...
ilinum/intellij-scala
src/org/jetbrains/sbt/settings/SbtSystemSettings.scala
Scala
apache-2.0
4,824
/* * Licensed to Intel Corporation under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * Intel Corporation licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use t...
dding3/BigDL
dl/src/main/scala/com/intel/analytics/bigdl/nn/Linear.scala
Scala
apache-2.0
7,475
package ml.util import scala.collection.mutable.ArrayBuffer object MatrixFormat { // get largest number of digits def maxWidth[@specialized T](d: ArrayBuffer[T]): Int = { val newd = d map(_.toString); val widths = newd map(_.length()); val maxw = widths.max; maxw; } // get largest ...
jccarrasco/maleta
src/ml/util/MatrixFormat.scala
Scala
gpl-2.0
511
package sri.mobile.examples.uiexplorer.components import sri.core.ElementFactory._ import sri.core.ReactComponent import sri.mobile.components.ios.SegmentedControlIOS import sri.mobile.examples.uiexplorer.{UIExample, UIExplorerBlock, UIExplorerPage} import sri.universal.components.{View, _} import sri.universal.styles...
chandu0101/sri
mobile-examples/src/main/scala/sri/mobile/examples/uiexplorer/components/KeyboardAvoidingViewExample.scala
Scala
apache-2.0
2,857
/** * 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...
tnachen/kafka
core/src/main/scala/kafka/server/KafkaServerStartable.scala
Scala
apache-2.0
7,734
package asia import UndesiredGuest._ import asia.UndesiredGuest.pb import org.scaia.asia.{Activity, Coalition, Group, Matching} import org.scaia.solver.asia.{Egalitarian, InclusiveSolver} import org.scalatest.FlatSpec class TestUndesiredGuest extends FlatSpec { val m1= new Matching(pb) m1.a= Map(i1 -> a, i2 -> a...
maximemorge/ScaIA
src/test/scala/asia/TestUndesiredGuest.scala
Scala
gpl-3.0
2,421
/** * 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...
ollie314/kafka
core/src/main/scala/kafka/admin/AdminUtils.scala
Scala
apache-2.0
32,636
package sri.universal.components import sri.core.{JSComponent, _} import scalajsplus.macros.{FunctionObjectMacro,exclude,rename} import scalajsplus.{ OptDefault => NoValue, OptionalParam => OP} import sri.universal.MergeJSObjects import sri.universal.apis.LayoutEvent import scala.scalajs.js import scala.scalajs.js.Dy...
scalajs-react-interface/universal
src/main/scala/sri/universal/components/View.scala
Scala
apache-2.0
6,629
/** * The MIT License (MIT) Copyright (c) 2014 University of Applied Sciences, Berlin, Germany * For more detailed information, please read the licence.txt in the root directory. **/ package org.onepercent import org.apache.spark.{SparkConf, SparkContext} /** * The Environment wich holds the SparkContext which i...
isn0gud/onepercent
src/main/scala/org/onepercent/Env.scala
Scala
mit
684
package com.wallace.demo.app.parsercombinators.parsers import com.wallace.demo.app.utils.MathUtils /** * Created by 10192057 on 2018/4/13 0013. */ class ComputeFieldsParser extends AbstractParser { private var inputSystem: String = "" private var outputSystem: String = "" private var operator: String = "" ...
BiyuHuang/CodePrototypesDemo
demo/ScalaDemo/src/main/scala/com/wallace/demo/app/parsercombinators/parsers/ComputeFieldsParser.scala
Scala
apache-2.0
1,288
package ch.wsl.box.client import ch.wsl.box.client.routes.Routes import ch.wsl.box.client.services.UI import ch.wsl.box.model.shared.{EntityKind, ExportDef, JSONQuery} import io.udash._ import scala.scalajs.js.URIUtils import scala.util.Try object Layouts{ val std = "std" val blank = "blank" } sealed abstract ...
Insubric/box
client/src/main/scala/ch/wsl/box/client/states.scala
Scala
apache-2.0
4,532
/** * 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/main/scala/io/gatling/core/action/GroupEnd.scala
Scala
apache-2.0
1,323
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.maven import javax.inject.{ Inject, Singleton } import org.codehaus.plexus.logging.Logger import play.dev.filewatch.LoggerProxy /** * Logger */ @Singleton class MavenLoggerProxy @Inject() (logger: Logger) exte...
rstento/lagom
dev/maven-plugin/src/main/scala/com/lightbend/lagom/maven/MavenLoggerProxy.scala
Scala
apache-2.0
1,086
package com.twitter.finagle.memcached.integration import com.twitter.conversions.time._ import com.twitter.finagle.{Name, Address} import com.twitter.finagle.builder.ClientBuilder import com.twitter.finagle.memcached.protocol.ClientError import com.twitter.finagle.Memcached import com.twitter.finagle.memcached.{Ketama...
sveinnfannar/finagle
finagle-memcached/src/test/scala/com/twitter/finagle/memcached/integration/MemcachedTest.scala
Scala
apache-2.0
11,027
package evaluation import org.apache.spark.rdd.RDD /** * Contains the contingency table for a binary classifier, * and provides common metrics such as precision & recall * * Similar to MLlib's [[org.apache.spark.mllib.evaluation.BinaryClassificationMetrics]], * but only for metrics that can be calculated from th...
o0neup/keystone
src/main/scala/evaluation/BinaryClassifierEvaluator.scala
Scala
apache-2.0
2,477
/* * 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 ...
ueshin/apache-flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/nodes/dataset/DataSetRel.scala
Scala
apache-2.0
1,482
/* * Copyright 2017 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...
liquidarmour/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/frs102/calculations/NetCurrentAssetsLiabilitiesCalculator.scala
Scala
apache-2.0
1,333
package monocle.std import monocle.{Iso, PIso} import scalaz.Tree.Node import scalaz.{Cofree, OneAnd, Tree} object cofree extends CofreeOptics trait CofreeOptics { /** Polymorphic isomorphism between `Cofree[Option, _]` and `OneAnd[Stream, _]` */ def pCofreeToStream[A, B]: PIso[Cofree[Option, A], Cofree[Option...
rperry/Monocle
core/shared/src/main/scala/monocle/std/Cofree.scala
Scala
mit
1,753
package ml.sparkling.graph.operators.algorithms.link import ml.sparkling.graph.api.operators.algorithms.link.MeasureBasedLnkPredictor import ml.sparkling.graph.api.operators.measures.EdgeMeasure import org.apache.spark.graphx.Graph import scala.reflect.ClassTag /** * Created by Roman Bartusiak (roman.bartusiak@pwr....
sparkling-graph/sparkling-graph
operators/src/main/scala/ml/sparkling/graph/operators/algorithms/link/BasicLinkPredictor.scala
Scala
bsd-2-clause
1,711
package sampler.abc import org.scalatest.FreeSpec import sampler.distribution.Distribution class PriorTest extends FreeSpec { "Exception if samples drawn outside density support" in { val harness = new Prior[Int] { private val it = (1 to 3).iterator def density(i: Int): Double = { if(i == 3) 0.0 ...
tearne/Sampler
sampler-abc/src/test/scala/sampler/abc/PriorTest.scala
Scala
apache-2.0
669
/* * Copyright (c) 2012-2017 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://www.apach...
acgray/snowplow
4-storage/rdb-loader/src/main/scala/com/snowplowanalytics/snowplow/rdbloader/Main.scala
Scala
apache-2.0
2,210
package com.cj.serialization import com.twitter.scrooge.{ThriftStruct, ThriftStructCodec} import org.apache.thrift.protocol.TBinaryProtocol import org.apache.thrift.transport.TMemoryBuffer package object thrift { /** * This instance of [[Serialize]]`[ThriftStruct]` is sufficient * for serializing any child...
cjdev/serialization
src/main/scala/com/cj/serialization/thrift/package.scala
Scala
mit
2,383
package models import anorm._ import anorm.RowParser import anorm.SqlParser._ import play.api.Play.current import play.api.db.DB import play.api.Logger case class TeamM( id: Pk[Int], name: String, deleted: Boolean ) object TeamM { val dummyTeam = TeamM(anorm.NotAssigned, "Purple", false) val teamParse...
larryoatmeal/Incident-Response-Manager
app/models/TeamM.scala
Scala
apache-2.0
3,339
package looty import looty.views.ScriptView import looty.views.SettingsView import looty.views.UnderlayView import scala.scalajs.js import scala.concurrent.Future import org.scalajs.jquery.JQueryStatic import looty.poeapi.PoeTypes.Leagues import looty.poeapi.{PoeCacher, PoeCacherChrome, PoeCacherDemo, PoeCacherExile...
benjaminjackman/looty
looty/src/main/scala/looty/LootyMain.scala
Scala
gpl-2.0
5,087
package auth import play.api.mvc._ import play.api.mvc.Results._ import scala.reflect._ import jp.t2v.lab.play2.auth.{CookieIdContainer, IdContainer, AuthConfig} import play.api.mvc.AcceptExtractors import model.{Users, Administrator, Permission} import scala.concurrent.{Future, ExecutionContext} import play.api.db.sl...
dungvn3000/playstrap
core/app/auth/AuthConfigImpl.scala
Scala
apache-2.0
1,729
package arx.core.graphics.data /** * Created by IntelliJ IDEA. * User: nvt * Date: 5/25/12 * Time: 2:41 PM * Created by nonvirtualthunk */ import org.lwjgl.opengl.GL11._ import org.lwjgl.opengl.GL15._ import arx.core.vec._ import org.lwjgl.opengl.{GL30, GL20} import arx.core.graphics.shader.Shader import arx.co...
nonvirtualthunk/arx-core
src/main/scala/arx/core/graphics/data/AVBO.scala
Scala
bsd-2-clause
6,759
/* * Copyright (c) 2014-2018 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
Wogan/monix
monix-eval/jvm/src/test/scala/monix/eval/TypeClassLawsForTaskRunSyncUnsafeSuite.scala
Scala
apache-2.0
3,777
/** * 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...
cloudera/crunch
scrunch/src/main/scala/org/apache/scrunch/PipelineLike.scala
Scala
apache-2.0
3,118
package org.jetbrains.plugins.scala package lang package psi package impl package search import com.intellij.openapi.progress.ProgressManager import com.intellij.openapi.util.Comparing import com.intellij.openapi.util.text.StringUtil import com.intellij.psi.PsiClass import com.intellij.psi.search.searches.DirectClass...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/search/ScalaDirectClassInheritorsSearcher.scala
Scala
apache-2.0
4,301
package com.twitter.finagle import com.twitter.app.Flaggable import com.twitter.io.Buf import com.twitter.finagle.util.Showable import java.nio.charset.Charset import java.util.BitSet /** * A Path comprises a sequence of byte buffers naming a * hierarchically-addressed object. * * @see The [[https://twitter.githu...
luciferous/finagle
finagle-core/src/main/scala/com/twitter/finagle/Path.scala
Scala
apache-2.0
4,178
package com.sksamuel.elastic4s.searches.aggs.pipeline import org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy import org.elasticsearch.search.aggregations.pipeline.PipelineAggregatorBuilders import org.elasticsearch.search.aggregations.pipeline.bucketmetrics.min.MinBucketPipelineAggregationBuilde...
ulric260/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/searches/aggs/pipeline/MinBucketDefinition.scala
Scala
apache-2.0
1,279
package pl.brosbit import org.specs2.mutable.Specification import spray.testkit.Specs2RouteTest import spray.http._ import StatusCodes._ class MyServiceSpec extends Specification with Specs2RouteTest with MyService { def actorRefFactory = system "MyService" should { "leave GET requests to other paths unh...
mikolajs/webansible
src/test/scala/pl/brosbit/MyServiceSpec.scala
Scala
apache-2.0
678
package org.powlab.jeye.core import java.io.{ ByteArrayInputStream, DataInputStream } import java.nio.ByteBuffer /** * Ошибки приложения jEye * Цель: максимально детализировать причину и следствие, указать область возникновения ошибки */ object Exception { val PROCESSOR_AREA = "Процессоры инструкций" val TREE_...
powlab/jeye
src/main/scala/org/powlab/jeye/core/Exception.scala
Scala
apache-2.0
1,761
/* * * Copyright 2008,2009 Newcastle University * * This file is part of Workcraft. * * Workcraft 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...
tuura/workcraft-2.2
STGPlugin21/src/main/scala/org/workcraft/plugins/interop/DotGImporter.scala
Scala
gpl-3.0
1,846
/* * Copyright (c) 2012-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://www.apach...
TimothyKlim/snowplow
3-enrich/scala-common-enrich/src/test/scala/com.snowplowanalytics.snowplow.enrich.common/enrichments/web/ParseCrossDomainSpec.scala
Scala
apache-2.0
2,338
package endpoints package documented package openapi import endpoints.documented.openapi.model.MediaType /** * Interpreter for [[algebra.Requests]]. */ trait Requests extends algebra.Requests with Urls with Methods { type RequestHeaders[A] = DocumentedHeaders /** * @param value List of request...
Krever/endpoints
openapi/openapi/src/main/scala/endpoints/documented/openapi/Requests.scala
Scala
mit
1,404
/* * 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 ...
jovigb/SparkOnHBase
src/main/scala/com/cloudera/spark/hbase/example/HBaseDistributeScanExample.scala
Scala
apache-2.0
2,753
// test file without imports to avoid regressions with missing imports in macros sealed trait Modifier case object early extends Modifier case object mid extends Modifier case object late extends Modifier case class Foo(i: Int) object a{ import ai.x.play.json.SingletonEncoder.simpleName import ai.x.play.json.implic...
cvogt/play-json-extensions
src/test/scala/NoImport.scala
Scala
bsd-2-clause
633
package fpinscala.state /** * Created by zearo on 2015/11/21. */ trait RNG { def nextInt:(Int,RNG) } object RNG{ //TODO: What's the difference between 'def simple' and 'case class Simple' def simple(seed: Long): RNG = new RNG{ def nextInt = { val seed2 = (seed*0x5deece66dL+0xbL) & ((1L << 48)-1) ...
zearom32/FpInScala
src/main/scala/fpinscala/state/State.scala
Scala
mit
6,130
package util package config import models.shared.AddressPool case class SimpleAddressConfig( override val source: TypesafeConfiguration, orName: Option[String] = None, orStrict: Option[Boolean] = None ) extends ConfigAccessor with ConfigSource { import AddressPool.poolName // Default pool to use, if confi...
Shopify/collins
app/util/config/SimpleAddressConfig.scala
Scala
apache-2.0
807
package dotty.tools package repl import vulpix.TestConfiguration import java.lang.System.{lineSeparator => EOL} import java.io.{ByteArrayOutputStream, File => JFile, PrintStream} import scala.io.Source import scala.collection.mutable.ArrayBuffer import dotty.tools.dotc.reporting.MessageRendering import org.junit.{A...
som-snytt/dotty
compiler/test/dotty/tools/repl/ReplTest.scala
Scala
apache-2.0
3,469
import java.io.File import java.net.URL import java.util.Calendar import sbt._ class Restie(info: ProjectInfo) extends DefaultProject(info) { override def compileOptions = super.compileOptions ++ Seq("-deprecation", "-Xmigration", "-Xcheckinit", "-Xwarninit", "-encoding", "utf8") ...
loverdos/restie
project/build/Restie.scala
Scala
apache-2.0
2,995
/* * 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 ...
clarkyzl/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/utils/testTableSourceSinks.scala
Scala
apache-2.0
47,800
package codechicken.multipart.handler import codechicken.lib.packet.PacketCustom.{IHandshakeHandler, IClientPacketHandler, IServerPacketHandler} import codechicken.lib.packet.PacketCustom import net.minecraft.client.Minecraft import codechicken.multipart.MultiPartRegistry import net.minecraft.entity.player.EntityPlaye...
kenzierocks/ForgeMultipart
src/codechicken/multipart/handler/packethandlers.scala
Scala
lgpl-2.1
7,366
package frdomain.ch3 package lens case class Address(no: String, street: String, city: String, state: String, zip: String) case class Customer(id: Int, name: String, address: Address) trait AddressLenses { protected val noLens = Lens[Address, String]( get = _.no, set = (o, v) => o.copy(no = v) ) protec...
debasishg/frdomain
src/main/scala/frdomain/ch3/lens/Domain.scala
Scala
apache-2.0
1,338
package dsmoq.controllers.json /** * POST /api/groupsのリクエストに使用するJSON型のケースクラス * * @param name グループ名 * @param description 説明 */ case class CreateGroupParams( name: Option[String] = None, description: Option[String] = None ) /** * GET /api/groupsのリクエストに使用するJSON型のケースクラス * * @param query 検索文字列 * @param user 検...
nkawa/dsmoq
server/apiServer/src/main/scala/dsmoq/controllers/json/GroupApiParams.scala
Scala
apache-2.0
1,698
/** * Author : ez * Date : 2016/11/7 * Description : Wrap HBase scanner. */ package dt.ez.util.hbase import org.apache.hadoop.hbase.client.Scan import org.apache.hadoop.hbase.filter.{Filter, FilterList, PageFilter, RowFilter} import org.apache.hadoop.hbase.filter.{CompareFilter, BinaryPrefixComparator, BinaryCom...
mapleez/eztip
scala/src/dt/ez/util/hbase/ScanUtils.scala
Scala
gpl-3.0
2,666
/* * GAAP concepts related database objects. * * Copyright (C) 2014-2015 Jorge Perez Burgos <jorge.perez*at*coditia.com>. * * This work is licensed under the terms of the Affero GNU GPL, version 3. * See the LICENSE file in the top-level directory. * */ package com.coditia.coditia.model import org.squeryl.anno...
vaijira/coditia
src/main/scala/com/coditia/coditia/model/BalanceSheetConcept.scala
Scala
agpl-3.0
2,901
/* * Copyright 2016 Coral realtime streaming analytics (http://coral-streaming.github.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...
coral-streaming/coral
src/main/scala/io/coral/actors/CoralActorFactory.scala
Scala
apache-2.0
1,777
import play.api.Application; import play.api.db.DB; import play.api.mvc.WithFilters; import play.api.Play.current; import play.api.Logger; import jp.co.flect.play2.filters.SessionIdFilter; import jp.co.flect.play2.filters.AccessControlFilter; import jp.co.flect.util.ResourceGen; import jp.co.flect.rdb.RunScript...
shunjikonishi/sqltool
app/Global.scala
Scala
mit
1,905
import java.io.File object FileUtils { def removeAll(path: String) = listRecursively(new File(path)) foreach { f ⇒ if (!f.delete) throw new RuntimeException("Failed to delete " + f.getAbsolutePath) } def listRecursively(f: File): Seq[File] = if (f.exists) f.listFiles.filter(_.isDirectory)....
dantodor/gremlin-scala-examples
neo4j/src/test/scala/Utils.scala
Scala
apache-2.0
377
/******************************************************************************* * This file is part of tiscaf. * * tiscaf 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 Li...
gnieh/tiscaf
core/src/main/scala/tiscaf/HResponse.scala
Scala
lgpl-3.0
3,385
package com.dbrsn.datatrain import java.io.File import com.dbrsn.datatrain.model.Content import com.dbrsn.datatrain.model.ImageSize import com.dbrsn.datatrain.model.Resource import scala.concurrent.Future final case class Covers(resource: Resource, origin: Content, covers: Seq[Content]) trait ConvertService { de...
dborisenko/data-train
src/main/scala/com/dbrsn/datatrain/ConvertService.scala
Scala
apache-2.0
413
/* * 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/amls-frontend
app/controllers/hvd/SummaryController.scala
Scala
apache-2.0
2,267
/*** * Copyright 2014 Rackspace US, 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 applica...
wdschei/api-checker
core/src/test/scala/com/rackspace/com/papi/components/checker/ValidatorWADLHeaderSuite.scala
Scala
apache-2.0
210,098
package io.circe.generic import io.circe._ import shapeless._ object enums { def time[A](a: => A) = { val now = System.nanoTime() val result = a val nano = System.nanoTime() - now val micros = nano / 1000 val seconds = micros.toFloat / 1000 / 1000 println("%d nanoseconds".format(nano),"%d m...
teodimoff/rOut
circe/src/io/circe/generic/enums/enums.scala
Scala
apache-2.0
1,348
package controllers import ornicar.scalalib.Zero import play.api.data.Form import play.api.http._ import play.api.libs.iteratee.{ Iteratee, Enumerator } import play.api.libs.json.{ Json, JsValue, JsObject, JsArray, Writes } import play.api.mvc._, Results._ import play.twirl.api.Html import scalaz.Monoid import lila.a...
clarkerubber/lila
app/controllers/LilaController.scala
Scala
agpl-3.0
14,099
package org.genericConfig.admin.client.models import org.genericConfig.admin.client.controllers.websocket.WebSocketListner import org.genericConfig.admin.client.views.configGraph.NodeEditStepPage import org.genericConfig.admin.shared.Actions import org.genericConfig.admin.shared.configGraph.ConfigGraphStepDTO import o...
gennadij/admin
client/src/main/scala/org/genericConfig/admin/client/models/Step.scala
Scala
apache-2.0
2,001
package org.skycastle.core.proceduraldesign import org.skycastle.util.parameters.Parameters import org.skycastle.util.parameters.expressions.Expr import com.jme3.math.Vector3f import org.skycastle.core.space.Position import org.skycastle.core.entity.{NoEntity, Entity} /** * Represents a design for some in-game const...
zzorn/skycastle
src/main/scala/org/skycastle/core/proceduraldesign/ProceduralDesign.scala
Scala
gpl-2.0
1,675
object TestMain { def main(args: Array[String]): Unit = { testExtensionProperty() } case class Foo(var foo: String) object fooExt { // define `Foo`-extension property with getter and setter delegating to `Foo.foo` extension (thisFoo: Foo) def fooExt: String = thisFoo.foo extension (thisFoo: Fo...
lampepfl/dotty
tests/pos/i5588a.scala
Scala
apache-2.0
625
import org.apache.spark.sql._, functions._ import org.apache.spark.rdd.RDD import org.tresamigos.smv._ import org.tresamigos.smvperftest._, core._ , etl._, perftest._ val app = new SmvApp(Seq("-d", "-m", "None"), Option(sc)) val sqlContext = app.sqlContext; import sqlContext.implicits._ // create the init object "i" ...
TresAmigosSD/SMV-PerfTest
shell/shell_init.scala
Scala
apache-2.0
1,747
/* * Copyright 2016 Dennis Vriend * * 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 t...
wwwiiilll/akka-persistence-jdbc
src/test/scala/akka/persistence/jdbc/query/EventsByPersistenceIdTest.scala
Scala
apache-2.0
5,505