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 org.apache.flink.contrib.tensorflow.common.io import org.apache.flink.api.common.io.RichInputFormat import org.apache.flink.contrib.tensorflow.common.functions.util.ModelUtils import org.apache.flink.contrib.tensorflow.models.Model import org.apache.flink.core.io.InputSplit /** * A stackable trait for input...
cookieai/flink-tensorflow
flink-tensorflow/src/main/scala/org/apache/flink/contrib/tensorflow/common/io/InputFormatModelOperations.scala
Scala
apache-2.0
736
package com.github.shivawu.sbt.maven import sbt._ class PomDependency( val groupId: String, val name: String, val version: String, val scope: Option[String] = None, val classifier: Seq[String] = Nil, val exclusions: Seq[(String, String)] = Nil ) { def id = groupId + ":" + name def toDependency = ...
shivawu/sbt-maven-plugin
src/main/scala/com/github/shivawu/sbt/maven/PomDependency.scala
Scala
apache-2.0
1,112
package api import Api._ import play.api.mvc._ import org.joda.time.DateTime import org.joda.time.format.DateTimeFormat import java.util.Locale import scala.util.Try import play.api.libs.json._ /* * Wrapped Request with additional information for the API (headers: Api Key, Date, Auth-Token, ...) */ trait ApiRequestHe...
davidgraig/foosball
server/app/api/ApiRequest.scala
Scala
mit
1,890
/* Copyright 2017 EconomicSL 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 distr...
EconomicSL/mechanisms
src/main/scala/org/economicsl/mechanisms/auctions/VickreyClarkeGrovesMechanism.scala
Scala
apache-2.0
2,199
package org.json4s package jackson import com.fasterxml.jackson.databind.{SerializerProvider, JsonSerializer} import com.fasterxml.jackson.core.JsonGenerator class JValueSerializer extends JsonSerializer[JValue]{ def serialize(value: JValue, json: JsonGenerator, provider: SerializerProvider) { value match { ...
nornagon/json4s
jackson/src/main/scala/org/json4s/jackson/JValueSerializer.scala
Scala
apache-2.0
1,083
package org.zouzias.spray.actors import akka.actor.{ActorRefFactory, ActorLogging} import org.zouzias.spray.httpservices.PetHttpService import spray.routing.HttpServiceActor class PetActor extends HttpServiceActor with ActorLogging{ lazy val service = new PetHttpService { override implicit def actorRefFactory:...
zouzias/spray-swagger-template
src/main/scala/org/zouzias/spray/actors/PetActor.scala
Scala
apache-2.0
395
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This file is part of Rudder. * * Rudder is free software: you can redistribute it and/or modify * it under the...
armeniaca/rudder
rudder-core/src/main/scala/com/normation/rudder/domain/nodes/NodeGroup.scala
Scala
gpl-3.0
2,653
package com.plasmaconduit.waterhouse import scala.annotation.tailrec sealed trait MerkleTree { val hash: HashDigest } private final case class MerkleBranch(hash: HashDigest, left: MerkleTree, right: MerkleTree) extends MerkleTree private ...
plasmaconduit/waterhouse
src/main/scala/com/plasmaconduit/waterhouse/MerkleTree.scala
Scala
mit
1,264
package dnd5_dm_db package model object Monster extends IndexType { val id = Constant.monsters } case class Monster ( name : Local, size : Size, typ : MonsterType, typeTags: Seq[TypeTag], alignment: Alignment, armorClass : Int, armorDesc : Option[Local], hitPoint : Die, speed : Seq[Speed], abiliti...
lorilan/dnd5_dm_db
src/main/scala/dnd5_dm_db/model/Monster.scala
Scala
gpl-3.0
1,247
package org.scalajs.core.compiler.test.util import scala.tools.nsc._ import reporters.{Reporter, ConsoleReporter} import scala.reflect.internal.util.{ SourceFile, BatchSourceFile } import org.scalajs.core.compiler.ScalaJSPlugin import scala.collection.mutable /** This is heavily inspired by scala's partest suite's ...
jmnarloch/scala-js
compiler/src/test/scala/org/scalajs/core/compiler/test/util/DirectTest.scala
Scala
bsd-3-clause
2,428
package com.krrrr38.mackerel4s.model import com.krrrr38.mackerel4s.model.Types.{ HostID, MonitorID, AlertID } object AlertStatus { def fromString(status: String): Option[AlertStatus] = status match { case "OK" => Some(AlertStatusOK) case "CRITICAL" => Some(AlertStatusCritical) case "WARNING" => Some(Ale...
krrrr38/mackerel-client-scala
src/main/scala/com/krrrr38/mackerel4s/model/Alert.scala
Scala
mit
1,110
package com.iz2use.express.datatype import scala.reflect.ClassTag class Value[T](val originalValue: Any = null, val definitive: Boolean = true) { private var currentValue: Any = originalValue def apply()(implicit getter: Getter[T]): T = getter(this) def :=(value: Any)(implicit setter: Setter[T]) = setter(this...
math85360/ifc-scala
shared/src/main/scala/com/iz2use/express/datatype/ExpressType.scala
Scala
apache-2.0
5,891
/* * 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 ...
hhbyyh/mCNN
src/main/CNNLayer.scala
Scala
apache-2.0
1,635
package io.buoyant.grpc.gen import com.google.protobuf.DescriptorProtos._ import com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Label._ import com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Type._ import com.google.protobuf.compiler.PluginProtos.{CodeGeneratorRequest, CodeGeneratorResponse} impor...
hhtpcd/linkerd
grpc/gen/src/main/scala/io/buoyant/grpc/gen/Generator.scala
Scala
apache-2.0
28,361
/* * 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 ...
prccaraujo/openwhisk
core/controller/src/main/scala/whisk/core/loadBalancer/InvokerSupervision.scala
Scala
apache-2.0
13,219
/* * This file is part of Kiama. * * Copyright (C) 2011-2015 Anthony M Sloane, Macquarie University. * * Kiama 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 ...
solomono/kiama
library/src/org/kiama/example/oberon0/L4/NameAnalyser.scala
Scala
gpl-3.0
1,653
/* * 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
sql/core/src/test/scala/org/apache/spark/sql/TPCDSQuerySuite.scala
Scala
apache-2.0
17,942
/* * 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/bijection
bijection-guava/src/main/scala/com/twitter/bijection/guava/GuavaBinaryBijections.scala
Scala
apache-2.0
3,000
package pregnaware.user.entities import java.time.{Instant, LocalDate} import pregnaware.naming.entities.WrappedBabyName case class WrappedUser( userId: Int, displayName: String, email: String, dueDate: Option[LocalDate], joinedDate: LocalDate, lastAccessedTime: Long, babyNames: Seq[WrappedBabyName], ...
jds106/pregnaware
service/src/main/scala/pregnaware/user/entities/WrappedUser.scala
Scala
mit
463
package com.twitter.example import com.twitter.finagle.{ListeningServer, Thrift} import com.twitter.mydemo.renamed.{User, UserService} import com.twitter.util.Future import java.util.concurrent.atomic.AtomicInteger object DemoClient { def buildClient(port: Int): UserService.MethodPerEndpoint = Thrift.client ...
twitter/scrooge
demos/scrooge-maven-demo/src/main/scala/com/twitter/example/Demo.scala
Scala
apache-2.0
952
/* * (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/platform/types/FilterOrientation.scala
Scala
apache-2.0
1,234
package nest.sparkle.datastream import scala.concurrent.{Future, ExecutionContext} import scala.concurrent.duration.{DurationInt, FiniteDuration} import scala.util.{Failure, Success} import rx.lang.scala.Observable import nest.sparkle.measure.Span import nest.sparkle.util.{Log, PeriodWithZone, RecoverNumeric} /** ...
mighdoll/sparkle
sparkle/src/main/scala/nest/sparkle/datastream/AsyncReduction.scala
Scala
apache-2.0
6,299
package io.opencensus.scala.akka.http import akka.http.scaladsl.model.headers.RawHeader import akka.http.scaladsl.model.{HttpRequest, HttpResponse, StatusCodes} import akka.stream.Materializer import io.opencensus.scala.http.testSuite.MockTracing import io.opencensus.trace.{BlankSpan, Span, SpanContext, Status} import...
census-ecosystem/opencensus-scala
akka-http/src/test/scala/io/opencensus/scala/akka/http/ClientSpec.scala
Scala
apache-2.0
4,902
/* * 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 ma...
harperjiang/enc-selector
src/main/scala/edu/uchicago/cs/encsel/ptnmining/eval/PatternEvaluator.scala
Scala
apache-2.0
2,561
package com.jarodl.scala_ci import scala.Math.pow import scala.Math.sqrt object CorrelationUtility { def get_shared_items(prefs: Map[String, Map[String, Double]], person1: String, person2: String): Iterable[String] = { val sharedItems = for { (item, value) <- prefs.get(person1).get if prefs.get...
jarodl/scala_ci
src/main/scala/com/jarodl/scala_ci/CorrelationUtility.scala
Scala
apache-2.0
2,099
/* * Copyright 2019 Spotify AB. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
regadas/scio
scio-sql/src/main/scala/com/spotify/scio/sql/SqlInterpolator.scala
Scala
apache-2.0
8,614
package macrame.internal import reflect.macros.Context sealed abstract class TreeShaper[C <: Context] private (val c : C) { self ⇒ import c.universe._ import TreeShaper.KleisliOps def run(tree : Tree) : List[Tree] = transformer(tree) val transformer : Tree ⇒ List[Tree] def members = new TreeShaper[c...
ChrisNeveu/macrame
macrame/src/main/scala/macrame/internal/TreeShaper.scala
Scala
bsd-3-clause
2,382
package mesosphere.marathon.tasks import com.codahale.metrics.MetricRegistry import mesosphere.marathon.MarathonSpec import mesosphere.marathon.Protos.Constraint import mesosphere.marathon.state.AppDefinition import mesosphere.marathon.state.PathId.StringPathId import mesosphere.marathon.tasks.TaskQueue.QueuedTask im...
tnachen/marathon
src/test/scala/mesosphere/marathon/tasks/TaskQueueTest.scala
Scala
apache-2.0
2,136
/* * Copyright (C) 2014 AyaIB Developers (http://github.com/fauu/AyaIB) * * This software is licensed under the GNU General Public License * (version 3 or later). See the COPYING file in this distribution. * * You should have received a copy of the GNU Library General Public License * along with this software. I...
fauu/AyaIB
app/services/FileService.scala
Scala
gpl-3.0
1,162
package org.jetbrains.plugins.scala.worksheet.settings.ui import com.intellij.icons.AllIcons import com.intellij.ide.actions.ShowSettingsUtilImpl import com.intellij.ide.ui.search.SearchUtil import com.intellij.openapi.actionSystem.impl.ActionButton import com.intellij.openapi.actionSystem.{ActionPlaces, ActionToolbar...
JetBrains/intellij-scala
scala/worksheet/src/org/jetbrains/plugins/scala/worksheet/settings/ui/ShowCompilerProfileSettingsButton.scala
Scala
apache-2.0
2,051
package edu.mit.csail.sdg.ormolu.form import edu.mit.csail.sdg.ormolu.form.ops._ import edu.mit.csail.sdg.hsqldb.syntax.value.BoolValueExpr import edu.mit.csail.sdg.hsqldb.syntax.value import edu.mit.csail.sdg.ormolu.rel.{Variable, Relation} import edu.mit.csail.sdg.ormolu.{Predicate, Expression} import edu.mit...
dlreeves/ormolu
src/edu/mit/csail/sdg/ormolu/form/Formula.scala
Scala
mit
2,202
/* * 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 ...
maropu/spark
mllib/src/test/scala/org/apache/spark/ml/tuning/RandomRangesSuite.scala
Scala
apache-2.0
5,447
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.core import scala.tools.nsc.interactive.Global import org.ensime.indexer._ import org.ensime.api.DeclaredAs import scala.reflect.NameTransformer import org.slf4j.Logger ...
VlachJosef/ensime-server
core/src/main/scala/org/ensime/core/FqnToSymbol.scala
Scala
gpl-3.0
4,354
package cmwell.analytics.main import cmwell.analytics.data.IndexWithSystemFields import cmwell.analytics.util.CmwellConnector import org.apache.log4j.LogManager import org.rogach.scallop.{ScallopConf, ScallopOption} /** * This doesn't work very well due to issues with the ES Spark connector. * Use the separate ex...
thomsonreuters/CM-Well
tools/dataConsistencyTool/cmwell-spark-analysis/src/main/scala/cmwell/analytics/main/DumpIndexWithSystemFields.scala
Scala
apache-2.0
2,343
package com.twitter.finagle.http import java.net.URLEncoder import java.nio.charset.StandardCharsets import org.scalacheck.Gen import org.scalatest.FunSuite import org.scalatest.prop.GeneratorDrivenPropertyChecks import scala.collection.JavaConverters._ class QueryParamCodecTest extends FunSuite with GeneratorDrivenP...
mkhq/finagle
finagle-base-http/src/test/scala/com/twitter/finagle/http/QueryParamCodecTest.scala
Scala
apache-2.0
3,502
/* * 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
mllib/src/main/scala/org/apache/spark/ml/tree/treeParams.scala
Scala
apache-2.0
22,409
package at.logic.gapt.provers.maxsat import java.io._ import at.logic.gapt.formats.dimacs.DIMACSHelper import at.logic.gapt.expr._ import at.logic.gapt.models.{ MapBasedInterpretation, Interpretation } import at.logic.gapt.proofs.resolution._ import at.logic.gapt.proofs.resolution.algorithms.{ TseitinCNF, CNFp } impo...
gisellemnr/gapt
src/main/scala/at/logic/gapt/provers/maxsat/MaxSAT.scala
Scala
gpl-3.0
15,978
package sri.mobile.examples.movies import org.scalajs.dom import org.scalajs.dom.ext.{Ajax, AjaxException} import sri.core.{ReactComponent, ReactElement} import sri.mobile.all._ import sri.mobile.examples.movies.android.SearchBarAndroid import sri.mobile.examples.movies.ios.SearchBarIOS import sri.universal.{TextInput...
chandu0101/sri
mobile-examples/src/main/scala/sri/mobile/examples/movies/SearchScreen.scala
Scala
apache-2.0
8,463
object Test { val xs0 = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) assert(xs0(15) == 16) // 2.787s val xs1 = xs0 ++ xs0 assert(xs1(31) == 16) // 3.354s }
lampepfl/dotty
tests/bench/tuple.scala
Scala
apache-2.0
184
package jp.ac.titech.cs.se.nakamura.cfgen.dao import mockit.Deencapsulation import scala.collection.mutable import org.specs2.mutable.After import org.specs2.Specification /** * Memo ケースクラスがケースクラスを継承することはよくないらしい */ class CpcDaoSpec extends Specification { def is = s2""" $sequential 上位下位概念の検索クエリのテスト 下位概...
satokazuma/caseframe
caseframe-gen/src/test/scala/jp/ac/titech/cs/se/nakamura/cfgen/dao/CpcDaoSpec.scala
Scala
mit
3,090
/* * Copyright 2012 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 ...
samstokes/zipkin
zipkin-scrooge/src/test/scala/com/twitter/zipkin/adapter/ThriftConversionsSpec.scala
Scala
apache-2.0
3,736
package com.github.alixba.vast import scala.xml.Node case class ClickTracking(value: String, id: Option[String]) extends VASTElement { /** * Serializes this to a Node. */ def toXML: Node = <ClickTracking id={ id }>{ value.asCData }</ClickTracking> } object ClickTracking extends VASTElementCompanion[C...
AlixBa/vast
src/main/scala/com/github/alixba/vast/ClickTracking.scala
Scala
mit
757
//Copyright 2014, Alex Khilko. //This file is part of MoonGene which is released under MIT. //See file LICENSE.TXT or go to www.alexkhilko.com for full license details. package controllers import play.api.cache.Cache import play.api.Play.current /* CacheHelper helps with sending and retrieving values from cache ...
InfiniteCode/MoonGene
src/moon/app/controllers/CacheHelper.scala
Scala
mit
523
package com.twitter.finagle.netty4.util import com.twitter.conversions.DurationOps._ import com.twitter.util.{Duration, Time} import io.netty.util.{HashedWheelTimer, Timeout, Timer, TimerTask} import org.scalatestplus.mockito.MockitoSugar import org.mockito.Mockito._ import org.mockito.Matchers._ import org.scalatest....
twitter/finagle
finagle-netty4/src/test/scala/com/twitter/finagle/netty4/util/Netty4TimerTest.scala
Scala
apache-2.0
1,572
/* * 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 * distrib...
fusepoolP3/p3-silk
silk-learning/src/main/scala/de/fuberlin/wiwiss/silk/learning/active/GeneratePoolTask.scala
Scala
apache-2.0
4,714
package com.maxmouchet.vamk.timetables.parser.list.timetable.models object TimetableLinkType extends Enumeration { type TimetableLinkType = Value val Group, Professor, Room = Value }
OpenLamas/vamk-timetables
lib/scala/src/main/scala/com/maxmouchet/vamk/timetables/parser/list/timetable/models/TimetableLinkType.scala
Scala
mit
187
package com.reactmq import akka.actor.ActorSystem import akka.stream.FlowMaterializer import akka.util.Timeout import scala.concurrent.duration._ trait ReactiveStreamsSupport extends Logging { implicit def system: ActorSystem implicit val dispatcher = system.dispatcher implicit val timeout = Timeout(5.second...
adamw/reactmq
src/main/scala/com/reactmq/ReactiveStreamsSupport.scala
Scala
apache-2.0
375
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
sebadiaz/kafka
core/src/test/scala/unit/kafka/log/LogTest.scala
Scala
apache-2.0
138,287
package com.bizo.crucible.client import com.bizo.crucible.client.model._ /** * Simple API client for Crucible's REST API. * * see: https://docs.atlassian.com/fisheye-crucible/latest/wadl/crucible.html */ trait CrucibleAPI { def getProjects(): Seq[Project] def getUsers(): Seq[User] def getRepositories(): Se...
ogrodnek/crucible-client-scala
src/main/scala/com/bizo/crucible/client/CrucibleAPI.scala
Scala
apache-2.0
608
/** * * © Copyright 2017 Greg Symons <gsymons@gsconsulting.biz>. * * 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 ...
gregsymons/tipster
src/main/scala/Migrations.scala
Scala
apache-2.0
4,264
package main.scala import org.apache.spark.sql.DataFrame import org.apache.spark.SparkContext import org.apache.spark.sql.functions.sum import org.apache.spark.sql.functions.udf /** * TPC-H Query 7 * Savvas Savvides <savvas@purdue.edu> * */ class Q07 extends TpchQuery { override def execute(sc: SparkContext, s...
ssavvides/tpch-spark
src/main/scala/Q07.scala
Scala
mit
1,854
/* * 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...
aliyun/aliyun-emapreduce-sdk
examples/src/main/scala/com/aliyun/emr/examples/SparkPi.scala
Scala
artistic-2.0
1,546
package aoc.day06 import io.IO object Part2 extends App { /* --- Part Two --- You just finish implementing your winning light pattern when you realize you mistranslated Santa's message from Ancient Nordic Elvish. The light grid you bought actually has individual brightness controls; each light can have a bright...
GuillaumeDD/AdventOfCode2015
src/main/scala/aoc/day06/Part2.scala
Scala
gpl-3.0
2,757
package com.datawizards.sparklocal.dataset import com.datawizards.sparklocal.SparkLocalBaseTest import com.datawizards.sparklocal.implicits._ import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class ToStringTest extends SparkLocalBaseTest { test("toString result")...
piotr-kalanski/spark-local
src/test/scala/com/datawizards/sparklocal/dataset/ToStringTest.scala
Scala
apache-2.0
514
/* * 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/simple-reactivemongo
src/main/play-26/play/modules/reactivemongo/ValueFinder.scala
Scala
apache-2.0
770
package com.datastax.driver.spark.rdd.reader import com.datastax.driver.core.Row import com.datastax.driver.spark.types.TypeConverter // The below fragment may look very repetitive and copy-pasted, // however there is no other way to code this for functions of different arity // while preserving good type-safety. cl...
bovigny/cassandra-driver-spark
src/main/scala/com/datastax/driver/spark/rdd/reader/FunctionBasedRowReader.scala
Scala
apache-2.0
9,594
/* sbt -- Simple Build Tool * Copyright 2008, 2009 Mark Harrah */ package sbt import java.io.File import java.util.regex.Pattern trait FileFilter extends java.io.FileFilter with NotNull { def || (filter: FileFilter): FileFilter = new SimpleFileFilter( file => accept(file) || filter.accept(file) ) def && (filter:...
sbt/sbt-zero-seven
src/main/scala/sbt/NameFilter.scala
Scala
bsd-3-clause
2,628
package pl.pholda.malpompaaligxilo.form.field.calculateField import pl.pholda.malpompaaligxilo.Context import pl.pholda.malpompaaligxilo.form.FormExpr import pl.pholda.malpompaaligxilo.form.field.ComputeField import pl.pholda.malpompaaligxilo.util.Date case class CurrentDateField()(implicit context: Context) extends ...
pholda/MalpompaAligxilo
core/shared/src/main/scala/pl/pholda/malpompaaligxilo/form/field/calculateField/CurrentDateField.scala
Scala
gpl-3.0
498
package scalautils import scala.concurrent.duration.Duration import scala.concurrent.{Await, Future} /** * @author Holger Brandl */ class MiscUtils { class ThreadingUtils() { implicit class awaitFuture[A](fut: Future[A]) { def await() = Await.result(fut, Duration.Inf) } } }
holgerbrandl/scalautils
src/main/scala/scalautils/MiscUtils.scala
Scala
bsd-2-clause
303
package cspom.compiler import cspom.CSPOMConstraint import cspom.util.IntInterval import cspom.variable._ import scala.collection.immutable /** * @author vion */ object CSPOMTypes extends Types { def functions = Functions("clause") def types: PartialFunction[CSPOMConstraint[_], A] = { case CSPOMConstra...
concrete-cp/cspom
src/main/scala/cspom/compiler/CSPOMTypes.scala
Scala
lgpl-2.1
692
object Test { M.noop(List(1) match { case Nil => 0; case (x::xs) => x }) case class Foo(a: Int) val FooAlias: Foo.type = Foo M.noop(Foo(0) match { case FooAlias(_) => 0 }) case class Bar() val BarAlias: Bar.type = Bar M.noop(Bar() match { case BarAlias() => 0 }) }
AlexSikia/dotty
tests/pending/pos/t7377/Client_2.scala
Scala
bsd-3-clause
281
package cn.edu.neu.chiewen.roadDemo import javax.swing.BorderFactory import javax.swing.table.DefaultTableModel import cn.edu.neu.chiewen.cknn.demo.{DemoData, VoronoiPanel} import cn.edu.neu.chiewen.roadDemo.moving.{KnnRefreshEvent, MovingController} import cn.edu.neu.chiewen.roadDemo.ui._ import com.oreilly.swinghks...
chiewen/CkNN
CkNN/src/main/scala/cn/edu/neu/chiewen/roadDemo/INSQ_Demo.scala
Scala
gpl-2.0
11,345
import org.stormenroute.mecha._ import sbt._ import sbt.Keys._ import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._ import org.scalajs.sbtplugin.cross.CrossProject import org.scalastyle.sbt.ScalastylePlugin object ReactorsBuild extends MechaRepoBuild { def repoName = "reactors" val reactorsScalaVersion = ...
storm-enroute/reactors
project/Build.scala
Scala
bsd-3-clause
20,000
import scala.math._ case class Tank(x: Int, y: Int, d: Int = 0) { def előre(l: Int) = Tank( (x + cos(Pi * d / 180) * l).toInt, (y + sin(Pi * d / 180) * l).toInt, d) def hátra(l: Int) = előre(-l) def fordul(dr: Int) = Tank(x, y, (d + dr) % 360) } object Tank { def balra = 90 def jobbra = -90 ...
enpassant/miniatures
src/main/scala/tank/Tank.scala
Scala
apache-2.0
1,008
/* * Copyright (C) 2005, The OpenURP Software. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
openurp/api
prac/src/main/scala/org/openurp/prac/innovation/model/Member.scala
Scala
lgpl-3.0
1,299
package io.johnmurray.router.config import spray.json._ import DefaultJsonProtocol._ import io.johnmurray.router.config.Route /** * Author: John Murray <jmurray@appnexus.com> * Date: 3/26/14 * * Contains the "protocol" objects for (de)serialization of Scala * 'config' objects. */ object RouterJsonProtocols { ...
JohnMurray/router
src/main/scala/io/johnmurray/router/config/RouterJsonProtocols.scala
Scala
gpl-3.0
571
package io.swagger.client.model case class ModelObject (
CallControl/CallControlClient
scala-client/src/main/scala/io/swagger/client/model/ModelObject.scala
Scala
apache-2.0
64
import java.sql.CallableStatement import java.sql.Time import java.sql.Timestamp import java.sql.Date import java.sql.Types import scala.language.experimental.macros import scala.reflect.macros.blackbox object CS { def setParam[T](name: String, value: T, cs: CallableStatement): Unit = macro MacrosImpl.setParam_impl...
NoOrdInaryGuy/cs-macros
src/main/scala/CS.scala
Scala
mit
7,018
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/library/scala/Function11.scala
Scala
bsd-3-clause
2,088
import scala.tools.nsc.doc.model._ import scala.tools.partest.ScaladocModelTest object Test extends ScaladocModelTest { override def resourceFile = "stray-dollar-sign-res.scala" def scaladocSettings = "" def testModel(rootPackage: Package) = { // get the quick access implicit defs in scope (_package(s), _...
scala/scala
test/scaladoc/run/stray-dollar-sign.scala
Scala
apache-2.0
562
package scala.tools.scalap package scalax package rules trait Arrows extends UnitFunctors { type Arr[-A, +B] <: Arrow[A, B] type M[+B] = Arr[Nothing, B] def arrow[A, B](f : A => B) : Arr[A, B] def diag[A] = arrow[A, (A, A)] { a => (a, a) } override def unit[B](b : => B) : M[B] = arrow { any : Any => b...
LPTK/intellij-scala
scalap/src/scalap/scalax/rules/Arrows.scala
Scala
apache-2.0
1,059
package week2 object session {;import org.scalaide.worksheet.runtime.library.WorksheetSupport._; def main(args: Array[String])=$execute{;$skip(239); // high level funcions take another function as parameter def sum(f: Int => Int, a: Int, b: Int) = { def loop(a: Int, acc: Int ): Int = if (a > b) acc else loo...
juliocnsouzadev/scala_datascience
fuctional_programming_principles/fpps-notes/.worksheet/src/week2.session.scala
Scala
mit
530
package com.muster.core.utils.datetime import org.joda.time.{DateTime, DateTimeZone} object DateTimeUtils { val utc: DateTimeZone = DateTimeZone.UTC def now = DateTime.now.withZone(utc) }
cevaris/muster
core/src/main/scala/com/muster/core/utils/datetime/DateTimeUtils.scala
Scala
apache-2.0
198
package com.bot4s.telegram.models object MemberStatus extends Enumeration { type MemberStatus = Value val Creator, Administrator, Member, Restricted, Left, Kicked = Value }
mukel/telegrambot4s
core/src/com/bot4s/telegram/models/MemberStatus.scala
Scala
apache-2.0
178
package agni import com.datastax.oss.driver.api.core.ProtocolVersion import com.datastax.oss.driver.api.core.cql.Row trait RowDecoder[A] { def apply(row: Row, version: ProtocolVersion): Either[Throwable, A] } object RowDecoder extends TupleRowDecoder { def apply[A](implicit A: RowDecoder[A]): RowDecoder[A] = A ...
tkrs/agni
core/src/main/scala/agni/RowDecoder.scala
Scala
mit
472
/* * 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/gmp-frontend
test/controllers/IncorrectlyEncodedControllerSpec.scala
Scala
apache-2.0
2,224
/* * Copyright 2015 http4s.org * * 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...
rossabaker/http4s
circe/src/main/scala/org/http4s/circe/CirceSensitiveDataEntityDecoder.scala
Scala
apache-2.0
1,495
package com.arcusys.valamis.lesson.service.impl import com.arcusys.learn.liferay.LiferayClasses._ import com.arcusys.learn.liferay.services.UserLocalServiceHelper import com.arcusys.valamis.lesson.model._ import com.arcusys.valamis.lesson.service._ import com.arcusys.valamis.lesson.storage.LessonTableComponent import ...
igor-borisov/valamis
valamis-lesson/src/main/scala/com/arcusys/valamis/lesson/service/impl/LessonPlayerServiceImpl.scala
Scala
gpl-3.0
13,269
/* * 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/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamSink.scala
Scala
apache-2.0
5,276
package org.jetbrains.plugins.scala package lang.psi.uast.converter import com.intellij.psi.impl.source.tree.LeafPsiElement import com.intellij.psi.util.PsiTreeUtil.getParentOfType import com.intellij.psi.{PsiElement, PsiMethod} import org.jetbrains.annotations.Nullable import org.jetbrains.plugins.scala.extensions.{O...
JetBrains/intellij-scala
scala/uast/src/org/jetbrains/plugins/scala/lang/psi/uast/converter/Scala2UastConverter.scala
Scala
apache-2.0
22,286
package knot.data.buffers import java.nio.ByteOrder import java.nio.channels.ReadableByteChannel object InputSink { def fromArray(bytes: Array[Byte], byteOrder: ByteOrder): InputSink = { new ArrayInputSink(FixedBuffer.wrap(bytes, byteOrder)) } def fromChannel(channel: ReadableByteChannel, bufferSize: Int, ...
defvar/knot
knot-data/src/main/scala/knot/data/buffers/InputSink.scala
Scala
mit
496
package akka.rtcweb.protocol import akka.parboiled2.{ ParserInput, Parser } class InputParser(override val input: ParserInput) extends Parser() { }
danielwegener/akka-rtcweb
src/main/scala/akka/rtcweb/protocol/InputParser.scala
Scala
apache-2.0
151
/* - Coeus web framework ------------------------- * * Licensed under the Apache License, Version 2.0. * * Author: Spiros Tzavellas */ package com.tzavellas.coeus.mvc.view.helper import com.tzavellas.coeus.i18n.msg.MessageBundle import com.tzavellas.coeus.mvc.scope.ScopeAccessor /** * A view helper to read i18n...
sptz45/coeus
src/main/scala/com/tzavellas/coeus/mvc/view/helper/MessagesHelper.scala
Scala
apache-2.0
928
/* * 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 ...
cloud-fan/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/metric/SQLMetrics.scala
Scala
apache-2.0
10,080
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // Licence: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.sexp.util trait ThreadLocalSupport { protected def local[T](t: => T) = new ThreadLocal[T] { override def initialValue = t } }
d1egoaz/ensime-sbt
src/sbt-test/sbt-ensime/ensime-server/s-express/src/main/scala/org/ensime/sexp/util/ThreadLocalSupport.scala
Scala
apache-2.0
283
package com.twitter.finagle import com.twitter.concurrent.NamedPoolThreadFactory import com.twitter.finagle.util.ProxyThreadFactory import com.twitter.util.Awaitable import java.util.concurrent.{ExecutorService, Executors} import org.jboss.netty.channel.socket.nio.NioWorkerPool import org.jboss.netty.util.{ThreadNameD...
adriancole/finagle
finagle-core/src/main/scala/com/twitter/finagle/netty3/package.scala
Scala
apache-2.0
1,468
// Project: surfice-entity (https://github.com/jokade/surfice-entity) // Module: shared // Description: Traits for entity query filters (a.k.a WHERE caluses in SQL) // Copyright (c) 2016. Distributed under the MIT License (see included LICENSE file). package surfice.entity sealed trait QueryFilter object Qu...
jokade/surfice-entity
shared/src/main/scala/surfice/entity/QueryFilter.scala
Scala
mit
1,404
package org.elasticsearch.spark.sql import java.util.{ LinkedHashSet => JHashSet } import java.util.{ List => JList } import java.util.{ Map => JMap } import java.util.Properties import scala.collection.JavaConverters.asScalaBufferConverter import scala.collection.JavaConverters.propertiesAsScalaMapConverter import sc...
costin/elasticsearch-hadoop
spark/sql-13/src/main/scala/org/elasticsearch/spark/sql/SchemaUtils.scala
Scala
apache-2.0
13,534
package com.sksamuel.elastic4s.examples import com.sksamuel.elastic4s.ElasticDsl import scala.concurrent.duration._ class IndexDotDsl extends ElasticDsl { // simple index of one field indexInto("index", "type").fields("name" -> "sammy") // index with an explicit version indexInto("index", "type").fields("na...
beni55/elastic4s
elastic4s-examples/src/main/scala/com/sksamuel/elastic4s/examples/IndexDotDsl.scala
Scala
apache-2.0
653
/* * 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/test/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC23Spec.scala
Scala
apache-2.0
1,161
/* * Copyright © 2014 TU Berlin (emma@dima.tu-berlin.de) * * 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...
aalexandrov/emma
emma-examples/emma-examples-flink/src/test/scala/org/emmalanguage/examples/text/FlinkWordCountIntegrationSpec.scala
Scala
apache-2.0
1,124
/* * Copyright © 2014 Nemanja Stanarevic <nemanja@alum.mit.edu> * * Made with ❤ in NYC at Hacker School <http://hackerschool.com> * * Licensed under the GNU Affero General Public License, Version 3 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the ...
nemanja-stanarevic/gmail-api-scala-client
src/main/scala/gmailapi/GmailApiActor.scala
Scala
agpl-3.0
3,020
package chandu0101.scalajs.react.components import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.prefix_<^._ import scala.scalajs.js import scalacss.Defaults._ import scalacss.ScalaCssReact._ object ReactListView { class Style extends StyleSheet.Inline { import dsl._ val listGroup = style(m...
elacin/scalajs-react-components
core/src/main/scala/chandu0101/scalajs/react/components/ReactListView.scala
Scala
apache-2.0
2,615
package edu.neu.coe.scala.numerics import org.scalatest.{ FlatSpec, Matchers } import scala.util.Success /** * @author scalaprof */ class FuzzySpec extends FlatSpec with Matchers { def checkDouble(actual: Double, expected: Double) { assert(math.abs(actual-expected)<1E7) } "Gaussian" should "sum with ...
rchillyard/Scalaprof
Numerics/src/test/scala/edu/neu/coe/scala/numerics/FuzzySpec.scala
Scala
gpl-2.0
3,104
import scala.reflect.macros.blackbox.Context object Impls { def toOptionOfInt(c: Context) = { import c.{prefix => prefix} import c.universe._ val printPrefix = Apply(Select(Ident(definitions.PredefModule), TermName("println")), List(Literal(Constant("prefix = " + prefix)))) val body = Block(List(prin...
folone/dotty
tests/disabled/macro/run/macro-term-declared-in-implicit-class/Impls_Macros_1.scala
Scala
bsd-3-clause
623
package com.sksamuel.scapegoat.inspections.collections import com.sksamuel.scapegoat._ /** @author Stephen Samuel */ class CollectionNamingConfusion extends Inspection { def inspector(context: InspectionContext): Inspector = new Inspector(context) { override def postTyperTraverser = Some apply new context.Trav...
pwwpche/scalac-scapegoat-plugin
src/main/scala/com/sksamuel/scapegoat/inspections/collections/CollectionNamingConfusion.scala
Scala
apache-2.0
1,639
package test // Original test case from, // // https://github.com/scala/bug/issues/2712 object Test { def meh[M[_], A](x: M[A]): M[A] = x meh{(x: Int) => x} // solves ?M = [X] Int => X and ?A = Int ... }
loskutov/intellij-scala
testdata/scalacTests/pos/t2712-1.scala
Scala
apache-2.0
211
/* * Copyright 2017-2022 John Snow Labs * * 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...
JohnSnowLabs/spark-nlp
src/main/scala/com/johnsnowlabs/nlp/ParamsAndFeaturesWritable.scala
Scala
apache-2.0
1,593
/** * 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...
samaitra/kafka
core/src/main/scala/kafka/server/ConfigHandler.scala
Scala
apache-2.0
3,354
package renderer import globalvariables.VariableStorage import org.scalajs.dom import org.scalajs.dom.html /** * Manage what is common in join and host game settings html files. */ object GameSettingsCommon { val playerName: String = VariableStorage.retrieveValue("playerName").asInstanceOf[String] va...
sherpal/oh-hell-card-game
gameMenus/src/main/scala/renderer/GameSettingsCommon.scala
Scala
mit
1,096