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 dhg.ccg.tag.learn import org.junit.Test import dhg.util._ import org.junit.Assert._ import dhg.ccg.cat._ import dhg.ccg.rule._ import dhg.ccg.prob._ import dhg.ccg.tagdict.TagDictionary import dhg.ccg.tagdict.SimpleTagDictionary class CcgHmmInitializationTests { val STA = cat"<S>" val S = cat"S".asInstan...
dhgarrette/2015-ccg-parsing
src/test/scala/dhg/ccg/tag/learn/CcgHmmInitializationTests.scala
Scala
apache-2.0
21,719
//////////////////////////////////////////////////////////////////////////////// // // // OpenSolid is a generic library for the representation and manipulation // // of geometric objects such as points, curves, surfaces, and volumes. ...
ianmackenzie/opensolid-core
src/main/scala/org/opensolid/core/Vector2d.scala
Scala
mpl-2.0
4,951
package jp.co.cyberagent.aeromock.core.bootstrap import javassist.{LoaderClassPath, ClassPool} /** * Bootstrap trait */ trait Bootstrap { val pool = new ClassPool() pool.appendClassPath(new LoaderClassPath(this.getClass().getClassLoader())) /** * run bootstrap process */ def process(): Unit }
CyberAgent/aeromock
aeromock-server/src/main/scala/jp/co/cyberagent/aeromock/core/bootstrap/Bootstrap.scala
Scala
mit
315
package net.bhardy.braintree.scala import net.bhardy.braintree.scala.util.EnumUtils import net.bhardy.braintree.scala.util.NodeWrapper import net.bhardy.braintree.scala.ValidationErrors.NoValidationErrors final class WebhookNotification(node: NodeWrapper) { val kind = EnumUtils.findByNameOpt(classOf[WebhookNotifi...
benhardy/braintree-scala
src/main/scala/WebhookNotification.scala
Scala
mit
982
package org.scalacoin.util import org.scalatest.{FlatSpec, MustMatchers} /** * Created by chris on 4/1/16. */ class BitcoinSUtilTest extends FlatSpec with MustMatchers { }
TomMcCabe/scalacoin
src/test/scala/org/scalacoin/util/BitcoinSUtilTest.scala
Scala
mit
177
package ru.org.codingteam.horta.plugins import ru.org.codingteam.horta.protocol.Protocol import ru.org.codingteam.horta.security.{Credential, CommonAccess} import ru.org.codingteam.horta.localization.Localization._ private object FortuneCommand class FortunePlugin extends BasePlugin with CommandProcessor { overri...
codingteam/horta-hell
src/main/scala/ru/org/codingteam/horta/plugins/FortunePlugin.scala
Scala
mit
866
/* * 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/test/scala/com/intel/analytics/bigdl/dllib/utils/tf/loaders/StridedSliceSpec.scala
Scala
apache-2.0
6,378
package mesosphere.marathon.core import javax.inject.Named import akka.actor.ActorRefFactory import com.google.inject.name.Names import com.google.inject.{ AbstractModule, Provides, Scopes, Singleton } import mesosphere.marathon.MarathonConf import mesosphere.marathon.core.appinfo.{ AppInfoModule, AppInfoService, Gro...
ss75710541/marathon
src/main/scala/mesosphere/marathon/core/CoreGuiceModule.scala
Scala
apache-2.0
7,268
package com.scalding import com.twitter.scalding._ import org.apache.hadoop.conf.Configuration import akka.actor.{Actor, ActorLogging, Props, ActorRef} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future abstract class Scalding extends Actor with ActorLogging { val settings = ...
zentiment/scala-boilerplate
scalding/src/main/scala/com/scalding/Scalding.scala
Scala
mit
1,020
/* * 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 ...
sh-cho/cshSpark
deploy/worker/WorkerWatcher.scala
Scala
apache-2.0
2,963
/******************************************************************************* Copyright (c) 2012-2013, KAIST, S-Core. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. **********************************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/tests/CompilerJUTest.scala
Scala
bsd-3-clause
990
package hello import org.springframework.context.annotation.{Configuration, ComponentScan} import org.springframework.boot.autoconfigure.EnableAutoConfiguration import org.springframework.boot; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; i...
NehaWani/hello-world
src/main/scala/hello/HelloConfig.scala
Scala
mit
797
/* * 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 ...
jinglining/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/batch/sql/validation/CalcValidationTest.scala
Scala
apache-2.0
1,332
// // RemoveUnusedTypes.scala -- Scala object RemoveUnusedTypes // Project OrcScala // // $Id: RemoveUnusedTypes.scala 2933 2011-12-15 16:26:02Z jthywissen $ // // Created by dkitchin on Jul 12, 2010. // // Copyright (c) 2011 The University of Texas at Austin. All rights reserved. // // Use and redistribution of this f...
laurenyew/cOrcS
src/orc/compile/optimize/RemoveUnusedTypes.scala
Scala
bsd-3-clause
989
package com.sksamuel.scapegoat.inspections import com.sksamuel.scapegoat.{Inspection, InspectionContext, Inspector, Levels} /** * @author Stephen Samuel */ class NoOpOverride extends Inspection( text = "Noop override", defaultLevel = Levels.Info, description = "Checks for code that overrides p...
sksamuel/scalac-scapegoat-plugin
src/main/scala/com/sksamuel/scapegoat/inspections/NoOpOverride.scala
Scala
apache-2.0
1,489
package com.eevolution.context.dictionary.infrastructure.repository import java.util.UUID import com.eevolution.context.dictionary.domain._ import com.eevolution.context.dictionary.domain.model.ReplicationOrganizationAccess import com.eevolution.context.dictionary.infrastructure.db.DbContext._ import com.eevolution.u...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/repository/ReplicationOrganizationAccessRepository.scala
Scala
gpl-3.0
3,183
package com.tpersson.client.common.utils import de.saxsys.mvvmfx.ViewModel import scala.concurrent.ExecutionContext class ViewModelBase(executionContextProvider: ExecutionContextProvider) extends ViewModel { implicit val uiExecutionContext: ExecutionContext = executionContextProvider.ui }
TommyPersson/scala-mvvm-example
src/main/scala/com/tpersson/client/common/utils/ViewModelBase.scala
Scala
apache-2.0
295
package com.github.edwardsmatt.fpinscala import org.scalatest._ import OptionValues._ import EitherValues._ import Fp._ class Fp2_2Spec extends FlatSpec with Matchers { val ascending = (a: Int, b: Int) => (a < b) "isSorted" should "return false with an unsorted array" in { val instance = isSorted(Array(1, 3, 2...
edwardsmatt/fpins
src/test/scala/FPSpec.scala
Scala
mit
1,743
package scala.macros import com.intellij.openapi.module.Module import com.intellij.openapi.roots.OrderEnumerator import com.intellij.openapi.roots.libraries.Library import com.intellij.util.Processor import org.jetbrains.plugins.scala.lang.psi.api.base.ScPrimaryConstructor import org.jetbrains.plugins.scala.lang.psi.a...
triplequote/intellij-scala
scala/scala-impl/src/scala/macros/intellij/intellij.scala
Scala
apache-2.0
1,506
/* __ *\ ** ________ ___ / / ___ __ ____ Scala.js sbt plugin ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ |/_// /_\ \ http://scala-js.org/ ** ** /____/\___/_/ |_/...
japgolly/scala-js
js-envs/src/main/scala/org/scalajs/jsenv/rhino/RhinoJSEnv.scala
Scala
bsd-3-clause
18,462
package bifrost.transaction /** * Created by cykoz on 5/11/2017. */ import bifrost.{BifrostGenerators, ValidGenerators} import org.scalatest.prop.{GeneratorDrivenPropertyChecks, PropertyChecks} import org.scalatest.{Matchers, PropSpec} class ProgramMethodExecutionSpec extends PropSpec with PropertyChecks with...
Topl/Project-Bifrost
src/test/scala/bifrost/transaction/ProgramMethodExecutionSpec.scala
Scala
mpl-2.0
420
package icfpc2013 import java.math.BigInteger object BvCompiler { type Context = Map[Id, Long] def apply(p: Program): Long => Long = l => apply(p.e)(Map(p.id -> l)) def apply(e: Expression): Context => Long = e match { case Zero => _ => 0 case One => _ => 1 case id: Id => ctx => ctx(id) ca...
ShiftForward/icfpc2013
src/main/scala/icfpc2013/compiler.scala
Scala
mit
1,756
/**************************************************************************** * Copyright (C) 2015 Łukasz Szpakowski. * * * * This software is licensed under the GNU General Public License * * v3 ...
luckboy/IssueNotifier
src/main/scala/pl/luckboy/issuenotifier/IssuePairListActivity.scala
Scala
gpl-3.0
9,139
object Base { def toDecimal (li: List[Int], base: Int) : BigInt = li match { case Nil => BigInt (0) case x :: xs => BigInt (x % base) + (BigInt (base) * toDecimal (xs, base)) } def fromDecimal (dec: BigInt, base: Int...
kirbyfan64/o
Base.scala
Scala
mit
1,490
package cs220.ducks object Ducks { abstract class Duck { def swim: Unit def fly: Unit } abstract class RubberDuck extends Duck with Swims trait Swims extends Duck { def swim = println("I swim!") } trait Flier extends Duck { def fly = println("I fly!") } // val d = new RubberDuck wi...
umass-cs-220/week-09-libraries
code/traits/src/main/scala/cs220/ducks/Duck.scala
Scala
apache-2.0
341
/** * Copyright 2017 ZuInnoTe (Jörn Franke) <zuinnote@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
ZuInnoTe/hadoopoffice
examples/scala-flinkts-excel/src/it/scala/org/zuinnote/flink/office/example/excel/FlinkTableSourceTableSinkScalaExcelIntegrationSpec.scala
Scala
apache-2.0
14,530
package zangelo.spray.json.annotation import scala.annotation.StaticAnnotation case class JsonUnwrapped(prefix:String = "", suffix:String = "") extends StaticAnnotation
zackangelo/spray-json-macros
src/main/scala/zangelo/spray/json/annotation/JsonUnwrapped.scala
Scala
apache-2.0
171
/* * Copyright (C) 2014-2015 by Nokia. * See the LICENCE.txt file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy o...
elyast/wookie
examples/src/main/scala/wookie/yql/finance/StockQuote.scala
Scala
apache-2.0
1,988
package org.jetbrains.plugins.scala.lang.refactoring.mock import com.intellij.openapi.editor._ import com.intellij.openapi.editor.markup.TextAttributes import com.intellij.openapi.editor.event.CaretListener import java.util /** * Pavel Fatin */ class CaretModelStub extends CaretModel { override def setCaretsAndS...
consulo/consulo-scala
test/org/jetbrains/plugins/scala/lang/refactoring/mock/CaretModelStub.scala
Scala
apache-2.0
1,955
// Vim has many normal mode keys to easte the pains of repetition, but `.` is // the one that is (probably) used most often. `.` will repeat the last // "action" taken. Some quick examples of what counts as "one action": // - dropping into insert mode to insert text // - `dd`, deleting a line // - `di"`, deleting i...
alexkuang/vim-ll
demo/move-op-repeat.scala
Scala
mit
1,688
import scala.concurrent.duration._ import org.scalatest.FunSuite import akka.actor._ import scala.concurrent._ import akka.pattern.ask import akka.util.Timeout import scala.util.Random object TestHelper { def createBank(bankId: String): (ActorRef, Bank) = { val bankRef: ActorRef = BankManager.createBank(bankId...
DagF/tdt4165_progspraak_project_h15
part3-exercise/src/test/scala/AccountTests.scala
Scala
mit
14,897
/* * 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 ...
someorz/spark
core/src/test/scala/org/apache/spark/scheduler/TaskSetManagerSuite.scala
Scala
apache-2.0
53,949
package browser import helpers.TestDataPerTest import org.scalatestplus.play.{HtmlUnitFactory, OneBrowserPerTest, OneServerPerTest, PlaySpec} class ViewItemPageTests extends PlaySpec with TestDataPerTest with OneServerPerTest with OneBrowserPerTest with HtmlUnitFactory { "The view item page" should { "display...
notclive/backpack
test/browser/ViewItemPageTests.scala
Scala
mit
2,703
/* * Happy Melly Teller * Copyright (C) 2013 - 2015, Happy Melly http://www.happymelly.com * * This file is part of the Happy Melly Teller. * * Happy Melly Teller 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 Fo...
HappyMelly/teller
app/security/AuthorisationHandler.scala
Scala
gpl-3.0
3,781
package org.apache.mesos.chronos.scheduler.jobs import java.util.TimeZone import org.joda.time.format.{ISODateTimeFormat, ISOPeriodFormat} import org.joda.time.{DateTime, DateTimeZone, Period} /** * Parsing, creating and validation for Iso8601 expressions. * * @author Florian Leibert (flo@leibert.de) */ obje...
motusllc/chronos
src/main/scala/org/apache/mesos/chronos/scheduler/jobs/Iso8601Expressions.scala
Scala
apache-2.0
3,020
package cromwell.database.sql import java.sql.Connection import java.util.UUID import com.typesafe.config.{Config, ConfigFactory, ConfigValueFactory} trait SqlDatabase extends AutoCloseable { protected val urlKey: String protected val originalDatabaseConfig: Config lazy val databaseConfig = SqlDatabase.withUni...
ohsu-comp-bio/cromwell
database/sql/src/main/scala/cromwell/database/sql/SqlDatabase.scala
Scala
bsd-3-clause
1,511
package akashic.storage.service import akashic.storage.backend.NodePath import akashic.storage.server import akka.http.scaladsl.model._ import akka.http.scaladsl.model.headers.{ETag, _} import akka.http.scaladsl.server.Directives._ import com.google.common.net.HttpHeaders._ object HeadObject { val matcher = hea...
akiradeveloper/fss3
src/main/scala/akashic/storage/service/GetObject.scala
Scala
apache-2.0
2,890
package almhirt.aggregates import org.scalatest._ import _root_.java.time.{ ZonedDateTime, LocalDateTime } import scalaz._, Scalaz._ import almhirt.common._ import almhirt.almvalidation.kit._ class UpdateRecorderWithUpdaterTests extends FlatSpec with Matchers with Inside with UserEventHandler with UserUpdater with...
chridou/almhirt
almhirt-common/src/test/scala/almhirt/aggregates/UpdateRecorderWithUpdaterTests.scala
Scala
apache-2.0
6,958
package database.common /** * Created by cf on 9/27/2016. */ object Common { object ActionType extends Enumeration { val INSERT = Value(0) val UPDATE = Value(1) val DELETE = Value(2) val REBUILD = Value(3) } }
astrofed/akka-rest-slick-flyway-auth-token
db-api/src/main/scala/database/common/Common.scala
Scala
mit
235
package slick.test.codegen import scala.concurrent.Await import scala.concurrent.duration.Duration import scala.concurrent.ExecutionContext.Implicits.global import slick.codegen.SourceCodeGenerator import slick.jdbc.JdbcProfile /** Generates code for CodeGenRoundTripTest. * * This is generated using Derby current...
xavier-fernandez/slick
slick-testkit/src/codegen/scala/slick/test/codegen/GenerateRoundtripSources.scala
Scala
bsd-2-clause
12,238
package com.github.mdr.mash.ns.core import com.github.mdr.mash.evaluator.EvaluationInterruptedException import com.github.mdr.mash.functions.{ BoundParams, MashFunction, Parameter, ParameterModel } import com.github.mdr.mash.inference._ import com.github.mdr.mash.ns.core.NoArgFunction.NoArgValue import com.github.mdr....
mdr/mash
src/main/scala/com/github/mdr/mash/ns/core/TryFunction.scala
Scala
mit
2,070
package com.twitter.server.view import com.twitter.finagle.http.Status import com.twitter.finagle.{Service, SimpleFilter} import com.twitter.io.{Buf, Charsets} import com.twitter.server.util.HttpUtils._ import com.twitter.util.Future object NotFoundView { private val NotFoundHtml: String = s"""<html> ...
cogitate/twitter-server-uuid
src/main/scala/com/twitter/server/view/NotFoundView.scala
Scala
apache-2.0
1,659
package com.liangdp.graphviz4s.examples import com.liangdp.graphviz4s.Graph import scala.collection.mutable.Map /** * corresponding to the python example: * https://github.com/xflr6/graphviz/blob/master/examples/er.py * @author Depeng Liang */ object Er { def main(args: Array[String]): Unit = { val e = new ...
Ldpe2G/Graphviz4S
src/main/scala/com/liangdp/graphviz4s/examples/Er.scala
Scala
mit
1,700
/* * Copyright 2014 Lars Edenbrandt * * 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...
slicebox/slicebox
src/main/scala/se/nimsa/sbx/app/routing/ImportRoutes.scala
Scala
apache-2.0
5,887
/* * 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 ...
prasi-in/geode
geode-spark-connector/geode-spark-connector/src/it/scala/ittest/org/apache/geode/spark/connector/package.scala
Scala
apache-2.0
1,137
package com.twitter.server.handler import com.twitter.finagle.http.HttpMuxer import com.twitter.finagle.{Service, httpx} import com.twitter.io.Buf import com.twitter.server.util.HttpUtils._ import com.twitter.util.Future /** * A handler which outputs `patterns` as html anchors. By default, * it outputs the patterns...
travisbrown/twitter-server
src/main/scala/com/twitter/server/handler/IndexHandler.scala
Scala
apache-2.0
938
object CompoundTypeUnapply { val Length: {def unapply(s: String): Option[Int]} = new { def unapply(s: String): Option[Int] = Some(s.length) } "text" match { case Length(length) => /*start*/length/*end*/ } } //Int
LPTK/intellij-scala
testdata/typeInference/bugs5/CompoundTypeUnapply.scala
Scala
apache-2.0
229
package 四法 package 测试1 { // 减法:双向流动,都减少 // 加法:单向流动,我减少,你增加 // 位置:逆向单向流动,我减少,你减少(存疑) trait P7Num1 { def method2(num7: P7Num2): P7Result } case class P7Num1S(tail: P7Num1) extends P7Num1 { override def method2(num7: P7Num2): P7Result = num7.method1(tail) } case class P7Num1T(tail: () => P7Num1) extends...
djx314/ubw
a60-四/src/main/scala/四法/Counter7.scala
Scala
bsd-3-clause
1,415
// The MIT License (MIT) // // Copyright (c) 2015 AT&T // // 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, modi...
att-innovate/charmander-experiment-nessy
analytics/resultcollector/src/main/scala/resultcollector.scala
Scala
mit
3,934
package com.sksamuel.scrimage.filter import java.util.Random import com.sksamuel.scrimage.ImmutableImage import com.sksamuel.scrimage.nio.PngWriter import org.scalatest.{FunSuite, Matchers} class SwimFilterTest extends FunSuite with Matchers { implicit val writer: PngWriter = PngWriter.MaxCompression private v...
sksamuel/scrimage
scrimage-filters/src/test/scala/com/sksamuel/scrimage/filter/SwimFilterTest.scala
Scala
apache-2.0
1,485
package margn.ast import margn.types.DType abstract class ASTree case class ASTProgram(children: Seq[ASTStatement]) extends ASTree abstract class ASTStatement extends ASTree abstract class ASTExpr extends ASTree { var _type_ : DType = null }
193s/margn
src/main/scala/margn/ast/ASTCore.scala
Scala
gpl-2.0
249
/*This file is part of BinaryReader. BinaryReader 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. BinaryReader is distributed in the hope...
Supermanu/BinaryReader
src/main/scala/binaryreader/structure/Padding.scala
Scala
gpl-2.0
1,175
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.2 * @date Mon Sep 28 11:18:16 EDT 2015 * @see LICENSE (MIT style license file). */ package scalation.stat import language.implicitConversions import scalation.linalgebra.mem_mapped.{Ve...
mvnural/scalation
src/main/scala/scalation/stat/Conversions.scala
Scala
mit
1,532
import stainless.lang._ import stainless.collection._ import stainless.lang.Option._ import stainless.annotation._ import stainless.proof._ import stainless.lang.StaticChecks._ object ArraySliceExample { def updateSizeLemma[T](xs: List[T], i: BigInt, y: T): Boolean = { require(0 <= i && i < xs.size) decrease...
epfl-lara/stainless
frontends/benchmarks/full-imperative/valid/ArraySlice.scala
Scala
apache-2.0
2,766
package com.eevolution.context.dictionary.domain.api.service import com.eevolution.context.dictionary.api import com.eevolution.context.dictionary.domain.model.PrintFont /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This program is free software: you can redistribute i...
adempiere/ADReactiveSystem
dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/api/service/PrintFontService.scala
Scala
gpl-3.0
1,217
package org.jetbrains.plugins.scala package lang.surroundWith.surrounders.scaladoc import com.intellij.lang.surroundWith.Surrounder import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.openapi.util.TextRange import com.intellij.psi.PsiElement import org.jetbrains.pl...
LPTK/intellij-scala
src/org/jetbrains/plugins/scala/lang/surroundWith/surrounders/scaladoc/ScalaDocWithSyntaxSurrounder.scala
Scala
apache-2.0
1,739
package io.youi import scala.scalajs.js @js.native trait DOMRectReadOnly extends js.Object { def x: Double def y: Double def width: Double def height: Double def top: Double def right: Double def bottom: Double def left: Double }
outr/youi
dom/src/main/scala/io/youi/DOMRectReadOnly.scala
Scala
mit
248
package xyz.suchanek.parsers import org.htmlcleaner.{HtmlCleaner, TagNode} import scala.util.Try object Xroxy { def getProxyList(data:String) = { val content = (new HtmlCleaner()).clean(data) val l1 = content.evaluateXPath("//tr[@class='row0']").toList val l2 = content.evaluateXPath("//tr[@class='row1'...
wsuchy/ProxyPool
src/main/scala/xyz/suchanek/parsers/Xroxy.scala
Scala
gpl-2.0
597
package scalikejdbc.bigquery import scalikejdbc._ case class TagId(value: Int) extends AnyVal case class Tag( id: TagId, postId: PostId, name: String ) object Tag extends SQLSyntaxSupport[Tag] { override val columns = Seq("id", "post_id", "name") import Post.postIdBinders implicit val tagIdBinders: Bi...
ocadaruma/scalikejdbc-bigquery
src/it/scala/scalikejdbc/bigquery/Tag.scala
Scala
apache-2.0
689
/* * 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/test/scala/com/intel/analytics/bigdl/dllib/keras/layers/LogSpec.scala
Scala
apache-2.0
2,062
package org.taylorbrown.randomforest import org.scalatest._ /** * Created by taylor on 2/23/14. */ class ForestTest extends FlatSpec with Matchers { val examples = List( Example(List(1f),Label(0)), Example(List(2f),Label(0)), Example(List(1f),Label(0)), Example(List(1f),Label(1)), Example(List...
taylor-brown/random-forest-scala
src/test/scala/org/taylorbrown/randomforest/ForestTest.scala
Scala
apache-2.0
860
/* * Copyright 2009-2017. DigitalGlobe, 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 ...
ngageoint/mrgeo
mrgeo-core/src/main/scala/org/mrgeo/mapalgebra/raster/SaveRasterMapOp.scala
Scala
apache-2.0
3,057
import scala.reflect.{ClassTag, classTag} // /scala/trac/5452/a.scala // Mon Feb 13 22:52:36 PST 2012 // import scala.reflect.runtime.universe._ trait Tree object Bip { def ??? = sys.error("") } import Bip._ case class Queryable[T]() { def treeFilter( t:Tree ) : Queryable[T] = ??? } object Queryable { def a...
AlexSikia/dotty
tests/untried/neg/t5452-new.scala
Scala
bsd-3-clause
542
package scala.reflect.macros package runtime import scala.reflect.internal.util.Position import scala.util.control.ControlThrowable class AbortMacroException(val pos: Position, val msg: String) extends Throwable(msg) with ControlThrowable
felixmulder/scala
src/compiler/scala/reflect/macros/runtime/AbortMacroException.scala
Scala
bsd-3-clause
240
class S { new J }
yusuke2255/dotty
tests/pos/java-interop/t1176/S.scala
Scala
bsd-3-clause
18
/* * 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/ct-calculations
src/test/scala/uk/gov/hmrc/ct/computations/CP283aSpec.scala
Scala
apache-2.0
1,963
package io.github.interestinglab.waterdrop.filter import io.github.interestinglab.waterdrop.config.{Config, ConfigFactory} import io.github.interestinglab.waterdrop.apis.BaseFilter import io.github.interestinglab.waterdrop.core.RowConstant import org.apache.spark.sql.functions._ import org.apache.spark.sql.{Dataset, R...
InterestingLab/waterdrop
waterdrop-core/src/main/scala/io/github/interestinglab/waterdrop/filter/Split.scala
Scala
apache-2.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 ...
kiszk/spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala
Scala
apache-2.0
14,127
package io.github.binaryfoo.lagotto.reader import java.io._ import java.util.concurrent.ArrayBlockingQueue import io.github.binaryfoo.lagotto._ import scala.annotation.tailrec import scala.collection.AbstractIterator import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent._ import scala.con...
binaryfoo/lagotto
src/main/scala/io/github/binaryfoo/lagotto/reader/LogReader.scala
Scala
mit
7,604
package ca.hyperreal.scalgorithms import math._ object Matrices { final class _RaisedToMatrix[R <: Ring[R]]( r: R ) { def *( m: Matrix[R] ): Matrix[R] = m.operation( (i: Int, j: Int) => r*m(i, j) ) } implicit def _raiseToMatrix[R <: Ring[R]]( r: R ): _RaisedToMatrix[R] = new _RaisedToMatrix[R]( r ) def i...
edadma/scalgorithms
src/main/scala/Matrices.scala
Scala
mit
496
package filodb.memory.format.vectors import java.nio.ByteBuffer import debox.Buffer import filodb.memory.{BlockMemFactory, MemoryStats, PageAlignedBlockManager} import filodb.memory.format._ class IntBinaryVectorTest extends NativeVectorTest { describe("IntAppendingVector") { it("should append a mix of Ints a...
tuplejump/FiloDB
memory/src/test/scala/filodb.memory/format/vectors/IntBinaryVectorTest.scala
Scala
apache-2.0
12,816
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.it import java.util.Collections import java.util.function.{ Function => JFunction } import akka.stream.Materializer import akka.stream.scaladsl.Source import org.scalatest.{ Inside, Matchers, WordSpecLike } impor...
rstento/lagom
service/javadsl/integration-tests/src/test/scala/com/lightbend/lagom/it/ServiceSupport.scala
Scala
apache-2.0
2,598
package lossycounting import frequencycount.Item import frequencycount.lossycounting.LossyCountingModel import unitspec.UnitSpec import utils.Utils._ import testutils.TestUtils._ class LossyCountingModelSpec extends UnitSpec{ val frequency = 0.2 val error = 0.1 * frequency "Lossy Counting" should "count correc...
mvogiatzis/freq-count
src/test/scala/lossycounting/LossyCountingModelSpec.scala
Scala
mit
3,323
package spark import scala.collection.mutable.Map // Task result. Also contains updates to accumulator variables. // TODO: Use of distributed cache to return result is a hack to get around // what seems to be a bug with messages over 60KB in libprocess; fix it private class TaskResult[T](val value: T, val accumUpdate...
javelinjs/spark
core/src/main/scala/spark/TaskResult.scala
Scala
bsd-3-clause
360
object ch8_14 { ??? } import ch8_14._ /* from repl you can test typing: :load src/main/scala/fpinscala/ch6/RNG.scala :load src/main/scala/fpinscala/ch6/State.scala :load src/main/scala/fpinscala/ch8/Gen.scala :load src/main/scala/fpinscala/ch8/Exercise14.scala */
rucka/fpinscala
src/main/scala/fpinscala/ch8/Exercise14.scala
Scala
gpl-2.0
274
package edu.gemini.pit.ui.util import edu.gemini.shared.gui.textComponent.TextRenderer import swing.ComboBox import scala.language.reflectiveCalls // A mixin for showing the value rather than the toString trait ValueRenderer[A <: {def value():String}] extends TextRenderer[A] { this:ComboBox[A] => def text(a:A):St...
arturog8m/ocs
bundle/edu.gemini.pit/src/main/scala/edu/gemini/pit/ui/util/ValueRenderer.scala
Scala
bsd-3-clause
340
/* * Copyright 2016-2020 Daniel Urban and contributors listed in AUTHORS * Copyright 2020 Nokia * SPDX-License-Identifier: Apache-2.0 * * 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 *...
durban/seals
tests/src/test/scala/dev/tauri/seals/tests/BaseLawsSpec.scala
Scala
apache-2.0
2,593
/** * 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...
Mszak/kafka
core/src/test/scala/unit/kafka/coordinator/GroupCoordinatorResponseTest.scala
Scala
apache-2.0
39,563
/** * 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-time
src/main/scala/org/scala_tools/time/RichPartialProperty.scala
Scala
apache-2.0
1,002
package com.taxis99.amazon.sqs import akka.Done import akka.stream.QueueOfferResult import play.api.libs.json.{Json, Writes} import scala.concurrent.{Future, Promise} trait SqsProducer[T] extends SqsConfig { private lazy val producer = sqs.producer(queueConfig) /** * Produces a new message to the queue. Th...
99Taxis/common-sqs
src/main/scala/com/taxis99/amazon/sqs/SqsProducer.scala
Scala
apache-2.0
822
/* * Copyright 2006-2011 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...
lzpfmh/framework-2
core/util/src/main/scala/net/liftweb/util/ThreadGlobal.scala
Scala
apache-2.0
2,438
/** * 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...
wangcy6/storm_app
frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/test/scala/integration/kafka/api/ProducerFailureHandlingTest.scala
Scala
apache-2.0
11,005
// lchannels - session programming in Scala // Copyright (c) 2016, Alceste Scalas and Imperial College London // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source ...
scribble/scribble.github.io
src/main/jbake/assets/docs/lchannels/examples/src/main/scala/lchannels/examples/game/Demo.scala
Scala
apache-2.0
2,851
package com.sksamuel.elastic4s.search.aggs class MissingAggregationHttpTest extends AbstractAggregationTest { "missing aggregation" - { "should return documents missing a value" in { val resp = client.execute { search in "aggregations/breakingbad" aggregations { aggregation missing "agg1...
FabienPennequin/elastic4s
elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/search/aggs/MissingAggregationHttpTest.scala
Scala
apache-2.0
496
package jp.ne.opt.chronoscala import java.time._ import jp.ne.opt.chronoscala.Tag.CS import scala.language.implicitConversions trait Implicits extends IntImplicits with DurationImplicits with TimeImplicits with OrderingImplicits trait NamespacedImplicits extends NamespacedIntImplicits with NamespacedLo...
opt-tech/chronoscala
shared/src/main/scala/jp/ne/opt/chronoscala/Implicits.scala
Scala
mit
2,151
package slinky.core import scala.scalajs.js import scala.language.experimental.macros import scala.reflect.macros.whitebox // same as PropsWriterProvider except it always returns the typeclass instead of nulling it out in fullOpt mode trait ExternalPropsWriterProvider extends js.Object object ExternalPropsWriterProv...
shadaj/slinky
core/src/main/scala-2/slinky/core/ExternalPropsWriterProvider.scala
Scala
mit
940
package stealthnet.scala.cryptography import java.security.SecureRandom import stealthnet.scala.Constants import stealthnet.scala.util.HexDumper /** * ''Rijndael'' class companion object. * * Note: technically, it is ''Rijndael'' (a superset) because ''AES'' shall be * limited to 128-bits block size. */ object R...
suiryc/StealthNet
core/src/main/scala/stealthnet/scala/cryptography/RijndaelParameters.scala
Scala
gpl-3.0
1,858
package com.sksamuel.elastic4s.requests.ingest case class DeletePipelineResponse(acknowledged: Boolean)
sksamuel/elastic4s
elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/ingest/DeletePipelineResponse.scala
Scala
apache-2.0
105
/** * Copyright (c) 2012 Alexey Aksenov ezh@ezh.msk.ru * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
ezh/digi-lib-ctrl
src/main/scala/org/digimead/digi/lib/ctrl/info/ComponentState.scala
Scala
apache-2.0
2,781
package examples.bouncing import java.awt.{Dimension, Graphics2D, Point} import rescala._ import scala.swing.{MainFrame, Panel, SimpleSwingApplication, Swing} object SwitchVersion extends SimpleSwingApplication { lazy val application = new SwitchVersion def top = application.frame override def main(args: Ar...
volkc/REScala
Examples/examples/src/main/scala/examples/bouncing/SwitchVersion.scala
Scala
apache-2.0
1,344
// Copyright (c) 2013-2020 Rob Norris and Contributors // This software is licensed under the MIT License (MIT). // For more information see LICENSE or https://opensource.org/licenses/MIT package doobie.free import cats.~> import cats.effect.kernel.{ CancelScope, Poll, Sync } import cats.free.{ Free => FF } // alias ...
tpolecat/doobie
modules/free/src/main/scala/doobie/free/callablestatement.scala
Scala
mit
75,774
package foo.test object Foo { val foo = 5 }
xeno-by/old-scalameta-sbt
sbt/src/sbt-test/tests/fork-uncaught/src/main/scala/Foo.scala
Scala
bsd-3-clause
44
package scalydomain.core import scala.collection._ import scala.util.Random import scala.util.control.Breaks._ import java.io.File import java.security.MessageDigest import java.util.concurrent.atomic._ import org.msgpack.annotation.Message import org.msgpack.ScalaMessagePack import org.iq80.leveldb.{Options} impor...
anelson/scalydomain
core/src/main/scala/ModelDbWriter.scala
Scala
apache-2.0
3,024
/* * 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 ...
jlopezmalla/spark
core/src/main/scala/org/apache/spark/executor/Executor.scala
Scala
apache-2.0
34,964
/* * 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 ...
apache/kylin
kylin-spark-project/kylin-spark-engine/src/main/scala/org/apache/kylin/engine/spark/job/MeasureUDAF.scala
Scala
apache-2.0
6,113
// Copyright (c) 2016 PSForever.net to present package net.psforever.packet.game import net.psforever.packet.{GamePacketOpcode, Marshallable, PlanetSideGamePacket} import scodec.Codec import scodec.codecs._ /** * Force a player model to change its exo-suit. * Set all GUI elements and functional elements to be ass...
Fate-JH/PSF-Server
common/src/main/scala/net/psforever/packet/game/ArmorChangedMessage.scala
Scala
gpl-3.0
1,728
package cakesolutions import akka.actor.{Actor, ActorLogging, ReceiveTimeout} import akka.contrib.pattern.ShardRegion.Passivate import akka.event.LoggingReceive import java.util.concurrent.TimeUnit import scala.concurrent.duration._ trait AutoPassivation extends ActorLogging { this: Actor with Configuration => c...
carlpulley/coreos-example-application
lib/persistence/src/main/scala/cakesolutions/AutoPassivation.scala
Scala
apache-2.0
707
package com.github.j5ik2o.forseti.domain.exception import scalaz.Maybe /** * 認可サーバーがリクエストの処理ができないような予期しない状況に遭遇した. * (500 Internal Server Error のHTTPステータスコードをHTTPのリダイレクトでクライアントに返すことができないため, * このエラーコードは必要である) * * 認可コード/ * * @param description */ class ServerException( description: Maybe[String] = Ma...
j5ik2o/forseti
domain/src/main/scala/com/github/j5ik2o/forseti/domain/exception/ServerException.scala
Scala
mit
651
package scrabble import util.Random import scala.util.{ Try, Success, Failure } /** tiles: The current tiles in the bag */ case class LetterBag(letters: List[Tile], size: Int, tileSet: Map[Char, Tile]) { override def toString = letters.toString lazy val lettersAsString = letters.map(_.letter).mkString /** ...
Happy0/scalascrabble
src/main/scala/LetterBag.scala
Scala
gpl-2.0
3,656
package com.github.diegopacheco.sandbox.scala.pkge case class Fruit(name: String, color: String) object apple extends Fruit("Apple", "green") object plum extends Fruit("Plum", "blue") object banana extends Fruit("Banana", "yellow")
diegopacheco/scala-playground
scala-pkge/src/main/scala/com/github/diegopacheco/sandbox/scala/pkge/Fruit.scala
Scala
unlicense
236