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 |
|---|---|---|---|---|---|
import sbt._
import scala._
object Resolvers {
//lazy val localm2 = "Local Maven Repository" at "file://"+Path.userHome+"/.m2/repository"
lazy val mvncentral = "Maven Central" at "http://repo1.maven.org/maven2/"
lazy val typesafe = Classpaths.typesafeReleases
lazy val ossreleases = "Sonatype OSS Releases" at "... | thecoda/autoproxy | project/Dependencies.scala | Scala | apache-2.0 | 1,565 |
/*
* Copyright 2001-2014 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writ... | dotty-staging/scalatest | scalactic-test/src/test/scala/org/scalactic/anyvals/OddIntMacro.scala | Scala | apache-2.0 | 1,165 |
package co.ledger.wallet.web.ripple.components
import org.scalajs.dom
import scala.scalajs.js
/**
* Created by alix on 4/19/17.
*/
object WindowManager {
def open(url: String) = {
/*val width = 600
val height = 1200
js.Dynamic.global.chrome.app.window.create(url, js.Dynamic.literal(outerBounds = js... | LedgerHQ/ledger-wallet-ripple | src/main/scala/co/ledger/wallet/web/ripple/components/WindowFormatter.scala | Scala | mit | 544 |
package keystoneml.nodes.nlp
import java.lang.Integer.{rotateLeft => rotl}
import breeze.linalg.SparseVector
import keystoneml.workflow.Transformer
import scala.collection.mutable
/**
* Converts the n-grams of a sequence of terms to a sparse vector representing their frequencies,
* using the hashing trick: https:... | amplab/keystone | src/main/scala/keystoneml/nodes/nlp/NGramsHashingTF.scala | Scala | apache-2.0 | 3,723 |
package org.typedsolutions.aws.kinesis
import com.amazonaws.AmazonWebServiceRequest
import com.amazonaws.ClientConfiguration
import com.amazonaws.auth.AWSCredentialsProvider
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain
import com.amazonaws.services.kinesis.{AmazonKinesisAsync => Underlying, AmazonKines... | mattroberts297/akka-kinesis | src/main/scala/org/typedsolutions/aws/kinesis/AmazonKinesisClient.scala | Scala | mit | 3,573 |
/*
* Copyright 2021 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/amls-frontend | app/controllers/renewal/RenewalProgressController.scala | Scala | apache-2.0 | 4,607 |
package com.getbootstrap.savage.server
import scala.util.{Failure, Success, Try}
import org.eclipse.egit.github.core.service.IssueService
import com.getbootstrap.savage.github.{GitHubActorWithLogging, PullRequestNumber}
import com.getbootstrap.savage.PullRequestBuildResult
class PullRequestCommenter extends GitHubAct... | twbs/savage | src/main/scala/com/getbootstrap/savage/server/PullRequestCommenter.scala | Scala | mit | 1,677 |
package com.seanshubin.uptodate.logic
trait PomFileScanner {
def scanPomFiles(): Seq[Pom]
}
| SeanShubin/up-to-date | logic/src/main/scala/com/seanshubin/uptodate/logic/PomFileScanner.scala | Scala | unlicense | 95 |
/*
* 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/nn/ops/SqueezeSpec.scala | Scala | apache-2.0 | 1,135 |
/*
* Copyright 2017 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | liquidarmour/ct-calculations | src/main/scala/uk/gov/hmrc/ct/accounts/frsse2008/AC37.scala | Scala | apache-2.0 | 1,347 |
package ml.combust.mleap.core.feature
import ml.combust.mleap.core.Model
import ml.combust.mleap.core.types._
import ml.combust.mleap.tensor.Tensor
/** Class for a reverse string indexer model.
*
* This model reverses the [[StringIndexerModel]] model.
*
* Use this to go from an integer representation of a lab... | combust-ml/mleap | mleap-core/src/main/scala/ml/combust/mleap/core/feature/ReverseStringIndexerModel.scala | Scala | apache-2.0 | 1,746 |
package scala.slick.ast
import OptimizerUtil._
import collection.mutable.HashMap
import scala.slick.util.RefId
/**
* A tree transformer which replaces nodes transitively while updating
* some information about the tree.
*/
abstract class Transformer extends (Node => Node) { self =>
def replace: PartialFunction[... | szeiger/scala-query | src/main/scala/scala/slick/ast/Transformer.scala | Scala | bsd-2-clause | 3,823 |
package epic.parser
package kbest
import epic.trees._
import scala.collection.mutable.ArrayBuffer
import scala.collection.mutable
import Trees.Zipper._
import epic.trees.Trees.Zipper
object TopDownKBestAStar {
private implicit def ordTKAItem[L]: Ordering[TKAItem[L]] = Ordering[Double].on((_:TKAItem[L]).weight)
d... | maxim-rabinovich/epic | src/main/scala/epic/parser/kbest/TopDownKBestAStar.scala | Scala | apache-2.0 | 4,738 |
package io.getquill.context.async
object SqlTypes extends Enumeration {
type SqlTypes = Value
val BIT, TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, REAL, DOUBLE, NUMERIC, DECIMAL, CHAR, VARCHAR, LONGVARCHAR, DATE, TIME, TIMESTAMP, BINARY, VARBINARY, LONGVARBINARY, NULL, ARRAY, BLOB, BOOLEAN, TIME_WITH_TIMEZONE, TIM... | getquill/quill | quill-async/src/main/scala/io/getquill/context/async/SqlTypes.scala | Scala | apache-2.0 | 358 |
/*
* 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 ... | shuangshuangwang/spark | core/src/main/scala/org/apache/spark/storage/StorageUtils.scala | Scala | apache-2.0 | 10,561 |
package org.jetbrains.plugins.scala.failed.annotator
import org.jetbrains.plugins.scala.PerfCycleTests
import org.jetbrains.plugins.scala.javaHighlighting.JavaHighlightingTestBase
import org.junit.experimental.categories.Category
/**
* @author Alefas
* @since 23/03/16
*/
@Category(Array(classOf[PerfCycleTests])... | ilinum/intellij-scala | test/org/jetbrains/plugins/scala/failed/annotator/JavaHighlightingTest.scala | Scala | apache-2.0 | 6,045 |
package sc.ala.http.mock
import java.util.concurrent.ExecutionException
class RunnableSpec extends TestHelper {
val url : String = s"http://127.0.0.1:$testPort"
def ok(): Unit = assert(get(url).getStatusCode === 200)
def ng(): Unit = intercept[ExecutionException] { get(url) }
describe("Setting()") {
... | xuwei-k/http-mock | src/test/scala/sc/ala/http/mock/RunnableSpec.scala | Scala | mit | 586 |
package arx.core.rich
import arx.core.units.UnitOfMeasure
import arx.core.ArxImplicits
/**
* Created by IntelliJ IDEA.
* User: nvt
* Date: 3/4/13
* Time: 4:44 PM
* Created by nonvirtualthunk
*/
class ArxList[+T](intern : List[T]) {
def usum[U <: UnitOfMeasure[U]]( f : (T) => U )(implicit start : U) : U = { in... | nonvirtualthunk/arx-core | src/main/scala/arx/core/rich/ArxList.scala | Scala | bsd-2-clause | 1,711 |
package org.ergoplatform
import org.ergoplatform.ErgoAddressEncoder.NetworkPrefix
import org.ergoplatform.settings.MonetarySettings
import sigmastate.SCollection.SByteArray
import sigmastate.Values._
import sigmastate.basics.DLogProtocol.ProveDlog
import sigmastate.eval.IRContext
import sigmastate.interpreter.CryptoCo... | ScorexFoundation/sigmastate-interpreter | sigmastate/src/main/scala/org/ergoplatform/ErgoScriptPredef.scala | Scala | mit | 9,506 |
/*
* 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... | dotty-staging/scalatest | scalatest/src/main/scala/org/scalatest/matchers/BePropertyMatcher.scala | Scala | apache-2.0 | 7,177 |
/*
* Copyright (c) 2021. StulSoft
*/
package com.stulsoft.poc.json.json4s.dwhsync
/**
* @author Yuriy Stul
*/
case class SyncStatus(status:String, description:String)
| ysden123/poc | scala-json/src/main/scala/com/stulsoft/poc/json/json4s/dwhsync/SyncStatus.scala | Scala | mit | 173 |
/*
* 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-catnap/jvm/src/test/scala/monix/catnap/CatsEffectIssue380Suite.scala | Scala | apache-2.0 | 2,808 |
package reductions
import org.scalameter._
import common._
object ParallelCountChangeRunner {
@volatile var seqResult = 0
@volatile var parResult = 0
val standardConfig = config(
Key.exec.minWarmupRuns -> 20,
Key.exec.maxWarmupRuns -> 40,
Key.exec.benchRuns -> 80,
Key.verbose -> true
) with... | matija94/show-me-the-code | scala_practice/reductions/src/main/scala/reductions/ParallelCountChange.scala | Scala | mit | 2,963 |
/*
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
* In jurisdictio... | adamcin/scalamojo-maven-plugin | src/main/scala/net/adamcin/scalamojo/ScalaDocExtractorCompiler.scala | Scala | unlicense | 6,017 |
package protocgen
import scala.collection.JavaConverters._
import com.google.protobuf.Descriptors.FileDescriptor
import com.google.protobuf.compiler.PluginProtos
import com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest
import com.google.protobuf.DescriptorProtos.FileDescriptorProto
case class CodeGenReq... | scalapb/protoc-bridge | protoc-gen/src/main/scala/protocgen/CodeGenRequest.scala | Scala | apache-2.0 | 1,334 |
package uk.gov.gds.ier.transaction.crown.job
import uk.gov.gds.ier.validation.{ErrorTransformForm, ErrorMessages, FormKeys}
import play.api.data.Forms._
import uk.gov.gds.ier.model._
import scala.Some
import play.api.data.validation.{Invalid, Valid, Constraint}
import uk.gov.gds.ier.transaction.crown.InprogressCrown
... | michaeldfallen/ier-frontend | app/uk/gov/gds/ier/transaction/crown/job/JobForms.scala | Scala | mit | 2,385 |
package nest.sparkle.util
import nest.sparkle.util.OptionConversion._
import scala.reflect.runtime.universe._
import scala.util.Try
case class OrderingNotFound(msg: String) extends RuntimeException(msg)
/** @define ordering Recover a typed Ordering instance dynamically from a TypeTag.
* @define _end
*
* $orde... | mighdoll/sparkle | util/src/main/scala/nest/sparkle/util/RecoverOrdering.scala | Scala | apache-2.0 | 1,677 |
/*
* Copyright 2017 PayPal
*
* 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 ... | Harikiranvuyyuru/squbs | squbs-actormonitor/src/main/scala/org/squbs/actormonitor/ActorMonitorBean.scala | Scala | apache-2.0 | 4,812 |
/***********************************************************************
* 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 ... | giserh/geomesa | geomesa-kafka/geomesa-kafka-datastore/src/test/scala/org/locationtech/geomesa/kafka/KafkaDataStoreTest.scala | Scala | apache-2.0 | 6,554 |
package section3
import java.io.InputStreamReader
import java.security.MessageDigest
import java.util.Date
import sun.misc.BASE64Encoder
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.duration.DurationInt
import scala.concurrent.{Await, Future}
/**
* In this example, we want to s... | DarkToast/scala-workshop | workshop/src/main/scala/section3/Futures4.scala | Scala | mit | 4,997 |
/*
* Copyright 2021 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/amls-frontend | test/controllers/responsiblepeople/FitAndProperNoticeControllerSpec.scala | Scala | apache-2.0 | 3,180 |
/*
* Copyright 2010 Sanjiv Sahayam
* Licensed under the Apache License, Version 2.0
*/
package shortbread
import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.firefox.internal.ProfilesIni
import org.openqa.selenium.ie.InternetExplorerDriver
obje... | ssanj/Shortbread | src/main/scala/DefaultDrivers.scala | Scala | apache-2.0 | 869 |
package yang.common
import akka.actor.Status.Failure
import akka.actor._
import akka.util.Timeout
import com.nsn.oss.nbi.corba.ManagedGenericIRPConstDefs.Method
import com.nsn.oss.nbi.corba.ManagedGenericIRPSystem.InvalidParameter
import com.nsn.oss.nbi.{IRPInfo, IRPInfoServiceInstance, Operation}
import org.mockito.M... | wjingyao2008/firsttry | NextGenAct/src/test/scala/yang/common/VersionProfilesInfoActorTest2.scala | Scala | apache-2.0 | 2,581 |
package text.kanji
/**
* @author K.Sakamoto
* Created on 2016/07/26
*/
object PrimarySchool1stGradeKanjiCharacter extends KanjiCharacter {
override val kanji: Seq[String] = readKanjiCSV("primary_school_1st_grade")
}
| ktr-skmt/FelisCatusZero | src/main/scala/text/kanji/PrimarySchool1stGradeKanjiCharacter.scala | Scala | apache-2.0 | 233 |
package controllers
import play.api.data.Form
import play.api.data.Forms.mapping
import play.api.data.Forms.nonEmptyText
import play.api.mvc.Controller
object Login extends Controller {
case class UserLoginDTO(username: String, password: String) extends Serializable
val loginForm: Form[UserLoginDTO] = Form(
... | HackerSchool/Passport | app/controllers/Login.scala | Scala | bsd-3-clause | 498 |
package frdomain.ch4
package patterns
import scala.language.higherKinds
import java.util.{ Date, Calendar }
import Monoid._
import scalaz.State
import State._
object States {
type AccountNo = String
type BS = Map[AccountNo, Balance]
val balances: BS = Map(
"a1" -> Balance(),
"a2" -> Balance(),
"a3"... | debasishg/frdomain | src/main/scala/frdomain/ch4/patterns/State.scala | Scala | apache-2.0 | 1,019 |
package org.edla.tmdb.client
//import acyclic.file
import scala.language.postfixOps
import java.io.{File, FileOutputStream}
import java.net.URLEncoder
import scala.concurrent.{Await, Future}
import scala.concurrent.duration.{Duration, DurationInt, FiniteDuration, SECONDS}
import org.edla.tmdb.api.Protocol.{Authentica... | newca12/TMDb-async-client | src/main/scala/org/edla/tmdb/client/TmdbClient.scala | Scala | gpl-3.0 | 6,438 |
/*
* 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... | monix/monix | monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinTask.scala | Scala | apache-2.0 | 1,248 |
/*
* 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 ... | ArvinDevel/onlineAggregationOnSparkV2 | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/mathExpressions.scala | Scala | apache-2.0 | 27,334 |
package com.coiney.akka.mailer.providers
import com.coiney.akka.mailer.EmailException
import com.coiney.akka.mailer.protocol.Email
object MailerProvider {
trait Mailer {
@throws(classOf[EmailException])
def sendEmail(email: Email): Unit
}
}
trait MailerProvider {
def getMailer: MailerProvider.Mailer
}... | Coiney/akka-mailer | akka-mailer-core/src/main/scala/com/coiney/akka/mailer/providers/MailerProvider.scala | Scala | bsd-3-clause | 321 |
package com.krrrr38.mackerel4s
package builder
import dispatch.Req
import org.json4s.NoTypeHints
import org.json4s.jackson.Serialization
import com.krrrr38.mackerel4s.model.{ HostStatus, SuccessResponse }
import com.krrrr38.mackerel4s.model.Types.{ Path, HostID }
object UpdateHostStatusBuilder extends APIBuilder[Hos... | krrrr38/mackerel-client-scala | src/main/scala/com/krrrr38/mackerel4s/builder/UpdateHostStatusBuilder.scala | Scala | mit | 1,026 |
package org.jetbrains.plugins.scala.testingSupport.scalatest.singleTest
import org.jetbrains.plugins.scala.testingSupport.scalatest.generators.FreeSpecGenerator
/**
* @author Roman.Shein
* @since 20.01.2015.
*/
trait FreeSpecSingleTestTest extends FreeSpecGenerator {
val freeSpecTestPath = List("[root]", "FreeSp... | triggerNZ/intellij-scala | test/org/jetbrains/plugins/scala/testingSupport/scalatest/singleTest/FreeSpecSingleTestTest.scala | Scala | apache-2.0 | 783 |
/**
* 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... | wangcy6/storm_app | frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/test/scala/integration/kafka/api/EndToEndAuthorizationTest.scala | Scala | apache-2.0 | 15,805 |
/**
* Copyright (C) 2016 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... | orbeon/orbeon-forms | core-cross-platform/shared/src/main/scala/org/orbeon/oxf/xml/dom/LocationSAXContentHandler.scala | Scala | lgpl-2.1 | 1,620 |
package org.jetbrains.plugins.scala
package testingSupport.test.utest
import com.intellij.execution.configurations.{ConfigurationType, RunConfiguration}
import com.intellij.openapi.project.Project
import org.jetbrains.plugins.scala.testingSupport.test.AbstractTestRunConfigurationFactory
class UTestRunConfigurationFac... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/testingSupport/test/utest/UTestRunConfigurationFactory.scala | Scala | apache-2.0 | 593 |
package io.udash.web.guide.views.frontend.demos
import io.udash.web.guide.styles.partials.GuideStyles
import io.udash.web.guide.demos.AutoDemo
import scalatags.JsDom.all._
object DateDemo extends AutoDemo {
private val ((firstInput, secondInput), source) = {
import io.udash._
import io.udash.bootstrap.for... | UdashFramework/udash-core | guide/guide/.js/src/main/scala/io/udash/web/guide/views/frontend/demos/DateDemo.scala | Scala | apache-2.0 | 1,413 |
package com.panda
import java.util.concurrent.TimeUnit
import akka.actor.ActorSystem
import akka.pattern.ask
import akka.testkit.{ImplicitSender, TestActorRef, TestKit}
import akka.util.Timeout
import com.panda.domain.{CountData, Event, GetEventCount, GetWordCount}
import org.scalatest._
import scala.concurrent.dura... | vega113/panda-stats | src/test/scala-2.11/com/panda/EventsActorTest.scala | Scala | apache-2.0 | 1,427 |
object Test {
case class Foo(name: String, children: Int *)
def foo(f: Foo) = f match {
case Foo(name, ns: _*) =>
assert(name == "hello")
assert(ns(0) == 3)
assert(ns(1) == 5)
}
def bar(f: Foo) = f match {
case Foo(name, x, y, ns : _*) =>
assert(name == "hello")
assert(x ... | som-snytt/dotty | tests/run/i3248c.scala | Scala | apache-2.0 | 482 |
package kafka
import app.EventPusher
import kafka.consumer.{Whitelist, Consumer, ConsumerConfig}
import kafka.message._
import kafka.serializer._
import kafka.utils._
import java.util.Properties
import kafka.utils.Logging
import scala.collection.JavaConversions._
/**
* Created by goldratio on 2/14/15.
*/
class Kafk... | mqshen/gitbucket | src/main/scala/kafka/KafkaConsumer.scala | Scala | apache-2.0 | 1,836 |
package mesosphere.marathon.tasks
import java.io._
import javax.inject.Inject
import com.codahale.metrics.MetricRegistry
import mesosphere.marathon.MarathonConf
import mesosphere.marathon.Protos._
import mesosphere.marathon.metrics.Metrics
import mesosphere.marathon.state.{ PathId, StateMetrics, Timestamp }
import me... | MrMarvin/marathon | src/main/scala/mesosphere/marathon/tasks/TaskTracker.scala | Scala | apache-2.0 | 9,623 |
import sbt._
import Keys._
/**
* archive resolving gets a bit tricky depending on if we're compiling in github, twitter,
* or somewhere else
*/
object ZipkinResolver extends Plugin {
val proxyRepo = Option(System.getenv("SBT_PROXY_REPO"))
val isTravisCi = "true".equalsIgnoreCase(System.getenv("SBT_TRAVIS_CI"))... | kevinyang0906/zipkin | project/ZipkinResolver.scala | Scala | apache-2.0 | 3,125 |
/*
* Copyright 2006-2011 WorldWide Conferencing, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | pbrant/framework | core/util/src/main/scala/net/liftweb/util/HttpHelpers.scala | Scala | apache-2.0 | 13,704 |
/*
* Copyright (c) 2015, 2016 Alexey Kuzin <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,... | leviathan941/sourepoheatmap | core/src/main/scala/sourepoheatmap/treemap/Treemap.scala | Scala | bsd-3-clause | 5,895 |
package com.twitter.finagle.http
import com.twitter.conversions.time._
import org.specs.SpecificationWithJUnit
class CookieSpec extends SpecificationWithJUnit {
"Cookie" should {
"mutate underlying" in {
val cookie = new Cookie("name", "value")
cookie.comment = "hello"
cookie.commentUrl = "... | firebase/finagle | finagle-http/src/test/scala/com/twitter/finagle/http/CookieSpec.scala | Scala | apache-2.0 | 1,161 |
/*
* Copyright (c) 2014-2015 by its authors. Some rights reserved.
* See the project homepage at: http://www.monifu.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://... | virtualirfan/monifu | monifu/shared/src/main/scala/monifu/reactive/internals/operators/buffer.scala | Scala | apache-2.0 | 4,577 |
// Copyright (C) 2010-2011 Monash University
//
// This file is part of Factotum.
//
// Factotum 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... | dnikulin/factotum | src/main/scala/com/dnikulin/factotum/model/StoredReport.scala | Scala | agpl-3.0 | 1,285 |
import akka.actor.{ActorSystem, Props}
import akka.testkit.{ImplicitSender, TestActors, TestKit}
import hu.bme.mit.ire.messages.{ChangeSet, Primary, Secondary}
import hu.bme.mit.ire.nodes.binary.AntiJoinNode
import hu.bme.mit.ire.util.Utils
import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike}
class AntiJoi... | FTSRG/ire | src/test/scala/AntiJoinNodeTest.scala | Scala | epl-1.0 | 9,107 |
package io.youi.example.ui
import io.youi._
import io.youi.component.FontAwesomeView
import io.youi.component.support.{MeasuredSupport, PositionSupport}
import io.youi.example.screen.UIExampleScreen
import io.youi.font.FontAwesome
import io.youi.net._
import scribe.Execution.global
import scala.concurrent.Future
cla... | outr/youi | example/js/src/main/scala/io/youi/example/ui/FontAwesomeExample.scala | Scala | mit | 916 |
package controller
import model._
import org.scalatest._
import skinny.SkinnyConfig
import skinny.test.scalatest.SkinnyFlatSpec
import skinny.test.{ FactoryGirl, SkinnyTestSupport }
class OGPSpec extends SkinnyFlatSpec with Matchers with SkinnyTestSupport with TestDBSettings {
addFilter(Controllers.articles, "/*")
... | atware/sharedocs | src/test/scala/controller/OGPSpec.scala | Scala | mit | 1,344 |
/* Copyright 2009-2016 EPFL, Lausanne */
package leon
package purescala
import scala.collection.mutable.ListBuffer
import Common._
import Definitions._
import Expressions._
import Extractors._
import Constructors.letDef
class ScopeSimplifier extends Transformer {
case class Scope(inScope: Set[Identifier] = Set(), ... | regb/leon | src/main/scala/leon/purescala/ScopeSimplifier.scala | Scala | gpl-3.0 | 4,387 |
package sigmastate.basics
import java.math.BigInteger
import org.bouncycastle.util.BigIntegers
import sigmastate.Values.Value.PropositionCode
import sigmastate._
import sigmastate.basics.VerifierMessage.Challenge
import sigmastate.eval.SigmaDsl
import sigmastate.interpreter.CryptoConstants.EcPointType
import sigmasta... | ScorexFoundation/sigmastate-interpreter | sigmastate/src/main/scala/sigmastate/basics/DiffieHellmanTupleProtocol.scala | Scala | mit | 5,907 |
package org.scalajs.openui5.sap.ui.core
import org.scalajs.dom
import org.scalajs.openui5.sap.ui.base.{ManagedObject, ManagedObjectSetters, ManagedObjectSettings}
import org.scalajs.openui5.util.{SettingsMap, Settings, noSettings}
import scala.scalajs.js
import scala.scalajs.js.annotation.{JSName, ScalaJSDefined}
imp... | lastsys/scalajs-openui5 | src/main/scala/org/scalajs/openui5/sap/ui/core/Element.scala | Scala | mit | 4,485 |
package edu.colorado.plv.cuanto.jsy
package string
import edu.colorado.plv.cuanto.CuantoSpec
import edu.colorado.plv.cuanto.jsy.common.ParserBehaviors
import edu.colorado.plv.cuanto.jsy.string.Parser.parse
/**
* @author Kyle Headley
*/
class StringParserSpec extends CuantoSpec with ParserBehaviors {
override l... | cuplv/cuanto | src/test/scala/edu/colorado/plv/cuanto/jsy/string/StringParserSpec.scala | Scala | apache-2.0 | 562 |
/* Copyright (C) 2008-2014 University of Massachusetts Amherst.
This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible)
http://factorie.cs.umass.edu, http://github.com/factorie
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with... | patverga/factorie | src/main/scala/cc/factorie/app/nlp/pos/PosTag.scala | Scala | apache-2.0 | 8,165 |
package vaadin.scala
import vaadin.scala.mixins.LinkMixin
package mixins {
trait LinkMixin extends AbstractComponentMixin
}
object Link {
object TargetBorder extends Enumeration {
import com.vaadin.ui.Link._
val None = Value(TARGET_BORDER_NONE)
val Minimal = Value(TARGET_BORDER_MINIMAL)
val ... | CloudInABox/scalavaadinutils | src/main/scala/vaadin/scala/Link.scala | Scala | mit | 1,390 |
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs/contributors
// License: http://www.gnu.org/licenses/lgpl-3.0.en.html
package org.ensime.sexp
import java.lang.String
import org.scalatest._
import org.scalatest.Matchers._
class DerivedSexpReaderTest extends FlatSpec {
import SexpReader.ops... | fommil/ensime-server | s-express/src/test/scala/org/ensime/sexp/DerivedSexpReaderTest.scala | Scala | gpl-3.0 | 1,277 |
package coursier.test
import java.util.concurrent.{ConcurrentHashMap, Executors}
import coursier.{Module, moduleString}
import coursier.core.ResolutionProcess
import coursier.util.Task
import utest._
import scala.jdk.CollectionConverters._
import scala.concurrent.{Await, ExecutionContext}
import scala.concurrent.dur... | alexarchambault/coursier | modules/tests/jvm/src/test/scala/coursier/test/ResolutionProcessTests.scala | Scala | apache-2.0 | 2,150 |
/*
* Copyright 2012-2013 Stephane Godbillon (@sgodbillon) and Zenexity
*
* 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 req... | sh1ng/ReactiveMongo | driver/src/main/scala/core/protocol/operations.scala | Scala | apache-2.0 | 8,464 |
package org.storrent
import akka.actor.{ Actor, ActorSystem, Props}
import akka.testkit.{ TestActorRef, TestKit, TestLatch, ImplicitSender, TestProbe }
import scala.concurrent.duration._
import scala.concurrent.Await
import org.scalatest.{ WordSpec, BeforeAndAfterAll}
import org.scalatest.matchers.MustMatchers
import ... | bowlofstew/storrent | src/test/scala/BTProtocolSpec.scala | Scala | apache-2.0 | 2,231 |
package pl.newicom.dddd.utils
import java.util.UUID
object UUIDSupport {
def uuid: String = uuidObj.toString.replaceAllLiterally("-", "")
def uuid7: String = uuid.substring(0, 6)
def uuid10: String = uuid.substring(0, 9)
def uuidObj: UUID = UUID.randomUUID()
}
trait UUIDSupport {
def uuid = UUIDSupport.uui... | AndreyLadniy/akka-ddd | akka-ddd-protocol/src/main/scala/pl/newicom/dddd/utils/UUIDSupport.scala | Scala | mit | 426 |
package hello
object HelloWorld {
def main(args: Array[String]): Unit =
println(erased(5))
def erased(x: Int): Any = x
}
| som-snytt/dotty | tests/pos/i7944.scala | Scala | apache-2.0 | 131 |
/*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
... | deeplearning4j/deeplearning4j | scalnet/src/main/scala/org/deeplearning4j/scalnet/layers/convolutional/Upsampling1D.scala | Scala | apache-2.0 | 1,759 |
/*
* Copyright (c) 2014-2020 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... | alexandru/monifu | monix-eval/shared/src/main/scala/monix/eval/internal/StackFrame.scala | Scala | apache-2.0 | 1,610 |
package probability_monad
import java.util.concurrent.ThreadLocalRandom
import scala.annotation.tailrec
import scala.collection.parallel.immutable.ParSeq
import scala.math.BigDecimal
import scala.util.Random
trait Distribution[A] {
self =>
protected def get: A
override def toString = "<distribution>"
def m... | codeaudit/probability-monad | src/main/scala/probability-monad/Distribution.scala | Scala | apache-2.0 | 15,676 |
package memnets.ml
import memnets.model._
/**
* NaiveBayes algorithm
* uses m-estimates
* categoryA is positive, categoryB is negative
*/
class NaiveBayes(val features: Features) extends Learner with Logging {
val name = "Naive Bayes"
val probs: Array[Prob] = features.map {
case df: DiscFeature =>
i... | MemoryNetworks/memnets | api/src/main/scala/memnets/ml/NaiveBayes.scala | Scala | apache-2.0 | 5,085 |
package courses.parsing
import java.io.File
import scala.io.Source.fromFile
import scala.util.parsing.json.JSON
import scala.collection.mutable.{Map => mMap}
import com.mongodb.casbah.Imports._
import util.Implicits._
import util.Data.using
import util.Debug._
/**
* Thrown when FileHandler is given a file of an unk... | jimwaldo/HarvardX-Tools | src/main/scala/courses/parsing/FileHandler.scala | Scala | bsd-3-clause | 5,027 |
/*
* Copyright 2015 Dennis Vriend
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed t... | dnvriend/design-patterns-study | src/test/scala/com/github/dnvriend/oo/behavioral/CommandPatternTest.scala | Scala | apache-2.0 | 749 |
/*
* Copyright 2017 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | liquidarmour/ct-calculations | src/main/scala/uk/gov/hmrc/ct/ct600/calculations/CorporationTaxHelper.scala | Scala | apache-2.0 | 2,404 |
package breeze.linalg
import breeze.generic.UFunc
import breeze.linalg.support.CanTraverseValues
import breeze.linalg.support.CanTraverseValues.ValuesVisitor
import breeze.macros.expand
import breeze.math.Semiring
/** Computes the product */
object product extends UFunc {
@expand
implicit def reduce[T, @expand.a... | scalanlp/breeze | math/src/main/codegen/breeze/linalg/product.scala | Scala | apache-2.0 | 1,471 |
/***********************************************************************
* Copyright (c) 2013-2018 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... | ddseapy/geomesa | geomesa-convert/geomesa-convert-avro/src/main/scala/org/locationtech/geomesa/convert/avro/AvroConverterFactory.scala | Scala | apache-2.0 | 11,757 |
trait Monad[T]
class Foo
object Foo {
given Monad[Foo]
}
opaque type Bar = Foo
object Bar {
given Monad[Bar] = summon[Monad[Foo]]
}
object Test {
val mf = summon[Monad[Foo]]
val mb = summon[Monad[Bar]]
} | som-snytt/dotty | tests/pos/i6716.scala | Scala | apache-2.0 | 213 |
package reductions
import org.scalameter._
import common._
object LineOfSightRunner {
val standardConfig = config(
Key.exec.minWarmupRuns -> 40,
Key.exec.maxWarmupRuns -> 80,
Key.exec.benchRuns -> 100,
Key.verbose -> true
) withWarmer(new Warmer.Default)
def main(args: Array[String]) {
v... | shouya/thinking-dumps | parprog/reductions/src/main/scala/reductions/LineOfSight.scala | Scala | mit | 3,774 |
//: ----------------------------------------------------------------------------
//: Copyright (C) 2015 Verizon. 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 Licen... | oncue/knobs | core/src/main/scala/knobs/Directive.scala | Scala | apache-2.0 | 1,138 |
package org.nexbook.performance.app
import com.typesafe.config.ConfigFactory
import org.nexbook.tags.Performance
import org.slf4j.LoggerFactory
/**
* Created by milczu on 1/2/16.
*/
class OrderBookAppScenarioB05PerformanceTest extends OrderBookAppPerformanceTest {
val logger = LoggerFactory.getLogger(classOf[... | milczarekIT/nexbook | src/test/scala/org/nexbook/performance/app/OrderBookAppScenarioB05PerformanceTest.scala | Scala | apache-2.0 | 1,081 |
package net.mentalarray.doozie
/**
* Created by kdivincenzo on 9/30/14.
*/
case class WorkflowStep(action: WorkflowTask, onError: Option[TasksSequence], always: Option[TasksSequence])
// Value object for WorkflowStep (entry in TaskGraph or TaskSequence)
object WorkflowStep {
def apply(action: WorkflowTask) : Wor... | antagonist112358/tomahawk | workflow-engine/src/net/mentalarray/doozie/WorkflowStep.scala | Scala | apache-2.0 | 664 |
/*
* Copyright 2016 Guy Van den Broeck and Wannes Meert (UCLA and KU Leuven)
*
* 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
*
* Un... | UCLA-StarAI/Forclift | src/test/scala/edu/ucla/cs/starai/forclift/bugs/Bug1Model.scala | Scala | apache-2.0 | 2,427 |
package org.alitouka.spark.dbscan.spatial.rdd
import org.apache.spark.Partitioner
import org.alitouka.spark.dbscan.spatial.{PointSortKey, Point, Box}
import org.alitouka.spark.dbscan.BoxId
/** A partitioner which assigns each entry in a dataset to a [[org.alitouka.spark.dbscan.spatial.Box]]
*
* @param boxes A col... | isaacboucinha/CardioStream | web-app/src/main/scala/org/alitouka/spark/dbscan/spatial/rdd/BoxPartitioner.scala | Scala | apache-2.0 | 1,251 |
package spire
package math
import org.scalatest._
import spire.algebra._
import spire.implicits._
class JetTest extends FunSuite with Matchers {
// Default test with 3-dimensional Jet's
implicit val dim = JetDim(3)
val maxError = 1.0e-12
test("JetDim") {
dim.dimension should equal (3)
}
test("Jet(s... | adampingel/spire | tests/src/test/scala/spire/math/JetTest.scala | Scala | mit | 14,288 |
package com.github.ldaniels528.trifecta.io
import scala.concurrent.{ExecutionContext, Future}
/**
* This class acts as a wrapper for an asynchronous job processing
* an input, an output both.
* @author [email protected]
*/
case class AsyncIO(task: Future[_], counter: IOCounter) {
val startTime: Long = ... | ldaniels528/trifecta | app-modules/core/src/main/scala/com/github/ldaniels528/trifecta/io/AsyncIO.scala | Scala | apache-2.0 | 878 |
/*
* Copyright 2016 Dennis Vriend
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed t... | dnvriend/study-category-theory | scalaz-test/src/test/com/github/dnvriend/TestSpec.scala | Scala | apache-2.0 | 3,235 |
/**
* 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... | wangcy6/storm_app | frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/main/scala/kafka/message/MessageAndOffset.scala | Scala | apache-2.0 | 2,094 |
package chandu0101.scalajs.react.components
package semanticui
import chandu0101.macros.tojs.JSMacro
import japgolly.scalajs.react._
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.JSName
/**
* This file is generated - submit issues instead of PR against it
*/
@js.native @JSN... | rleibman/scalajs-react-components | core/src/main/scala/chandu0101/scalajs/react/components/semanticui/Sui.scala | Scala | apache-2.0 | 2,073 |
/*
* 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 ... | rikima/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala | Scala | apache-2.0 | 24,443 |
package utils
import play.api.libs.json.JsArray
import utils.JsValueWrapper.improveJsValue
import scala.language.implicitConversions
/**
* Created by valtechuk on 22/01/2015.
*/
object SortBy {
def claimTypeDateTime(data: Option[JsArray]): Option[JsArray] = {
data match {
case Some(data) =>
S... | Department-for-Work-and-Pensions/CarersAllowanceStaffAccess | casa/app/utils/SortBy.scala | Scala | mit | 1,322 |
package epam.bdcc_app.util
import com.epam.common.TimeUtils
object ProfilingUtil {
def profileTime[R](blockName: String)(block: => R): R = {
val start = System.nanoTime()
val result = block
println(s"PROFILING: '$blockName' last: ${TimeUtils.toString((System.nanoTime() - start) / 1000000L)... | mkasatkin/bdcc_app.vk_samza | src/main/scala/epam/bdcc_app/util/ProfilingUtil.scala | Scala | apache-2.0 | 348 |
package cephui.models
import json._
object JsFormats {
implicit val locationAccessor = ObjectAccessor.create[Location]
implicit val jobAccessor = ObjectAccessor.create[Job]
implicit val danglingReservationAccessor = ObjectAccessor.create[DanglingReservation]
implicit val errorReservationAccessor = ObjectAcces... | vivint-smarthome/ceph-on-mesos | ui/src/main/scala/cephui/models/JsFormats.scala | Scala | apache-2.0 | 348 |
/*
* Copyright 2010 LinkedIn
*
* 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 w... | quipo/kafka | core/src/main/scala/kafka/producer/ProducerData.scala | Scala | apache-2.0 | 1,326 |
case class MyClass(number: Int, char: Char, b: Boolean) {
override val toString = char + number
}
object MyClass {
MyClass(2, '1', true)
new MyClass(2, '1', true)
} | ilinum/intellij-scala | testdata/changeSignature/fromScala/CaseClass_after.scala | Scala | apache-2.0 | 171 |
package com.sksamuel.scapegoat.inspections.unnecessary
import com.sksamuel.scapegoat.{ Warning, PluginRunner }
import com.sksamuel.scapegoat.inspections.unneccesary.UnusedMethodParameter
import org.scalatest.{ FreeSpec, Matchers, OneInstancePerTest }
/** @author Stephen Samuel */
class UnusedMethodParameterTest
... | pwwpche/scalac-scapegoat-plugin | src/test/scala/com/sksamuel/scapegoat/inspections/unnecessary/UnusedMethodParameterTest.scala | Scala | apache-2.0 | 5,528 |
package io.sphere.util
import org.scalatest.funspec.AnyFunSpec
import org.scalatest.matchers.must.Matchers
import scala.language.postfixOps
class LangTagSpec extends AnyFunSpec with Matchers {
describe("LangTag") {
it("should accept valid language tags") {
LangTag.unapply("de").isEmpty must be(false)
... | sphereio/sphere-scala-libs | util/src/test/scala/LangTagSpec.scala | Scala | apache-2.0 | 942 |
Subsets and Splits
Filtered Scala Code Snippets
The query filters and retrieves a sample of code snippets that meet specific criteria, providing a basic overview of the dataset's content without revealing deeper insights.