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 |
|---|---|---|---|---|---|
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2015-2021 Andre White.
*
* 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
*
* https://www.apache.org/licenses/LICENSE... | adarro/ddo-calc | subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/feats/MasterOfKnowledge.scala | Scala | apache-2.0 | 1,010 |
package io.buoyant.router.thrift
import com.twitter.finagle.buoyant.Dst
import com.twitter.finagle.thrift.{Protocols, ThriftClientRequest}
import com.twitter.finagle.{Dtab, Path}
import com.twitter.util.Future
import io.buoyant.router.RoutingFactory
import io.buoyant.router.RoutingFactory.{IdentifiedRequest, RequestId... | denverwilliams/linkerd | router/thrift/src/main/scala/io/buoyant/router/thrift/Identifier.scala | Scala | apache-2.0 | 1,215 |
/*
* @author Philip Stutz
*
* Copyright 2011 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.... | Tjoene/thesis | Case_Programs/signal-collect/src/test/scala/com/signalcollect/features/SpecConfigurations.scala | Scala | gpl-2.0 | 1,878 |
package models.daos
import com.mohiva.play.silhouette.api.LoginInfo
import com.mohiva.play.silhouette.impl.daos.DelegableAuthInfoDAO
import com.mohiva.play.silhouette.impl.providers.OAuth2Info
import models.daos.DBTableDefinitions._
import play.api.db.slick.Config.driver.simple._
import play.api.db.slick._
import sca... | ibnuda/hasembuh | app/models/daos/OAuth2InfoDAOSlick.scala | Scala | apache-2.0 | 2,229 |
package utils.auth
import javax.inject.Inject
import com.mohiva.play.silhouette.api.actions.SecuredErrorHandler
import play.api.i18n.{ I18nSupport, Messages, MessagesApi }
import play.api.libs.json.Json
import play.api.mvc.{ RequestHeader, Result }
import play.api.mvc.Results._
import scala.concurrent.Future
/**
*... | SwaggerTagger/octo-tagger-backend | app/utils/auth/CustomSecuredErrorHandler.scala | Scala | mit | 1,343 |
package benchmarks.lattices.delta.crdt
import org.openjdk.jmh.annotations._
import rescala.extra.lattices.delta.crdt.reactive.PNCounter
import java.util.concurrent.TimeUnit
@BenchmarkMode(Array(Mode.Throughput))
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Warmup(iterations = 3, time = 1000, timeUnit = TimeUnit.MILLISECO... | guidosalva/REScala | Code/Microbenchmarks/src/main/scala/benchmarks/lattices/delta/crdt/PNCounterBench.scala | Scala | apache-2.0 | 950 |
package pl.abankowski.musicbrainz.client.service
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
import com.google.inject.Inject
import pl.abankowski.musicbrainz.client.config.Config
import pl.abankowski.musicbrainz.client.dto.RecordingId
import pl.abankowski.musicbrainz.clien... | abankowski/musicbrainz-scala-client | src/main/scala/pl/abankowski/musicbrainz/client/service/RecordingServiceImpl.scala | Scala | mit | 1,486 |
package scl
class ChannelSocketUDP extends Channel {
var socket:java.net.DatagramSocket = null
def open(name:String) = {
try {
val ns = name.split(":")
socket = new java.net.DatagramSocket(if (ns.length == 2) ns(1).toInt else 8080, java.net.InetAddress.getByName(ns(0)))
... | tardigrade888/scsvlog | repo/src/scl/ChannelSocketUDP.scala | Scala | mit | 691 |
//package dhg.ccg.parse.pcfg
//
//import scala.collection.mutable.{ Map => MMap }
//import scala.collection.mutable.{ Set => MSet }
//import dhg.util._
//import scalaz._
//import scalaz.Scalaz._
//import dhg.ccg.prob._
//import dhg.ccg.cat._
//import dhg.ccg.parse._
//import dhg.ccg.util._
//import dhg.ccg.tagdict.TagD... | dhgarrette/2015-ccg-parsing | src/main/scala/dhg/ccg/parse/pcfg/AdditionalTagAdderI.scala | Scala | apache-2.0 | 7,946 |
/*
* Copyright (C) 2015 Stratio (http://stratio.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | danielcsant/sparta | driver/src/test/scala/com/stratio/sparta/driver/test/cube/CubeWriterTest.scala | Scala | apache-2.0 | 8,958 |
//https://www.hackerrank.com/challenges/fp-update-list
object UpdateList extends App {
def f(arr:List[Int]):List[Int] = for (i <- arr) yield math.abs(i)
def parseLine(line:String):List[Int] = line.trim().split(" ").toList.map(_.toInt)
val line = io.Source.stdin.getLines().next
println(f(parseLine(line)))
} | flopezlasanta/hackerrank | src/functional_programming/introduction/UpdateList.scala | Scala | mit | 320 |
/*
* Copyright (C) 2016 University of Basel, Graphics and Vision Research Group
*
* 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 3 of the License, or
* (at your option) an... | unibas-gravis/scalismo-ui | src/main/scala/scalismo/ui/rendering/actor/mixin/ActorColor.scala | Scala | gpl-3.0 | 1,302 |
package com.yuvimasory.scallect
import com.google.caliper.Runner
import org.clapper.classutil.ClassFinder
object Main extends App {
// val classes = ClassFinder.concreteSubclasses(
// classOf[com.google.caliper.SimpleBenchmark].getName,
// ClassFinder() getClasses()
// )
// classes.foreach { info =>
... | ymasory/scallect | src/main/scala/main.scala | Scala | gpl-3.0 | 1,169 |
object Holder {
private object O
}
import Holder./* */O
println(/* accessible: false */ O)
println(classOf[/* resolved: false */ O])
| LPTK/intellij-scala | testdata/resolve2/import/access/PrivateObject.scala | Scala | apache-2.0 | 137 |
trait Resilience
object Bounciness extends Enumeration {
case class _Val() extends Val with Resilience
type Bounciness = _Val
val level1, level2, level3 = _Val()
}
import Bounciness._
object Flexibility extends Enumeration {
case class _Val() extends Val with Resilience
type Flexibility... | mkoltsov/AtomicScala | Advanced/TypeParamsConstraints.scala | Scala | mit | 943 |
package com.example.cloud.jackson
import com.fasterxml.jackson.databind.{Module, ObjectMapper}
import com.fasterxml.jackson.module.scala.DefaultScalaModule
import org.springframework.context.annotation.{Bean, Configuration}
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
@Configura... | okharkovskyi/scala-cloud-skeleton | core/src/main/scala/com/example/cloud/jackson/JacksonConfig.scala | Scala | apache-2.0 | 652 |
/*
* Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com>
*/
package scalaguide.config
import javax.inject.Inject
import com.typesafe.config.Config
import org.junit.runner.RunWith
import org.specs2.runner.JUnitRunner
import play.api.{ConfigLoader, Configuration}
import play.api.mvc._
import play.api.... | wsargent/playframework | documentation/manual/working/scalaGuide/main/config/code/ScalaConfig.scala | Scala | apache-2.0 | 2,371 |
/*
* 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 ... | gioenn/xSpark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/QueryPlan.scala | Scala | apache-2.0 | 16,288 |
/**
* Copyright (C) 2015 Stratio (http://stratio.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | luismcl/crossdata | scripts/stratio-xd-init.scala | Scala | apache-2.0 | 1,469 |
package com.sksamuel.elastic4s.admin
import com.sksamuel.elastic4s.testkit.ElasticSugar
import org.scalatest.concurrent.ScalaFutures
import org.scalatest.time.SpanSugar._
import org.scalatest.{Matchers, WordSpec}
class IndexStatsTest extends WordSpec with Matchers with ElasticSugar with ScalaFutures {
client.execu... | FabienPennequin/elastic4s | elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/admin/IndexStatsTest.scala | Scala | apache-2.0 | 1,463 |
/*
* Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com>
*/
package play.api.libs.typedmap
/**
* An entry that binds a typed key and a value. These entries can be
* placed into a [[TypedMap]] or any other type of object with typed
* values.
*
* @param key The key for this entry.
* @param value T... | wsargent/playframework | framework/src/play/src/main/scala/play/api/libs/typedmap/TypedEntry.scala | Scala | apache-2.0 | 551 |
package org.broadinstitute.dsde.firecloud.service
import java.lang.reflect.Field
import org.broadinstitute.dsde.firecloud.FireCloudConfig
import org.broadinstitute.dsde.firecloud.dataaccess.MockOntologyDAO
import org.broadinstitute.dsde.firecloud.model.DUOS.DuosDataUse
import org.broadinstitute.dsde.firecloud.model.D... | broadinstitute/firecloud-orchestration | src/test/scala/org/broadinstitute/dsde/firecloud/service/DataUseRestrictionSupportSpec.scala | Scala | bsd-3-clause | 29,779 |
/*
* 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/test/scala/com/intel/analytics/bigdl/transform/vision/image/augmentation/ChannelOrderSpec.scala | Scala | apache-2.0 | 1,451 |
/*
* Copyright 2015 Foundational Development
*
* 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 appl... | rssvihla/datastax_work | spark_commons/commons/src/test/scala/pro/foundev/commons/package.scala | Scala | apache-2.0 | 680 |
/*
* Copyright 2015 org.NLP4L
*
* 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... | NLP4L/framework | app/org/nlp4l/framework/processors/ProcessorChain.scala | Scala | apache-2.0 | 12,963 |
package com.twitter.finagle.netty4.http.handler
import io.netty.buffer.Unpooled
import io.netty.channel.embedded.EmbeddedChannel
import io.netty.handler.codec.DecoderResult
import io.netty.handler.codec.http.{DefaultHttpContent, HttpContent}
import org.scalatest.{FunSuite, OneInstancePerTest}
class ClientExceptionMap... | luciferous/finagle | finagle-netty4-http/src/test/scala/com/twitter/finagle/netty4/http/handler/ClientExceptionMapperTest.scala | Scala | apache-2.0 | 1,039 |
package org.jetbrains.sbt.shell
import com.intellij.notification.{NotificationGroup, NotificationType}
object SbtShellNotifications {
val notificationGroup: NotificationGroup = NotificationGroup.balloonGroup("Sbt Shell")
}
| jastice/intellij-scala | scala/scala-impl/src/org/jetbrains/sbt/shell/SbtShellNotifications.scala | Scala | apache-2.0 | 227 |
/*
* Copyright 2001-2013 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | travisbrown/scalatest | src/test-osgi/scala/org/scalatest/osgi/OsgiSuite.scala | Scala | apache-2.0 | 3,806 |
/******************************************************************************
* Copyright (c) 2014, Equal Experts Ltd
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of ... | EqualExperts/Midas | src/test/scala/com/ee/midas/pipes/SimplexPipeSpecs.scala | Scala | bsd-2-clause | 3,412 |
package com.wavesplatform.database
import com.wavesplatform.metrics.LevelDBStats
import com.wavesplatform.metrics.LevelDBStats.DbHistogramExt
import org.iq80.leveldb.{DB, DBIterator, ReadOptions}
import scala.annotation.tailrec
class ReadOnlyDB(db: DB, readOptions: ReadOptions) {
def get[V](key: Key[V]): V = {
... | wavesplatform/Waves | node/src/main/scala/com/wavesplatform/database/ReadOnlyDB.scala | Scala | mit | 1,979 |
package spire
package math
import org.scalatest.FunSuite
import spire.std.int._
class LiteralsTest extends FunSuite {
test("byte literals") {
import spire.syntax.literals._
assert(b"-128" === (-128:Byte))
assert(b"-100" === (-100:Byte))
assert(b"0" === (0:Byte))
assert(b"100" === (100:Byte))
... | tixxit/spire | tests/src/test/scala/spire/math/LiteralsTest.scala | Scala | mit | 1,738 |
/*
* La Trobe University - Distributed Deep Learning System
* Copyright 2016 Matthias Langer (t3l@threelights.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.apa... | bashimao/ltudl | blaze/src/main/scala/edu/latrobe/blaze/Regularizer.scala | Scala | apache-2.0 | 7,847 |
package dpla.ingestion3.mappers.providers
import dpla.ingestion3.mappers.utils.Document
import dpla.ingestion3.messages.{IngestMessage, MessageCollector}
import dpla.ingestion3.model._
import dpla.ingestion3.utils.FlatFileIO
import org.scalatest.{BeforeAndAfter, FlatSpec}
import scala.xml.{NodeSeq, XML}
class HathiM... | dpla/ingestion3 | src/test/scala/dpla/ingestion3/mappers/providers/HathiMappingTest.scala | Scala | mit | 10,331 |
package io.github.binaryfoo.lagotto
import org.joda.time.DateTime
/**
* Calculates the delay between two log entries.
*/
case class DelayTimer(current: LogEntry, previous: Option[LogEntry]) extends LogEntry {
override def timestamp: DateTime = current.timestamp
override def source: SourceRef = current.source
... | binaryfoo/lagotto | src/main/scala/io/github/binaryfoo/lagotto/DelayTimer.scala | Scala | mit | 731 |
package berlin.jentsch.modelchecker.akka
import akka.actor.ActorPath
import akka.actor.typed.Behavior
import akka.actor.typed.mc.BehaviorsEquals
import scala.language.implicitConversions
sealed trait Property {
def unary_! : Property = Not(this)
def &(that: Property): Property = And(this, that)
def |(that: P... | Jentsch/modelchecker | akka/src/main/scala/berlin/jentsch/modelchecker/akka/Property.scala | Scala | mit | 3,349 |
/*
* 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 ... | tzulitai/flink | flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/batch/table/CorrelateTest.scala | Scala | apache-2.0 | 4,252 |
package pl.writeonly.son2.path.notations
import com.fasterxml.jackson.databind.{ObjectMapper, ObjectReader}
import com.jayway.jsonpath.spi.json.{
JacksonJsonNodeJsonProvider,
JacksonJsonProvider
}
import com.jayway.jsonpath.spi.mapper.JacksonMappingProvider
import pl.writeonly.son2.apis.config.{Meta, RConfig, WCon... | writeonly/son2 | scallions-impl/scallions-path/src/main/scala/pl/writeonly/son2/path/notations/NotationCaseJackson.scala | Scala | apache-2.0 | 1,657 |
/*
* Copyright (c) 2013 Habla Computing
*
* 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 ... | hablapps/app-dofollow | src/main/scala/org/hablapps/dofollow/portal/Rules.scala | Scala | apache-2.0 | 3,831 |
package im.actor.server
import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import org.scalatest.concurrent.ScalaFutures
import org.scalatest.time.{ Seconds, Span }
import org.scalatest.{ Inside, FlatSpecLike, Matchers }
import slick.driver.PostgresDriver
import scala.concurrent.ExecutionContext
impor... | ljshj/actor-platform | actor-server/actor-testkit/src/main/scala/im/actor/server/BaseAppSuite.scala | Scala | mit | 1,217 |
/* Copyright (C) 2008-2014 University of Massachusetts Amherst.
This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible)
http://factorie.cs.umass.edu, http://github.com/factorie
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance ... | patverga/factorie | src/test/scala/cc/factorie/app/bib/parser/TestBibtexParser.scala | Scala | apache-2.0 | 20,131 |
package edu.cmu.lti.nlp.amr
import scala.util.matching.Regex
import scala.collection.mutable.{Map, Set, ArrayBuffer}
/****************************** Driver Program *****************************/
object TestAMRDisplayCode {
val usage = """Usage: scala -classpath . edu.cmu.lti.nlp.amr.TestAMRDisplayCode < ... | hopshackle/wordAlignment | src/edu/cmu/lti/nlp/amr/TestAMRDisplayCode.scala | Scala | bsd-2-clause | 1,983 |
/*******************************************************************************
* Copyright 2013 Kevin Hester
*
* See LICENSE.txt for license details.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIE... | dronekit/dronekit-server | src/main/scala/com/geeksville/util/CacheUtil.scala | Scala | gpl-3.0 | 1,174 |
package cromwell.api.model
import spray.json.DefaultJsonProtocol
object CromwellFailedResponseExceptionJsonSupport extends DefaultJsonProtocol {
implicit val CromwellFailedResponseExceptionFormat = jsonFormat2(CromwellFailedResponseException)
}
case class CromwellFailedResponseException(status: String, message: St... | ohsu-comp-bio/cromwell | cromwellApiClient/src/main/scala/cromwell/api/model/CromwellFailedResponseException.scala | Scala | bsd-3-clause | 353 |
package org.jetbrains.plugins.scala.lang.parser.parsing.xml.pattern
import com.intellij.psi.xml.XmlTokenType
import org.jetbrains.plugins.scala.lang.lexer.ScalaXmlTokenTypes
import org.jetbrains.plugins.scala.lang.parser.{ErrMsg, ScalaElementTypes}
import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPs... | gtache/intellij-lsp | intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/parser/parsing/xml/pattern/ETagP.scala | Scala | apache-2.0 | 1,323 |
/*
* Copyright 2013 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... | twitter/storehaus | storehaus-algebra/src/test/scala/com/twitter/storehaus/algebra/ReadableStoreAlgebraProperties.scala | Scala | apache-2.0 | 1,951 |
package com.mesosphere.cosmos
import java.util.UUID
import cats.data.Xor
import com.mesosphere.cosmos.http.MediaTypes
import com.mesosphere.cosmos.label.v1.model.PackageMetadata
import com.mesosphere.cosmos.repository.DefaultRepositories
import com.mesosphere.cosmos.rpc.v1.circe.Decoders._
import com.mesosphere.cosmos... | movicha/cosmos | cosmos-server/src/it/scala/com/mesosphere/cosmos/PackageListIntegrationSpec.scala | Scala | apache-2.0 | 7,944 |
package controllers
import dao._
import database.{CourseDb, CourseTable}
import models.{Course, CourseLike, CourseProtocol}
import org.joda.time.DateTime
import play.api.libs.json.{Reads, Writes}
import play.api.mvc.ControllerComponents
import security.LWMRole._
import security.SecurityActionChain
import java.util.UU... | THK-ADV/lwm-reloaded | app/controllers/CourseController.scala | Scala | mit | 3,136 |
/*
* 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 ... | icexelloss/spark | sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala | Scala | apache-2.0 | 35,939 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 VoltDB Inc.
*
* 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, ... | VoltDB/app-fastdata | hadoop/spark/src/main/scala/KMeansReferral.scala | Scala | mit | 2,443 |
package rats
import java.util.concurrent.atomic.AtomicInteger
class GamesRepository {
private val atomicInteger = new AtomicInteger()
def newGame(): Long = atomicInteger.incrementAndGet()
} | jcaraballo/rats2 | src/main/scala/rats/GamesRepository.scala | Scala | gpl-3.0 | 196 |
package models.job
import akka.actor.ActorSystem
import com.scalableminds.util.accesscontext.GlobalAccessContext
import com.scalableminds.util.mvc.Formatter
import com.scalableminds.util.tools.Fox
import com.scalableminds.webknossos.datastore.helpers.IntervalScheduler
import com.scalableminds.webknossos.schema.Tables.... | scalableminds/webknossos | app/models/job/Worker.scala | Scala | agpl-3.0 | 4,610 |
package geotrellis.data
import geotrellis.process.TestServer
import geotrellis._
import geotrellis.raster._
import geotrellis._
import org.scalatest.Spec
import org.scalatest.matchers.MustMatchers
import org.scalatest.matchers.ShouldMatchers
import org.geotools.gce.geotiff.{GeoTiffFormat}
import org.geotools.factor... | Tjoene/thesis | Case_Programs/geotrellis-0.7.0/src/test/scala/geotrellis/data/geotiff.scala | Scala | gpl-2.0 | 3,565 |
package org.ucombinator.jaam.interpreter.snowflakes
import scala.collection.JavaConversions._
import scala.collection.mutable
import soot.{Main => SootMain, Unit => SootUnit, Value => SootValue, _}
import soot.jimple.{Stmt => SootStmt, _}
import org.ucombinator.jaam.util.Log
import org.ucombinator.jaam.interpreter._
... | Ucombinator/jaam | src/main/scala/org/ucombinator/jaam/interpreter/snowflakes/ClassSnowflakes.scala | Scala | bsd-2-clause | 6,119 |
package models
import models.users._
import scala.slick.lifted.TableQuery
/**
* @author Joseph Dessens
* @since 9/6/14
*/
object UserTableQueries {
object mailTokens extends TableQuery(new MailTokens(_))
object userAuthenticators extends TableQuery(new UserAuthenticators(_))
object users extends TableQuery(... | vega113/emotracker | app/models/UserTableQueries.scala | Scala | apache-2.0 | 550 |
package filodb.memory
import net.jpountz.xxhash.XXHashFactory
import filodb.memory.format.UnsafeUtils
/**
* A BinaryRegion is just an area of memory (heap or offheap) with a length prefix.
* There are different implementations depending on the size of the length prefix.
* This design allows us to reference an off... | velvia/FiloDB | memory/src/main/scala/filodb.memory/BinaryRegion.scala | Scala | apache-2.0 | 6,585 |
package io.udash.web.guide.views.frontend
import io.udash._
import io.udash.css.CssView
import io.udash.web.commons.components.CodeBlock
import io.udash.web.commons.views.{ClickableImageFactory, ImageFactoryPrefixSet}
import io.udash.web.guide.styles.partials.GuideStyles
import io.udash.web.guide.views.References
impo... | UdashFramework/udash-core | guide/guide/.js/src/main/scala/io/udash/web/guide/views/frontend/FrontendMVPView.scala | Scala | apache-2.0 | 5,399 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\\___/_/... | rorygraves/perf_tester | corpus/scala-library/src/main/scala/collection/generic/BitOperations.scala | Scala | apache-2.0 | 2,385 |
package de.kaufhof.pillar
import org.scalatest.{FunSpec, BeforeAndAfter}
import org.scalatest.Matchers
import java.io.{ByteArrayInputStream, FileInputStream}
import java.util.Date
class ParserSpec extends FunSpec with BeforeAndAfter with Matchers {
describe("#parse") {
describe("1370028262_creates_events_table.... | Galeria-Kaufhof/pillar | src/test/scala/de/kaufhof/pillar/ParserSpec.scala | Scala | mit | 6,068 |
package mesosphere.marathon
package core.condition
import play.api.libs.json.Json
import org.apache.mesos.Protos.{ TaskState => MesosTaskState }
/**
* To define the status of an Instance, this trait is used and stored for each Task in Task.Status.
* The existing case objects are:
* - marathon exclusive status
... | natemurthy/marathon | src/main/scala/mesosphere/marathon/core/condition/Condition.scala | Scala | apache-2.0 | 5,033 |
package se.gigurra.aichallenge.host
import se.gigurra.aichallenge.Message
import se.gigurra.util.TypedActorProxy
trait IGameHost extends TypedActorProxy {
def attach(session: IUserSession)
def detach(session: IUserSession)
def handleMessage(msg: Message, session: IUserSession)
}
trait IGameHostInternal extends... | GiGurra/gigurra-game-challenge | src/main/scala/se/gigurra/aichallenge/host/IGameHost.scala | Scala | gpl-2.0 | 347 |
/*
* Copyright (c) 2014-2021 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache... | monifu/monifu | monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldEvalObservable.scala | Scala | apache-2.0 | 2,139 |
package breeze.linalg
/*
Copyright 2012 David Hall
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... | scalanlp/breeze | math/src/test/scala/breeze/linalg/CSCMatrixTest.scala | Scala | apache-2.0 | 15,940 |
/*
* 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 ... | tophua/spark1.52 | core/src/main/scala/org/apache/spark/scheduler/TaskInfo.scala | Scala | apache-2.0 | 3,907 |
package stefansavev.demo.hyperloglog.counters
import org.apache.lucene.util.LongBitSet
import stefansavev.demo.hyperloglog.hashing.Hasher
class EfficientLinearCounter(hasher: Hasher) extends ApproximateCounter{
final val p = 14 //number of bits used to represent the buckets
final val m = 1 << p
val bitSetCounte... | dvgodoy/HashingAndSketching | out/production/hyperloglog/stefansavev/demo/hyperloglog/counters/EfficientLinearCounter.scala | Scala | apache-2.0 | 874 |
/*
* Copyright 2017-2022 John Snow Labs
*
* 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... | JohnSnowLabs/spark-nlp | src/main/scala/com/johnsnowlabs/storage/HasStorageModel.scala | Scala | apache-2.0 | 1,612 |
package com.blinkbox.books.test
import org.hamcrest.{Description, BaseMatcher, Matcher}
import scala.language.implicitConversions
import scala.language.experimental.macros
import scala.reflect.macros.Context
private object MatcherMacros {
def toMatcher[T](c: Context)(f: c.Expr[T => Boolean])(implicit wtt: c.WeakTyp... | blinkboxbooks/common-test.scala | src/main/scala/com/blinkbox/books/test/MatcherSugar.scala | Scala | mit | 1,452 |
package org.dama.datasynth
/**
* Created by aprat on 3/05/17.
*
* Class used to store the configuration of DataSynth
*
*/
object DataSynthConfig {
def apply() : DataSynthConfig = {
new DataSynthConfig()
}
def apply( args : List[String] ) : DataSynthConfig = {
nextOption( new DataSynthConfig()... | DAMA-UPC/DataSynth | src/main/scala/org/dama/datasynth/DataSynthConfig.scala | Scala | gpl-3.0 | 3,923 |
package recommender
import org.apache.spark.mllib.recommendation.Rating
import org.apache.spark.rdd.RDD
/**
* Created by Ondra Fiedler on 3.9.14.
*/
/**
* k-NN with a tree of clusters. The tree is created by repetitive splitting the biggest cluster into two smaller by k-Means from MLlib.
* @param vectorsRDD Vect... | jibaro/spark-recommender | src/main/scala/recommender/ClusterTreeKnnRecommender.scala | Scala | mit | 4,875 |
/**
* Copyright (C) 2010 Orbeon, Inc.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) any later version.
*
* This program i... | evlist/orbeon-forms | src/main/scala/org/orbeon/oxf/pipeline/InitUtils.scala | Scala | lgpl-2.1 | 12,484 |
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatest.FunSuite
import org.scalatest.matchers.ShouldMatchers
import org.scalatest.{ FunSpec, BeforeAndAfterAll, BeforeAndAfterEach, BeforeAndAfter }
class Chap05Spec extends FunSpec with ShouldMatchers {
describe("ifについて"){
it(... | akimichi/functionaljs | src/test/scala/chap05.spec.scala | Scala | mit | 1,591 |
/*
* 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 ... | bowenli86/flink | flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/runtime/stream/TimeAttributesITCase.scala | Scala | apache-2.0 | 27,925 |
/* ------------------------------------------------------------------ */
/* The Great Computer Language Shootout */
/* http://shootout.alioth.debian.org/ */
/* */
/* Contributed by Anthony Bo... | kragen/shootout | bench/harmonic/harmonic.scala | Scala | bsd-3-clause | 961 |
package org.jetbrains.plugins.scala
package lang
package psi
package impl
package statements
package params
import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes
import com.intellij.lang.ASTNode
import stubs.elements.wrappers.DummyASTNode
import stubs.ScParameterStub
import org.jetbrains.plugins.scala.lang.ps... | consulo/consulo-scala | src/org/jetbrains/plugins/scala/lang/psi/impl/statements/params/ScClassParameterImpl.scala | Scala | apache-2.0 | 2,402 |
package com.twitter.util
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import org.scalacheck.Gen
import org.scalatest.prop.GeneratorDrivenPropertyChecks
@RunWith(classOf[JUnitRunner])
class LRUMapTest extends FunSuite with GeneratorDrivenPropertyChecks {
// do... | BuoyantIO/twitter-util | util-collection/src/test/scala/com/twitter/util/LRUMapTest.scala | Scala | apache-2.0 | 1,414 |
package services
import akka.actor.Actor
import java.sql.SQLException
import models._
import play.api.Play.current
import play.api.db.slick.DB
case class UpdateScore(score: Score)
case class ListScores(studentId: Long)
case class CreateScore(score: Score)
class ScoreActor extends Actor {
def receive = {
case ... | silbermm/proximal | app/services/ScoreActor.scala | Scala | apache-2.0 | 1,187 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2010, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\\___/_/... | cran/rkafkajars | java/scala/collection/generic/SetFactory.scala | Scala | apache-2.0 | 1,471 |
package com.itszuvalex.itszulib.testing
import com.itszuvalex.itszulib.api.IPreviewable
import net.minecraft.item.Item
/**
* Created by Christopher Harris (Itszuvalex) on 8/26/15.
*/
class ItemPreviewable extends Item with IPreviewable {
/**
*
* @return The ID of IPreviewableRenderer. This is separate fro... | BlockWorker/ItszuLib | src/main/scala/com/itszuvalex/itszulib/testing/ItemPreviewable.scala | Scala | gpl-2.0 | 400 |
/*
* Scala (https://www.scala-lang.org)
*
* Copyright EPFL and Lightbend, Inc.
*
* Licensed under Apache License 2.0
* (http://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package scala.concurrent
impo... | scala/scala | src/library/scala/concurrent/duration/package.scala | Scala | apache-2.0 | 3,045 |
/*
* 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 ... | pgandhi999/spark | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/SimplifyConditionalSuite.scala | Scala | apache-2.0 | 6,600 |
package org.awong.fundamentals.unionfind
/**
* @see Sedgewick & Wayne, Algorithms, 4th Edition (2011), page 227-227
*/
class WeightedQuickUnionUF(n: Int) extends UnionFind {
var count = n
var id = (0 to n).toArray
var sz = for (i <- id) yield 1
def connected(p: Int, q: Int): Boolean = {
find(p) == find(... | alanktwong/algorithms-scala | fundamentals/src/main/scala/org/awong/fundamentals/unionfind/WeightedQuickUnionUF.scala | Scala | mit | 912 |
/*
* Copyright (c) 2014-2020 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache... | alexandru/monifu | monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ZipWithIndexSuite.scala | Scala | apache-2.0 | 2,018 |
package models.db
import models.Topic
import play.api.db.slick.Config.driver.simple._
class Topics(tag: Tag) extends Table[Topic](tag, "TOPICS") {
def id = column[Long]("id", O.PrimaryKey, O.AutoInc)
def title = column[String]("title")
def slug = column[String]("slug")
def * = (id.?, title, slug) <>(Topic.tupl... | duaiwe/vulgar | app/models/db/Topics.scala | Scala | mit | 392 |
package org.monkeynuthead.playground.streams
import org.scalatest.{MustMatchers, WordSpec}
/**
* Messing around with streams.
*/
class StreamSpec extends WordSpec with MustMatchers {
"I" must {
"know how to create a basic stream (but be careful because the val will keep hold of everything)" in {
... | georgenicoll/scala-playground | src/test/scala/org/monkeynuthead/playground/streams/StreamSpec.scala | Scala | apache-2.0 | 1,567 |
// scalastyle:off
/* NSC -- new Scala compiler
* Copyright 2005-2013 LAMP/EPFL
* @author Paul Phillips
*/
package org.apache.spark.repl
import scala.tools.nsc._
import scala.tools.nsc.interpreter._
import scala.collection.{ mutable, immutable }
private[repl] trait SparkImports {
self: SparkIMain =>
import... | tophua/spark1.52 | repl/scala-2.10/src/main/scala/org/apache/spark/repl/SparkImports.scala | Scala | apache-2.0 | 9,767 |
package answer
import exam.CharacterCounter
import jeqa.types.Sentence
import text.StringOption
/**
* <pre>
* Created on 3/11/15.
* </pre>
* @param score score
* @param text answer
* @author K.Sakamoto
*/
class AnswerCandidate(val score: Double, val text: StringOption, val sentenceList: Seq[Sentence]) {
val ... | ktr-skmt/FelisCatusZero | src/main/scala/answer/AnswerCandidate.scala | Scala | apache-2.0 | 585 |
/*
* 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 ... | asurve/incubator-systemml | src/main/scala/org/apache/sysml/api/dl/CaffeLayer.scala | Scala | apache-2.0 | 64,818 |
package org.openmole.buildsystem
import org.apache.commons.compress.archivers.tar.{ TarArchiveEntry, TarArchiveOutputStream }
import sbt._
import Keys._
import scala.util.matching.Regex
import OMKeys._
import java.util.zip.GZIPOutputStream
import resource._
import java.io.{ BufferedOutputStream, FileOutputStream }
imp... | ISCPIF/PSEExperiments | openmole-src/build-system/src/main/scala/org/openmole/buildsystem/Assembly.scala | Scala | agpl-3.0 | 9,144 |
/*
* 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 ... | someorz/spark | sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQueryListenerSuite.scala | Scala | apache-2.0 | 18,399 |
package com.github.leifker.spark.test
import com.github.leifker.cassandra.config.{CassandraConfig, KeyspaceConfig}
import com.github.leifker.spark.config.CassandraSparkConfig
/**
* Created by dleifker on 2/16/17.
*/
object ITestContext {
val localConfig = CassandraSparkConfig(new CassandraConfig("alpha,epsilon,... | leifker/geo-sentiment | spark/src/integration-test/scala/com/github/leifker/spark/test/ITestContext.scala | Scala | gpl-3.0 | 583 |
package mesosphere.marathon
package core.deployment.impl
import java.util.concurrent.LinkedBlockingDeque
import akka.Done
import akka.actor.{ActorRef, Props}
import akka.event.EventStream
import akka.stream.scaladsl.Source
import akka.testkit.TestActor.{AutoPilot, NoAutoPilot}
import akka.testkit.{ImplicitSender, Tes... | gsantovena/marathon | src/test/scala/mesosphere/marathon/core/deployment/impl/DeploymentManagerActorTest.scala | Scala | apache-2.0 | 10,306 |
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\\' )
package ${package}
import nl.knaw.dans.lib.logging.DebugEnhancedLogging
import org.scalatra._
class ${javaName}Servlet(app: ${javaName}App,
version: String) extends ScalatraServlet with DebugEnhancedLogging... | DANS-KNAW/easy-module-archetype | src/main/resources/archetype-resources/src/main/scala/__javaName__Servlet.scala | Scala | apache-2.0 | 434 |
/*
* Copyright 2020 Precog Data
*
* 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 ... | quasar-analytics/quasar | impl/src/main/scala/quasar/impl/datasources/PrefixByteStores.scala | Scala | apache-2.0 | 1,740 |
package controllers.s_your_partner
import play.api.test.FakeRequest
import utils.WithApplication
import controllers.mappings.Mappings
import models.view.CachedClaim
import org.specs2.mutable._
import models.{ NationalInsuranceNumber, DayMonthYear }
class GYourPartnerPersonalDetailsFormSpec extends Specification {
... | Department-for-Work-and-Pensions/ClaimCapture | c3/test/controllers/s_your_partner/GYourPartnerPersonalDetailsFormSpec.scala | Scala | mit | 12,844 |
package io.avici.truffle
import argonaut._
import Argonaut._
/**
* Created by Baqiao (Charles) Liu on 1/15/2016.
*/
/**
* Copyright 2016 Baqiao (Charles) Liu
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obta... | BakaBBQ/truffle-lang | src/main/scala/io/avici/truffle/Playground.scala | Scala | apache-2.0 | 1,002 |
/*
* 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 ... | ajbozarth/incubator-livy | thriftserver/server/src/main/scala/org/apache/livy/thriftserver/auth/ldap/LdapSearchFactory.scala | Scala | apache-2.0 | 2,141 |
/*
* Copyright 2015 the original author or authors.
* @https://github.com/scouter-project/scouter
*
* 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/... | yuyupapa/OpenSource | scouter.server/src/scouter/server/db/StatusWR.scala | Scala | apache-2.0 | 3,281 |
package spire.math
import scala.reflect.ClassTag
// scalatest
import org.scalatest.FunSuite
// we need to disable our own === to avoid messing up ScalaTest.
import spire.implicits.{eqOps => _, _}
import java.math.MathContext
// nice alias
import scala.{specialized => spec}
class NumericTest extends FunSuite {
... | lrytz/spire | tests/src/test/scala/spire/math/NumericTest.scala | Scala | mit | 2,189 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | nkhuyu/Spark-SQL-on-HBase | src/main/scala/org/apache/spark/sql/hbase/util/BytesUtils.scala | Scala | apache-2.0 | 7,480 |
package ml.linalg
import scala.collection.mutable.ArrayBuffer
import ml.traits.MatrixT
class Ones[T: Numeric: ClassManifest](r: Int, c: Int) extends MatrixT[T]{
var rows: Int = r;
var cols: Int = c;
var data = ArrayBuffer.fill(rows, cols)(1.asInstanceOf[T]);
// define a secondary constructor that takes only o... | jccarrasco/maleta | src/ml/linalg/Ones.scala | Scala | gpl-2.0 | 376 |
package com.twitter.finagle.protobuf.rpc
trait RpcServer {
def close(d: Duration): Unit;
}
| firebase/finagle | finagle-protobuf/src/main/scala/com/twitter/finagle/protobuf/rpc/RpcServer.scala | Scala | apache-2.0 | 96 |
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.