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 com.madhukaraphatak.sizeof.examples
import java.util.LinkedHashMap
import com.madhukaraphatak.sizeof.SizeEstimator
import org.apache.log4j.Logger
/**
* An implementation of Cache that estimates the sizes of its entries and
* attempts to limit its total memory usage to a fraction of the JVM heap.
* Object... | phatak-dev/java-sizeof | examples/src/main/scala/com/madhukaraphatak/sizeof/examples/BoundedMemoryCache.scala | Scala | apache-2.0 | 3,267 |
package org.openapitools.models
import io.circe._
import io.finch.circe._
import io.circe.generic.semiauto._
import io.circe.java8.time._
import org.openapitools._
import org.openapitools.models.ExtensionClassImpl
/**
*
* @param ioPeriodjenkinsPeriodblueoceanPeriodservicePeriodembeddedPeriodrestPeriodPipelineImpl ... | cliffano/swaggy-jenkins | clients/scala-finch/generated/src/main/scala/org/openapitools/models/ExtensionClassContainerImpl1map.scala | Scala | mit | 1,148 |
// 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 | core/src/test/scala/squid/utils/CollectionUtilsTest.scala | Scala | apache-2.0 | 3,300 |
/*
* @author Philip Stutz
*
* Copyright 2014 University of Zurich
*
* 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.... | jacqueslk/triplerush-filter | src/main/scala/com/signalcollect/triplerush/LoadBalancingTripleMapper.scala | Scala | apache-2.0 | 3,176 |
package org.scalatest.examples.funsuite.getfixture
import org.scalatest.FunSuite
import collection.mutable.ListBuffer
class ExampleSuite extends FunSuite {
def fixture =
new {
val builder = new StringBuilder("ScalaTest is ")
val buffer = new ListBuffer[String]
}
test("Testing should be ea... | hubertp/scalatest | examples/src/main/scala/org/scalatest/examples/funsuite/getfixture/ExampleSuite.scala | Scala | apache-2.0 | 665 |
package leo.modules.agent.rules
import leo.datastructures.blackboard.{Blackboard, DataStore, DataType, ImmutableDelta}
/**
* Wrapper for an agent graph.
*
* Contains a list of all connected rules
* and the corresponding data structures,
* as well as the entry point for new data.
*
*/
trait RuleGraph[In,... | leoprover/Leo-III | oldsrc/main/scala/leo/modules/agent/rules/RuleGraph.scala | Scala | bsd-3-clause | 1,866 |
class ClassParametersRepeated(args: String*) {
def arguments = argString(args)
def argString(as: Seq[String]): String =
if (as.isEmpty) ""
else as.head + " " + argString(as.tail)
}
| grzegorzbalcerek/scala-book-examples | examples/ClassParametersRepeated.scala | Scala | mit | 193 |
package dotty.tools.scaladoc
package tasty.comments
import scala.jdk.CollectionConverters._
import com.vladsch.flexmark.util.{ast => mdu}
object dbg:
case class See(n: mdu.Node, c: Seq[See]) {
def show(sb: StringBuilder, indent: Int): Unit = {
sb ++= " " * indent
sb ++= n.toString
sb ++= "\\n... | dotty-staging/dotty | scaladoc/src/dotty/tools/scaladoc/tasty/comments/package.scala | Scala | apache-2.0 | 571 |
/* Copyright 2009-2016 EPFL, Lausanne */
package leon
package utils
import purescala.Common._
import purescala.Definitions._
import purescala.Expressions._
import purescala.Extractors._
import purescala.Constructors._
import purescala.Types._
// FIXME: Unused and untested
object UnitElimination extends Transformatio... | regb/leon | src/main/scala/leon/utils/UnitElimination.scala | Scala | gpl-3.0 | 5,215 |
package com.alanjz.meerkat.app.menu.file
import com.alanjz.meerkat.app.menu.MCMenu
object MCFileMenu extends MCMenu("File") {
this.add(MCExit)
}
| spacenut/meerkat-chess | src/com/alanjz/meerkat/app/menu/file/MCFileMenu.scala | Scala | gpl-2.0 | 149 |
package usbinstall.controllers
import com.typesafe.scalalogging.StrictLogging
import javafx.fxml.{FXML, FXMLLoader, Initializable}
import javafx.scene.{Parent, Scene}
import javafx.scene.control.{Label, Tab, TabPane, TextArea}
import javafx.scene.layout.{AnchorPane, GridPane, VBox}
import javafx.stage.{Modality, Stage... | suiryc/usbinstall | src/main/scala/usbinstall/controllers/InstallController.scala | Scala | gpl-3.0 | 11,266 |
/*
*/
package see
import org.junit._
/** Tests examples from documentation.
*/
//@Ignore
class ExampleTest extends TestCase {
@Test
def testObfuscated() {
println("Obfuscated")
val prog = """
and = 1;
xor = 2;
or = 3;
if = and or xor xor and or not or and and or xor;
"""
expec... | acruise/see | src/test/scala/see/ExampleTest.scala | Scala | bsd-3-clause | 1,445 |
package pdi.jwt
object JwtHeader {
val DEFAULT_TYPE = "JWT"
def apply(
algorithm: Option[JwtAlgorithm] = None,
typ: Option[String] = None,
contentType: Option[String] = None,
keyId: Option[String] = None
) = new JwtHeader(algorithm, typ, contentType, keyId)
def apply(algorithm: Option... | pauldijou/jwt-scala | core/src/main/scala/JwtHeader.scala | Scala | apache-2.0 | 2,513 |
package com.wordnik
package object swagger {
object annotations {
import scala.annotation.meta.field
@deprecated("because of swagger spec 1.2 this got renamed to ApiModelProperty", "2.2.2")
type ApiProperty = com.wordnik.swagger.runtime.annotations.ApiModelProperty @field
type ApiModelProperty = c... | swagger-api/swagger-scala | src/main/scala/com/wordnik/swagger/package.scala | Scala | apache-2.0 | 1,119 |
/*
* Copyright 2014 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... | http4s/blaze | http/src/main/scala/org/http4s/blaze/http/http2/ConnectionImpl.scala | Scala | apache-2.0 | 9,187 |
/*
* 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 ... | ueshin/apache-spark | sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/MetricsReporter.scala | Scala | apache-2.0 | 2,786 |
package com.codebook.akka.actor.message
case class SetMessage(key: String, value: Object)
| flopezlasanta/akka-services | src/main/scala/com/codebook/akka/actor/message/SetMessage.scala | Scala | mit | 91 |
package se.lu.nateko.cp.meta.onto.labeler
import org.semanticweb.owlapi.model.{IRI => OWLIRI, _}
import org.eclipse.rdf4j.model.IRI
import se.lu.nateko.cp.meta.instanceserver.InstanceServer
import org.eclipse.rdf4j.model.Literal
class MultiComponentIndividualLabeler(
components: Seq[DisplayComponent],
inner: Instan... | ICOS-Carbon-Portal/meta | src/main/scala/se/lu/nateko/cp/meta/onto/labeler/MultiComponentIndividualLabeler.scala | Scala | gpl-3.0 | 1,724 |
package io.github.raptros.bson
import com.mongodb.{BasicDBList, DBObject}
import scalaz._
import scalaz.syntax.id._
import scalaz.syntax.std.boolean._
import scalaz.syntax.validation._
import scalaz.syntax.traverse._
import scala.reflect._
import org.joda.time.DateTime
import scalaz.std.list._
/** the typeclass of th... | raptros/the-bson | core/src/main/scala/io/github/raptros/bson/DecodeBson.scala | Scala | bsd-3-clause | 5,168 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ma... | harperjiang/enc-selector | src/main/scala/edu/uchicago/cs/encsel/dataset/feature/Features.scala | Scala | apache-2.0 | 3,213 |
package com.twitter.app
import com.twitter.finagle.util.loadServiceIgnoredPaths
import java.io.{File, IOException}
import java.net.{URI, URISyntaxException, URL, URLClassLoader}
import java.nio.charset.MalformedInputException
import java.nio.file.Paths
import java.util.jar.{JarEntry, JarFile}
import scala.collection.m... | twitter/util | util-app/src/main/scala/com/twitter/app/ClassPath.scala | Scala | apache-2.0 | 8,036 |
package org.jetbrains.plugins.scala
package codeInspection
package collections
import com.intellij.testFramework.EditorTestUtil
/**
* @author Nikolay.Tropin
*/
class MapFlattenTest extends OperationsOnCollectionInspectionTest {
import EditorTestUtil.{SELECTION_END_TAG => END, SELECTION_START_TAG => START}
ove... | jastice/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/codeInspection/collections/MapFlattenTest.scala | Scala | apache-2.0 | 1,970 |
/*
* Copyright 2011-2018 GatlingCorp (http://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 applic... | wiacekm/gatling | gatling-recorder/src/test/scala/io/gatling/recorder/scenario/template/RequestTemplateSpec.scala | Scala | apache-2.0 | 2,178 |
package mbilski.spray.hmac
case class HmacData(uuid: String, hash: String)
trait Authentication[A] { this: Signer =>
def authenticate(hmac: HmacData, uri: String): Option[A] = {
val (account, secret) = accountAndSecret(hmac.uuid)
for (a <- account; s <- secret if valid(hmac.hash, s, uri)) yield a
}
def... | mbilski/spray-hmac | src/main/scala/mbilski/spray/hmac/Authentication.scala | Scala | apache-2.0 | 383 |
package org.ferrit.core.crawler
import akka.actor.{Actor, Props, ActorRef}
import akka.event.Logging
import akka.pattern.{ask, pipe}
import akka.util.Timeout
import akka.routing.{Listeners, Deafen, WithListeners}
import scala.concurrent.{ExecutionContext, Future}
import scala.concurrent.duration._
import scala.util.{F... | reggoodwin/ferrit | src/main/scala/org/ferrit/core/crawler/CrawlWorker.scala | Scala | mit | 11,786 |
package io.vamp.model.resolver
import io.vamp.common.{ Config, NamespaceProvider }
import io.vamp.model.artifact.{ GlobalReference, ValueReference }
trait ConfigurationValueResolver extends GlobalValueResolver {
this: NamespaceProvider ⇒
def valueForReference: PartialFunction[ValueReference, String] = {
case... | dragoslav/vamp | model/src/main/scala/io/vamp/model/resolver/ConfigurationValueResolver.scala | Scala | apache-2.0 | 414 |
package models.admin.audits
import scalaz._
import Scalaz._
import scalaz.effect.IO
import scalaz.EitherT._
import scalaz.Validation
import scalaz.Validation.FlatMap._
import scalaz.NonEmptyList._
import scalaz.syntax.SemigroupOps
import models.tosca.KeyValueList
import net.liftweb.json._
import net.liftweb.json.scal... | megamsys/verticegateway | app/models/admin/audits/Scavenger.scala | Scala | mit | 3,606 |
/**
* 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"); yo... | sslavic/kafka | core/src/test/scala/integration/kafka/api/TransactionsBounceTest.scala | Scala | apache-2.0 | 9,625 |
package com.github.morikuni.locest.frequency.domain.model
import com.github.morikuni.locest.util.Identifier
case class AreaId(override val value: Int) extends Identifier[Int] | morikuni/locest | frequency/app/com/github/morikuni/locest/frequency/domain/model/Area.scala | Scala | mit | 176 |
package org.monalang.monac.iface
import org.monalang.monac.common.util.ListUtil
object OptionName extends Enumeration {
type OptionName = Value
val OUTPUT = Value("output")
val ARCHITECTURE = Value("sets the target architecture")
}
import OptionName._
/*
* NOTE currently there is a 1-1 correspondence between... | corazza/monac-scala | monac/src/main/scala/org/monalang/monac/iface/CompileOptions.scala | Scala | gpl-3.0 | 2,138 |
package models
import akka.actor.ActorRef
object WorkerStatusProtocol {
import Task._
trait WorkerStatus
case class Working(task: Task) extends WorkerStatus
case object Idle extends WorkerStatus
case class WorkerState(ref: ActorRef, status: WorkerStatus)
}
| jhejderup/Awsseract | awsseract-frontend/app/models/WorkerStatusProtocol.scala | Scala | apache-2.0 | 274 |
/*
* Copyright (c) 2014 Contributor. All rights reserved.
*/
package org.scalaide.ui.internal.editor.decorators.implicits
import org.scalaide.ui.internal.preferences.ImplicitsPreferencePage
import org.scalaide.ui.internal.actions.AbstractToggleHandler
/**
* Handler to toggle the Implicits Display (shortcut to avoi... | Kwestor/scala-ide | org.scala-ide.sdt.core/src/org/scalaide/ui/internal/editor/decorators/implicits/ToggleImplicitsDisplayHandler.scala | Scala | bsd-3-clause | 561 |
/*
* 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 ... | sahilTakiar/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/MicroBatchExecution.scala | Scala | apache-2.0 | 26,125 |
/* sbt -- Simple Build Tool
* Copyright 2011 Mark Harrah
*/
package sbt
import java.util.regex.Pattern
import java.io.File
import Keys.{Streams, TaskStreams}
import Def.ScopedKey
import Aggregation.{KeyValue, Values}
import Types.idFun
import Highlight.{bold, showMatches}
import annotation.tailrec
object Ou... | olove/xsbt | main/src/main/scala/sbt/Output.scala | Scala | bsd-3-clause | 2,345 |
/*
* ____ ____ _____ ____ ___ ____
* | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R)
* | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data
* | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In... | precog/platform | surtr/src/test/scala/com/precog/surtr/NIHDBFileStoreSpec.scala | Scala | agpl-3.0 | 4,924 |
/***********************************************************************
* 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-utils/src/test/scala/org/locationtech/geomesa/utils/stats/TopKTest.scala | Scala | apache-2.0 | 10,183 |
package heisenberg
import java.io.StringWriter
import com.fasterxml.jackson.databind.ObjectMapper
import com.heisenberg.impl.StartBuilderImpl
import com.heisenberg.impl.instance.ProcessInstanceImpl
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import org.bson.types.ObjectId
import scala.concurrent.d... | whitewalter/breaking-load | user-files/simulations/heisenberg/GatlingRestDemo.scala | Scala | apache-2.0 | 2,385 |
package controllers
import models.Menu
class MenuController {
}
object MenuData {
/**
* Some fake menu data so we can simulate retrievals.
*/
def getMenu(name: String): List[Menu] = name match {
case "footer" => List(
Menu(0, "About", "#aboutFooter"),
Menu(1, "Contact", "#contactFooter"),
Menu(... | gregoryboucher/resume-app | src/main/scala/app/controllers/MenuController.scala | Scala | mit | 617 |
package vulkan.wrapper.registry.command
import vulkan.wrapper.registry.controller.{VulkanController, VulkanFeature}
import vulkan.wrapper.registry.controller.controll.{VulkanControll, VulkanControllData, VulkanControllRequire}
import vulkan.wrapper.registry.controller.controlled.VulkanControlled
import vulkan.wrapper.... | MrInformatic/VulkanWrapper | src/vulkan/wrapper/registry/command/VulkanCommandNode.scala | Scala | mit | 1,001 |
package doodle
package image
package examples
import doodle.core._
import doodle.image.Image
import doodle.syntax._
import doodle.random._
import cats.syntax.all._
object Windswept {
import PathElement._
def randomColor(meanHue: Angle) =
for {
hue <- Random.normal(meanHue.toDegrees, 10.0) map (_.degre... | underscoreio/doodle | image/shared/src/main/scala/doodle/image/examples/Windswept.scala | Scala | apache-2.0 | 3,567 |
import org.junit.runner._
import org.specs2.mutable._
import org.specs2.runner._
import play.api.libs.json.{JsValue, Json}
import play.api.mvc
import play.api.test.Helpers._
import play.api.test._
import scala.concurrent.Future
@RunWith(classOf[JUnitRunner])
class FunctionalTest extends Specification {
val usernam... | GMadorell/play-jwt | test/FunctionalTest.scala | Scala | mit | 4,293 |
package io.github.oxlade39.storrent.peer
import org.scalatest.{BeforeAndAfterAll, WordSpecLike}
import akka.testkit.{TestProbe, ImplicitSender, TestKit}
import akka.actor._
import org.scalatest.MustMatchers
import io.github.oxlade39.storrent.test.util.{ForwardingParent, FileOps}
import akka.io.{Tcp, IO}
import java.ne... | oxlade39/STorrent | src/test/scala/io/github/oxlade39/storrent/peer/PeerConnectionTest.scala | Scala | apache-2.0 | 3,927 |
package coursier.launcher
import java.io.File
import java.nio.file.{Path, Paths}
import java.util.jar.{Attributes => JarAttributes}
import java.util.zip.ZipEntry
import coursier.launcher.internal.Windows
import dataclass._
sealed abstract class Parameters extends Product with Serializable {
def isNative: Boolean =... | alexarchambault/coursier | modules/launcher/src/main/scala/coursier/launcher/Parameters.scala | Scala | apache-2.0 | 4,518 |
package org.dberg.hubot.listeners
import org.dberg.hubot.Hubot
import org.dberg.hubot.event.Event
import org.dberg.hubot.listeners.Listener.CallbackSuccess
import org.dberg.hubot.models._
class TestListener(hubot: Hubot) extends Listener(hubot, ListenerType.Hear) {
val callback: Callback = {
case message @ Bod... | denen99/hubot-scala | src/main/scala/org/dberg/hubot/listeners/TestListener.scala | Scala | apache-2.0 | 880 |
/**
* Copyright (C) 2007 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... | martinluther/orbeon-forms | src/main/scala/org/orbeon/oxf/xforms/control/MutableLHHAProperty.scala | Scala | lgpl-2.1 | 8,412 |
/* sbt -- Simple Build Tool
* Copyright 2009, 2010 Mark Harrah
*/
package xsbt.boot
import java.io.File
// The entry point to the launcher
object Boot {
def main(args: Array[String]) {
val config = parseArgs(args)
// If we havne't exited, we set up some hooks and launch
System.clearProperty("scala.ho... | niktrop/sbt | launch/src/main/scala/xsbt/boot/Boot.scala | Scala | bsd-3-clause | 2,167 |
/** Copyright 2015 TappingStone, 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 ... | schon/PredictionIO | tools/src/main/scala/io/prediction/tools/console/App.scala | Scala | apache-2.0 | 18,118 |
package com.scalafi.openbook
sealed trait Side
object Side {
case object Buy extends Side
case object Sell extends Side
case object NA extends Side
def apply(c: Char) = c match {
case 'B' => Buy
case 'S' => Sell
case _ if c.toByte == 0 => NA
case _ => sys.error(s"Unknown Buy/Sell side: '$c'")... | ezhulenev/scala-openbook | src/main/scala/com/scalafi/openbook/Side.scala | Scala | mit | 326 |
package com.github.jpmossin.charjump
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
class MatchingPositionSearcherTest extends FunSuite {
test("All lower case letters are included as single char jumps") {
val jumpKeys = Matchi... | jpmossin/CharJump | src/test/scala/com/github/jpmossin/charjump/MatchingPositionSearcherTest.scala | Scala | mit | 1,396 |
/*
* 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 | core/src/main/scala/org/apache/spark/MapOutputTracker.scala | Scala | apache-2.0 | 14,551 |
package sysadmin
import scalikejdbc.ConnectionPool
trait Connection {
Class.forName("org.h2.Driver")
ConnectionPool.add(Symbol("sysadmin"), "jdbc:h2:mem:sysadmin", "sa", "sa")
}
| skinny-framework/skinny-framework | factory-girl/src/test/scala/sysadmin/Connection.scala | Scala | mit | 184 |
package magic.gol
import akka.actor._
class ServiceActor extends Actor with ActorLogging with GeneralRoute {
def actorRefFactory = context
def receive = runRoute(route)
}
object ServiceActor {
def props = Props[ServiceActor]
}
| dvallejo/spray-example | src/main/scala/magic/gol/ServiceActor.scala | Scala | apache-2.0 | 239 |
package net.scalax.ubw.core
sealed abstract trait Pile {
self =>
type DataType
def leafZero: List[AtomicValue]
def leafZeroDataPiles: List[DataPile]
}
trait PileList extends Pile {
self =>
type PileType
override type DataType
def leafZero: List[AtomicValue] = {
encodePiles.ma... | scalax/fsn | framework/ubw-core/src/main/scala/net/scalax/ubw/core/Pile.scala | Scala | mit | 2,672 |
/*
* 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 agreed to in writ... | dotty-staging/scalatest | scalatest-test/src/test/scala/org/scalatest/ListShouldContainAtLeastOneOfLogicalAndSpec.scala | Scala | apache-2.0 | 54,244 |
package mimir.exec;
import java.sql._;
import mimir.sql.JDBCUtils;
import mimir.algebra._;
import mimir.algebra.Type._;
class ResultSetIterator(src: ResultSet) extends ResultIterator
{
val meta = src.getMetaData();
var extract: List[() => PrimitiveValue] =
(0 until meta.getColumnCount()).map( (i) => {
... | Legacy25/mimir | mimircore/src/main/scala/mimir/exec/ResultSetIterator.scala | Scala | apache-2.0 | 1,661 |
package org.clulab.dynet
import java.io.{BufferedReader, File, FileReader, PrintWriter}
import org.clulab.processors.clu.CluProcessor
import org.clulab.processors.{Document, Processor}
import org.clulab.serialization.DocumentSerializer
import org.clulab.struct.{Counter, DirectedGraph, GraphMap}
import org.slf4j.{Logg... | sistanlp/processors | main/src/main/scala/org/clulab/dynet/CoNLLSRLToMetal.scala | Scala | apache-2.0 | 19,938 |
package play.core.server.netty
import scala.language.reflectiveCalls
import org.jboss.netty.channel._
import org.jboss.netty.handler.codec.http._
import org.jboss.netty.handler.codec.http.websocketx._
import play.core._
import play.core.server.websocket.WebSocketHandshake
import play.api._
import play.api.libs.iterat... | vangav/vos_backend | play-2.2.6/framework/src/play/src/main/scala/play/core/server/netty/WebSocketHandler.scala | Scala | mit | 8,171 |
package controllers
import db.{Authorization, OrganizationsDao, VersionsDao}
import javax.inject.{Inject, Named, Singleton}
import play.api.mvc._
import play.api.libs.json._
@Singleton
class Healthchecks @Inject() (
@Named("main-actor") mainActor: akka.actor.ActorRef,
val apibuilderControllerComponents: Apibuilde... | gheine/apidoc | api/app/controllers/Healthchecks.scala | Scala | mit | 823 |
package org.openapitools.models
import io.circe._
import io.finch.circe._
import io.circe.generic.semiauto._
import io.circe.java8.time._
import org.openapitools._
import org.openapitools.models.InputStepImpllinks
import org.openapitools.models.StringParameterDefinition
import scala.collection.immutable.Seq
/**
*
... | cliffano/swaggy-jenkins | clients/scala-finch/generated/src/main/scala/org/openapitools/models/InputStepImpl.scala | Scala | mit | 1,077 |
package nsmc.mongo
import java.net.InetAddress
import org.apache.spark.SparkConf
private[nsmc]
case class MongoConnectorConf(
host: String,
port: Int = MongoConnectorConf.DefaultPort,
splitIndexed: Boolean,
splitSize: Int,
directToShards: Boolean,
useShardChunks: Boolean,
user: Option[String],
passwo... | shotishu/spark-mongodb-connector | src/main/scala/nsmc/mongo/MongoConnectorConf.scala | Scala | apache-2.0 | 2,312 |
package views.html.relation
import lila.api.Context
import lila.app.templating.Environment._
import lila.app.ui.ScalatagsTemplate._
import controllers.routes
object actions {
private val dataHoverText = data("hover-text")
def apply(
userId: lila.user.User.ID,
relation: Option[lila.relation.Relation... | luanlv/lila | app/views/relation/actions.scala | Scala | mit | 2,499 |
#!/opt/local/bin/scala
########################################################### {{{1 ###########
# Copyright © 2011 Martin Krischik
############################################################################
# $Author: krischik $
# $Revision: 6690 $
# $Date: 2014-12-29 20:51:07 +0100 (Mo, 29. Dez 2014) $
# $Id... | krischik/Fit-Import | src/main/scripts/Create-IC-Menu.scala | Scala | gpl-3.0 | 5,726 |
package com.danielwestheide.test
import org.scalatest.{FlatSpec, Matchers}
class RDDBaseTest extends FlatSpec with Matchers {
behavior of "RDDBase"
it should "return calling site from outside kontextfrei package" in {
import com.danielwestheide.kontextfrei.rdd.CallSiteInfoTestHelper._
val (method, site... | dwestheide/kontextfrei | core/src/test/scala/com/danielwestheide/test/RDDBaseTest.scala | Scala | apache-2.0 | 420 |
package com.artclod.mathml
import com.artclod.mathml.scalar.MathMLElem
import com.artclod.mathml.scalar.concept.Constant
import scala.xml._
case class Math(
override val prefix: String,
attributes1: MetaData,
override val scope: NamespaceBinding,
override val minimizeEmpty: Boolean,
val value: MathMLElem)
exte... | kristiankime/web-education-games | app/com/artclod/mathml/Math.scala | Scala | mit | 967 |
package com.github.agourlay.cornichon.http
import com.github.agourlay.cornichon.core.{ Scenario, ScenarioRunner, Session, SessionKey }
import com.github.agourlay.cornichon.dsl.SessionSteps.SessionStepBuilder
import com.github.agourlay.cornichon.testHelpers.IOSpec
import org.scalacheck.{ Gen, Properties }
import org.sc... | agourlay/cornichon | cornichon-core/src/test/scala/com/github/agourlay/cornichon/http/HttpDslProperties.scala | Scala | apache-2.0 | 1,123 |
package edison.cli.actions
import edison.cli.io.IO
import edison.cli.{ Config, Environment }
import edison.model.domain._
import edison.util.{ NoLogging, SmartSpec }
import org.scalamock.scalatest.MockFactory
class SampleGeneratorTest extends SmartSpec with MockFactory {
val ioMock = mock[IO]
val generator = new ... | pawel-wiejacha/edison | service/src/test/scala/edison/cli/actions/SampleGeneratorTest.scala | Scala | mit | 811 |
// @GENERATOR:play-routes-compiler
// @SOURCE:D:/git/trask/glowroot/agent-parent/plugins/play-plugin/tmp-router-files/conf/routes
// @DATE:Sat Apr 09 15:57:27 PDT 2016
import play.api.routing.JavaScriptReverseRoute
import play.api.mvc.{ QueryStringBindable, PathBindable, Call, JavascriptLiteral }
import play.core.rou... | trask/glowroot | agent/plugins/play-plugin/src/test/app-2.5.x-scala/scala/controllers/javascript/JavaScriptReverseRoutes.scala | Scala | apache-2.0 | 2,754 |
package scala.build
import sbt._
import sbt.complete.Parser._
import sbt.complete.Parsers._
import sbt.complete._
object ParserUtil {
def notStartingWith(parser: Parser[String], c: Char): Parser[String] = parser & not(c ~> any.*, s"value cannot start with $c.")
def concat(p: Parser[(String, String)]): Parser[Stri... | lrytz/scala | project/ParserUtil.scala | Scala | apache-2.0 | 2,183 |
/*
* 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/test/scala/io/gatling/core/action/RendezVousSpec.scala | Scala | apache-2.0 | 1,389 |
package rere.ql.queries
import java.util.UUID
import io.circe.{Json, JsonObject}
import org.scalatest.FlatSpec
import rere.ql.types._
class ValueQueriesTest extends FlatSpec with ReqlMatchers {
import rere.ql.queries.all.r
import rere.ql.queries.values._
behavior of "ValueQueries"
it should "convert basic... | pbaun/rere | modules/ql/src/test/scala/rere/ql/queries/ValueQueriesTest.scala | Scala | apache-2.0 | 4,344 |
package be.ac.umons.sdd2.util
import java.awt.Color
import scala.collection.mutable.Queue
import scala.io.Source
/**
* Created by florentdelgrange on 13/02/16.
*/
object SegmentLoader {
def matchColor(color: Color): String ={
color match {
case Color.BLUE => "Blue"
case Color.RED => "Red"
... | radioGiorgio/SDD2 | src/main/scala/be/ac/umons/sdd2/util/SegmentLoader.scala | Scala | gpl-3.0 | 3,559 |
package io.rout.example.benchmark
import io.rout._
import io.rout.circe._
import io.rout.generic.decoding._
import io.routs._
import io.circe.generic.auto._
object Benchmark extends App {
val jsonPayload = binaryBody.asJson[Payload]
val paramsPayload: ReqRead[Payload] = derive[Payload].fromParams
val payload... | teodimoff/rOut | examples/src/io/rout/benchmark/Benchmark.scala | Scala | apache-2.0 | 1,452 |
package org.jetbrains.plugins.scala.lang.psi.impl.statements.params
import com.intellij.lang.ASTNode
import com.intellij.psi._
import com.intellij.psi.impl.light.JavaIdentifier
import org.jetbrains.plugins.scala.extensions.{ObjectExt, ifReadAllowed}
import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes
import ... | gtache/intellij-lsp | intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/impl/statements/params/ScParameterImpl.scala | Scala | apache-2.0 | 4,861 |
/*
* Copyright (C) 2013 Alcatel-Lucent.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* Licensed to you 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 th... | sbocq/mbench | mbench/src/main/scala/mbench/properties/Properties.scala | Scala | apache-2.0 | 4,020 |
/*
* Copyright © 2014 TU Berlin (emma@dima.tu-berlin.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | emmalanguage/emma | emma-spark/src/main/scala/org/emmalanguage/SparkAware.scala | Scala | apache-2.0 | 1,574 |
// scalac: -Xlint:constant -Xfatal-warnings
object Test {
val fails = 1 + 2 / (3 - 2 - 1)
}
| scala/scala | test/files/neg/constant-warning.scala | Scala | apache-2.0 | 94 |
/*
* Copyright (c) 2014-2021 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache... | monixio/monix | monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/PublishSelectorSuite.scala | Scala | apache-2.0 | 1,951 |
package ml.combust.mleap.bundle.ops.feature
import ml.combust.bundle.BundleContext
import ml.combust.bundle.dsl._
import ml.combust.bundle.op.OpModel
import ml.combust.mleap.bundle.ops.MleapOp
import ml.combust.mleap.core.feature.NormalizerModel
import ml.combust.mleap.runtime.MleapContext
import ml.combust.mleap.runt... | combust-ml/mleap | mleap-runtime/src/main/scala/ml/combust/mleap/bundle/ops/feature/NormalizerOp.scala | Scala | apache-2.0 | 1,313 |
/**
* Created by peter_v on 22/02/15.
*/
package base
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import common._
@RunWith(classOf[JUnitRunner])
class PredicateObjectSuite extends FunSuite {
test("PredicateObject equality") {
val predicateObjectFoo1... | petervandenabeele/AllMyData | src/test/scala/base/PredicateObjectSuite.scala | Scala | mit | 8,113 |
package eu.gruchala
import scala.collection.mutable
//generalnie na płaszczyźnie dwuwymiarowej odległość między dwoma punktami
//to pierwiastek z sumy kwadratów x, y
case class Point(x: Int, y: Int, z: Int) {
lazy val dist: Double = math.sqrt(List(x, y, z).map(_.toDouble).map(math.pow(_, 2)).sum)
}
object Points {... | leszekgruchala/scala-exercises | src/main/scala/eu/gruchala/Points.scala | Scala | apache-2.0 | 924 |
/*
* Copyright (c) 2014 Contributor. All rights reserved.
*/
package org.scalaide.debug.internal.ui.actions
import org.eclipse.core.resources.IProject
import org.eclipse.ui.IWorkbenchPage
import org.scalaide.debug.internal.ui.ExpressionEvaluatorView
import org.scalaide.ui.internal.actions.RunSelection
/**
* Thank ... | andrey-ilinykh/scala-ide | org.scala-ide.sdt.debug.expression/src/org/scalaide/debug/internal/ui/actions/RunSelectionInExpressionEvaluator.scala | Scala | bsd-3-clause | 636 |
/*
* Copyright 2011-2019 Asakusa Framework Team.
*
* 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 ... | ashigeru/asakusafw-spark | runtime/src/main/scala/com/asakusafw/spark/runtime/fragment/OutputFragment.scala | Scala | apache-2.0 | 1,905 |
/**
* Copyright (c) 2016 Intel Corporation
*
* 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 applicabl... | dmsuehir/spark-tk | sparktk-core/src/main/scala/org/trustedanalytics/sparktk/frame/internal/ops/statistics/correlation/Correlation.scala | Scala | apache-2.0 | 1,967 |
/**
* Copyright 2014-2015 Martin Cooper
*
* 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 ... | martincooper/scala-datatable | src/test/scala/com/github/martincooper/datatable/DataViewSpecs/DataViewToDataTableSpec.scala | Scala | apache-2.0 | 2,545 |
/*
* Copyright (c) 2016 dawid.melewski
*
* 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, modify, merge, publ... | meloniasty/ActyxPowerUserAlert | src/main/scala/actyxpoweruseralert/services/MachineInfoLogStorageService.scala | Scala | mit | 2,219 |
/*
* 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 ... | cin/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcOptions.scala | Scala | apache-2.0 | 2,510 |
/*
* 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://... | sergius/monifu | monifu/shared/src/main/scala/monifu/reactive/internals/operators/repeat.scala | Scala | apache-2.0 | 2,254 |
/*
* Copyright (C) FuseSource, Inc.
* http://fusesource.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 ... | janstey/fuse | sandbox/fabric-monitor/src/main/scala/org/fusesource/fabric/monitor/plugins/jmx/DataSourceGroup.scala | Scala | apache-2.0 | 1,602 |
/*
* Copyright 2013 Maurício Linhares
*
* Maurício Linhares licenses this file to you 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 ... | outbrain/postgresql-async | postgresql-async/src/main/scala/com/github/mauricio/async/db/postgresql/util/PasswordHelper.scala | Scala | apache-2.0 | 1,871 |
package com.blrest.endpoint
import akka.actor.Actor
import com.codahale.metrics.MetricRegistry
import com.blrest.dao.{TagDao, ImageDirectoryDao}
import org.json4s.DefaultFormats
import spray.routing.RejectionHandler
/**
* Created by ccarrier for bl-rest.
* at 5:54 PM on 12/17/13
*/
trait MasterInjector extends A... | ctcarrier/bl-rest | src/main/scala/com/blrest/endpoint/MasterInjector.scala | Scala | mit | 575 |
package org.typelevel.tagged
import org.scalacheck.Prop._
import org.scalacheck.Properties
import org.typelevel.tagged.TestUtils._
import org.typelevel.tagged.tag1._
class Tag1DisassembledAnyVal {
val base: Int = 1
val tagged: Int @@ SomeTag = tag(1)
val untagged: Int = untag(tagged)
val arrayWithTagged: Arra... | fthomas/tagged | core/.jvm/src/test/scala/org/typelevel/tagged/Tag1SpecJvm.scala | Scala | apache-2.0 | 1,700 |
package com.aberdyne.graphchat
object ProtocolManager {
def list(db: DatabaseInterface): List[Protocol] = { Nil }
} | Kenishi/GraphChat | src/main/com/aberdyne/graphchat/ProtocolManager.scala | Scala | apache-2.0 | 117 |
/***********************************************************************
* Copyright (c) 2013-2017 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... | ronq/geomesa | geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/iterators/KryoLazyFilterTransformIterator.scala | Scala | apache-2.0 | 6,624 |
// lchannels - session programming in Scala
// Copyright (c) 2016, Alceste Scalas and Imperial College London
// 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 ... | scribble/scribble.github.io | src/main/jbake/assets/docs/lchannels/lchannels/src/main/scala/lchannels/util/Fifo.scala | Scala | apache-2.0 | 3,619 |
package slick.basic
import scala.language.{higherKinds, implicitConversions, existentials}
import slick.ast._
import slick.compiler.QueryCompiler
import slick.dbio._
import slick.lifted._
import slick.util.GlobalConfig
import com.typesafe.config.Config
/** The basic functionality that has to be implemented by all p... | Radsaggi/slick | slick/src/main/scala/slick/basic/BasicProfile.scala | Scala | bsd-2-clause | 8,280 |
/*
* Copyright (c) 2011-16 Miles Sabin
*
* 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... | rorygraves/perf_tester | corpus/shapeless/src/main/scala/shapeless/nat.scala | Scala | apache-2.0 | 2,822 |
package com.nidkil.downloader.manager
import java.io.File
import java.net.URL
import org.scalatest.FunSpec
import org.scalatest.Matchers
import org.scalatest.Tag
import com.nidkil.downloader.cleaner.DefaultCleaner
import com.nidkil.downloader.datatypes.Download
import com.nidkil.downloader.merger.DefaultMerger
import ... | nidkil/scala-downloader | src/test/scala/com/nidkil/downloader/manager/DownloadManagerTest.scala | Scala | apache-2.0 | 3,579 |
/*
* 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 ... | zzcclp/carbondata | examples/spark/src/main/scala/org/apache/carbondata/examples/ExternalTableExample.scala | Scala | apache-2.0 | 3,521 |
/**
* Created by cuz on 6/6/17.
*/
object ScalacOptions {
val all = Seq(
"-deprecation", // Emit warning and location for usages of deprecated APIs.
"-encoding", "utf-8", // Specify character encoding used by source files.
"-explaintypes", // Explain type errors in more detail.
"-feature", // Emit... | cuzfrog/scala_sbt_template | project/ScalacOptions.scala | Scala | apache-2.0 | 4,285 |
/*
* 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... | pbrant/framework | web/webkit/src/main/scala/net/liftweb/builtin/snippet/Form.scala | Scala | apache-2.0 | 3,878 |
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.