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.aergonaut.lifeaquatic.tileentity import java.util import cofh.api.fluid.ITankContainerBucketable import cofh.api.tileentity.ITileInfo import cofh.lib.util.helpers.{FluidHelper, ItemHelper} import com.aergonaut.lifeaquatic.recipe.VatRecipe import net.minecraft.entity.player.EntityPlayer import net.minecraf...
aergonaut/LifeAquatic
src/main/scala/com/aergonaut/lifeaquatic/tileentity/TileEntityVat.scala
Scala
mit
11,549
class Outer { def assertNoFields(c: Class[_]): Unit = { assert(c.getDeclaredFields.isEmpty) } def assertHasOuter(c: Class[_]): Unit = { assert(c.getDeclaredFields.exists(_.getName.contains("outer"))) } class Member final class FinalMember def test: Unit = { assertHasOuter(classOf[Member]) ...
scala/scala
test/files/run/t9408.scala
Scala
apache-2.0
2,341
package cc.factorie.app.nlp.ner /** * @author Kate Silverstein * created on 3/23/15 */ import org.scalatest._ import cc.factorie.app.nlp.load._ class TestNerTaggers extends FlatSpec { val conllTestFilename = this.getClass.getResource("/conll-ner-input").getPath val ontoTestFilename = this.getClass.ge...
hlin117/factorie
src/test/scala/cc/factorie/app/nlp/ner/TestNerTaggers.scala
Scala
apache-2.0
1,831
package extracells.common.integration import net.minecraftforge.common.config.Configuration class Integration { def loadConfig(config: Configuration): Unit = { for (mod <- Mods.values) mod.loadConfig(config) } def preInit(): Unit = { if (Mods.IGW.correctSide() && Mods.IGW.shouldLoad){} //TO...
ruifung/ExtraCells2
src/main/scala/extracells/common/integration/Integration.scala
Scala
mit
442
package one.lockstep.vault import one.lockstep.util.crypto._ import one.lockstep.util._ import com.softwaremill.quicklens._ case class VaultEdit(unlockedContents: UnlockedVault.Contents, pendingPasscode: Option[Bytes] = None) { def put(entryId: String, entrySpec: sdk.Spec): VaultEdit = { import Ciphersuite128....
lockstep-one/vault
vault-client/src/main/scala/one/lockstep/vault/VaultEdit.scala
Scala
agpl-3.0
2,306
/** * * Device * Ledger wallet * * Created by Pierre Pollastri on 16/01/15. * * The MIT License (MIT) * * Copyright (c) 2015 Ledger * * 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 Softw...
Morveus/ledger-wallet-android
app/src/main/scala/com/ledger/ledgerwallet/models/PairedDongle.scala
Scala
mit
4,634
package com.gossiperl.client.actors import akka.actor.SupervisorStrategy.Escalate import akka.actor._ import com.gossiperl.client.exceptions.GossiperlClientException import com.gossiperl.client.{GossiperlClientProtocol, GossiperlClient, OverlayConfiguration} import scala.collection.mutable.{ Map => MutableMap } obje...
gossiperl/gossiperl-client-scala
src/main/scala/com/gossiperl/client/actors/Supervisor.scala
Scala
mit
3,240
package org.jetbrains.plugins.scala package lang package psi package api package toplevel import javax.swing.Icon import com.intellij.extapi.psi.StubBasedPsiElementBase import com.intellij.navigation.ItemPresentation import com.intellij.openapi.editor.colors.TextAttributesKey import com.intellij.psi._ import com.inte...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/api/toplevel/ScNamedElement.scala
Scala
apache-2.0
4,195
/* * Copyright 2010 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 t...
mosesn/util
util-logging/src/main/scala/com/twitter/logging/FileHandler.scala
Scala
apache-2.0
8,974
/* * 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
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/InsertAdaptiveSparkPlan.scala
Scala
apache-2.0
7,650
/* * 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 ...
lzbj/openwhisk
tests/src/test/scala/whisk/core/cli/test/SequenceMigrationTests.scala
Scala
apache-2.0
5,462
/* Copyright 2014 Reo_SP 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 dist...
reo7sp/BoardPP
src/main/java/reo7sp/boardpp/board/Canvas.scala
Scala
apache-2.0
1,604
/*§ =========================================================================== KnapScal - Core =========================================================================== Copyright (C) 2015-2016 Gianluca Costa =========================================================================== Licensed under the Ap...
giancosta86/KnapScal-core
src/main/scala/info/gianlucacosta/knapscal/knapsack/Item.scala
Scala
apache-2.0
1,414
package eu.timepit.refined.internal import eu.timepit.refined.api.{RefType, Validate} import eu.timepit.refined.macros.RefineMacro @deprecated( "RefineMFullyApplied has been replaced in favor or RefinedTypeOps. " + "Replace 'new RefineMFullyApplied[F, T, P]' with 'new RefinedTypeOps[F[T, P], T]'.", "0.9.1" ) ...
fthomas/refined
modules/core/shared/src/main/scala-3.0-/eu/timepit/refined/internal/RefineMFullyApplied.scala
Scala
mit
481
package com.svds.kafka.connect.opentsdb import org.scalatest.FlatSpec import scala.collection.JavaConversions._ import scala.collection.mutable.Map class OpenTsdbSinkConnectorSpec extends FlatSpec { private val connector = new OpenTsdbSinkConnector it should "create a list of the number of tasks configurations...
jeff-svds/kafka-connect-opentsdb
src/test/scala/com/svds/kafka/connect/opentsdb/OpenTsdbSinkConnectorSpec.scala
Scala
apache-2.0
970
package com.twitter.finagle.thrift.service import com.twitter.finagle.Filter /** * Used in conjunction with a `ServicePerEndpoint` builder to allow for filtering * of a `ServicePerEndpoint`. */ trait Filterable[+T] extends com.twitter.finagle.service.Filterable[T] { /** * Prepend the given type-agnostic [[Fi...
twitter/finagle
finagle-thrift/src/main/scala/com/twitter/finagle/thrift/service/Filterable.scala
Scala
apache-2.0
384
/* * 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/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala
Scala
apache-2.0
108,983
package com.wavesplatform.it.asset import com.typesafe.config.Config import com.wavesplatform.common.state.ByteStr import com.wavesplatform.common.utils.EitherExt2 import com.wavesplatform.features.BlockchainFeatures import com.wavesplatform.it.NodeConfigs import com.wavesplatform.it.NodeConfigs.Default import com.wav...
wavesplatform/Waves
node-it/src/test/scala/com/wavesplatform/it/asset/LeaseActionSuite.scala
Scala
mit
3,362
package com.sfxcode.sapphire.extension.concurrent.akka import java.util.concurrent.{ ExecutorService, ThreadFactory } import akka.dispatch.{ DispatcherPrerequisites, ExecutorServiceConfigurator, ExecutorServiceFactory } import com.typesafe.config.Config class JavaFXEventThreadExecutorServiceConfigurator(config: Conf...
sfxcode/sapphire-extension
src/main/scala/com/sfxcode/sapphire/extension/concurrent/akka/JavaFXEventThreadExecutorServiceConfigurator.scala
Scala
apache-2.0
657
package com.redis.serialization object Format { def apply(f: PartialFunction[Any, Any]): Format = new Format(f) implicit val default: Format = new Format(Map.empty) def formatDouble(d: Double, inclusive: Boolean = true) = (if (inclusive) ("") else ("(")) + { if (d.isInfinity) { if (d > 0.0) "...
Tjoene/thesis
Case_Programs/scala-redis-2.9-pre-scala-2.10/src/main/scala/com/redis/Serialization.scala
Scala
gpl-2.0
1,750
/* * 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 ...
HuaweiBigData/carbondata
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/schema/CarbonAlterTableDataTypeChangeCommand.scala
Scala
apache-2.0
6,360
package mr.merc.ai import mr.merc.map.hex.TerrainHex import mr.merc.map.terrain.TerrainType._ import mr.merc.unit.Soldier import mr.merc.players.Player import org.scalatest._ import mr.merc.unit.AttackAttribute._ import org.scalatest.funsuite.AnyFunSuite import org.scalatest.matchers.should.Matchers class AttackResul...
RenualdMarch/merc
src/test/scala/mr/merc/ai/AttackResultPredictorTest.scala
Scala
gpl-3.0
5,713
package com.twitter.finagle.stats import com.twitter.ostrich.Stats class OstrichStatsReceiver extends StatsReceiverWithCumulativeGauges { val repr: AnyRef = Stats protected[this] def registerGauge(name: Seq[String], f: => Float) { Stats.makeGauge(variableName(name)) { f } } protected[this] def deregiste...
enachb/finagle_2.9_durgh
finagle-ostrich/src/main/scala/com/twitter/finagle/stats/OstrichStatsReceiver.scala
Scala
apache-2.0
792
package me.lachlanap.toc4pdf.proc import org.apache.pdfbox.pdmodel.PDDocument import org.apache.pdfbox.pdmodel.interactive.action.`type`._ import org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination._ import org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem import me.lachl...
thorinii/toc4pdf
src/main/scala/me/lachlanap/toc4pdf/proc/BookmarkParser.scala
Scala
mit
2,321
/* * 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 ...
witgo/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/NestedColumnAliasing.scala
Scala
apache-2.0
12,226
package main.scala import org.apache.spark.SparkContext import org.apache.spark.SparkConf import org.apache.spark.streaming.twitter._ import org.apache.spark.streaming._ import org.apache.spark.SparkContext._ import twitter4j.Status object TweetMain { def main(args: Array[String]) = { System.setProperty("twitt...
CoE4BD/TwitterTextAnalytics-SparkStreaming
TweetMain.scala
Scala
apache-2.0
1,793
package ict.spark.mllib.optimization import org.apache.spark.Logging import org.apache.spark.rdd.RDD import org.apache.spark.mllib.linalg.{ Vectors, Vector } import ict.spark.mllib.linalg.MyBLAS._ import scala.collection.mutable.ArrayBuffer trait MSVMOptimizer extends Serializable { def optimize(data: RDD[(Double, ...
opinion-extraction-propagation/TASC-PTASC
src/main/scala/ict/spark/mllib/optimization/Optimizer.scala
Scala
apache-2.0
6,466
package de.frosner.broccoli.controllers import de.frosner.broccoli.models._ import de.frosner.broccoli.services.WebSocketService.Msg import de.frosner.broccoli.services._ import de.frosner.broccoli.RemoveSecrets.ToRemoveSecretsOps import de.frosner.broccoli.auth.{Account, Role} import de.frosner.broccoli.instances.Nom...
FRosner/cluster-broccoli
server/src/test/scala/de/frosner/broccoli/controllers/WebSocketControllerSpec.scala
Scala
apache-2.0
22,748
package dotty.tools package dotc import core.Contexts._ import reporting.Reporter import io.AbstractFile import scala.annotation.internal.sharable /** A main class for running compiler benchmarks. Can instantiate a given * number of compilers and run each (sequentially) a given number of times * on the same sour...
dotty-staging/dotty
compiler/src/dotty/tools/dotc/Bench.scala
Scala
apache-2.0
2,104
/** * Created by Romain Reuillon on 02/11/16. * * 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. * ...
ISCPIF/doors
server/src/main/scala/fr/iscpif/doors/server/db/package.scala
Scala
agpl-3.0
5,874
package com.nutomic.ensichat.fragments import android.content.SharedPreferences.OnSharedPreferenceChangeListener import android.content.{Intent, SharedPreferences} import android.os.Bundle import android.preference.{PreferenceFragment, PreferenceManager} import com.nutomic.ensichat.R import com.nutomic.ensichat.activi...
Nutomic/ensichat
android/src/main/scala/com/nutomic/ensichat/fragments/SettingsFragment.scala
Scala
mpl-2.0
2,085
/* * Copyright (C) 2016 Nikos Katzouris * * 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) any later version. * * This program is d...
nkatzz/OLED
src/main/scala/app/runutils/Globals.scala
Scala
gpl-3.0
25,519
/* * Copyright 2011-2014 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...
EBPI/yaidom
src/main/scala/nl/ebpi/yaidom/convert/YaidomToSaxEventsConversions.scala
Scala
apache-2.0
7,458
package org.pgscala.embedded import java.io.File import java.net.{HttpURLConnection, URL} import java.security.MessageDigest import java.text.NumberFormat import java.util.regex.Pattern import com.typesafe.scalalogging.StrictLogging import org.apache.commons.io.FileUtils import org.pgscala.embedded.Util._ import scal...
melezov/pgscala-embedded
src/test/scala/org/pgscala/embedded/PostgresSizeUpdater.scala
Scala
mit
3,778
package io.github.binaryfoo.lagotto import org.joda.time.DateTime import scala.collection.AbstractIterator case class PivotedLogEntry(row: Map[String, String]) extends LogEntry { override def timestamp: DateTime = null override def source: SourceRef = null override def exportAsSeq: Seq[(String, String)] = row...
binaryfoo/lagotto
src/main/scala/io/github/binaryfoo/lagotto/PivotedLogEntry.scala
Scala
mit
4,524
package io.iohk.ethereum.utils import java.math.BigInteger import java.nio.{ByteBuffer, ByteOrder} import akka.util.ByteString import scala.util.Random object ByteUtils { /** * Calculates number of matching bytes from the beginning of both arrays. * Due to performance reasons needs to be as fast as possi...
input-output-hk/etc-client
src/main/scala/io/iohk/ethereum/utils/ByteUtils.scala
Scala
mit
6,606
/* * 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 ...
mzl9039/spark
core/src/main/scala/org/apache/spark/scheduler/LiveListenerBus.scala
Scala
apache-2.0
8,100
package clasp.core.sdktools import scala.language.postfixOps import scala.concurrent.duration._ import scala.sys.process._ import scala.util.matching.Regex import org.slf4j.LoggerFactory object Command { lazy val log = LoggerFactory.getLogger(getClass()) import log.{error, debug, info, trace} def run(command:...
hamiltont/clasp
src/clasp/core/sdktools/command.scala
Scala
mit
1,647
package org.scalawiki.copyvio import org.scalawiki.dto.Page import org.scalawiki.dto.cmd.Action import org.scalawiki.dto.cmd.query.prop._ import org.scalawiki.dto.cmd.query.{PageIdsParam, Query} import org.scalawiki.http.HttpClient import org.scalawiki.query.QueryLibrary import org.scalawiki.{MwBot, WithBot} import pl...
intracer/scalawiki
scalawiki-bots/src/main/scala/org/scalawiki/copyvio/CopyVio.scala
Scala
apache-2.0
2,276
package entities trait BaseEntity { val id: Long def isValid: Boolean = true }
Kanris826/spray-slick-swagger
src/main/scala/entities/BaseEntity.scala
Scala
apache-2.0
84
package net.mentalarray.doozie.Tasks /** * Created by bwilson on 12/16/14. */ class FileBuilderTask(Jobname: String) extends WorkflowTask(Jobname) { // Set defaults and accessors for the Builder Runner. private var _srcSys: String = "hdfs" private var _destSys: String = "hdfs" private var _inPath: String =...
antagonist112358/tomahawk
workflow-engine/src/net/mentalarray/doozie/Tasks/FileBuilderTask.scala
Scala
apache-2.0
1,937
/* * 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 ...
witgo/spark
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala
Scala
apache-2.0
68,386
package models.services import javax.inject.Inject import java.util.UUID import models._ import models.daos._ import shared.Util.reverseEffect import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicits.global /** * Handles majors (student side major) * Collection of functions to get majors...
yoo-haemin/hufs-planner
project/app/models/services/MajorServiceImpl.scala
Scala
agpl-3.0
2,776
/* * 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 ...
WindCanDie/spark
external/avro/src/test/scala/org/apache/spark/sql/avro/AvroSuite.scala
Scala
apache-2.0
53,335
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
gioenn/xSpark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala
Scala
apache-2.0
9,090
package de.tototec.sbuild.internal import scala.annotation.tailrec import de.tototec.sbuild.Logger import de.tototec.sbuild.ProjectConfigurationException class DependentClassesOrderer { private[this] val log = Logger[DependentClassesOrderer] def orderClasses(classes: Seq[Class[_]], dependencies: Seq[(Class[_], ...
SBuild-org/sbuild
de.tototec.sbuild/src/main/scala/de/tototec/sbuild/internal/DependentClassesOrderer.scala
Scala
apache-2.0
1,568
/* * SimpleMovieTest.scala * Simple movie example tests. * * 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...
jyuhuan/figaro
Figaro/src/test/scala/com/cra/figaro/test/example/SimpleMovieTest.scala
Scala
bsd-3-clause
5,789
package forcomp import scala.collection.mutable object Anagrams { /** A word is simply a `String`. */ type Word = String /** A sentence is a `List` of words. */ type Sentence = List[Word] /** `Occurrences` is a `List` of pairs of characters and positive integers saying * how often the character appe...
yurii-khomenko/fpScalaSpec
c1w6forcomp/src/main/scala/forcomp/Anagrams.scala
Scala
gpl-3.0
7,252
package org.jetbrains.plugins.scala package lang package psi package impl package toplevel package templates import com.intellij.lang.ASTNode import com.intellij.psi.PsiClass import org.jetbrains.plugins.scala.JavaArrayFactoryUtil.ScTemplateParentsFactory import org.jetbrains.plugins.scala.extensions._ import org.jetb...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/toplevel/templates/ScExtendsBlockImpl.scala
Scala
apache-2.0
10,038
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
maropu/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/FileScan.scala
Scala
apache-2.0
8,248
/** * 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...
vkroz/kafka
core/src/test/scala/integration/kafka/api/ProducerSendTest.scala
Scala
apache-2.0
16,095
/* * The MIT License (MIT) * * Copyright (c) 2016 Algolia * http://www.algolia.com/ * * 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...
algolia/algoliasearch-client-scala
src/main/scala/algolia/dsl/DictionaryDsl.scala
Scala
mit
6,226
/* * Copyright (C) 2016 DANS - Data Archiving and Networked Services (info@dans.knaw.nl) * * 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 ...
DANS-KNAW/easy-license-creator
src/test/scala/nl/knaw/dans/easy/agreement/fixture/FixedDateTime.scala
Scala
apache-2.0
1,141
/* * Copyright (c) 2014-2015 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/iglu-utils
src/main/scala/com.snowplowanalytics/schemaddl/generators/redshift/TypeSuggestions.scala
Scala
apache-2.0
8,314
package util import scala.concurrent._ import ExecutionContext.Implicits.global import org.apache.commons.mail.{DefaultAuthenticator, HtmlEmail} import org.slf4j.LoggerFactory import app.Context import service.{AccountService, RepositoryService, IssuesService, SystemSettingsService} import servlet.Database ...
takuok/gitbucket
src/main/scala/util/Notifier.scala
Scala
apache-2.0
4,346
/** * Copyright 2009 Jorge Ortiz * * 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...
jorgeortiz85/scala-javautils
src/main/scala/org/scala_tools/javautils/s2j/RichSMutableSet.scala
Scala
apache-2.0
1,142
package x7c1.wheat.modern.database.selector import android.database.sqlite.SQLiteDatabase import x7c1.wheat.macros.reify.{HasConstructor, New} import x7c1.wheat.modern.database.selector.SelectorProvidable.CanReify import scala.language.reflectiveCalls trait CanProvideSelector[A]{ type Selector def createFrom(db...
x7c1/Linen
wheat-modern/src/main/scala/x7c1/wheat/modern/database/selector/CanProvideSelector.scala
Scala
mit
829
package looty package views.loot import looty.model.{ComputedItem, LootContainerId} import org.scalajs.jquery.JQuery ////////////////////////////////////////////////////////////// // Copyright (c) 2014 Ben Jackman, Jeff Gomberg // All Rights Reserved // please contact ben@jackman.biz or jeff@cgtanalytics.com // for ...
benjaminjackman/looty
looty/src/main/scala/looty/views/loot/Container.scala
Scala
gpl-2.0
2,127
/* * Copyright 2020 Precog Data * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
quasar-analytics/quasar
impl/src/main/scala/quasar/impl/storage/mapdb/MapDbPrefixStore.scala
Scala
apache-2.0
3,939
/* * 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 ...
shaneknapp/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala
Scala
apache-2.0
4,748
package com.hackathon import org.joda.time.DateTime case class IssueType(issueType: Long, name: String) object IssueType { def apply(issueType: Long): IssueType = issueType match { case 1 => IssueType(1, "Glass on road") case 2 => IssueType(2, "Construction") case 3 => IssueType(3, "Car o...
norefle/hackathon-locations-backend
src/main/scala/com/hackathon/Issue.scala
Scala
mit
1,469
package ch.ltouroumov.modularmachines.common.blocks import ch.ltouroumov.modularmachines.Settings import ch.ltouroumov.modularmachines.ModularMachines import ch.ltouroumov.modularmachines.common.texture.ConnectedTextureHandler import net.minecraft.block.Block import net.minecraft.block.material.Material import net.min...
ltouroumov/modular-machines
src/main/scala/ch/ltouroumov/modularmachines/common/blocks/MachineGlass.scala
Scala
gpl-2.0
1,348
package scala.quoted /** Excetion thrown when an Expr or Type is used ouside of the scope where it is valid */ class ScopeException(msg: String) extends Exception(msg)
som-snytt/dotty
library/src/scala/quoted/ScopeException.scala
Scala
apache-2.0
169
package pl.touk.nussknacker.ui.definition import pl.touk.nussknacker.engine.ModelData import pl.touk.nussknacker.engine.api.{FragmentSpecificData, MetaData} import pl.touk.nussknacker.engine.api.async.{DefaultAsyncInterpretationValue, DefaultAsyncInterpretationValueDeterminer} import pl.touk.nussknacker.engine.api.com...
TouK/nussknacker
ui/server/src/main/scala/pl/touk/nussknacker/ui/definition/UIProcessObjectsFactory.scala
Scala
apache-2.0
11,548
/* * 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 ...
minixalpha/spark
mllib/src/test/scala/org/apache/spark/ml/regression/LinearRegressionSuite.scala
Scala
apache-2.0
41,611
package edu.gemini.qpt.core.listeners import edu.gemini.ags.api.AgsGuideQuality._ import java.beans.PropertyChangeEvent import edu.gemini.ags.api.AgsAnalysis import edu.gemini.qpt.core.Marker.Severity import edu.gemini.qpt.core.Variant import edu.gemini.qpt.core.util.MarkerManager import edu.gemini.spModel.gemini.ge...
arturog8m/ocs
bundle/edu.gemini.qpt.client/src/main/scala/edu/gemini/qpt/core/listeners/AgsAnalysisListener.scala
Scala
bsd-3-clause
2,133
package utest.framework import scala.concurrent.{ExecutionContext, Future} /** * An immutable tree with each node containing a value, and a `Seq` of * children. Provides all normal `Seq` functionality as well as some tree * specific methods. */ case class Tree[+T](value: T, children: Tree[T]*) { /** * The nu...
cuzfrog/scala_sbt_template
macros/src/main/scala/utest/framework/Tree.scala
Scala
apache-2.0
2,156
package controllers import play.api.mvc._ import play.api.libs.json._ /** * Used for testing stuff. */ object TestController extends Controller { object Model { import play.api.libs.functional.syntax._ import org.apache.commons.codec.binary.Base64 import play.api.data.validation.ValidationError ...
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/test/integrationtest-scala/app/controllers/TestController.scala
Scala
mit
2,608
package org.bitcoins.core.protocol.ln.node import org.bitcoins.core.crypto.ECPublicKey import org.bitcoins.core.protocol.NetworkElement import org.bitcoins.core.util.Factory import scodec.bits.ByteVector /** * `NodeId` is simply a wrapper for * [[org.bitcoins.core.crypto.ECPublicKey ECPublicKey]]. * This public...
bitcoin-s/bitcoin-s-core
core/src/main/scala/org/bitcoins/core/protocol/ln/node/NodeId.scala
Scala
mit
920
/* * Copyright 2016 Alexey Kardapoltsev * * 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...
kardapoltsev/astparser
src/test/scala/com/github/kardapoltsev/astparser/parser/http/HttpLexerSpec.scala
Scala
apache-2.0
2,484
package cmwell.analytics.main import java.nio.file.Paths import akka.actor.ActorSystem import akka.stream.ActorMaterializer import cmwell.analytics.data.{DataWriterFactory, IndexWithSystemFields} import cmwell.analytics.downloader.PartitionedDownloader import cmwell.analytics.util.{DiscoverEsTopology, FindContactPoin...
bryaakov/CM-Well
tools/dataConsistencyTool/extract-index-from-es/src/main/scala/cmwell/analytics/main/DumpSystemFieldsFromEs.scala
Scala
apache-2.0
3,668
package eu.timepit.refined import eu.timepit.refined.api.Inference import eu.timepit.refined.generic.Equal import eu.timepit.refined.numeric.Greater import eu.timepit.refined.string.StartsWith import org.scalacheck.Prop._ import org.scalacheck.Properties class GenericInferenceSpec extends Properties("GenericInference...
fthomas/refined
modules/core/shared/src/test/scala-3.0-/eu/timepit/refined/GenericInferenceSpec.scala
Scala
mit
825
/* * 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...
wangyixiaohuihui/spark2-annotation
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statsEstimation/AggregateEstimation.scala
Scala
apache-2.0
2,886
package week7.bloxorz /** * A main object that can be used to execute the Bloxorz solver */ object Bloxorz { /** * A level constructed using the `InfiniteTerrain` trait which defines * the terrain to be valid at every position. */ object InfiniteLevel extends Solver with InfiniteTerrain { val start...
zapstar/funprog
fp-scala/src/week7/bloxorz/Bloxorz.scala
Scala
mit
1,056
/* * 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 ...
andrewor14/iolap
sql/core/src/test/scala/org/apache/spark/sql/DataFrameAggregateSuite.scala
Scala
apache-2.0
5,253
package juan.ddd.proto.contract.routing import juan.ddd.proto.domain.routing._ trait UserRepository { def nextIdentity: UserId def userOfId(id: UserId): Option[User] def remove(user: User): Unit def save(user: User): Unit }
yoskhdia/ddd-proto
src/main/scala/juan/ddd/proto/contract/routing/UserRepository.scala
Scala
mit
238
package org.jetbrains.plugins.scala package codeInspection.typeChecking import com.intellij.codeInspection.LocalInspectionTool import org.jetbrains.plugins.scala.codeInspection.ScalaLightInspectionFixtureTestAdapter /** * Nikolay.Tropin * 9/26/13 */ class ComparingUnrelatedTypesInspectionTest extends ScalaLightIns...
LPTK/intellij-scala
test/org/jetbrains/plugins/scala/codeInspection/typeChecking/ComparingUnrelatedTypesInspectionTest.scala
Scala
apache-2.0
5,190
/* * Copyright 2021 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/pensions-lifetime-allowance-frontend
app/forms/CurrentPensionsForm.scala
Scala
apache-2.0
1,458
// See LICENSE.txt for license details. package problems import chisel3._ import chisel3.util._ // Problem: // // Create a composition (chain) of two filters: // // SingleFilter - indicates that input is single decimal digit // (i.e. is less or equal to 9) // // EvenFilter - indicates that input is even number // a...
timtian090/Playground
chiselTutorial/src/main/scala/problems/SingleEvenFilter.scala
Scala
mit
1,332
/** * This file is part of mycollab-services. * * mycollab-services 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) any later version. * * mycolla...
uniteddiversity/mycollab
mycollab-services/src/main/scala/com/esofthead/mycollab/module/project/esb/DeleteProjectEvent.scala
Scala
agpl-3.0
957
package org.jetbrains.plugins.scala package codeInsight package intention package types import org.jetbrains.plugins.scala.codeInsight.intentions.ScalaIntentionTestBase import org.jetbrains.plugins.scala.debugger.{ScalaVersion, Scala_2_12} class ToggleTypeAnnotationIntentionTest extends ScalaIntentionTestBase { ov...
jastice/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/codeInsight/intention/types/ToggleTypeAnnotationIntentionTest.scala
Scala
apache-2.0
3,434
package io.protoless.tests.samples case object Colors extends Enumeration { type Color = Value val Black, White, Green = Value }
julien-lafont/protoless
modules/testing/src/main/scala/io/protoless/tests/samples/Colors.scala
Scala
apache-2.0
134
import stainless.lang._ import stainless.annotation._ object SimpleImperative { @mutable abstract class A { def f(): Unit } def proc(a: A) = { a.f() } case class B(var x: BigInt) extends A { def f(): Unit = { x = x + 1 } } def theorem() = { val a = B(0) proc(a) asser...
epfl-lara/stainless
frontends/benchmarks/imperative/invalid/SimpleImperative.scala
Scala
apache-2.0
353
package chiselutils.utils import Chisel._ object MemShiftRegister { def apply[ T <: Data ]( in : T, n : Int, en : Bool = Bool(true) ) : T = { val memSR = Module( new MemShiftRegister( in, n ) ) memSR.io.en := en memSR.io.in := in memSR.io.out } } class MemShiftRegister[ T <: Data ]( genType : ...
da-steve101/chisel-utils
src/main/scala/chiselutils/utils/MemShiftRegister.scala
Scala
lgpl-3.0
1,397
package nak.classify import nak.nnet.{NNObjective, NeuralNetwork} import breeze.util.{Encoder, Index} import breeze.linalg._ import nak.data.Example import breeze.numerics._ import breeze.optimize.FirstOrderMinimizer.OptParams /** * A NeuralNetwork classifier uses a neural network to get unnormalize log probabilitie...
scalanlp/nak
src/main/scala/nak/classify/NNetClassifier.scala
Scala
apache-2.0
2,121
/* * Copyright 2001-2008 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...
yyuu/scalatest
src/test/scala/org/scalatest/SpecSpec.scala
Scala
apache-2.0
29,294
package persistence.entities import utils.Profile case class Supplier(id: Option[Int],name: String,desc: String) case class SimpleSupplier(name: String,desc: String) trait Suppliers extends Profile{ import profile.api._ class Suppliers(tag: Tag) extends Table[Supplier](tag, "SUPPLIERS") { def id = column...
edvorkin/simple-docker-scala-app
src/main/scala/persistence/entities/Suppliers.scala
Scala
apache-2.0
556
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
jooooooon/rudder
rudder-core/src/main/scala/com/normation/rudder/services/eventlog/EventLogDetailsService.scala
Scala
agpl-3.0
37,377
/* * 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 package reflect ...
martijnhoekstra/scala
src/reflect/scala/reflect/internal/Constants.scala
Scala
apache-2.0
11,655
/* * Copyright 2021 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/amls-frontend
app/config/SessionCache.scala
Scala
apache-2.0
1,927
package io.udash.testing import org.scalatest.BeforeAndAfterAll import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec trait UdashSharedTest extends AnyWordSpec with Matchers with BeforeAndAfterAll { }
UdashFramework/udash-core
utils/src/test/scala/io/udash/testing/UdashSharedTest.scala
Scala
apache-2.0
237
package rssreader.core import java.time.LocalDateTime import scala.io.Source import rssreader.utils.tests.TestSpec class FeedSpec extends TestSpec { behavior of "Parsing valid RSS" it should "correctly parse fields" in { val result = Feed.parse(fileExampleFeed) result shouldBe 'good result.get sho...
Dev25/RSSReader
src/test/scala/rssreader/core/FeedSpec.scala
Scala
mit
3,528
package gh.test.gh2011b.payload import gh2011b.models.GistEventPayload import net.liftweb.json._ import org.scalatest.{Matchers, FlatSpec} class GistEventPayloadTest extends FlatSpec with Matchers { "A valid GistEvent payload" must "be correctly parsed" in { val json = parse( """ | { ...
mgoeminne/github_etl
src/test/scala/gh/test/gh2011b/payload/GistEventPayloadTest.scala
Scala
mit
609
/** * Created on 2011/04/16 * Copyright (c) 2010-2011, Wei-ju Wu. * 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,...
logicmoo/zmpp2
zmpp-htmltads/src/test/scala/org/zmpp/tads/html/TokenizerTest.scala
Scala
bsd-3-clause
2,784
package com.github.jackcviers import akka.actor.{Actor, ActorSystem, Props} class BadShakespearean extends Actor { def receive = { case "Good Morning" ⇒ println("Him: Forsooth 'tis the 'morn, but mourneth for thou doest I do!") case "You're terrible" ⇒ println("Him: Yup") } } class Wood extends Actor { ...
jackcviers/learning-akka
src/main/scala/com/github/jackcviers/actors.scala
Scala
apache-2.0
2,138
package io.scalac.frees.math object Formulas { import freestyle._ import freestyle.implicits._ def `(a+b)^2`[F[_]](a: Int, b: Int) (implicit A: AllTheMath[F]): FreeS[F, Int] = { import A._ for { s <- basic.add(a, b) r <- high.power(s, 2) } yield r } def `a^2+2ab+b^2`[F[_]](a: I...
LGLO/freestyle-login
src/main/scala/io/scalac/frees/math/Formulas.scala
Scala
apache-2.0
594
package stealthnet.scala.network.protocol.exceptions import stealthnet.scala.util.log.LoggingContext /** * Protocol exception. */ class ProtocolException( // scalastyle:off null msg: String = null, cause: Throwable = null, // scalastyle:on null override val loggerContext: LoggingContext#LogContext = Nil )...
suiryc/StealthNet
core/src/main/scala/stealthnet/scala/network/protocol/exceptions/ProtocolException.scala
Scala
gpl-3.0
373
/**************************************************************************** * * * (C) Copyright 2014 by Peter L Jones * * pljones@users.sf.net * * ...
pljones/jTrapKATEditor
src/main/scala/info/drealm/scala/spinner/Spinner.scala
Scala
gpl-3.0
3,302
package se.uu.farmbio.sg.exceptions class ParseSmilesException (message: String = null, cause: Throwable = null) extends RuntimeException(message, cause) { }
mcapuccini/spark-cheminformatics
sg/src/main/scala/se/uu/farmbio/sg/exceptions/ParseSmilesException.scala
Scala
apache-2.0
161
package org.moe.interpreter.guts import org.moe.runtime._ import org.moe.ast._ trait Utils { def getCurrentPackage (env: MoeEnvironment): MoePackage = env.getCurrentPackage.getOrElse( throw new MoeErrors.PackageNotFound("__PACKAGE__") ) def getCurrentClass (env: MoeEnvironment): MoeClass = env.getCurrentC...
MoeOrganization/moe
src/main/scala/org/moe/interpreter/guts/Utils.scala
Scala
mit
5,381