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 info.hargrave.composer.backend.manager import java.io.{FileInputStream, FileOutputStream, File} import info.hargrave.composer._ import info.hargrave.composer.backend.manager.ProjectController.ProjectFactory import info.hargrave.composer.backend.manager.projects.CUEProject import info.hargrave.composer.backend...
RomanHargrave/CUEComposer
src/main/scala/info/hargrave/composer/backend/manager/ProjectController.scala
Scala
gpl-3.0
12,614
package model import play.api.libs.json._ /** * Represents the Swagger definition for SwapSpaceMonitorMemoryUsage2. * @param additionalProperties Any additional properties this model may have. */ @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), dat...
cliffano/swaggy-jenkins
clients/scala-play-server/generated/app/model/SwapSpaceMonitorMemoryUsage2.scala
Scala
mit
1,732
/* * Copyright (c) 2013-2014 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
snowplow/kinesis-example-scala-consumer
project/BuildSettings.scala
Scala
apache-2.0
2,233
/* Copyright 2013 Stephen K Samuel 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 i...
carlosFattor/scrimage
scrimage-filters/src/main/scala/com/sksamuel/scrimage/filter/PointillizeFilter.scala
Scala
apache-2.0
2,635
/* * Copyright (c) 2015 Uncharted Software Inc. * http://www.oculusinfo.com/ * * Released under the MIT License. * * 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,...
unchartedsoftware/aperture-tiles
tile-generation/src/test/scala/com/oculusinfo/tilegen/tiling/StandardBinningFunctionsTestSuite.scala
Scala
mit
22,571
package almhirt.aggregates import org.scalatest._ import scalaz._, Scalaz._ import almhirt.common._ class AggregateRootEventHandlerTests extends FlatSpec with Matchers with UserEventHandler { import aggregatesforthelazyones._ implicit val ccuad = CanCreateUuidsAndDateTimes() behavior of "AggregateRootEventHa...
chridou/almhirt
almhirt-common/src/test/scala/almhirt/aggregates/AggregateRootEventHandlerTests.scala
Scala
apache-2.0
3,812
/* * Copyright 2016 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...
ahudspith-equalexperts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/computations/CP82.scala
Scala
apache-2.0
933
package spark.scheduler import java.net.URI import spark._ import spark.storage.BlockManagerId /** * A stage is a set of independent tasks all computing the same function that need to run as part * of a Spark job, where all the tasks have the same shuffle dependencies. Each DAG of tasks run * by the scheduler is ...
ankurdave/arthur
core/src/main/scala/spark/scheduler/Stage.scala
Scala
bsd-3-clause
2,862
package org.wartremover package contrib.test import org.scalatest.Assertions import org.wartremover.test.WartTestTraverser trait ResultAssertions extends Assertions { def assertEmpty(result: WartTestTraverser.Result) = { assertResult(List.empty, "result.errors")(result.errors) assertResult(List.empty, "re...
tim-zh/wartremover-contrib
core/src/test/scala/wartremover/contrib/ResultAssertions.scala
Scala
apache-2.0
1,215
package model import skinny.DBSettings import skinny.test._ import org.scalatest.fixture.FlatSpec import org.scalatest._ import scalikejdbc._ import scalikejdbc.scalatest._ import org.joda.time._ class SchoolSpec extends FlatSpec with Matchers with DBSettings with AutoRollback { }
yoshitakes/skinny-task-example
src/test/scala/model/SchoolSpec.scala
Scala
mit
284
package com.github.blemale.scaffeine import com.github.benmanes.caffeine.cache.{AsyncLoadingCache => CaffeineAsyncLoadingCache} import scala.collection.JavaConverters._ import scala.compat.java8.FutureConverters._ import scala.concurrent.{ExecutionContext, Future} object AsyncLoadingCache { def apply[K, V]( ...
blemale/scaffeine
src/main/scala/com/github/blemale/scaffeine/AsyncLoadingCache.scala
Scala
apache-2.0
2,666
package org.scalamu.plugin.mutators.controllflow import org.scalamu.plugin.{MutatingTransformer, ScalamuScalacConfig} import scala.tools.nsc.Global /** * Mutation, that replaces conditional operators with their logical counterparts. * e.g. * {{{ * if (a > 10) { * .. * } else if (c == 10) { * .. * } * }}}...
sugakandrey/scalamu
scalac-plugin/src/main/scala/org/scalamu/plugin/mutators/controllflow/NegateConditionals.scala
Scala
gpl-3.0
948
package mesosphere import java.util.concurrent.TimeUnit import scala.annotation.tailrec import scala.concurrent.duration.Duration package object util { /** * Truncates the string output of a long list. * * This should be used to reduce the size of logging ids etc. * * @param it The iterable th...
gsantovena/marathon
src/main/scala/mesosphere/util/package.scala
Scala
apache-2.0
1,960
object Test { import scala.util.NotGiven class Foo implicit def foo: Foo = ??? def foo[T](implicit ev: NotGiven[T]) = ??? foo[Foo] // error }
lampepfl/dotty
tests/neg/i5234c.scala
Scala
apache-2.0
154
package lila.user import org.joda.time.DateTime case class Trophy( _id: String, // random user: String, kind: Trophy.Kind, date: DateTime) object Trophy { sealed abstract class Kind( val key: String, val name: String, val icon: Option[String], val url: Option[String], val klass: Option...
abougouffa/lila
modules/user/src/main/Trophy.scala
Scala
mit
3,747
/* * Copyright 2011-2017 Chris de Vreeze * * 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 agree...
dvreeze/yaidom
jvm/src/test/scala/eu/cdevreeze/yaidom/queryapitests/scalaxml/RobustQueryTest.scala
Scala
apache-2.0
1,638
package eu.inn.binders.value.internal import scala.language.experimental.macros import scala.language.reflectiveCalls import scala.reflect.macros.Context private [value] trait DynamicMacroImpl { val c: Context import c.universe._ def fromValue[O: c.WeakTypeTag]: c.Tree = { val t = fresh("t") val d = fr...
InnovaCo/binders
src/main/scala/eu/inn/binders/value/internal/DynamicMacroImpl.scala
Scala
bsd-3-clause
962
/* * 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/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/literals.scala
Scala
apache-2.0
16,109
package jp.mwsoft.wikipedia.categorizer.common import java.io.Closeable object Controls { def managed[T, U <: Closeable](resource: U)(f: U => T): T = { try f(resource) finally resource.close() } def managed[T, U <: Closeable, V <: Closeable](resource1: U, resource2: V)(f: (U, V) => T): T = { try f...
mwsoft/wikipedia_categorizer
src/main/scala/jp/mwsoft/wikipedia/categorizer/common/Controls.scala
Scala
mit
804
/* * DARWIN Genetic Algorithms Framework Project. * Copyright (c) 2003, 2005, 2007, 2009, 2011, 2016, 2017. Phasmid Software * * Originally, developed in Java by Rubecula Software, LLC and hosted by SourceForge. * Converted to Scala by Phasmid Software and hosted by github at https://github.com/rchillyard/Darwin ...
rchillyard/Darwin
src/main/scala/com/phasmid/darwin/eco/Environment.scala
Scala
gpl-3.0
2,665
package com.sksamuel.avro4s.schema import com.sksamuel.avro4s.{AvroNoDefault, AvroSchema} import org.scalatest.funsuite.AnyFunSuite import org.scalatest.matchers.should.Matchers class AvroNoDefaultTest extends AnyFunSuite with Matchers { test("a field annotated with @AvroNoDefault should ignore a scala default") { ...
sksamuel/avro4s
avro4s-core/src/test/scala/com/sksamuel/avro4s/schema/AvroNoDefaultTest.scala
Scala
apache-2.0
606
import org.workcraft.pluginmanager.Plugin /* // Commented because otherwise they get on the default class-path package org.workcraft.plugins { class NotAPlugin class GoodPluginA extends Plugin class GoodPluginB extends Plugin class GoodPluginC extends Plugin abstract class AbstractPlugin extends...
tuura/workcraft-2.2
PluginManager/src/test/scala/org/workcraft/pluginmanager/TestPlugins.scala
Scala
gpl-3.0
475
package org.crudible.core.binding.model import org.crudible.core.binding.traits.HasLabel import org.crudible.core.binding.traits.HasPlaceholder import org.crudible.core.binding.traits.HasPrefix import org.crudible.core.binding.traits.HasMax import org.crudible.core.binding.traits.HasReadonly import org.crudible.core.b...
rehei/crudible
crudible-core/src/main/scala/org/crudible/core/binding/model/TextComponent.scala
Scala
apache-2.0
932
// Copyright (C) 2017 Calin Cruceru <[email protected]>. // // See the LICENCE file distributed with this work for additional // information regarding copyright ownership. package org.symnet package models.iptables package extensions.tcp // 3rd-party // -> Symnet import org.change.v2.analysis.expression.c...
calincru/iptables-sefl
src/main/scala/org/symnet/models/iptables/extensions/tcp/PortMatch.scala
Scala
mit
2,632
package openreveal.service import java.nio.file.Files import com.hp.hpl.jena.vocabulary.RDF import openreveal.rdf.RdfTdbModelProvider import openreveal.schema.OpenRevealSchema import openreveal.service.impl.JenaFactStorage import org.apache.commons.io.FileUtils import org.scalatest.{BeforeAndAfterAll, BeforeAndAfter,...
paul-lysak/OpenReveal
src/test/scala/openreveal/service/TDBPersistenceSpec.scala
Scala
apache-2.0
1,005
package fs2 package io package tcp import scala.concurrent.ExecutionContext import scala.concurrent.duration._ import java.net.{InetSocketAddress, SocketAddress, StandardSocketOptions} import java.nio.ByteBuffer import java.nio.channels.spi.AsynchronousChannelProvider import java.nio.channels.{ AsynchronousChannelG...
zaneli/fs2
io/src/main/scala/fs2/io/tcp/Socket.scala
Scala
mit
13,986
package org.scalaide.core.semantichighlighting.classifier import org.scalaide.core.internal.decorators.semantichighlighting.classifier.SymbolTypes._ import org.scalaide.core.internal.decorators.semantichighlighting.classifier.SymbolInfo import org.junit._ class DeprecatedMethodTest extends AbstractSymbolClassifierTes...
Kwestor/scala-ide
org.scala-ide.sdt.core.tests/src/org/scalaide/core/semantichighlighting/classifier/DeprecatedMethodTest.scala
Scala
bsd-3-clause
735
package ch.wsl.box.client.views.components.widget.labels import ch.wsl.box.client.routes.Routes import ch.wsl.box.client.views.components.widget.{ComponentWidgetFactory, Widget, WidgetParams} import ch.wsl.box.model.shared.{JSONField, WidgetsNames} import ch.wsl.box.shared.utils.JSONUtils.EnhancedJson import io.udash....
Insubric/box
client/src/main/scala/ch/wsl/box/client/views/components/widget/labels/HtmlWidget.scala
Scala
apache-2.0
1,697
/* * 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 ...
tejasapatil/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
Scala
apache-2.0
39,405
package com.alexitc.coinalerts.data.async import javax.inject.Inject import com.alexitc.coinalerts.config.DatabaseExecutionContext import com.alexitc.coinalerts.data.{UserBlockingDataHandler, UserDataHandler} import com.alexitc.coinalerts.models._ import com.alexitc.playsonify.core.FutureApplicationResult import sca...
AlexITC/crypto-coin-alerts
alerts-server/app/com/alexitc/coinalerts/data/async/UserFutureDataHandler.scala
Scala
gpl-3.0
1,923
/* * Copyright 2015 Otto (GmbH & Co KG) * * 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...
ottogroup/flink-spector
flinkspector-core/src/main/scala/io/flinkspector/matcher/ListMatchers.scala
Scala
apache-2.0
6,331
package org.jetbrains.plugins.scala package codeInspection package hashCodeUsesVar import com.intellij.codeInspection.LocalInspectionTool import com.intellij.testFramework.EditorTestUtil /** * Daniyar Itegulov * 2016-02-08 */ class HashCodeUsesVarInspectionTest extends ScalaInspectionTestBase { override prot...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/codeInspection/hashCodeUsesVar/HashCodeUsesVarInspectionTest.scala
Scala
apache-2.0
3,957
package com.hadooparchitecturebook.taxi360.server.hbase import java.io.File import com.sun.jersey.spi.container.servlet.ServletContainer import org.apache.hadoop.hbase.HBaseConfiguration import org.mortbay.jetty.Server import org.mortbay.jetty.servlet.{Context, ServletHolder} object HBaseRestServer { def main(args...
hadooparchitecturebook/Taxi360
src/main/scala/com/hadooparchitecturebook/taxi360/server/hbase/HBaseRestServer.scala
Scala
apache-2.0
1,432
package com.twitter.finagle.netty3.socks import com.twitter.finagle.ConnectionFailedException import com.twitter.finagle.netty3.SocketAddressResolveHandler import com.twitter.finagle.socks.{Unauthenticated, UsernamePassAuthenticationSetting} import java.net.{SocketAddress, InetAddress, InetSocketAddress} import java.u...
sveinnfannar/finagle
finagle-core/src/test/scala/com/twitter/finagle/netty3/socks/SocksConnectHandlerTest.scala
Scala
apache-2.0
10,613
import scala.collection.mutable object Test { val map = mutable.Map.empty[String, String] def main(args: Array[String]): Unit = while (true) { val time = System.currentTimeMillis.toString map += (time -> time) } }
som-snytt/dotty
tests/vulpix-tests/unit/infiniteAlloc.scala
Scala
apache-2.0
229
package com.swara.examples.learn import scala.util.Random import com.swara.learn.common._ import com.swara.learn.genetic.recombinators.EdgeRecombinator import com.swara.learn.genetic.selectors.RouletteWheelSelector import com.swara.learn.genetic.{Evaluator, Mutator, Population} /** * The traveling salesman problem (...
ashwin153/swara
swara-examples/src/main/scala/com/swara/examples/learn/TravelingSalesmanProblem.scala
Scala
mit
2,048
package controllers import org.specs2.mutable._ import play.api.test._ import play.api.test.Helpers._ /** * You can mock out a whole application including requests, plugins etc. * For more information, consult the wiki. */ class ApplicationIT extends Specification { "Application" should { "send 404 on a b...
danihegglin/renga
web/test/controllers/ApplicationIT.scala
Scala
apache-2.0
680
/* * Copyright (C) 2007 Lalit Pant <[email protected]> * * 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/operators/AbstractCrossoverOp.scala
Scala
gpl-3.0
2,291
package domain import play.api.libs.json.Json case class Handshake(room: String, user:String) object Handshake { implicit val reads = Json.reads[Handshake] def parse(msg: String): Handshake = reads.reads(Json.parse(msg)).get //todo: add validation and/or try/catch }
vadim-shb/play-chat
app/domain/Handshake.scala
Scala
apache-2.0
275
/* * Copyright 2019 Spotify AB. * * 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 ...
spotify/scio
scio-core/src/main/scala/com/spotify/scio/coders/AvroBytesUtil.scala
Scala
apache-2.0
1,747
object SCL10116 { val policy = s""" |{ | "conditions": [ | ["starts-with", "$$Content-Type", "image/*"], | ] |} """.<ref>stripMargin }
ilinum/intellij-scala
testdata/resolve/failed/escapeSymbols/SCL10116.scala
Scala
apache-2.0
190
/******************************************************************************* * Copyright (C) 2012 Łukasz Szpakowski. * * This library 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 ver...
luckboy/LkbGraph
src/main/org/lkbgraph/package.scala
Scala
lgpl-3.0
1,243
package se.marcuslonnberg.stark import java.io._ import java.security._ import java.security.cert.{Certificate, CertificateFactory} import java.security.spec.PKCS8EncodedKeySpec import javax.net.ssl.{KeyManagerFactory, SSLContext, TrustManagerFactory} import org.apache.commons.ssl.PKCS8Key import spray.io.{SSLContext...
FredrikWendt/stark
src/main/scala/se/marcuslonnberg/stark/SSLSupport.scala
Scala
mit
2,996
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
tzulitai/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/batch/table/TableSinkITCase.scala
Scala
apache-2.0
6,168
/** * Copyright 2011-2017 GatlingCorp (http://gatling.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 appli...
timve/gatling
gatling-http/src/main/scala/io/gatling/http/fetch/UserAgent.scala
Scala
apache-2.0
1,244
package core.formatter.misc import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.databind.{ SerializerProvider, JsonSerializer } import com.lvxingpai.model.misc.RichText /** * Created by pengyt on 2015/11/13. */ class RichTextSerializer extends JsonSerializer[RichText] { override def seri...
Lvxingpai/Hanse
app/core/formatter/misc/RichTextSerializer.scala
Scala
apache-2.0
684
package com.github.fellowship_of_the_bus package bruteb package models import scala.collection.mutable.Set import lib.game.{IDMap, IDFactory, TopLeftCoordinates} import lib.util.{TimerListener, TickTimer} import rapture.json._ import rapture.json.jsonBackends.jackson._ sealed trait ProjectileID { def imageList: ...
Fellowship-of-the-Bus/Brute-Blitzkrieg
src/main/scala/models/Projectile.scala
Scala
apache-2.0
3,997
package controllers import javax.inject.Inject import com.mohiva.play.silhouette.api.{ Environment, LogoutEvent, Silhouette } import com.mohiva.play.silhouette.impl.authenticators.JWTAuthenticator import models.User import play.api.libs.json.Json import scala.concurrent.Future /** * The basic application controlle...
BareHackers/BareQuotes
app/controllers/ApplicationController.scala
Scala
apache-2.0
1,404
package lila.importer import com.typesafe.config.Config import lila.common.PimpedConfig._ final class Env( config: Config, scheduler: akka.actor.Scheduler, roundMap: akka.actor.ActorRef) { private val Delay = config duration "delay" lazy val forms = new DataForm lazy val importer = new Importer(...
Happy0/lila
modules/importer/src/main/Env.scala
Scala
mit
583
package cromwell.engine.backend import java.nio.file._ import cromwell.engine.backend.io.filesystem.gcs.{ContentTypeOption, GcsFileSystem, GcsFileSystemProvider, NioGcsPath} import scala.util.{Success, Try} package object io { val defaultGCSFileSystem = GcsFileSystem.defaultGcsFileSystem val defaultFileSystem =...
cowmoo/cromwell
engine/src/main/scala/cromwell/engine/backend/io/package.scala
Scala
bsd-3-clause
1,536
package dispatch.as import dispatch._ import java.nio.charset.Charset import org.asynchttpclient object Response { def apply[T](f: asynchttpclient.Response => T) = f } object String extends (asynchttpclient.Response => String) { /** @return response body as a string decoded as either the charset provided by ...
maiflai/reboot
core/src/main/scala/as/core.scala
Scala
lgpl-3.0
1,306
package com.overviewdocs.background.filegroupcleanup import scala.concurrent.Future import com.overviewdocs.database.HasDatabase import com.overviewdocs.models.tables.FileGroups trait DeletedFileGroupFinder { def indexIds: Future[Iterable[Long]] } /** Finds FileGroup IDs that we need to delete. * * This finds...
overview/overview-server
worker/src/main/scala/com/overviewdocs/background/filegroupcleanup/DeletedFileGroupFinder.scala
Scala
agpl-3.0
801
package ru.yandex.mysqlDiff package vendor.mysql import java.sql._ import ru.yandex.small.jdbc._ import jdbc._ import util._ import model._ import MetaDao._ import Implicits._ object MysqlMetaDao { /** INFORMATION_SCHEMA.COLUMNS */ case class MysqlColumnInfo( tableCatalog: String, tableSchema: Str...
hkerem/mysql-diff
src/main/scala/ru/yandex/mysqlDiff/vendor/mysql/mysql-jdbc.scala
Scala
bsd-3-clause
21,073
package com.databricks.spark.corenlp import org.apache.spark.sql.SQLContext import org.apache.spark.{SparkConf, SparkContext} import org.scalatest.{BeforeAndAfterAll, FunSuite} trait SparkFunSuite extends FunSuite with BeforeAndAfterAll { @transient var sc: SparkContext = _ @transient var sqlContext: SQLContext =...
mengxr/spark-corenlp
src/test/scala/com/databricks/spark/corenlp/SparkFunSuite.scala
Scala
gpl-3.0
645
package ua.nure.lab2 import org.specs2.mutable.Specification /** * @author Bohdan_Suprun */ class SavingsAccountTest extends Specification { "SavingsAccount" should { "not charge the customer 3times in a month" in { val account = new SavingsAccount(100) account deposit 10 mustEqual 110 acco...
isCompetent/spp
src/test/scala/ua/nure/lab2/SavingsAccountTest.scala
Scala
mit
818
package step1 object Runner { def main(arr: Array[String]): Unit = { val t3 = NumberT3.fromInt(12) val t2 = NumberT2.fromInt(12) val t1 = NumberT1.fromInt(12) val t4 = NumberT4.count(t3, t2, t1) println(t4.length) } }
djx314/ubw
a36-快乐智多星/src/main/scala/step1/Runner.scala
Scala
bsd-3-clause
245
/* * Copyright (c) 2014 Oculus Info Inc. * http://www.oculusinfo.com/ * * Released under the MIT License. * * 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, includ...
aashish24/aperture-tiles
tile-generation/src/main/scala/com/oculusinfo/tilegen/graph/util/ClusteredGraphLayoutApp.scala
Scala
mit
4,544
package scala.lms package common import java.io.PrintWriter import internal._ import scala.reflect.SourceContext trait UncheckedOps extends Base { def unchecked[T:Typ](s: Any*): Rep[T] def uncheckedPure[T:Typ](s: Any*): Rep[T] implicit class richQuote(c: StringContext) { class QuoteOps(args: Thunk[Rep[A...
astojanov/virtualization-lms-core
src/common/Unchecked.scala
Scala
bsd-3-clause
2,203
import java.sql.DriverManager /** * Created by yww08 on 2019-01-07. */ object GZM { def main(args: Array[String]): Unit = { Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver") val connStr = "jdbc:sqlserver://10.8.30.32:1433;databaseName=DW_iSecureCloud_Empty_20181118" val dbConn = DriverManager....
yinweiwen/study
demo/datamover/src/main/scala/GZM.scala
Scala
mit
569
package org.dama.datasynth.common.generators.structure import org.apache.hadoop.conf.Configuration import scala.util.Try /** * Created by aprat on 20/04/17. */ object StructureGenerator { def getInstance( name : String ) : Try[StructureGenerator] = { Try(Class.forName(name).newInstance().asInstanceOf[Stru...
DAMA-UPC/DataSynth
src/main/scala/org/dama/datasynth/common/generators/structure/StructureGenerator.scala
Scala
gpl-3.0
447
/* * Copyright 2008-present MongoDB, 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 ag...
jyemin/mongo-java-driver
driver-scala/src/test/scala/org/mongodb/scala/ScalaPackageSpec.scala
Scala
apache-2.0
6,644
package lila.mod import lila.db.api._ import lila.db.Implicits._ import tube.modlogTube import play.api.libs.json.Json final class ModlogApi { def streamConfig(mod: String) = add { Modlog(mod, none, Modlog.streamConfig) } def engine(mod: String, user: String, v: Boolean) = add { Modlog(mod, user.some,...
TangentialAlan/lila
modules/mod/src/main/ModlogApi.scala
Scala
mit
2,978
package jp.co.bizreach.elasticsearch4s import JsonUtils._ sealed trait BulkAction { def jsonString: String } object BulkAction { case class Index(config: ESConfig, doc: AnyRef) extends BulkAction { def jsonString: String = { s"""{ "index" : { "_index" : "${config.indexName}", "_type" : "${config.typeN...
bizreach/elastic-scala-httpclient
elastic-scala-httpclient/src/main/scala/jp/co/bizreach/elasticsearch4s/BulkAction.scala
Scala
apache-2.0
1,680
package com.twitter.zipkin.storage.redis import com.google.common.io.Closer import com.twitter.finagle.redis.Client import com.twitter.util.{Duration, Future} import com.twitter.zipkin.common.Span import com.twitter.zipkin.storage._ import java.nio.ByteBuffer /** * @param client the redis client to use * @param ttl...
hydro2k/zipkin
zipkin-redis/src/main/scala/com/twitter/zipkin/storage/redis/RedisSpanStore.scala
Scala
apache-2.0
2,651
package es.weso.slang import es.weso.rdf.nodes.IRI import es.weso.shex.{ BNodeKind => ShExBNodeKind, BNodeLabel => ShExBNodeLabel, IRIKind => ShExIRIKind, IRILabel => ShExIRILabel, IntMax => ShExIntMax, Max => ShExMax, Star => ShExStar, _} import es.weso.slang // import es.weso.utils.EitherUtil...
labra/shaclex
modules/slang/src/main/scala/es/weso/slang/ShEx2SLang.scala
Scala
mit
4,344
package com.eevolution.context.dictionary.infrastructure.service import java.util.UUID import akka.NotUsed import com.eevolution.context.dictionary.domain._ import com.eevolution.context.dictionary.domain.model.TabTrl import com.eevolution.utils.PaginatedSequence import com.lightbend.lagom.scaladsl.api.{Service, Serv...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/service/TabTrlService.scala
Scala
gpl-3.0
1,978
/* * 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 ...
StyleTang/incubator-rocketmq-externals
rocketmq-spark/src/main/scala/org/apache/spark/sql/rocketmq/RocketMQOffsetReader.scala
Scala
apache-2.0
8,240
/* * 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 ...
jatin9896/incubator-carbondata
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/createTable/TestNonTransactionalCarbonTableJsonWriter.scala
Scala
apache-2.0
14,562
import scala.quoted.* object scalatest { inline def assert(condition: => Boolean): Unit = ${ assertImpl('condition, '{""}) } def assertImpl(cond: Expr[Boolean], clue: Expr[Any])(using Quotes): Expr[Unit] = { import quotes.reflect.* import util.* def isImplicitMethodType(tp: TypeRepr): Boolean = tp m...
dotty-staging/dotty
tests/run-macros/reflect-dsl/assert_1.scala
Scala
apache-2.0
1,636
/* * Copyright (C) 2016 Typesafe Inc. <http://www.typesafe.com> */ package akka.persistence.cassandra.snapshot import scala.concurrent.duration._ import akka.persistence.cassandra.testkit.CassandraLauncher import java.lang.{ Long => JLong } import java.lang.{ Integer => JInteger } import java.nio.ByteBuffer import a...
kpbochenek/akka-persistence-cassandra
src/test/scala/akka/persistence/cassandra/snapshot/CassandraSnapshotStoreSpec.scala
Scala
apache-2.0
4,802
package shield.routing import org.specs2.mutable.Specification import shield.config.{HttpServiceLocation, ServiceLocation} import spray.http.Uri import scala.util.Try class UpstreamServiceLocationSpec extends Specification { "UpstreamServiceLocation" should { "accept valid https urls" in { val svc = Http...
RetailMeNot/shield
src/test/scala/shield/routing/UpstreamServiceLocationSpec.scala
Scala
mit
3,285
class Ref[T] abstract class Outer {type T} trait D { val x: Ref[(_ <: Outer with Singleton)#T] val y: Ref[x_type # T] forSome {type x_type <: Outer with Singleton} = x }
ilinum/intellij-scala
testdata/resolve/testAllResolve/complex/Existential.scala
Scala
apache-2.0
173
/** * 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...
WillCh/cs286A
dataMover/kafka/core/src/test/scala/unit/kafka/message/MessageWriterTest.scala
Scala
bsd-2-clause
4,181
package de.choffmeister.secpwd import org.specs2.mutable._ import org.specs2.runner.JUnitRunner import org.junit.runner.RunWith import java.io.File import java.util.UUID import de.choffmeister.secpwd.utils.RichFile._ import de.choffmeister.secpwd.utils.SshConnectionInfo @RunWith(classOf[JUnitRunner]) class ConfigSpec...
choffmeister/secpwd
src/test/scala/de/choffmeister/secpwd/ConfigSpec.scala
Scala
apache-2.0
1,802
// Firebase Rules Generator // Bloom Technologies Inc. Copyright 2017 // // Authors: Raphael Javaux <[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...
RaphaelJ/firebase-rules-generator
src/main/scala/types/FbInteger.scala
Scala
gpl-3.0
1,210
package com.twitter.scalding import org.scalatest.WordSpec import com.twitter.scalding.typed.CumulativeSum._ class AddRankingWithCumulativeSum(args: Args) extends Job(args) { TypedPipe.from(TypedTsv[(String, Double)]("input1")) .map { case (gender, height) => (gender, (height, 1L)) } .cum...
nvoron23/scalding
scalding-core/src/test/scala/com/twitter/scalding/CumulitiveSumTest.scala
Scala
apache-2.0
2,729
package net.lshift.diffa.schema.cleaner import java.sql.SQLException import net.lshift.diffa.schema.hibernate.SessionHelper.sessionFactoryToSessionHelper import net.lshift.diffa.schema.environment.DatabaseEnvironment /** * Implements SchemaCleaner for MySQL databases. */ object MySqlSchemaCleaner extends SchemaCle...
lshift/diffa
schema/src/main/scala/net/lshift/diffa/schema/cleaner/MySqlSchemaCleaner.scala
Scala
apache-2.0
1,194
package com.nabijaczleweli.fancymagicks.render.entity import com.nabijaczleweli.fancymagicks.entity.EntityBugs import com.nabijaczleweli.fancymagicks.util.ResourceLocationFancyMagicks import cpw.mods.fml.relauncher.{SideOnly, Side} import net.minecraft.client.renderer.entity.RenderLiving import net.minecraft.entity.{E...
nabijaczleweli/Magicks
src/main/scala/com/nabijaczleweli/fancymagicks/render/entity/RenderBugs.scala
Scala
mit
1,229
/* Generated File */ package models.address import com.kyleu.projectile.models.result.data.{DataField, DataFieldModel, DataSummary} import com.kyleu.projectile.util.DateUtils import com.kyleu.projectile.util.JsonSerializers._ import java.time.ZonedDateTime object AddressRow { implicit val jsonEncoder: Encoder[Addre...
KyleU/boilerplay
app/models/address/AddressRow.scala
Scala
cc0-1.0
2,671
package com.levent.hive.udfs import org.apache.hadoop.hive.ql.exec.Description; import org.apache.hadoop.hive.ql.exec.UDF import java.net.URLDecoder @Description( name = "lurlDecode", value = "_FUNC_(string) URLDecode - decodes application/x-www-form-urlencoded type into string (UTF-8)", exten...
lserinol/Hive-udfs
src/main/scala/com/levent/hive/udfs/lurldecode.scala
Scala
gpl-3.0
569
/* * Copyright 2016 http4s.org * * 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 i...
rossabaker/http4s
testing/shared/src/test/scala/org/http4s/testing/NullOutStream.scala
Scala
apache-2.0
759
package fr.univnantes.vroom.control.update import fr.univnantes.vroom.control.Command import fr.univnantes.vroom.core.Systeme import fr.univnantes.vroom.core.dto.materiel.MaterielMobileDTO import fr.univnantes.vroom.datacontroller.Mediator /** * Commande d'update de materiel mobile disponible * @param system Obj...
Callidon/v-room
src/main/scala/fr/univnantes/vroom/control/update/UpdateMaterielMobileDisponibleCommande.scala
Scala
mit
1,127
// 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 ducttape.util import ducttape.syntax.AbstractSyntaxTree._ import ducttape.syntax.GrammarParser._ import org.scalat...
jhclark/ducttape
src/test/scala/ducttape/util/Tests.scala
Scala
mpl-2.0
1,751
/* * 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 ...
dbtsai/spark
mllib/src/main/scala/org/apache/spark/mllib/util/MLUtils.scala
Scala
apache-2.0
22,080
import data.{BezierCurve, Point} import math.Calculator /** * Created by nchampagne on 7/27/15. */ object Main { var offset: Int = 25; def main(args: Array[String]) { println("Hello, world!") val bezierCurve: BezierCurve = Calculator.calculateCubicBezierCurve(new Point(1, 2), new Point(5, 3), new Point...
Visitor15/bezierCurve-scala
src/main/scala/Main.scala
Scala
gpl-2.0
1,333
/* * Copyright 2015 the original author or authors. * @https://github.com/scouter-project/scouter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org...
scouter-project/scouter
scouter.server/src/main/scala/scouter/server/tagcnt/AlertTagCount.scala
Scala
apache-2.0
2,324
/* * 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
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/BroadcastHashJoin.scala
Scala
apache-2.0
6,059
package com.github.libsml.optimization.lbfgs import com.github.libsml.commons.LibsmlException import com.github.libsml.math.linalg.{BLAS, Vector} import com.github.libsml.math.util.VectorUtils /** * Created by huangyu on 15/9/14. */ class SingleDirectSearch(val m: Int) extends DirectSearch { require(m > 0, s"Sin...
libsml/libsml
optimization/src/main/scala/com/github/libsml/optimization/lbfgs/SingleDirectSearch.scala
Scala
apache-2.0
1,676
package com.appliedscala.generator.services class PreviewService { private val PreviewSplitter = """\[\/\/\]\: \# \"__PREVIEW__\"""" def extractPreview(contentMd: String): Option[String] = { val contentLength = contentMd.length val previewParts = contentMd.split(PreviewSplitter) if (previewParts.lengt...
denisftw/s2gen
src/main/scala/com/appliedscala/generator/services/PreviewService.scala
Scala
mit
574
package com.sksamuel.elastic4s.monix import com.sksamuel.elastic4s.http.{ElasticRequest, Executor, HttpClient, HttpResponse} import monix.eval.Task import monix.execution.Cancelable class TaskExecutor extends Executor[Task] { override def exec(client: HttpClient, request: ElasticRequest): Task[HttpResponse] = { ...
Tecsisa/elastic4s
elastic4s-monix/src/main/scala/com/sksamuel/elastic4s/monix/TaskExecutor.scala
Scala
apache-2.0
520
/* The MIT License (MIT) Copyright (c) 2015-2016 Raymond Dodge 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, m...
rayrobdod/div-reduce
webpage/src/main/scala/WebConverter.scala
Scala
mit
1,723
package com.twitter.finagle.stats import com.twitter.app.GlobalFlag import com.twitter.finagle.http.{HttpMuxHandler, Route, RouteIndex} import com.twitter.logging.{Level, Logger} import com.twitter.util.lint.{Category, GlobalRules, Issue, Rule} import java.util.concurrent.atomic.LongAdder import scala.collection.JavaC...
mkhq/finagle
finagle-stats/src/main/scala/com/twitter/finagle/stats/MetricsStatsReceiver.scala
Scala
apache-2.0
5,472
/* * 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 ...
SparklineData/spark-druid-indexer
src/main/scala/org/sparkline/druid/index/service/DruidIndexer.scala
Scala
apache-2.0
1,655
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.tools.nsc impor...
scala/scala
src/scaladoc/scala/tools/nsc/ScalaDoc.scala
Scala
apache-2.0
3,725
/* * 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-execution/jvm/src/main/scala/monix/execution/schedulers/AdaptedThreadPoolExecutorMixin.scala
Scala
apache-2.0
1,637
package imgdetect import org.opencv.core.Mat import org.opencv.core.MatOfKeyPoint import org.opencv.features2d.FeatureDetector import org.opencv.features2d.DescriptorExtractor import org.opencv.highgui.Highgui import org.opencv.features2d.DescriptorMatcher import org.opencv.core.MatOfDMatch import org.opencv.features2...
flaviusanton/logo-detection
src/main/scala/imgdetect/LogoDetector.scala
Scala
mit
3,360
/* * BuildUtil.scala * * Updated: Dec 3, 2014 * * Copyright (c) 2014, CodeMettle */ import sbt.{CrossVersion, ModuleID} object BuildUtil { implicit class ExcludeModId(val u: ModuleID) extends AnyVal { def excludeCross(group: String, art: String, scalaVersion: String) = { val suff = Cross...
CodeMettle/akka-snmp4j
project/BuildUtil.scala
Scala
apache-2.0
601
package io.buoyant.namer.fs import com.twitter.finagle.{Addr, Address, Path, Stack} import com.twitter.finagle.addr.WeightedAddress import com.twitter.finagle.util.LoadService import io.buoyant.config.Parser import io.buoyant.config.types.Directory import io.buoyant.namer.{NamerConfig, NamerInitializer, NamerTestUtil}...
denverwilliams/linkerd
namer/fs/src/test/scala/io/buoyant/namer/fs/FsTest.scala
Scala
apache-2.0
3,140
/* * Copyright 2013-2015 Websudos, Limited. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of c...
levinson/phantom
phantom-dsl/src/test/scala/com/websudos/phantom/tables/TimeSeriesTable.scala
Scala
bsd-2-clause
3,169
package com.twitter.finagle.mux import com.twitter.conversions.time._ import com.twitter.finagle._ import com.twitter.finagle.mux.Message._ import com.twitter.finagle.mux.lease.exp.{Lessee, Lessor} import com.twitter.finagle.netty3.{ChannelBufferBuf, BufChannelBuffer} import com.twitter.finagle.stats.InMemoryStatsRece...
jamescway/finagle
finagle-mux/src/test/scala/com/twitter/finagle/mux/EndToEndTest.scala
Scala
apache-2.0
6,066