code stringlengths 5 1M | repo_name stringlengths 5 109 | path stringlengths 6 208 | language stringclasses 1
value | license stringclasses 15
values | size int64 5 1M |
|---|---|---|---|---|---|
package org.jetbrains.sbt.project.template.techhub
import com.intellij.openapi.progress.ProgressIndicator
import com.intellij.openapi.util.io.{FileUtil, StreamUtil}
import com.intellij.util.concurrency.annotations.RequiresBackgroundThread
import com.intellij.util.io.HttpRequests
import com.intellij.util.net.{HttpConfi... | JetBrains/intellij-scala | scala/scala-impl/src/org/jetbrains/sbt/project/template/techhub/TechHubDownloadUtil.scala | Scala | apache-2.0 | 4,116 |
package org.automanlang.adapters.mturk.question
import java.util.{Date, UUID}
import org.automanlang.adapters.mturk.mock.CheckboxMockResponse
import org.automanlang.adapters.mturk.policy.aggregation.MTurkMinimumSpawnPolicy
import org.automanlang.core.logging._
import org.automanlang.core.question.CheckboxQuestion
imp... | dbarowy/AutoMan | libautoman/src/main/scala/org/automanlang/adapters/mturk/question/MTCheckboxQuestion.scala | Scala | gpl-2.0 | 4,290 |
/**
* Copyright (C) 2012 Kaj Magnus Lindberg (born 1979)
*
* 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) any later version.
... | debiki/debiki-server-old | app/debiki/dao/CachingDao.scala | Scala | agpl-3.0 | 8,010 |
/*
* 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... | alessandrolulli/reforest | src/main/scala/reforest/util/MemoryUtil.scala | Scala | apache-2.0 | 5,336 |
package p
/**
* $BaseComment
* @define BaseVar Derived
*/
class Derived extends Base {
def foo = ""
}
| scala/scala | test/files/presentation/doc/src/p/Derived.scala | Scala | apache-2.0 | 108 |
package com.mentatlabs.nsa
package scalac
package options
/* -Xlog-free-types
* ================
* 2.10.0 - 2.12.0: Print a message when reification resorts to generating a free type.
*/
case object ScalacXLogFreeTypes
extends ScalacOptionBoolean("-Xlog-free-types", ScalacVersions.`2.10.0`)
| mentat-labs/sbt-nsa | nsa-core/src/main/scala/com/mentatlabs/nsa/scalac/options/advanced/ScalacXLogFreeTypes.scala | Scala | bsd-3-clause | 302 |
package chee.cli
import better.files.File
import Sync._
import CryptOptions.{Opts => CryptOpts}
import chee.CheeApi._
import com.typesafe.config.Config
class Sync extends ScoptCommand with LockSupport with ProgressDef {
type T = Opts
val defaults = Opts()
val name = "sync"
val parser = new Parser with Cryp... | eikek/chee | src/main/scala/chee/cli/Sync.scala | Scala | gpl-3.0 | 2,511 |
package com.github.j5ik2o.chatwork.infrastructure.api
case class ApiException(messages: List[String]) extends Exception(messages.mkString(","))
| j5ik2o/chatwork-client | src/main/scala/com/github/j5ik2o/chatwork/infrastructure/api/ApiException.scala | Scala | apache-2.0 | 147 |
/*
* Copyright 2011-2022 GatlingCorp (https://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | gatling/gatling | gatling-recorder/src/test/scala/io/gatling/recorder/render/template/SimulationTemplateSpec.scala | Scala | apache-2.0 | 1,276 |
import java.net.URL
import scala.xml.XML
import org.xml.sax.InputSource
import scala.xml.parsing.NoBindingFactoryAdapter
import org.ccil.cowan.tagsoup.jaxp._
import java.net.HttpURLConnection
import scala.xml.Node
import java.io._
val trenner = "}"
object HTML {
lazy val adapter = new NoBindingFactoryAdapter
lazy... | kralo/elwis-anki-parser | parse-sbf-see.scala | Scala | apache-2.0 | 3,664 |
/*
* 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 | core/src/test/scala/org/apache/spark/scheduler/TaskSchedulerImplSuite.scala | Scala | apache-2.0 | 61,402 |
package com.sai.scratchpad.core
import org.eclipse.aether.collection.CollectRequest
import org.eclipse.aether.graph.Dependency
import org.eclipse.aether.artifact.DefaultArtifact
import scala.collection.JavaConversions._
import org.eclipse.aether.resolution.ArtifactRequest
import org.eclipse.aether.resolution.VersionRa... | SaiprasadKrishnamurthy/BigDash | src/main/scala/com/sai/scratchpad/core/MavenBootstrap.scala | Scala | apache-2.0 | 5,714 |
package orientdb.stream
import akka.actor.ActorRefFactory
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx
import org.reactivestreams.Publisher
import OverflowStrategy.OverflowStrategy
import orientdb.stream.impl.LiveQueryImpl
trait LiveQuery {
def execute(args: AnyRef*)(implicit db: ODataba... | KadekM/orientdb-scala-stream | src/main/scala/orientdb/stream/LiveQuery.scala | Scala | apache-2.0 | 593 |
package com.twitter.server.handler
import com.twitter.finagle.stats.NullStatsReceiver
import com.twitter.finagle.toggle.{NullToggleMap, Toggle, ToggleMap}
import com.twitter.server.handler.ToggleHandler._
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import scala.... | BuoyantIO/twitter-server | src/test/scala/com/twitter/server/handler/ToggleHandlerTest.scala | Scala | apache-2.0 | 10,408 |
// Copyright (C) 2019 MapRoulette contributors (see CONTRIBUTORS.md).
// Licensed under the Apache License, Version 2.0 (see LICENSE).
package org.maproulette.controllers.api
import javax.inject.Inject
import org.apache.commons.lang3.StringUtils
import org.maproulette.controllers.ParentController
import org.maproulett... | Crashfreak/maproulette2 | app/org/maproulette/controllers/api/ProjectController.scala | Scala | apache-2.0 | 8,482 |
/*
* Copyright (C)2014 D. Plaindoux.
*
* 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, or (at your option) any
* later version.
*
* This program is distributed i... | d-plaindoux/rapido | src/test/scala/smallibs/page/engine/generatortest.scala | Scala | lgpl-2.1 | 3,466 |
/*
* Copyright (c) 2009 Sony Pictures Imageworks Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, thi... | imageworks/scala-migrations | src/test/scala/com/imageworks/migration/tests/WithTests.scala | Scala | bsd-3-clause | 3,903 |
package wdltool.graph
import java.util.concurrent.atomic.AtomicInteger
import org.scalatest.{FlatSpec, Matchers}
import wdl4s.wom.graph.Graph
trait WomDotGraphTest extends FlatSpec with Matchers {
def cases: List[WomDotGraphTestCase]
behavior of "womgraph"
def tests() = {
cases foreach { testCase =>
... | broadinstitute/wdltool | src/test/scala/wdltool/graph/WomDotGraphTest.scala | Scala | bsd-3-clause | 1,245 |
// P06 (*) Find out whether a list is a palindrome.
// Example:
// scala> isPalindrome(List(1, 2, 3, 2, 1))
// res0: Boolean = true
package s99
object P06 {
// direct
def isPalindrome[A](ls: List[A]) = ls == ls.reverse
def isPalindromeRecursive[A](ls: List[A]): Boolean = ls match {
case Nil ... | chemacortes/s99 | src/main/scala/s99/P06.scala | Scala | bsd-2-clause | 559 |
package org.jetbrains.plugins.scala
package lang
package psi
package impl
package base
package patterns
import com.intellij.lang.ASTNode
import com.intellij.psi._
import com.intellij.psi.scope.PsiScopeProcessor
import org.jetbrains.plugins.scala.extensions.{PsiTypeExt, ifReadAllowed}
import org.jetbrains.plugins.scala... | loskutov/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/impl/base/patterns/ScTypedPatternImpl.scala | Scala | apache-2.0 | 5,164 |
package skinny.controller
import scala.language.dynamics
import skinny._
import skinny.util.DateTimeUtil
import org.joda.time.DateTime
object Params {
val Year = "Year"
val Month = "Month"
val Day = "Day"
val Hour = "Hour"
val Minute = "Minute"
val Second = "Second"
val Date = "Date"
val Time = "Time... | holycattle/skinny-framework | common/src/main/scala/skinny/controller/Params.scala | Scala | mit | 5,248 |
package thistle.core
class MatchTree[T](
predicates: Query[T],
val root: ImmutableMatchNode[T])(implicit private val series: Vector[T]) extends Tree[ImmutableMatchNode[T]] {
def iterator: Iterator[Match[T]] =
Node.terminalPathWalk(root.children).map(Match(_, predicates))
def isComplete(): Boolean =
!... | smarden1/thistle | src/main/scala/thistle/core/MatchTree.scala | Scala | mit | 2,273 |
package scala.tools.nsc.scaladoc
import org.scalacheck._
import org.scalacheck.Prop._
import scala.tools.nsc.Global
import scala.tools.nsc.doc
import scala.tools.nsc.doc.base.comment._
import scala.tools.nsc.doc.model._
import scala.tools.nsc.doc.model.diagram._
class Factory(val g: Global, val s: doc.Settings)
ex... | scala/scala | test/scalacheck/scala/tools/nsc/scaladoc/CommentFactoryTest.scala | Scala | apache-2.0 | 5,093 |
package domala.jdbc.query
import org.seasar.doma.internal.util.AssertionUtil.assertNotNull
import org.seasar.doma.internal.util.AssertionUtil.assertUnreachable
import org.seasar.doma.jdbc.query.AbstractQuery
import org.seasar.doma.jdbc.query.ScriptQuery
import org.seasar.doma.jdbc.SqlLogType
class SqlScriptQuery(v... | bakenezumi/domala | core/src/main/scala/domala/jdbc/query/SqlScriptQuery.scala | Scala | apache-2.0 | 1,468 |
/*
* 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 ... | minixalpha/spark | sql/hive/src/test/scala/org/apache/spark/sql/catalyst/ExpressionSQLBuilderSuite.scala | Scala | apache-2.0 | 5,242 |
/*
* Copyright © 2015 Lukas Rosenthaler, Benjamin Geer, Ivan Subotic,
* Tobias Schweizer, André Kilchenmann, and Sepideh Alassi.
* This file is part of Knora.
* Knora 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 So... | nie-ine/Knora | webapi/src/main/scala/org/knora/webapi/messages/v1/responder/permissionmessages/PermissionMessagesV1.scala | Scala | agpl-3.0 | 35,047 |
import java.io._
import utils._
var fnum = 1;
var nfiles = 1131;
while(fnum <= nfiles) {
println(fnum);
var dict = loadDict("/var/local/destress/tokenized2/masterDict.sbmat");
var sents = loadSMat("/var/local/destress/featurized_sent/data" + fnum + "_sent.smat.lz4")
var (_, nsents) = size(sents);
val p... | BIDS-collaborative/destress | word2vec/data_to_text.scala | Scala | isc | 689 |
/*
* 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/xni/XMLDocumentFragmentHandler.scala | Scala | apache-2.0 | 8,952 |
package pub.ayada.scala.sparkUtils.etl.transform
import scala.xml.Node
import org.apache.spark.sql.DataFrame
import org.apache.spark.sql.hive.HiveContext
import org.apache.spark.storage.StorageLevel
import pub.ayada.scala.utils.DateTimeUtils
import pub.ayada.scala.sparkUtils.cmn.UtilFuncs
object Transformer {
de... | k-ayada/SparkETL | pub/ayada/scala/sparkUtils/etl/transform/Transformer.scala | Scala | apache-2.0 | 6,459 |
package code
package snippet
import net.liftweb._
import http._
import scala.xml._
object L10n extends DispatchSnippet {
def dispatch: DispatchIt = {
case "render" => ns => replace(ns)
case "i" => ns => inject(ns)
case str => ns => attr(ns, str)
}
def inject(ns: NodeSeq): NodeSeq = ns match {
c... | dodie/time-admin | src/main/scala/code/snippet/L10n.scala | Scala | apache-2.0 | 1,000 |
package com.gilt.gfc.crypto
import java.security.MessageDigest
/**
* Helper library for various cryptographic functions.
*/
object HashFunctions {
def sha256(str: String): Array[Byte] = sha256(str, "UTF-8")
def sha256Str(str: String): String = sha256Str(str, "UTF-8")
def sha256(str: String, enc: String): A... | gilt/gfc-crypto | src/main/scala/com/gilt/gfc/crypto/HashFunctions.scala | Scala | apache-2.0 | 998 |
package scrupal.store.bdbje
import java.io.File
import java.net.URI
import java.util.concurrent.TimeUnit
import com.sleepycat.je._
import scrupal.storage.api.{Store, WriteResult, StorageDriver}
import scrupal.storage.impl.CommonStorageDriver
import scala.concurrent.{Future, ExecutionContext}
class BDBJEDriver exten... | scrupal/scrupal-store-bdbje | src/main/scala/scrupal/store/bdbje/BDBJEDriver.scala | Scala | apache-2.0 | 2,311 |
/*
Copyright 2012 Georgia Tech Research Institute
Author: lance.gatlin@gtri.gatech.edu
This file is part of org.gtri.util.scala.statemachine library.
org.gtri.util.scala.statemachine library is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Licen... | gtri-iead/org.gtri.util.scala | statemachine/src/main/scala/org/gtri/util/scala/statemachine/translator/package.scala | Scala | gpl-3.0 | 5,942 |
/***********************************************************************
* Copyright (c) 2013-2019 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... | elahrvivaz/geomesa | geomesa-accumulo/geomesa-accumulo-native-api/src/main/scala/org/locationtech/geomesa/accumulo/nativeapi/AccumuloGeoMesaIndex.scala | Scala | apache-2.0 | 4,521 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | akopich/spark | mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala | Scala | apache-2.0 | 36,641 |
/*
* Copyright 2011-2022 GatlingCorp (https://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | gatling/gatling | gatling-core/src/main/scala/io/gatling/core/cli/CommandLineConstant.scala | Scala | apache-2.0 | 733 |
/*
* Copyright 2014–2020 SlamData Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | slamdata/quasar | frontend/src/test/scala/quasar/JsonSpec.scala | Scala | apache-2.0 | 1,244 |
/*
* Copyright 2014 - 2020 the original author or 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 a... | krasserm/streamz | streamz-examples/src/main/scala/streamz/examples/converter/Example.scala | Scala | apache-2.0 | 3,149 |
package com.danielasfregola.twitter4s.http.clients.rest.statuses.parameters
import com.danielasfregola.twitter4s.entities.enums.TweetMode
import org.specs2.mutable.SpecificationLike
class MentionsParametersSpec extends SpecificationLike {
"MentionsParameters" should {
"correctly represents each field as the re... | DanielaSfregola/twitter4s | src/test/scala/com/danielasfregola/twitter4s/http/clients/rest/statuses/parameters/MentionsParametersSpec.scala | Scala | apache-2.0 | 1,389 |
/*
* 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 | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TableOutputResolver.scala | Scala | apache-2.0 | 10,696 |
/*
* Copyright 2012 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 applicable l... | pbrant/framework | persistence/mongodb/src/test/scala/net/liftweb/mongodb/JObjectParserSpec.scala | Scala | apache-2.0 | 1,690 |
package io.iohk.ethereum.network.discovery.codecs
import io.iohk.scalanet.discovery.crypto.{PublicKey, Signature}
import io.iohk.scalanet.discovery.ethereum.{Node, EthereumNodeRecord}
import io.iohk.scalanet.discovery.ethereum.v4.Payload
import io.iohk.scalanet.discovery.hash.Hash
import io.iohk.ethereum.rlp
import io... | input-output-hk/etc-client | src/main/scala/io/iohk/ethereum/network/discovery/codecs/RLPCodecs.scala | Scala | mit | 7,675 |
package sri.sangria.mongoserver.services
import io.circe.{Json, Encoder, Decoder}
import reactivemongo.api.{QueryOpts, DefaultDB}
import reactivemongo.api.collections.bson.BSONCollection
import reactivemongo.api.commands.WriteResult
import reactivemongo.bson.{BSONDocument, BSONObjectID}
import sangria.relay._
import i... | chandu0101/sri-sangria-example | server/src/main/scala/sri/sangria/mongoserver/services/BaseService.scala | Scala | apache-2.0 | 3,918 |
/*
* Stratio Meta
*
* Copyright (c) 2014, Stratio, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) ... | dhiguero/stratio-meta | meta-server/src/main/scala/com/stratio/meta/server/MetaApplication.scala | Scala | gpl-3.0 | 1,398 |
package example
import skinny.jackson.JSONStringOps
import skinny.test.SkinnyFunSpec
import scala.util._
class AppSpec extends SkinnyFunSpec with JSONStringOps {
addFilter(App, "/*")
describe("Usage example app") {
it("renders HTML body with Scalate") {
get("/") {
status should equal(200)
... | skinny-framework/skinny-micro-usage-example | src/test/scala/example/AppSpec.scala | Scala | mit | 3,513 |
/*
* 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/main/scala/com/intel/analytics/zoo/pipeline/inference/InferenceSupportiveNg.scala | Scala | apache-2.0 | 4,712 |
package eventstore
package akka
import scala.concurrent.duration._
import _root_.akka.actor.Terminated
import _root_.akka.testkit.TestProbe
class StreamSubscriptionActorITest extends AbstractSubscriptionActorITest {
"StreamSubscriptionActor" should {
"subscribe to empty stream" in new SubscriptionScope {
... | EventStore/EventStore.JVM | client/src/test/scala/eventstore/akka/StreamSubscriptionActorITest.scala | Scala | bsd-3-clause | 2,699 |
/*
* 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 writin... | akara/squbs | squbs-unicomplex/src/test/scala/org/squbs/unicomplex/RootCtxFlowSpec.scala | Scala | apache-2.0 | 2,154 |
/*
* Copyright University of Basel, Graphics and Vision Research Group
*
* 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 ... | unibas-gravis/scalismo-faces | src/main/scala/scalismo/faces/io/MoMoIO.scala | Scala | apache-2.0 | 21,732 |
package learn.scala.ch8
import org.scalatest.{Matchers, FlatSpec}
/**
* Created by shawn on 15. 1. 21..
*/
class FunctionsAndClosures extends FlatSpec with Matchers {
"8.6 Partially applied functions" should "개별 파라미터를 지칭하기 위해 _를 사용하기도 하지만 전체 파라미터 리스트를 _로 대체할 수 있다." in {
val someNumbers = List(0,1,2,3,4,5)
... | practice/learn.scala | src/test/scala/learn/scala/ch8/FunctionsAndClosures.scala | Scala | mit | 1,831 |
package daniel.zolnai.marathon.entity
import org.joda.time.DateTime
/**
* Contains all the previous failures.
* Created by Daniel Zolnai on 2016-07-16.
*/
class History {
var triggerHistories: List[TriggerHistory] = List()
var lastSaved: Option[DateTime] = None
}
| dzolnai/marathon-email-notifier | src/main/scala/daniel/zolnai/marathon/entity/History.scala | Scala | apache-2.0 | 276 |
//############################################################################
// Test Java interaction
//############################################################################
import java.awt.Color;
import java.awt.Point;
class ColoredPoint(x: Int, y: Int, c_ : Color) extends Point(x, y) {
val c: Color = c_;... | felixmulder/scala | test/disabled/jvm/JavaInteraction.scala | Scala | bsd-3-clause | 1,069 |
/*
* 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/models/responsiblepeople/UKPassport.scala | Scala | apache-2.0 | 2,793 |
object CodeThatIncludesSomeRuby {
#include hello.rb
}
| travisbrown/util | util-eval/src/test/resources/RubyInclude.scala | Scala | apache-2.0 | 54 |
/*******************************************************************************
* Copyright 2017 Capital One Services, LLC and Bitwise, 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... | capitalone/Hydrograph | hydrograph.engine/hydrograph.engine.spark/src/main/scala/hydrograph/engine/spark/components/adapter/OutputSparkRedshiftAdapter.scala | Scala | apache-2.0 | 2,020 |
package scala.generator
import models.TestHelper
import com.bryzek.apidoc.spec.v0.models._
import org.scalatest._
class ScalaOperationSpec extends FunSpec with ShouldMatchers {
private lazy val service = models.TestHelper.referenceApiService
private lazy val ssd = new ScalaService(service)
val q1 = new Parame... | krschultz/apidoc-generator | scala-generator/src/test/scala/models/generator/ScalaOperationSpec.scala | Scala | mit | 2,895 |
import org.specs2.mutable._
class Week8Tests extends Specification {
"Infinite lists" should {
"from" in {
InfLists.from(1).head mustEqual 1
InfLists.from(1).take(10).toList mustEqual List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
InfLists.from(3).take(10).toList mustEqual List(3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
In... | Meemaw/scalaProgramming | week8/src/test/scala/MainTests.scala | Scala | mit | 4,304 |
/*
* Moresby Coffee Bean
*
* Copyright (c) 2013, Barnabas Sudy (barnabas.sudy@gmail.com)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the abov... | MoresbyCoffee/Stroll-Server | test/actors/dal/DataAccessActorTest.scala | Scala | gpl-3.0 | 3,639 |
package edu.gemini.seqexec.server.osgi
import edu.gemini.epics.acm.CaService
import edu.gemini.seqexec.server.{Flamingos2Epics, SeqexecFailure, TcsEpics}
import org.osgi.framework.{BundleActivator, BundleContext, ServiceRegistration}
import scalaz._
import Scalaz._
object Activator {
val CommandScope = "osgi.comman... | fnussber/ocs | bundle/edu.gemini.seqexec.server/src/main/scala/edu/gemini/seqexec/server/osgi/Activator.scala | Scala | bsd-3-clause | 1,394 |
package lila.db
package api
import play.api.libs.json._
import reactivemongo.api.SortOrder
import reactivemongo.bson._
object $sort {
def asc: SortOrder = SortOrder.Ascending
def desc: SortOrder = SortOrder.Descending
def asc(field: String): (String, SortOrder) = field -> asc
def desc(field: String): (Strin... | Happy0/lila | modules/db/src/main/api/sort.scala | Scala | mit | 624 |
package com.reactific.jfxtend.scene
import javafx.event.EventHandler
import javafx.scene.effect.BlendMode
import javafx.scene.input._
import javafx.scene.{Cursor, Scene, Parent, Node}
import com.reactific.jfxtend.Extension
/** Unit Tests For NodeExtensions */
trait NodeExtensions[NT <: Node] extends Extension[NT] {... | reactific/jfxtensions | src/main/scala/com/reactific/jfxtend/scene/NodeExtensions.scala | Scala | apache-2.0 | 8,002 |
package org.jetbrains.plugins.scala
package lang
package resolve
import com.intellij.lang.java.JavaLanguage
import com.intellij.psi._
import com.intellij.psi.impl.source.resolve.JavaResolveUtil
import com.intellij.psi.scope.{NameHint, PsiScopeProcessor}
import com.intellij.psi.search.GlobalSearchScope
import com.intel... | loskutov/intellij-scala | src/org/jetbrains/plugins/scala/lang/resolve/ResolveUtils.scala | Scala | apache-2.0 | 24,956 |
/*
* 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... | cheeseng/scalatest | scalatest-test/src/test/scala/org/scalatest/ShouldLengthSizeSpec.scala | Scala | apache-2.0 | 12,087 |
package org.genericConfig.admin.client.old.config
import org.genericConfig.admin.client.views.html.HtmlElementIds
import org.scalajs.dom.raw.WebSocket
import org.scalajs.jquery.jQuery
import util.CommonFunction
/**
* Copyright (C) 2016 Gennadi Heimann genaheimann@gmail.com
*
* Created by Gennadi Heimann 03.05.201... | gennadij/admin | client/src/main/scala/org/genericConfig/admin/client/old/config/DeleteConfig.scala | Scala | apache-2.0 | 2,311 |
// https://www.youtube.com/watch?v=Jg3Uv_YWJqI
object Stateless extends SocialService {
private val mutableCache = ...
def followerStats(username: String) = {
/*
check cache
if response exists and isn't state, return it
otherwise compute new response: call web service
mutable cache is ba... | peterbecich/fpinscala | notes/scalazStateMonad.scala | Scala | mit | 4,863 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | andrewor14/iolap | streaming/src/main/scala/org/apache/spark/streaming/scheduler/InputInfoTracker.scala | Scala | apache-2.0 | 2,873 |
package eventsource.slick
import akka.actor.Scheduler
import akka.pattern.after
import play.api.LoggerLike
import scala.concurrent.duration.FiniteDuration
import scala.concurrent.{ExecutionContext, Future}
trait Retrying {
def logger: LoggerLike
def retry[T](retries: Int,
delay: FiniteDuration,
... | 21re/play-eventsource | src/main/scala/eventsource/slick/Retrying.scala | Scala | mit | 877 |
/*
* Copyright (c) <2015-2016>, see CONTRIBUTORS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list... | amanjpro/languages-a-la-carte | arrooj/src/main/scala/phases/ConstantCollectingFamily.scala | Scala | bsd-3-clause | 2,372 |
package org.joda.time.chrono
import org.joda.time.DateTimeField
import org.joda.time.DateTimeFieldType
import org.joda.time.DurationField
import org.joda.time.ReadablePartial
import org.joda.time.field.DecoratedDateTimeField
import org.joda.time.field.FieldUtils
@SerialVersionUID(-5961050944769862059L)
class GJYearOf... | mdedetrich/soda-time | shared/src/main/scala/org/joda/time/chrono/GJYearOfEraDateTimeField.scala | Scala | bsd-2-clause | 2,511 |
/*
* 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
* distribute... | wvlet/airframe | airframe-jdbc/src/main/scala/wvlet/airframe/jdbc/ConnectionPool.scala | Scala | apache-2.0 | 2,853 |
package no.nr.edvard.convergence.models
class JavaPackage(
val name: String,
val types: List[JavaType],
val subPackages: List[JavaPackage]
) extends JavaElement {
override def hashCode: Int = name.hashCode
override def equals(that: Any) =
(that != null && that.isInstanceOf[JavaPackage] &&
name ==... | edwkar/edwbsc | projects/Osiris/src/main/scala/no/nr/edvard/convergence/models/JavaPackage.scala | Scala | gpl-2.0 | 359 |
package com.softwaremill.vesplar.bolt
import backtype.storm.topology.base.BaseRichBolt
import com.softwaremill.vesplar.config.CassandraConfig
import backtype.storm.task.{TopologyContext, OutputCollector}
abstract class BaseCassandraBolt(cassandraNode: String) extends BaseRichBolt {
def this(cassandraConfig: Cassand... | adamw/vesplar | analyzer/src/main/scala/com/softwaremill/vesplar/bolt/BaseCassandraBolt.scala | Scala | apache-2.0 | 769 |
/*
* 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-test/src/test/scala/org/scalatest/tools/DashboardReporterSpec.scala | Scala | apache-2.0 | 1,751 |
/*
* Copyright 2013 Michael Krolikowski
*
* 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... | mesosphere/dns4s | core/src/main/scala/com/github/mkroli/dns4s/section/resource/SOAResource.scala | Scala | apache-2.0 | 1,714 |
package org.apache.openwhisk.core.scheduler.queue.test
import java.time.Instant
import java.util.concurrent.Executor
import java.{lang, util}
import akka.actor.ActorRef
import akka.actor.FSM.{CurrentState, StateTimeout, SubscribeTransitionCallBack, Transition}
import akka.pattern.ask
import akka.testkit.{ImplicitSend... | style95/openwhisk | tests/src/test/scala/org/apache/openwhisk/core/scheduler/queue/test/MemoryQueueTests.scala | Scala | apache-2.0 | 52,722 |
/*
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/scalding | scalding-core/src/main/scala/com/twitter/scalding/FoldOperations.scala | Scala | apache-2.0 | 1,971 |
/*
* 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 ... | trueyao/spark-lever | mllib/src/main/scala/org/apache/spark/mllib/clustering/PowerIterationClustering.scala | Scala | apache-2.0 | 9,840 |
/*
* 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 ... | hannesstockner/samza | samza-core/src/test/scala/org/apache/samza/job/TestJobRunner.scala | Scala | apache-2.0 | 1,775 |
package ml.wolfe.nlp.io
import ml.wolfe.nlp.{CharOffsets, Document, IRAnnotation, Sentence, Token}
/**
* Created by narad on 9/10/14.
*/
class TDTReader(dir: String, iformat: String = "UTF-8") extends Iterable[(IndexedSeq[String], Document)] {
val DOC_PATTERN = """<TDTID>(.*)</TDTID>""".r
val PARAGRAPH_PATTERN =... | wolfe-pack/wolfe | wolfe-nlp/src/main/scala/ml/wolfe/nlp/io/TDTReader.scala | Scala | apache-2.0 | 1,698 |
package sbtassembly
import sbt._
import Keys._
trait AssemblyKeys {
lazy val assembly = taskKey[File]("Builds a deployable fat jar.")
lazy val assembleArtifact = settingKey[Boolean]("Enables (true) or disables (false) assembling an artifact.")
lazy val assemblyOption = taskK... | nkhuyu/sbt-assembly | src/main/scala/sbtassembly/AssemblyKeys.scala | Scala | mit | 2,381 |
/*
* Copyright 2022 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/vat-registration-frontend | test/models/api/AttachmentsSpec.scala | Scala | apache-2.0 | 1,576 |
/*
* Copyright 2021 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/ct-calculations | src/main/scala/uk/gov/hmrc/ct/accounts/frs102/retriever/FullAccountsBoxRetriever.scala | Scala | apache-2.0 | 6,013 |
/*
* Copyright 2016 The BigDL Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | yiheng/BigDL | spark/dl/src/main/scala/com/intel/analytics/bigdl/example/MLPipeline/DLClassifierLeNet.scala | Scala | apache-2.0 | 4,134 |
package org.hyperspray.macros
import scala.language.experimental.macros
import scala.reflect.macros.Context
trait Convertable[T] {
def toParamSeq(t: T): Seq[Tuple2[String, Any]]
}
object Convertable {
implicit def materializeConvertable[T]: Convertable[T] = macro materializeConvertableImpl[T]
def materializeC... | jczuchnowski/hyperspray | macros/src/main/scala/org/hyperspray/macros/Convertable.scala | Scala | cc0-1.0 | 902 |
package com.walmartlabs.mupd8
import java.util.concurrent.Callable
import grizzled.slf4j.Logging
import org.jboss.netty.handler.codec.oneone.OneToOneEncoder
import org.jboss.netty.handler.codec.replay.ReplayingDecoder
import com.walmartlabs.mupd8.network.server.Server
import com.walmartlabs.mupd8.network.common.Listen... | bmistry13/mupd8 | src/main/scala/com/walmartlabs/mupd8/MUCluster.scala | Scala | apache-2.0 | 2,992 |
// Copyright (C) 2015, codejitsu.
package net.codejitsu.saruman.dsl
import java.io.File
trait Credentials {
def service: String
}
trait SshCredentials extends Credentials {
val service = "ssh"
def keyFile: Option[File]
}
| codejitsu/saruman | saruman-dsl/src/main/scala/Credentials.scala | Scala | apache-2.0 | 231 |
/*
* Copyright 2007-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... | lift/framework | persistence/record/src/main/scala/net/liftweb/record/field/LongField.scala | Scala | apache-2.0 | 2,215 |
/*
* Copyright (c) 2014 Elmar Athmer
*
* This file is part of SolarSystemGrandTour.
*
* SolarSystemGrandTour 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 yo... | zauberpony/solarsystem-grand-tour | src/main/scala/net/aerospaceresearch/math/Formulas.scala | Scala | gpl-3.0 | 3,722 |
/*
* 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 ... | style95/openwhisk | common/scala/src/main/scala/org/apache/openwhisk/core/entity/FullyQualifiedEntityName.scala | Scala | apache-2.0 | 6,416 |
package model
import skinny.orm._, feature._
import scalikejdbc._
import org.joda.time._
case class User(
userId: Long,
name: String,
facebookUserId: Option[Long] = None,
googleUserId: Option[Long] = None,
twitterUserId: Option[Long] = None,
createdAt: DateTime,
updatedAt: DateTime
)
object User extend... | tsukaby/anime-lineup | src/main/scala/model/User.scala | Scala | mit | 1,431 |
package com.github.tweets.gateway.twitter
import java.nio.charset.Charset
import java.util.Base64
import com.fasterxml.jackson.annotation.JsonProperty
import org.springframework.beans.factory.annotation.Value
import org.springframework.stereotype.Component
private[twitter] object TwitterAuthorizationRequest {
def ... | andrei-l/tweets-for-github-projects-gatherer | src/main/scala/com/github/tweets/gateway/twitter/TwitterAuthorizationExchange.scala | Scala | mit | 1,030 |
package scalangine.engine
import org.lwjgl.opengl.{DisplayMode, Display}
/**
* Created by maxim_000 on 11/19/2014.
*/
trait BasicGameRunner extends ScreenCleaner {
var initiateGameClose: Boolean = false
var fps: Int = 60
def start = {
initialize
while(!Display.isCloseRequested && !initiateGameClose)... | sanecommajustin/scalangine | src/main/scala/scalangine/engine/BasicGameRunner.scala | Scala | mit | 499 |
package org.scalafmt.internal
import org.scalafmt.Error.NoopDefaultPolicyApplied
/**
* The decision made by [[Router]].
*
* Used by [[Policy]] to enforce non-local formatting.
*
* @param f is applied to every decision until expire
* @param expire The latest token offset.
*/
case class Policy(
f: Par... | olafurpg/scalafmt | scalafmt-core/shared/src/main/scala/org/scalafmt/internal/Policy.scala | Scala | apache-2.0 | 1,773 |
package com.twitter.finagle
import com.twitter.conversions.storage._
import com.twitter.finagle.client._
import com.twitter.finagle.factory.BindingFactory
import com.twitter.finagle.filter.PayloadSizeFilter
import com.twitter.finagle.mux.lease.exp.Lessor
import com.twitter.finagle.mux.transport._
import com.twitter.fi... | spockz/finagle | finagle-mux/src/main/scala/com/twitter/finagle/Mux.scala | Scala | apache-2.0 | 12,887 |
/**
* 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 ... | nfergu/bdg-utils | utils-metrics/src/test/scala/org/bdgenomics/utils/instrumentation/ASCIITableSuite.scala | Scala | apache-2.0 | 2,925 |
/*
* This file is part of Apparat.
*
* Copyright (C) 2010 Joa Ebert
* http://www.joa-ebert.com/
*
* This library 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 Lice... | joa/apparat | apparat-core/src/main/scala/apparat/swc/Swc.scala | Scala | lgpl-2.1 | 3,799 |
package t1000678_4
object A {
object B {
def foo: Unit = {}
}
} | Kwestor/scala-ide | org.scala-ide.sdt.core.tests/test-workspace/simple-structure-builder/src/t1000678_4/A.scala | Scala | bsd-3-clause | 72 |
package com.cloudlabhk.faceanalysis
import com.amazonaws.xray.AWSXRay
import com.amazonaws.xray.handlers.TracingHandler
abstract class RekognitionTools {
import java.io.File
import com.amazonaws.AmazonClientException
import com.amazonaws.auth.{AWSCredentials, DefaultAWSCredentialsProviderChain}
import com.... | wongcyrus/HowWhoFeelInVideo | HowWhoFeelLambda/src/main/scala/com/cloudlabhk/faceanalysis/RekognitionTools.scala | Scala | mit | 1,609 |
package command
class Sms {
def sendSms(): Unit = println("Sending SMS...")
}
| BBK-PiJ-2015-67/sdp-portfolio | exercises/week10/src/main/scala/command/Sms.scala | Scala | unlicense | 81 |
package de.choffmeister.microserviceutils.json
import play.api.libs.json._
import scala.util.{Failure, Success, Try}
object MapFormat {
private[json] implicit def apply[K, V](readKey: String => K, writeKey: K => String)(implicit
valueFormat: Format[V]
): OFormat[Map[K, V]] = new OFormat[Map[K, V]] {
over... | choffmeister/microservice-utils | microservice-utils/src/main/scala/de/choffmeister/microserviceutils/json/MapFormat.scala | Scala | mit | 1,696 |
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.