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 config.paramconf import config.Conf import scala.collection.mutable /** * 预处理过程使用参数 * * Created by yhao on 2017/3/8. */ class PreprocessParams extends Serializable { val kvMap: mutable.LinkedHashMap[String, String] = Conf.loadConf("../conf/preprocess.properties") val fanjian: String = kvMap.get...
yhao2014/CkoocNLP
ckooc-ml/src/main/scala/config/paramconf/PreprocessParams.scala
Scala
apache-2.0
1,727
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
cloudera/spark
core/src/main/scala/org/apache/spark/api/python/PythonPartitioner.scala
Scala
apache-2.0
2,211
package se.callista.akka.camel import akka.camel.{Consumer, CamelMessage, Producer, AkkaCamelException} import akka.actor.{Props, ActorSystem, Actor } import scala.concurrent.duration._ import util.parsing.json.{JSONObject, JSONArray} import akka.util import akka.actor.Status.Failure class HttpProducer(host: String) ...
parwen68/camel-akka-example
src/main/scala/se/callista/akka/camel/Main.scala
Scala
apache-2.0
2,445
/* * 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 ...
wangmiao1981/spark
resource-managers/yarn/src/test/scala/org/apache/spark/network/yarn/YarnShuffleServiceMetricsSuite.scala
Scala
apache-2.0
4,916
/* * Copyright 2007-2010 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
jeppenejsum/liftweb
framework/lift-modules/lift-widgets/src/test/scala/webapptest/snippet/AutoCompleteDemo.scala
Scala
apache-2.0
1,199
/* * Shadowsocks - A shadowsocks client for Android * Copyright (C) 2014 <[email protected]> * * 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 y...
a642500/shadowsocks-android
src/main/scala/com/github/shadowsocks/BaseService.scala
Scala
gpl-3.0
6,190
package collins.models import org.squeryl.PrimitiveTypeMode._ import org.squeryl.Schema import play.api.libs.json.Format import play.api.libs.json.JsObject import play.api.libs.json.JsSuccess import play.api.libs.json.JsValue import play.api.libs.json.Json import collins.models.cache.Cache import collins.models.shar...
box/collins
app/collins/models/AssetType.scala
Scala
apache-2.0
2,533
package com.mblinn.oo.tinyweb.stepfour import com.mblinn.oo.tinyweb.RenderingException trait View { def render(model: Map[String, List[String]]): String } class FunctionView(viewRenderer: (Map[String, List[String]]) => String) extends View { def render(model: Map[String, List[String]]) = try viewRendere...
pharmpress/codingdojo
dojo-tinyweb/src/main/scala/com/mblinn/oo/tinyweb/stepfour/View.scala
Scala
apache-2.0
406
/* * Copyright 2015 Heiko Seeberger * * 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...
jasonchaffee/akka-sse
akka-sse/src/test/scala/de/heikoseeberger/akkasse/ServerSentEventParserSpec.scala
Scala
apache-2.0
3,610
package org.zouzias.spray.models.responses import spray.json.DefaultJsonProtocol /** * Update Response model */ case class UpdateResponse(name : String, status : String, message: String) object UpdateResponseProtocol extends DefaultJsonProtocol { implicit val updateFormat = jsonFormat3(UpdateResponse) }
zouzias/spray-swagger-template
src/main/scala/org/zouzias/spray/models/responses/UpdateResponse.scala
Scala
apache-2.0
312
package org.wquery.query.exprs import org.wquery.lang._ import org.wquery.lang.exprs._ import org.wquery.lang.operations._ import org.wquery.model._ import org.wquery.query._ import org.wquery.query.operations._ case class EmissionExpr(expr: EvaluableExpr) extends EvaluableExpr { def evaluationPlan(wordNet: WordNet...
marekkubis/wquery
src/main/scala/org/wquery/query/queryExprs.scala
Scala
bsd-3-clause
2,793
/* * Copyright (C) 2016 Christopher Batey and Dogan Narinc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
mikefero/cpp-driver
gtests/src/integration/scassandra/server/server/src/test/scala/org/scassandra/server/priming/routes/CurrentRouteTest.scala
Scala
apache-2.0
5,392
package dotty.tools.dotc package core import Periods._, Contexts._, Symbols._, Denotations._, Names._, NameOps._, Annotations._ import Types._, Flags._, Decorators._, Transformers._, StdNames._, Scopes._ import NameOps._ import Scopes.Scope import collection.mutable import collection.immutable.BitSet import scala.refl...
magarciaEPFL/dotty
src/dotty/tools/dotc/core/SymDenotations.scala
Scala
bsd-3-clause
52,740
package parsing.multi import parsing.multi.Lexer._ import parsing.multi.LookaheadLexer._ /** * Created by hongdi.ren. */ abstract class Lexer(input: String) { var p: Int = 0 var c: Char = input.charAt(p) def consume(): Unit = { p = p + 1 if (p >= input.length) c = EOF else c = input.charAt(p)...
Ryan-Git/LangImplPatterns
src/main/scala/parsing/multi/LookaheadLexer.scala
Scala
apache-2.0
1,883
package pl.msitko.xml.dsl import pl.msitko.xml.BasicSpec import pl.msitko.xml.entities.{Attribute, Element, LabeledElement} import pl.msitko.xml.matchers.{Namespace, PrefixedNamespace} import pl.msitko.xml.optics.{LabeledElementOptics, NodeOptics} import pl.msitko.xml.printing.{Indent, PrinterConfig} import pl.msitko....
note/xml-lens
optics/shared/src/test/scala/pl/msitko/xml/dsl/OpticsBuilderSpec.scala
Scala
mit
15,983
package org.greenrd.seraphim import java.io.{File, PrintWriter} import org.apache.commons.io.FileUtils import org.scalatest.FunSpec class BaseCommitTest extends FunSpec { private val gitRepoName = "temp-git" private def prepareGitRepo(): GitRepo = { val gitRepoFolder = new File("target", gitRepoName) i...
gokyo/project-seraphim
src/test/scala/org/greenrd/seraphim/BaseCommitTest.scala
Scala
mit
1,358
/* * 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...
psyyz10/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/RoiPooling.scala
Scala
apache-2.0
14,275
import io.gatling.core.Predef._ import io.gatling.http.Predef._ import scala.concurrent.duration._ import scala.util.Random class RealGatling extends Simulation { val feeder = Iterator.continually( Map( "userId" -> Random.nextInt(100).toString, "blogId" -> Random.nextInt(100).toString, "uuid" -...
enpassant/rapids
src/it/scala/RealGatling.scala
Scala
apache-2.0
3,522
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author Usman Nisar, Aravind Kalimurthy, John Miller * @version 1.2 * @date Tue Dec 20 15:10:55 EST 2016 * @see LICENSE (MIT style license file). * * @see www2012.wwwconference.org/proceedings/proceedings/p949.pdf ...
NBKlepp/fda
scalation_1.2/src/main/scala/scalation/graphalytics/mutable/DualSimCAR.scala
Scala
mit
5,409
/*** * Copyright 2014 Rackspace US, 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 applica...
tylerroyal/api-checker
core/src/test/scala/com/rackspace/com/papi/components/checker/ResultFailedException.scala
Scala
apache-2.0
1,189
/* - Coeus web framework ------------------------- * * Licensed under the Apache License, Version 2.0. * * Author: Spiros Tzavellas */ package com.tzavellas.coeus.i18n.locale import java.util.Locale import javax.servlet.http.{HttpServletRequest, HttpServletResponse} /** * Provides a way to resolve the user's lo...
sptz45/coeus
src/main/scala/com/tzavellas/coeus/i18n/locale/LocaleResolver.scala
Scala
apache-2.0
964
def fibonacci(first: Int, second: Int): Stream[Int] = first #:: fibonacci(second, first + second) println(fibonacci(1, 1).takeWhile(_ < 4000000).filter(_%2 == 0).sum)
Furisuke/ProjectEuler
scala/problem0002.scala
Scala
mit
168
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
hengyicai/OnlineAggregationUCAS
core/src/main/scala/org/apache/spark/deploy/ApplicationDescription.scala
Scala
apache-2.0
1,789
/* * 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...
knockdata/spark-highcharts
src/test/scala/com/knockdata/spark/highcharts/demo/DemoLineChart.scala
Scala
apache-2.0
10,372
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/nn/Graph.scala
Scala
apache-2.0
28,337
import scala.compiletime.* object Test { inline def dummy1: Int => Int = (i: Int) => i + 1 inline def dummy2: (i: Int) => i.type = (i: Int) => i inline def dummy3: Int => Int = (i: Int) => ??? inline def dummy4: Int => Int = ??? object I extends (Int => Int) { def apply(i: Int): i.ty...
dotty-staging/dotty
tests/run-macros/beta-reduce-inline-result/Test_2.scala
Scala
apache-2.0
2,373
package aia.cluster package words import com.typesafe.config.ConfigFactory import akka.actor.{Props, ActorSystem} import akka.cluster.Cluster import JobReceptionist.JobRequest object Main extends App { val config = ConfigFactory.load() val system = ActorSystem("words", config) println(s"Starting node with rol...
RayRoestenburg/akka-in-action
chapter-cluster/src/main/scala/aia/cluster/words/Main.scala
Scala
mit
912
package xnioredis.codegen import java.net.{URL, URLConnection} import java.nio.charset.StandardCharsets import java.nio.file.{Files, Paths} import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.scala.DefaultScalaModule import resource._ import scala.collection.JavaConverters._ import...
vkorenev/xnio-redis-client
xnio-redis-codegen/src/main/scala/xnioredis/codegen/Updater.scala
Scala
apache-2.0
1,717
package spire package math import spire.algebra._ import org.scalacheck.Arbitrary._ import org.scalacheck._ import Arbitrary.arbitrary object ArbitrarySupport { object Ordinal { trait _0 trait _1 trait _2 trait _3 trait _4 trait _5 trait _6 trait _7 trait _8 trait _9 tr...
adampingel/spire
tests/src/test/scala/spire/math/ArbitrarySupport.scala
Scala
mit
2,422
package org.joda.time.base import org.joda.time.Chronology import org.joda.time.DateTime import org.joda.time.DateTimeField import org.joda.time.DateTimeFieldType import org.joda.time.DateTimeUtils import org.joda.time.DurationFieldType import org.joda.time.ReadableInstant import org.joda.time.ReadablePartial import o...
mdedetrich/soda-time
shared/src/main/scala/org/joda/time/base/AbstractPartial.scala
Scala
bsd-2-clause
4,616
/* * 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/scala/org/scalatest/ShouldBeEmptyLogicalAndImplicitSpec.scala
Scala
apache-2.0
10,786
/* * (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-tutorial
src/main/scala/tutorial/cogio/CameraExample.scala
Scala
apache-2.0
1,213
package models import com.typesafe.config.Config /** * Created by rbrowning on 4/25/17. */ case class Item(item: String, category: String, params: Seq[String]) { def getFullItemPath(implicit conf: Config): String = { conf.getString("entertainment.storage.path.root") + (category match { case "an...
rebrowning/entertainment-cluster-member
src/main/scala/models/Item.scala
Scala
apache-2.0
545
package org.numenta.nupic.flink.streaming.examples.hotgym import de.javakaffee.kryoserializers.jodatime.JodaDateTimeSerializer import org.apache.flink.api.java.utils.ParameterTool import org.apache.flink.core.fs.FileSystem.WriteMode import org.apache.flink.streaming.api.scala._ import org.joda.time.DateTime import org...
nupic-community/flink-htm
flink-htm-examples/src/main/scala/org/numenta/nupic/flink/streaming/examples/hotgym/HotGym.scala
Scala
agpl-3.0
3,820
/* * Copyright 2019 ABSA Group Limited * * 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...
AbsaOSS/spline
persistence/src/main/scala/za/co/absa/spline/persistence/tx/TxBuilder.scala
Scala
apache-2.0
4,800
package xsbtClasspath import sbt._ final case class Asset( file:File, name:String, main:Boolean ) { def flatPathMapping:(File,String) = (file, name) }
ritschwumm/xsbt-classpath
src/main/scala/Asset.scala
Scala
bsd-2-clause
157
/** * Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0 * See accompanying LICENSE file. */ package kafka.manager.base import kafka.manager.model.ActorModel import ActorModel.{ActorRequest, CommandRequest} /** * @author hiral */ abstract class BaseCommandActor extends BaseActor { final...
krux/kafka-manager
app/kafka/manager/base/BaseCommandActor.scala
Scala
apache-2.0
1,013
package unicredit import scala.tools.nsc.{ Global, Phase } import scala.tools.nsc.plugins.{ Plugin, PluginComponent } import scala.tools.nsc.transform.{ Transform, TypingTransformers } import scala.tools.nsc.symtab.Flags import scala.tools.nsc.plugins.Plugin import scala.tools.nsc.ast.TreeDSL import java.nio.file.Fil...
jmnarloch/akka.js
annotation-adder-plugin/src/main/scala/unicredit/AnnotationAdderPlugin.scala
Scala
bsd-3-clause
5,794
/* Copyright (c) 2017-2021, Robby, Kansas State University 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 source code must retain the above copyright notice, this list of...
sireum/v3-logika-runtime
macros/shared/src/main/scala/org/sireum/$internal/Macro.scala
Scala
bsd-2-clause
13,859
/* * Copyright 2002-2013 the original author or 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 app...
seratch/skinny-framework
test/src/main/scala/skinny/test/MockHttpServletResponse.scala
Scala
mit
5,746
/* * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ package play.core.j import play.api._ import play.api.mvc._ import java.io.File import scala.concurrent.Future import play.api.libs.iteratee._ import scala.util.control.NonFatal /** Adapter that holds the Java `GlobalSettings` and acts as a Sca...
jyotikamboj/container
pf-framework/src/play/src/main/scala/play/core/j/JavaGlobalSettingsAdapter.scala
Scala
mit
2,529
/* Copyright (c) 2016, Rice University Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2....
agrippa/spark-swat
swat/src/test/scala/org/apache/spark/rdd/cl/tests/ASPLOSAES.scala
Scala
bsd-3-clause
13,241
package ml.combust.mleap.core.feature import ml.combust.mleap.core.types.{ScalarType, StructField} import org.scalatest.FunSpec class ImputerModelSpec extends FunSpec { describe("input/output schema"){ val model = ImputerModel(12, 23.4, "mean") it("Has the right input schema") { assert(model.inputSc...
combust/mleap
mleap-core/src/test/scala/ml/combust/mleap/core/feature/ImputerModelSpec.scala
Scala
apache-2.0
557
package io.hnfmr.chapter4 import cats.data.State import cats.syntax.applicative._ object StateTut extends App { type CalcState[A] = State[List[Int], A] def evalOne(sym: String): CalcState[Int] = sym match { case "+" => operator(_ + _) case "-" => operator(_ - _) case "*" => operator(_ * _)...
hnfmr/advanced-scala
src/main/scala/io/hnfmr/chapter4/StateTut.scala
Scala
mit
1,087
/* The stats assignments and things will be done in the character creator. Too much is being handled by the core classes. I have split them up. A separate combat mechanics system will be implemented, it's a function of the character's stats after all. */ package chara import scala.collection.mutable.ArrayBuffer //im...
SystemicCypher/Games
src/main/scala/chara/character.scala
Scala
mit
2,092
package controllers import java.util.concurrent.TimeUnit import java.util.{Date, UUID} import javax.inject.Inject import akka.NotUsed import akka.actor.ActorSystem import akka.stream.Materializer import akka.stream.scaladsl.{Flow, Sink, Source} import controllers.TaskSolver._ import data.TaskDao import models.{Langua...
DmytroOrlov/devgym
server/app/controllers/TaskSolver.scala
Scala
apache-2.0
7,005
package kornell.server.api import javax.ws.rs._ import javax.ws.rs.core.Response import kornell.core.entity.{CourseDetailsEntityType, CourseDetailsLibrary} import kornell.core.to.CourseDetailsLibrariesTO import kornell.server.jdbc.repository.CourseDetailsLibrariesRepo import kornell.server.util.AccessDeniedErr import ...
Craftware/Kornell
kornell-api/src/main/scala/kornell/server/api/CourseDetailsLibrariesResource.scala
Scala
apache-2.0
2,552
package com.sksamuel.elastic4s import com.sksamuel.elastic4s.DefinitionAttributes.{DefinitionAttributePreference, DefinitionAttributeRefresh} import org.elasticsearch.action.get.{GetResponse, MultiGetAction, MultiGetItemResponse, MultiGetRequest, MultiGetRequestBuilder, MultiGetResponse} import org.elasticsearch.clien...
k4200/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/MultiGetDsl.scala
Scala
apache-2.0
2,503
/*********************************************************************** * 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-fs/geomesa-fs-storage/geomesa-fs-storage-convert/src/main/scala/org/locationtech/geomesa/fs/storage/converter/ConverterFileSystemReader.scala
Scala
apache-2.0
2,146
/* * 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 ...
tengpeng/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonGenerator.scala
Scala
apache-2.0
9,126
/* * 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 ...
haowu80s/spark
mllib/src/test/scala/org/apache/spark/ml/feature/QuantileDiscretizerSuite.scala
Scala
apache-2.0
4,996
package hello import scala.scalajs.js trait MyTrait { val x = 5 def foo(y: Int) = x } object HelloWorld extends MyTrait { def main(args: Array[String]): Unit = { println("hello dotty.js!") println(foo(4)) } }
som-snytt/dotty
sandbox/scalajs/src/hello.scala
Scala
apache-2.0
228
package it.dtk.cluster import akka.actor._ import akka.cluster.ClusterEvent.{CurrentClusterState, MemberUp} import akka.cluster.{Cluster, Member, MemberStatus} import akka.event.Logging import it.dtk.cluster.BackendWorkerProtocol._ import it.dtk.feed.Model.FeedInfo import it.dtk.kafka.FeedProducerKafka import net.ceed...
DataToKnowledge/wheretolive-feed
feed-cluster/src/main/scala/it/dtk/cluster/Worker.scala
Scala
apache-2.0
3,911
package presentation._5 import com.twitter.finagle.http.Method.Get import com.twitter.finagle.http.filter.Cors import com.twitter.finagle.http.filter.Cors.HttpFilter import com.twitter.finagle.http.path.Root import com.twitter.finagle.http.{Request, Response, Status} import com.twitter.finagle.{Http, Service} import i...
daviddenton/fintrospect
src/test/scala/presentation/_5/SearchApp.scala
Scala
apache-2.0
1,578
object Problem { class SudokuBoard(val data:Array[Array[Int]]) { def row(row: Int) = data(row) def col(col: Int) = data.map(_(col)) def square(sq: Int) = { val cc = sq % 3; var rr = sq / 3; data.slice(rr * 3, rr * 3 + 3).map(_.slice(cc * 3, cc * 3 + 3)).reduce(_ ++ _) } def isV...
Jiri-Kremser/euler
096/Problem.scala
Scala
gpl-2.0
2,155
import language.`future-migration` class Test object Test { def foo[A <% Test](x: A) = x // error }
dotty-staging/dotty
tests/neg/i11567.scala
Scala
apache-2.0
103
package metal package generic import scala.annotation.tailrec import util.Dummy abstract class HashMap[K, V] extends generic.Map[K, V] { import HashMap.{UNUSED, USED} type Immutable = metal.immutable.HashMap[K, V] type Mutable = metal.mutable.HashMap[K, V] type Scala = metal.immutable.WrappedHashMap[K, V] ...
denisrosset/ptrcoll
library/src/main/scala/metal/generic/HashMap.scala
Scala
mit
3,083
package org.openmole.site /* * Copyright (C) 19/04/17 // [email protected] * * 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 y...
openmole/openmole
openmole/bin/org.openmole.site/js/src/main/scala/org/openmole/site/Search.scala
Scala
agpl-3.0
3,622
package cbt import java.io._ import java.net._ import ammonite.ops.{cwd => _,_} trait Scaffold{ def logger: Logger def generateBasicBuildFile( projectDirectory: File, scalaVersion: String, groupId: String, artifactId: String, version: String ): Unit = { /** TODO: - make behavior mo...
tobias-johansson/cbt
stage2/Scaffold.scala
Scala
bsd-2-clause
4,224
/* * Copyright (c) 2013 University of Massachusetts Amherst * Licensed under the Apache License, Version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 */ package edu.umass.cs.iesl.bibmogrify.reader import org.scalatest.{BeforeAndAfter, FunSuite} import com.typesafe.scalalogging.slf4j.Logging import edu.umass....
iesl/bibmogrify
src/test/scala/edu/umass/cs/iesl/bibmogrify/reader/ElsevierReaderTestSuite.scala
Scala
apache-2.0
4,152
package com.getjenny.starchat.entities.io /** * Created by Angelo Leto <[email protected]> on 8/04/19. */ case class UpdateQAByQueryReq( documentSearch: QADocumentSearch, document: QADocumentUpdate )
GetJenny/starchat
src/main/scala/com/getjenny/starchat/entities/io/UpdateQAByQueryReq.scala
Scala
gpl-2.0
297
/* * Copyright 2017 Alexey Kuzin <[email protected]> * * 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 applicab...
leviathan941/choiceroulette
guiapp/src/main/scala/choiceroulette/gui/utils/Control.scala
Scala
apache-2.0
948
package mosaico.common import java.io.{File, FileOutputStream} import java.net.URL import akka.http.scaladsl.Http import akka.http.scaladsl.model.HttpRequest import akka.http.scaladsl.model.headers.RawHeader import akka.util.ByteString import sbt.URL import scala.collection.immutable /** * Download urls with Akka...
sciabarra/Mosaico
plugin/src/main/scala/mosaico/common/Download.scala
Scala
apache-2.0
3,105
package com.sundogsoftware.spark import org.apache.spark._ import org.apache.spark.SparkContext._ import org.apache.spark.sql._ import org.apache.log4j._ object SparkSQL { case class Person(ID:Int, name:String, age:Int, numFriends:Int) def mapper(line:String): Person = { val fields = line.split(',') ...
BobLovesData/Apache-Spark-In-24-Hours
src/net/massstreet/examples/SparkSQL.scala
Scala
gpl-3.0
1,549
package lowerthirds import java.io._ import java.awt.{GraphicsEnvironment, AlphaComposite, Font => JFont} import java.awt.Font._ import java.awt.image.BufferedImage import java.awt.RenderingHints.{KEY_ANTIALIASING, VALUE_ANTIALIAS_ON} import java.awt.Color._ import javax.imageio.{ImageIO} import javax.swing.undo.{Undo...
edadma/lteditor
src/main/scala/LowerThirdsEditor.scala
Scala
gpl-3.0
21,199
/* * 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/control/interactor/landmark/simple/SimpleLandmarkingInteractor.scala
Scala
gpl-3.0
3,309
/* * Copyright (C) 2020 MapRoulette contributors (see CONTRIBUTORS.md). * Licensed under the Apache License, Version 2.0 (see LICENSE). */ package org.maproulette.framework.controller import javax.inject.Inject import org.maproulette.data.ActionManager import org.maproulette.framework.service.VirtualProjectService ...
mgcuthbert/maproulette2
app/org/maproulette/framework/controller/VirtualProjectController.scala
Scala
apache-2.0
2,090
/* * 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
mllib/src/test/scala/org/apache/spark/mllib/linalg/VectorsSuite.scala
Scala
apache-2.0
15,898
package scalaj.http import java.io.{ByteArrayInputStream, ByteArrayOutputStream, IOException} import java.net.{HttpCookie, InetSocketAddress, Proxy} import java.util.zip.GZIPOutputStream import javax.servlet.{ServletRequest, ServletResponse} import javax.servlet.http.{HttpServlet, HttpServletRequest, HttpServletRespon...
scalaj/scalaj-http
src/test/scala/scalaj/http/HttpTest.scala
Scala
apache-2.0
16,374
/* Scores: A sorted lazy list monad * * Scored[A] represents a sorted, lazy list of (Prob,A) pairs. The order is decreasing: * Prob = 1 is best and Prob = 0 worst. Scored is a monad with additional structure, * such as a fast(er) Cartesian product operation corresponding to Haskell's Applicative * type class. *...
eddysystems/eddy
tarski/src/tarski/Scores.scala
Scala
bsd-2-clause
15,806
/** Copyright 2015, Metreta Information Technology s.r.l. */ package com.metreta.spark.orientdb.connector import org.apache.spark.SparkContext import org.apache.spark.rdd.RDD import com.metreta.spark.orientdb.connector.api.OrientDBConnector import com.orientechnologies.orient.core.sql.OCommandSQL import org.apache.s...
metreta/spark-orientdb-connector
spark-orientdb-connector/src/main/scala/com/metreta/spark/orientdb/connector/ClassRDDFunctions.scala
Scala
apache-2.0
6,923
package db import org.scalatestplus.play._ class UtilSpec extends PlaySpec { "generateVersionSortKey" in { Util.generateVersionSortKey("0.0.1") must be("6:10000.10000.10001") Util.generateVersionSortKey("0") must be("3:0") Util.generateVersionSortKey("other") must be("3:other") Seq("0.0.10", "0.0....
flowcommerce/delta
api/test/db/UtilSpec.scala
Scala
mit
453
package frdomain.ch6 package domain package model import java.util.{ Date, Calendar } import util.{ Try, Success, Failure } import scalaz._ import Scalaz._ object common { type Amount = BigDecimal def today = Calendar.getInstance.getTime } import common._ case class Balance(amount: Amount = 0) sealed trait Ac...
debasishg/frdomain
src/main/scala/frdomain/ch6/domain/model/Account.scala
Scala
apache-2.0
3,820
package com.nekopiano.scala.processing.sandbox.poc.pdf; import com.nekopiano.scala.processing.{ScalaPAppCompanion, ScalaPApplet, ScalaPVector, TwoDimensionalPApp} import processing.core.PGraphics import processing.event.MouseEvent; /** * Created on 24/07/2016. */ class PdfExportApp extends TwoDimensionalPApp { v...
lamusique/ScalaProcessing
samples/src/test/scala/com/nekopiano/scala/processing/sandbox/poc/pdf/PdfExport.scala
Scala
apache-2.0
2,570
package com.ajlopez.scala.ajlisp class Atom(name: String) extends SymbolicExpression { def evaluate(context: Context): Any = context.getValue(name) override def toString(): String = name }
ajlopez/AjLispScala
src/main/scala/com/ajlopez/scala/ajlisp/Atom.scala
Scala
mit
214
package edu.iitd.nlp.ListExtraction import scala.collection.mutable case class FeatureVector(vec: mutable.ArrayBuffer[Double] = FeatureVector.Default().vec) { def +(other: FeatureVector): FeatureVector = { require(this.vec.length == other.vec.length) FeatureVector(vec.zip(other.vec).map { case (a, b) => a +...
satwantrana/list-extractor
src/main/scala/edu/iitd/nlp/ListExtraction/FeatureVector.scala
Scala
mit
1,971
/* * 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 ...
yanboliang/spark
core/src/main/scala/org/apache/spark/util/SizeEstimator.scala
Scala
apache-2.0
15,719
package org.bitcoins.testkit.async import org.bitcoins.asyncutil.AsyncUtil import org.scalatest.exceptions.{StackDepthException, TestFailedException} import scala.concurrent.{ExecutionContext, Future} import scala.concurrent.duration.FiniteDuration abstract class TestAsyncUtil extends AsyncUtil with Serializable { ...
bitcoin-s/bitcoin-s
testkit/src/main/scala/org/bitcoins/testkit/async/TestAsyncUtil.scala
Scala
mit
2,627
package org.specs2.exter.matcher import org.specs2.matcher.{Expectable, Matcher} import org.specs2.specification.SpecificationStructure trait ExterSeq { self: SpecificationStructure => private def seqToEnglish[A](seq: Seq[A]) = { seq.map(x => s"'$x'") .mkString(", ") .reverse .replaceFirst("...
tstone/specs2-exter
src/main/scala/org/specs2/exter/matcher/ExterSeq.scala
Scala
mit
2,070
/* * Copyright 2015 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...
scottcutts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/computations/LEC10.scala
Scala
apache-2.0
1,319
package com.wallace.demo.app.common /** * Created by Wallace on 2016/11/6. */ trait UserDefineFunc { def toBigInt(x: Int): BigInt = { math.BigInt.int2bigInt(x) } }
BiyuHuang/CodePrototypesDemo
demo/ScalaDemo/src/main/scala/com/wallace/demo/app/common/UserDefineFunc.scala
Scala
apache-2.0
177
/* * Copyright (c) 2014-2018 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...
Wogan/monix
monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DumpSuite.scala
Scala
apache-2.0
2,202
package ch.ltouroumov.coe.common import ch.ltouroumov.coe.utils.bootstraper._ object Items extends ItemsRegister { protected val factory = ItemRegistrationHandlerFactory @LazyRegister lazy val amethystCrystal = register("amethystCrystal", 5000, new AmethystCrystal(_))( LocalizedName("Amethyst Crystal"), ...
ltouroumov/craft-of-exile
src/main/scala/ch/ltouroumov/coe/common/Items.scala
Scala
gpl-3.0
661
import scala.util.parsing.json.JSON import scala.collection.mutable.MutableList import java.io.{File, PrintWriter} import scala.xml.Null import java.math.BigDecimal object JsonToJava { type JsonObject = Map[String, Any] type JsonArray = List[Any] JSON.globalNumberParser = (input: String) => { if (input.con...
amigold/JsonToJava
src/main/scala/JsonToJava.scala
Scala
mit
2,670
/*********************************************************************** * Copyright (c) 2013-2020 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...
aheyne/geomesa
geomesa-spark/geomesa-spark-sql/src/main/scala/org/locationtech/geomesa/spark/GeoMesaRelation.scala
Scala
apache-2.0
13,324
package mesosphere.marathon package tasks import mesosphere.UnitTest import mesosphere.marathon.core.condition.Condition import mesosphere.marathon.core.instance.update.InstanceUpdateOperation import mesosphere.marathon.core.instance.{Instance, LocalVolumeId, TestInstanceBuilder} import mesosphere.marathon.core.launch...
gsantovena/marathon
src/test/scala/mesosphere/marathon/tasks/InstanceOpFactoryImplTest.scala
Scala
apache-2.0
10,439
/* * 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 ...
jkbradley/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/HiveResult.scala
Scala
apache-2.0
4,656
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.3 * @date Mon Oct 10 16:42:21 EDT 2016 * @see LICENSE (MIT style license file). * * @see romisatriawahono.net/lecture/dm/paper/clustering/ * Garcia%20-%20K-means%20algorithms%20f...
scalation/fda
scalation_1.3/scalation_modeling/src/main/scala/scalation/analytics/fda/KMeansClustering_F.scala
Scala
mit
4,479
/* ** Copyright [2013-2016] [Megam Systems] ** ** 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...
meglytics/bidi
app/models/base/Accounts.scala
Scala
mit
10,452
package models import org.specs2.mutable._ import java.sql.Connection import java.time.Instant import anorm._ import anorm.SqlParser import play.api.test._ import play.api.test.Helpers._ import java.util.Locale import com.ruimo.scoins.Scoping._ import helpers.QueryString import helpers.{CategoryIdSearchCondition, Ca...
ruimo/store2
test/models/ItemSpec.scala
Scala
apache-2.0
35,195
/* Copyright 2009-2016 EPFL, Lausanne */ package leon.unit.purescala import leon.test._ import leon.purescala.Common._ import leon.purescala.Expressions._ import leon.purescala.Definitions._ import leon.purescala.Types._ import leon.purescala.TypeOps._ class TypeOpsSuite extends LeonTestSuite with helpers.WithLikely...
epfl-lara/leon
src/test/scala/leon/unit/purescala/TypeOpsSuite.scala
Scala
gpl-3.0
5,809
package org.bitcoins.dlc.wallet.internal import org.bitcoins.core.api.dlc.wallet.db.IncomingDLCOfferDb import org.bitcoins.core.protocol.tlv.DLCOfferTLV import org.bitcoins.crypto.Sha256Digest import org.bitcoins.dlc.wallet.DLCWallet import org.bitcoins.dlc.wallet.models.IncomingDLCOfferDbHelper import scala.concurre...
bitcoin-s/bitcoin-s
dlc-wallet/src/main/scala/org/bitcoins/dlc/wallet/internal/IncomingDLCOffersHandling.scala
Scala
mit
1,422
package com.abdulradi.redikka.test import org.scalatest._ import com.abdulradi.redikka.test.clients.Client abstract class Spec(config: TestConfig) extends WordSpec with Matchers { def r = config.r def subject = config.subject } case class TestConfig(r: Client, subject: String) object Redis { def via(client: I...
tabdulradi/redikka
redikka-tests/src/test/scala/Spec.scala
Scala
mit
474
import com.github.nscala_time.time.Imports._ import org.joda.time.DateMidnight object Prob19 { //daysOfMonth(1900)(0) is Junuary days of 1900 def daysOfMonth(year: Int) = Vector(31, 28 + (if(leapYear(year)) 1 else 0), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) def leapYear(year: Int): Boolean = year match...
ponkotuy/ProjectEular
src/main/scala/Prob19.scala
Scala
mit
1,981
package im.actor.server.cli import akka.actor.ActorSystem import akka.stream.ActorMaterializer import com.typesafe.config.ConfigFactory import im.actor.config.ActorConfig import im.actor.server.db.DbExtension import sql.migration.V20151108011300__FillUserSequence import scala.concurrent._ final class MigrationHandle...
EaglesoftZJ/actor-platform
actor-server/actor-cli/src/main/scala/im/actor/server/cli/MigrationHandlers.scala
Scala
agpl-3.0
958
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ import java.util.regex.Pattern import bintray.BintrayPlugin.autoImport._ import com.jsuereth.sbtpgp.PgpKeys import com.typesafe.tools.mima.core.ProblemFilters import com.typesafe.tools.mima.core._ import com.typesafe.tools.mima.plugin.MimaKeys._ import...
wegtam/playframework
project/BuildSettings.scala
Scala
apache-2.0
18,362
package scala.pickling.privatepublicctorstest import org.scalatest.FunSuite import scala.pickling._, scala.pickling.Defaults._, json._ class C private(private var x: Int, private var y: String) { // another private ctor private def this(x: Int) = this(x, "bye") // a single public ctor def this() = this(5, "he...
scala/pickling
core/src/test/scala/scala/pickling/generation/PrivatePublicConstructorsTest.scala
Scala
bsd-3-clause
834
package ilc package howTo import org.scalatest.FunSuite class GetConstraintsOutOfConstantsSuite extends FunSuite with GetConstraintsOutOfConstants with feature.base.Pretty
inc-lc/ilc-scala
src/test/scala/ilc/howTo/GetConstraintsOutOfConstantsSuite.scala
Scala
mit
180
/* sbt -- Simple Build Tool * Copyright 2009, 2010 Josh Cough, Mark Harrah */ package sbt.impl import org.scalatools.testing._ class ScalaTestFramework extends Framework { val name = "ScalaTest" val tests = Fingerprint.classOnly("org.scalatest.Suite") def testRunner(loader: ClassLoader, loggers: Array[Logger]...
harrah/test-compat
ScalaTest.scala
Scala
bsd-3-clause
2,911
package me.yingrui.segment.dict class HashDictionary extends IDictionary { def getCapacity(): Int = { return headIndexersHashMap.size } def clear() { headIndexersHashMap = new java.util.HashMap[String, HeadIndexer]() } def lookupHeadIndexer(head: String): HeadIndexer = { return he...
yingrui/mahjong
lib-segment/src/main/scala/me/yingrui/segment/dict/HashDictionary.scala
Scala
gpl-3.0
2,097