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
/*********************************************************************** * Copyright (c) 2013-2020 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
aheyne/geomesa
geomesa-convert/geomesa-convert-jdbc/src/main/scala/org/locationtech/geomesa/convert/jdbc/JdbcConverter.scala
Scala
apache-2.0
5,188
package com.twitter.finagle.loadbalancer import com.twitter.finagle.{ClientConnection, Service, ServiceFactory} import com.twitter.finagle.stats.StatsReceiver import com.twitter.finagle.util.DefaultTimer import com.twitter.util.{Duration, Future, Time} import java.util.concurrent.atomic.AtomicInteger private trait Se...
spockz/finagle
finagle-benchmark/src/main/scala/com/twitter/finagle/loadbalancer/ServerFactory.scala
Scala
apache-2.0
1,823
package com.datastax.spark.connector.types import java.net.InetAddress import java.nio.ByteBuffer import java.util.{Calendar, GregorianCalendar, UUID, Date} import scala.collection.JavaConversions._ import scala.collection.immutable.{TreeMap, TreeSet} import scala.reflect.runtime.universe._ import org.joda.time.Date...
boneill42/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/types/TypeConverter.scala
Scala
apache-2.0
26,075
package l3 /** * Literal values for the CL₃ language. * * @author Michel Schinz <Michel.Schinz@epfl.ch> */ sealed trait CL3Literal { override def toString: String = this match { case IntLit(i) => i.toString case BooleanLit(v) => if (v) "#t" else "#f" case UnitLit => "#u" } } case class IntLit(val...
sana/WorkAtEPFL
l3-compiler/compiler-optimizations/compiler/src/l3/CL3Literal.scala
Scala
gpl-3.0
446
/*********************************************************************** * Copyright (c) 2013-2022 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
locationtech/geomesa
geomesa-memory/geomesa-cqengine/src/test/scala/org/locationtech/geomesa/memory/cqengine/utils/CQIndexingOptionsTest.scala
Scala
apache-2.0
3,872
package edu.cmu.lti.nlp.amr.StanfordDecoder import edu.cmu.lti.nlp.amr.Graph import nlp.experiments.SequenceSystem import scala.collection.JavaConversions._ /** * Created by keenon on 2/16/15. * * Use option --stanford-chunk-gen on the AMRParser to use this chunk generator instead of the standard one. */ object ...
keenon/jamr
src/StanfordDecoder/Decoder.scala
Scala
bsd-2-clause
999
package org.lanyard.dist.disc import org.lanyard.test.ChiSquareTest import org.scalatest.FunSpec import org.scalatest.Matchers import org.scalatest.prop.GeneratorDrivenPropertyChecks class BinomialTest extends FunSpec with Matchers with GeneratorDrivenPropertyChecks { import BinomialTest._ import org.lanyard.ra...
perian/Lanyard
src/test/scala/org/lanyard/dist/disc/BinomialTest.scala
Scala
gpl-2.0
1,387
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
mahak/spark
mllib/src/test/scala/org/apache/spark/ml/classification/OneVsRestSuite.scala
Scala
apache-2.0
14,980
/* 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 to in writing, software distr...
twitter/bijection
bijection-core/src/main/scala-2.12-/com/twitter/bijection/CollectionBijections.scala
Scala
apache-2.0
8,407
package com.rydgel.yo import scala.concurrent.duration._ import scala.concurrent.Await import org.scalatest._ import scala.io.Source class YoClientSuite extends FunSuite { val key = new ApiToken( Source.fromURL(getClass.getResource("/token.txt")).getLines().mkString ) test("YoAll request with a good API ke...
Rydgel/Scala-Yo
src/test/scala/com/rydgel/yo/YoClientSuite.scala
Scala
mit
677
/* * Copyright 2016 Nikolay Donets * * 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 ...
nikdon/telepooz
src/main/scala/com/github/nikdon/telepooz/model/methods/DeleteMessage.scala
Scala
apache-2.0
1,597
/** * Copyright 2015 Gianluca Amato <gamato@unich.it> * * This file is part of JANDOM: JVM-based Analyzer for Numerical DOMains * JANDOM 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 o...
francescaScozzari/Jandom
core/src/main/scala/it/unich/jandom/fixpoint/IterativeStrategySolver.scala
Scala
lgpl-3.0
2,605
package com.sfxcode.nosql.mongo import java.util.Date import org.bson.conversions.Bson import org.mongodb.scala.bson.BsonDocument import org.mongodb.scala.bson.collection.immutable.Document import org.mongodb.scala.model.Filters._ object Filter extends Filter trait Filter { val DefaultBson: Bson = BsonDocument(Do...
sfxcode/simple-mongo
src/main/scala/com/sfxcode/nosql/mongo/Filter.scala
Scala
apache-2.0
1,303
import java.util.Locale object AnyValCodec { private[this] val types = "Boolean Byte Short Int Long Float Double".split(' ').toList private[this] val defdef = types.map { tpe => s" implicit def ${tpe.toLowerCase(Locale.ENGLISH)}Codec: MsgpackCodec[$tpe]" }.mkString("\\n") private[this] val impl = types.map { ...
msgpack4z/msgpack4z-core
project/AnyValCodec.scala
Scala
mit
702
package shredzzz.kirkwood.cumath.tensor.modules import jcuda.{Pointer, Sizeof} import shredzzz.kirkwood.cumath.tensor.CuTensor import scala.reflect.ClassTag import shredzzz.kirkwood.driver.CuContext import jcuda.runtime.{cudaMemcpyKind, JCuda} import jcuda.jcublas.JCublas2 import shredzzz.kirkwood.cumath.CuValue trai...
shredzzz/kirkwood
src/main/scala/shredzzz/kirkwood/cumath/tensor/modules/DataModule.scala
Scala
apache-2.0
3,527
package com.peterpotts.snake.predicate import com.peterpotts.snake.coercion.Compare case class NotEqualTo[T](extractor: Extractor[T], value: Any) extends Predicate[T] { def apply(argument: T) = Compare(extractor(argument), value) != 0 override def toString() = s"$extractor != $value" }
peterpotts/snake
src/main/scala/com/peterpotts/snake/predicate/NotEqualTo.scala
Scala
mit
294
package com.sfxcode.nosql.mongo.database import java.util.Date import org.mongodb.scala.bson.Document import com.sfxcode.nosql.mongo._ case class CollectionStatus( ns: String, collectionType: String, scaleFactor: Int, size: Double, count: Int, storageSize: Double, avgObjSize: Int, nin...
sfxcode/simple-mongo
src/main/scala/com/sfxcode/nosql/mongo/database/CollectionStatus.scala
Scala
apache-2.0
1,546
/* * 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 ...
witgo/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormatWriter.scala
Scala
apache-2.0
14,215
// // Token.scala -- Scala class Token // Project OrcScala // // Created by dkitchin on Aug 12, 2011. // // Copyright (c) 2019 The University of Texas at Austin. All rights reserved. // // Use and redistribution of this file is governed by the license terms in // the LICENSE file found in the project's top-level direct...
orc-lang/orc
OrcScala/src/orc/run/core/Token.scala
Scala
bsd-3-clause
39,124
/* * Copyright 2018 Analytics Zoo 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...
intel-analytics/analytics-zoo
zoo/src/test/scala/com/intel/analytics/zoo/pipeline/api/keras2/layers/GlobalAveragePooling1DSpec.scala
Scala
apache-2.0
2,092
package com.rasterfoundry.database import java.util.UUID import cats.implicits._ import com.rasterfoundry.database.Implicits._ import com.rasterfoundry.database.filter.Filterables import com.rasterfoundry.database.util._ import com.rasterfoundry.datamodel._ import com.rasterfoundry.datamodel.{PageRequest, Order} impo...
aaronxsu/raster-foundry
app-backend/db/src/main/scala/Dao.scala
Scala
apache-2.0
10,294
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * 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 ...
eaplatanios/tensorflow
tensorflow/scala/api/src/main/scala/org/platanios/tensorflow/api/ops/training/optimizers/schedules/CycleLinear10xDecay.scala
Scala
apache-2.0
3,648
package simulations import com.typesafe.config.ConfigFactory import io.gatling.core.Predef._ import io.gatling.http.Predef._ class ReportSimulation extends Simulation { val conf = ConfigFactory.load() val httpConf = http.baseURL(conf.getString("baseUrl")) setUp( scenario("Report Simulation") .exec(h...
mauriciocc/tcc
simulation/src/test/scala/simulations/ReportSimulation.scala
Scala
mit
436
/* 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/MPL/2.0/. */ package dev.ligature.rocksdb private class RocksDBReadTx { }
almibe/stinkpot-burrow
src/main/scala/dev/ligature/rocksdb/RocksDBReadTx.scala
Scala
mpl-2.0
269
package org.ensime.sexp.formats import org.ensime.sexp._ class ProductFormatsSpec extends FormatSpec with BasicFormats with StandardFormats with ProductFormats { case class Foo(i: Int, s: String) case class Bar(foo: Foo) case class Baz() case class Wibble(thing: String, thong: Int, bling: Option[String])...
jacobono/ensime-server
sexpress/src/test/scala/org/ensime/sexp/formats/ProductFormatsSpec.scala
Scala
gpl-3.0
3,144
package water.sparkling.demo import water.sparkling.DummyFrameExtractor import water.fvec.Frame import water.util.Log object ProstateDemo extends Demo { override def run(conf: DemoConf): Unit = prostateDemo(frameExtractor=conf.extractor, sparkMaster = if (conf.local) null else conf.sparkMaster) def prostateDemo(...
h2oai/h2o-sparkling
src/main/scala/water/sparkling/demo/ProstateDemo.scala
Scala
apache-2.0
1,089
object TransactionStatus extends Enumeration { val SUCCESS, PENDING, FAILED = Value } class Transaction(val from: String, val to: String, val amount: Double, var status: TransactionStatus.Value = TransactionStatus.PENDING, val id: String = jav...
DagF/tdt4165_progspraak_project_h15
part3-exercise/src/main/scala/Transaction.scala
Scala
mit
592
package naming import eu.inn.binders.naming.{CamelCaseBuilder, SnakeUpperCaseParser} import org.scalatest.{FlatSpec, Matchers} class TestSnakeUpperCaseParser extends FlatSpec with Matchers { "SnakeUpperCaseParser " should " parse STRING_LIKE_THIS " in { val parser = new SnakeUpperCaseParser() val builder =...
InnovaCo/binders
src/test/scala/naming/TestSnakeUpperCaseParser.scala
Scala
bsd-3-clause
470
/* * 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 ...
WindCanDie/spark
streaming/src/main/scala/org/apache/spark/streaming/ui/BatchPage.scala
Scala
apache-2.0
14,859
package com.github.dannywe.csv.base import java.io.{File, Reader} import au.com.bytecode.opencsv.CSVReader import com.github.dannywe.csv.base.reader.ReaderLike import com.github.dannywe.csv.core.TypeAliases._ import scala.collection.JavaConversions._ class CsvReaderAdaptor(csvReader: CSVReader) extends ReaderLike {...
DannyWE/CsvStreamUtils
src/main/scala/com/github/dannywe/csv/base/CsvReaderAdaptor.scala
Scala
apache-2.0
769
package techex import techex.TestServer._ import org.specs2.mutable._ import dispatch._, Defaults._ import techex.domain.Nick import scalaz._, Scalaz._ import _root_.argonaut._, Argonaut._ class LoadPersonalQuestsSpec extends Specification { try { val runningserver = server.run "The webserwer" sho...
kantega/tech-ex-2015
backend/src/test/scala/techex/LoadPersonalQuestsSpec.scala
Scala
mit
844
package com.twitter.finagle.postgres.connection import com.twitter.finagle.postgres.Spec import com.twitter.finagle.postgres.messages.{Query, ParameterStatus, NotificationResponse, NoticeResponse} class ConnectionAsyncSpec extends Spec { "A postgres connection" should { "ignore async messages for new connection...
evnm/finagle-postgres
src/test/scala/com/twitter/finagle/postgres/connection/ConnectionAsyncSpec.scala
Scala
apache-2.0
1,610
package japgolly.scalajs.react.internal.monocle import japgolly.scalajs.react._ import japgolly.scalajs.react.util.DefaultEffects._ import japgolly.scalajs.react.util.Effect.Dispatch trait MonocleExtComponentLowPriorityImplicits { implicit final def MonocleReactExt_StateWritableCB[I, F[_], A[_], S](i: I)(implicit s...
japgolly/scalajs-react
extraExtMonocle2/src/main/scala/japgolly/scalajs/react/internal/monocle/MonocleExtComponent.scala
Scala
apache-2.0
4,866
package ildl.internal class nobridge extends annotation.Annotation
miniboxing/ildl-plugin
components/runtime/src/ildl/internal/nobridges.scala
Scala
bsd-3-clause
67
/* * 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 ...
ioana-delaney/spark
external/kafka-0-8/src/test/scala/org/apache/spark/streaming/kafka/DirectKafkaStreamSuite.scala
Scala
apache-2.0
21,854
package play.sbtplugin import sbt._ import Keys._ import play.Play import play.twirl.sbt.Import.TwirlKeys import com.typesafe.sbt.web.SbtWeb.autoImport._ object PlayLayoutPlugin extends AutoPlugin { override def requires = Play override def trigger = AllRequirements override def projectSettings = Seq( ta...
jyotikamboj/container
pf-framework/src/sbt-plugin/src/main/scala/play/sbtplugin/PlayLayoutPlugin.scala
Scala
mit
1,243
package sml import scala.collection.mutable.{HashSet, Queue} /** A library for traversing graph based knowledge bases over words and phrases */ object knowledge { /** Defines a traverser over the knowledge base */ abstract class Traverser { /** Returns true if the phrase is defined in the knowledge base */...
jworr/sml
src/main/scala/sml/knowledge.scala
Scala
gpl-2.0
2,826
package com.karasiq.shadowcloud.api.json import akka.util.ByteString import play.api.libs.json._ import com.karasiq.shadowcloud.api.SCApiServer trait SCJsonApiServer extends SCApiServer[ByteString, Reads, Writes] with SCJsonApi { def read[Result: Reads](p: ByteString): Result = { Json.fromJson(Json.parse(p.toA...
Karasiq/shadowcloud
server/autowire-api/src/main/scala/com/karasiq/shadowcloud/api/json/SCJsonApiServer.scala
Scala
apache-2.0
641
package net.fluxo.blue.downloader /** * Created with IntelliJ IDEA. * User: Ronald Kurniawan (viper) * Date: 27/12/13 * Time: 2:29 PM */ class TDownload { private var _id: Long = 0 def Id: Long = _id def Id_= (value: Long) = { _id = value } private var _name: Option[String] = None def Name: Option[Str...
fluxodesign/FluxoBlue
src/main/scala/net/fluxo/blue/downloader/TDownload.scala
Scala
lgpl-3.0
1,412
package rpm4s.repo.utils import java.util.zip.{CRC32, Deflater} import fs2.{Chunk, Pipe, Pull, RaiseThrowable, Stream} package object compress { private val header: Chunk[Byte] = Chunk.bytes( Array(0x1f.toByte, 0x8b.toByte, Deflater.DEFLATED.toByte, 0.toByte, 0.toByte, ...
lucidd/rpm4s
repo-utils/jvm/src/main/scala/rpm4s/repo/utils/compress/package.scala
Scala
mit
4,382
/* sbt -- Simple Build Tool * Copyright 2009,2010 Mark Harrah */ package sbt package impl import StringUtilities.nonEmpty trait DependencyBuilders { final implicit def toGroupID(groupID: String): GroupID = { nonEmpty(groupID, "Group ID") new GroupID(groupID) } final implicit def toRepositor...
corespring/sbt
ivy/src/main/scala/sbt/impl/DependencyBuilders.scala
Scala
bsd-3-clause
2,451
package com.twitter.concurrent import scala.util.Random import com.twitter.util.{Await, Duration, Future, Promise, Time, Timer} /** * An offer to communicate with another process. The offer is * parameterized on the type of the value communicated. An offer that * sends a value typically has type {{Unit}}. An offe...
folone/util
util-core/src/main/scala/com/twitter/concurrent/Offer.scala
Scala
apache-2.0
8,762
package dpla.ingestion3.harvesters.resourceSync import dpla.ingestion3.confs.i3Conf import dpla.ingestion3.harvesters.Harvester import org.apache.log4j.Logger import org.apache.spark.sql.{DataFrame, SparkSession} import org.apache.spark.sql.functions.lit class RsHarvester(spark: SparkSession, shortN...
dpla/ingestion3
src/main/scala/dpla/ingestion3/harvesters/resourceSync/RsHarvester.scala
Scala
mit
1,542
package uk.ac.ncl.openlab.intake24.services.systemdb.shortUrls import uk.ac.ncl.openlab.intake24.errors.{CreateError, LookupError, UnexpectedDatabaseError} /** * Created by Tim Osadchiy on 22/02/2018. */ trait ShortUrlDataService { def saveShortUrls(urls: Seq[(String, String)]): Either[UnexpectedDatabaseError...
digitalinteraction/intake24
SystemDataServices/src/main/scala/uk/ac/ncl/openlab/intake24/services/systemdb/shortUrls/ShortUrlDataService.scala
Scala
apache-2.0
519
val x = 1 + 2 +3 // error: Expected a toplevel definition val b1 = { 22 * 22 // ok */*one more*/22 // error: end of statement expected } // error: ';' expected, but '}' found val b2: Boolean = { println(x) ! "hello".isEmpty // error: value ! is not a member of Unit }
som-snytt/dotty
tests/neg/multiLineOps.scala
Scala
apache-2.0
303
package com.datascience.education.tutorial.lecture1 // Task (5a): decide where the implicit conversion should go; implement it object ImplicitConversions { type ComplexNumber = (Double, Double) trait ComplexVector { def complexVector: List[ComplexNumber] override def toString = s"Vector contains $compl...
DS12/scala-class
tutorial/src/main/scala/com/datascience/education/tutorial/lecture1/ImplicitConversions.scala
Scala
cc0-1.0
746
package com.scalableminds.webknossos.datastore.controllers import com.scalableminds.util.tools.Fox import com.scalableminds.webknossos.datastore.storage.DataStoreRedisStore import javax.inject.Inject import play.api.mvc.{Action, AnyContent} import scala.concurrent.ExecutionContext class Application @Inject()(redisCl...
scalableminds/webknossos
webknossos-datastore/app/com/scalableminds/webknossos/datastore/controllers/Application.scala
Scala
agpl-3.0
826
package hayago package object game { val firstTurnColour = Colour.Black // Black is always first }
sungiant/hayago
src/main/scala/game/package.scala
Scala
mit
101
package newts.internal import cats.Order import cats.kernel.instances.all._ trait MaxBounded[A] extends Order[A]{ def maxValue: A } object MaxBounded{ def apply[A](implicit ev: MaxBounded[A]): MaxBounded[A] = ev implicit val shortMaxBounded: MaxBounded[Short] = fromOrder(Short.MaxValue)(catsKernelStdOrderForS...
julien-truffaut/newts
core/shared/src/main/scala/newts/internal/MaxBounded.scala
Scala
apache-2.0
699
package BIDMat import edu.berkeley.bid.CBLAS._ import edu.berkeley.bid.LAPACK._ import edu.berkeley.bid.SPBLAS._ import scala.util.hashing.MurmurHash3 import java.util.Arrays case class DMat(nr:Int, nc:Int, data0:Array[Double]) extends DenseMat[Double](nr, nc, data0) { def size() = length; def getda...
codeaudit/BIDMat
src/main/scala/BIDMat/DMat.scala
Scala
bsd-3-clause
56,567
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package java.util class EventObject(protected...
scala-js/scala-js
javalib/src/main/scala/java/util/EventObject.scala
Scala
apache-2.0
466
package auth.controllers import javax.inject.Inject import com.mohiva.play.silhouette.api.exceptions.{ConfigurationException, ProviderException} import com.mohiva.play.silhouette.api.services.AuthInfoService import com.mohiva.play.silhouette.api.util.Credentials import com.mohiva.play.silhouette.api.{Environment, Log...
readren/coc-war-organizer
app/auth/controllers/CredentialsAuthController.scala
Scala
apache-2.0
2,650
/* * Copyright 2001-2013 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...
scalatest/scalatest
jvm/scalatest-test/src/test/scala/org/scalatest/OnlyContainMatcherDeciderSpec.scala
Scala
apache-2.0
22,123
package org.ucombinator.jaam.patterns import org.ucombinator.jaam.patterns.stmt._ import org.ucombinator.jaam.util.Stmt case class StmtPatternToRegEx(pattern: LabeledStmtPattern) extends ((State, Stmt) => (List[State], List[(RegExp, State)])) { override def apply(state: State, stmt: Stmt): (List[State], List[(RegEx...
Ucombinator/jaam
src/main/scala/org/ucombinator/jaam/patterns/StmtPatternToRegEx.scala
Scala
bsd-2-clause
399
/* ************************************************************************************* * 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/services/policies/TechniqueReloadingCallbacks.scala
Scala
gpl-3.0
3,797
package src.main.scala.geodecoding import scala.util.{Failure, Success, Try} import scala.io.Source import src.main.scala.logging.Logging._ import src.main.scala.types.PostalCode import src.main.scala.cache.KeyValueCache abstract class GeoDecodingProvider extends Object { // There can be many functions in this t...
je-nunez/urban_planning_on_gtfs_traffic_congestion
src/main/scala/geodecoding/GeoDecodingProvider.scala
Scala
gpl-2.0
2,562
/* * 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/spark2/src/test/scala/org/apache/carbondata/spark/testsuite/booleantype/BooleanDataTypesBigFileTest.scala
Scala
apache-2.0
22,936
package dao.sitedata import scala.concurrent.Future import javax.inject.Inject import play.api.db.slick.DatabaseConfigProvider import play.api.db.slick.HasDatabaseConfigProvider import play.api.libs.concurrent.Execution.Implicits.defaultContext import slick.driver.JdbcProfile import slick.jdbc.GetResult import models....
tnddn/iv-web
portal/rest-portal/app/dao/sitedata/SiteInfoDao.scala
Scala
apache-2.0
5,971
/* * Copyright (C) 2007-2008 Artima, Inc. All rights reserved. * * 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 requir...
peachyy/scalastu
lists/InsertionSort2.scala
Scala
apache-2.0
1,250
/* * Copyright (c) 2016. Fengguo (Hugo) Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Detailed co...
arguslab/argus-cit-intellij
src/main/scala/org/argus/cit/intellij/jawa/lang/refactoring/util/JawaNamesUtil.scala
Scala
epl-1.0
4,148
/* Deduction Tactics Copyright (C) 2012-2015 Raymond Dodge This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This progra...
rayrobdod/boardGame
ViewJavaFx/src/test/scala/InitializeFx.scala
Scala
gpl-3.0
1,239
/* * Copyright (c) 2014-2021 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...
monifu/monifu
monix-tail/shared/src/test/scala/monix/tail/IterantFlatMapSuite.scala
Scala
apache-2.0
10,769
/* * Copyright (c) 2013-2015 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 which * accompanies this distribution and is available at * http://www.opensource.org/licenses/apache2.0.php. ...
vpipkt/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/stats/ParamsAuditProvider.scala
Scala
apache-2.0
1,301
package org.scaladebugger.docs.layouts.partials.common.vendor import scalatags.Text.all._ /** * Represents a <script ... > containing clipboard.js. */ object ClipboardJS { def apply(): Modifier = { script(src := "/scripts/vendor/clipboard/clipboard.min.js") } }
chipsenkbeil/scala-debugger
scala-debugger-docs/src/main/scala/org/scaladebugger/docs/layouts/partials/common/vendor/ClipboardJS.scala
Scala
apache-2.0
274
package scalax.chart /** Mixin for charts which may display labels. * * @tparam G type of label generator */ private[chart] trait Labels[G] { /** Optionally returns this charts label generator. */ def labelGenerator: Option[G] /** Sets this charts label generator. */ def labelGenerator_=(generator: Opt...
wookietreiber/scala-chart
src/main/scala/scalax/chart/Labels.scala
Scala
lgpl-3.0
477
// Creating class called ChecksumAccumulator // Classes in Scala cannot contain static methods. class ChecksumAccumulator{ // Variables inside classes are called fields private var sum = 0 // Defining two methods: add and checksum def add(b: Byte): Unit = sum += b def checksum(): Int = ~(sum & 0xFF) + 1 } obj...
arcyfelix/Courses
18-10-18-Programming-in-Scala-by-Martin-Odersky-Lex-Spoon-and-Bill-Venners/04-ClassesFieldsAndMethods/src/main.scala
Scala
apache-2.0
424
package charactor.core.model.objects.charactor.parts import charactor.core.model.objects.charactor.Charactor import charactor.core.messages.AttackMessage import actors.OutputChannel object FightStrategy { } class FightStrategy { def fight(owner: Charactor, target: OutputChannel[Any]) { target ! new AttackMessag...
PiotrTrzpil/charactor
src/charactor/core/model/objects/charactor/parts/FightStrategy.scala
Scala
apache-2.0
348
package com.harrys.hyppo.worker.actor.queue import com.harrys.hyppo.source.api.PersistingSemantics import com.harrys.hyppo.worker.api.proto.{PersistProcessedDataRequest, WorkerInput} import com.rabbitmq.client.Channel import scala.util.Try /** * Created by jpetty on 11/6/15. */ final case class WorkQueueExecutio...
harrystech/hyppo-worker
worker/src/main/scala/com/harrys/hyppo/worker/actor/queue/WorkQueueExecution.scala
Scala
mit
828
import sbt._ import Keys._ import bintray.Plugin._ object FirkinBuild extends Build { val VERSION = "0.3.0" lazy val common = project settings(commonSettings: _*) lazy val server = project settings(serverSettings : _*) dependsOn(common, client) lazy val client = project settings(clientSettings: _*) ...
willb/firkin
project/Build.scala
Scala
apache-2.0
2,295
package com.dekayd.pyramidcode.tests import com.dekayd.pyramidcode.utils.CoordinateUtils._ import org.junit.Test import com.dekayd.pyramidcode.coordinates.DegreesMinutesSeconds import com.dekayd.pyramidcode.coordinates.Degrees import com.typesafe.scalalogging.slf4j.LazyLogging /** * * @author kelly */ class Coord...
bluestix/pyramidcode
pyramid-code/pyramid-code-services/src/test/scala/com/dekayd/pyramidcode/tests/CoordinateUtilsTest.scala
Scala
gpl-2.0
588
import scala.annotation.tailrec /** * Random [[java.lang.String]] things. */ object StringStuff { def occurrencesOf(target: Set[Char])(text: String): IndexedSeq[Int] = for ((character, index) <- text.zipWithIndex if target.contains(character)) yield index def groupFirstLast[T](list: Seq[T]): Map[T, T] = {...
tamchow/ScalaStuff
src/StringStuff.scala
Scala
bsd-3-clause
2,655
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.testsuite.utils import ja...
scala-js/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/utils/CollectionsTestBase.scala
Scala
apache-2.0
5,147
/* * Copyright (c) 2014-2021 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...
monixio/monix
monix-tail/shared/src/test/scala/monix/tail/IterantRetryIfEmptySuite.scala
Scala
apache-2.0
3,784
package com.cerner.beadledom.lifecycle.legacy import com.google.inject.spi.ProvisionListener.ProvisionInvocation import com.google.inject.{Binding, Key} import javax.annotation.{PostConstruct, PreDestroy} import org.hamcrest.Matchers.contains import org.mockito.Mockito import org.mockito.hamcrest.MockitoHamcrest impor...
bbaugher/beadledom
lifecycle/src/test/scala/com/cerner/beadledom/lifecycle/legacy/LifecycleProvisionListenerSpec.scala
Scala
apache-2.0
3,276
import org.scalatest._ class NucleotideCountSpecs extends FlatSpec with Matchers { "empty dna string" should "have no adenosine" in { new DNA("").count('A') should be (0) } it should "have no nucleotides" in { pending val expected = Map('A' -> 0, 'T' -> 0, 'C' -> 0, 'G' -> 0) new DNA("").nucleot...
tomave/exercism-io-solutions
scala/nucleotide-count/src/test/scala/nucleotide_count_test.scala
Scala
agpl-3.0
1,892
package cz.vse.easyminer.util import spray.http.Uri object RestUtils { implicit class PathExtension(path: Uri.Path) { private def findClosestParent(path: Uri.Path) : Uri.Path = path match { case Uri.Path.Empty => path case Uri.Path.Slash(tail) => findClosestParent(tail) case Uri.Path.Segmen...
KIZI/EasyMiner-Apriori-R
src/main/scala/cz/vse/easyminer/util/RestUtils.scala
Scala
bsd-3-clause
489
package com.github.andyglow.config import scala.jdk.CollectionConverters._ private[config] object ScalaVersionSpecific { implicit class CollectionsToScala[T](private val coll: java.lang.Iterable[T]) extends AnyVal { def scala: Iterable[T] = coll.asScala } implicit class MapsToScala[K, V](private val coll...
andyglow/typesafe-config-scala
src/main/scala-3/com/github/andyglow/config/ScalaVersionSpecific.scala
Scala
gpl-3.0
413
package calc /** * Brute force solver for the problem at https://brilliant.org/practice/arithmetic-puzzles-level-2-challenges/?p=2 * * In a nutshell, given 1 _ 2 _ 3 _ 4, and the operators +, -, *, /, how many ways can you construct * a simple expression such that it evaluates to 10? (And for extra credit, 1 _...
ebowman/calc
src/main/scala/calc/Calc.scala
Scala
unlicense
1,289
package akka.rtcweb.protocol.sdp.grouping import akka.rtcweb.protocol.sdp.renderer.Renderer._ import akka.rtcweb.protocol.sdp.renderer.{ Renderer, Rendering } trait GroupingExtensionAttributeRenderer { import akka.rtcweb.protocol.sdp.renderer.Rendering.SP private implicit val semanticsRenderer: Renderer[Semanti...
danielwegener/akka-rtcweb
src/main/scala/akka/rtcweb/protocol/sdp/grouping/GroupingExtensionAttributeRenderer.scala
Scala
apache-2.0
793
/* * 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 ...
greghogan/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/rules/logical/TemporalJoinRewriteWithUniqueKeyRuleTest.scala
Scala
apache-2.0
6,385
package gui /** * Advanced components that are needed for this interface. */ package object component
AlexGonRo/Instance-Selection-Algorithms-Spark
Algoritmos_de_selección_de_instancias/src/main/scala/gui/component/package.scala
Scala
gpl-3.0
105
object Main extends App { def f(a:Int=>Int):Int = a(4) def g:Int = f((x,y)=>x) }
yusuke2255/dotty
tests/untried/neg/t556.scala
Scala
bsd-3-clause
85
package eventstore.util import com.typesafe.config.{ Config, ConfigFactory } import org.specs2.mutable.Specification import org.specs2.specification.{ Scope, Step, Fragments } import akka.actor.ActorSystem import akka.testkit.{ ImplicitSender, TestKit } import scala.concurrent.{ Awaitable, Await } import scala.concurr...
pawelkaczor/EventStore.JVM
src/test/scala/eventstore/util/ActorSpec.scala
Scala
bsd-3-clause
958
/* * Artificial Intelligence for Humans * Volume 1: Fundamental Algorithms * Scala Version * http://www.aifh.org * http://www.jeffheaton.com * * Code repository: * https://github.com/jeffheaton/aifh * Copyright 2013 by Jeff Heaton * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use th...
PeterLauris/aifh
vol1/scala-examples/src/main/scala/com/heatonresearch/aifh/learning/RBFNetwork.scala
Scala
apache-2.0
4,308
package com.bolour.boardgame.scala.server.domain.json import spray.json.{DefaultJsonProtocol, JsString, JsValue, RootJsonFormat, deserializationError} object JsonUtil { def removeQuotes(s: String): String = { s.replaceAll("\\"", "") } /** * There must be a simpler way to convert a json string that has...
azadbolour/boardgame
scala-server/app/com/bolour/boardgame/scala/server/domain/json/JsonUtil.scala
Scala
agpl-3.0
719
package lore.compiler.semantics.functions import lore.compiler.feedback.{Feedback, Reporter} import lore.compiler.semantics.NamePath import lore.compiler.semantics.scopes.Binding import lore.compiler.types.TupleType class MultiFunctionDefinition(val name: NamePath, val functions: Vector[FunctionDefinition]) extends B...
marcopennekamp/lore
compiler/src/lore/compiler/semantics/functions/MultiFunctionDefinition.scala
Scala
mit
1,218
/* * Copyright (C) 2012 The Regents of The University California. * All rights reserved. * * 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/LICENS...
sameeragarwal/blinkdb_dev
src/main/scala/shark/execution/serialization/HiveStructSerializer.scala
Scala
apache-2.0
1,920
/* * 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 ...
u2009cf/spark-radar
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLDriver.scala
Scala
apache-2.0
3,305
/* * 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/controllers/StaffPanelController.scala
Scala
gpl-3.0
3,383
package bijection object BufferableGenerator { val pkg = "package com.twitter.bijection" /* Example of the code generated: implicit def tuple2[A,B](implicit ba: Bufferable[A], bb: Bufferable[B]): Bufferable[(A,B)] = new AbstractBufferable[(A,B)] { def put(bytebuf: ByteBuffer, tup: (A,B)) = { ...
twitter/bijection
project/BufferableGenerator.scala
Scala
apache-2.0
3,072
/* * 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 ...
Panos-Bletsos/spark-cost-model-optimizer
graphx/src/main/scala/org/apache/spark/graphx/lib/PageRank.scala
Scala
apache-2.0
14,439
/* * Copyright 2008-present MongoDB, 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 ag...
rozza/mongo-scala-driver
driver/src/main/scala/org/mongodb/scala/MongoNamespace.scala
Scala
apache-2.0
987
package org.jetbrains.plugins.scala package codeInsight.delegate import com.intellij.codeInsight.generation._ import com.intellij.codeInsight.{CodeInsightBundle, CodeInsightUtilBase} import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.editor.{Editor, ScrollType} import com.intellij.o...
igrocki/intellij-scala
src/org/jetbrains/plugins/scala/codeInsight/delegate/ScalaGenerateDelegateHandler.scala
Scala
apache-2.0
10,996
package swarmize.aws.swf import com.amazonaws.AmazonWebServiceRequest import com.amazonaws.handlers.AsyncHandler import com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowAsync import com.amazonaws.services.simpleworkflow.model._ import scala.concurrent.{Future, Promise} object SwfAsyncHelpers { class Asyn...
FreeSchoolHackers/swarmize
shared-lib/src/main/scala/swarmize/aws/swf/SwfAsyncHelpers.scala
Scala
apache-2.0
1,587
import org.scalacheck._ import Prop._ class SimpleTest extends Properties("Simple") { property("increment scala") = forAll( (i: Int) => (new a.b.ScalaA).increment(i) == i+1) property("increment java") = forAll( (i: Int) => (new JavaA).inc(i) == i+1) // property("decrement scala") = forAll( (i: Int) => (new ...
Duhemm/sbt
sbt/src/sbt-test/project/flatten/test-src/SimpleTest.scala
Scala
bsd-3-clause
499
package ch.uzh.ifi.pdeboer.pplib.hcomp.ballot.snippet import com.typesafe.scalalogging.LazyLogging import scala.xml._ /** * Created by mattia on 02.09.15. */ case class SnippetHTMLValidator(baseURL: String) extends LazyLogging { def fixFormAttributes(ns: NodeSeq): NodeSeq = { val htmlToDisplayOnBallotPage: Nod...
manuelroesch/PaperValidator
app/helper/questiongenerator/snippet/SnippetHTMLValidator.scala
Scala
mit
2,120
/* * Copyright (c) 2016. Fengguo (Hugo) Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Detailed co...
arguslab/argus-cit-intellij
src/main/scala/org/argus/cit/intellij/jawa/lang/structureview/JawaStructureViewModel.scala
Scala
epl-1.0
1,422
package ai.dragonfly.versionedjson.examples.test object TestVersionedJson extends App { Tests.testVersionedJson() }
dragonfly-ai/VersionedJsonForScalaJs
versionedjson/jvm/src/main/scala/ai/dragonfly/versionedjson/examples/test/TestVersionedJson.scala
Scala
apache-2.0
120
/*- * #%L * FWAPP Framework * %% * Copyright (C) 2016 - 2017 Open Design Flow * %% * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) a...
opendesignflow/fwapp
src/main/scala/org/odfi/wsb/fwapp/lib/security/provider/kerberos/KerberosAuthenticator.scala
Scala
agpl-3.0
1,322
/* * Copyright (c) 2018. Fengguo Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License v2.0 * which accompanies this distribution, and is available at * https://www.apache.org/licenses/LICENSE-2.0 * * Detailed contributors ar...
arguslab/Argus-SAF
jawa/src/main/scala/org/argus/jawa/core/compiler/parser/LightWeightJawaParser.scala
Scala
apache-2.0
2,481