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 models import org.squeryl.KeyedEntity import org.squeryl.PrimitiveTypeMode._ import org.squeryl.dsl.{OneToMany, ManyToOne} import org.squeryl.{Query, Schema, KeyedEntity, Table} import collection.Iterable import util.{Try, Success, Failure} import Database._ case class StockItemData(ean: Long, warehouseCode...
alanktwong/play-crud
app/models/StockItem.scala
Scala
mit
6,808
/* Title: Pure/PIDE/xml.scala Author: Makarius Untyped XML trees and basic data representation. */ package isabelle object XML { /** XML trees **/ /* datatype representation */ type Attribute = Properties.Entry type Attributes = Properties.T sealed abstract class Tree { override def toStr...
larsrh/libisabelle
modules/pide/2018/src/main/scala/PIDE/xml.scala
Scala
apache-2.0
10,402
import scala.io.Source object Solution extends App { val lines = Source.stdin.getLines().toList val string = lines.head val queries = lines.tail.tail.map(_.toInt) val subs = uniformSubstrings(string) val substringWeights = subs.flatMap(s => { val c = s.charAt(0).toInt - 'a'.toInt + 1 (1 to s.length)...
PaulNoth/hackerrank
practice/algorithms/strings/weighted_uniform_strings/WeightedUniformStrings.scala
Scala
mit
691
package modules.ner.ja import java.nio.file.Path import modules.ner.MultiLingualNamedEntityRecognizerInGlossary import modules.util.ModulesConfig import us.feliscat.m17n.Japanese import us.feliscat.text.StringOption import us.feliscat.time.TimeTmp import us.feliscat.time.ja.JapaneseTimeExtractorInGlossaryEntries /**...
ktr-skmt/FelisCatusZero-multilingual
src/main/scala/modules/ner/ja/JapaneseNamedEntityRecognizerInGlossary.scala
Scala
apache-2.0
757
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
shuangshuangwang/spark
external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/PostgresIntegrationSuite.scala
Scala
apache-2.0
3,253
package org.sisioh.aws4s.dynamodb.document import com.amazonaws.services.dynamodbv2.AmazonDynamoDB import com.amazonaws.services.dynamodbv2.document._ import com.amazonaws.services.dynamodbv2.model.TableDescription import org.sisioh.aws4s.PimpedType import scala.collection.JavaConverters._ object TableFactory { d...
sisioh/aws4s
aws4s-dynamodb/src/main/scala/org/sisioh/aws4s/dynamodb/document/RichTable.scala
Scala
mit
8,949
package edu.colorado.hopper.client.android import com.ibm.wala.ssa.{IR, ISSABasicBlock} import edu.colorado.hopper.executor.TransferFunctions import edu.colorado.hopper.jumping.{DefaultJumpingSymbolicExecutor, RelevanceRelation} import edu.colorado.hopper.state._ import edu.colorado.thresher.core.Options import edu.co...
cuplv/hopper
src/main/scala/edu/colorado/hopper/client/android/AndroidJumpingSymbolicExecutor.scala
Scala
apache-2.0
2,236
/* * 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 ...
maropu/spark
mllib/src/main/scala/org/apache/spark/mllib/util/LinearDataGenerator.scala
Scala
apache-2.0
7,588
/* * Copyright (C) 2018 Lightbend Inc. <https://www.lightbend.com> * Copyright (C) 2017-2018 Alexis Seigneurin. * * 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.apach...
ollie314/kafka
streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/StreamToTableJoinTestData.scala
Scala
apache-2.0
2,074
package scalafiddle.server.dao case class FiddleAccess( id: Int, fiddleId: String, version: Int, timeStamp: Long, userId: Option[String], embedded: Boolean, sourceIP: String ) trait AccessDAO { self: DriverComponent => import driver.api._ class Accesses(tag: Tag) extends Table[Fidd...
scalafiddle/scalafiddle-editor
server/src/main/scala/scalafiddle/server/dao/AccessDAO.scala
Scala
apache-2.0
1,161
/* * 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 ...
Intel-bigdata/OAP
oap-native-sql/core/src/test/scala/org/apache/spark/sql/execution/joins/ExistenceJoinSuite.scala
Scala
apache-2.0
11,139
package org package object scalatra extends Control // make halt and pass visible to helpers outside the DSL { import util.MultiMap type RouteTransformer = (Route => Route) @deprecated("Use CsrfTokenSupport", "2.0.0") type CSRFTokenSupport = CsrfTokenSupport type MultiParams = MultiMap type Action...
louk/scalatra
core/src/main/scala/org/scalatra/package.scala
Scala
bsd-2-clause
803
package com.statigories.switchboard.exceptions case class MissingConfigException(configClass: Class[_], prefix: Option[String]) extends RuntimeException(s"Missing ${configClass.getSimpleName} config with prefix [${prefix.getOrElse("")}]")
statigories/switchboard
src/main/scala/com/statigories/switchboard/exceptions/MissingConfigException.scala
Scala
mit
240
/** * Copyright (C) 2014 TU Berlin (peel@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...
carabolic/peel
peel-core/src/main/scala/org/peelframework/core/cli/command/results/Archive.scala
Scala
apache-2.0
3,346
package com.twitter.zk import java.io.File import java.net.InetAddress import com.twitter.common.io.FileUtils import org.apache.zookeeper.server.ZooKeeperServer import org.junit.runner.RunWith import org.scalatest.{BeforeAndAfter, FunSuite} import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class S...
folone/util
util-zk-test/src/test/scala/com/twitter/zk/ServerCnxnFactoryTest.scala
Scala
apache-2.0
956
package edu.gemini.p2checker.util import edu.gemini.p2checker.api.{ObservationElements, Problem} import edu.gemini.p2checker.api.Problem.Type.{ERROR, WARNING} import edu.gemini.spModel.config2.{ItemKey, Config} import edu.gemini.spModel.core.ProgramId /** * Created with IntelliJ IDEA. * User: sraaphor * Date: 4/10...
arturog8m/ocs
bundle/edu.gemini.p2checker/src/main/scala/edu/gemini/p2checker/util/MdfConfigRule.scala
Scala
bsd-3-clause
2,789
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
dotty-staging/scalatest
scalatest-test/src/test/scala/org/scalatest/fixture/NoArgAlternativeSpec.scala
Scala
apache-2.0
1,555
package controllers import scalaz._ import Scalaz._ import scalaz.Validation._ import net.liftweb.json._ import io.megam.auth.funnel._ import io.megam.auth.funnel.FunnelErrors._ import play.api.mvc._ import controllers.stack.Results object EventsContainer extends Controller with controllers.stack.APIAuthElement { d...
indykish/vertice_gateway
app/controllers/events/EventsContainer.scala
Scala
mit
4,596
package net.liftmodules import _root_.net.liftweb._ import util.Props import http._ /** * ==FoBo Tooltip Resource Module== * * This resource module provides Tooltip resource components to the FoBo Tooltip Toolkit module, * but can also be used as-is, see below for setup information. * * If you are using t...
karma4u101/FoBo
Popper/Tooltip-Res/src/main/scala/net/liftmodules/fobotoores/fobotoores.scala
Scala
apache-2.0
3,173
package cromwell.engine.backend import java.util.UUID import cromwell.CromwellTestkitSpec import cromwell.engine.backend.local.LocalBackend import cromwell.engine.workflow.BackendCallKey import cromwell.engine.{AbortRegistrationFunction, WorkflowDescriptor, WorkflowId} import cromwell.util.SampleWdl import org.scalat...
dgtester/cromwell
src/test/scala/cromwell/engine/backend/BackendCallSpec.scala
Scala
bsd-3-clause
2,226
package com.geishatokyo.diffsql.parser import com.geishatokyo.diffsql.ast.Key.{Reference, ForeignKey} import org.scalatest.FlatSpec import org.scalatest.Matchers import com.geishatokyo.diffsql.ast._ import com.geishatokyo.diffsql.{Name} /** * * @author takeshita * @author ponkotuy * Date: 14/02/17. */ class KeyP...
geishatokyo/diff-sql-table
parser/src/test/scala/com/geishatokyo/diffsql/parser/KeyParserTest.scala
Scala
mit
3,882
package util.renderers import org.pegdown.PegDownProcessor import org.pegdown.Extensions object MarkdownContentRenderer extends ContentRenderer { override val renderFormat = "md" def MAX_PARSING_TIME = 20000 def EXTENSIONS = Extensions.ALL_WITH_OPTIONALS ^ Extensions.ANCHORLINKS override def render(source...
metaxmx/pm15
app/util/renderers/MarkdownContentRenderer.scala
Scala
apache-2.0
1,046
package utils import com.rezwan.spraysample.{FrequencyMetricsResponse, Payload} import org.specs2.mutable.Specification /** * Provides coverage for the FrequencyCalculator. */ class FrequencyCalculatorSpec extends Specification { val payload1 = Payload(0, "", 0) val payload2 = Payload(-1, "", 0) val payload3...
abir0187/spray-sample
src/test/scala/utils/FrequencyCalculatorSpec.scala
Scala
mit
3,707
package nl.rabobank.oss.rules.utils import nl.rabobank.oss.rules.dsl.nl.grammar.Berekening import nl.rabobank.oss.rules.engine.{Context, FactEngine} import nl.rabobank.oss.rules.facts.Fact import nl.rabobank.oss.rules.services.{HeuristicService, _} //scalastyle:off null class InternalHeuristicTester(heuristicService...
rabobank-nederland/rule-engine
engine/src/test/scala/nl/rabobank/oss/rules/utils/InternalHeuristicTester.scala
Scala
mit
2,340
package qq package macros import org.scalatest.{FreeSpec, Matchers} import qq.cc.{LocalOptimizer, Parser} import qq.data.{FilterAST, Program} import qq.macros.QQStager._ import qq.util.Recursion import qq.util.Recursion.RecursionEngine case class QQStagerTestCase(name: String, programs: Vector[String], literalResults...
edmundnoble/slate
qqmacros/shared/src/test/scala/qq/macros/QQStagerTest.scala
Scala
mit
858
package io.github.bamos // Akka import akka.actor.{Actor,ActorContext,ActorRefFactory} import akka.pattern.ask import akka.util.Timeout // Spray import spray.http._ import spray.routing.HttpService import MediaTypes._ // Scala import scala.concurrent._ import scala.concurrent.duration._ import ExecutionContext.Impli...
bamos/girl
src/main/scala/RequestHandler.scala
Scala
mit
2,330
/* * 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 ...
maropu/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/AlterTableRenamePartitionSuite.scala
Scala
apache-2.0
1,995
/* * 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...
fjsc/sparta
plugins/src/main/scala/com/stratio/sparta/plugin/transformation/datetime/DateTimeParser.scala
Scala
apache-2.0
5,505
package com.plasmaconduit.rxnettyscala.http sealed trait HttpResponseHeader { val key: String val value: String } final case class AcceptRanges(value: String) extends HttpResponseHeader { val key = "Accept-Ranges" } final case class Age(value: String) extends HttpResponseHeader { val key = "Age" } final cas...
plasmaconduit/rx-netty-scala
src/main/scala/com/plasmaconduit/rxnettyscala/http/HttpResponseHeader.scala
Scala
mit
2,827
/* 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 use this f...
mandar2812/DynaML
dynaml-core/src/main/scala/io/github/tailhq/dynaml/dataformat/MAT.scala
Scala
apache-2.0
1,223
/*********************************************************************** * 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-tools/src/main/scala/org/locationtech/geomesa/tools/ingest/AbstractIngestJob.scala
Scala
apache-2.0
4,992
/** * Copyright 2015 Thomson Reuters * * Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
nruppin/CM-Well
server/cmwell-ws/app/cmwell/ws/qp/Encoder.scala
Scala
apache-2.0
1,967
/* * tswrdb - a program and API to export the TSW resource database * * Copyright (C) 2013 Joakim Bjørnstad <joakibj@gmail.com> * * Licensed under the GNU General Public License version 2. * Please see the LICENSE file for the license text in verbatim. */ package com.joakibj.tswrdb.rdb.index import com.joakibj...
joakibj/tswrdb
tswrdb-api/src/main/scala/com/joakibj/tswrdb/rdb/index/RdbDataIndexTable.scala
Scala
gpl-2.0
1,911
package com.twitter.zipkin.storage.redis import scala.collection.immutable.List import com.twitter.scrooge.BinaryThriftStructSerializer import com.twitter.zipkin.thriftscala import com.twitter.zipkin.conversions.thrift._ import com.twitter.zipkin.common.{Annotation, BinaryAnnotation, Span} class RedisSnappyThriftCod...
jfeltesse-mdsol/zipkin
zipkin-redis/src/test/scala/com/twitter/zipkin/storage/redis/RedisSnappyThriftCodec.scala
Scala
apache-2.0
797
package org.jetbrains.plugins.scala package lang package psi package impl package expr import _root_.com.intellij.psi.util.PsiTreeUtil import psi.ScalaPsiElementImpl import com.intellij.lang.ASTNode import api.expr._ import types.Nothing import lexer.ScalaTokenTypes import types.result.{TypingContext, Failure, Success...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScReturnStmtImpl.scala
Scala
apache-2.0
1,248
package org.cakesolutions.akkapatterns.domain import spray.json._ import org.cakesolutions.akkapatterns.UuidFormats /** * The user record, which stores the identtiy, the username and the password * * @author janmachacek */ case class User(id: UserReference, username: String, hashedPassword: String, ...
anand-singh/akka-patterns
sbt/src/main/scala/org/cakesolutions/akkapatterns/domain/user.scala
Scala
apache-2.0
2,477
package org.json4s import org.specs2.mutable.Specification import org.scalacheck._ import org.scalacheck.Prop.forAllNoShrink import org.specs2.ScalaCheck import org.specs2.matcher.MatchResult object JsonDSLSpec extends Specification with JValueGen with ScalaCheck { ("JSON DSL Specification") should { "build Js...
caiiiycuk/json4s
tests/src/test/scala/org/json4s/JsonDSLSpec.scala
Scala
apache-2.0
1,037
// 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 ...
alcestes/lchannels
benchmarks/src/main/scala/PingPong.scala
Scala
bsd-2-clause
14,702
package ru.yandex.mysqlDiff package vendor.mysql import model._ import script._ import Implicits._ /** MySQL specific ALTER TABLE operations */ // http://dev.mysql.com/doc/refman/5.1/en/alter-table.html object MysqlTableDdlStatement { import TableDdlStatement._ case class ConvertToCharacterSet(name: Str...
hkerem/mysql-diff
src/main/scala/ru/yandex/mysqlDiff/vendor/mysql/mysql-script.scala
Scala
bsd-3-clause
4,908
package net.matthaynes.juicer.web import org.scalatra.test.scalatest.ScalatraFunSuite import org.eclipse.jetty.servlet.ServletHolder class ApiServletTest extends ScalatraFunSuite { val servletHolder = addServlet(classOf[ApiServlet], "/*") def jsonResponse : Boolean = { header("Content-Type") == "applicatio...
matth/juicer
juicer-web/src/test/scala/net/matthaynes/juicer/web/ApiServletTest.scala
Scala
mit
1,327
/* * 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/builders/RepeatEvalObservableSuite.scala
Scala
apache-2.0
2,330
package scalariform.lexer case class TokenType(name: String, isXml: Boolean = false) { def isNewline: Boolean = this == Tokens.NEWLINE || this == Tokens.NEWLINES def isKeyword: Boolean = Tokens.KEYWORDS contains this def isComment: Boolean = Tokens.COMMENTS contains this def isId: Boolean = Tokens.IDS cont...
mdr/scalariform
scalariform/src/main/scala/scalariform/lexer/TokenType.scala
Scala
mit
436
package shop import java.net.URI import akka.actor.{ActorSystem, Props} import akka.cluster.pubsub.DistributedPubSub import akka.cluster.pubsub.DistributedPubSubMediator.Publish import akka.http.scaladsl.Http import akka.http.scaladsl.model._ import akka.http.scaladsl.server.Directives import akka.pattern.ask import ...
apisarek/reactivescala-course
src/main/scala/shop/ProductCatalogService.scala
Scala
mit
3,476
/* * 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/atlas
atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/EurekaSource.scala
Scala
apache-2.0
6,452
package kornell.server.repository import java.util import com.google.web.bindery.autobean.vm.AutoBeanFactorySource import kornell.core.lom._ import kornell.core.util.StringUtils._ import scala.collection.JavaConverters._ import scala.util.Try object LOM { val factory: LOMFactory = AutoBeanFactorySource.create(cla...
Craftware/Kornell
kornell-api/src/main/scala/kornell/server/repository/LOM.scala
Scala
apache-2.0
1,510
package controllers import controllers.Application._ import model.{Level, StatisticEntry} import play.api.libs.json.{JsError, JsSuccess, JsValue} import play.api.mvc.{Action, Controller} import play.modules.reactivemongo.MongoController import reactivemongo.api.Cursor import scala.concurrent.ExecutionContext.Implicits...
Hajtosek/ggEasy
app/controllers/Stats.scala
Scala
apache-2.0
1,360
package code.model import javax.persistence.Entity import java.util.ArrayList import javax.persistence.OneToMany import javax.persistence.FetchType import javax.persistence.CascadeType import code.model.base.CrudExampleBaseModel import org.crudible.core.model.ModelWithRepresentationAndIdentity import javax.persistence...
rehei/crudible
crudible-lift-example/src/main/scala/code/model/Company.scala
Scala
apache-2.0
2,073
package dbtarzan.db.util import java.sql.SQLException object ExceptionToText { def sqlExceptionText(se : SQLException) : String = "SQL exception "+se.getMessage+" with state "+se.getSQLState+" and error code "+se.getErrorCode }
aferrandi/dbtarzan
src/main/scala/dbtarzan/db/util/ExceptionToText.scala
Scala
apache-2.0
240
package org.jetbrains.plugins.scala.lang.typeInference import org.jetbrains.plugins.scala.base.ScalaLightCodeInsightFixtureTestAdapter /** * Created by Anton Yalyshev on 07/09/18. */ class BoundsConformanceTest extends ScalaLightCodeInsightFixtureTestAdapter { def testSCL10029(): Unit = { checkTextHasNoEr...
jastice/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/typeInference/BoundsConformanceTest.scala
Scala
apache-2.0
1,013
package com.seanshubin.templater.domain import java.nio.file.Path case class Configuration(templateDirectory: Path, destinationDirectory: Path, directoryReplacements: Map[Path, Path], textReplacements: Map[String, String], ...
SeanShubin/generate-from-template
domain/src/main/scala/com/seanshubin/templater/domain/Configuration.scala
Scala
unlicense
429
object Test extends dotty.runtime.LegacyApp{ val x = (1 : Byte) match { case 2 => println(2); case 1 => println(1); case _ => println("????"); } }
yusuke2255/dotty
tests/run/matchbytes.scala
Scala
bsd-3-clause
163
package java.io import scala.scalajs.js import scala.annotation.tailrec class ByteArrayOutputStream(initBufSize: Int) extends OutputStream { protected var buf: Array[Byte] = new Array(initBufSize) protected var count: Int = 0 def this() = this(32) override def write(b: Int): Unit = { if (count >= buf....
jmnarloch/scala-js
javalib/src/main/scala/java/io/ByteArrayOutputStream.scala
Scala
bsd-3-clause
1,365
package ml.combust.mleap.runtime.serialization import java.io.{File, FileOutputStream, OutputStream} import java.nio.charset.Charset import ml.combust.mleap.ClassLoaderUtil import ml.combust.mleap.runtime.frame.LeapFrame import resource._ import scala.reflect.ClassTag import scala.util.Try /** * Created by hollin...
combust/mleap
mleap-runtime/src/main/scala/ml/combust/mleap/runtime/serialization/FrameWriter.scala
Scala
apache-2.0
1,440
package com.rikmuld.camping.features.blocks.lantern import com.rikmuld.camping.CampingMod import com.rikmuld.camping.Definitions.Lantern import com.rikmuld.camping.Definitions.Lantern._ import com.rikmuld.corerm.objs.ObjDefinition import com.rikmuld.corerm.objs.blocks.BlockRM import net.minecraft.block.state.IBlockSta...
Rikmuld/MC-Camping
scala/com/rikmuld/camping/features/blocks/lantern/BlockLantern.scala
Scala
gpl-3.0
3,640
/* * 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 ...
fhueske/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/calcite/FlinkRelBuilder.scala
Scala
apache-2.0
6,925
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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 b...
hpe-cct/cct-core
src/main/scala/cogx/compiler/codegenerator/opencl/hyperkernels/Subfields2DHyperKernel.scala
Scala
apache-2.0
5,937
/* * 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. */ // $Id$ package scala package...
martijnhoekstra/scala
src/compiler/scala/tools/nsc/settings/ScalaVersion.scala
Scala
apache-2.0
5,556
package io.react2.scalata.generators /** * @author dbalduini */ class IncrementalGen(start: Int, stop: Int) extends Generator[Int] { var step = start override def one: Int = { val x = step if(x == stop) step = start else step = step + 1 x } }
React2/scalata
src/main/scala/io/react2/scalata/generators/Incremental.scala
Scala
apache-2.0
281
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
dotty-staging/scalatest
scalatest/src/main/scala/org/scalatest/matchers/BeMatcher.scala
Scala
apache-2.0
7,792
/* * Copyright 2018 Analytics Zoo Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
intel-analytics/analytics-zoo
zoo/src/test/scala/com/intel/analytics/zoo/pipeline/api/keras/layers/ExpSpec.scala
Scala
apache-2.0
2,068
package com.twitter.finatra.http.tests.integration.requestscope import com.twitter.conversions.DurationOps._ import com.twitter.finagle.http.Status._ import com.twitter.finagle.http.{Request, Response} import com.twitter.finagle.{Service, SimpleFilter} import com.twitter.finatra.http.filters.ExceptionMappingFilter imp...
twitter/finatra
http-server/src/test/scala/com/twitter/finatra/http/tests/integration/requestscope/RequestScopeFeatureTest.scala
Scala
apache-2.0
4,661
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.scaladsl.api.deser import akka.Done import akka.NotUsed import akka.stream.scaladsl.Source import akka.util.ByteString import com.lightbend.lagom.scaladsl.api.transport._ import play.api.libs.json._ import scala....
rcavalcanti/lagom
service/scaladsl/api/src/main/scala/com/lightbend/lagom/scaladsl/api/deser/MessageSerializer.scala
Scala
apache-2.0
13,987
package im.actor.server.http import java.nio.file.Paths import akka.http.scaladsl.Http import akka.http.scaladsl.model.HttpMethods.{ DELETE, GET, POST } import akka.http.scaladsl.model.StatusCodes._ import akka.http.scaladsl.model._ import akka.http.scaladsl.unmarshalling.PredefinedFromEntityUnmarshallers._ import ak...
lzpfmh/actor-platform
actor-server/actor-tests/src/test/scala/im/actor/server/http/HttpApiFrontendSpec.scala
Scala
mit
19,315
package ui.shader.builder.value import ui.math.Vec2 import ui.shader.builder._ import ui.shader.builder.types._ abstract class GlValue[+T <: GlType] { def toGlsl: String def +[U <: GlType](that: GlValue[U]): GlValue[T] = { GlAdd(this, that) } def -[U <: GlType](that: GlValue[U]): GlValue[T]...
gvatn/play-scalajs-webgl-spark
client/src/main/scala/ui/shader/builder/value/GlValue.scala
Scala
mit
1,327
package BIDMach.models import BIDMat.{Mat,SBMat,CMat,DMat,FMat,IMat,HMat,GMat,GIMat,GSMat,SMat,SDMat} import BIDMat.MatFunctions._ import BIDMat.SciFunctions._ import BIDMat.Solvers._ import BIDMach._ import java.lang.ref._ import jcuda.NativePointerObject import java.lang.Math; /** * Independent Component Analysis,...
bikash/BIDMach
src/main/scala/BIDMach/models/ICA.scala
Scala
bsd-3-clause
12,630
/* * Copyright 2015 The kdtree 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...
hoesler/kdtree
src/main/scala/org/asoem/kdtree/BinaryTreeNode.scala
Scala
apache-2.0
833
package d2 import unfiltered.request.HttpRequest import unfiltered.response.{ContentLength, InternalServerError, ResponseFunction} import scala.concurrent.{ExecutionContext, Future} import scala.util.{Failure, Success} object Async extends Async[Any](PartialFunction.empty) case class Async[B](errorHandler:PartialFu...
shiplog/directives2
src/main/scala/d2/Async.scala
Scala
mit
1,158
package abeel.genometools.faq import java.util.Properties import java.io.File import atk.util.Tool import net.sf.samtools.SAMFileReader import scala.collection.JavaConversions._ import be.abeel.util.FrequencyMap import be.abeel.util.FrequencyMapUtils import abeel.genometools.Main import java.util.HashMap import atk.co...
AbeelLab/genometools
scala/abeel/genometools/faq/Faq2Kmer.scala
Scala
gpl-3.0
2,223
/*********************************************************************** * Copyright (c) 2013-2016 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 ...
nagavallia/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/geohash/GeomDistanceTest.scala
Scala
apache-2.0
2,664
package io.reactors package remote import java.io._ import java.net._ import java.nio._ import org.scalatest.FunSuite import org.scalatest.Matchers import scala.concurrent.Await import scala.concurrent.Promise import scala.concurrent.duration._ class UdpRemoteTest extends FunSuite with Matchers { test("UDP tra...
storm-enroute/reactors
reactors-remote/jvm/src/test/scala/io/reactors/remote/udp-remote-tests.scala
Scala
bsd-3-clause
4,096
package net.ruippeixotog.scalafbp.component.core import scala.concurrent.duration._ import net.ruippeixotog.scalafbp.component.{ AutoTerminateSpec, ComponentSpec } class RunTimeoutSpec extends ComponentSpec with AutoTerminateSpec { sequential val component = RunTimeout "A RunTimeout component" should { ...
ruippeixotog/scalafbp
components/core/src/test/scala/net/ruippeixotog/scalafbp/component/core/RunTimeoutSpec.scala
Scala
mit
1,547
/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
maslovalex/scalate
scalate-core/src/main/scala/org/fusesource/scalate/layout/LayoutStrategy.scala
Scala
apache-2.0
1,486
package com.avast.cactus object CactusParser extends CactusCommonImplicits
avast/cactus
common/src/main/scala/com/avast/cactus/CactusParser.scala
Scala
apache-2.0
76
package cs220 // Need this to implement undo functionality import scala.collection.mutable.Stack object Fan { trait Command { def execute: Unit def undo: Unit } // All about lights: class Light(label: String) { def on = println(s"$label: light turned on") def off = println(s"$label: light tu...
umass-cs-220/week-07-patterns
code/command/src/main/scala/cs220/Fan.scala
Scala
apache-2.0
5,009
package slick /** Generic backend-related code */ package object backend
jkutner/slick
slick/src/main/scala/slick/backend/package.scala
Scala
bsd-2-clause
73
package com.twitter.finagle.httpx.path import com.twitter.finagle.httpx.{Method, ParamMap} import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.scalatest.prop.GeneratorDrivenPropertyChecks import org.scalacheck.Gen import scala.util.Random @RunWith(classOf[JU...
latur19318/finagle
finagle-httpx/src/test/scala/com/twitter/finagle/httpx/path/PathTest.scala
Scala
apache-2.0
6,399
package br.com.uol.plataforma.event.sourcing.store import br.com.uol.plataforma.event.sourcing.state.BankAccount /** * @author Gabriel Francisco <peo_gfsilva@uolinc.com> */ object BankAccountEventStore { implicit val eventStore: EventStore[BankAccount] = new InMemoryEventStore[BankAccount] }
gabfssilva/event-sourcing-sample
src/main/scala/br/com/uol/plataforma/event/sourcing/store/BankAccountEventStore.scala
Scala
mit
301
package tyler.breakout abstract class MovableGameState(val pos: ImmutableVector2f, val vel: ImmutableVector2f) { def left: Float def right: Float def top: Float def bottom: Float def projLeft(t:Long) = left + t * vel.x def projRight(t:Long) = right + t * vel.x def projTop(t:Long) = top + t * vel.y def...
DaveTCode/BreakoutGameScala
src/main/scala/tyler/breakout/MovableGameState.scala
Scala
mit
362
package org.jetbrains.plugins.scala.lang.psi.impl.base.types import org.jetbrains.plugins.scala.lang.psi.api.base.types._ import org.jetbrains.plugins.scala.lang.psi.ScalaPsiElementImpl import com.intellij.lang.ASTNode import org.jetbrains.plugins.scala.lang.TokenSets import org.jetbrains.plugins.scala.JavaArrayFactor...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/base/types/ScTypeArgsImpl.scala
Scala
apache-2.0
1,378
/* * This file is part of eCobertura. * * Copyright (c) 2009, 2010 Joachim Hofer * All rights reserved. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/le...
jmhofer/eCobertura
ecobertura.ui/src/test/scala/ecobertura/ui/annotation/CoverageAnnotationTest.scala
Scala
epl-1.0
1,231
package net.javachallenge.entity import net.javachallenge.api.GameSettingBuilder import scala.collection.JavaConverters._ /** * @constructor * @param initialMaterials the quantity of material owned by players when starting the game. */ @SerialVersionUID(0l) case class GameSetting(val maxRound: Int = 200, val initi...
AI-comp/JavaChallenge2012
src/main/scala/net/javachallenge/entity/GameSetting.scala
Scala
apache-2.0
2,547
import sbt._ import Keys._ object Ymetrika extends Build { lazy val project = Project("yandex-metrika", file(".")) settings (buildSettings: _*) lazy val buildSettings: Seq[Setting[_]] = ( projectSettings ++ dependencySettings ++ resolversSettings ++ publishSettings) lazy val projectSettings: Seq[Setting[_...
krispo/yandex-metrika
project/Build.scala
Scala
mit
2,699
/*********************************************************************** * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
jahhulbert-ccri/geomesa
geomesa-arrow/geomesa-arrow-gt/src/main/scala/org/locationtech/geomesa/arrow/io/SimpleFeatureArrowFileWriter.scala
Scala
apache-2.0
4,605
package org.squbs.pattern.validation import com.wix.accord.Validator import spray.routing.Directives._ import spray.routing._ trait ValidationDirectives { def validate(magnet: ValidationMagnet) = magnet() } // Later on we can rename it to squbsDirectives, when we have more maybe ? object ValidationDirectives exten...
keshin/squbs
squbs-pattern/src/main/scala/org/squbs/pattern/validation/ValidationDirectives.scala
Scala
apache-2.0
948
package org.jetbrains.plugins.scala package lang package psi package impl package statements import com.intellij.lang.ASTNode import com.intellij.psi.PsiElementVisitor import org.jetbrains.plugins.scala.lang.parser.ScalaElementTypes._ import org.jetbrains.plugins.scala.lang.psi.api.ScalaElementVisitor import org.jetbr...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/statements/ScValueDeclarationImpl.scala
Scala
apache-2.0
2,007
package metaconfig case class Foo(a: Option[String]) object Foo { implicit val reader: ConfDecoder[Foo] = ConfDecoder.instance[Foo] { case obj: Conf.Obj => obj.getOption[String]("a").map(Foo(_)) } } class ConfOptionSuite extends munit.FunSuite { import Conf._ test("simple") { val conf...
olafurpg/metaconfig
metaconfig-tests/shared/src/test/scala/metaconfig/ConfOptionSuite.scala
Scala
apache-2.0
605
import scala.collection.JavaConverters._ import org.infinispan.manager.DefaultCacheManager object InfinispanCacheKeys { def main(args: Array[String]): Unit = { val manager = new DefaultCacheManager("infinispan.xml") try { val cache = manager.getCache[String, String]() (1 to 10) foreach { i => ...
kazuhira-r/infinispan-examples
infinispan-cache-keys/src/main/scala/InfinispanCacheKeys.scala
Scala
mit
1,074
package io.transwarp.midas.constant.midas.params.xgboost /** * Created by endy on 16-12-23. */ object LinearBoosterParams { val Lambda = "lambda" val Alpha = "alpha" val LambdaBias = "lambdaBias" }
transwarpio/rapidminer
api-driver/src/main/scala/io/transwarp/midas/constant/midas/params/xgboost/LinearBoosterParams.scala
Scala
gpl-3.0
209
package com.gopivotal.sutils package object syntax extends Syntaxes
pivotalsoftware/sutils
sutils-core/src/main/scala/com/gopivotal/sutils/syntax/package.scala
Scala
apache-2.0
69
package sri.web.examples.routerexample import sri.universal.components._ import sri.web.all._ import sri.web.styles.WebStyleSheet object HomeScreen { val Component = () => { View(style = styles.container)( Text(style = styles.text)("Home Screen") ) } object styles extends WebStyleSheet { va...
hamazy/sri
web-examples/src/main/scala/sri/web/examples/routerexample/HomeScreen.scala
Scala
apache-2.0
545
package strd.util import com.escalatesoft.subcut.inject.{BindingModule, Injectable} import com.twitter.ostrich.admin.Service import org.apache.curator.framework.{CuratorFramework, CuratorFrameworkFactory} import org.apache.curator.retry.RetryNTimes import org.apache.curator.utils.ZKPaths import strd.common.ExZookeeper...
onerinvestments/strd
strd-commons/src/main/scala/strd/util/ZkUtils.scala
Scala
apache-2.0
3,110
/* * Part of NDLA article-api. * Copyright (C) 2019 NDLA * * See LICENSE * */ package db.migration import no.ndla.articleapi.ArticleApiProperties import org.flywaydb.core.api.migration.{BaseJavaMigration, Context} import org.json4s.DefaultFormats import org.json4s.JsonAST.{JArray, JObject, JString} import org.js...
NDLANO/article-api
src/main/scala/db/migration/V22__UpdateH5PDomainForFFVisualElement.scala
Scala
gpl-3.0
3,078
/** * 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...
kavink92/kafka-0.8.0-beta1-src
core/src/main/scala/kafka/client/ClientUtils.scala
Scala
apache-2.0
4,519
/* * 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 ...
kimoonkim/spark
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/kubernetes/SSLUtils.scala
Scala
apache-2.0
5,073
/* 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-core/src/test/scala/com/twitter/scalding/BlockJoinTest.scala
Scala
apache-2.0
3,364
/* * 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 ...
ksattler/piglet
src/main/scala/dbis/pig/plan/PrettyPrinter.scala
Scala
apache-2.0
1,244
package functionalops.systemz import scalaz._ import Scalaz._ trait CoreClasses extends CoreTypes { // TODO Define typeclasses here (not instances) }
functionalops/systemz
core/src/main/scala/functionalops/classes.scala
Scala
bsd-3-clause
154
/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package swave.core.impl import scala.annotation.tailrec import swave.core.Stage private[impl] object GraphTr...
sirthias/swave
core/src/main/scala/swave/core/impl/GraphTraverser.scala
Scala
mpl-2.0
2,278
package artificialIntelligence.botBuild import utils.SetInt /** * Created by yuJieShui on 2016/1/1. */ object SavePrincess2 { SetInt( """ |5 |2 3 |----- |----- |p--m- |----- |----- """.stripMargin) case class Point(yy: Int, xx: Int) def main(args: Array[...
1178615156/hackerrank
src/main/scala/artificialIntelligence/botBuild/SavePrincess2.scala
Scala
apache-2.0
1,953
/* * 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 ...
ueshin/apache-flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/nodes/physical/stream/StreamExecDataStreamScan.scala
Scala
apache-2.0
2,759