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 jp.as.lift import jp.{ PathElement, Root, NamedProperty, AnyProperty, ArrayAccess, ArraySlice, All, Segment, Transform } import net.liftweb.json.JsonAST._ import net.liftweb.json.JsonParser object Json extends Transform[String, JValue] { def apply(in: String, path: List[PathElement]): JValue = fi...
softprops/jp
liftjson/src/main/scala/transform.scala
Scala
mit
1,957
package se.stagehand.effects.compound import se.stagehand.lib.scripting._ import scala.xml.Elem import scala.swing._ import scala.xml.Node import se.stagehand.lib.scripting.network.NetworkedTarget /** * Effect that collects several targeted effects and gathers their arguments, so they are triggered as one. */ class...
evilcandybag/Stagehand-compound-effect
src/main/scala/se/stagehand/effects/compound/CompoundEffect.scala
Scala
gpl-2.0
2,655
package io.shaka.http import io.shaka.http.HttpHeader.CONTENT_TYPE object ContentType { case object WILDCARD extends ContentType {val value = "*/*"} case object APPLICATION_XML extends ContentType {val value = "application/xml"} case object APPLICATION_ATOM_XML extends ContentType {val value = "application/atom...
stacycurl/naive-http
src/main/scala/io/shaka/http/ContentType.scala
Scala
apache-2.0
3,147
package com.nabijaczleweli.minecrasmer.computing import com.nabijaczleweli.minecrasmer.reference.Container import com.nabijaczleweli.minecrasmer.util.NBTUtil.NBTReloadable import net.minecraft.nbt.{NBTTagCompound, NBTTagList, NBTTagString} import net.minecraftforge.common.util.Constants.NBT import scala.collection.mu...
nabijaczleweli/ASMifier
src/main/scala/com/nabijaczleweli/minecrasmer/computing/Computer.scala
Scala
mit
2,438
package com.twitter.finagle.http import com.twitter.finagle import com.twitter.finagle._ import com.twitter.finagle.client.StackClient import com.twitter.finagle.util.AsyncLatch import com.twitter.io.Reader import com.twitter.util.{Future, Promise, Return, Throw, Time} import java.util.concurrent.atomic.AtomicBoolean ...
mkhq/finagle
finagle-base-http/src/main/scala/com/twitter/finagle/http/DelayedReleaseService.scala
Scala
apache-2.0
2,561
/* * Some of the traits, objects and classes are based on the source code from Functional Programming in Scala. * The original source code from Functional Programming in Scala can be found at https://github.com/fpinscala/fpinscala. * These code sections are copyrighted by Manning Publications, Co: * * * Copyright...
enil/fpis-exercises
src/main/scala/io/github/enil/chapter04/ch04.scala
Scala
mit
12,296
/******************************************************************************* * Copyright (c) 2014 Łukasz Szpakowski. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MP...
luckboy/Purfuncor
src/main/scala/pl/luckboy/purfuncor/frontend/typer/KindInferrenceEnvironmentState.scala
Scala
mpl-2.0
936
package org.allenai.common import Compat.JavaConverters._ import com.typesafe.config.{ Config => TypesafeConfig, _ } import spray.json._ import java.net.URI import scala.concurrent.duration._ /** Import to provide enhancements via implicit class conversion for making working * with [[com.typesafe.config.Config]] m...
allenai/common
core/src/main/scala/org/allenai/common/Config.scala
Scala
apache-2.0
6,521
package com.blogspot.ramannanda.scala.algorithms.cp3.medium /** * Solution to uva 00573 */ object SnailClimb { def dayOfSuccessOrFailure(h: Double, u: Double, d: Double, f: Double): Unit = { var currentDay = 0 var currentHeight = 0.0 var climbHeight = u val fatigue = u * f while (true) { ...
ramannanda9/algorithms-in-scala
src/main/scala/com/blogspot/ramannanda/scala/algorithms/cp3/medium/SnailClimb.scala
Scala
gpl-3.0
1,277
package exerciseOne import java.io.File import akka.actor.ActorSystem object DisplayMp4 { /** * run: * ./activator 'runMain exerciseOne.DisplayMp4' * */ def main(args: Array[String]): Unit = { // ActorSystem represents the "engine" we run in, including threading configuration and concurrency...
ktoso/streams-workshop
src/exercises/exerciseOne/DisplayMp4.scala
Scala
cc0-1.0
832
package score.test import scala.Array.canBuildFrom import org.junit.Assert.assertArrayEquals import org.junit.Assert.assertEquals import org.junit.Test import score.math import score.math._ class math { @Test def phi() { assertEquals(1.0, PHI - 1.0 / PHI, ERR_DOUBLE) } @Test def fib() { val ar...
idonnie/SCore
src/score/test/math.scala
Scala
mit
617
package scala.meta.tests package parsers import scala.meta._, Pat._ import scala.meta.dialects.Scala211 class PatSuite extends ParseSuite { test("_") { val Wildcard() = pat("_") } test("a @ _") { val Bind(Var(Term.Name("a")), Wildcard()) = pat("a @ _") } test("a") { val Var(Term.Name("a")) = p...
MasseGuillaume/scalameta
tests/shared/src/test/scala/scala/meta/tests/parsers/PatSuite.scala
Scala
bsd-3-clause
3,249
package networkedassets.hackathon.progfunc object Main { def main(args: Array[String]): Unit = println(formatAbs(-42)) private def formatAbs(x: Int) = { val msg = "The absolute value of %d is %d" msg.format(x, abs(x)) } def abs(n: Int): Int = if (n < 0) -n else n // A definition of fa...
NetworkedAssets/hackathon-progfunc
src/main/scala/networkedassets/hackathon/progfunc/Main.scala
Scala
mit
629
package recommender import org.apache.log4j.{Level, Logger} import org.apache.spark.{SparkConf, SparkContext} object startSpark{ val sc = initSpark() def initSpark(): SparkContext ={ Logger.getLogger("org.apache.spark").setLevel(Level.WARN) Logger.getLogger("org.eclipse.jetty.server").setLevel(Level.O...
litaoran/spray-sample
src/main/scala/recommender/startSpark.scala
Scala
mit
465
package io.react2.scalata.exporter import java.util.Date import io.react2.scalata.exporters.ConsoleExporter import io.react2.scalata.translation._ import org.scalatest._ /** * @author dbalduini */ class ConsoleExporterSpec extends FlatSpec { "ConsoleExporter" should "print to console" in { val myObject = Ob...
React2/scalata
src/test/scala/io/react2/scalata/exporter/ConsoleExporterSpec.scala
Scala
apache-2.0
592
/* * 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 ...
hvanhovell/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/OptimizeSkewedJoin.scala
Scala
apache-2.0
10,776
import com.jsuereth.sbtpgp.PgpKeys._ import com.jsuereth.sbtpgp.SbtPgp import sbt.Keys._ import sbt._ import sbtrelease.ReleasePlugin import sbtrelease.ReleasePlugin.autoImport._ import xerial.sbt.Sonatype import xerial.sbt.Sonatype.GitHubHosting import xerial.sbt.Sonatype.SonatypeKeys._ object Publish extends AutoPlu...
kxbmap/configs
project/Publish.scala
Scala
apache-2.0
1,289
package tests.rescala.api import org.scalatest.FunSuite import rescala.api.Api class ApiTests extends FunSuite { val api: Api = Api.synchronApi import api._ test("basic api use") { val evt = Evt[Int]() val mapped = mapE(evt)(_ * 2) val folded = fold(mapped)(0)((acc, v) => acc + v) assert(now(...
volkc/REScala
Research/Meta/src/test/scala/tests/rescala/api/ApiTests.scala
Scala
apache-2.0
447
/* * 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/http-verbs
http-verbs-common/src/main/scala/uk/gov/hmrc/http/HttpExceptions.scala
Scala
apache-2.0
8,365
package crochet import scala.collection.mutable.{Map=>MMap} import java.util.Date import javax.servlet.http.{HttpServletRequest, HttpServletResponse} import java.io.{PrintWriter, StringWriter} /** * The list of possible configurable response codes and their payload * * @author Xavier Llora * @date Jan 10, 2010 at...
xllora/Crochet
src/main/scala/CrochetResponseCodes.scala
Scala
bsd-3-clause
9,136
/* * 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 ...
saturday-shi/spark
examples/src/main/scala/org/apache/spark/examples/mllib/BinaryClassificationMetricsExample.scala
Scala
apache-2.0
3,385
package org.scalatra package servlet import java.io.InputStream import java.net.URI import java.util.Locale import javax.servlet.http.HttpServletRequest import org.scalatra.util.RicherString._ import org.scalatra.util.{ MultiMap, MultiMapHeadView } import scala.collection.JavaConverters._ import scala.collection.imm...
seratch/scalatra
core/src/main/scala/org/scalatra/servlet/RichRequest.scala
Scala
bsd-2-clause
8,647
/* * 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 ...
andrewor14/iolap
sql/hive/src/test/scala/org/apache/spark/sql/hive/StatisticsSuite.scala
Scala
apache-2.0
8,882
package net.liftmodules.fobobs.lib import net.liftweb.http.js._ import net.liftweb.http.js.JsCmds._ import net.liftweb.http.js.JE.JsRaw import net.liftweb.http.js.JsCmd /** * ==Bootstrap Script Helper Bootstrap v3.x== * Bootstrap script helper is a helper class that implements some commonly * used bootstrap com...
karma4u101/FoBo
Bootstrap/Bootstrap3/TwBs-Bootstrap3-API/src/main/scala/net/liftmodules/fobobs/lib/BootstrapSH.scala
Scala
apache-2.0
13,820
import scala.reflect.ClassTag case class SegmentTree[T: ClassTag](input: Array[T], aggregator: (T, T) => T) { val maxArraySize = Math.pow(2.0, Math.ceil(Math.log(input.length) / Math.log(2.0))).toInt * 2 - 1 val treeArray = populateTree((0, input.length - 1), Array.ofDim[T](maxArraySize), 0) def leftChil...
OpenGenus/cosmos
code/data_structures/src/tree/space_partitioning_tree/segment_tree/segment_tree.scala
Scala
gpl-3.0
3,598
/* * 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
core/src/main/scala/org/apache/spark/executor/ExecutorExitCode.scala
Scala
apache-2.0
2,535
/* * 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 ...
akopich/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/SymmetricHashJoinStateManagerSuite.scala
Scala
apache-2.0
6,704
package scala.pickling // provides a source compatibility stub // in Scala 2.10.x, it will make `import compat._` compile just fine, // even though `c.universe` doesn't have `compat` // in Scala 2.11.0, it will be ignored, becase `import c.universe._` // brings its own `compat` in scope and that one takes precedence p...
phaller/pickling
core/src/main/scala/scala/pickling/HasCompat.scala
Scala
bsd-3-clause
365
/* * * 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 * distri...
flaminem/flamy
src/main/scala/com/flaminem/flamy/utils/Mergeable.scala
Scala
apache-2.0
808
package scG import scala.collection.mutable.HashMap import scala.util.Random class GeneticAlg(t: Table, st_pop: Int, mut: Float) { private var startPop: Int = _ private var curPop: Int = 0 var best: Person = _ private var worst: Person = _ private var totalW: Float = _ private var table: Table = _ var c...
YuKill/UEMImplementation
setCoverProblem/GeneticAlg.scala
Scala
unlicense
5,409
/* * 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 ...
oscarceballos/flink-1.3.2
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/stream/table/UnionITCase.scala
Scala
apache-2.0
4,821
/* * 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/frs102/boxes/AC61.scala
Scala
apache-2.0
1,329
package models.daos.hashmap import javax.inject.Inject import scala.concurrent.Future import models.{ Department, Campus, Affiliation } import models.daos.DepartmentDAO /** * Give access to the [[Department]] object. */ class DepartmentDAOImpl @Inject() extends DepartmentDAO { def findById(id: Stri...
yoo-haemin/hufs-planner
project/app/models/daos/hashmap/DepartmentDAOImpl.scala
Scala
agpl-3.0
1,335
package spinoco.protocol.mail.header import scodec.Codec import spinoco.protocol.mime.ContentType case class `Content-Type`(tpe: ContentType) extends ContentHeaderField with DefaultEmailHeaderField object `Content-Type` extends DefaultContentHeaderFieldDescription[`Content-Type`] { def codec: Codec[`Content-Type`]...
Spinoco/protocol
mail/src/main/scala/spinoco/protocol/mail/header/`Content-Type`.scala
Scala
mit
380
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
yiheng/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/SoftMarginCriterion.scala
Scala
apache-2.0
4,083
package org.openurp.teach.action.code import org.beangle.data.jpa.dao.OqlBuilder import org.beangle.data.model.annotation.code import org.beangle.webmvc.entity.action.RestfulAction import org.openurp.teach.code.ExamType class ExamTypeAction extends RestfulAction[ExamType]
openurp/edu-core
grade/webapp/src/main/scala/org/openurp/teach/action/code/exam.scala
Scala
gpl-3.0
281
package io.scalaland.chimney sealed trait ErrorPathNode { def show: String def separator: String } object ErrorPathNode { final case class Accessor(name: String) extends ErrorPathNode { def show: String = name def separator: String = "." } final case class Index(value: Int) extends ErrorPathNode ...
scalalandio/chimney
chimney/src/main/scala/io/scalaland/chimney/ErrorPathNode.scala
Scala
apache-2.0
668
/* * This file is part of Evo2DSim. * * Evo2DSim 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. * * Evo2DSim is distrib...
vchuravy/Evo2DSim
core/src/main/scala/org/vastness/evo2dsim/core/gui/CameraView.scala
Scala
mit
1,624
package io.itdraft.levenshteinautomaton.description.parametric.coding /* * 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 re...
itdraft/levenshtein-automaton
src/main/scala-2.11/io/itdraft/levenshteinautomaton/description/parametric/coding/ParametricDescriptionEncoder.scala
Scala
apache-2.0
14,178
/* NSC -- new Scala compiler * Copyright 2005-2013 LAMP/EPFL * @author Martin Odersky */ package scala.tools.nsc package javac import scala.tools.nsc.util.JavaCharArrayReader import scala.reflect.internal.util._ import scala.reflect.internal.Chars._ import JavaTokens._ import scala.annotation.{ switch, tailrec } ...
jvican/scala
src/compiler/scala/tools/nsc/javac/JavaScanners.scala
Scala
bsd-3-clause
25,564
/* * Copyright 2001-2011 Stephen Colebourne * * 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...
aparo/scalajs-joda
src/main/scala/org/joda/time/base/BaseDateTime.scala
Scala
apache-2.0
11,000
/** * FILE: UserActorTest.scala * PERCORSO /Codice/sgad/servertier/src/test/scala/sgad/servertier/presentation/usermanager * DATA CREAZIONE: 7 Marzo 2014 * AUTORE: ProTech * EMAIL: protech.unipd@gmail.com * * Questo file è proprietà del gruppo ProTech, viene rilasciato sotto licenza Apache v2. * * DIARIO DELLE...
protechunipd/SGAD
Codice/sgad/servertier/src/test/scala/sgad/servertier/presentation/usermanager/UserActorTest.scala
Scala
apache-2.0
2,888
package cats package object lift extends LiftsOps
milessabin/kittens
core/src/main/scala/cats/lift/package.scala
Scala
apache-2.0
51
package beam.utils import akka.actor.ActorRef import beam.agentsim.scheduler.BeamAgentScheduler.ScheduledTrigger import beam.agentsim.scheduler.Trigger import beam.sim.config.BeamConfig.Beam.Debug.StuckAgentDetection import beam.sim.config.BeamConfig.Beam.Debug.StuckAgentDetection.Thresholds$Elm import beam.utils.logg...
colinsheppard/beam
src/main/scala/beam/utils/StuckFinder.scala
Scala
gpl-3.0
8,393
/* * Copyright 2001-2014 Artima, 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 agre...
SRGOM/scalatest
scalatest-test/src/test/scala/org/scalatest/NoElementsOfContainMatcherEqualitySpec.scala
Scala
apache-2.0
17,126
package view_model import model.Article case class IndexSidebar( contribution: Long, populars: Seq[Article], contributors: Seq[Map[String, Any]] ) object IndexSidebar {}
atware/sharedocs
src/main/scala/view_model/IndexSidebar.scala
Scala
mit
178
/* * 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...
brharrington/atlas
atlas-jmh/src/main/scala/com/netflix/atlas/eval/stream/ByteStringDecode.scala
Scala
apache-2.0
2,979
package org.igye.jfxutils.properties import javafx.beans.Observable import javafx.beans.binding.ObjectBinding object Expr { def apply[T](dependencies: Observable*)(calcValue: => T): ObjectBinding[T] = { new ObjectBinding[T] { bind(dependencies: _*) override def computeValue(): T = ...
Igorocky/jfxutils
src/main/scala/org/igye/jfxutils/properties/Expr.scala
Scala
mit
380
package com.flurdy.conductor import akka.actor._ import akka.testkit._ import org.scalatest._ import org.scalatest.mock.MockitoSugar import Gantry._ import org.mockito.Mockito.{never,verify,when} import org.mockito.Matchers.{any,eq => eqTo} import com.flurdy.conductor.docker._ import scala.concurrent.Future import sca...
flurdy/philharmonic
conductor/src/test/scala/GantrySpec.scala
Scala
apache-2.0
4,838
package feh.tec.cvis.common.cv.describe import feh.tec.cvis.common.cv.describe.ArgModifier._ import feh.tec.cvis.common.cv.{BorderExtrapolationMethod, CornerDetection} import org.opencv.core.Mat /** Harris edge detector arguments descriptions * * @see [[CornerDetection.cornerHarris]] (in common/src/main/scala/feh/...
fehu/comp-vis
common/src/main/scala/feh/tec/cvis/common/cv/describe/Harris.scala
Scala
mit
1,301
/* * Copyright (c) 2010-2011 by Alexander Grünewald * * This file is part of gruenewa-wsclient. * * gruenewa-grid 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 * ...
gruenewa/gruenewa-misc
gruenewa-wsclient/src/main/scala/gruenewa/wsclient/Service.scala
Scala
gpl-3.0
5,201
/* * 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 ...
fanzhidongyzby/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/batch/sql/SingleRowJoinTest.scala
Scala
apache-2.0
5,472
/* * Copyright 2001-2011 Artima, 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 agre...
hubertp/scalatest
src/test/scala/org/scalatest/exceptions/GeneratorDrivenPropertyCheckFailedExceptionSuite.scala
Scala
apache-2.0
1,790
package justin.db.actors import akka.actor.{Actor, Props} import akka.routing.{DefaultResizer, RoundRobinPool} import justin.db.actors.protocol.{ReadData, WriteData} import justin.db.replica.read.ReplicaReadCoordinator import justin.db.replica.write.ReplicaWriteCoordinator import scala.concurrent.ExecutionContext cl...
speedcom/JustinDB
justin-core/src/main/scala/justin/db/actors/ReplicaCoordinatorActor.scala
Scala
apache-2.0
1,389
package io.finch.test.json import argonaut.{CodecJson, DecodeJson, EncodeJson, Parse} import argonaut.Argonaut.{casecodec3, casecodec5} import com.twitter.io.Buf.Utf8 import com.twitter.util.Return import io.finch.{Decode, Encode} import org.scalacheck.Arbitrary import org.scalacheck.Arbitrary.arbitrary import org.sca...
travisbrown/finch
json-test/src/main/scala/io/finch/test/json/JsonCodecProviderProperties.scala
Scala
apache-2.0
4,587
package avrohugger package format package scavro package trees import generators.ScalaDocGenerator import matchers.TypeMatcher import types._ import treehugger.forest._ import definitions._ import treehuggerDSL._ import org.apache.avro.Schema.Type.{ ENUM, RECORD } import org.apache.avro.{ Protocol, Schema } import ...
julianpeeters/avrohugger
avrohugger-core/src/main/scala/format/scavro/trees/ScavroTraitTree.scala
Scala
apache-2.0
2,177
package metamorphic.dsl.matcher.model import metamorphic.dsl.matcher.ApplicationMatcher import metamorphic.dsl.model._ import metamorphic.dsl.model.builder._ import scala.reflect.macros.blackbox.Context object ModelMatcher { def eval(c: Context)(stmt: c.Tree): Model = { val stmts = ApplicationMatcher.content...
frroliveira/metamorphic
metamorphic/src/main/scala/metamorphic/dsl/matcher/model/ModelMatcher.scala
Scala
mit
2,887
package org.jetbrains.plugins.scala package lang package psi package impl package statements package params import com.intellij.lang.ASTNode import com.intellij.psi.{PsiClass, PsiElement, PsiElementVisitor} import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.parser.Sca...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/statements/params/ScClassParameterImpl.scala
Scala
apache-2.0
2,357
package io.buoyant.linkerd.protocol.http import com.twitter.finagle.buoyant.Dst import com.twitter.finagle.http.{Method, Request, Response} import com.twitter.finagle.{Dtab, Path, Service} import com.twitter.io.Buf import com.twitter.util.Future import io.buoyant.router.RoutingFactory.{IdentifiedRequest, UnidentifiedR...
linkerd/linkerd
linkerd/protocol/http/src/test/scala/io/buoyant/linkerd/protocol/http/IngressIdentifierTest.scala
Scala
apache-2.0
4,710
package com.wallace.demo.app.factorypatterndemo /** * Created by Wallace on 2017/4/15. */ abstract class Operation[+T] { protected val numberA: T protected val numberB: T def calcResult: Option[T] }
BiyuHuang/CodePrototypesDemo
demo/ScalaDemo/src/main/scala/com/wallace/demo/app/factorypatterndemo/Operation.scala
Scala
apache-2.0
211
package com.datawizards.sparklocal import com.datawizards.dmg.annotations.{column, table} import com.datawizards.dmg.dialects import com.datawizards.sparklocal.dataset.io.ModelDialects object TestModel { case class Person(name: String, age: Int) case class PersonV2(name: String, age: Int, title: Option[String]) ...
piotr-kalanski/spark-local
src/test/scala/com/datawizards/sparklocal/TestModel.scala
Scala
apache-2.0
7,287
package lila.game import chess.Clock import lila.common.LightUser import play.twirl.api.Html object Namer { def players(game: Game, withRatings: Boolean = true)(implicit lightUser: LightUser.Getter): (Html, Html) = player(game.firstPlayer, withRatings) -> player(game.secondPlayer, withRatings) def player(p...
clarkerubber/lila
modules/game/src/main/Namer.scala
Scala
agpl-3.0
1,663
/* * @author Philip Stutz * * Copyright 2015 iHealth Technologies * * 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 * * U...
hicolour/triplerush
src/main/scala/com/signalcollect/triplerush/vertices/blocking/BlockingTripleAdditionsVertex.scala
Scala
apache-2.0
3,169
package de.tu_berlin.formic.common.datastructure import de.tu_berlin.formic.common.{ClientId, OperationId} import org.scalatest.{FlatSpec, Matchers} /** * @author Ronny Bräunlich */ class HistoryBufferSpec extends FlatSpec with Matchers { case class TestDataStructureOperation(id: OperationId, operationContext:...
rbraeunlich/formic
common/shared/src/test/scala/de/tu_berlin/formic/common/datastructure/HistoryBufferSpec.scala
Scala
apache-2.0
3,273
package nl.malienkolders.htm.lib import model._ object CountryImporter { def doImport { if (Country.count == 0) { // code generated from http://en.wikipedia.org/wiki/ISO_3166-1 // hasViewerFlag field manually set from flags in htm-viewer-jme val noCountry = Country.create.code2("")....
hema-tournament-manager/htm
htm-lib/src/main/scala/nl/malienkolders/htm/lib/CountryImporter.scala
Scala
apache-2.0
27,234
package org.aja.tej.examples.spark.rdd.misc import org.aja.tej.utils.TejUtils import org.apache.spark.SparkContext /** * Created by mageswaran on 14/8/15. */ /* Similar to collect, but works on key-value RDDs and converts them into Scala maps to preserve their key-value structure. [Pair] */ object CollectAsMapExam...
Mageswaran1989/aja
src/examples/scala/org/aja/tej/examples/spark/rdd/misc/CollectAsMapExample.scala
Scala
apache-2.0
653
package net.kwas.impatient.ch7 import org.scalatest._ class ExercisesSpec extends FlatSpec with Matchers { "Chapter 7 exercises" should "not explode" in { Exercises.main(Array.empty) } }
dkwasny/ScalaImpatient
src/test/scala/net/kwas/impatient/ch7/ExercisesSpec.scala
Scala
mit
197
package org.http4s package server package jetty class JettyServerSpec extends ServerAddressSpec { val builder = JettyBuilder }
m4dc4p/http4s
jetty/src/test/scala/org/http4s/server/jetty/JettyServerSpec.scala
Scala
apache-2.0
130
/* * 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 ...
yuyongyang800/SparkDistributedMatrix
src/main/scala/org/apache/spark/sql/matfast/execution/MatfastPlanner.scala
Scala
apache-2.0
16,188
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
aokolnychyi/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statsEstimation/AggregateEstimation.scala
Scala
apache-2.0
2,750
package keystoneml.nodes.learning import breeze.linalg._ import edu.berkeley.cs.amplab.mlmatrix.RowPartitionedMatrix import keystoneml.nodes.stats.StandardScaler import org.apache.spark.{rdd, SparkContext} import org.scalatest.FunSuite import keystoneml.pipelines.Logging import keystoneml.utils.{TestUtils, MatrixUtils...
amplab/keystone
src/test/scala/keystoneml/nodes/learning/LBFGSSuite.scala
Scala
apache-2.0
5,380
package is.hail.utils.richUtils import org.apache.spark._ import org.apache.spark.rdd.RDD import breeze.linalg.{DenseMatrix => BDM} import is.hail.linalg._ import is.hail.utils._ import org.apache.spark.mllib.linalg.distributed.IndexedRowMatrix object RichIndexedRowMatrix { private def seqOp(gp: GridPartitioner) ...
danking/hail
hail/src/main/scala/is/hail/utils/richUtils/RichIndexedRowMatrix.scala
Scala
mit
3,398
package services import com.google.inject.Inject import models.{SimpleValidatorStats, Validation, Verification} import org.apache.commons.math3.stat.interval.WilsonScoreInterval import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future /** Validates a verification. To give feedback to t...
BonarBeavis/veritask
app/services/Validator.scala
Scala
apache-2.0
3,315
package slick.test.lifted import org.junit.Test import org.junit.Assert._ /** Test case for the listing of constraints in table definitions */ class TableConstraintsTest { @Test def testConstraintsOrdering { import slick.driver.H2Driver.api._ class Foo(tag: Tag) extends Table[Long](tag, "foo_table") { ...
jkutner/slick
slick-testkit/src/test/scala/slick/test/lifted/TableConstraintsTest.scala
Scala
bsd-2-clause
1,804
package net.ruippeixotog.scalafbp.thinkbayes import scala.util.Try import spray.json._ import thinkbayes.Pmf import net.ruippeixotog.scalafbp.component.PortDataMarshaller import net.ruippeixotog.scalafbp.thinkbayes.PmfJsonProtocol._ sealed trait PVar[K] { def toPmf: Pmf[K] } case class PDistrib[K](pmf: Pmf[K]) e...
ruippeixotog/scalafbp
components/ppl/src/main/scala/net/ruippeixotog/scalafbp/thinkbayes/PVar.scala
Scala
mit
1,609
package kmercounter import java.io.{File, FileNotFoundException} import org.apache.spark.{SparkContext,SparkConf} object SparkKmerCounter { /** * Counts k-mers in the input file/directory using Apache Spark. * @param in Input file or directory that contains FASTA records * @param out Output file to sto...
jondeaton/kmer-counter
spark-counter/src/main/scala/kmercounter/SparkKmerCounter.scala
Scala
gpl-3.0
1,090
/* * Copyright (c) 2017 * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the foll...
lewismj/tiki
core/src/main/scala/tiki/AdjacencyList.scala
Scala
bsd-2-clause
3,095
/** * 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/mesos-kafka
src/scala/ly/stealth/mesos/kafka/HttpServer.scala
Scala
apache-2.0
14,185
/* * Copyright (C) 2016-2017 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.maven import scala.beans.BeanProperty class PortRangeBean { @BeanProperty var min: Int = 0xc000 // 49152, IANA minimum ephemeral port @BeanProperty var max: Int = 0xffff // 65535, IANA maximum ephemeral port }...
edouardKaiser/lagom
dev/maven-plugin/src/main/scala/com/lightbend/lagom/maven/PortRangeBean.scala
Scala
apache-2.0
321
package scala2ch package routing import akka.actor.{ActorRefFactory, ActorContext} import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.marshallers.xml.ScalaXmlSupport._ class IndexRoute(system: ActorRefFactory) extends BasicRoute { val resource = "" val route = (pathSingleSlash | path(version...
TanUkkii007/scala2ch
src/main/scala/scala2ch/routing/IndexRoute.scala
Scala
mit
564
/* Copyright 2015 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
twitter/scalding
scalding-core/src/main/scala/com/twitter/scalding/macros/impl/CaseClassFieldSetter.scala
Scala
apache-2.0
1,342
package org.jetbrains.plugins.scala package codeInspection.parameters import com.intellij.codeInspection.{LocalInspectionTool, ProblemHighlightType, ProblemsHolder} import com.intellij.psi.PsiElementVisitor import org.jetbrains.plugins.scala.codeInspection.InspectionBundle import org.jetbrains.plugins.scala.extensions...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/codeInspection/parameters/NameBooleanParametersInspectionBase.scala
Scala
apache-2.0
3,046
package reductions import scala.annotation._ import org.scalameter._ import common._ object ParallelParenthesesBalancingRunner { @volatile var seqResult = false @volatile var parResult = false val standardConfig = config( Key.exec.minWarmupRuns -> 40, Key.exec.maxWarmupRuns -> 80, Key.exec.benchR...
mungobungo/coursera
parallel_scala/reductions/src/main/scala/reductions/ParallelParenthesesBalancing.scala
Scala
mit
2,355
package io.buoyant.namerd.iface.destination import com.twitter.finagle.naming.NameInterpreter import com.twitter.finagle._ import com.twitter.io.Buf import com.twitter.logging.Logger import com.twitter.util._ import io.buoyant.grpc.runtime.VarEventStream.{Ev, Val} import io.buoyant.grpc.runtime.{GrpcStatus, Stream, Va...
linkerd/linkerd
namerd/iface/destination/src/main/scala/io/buoyant/namerd/iface/destination/DestinationService.scala
Scala
apache-2.0
7,307
package at.logic.gapt.expr.hol import at.logic.gapt.expr._ object HOLPosition { def apply( list: List[Int] ) = new HOLPosition( list ) def apply( is: Int* ) = new HOLPosition( is.toList ) def toList( pos: HOLPosition ) = pos.list /** * Returns a list of positions of subexpressions that satisfy some pred...
gebner/gapt
core/src/main/scala/at/logic/gapt/expr/hol/HOLPosition.scala
Scala
gpl-3.0
10,808
package io.ssc.trackthetrackers.analysis.networkanalysis import java.io.{BufferedWriter, FileWriter} import io.ssc.trackthetrackers.analysis.preprocessing.LabeledThirdParties import io.ssc.trackthetrackers.analysis.stats.LogLikelihood import it.uniroma1.dis.wsngroup.gexf4j.core.data.AttributeClass import it.uniroma1....
sscdotopen/trackthetrackers
analysis/src/main/scala/io/ssc/trackthetrackers/analysis/networkanalysis/CompanyCooccurrence.scala
Scala
gpl-3.0
5,246
/** * 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/log/Log.scala
Scala
apache-2.0
12,470
import scala.collection.mutable import scala.io.Source /** * 编写一段程序,从文件中读取单词。用一个可变映射来清点每个单词出现的频率。读取这些单词的操作可以使用java.util.Scanner * */ def countWord() : Unit = { val wordMap = new mutable.HashMap[String,Int] val in = new java.util.Scanner(new java.io.File("exercise02.txt")) while(in.hasNext){ val word = in...
vernonzheng/scala-for-the-Impatient
src/Chapter04/exercise02.scala
Scala
mit
797
package com.josephrkramer import org.scalatest.FunSpec import org.scalatest.matchers._ import akka.testkit.TestKit import akka.actor.ActorRef import akka.actor.ActorSystem import akka.actor.Props import akka.testkit.DefaultTimeout import akka.testkit.ImplicitSender import org.scalatest.BeforeAndAfterAll import org.sca...
josephrkramer/akka-backprop
src/test/scala/com/josephrkramer/NeuronSpec.scala
Scala
gpl-3.0
966
package org.scalameter package reporting import java.util.Date import scala.collection._ import scala.Numeric.Implicits._ import org.scalameter.utils.Tree import org.scalameter.utils.Statistics._ case class RegressionReporter[T: Numeric](test: RegressionReporter.Tester, historian: RegressionReporter.Historian) ...
kjanosz/scalameter
src/main/scala/org/scalameter/reporting/RegressionReporter.scala
Scala
bsd-3-clause
16,484
//package io.skysail.core.security // //import akka.http.scaladsl.server.Directives._ //import akka.http.scaladsl.server.{ Directive1, PathMatcher, RequestContext, Route } // //trait AuthenticationService { // def directive(): Directive1[String] //}
evandor/skysail-core
skysail.core/src/io/skysail/core/security/AuthenticationService.scala
Scala
apache-2.0
250
/* * 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 ...
sgururajshetty/carbondata
integration/spark-common-test/src/test/scala/org/apache/carbondata/sql/commands/UsingCarbondataSuite.scala
Scala
apache-2.0
7,801
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
jkbradley/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/sources/filters.scala
Scala
apache-2.0
6,726
package plugins.akka.persistence import akka.actor.{Actor, Props} import akka.persistence.CapabilityFlag import akka.persistence.journal.JournalSpec import akka.stream.ActorMaterializer import com.typesafe.config.ConfigFactory import com.websudos.phantom.connectors._ import helpers.BasicPlayApi import org.cassandrauni...
lizepeng/app.io
modules/services/test/plugins/akka/persistence/CassandraJournalSpec.scala
Scala
apache-2.0
2,452
package memnets.linalg import java.util import breeze.linalg import breeze.linalg.{Matrix, MatrixLike, View} import memnets.utils._ import scala.reflect.ClassTag object CooMatrix { def zeros[@specialized(Float, Double) T: ClassTag](rows: Int, cols: Int): CooMatrix[T] = new CooMatrix[T](rows, cols) } final class ...
MemoryNetworks/memnets
api/src/main/scala/memnets/linalg/CooMatrix.scala
Scala
apache-2.0
5,513
package gapt.formats.json import gapt.expr.formula.Atom import gapt.expr.formula.Formula import gapt.expr.{ Abs, Const, Expr, Var, preExpr } import gapt.formats.babel.BabelParser import gapt.logic.Polarity import io.circe.{ Decoder, Encoder, KeyDecoder, KeyEncoder } /** * Json codecs for various kinds of expressions...
gapt/gapt
core/src/main/scala/gapt/formats/json/ExprCodec.scala
Scala
gpl-3.0
2,837
/* * 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 ...
dbtsai/spark
core/src/main/scala/org/apache/spark/SparkContext.scala
Scala
apache-2.0
123,956
/** * Copyright 2011-2017 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
MykolaB/gatling
gatling-core/src/test/scala/io/gatling/core/check/extractor/jsonpath/Json4.scala
Scala
apache-2.0
1,342
package weatherApp.components import diode.react.ModelProxy import japgolly.scalajs.react._ import japgolly.scalajs.react.extra.router.{Resolution, RouterCtl} import japgolly.scalajs.react.vdom.html_<^._ import weatherApp.config.Config import weatherApp.diode.AppState import weatherApp.router.AppRouter.Page object He...
malaman/scala-weather-app
frontend/src/main/scala/weatherApp/components/Header.scala
Scala
mit
1,377
package models.actors.dataimport import javax.inject.Inject import akka.actor.{Actor, ActorRef} import akka.event.LoggingReceive import models.db.AgeGroupRepository import models.entity.AgeGroup import scala.concurrent.{ExecutionContext, Future} object AgeGroupPersistActor { trait Factory { def...
LeonardoZ/SAEB
app/models/actors/dataimport/AgeGroupPersistActor.scala
Scala
mit
1,218