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) 2014 Szu-Hsien Lee (misgod.tw@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable la...
misgod/twculture
server/src/main/scala/com/a30corner/twculture/server/OpenData.scala
Scala
apache-2.0
10,256
/* * Copyright 2019 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
laws/src/main/scala/org/http4s/laws/HttpCodecLaws.scala
Scala
apache-2.0
999
/* * Copyright 2017-2020 Aleksey Fomkin * * 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...
fomkin/korolev
modules/effect/src/main/scala/korolev/effect/Scheduler.scala
Scala
apache-2.0
3,224
/* * 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.jsenv.test.kit import sca...
nicolasstucki/scala-js
js-envs-test-kit/src/main/scala/org/scalajs/jsenv/test/kit/IOReader.scala
Scala
apache-2.0
3,352
import play.api._ import com.mongodb.casbah.Imports._ import utils.Config object Global extends GlobalSettings { // Override onStart to create the TTL index on the verifiers collection override def onStart(app: Application) { val key = MongoDBObject("created-at" -> 1) val option = MongoDBObject("expireAf...
whereuat/whereuat-server
app/Global.scala
Scala
apache-2.0
824
package io.eels.component.jdbc import java.sql.Connection import com.sksamuel.exts.Logging import com.sksamuel.exts.jdbc.ResultSetIterator import io.eels.Row import io.eels.schema.StructType class JdbcInserter(val connFn: () => Connection, val table: String, val schema: StructTy...
stheppi/eel
eel-components/src/main/scala/io/eels/component/jdbc/JdbcInserter.scala
Scala
apache-2.0
2,171
package zeroformatter import dog._ import scalaz.std.anyVal._ sealed trait TestADT extends Union[Int] with Product with Serializable @ZeroFormattable final case class Test0(@Index(0) a: Int) extends TestADT { override val key = 1 } @ZeroFormattable final case class Test1(@Index(0) b: Int, @Index(1) c: Int) exte...
pocketberserker/scala-zero-formatter
zero-formatter/src/test/scala/zeroformatter/UnionFormatterTest.scala
Scala
mit
1,766
package name.abhijitsarkar.akka import akka.actor.ActorSystem import akka.stream.ActorMaterializer import org.scalatest.{ FlatSpec, Matchers } import scala.concurrent.{ Await, Future } /** * @author Abhijit Sarkar */ class PartialGraphSpec extends FlatSpec with Matchers { "partial graph" should "pick the greates...
asarkar/akka
akka-streams-learning/random-examples/src/test/scala/name/abhijitsarkar/akka/PartialGraphSpec.scala
Scala
gpl-3.0
598
import edu.uta.diql._ import org.apache.spark._ import org.apache.spark.rdd._ import org.apache.spark.sql._ import org.apache.log4j._ import scala.util.Random import org.apache.spark.api.java.JavaRDD object StringMatch { def main ( args: Array[String] ) { val repeats = args(0).toInt val length = args(1).toL...
fegaras/DIQL
benchmarks/sqlgen/StringMatch.scala
Scala
apache-2.0
3,069
package mesosphere.marathon.api.v2.json import java.lang.{ Double => JDouble, Integer => JInt } import java.util.concurrent.TimeUnit.SECONDS import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.core._ import com.fasterxml.jackson.databind.Module.SetupContext import com.fasterxml.j...
sttts/marathon
src/main/scala/mesosphere/marathon/api/v2/json/MarathonModule.scala
Scala
apache-2.0
10,230
/* * 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...
wzhongyuan/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/utils/serializer/SerializerSpec.scala
Scala
apache-2.0
18,579
// Copyright 2017 EPFL DATA Lab (data.epfl.ch) // // 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...
epfldata/squid
src/test/scala/squid/ir/BindingNormalizerTests.scala
Scala
apache-2.0
1,825
/* * Copyright (C) 2017 Radicalbit * * This file is part of flink-JPMML * * flink-JPMML 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) an...
francescofrontera/flink-jpmml
flink-jpmml-scala/src/main/scala/io/radicalbit/flink/pmml/scala/package.scala
Scala
agpl-3.0
5,956
/* * Copyright 2001-2008 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...
kevinwright/scalatest
src/main/scala/org/scalatest/FunSuite.scala
Scala
apache-2.0
55,243
package com.rasterfoundry import com.rasterfoundry.datamodel._ import _root_.io.circe._ import _root_.io.circe.generic.semiauto._ import _root_.io.circe.parser._ import _root_.io.circe.syntax._ import cats.syntax.either._ import geotrellis.proj4.CRS import geotrellis.raster._ import geotrellis.raster.io.geotiff._ imp...
raster-foundry/raster-foundry
app-backend/common/src/main/scala/package.scala
Scala
apache-2.0
11,327
package code package snippet import scala.xml.{NodeSeq, Text} import net.liftweb.util._ import net.liftweb.http._ import js._ import JsCmds._ import JE._ import SHtml._ import net.liftweb.common._ import java.util.Date import code.lib._ import Helpers._ class HelloWorld { lazy val date: Box[Date] = De...
Shadowfiend/lift-tests
src/main/scala/code/snippet/HelloWorld.scala
Scala
mit
893
package controllers import play.api._ import play.api.mvc._ import play.api.libs.json._ import play.api.data._ import play.api.data.Forms._ object Application extends Controller { case class ShortUrl(id: Int, name: String, longUrl: String) implicit val urlWrites = Json.writes[ShortUrl] val form = Form( ...
patrickmedaugh/shortnr
app/controllers/Application.scala
Scala
mit
1,023
import scala.collection.mutable case class FPNode(var tree: FPTree, var item: Option[String], var parent: Option[FPNode], var count: Int = 1) { val children: mutable.Map[String, FPNode] = mutable.Map.empty var neighbour = None: Option[FPNode] // Add this as a child to the parent if (parent....
jayadeepk/FPGrowth
src/FPNode.scala
Scala
mit
1,694
package net.caoticode.dirwatcher.actors import akka.actor.Actor import net.caoticode.dirwatcher.FSListener /** * @author Daniel Camarda (0xcaos@gmail.com) * */ class ListenerActor(listener: FSListener) extends Actor { def receive = { case Messages.Create(path) => listener.onCreate(path) case Messages.Del...
mdread/dir-watcher
src/main/scala/net/caoticode/dirwatcher/actors/ListenerActor.scala
Scala
mit
434
/* * 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 ...
Lewuathe/dllib
src/test/scala/com/lewuathe/dllib/XORSpec.scala
Scala
apache-2.0
1,292
/* * SPDX-License-Identifier: Apache-2.0 * Copyright 2016-2020 Daniel Urban and contributors listed in NOTICE.txt * * 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.ap...
durban/exp-reagents
stress/src/main/scala/dev/tauri/choam/jcStressMacros.scala
Scala
apache-2.0
5,914
object basic { enum Expr[A] { case IntExpr(value: Int) extends Expr[Int] case Other[T](value: T) extends Expr[T] } class C[A] { def eval(e: Expr[A]): A = e match { case Expr.IntExpr(i) => i + 2 case Expr.Other(v) => v } } }
dotty-staging/dotty
tests/pos/class-gadt/basic.scala
Scala
apache-2.0
273
import edu.insight.unlp.nn.example.TwitterSentiMain import org.apache.spark.rdd.RDD import org.json4s.NoTypeHints import org.json4s.jackson.Serialization import org.json4s.jackson.Serialization._ import scala.util.parsing.json.JSON /** * Created by cnavarro on 24/11/15. */ object SparkSentiment { def extractSen...
canademar/me_extractors
BRMDemoReview/src/main/scala/SparkSentiment.scala
Scala
gpl-2.0
3,368
package pl.touk.nussknacker.engine.process.helpers import cats.data.Validated.Valid import cats.data.ValidatedNel import io.circe.generic.JsonCodec import org.apache.flink.api.common.ExecutionConfig import org.apache.flink.api.common.eventtime.WatermarkStrategy import org.apache.flink.api.common.functions.{FilterFunct...
TouK/nussknacker
engine/flink/test-utils/src/main/scala/pl/touk/nussknacker/engine/process/helpers/SampleNodes.scala
Scala
apache-2.0
35,189
package eventstore package core package settings import java.net.InetSocketAddress import scala.concurrent.duration._ import com.typesafe.config.Config import syntax._ /** * @param address IP & port of Event Store * @param connectionTimeout The desired connection timeout * @param maxReconnections Maximum number of...
EventStore/EventStore.JVM
core/src/main/scala/eventstore/core/settings/EsSettings.scala
Scala
bsd-3-clause
5,018
package org.aja.dhira.nnql /** * Created by mdhandapani on 18/5/16. */ object NNQLCommands { trait RunTimeActions trait NNQlExpr case class CreateNeurons(n: Long, interconnections: Boolean) extends NNQlExpr case class CreateLayer(n: Long) extends NNQlExpr case class LoadData(csvPath: String, referenceN...
Mageswaran1989/aja
src/main/scala/org/aja/dhira/src/main/scala/org/dhira/core/nnql/NNQLCommands.scala
Scala
apache-2.0
734
/* * Copyright (C) 2014 - 2017 Contributors as noted in the AUTHORS.md file * * 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)...
Tensei-Data/tensei-agent
src/it/scala/databases/derby/DatabaseWriterActorTest.scala
Scala
agpl-3.0
60,902
/** * Magmanics Licensing. This web application allows for centralized control * of client application activation, with optional configuration parameters * to control licensable features, and storage of supplementary information * about the client machine. Client applications may interface with this * central serv...
manicmonkey/licensing
Licensing-UI-Vaadin/src/main/scala/com/magmanics/licensing/ui/content/configuration/ConfigurationDetailTable.scala
Scala
gpl-3.0
1,851
package org.libss.util /** * Created by Kaa * on 22.06.2016 at 01:41. */ trait PageableBase { var page: Long = 1L var itemsPerPage: Long = 10L } object SortOrdering { val Asc = "asc" val Desc = "desc" } trait SortableBase { var sort: String = null var ordering: String = null }
kanischev/libss
libss-utils/src/main/scala/org/libss/util/PageableBase.scala
Scala
apache-2.0
300
package org.scaladebugger.api.lowlevel.breakpoints import org.scalamock.scalatest.MockFactory import org.scalatest.{FunSpec, Matchers, ParallelTestExecution} import org.scaladebugger.api.lowlevel.requests.JDIRequestArgument import org.scaladebugger.test.helpers.ParallelMockFunSpec import test.TestBreakpointManager im...
ensime/scala-debugger
scala-debugger-api/src/test/scala/org/scaladebugger/api/lowlevel/breakpoints/BreakpointManagerSpec.scala
Scala
apache-2.0
2,257
package nest.sparkle.util import scala.concurrent.{ExecutionContext, Future} import scala.concurrent.duration._ import akka.util.Timeout import java.util.concurrent.TimeoutException /** Utility to repeatedly call a function that returns a future. */ object RetryingFuture extends Log{ /** Call a function that retur...
mighdoll/sparkle
util/src/main/scala/nest/sparkle/util/RetryingFuture.scala
Scala
apache-2.0
1,067
package chapter3 sealed trait Tree[+A] case class Leaf[A](value: A) extends Tree[A] case class Branch[A](left: Tree[A], right: Tree[A]) extends Tree[A] object Tree { def size[A](tree : Tree[A]) : Int = tree match { case Branch(l, r) => size(l) + size(r) + 1 case Leaf(v) => 1 } def maximum(tree: Tree...
IvanGuardado/fp-exercises
chapters/src/chapter3/Tree.scala
Scala
mit
599
package utils import java.util.Properties import com.typesafe.config.ConfigFactory import kafka.admin.AdminUtils import kafka.utils.ZKStringSerializer import org.I0Itec.zkclient.ZkClient object KafkaAdminUtils { val sessionTimeoutMs = 10000 val connectionTimeoutMs = 10000 val zkClient = new ZkClient(zookeper...
MarianoGappa/kafka-examples
src/main/scala/utils/KafkaAdminUtils.scala
Scala
mit
768
package org.jetbrains.plugins.scala.lang.scaladoc.psi.impl import com.intellij.lang.ASTNode import org.jetbrains.plugins.scala.lang.psi.ScalaPsiElementImpl import org.jetbrains.plugins.scala.lang.scaladoc.psi.api.ScDocInnerCodeElement /** * User: Dmitry Naidanov * Date: 11/14/11 */ class ScDocInnerCodeElementImpl...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/scaladoc/psi/impl/ScDocInnerCodeElementImpl.scala
Scala
apache-2.0
445
/* * Copyright (C) 2014 Lymia Aluysia <lymiahugs@gmail.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy...
Lymia/JoustExt
src/main/scala/moe/lymia/joustext/astextension.scala
Scala
mit
3,674
package io.finch.endpoint import com.twitter.finagle.http.{Method => FinagleMethod} import io.finch._ private[finch] class Method[F[_], A](m: FinagleMethod, e: Endpoint[F, A]) extends Endpoint.Mappable[F, A] { self => final def apply(input: Input): EndpointResult[F, A] = if (input.request.method == m) e(input)...
finagle/finch
core/src/main/scala/io/finch/endpoint/method.scala
Scala
apache-2.0
605
package es.weso.rbe case class OutputInfo[Edge, Node, Label, Err, Evidence]( evidences: List[((Node, Label), String)], // Evidences that are tried visited: Set[(Node, Edge, Node)] // Visited triples )
labra/rbe
src/main/scala/es/weso/rbe/OutputInfo.scala
Scala
mit
208
package scala.slick.ast import scala.language.{implicitConversions, higherKinds} import scala.slick.SlickException import scala.collection.generic.CanBuild import scala.collection.mutable.{Builder, ArrayBuilder} import scala.reflect.{ClassTag, classTag => mkClassTag} import Util._ import scala.collection.mutable.Array...
dvinokurov/slick
src/main/scala/scala/slick/ast/Type.scala
Scala
bsd-2-clause
15,300
/** * Copyright 2010-2012 Alex Jones * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with work for additional information * regarding copyright ownership. The ASF licenses file * to you under the Apache License, Version ...
unclealex72/west-ham-calendar
app/update/MainUpdateServiceImpl.scala
Scala
apache-2.0
6,880
package com.ponkotuy.value import scala.collection.JavaConversions._ import com.typesafe.config.{Config, ConfigFactory} import org.slf4j.{Logger, LoggerFactory} /** * Date: 14/06/10 */ case class KCServer(number: Int, ip: String, name: String) object KCServer { val configName = "kc-server" lazy val logger: Log...
ponkotuy/MyFleetGirls
library/src/main/scala/com/ponkotuy/value/KCServer.scala
Scala
mit
1,153
package com.ibm.watson.developer_cloud.service import spray.json._ /** * Created by Martin Harvan (martin.harvan@sk.ibm.com) on 06/04/16. */ abstract class GenericModel { override def equals(o: Any) : Boolean = { Option(o) match { case Some(g: GenericModel) => this.toString.equals(g.toString) ca...
kane77/watson-scala-wrapper
src/main/scala/com/ibm/watson/developer_cloud/service/GenericModel.scala
Scala
apache-2.0
446
package reactivemongo.api import scala.concurrent.{ ExecutionContext, Future } import reactivemongo.core.protocol.Response /** Internal cursor operations. */ trait CursorOps[T] { cursor: Cursor[T] => /** Sends the initial request. */ private[reactivemongo] def makeRequest(maxDocs: Int)(implicit ec: ExecutionCont...
ReactiveMongo/ReactiveMongo
driver/src/main/scala/api/CursorOps.scala
Scala
apache-2.0
1,679
package no.finn.repoindexer.flows import akka.actor.ActorSystem import akka.http.scaladsl.model._ import akka.http.scaladsl.model.headers.{BasicHttpCredentials, Authorization} import akka.stream.ActorMaterializer import akka.stream.scaladsl.{Flow, Source} import akka.util.ByteString import com.typesafe.config.ConfigFa...
chriswk/repoindexer
indexer/src/main/scala/no/finn/repoindexer/flows/Stash.scala
Scala
mit
2,945
/* _____ _ __ ________ ___ *\\ ** / ___/(_) |/ / ___/ |__ \\ Simple Mechanics Simulator 2 ** ** \\__ \\/ / /|_/ /\\__ \\ __/ / copyright (c) 2011 Jakob Odersky ** ** ___/ / / / / /___/ / / __/ ** ** /____/_/_/ /_/...
jodersky/sims2
src/main/scala/sims/collision/broadphase/BroadPhaseDetector.scala
Scala
bsd-3-clause
1,437
/* * Copyright 2013 TeamNexus * * TeamNexus Licenses this file to you under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://opensource.org/licenses/mit-license.php * * Unless required by applicable law ...
crvidya/nexus-scala
src/main/scala/com/nexus/network/NetworkRegistry.scala
Scala
mit
1,793
package io.github.mandar2812.dynaml.modelpipe import breeze.linalg.{DenseMatrix, DenseVector} import breeze.stats.distributions.{ContinuousDistr, Moments} import io.github.mandar2812.dynaml.algebra.{PartitionedPSDMatrix, PartitionedVector} import io.github.mandar2812.dynaml.models.gp.AbstractGPRegressionModel import i...
transcendent-ai-labs/DynaML
dynaml-core/src/main/scala/io/github/mandar2812/dynaml/modelpipe/MixturePipe.scala
Scala
apache-2.0
2,796
package com.datastax.spark.connector.rdd.partitioner import java.net.InetAddress import org.apache.spark.Partition import com.datastax.spark.connector.rdd.partitioner.dht.{Token, TokenFactory, TokenRange} /** Stores a CQL `WHERE` predicate matching a range of tokens. */ case class CqlTokenRange[V, T <: Token[V]](ra...
ponkin/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/rdd/partitioner/CassandraPartition.scala
Scala
apache-2.0
1,827
package io.questions.model.questionnaire import cats.syntax.show._ import io.questions.QuestionsSpec import io.questions.model.questionnaire.Element._ import io.questions.model.questionnaire.NodeMetadata._ import io.questions.model.questionnaire.nodekey.NodeKey class QuestionnaireNodeMetadataUpdaterSpec extends Quest...
channingwalton/qanda
questionnaire/src/test/scala/io/questions/model/questionnaire/QuestionnaireNodeMetadataUpdaterSpec.scala
Scala
mit
2,025
package org.gbougeard.model.changes /** * Created with IntelliJ IDEA. * User: gbougeard * Date: 13/07/13 * Time: 20:53 * To change this template use File | Settings | File Templates. */ case class CommitInfo(commit: String, parent: List[CommitInfo], author: GitPersonIn...
gbougeard/gas
src/main/scala/org/gbougeard/model/changes/CommitInfo.scala
Scala
apache-2.0
624
package me.yingrui.segment.word2vec import java.io._ import java.lang.Math.sqrt import java.lang.System.currentTimeMillis import scala.collection.mutable.ListBuffer class WordIndexReader(val inputFile: String, val vocab: Vocabulary, val window: Int = 5) { private val reader = new DataInputStream(new FileInputStrea...
yingrui/mahjong
lib-segment/src/main/scala/me/yingrui/segment/word2vec/WordIndexReader.scala
Scala
gpl-3.0
1,687
/** * Copyright (C) 2010 Orbeon, Inc. * * 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 * 2.1 of the License, or (at your option) any later version. * * This program i...
brunobuzzi/orbeon-forms
src/main/scala/org/orbeon/oxf/processor/EmailProcessor.scala
Scala
lgpl-2.1
16,301
package breeze.numerics import org.scalatest.funsuite.AnyFunSuite import breeze.numerics.constants._ /** * @author ktakagaki * @date 3/13/14. */ class constantsTest extends AnyFunSuite { test("constants test") { assert(Database.unit("atomic mass constant energy equivalent") == "J") assert(Database.unit(...
scalanlp/breeze
math/src/test/scala/breeze/numerics/constantsTest.scala
Scala
apache-2.0
359
/* * #%L * Active OCR Utilities * %% * Copyright (C) 2011 - 2012 Maryland Institute for Technology in the Humanities * %% * 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 * * htt...
umd-mith/activeocr
util/src/main/scala/edu/umd/mith/activeocr/util/model/TessReader.scala
Scala
apache-2.0
5,502
package sgl.geometry object Collisions { def circleWithCircle(c1: Circle, c2: Circle): Boolean = { val dist = (c1.center - c2.center) val n2 = dist.x*dist.x + dist.y*dist.y n2 <= (c1.radius+c2.radius)*(c1.radius+c2.radius) } def aabbWithAabb(r1: Rect, r2: Rect): Boolean = { val noCollision = r2...
regb/scala-game-library
core/src/main/scala/sgl/geometry/Collisions.scala
Scala
mit
3,022
package com.monovore.example.coast import com.monovore.coast.flow._ import com.monovore.coast.wire.BinaryFormat import scala.collection.immutable.SortedSet /** * An implementation of connected components: given a stream of new edges, we * incrementally maintain a mapping of node id to component id -- where the id ...
milinda/coast
core/src/main/scala/com/monovore/example/coast/ConnectedComponents.scala
Scala
apache-2.0
2,510
/* NSC -- new scala compiler * Copyright 2005-2013 LAMP/EPFL * @author Martin Odersky */ package scala package reflect package internal import scala.annotation.elidable import scala.collection.mutable import util._ import java.util.concurrent.TimeUnit import scala.reflect.internal.{TreeGen => InternalTreeGen} ab...
jvican/scala
src/reflect/scala/reflect/internal/SymbolTable.scala
Scala
bsd-3-clause
15,158
package app.adapters.database.support import scala.slick.driver.JdbcProfile trait DbProfile { val profile: JdbcProfile val dbConfig: DbConfig }
mericano1/spray-akka-slick-postgres
src/main/scala/app/adapters/database/support/DbProfile.scala
Scala
mit
150
package com.socrata.balboa.impl import com.socrata.balboa.metrics.Message import com.socrata.metrics.components.{EmergencyFileWriterComponent, MessageQueueComponent} import org.slf4j.LoggerFactory /** * Component that contains a collection of other [[MessageQueueComponent]]s. When a metrics * message is sent throu...
socrata-platform/balboa
balboa-client-dispatcher/src/main/scala/com/socrata/balboa/impl/BalboaDispatcherComponent.scala
Scala
apache-2.0
1,537
import io.gatling.core.Predef._ // 2 import io.gatling.http.Predef._ import scala.concurrent.duration._ class CustomerResourceTest extends Simulation { val conf = http.baseURL("http://localhost:8080") val scn = scenario("Gatling") .during(1 minute) { exec( http("json").get("/products") ) ...
AlexBischof/vertx-elasticsearch-quickstart
src/test/scala/ProductsPerformanceTest.scala
Scala
apache-2.0
402
/* * GNU GENERAL PUBLIC LICENSE * Version 2, June 1991 * * Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/> * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Everyone is permitted to copy and distribute verbatim copies * of this license document, ...
P1tt187/fhs-schedule-generator
app/models/fhs/pages/blaimport/MBLAFileUpload.scala
Scala
gpl-2.0
21,644
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala package collecti...
lrytz/scala
src/library/scala/collection/mutable/MutationTracker.scala
Scala
apache-2.0
2,944
package io.buoyant package admin.names import com.fasterxml.jackson.annotation._ import com.fasterxml.jackson.core.{io => _, _} import com.fasterxml.jackson.databind._ import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion import com.fasterxml.jackson.databind.module.SimpleModule import com.fasterxml...
pawelprazak/linkerd
admin/src/main/scala/io/buoyant/admin/names/DelegateApiHandler.scala
Scala
apache-2.0
13,692
// code-examples/AdvOOP/objects/button.scala package objects import ui3.Clickable class Button(val label: String) extends Widget with Clickable { def click() = { // Logic to give the appearance of clicking a button... } def draw() = { // Logic to draw the button on the display, web page, etc. } ...
foomango/scalaex
minimalscala/src/main/scala/AdvOOP/objects/button.scala
Scala
mit
472
package breeze.collection.mutable /* Copyright 2009 David Hall, Daniel Ramage 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 ...
wavelets/breeze
src/test/scala/breeze/collection/mutable/BeamTest.scala
Scala
apache-2.0
1,377
/* * 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 ...
darionyaphet/spark
core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala
Scala
apache-2.0
48,902
package net.azalea.curl import org.apache.http.impl.client.{DefaultRedirectStrategy, HttpClients} import org.apache.http.client.methods._ import org.apache.http.protocol.HTTP._ import org.apache.http._ import org.apache.commons.io.IOUtils import java.nio.charset.Charset import org.apache.http.client.{CredentialsProvid...
Sunao-Yoshii/scala_curl
src/main/scala/net/azalea/curl/HTTP.scala
Scala
apache-2.0
4,451
package scredis.exceptions /** * Wraps all IO exceptions */ final case class RedisIOException( message: String = null, cause: Throwable = null ) extends RedisException(message, cause)
Livestream/scredis
src/main/scala/scredis/exceptions/RedisIOException.scala
Scala
apache-2.0
190
package weatherApp.components import japgolly.scalajs.react.ScalaFnComponent import japgolly.scalajs.react.vdom.html_<^._ import scala.scalajs.js import scala.scalajs.js.annotation.JSImport object HeaderBtn { @JSImport("../../assets/images/github.png", JSImport.Namespace) @js.native object GithubLogo extends j...
malaman/scala-weather-app
frontend/src/main/scala/weatherApp/components/HeaderBtn.scala
Scala
mit
1,106
// Copyright (c) 2018. Distributed under the MIT License (see included LICENSE file). package cocoa.foundation import scalanative.native._ import objc._ @ObjC class NSMutableDictionary[K<:NSObject,V<:NSObject] extends NSDictionary[K,V] { @inline def removeObjectForKey_(aKey: K): Unit = extern @inline def setObjec...
jokade/scalanative-cocoa
foundation/src/main/scala/cocoa/foundation/NSMutableDictionary.scala
Scala
mit
3,374
/* * 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...
intel-analytics/BigDL
scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/nn/keras/nn/SpatialDropout3DSpec.scala
Scala
apache-2.0
2,398
/* * 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...
travisbrown/scalatest
src/test/scala/org/scalatest/events/TestLocationJUnit3Suite.scala
Scala
apache-2.0
1,210
/* * Copyright 2015 * * 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, ...
TouK/influxdb-reporter
core/src/main/scala/influxdbreporter/core/collectors/CollectorOps.scala
Scala
apache-2.0
1,674
package main.scala.nl.in4392.worker import com.typesafe.config.ConfigFactory import akka.kernel.Bootable import akka.actor.{ ActorRef, Props, Actor, ActorSystem } import akka.actor.ActorPath import java.util.UUID import nl.tudelft.ec2interface.instancemanager._ class WorkerDaemon extends Bootable { val instanceIn...
jhejderup/Awsseract
awsseract-core/src/main/scala/nl/in4392/worker/WorkerDaemon.scala
Scala
apache-2.0
993
package scray.hdfs.compaction.conf /** * container class for configuration parameters. */ case class CompactionJobParameter( var indexFilesInputPath: String = "hdfs://10.11.22.41/scray-data/in", var indexFilesOutputPath: String = "hdfs://10.11.22.41/scray-data/out", var dataFilesInputPath: String ...
scray/scray
scray-hdfs/modules/scray-hdfs-compaction-job/src/main/scala/scray/hdfs/compaction/conf/CompactionJobParameter.scala
Scala
apache-2.0
437
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
VinACE/adam
adam-core/src/test/scala/org/bdgenomics/adam/util/FlattenerSuite.scala
Scala
apache-2.0
3,044
/* * 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 ...
ebruchez/darius-xml.js
xerces/shared/src/main/scala/org/orbeon/apache/xerces/impl/XMLDocumentScannerImpl.scala
Scala
apache-2.0
36,989
/** * 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 not...
sslavic/kafka
core/src/test/scala/integration/kafka/api/DescribeAuthorizedOperationsTest.scala
Scala
apache-2.0
9,981
package org.jetbrains.plugins.scala package lang package parser package parsing package top.params import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder import org.jetbrains.plugins.scala.lang.parser.util.ParserUtils /** * @author ...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/parser/parsing/top/params/ClassParamClause.scala
Scala
apache-2.0
2,123
package gitbucket.core.util import gitbucket.core.controller.ControllerBase import gitbucket.core.service.{AccountService, RepositoryService} import gitbucket.core.model.Role import RepositoryService.RepositoryInfo import Implicits._ /** * Allows only oneself and administrators. */ trait OneselfAuthenticator { self...
gitbucket/gitbucket
src/main/scala/gitbucket/core/util/Authenticator.scala
Scala
apache-2.0
6,403
/* * 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
sql/core/src/test/scala/org/apache/spark/sql/IntegratedUDFTestUtils.scala
Scala
apache-2.0
12,987
/* * 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 ...
yanboliang/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/DataSourceScanExec.scala
Scala
apache-2.0
18,147
import scala.reflect.runtime.universe object ScalaReflection { def main(args: Array[String]): Unit = { //val theType = getTypeTag(classOf[Member]).tpe val theType = getType(classOf[Member]) println(s"typeTag.declarations => ${theType.declarations}") println(s"typeTag.members => ${theType.members}") ...
kazuhira-r/scala-2.10.0-trial
reflection/ScalaReflection.scala
Scala
mit
4,601
package com.amichalo.smooolelo.config import com.typesafe.config.Config trait MoooleloServerConfig { def host: String def port: Int } object MoooleloServerConfig { def fromConfig(config: Config): MoooleloServerConfig = new MoooleloServerConfig { override def host: String = config.getString("server.host") ...
amichalo/smooolelo
src/main/scala/com/amichalo/smooolelo/config/MoooleloServerConfig.scala
Scala
apache-2.0
382
object Test { //println("java.library.path=" + System.getProperty("java.library.path")) val sysWordSize = System.getProperty("sun.arch.data.model", "32") val sysType = System.getProperty("os.name") val libName = if (sysType == "Mac OS X") "natives" else "natives-" + sysWordSize System....
felixmulder/scala
test/files/jvm/natives.scala
Scala
bsd-3-clause
523
package fpinscala.answers import scala.language.implicitConversions import scala.language.postfixOps import scala.language.higherKinds import language.higherKinds package object iomonad { import fpinscala.answers.parallelism.Nonblocking._ type IO[A] = IO3.IO[A] def IO[A](a: => A): IO[A] = IO3.IO[A](a) impli...
peterbecich/fpinscala
answers/src/main/scala/fpinscala/iomonad/package.scala
Scala
mit
1,199
package com.sksamuel.elastic4s import com.sksamuel.elastic4s.source.{ Indexable, DocumentMap, DocumentSource } import org.elasticsearch.action.index.IndexRequest.OpType import org.elasticsearch.action.index.{ IndexRequest, IndexResponse } import org.elasticsearch.client.Client import org.elasticsearch.common.xcontent....
l15k4/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/IndexDsl.scala
Scala
apache-2.0
3,570
package com.lucidchart.open.nark.request import java.util.UUID import play.api.Play import play.api.Play.current import play.api.Mode import play.api.libs.iteratee.Done import play.api.mvc._ import play.api.mvc.Results._ /** * Provides helpers for creating `EnvironmentAction` values. */ trait EnvironmentActionBuil...
lucidsoftware/nark
app/com/lucidchart/open/nark/request/EnvironmentAction.scala
Scala
apache-2.0
1,542
package org.bitcoins.keymanager import com.typesafe.config.ConfigFactory import org.bitcoins.core.crypto.BIP39Seed import org.bitcoins.core.crypto.ExtKeyVersion.SegWitMainNetPriv import org.bitcoins.core.util.TimeUtil import org.bitcoins.crypto.AesPassword import org.bitcoins.keymanager.ReadMnemonicError._ import org....
bitcoin-s/bitcoin-s
key-manager-test/src/test/scala/org/bitcoins/keymanager/WalletStorageTest.scala
Scala
mit
25,969
/* * 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 ...
SHASHANKB/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/TPCDSQueryBenchmark.scala
Scala
apache-2.0
5,519
package test import cz.kamenitxan.jakon.core.configuration.Settings import org.openqa.selenium.htmlunit.HtmlUnitDriver import org.openqa.selenium.{By, WebDriver, WebElement} import org.scalatest.funsuite.FixtureAnyFunSuite import org.scalatest.{Assertion, Outcome} import scala.collection.mutable import scala.jdk.Coll...
kamenitxan/Jakon
modules/backend/src/test/scala/test/TestBase.scala
Scala
bsd-3-clause
1,618
package org.judal.examples.scala.jdbc import java.math.BigDecimal import org.junit.Test import org.junit.Assert.assertEquals import org.scalatest.Suite import com.knowgate.io.IOUtils import org.judal.Using._ import org.judal.storage.EngineFactory import org.judal.storage.relational.RelationalView i...
sergiomt/judal
aexample/src/main/scala/org/judal/examples/scala/jdbc/E10_WriteCSVDataIntoTheDatabase.scala
Scala
apache-2.0
3,821
package com.msilb.scalanda.streamapi import akka.actor.{ActorRef, FSM, Props} import akka.io.IO import com.msilb.scalanda.common.Environment import com.msilb.scalanda.common.Environment.SandBox import com.msilb.scalanda.common.model.Transaction import com.msilb.scalanda.common.model.TransactionJsonProtocol._ import co...
msilb/scalanda
src/main/scala/com/msilb/scalanda/streamapi/StreamingConnector.scala
Scala
mit
4,751
package com.automatatutor.model import net.liftweb.mapper.MappedString import net.liftweb.mapper.LongKeyedMapper import net.liftweb.mapper.LongKeyedMetaMapper import net.liftweb.mapper.MappedLongForeignKey import net.liftweb.mapper.IdPK import net.liftweb.mapper.By import net.liftweb.mapper.MappedText import scala.xml...
AutomataTutor/automatatutor-frontend
src/main/scala/com/automatatutor/model/PumpingLemmaProblem.scala
Scala
mit
1,561
package at.forsyte.apalache.tla.lir import at.forsyte.apalache.tla.lir.values.{TlaBool, TlaInt} // Igor@02.11.2019: why are TestingPredefs located in src/main? // TODO: move TestingPredefs into src/test trait TestingPredefs { implicit def name( p_s : String ) : NameEx = NameEx( p_s ) implicit def value( p_n : Int...
konnov/apalache
tlair/src/main/scala/at/forsyte/apalache/tla/lir/TestingPredefs.scala
Scala
apache-2.0
1,891
package com.clarifi.reporting package ermine.session import java.util.concurrent._ import com.clarifi.reporting.ermine.{ Result, Success, Failure, Filtered, Document, Death } import com.clarifi.reporting.ermine.Document.{ text, vsep } import scalaz.concurrent.{ Promise, Strategy } import scalaz.concurrent.Strategy._ i...
ermine-language/ermine-legacy
src/main/scala/com/clarifi/reporting/ermine/session/SessionTask.scala
Scala
bsd-2-clause
1,500
package cz.vse.easyminer.rest import akka.actor.ActorRefFactory import spray.http.ContentType import spray.http.HttpEntity import spray.http.MediaTypes import spray.http.StatusCodes import spray.http.Uri import spray.routing.Directives import MediaTypes._ import spray.routing.RoutingSettings import spray.routing.direc...
KIZI/EasyMiner-Apriori-R
src/main/scala/cz/vse/easyminer/rest/EndpointDoc.scala
Scala
bsd-3-clause
888
package com.wlangiewicz.brainwallet class BrainwalletSpec extends UnitSpec { "Brainwallet" should "generate WIF for \\"abc\\"" in { val output = Brainwallet.getWIF("abc") output should be ("5KEQgeL4EwjuEAyPQBoaJYVrbt5kSUsrwXPkjzAQTPiNoUxxeS8") } "Brainwallet" should "generate WIF for \\"bitcoin\\"" in {...
wlk/brainwallet-scala
src/test/scala/com/wlangiewicz/brainwallet/BrainwalletSpec.scala
Scala
apache-2.0
1,168
/* * Copyright (C) 2015 Stratio (http://stratio.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
darroyocazorla/crossdata
elasticsearch/src/test/scala/com/stratio/crossdata/connector/elasticsearch/DefaultSourceESSpec.scala
Scala
apache-2.0
2,678
package org.monarchinitiative.dosdp.cli import better.files._ import org.eclipse.rdf4j.model.vocabulary.DCTERMS import org.monarchinitiative.dosdp.cli.DOSDPError.{logError, logErrorFail} import org.monarchinitiative.dosdp.cli.Main.loggingContext import org.monarchinitiative.dosdp.{DOSDP, Utilities} import org.phenosca...
INCATools/dosdp-tools
src/main/scala/org/monarchinitiative/dosdp/cli/Prototype.scala
Scala
mit
2,686
package us.feliscat.ir.fulltext.indri import us.feliscat.m17n.MultiLingual import us.feliscat.text.StringOption import us.feliscat.util.LibrariesConfig import scala.collection.mutable /** * <pre> * Created on 2017/01/08. * </pre> * * @author K.Sakamoto */ trait Retrieval extends MultiLingual { protecte...
ktr-skmt/FelisCatusZero-multilingual
libraries/src/main/scala/us/feliscat/ir/fulltext/indri/Retrieval.scala
Scala
apache-2.0
1,261