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.yuvimasory.flashcards
import java.io._
import com.itextpdf.text.Image
import StringUtils.LF
class Tex2Png(fontSize: Int, texCode: String) {
val FileName = "temp"
val DviFileName = FileName + ".dvi"
val TexFileName = FileName + ".tex"
val PdfFileName = FileName + ".pdf"
val PngFileName = FileN... | ymasory/Flashup | src/main/scala/Tex2Png.scala | Scala | agpl-3.0 | 1,674 |
package akkord.api.circesupport
import io.circe.Json
import io.circe.parser._
import play.api.libs.ws.BodyReadable
trait CirceBodyReadable {
implicit val circeBodyReadable: BodyReadable[Json] =
BodyReadable[Json] { response =>
import play.shaded.ahc.org.asynchttpclient.{Response => AHCResponse}
val ... | ryanmiville/akkord | src/main/scala/akkord/api/circesupport/CirceBodyReadable.scala | Scala | mit | 465 |
package org.infinispan.spark.sql
import org.apache.spark.sql.catalyst.JavaTypeInference
import org.apache.spark.sql.types.StructType
object SchemaProvider {
def fromJavaBean(clazz: Class[_]): StructType = JavaTypeInference.inferDataType(clazz)._1.asInstanceOf[StructType]
}
| galderz/infinispan-spark | src/main/scala/org/infinispan/spark/sql/SchemaProvider.scala | Scala | apache-2.0 | 282 |
/**
* Copyright (C) 2009-2017 Lightbend Inc. <http://www.lightbend.com>
*/
package akka.actor
import akka.actor.dungeon.ChildrenContainer
import akka.dispatch.Envelope
import akka.dispatch.sysmsg._
import akka.event.Logging.{ Debug, Error, LogEvent }
import akka.japi.Procedure
import java.io.{ NotSerializableExcept... | rorygraves/perf_tester | corpus/akka/akka-actor/src/main/scala/akka/actor/ActorCell.scala | Scala | apache-2.0 | 23,795 |
package de.sciss.mutagentx
package visual
import java.text.SimpleDateFormat
import java.util.{Date, Locale}
import de.sciss.file._
import de.sciss.lucre.event.Sys
import de.sciss.processor.Processor
import prefuse.util.ui.JForcePanel
import scala.swing.Swing._
import scala.swing.event.ButtonClicked
import scala.swin... | Sciss/MutagenTx | src/main/scala/de/sciss/mutagentx/visual/VertexApp.scala | Scala | gpl-3.0 | 3,743 |
package com.olvind
package crud
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom._
import scala.scalajs.js
package object frontend{
private [frontend] type U[T] = js.UndefOr[T]
private [frontend]val uNone = js.undefined
@inline private [frontend] implicit final class IdToU[T](private val t:... | skytteren/slick-crud | crud/js/src/main/scala/com/olvind/crud/frontend/frontend.scala | Scala | apache-2.0 | 3,075 |
/*
* Copyright (C) 2015 Hugo Freire Gil
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*/
package com.aba... | TLmaK0/avl-crrcsim-editor | src/main/scala/com/abajar/crrcsimeditor/Main.scala | Scala | gpl-2.0 | 532 |
/*
* Copyright 2016 The BigDL Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | intel-analytics/BigDL | scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/keras/layers/UpSampling2DSpec.scala | Scala | apache-2.0 | 2,515 |
/*
* 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 ... | vjagadish/samza-clone | samza-kv/src/main/scala/org/apache/samza/storage/kv/NullSafeKeyValueStore.scala | Scala | apache-2.0 | 2,543 |
/*
* 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 | sql/core/src/main/scala/org/apache/spark/sql/ui/SQLListener.scala | Scala | apache-2.0 | 13,730 |
package com.github.play2war.plugin.runners
import java.io.File
import com.github.play2war.plugin.it.{Java8, CargoContainerManager, Servlet30Container}
/**
* Starts jetty9
*/
object Jetty90xRunner extends App {
val cargoContainer = new CargoContainerManager with Servlet30Container with Java8 {
override d... | swatikiran123/play2-war-plugin | project-code/integration-tests/src/test/scala/com/github/play2war/plugin/runners/Jetty9xRunner.scala | Scala | apache-2.0 | 732 |
/*
* Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com>
*/
package play.api.http
import org.specs2.mutable._
import java.net.URLEncoder
class MediaRangeSpec extends Specification {
"A MediaRange" should {
def parseSingleMediaRange(mediaRange: String): MediaRange = {
val parsed = Media... | Shenker93/playframework | framework/src/play/src/test/scala/play/api/http/MediaRangeSpec.scala | Scala | apache-2.0 | 6,426 |
/*
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... | tdyas/scalding | scalding-date/src/main/scala/com/twitter/scalding/AbsoluteDuration.scala | Scala | apache-2.0 | 5,747 |
/*
* Scala (https://www.scala-lang.org)
*
* Copyright EPFL and Lightbend, Inc.
*
* Licensed under Apache License 2.0
* (http://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
object GenerateFunctionConvert... | martijnhoekstra/scala | project/GenerateFunctionConverters.scala | Scala | apache-2.0 | 18,628 |
/*
* 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 ... | aokolnychyi/spark | external/kafka-0-8/src/main/scala/org/apache/spark/streaming/kafka/KafkaRDD.scala | Scala | apache-2.0 | 10,421 |
/*
* @author Manuel Valle
* @date Febrero 2015
*/
import CodeJamIO._
object AlienLang {
def matchStr(str: String, pattern: String) : Int ={
if (str.matches(pattern)) 1 else 0
}
def main(args: Array[String]) {
/*****************
* Input
******************/
val input =... | Nearsoft/google-code-jam | solutions/alien-language/scala/approach1.scala | Scala | mit | 786 |
package challenge
object Easy193 {
def main(args: Array[String]): Unit = {
val vol = args(0).toDouble
val cube_dim = calc_cube(vol)
val (cylin_height, cylin_diam) = calc_cylinder(vol)
val sphere_radius = calc_sphere(vol)
val (cone_height, cone_radius) = calc_cone(vol)
println("Cube: %.2fm wi... | nichwn/dailyprogrammer-scala | src/main/scala/challenge/Easy193.scala | Scala | mit | 1,122 |
/*
* 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... | tcrayford/hafka | kafka/core/src/main/scala/kafka/common/UnknownCodecException.scala | Scala | bsd-3-clause | 814 |
/***********************************************************************
* 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 ... | mcharles/geomesa | geomesa-kafka/geomesa-kafka-datastore/src/main/scala/org/locationtech/geomesa/kafka/KafkaDataStoreSchemaManager.scala | Scala | apache-2.0 | 6,687 |
package streaming
import akka.actor.SupervisorStrategy.Escalate
import akka.actor._
import datadefinitions.BusDefinitions
import datadefinitions.BusDefinitions.BusRoute
import datasource.SourceLine
import play.api.Logger
import scala.concurrent.duration._
/**
* Case class for the packaged stream object sent to clie... | chrischivers/London-Bus-Tracker-Play-Framework | app/streaming/LiveStreamingCoordinatorImpl.scala | Scala | mit | 4,755 |
/*
* Copyright 2013 - 2020 Outworkers Ltd.
*
* 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... | outworkers/phantom | phantom-dsl/src/test/scala/com/outworkers/phantom/builder/query/db/specialized/TimeUuidTest.scala | Scala | apache-2.0 | 5,079 |
/*
* Copyright 2014 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 l... | joychugh/storehaus | storehaus-elasticsearch/src/test/scala/com/twitter/storehaus/elasticsearch/ElasticSearchStoreSpecs.scala | Scala | apache-2.0 | 5,895 |
package com.twitter.scalding.reducer_estimation
import scala.collection.JavaConverters._
import cascading.flow.FlowStep
import cascading.tap.{ Tap, CompositeTap }
import cascading.tap.hadoop.Hfs
import org.apache.hadoop.mapred.JobConf
import org.slf4j.LoggerFactory
object RuntimeReducerEstimator {
val RuntimePerRe... | chrismoulton/scalding | scalding-core/src/main/scala/com/twitter/scalding/reducer_estimation/RuntimeReducerEstimator.scala | Scala | apache-2.0 | 7,529 |
package org.shlrm.scloud
import java.nio.file.Path
import com.google.common.hash.Hashing
import com.google.common.io.Files
import org.apache.commons.io.FileUtils
import org.jclouds.ContextBuilder
import org.jclouds.blobstore.{BlobStore, BlobStoreContext}
import org.scalatest.{BeforeAndAfter, FunSpec, Matchers}
class... | dkowis/scloud | src/test/scala/org/shlrm/scloud/SyncSpec.scala | Scala | mit | 7,410 |
package mesosphere.marathon.storage.migration.legacy.legacy
import akka.stream.scaladsl.Sink
import com.codahale.metrics.MetricRegistry
import mesosphere.marathon.metrics.Metrics
import mesosphere.marathon.state.{ AppDefinition, Group, PathId, PortDefinitions, Timestamp }
import mesosphere.marathon.storage.LegacyInMem... | timcharper/marathon | src/test/scala/mesosphere/marathon/storage/migration/legacy/legacy/MigrationTo0_16Test.scala | Scala | apache-2.0 | 4,887 |
/*
* 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 ... | xieguobin/Spark_2.0.0_cn1 | mllib/tree/RandomForest.scala | Scala | apache-2.0 | 13,540 |
package com.twitter.finagle
import _root_.java.net.{InetSocketAddress, SocketAddress}
import com.twitter.concurrent.Broker
import com.twitter.conversions.time._
import com.twitter.finagle.cacheresolver.CacheNodeGroup
import com.twitter.finagle.client._
import com.twitter.finagle.dispatch.{SerialServerDispatcher, Pipel... | cogitate/twitter-finagle-uuid | finagle-memcached/src/main/scala/com/twitter/finagle/Memcached.scala | Scala | apache-2.0 | 7,727 |
/**
* 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... | evertrue/kafka-manager | app/kafka/manager/utils/TopicAndPartition.scala | Scala | apache-2.0 | 1,052 |
/*
* 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 | sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionStateBuilder.scala | Scala | apache-2.0 | 4,249 |
import sbt._
object Dependencies {
lazy val version = new {
val avro4S = "1.6.4"
}
val dependencies = Seq(
"com.sksamuel.avro4s" %% "avro4s-core" % version.avro4S,
"com.sksamuel.avro4s" %% "avro4s-json" % version.avro4S,
"com.sksamuel.avro4s" %% "avro4s-generator" % "1.6.0",
"tech.allegro.sc... | zenaptix-lab/copybookStreams | project/Dependencies.scala | Scala | apache-2.0 | 928 |
/*
* Copyright 2014-2022 Netflix, 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... | Netflix-Skunkworks/iep-apps | atlas-cloudwatch/src/test/scala/com/netflix/atlas/cloudwatch/MetricDataSuite.scala | Scala | apache-2.0 | 6,172 |
package org.hammerlab.bam.spark.load
import htsjdk.samtools.SAMRecord
import org.apache.spark.rdd.RDD
import org.hammerlab.genomics.loci.set.LociSet
import org.hammerlab.hadoop.splits.MaxSplitSize
import spark_bam._
class LoadSAMTest
extends LoadBAMChecks {
val path = sam2
override def load(maxSplitSize: MaxS... | ryan-williams/spark-bam | load/src/test/scala/org/hammerlab/bam/spark/load/LoadSAMTest.scala | Scala | apache-2.0 | 1,196 |
package monocle
import monocle.law.discipline.{SetterTests, TraversalTests}
import org.scalacheck.Arbitrary
import org.scalacheck.Arbitrary.arbitrary
import scalaz._
class TraversalSpec extends MonocleSuite {
case class Location(latitude: Int, longitude: Int, name: String)
val coordinates: Traversal[Location, ... | NightRa/Monocle | test/src/test/scala/monocle/TraversalSpec.scala | Scala | mit | 1,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 ... | ron8hu/spark | sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLEnv.scala | Scala | apache-2.0 | 2,866 |
/*
* 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 ... | h2oai/sparkling-water | core/src/main/scala/ai/h2o/sparkling/backend/api/rdds/RDDsServlet.scala | Scala | apache-2.0 | 4,733 |
import scala.annotation.tailrec
/*
Reference: http://aperiodic.net/phil/scala/s-99
P20 (*) Remove the Kth element from a list.
Return the list and the removed element in a Tuple. Elements are numbered from 0.
Example:
scala> removeAt(1, List('a, 'b, 'c, 'd))
res0: (List[Symbol], Symbol) = (List('a, 'c, 'd),'b)
*/
... | mcamou/s-99 | src/P20.scala | Scala | apache-2.0 | 1,064 |
/*
* Copyright (c) 2012, TU Berlin
* 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 of conditions... | mzuber/simple-language | src/main/scala/impl/MultiDriver.scala | Scala | bsd-3-clause | 12,658 |
package info.glennengstrand.io
import java.sql.{ResultSet, PreparedStatement}
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import scala.collection.mutable.ArrayBuffer
/** JDBC helper functions */
object Sql {
val log = LoggerFactory.getLogger("info.glennengstrand.io.Sql")
/** call the right statement... | gengstrand/clojure-news-feed | server/feed2/src/main/scala/info/glennengstrand/io/Sql.scala | Scala | epl-1.0 | 2,813 |
package jkm.cineclub.raft
import jkm.cineclub.raft.DB.LogEntryDB.LogEntry
import jkm.cineclub.raft.DB.LogEntryLevelDB
import jkm.cineclub.raft.RaftConfig.DBInfo
/**
* Created with IntelliJ IDEA.
* User: cineclub
* Date: 12/25/13
* Time: 10:31 PM
* To change this template use File | Settings | File Templates.
*/... | stepist/scalaraft | src/main/scala/jkm/cineclub/raft/DummyStateMachine.scala | Scala | apache-2.0 | 735 |
package reactivemongo.api.commands
import reactivemongo.api.SerializationPack
import reactivemongo.core.commands.{
FailedAuthentication,
AuthenticationResult,
VerboseSuccessfulAuthentication
}
/**
* Getnonce Command for Mongo CR authentication.
*
* Gets a nonce for authentication token.
*/
private[reactive... | ornicar/ReactiveMongo | driver/src/main/scala/api/commands/CrAuthenticate.scala | Scala | apache-2.0 | 2,724 |
package vexriscv.demo
import spinal.core._
import vexriscv.plugin._
import vexriscv.{VexRiscv, VexRiscvConfig, plugin}
/**
* Created by spinalvm on 15.06.17.
*/
object GenDeterministicVex extends App{
def cpu() = new VexRiscv(
config = VexRiscvConfig(
plugins = List(
new IBusSimplePlugin(
... | SpinalHDL/VexRiscv | src/main/scala/vexriscv/demo/GenDeterministicVex.scala | Scala | mit | 1,879 |
package org.jetbrains.sbt
package project
import javax.swing.Icon
import com.intellij.ide.util.newProjectWizard.AddModuleWizard
import com.intellij.ide.util.projectWizard.WizardContext
import com.intellij.ide.wizard.Step
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.externalSy... | jastice/intellij-scala | scala/scala-impl/src/org/jetbrains/sbt/project/SbtProjectOpenProcessor.scala | Scala | apache-2.0 | 2,416 |
package mesosphere.chaos.validation
import javax.validation.ConstraintViolation
import scala.collection.JavaConverters._
class ValidationErrorMessage(violations: java.util.Set[ConstraintViolation[_]]) {
val errors = violations.asScala.map(violation => new AttributeErrorMessage(violation))
class AttributeErrorMe... | abel-von/chaos | src/main/scala/mesosphere/chaos/validation/ValidationErrorMessage.scala | Scala | apache-2.0 | 462 |
package beam.analysis.physsim
import java.io.{BufferedInputStream, File, FileInputStream}
import java.util.zip.GZIPInputStream
import beam.utils.TestConfigUtils.testOutputDir
import beam.utils.{BeamCalcLinkStats, VolumesAnalyzerFixed}
import org.matsim.core.config.ConfigUtils
import org.matsim.core.controler.{Control... | colinsheppard/beam | src/test/scala/beam/analysis/physsim/BeamCalcLinkStatsSpec.scala | Scala | gpl-3.0 | 3,845 |
/*
* 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 ... | vjagadish/samza-clone | samza-yarn/src/main/scala/org/apache/samza/job/yarn/YarnJobFactory.scala | Scala | apache-2.0 | 1,387 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | Dax1n/spark-core | core/src/main/scala/org/apache/spark/rdd/ZippedPartitionsRDD.scala | Scala | apache-2.0 | 5,311 |
package controllers
import helpers.UnitSpec
import models.ConfirmFormModel
import play.api.data.Form
import uk.gov.dvla.vehicles.presentation.common.mappings.Email.{EmailId, EmailVerifyId}
import uk.gov.dvla.vehicles.presentation.common.mappings.OptionalToggle
import views.vrm_retention.Confirm.KeeperEmailId
import vi... | dvla/vrm-retention-online | test/controllers/ConfirmFormSpec.scala | Scala | mit | 1,586 |
/*
* 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/core/src/main/scala/org/apache/spark/sql/execution/streaming/sources/RateStreamMicroBatchStream.scala | Scala | apache-2.0 | 7,622 |
package im.actor.server.api
import com.google.protobuf.{ ByteString, CodedInputStream }
import com.trueaccord.scalapb.TypeMapper
import im.actor.api.rpc.files.ApiAvatar
import im.actor.api.rpc.groups.ApiGroup
import im.actor.api.rpc.messaging.ApiMessage
import im.actor.api.rpc.misc.ApiExtension
import im.actor.api.rpc... | WangCrystal/actor-platform | actor-server/actor-core/src/main/scala/im/actor/server/api/TypeMappers.scala | Scala | mit | 4,455 |
package org.infinispan.spark.suites
import org.infinispan.client.hotrod.configuration.ConfigurationBuilder
import org.infinispan.client.hotrod.marshall.ProtoStreamMarshaller
import org.infinispan.client.hotrod.{RemoteCache, RemoteCacheManager, Search}
import org.infinispan.protostream.annotations.ProtoSchemaBuilder
im... | galderz/infinispan-spark | src/test/scala/org/infinispan/spark/suites/WriteWithProtoSuite.scala | Scala | apache-2.0 | 1,797 |
package io.backchat.hookup
package examples
import org.json4s._
import java.util.concurrent.{ConcurrentSkipListSet, ConcurrentHashMap}
import collection.JavaConverters._
object PubSubServer {
private val subscriptions = new ConcurrentHashMap[String, Set[HookupServerClient]]().asScala.withDefaultValue(Set.empty)
... | backchatio/hookup | src/main/scala/io/backchat/hookup/examples/PubSubServer.scala | Scala | mit | 1,590 |
/*
* 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 ... | cloud-fan/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/SerializerBuildHelper.scala | Scala | apache-2.0 | 7,463 |
package org.jetbrains.plugins.scala
package lang
package parser
package parsing
package expressions
import lexer.ScalaTokenTypes
import builder.ScalaPsiBuilder
/**
* @author Alexander Podkhalyuzin
* Date: 06.03.2008
*/
/*
* Annmotation ::= '@' AnnotationExpr [nl]
*/
object Annotation {
def parse(buil... | consulo/consulo-scala | src/org/jetbrains/plugins/scala/lang/parser/parsing/expressions/Annotation.scala | Scala | apache-2.0 | 1,068 |
package org.bitcoins.bench.eclair
import org.bitcoins.bench.eclair.PaymentLog.PaymentLogEntry
import scala.jdk.CollectionConverters._
object EclairBenchUtil {
def paymentLogValues(): Vector[PaymentLogEntry] = {
PaymentLog.paymentLog
.values()
.asScala
.toVector
}
def convertStrings(stri... | bitcoin-s/bitcoin-s | bench/src/main/scala-2.13/org/bitcoins/bench/eclair/EclairBenchUtil.scala | Scala | mit | 394 |
package com.karasiq.bittorrent.dht
import java.net.InetSocketAddress
import scala.collection.mutable
import akka.util.ByteString
object DHTPeersTable {
def apply(): DHTPeersTable = {
new DHTPeersTable()
}
private final case class Entry(infoHash: ByteString, address: InetSocketAddress, timeAdded: Long)
}
... | Karasiq/torrentstream | library/src/main/scala/com/karasiq/bittorrent/dht/DHTPeersTable.scala | Scala | apache-2.0 | 875 |
package com.twitter.finagle.loadbalancer
import com.twitter.finagle.benchmark.StdBenchAnnotations
import com.twitter.finagle.NoBrokersAvailableException
import com.twitter.finagle.stats.NullStatsReceiver
import com.twitter.finagle.{Service, ServiceFactory}
import com.twitter.util.{Await, Activity, Future, Var}
import ... | Krasnyanskiy/finagle | finagle-benchmark/src/main/scala/com/twitter/finagle/loadbalancer/BalancerBench.scala | Scala | apache-2.0 | 2,506 |
/*
* Copyright (c) 2012-2019 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at http://www.apach... | RetentionGrid/snowplow | 3-enrich/scala-common-enrich/src/test/scala/com.snowplowanalytics.snowplow.enrich.common/loaders/TsvLoaderSpec.scala | Scala | apache-2.0 | 2,200 |
/**
* Β© 2019 Refinitiv. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the βLicenseβ); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | dudi3001/CM-Well | server/cmwell-ws/app/ld/cmw/package.scala | Scala | apache-2.0 | 808 |
package com.janschulte.akvokolekta
import akka.NotUsed
import akka.stream.scaladsl.{Flow, Source}
import com.janschulte.akvokolekta.impl.{EnhancedFlow, EnhancedSource}
/**
* Advanced utility functions for processing streams.
*
* @author Jan Schulte <jan@janschulte.com>
*/
object StreamAdditions {
implicit def... | janschultecom/akvokolekta | src/main/scala/com/janschulte/akvokolekta/StreamAdditions.scala | Scala | apache-2.0 | 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 ... | VigneshMohan1/spark-branch-2.3 | resource-managers/mesos/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackendSuite.scala | Scala | apache-2.0 | 22,925 |
/*
* Copyright 1998-2015 Linux.org.ru
* 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... | ymn/lorsource | src/main/scala/ru/org/linux/help/HelpController.scala | Scala | apache-2.0 | 2,442 |
object Dependencies {
// Versions
val argoVersion = "5.13"
val argonautVersion = "6.3.1"
val circeVersion = "0.13.0"
val commonsLang3Version = "3.11"
val finagleVersion = "20.8.0"
val handlebarsScalaForkVersion = "2.3.0"
val gsonVersion = "2.8.6"
val guavaVersion = "29.0-jre"
val jacksonVersion = "... | daviddenton/fintrospect | project/Dependencies.scala | Scala | apache-2.0 | 569 |
package edu.neu.coe.scala.numerics
import org.scalatest.{ FlatSpec, Matchers }
/**
* @author scalaprof
*/
class LazyNumberRationalSpec extends FlatSpec with Matchers {
val rat1 = LazyRational(1)
val rat2 = LazyRational(1,Product(2))
val square = Named[Rational]("square",{x=>x*x})
val rat4 = rat2 map squa... | rchillyard/Scalaprof | Numerics/src/test/scala/edu/neu/coe/scala/numerics/LazyNumberRationalSpec.scala | Scala | gpl-2.0 | 1,646 |
/**
* Created by pseudoaj on 6/9/17.
*/
object HelloWorldApp extends App{
println("Hello World")
}
| PseudoAj/coursera-scala | code/HelloWorld/src/main/scala/HelloWorldApp.scala | Scala | mit | 105 |
object SyntheticNonSynthetic1 {
val foo : List[Class[_ <: Throwable]] = Nil
}
| scala/scala | test/files/positions/SyntheticNonSynthetic1.scala | Scala | apache-2.0 | 80 |
package sri.test
import sri.core.{JSProps, ReactComponent, ReactElement}
import scala.scalajs.js
import scala.scalajs.js.annotation.{JSImport, JSName}
@js.native
@JSImport("react-addons-test-utils", JSImport.Namespace)
object ReactTestUtils extends js.Object{
val Simulate : js.Dynamic = js.native
def renderIn... | chandu0101/sri | test/src/main/scala/sri/test/ReactTestUtils.scala | Scala | apache-2.0 | 1,035 |
package com.github.j5ik2o.forseti.infrastructure.util
trait Base64UrlSafeWithoutPaddingString extends Base64UrlSafeString
object Base64UrlSafeWithoutPaddingString
extends AbstractBase64StringFactory[Base64UrlSafeWithoutPaddingString](true, true) {
def apply(base64Value: String): Base64UrlSafeWithoutPaddingStri... | j5ik2o/forseti | infrastructure/src/main/scala/com/github/j5ik2o/forseti/infrastructure/util/Base64UrlSafeWithoutPaddingString.scala | Scala | mit | 1,207 |
package io.vamp.pulse
import akka.actor.{ ActorRef, ActorSystem }
import akka.util.Timeout
import io.vamp.common.Namespace
import io.vamp.common.akka.IoC.logger
import io.vamp.common.akka.{ ActorBootstrap, IoC }
import io.vamp.pulse.notification.PulseNotificationProvider
import scala.concurrent.{ ExecutionContext, Fu... | magneticio/vamp | elasticsearch/src/main/scala/io/vamp/pulse/ElasticsearchBootstrap.scala | Scala | apache-2.0 | 1,131 |
/*
* Copyright 2015 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
*
* Unl... | unibas-gravis/scalismo | src/test/scala/scalismo/statisticalmodel/GaussianProcessTests.scala | Scala | apache-2.0 | 24,563 |
package com.twitter.finatra.http.tests.integration.doeverything.main.domain
import com.twitter.finatra.request.FormParam
case class FormPostRequest(
@FormParam name: String,
@FormParam age: Int)
| syamantm/finatra | http/src/test/scala/com/twitter/finatra/http/tests/integration/doeverything/main/domain/FormPostRequest.scala | Scala | apache-2.0 | 203 |
package org.jetbrains.plugins.scala
package components
import javax.swing.event.HyperlinkEvent
import com.intellij.ide.plugins._
import com.intellij.ide.plugins.cl.PluginClassLoader
import com.intellij.notification._
import com.intellij.openapi.application.{Application, ApplicationManager}
import com.intellij.openapi... | loskutov/intellij-scala | src/org/jetbrains/plugins/scala/components/PluginVersionVerifier.scala | Scala | apache-2.0 | 6,242 |
/**
* Copyright (C) 2019 Inera AB (http://www.inera.se)
*
* This file is part of statistik (https://github.com/sklintyg/statistik).
*
* statistik 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 v... | sklintyg/statistik | gatling/src/test/scala/se/inera/statistics/gatling/Conf.scala | Scala | lgpl-3.0 | 1,385 |
package challenge4
import org.scalacheck.{Arbitrary, Gen}, Arbitrary._, Gen._
object StateArbitraries {
implicit def StateArbitrary[S: Arbitrary, A: Arbitrary]: Arbitrary[State[S, A]] =
Arbitrary(oneOf(
arbitrary[A] map (a => State.value[S, A](a)),
arbitrary[(S, A)] map ({
case (s, a) => for... | Kimply/scala-challenge | src/test/scala/challenge4/StateArbitraries.scala | Scala | mit | 423 |
package org.broadinstitute.dsde.workbench.sam.db.tables
import scalikejdbc._
import org.broadinstitute.dsde.workbench.sam.db.SamTypeBinders
final case class EffectivePolicyActionRecord(effectiveResourcePolicyId: EffectiveResourcePolicyPK,
resourceActionId: ResourceActionPK... | broadinstitute/sam | src/main/scala/org/broadinstitute/dsde/workbench/sam/db/tables/EffectivePolicyActionTable.scala | Scala | bsd-3-clause | 737 |
package org.komono.sqlanalytics
import com.facebook.presto.sql.parser.SqlParser
import com.facebook.presto.sql.tree.CreateView
import com.facebook.presto.sql.tree.QuerySpecification
import com.facebook.presto.sql.tree.Relation
import com.facebook.presto.sql.tree.AliasedRelation
import com.facebook.presto.sql.TreePrint... | del680202/komono | src/main/scala/org/komono/sqlanalytics/PrestoSQLAnalyzer.scala | Scala | apache-2.0 | 6,882 |
package com.todesking.qb
import org.specs2.mutable._
import org.specs2.execute.AsResult
import _root_.scalikejdbc._, SQLInterpolation._
class ScalikeJdbcIntegrationTest extends Specification {
import com.todesking.qb.scalikejdbc._
import com.todesking.qb.QueryInterpolation._
Class.forName("org.h2.Driver")
C... | todesking/qb-scalikejdbc | src/test/scala/qb_scalikejdbc.scala | Scala | mit | 1,139 |
/**
* Copyright 2011-2012 eBusiness Information, Groupe Excilys (www.excilys.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
*
*... | Tjoene/thesis | Case_Programs/gatling-1.4.0/gatling-core/src/main/scala/com/excilys/ebi/gatling/core/action/SimpleAction.scala | Scala | gpl-2.0 | 1,255 |
package org.jetbrains.plugins.scala
package lang
package psi
package impl
package statements
import com.intellij.lang.ASTNode
import com.intellij.psi.PsiElementVisitor
import com.intellij.psi.stubs.StubElement
import com.intellij.psi.tree.IElementType
import org.jetbrains.plugins.scala.lang.parser.ScalaElementTypes
im... | whorbowicz/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/impl/statements/ScFunctionDeclarationImpl.scala | Scala | apache-2.0 | 1,592 |
package de.leanovate.swaggercheck.schema.model
import de.leanovate.swaggercheck.schema.model.formats.ValueFormat
import org.mockito.Mockito._
import org.scalatest.{MustMatchers, WordSpec}
import org.scalatestplus.mockito.MockitoSugar
class StringDefinitionSpec extends WordSpec with MockitoSugar with MustMatchers {
... | leanovate/swagger-check | json-schema-model/src/test/scala/de/leanovate/swaggercheck/schema/model/StringDefinitionSpec.scala | Scala | mit | 4,474 |
package org.jetbrains.plugins.scala.worksheet.ui.printers
import com.intellij.openapi.editor.ex.FoldingModelEx
import com.intellij.openapi.editor.{Document, Editor}
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.text.StringUtil
import com.intellij.openapi.vfs.VirtualFile
import com.intell... | JetBrains/intellij-scala | scala/worksheet/src/org/jetbrains/plugins/scala/worksheet/ui/printers/WorksheetEditorPrinterBase.scala | Scala | apache-2.0 | 6,343 |
/**
* 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... | cran/rkafkajars | java/kafka/controller/KafkaController.scala | Scala | apache-2.0 | 75,048 |
package org.jetbrains.plugins.scala.debugger.evaluation.evaluator
import com.intellij.debugger.engine.evaluation.EvaluationContextImpl
import com.intellij.debugger.engine.evaluation.expression.{DisableGC, Evaluator, Modifier}
import com.intellij.debugger.engine.{DebugProcess, DebugProcessImpl, JVMName}
import com.inte... | whorbowicz/intellij-scala | src/org/jetbrains/plugins/scala/debugger/evaluation/evaluator/ScalaMethodEvaluator.scala | Scala | apache-2.0 | 9,017 |
/*
* Copyright 2013 - 2020 Outworkers Ltd.
*
* 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... | outworkers/phantom | phantom-dsl/src/main/scala/com/outworkers/phantom/builder/QueryBuilder.scala | Scala | apache-2.0 | 3,762 |
/* Copyright 2009-2021 EPFL, Lausanne */
package stainless
package extraction
package innerfuns
trait GhostTraverser extends transformers.GhostTraverser {
val trees: Trees
import trees._
private[this] var localFuns = Map.empty[Identifier, LocalFunDef]
private[this] def withLocalFuns[A](fds: Seq[LocalFunDef]... | epfl-lara/stainless | core/src/main/scala/stainless/extraction/innerfuns/GhostTraverser.scala | Scala | apache-2.0 | 1,751 |
package pureconfig.backend
import scala.util.control.NonFatal
import com.typesafe.config._
import pureconfig._
import pureconfig.error._
/** Contains common utilities to deal with exceptions in unsafe methods.
*/
object ErrorUtil {
def unsafeToReaderResult[A](
f: => A,
onIOFailure: Option[Option[Th... | melrief/pureconfig | core/src/main/scala/pureconfig/backend/ErrorUtil.scala | Scala | mpl-2.0 | 1,170 |
package com.cloudray.scalapress.util
import org.scalatest.{OneInstancePerTest, FunSuite}
import org.scalatest.mock.MockitoSugar
/** @author Stephen Samuel */
class WizardRendererTest extends FunSuite with MockitoSugar with OneInstancePerTest {
val step1 = WizardStep("linka", "first")
val step2 = WizardStep("... | vidyacraghav/scalapress | src/test/scala/com/cloudray/scalapress/util/WizardRendererTest.scala | Scala | apache-2.0 | 1,150 |
package monocle.std
import cats.data.Chain
import monocle.MonocleSuite
import monocle.function.Plated._
import monocle.law.discipline.{IsoTests, TraversalTests}
import monocle.law.discipline.function._
import scala.annotation.nowarn
class ChainSpec extends MonocleSuite {
import cats.laws.discipline.arbitrary._
... | julien-truffaut/Monocle | test/shared/src/test/scala/monocle/std/ChainSpec.scala | Scala | mit | 936 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | mahak/spark | mllib/src/main/scala/org/apache/spark/ml/regression/RandomForestRegressor.scala | Scala | apache-2.0 | 13,728 |
package org.lnu.is.integration.cases.person.language
import java.util.UUID
import scala.concurrent.duration.DurationInt
import io.gatling.core.Predef.checkBuilder2Check
import io.gatling.core.Predef.findCheckBuilder2ValidatorCheckBuilder
import io.gatling.core.Predef.exec
import io.gatling.core.Predef.stringToExpressi... | ifnul/ums-backend | is-lnu-integration/src/test/scala/org/lnu/is/integration/cases/person/language/PersonLanguageIntegrationTest.scala | Scala | apache-2.0 | 3,740 |
package unof.cv.tools.paramsmenu
import unof.cv.tools.CvSetting
import org.scalajs.jquery.jQuery
trait BasicPannel {
def myPannel(settings: CvSetting) : String
def show(settings: CvSetting) = jQuery(myPannel(settings)).show(500)
def hide(settings: CvSetting) = jQuery(myPannel(settings)).hide(500)
} | Hgjj/CharViewer | js/src/main/scala/unof/cv/tools/paramsmenu/BasicPannel.scala | Scala | bsd-3-clause | 307 |
package com.twitter.finagle.loadbalancer
import com.twitter.finagle.Status
import com.twitter.finagle.util.Rng
/**
* An O(1), concurrent, weighted fair load balancer. This uses the
* ideas behind "power of 2 choices" [1] combined with O(1) biased
* coin flipping through the aliasing method, described in
* [[com.t... | adriancole/finagle | finagle-core/src/main/scala/com/twitter/finagle/loadbalancer/P2C.scala | Scala | apache-2.0 | 2,188 |
package com.github.jonfreedman.timeseries
import java.time.LocalDate
import java.util.function.Predicate
import com.github.jonfreedman.timeseries.ArrayTimeSeriesCollection.Builder
import com.github.jonfreedman.timeseries.interpolator.ZeroValueInterpolator
import com.github.jonfreedman.timeseries.localdate.LocalDateTr... | jonfreedman/timeseries | src/test/scala/com/github/jonfreedman/timeseries/TestArrayTimeSeriesCollectionFilter.scala | Scala | gpl-3.0 | 1,396 |
/*
* Copyright Richard Todd. I put the code under the
* GPL v2.0. See the LICENSE file in the repository.
* for more information.
*/
package rwt.spritz
import javafx.application.Application
import javafx.fxml.FXMLLoader
import javafx.scene.{Parent,Scene}
import javafx.stage.Stage
/**
*
* @author richa
*/
fina... | rwtodd/spritz_cipher | scala_version/encrnotes/src/main/scala/main.scala | Scala | gpl-2.0 | 826 |
package org.jetbrains.plugins.scala.codeInspection.deprecation
import com.intellij.codeInspection.{ProblemHighlightType, ProblemsHolder}
import com.intellij.openapi.util.TextRange
import com.intellij.psi.PsiElement
import org.jetbrains.plugins.scala.codeInspection.AbstractInspection
import org.jetbrains.plugins.scala.... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/codeInspection/deprecation/ScalaDeprecatedIdentifierInspection.scala | Scala | apache-2.0 | 1,478 |
package com.twitter.finagle.thrift.transport
import com.twitter.finagle.filter.PayloadSizeFilter
import com.twitter.finagle._
import com.twitter.finagle.thrift._
import com.twitter.finagle.thrift.thrift.ConnectionOptions
import com.twitter.util.{Future, Stopwatch}
import org.apache.thrift.protocol.{TBinaryProtocol, TM... | koshelev/finagle | finagle-thrift/src/main/scala/com/twitter/finagle/thrift/transport/ThriftClientPreparer.scala | Scala | apache-2.0 | 3,700 |
/* NSC -- new Scala compiler
* Copyright 2005-2013 LAMP/EPFL
* @author Paul Phillips
*/
package scala.tools.nsc
package typechecker
import scala.collection.mutable
import scala.collection.mutable.ListBuffer
import scala.util.control.Exception.ultimately
import symtab.Flags._
import PartialFunction._
/** An inter... | felixmulder/scala | src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala | Scala | bsd-3-clause | 28,106 |
/*
* Copyright 2014β2017 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... | drostron/quasar | repl/src/main/scala/quasar/repl/Main.scala | Scala | apache-2.0 | 5,429 |
/* Copyright (c) 2008 Google 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... | jeppenejsum/gdata-scala-client | src/com/google/gdata/data/media/MediaRss.scala | Scala | apache-2.0 | 11,176 |
package ca.stevenskelton.sparkoverflow
import java.io.File
import scala.io.{ BufferedSource, Source }
abstract class StackTable[T] {
val file: File
def getDate(n: scala.xml.NodeSeq): Long = n.text match {
case "" => 0
case s => dateFormat.parse(s).getTime
}
def dateFormat = {
import java.text.S... | stevenrskelton/SparkOverflow | src/main/scala/ca/stevenskelton/sparkoverflow/StackTable.scala | Scala | apache-2.0 | 884 |
package io.github.jlprat.akka.http.workshop.unconsumed
import akka.Done
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.{HttpRequest, HttpResponse}
import akka.stream.{ActorMaterializer, Materializer}
import scala.concurrent.Future
import scala.util.{Failure, Success}
/**... | jlprat/akka-http-workshop | src/main/scala/io/github/jlprat/akka/http/workshop/unconsumed/UnconsumedStreams.scala | Scala | mit | 1,271 |
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.