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.wavesplatform.lang.v1.traits.domain import com.wavesplatform.common.state.ByteStr import com.wavesplatform.lang.v1.compiler.Terms.EVALUATED import com.wavesplatform.lang.v1.traits.domain.{Burn => BurnAction} case class TransferItem(recipient: Recipient, amount: Long) sealed trait Tx sealed trait PseudoTx...
wavesplatform/Waves
lang/shared/src/main/scala/com/wavesplatform/lang/v1/traits/domain/Tx.scala
Scala
mit
3,452
/* * 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
marklogicIt/src/test/scala/quasar/physical/marklogic/testing.scala
Scala
apache-2.0
2,274
/* * 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 ...
u2009cf/spark-radar
sql/core/src/main/scala/org/apache/spark/sql/functions.scala
Scala
apache-2.0
101,771
/* 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 law or agreed to in writing, software distr...
tglstory/scalding
scalding-core/src/main/scala/com/twitter/scalding/PipeDebug.scala
Scala
apache-2.0
1,839
package chat.tox.antox.utils object Location { final val Origin = Location(0, 0) } case class Location(x: Int, y: Int)
wiiam/Antox
app/src/main/scala/chat/tox/antox/utils/Location.scala
Scala
gpl-3.0
123
package models.street import models.utils.MyPostgresDriver.simple._ import play.api.Play.current case class StreetEdgeParentEdge(streetEdgeId: Int, parentEdgeId: Int) class StreetEdgeParentEdgeTable(tag: Tag) extends Table[StreetEdgeParentEdge](tag, Some("sidewalk"), "street_edge_parent_edge") { def streetEdgeId ...
danZzyy/SidewalkWebpage
sidewalk-webpage/app/models/street/StreetEdgeParentEdgeTable.scala
Scala
mit
1,427
/* * 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 ...
sgururajshetty/carbondata
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/createTable/TestNonTransactionalCarbonTableForMapType.scala
Scala
apache-2.0
19,286
package com.bwsw.tstreamstransactionserver.netty.server.handler import com.bwsw.tstreamstransactionserver.netty.Descriptors._ import com.bwsw.tstreamstransactionserver.netty.server.{OrderedExecutionPool, TransactionServer} import com.bwsw.tstreamstransactionserver.netty.server.commitLogService.ScheduledCommitLog impor...
bwsw/tstreams-transaction-server
src/main/scala/com/bwsw/tstreamstransactionserver/netty/server/handler/RequestHandlerChooser.scala
Scala
apache-2.0
5,088
/* Copyright 2009 David Hall, Daniel Ramage 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 writi...
MLnick/scalanlp-core
data/src/main/scala/scalanlp/text/HTML.scala
Scala
apache-2.0
6,719
/* * Copyright (c) 2017 Magomed Abdurakhmanov, Hypertino * 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 com.hypertino.facade.workers import akka.ac...
hypertino/hyperfacade
src/main/scala/com/hypertino/facade/workers/HttpWorker.scala
Scala
mpl-2.0
1,540
package io.flow.delta.actors import java.util.UUID import actors.RollbarActor import akka.actor.{Actor, ActorLogging, ActorRef, ActorSystem, PoisonPill, Props} import com.typesafe.config.Config import db.{BuildsDao, ConfigsDao, DashboardBuildsDao, EventsDao, ItemsDao, ProjectsDao} import io.flow.akka.SafeReceive impo...
flowcommerce/delta
api/app/actors/MainActor.scala
Scala
mit
14,419
package core.api import java.util import java.util.Date import com.lvxingpai.model.account.{ RealNameInfo, UserInfo } import com.lvxingpai.model.marketplace.misc.Coupon import com.lvxingpai.model.marketplace.order.{ Order, OrderActivity } import com.lvxingpai.model.marketplace.product.{ EmbeddedCommodity, Commodity, ...
Lvxingpai/Hanse
app/core/api/CommodityAPI.scala
Scala
apache-2.0
15,793
package com.sksamuel.elastic4s.searches.queries.funcscorer import org.elasticsearch.index.query.functionscore.{ScoreFunctionBuilder, ScoreFunctionBuilders} object ScoreFunctionBuilderFn { def apply(func: ScoreFunctionDefinition): ScoreFunctionBuilder[_] = { func match { case exp: ExponentialDecayScoreDefi...
tyth/elastic4s
elastic4s-tcp/src/main/scala/com/sksamuel/elastic4s/searches/queries/funcscorer/ScoreFunctionBuilderFn.scala
Scala
apache-2.0
876
package json.schema import java.net.{URI, URISyntaxException} import argonaut.Argonaut._ import argonaut.{ACursor, HCursor, Json} import json.pointer.JsonPointer import json.reference.ReferenceResolver import json.util.ArgonautTraverse import scala.util.control.Exception import scalaz.{\\/, Kleisli, State} package ...
VoxSupplyChain/json-schema-parser
src/main/scala/json/schema/scope/package.scala
Scala
apache-2.0
2,591
package epic.normalizing import breeze.config.CommandLineParser import epic.trees.{AnnotatedLabel, TreeInstance, ProcessedTreebank} /** * Created by mrabinovich on 2/23/2015. */ object ExtractNormalizers extends App { def sentenceIsTooLong(p: TreeInstance[AnnotatedLabel, String], maxLength: Int): Boolean = { ...
maxim-rabinovich/epic
src/main/scala/epic/normalizing/ExtractNormalizers.scala
Scala
apache-2.0
1,418
package scamr.mapreduce.mapper import org.apache.hadoop.conf.Configuration import org.apache.hadoop.mapreduce.Mapper import scamr.io.SerializableFunction2 import scamr.mapreduce.lambda.LambdaMapContext // Note: Much of this class was copied from Jonathan Clark's Scadoop project (https://github.com/jhclark/scadoop) cl...
ooyala/scamr
src/main/scala/scamr/mapreduce/mapper/LambdaMapper.scala
Scala
apache-2.0
1,836
package benchmarks import scala.util.continuations._ import continuations.Generators._ class ScalaGenerator extends Fibonacci { val gen = generator { def fib(s0 : Int, s1 : Int) : Unit @Gen[Int] = { yld(s0) fib(s1, s0+s1) } fib(0, 1) } def exercise = { for(i <- 0 until 10) ...
milessabin/scala-cont-jvm-coro-talk
src/benchmarks/ScalaGenerator.scala
Scala
apache-2.0
487
// original report def foo(opt: Option[Tuple.Tail[NonEmptyTuple]]): Unit = opt match case None => ??? case Some(a) => ??? // again with a mini-Tuple with the extra NonEmptyTupExtra parent, to test transitivity object WithExtraParent: sealed trait Tup object Tup { type Tail[X <: NonEmptyTup] <: Tup ...
dotty-staging/dotty
tests/patmat/i13189.scala
Scala
apache-2.0
2,033
/* * Copyright (C) 2007 Lalit Pant <pant.lalit@gmail.com> * * The contents of this file are subject to the GNU General Public License * Version 3 (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.gnu.org/copyleft/gpl.html * ...
milliondreams/jiva-ng
src/main/scala/net/kogics/jiva/evolution/GaEvolver.scala
Scala
gpl-3.0
2,333
package hclu.hreg.service.email import hclu.hreg.service.email.sender.EmailDescription import hclu.hreg.service.templates.EmailContentWithSubject import com.typesafe.scalalogging.LazyLogging import scala.collection.mutable.ListBuffer import scala.concurrent.Future class DummyEmailService extends EmailService with La...
tsechov/hclu-registry
backend/src/main/scala/hclu/hreg/service/email/DummyEmailService.scala
Scala
apache-2.0
1,115
package cobalt.parser.statement import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.{FunSpec, Matchers} @RunWith(classOf[JUnitRunner]) class MatchParserTest extends FunSpec with Matchers { /* TODO let codeMatch = unlines [ "match obj with" , ...
Michael2109/cobalt
src/test/scala/cobalt/parser/statement/MatchParserTest.scala
Scala
lgpl-3.0
969
package com.sksamuel.scapegoat.inspections import com.sksamuel.scapegoat.PluginRunner import org.scalatest.{FreeSpec, Matchers} /** @author Stephen Samuel */ class EitherGetTest extends FreeSpec with ASTSugar with Matchers with PluginRunner { override val inspections = Seq(new EitherGet) "either right / left pr...
RichardBradley/scapegoat
src/test/scala/com/sksamuel/scapegoat/inspections/EitherGetTest.scala
Scala
apache-2.0
713
package breeze.stats.distributions import org.scalatest.FunSuite import org.scalatest.prop.Checkers import org.scalacheck.{Prop, Arbitrary} import scala.reflect.ClassTag /** * * @author dlwh */ trait ExpFamTest[D<:Density[T] with Rand[T],T] extends FunSuite with Checkers { val expFam: ExponentialFamily[D,T] i...
ktakagaki/breeze
src/test/scala/breeze/stats/distributions/ExpFamTest.scala
Scala
apache-2.0
1,276
package com.company.project import _root_.junit.framework.TestCase class HelloWorldTest extends TestCase { def test(): Unit = { assert(1 == 1) } }
sdmoralesma/javalab
scala-gradle/src/test/scala/com/company/project/HelloWorldTest.scala
Scala
mit
167
/* * 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 ...
guoxiaolongzte/spark
core/src/test/scala/org/apache/spark/scheduler/TaskContextSuite.scala
Scala
apache-2.0
14,330
package com.github.takashabe.isucon_internal /** * ベンチマーク対象の設定を管理する */ class Config( val scheme: String, val host: String, port: Int, val agent: String, runningTime: Int) { val MaxRunningTime: Int = 3 * 60 * 1000 // GET/POSTリクエストのタイムアウト値 val GetTimeout: Int = 30 * 1000 val PostTimeout: Int = 30 ...
takashabe/isucon_internal
bench/src/main/scala/com/github/takashabe/isucon_internal/Config.scala
Scala
mit
855
package org.scalaide.ui.internal.editor.outline import org.eclipse.jface.text.information.IInformationProvider import org.eclipse.jface.text.information.IInformationProviderExtension import org.scalaide.ui.internal.editor.ScalaCompilationUnitEditor import org.eclipse.jdt.internal.ui.text.JavaWordFinder import org.eclip...
dragos/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/ui/internal/editor/outline/ScalaOutlineModelProvider.scala
Scala
bsd-3-clause
1,371
import scala.tools.partest.ReplTest object Test extends ReplTest { override def extraSettings = "-deprecation" def code = """ '\\060' def foo() { } """.trim }
martijnhoekstra/scala
test/files/run/repl-errors.scala
Scala
apache-2.0
166
package org.jetbrains.plugins.scala package lang package psi package stubs package impl import com.intellij.psi.PsiElement import com.intellij.psi.stubs.{IStubElementType, StubElement} import com.intellij.reference.SoftReference import com.intellij.util.io.StringRef import org.jetbrains.plugins.scala.lang.psi.api.bas...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/stubs/impl/ScImportExprStubImpl.scala
Scala
apache-2.0
2,147
import org.apache.jena.fuseki.FusekiCmd object DatabaseRunner extends App { new Thread(new Runnable { override def run(): Unit = { System.setProperty("log4j.configuration", "log4j.properties") new FusekiCmd("--update", "--desc=assemblerA.ttl", "--port=3030", "--jetty-config=./conf/jetty.xml", "/lwm")...
FHK-ADV/lwm
app/DatabaseRunner.scala
Scala
mit
352
package cli /** * Basic cli object that handles the feedback information * for the tweet retrieval. * * Created by @davidelnunes on 06-02-2015. */ class TTConsole extends CLI{ val progressB = {(label:String,p:Double) => { print("\r") ConsoleProgress(label,40,None,None,None)(p) } } var state: St...
davidelnunes/TwitterTools
src/main/scala/cli/TTConsole.scala
Scala
gpl-3.0
1,118
package edu.mit.csail.cap.query package web import util._ import analysis._ import scala.tools.reflect.ToolBoxError import scala.collection.mutable import xml.{ NodeSeq, Elem, Text, Unparsed } import NodeSeq.Empty import analysis.ast._ object Render { private var ID = 0L def makeID: Long = { ID = ID + 1 I...
kyessenov/semeru
src/main/scala/web/Render.scala
Scala
gpl-3.0
17,253
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this fi...
xjrk58/elasticsearch-hadoop
spark/sql-20/src/main/scala/org/elasticsearch/spark/sql/EsDataFrameWriter.scala
Scala
apache-2.0
1,874
/** * Copyright (C) 2016 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 p...
orbeon/orbeon-forms
form-builder/js/src/test/scala/org/orbeon/oxf/fb/ClientGridTest.scala
Scala
lgpl-2.1
5,018
package com.twitter.algebird import com.twitter.algebird.BaseProperties._ import com.twitter.algebird.scalacheck.arbitrary._ import com.twitter.algebird.scalacheck.NonEmptyVector import org.scalacheck.Arbitrary import org.scalacheck.Prop.forAll class AveragedValueLaws extends CheckProperties { def avg[T](v: Vector[...
nevillelyh/algebird
algebird-test/src/test/scala/com/twitter/algebird/AveragedValueLaws.scala
Scala
apache-2.0
2,184
/* * @author Philip Stutz * * Copyright 2012 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.0 * * U...
gmazlami/dcop-maxsum
src/main/scala/com/signalcollect/interfaces/Coordinator.scala
Scala
apache-2.0
1,235
/* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/fset-faststream
app/model/testdata/CreateAdminData.scala
Scala
apache-2.0
3,337
/* * Copyright 2012-2015 Comcast Cable Communications Management, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless re...
ipapa/money
money-core/src/main/scala/com/comcast/money/emitters/LogRecorder.scala
Scala
apache-2.0
1,498
package org.bitcoins.marshallers.script import org.bitcoins.script.constant._ import org.bitcoins.script.crypto.OP_CHECKMULTISIG import org.bitcoins.util.TestUtil import org.scalatest.FlatSpec import org.scalatest.MustMatchers import org.bitcoins.protocol.script.ScriptSignature import spray.json._ import DefaultJsonP...
Christewart/scalacoin
src/test/scala/org/bitcoins/marshallers/script/ScriptSignatureMarshallerTest.scala
Scala
mit
2,342
package com.chatwork.quiz.collection import com.chatwork.quiz.{ MySome, MyNone } import org.scalatest.{ FunSpec, Matchers } class MyListSpec extends FunSpec with Matchers { describe("MyList#apply") { it("should return a new MyList instance") { MyList(1, 2, 3) shouldEqual MyCons(1, MyCons(2, MyCons(3, MyN...
kazzna/scala-quiz
src/test/scala/com/chatwork/quiz/collection/MyListSpec.scala
Scala
mit
3,241
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); yo...
GabrielNicolasAvellaneda/kafka
core/src/main/scala/kafka/server/KafkaConfig.scala
Scala
apache-2.0
64,618
package com.twitter.inject.thrift import com.twitter.finagle.stats.StatsReceiver import com.twitter.inject.Injector import com.twitter.scrooge.ThriftMethod import javax.inject.Inject class FilterBuilder @Inject()( injector: Injector, statsReceiver: StatsReceiver) { def method(method: ThriftMethod): ThriftClien...
joecwu/finatra
inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/FilterBuilder.scala
Scala
apache-2.0
464
/* * Copyright (c) 2008, Michael Pradel * All rights reserved. See LICENSE for details. */ package applications import collaborations._ object Decorator { trait VisualComponent { def draw } trait TextView extends VisualComponent { var text = "abc" override def draw = println(text) } def ...
tupshin/Scala-Roles
examples/applications/Decorator.scala
Scala
bsd-3-clause
587
/* * ****************************************************************************** * * Copyright (C) 2013 Christopher Harris (Itszuvalex) * * Itszuvalex@gmail.com * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * * as p...
Itszuvalex/Femtocraft-alpha-1
src/main/java/com/itszuvalex/femtocraft/power/blocks/BlockCryoEndothermalChargingCoil.scala
Scala
gpl-2.0
3,720
// // Copyright 2020 Paytronix Systems, 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 o...
paytronix/utils-open
interchange/base/src/main/scala/com/paytronix/utils/interchange/format/string/javatime.scala
Scala
apache-2.0
1,241
/*********************************************************************** * 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 ...
mdzimmerman/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/data/AccumuloFeatureStore.scala
Scala
apache-2.0
4,755
/** * Copyright 2016, deepsense.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
deeplang/src/main/scala/io/deepsense/deeplang/documentation/SparkOperationDocumentation.scala
Scala
apache-2.0
1,347
package com.identityblitz.jwt import org.scalatest.{Matchers, FlatSpec} import java.lang.IllegalArgumentException object BaseJwtToolkit extends AlgorithmsKit with JwsToolkit with SimpleCryptoService with SimpleKidsRegisterService { override def extensionsNames: Set[String] = Set("exp") } class JwsTest extends Flat...
brainysmith/json-lib
src/test/scala/com/identityblitz/jwt/JwsTest.scala
Scala
mit
7,633
package com.sksamuel.avro4s.record.decoder import com.sksamuel.avro4s._ import org.apache.avro.util.Utf8 import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import scala.collection.JavaConverters._ class MapDecoderTest extends AnyWordSpec with Matchers { "Decoder" should { "...
sksamuel/avro4s
avro4s-core/src/test/scala/com/sksamuel/avro4s/record/decoder/MapDecoderTest.scala
Scala
apache-2.0
2,064
package net.fwbrasil.radon.util import org.specs2.mutable._ import net.fwbrasil.radon.dsl.actor._ import org.junit.runner._ import org.specs2.runner._ @RunWith(classOf[JUnitRunner]) class ExclusiveThreadLocalSpecs extends Specification { class Dummy extends ExclusiveThreadLocalItem "An exclusive...
fwbrasil/radon-stm
src/test/scala/net/fwbrasil/radon/util/ExclusiveThreadLocalSpecs.scala
Scala
lgpl-2.1
3,136
package helpers import helpers.ExtLong.BitSet import org.junit.runner._ import org.specs2.mutable._ import org.specs2.runner._ import play.api.libs.json.Json @RunWith(classOf[JUnitRunner]) class ExtLongSpec extends Specification { "BitSet" can { "be converted to Json" in { val bitSet: BitSet = BitSet((1...
lizepeng/app.io
modules/models/test/helpers/ExtLongSpec.scala
Scala
apache-2.0
1,526
/* * Copyright 2013 Maurício Linhares * * Maurício Linhares licenses this file to you under the Apache License, * version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
outbrain/postgresql-async
mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/util/CharsetMapper.scala
Scala
apache-2.0
1,607
/*********************************************************************** * 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...
ddseapy/geomesa
geomesa-bigtable/geomesa-bigtable-datastore/src/test/scala/org/locationtech/geomesa/bigtable/BigTableIntegrationTest.scala
Scala
apache-2.0
6,052
package com.overviewdocs.ingest.model case class PendingProcessTask( writtenFile2: WrittenFile2, stepKey: String )
overview/overview-server
worker/src/main/scala/com/overviewdocs/ingest/model/PendingProcessTask.scala
Scala
agpl-3.0
120
/* * 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 ...
akuznetsov-gridgain/ignite
modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommandSpec.scala
Scala
apache-2.0
4,601
package io.github.binaryfoo.gclog import org.joda.time.DateTime /** * Adds bytes allocated since last event, allocation rate per millisecond */ case class GCEventWithRates(base: GCEvent, bytesAllocatedSinceLastEvent: Long, millisSinceLastEvent: Long) extends...
binaryfoo/gclog-parser
src/main/scala/io/github/binaryfoo/gclog/GCEventWithRates.scala
Scala
mit
1,519
package almhirt.i18n.text import org.scalatest._ class WordBreakIteratorTests extends FunSuite with Matchers { test("""It should deliver [0] for """"") { val iter = BreakIterator.wordInstance("", "de") iter.toList should equal(List(0)) } test("""It should deliver [0,1] for "a"""") { val iter = B...
chridou/almhirt
almhirt-i18n/src/test/scala/almhirt/i18n/text/WordBreakIteratorTests.scala
Scala
apache-2.0
568
package org.aja.tej.examples.streaming.twitter import com.google.gson.Gson import org.aja.tej.utils.{TejUtils, TejTwitterUtils} import org.anormcypher.{Cypher, Neo4jREST} import org.apache.spark.sql.{AnalysisException, Row, SQLContext} import org.apache.spark.streaming.twitter.TwitterUtils import org.apache.spark.stre...
Mageswaran1989/aja
src/examples/scala/org/aja/tej/examples/streaming/twitter/TwitterWithNeo4j.scala
Scala
apache-2.0
21,820
/* * 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-cache/oap/src/main/scala/org/apache/spark/sql/execution/datasources/ExternalDBClientFactory.scala
Scala
apache-2.0
1,539
/* * ElementCollection.scala * Element collections. * * Created By: Avi Pfeffer (apfeffer@cra.com) * Creation Date: Jan 1, 2009 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email figaro@cra.com for information. * * See http://www.github.com/p2t2/figa...
agarbuno/figaro
Figaro/src/main/scala/com/cra/figaro/language/ElementCollection.scala
Scala
bsd-3-clause
15,089
package <%= packageName %>.json import java.text.SimpleDateFormat import java.util.Date import org.json4s._ class DateSerializer extends CustomSerializer[Date](format => ( { case JString(s) => val df = new SimpleDateFormat("yyyy-MM-dd") new Date(df.parse(s).getTime()) }, { case x: Date => ...
rayokota/generator-angular-scalatra
app/templates/src/main/scala/package/json/_DateSerializer.scala
Scala
mit
403
/* * 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 ...
MrCodeYu/spark
core/src/main/scala/org/apache/spark/shuffle/ShuffleManager.scala
Scala
apache-2.0
3,183
package com.cloudray.scalapress.search import org.scalatest.{OneInstancePerTest, FunSuite} import org.scalatest.mock.MockitoSugar import javax.servlet.http.HttpServletRequest import com.cloudray.scalapress.folder.Folder import com.cloudray.scalapress.search.tag.CorpusResultUrlTag import com.cloudray.scalapress.util.Ur...
vidyacraghav/scalapress
src/test/scala/com/cloudray/scalapress/search/CorpusResultUrlTagTest.scala
Scala
apache-2.0
1,047
/** * Copyright (C) 2012 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...
orbeon/orbeon-forms
src/main/scala/org/orbeon/oxf/processor/converter/PlainXHTMLConverter.scala
Scala
lgpl-2.1
2,298
package cz.jenda.pidifrky.data.pojo import android.database.Cursor import android.location.Location import android.net.Uri import cz.jenda.pidifrky.data.CardTiles import cz.jenda.pidifrky.logic.map.{CardMapMarker, MapMarker} import cz.jenda.pidifrky.logic.{Application, ImageHandler} import cz.jenda.pidifrky.ui.api.Bas...
jendakol/pidifrky
client/src/main/scala/cz/jenda/pidifrky/data/pojo/Card.scala
Scala
apache-2.0
2,627
package funsets import common._ /** * 2. Purely Functional Sets. */ object FunSets { /** * We represent a set by its characteristic function, i.e. * its `contains` predicate. */ type Set = Int => Boolean /** * Indicates whether a set contains a given element. */ def contains(s: Set, e...
dawid-swist/discover-scala
Coursera/Progfun1/Week2/src/main/scala/funsets/FunSets.scala
Scala
gpl-3.0
2,229
package org.jetbrains.plugins.scala.lang.psi.types.api import com.intellij.psi.PsiTypeParameter import org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil.getPsiElementId import org.jetbrains.plugins.scala.lang.psi.api.statements.params.ScTypeParam import org.jetbrains.plugins.scala.lang.psi.impl.ScalaPsiManager import ...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/types/api/TypeParameterType.scala
Scala
apache-2.0
5,439
/** * Copyright (c) 2013 Bernard Leach * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publ...
leachbj/hsm-emulator
hsmsim-akka/src/main/scala/org/leachbj/hsmsim/commands/ImportDesKey.scala
Scala
mit
6,844
package com.github.acrisci.commander private class Opt(var flags: String, var description: String, var default: Any = null, var required: Boolean = false, var fn: String => Any = identity) { var paramRequired: Boolean = flags.contains("<") var paramOptional: Boolean = flags.contains("[") private val flagsList = ...
acrisci/commander-scala
src/main/scala/com/github/acrisci/commander/Opt.scala
Scala
mit
1,021
/* * 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/Partition.scala
Scala
apache-2.0
1,242
package org.scalaide.core.testsetup import java.util.concurrent.CountDownLatch import org.eclipse.core.runtime.IProgressMonitor import org.eclipse.core.runtime.NullProgressMonitor object BlockingProgressMonitor { class CancellationException extends RuntimeException("Operation cancelled") /** * Executes the g...
Kwestor/scala-ide
org.scala-ide.sdt.core.tests/src/org/scalaide/core/testsetup/BlockingProgressMonitor.scala
Scala
bsd-3-clause
1,197
/* * Copyright (c) 2012 - 2020 Splice Machine, Inc. * * This file is part of Splice Machine. * Splice Machine is free software: you can redistribute it and/or modify it under the terms of the * GNU Affero General Public License as published by the Free Software Foundation, either * version 3, or (at your option) ...
splicemachine/spliceengine
splice_spark/src/main/spark2.1/com/splicemachine/spark/splicemachine/SplicemachineContext.scala
Scala
agpl-3.0
28,709
package com.github.rzykov.fastml4j.metric import com.github.rzykov.fastml4j.classification.ClassificationModel import com.github.rzykov.fastml4j.util.Implicits._ import org.nd4j.linalg.api.ndarray.INDArray import org.nd4j.linalg.dataset.DataSet import org.nd4j.linalg.factory.Nd4j /** * Calculates binary classificat...
rzykov/fastml4j
src/main/scala/com/github/rzykov/fastml4j/metric/BinaryClassificationMetrics.scala
Scala
apache-2.0
4,512
package org.gilbertlang.runtime import org.apache.mahout.math.{Matrix, MatrixWritable, VectorWritable, Vector} package object spark { implicit def v2Writable(v: Vector): VectorWritable = new VectorWritable(v) implicit def m2Writable(m: Matrix): MatrixWritable = new MatrixWritable(m) implicit def vw2v(vw: Vect...
sscdotopen/gilbert
src/main/scala/org/gilbertlang/runtime/spark/package.scala
Scala
gpl-3.0
412
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.2 * @date Mon Oct 22 17:15:33 EDT 2012 * @see LICENSE (MIT style license file). */ // U N D E R D E V E L O P M E N T package apps.optimization import math.{min, sqrt} import scala...
scalation/fda
scalation_1.2/src/main/scala/apps/optimization/PortfolioOpt.scala
Scala
mit
4,010
package dotty.tools package dotc package reporting import scala.annotation.internal.sharable import core.Contexts._ import core.TypeError import util.{SourcePosition, NoSourcePosition} import core.Decorators.PhaseListDecorator import collection.mutable import core.Mode import dotty.tools.dotc.core.Symbols.{Symbol, No...
som-snytt/dotty
compiler/src/dotty/tools/dotc/reporting/Reporter.scala
Scala
apache-2.0
11,733
package org.hammerlab.guacamole /** * Commands (such as variant callers) that can be invoked on the command line. */ package object commands {}
bikash/guacamole
src/main/scala/org/hammerlab/guacamole/commands/package.scala
Scala
apache-2.0
147
package porteurbars import java.io.{ File, FileInputStream, InputStream } import java.net.URL import java.nio.charset.Charset @annotation.implicitNotFound( msg = "porteurbars.Source[T] type class instance for type ${T} not found") trait Source[T] { def contents(in: T): String } /** definitions of various kinds o...
softprops/docker-porteurbars
src/main/scala/Source.scala
Scala
mit
1,621
/* * comma, A Code Measurement and Analysis Tool * Copyright (C) 2010-2015 Steffen Kram * * 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 op...
stefri/jqassistant-plugin-javasrc
src/main/scala/de/uniulm/iai/comma/model/ArtifactType.scala
Scala
gpl-3.0
2,256
package com.wbillingsley.handyplay import java.util.NoSuchElementException import play.api.libs.json.Json import play.api.mvc._ import com.wbillingsley.handy.{Ref, RefSome, RefOpt, Approval} import Ref._ import scala.concurrent.{ExecutionContext, Future} import scala.language.implicitConversions case class Appbase[U...
wbillingsley/handy
handy-play/src/main/scala/com/wbillingsley/handyplay/AppbaseRequest.scala
Scala
mit
1,965
object Main { def main(args: Array[String]) { var bool1 = true && false || true; // true var bool2 = true && (false || true); // true var bool3 = true && ! true; // false var b = ! (bool1 && ! (bool2 || bool3)); // true if (b) print("OK\\n") } }
tobast/compil-petitscala
tests/exec/bool.scala
Scala
gpl-3.0
272
package chandu0101.scalajs.react.components package materialui import chandu0101.macros.tojs.JSMacro import japgolly.scalajs.react._ import japgolly.scalajs.react.raw.React import japgolly.scalajs.react.vdom.VdomNode import scala.scalajs.js /** * This file is generated - submit issues instead of PR against it */...
rleibman/scalajs-react-components
core/src/main/scala/chandu0101/scalajs/react/components/materialui/MuiTimePicker.scala
Scala
apache-2.0
9,400
package service import base.TestBaseDefinition import org.joda.time.LocalDate import org.scalatest.{OptionValues, WordSpec} import service.actor.NaturalDescribableYear class NaturalDescribableYearSpec extends WordSpec with TestBaseDefinition with OptionValues { import service.actor.NaturalDescribableYear._ "A N...
THK-ADV/lwm-reloaded
test/service/NaturalDescribableYearSpec.scala
Scala
mit
1,403
/* * Copyright 1998-2016 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...
kloun/lorsource
src/main/scala/ru/org/linux/user/UserService.scala
Scala
apache-2.0
6,350
package models.services import java.util.UUID import javax.inject.Inject import com.mohiva.play.silhouette.api.LoginInfo import com.mohiva.play.silhouette.impl.providers.CommonSocialProfile import models.User import models.daos.UserDAO import play.api.libs.concurrent.Execution.Implicits._ import scala.concurrent.Fut...
glidester/play-silhouette-seed
app/models/services/UserServiceImpl.scala
Scala
apache-2.0
2,126
package medium import medium.domainObjects._ import spray.json._ object MediumApiProtocol extends DefaultJsonProtocol{ implicit val userFormat = jsonFormat5(User) implicit val postRequestFormat = jsonFormat7(PostRequest) implicit val postFormat = jsonFormat11(Post) }
shekhargulati/52-technologies-in-2016
06-okhttp/medium-scala-client/src/main/scala/medium/MediumApiProtocol.scala
Scala
mit
280
package com.bwsw.cloudstack.pulse.validators.complex import com.bwsw.cloudstack.pulse.validators.Validator import com.bwsw.cloudstack.pulse.validators.primitive.{MACValidator, UUIDValidator} /** * Created by Ivan Kudryavtsev on 28.07.17. */ class NetworkInterfaceRequestValidator extends Validator { override pro...
bwsw/cs-pulse-server
src/main/scala-2.12/com/bwsw/cloudstack/pulse/validators/complex/NetworkInterfaceRequestValidator.scala
Scala
apache-2.0
1,004
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
zzcclp/carbondata
integration/spark/src/main/scala/org/apache/spark/sql/util/SparkTypeConverter.scala
Scala
apache-2.0
6,980
package pkg import java.nio.file.{ Paths, Files } import java.nio.charset.Charset object A extends App { val out = Paths.get("out.txt") val content = sys.props("java.version") val w = Files.newBufferedWriter(out, Charset.forName("UTF-8")) try { w.write(content) w.flush() } finally { w.close } ...
sbt/sbt
sbt-app/src/sbt-test/java/cross/A.scala
Scala
apache-2.0
322
package cromwell.database.slick.tables import java.sql.Clob import cromwell.database.sql.tables.CallCachingSimpletonEntry trait CallCachingSimpletonEntryComponent { this: DriverComponent with CallCachingEntryComponent => import driver.api._ class CallCachingSimpletonEntries(tag: Tag) extends Table[CallC...
ohsu-comp-bio/cromwell
database/sql/src/main/scala/cromwell/database/slick/tables/CallCachingSimpletonEntryComponent.scala
Scala
bsd-3-clause
1,880
package blended.itestsupport.condition.jolokia import akka.testkit.{TestActorRef, TestProbe} import blended.itestsupport.condition.{Condition, ConditionActor} import blended.itestsupport.jolokia.JolokiaAvailableCondition import scala.concurrent.duration._ import blended.itestsupport.condition.ConditionActor.CheckCond...
woq-blended/blended
blended.itestsupport/src/test/scala/blended/itestsupport/condition/jolokia/JolokiaConditionSpec.scala
Scala
apache-2.0
1,816
package net.rrm.ehour.ui.manage.assignment.form import java.util import net.rrm.ehour.AbstractSpringWebAppSpec import net.rrm.ehour.customer.service.CustomerService import net.rrm.ehour.project.service.{ProjectAssignmentService, ProjectService} import net.rrm.ehour.ui.manage.assignment.AssignmentAdminBackingBean impo...
momogentoo/ehour
eHour-wicketweb/src/test/scala/net/rrm/ehour/ui/manage/assignment/form/AssignmentFormComponentContainerPanelSpec.scala
Scala
gpl-2.0
1,636
package com.oni.db //import com.novus.salat._ //import com.novus.salat.dao._ //import com.novus.salat.global._ import salat._ import salat.dao._ import salat.global._ import com.mongodb.casbah.Imports._ import salat.dao.SalatDAO case class Employee(_id:ObjectId = new ObjectId, name: String, age: Option[Int]=None, an...
ObjectNirvana/oni-web
backend/src/main/scala/com/oni/db/EmployeeApp.scala
Scala
epl-1.0
861
package postgresweb.model import io.circe.Json /** * Created by andreaminetti on 23/02/16. */ case class JSONResponse(count:Int, data:Vector[Map[String,Json]])
minettiandrea/postgres-restify
client/src/main/scala/postgresweb/model/JSONResponse.scala
Scala
apache-2.0
165
/* * Copyright (C) 2010 Romain Reuillon * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This progra...
openmole/openmole
openmole/core/org.openmole.core.workspace/src/main/scala/org/openmole/core/workspace/Workspace.scala
Scala
agpl-3.0
2,196
/* * 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 ...
gyfora/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/PythonFunctionCodeGenerator.scala
Scala
apache-2.0
5,006
package com.mdataset.lib.worker.basic.exchange import com.ecfront.common.{JsonHelper, Resp} import com.ecfront.ez.framework.service.eventbus.EventBusProcessor import com.ecfront.ez.framework.service.kafka.KafkaProcessor import com.mdataset.lib.basic.BasicContext import com.mdataset.lib.basic.model.{MdsInsertReqDTO, Md...
MDataSet/mds
modules/lib_worker_basic/src/main/scala/com/mdataset/lib/worker/basic/exchange/MdsDefaultDataExchangeWorker.scala
Scala
apache-2.0
1,364
package models.daos import java.util.{ Date, UUID } import models.TaggingImage import scala.concurrent.Future /** * Created by jlzie on 26.04.2017. */ trait ImageDAO { def create(url: String, thumbnailUrl: Option[String], uploadDate: Date, userId: UUID, height: Int, width: Int, filename: String): Future[Tagging...
SwaggerTagger/octo-tagger-backend
app/models/daos/ImageDAO.scala
Scala
mit
735
/* * Copyright 2014, by Vladimir Kostyukov and Contributors. * * This file is a part of a Finch library that may be found at * * https://github.com/finagle/finch * * Licensed under the Apache License, Version 2.0 (the "License"); * You may not use this file except in compliance with the License. * You may...
trane/finch
jawn/src/test/scala/io/finch/jawn/JawnSpec.scala
Scala
apache-2.0
1,438
package common.schema trait schema
Anydea/RePo
kafkaWork/src/main/scala/common/shema/schema.scala
Scala
apache-2.0
36