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 |
|---|---|---|---|---|---|
// - Project: scalajs-angulate (https://github.com/jokade/scalajs-angulate)
// Description:
//
// Distributed under the MIT License (see included file LICENSE)
package biz.enef.angulate.impl
import acyclic.file
import scala.reflect.macros.blackbox
protected [angulate] class ServiceMacros(val c: blackbox.Context) ex... | CapeSepias/scalajs-angulate | src/main/scala/biz/enef/angulate/impl/ServiceMacros.scala | Scala | mit | 1,539 |
/*
* 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 ... | lhaiesp/samza | samza-core/src/main/scala/org/apache/samza/container/TaskInstanceMetrics.scala | Scala | apache-2.0 | 2,021 |
package com.freshsoft.matterbridge.client.ninegag
import akka.actor.{ActorRef, ActorSystem, Props}
import akka.testkit.TestKit
import model.MatterBridgeEntities.NineGagGifResult
import org.scalatest._
/**
* The nine gag receiver test
*/
class NineGagReceiverTest
extends TestKit(ActorSystem("testSystem"))
wi... | Freshwood/matterbridge | src/test/scala/com/freshsoft/matterbridge/client/ninegag/NineGagReceiverTest.scala | Scala | mit | 816 |
package controllers.stack
import controllers.BaseAuthConfig
import com.github.tototoshi.play2.auth.AuthElement
import jp.t2v.lab.play2.stackc.{RequestAttributeKey, RequestWithAttributes, StackableController}
import play.api.mvc.{Controller, Result}
import play.twirl.api.Html
import views.html
import scala.concurrent.... | tototoshi/play2-auth | sample/app/controllers/stack/Pjax.scala | Scala | apache-2.0 | 1,026 |
package pricemap
import Types.{latitude, longitude}
case class BoundingBox(minLat: latitude,
maxLat: latitude,
minLon: longitude,
maxLon: longitude)
case class BooliParameters(callerId: String,
privateKey: String,
... | lastsys/pricemap | client/src/main/scala/pricemap/Booli.scala | Scala | bsd-3-clause | 414 |
import scala.tools.partest._
import java.io.{Console => _, _}
object Test extends DirectTest {
override def extraSettings: String = "-usejavacp -Xprint:patmat -Xprint-pos -d " + testOutput.path
override def code =
"""
|object Case3 {
| def unapply(z: Any): Option[Int] = Some(-1)
|
| ... | yusuke2255/dotty | tests/pending/run/t6288.scala | Scala | bsd-3-clause | 906 |
/*
,i::,
:;;;;;;;
;:,,::;.
1ft1;::;1tL
t1;::;1,
:;::; _____ __ ___ __
fCLff ;:: tfLLC / ___/ / |/ /____ _ _____ / /_
CLft11 :,, i1tffLi \\__ \\ ____ / /|_/... | S-Mach/s_mach.concurrent | src/test/scala/s_mach/concurrent/Tuple16AsyncTaskRunnerTest.scala | Scala | mit | 5,947 |
package service
import util.Directory._
import util.ControlUtil._
import SystemSettingsService._
trait SystemSettingsService {
def saveSystemSettings(settings: SystemSettings): Unit = {
defining(new java.util.Properties()){ props =>
settings.baseUrl.foreach(props.setProperty(BaseURL, _))
... | odz/gitbucket | src/main/scala/service/SystemSettingsService.scala | Scala | apache-2.0 | 6,516 |
package com.bot4s.telegram.api
import com.bot4s.telegram.models.ResponseParameters
/**
* Telegram API errors, e.g. when `response.ok` is false.
* Does not wrap exceptions related to de/serialization, network errors...
*/
case class TelegramApiException(
message: String,
errorCode: Int,
cause: Option[Throwabl... | mukel/telegrambot4s | core/src/com/bot4s/telegram/api/TelegramApiException.scala | Scala | apache-2.0 | 429 |
package co.ledger.wallet.web.ripple.core.device
import java.io.ByteArrayOutputStream
/**
*
* LedgerTransportHelper
* Default (Template) Project
*
* Created by Pierre Pollastri on 27/05/2016.
*
* The MIT License (MIT)
*
* Copyright (c) 2016 Ledger
*
* Permission is hereby granted, free of charge,... | LedgerHQ/ledger-wallet-ripple | src/main/scala/co/ledger/wallet/web/ripple/core/device/LedgerTransportHelper.scala | Scala | mit | 4,944 |
package scavlink.link.nav
import akka.actor.Props
import akka.actor.Status.Failure
import scavlink.link.Vehicle
import scavlink.link.mission._
import scavlink.link.nav.NavTellAPI._
import scavlink.link.operation._
import scavlink.link.telemetry.Telemetry
import scavlink.message.Mode
import scavlink.message.common.Miss... | nickolasrossi/scavlink | src/main/scala/scavlink/link/nav/RunMission.scala | Scala | mit | 5,581 |
package scala.tools.tastytest
import scala.collection.immutable.ArraySeq
import scala.util.{Try, Success, Properties}
import javax.tools.ToolProvider
object Javac extends Script.Command {
def javac(out: String, sources: String*): Try[Boolean] = {
val javaCompiler = ToolProvider.getSystemJavaCompiler
val ... | scala/scala | src/tastytest/scala/tools/tastytest/Javac.scala | Scala | apache-2.0 | 1,164 |
package mesosphere.marathon
package util
import mesosphere.AkkaUnitTest
import scala.concurrent.Future
import scala.concurrent.duration._
class TimeoutTest extends AkkaUnitTest {
"Timeout" when {
"async" should {
"complete" in {
Timeout(1.second)(Future.successful(1)).futureValue should equal(1)
... | gsantovena/marathon | src/test/scala/mesosphere/marathon/util/TimeoutTest.scala | Scala | apache-2.0 | 1,285 |
/*
* sbt-haxe
* Copyright 2014 深圳岂凡网络有限公司 (Shenzhen QiFun Network Corp., LTD)
*
* 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
*
* ... | ThoughtWorksInc/sbt-haxe | src/main/scala/com/thoughtworks/microbuilder/sbtHaxe/HaxeFlashPlugin.scala | Scala | apache-2.0 | 2,680 |
/*
* 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 ... | jasonpet/openwhisk | common/scala/src/main/scala/org/apache/openwhisk/common/tracing/OpenTracingProvider.scala | Scala | apache-2.0 | 7,151 |
package suiryc.scala.javafx.util
import javafx.{util => jfxu}
object Callback {
import scala.language.implicitConversions
implicit def fn1ToCallback[P, R](fn: P => R): jfxu.Callback[P, R] = {
new jfxu.Callback[P, R] {
override def call(p: P): R =
fn(p)
}
}
}
| swhgoon/suiryc-scala | javafx/src/main/scala/suiryc/scala/javafx/util/Callback.scala | Scala | gpl-3.0 | 292 |
/*
* 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 ... | ArvinDevel/onlineAggregationOnSparkV2 | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/ScalaReflectionSuite.scala | Scala | apache-2.0 | 10,326 |
package com.asto.dop.api.processor
import java.net.URL
import java.text.SimpleDateFormat
import java.util.Date
import com.asto.dop.api.{APIModel, Startup}
import com.asto.dop.core.CoreModel
import com.asto.dop.core.helper.KafkaHelper
import com.ecfront.common.Resp
import com.typesafe.scalalogging.slf4j.LazyLogging
im... | zj-lingxin/dop | source/api/src/main/scala/com/asto/dop/api/processor/MessageProcessor.scala | Scala | mit | 3,161 |
package com.softwaremill.streams
import akka.actor.ActorSystem
import akka.stream.stage.{GraphStageLogic, GraphStage}
import akka.stream._
import akka.stream.scaladsl._
import akka.stream.scaladsl.GraphDSL.Implicits._
import scala.concurrent.Await
import scala.concurrent.duration._
import scalaz.\\/-
import scalaz.co... | softwaremill/streams-tests | src/main/scala/com/softwaremill/streams/ParallelProcessing.scala | Scala | apache-2.0 | 3,343 |
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
*/
package docs.scaladsl.mb
import com.lightbend.lagom.scaladsl.api.ServiceCall
import com.lightbend.lagom.scaladsl.persistence.EventStreamElement
import com.lightbend.lagom.scaladsl.persistence.PersistentEntityRegistry
import com.lightbend.lagom.scalads... | lagom/lagom | docs/manual/scala/guide/broker/code/docs/scaladsl/mb/HelloServiceImpl.scala | Scala | apache-2.0 | 1,579 |
package edu.ucsc.dbtune.cli
import scala.actors.Actor
import scala.actors.Actor._
import java.lang.Integer
import java.sql.SQLException
import java.util.HashSet
import java.util.Iterator
import java.util.Set
import edu.ucsc.dbtune.DatabaseSystem
import edu.ucsc.dbtune.metadata.Index
import edu.ucsc.dbtune.util.E... | dbgroup-at-ucsc/dbtune | extensions/cli/src/edu/ucsc/dbtune/cli/WFIT.scala | Scala | bsd-3-clause | 2,619 |
package com.taig.tmpltr.engine.html.property
import com.taig.tmpltr.Property
trait link
{
class rel( rel: String ) extends Property( rel )
object rel
{
object alternate extends rel( "alternate" )
object archives extends rel( "archives" )
object author extends rel( "author" )
object bookmark extends rel( "b... | Taig/Play-Tmpltr | app/com/taig/tmpltr/engine/html/property/link.scala | Scala | mit | 1,022 |
/*
* 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 ... | jiajiechen/mxnet | scala-package/core/src/main/scala/ml/dmlc/mxnet/IO.scala | Scala | apache-2.0 | 8,340 |
package gh2011.models
import net.liftweb.json.JsonAST.JValue
case class SimplifiedActor(url: String, avatar_url: String)
object SimplifiedActor
{
def apply(json: JValue): Option[SimplifiedActor] =
{
val n2s = gh3.node2String(json)(_)
val n2l = gh3.node2Long(json)(_)
val url = n2s("url")
... | mgoeminne/github_etl | src/main/scala/gh2011/models/SimplifiedActor.scala | Scala | mit | 514 |
package com.godatadriven.twitter_classifier
import java.util.concurrent.{TimeUnit, TimeoutException}
import com.google.gson.Gson
import org.apache.spark.streaming.twitter.TwitterUtils
import org.apache.spark.streaming.{Seconds, StreamingContext}
import org.apache.spark.{Accumulator, SparkConf}
import org.neo4j.driver... | rweverwijk/twitter-to-neo4j | src/main/scala/com/godatadriven/twitter_classifier/StoreToNeo4j.scala | Scala | apache-2.0 | 3,381 |
/*******************************************************************************
* Copyright (c) 2019. Carl Minden
*
* 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 ... | carlminden/anathema-roguelike | src/com/anathema_roguelike/main/ui/uielements/interactiveuielements/menus/AbstractMenuItem.scala | Scala | gpl-3.0 | 2,759 |
/**
* This software is licensed under the GNU Affero General Public License, quoted below.
*
* This file is a part of PowerAPI.
*
* Copyright (C) 2011-2014 Inria, University of Lille 1.
*
* PowerAPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public Lic... | rouvoy/powerapi | powerapi-core/src/main/scala/org/powerapi/core/OSHelper.scala | Scala | agpl-3.0 | 9,300 |
package notebook.front.third.bokeh
import io.continuum.bokeh.{Renderer, Plot}
/**
* Created by gerrit on 15.11.14.
*/
object PlotOps {
implicit class PlotOps(val plot: Plot) {
def +=(renderer: Renderer): Plot = {
plot.renderers := renderer :: plot.renderers.value
plot
}
def ++=(renderer... | vitan/spark-notebook | modules/common/src/main/scala/notebook/front/third/bokeh/PlotOps.scala | Scala | apache-2.0 | 430 |
package fr.inria.spirals.sigma.ttc14.fixml
import fr.unice.i3s.sigma.m2t.M2T
import fr.inria.spirals.sigma.ttc14.fixml.objlang.support.ObjLang
import fr.inria.spirals.sigma.ttc14.fixml.objlang.support.ObjLang._objlang._
class ObjLang2CPPClassHeader extends BaseObjLang2Class with ObjLang2CPP with ObjLang2CPPHeader {
... | fikovnik/ttc14-fixml-sigma | ttc14-fixml-extension-1/src/fr/inria/spirals/sigma/ttc14/fixml/ObjLang2CPPClassHeader.scala | Scala | epl-1.0 | 945 |
/*
* Copyright 2013 Georgia Tech Applied Research Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | gtri/typesafeconfig-extensions | for-webapps/src/test/scala/edu/gatech/gtri/typesafeconfigextensions/forwebapps/ServletContextDirectoryConfigSourceSpec.scala | Scala | apache-2.0 | 1,392 |
/*
* 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/plan/batch/sql/TableScanTest.scala | Scala | apache-2.0 | 4,972 |
object Build extends android.AutoBuild | aafa/realm-sbt-plugin | src/sbt-test/sbt-realm-test/realm/project/Build.scala | Scala | mit | 39 |
package org.xmly.thrall.rec.service
import org.springframework.stereotype.Component
import org.xmly.thrall.rec.protocol.RecRequest
import org.apache.spark.mllib.recommendation.MatrixFactorizationModel
import org.apache.spark.SparkConf
import org.apache.spark.SparkContext
@Component
class ScoreService {
val conf ... | gexiao01/thrall | thrall-rec/src/main/scala/org/xmly/thrall/rec/service/ScoreService.scala | Scala | apache-2.0 | 625 |
/*
* Copyright (c) 2014-2019 Israel Herraiz <isra@herraiz.org>
*
* 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, c... | iht/fpinscala | src/main/scala/chap03/ex06.scala | Scala | mit | 1,512 |
package dsmoq.controllers
import scala.util.Failure
import scala.util.Success
import scala.util.Try
import org.scalatra.ActionResult
import org.scalatra.BadRequest
import org.scalatra.Forbidden
import org.scalatra.InternalServerError
import org.scalatra.NotFound
import org.scalatra.Ok
import org.slf4j.MarkerFactory
... | nkawa/dsmoq | server/apiServer/src/main/scala/dsmoq/controllers/ResponseUtil.scala | Scala | apache-2.0 | 3,873 |
/*
* Copyright 2009 Ilja Booij
*
* This file is part of GarminTrainer.
*
* GarminTrainer 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 lat... | chmandrade/garmintrainer | src/main/scala/nl/iljabooij/garmintrainer/parser/digester/DigesterMeasuredTrackPoint.scala | Scala | gpl-3.0 | 1,457 |
object Test extends App {
def nested: Unit = {
sealed trait Foo
object Foo {
trait Bar extends Foo
trait Baz extends Foo
}
val subs = Macros.knownDirectSubclasses[Foo]
assert(subs.toSet == Set("Bar", "Baz"))
}
nested
}
| scala/scala | test/files/run/t7046-2/Test_2.scala | Scala | apache-2.0 | 259 |
package com.typesafe.slick.testkit.tests
import org.junit.Assert._
import com.typesafe.slick.testkit.util.{TestkitTest, TestDB}
class ExecutorTest(val tdb: TestDB) extends TestkitTest {
import tdb.profile.simple._
def test {
object T extends Table[Int]("t") {
def a = column[Int]("a")
def * = a
... | boldradius/slick | slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/ExecutorTest.scala | Scala | bsd-2-clause | 672 |
/***
* Copyright 2014 Rackspace US, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | wdschei/api-checker | core/src/test/scala/com/rackspace/com/papi/components/checker/wadl/WADLCheckerSpec.scala | Scala | apache-2.0 | 1,001,516 |
/**
* This file is part of the TA Buddy project.
* Copyright (c) 2012-2014 Alexey Aksenov ezh@ezh.msk.ru
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Global License version 3
* as published by the Free Software Foundation with the addition... | digimead/digi-TABuddy-desktop | part-core/src/main/scala/org/digimead/tabuddy/desktop/core/support/ConditionMap.scala | Scala | agpl-3.0 | 3,125 |
package bgstats.model
case class RenderedBreakpoint[M](
breakpoint: Breakpoint[M],
abilities: Abilities) {
lazy val achieved: Boolean =
abilities.values.getOrElse(breakpoint.ability, 0) >= breakpoint.minimum
}
| BardurArantsson/bg-stats | src/main/scala/bgstats/model/RenderedBreakpoint.scala | Scala | apache-2.0 | 223 |
package com.sk.app.proxmock.application.domain.providers.body
import com.jayway.restassured.RestAssured._
import com.sk.app.proxmock.BaseIntegrationTest
import org.hamcrest.Matchers._
/**
* Created by szymo on 25/11/2016.
*/
class StaticBodyProviderTest extends BaseIntegrationTest("/mock") {
val expectedBody = ... | szymonkudzia/proxmock | sources/src/test/scala/com/sk/app/proxmock/application/domain/providers/body/StaticBodyProviderTest.scala | Scala | mit | 748 |
// Copyright 2016 zakski.
// 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 of the License ... | zakski/project-maeve | src/main/scala/com/szadowsz/maeve/core/instruction/target/multi/feeder/FeederTarget.scala | Scala | apache-2.0 | 1,272 |
package chapter08
/**
* 8.4 간단한 형태의 함수 리터럴
*/
object c08_i04 {
val someNumbers = List(-11, -10, 0, 5, 10)
someNumbers.filter((x: Int) => x > 0)
/*
* 함수 리터럴을 좀 더 간단하게 만드는 방법은 인자의 타입을 제거하는 것
* someNumbers 는 List[Int] 이므로
* 스칼라 컴파일러는 인자로 넘겨진 x가 Int 타입인 것을 추론할 수 있다.
*
* 이를 타깃 타이핑이라 함
*/
someNu... | seraekim/srkim-lang-scala | src/main/java/chapter08/c08_i04.scala | Scala | bsd-3-clause | 506 |
/**
* Copyright (C) 2016 Pau Carré Cardona - All Rights Reserved
* You may use, distribute and modify this code under the
* terms of the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt).
*/
package db
import core.Crop
import db.Dataset._
import slick.driver.H2Driver.api._
class BoundingBo... | paucarre/tiefvision | src/scala/tiefvision-web/app/db/BoundingBoxTable.scala | Scala | apache-2.0 | 1,449 |
/*
* 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/core/src/main/scala/org/apache/spark/sql/jdbc/PostgresDialect.scala | Scala | apache-2.0 | 5,368 |
/*
* Copyright 2014 Databricks
*
* 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... | saurfang/spark-csv | src/main/scala/com/databricks/spark/csv/package.scala | Scala | apache-2.0 | 5,955 |
package chat.tox.antox.activities
import java.util.regex.Pattern
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.os.Bundle
import android.support.v4.app.NavUtils
import android.support.v7.app.AppCompatActivity
import android.text.Html
import android.text.method.LinkMovement... | wiiam/Antox | app/src/main/scala/chat/tox/antox/activities/ToxMeInfoActivity.scala | Scala | gpl-3.0 | 1,696 |
// https://leetcode.com/problems/longest-common-prefix
object Solution {
def longestCommonPrefix(strings: Array[String]): String =
strings reduceOption commonPrefix getOrElse ""
def commonPrefix(x: String, y: String): String =
if (y startsWith x) x else commonPrefix(x.init, y)
}
| airt/codegames | leetcode/014-longest-common-prefix.scala | Scala | mit | 296 |
object SCL6716{
val l: List[String] = List("another string").collect(/*start*/_ match { case s: String => s }/*end*/)
}
//PartialFunction[String, NotInferedB] | ilinum/intellij-scala | testdata/typeInference/bugs5/SCL6716.scala | Scala | apache-2.0 | 161 |
/**
* Copyright (c) 2015, Cloudera, Inc. All Rights Reserved.
*
* Cloudera, Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"). You may not use this file except in
* Version 2.0 (the "License"). You may not use this file except in
* compliance with the License. You may obtain a... | pronix/spark-timeseries | src/test/scala/com/cloudera/sparkts/TimeSeriesStatisticalTestsSuite.scala | Scala | apache-2.0 | 4,086 |
package org.bizzle.tester.criteria
/**
* Created by IntelliJ IDEA.
* User: Jason
* Date: 12/19/11
* Time: 9:21 PM
*/
sealed trait TestingFlag
object TestingFlag {
val flags = Set[TestToggleFlag](Talkative, StackTrace)
}
sealed trait TestToggleFlag extends TestingFlag {
implicit def flag2Criteria(that: Tes... | TheBizzle/Tester | src/main/org/bizzle/tester/criteria/TestingFlag.scala | Scala | bsd-3-clause | 1,177 |
/*
* Copyright (c) 2013-2015 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0 which
* accompanies this distribution and is available at
* http://www.opensource.org/licenses/apache2.0.php.
... | giserh/geomesa | geomesa-z3/src/test/scala/org/locationtech/geomesa/curve/Z3RangeTest.scala | Scala | apache-2.0 | 2,513 |
package com.ponkotuy.parser
import scala.util.parsing.combinator._
object PCQParser extends RegexParsers {
override def skipWhitespace = true
override val whiteSpace = """(#.*\\n|\\s)+""".r
def name = """[a-z\\_]\\w*""".r
def typ = """[A-Z]\\w*""".r
def column = name ~ typ ^^ { case n ~ t => Column(n, t) }... | ponkotuy/ScalaDBCompiler | src/main/scala/com/ponkotuy/parser/PCQParser.scala | Scala | mit | 711 |
/*
* Copyright 2022 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/iht-frontend | test/iht/controllers/application/declaration/DeclarationControllerTest.scala | Scala | apache-2.0 | 25,171 |
/*
* Copyright (c) 2018. Fengguo Wei and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License v2.0
* which accompanies this distribution, and is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* Detailed contributors ar... | arguslab/Argus-SAF | project/Common.scala | Scala | apache-2.0 | 1,257 |
// Databricks notebook source
// MAGIC %md
// MAGIC
// MAGIC ## Lit
// MAGIC - https://arxiv.org/pdf/1612.01474.pdf
// MAGIC - https://towardsdatascience.com/3-methods-for-parallelization-in-spark-6a1a4333b473
// MAGIC - https://medium.com/@Sushil_Kumar/artificial-neural-network-with-spark-mllib-9474570239d8
// MAGIC ... | lamastex/scalable-data-science | dbcArchives/2021/000_0-sds-3-x-projects/student-project-08_group-DistributedEnsemble/development/00_Introduction.scala | Scala | unlicense | 612 |
package org.jetbrains.plugins.scala
package annotator
import com.intellij.codeInspection.ProblemHighlightType
import com.intellij.lang.annotation.{Annotation, AnnotationHolder}
import com.intellij.psi.{PsiElement, PsiMethod, PsiNamedElement, PsiParameter}
import org.jetbrains.plugins.scala.annotator.createFromUsage._
... | loskutov/intellij-scala | src/org/jetbrains/plugins/scala/annotator/ApplicationAnnotator.scala | Scala | apache-2.0 | 15,586 |
import com.google.inject.{Guice, AbstractModule}
import play.api.GlobalSettings
import play.api.mvc.RequestHeader
import services.{SimpleUUIDGenerator, UUIDGenerator}
import play.api.mvc.Results._
import scala.concurrent.Future
/**
* Set up the Guice injector and provide the mechanism for return objects from the de... | mawentao007/Mongo-play-angular | app/Global.scala | Scala | apache-2.0 | 1,291 |
package de.sciss
import net.didion.jwnl.data.POS
package object wordnet {
type Synset = net.didion.jwnl.data.Synset
type POS = net.didion.jwnl.data.POS
val Noun = POS.NOUN
val Verb = POS.VERB
val Adjective = POS.ADJECTIVE
val Adjverb = POS.ADVERB
}
| Sciss/ScalaWordNet | src/main/scala/de/sciss/wordnet/package.scala | Scala | gpl-2.0 | 279 |
/*
* Copyright 2001-2014 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... | SRGOM/scalatest | scalatest-test/src/test/scala/org/scalatest/OneElementOfContainMatcherSpec.scala | Scala | apache-2.0 | 17,217 |
/*
Copyright 2009 David Hall, Daniel Ramage
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writin... | scalanlp/breeze | math/src/test/scala/breeze/util/IndexTest.scala | Scala | apache-2.0 | 2,212 |
package net.sansa_stack.rdf.spark.io.turtle
import net.sansa_stack.rdf.common.annotation.Experimental
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.{ FileSystem, FSDataInputStream, Path, Seekable }
import org.apache.hadoop.io.{ LongWritable, Text }
import org.apache.hadoop.io.compress._
impor... | SANSA-Stack/Spark-RDF | sansa-rdf-spark/src/main/scala/net/sansa_stack/rdf/spark/io/turtle/TurtleRecordReader.scala | Scala | gpl-3.0 | 5,959 |
package com.skisel.skeleton.ws
import akka.actor._
import com.skisel.skeleton.sample.Pinger.PingEvent
import com.skisel.skeleton.sample.{SampleResponse, SampleActor, SampleRequest}
import com.skisel.skeleton.utils.Broadcaster
import Broadcaster.{RemoveListener, AddListener}
import com.skisel.skeleton.ws.RequestRespons... | skisel/skeleton | app/com/skisel/skeleton/ws/ConnectionActor.scala | Scala | apache-2.0 | 2,661 |
package breeze.linalg
/*
Copyright 2012 David Hall
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... | claydonkey/breeze | math/src/test/scala/breeze/linalg/DenseMatrixTest.scala | Scala | apache-2.0 | 24,863 |
package com.github.mdr.mash.ns.core
import com.github.mdr.mash.functions.{ BoundParams, MashFunction, ParameterModel }
import com.github.mdr.mash.runtime.{ MashObject, MashValue }
object NoArgFunction extends MashFunction("core.noArg") {
val NoArgValue: MashValue = MashObject.empty.withClass(NoArgClass)
def opt... | mdr/mash | src/main/scala/com/github/mdr/mash/ns/core/NoArgFunction.scala | Scala | mit | 671 |
import java.io._
import collection._
object Test {
def serializeDeserialize[T <: AnyRef](obj: T) = {
val buffer = new ByteArrayOutputStream
val out = new ObjectOutputStream(buffer)
out.writeObject(obj)
val in = new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray))
in.readObject.asI... | lrytz/scala | test/files/run/t5018.scala | Scala | apache-2.0 | 935 |
/*
* 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/CP274.scala | Scala | apache-2.0 | 939 |
package nest.sparkle.time.server
import spray.json.DefaultJsonProtocol
/** served to the javascript client so it can find the web socket port */
case class JsServiceConfig(webSocketPort:Int, adminUploadPort:Int)
object JsServiceConfigJson extends DefaultJsonProtocol {
implicit val JsServiceConfigFormat = jsonForma... | mighdoll/sparkle | protocol/src/main/scala/nest/sparkle/time/server/JsServiceConfig.scala | Scala | apache-2.0 | 342 |
package com.szadowsz.starform.model.star.calc
import com.szadowsz.starform.model.star.constants.FoggBaseStarConst
import com.szadowsz.starform.rand.RandGenTrait
import com.szadowsz.starform.system.bodies.star.FoggStar
/**
* Created on 13/04/2017.
*/
case class FoggStarCalc(override val sConst: FoggBaseStarConst) ... | zakski/accrete-starform-stargen | recreations/composite/src/main/scala/com/szadowsz/starform/model/star/calc/FoggStarCalc.scala | Scala | apache-2.0 | 3,886 |
/*
* 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... | chipsenkbeil/incubator-toree | kernel-api/src/main/scala/org/apache/toree/utils/KeyValuePairUtils.scala | Scala | apache-2.0 | 2,286 |
/*
* Copyright 2014-2021 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | brharrington/atlas | atlas-eval/src/main/scala/com/netflix/atlas/eval/graph/SimpleLegends.scala | Scala | apache-2.0 | 4,716 |
package nmcb.chronos
import org.scalatest.{FlatSpec, Matchers}
/**
* [] is period A
* () is period B
*
* ---[ ]--( )---
* ---[ ( ] )---
* ---[ ( ) ]---
*
* ---( )--[ ]---
* ---( [ ) ]---
* ---( [ ] )---
*/
class PeriodTest extends FlatSpec with Matchers {
val t1 = Time("01:00")
val t2 = ... | nmcb/chronos | src/test/scala/nmcb/chronos/PeriodTest.scala | Scala | artistic-2.0 | 1,797 |
package com.artclod.mathml.scalar
import com.artclod.mathml._
import com.artclod.mathml.scalar.concept.Constant
import scala.util.{Success, _}
import scala.xml._
case class Logbase(val value: Constant)
extends MathMLElem(MathML.h.prefix, "logbase", MathML.h.attributes, MathML.h.scope, false, Seq(value): _*) with No... | kristiankime/calc-tutor | app/com/artclod/mathml/scalar/Logbase.scala | Scala | mit | 1,283 |
package mesosphere.marathon
import java.util.concurrent.CountDownLatch
import java.util.concurrent.atomic.AtomicBoolean
import java.util.{ Timer, TimerTask }
import javax.inject.{ Inject, Named }
import akka.actor.{ ActorRef, ActorSystem, Props }
import akka.pattern.ask
import akka.util.Timeout
import com.google.comm... | tnachen/marathon | src/main/scala/mesosphere/marathon/MarathonSchedulerService.scala | Scala | apache-2.0 | 11,228 |
package mesosphere.marathon.state
import java.io.{ ByteArrayInputStream, ByteArrayOutputStream, ObjectInputStream, ObjectOutputStream }
import javax.inject.Inject
import mesosphere.marathon.Protos.StorageVersion
import mesosphere.marathon.state.PathId._
import mesosphere.marathon.state.StorageVersions._
import mesosp... | 14Zen/marathon | src/main/scala/mesosphere/marathon/state/Migration.scala | Scala | apache-2.0 | 6,551 |
package ohnosequences.blast.api
import ohnosequences.cosas._, types._
/*
This trait models a command part of the `BLAST` suite, like `blastn`, `blastp`, or `makeblastdb`.
All the BLAST suite commands, together with their arguments, options and default values
are defined in separate files in the (commands/)[com... | ohnosequences/blast | src/main/scala/api/expressions.scala | Scala | agpl-3.0 | 2,141 |
package com.twitter.finagle.factory
import com.twitter.finagle._
import com.twitter.util.{Future, Time, Await}
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import org.scalatest.mock.MockitoSugar
import com.twitter.conversions.time._
@RunWith(classOf[JUnitRunner]... | JustinTulloss/finagle | finagle-core/src/test/scala/com/twitter/finagle/factory/ServiceFactoryCacheTest.scala | Scala | apache-2.0 | 2,405 |
/* tree-converter.scala
* Copyright (C) 2012 Grégoire Détrez
*
* 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
* version 2.1 of the License, or (at your option) any later ver... | GrammaticalFramework/JPGF | src/org/grammaticalframework/parser/tree-converter.scala | Scala | lgpl-2.1 | 5,453 |
/*
* Copyright 2001-2013 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | travisbrown/scalatest | src/test/scala/org/scalatest/matchers/ShouldContainKeySpec.scala | Scala | apache-2.0 | 51,845 |
package com.pfalabs.tiny.features
trait FeatureProvider {
def getFeature(name: String): Feature;
} | stillalex/tiny | features/src/main/scala/com/pfalabs/tiny/features/FeatureProvider.scala | Scala | apache-2.0 | 103 |
/*
* Copyright (c) 2011-15 Miles Sabin
*
* 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... | liff/shapeless | core/src/test/scala/shapeless/nat.scala | Scala | apache-2.0 | 7,613 |
package routes
import akka.http.scaladsl.model.StatusCodes
import akka.http.scaladsl.model.headers.HttpCookie
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server.Route
import com.github.scribejava.core.oauth.OAuth20Service
import com.google.inject.Inject
import com.google.inject.name.Named
i... | sysgears/apollo-universal-starter-kit | modules/user/server-scala/src/main/scala/routes/FacebookAuthController.scala | Scala | mit | 3,432 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | zzcclp/carbondata | integration/spark/src/main/scala/org/apache/carbondata/view/MVFunctions.scala | Scala | apache-2.0 | 1,226 |
package core
import akka.actor.{Props,Actor}
class TenantActor extends Actor {
import UserActor._
import messages.TenantMessages._
val userActor = context.actorOf(Props[UserActor])
def receive: Receive = {
case CreateTenant(tenent) =>
case UserCreated(tenant, user) =>
userActor ! user
case... | hsihealth/aim_prototype | src/main/scala/core/tenant_actor.scala | Scala | apache-2.0 | 357 |
/**
* Copyright (C) 2009 Orbeon, Inc.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) any later version.
*
* This program i... | martinluther/orbeon-forms | src/main/scala/org/orbeon/oxf/webapp/OrbeonServletContextListener.scala | Scala | lgpl-2.1 | 2,354 |
package actors
import actors.DrtStaticParameters.expireAfterMillis
import actors.PartitionedPortStateActor.GetFlights
import actors.daily.PassengersActor
import actors.persistent.AlertsActor
import actors.persistent.QueueLikeActor.UpdatedMillis
import actors.persistent.arrivals.CirriumLiveArrivalsActor
import actors.p... | UKHomeOffice/drt-scalajs-spa-exploration | server/src/main/scala/actors/DrtSystemInterface.scala | Scala | apache-2.0 | 21,758 |
package org.dele.text.maen.matchers
import org.dele.text.maen.ErrorHandling.{SubMatchCheckerErrorUnknownCheckerId, SubMatchCheckerLibErrorUnknownTemplate}
import org.dele.text.maen.matchers.TMatcher.{MId, TMatcherDep}
import org.dele.text.maen.{ConfValueStringParser, TInput}
import org.dele.text.maen.ConfValueStringPa... | new2scala/text-util | maen/src/main/scala/org/dele/text/maen/matchers/SubMatchCheckerLib.scala | Scala | apache-2.0 | 5,190 |
object Test {
def main(args: Array[String]): Unit = println("hello dotty!")
}
| lampepfl/dotty | tests/run/hello.scala | Scala | apache-2.0 | 80 |
/*
* Copyright (c) 2016 SnappyData, Inc. All rights reserved.
*
* 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 ap... | vjr/snappydata | cluster/src/main/scala/org/apache/spark/scheduler/cluster/SnappyEmbeddedModeClusterManager.scala | Scala | apache-2.0 | 3,450 |
/*
* 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 ... | lxsmnv/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/maskExpressions.scala | Scala | apache-2.0 | 22,957 |
package gie.app.gbb.model.import_export
object ImportImpl {
def apply(inRoot: java.io.File) = ImportImpl00(inRoot)
}
| igorge/gbb | src/main/scala/code/model/export_import/import.scala | Scala | gpl-2.0 | 123 |
package io.aos.ebnf.spl.semantic
import io.aos.ebnf.spl.semantic.DataSourceMetadata;
import io.aos.ebnf.spl.semantic.SplSemanticAnalyzer;
import org.scalatest.junit.ShouldMatchersForJUnit
import org.scalatest.junit.JUnitSuite
import org.junit.Test
import io.aos.ebnf.spl.ast._
import io.aos.ebnf.spl.parser.SplParser
... | echalkpad/t4f-data | parser/ebnf/src/test/scala/io/aos/ebnf/spl/semantic/BugTest.scala | Scala | apache-2.0 | 1,732 |
/*
* Copyright 2001-2013 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | travisbrown/scalatest | src/test/scala/org/scalactic/FreshConversionCheckedSeqEqualityConstraintsSpec.scala | Scala | apache-2.0 | 4,443 |
package changestream
import java.io.File
import akka.actor.{Props}
import akka.testkit.TestProbe
import changestream.actors.PositionSaver._
import changestream.actors.{PositionSaver, StdoutActor}
import changestream.events.{Delete, Insert, MutationWithInfo, Update}
import changestream.helpers.{Config, Database, Fixtu... | mavenlink/changestream | src/test/scala/changestream/ChangeStreamISpec.scala | Scala | mit | 11,685 |
package com.tajpure.scheme.compiler.parser
import com.tajpure.scheme.compiler.Constants
import com.tajpure.scheme.compiler.ast.Bool
import com.tajpure.scheme.compiler.ast.Delimeter
import com.tajpure.scheme.compiler.ast.FloatNum
import com.tajpure.scheme.compiler.ast.IntNum
import com.tajpure.scheme.compiler.ast.Node
... | tajpure/SoScheme | src/main/scala/com/tajpure/scheme/compiler/parser/LexParser.scala | Scala | gpl-3.0 | 7,600 |
/*
* Copyright 2016 Uncharted Software Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... | unchartedsoftware/sparkpipe-twitter-ops | src/test/scala/software/uncharted/sparkpipe/ops/community/twitter/entities/packageSpec.scala | Scala | apache-2.0 | 790 |
/*
* Copyright 2016 Dennis Vriend
*
* 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... | dnvriend/study-category-theory | typeclasses/src/test/scala/com/github/dnvriend/Person.scala | Scala | apache-2.0 | 1,710 |
package minCostFlow
import optimus.optimization._
object Graph {
type Vertex = Int
type Vertices = IndexedSeq[Vertex]
type Edge = Int
type Supply = IndexedSeq[Int]
type Edges = IndexedSeq[(Vertex, Vertex)]
type CostValue = Int
type Cost = IndexedSeq[CostValue]
... | yfcai/tutorial-assignment | main/minCostFlow.Graph.scala | Scala | unlicense | 2,145 |
/* Copyright (C) 2008-2014 University of Massachusetts Amherst.
This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible)
http://factorie.cs.umass.edu, http://github.com/factorie
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with... | patverga/factorie | src/main/scala/cc/factorie/app/nlp/phrase/ChainChunker.scala | Scala | apache-2.0 | 14,511 |
Subsets and Splits
Filtered Scala Code Snippets
The query filters and retrieves a sample of code snippets that meet specific criteria, providing a basic overview of the dataset's content without revealing deeper insights.